@firsthandjs/dom 0.6.3 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component.d.ts +4 -4
- package/dist/component.d.ts.map +1 -1
- package/dist/insert.d.ts +2 -2
- package/dist/insert.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/component.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import type { ReadonlyProps } from '@firsthandjs/core';
|
|
|
2
2
|
import { type DynamicChild } from './insert.js';
|
|
3
3
|
/** Marks a value as a Firsthand component; used by the JSX runtime and compiler. */
|
|
4
4
|
export declare const COMPONENT: unique symbol;
|
|
5
|
-
export
|
|
5
|
+
export type ComponentOptions = {
|
|
6
6
|
/** Attach a shadow root to the element host. Implies `tag` (ADR-0007). */
|
|
7
7
|
shadow?: boolean;
|
|
8
8
|
/** Host this component in a real custom element (ADR-0003). */
|
|
9
9
|
tag?: true | string;
|
|
10
10
|
/** Explicit attribute codecs for vanilla-HTML consumers of the element. */
|
|
11
11
|
attributes?: Readonly<Record<string, AttributeCodec>>;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
/** Converts an attribute string to a prop value. `null` means "absent". */
|
|
14
14
|
export type AttributeCodec = (raw: string | null) => unknown;
|
|
15
15
|
/**
|
|
@@ -36,7 +36,7 @@ export type View = Node | string | number | boolean | null | undefined | Dynamic
|
|
|
36
36
|
export type PropsArgument<P> = {
|
|
37
37
|
[K in keyof P]: undefined extends P[K] ? P[K] | undefined : P[K];
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type Component<P> = {
|
|
40
40
|
/**
|
|
41
41
|
* Creates an instance.
|
|
42
42
|
*
|
|
@@ -55,7 +55,7 @@ export interface Component<P> {
|
|
|
55
55
|
readonly name: string;
|
|
56
56
|
/** Registered custom element name, once `defineElement` has run. */
|
|
57
57
|
tag: string | undefined;
|
|
58
|
-
}
|
|
58
|
+
};
|
|
59
59
|
/**
|
|
60
60
|
* Sets the prefix for custom element names. Call once, at startup.
|
|
61
61
|
*
|
package/dist/component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,oFAAoF;AACpF,eAAO,MAAM,SAAS,EAAE,OAAO,MAA0C,CAAC;AAE1E,MAAM,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,oFAAoF;AACpF,eAAO,MAAM,SAAS,EAAE,OAAO,MAA0C,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CACvD,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,IAAI,GACd,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,IAAI,EAAE,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAC5B,CAAC,IAAI,MAAM,CAAC,GAAG,SA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UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM,CAM7D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAc5E"}
|
package/dist/insert.d.ts
CHANGED
|
@@ -16,12 +16,12 @@ declare const PART: unique symbol;
|
|
|
16
16
|
* to. Once the array is in the DOM, each one is bound through `insert` under
|
|
17
17
|
* its own owner, exactly as a child of a real element would be.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type DynamicChild = {
|
|
20
20
|
readonly [PART]: true;
|
|
21
21
|
readonly anchor: Text;
|
|
22
22
|
readonly thunk: () => unknown;
|
|
23
23
|
readonly owner: Owner | null;
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
/** Marks a dynamic child of a fragment. Emitted by the compiler. */
|
|
26
26
|
export declare function part(thunk: () => unknown): DynamicChild;
|
|
27
27
|
/**
|
package/dist/insert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../src/insert.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGxF,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;AAQ7C,QAAA,MAAM,IAAI,EAAE,OAAO,MAAiC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../src/insert.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGxF,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;AAQ7C,QAAA,MAAM,IAAI,EAAE,OAAO,MAAiC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,oEAAoE;AACpE,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,OAAO,GAAG,YAAY,CAEvD;AAMD;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAE,IAAI,GAAG,IAAW,GAAG,IAAI,CA4BrF;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CACxB,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,GAAG,IAAI,EACnB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,GACb,SAAS,CAiEX;AAmED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAqEvF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firsthandjs/dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "DOM parts, templates, components, portals and keyed lists for Firsthand.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@firsthandjs/core": "0.
|
|
28
|
+
"@firsthandjs/core": "0.7.1"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=20.11.0"
|