nuclo 0.2.7 → 0.2.10

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 (131) hide show
  1. package/LICENSE.md +45 -0
  2. package/README.md +30 -6
  3. package/dist/{core/runtimeBootstrap.d.ts → bootstrap.d.ts} +1 -1
  4. package/dist/bootstrap.d.ts.map +1 -0
  5. package/dist/{core/attributeManager.d.ts → element/attributes.d.ts} +2 -2
  6. package/dist/element/attributes.d.ts.map +1 -0
  7. package/dist/{core/classNameMerger.d.ts → element/class-name.d.ts} +1 -1
  8. package/dist/element/class-name.d.ts.map +1 -0
  9. package/dist/{utility/on.d.ts → element/events.d.ts} +1 -1
  10. package/dist/element/events.d.ts.map +1 -0
  11. package/dist/{internal/applyModifiers.d.ts → element/factory.d.ts} +12 -19
  12. package/dist/element/factory.d.ts.map +1 -0
  13. package/dist/{core/styleManager.d.ts → element/inline-style.d.ts} +1 -1
  14. package/dist/element/inline-style.d.ts.map +1 -0
  15. package/dist/element/modifiers.d.ts +11 -0
  16. package/dist/element/modifiers.d.ts.map +1 -0
  17. package/dist/{core/tagConstants.d.ts → element/tags.d.ts} +2 -1
  18. package/dist/element/tags.d.ts.map +1 -0
  19. package/dist/{hydration/context.d.ts → hydration.d.ts} +1 -1
  20. package/dist/hydration.d.ts.map +1 -0
  21. package/dist/index.d.ts +13 -14
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/list/index.d.ts +6 -1
  24. package/dist/list/index.d.ts.map +1 -1
  25. package/dist/list/runtime.d.ts +1 -1
  26. package/dist/list/runtime.d.ts.map +1 -1
  27. package/dist/nuclo.cjs +1 -1
  28. package/dist/nuclo.cjs.map +1 -1
  29. package/dist/nuclo.mjs +1 -1
  30. package/dist/nuclo.mjs.map +1 -1
  31. package/dist/nuclo.umd.js +1 -1
  32. package/dist/nuclo.umd.js.map +1 -1
  33. package/dist/polyfill/Element.d.ts.map +1 -1
  34. package/dist/polyfill/nuclo.polyfill.cjs +1 -1
  35. package/dist/polyfill/nuclo.polyfill.cjs.map +1 -1
  36. package/dist/polyfill/nuclo.polyfill.mjs +1 -1
  37. package/dist/polyfill/nuclo.polyfill.mjs.map +1 -1
  38. package/dist/render.d.ts.map +1 -0
  39. package/dist/shared/conditions.d.ts.map +1 -0
  40. package/dist/{utility → shared}/dom.d.ts +30 -0
  41. package/dist/shared/dom.d.ts.map +1 -0
  42. package/dist/shared/environment.d.ts.map +1 -0
  43. package/dist/{utility/errorHandler.d.ts → shared/errors.d.ts} +1 -1
  44. package/dist/shared/errors.d.ts.map +1 -0
  45. package/dist/shared/renderables.d.ts.map +1 -0
  46. package/dist/{utility/stringUtils.d.ts → shared/strings.d.ts} +1 -1
  47. package/dist/shared/strings.d.ts.map +1 -0
  48. package/dist/{utility/typeGuards.d.ts → shared/type-guards.d.ts} +1 -1
  49. package/dist/shared/type-guards.d.ts.map +1 -0
  50. package/dist/ssr/index.d.ts +1 -1
  51. package/dist/ssr/index.d.ts.map +1 -1
  52. package/dist/ssr/nuclo.ssr.cjs.map +1 -1
  53. package/dist/ssr/nuclo.ssr.mjs.map +1 -1
  54. package/dist/ssr/{renderToString.d.ts → render-to-string.d.ts} +1 -1
  55. package/dist/ssr/render-to-string.d.ts.map +1 -0
  56. package/dist/style/css.d.ts +3 -345
  57. package/dist/style/css.d.ts.map +1 -1
  58. package/dist/style/index.d.ts +1 -1
  59. package/dist/style/index.d.ts.map +1 -1
  60. package/dist/update/conditional.d.ts +3 -0
  61. package/dist/update/conditional.d.ts.map +1 -0
  62. package/dist/{core/reactiveAttributes.d.ts → update/reactive-attributes.d.ts} +3 -3
  63. package/dist/update/reactive-attributes.d.ts.map +1 -0
  64. package/dist/{core/reactiveText.d.ts → update/reactive-text.d.ts} +3 -3
  65. package/dist/update/reactive-text.d.ts.map +1 -0
  66. package/dist/{core/reactiveCleanup.d.ts → update/registry.d.ts} +22 -1
  67. package/dist/update/registry.d.ts.map +1 -0
  68. package/dist/{utility → update}/scope.d.ts +4 -0
  69. package/dist/update/scope.d.ts.map +1 -0
  70. package/dist/update/update.d.ts +4 -0
  71. package/dist/update/update.d.ts.map +1 -0
  72. package/dist/when/builder.d.ts.map +1 -1
  73. package/dist/when/runtime.d.ts +5 -1
  74. package/dist/when/runtime.d.ts.map +1 -1
  75. package/package.json +21 -6
  76. package/types/core/base.d.ts +12 -3
  77. package/types/features/on.d.ts +1 -1
  78. package/types/features/style.d.ts +10 -26
  79. package/types/index.d.ts +113 -2
  80. package/types/polyfill.d.ts +131 -0
  81. package/types/ssr.d.ts +45 -0
  82. package/types/style.d.ts +404 -0
  83. package/dist/core/attributeManager.d.ts.map +0 -1
  84. package/dist/core/classNameMerger.d.ts.map +0 -1
  85. package/dist/core/conditionalUpdater.d.ts +0 -3
  86. package/dist/core/conditionalUpdater.d.ts.map +0 -1
  87. package/dist/core/elementFactory.d.ts +0 -9
  88. package/dist/core/elementFactory.d.ts.map +0 -1
  89. package/dist/core/modifierProcessor.d.ts +0 -3
  90. package/dist/core/modifierProcessor.d.ts.map +0 -1
  91. package/dist/core/reactiveAttributes.d.ts.map +0 -1
  92. package/dist/core/reactiveCleanup.d.ts.map +0 -1
  93. package/dist/core/reactiveText.d.ts.map +0 -1
  94. package/dist/core/runtimeBootstrap.d.ts.map +0 -1
  95. package/dist/core/styleManager.d.ts.map +0 -1
  96. package/dist/core/tagConstants.d.ts.map +0 -1
  97. package/dist/core/tagRegistry.d.ts +0 -4
  98. package/dist/core/tagRegistry.d.ts.map +0 -1
  99. package/dist/core/updateController.d.ts +0 -2
  100. package/dist/core/updateController.d.ts.map +0 -1
  101. package/dist/core/updateScope.d.ts +0 -5
  102. package/dist/core/updateScope.d.ts.map +0 -1
  103. package/dist/hydration/context.d.ts.map +0 -1
  104. package/dist/internal/applyModifiers.d.ts.map +0 -1
  105. package/dist/list/renderer.d.ts +0 -7
  106. package/dist/list/renderer.d.ts.map +0 -1
  107. package/dist/ssr/renderToString.d.ts.map +0 -1
  108. package/dist/utility/conditionalInfo.d.ts +0 -22
  109. package/dist/utility/conditionalInfo.d.ts.map +0 -1
  110. package/dist/utility/conditions.d.ts.map +0 -1
  111. package/dist/utility/dom.d.ts.map +0 -1
  112. package/dist/utility/domTypeHelpers.d.ts +0 -35
  113. package/dist/utility/domTypeHelpers.d.ts.map +0 -1
  114. package/dist/utility/environment.d.ts.map +0 -1
  115. package/dist/utility/errorHandler.d.ts.map +0 -1
  116. package/dist/utility/events.d.ts +0 -2
  117. package/dist/utility/events.d.ts.map +0 -1
  118. package/dist/utility/modifierPredicates.d.ts +0 -7
  119. package/dist/utility/modifierPredicates.d.ts.map +0 -1
  120. package/dist/utility/on.d.ts.map +0 -1
  121. package/dist/utility/render.d.ts.map +0 -1
  122. package/dist/utility/renderables.d.ts.map +0 -1
  123. package/dist/utility/scope.d.ts.map +0 -1
  124. package/dist/utility/stringUtils.d.ts.map +0 -1
  125. package/dist/utility/typeGuards.d.ts.map +0 -1
  126. package/dist/when/renderer.d.ts +0 -6
  127. package/dist/when/renderer.d.ts.map +0 -1
  128. /package/dist/{utility/render.d.ts → render.d.ts} +0 -0
  129. /package/dist/{utility → shared}/conditions.d.ts +0 -0
  130. /package/dist/{utility → shared}/environment.d.ts +0 -0
  131. /package/dist/{utility → shared}/renderables.d.ts +0 -0
@@ -0,0 +1,404 @@
1
+ /**
2
+ * nuclo styling type definitions — atomic, theme-aware, typed CSS-in-TS.
3
+ *
4
+ * This module is the single source of truth for the styling types. It lives in
5
+ * `types/` (shipped in the npm package alongside `dist/`) so that both the
6
+ * hand-written global declarations (`types/features/style.d.ts`) and the
7
+ * runtime implementation (`src/style/css.ts`) can import it — in the repo and
8
+ * in the published tarball alike. Do not move these into `src/`: `src/` is not
9
+ * published, and a d.ts import into it breaks every consumer's types.
10
+ */
11
+
12
+ // ---------------------------------------------------------------------------
13
+ // Value types — keyword autocomplete without banning valid CSS.
14
+ // `Loose<"a" | "b">` suggests "a"/"b" but accepts any string.
15
+ // ---------------------------------------------------------------------------
16
+ type Loose<T extends string> = T | (string & {});
17
+
18
+ /** Length values: numbers become px (except unitless properties), strings pass through. */
19
+ export type Size = number | (string & {});
20
+
21
+ type Display = Loose<
22
+ | "block" | "inline" | "inline-block" | "flex" | "inline-flex"
23
+ | "grid" | "inline-grid" | "none" | "contents" | "flow-root"
24
+ | "table" | "table-cell" | "list-item"
25
+ >;
26
+ type Position = Loose<"static" | "relative" | "absolute" | "fixed" | "sticky">;
27
+ type Overflow = Loose<"visible" | "hidden" | "clip" | "scroll" | "auto">;
28
+ type TextAlign = Loose<"left" | "right" | "center" | "justify" | "start" | "end">;
29
+ type FontWeight = number | Loose<"normal" | "bold" | "lighter" | "bolder" | "400" | "500" | "600" | "700">;
30
+ type AlignItems = Loose<"stretch" | "center" | "start" | "end" | "flex-start" | "flex-end" | "baseline">;
31
+ type JustifyContent = Loose<
32
+ | "center" | "start" | "end" | "flex-start" | "flex-end"
33
+ | "space-between" | "space-around" | "space-evenly" | "stretch"
34
+ >;
35
+ type FlexDirection = Loose<"row" | "row-reverse" | "column" | "column-reverse">;
36
+ type FlexWrap = Loose<"nowrap" | "wrap" | "wrap-reverse">;
37
+ type BorderStyle = Loose<"none" | "solid" | "dashed" | "dotted" | "double" | "hidden">;
38
+ type Cursor = Loose<
39
+ | "auto" | "default" | "pointer" | "grab" | "grabbing" | "text" | "move"
40
+ | "not-allowed" | "wait" | "crosshair" | "zoom-in" | "zoom-out"
41
+ >;
42
+ type ObjectFit = Loose<"fill" | "contain" | "cover" | "none" | "scale-down">;
43
+ type UserSelect = Loose<"none" | "auto" | "text" | "all" | "contain">;
44
+ type PointerEvents = Loose<"auto" | "none">;
45
+ type WhiteSpace = Loose<"normal" | "nowrap" | "pre" | "pre-wrap" | "pre-line" | "break-spaces">;
46
+ type TextTransform = Loose<"none" | "capitalize" | "uppercase" | "lowercase">;
47
+ type BoxSizing = Loose<"border-box" | "content-box">;
48
+ type Visibility = Loose<"visible" | "hidden" | "collapse">;
49
+
50
+ /**
51
+ * Plain CSS properties (camelCase, converted to kebab-case at runtime).
52
+ * Color/font/shadow/radius properties live in TokenProps so they pick up theme tokens.
53
+ */
54
+ export interface CSSProperties {
55
+ // Layout
56
+ display?: Display;
57
+ position?: Position;
58
+ inset?: Size;
59
+ top?: Size;
60
+ right?: Size;
61
+ bottom?: Size;
62
+ left?: Size;
63
+ zIndex?: number | "auto";
64
+ boxSizing?: BoxSizing;
65
+ aspectRatio?: Size;
66
+ overflow?: Overflow;
67
+ overflowX?: Overflow;
68
+ overflowY?: Overflow;
69
+ visibility?: Visibility;
70
+ objectFit?: ObjectFit;
71
+ objectPosition?: string;
72
+ isolation?: Loose<"auto" | "isolate">;
73
+ float?: Loose<"none" | "left" | "right" | "inline-start" | "inline-end">;
74
+ clear?: Loose<"none" | "left" | "right" | "both" | "inline-start" | "inline-end">;
75
+
76
+ // Flex / grid
77
+ flex?: Size;
78
+ flexDirection?: FlexDirection;
79
+ flexWrap?: FlexWrap;
80
+ flexGrow?: number;
81
+ flexShrink?: number;
82
+ flexBasis?: Size;
83
+ order?: number;
84
+ alignItems?: AlignItems;
85
+ alignContent?: JustifyContent;
86
+ alignSelf?: AlignItems | "auto";
87
+ justifyContent?: JustifyContent;
88
+ justifyItems?: AlignItems;
89
+ justifySelf?: AlignItems | "auto";
90
+ placeItems?: string;
91
+ placeContent?: string;
92
+ placeSelf?: string;
93
+ gap?: Size;
94
+ rowGap?: Size;
95
+ columnGap?: Size;
96
+ gridTemplateColumns?: string;
97
+ gridTemplateRows?: string;
98
+ gridTemplateAreas?: string;
99
+ gridColumn?: Size;
100
+ gridRow?: Size;
101
+ gridArea?: string;
102
+ gridAutoFlow?: Loose<"row" | "column" | "dense" | "row dense" | "column dense">;
103
+ gridAutoRows?: Size;
104
+ gridAutoColumns?: Size;
105
+
106
+ // Spacing / sizing (full names; short aliases in ShorthandProps)
107
+ padding?: Size;
108
+ paddingTop?: Size;
109
+ paddingRight?: Size;
110
+ paddingBottom?: Size;
111
+ paddingLeft?: Size;
112
+ margin?: Size;
113
+ marginTop?: Size;
114
+ marginRight?: Size;
115
+ marginBottom?: Size;
116
+ marginLeft?: Size;
117
+ width?: Size;
118
+ height?: Size;
119
+ minWidth?: Size;
120
+ minHeight?: Size;
121
+ maxWidth?: Size;
122
+ maxHeight?: Size;
123
+
124
+ // Typography
125
+ fontSize?: Size;
126
+ fontStyle?: Loose<"normal" | "italic" | "oblique">;
127
+ fontWeight?: FontWeight;
128
+ lineHeight?: Size;
129
+ letterSpacing?: Size;
130
+ textAlign?: TextAlign;
131
+ textTransform?: TextTransform;
132
+ textDecoration?: Loose<"none" | "underline" | "overline" | "line-through">;
133
+ textDecorationLine?: Loose<"none" | "underline" | "overline" | "line-through">;
134
+ textDecorationStyle?: Loose<"solid" | "double" | "dotted" | "dashed" | "wavy">;
135
+ textDecorationThickness?: Size;
136
+ textUnderlineOffset?: Size;
137
+ textOverflow?: Loose<"clip" | "ellipsis">;
138
+ textShadow?: string;
139
+ textIndent?: Size;
140
+ whiteSpace?: WhiteSpace;
141
+ wordBreak?: Loose<"normal" | "break-all" | "keep-all" | "break-word">;
142
+ overflowWrap?: Loose<"normal" | "break-word" | "anywhere">;
143
+ verticalAlign?: Loose<"baseline" | "top" | "middle" | "bottom" | "text-top" | "text-bottom">;
144
+ fontVariantNumeric?: string;
145
+ fontFeatureSettings?: string;
146
+
147
+ // Border / outline (colors + radius in TokenProps)
148
+ border?: string;
149
+ borderTop?: string;
150
+ borderRight?: string;
151
+ borderBottom?: string;
152
+ borderLeft?: string;
153
+ borderWidth?: Size;
154
+ borderStyle?: BorderStyle;
155
+ outline?: string;
156
+ outlineWidth?: Size;
157
+ outlineStyle?: BorderStyle;
158
+ outlineOffset?: Size;
159
+
160
+ // Background (color in TokenProps via `bg`)
161
+ backgroundImage?: string;
162
+ backgroundSize?: Loose<"auto" | "cover" | "contain">;
163
+ backgroundPosition?: string;
164
+ backgroundRepeat?: Loose<"repeat" | "no-repeat" | "repeat-x" | "repeat-y" | "round" | "space">;
165
+ backgroundAttachment?: Loose<"scroll" | "fixed" | "local">;
166
+ backgroundClip?: Loose<"border-box" | "padding-box" | "content-box" | "text">;
167
+
168
+ // Effects
169
+ opacity?: number | string;
170
+ filter?: string;
171
+ backdropFilter?: string;
172
+ mixBlendMode?: string;
173
+ transform?: string;
174
+ transformOrigin?: string;
175
+ transition?: string;
176
+ transitionProperty?: string;
177
+ transitionDuration?: string;
178
+ transitionTimingFunction?: string;
179
+ transitionDelay?: string;
180
+ animation?: string;
181
+ willChange?: string;
182
+ clipPath?: string;
183
+
184
+ // Interaction
185
+ cursor?: Cursor;
186
+ pointerEvents?: PointerEvents;
187
+ userSelect?: UserSelect;
188
+ touchAction?: string;
189
+ resize?: Loose<"none" | "both" | "horizontal" | "vertical">;
190
+ scrollBehavior?: Loose<"auto" | "smooth">;
191
+ scrollSnapType?: string;
192
+ scrollSnapAlign?: string;
193
+ appearance?: Loose<"none" | "auto">;
194
+ accentColor?: string;
195
+
196
+ // Misc
197
+ content?: string;
198
+ listStyle?: string;
199
+ tableLayout?: Loose<"auto" | "fixed">;
200
+ borderCollapse?: Loose<"collapse" | "separate">;
201
+ borderSpacing?: Size;
202
+ colorScheme?: Loose<"light" | "dark" | "light dark">;
203
+ containerType?: Loose<"normal" | "size" | "inline-size">;
204
+ containerName?: string;
205
+ }
206
+
207
+ // ---------------------------------------------------------------------------
208
+ // Theme
209
+ // ---------------------------------------------------------------------------
210
+ export interface ThemeConfig {
211
+ /** Color tokens — usable in bg, color, borderColor, outlineColor, caretColor, textDecorationColor. */
212
+ colors?: Record<string, string>;
213
+ /** Font-family tokens — usable in font / fontFamily. */
214
+ fonts?: Record<string, string>;
215
+ /** Box-shadow tokens — usable in shadow / boxShadow. */
216
+ shadows?: Record<string, string>;
217
+ /** Border-radius tokens — usable in rounded / borderRadius. */
218
+ radii?: Record<string, string>;
219
+ /**
220
+ * Responsive variants: name → media condition ("(min-width: 768px)")
221
+ * or a full at-rule prelude ("@container (min-width: 400px)").
222
+ * Declaration order = cascade order. Names must not collide with property names.
223
+ */
224
+ screens?: Record<string, string>;
225
+ }
226
+
227
+ type Tokens<T extends ThemeConfig, K extends keyof ThemeConfig> =
228
+ T[K] extends Record<string, string> ? Extract<keyof T[K], string> : never;
229
+
230
+ /** Properties whose string values resolve against theme tokens. */
231
+ interface TokenProps<T extends ThemeConfig> {
232
+ /** background — color token, color, gradient, or any CSS background shorthand */
233
+ bg?: Loose<Tokens<T, "colors">>;
234
+ backgroundColor?: Loose<Tokens<T, "colors">>;
235
+ color?: Loose<Tokens<T, "colors">>;
236
+ borderColor?: Loose<Tokens<T, "colors">>;
237
+ borderTopColor?: Loose<Tokens<T, "colors">>;
238
+ borderRightColor?: Loose<Tokens<T, "colors">>;
239
+ borderBottomColor?: Loose<Tokens<T, "colors">>;
240
+ borderLeftColor?: Loose<Tokens<T, "colors">>;
241
+ outlineColor?: Loose<Tokens<T, "colors">>;
242
+ caretColor?: Loose<Tokens<T, "colors">>;
243
+ textDecorationColor?: Loose<Tokens<T, "colors">>;
244
+ /** font-family — token or font stack */
245
+ font?: Loose<Tokens<T, "fonts">>;
246
+ fontFamily?: Loose<Tokens<T, "fonts">>;
247
+ /** box-shadow — token or raw value */
248
+ shadow?: Loose<Tokens<T, "shadows">>;
249
+ boxShadow?: Loose<Tokens<T, "shadows">>;
250
+ /** border-radius — token, number (px), or raw value */
251
+ rounded?: Tokens<T, "radii"> | Size;
252
+ borderRadius?: Tokens<T, "radii"> | Size;
253
+ }
254
+
255
+ /** Tailwind-flavored short aliases. */
256
+ interface ShorthandProps {
257
+ /** padding */ p?: Size;
258
+ /** padding-left + padding-right */ px?: Size;
259
+ /** padding-top + padding-bottom */ py?: Size;
260
+ pt?: Size; pr?: Size; pb?: Size; pl?: Size;
261
+ /** margin */ m?: Size;
262
+ /** margin-left + margin-right */ mx?: Size;
263
+ /** margin-top + margin-bottom */ my?: Size;
264
+ mt?: Size; mr?: Size; mb?: Size; ml?: Size;
265
+ /** width */ w?: Size;
266
+ /** height */ h?: Size;
267
+ minW?: Size; maxW?: Size; minH?: Size; maxH?: Size;
268
+ /** width + height */ size?: Size;
269
+ /** font-size */ text?: Size;
270
+ /** font-weight */ weight?: FontWeight;
271
+ /** line-height */ leading?: Size;
272
+ /** letter-spacing */ tracking?: Size;
273
+ /** text-align */ align?: TextAlign;
274
+ /** align-items */ items?: AlignItems;
275
+ /** justify-content */ justify?: JustifyContent;
276
+ /** z-index */ z?: number | "auto";
277
+ /** user-select */ select?: UserSelect;
278
+
279
+ // Composite utilities (value must be `true`)
280
+ /** display:flex + flex-direction:row */ row?: boolean;
281
+ /** display:flex + flex-direction:column */ col?: boolean;
282
+ /** align-items:center + justify-content:center */ center?: boolean;
283
+ /** overflow:hidden + text-overflow:ellipsis + white-space:nowrap */ truncate?: boolean;
284
+ }
285
+
286
+ /**
287
+ * Pseudo-class / pseudo-element variant keys usable inside style objects.
288
+ * The runtime selector for each key lives in the `PSEUDO` table in
289
+ * `src/style/css.ts`, which is typed `satisfies Record<Pseudo, string>` —
290
+ * adding a key on either side without the other is a compile error.
291
+ */
292
+ export type Pseudo =
293
+ | "hover" | "focus" | "focusVisible" | "focusWithin" | "active" | "visited"
294
+ | "disabled" | "enabled" | "checked" | "required" | "invalid" | "valid"
295
+ | "readOnly" | "first" | "last" | "only" | "odd" | "even" | "empty"
296
+ | "placeholderShown" | "placeholder" | "before" | "after" | "selection"
297
+ | "marker" | "firstLine" | "firstLetter";
298
+
299
+ /** Flat style: properties only, no variant nesting (used by keyframes/globalStyle). */
300
+ export type FlatStyle<T extends ThemeConfig = ThemeConfig> =
301
+ TokenProps<T> & ShorthandProps & CSSProperties & {
302
+ /** Escape hatch: raw CSS declarations, property names passed through as-is. */
303
+ raw?: Record<string, string | number>;
304
+ };
305
+
306
+ /**
307
+ * Keyframe selectors: `from`, `to`, and percentage stops autocomplete; any other
308
+ * string (e.g. a comma-separated list like "0%, 100%") is still accepted.
309
+ */
310
+ export type KeyframeStop = "from" | "to" | `${number}%`;
311
+
312
+ /** Frames passed to keyframes(): selector → flat declarations. */
313
+ export type KeyframeFrames<T extends ThemeConfig = ThemeConfig> =
314
+ & { [Stop in KeyframeStop]?: FlatStyle<T> }
315
+ & { [stop: string]: FlatStyle<T> | undefined };
316
+
317
+ /**
318
+ * Full style object: properties + pseudo variants + theme screens +
319
+ * arbitrary selectors ("&:nth-child(2)", "& > svg") + inline at-rules
320
+ * ("@media (min-width: 768px)", "@container (…)", "@supports (…)").
321
+ */
322
+ export type Style<T extends ThemeConfig = ThemeConfig> = FlatStyle<T>
323
+ & { [K in Pseudo]?: Style<T> }
324
+ & { [K in Tokens<T, "screens">]?: Style<T> }
325
+ & { [K in `&${string}`]?: Style<T> }
326
+ & { [K in `@${string}`]?: Style<T> };
327
+
328
+ // Type alias (not interface) so it keeps the implicit index signature that
329
+ // makes it assignable to ExpandedElementAttributes — usable directly as a
330
+ // nuclo attributes object.
331
+ export type StyleResult = {
332
+ className: string;
333
+ toString(): string;
334
+ };
335
+
336
+ // ---------------------------------------------------------------------------
337
+ // Variants — typed, atomic style recipes (base + named variant groups +
338
+ // defaults + compound variants). One recipe in, a call-with-props function out.
339
+ // ---------------------------------------------------------------------------
340
+
341
+ /** A map of variant groups: group name → variant value name → style object. */
342
+ export type VariantDefinitions<T extends ThemeConfig = ThemeConfig> =
343
+ Record<string, Record<string, Style<T>>>;
344
+
345
+ /**
346
+ * A group whose only values are "true"/"false" is selected with a real boolean;
347
+ * every other group is selected by its declared value names.
348
+ */
349
+ type VariantValue<Keys extends PropertyKey> =
350
+ [Extract<Keys, string>] extends ["true" | "false"] ? boolean : Extract<Keys, string>;
351
+
352
+ /** Strongly-typed selection of variant values for a given variant definition. */
353
+ export type VariantProps<V extends VariantDefinitions> = {
354
+ [Group in keyof V]?: VariantValue<keyof V[Group]>;
355
+ };
356
+
357
+ /** Configuration object accepted by variants(). */
358
+ export interface VariantsConfig<T extends ThemeConfig, V extends VariantDefinitions<T>> {
359
+ /** Styles always applied, before any variant. */
360
+ base?: Style<T>;
361
+ /**
362
+ * Named variant groups: each value maps to a style object. `V` is inferred
363
+ * with its literal group/value names (so selection, defaults and compounds
364
+ * are strictly typed), and each style object is checked against `Style<T>`.
365
+ */
366
+ variants?: V;
367
+ /** Variant values applied when a prop is omitted at the call site. */
368
+ defaultVariants?: VariantProps<NoInfer<V>>;
369
+ /** Extra styles applied when a specific combination of variants is active. */
370
+ compoundVariants?: Array<VariantProps<NoInfer<V>> & { css: Style<T> }>;
371
+ }
372
+
373
+ /** A compiled recipe: call with a selection to get a composed StyleResult. */
374
+ export type VariantsFn<V extends VariantDefinitions> = (props?: VariantProps<V>) => StyleResult;
375
+
376
+ /** Inputs accepted by cx(): results, raw class strings, falsy values, and nested arrays. */
377
+ export type ClassInput = StyleResult | string | false | null | undefined | readonly ClassInput[];
378
+
379
+ /** A themed styling instance returned by createCss(). */
380
+ export interface CssInstance<T extends ThemeConfig = ThemeConfig> {
381
+ /**
382
+ * Compile a style object into atomic CSS classes.
383
+ * Returns `{ className }` — usable directly as a nuclo attributes object.
384
+ */
385
+ css(style: Style<T>): StyleResult;
386
+ /**
387
+ * Compose class lists with exact conflict resolution: when two inputs
388
+ * style the same (query, selector, property), the last one wins.
389
+ * Accepts results, raw class strings, nested arrays, and falsy values.
390
+ */
391
+ cx(...inputs: ClassInput[]): StyleResult;
392
+ /**
393
+ * Compile a typed variants recipe (base + named variant groups + defaults
394
+ * + compound variants) into a call-with-props function returning a
395
+ * composed StyleResult. Variant names and values are inferred and checked.
396
+ */
397
+ variants<const V extends VariantDefinitions<T>>(config: VariantsConfig<T, V>): VariantsFn<V>;
398
+ /** Register a @keyframes block; returns its generated animation name. */
399
+ keyframes(frames: KeyframeFrames<T>): string;
400
+ /** Global selector styles (body, resets). Flat properties only. */
401
+ globalStyle(selector: string, style: FlatStyle<T>): void;
402
+ /** The theme this instance was created with. */
403
+ theme: T;
404
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"attributeManager.d.ts","sourceRoot":"","sources":["../../src/core/attributeManager.ts"],"names":[],"mappings":"AA+FA,wBAAgB,eAAe,CAAC,QAAQ,SAAS,cAAc,EAC7D,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,UAAU,EAAE,yBAAyB,CAAC,QAAQ,CAAC,EAC/C,cAAc,UAAO,GACpB,IAAI,CASN;AAED,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"classNameMerger.d.ts","sourceRoot":"","sources":["../../src/core/classNameMerger.ts"],"names":[],"mappings":"AAoCA,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAO3D;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAE7D;AAGD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAQzE;AAGD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CA4BvF;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAWhF"}
@@ -1,3 +0,0 @@
1
- import type { UpdateScope } from "./updateScope";
2
- export declare function updateConditionalElements(scope?: UpdateScope): void;
3
- //# sourceMappingURL=conditionalUpdater.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditionalUpdater.d.ts","sourceRoot":"","sources":["../../src/core/conditionalUpdater.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAoDjD,wBAAgB,yBAAyB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAiBnE"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Creates an HTML tag builder function.
3
- */
4
- export declare function createHtmlTagBuilder<TTagName extends ElementTagName>(tagName: TTagName): ExpandedElementBuilder<TTagName>;
5
- /**
6
- * Creates an SVG tag builder function.
7
- */
8
- export declare function createSvgTagBuilder<TTagName extends keyof SVGElementTagNameMap>(tagName: TTagName): ExpandedSVGElementBuilder<TTagName>;
9
- //# sourceMappingURL=elementFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elementFactory.d.ts","sourceRoot":"","sources":["../../src/core/elementFactory.ts"],"names":[],"mappings":"AAiDA;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAS,cAAc,EAClE,OAAO,EAAE,QAAQ,GAChB,sBAAsB,CAAC,QAAQ,CAAC,CAElC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,oBAAoB,EAC7E,OAAO,EAAE,QAAQ,GAChB,yBAAyB,CAAC,QAAQ,CAAC,CAErC"}
@@ -1,3 +0,0 @@
1
- export type NodeModifier<TTagName extends ElementTagName = ElementTagName> = NodeMod<TTagName> | NodeModFn<TTagName>;
2
- export declare function applyNodeModifier<TTagName extends ElementTagName>(parent: ExpandedElement<TTagName>, modifier: NodeModifier<TTagName>, index: number): Node | null;
3
- //# sourceMappingURL=modifierProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modifierProcessor.d.ts","sourceRoot":"","sources":["../../src/core/modifierProcessor.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,IACtE,OAAO,CAAC,QAAQ,CAAC,GACjB,SAAS,CAAC,QAAQ,CAAC,CAAC;AAqDvB,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,cAAc,EAChE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,EAChC,KAAK,EAAE,MAAM,GACX,IAAI,GAAG,IAAI,CA6Eb"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactiveAttributes.d.ts","sourceRoot":"","sources":["../../src/core/reactiveAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAgD,MAAM,mBAAmB,CAAC;AA8EzG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,SAAS,cAAc,EACvE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,iBAAiB,EAC3B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACnC,IAAI,CAkBN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CA6BhE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactiveCleanup.d.ts","sourceRoot":"","sources":["../../src/core/reactiveCleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC;AAE9C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CAC1D;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,oBAA2B,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,uBAAuB;SAA4B,OAAO,CAAC,IAAI,CAAC;UAAQ,oBAAoB;EAAK,CAAC;AAE/G;;GAEG;AACH,eAAO,MAAM,gBAAgB,uBAA8B,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,sBAAsB;SAA+B,OAAO,CAAC,OAAO,CAAC;UAAQ,mBAAmB;EAAK,CAAC;AAUnH;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAYrF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAKzF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAElE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAEpE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAMxD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAM7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactiveText.d.ts","sourceRoot":"","sources":["../../src/core/reactiveText.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,gBAAgB,CAgC9G;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CA2CjE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtimeBootstrap.d.ts","sourceRoot":"","sources":["../../src/core/runtimeBootstrap.ts"],"names":[],"mappings":"AASA;;GAEG;AAEH,wBAAgB,iBAAiB,IAAI,IAAI,CAoBxC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"styleManager.d.ts","sourceRoot":"","sources":["../../src/core/styleManager.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG,cAAc,CAAC;AACtC,KAAK,aAAa,GAAG,MAAM,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAS,cAAc,EAChE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GACzC,IAAI,CAeN;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,cAAc,EACjE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,UAAU,EAAE,eAAe,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,GAC7D,IAAI,CAUN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tagConstants.d.ts","sourceRoot":"","sources":["../../src/core/tagConstants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,g7BAc4B,CAAC;AAEnD,eAAO,MAAM,QAAQ,4wBAWyC,CAAC;AAE/D,eAAO,MAAM,iBAAiB,iHAGoB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { HTML_TAGS, SVG_TAGS, SELF_CLOSING_TAGS } from "./tagConstants";
2
- export { HTML_TAGS, SVG_TAGS, SELF_CLOSING_TAGS };
3
- export declare function registerGlobalTagBuilders(target?: Record<string, unknown>): void;
4
- //# sourceMappingURL=tagRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tagRegistry.d.ts","sourceRoot":"","sources":["../../src/core/tagRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AAmBlD,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAc,GAAG,IAAI,CAe5F"}
@@ -1,2 +0,0 @@
1
- export declare function update(...scopeIds: string[]): void;
2
- //# sourceMappingURL=updateController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateController.d.ts","sourceRoot":"","sources":["../../src/core/updateController.ts"],"names":[],"mappings":"AAmBA,wBAAgB,MAAM,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CA0BlD"}
@@ -1,5 +0,0 @@
1
- export interface UpdateScope {
2
- roots: ReadonlyArray<Element>;
3
- contains(node: Node): boolean;
4
- }
5
- //# sourceMappingURL=updateScope.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateScope.d.ts","sourceRoot":"","sources":["../../src/core/updateScope.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;CAC/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/hydration/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQhD;AAED,wBAAgB,cAAc,IAAI,IAAI,CAMrC;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQrD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAGnD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/D;AAMD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAUrD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAMpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAQ1E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CASzF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"applyModifiers.d.ts","sourceRoot":"","sources":["../../src/internal/applyModifiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGjF,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,SAAS,cAAc,EAC5D,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAChD,UAAU,SAAI,GACb,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,SAAS,cAAc,EAC5E,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,GAC/C,eAAe,CAAC,QAAQ,CAAC,CAI3B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,SAAS,MAAM,oBAAoB,EACvF,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,GAChC,oBAAoB,CAAC,QAAQ,CAAC,CAOhC"}
@@ -1,7 +0,0 @@
1
- import type { ListRenderer, ListItemsProvider } from "./types";
2
- /**
3
- * Maps items to DOM elements, keeping them in sync with changes.
4
- * Returns a function compatible with both HTML and SVG contexts.
5
- */
6
- export declare function list<TItem, TTagName extends ElementTagName = ElementTagName>(itemsProvider: ListItemsProvider<TItem>, render: ListRenderer<TItem, TTagName>): ListModifier<TTagName>;
7
- //# sourceMappingURL=renderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/list/renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,GAAG,cAAc,EAC1E,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACvC,MAAM,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,GACpC,YAAY,CAAC,QAAQ,CAAC,CAOxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderToString.d.ts","sourceRoot":"","sources":["../../src/ssr/renderToString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,KAAK,eAAe,GAChB,SAAS,CAAC,cAAc,CAAC,GACzB,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,SAAS,CAAC;AAkRd;;;;;;;;;;;;;;;;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,22 +0,0 @@
1
- export interface ConditionalInfo<TTagName extends ElementTagName = ElementTagName> {
2
- condition: () => boolean;
3
- tagName: TTagName;
4
- modifiers: Array<NodeMod<TTagName> | NodeModFn<TTagName>>;
5
- isSvg: boolean;
6
- }
7
- /**
8
- * Attach conditional info to a node and register it.
9
- */
10
- export declare function storeConditionalInfo<TTagName extends ElementTagName>(node: Node, info: ConditionalInfo<TTagName>): void;
11
- /**
12
- * Explicit unregister helper (optional use on teardown if needed).
13
- * O(1) via reverse lookup WeakMap.
14
- */
15
- export declare function unregisterConditionalNode(node: Node): void;
16
- /**
17
- * Returns an array of currently tracked conditional nodes that are still alive.
18
- * Automatically cleans up garbage-collected nodes.
19
- */
20
- export declare function getActiveConditionalNodes(): Node[];
21
- export declare function getConditionalInfo(node: Node): ConditionalInfo<ElementTagName> | null;
22
- //# sourceMappingURL=conditionalInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditionalInfo.d.ts","sourceRoot":"","sources":["../../src/utility/conditionalInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc;IAChF,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1D,KAAK,EAAE,OAAO,CAAC;CACf;AAyBD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAS,cAAc,EACnE,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,GAC7B,IAAI,CAMN;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAO1D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,EAAE,CAkBlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAAC,cAAc,CAAC,GAAG,IAAI,CAErF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/utility/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 +0,0 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utility/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;AA0CD,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAWpD;AAYD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,OAAO,GAAG,IAAI,CAE3F;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAMtG;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAOlF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAO1E;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,OAAO,GAAG,IAAI,EACtB,GAAG,QAAQ,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7D,OAAO,GAAG,IAAI,CAwBhB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CASvE"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Type-safe DOM helper utilities to reduce type assertions across the codebase.
3
- * These helpers provide proper typing for DOM operations while maintaining runtime safety.
4
- */
5
- /**
6
- * Safely casts an Element-like object to Node & ParentNode interface.
7
- * This is a common pattern needed when working with DOM manipulation.
8
- *
9
- * @param element - The element to cast
10
- * @returns The element typed as Node & ParentNode
11
- */
12
- export declare function asParentNode<T extends Element | object>(element: T): Node & ParentNode;
13
- /**
14
- * Creates a scoped DOM insertion context that temporarily redirects appendChild
15
- * to insertBefore at a specific reference node. This is useful for inserting
16
- * content at specific positions in the DOM tree.
17
- *
18
- * @param host - The host element
19
- * @param referenceNode - The node before which new nodes should be inserted
20
- * @param callback - Function to execute with the scoped context
21
- * @returns The result of the callback
22
- */
23
- export declare function withScopedInsertion<T, THost extends Element | object>(host: THost, referenceNode: Node, callback: () => T): T;
24
- /**
25
- * Type-safe wrapper for setting CSS style properties.
26
- * Provides better error handling than direct CSSStyleDeclaration access.
27
- * Supports both camelCase and kebab-case property names.
28
- *
29
- * @param element - The element to apply styles to
30
- * @param property - The CSS property name (camelCase or kebab-case)
31
- * @param value - The value to set (string, number, or null to remove)
32
- * @returns true if the style was applied successfully, false otherwise
33
- */
34
- export declare function setStyleProperty(element: HTMLElement, property: string, value: string | number | null): boolean;
35
- //# sourceMappingURL=domTypeHelpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"domTypeHelpers.d.ts","sourceRoot":"","sources":["../../src/utility/domTypeHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,UAAU,CAEtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,SAAS,OAAO,GAAG,MAAM,EACnE,IAAI,EAAE,KAAK,EACX,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,MAAM,CAAC,GAChB,CAAC,CAiBH;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAC5B,OAAO,CAgBT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/utility/environment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,SAAS,SAAmE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/utility/errorHandler.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAKvE"}
@@ -1,2 +0,0 @@
1
- export declare function dispatchGlobalUpdateEvent(): void;
2
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utility/events.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB,IAAI,IAAI,CAYhD"}
@@ -1,7 +0,0 @@
1
- type ZeroArityFunction = () => unknown;
2
- declare const modifierProbeCache: WeakMap<ZeroArityFunction, {
3
- value: unknown;
4
- error: boolean;
5
- }>;
6
- export { modifierProbeCache };
7
- //# sourceMappingURL=modifierPredicates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modifierPredicates.d.ts","sourceRoot":"","sources":["../../src/utility/modifierPredicates.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG,MAAM,OAAO,CAAC;AAEvC,QAAA,MAAM,kBAAkB;WAA2C,OAAO;WAAS,OAAO;EAAK,CAAC;AAEhG,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"on.d.ts","sourceRoot":"","sources":["../../src/utility/on.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,KAAK,oBAAoB,GAAG,OAAO,GAAG,uBAAuB,CAAC;AA0C9D;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAsBN;AAED;;GAEG;AACH,wBAAgB,EAAE,CAChB,CAAC,SAAS,MAAM,mBAAmB,EACnC,QAAQ,SAAS,cAAc,GAAG,cAAc,EAEhD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,EACrF,OAAO,CAAC,EAAE,oBAAoB,GAC7B,SAAS,CAAC,QAAQ,CAAC,CAAC;AAEvB;;;;GAIG;AACH,wBAAgB,EAAE,CAChB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,KAAK,GAAG,KAAK,EACvB,QAAQ,SAAS,cAAc,GAAG,cAAc,EAEhD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAChE,OAAO,CAAC,EAAE,oBAAoB,GAC7B,SAAS,CAAC,QAAQ,CAAC,CAAC"}