@bquery/bquery 1.5.0 → 1.6.0

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.
Files changed (106) hide show
  1. package/README.md +586 -546
  2. package/dist/component/component.d.ts +13 -5
  3. package/dist/component/component.d.ts.map +1 -1
  4. package/dist/component/html.d.ts +40 -3
  5. package/dist/component/html.d.ts.map +1 -1
  6. package/dist/component/index.d.ts +2 -2
  7. package/dist/component/index.d.ts.map +1 -1
  8. package/dist/component/library.d.ts.map +1 -1
  9. package/dist/component/types.d.ts +131 -16
  10. package/dist/component/types.d.ts.map +1 -1
  11. package/dist/component-BEQgt5hl.js +600 -0
  12. package/dist/component-BEQgt5hl.js.map +1 -0
  13. package/dist/component.es.mjs +7 -6
  14. package/dist/config-DRmZZno3.js.map +1 -1
  15. package/dist/core-BGQJVw0-.js +35 -0
  16. package/dist/core-BGQJVw0-.js.map +1 -0
  17. package/dist/{core-CK2Mfpf4.js → core-CCEabVHl.js} +2 -2
  18. package/dist/{core-CK2Mfpf4.js.map → core-CCEabVHl.js.map} +1 -1
  19. package/dist/core.es.mjs +1 -1
  20. package/dist/effect-AFRW_Plg.js +84 -0
  21. package/dist/effect-AFRW_Plg.js.map +1 -0
  22. package/dist/full.d.ts +4 -4
  23. package/dist/full.d.ts.map +1 -1
  24. package/dist/full.es.mjs +98 -94
  25. package/dist/full.iife.js +14 -14
  26. package/dist/full.iife.js.map +1 -1
  27. package/dist/full.umd.js +14 -14
  28. package/dist/full.umd.js.map +1 -1
  29. package/dist/index.es.mjs +143 -139
  30. package/dist/{motion-C5DRdPnO.js → motion-D9TcHxOF.js} +1 -1
  31. package/dist/{motion-C5DRdPnO.js.map → motion-D9TcHxOF.js.map} +1 -1
  32. package/dist/motion.es.mjs +1 -1
  33. package/dist/{platform-B7JhGBc7.js → platform-Dr9b6fsq.js} +21 -20
  34. package/dist/platform-Dr9b6fsq.js.map +1 -0
  35. package/dist/platform.es.mjs +1 -1
  36. package/dist/{reactive-BDya-ia8.js → reactive-DSkct0dO.js} +51 -50
  37. package/dist/reactive-DSkct0dO.js.map +1 -0
  38. package/dist/reactive.es.mjs +19 -17
  39. package/dist/{router-CijiICxt.js → router-CbDhl8rS.js} +3 -3
  40. package/dist/{router-CijiICxt.js.map → router-CbDhl8rS.js.map} +1 -1
  41. package/dist/router.es.mjs +1 -1
  42. package/dist/{sanitize-jyJ2ryE2.js → sanitize-Bs2dkMby.js} +94 -83
  43. package/dist/sanitize-Bs2dkMby.js.map +1 -0
  44. package/dist/security/index.d.ts +4 -2
  45. package/dist/security/index.d.ts.map +1 -1
  46. package/dist/security/sanitize.d.ts +4 -1
  47. package/dist/security/sanitize.d.ts.map +1 -1
  48. package/dist/security/trusted-html.d.ts +53 -0
  49. package/dist/security/trusted-html.d.ts.map +1 -0
  50. package/dist/security.es.mjs +10 -9
  51. package/dist/store/define-store.d.ts +1 -1
  52. package/dist/store/define-store.d.ts.map +1 -1
  53. package/dist/store/mapping.d.ts +1 -1
  54. package/dist/store/mapping.d.ts.map +1 -1
  55. package/dist/store/persisted.d.ts +1 -1
  56. package/dist/store/persisted.d.ts.map +1 -1
  57. package/dist/store/types.d.ts +2 -2
  58. package/dist/store/types.d.ts.map +1 -1
  59. package/dist/store/watch.d.ts +1 -1
  60. package/dist/store/watch.d.ts.map +1 -1
  61. package/dist/{store-CPK9E62U.js → store-BwDvI45q.js} +49 -48
  62. package/dist/{store-CPK9E62U.js.map → store-BwDvI45q.js.map} +1 -1
  63. package/dist/store.es.mjs +1 -1
  64. package/dist/storybook/index.d.ts +37 -0
  65. package/dist/storybook/index.d.ts.map +1 -0
  66. package/dist/storybook.es.mjs +151 -0
  67. package/dist/storybook.es.mjs.map +1 -0
  68. package/dist/untrack-B0rVscTc.js +7 -0
  69. package/dist/untrack-B0rVscTc.js.map +1 -0
  70. package/dist/{view-Cdi0g-qo.js → view-C70lA3vf.js} +29 -28
  71. package/dist/{view-Cdi0g-qo.js.map → view-C70lA3vf.js.map} +1 -1
  72. package/dist/view.es.mjs +9 -8
  73. package/package.json +141 -136
  74. package/src/component/component.ts +259 -54
  75. package/src/component/html.ts +153 -53
  76. package/src/component/index.ts +10 -2
  77. package/src/component/library.ts +42 -28
  78. package/src/component/types.ts +184 -19
  79. package/src/full.ts +8 -2
  80. package/src/motion/transition.ts +97 -97
  81. package/src/motion/types.ts +208 -208
  82. package/src/platform/announcer.ts +208 -208
  83. package/src/platform/config.ts +163 -163
  84. package/src/platform/cookies.ts +165 -165
  85. package/src/platform/index.ts +39 -39
  86. package/src/platform/meta.ts +168 -168
  87. package/src/reactive/async-data.ts +486 -486
  88. package/src/reactive/index.ts +37 -37
  89. package/src/reactive/signal.ts +29 -29
  90. package/src/security/constants.ts +211 -211
  91. package/src/security/index.ts +17 -10
  92. package/src/security/sanitize.ts +70 -66
  93. package/src/security/trusted-html.ts +71 -0
  94. package/src/store/define-store.ts +49 -48
  95. package/src/store/mapping.ts +74 -73
  96. package/src/store/persisted.ts +62 -61
  97. package/src/store/types.ts +92 -94
  98. package/src/store/watch.ts +53 -52
  99. package/src/storybook/index.ts +479 -0
  100. package/dist/component-CY5MVoYN.js +0 -531
  101. package/dist/component-CY5MVoYN.js.map +0 -1
  102. package/dist/core-DPdbItcq.js +0 -112
  103. package/dist/core-DPdbItcq.js.map +0 -1
  104. package/dist/platform-B7JhGBc7.js.map +0 -1
  105. package/dist/reactive-BDya-ia8.js.map +0 -1
  106. package/dist/sanitize-jyJ2ryE2.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module bquery/component
5
5
  */
6
- import type { ComponentDefinition } from './types';
6
+ import type { ComponentClass, ComponentDefinition, ComponentSignals } from './types';
7
7
  /**
8
8
  * Creates a custom element class for a component definition.
9
9
  *
@@ -11,10 +11,14 @@ import type { ComponentDefinition } from './types';
11
11
  * (e.g. with different tag names in tests or custom registries).
12
12
  *
13
13
  * @template TProps - Type of the component's props
14
+ * @template TState - Type of the component's internal state. When provided,
15
+ * `definition.state` is required, `render({ state })` is strongly typed, and
16
+ * returned instances expose typed `getState()` / `setState()` helpers.
14
17
  * @param tagName - The custom element tag name (used for diagnostics)
15
18
  * @param definition - The component configuration
16
19
  */
17
- export declare const defineComponent: <TProps extends Record<string, unknown>>(tagName: string, definition: ComponentDefinition<TProps>) => typeof HTMLElement;
20
+ export declare function defineComponent<TProps extends Record<string, unknown>, TSignals extends ComponentSignals = Record<string, never>>(tagName: string, definition: ComponentDefinition<TProps, undefined, TSignals>): ComponentClass<undefined>;
21
+ export declare function defineComponent<TProps extends Record<string, unknown>, TState extends Record<string, unknown>, TSignals extends ComponentSignals = Record<string, never>>(tagName: string, definition: ComponentDefinition<TProps, TState, TSignals>): ComponentClass<TState>;
18
22
  /**
19
23
  * Defines and registers a custom Web Component.
20
24
  *
@@ -23,12 +27,15 @@ export declare const defineComponent: <TProps extends Record<string, unknown>>(t
23
27
  * and automatically re-renders when observed attributes change.
24
28
  *
25
29
  * @template TProps - Type of the component's props
30
+ * @template TState - Type of the component's internal state. When provided,
31
+ * `definition.state` is required and lifecycle hooks receive typed state
32
+ * helpers via `this.getState()` / `this.setState()`.
26
33
  * @param tagName - The custom element tag name (must contain a hyphen)
27
34
  * @param definition - The component configuration
28
35
  *
29
36
  * @example
30
37
  * ```ts
31
- * component('counter-button', {
38
+ * component<{ start: number }, { count: number }>('counter-button', {
32
39
  * props: {
33
40
  * start: { type: Number, default: 0 },
34
41
  * },
@@ -41,7 +48,7 @@ export declare const defineComponent: <TProps extends Record<string, unknown>>(t
41
48
  * const handleClick = (event: Event) => {
42
49
  * const target = event.target as HTMLElement | null;
43
50
  * if (target?.matches('button')) {
44
- * this.setState('count', (this.getState('count') as number) + 1);
51
+ * this.setState('count', this.getState('count') + 1);
45
52
  * }
46
53
  * };
47
54
  * this.shadowRoot?.addEventListener('click', handleClick);
@@ -65,5 +72,6 @@ export declare const defineComponent: <TProps extends Record<string, unknown>>(t
65
72
  * });
66
73
  * ```
67
74
  */
68
- export declare const component: <TProps extends Record<string, unknown>>(tagName: string, definition: ComponentDefinition<TProps>) => void;
75
+ export declare function component<TProps extends Record<string, unknown>, TSignals extends ComponentSignals = Record<string, never>>(tagName: string, definition: ComponentDefinition<TProps, undefined, TSignals>): void;
76
+ export declare function component<TProps extends Record<string, unknown>, TState extends Record<string, unknown>, TSignals extends ComponentSignals = Record<string, never>>(tagName: string, definition: ComponentDefinition<TProps, TState, TSignals>): void;
69
77
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/component/component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,SAAS,MAAM,EACf,YAAY,mBAAmB,CAAC,MAAM,CAAC,KACtC,OAAO,WA0OT,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,SAAS,MAAM,EACf,YAAY,mBAAmB,CAAC,MAAM,CAAC,KACtC,IAMF,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/component/component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAEV,cAAc,EACd,mBAAmB,EAEnB,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AAiYjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,QAAQ,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAEzD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,GAC3D,cAAc,CAAC,SAAS,CAAC,CAAC;AAC7B,wBAAgB,eAAe,CAC7B,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,QAAQ,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAEzD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GACxD,cAAc,CAAC,MAAM,CAAC,CAAC;AAY1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,SAAS,CACvB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,QAAQ,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAEzD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,GAC3D,IAAI,CAAC;AACR,wBAAgB,SAAS,CACvB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,QAAQ,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAEzD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GACxD,IAAI,CAAC"}
@@ -1,3 +1,40 @@
1
+ import { type SanitizedHtml } from '../security/trusted-html';
2
+ /**
3
+ * Public shape of a boolean HTML attribute created by {@link bool}.
4
+ *
5
+ * This type is returned from {@link bool} and can be interpolated into
6
+ * {@link html} / {@link safeHtml} templates to conditionally include or omit
7
+ * an attribute by name. The internal marker property used for runtime checks
8
+ * remains private and is not part of the public API.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const disabled = bool('disabled', isDisabled);
13
+ * const button = html`<button ${disabled}>Click</button>`;
14
+ * ```
15
+ */
16
+ export interface BooleanAttribute {
17
+ readonly enabled: boolean;
18
+ readonly name: string;
19
+ }
20
+ /**
21
+ * Creates a boolean-attribute marker for the {@link html} and {@link safeHtml} template tags.
22
+ *
23
+ * When the condition is truthy, the attribute name is rendered without a value.
24
+ * When the condition is falsy, an empty string is rendered and any surrounding
25
+ * template-literal whitespace is preserved.
26
+ *
27
+ * @param name - HTML attribute name to emit
28
+ * @param enabled - Whether the boolean attribute should be present
29
+ * @returns Internal marker consumed by template tags
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * html`<button ${bool('disabled', isDisabled)}>Save</button>`;
34
+ * // Result when isDisabled = true: '<button disabled>Save</button>'
35
+ * ```
36
+ */
37
+ export declare const bool: (name: string, enabled: unknown) => BooleanAttribute;
1
38
  /**
2
39
  * Tagged template literal for creating HTML strings.
3
40
  *
@@ -22,14 +59,14 @@ export declare const html: (strings: TemplateStringsArray, ...values: unknown[])
22
59
  *
23
60
  * @param strings - Template literal string parts
24
61
  * @param values - Interpolated values to escape
25
- * @returns Combined HTML string with escaped values
62
+ * @returns Branded escaped HTML string safe for bQuery template composition
26
63
  *
27
64
  * @example
28
65
  * ```ts
29
66
  * const userInput = '<script>alert("xss")</script>';
30
67
  * const safe = safeHtml`<div>${userInput}</div>`;
31
- * // Result: '<div>&lt;script&gt;alert("xss")&lt;/script&gt;</div>'
68
+ * // Result: '<div>&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;</div>'
32
69
  * ```
33
70
  */
34
- export declare const safeHtml: (strings: TemplateStringsArray, ...values: unknown[]) => string;
71
+ export declare const safeHtml: (strings: TemplateStringsArray, ...values: unknown[]) => SanitizedHtml;
35
72
  //# sourceMappingURL=html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/component/html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS,oBAAoB,EAAE,GAAG,QAAQ,OAAO,EAAE,KAAG,MAE1E,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,GAAI,SAAS,oBAAoB,EAAE,GAAG,QAAQ,OAAO,EAAE,KAAG,MAgB9E,CAAC"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/component/html.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAIlC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AA4CD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,EAAE,SAAS,OAAO,KAAG,gBAYrD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS,oBAAoB,EAAE,GAAG,QAAQ,OAAO,EAAE,KAAG,MAE1E,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,GACnB,SAAS,oBAAoB,EAC7B,GAAG,QAAQ,OAAO,EAAE,KACnB,aAYF,CAAC"}
@@ -35,8 +35,8 @@
35
35
  * ```
36
36
  */
37
37
  export { component, defineComponent } from './component';
38
- export { html, safeHtml } from './html';
38
+ export { bool, html, safeHtml } from './html';
39
39
  export { registerDefaultComponents } from './library';
40
40
  export type { DefaultComponentLibraryOptions, RegisteredDefaultComponents } from './library';
41
- export type { ComponentDefinition, ComponentRenderContext, PropDefinition } from './types';
41
+ export type { AttributeChange, ComponentDefinition, ComponentRenderContext, ComponentStateKey, ComponentSignalLike, ComponentSignals, PropDefinition, } from './types';
42
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAC7F,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAC7F,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/component/library.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,6DAA6D;AAC7D,MAAM,WAAW,8BAA8B;IAC7C,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAwJD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,UAAS,8BAAmC,KAC3C,2BAuTF,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/component/library.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,6DAA6D;AAC7D,MAAM,WAAW,8BAA8B;IAC7C,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAsKD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,UAAS,8BAAmC,KAC3C,2BAuTF,CAAC"}
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @module bquery/component
5
5
  */
6
+ import type { SanitizeOptions } from '../security/types';
6
7
  /**
7
8
  * Defines a single prop's type and configuration.
8
9
  *
@@ -36,46 +37,160 @@ export type PropDefinition<T = unknown> = {
36
37
  */
37
38
  construct?: boolean;
38
39
  };
40
+ /**
41
+ * Resolves the concrete runtime state shape exposed by component APIs.
42
+ *
43
+ * When no explicit state generic is provided, component state falls back to
44
+ * an untyped string-keyed record for backwards compatibility.
45
+ */
46
+ export type ComponentStateShape<TState extends Record<string, unknown> | undefined = undefined> = TState extends Record<string, unknown> ? TState : Record<string, unknown>;
47
+ /**
48
+ * Component state keys are string-based because runtime state access is backed
49
+ * by plain object properties.
50
+ */
51
+ export type ComponentStateKey<TState extends Record<string, unknown> | undefined = undefined> = keyof ComponentStateShape<TState> & string;
52
+ /**
53
+ * Public component element instance shape exposed by lifecycle hooks and
54
+ * `defineComponent()` return values.
55
+ */
56
+ export type ComponentElement<TState extends Record<string, unknown> | undefined = undefined> = HTMLElement & {
57
+ /**
58
+ * Updates a state property and triggers a re-render.
59
+ *
60
+ * @param key - The state property key
61
+ * @param value - The new value
62
+ */
63
+ setState<TKey extends ComponentStateKey<TState>>(key: TKey, value: ComponentStateShape<TState>[TKey]): void;
64
+ /**
65
+ * Gets a state property value.
66
+ *
67
+ * @param key - The state property key
68
+ * @returns The current value
69
+ */
70
+ getState<TKey extends ComponentStateKey<TState>>(key: TKey): ComponentStateShape<TState>[TKey];
71
+ /**
72
+ * Gets a state property value with an explicit cast for backwards
73
+ * compatibility with the pre-typed-state API.
74
+ *
75
+ * @param key - The state property key
76
+ * @returns The current value cast to `TResult`
77
+ */
78
+ getState<TResult = unknown>(key: string): TResult;
79
+ };
80
+ /**
81
+ * Constructor returned by `defineComponent()`.
82
+ */
83
+ export type ComponentClass<TState extends Record<string, unknown> | undefined = undefined> = CustomElementConstructor & {
84
+ new (): ComponentElement<TState>;
85
+ prototype: ComponentElement<TState>;
86
+ readonly observedAttributes: string[];
87
+ };
88
+ /**
89
+ * Minimal reactive source shape supported by component `signals`.
90
+ *
91
+ * @template T - Value exposed by the signal-like source
92
+ */
93
+ export type ComponentSignalLike<T = unknown> = {
94
+ /** Gets the current reactive value */
95
+ readonly value: T;
96
+ /** Gets the current value without dependency tracking */
97
+ peek(): T;
98
+ };
99
+ /**
100
+ * Named reactive sources that can drive component re-renders.
101
+ */
102
+ export type ComponentSignals = Record<string, ComponentSignalLike<unknown>>;
39
103
  /**
40
104
  * Render context passed into a component render function.
105
+ *
106
+ * @template TProps - Type of the component's props
107
+ * @template TState - Type of the component's internal state
108
+ * @template TSignals - Declared reactive sources available during render
41
109
  */
42
- export type ComponentRenderContext<TProps extends Record<string, unknown>> = {
110
+ export type ComponentRenderContext<TProps extends Record<string, unknown>, TState extends Record<string, unknown> | undefined = undefined, TSignals extends ComponentSignals = Record<string, never>> = {
43
111
  /** Typed props object populated from attributes */
44
112
  props: TProps;
45
113
  /** Internal mutable state object */
46
- state: Record<string, unknown>;
114
+ state: ComponentStateShape<TState>;
115
+ /** External reactive sources subscribed for re-rendering */
116
+ signals: TSignals;
47
117
  /** Emit a custom event from the component */
48
118
  emit: (event: string, detail?: unknown) => void;
49
119
  };
120
+ /**
121
+ * Describes an observed attribute change that triggered a component update.
122
+ */
123
+ export type AttributeChange = {
124
+ /** The observed attribute name */
125
+ name: string;
126
+ /** The previous serialized attribute value */
127
+ oldValue: string | null;
128
+ /** The next serialized attribute value */
129
+ newValue: string | null;
130
+ };
50
131
  /**
51
132
  * Complete component definition including props, state, styles, and lifecycle.
52
133
  *
53
134
  * @template TProps - Type of the component's props
135
+ * @template TState - Type of the component's internal state
54
136
  */
55
- type ComponentHook<TResult = void> = ((this: HTMLElement) => TResult) | (() => TResult);
56
- type ComponentHookWithProps<TProps extends Record<string, unknown>, TResult = void> = ((this: HTMLElement, props: TProps) => TResult) | ((props: TProps) => TResult);
57
- type ComponentErrorHook = ((this: HTMLElement, error: Error) => void) | ((error: Error) => void);
58
- export type ComponentDefinition<TProps extends Record<string, unknown> = Record<string, unknown>> = {
59
- /** Prop definitions with types and defaults */
60
- props?: Record<keyof TProps, PropDefinition>;
137
+ type ComponentSanitizeOptions = Pick<SanitizeOptions, 'allowTags' | 'allowAttributes'>;
138
+ type ComponentHook<TState extends Record<string, unknown> | undefined = undefined, TResult = void> = {
139
+ (this: ComponentElement<TState>): TResult;
140
+ (): TResult;
141
+ };
142
+ type ComponentHookWithProps<TProps extends Record<string, unknown>, TState extends Record<string, unknown> | undefined = undefined, TResult = void> = {
143
+ (this: ComponentElement<TState>, newProps: TProps, oldProps: TProps): TResult;
144
+ (newProps: TProps, oldProps: TProps): TResult;
145
+ };
146
+ type ComponentUpdatedHook<TState extends Record<string, unknown> | undefined = undefined, TResult = void> = {
147
+ (this: ComponentElement<TState>, change?: AttributeChange): TResult;
148
+ (change?: AttributeChange): TResult;
149
+ };
150
+ type ComponentErrorHook<TState extends Record<string, unknown> | undefined = undefined> = {
151
+ (this: ComponentElement<TState>, error: Error): void;
152
+ (error: Error): void;
153
+ };
154
+ type ComponentStateDefinition<TState extends Record<string, unknown> | undefined = undefined> = TState extends Record<string, unknown> ? {
155
+ /** Initial internal state */
156
+ state: TState;
157
+ } : {
61
158
  /** Initial internal state */
62
159
  state?: Record<string, unknown>;
160
+ };
161
+ type ComponentSignalsDefinition<TSignals extends ComponentSignals = Record<string, never>> = TSignals extends Record<string, never> ? {
162
+ /** External signals/computed values that should trigger re-renders */
163
+ signals?: TSignals;
164
+ } : {
165
+ /** External signals/computed values that should trigger re-renders */
166
+ signals: TSignals;
167
+ };
168
+ export type ComponentDefinition<TProps extends Record<string, unknown> = Record<string, unknown>, TState extends Record<string, unknown> | undefined = undefined, TSignals extends ComponentSignals = Record<string, never>> = ComponentStateDefinition<TState> & ComponentSignalsDefinition<TSignals> & {
169
+ /** Prop definitions with types and defaults */
170
+ props?: Record<keyof TProps, PropDefinition>;
63
171
  /** CSS styles scoped to the component's shadow DOM */
64
172
  styles?: string;
173
+ /**
174
+ * Extra sanitizer options merged with the framework base allowlist during render.
175
+ * Only opt in attributes/tags whose values you control or validate. Sensitive
176
+ * attributes such as `style` are not value-sanitized and can reintroduce XSS
177
+ * or UI-redressing risks if used with untrusted input.
178
+ */
179
+ sanitize?: ComponentSanitizeOptions;
65
180
  /** Lifecycle hook called before the component mounts (before first render) */
66
- beforeMount?: ComponentHook;
181
+ beforeMount?: ComponentHook<TState>;
67
182
  /** Lifecycle hook called when component is added to DOM */
68
- connected?: ComponentHook;
183
+ connected?: ComponentHook<TState>;
69
184
  /** Lifecycle hook called when component is removed from DOM */
70
- disconnected?: ComponentHook;
185
+ disconnected?: ComponentHook<TState>;
71
186
  /** Lifecycle hook called before an update render; return false to prevent */
72
- beforeUpdate?: ComponentHookWithProps<TProps, boolean | void>;
73
- /** Lifecycle hook called after reactive updates trigger a render */
74
- updated?: ComponentHook;
187
+ beforeUpdate?: ComponentHookWithProps<TProps, TState, boolean | void>;
188
+ /** Lifecycle hook called after update renders; receives attribute change info when applicable */
189
+ updated?: ComponentUpdatedHook<TState>;
75
190
  /** Error handler for errors during rendering or lifecycle */
76
- onError?: ComponentErrorHook;
191
+ onError?: ComponentErrorHook<TState>;
77
192
  /** Render function returning HTML string */
78
- render: (context: ComponentRenderContext<TProps>) => string;
193
+ render: (context: ComponentRenderContext<TProps, TState, TSignals>) => string;
79
194
  };
80
195
  export {};
81
196
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/component/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,0DAA0D;IAC1D,IAAI,EACA,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB;QAAE,KAAK,KAAK,EAAE,OAAO,GAAG,CAAC,CAAA;KAAE,GAC3B,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,0DAA0D;IAC1D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IAClC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB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