open-index/open-npm huggingface dataset:
npm package: @punchly/dom
Description: 生成各种 DOM 节点.
Author: punchly
Latest version: 1.1.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# DOM

生成各种 DOM 节点.

# start

```bash
npm i @punchly/dom
```

# api

## DOM

### DOM.PROPERTIES

`Symbol('PROPERTIES')`

### DOM.\$(...args)

```ts
{
    (str: string): HTMLCollection;
    (node: ParentNode, ...children: (string | Node)[]): readonly Node[] & {
        children: HTMLCollection;
    }; // Return[0] = node;
}
```

### DOM.\$\[tagName](attrs, children)

```ts
{
    (attrs?: Attr, children?: ArrayLike<string | Node>) => HTMLElementTagNameMap[tagName];
}

type Attr = {
    [qualifiedName: string]: string;
} & {
    [PROPERTIES]: {...};
    class: string[];
    style: CSSStyleDeclaration;
};
```

## Style

### new Style(styleSheet, parentNode) / Style(...)

```ts
{
    new (styleSheet: StyleSheets, parentNode?: Node = document.head): {
        readonly node: HTMLStyleElement;
        insert(selector: string): {
            index: number;
            rule: CSSStyleRule;
        };
        insertRule(styleSheet: StyleSheets): HTMLStyleElement;
    }
    (styleSheet: StyleSheets, parentNode?: Node): ...;
}

type StyleSheets = {
    [selector: string]: CSSStyleDeclaration;
} & {
    [AT]: {
        [identifier: string]: string;
        [identifier: string]: [rule: string];
        [identifier: string]: [rule: string, cssBlock: {
            [selector: string]: CSSStyleDeclaration;
        }];
    };
};
```

## Selector
npm package: @punchly/proxy
Description: 生成各种 DOM 节点.
Author: punchly
Latest version: 1.0.5
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# DOM

生成各种 DOM 节点.

# start

```bash
npm i @punchly/dom
```

# api

## DOM

### DOM.PROPERTIES

`Symbol('PROPERTIES')`

### DOM.\$(...args)

```ts
{
    (str: string): HTMLCollection;
    (node: ParentNode, ...children: (string | Node)[]): readonly Node[] & {
        children: HTMLCollection;
    }; // Return[0] = node;
}
```

### DOM.\$\[tagName](attrs, children)

```ts
{
    (attrs?: Attr, children?: ArrayLike<string | Node>) => HTMLElementTagNameMap[tagName];
}

type Attr = {
    [qualifiedName: string]: string;
} & {
    [PROPERTIES]: {...};
    class: string[];
    style: CSSStyleDeclaration;
};
```

## Style

### new Style(styleSheet, parentNode) / Style(...)

```ts
{
    new (styleSheet: StyleSheets, parentNode?: Node = document.head): {
        readonly node: HTMLStyleElement;
        insert(selector: string): {
            index: number;
            rule: CSSStyleRule;
        };
        insertRule(styleSheet: StyleSheets): HTMLStyleElement;
    }
    (styleSheet: StyleSheets, parentNode?: Node): ...;
}

type StyleSheets = {
    [selector: string]: CSSStyleDeclaration;
} & {
    [AT]: {
        [identifier: string]: string;
        [identifier: string]: [rule: string];
        [identifier: string]: [rule: string, cssBlock: {
            [selector: string]: CSSStyleDeclaration;
        }];
    };
};
```

## Selector