nuclo 0.2.34 → 0.2.36

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 (97) hide show
  1. package/dist/nuclo.cjs +1 -1
  2. package/dist/nuclo.cjs.map +1 -1
  3. package/dist/nuclo.mjs +1 -1
  4. package/dist/nuclo.mjs.map +1 -1
  5. package/dist/nuclo.umd.js +1 -1
  6. package/dist/nuclo.umd.js.map +1 -1
  7. package/package.json +3 -3
  8. package/dist/bootstrap.d.ts +0 -5
  9. package/dist/bootstrap.d.ts.map +0 -1
  10. package/dist/element/attributes.d.ts +0 -6
  11. package/dist/element/attributes.d.ts.map +0 -1
  12. package/dist/element/class-name.d.ts +0 -6
  13. package/dist/element/class-name.d.ts.map +0 -1
  14. package/dist/element/event-attributes.d.ts +0 -5
  15. package/dist/element/event-attributes.d.ts.map +0 -1
  16. package/dist/element/events.d.ts +0 -46
  17. package/dist/element/events.d.ts.map +0 -1
  18. package/dist/element/factory-meta.d.ts +0 -25
  19. package/dist/element/factory-meta.d.ts.map +0 -1
  20. package/dist/element/factory.d.ts +0 -32
  21. package/dist/element/factory.d.ts.map +0 -1
  22. package/dist/element/inline-style.d.ts +0 -9
  23. package/dist/element/inline-style.d.ts.map +0 -1
  24. package/dist/element/lifecycle.d.ts +0 -106
  25. package/dist/element/lifecycle.d.ts.map +0 -1
  26. package/dist/element/modifiers.d.ts +0 -11
  27. package/dist/element/modifiers.d.ts.map +0 -1
  28. package/dist/element/tags.d.ts +0 -5
  29. package/dist/element/tags.d.ts.map +0 -1
  30. package/dist/hydration.d.ts +0 -73
  31. package/dist/hydration.d.ts.map +0 -1
  32. package/dist/index.d.ts +0 -17
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/list/index.d.ts +0 -7
  35. package/dist/list/index.d.ts.map +0 -1
  36. package/dist/list/runtime.d.ts +0 -6
  37. package/dist/list/runtime.d.ts.map +0 -1
  38. package/dist/list/template.d.ts +0 -113
  39. package/dist/list/template.d.ts.map +0 -1
  40. package/dist/list/types.d.ts +0 -57
  41. package/dist/list/types.d.ts.map +0 -1
  42. package/dist/polyfill/Document.d.ts +0 -19
  43. package/dist/polyfill/Document.d.ts.map +0 -1
  44. package/dist/polyfill/Element.d.ts +0 -48
  45. package/dist/polyfill/Element.d.ts.map +0 -1
  46. package/dist/polyfill/Event.d.ts +0 -43
  47. package/dist/polyfill/Event.d.ts.map +0 -1
  48. package/dist/polyfill/Node.d.ts +0 -13
  49. package/dist/polyfill/Node.d.ts.map +0 -1
  50. package/dist/polyfill/Text.d.ts +0 -11
  51. package/dist/polyfill/Text.d.ts.map +0 -1
  52. package/dist/polyfill/index.d.ts +0 -24
  53. package/dist/polyfill/index.d.ts.map +0 -1
  54. package/dist/render.d.ts +0 -33
  55. package/dist/render.d.ts.map +0 -1
  56. package/dist/shared/conditions.d.ts +0 -4
  57. package/dist/shared/conditions.d.ts.map +0 -1
  58. package/dist/shared/dom.d.ts +0 -80
  59. package/dist/shared/dom.d.ts.map +0 -1
  60. package/dist/shared/environment.d.ts +0 -5
  61. package/dist/shared/environment.d.ts.map +0 -1
  62. package/dist/shared/errors.d.ts +0 -2
  63. package/dist/shared/errors.d.ts.map +0 -1
  64. package/dist/shared/renderables.d.ts +0 -4
  65. package/dist/shared/renderables.d.ts.map +0 -1
  66. package/dist/shared/strings.d.ts +0 -19
  67. package/dist/shared/strings.d.ts.map +0 -1
  68. package/dist/shared/type-guards.d.ts +0 -16
  69. package/dist/shared/type-guards.d.ts.map +0 -1
  70. package/dist/ssr/index.d.ts +0 -19
  71. package/dist/ssr/index.d.ts.map +0 -1
  72. package/dist/ssr/render-to-string.d.ts +0 -41
  73. package/dist/ssr/render-to-string.d.ts.map +0 -1
  74. package/dist/style/css.d.ts +0 -26
  75. package/dist/style/css.d.ts.map +0 -1
  76. package/dist/style/engine.d.ts +0 -94
  77. package/dist/style/engine.d.ts.map +0 -1
  78. package/dist/style/index.d.ts +0 -3
  79. package/dist/style/index.d.ts.map +0 -1
  80. package/dist/update/conditional.d.ts +0 -3
  81. package/dist/update/conditional.d.ts.map +0 -1
  82. package/dist/update/reactive-attributes.d.ts +0 -45
  83. package/dist/update/reactive-attributes.d.ts.map +0 -1
  84. package/dist/update/reactive-text.d.ts +0 -38
  85. package/dist/update/reactive-text.d.ts.map +0 -1
  86. package/dist/update/registry.d.ts +0 -116
  87. package/dist/update/registry.d.ts.map +0 -1
  88. package/dist/update/scope.d.ts +0 -7
  89. package/dist/update/scope.d.ts.map +0 -1
  90. package/dist/update/update.d.ts +0 -4
  91. package/dist/update/update.d.ts.map +0 -1
  92. package/dist/when/builder.d.ts +0 -16
  93. package/dist/when/builder.d.ts.map +0 -1
  94. package/dist/when/index.d.ts +0 -44
  95. package/dist/when/index.d.ts.map +0 -1
  96. package/dist/when/runtime.d.ts +0 -59
  97. package/dist/when/runtime.d.ts.map +0 -1
@@ -1,57 +0,0 @@
1
- import type { ListTemplate, RowLeaf } from "./template";
2
- export type ListItemsInput<TItem> = readonly TItem[] | Iterable<TItem>;
3
- export interface ListRenderedRow<TTagName extends ElementTagName = ElementTagName> {
4
- element: ExpandedElement<TTagName>;
5
- update?: () => void;
6
- }
7
- export type ListRenderable<TTagName extends ElementTagName = ElementTagName> = ExpandedElement<TTagName> | DetachedExpandedElementFactory<TTagName> | NodeModFn<TTagName> | DetachedSVGElementFactory | SVGElementModifierFn | Node | ListRenderedRow<TTagName> | null | undefined;
8
- export type ListRenderer<TItem, TTagName extends ElementTagName = ElementTagName> = (item: TItem, index: number) => ListRenderable<TTagName>;
9
- export type ListItemsProvider<TItem> = () => ListItemsInput<TItem>;
10
- export interface ListItemRecord<TItem, TTagName extends ElementTagName = ElementTagName> {
11
- item: TItem;
12
- element: ExpandedElement<TTagName>;
13
- /**
14
- * Template rows own their dynamic leaves (reactive text / className)
15
- * instead of registering them globally; update() flushes them via the
16
- * list runtime. Null/absent for rows built through the normal path.
17
- */
18
- dyn?: RowLeaf[] | null;
19
- refresh?: (() => void) | null;
20
- /**
21
- * Internal updateListRuntimes() epoch in which this record's dynamic leaves
22
- * were initialized. Fresh template rows already hold current values, so that
23
- * same update pass can skip re-flushing them.
24
- */
25
- dynCreatedAt?: number;
26
- }
27
- export interface ListRuntime<TItem, TTagName extends ElementTagName = ElementTagName> {
28
- itemsProvider: ListItemsProvider<TItem>;
29
- renderItem: ListRenderer<TItem, TTagName>;
30
- startMarker: Comment;
31
- endMarker: Comment;
32
- records: ListItemRecord<TItem, TTagName>[];
33
- host: ExpandedElement<TTagName>;
34
- lastSyncedItems: readonly TItem[];
35
- /**
36
- * Row-template state: undefined = not analyzed yet, null = unsupported
37
- * shape (build rows normally forever), object = clone-and-patch active.
38
- */
39
- template?: ListTemplate | null;
40
- /**
41
- * Dynamic leaves of the most recent template-built row, for the record
42
- * creation sites to attach to the new record. Null when the row was built
43
- * through the normal path.
44
- */
45
- lastRenderLeaves?: RowLeaf[] | null;
46
- lastRenderRefresh?: (() => void) | null;
47
- /**
48
- * Set only while updateListRuntimes() is syncing this runtime.
49
- */
50
- currentFlushEpoch?: number;
51
- /**
52
- * Internal updateListRuntimes() epoch in which every current record was
53
- * freshly initialized.
54
- */
55
- allRecordsCreatedAt?: number;
56
- }
57
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,SAAS,KAAK,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc;IAC/E,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,cAAc,CAAC,QAAQ,SAAS,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QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IACxC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
@@ -1,19 +0,0 @@
1
- export declare class NucloDocument {
2
- head: ExpandedElement;
3
- body: ExpandedElement;
4
- private _listeners;
5
- constructor();
6
- createElement(tagName: string, _options?: unknown): ExpandedElement;
7
- createElementNS(namespace: string, tagName: string, _options?: unknown): ExpandedElement;
8
- createTextNode(data: string): Text;
9
- createComment(data: string): Comment;
10
- createDocumentFragment(): DocumentFragment;
11
- querySelector(selector: string): Element | null;
12
- querySelectorAll(_selector: string): NodeListOf<Element>;
13
- addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void;
14
- removeEventListener(type: string, listener: EventListener, _options?: boolean | AddEventListenerOptions): void;
15
- dispatchEvent(event: Event): boolean;
16
- contains(_node: Node): boolean;
17
- }
18
- export declare const document: Document;
19
- //# sourceMappingURL=Document.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../src/polyfill/Document.ts"],"names":[],"mappings":"AA8EA,qBAAa,aAAa;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,CAAC,UAAU,CAA4G;IAE9H,cAIC;IAED,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,eAAe,CAElE;IAED,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,eAAe,CAIvF;IAED,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEjC;IAED,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYnC;IAED,sBAAsB,IAAI,gBAAgB,CAEzC;IAED,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAa9C;IAED,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAEvD;IAED,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAMzG;IAED,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAS7G;IAED,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAgBnC;IAED,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAE7B;CACF;AAED,eAAO,MAAM,QAAQ,UAA6C,CAAC"}
@@ -1,48 +0,0 @@
1
- import { NucloNode } from './Node';
2
- export declare class NucloElement extends NucloNode {
3
- tagName: string;
4
- children: unknown[];
5
- className: string;
6
- textContent: string;
7
- private _innerHTML;
8
- parentNode: unknown;
9
- rawMods?: unknown[];
10
- mods?: unknown[];
11
- id: string;
12
- namespaceURI?: string;
13
- sheet?: CSSStyleSheet | null;
14
- private _listeners;
15
- private _style?;
16
- private _classList?;
17
- private _attributes?;
18
- get attributes(): Map<string, string>;
19
- set attributes(value: Map<string, string>);
20
- get style(): CSSStyleDeclaration;
21
- set style(value: CSSStyleDeclaration);
22
- get classList(): DOMTokenList;
23
- set classList(value: DOMTokenList);
24
- get innerHTML(): string;
25
- set innerHTML(value: string);
26
- private serializeChildren;
27
- private serializeElement;
28
- constructor(tagName: string);
29
- appendChild<T extends Node>(child: T): T;
30
- setAttribute(name: string, value: string): void;
31
- getAttribute(name: string): string | null;
32
- removeAttribute(name: string): void;
33
- hasAttribute(name: string): boolean;
34
- insertBefore<T extends Node>(newNode: T, referenceNode: Node | null): T;
35
- removeChild<T extends Node>(child: T): T;
36
- replaceChild<T extends Node>(newChild: Node, oldChild: T): T;
37
- addEventListener(type: string, listener: EventListener): void;
38
- removeEventListener(type: string, listener: EventListener): void;
39
- dispatchEvent(event: Event): boolean;
40
- querySelector(selector: string): Element | null;
41
- private querySelectorById;
42
- private querySelectorByClass;
43
- private querySelectorByTag;
44
- querySelectorAll(selector: string): NodeListOf<Element>;
45
- private querySelectorAllByClass;
46
- private querySelectorAllByTag;
47
- }
48
- //# sourceMappingURL=Element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/polyfill/Element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAqGnC,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAM;IACvB,WAAW,EAAE,MAAM,CAAM;IACzB,OAAO,CAAC,UAAU,CAAc;IAChC,UAAU,EAAE,OAAO,CAAQ;IAC3B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,EAAE,EAAE,MAAM,CAAM;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAyC;IAO3D,OAAO,CAAC,MAAM,CAAC,CAAsB;IACrC,OAAO,CAAC,UAAU,CAAC,CAAe;IAOlC,OAAO,CAAC,WAAW,CAAC,CAAsB;IAE1C,IAAI,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEpC;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,GAAG,CA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AED,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAa9C;IAED,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,oBAAoB;IAkB5B,OAAO,CAAC,kBAAkB;IAmB1B,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAetD;IAED,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,qBAAqB;CAU9B"}
@@ -1,43 +0,0 @@
1
- export declare class NucloEvent implements Event {
2
- type: string;
3
- bubbles: boolean;
4
- cancelable: boolean;
5
- composed: boolean;
6
- currentTarget: EventTarget | null;
7
- defaultPrevented: boolean;
8
- eventPhase: number;
9
- isTrusted: boolean;
10
- target: EventTarget | null;
11
- timeStamp: number;
12
- readonly AT_TARGET = 2;
13
- readonly BUBBLING_PHASE = 3;
14
- readonly CAPTURING_PHASE = 1;
15
- readonly NONE = 0;
16
- returnValue: boolean;
17
- srcElement: EventTarget | null;
18
- cancelBubble: boolean;
19
- constructor(type: string, eventInitDict?: EventInit);
20
- composedPath(): EventTarget[];
21
- initEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean): void;
22
- preventDefault(): void;
23
- stopImmediatePropagation(): void;
24
- stopPropagation(): void;
25
- }
26
- export declare class NucloCustomEvent<T = any> extends NucloEvent implements CustomEvent<T> {
27
- detail: T;
28
- constructor(type: string, eventInitDict?: CustomEventInit<T>);
29
- initCustomEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean, _detail?: T): void;
30
- }
31
- export declare const Event: {
32
- new (type: string, eventInitDict?: EventInit): Event;
33
- prototype: Event;
34
- readonly NONE: 0;
35
- readonly CAPTURING_PHASE: 1;
36
- readonly AT_TARGET: 2;
37
- readonly BUBBLING_PHASE: 3;
38
- };
39
- export declare const CustomEvent: {
40
- new <T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
41
- prototype: CustomEvent;
42
- };
43
- //# sourceMappingURL=Event.d.ts.map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K,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,CAE3F;CACF;AAGD,eAAO,MAAM,KAAK;;;;;;;CAAiC,CAAC;AACpD,eAAO,MAAM,WAAW;;;CAA6C,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Base Node class for instanceof checks in Node.js polyfill
3
- */
4
- export declare class NucloNode {
5
- nodeType: number;
6
- nodeName: string;
7
- nodeValue: string | null;
8
- parentNode: unknown;
9
- _childNodes: Node[] | null;
10
- textContent: string;
11
- get childNodes(): NodeListOf<ChildNode>;
12
- }
13
- //# sourceMappingURL=Node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/polyfill/Node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,SAAS;IACpB,QAAQ,EAAE,MAAM,CAAK;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAChC,UAAU,EAAE,OAAO,CAAQ;IAC3B,WAAW,EAAE,IAAI,EAAE,GAAG,IAAI,CAAQ;IAClC,WAAW,EAAE,MAAM,CAAM;IAEzB,IAAI,UAAU,IAAI,UAAU,CAAC,SAAS,CAAC,CAgCtC;CACF"}
@@ -1,11 +0,0 @@
1
- export declare class NucloText {
2
- nodeType: number;
3
- nodeName: string;
4
- data: string;
5
- textContent: string;
6
- parentNode: unknown;
7
- constructor(data: string);
8
- get nodeValue(): string;
9
- set nodeValue(value: string);
10
- }
11
- //# sourceMappingURL=Text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/polyfill/Text.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,QAAQ,SAAK;IACb,QAAQ,SAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAQ;IAE3B,YAAY,IAAI,EAAE,MAAM,EAGvB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAG1B;CACF"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Polyfills for Node.js environments
3
- *
4
- * This module provides minimal browser API polyfills to allow Nuclo to run in Node.js
5
- * for server-side rendering (SSR) scenarios.
6
- *
7
- * To use in Node.js:
8
- * ```typescript
9
- * import 'nuclo/polyfill';
10
- * // or
11
- * import { document, Event, CustomEvent } from 'nuclo/polyfill';
12
- * ```
13
- */
14
- export { NucloDocument, document } from './Document';
15
- export { NucloElement } from './Element';
16
- export { NucloText } from './Text';
17
- export { NucloEvent, NucloCustomEvent, Event, CustomEvent } from './Event';
18
- export { NucloNode } from './Node';
19
- import { NucloElement } from './Element';
20
- import { NucloNode } from './Node';
21
- export declare const Node: typeof NucloNode;
22
- export declare const Element: typeof NucloElement;
23
- export declare const HTMLElement: typeof NucloElement;
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfill/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAInC,eAAO,MAAM,IAAI,kBAAY,CAAC;AAC9B,eAAO,MAAM,OAAO,qBAAe,CAAC;AACpC,eAAO,MAAM,WAAW,qBAAe,CAAC"}
package/dist/render.d.ts DELETED
@@ -1,33 +0,0 @@
1
- /**
2
- * Renders a NodeModFn to a parent element by calling it and appending the result.
3
- *
4
- * @param nodeModFn The NodeModFn to render (created by tag builders like div(), h1(), etc.)
5
- * @param parent The parent element to render into (defaults to document.body)
6
- * @param index The index to pass to the NodeModFn (defaults to 0)
7
- * @returns The rendered element
8
- */
9
- export declare function render<TTagName extends ElementTagName = ElementTagName>(nodeModFn: NodeModFn<TTagName>, parent?: Element, index?: number): ExpandedElement<TTagName>;
10
- /**
11
- * Hydrates an existing server-rendered DOM tree by walking it in parallel with
12
- * the component tree, reusing existing nodes and re-attaching reactivity.
13
- *
14
- * Instead of clearing the container and creating new DOM nodes (like render()),
15
- * hydrate() claims existing nodes from the SSR output and registers reactive
16
- * text nodes, attributes, event listeners, list runtimes, and when runtimes
17
- * on them.
18
- *
19
- * @param nodeModFn The NodeModFn to hydrate (same component used for SSR)
20
- * @param parent The parent element containing the SSR HTML (defaults to document.body)
21
- * @returns The hydrated root element
22
- *
23
- * @example
24
- * ```ts
25
- * // Server: const html = renderToString(div(h1("Hello")));
26
- * // Client:
27
- * const app = document.getElementById("app")!;
28
- * // app.innerHTML already contains the SSR HTML
29
- * hydrate(div(h1("Hello")), app);
30
- * ```
31
- */
32
- export declare function hydrate<TTagName extends ElementTagName = ElementTagName>(nodeModFn: NodeModFn<TTagName>, parent?: Element): ExpandedElement<TTagName>;
33
- //# sourceMappingURL=render.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EACrE,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,MAAM,CAAC,EAAE,OAAO,EAChB,KAAK,GAAE,MAAU,GAChB,eAAe,CAAC,QAAQ,CAAC,CAQ3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,OAAO,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EACtE,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,MAAM,CAAC,EAAE,OAAO,GACf,eAAe,CAAC,QAAQ,CAAC,CAqC3B"}
@@ -1,4 +0,0 @@
1
- export type ConditionInput = boolean | (() => boolean);
2
- export declare function runCondition(condition: () => boolean, onError?: (error: unknown) => void): boolean;
3
- export declare function resolveCondition(value: ConditionInput, onError?: (error: unknown) => void): boolean;
4
- //# sourceMappingURL=conditions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/shared/conditions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC;AAEvD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,OAAO,EACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACjC,OAAO,CAUT;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACjC,OAAO,CAET"}
@@ -1,80 +0,0 @@
1
- export declare const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
2
- /**
3
- * Creates an HTML element.
4
- * Wrapper for document.createElement with type safety.
5
- */
6
- export declare function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K] | null;
7
- export declare function createElement(tagName: string): ExpandedElement | null;
8
- /**
9
- * Creates an element in the given namespace (typically for SVG elements).
10
- * Wrapper for document.createElementNS with type safety.
11
- */
12
- export declare function createElementNS(namespace: string, tagName: string): ExpandedElement | null;
13
- /**
14
- * Creates a text node with the given content.
15
- * Wrapper for document.createTextNode.
16
- */
17
- export declare function createTextNode(text: string): Text | null;
18
- /**
19
- * Creates a document fragment.
20
- * Wrapper for document.createDocumentFragment.
21
- */
22
- export declare function createDocumentFragment(): DocumentFragment | null;
23
- /**
24
- * Fires onDestroy for a subtree that a fast removal path (list()'s bulk
25
- * clear/replace, the single-element when()/else() swap) is about to drop
26
- * without walking through cleanupNodeTree()/safeRemoveChild(). Short-circuits
27
- * to a single comparison when nothing on the page has ever registered a
28
- * lifecycle callback — the common case — so those fast paths stay fast.
29
- *
30
- * Same post-order (children, then self) as cleanupNodeTree() above, for the
31
- * same reason — see the comment there.
32
- */
33
- export declare function disposeLifecyclesInSubtree(node: Node): void;
34
- export declare function safeRemoveChild(child: Node): boolean;
35
- export declare function createComment(text: string): Comment | null;
36
- export declare function createConditionalComment(tagName: string, suffix?: string): Comment | null;
37
- export declare function createMarkerPair(prefix: string, id: number | string): {
38
- start: Comment;
39
- end: Comment;
40
- };
41
- export declare function clearBetweenMarkers(startMarker: Comment, endMarker: Comment): void;
42
- export declare function insertNodesBefore(nodes: Node[], referenceNode: Node): void;
43
- export declare function appendChildren(parent: Element | Node, ...children: Array<Element | Node | string | null | undefined>): Element | Node;
44
- export declare function isNodeConnected(node: Node | null | undefined): boolean;
45
- /**
46
- * Safely replaces an old node with a new node in the DOM.
47
- * Returns true on success, false on failure (and logs the error).
48
- */
49
- export declare function replaceNodeSafely(oldNode: Node, newNode: Node): boolean;
50
- /**
51
- * Safely casts an Element-like object to Node & ParentNode interface.
52
- * This is a common pattern needed when working with DOM manipulation.
53
- *
54
- * @param element - The element to cast
55
- * @returns The element typed as Node & ParentNode
56
- */
57
- export declare function asParentNode<T extends Element | object>(element: T): Node & ParentNode;
58
- /**
59
- * Creates a scoped DOM insertion context that temporarily redirects appendChild
60
- * to insertBefore at a specific reference node. This is useful for inserting
61
- * content at specific positions in the DOM tree.
62
- *
63
- * @param host - The host element
64
- * @param referenceNode - The node before which new nodes should be inserted
65
- * @param callback - Function to execute with the scoped context
66
- * @returns The result of the callback
67
- */
68
- export declare function withScopedInsertion<T, THost extends Element | object>(host: THost, referenceNode: Node, callback: () => T): T;
69
- /**
70
- * Type-safe wrapper for setting CSS style properties.
71
- * Provides better error handling than direct CSSStyleDeclaration access.
72
- * Supports both camelCase and kebab-case property names.
73
- *
74
- * @param element - The element to apply styles to
75
- * @param property - The CSS property name (camelCase or kebab-case)
76
- * @param value - The value to set (string, number, or null to remove)
77
- * @returns true if the style was applied successfully, false otherwise
78
- */
79
- export declare function setStyleProperty(element: HTMLElement, property: string, value: string | number | null): boolean;
80
- //# sourceMappingURL=dom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/shared/dom.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,OAAO,EAAE,CAAC,GACT,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AACnC,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAAC;AAKvE;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,eAAe,GAAG,IAAI,CAExB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAExD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,GAAG,IAAI,CAEhE;AA0DD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAS3D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAYpD;AAYD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB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AAM,GAAG,IAAI,GAC5B,OAAO,CAgBT"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Simplified environment detection - minimal overhead for smaller bundle size
3
- */
4
- export declare const isBrowser: boolean;
5
- //# sourceMappingURL=environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/shared/environment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,SAAS,SAAmE,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function logError(message: string, error?: Error | unknown): void;
2
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAKvE"}
@@ -1,4 +0,0 @@
1
- type RenderableInput<TTagName extends ElementTagName = ElementTagName> = NodeModFn<TTagName> | DetachedExpandedElementFactory<TTagName> | DetachedSVGElementFactory | SVGElementModifierFn | ExpandedElement<TTagName> | SVGElement | Node | null | undefined;
2
- export declare function resolveRenderable<TTagName extends ElementTagName = ElementTagName>(result: RenderableInput<TTagName>, host: ExpandedElement<TTagName>, index: number): ExpandedElement<TTagName> | null;
3
- export {};
4
- //# sourceMappingURL=renderables.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderables.d.ts","sourceRoot":"","sources":["../../src/shared/renderables.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,IACjE,SAAS,CAAC,QAAQ,CAAC,GACnB,8BAA8B,CAAC,QAAQ,CAAC,GACxC,yBAAyB,GACzB,oBAAoB,GACpB,eAAe,CAAC,QAAQ,CAAC,GACzB,UAAU,GACV,IAAI,GACJ,IAAI,GACJ,SAAS,CAAC;AAEd,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EAChF,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,QAAQ,CAAC,GAAG,IAAI,CAclC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * String utility functions
3
- */
4
- /**
5
- * Converts camelCase to kebab-case (optimized for performance)
6
- * Uses direct character code manipulation for maximum speed
7
- * @example camelToKebab('backgroundColor') => 'background-color'
8
- */
9
- export declare function camelToKebab(str: string): string;
10
- /**
11
- * Escapes HTML special characters in attribute values (includes " and ')
12
- */
13
- export declare function escapeHtml(text: string): string;
14
- /**
15
- * Escapes HTML special characters in text node content.
16
- * Only &, < and > need escaping — quotes are safe inside text nodes.
17
- */
18
- export declare function escapeText(text: string): string;
19
- //# sourceMappingURL=strings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/shared/strings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAqBhD;AAKD;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB/C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB/C"}
@@ -1,16 +0,0 @@
1
- export declare function isPrimitive(value: unknown): value is Primitive;
2
- export declare function isNode<T>(value: T): value is T & Node;
3
- export declare function isObject(value: unknown): value is object;
4
- export declare function isTagLike<T>(value: T): value is T & {
5
- tagName?: string;
6
- };
7
- export declare function isBoolean(value: unknown): value is boolean;
8
- /**
9
- * Narrows `value` to a callable. The generic `<T extends Function>` is intentionally
10
- * removed: it allowed callers to assert any specific function signature via the type
11
- * parameter without a runtime check, which is unsafe. Use explicit casts at call sites
12
- * when a more specific signature is needed.
13
- */
14
- export declare function isFunction(value: unknown): value is (...args: unknown[]) => unknown;
15
- export declare function isZeroArityFunction(value: unknown): value is () => unknown;
16
- //# sourceMappingURL=type-guards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../src/shared/type-guards.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAKrD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAExE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAEnF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,OAAO,CAE1E"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Server-Side Rendering (SSR) entry point for Nuclo
3
- *
4
- * This module provides utilities for rendering Nuclo components to HTML strings
5
- * in Node.js environments for server-side rendering.
6
- *
7
- * @example
8
- * ```ts
9
- * import { renderToString } from 'nuclo/ssr';
10
- * import '../polyfill'; // Load polyfills for Node.js
11
- * import { div } from 'nuclo';
12
- *
13
- * const html = renderToString(div("Hello, World!"));
14
- * console.log(html); // '<div>Hello, World!</div>'
15
- * ```
16
- */
17
- export { renderToString, renderManyToString, renderToStringWithContainer } from './render-to-string';
18
- export { setSSRCollector, getCssText } from '../style/engine';
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssr/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Server-Side Rendering (SSR) utilities for Nuclo
3
- * Renders Nuclo components to HTML strings in Node.js environment
4
- */
5
- type RenderableInput = NodeModFn<ElementTagName> | Element | Node | null | undefined;
6
- /**
7
- * Renders a Nuclo component to an HTML string for server-side rendering
8
- *
9
- * @param input - A Nuclo component function, DOM element, or node
10
- * @returns HTML string representation of the component
11
- *
12
- * @example
13
- * ```ts
14
- * import { renderToString } from 'nuclo/ssr';
15
- * import { div } from 'nuclo';
16
- *
17
- * const html = renderToString(
18
- * div("Hello, World!")
19
- * );
20
- * // Returns: '<div>Hello, World!</div>'
21
- * ```
22
- */
23
- export declare function renderToString(input: RenderableInput): string;
24
- /**
25
- * Renders multiple Nuclo components to HTML strings
26
- *
27
- * @param inputs - Array of Nuclo components
28
- * @returns Array of HTML strings
29
- */
30
- export declare function renderManyToString(inputs: RenderableInput[]): string[];
31
- /**
32
- * Renders a Nuclo component and wraps it in a container element
33
- *
34
- * @param input - A Nuclo component
35
- * @param containerTag - The tag name for the container (default: 'div')
36
- * @param containerAttrs - Attributes for the container element
37
- * @returns HTML string with container wrapper
38
- */
39
- export declare function renderToStringWithContainer(input: RenderableInput, containerTag?: string, containerAttrs?: Record<string, string>): string;
40
- export {};
41
- //# sourceMappingURL=render-to-string.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-to-string.d.ts","sourceRoot":"","sources":["../../src/ssr/render-to-string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,KAAK,eAAe,GAChB,SAAS,CAAC,cAAc,CAAC,GACzB,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,SAAS,CAAC;AAySd;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CA0B7D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAEtE;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,eAAe,EACtB,YAAY,GAAE,MAAc,EAC5B,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAC1C,MAAM,CAOR"}
@@ -1,26 +0,0 @@
1
- import type { ClassInput, CssInstance, FlatStyle, KeyframeFrames, Style, StyleResult, ThemeConfig, VariantDefinitions, VariantsConfig, VariantsFn } from "../../types/style";
2
- export type { ClassInput, CssInstance, CSSProperties, FlatStyle, KeyframeFrames, KeyframeStop, Pseudo, Size, Style, StyleResult, ThemeConfig, VariantDefinitions, VariantProps, VariantsConfig, VariantsFn, } from "../../types/style";
3
- /**
4
- * Compose class lists with exact conflict resolution: when two inputs style
5
- * the same (query, selector-suffix) context, their declaration blocks merge
6
- * with the later input winning per property — the merged block gets its own
7
- * content-addressed class, so `cx(base, active)` keeps every base property
8
- * the active style doesn't override. Works because the engine remembers what
9
- * every class it minted means. Unknown external classes pass through as-is.
10
- * Nested arrays are flattened, so `cx([a, cond && b], c)` composes the same
11
- * as `cx(a, cond && b, c)`.
12
- */
13
- export declare function cx(...inputs: ClassInput[]): StyleResult;
14
- export declare function createCss<const T extends ThemeConfig>(theme?: T): CssInstance<T>;
15
- /** Themeless css() — full property/variant typing, no tokens or screens. */
16
- export declare const css: {
17
- (style: Style<object>): StyleResult;
18
- (name: string, style: Style<object>): StyleResult;
19
- };
20
- /** Themeless variants() recipe helper. */
21
- export declare const variants: <const V extends VariantDefinitions<object>>(config: VariantsConfig<object, V>) => VariantsFn<V>;
22
- /** Themeless keyframes() helper. */
23
- export declare const keyframes: (frames: KeyframeFrames<object>) => string;
24
- /** Themeless globalStyle() helper. */
25
- export declare const globalStyle: (selector: string, style: FlatStyle<object>) => void;
26
- //# sourceMappingURL=css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/style/css.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EAEd,KAAK,EACL,WAAW,EACX,WAAW,EACX,kBAAkB,EAElB,cAAc,EACd,UAAU,EACV,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,cAAc,EACd,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,UAAU,GACV,MAAM,mBAAmB,CAAC;AA8N3B;;;;;;;;;GASG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CA+BvD;AAKD,wBAAgB,SAAS,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,GAAE,CAAW,GAAG,WAAW,CAAC,CAAC,CAAC,CA0RzF;AAgBD,4EAA4E;AAC5E,eAAO,MAAM,GAAG,EAAE;IACjB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;IACpC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;CAIV,CAAC;AAC1C,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EACjE,MAAM,EAAE,cAAc,CAAC,MAAM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