@yahoo/uds-v5-wip 1.34.0 → 1.36.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 (68) hide show
  1. package/dist/config/dist/createConfig.d.ts +89 -6
  2. package/dist/config/dist/createConfig.js +52 -4
  3. package/dist/config/dist/defineStyleProp.d.ts +56 -0
  4. package/dist/config/dist/index.d.ts +4 -1
  5. package/dist/config/dist/index.js +2 -2
  6. package/dist/config/dist/propertyAcceptedTypes.js +65 -6
  7. package/dist/config/dist/resolveStyleProp.d.ts +62 -1
  8. package/dist/config/dist/resolveStyleProp.js +188 -2
  9. package/dist/config/dist/types/css-values.d.ts +61 -0
  10. package/dist/config.d.ts +69 -15
  11. package/dist/core/dist/compositeStyles.d.ts +1 -2
  12. package/dist/core/dist/createComponent.d.ts +1 -2
  13. package/dist/core/dist/createComponentExample.d.ts +1 -2
  14. package/dist/core/dist/createProvider.d.ts +1 -2
  15. package/dist/core/dist/generated/stylePropsTwMap.d.ts +1 -2
  16. package/dist/core/dist/getComponentStyles.d.ts +1 -2
  17. package/dist/core/dist/getStyles.d.ts +1 -2
  18. package/dist/core/dist/propMappings.d.ts +1 -2
  19. package/dist/core/dist/resolveMotionState.d.ts +1 -2
  20. package/dist/core/dist/transformPreset.d.ts +1 -2
  21. package/dist/core/dist/withDefaultStyleProps.d.ts +1 -2
  22. package/dist/foundational-presets/dist/boldVibrant.d.ts +69 -15
  23. package/dist/foundational-presets/dist/brutalist.d.ts +69 -15
  24. package/dist/foundational-presets/dist/candy.d.ts +69 -15
  25. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +69 -15
  26. package/dist/foundational-presets/dist/corporate.d.ts +69 -15
  27. package/dist/foundational-presets/dist/darkMoody.d.ts +69 -15
  28. package/dist/foundational-presets/dist/defaultPreset.d.ts +69 -15
  29. package/dist/foundational-presets/dist/defaultPreset.js +10 -41
  30. package/dist/foundational-presets/dist/forest.d.ts +69 -15
  31. package/dist/foundational-presets/dist/highContrast.d.ts +69 -15
  32. package/dist/foundational-presets/dist/lavender.d.ts +69 -15
  33. package/dist/foundational-presets/dist/luxury.d.ts +69 -15
  34. package/dist/foundational-presets/dist/monochrome.d.ts +69 -15
  35. package/dist/foundational-presets/dist/motion.d.ts +1 -2
  36. package/dist/foundational-presets/dist/neonCyber.d.ts +69 -15
  37. package/dist/foundational-presets/dist/newspaper.d.ts +69 -15
  38. package/dist/foundational-presets/dist/ocean.d.ts +69 -15
  39. package/dist/foundational-presets/dist/slate.d.ts +258 -205
  40. package/dist/foundational-presets/dist/sunset.d.ts +258 -205
  41. package/dist/foundational-presets/dist/terminal.d.ts +258 -205
  42. package/dist/foundational-presets/dist/warmOrganic.d.ts +258 -205
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/dist/utils/dist/array-utils/closestItem.d.ts +1 -2
  45. package/dist/utils/dist/array-utils/removeItem.d.ts +1 -2
  46. package/dist/utils/dist/component-style-defaults.d.ts +1 -2
  47. package/dist/utils/dist/math-utils/clamp.d.ts +1 -2
  48. package/dist/utils/dist/motion-utils/interpolate.d.ts +1 -2
  49. package/dist/utils/dist/object-utils/entries.d.ts +1 -2
  50. package/dist/utils/dist/object-utils/flattenObj.d.ts +1 -2
  51. package/dist/utils/dist/object-utils/fromEntries.d.ts +1 -2
  52. package/dist/utils/dist/object-utils/keys.d.ts +1 -2
  53. package/dist/utils/dist/object-utils/mapKeys.d.ts +1 -2
  54. package/dist/utils/dist/object-utils/mapValues.d.ts +1 -2
  55. package/dist/utils/dist/string-utils/arrayToUnion.d.ts +1 -2
  56. package/dist/utils/dist/string-utils/capitalize.d.ts +1 -2
  57. package/dist/utils/dist/string-utils/componentClassName.d.ts +1 -2
  58. package/dist/utils/dist/string-utils/createTemplate.d.ts +1 -2
  59. package/dist/utils/dist/string-utils/cssVar.d.ts +1 -2
  60. package/dist/utils/dist/string-utils/cssVars.d.ts +1 -2
  61. package/dist/utils/dist/string-utils/dedent.d.ts +1 -2
  62. package/dist/utils/dist/string-utils/indent.d.ts +1 -2
  63. package/dist/utils/dist/string-utils/join.d.ts +1 -2
  64. package/dist/utils/dist/string-utils/kebabCase.d.ts +1 -2
  65. package/dist/utils/dist/string-utils/split.d.ts +1 -2
  66. package/dist/utils/dist/string-utils/tsProperties.d.ts +1 -2
  67. package/dist/utils.d.ts +1 -1
  68. package/package.json +3 -3
@@ -1,2 +1,188 @@
1
- import "./resolveTokenTypes.js";
2
- import "./propertyAcceptedTypes.js";
1
+ import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
2
+ import "../../utils/dist/index.js";
3
+ import { isTokenAcceptedByProperty } from "./propertyAcceptedTypes.js";
4
+ import { sniffTokenTypeFromValue } from "./resolveTokenTypes.js";
5
+ //#region ../config/dist/resolveStyleProp.js
6
+ /**
7
+ * Resolve a {@link StyleProp} authored via `defineStyleProp` against the
8
+ * active UDS config, producing a flat list of accepted tokens, literal
9
+ * keywords, and the arbitrary spec — the data that downstream codegen
10
+ * consumes to populate `Custom*` interfaces and emit utility CSS.
11
+ *
12
+ * Filtering invariant: a token is exposed in the resolved pool only when
13
+ * its detected CSS value type is accepted by the prop's `cssProperty`,
14
+ * per {@link PROPERTY_ACCEPTED_TYPES}. Properties absent from that table
15
+ * accept every token.
16
+ *
17
+ * The resolver is pure — given the same `(StyleProp, UdsConfigData)` input
18
+ * it returns the same output. Group lookups are by `namespace` (with a
19
+ * fallback to `cssPrefix`) on the resolved config's `atomic` array.
20
+ */
21
+ /**
22
+ * Map the legacy 8-entry `TokenType` enum to a {@link CssValueTypeName}.
23
+ * The `'dimension'` case is ambiguous (length vs. percentage); callers
24
+ * disambiguate by sniffing the value string.
25
+ */
26
+ function tokenTypeToValueType(t) {
27
+ switch (t) {
28
+ case "color": return "color";
29
+ case "dimension": return "length-percentage";
30
+ case "number": return "number";
31
+ case "fontFamily": return "font-family";
32
+ case "fontWeight": return "font-weight";
33
+ case "duration": return "time";
34
+ case "strokeStyle": return "string";
35
+ case "string": return "string";
36
+ default: return;
37
+ }
38
+ }
39
+ /**
40
+ * A value looks like a CSS shadow when it combines at least one length
41
+ * (offset/blur/spread) with a color reference. Catches both single-shadow
42
+ * (`'0 1px 2px rgba(...)'`) and multi-shadow (`'..., ...'`) forms, plus
43
+ * inset shadows. Used to refine `'string'`-typed tokens to the more precise
44
+ * `'shadow'` value type so they pass the runtime filter on `box-shadow` /
45
+ * `text-shadow` props.
46
+ */
47
+ const SHADOW_LENGTH_RE = /(?:^|[\s,])-?\d+(?:\.\d+)?(?:px|rem|em|ch|ex)/i;
48
+ const SHADOW_COLOR_RE = /(?:rgba?|hsla?|color|oklch|oklab|lch|lab|hwb)\(|#[0-9a-fA-F]{3,8}\b/;
49
+ function looksLikeShadow(value) {
50
+ const trimmed = value.trim();
51
+ return SHADOW_LENGTH_RE.test(trimmed) && SHADOW_COLOR_RE.test(trimmed);
52
+ }
53
+ /**
54
+ * Detect a token's CSS value type. Resolution order:
55
+ * 1. Per-token `type` override.
56
+ * 2. Group-level `type`.
57
+ * 3. Value sniff via {@link sniffTokenTypeFromValue}.
58
+ *
59
+ * When the resolved type is `'length-percentage'` and the raw value ends in
60
+ * `%`, narrow to `'percentage'`; otherwise narrow to `'length'`. When the
61
+ * resolved type is `'string'` but the value looks like a shadow expression,
62
+ * narrow to `'shadow'`.
63
+ */
64
+ function detectTokenValueType(token, group) {
65
+ const explicit = token.type ?? group.type;
66
+ let resolved;
67
+ if (explicit) resolved = tokenTypeToValueType(explicit);
68
+ else {
69
+ const sniffed = sniffTokenTypeFromValue(token.value);
70
+ resolved = sniffed ? tokenTypeToValueType(sniffed) : void 0;
71
+ }
72
+ if (resolved === "length-percentage") return token.value.trim().endsWith("%") ? "percentage" : "length";
73
+ if (resolved === "string" && looksLikeShadow(token.value)) return "shadow";
74
+ return resolved;
75
+ }
76
+ const REF_RE = /^\{([^.{}]+)(?:\.([^.{}]+))?\}$/;
77
+ /**
78
+ * Parse a string ref like `'{palette}'` or `'{spacing.4}'`. Returns
79
+ * `undefined` for any string that isn't a brace ref (so the caller can
80
+ * treat it as a literal keyword).
81
+ */
82
+ function parseGroupRef(raw) {
83
+ const m = REF_RE.exec(raw);
84
+ if (!m) return void 0;
85
+ const [, group, key] = m;
86
+ if (!group) return void 0;
87
+ return key !== void 0 ? {
88
+ group,
89
+ key
90
+ } : { group };
91
+ }
92
+ function findGroup(atomic, name) {
93
+ return atomic.find((g) => g.namespace === name || g.cssPrefix === name);
94
+ }
95
+ function isNamespacedRef(entry) {
96
+ return typeof entry === "object" && entry !== null && "ref" in entry && "namespace" in entry;
97
+ }
98
+ /**
99
+ * Build `--{configPrefix}-{varPrefix}-{safeName}` (or omit the configPrefix
100
+ * when empty). Mirrors `buildTokenVarName` in `@uds/codegen/css/prepareCss`.
101
+ */
102
+ function buildCssVar(configPrefix, varPrefix, safeName) {
103
+ return configPrefix ? `--${configPrefix}-${varPrefix}-${safeName}` : `--${varPrefix}-${safeName}`;
104
+ }
105
+ function resolveGroupTokens(group, cssProperty, configPrefix, namespace) {
106
+ const groupName = group.namespace ?? group.cssPrefix ?? "";
107
+ const varPrefix = group.cssPrefix ?? group.namespace ?? "";
108
+ const out = [];
109
+ for (const token of group.tokens) {
110
+ const valueType = detectTokenValueType(token, group);
111
+ if (!isTokenAcceptedByProperty(cssProperty, valueType, token.value)) continue;
112
+ const safeName = safeTokenName(token.name);
113
+ out.push({
114
+ name: token.name,
115
+ value: token.value,
116
+ valueType,
117
+ group: groupName,
118
+ namespace,
119
+ qualifiedName: namespace !== void 0 ? `${namespace}.${token.name}` : token.name,
120
+ safeName,
121
+ cssVar: buildCssVar(configPrefix, varPrefix, safeName),
122
+ modifiers: token.modifiers
123
+ });
124
+ }
125
+ return out;
126
+ }
127
+ /**
128
+ * Resolve a style prop against the given resolved UDS config. Unknown group
129
+ * refs are silently dropped from `tokens` (callers can detect this by
130
+ * comparing input refs vs. resolved tokens if they need to surface a
131
+ * config-build warning).
132
+ *
133
+ * @param propName - The JSX prop name (the map key from `registerStyleProps`).
134
+ */
135
+ function resolveStyleProp(propName, styleProp, config) {
136
+ const { cssProperty, classPrefix, values, arbitrary, metadata } = styleProp;
137
+ const configPrefix = config.prefix;
138
+ const tokens = [];
139
+ const literals = [];
140
+ for (const entry of values ?? []) {
141
+ if (typeof entry === "string") {
142
+ const parsed = parseGroupRef(entry);
143
+ if (!parsed) {
144
+ literals.push(entry);
145
+ continue;
146
+ }
147
+ const group = findGroup(config.atomic, parsed.group);
148
+ if (!group) continue;
149
+ if (parsed.key !== void 0) {
150
+ const token = group.tokens.find((t) => t.name === parsed.key);
151
+ if (!token) continue;
152
+ const valueType = detectTokenValueType(token, group);
153
+ if (!isTokenAcceptedByProperty(cssProperty, valueType, token.value)) continue;
154
+ const safeName = safeTokenName(token.name);
155
+ const varPrefix = group.cssPrefix ?? group.namespace ?? parsed.group;
156
+ tokens.push({
157
+ name: token.name,
158
+ value: token.value,
159
+ valueType,
160
+ group: group.namespace ?? group.cssPrefix ?? parsed.group,
161
+ qualifiedName: token.name,
162
+ safeName,
163
+ cssVar: buildCssVar(configPrefix, varPrefix, safeName),
164
+ modifiers: token.modifiers
165
+ });
166
+ } else tokens.push(...resolveGroupTokens(group, cssProperty, configPrefix));
167
+ continue;
168
+ }
169
+ if (isNamespacedRef(entry)) {
170
+ const parsed = parseGroupRef(entry.ref);
171
+ if (!parsed || parsed.key !== void 0) continue;
172
+ const group = findGroup(config.atomic, parsed.group);
173
+ if (!group) continue;
174
+ tokens.push(...resolveGroupTokens(group, cssProperty, configPrefix, entry.namespace));
175
+ }
176
+ }
177
+ return {
178
+ propName,
179
+ cssProperty,
180
+ classPrefix,
181
+ tokens,
182
+ literals,
183
+ arbitrary,
184
+ metadata: metadata ?? {}
185
+ };
186
+ }
187
+ //#endregion
188
+ export { resolveStyleProp };
@@ -0,0 +1,61 @@
1
+ //#region ../config/dist/types/css-values.d.ts
2
+ //#region src/types/css-values.d.ts
3
+ /**
4
+ * CSS value-type primitives — building blocks used by {@link CssPropertyValues}
5
+ * in `./css-properties` and by `defineStyleProp` to constrain authored values.
6
+ *
7
+ * Each entry in {@link CssValue} corresponds to a CSS value type name from the
8
+ * CSS specs (length, percentage, color, time, etc.). The CSS-wide keywords
9
+ * (`inherit`, `initial`, `unset`, `revert`) are bundled into {@link ColorKeyword}
10
+ * because color is the most common channel for them; properties that accept
11
+ * those keywords on non-color value types are expected to list them locally.
12
+ *
13
+ * Note: named colors (`red`, `blue`, etc.) are intentionally NOT in the union —
14
+ * authors should use a token, a hex code, or a function form (`rgb(...)`, etc.).
15
+ */
16
+ /** CSS-wide keywords accepted on color-valued properties. */
17
+ type ColorKeyword = 'transparent' | 'currentColor' | 'inherit' | 'initial' | 'unset' | 'revert';
18
+ type HexColor = `#${string}`;
19
+ type RgbColor = `rgb(${string})` | `rgba(${string})`;
20
+ type HslColor = `hsl(${string})` | `hsla(${string})`;
21
+ type ColorFn = `color(${string})` | `lab(${string})` | `lch(${string})` | `oklab(${string})` | `oklch(${string})`;
22
+ type CssColor = HexColor | RgbColor | HslColor | ColorFn | ColorKeyword;
23
+ type CssLength = `${number}px` | `${number}rem` | `${number}em` | `${number}ch` | `${number}ex` | `${number}vh` | `${number}vw` | `${number}vmin` | `${number}vmax` | 0;
24
+ type CssPercentage = `${number}%`;
25
+ type CssAngle = `${number}deg` | `${number}rad` | `${number}grad` | `${number}turn`;
26
+ type CssTime = `${number}ms` | `${number}s`;
27
+ type CssRatio = `${number}/${number}`;
28
+ /**
29
+ * Registry of CSS value types, keyed by their spec-defined names.
30
+ *
31
+ * Used in two places:
32
+ * 1. As the source of truth for what shapes count as e.g. a "length" or a
33
+ * "color" when validating token values and `defineStyleProp` `arbitrary`
34
+ * specs.
35
+ * 2. By {@link import('./css-properties').CssPropertyValues}, which composes
36
+ * these entries (plus per-property keywords) into the union accepted by
37
+ * each CSS property.
38
+ */
39
+ type CssValue = {
40
+ color: CssColor;
41
+ length: CssLength;
42
+ percentage: CssPercentage;
43
+ 'length-percentage': CssLength | CssPercentage;
44
+ number: number;
45
+ integer: number;
46
+ angle: CssAngle;
47
+ time: CssTime;
48
+ ratio: CssRatio;
49
+ image: string;
50
+ url: `url(${string})`;
51
+ 'font-weight': number | 'normal' | 'bold' | 'lighter' | 'bolder';
52
+ 'font-family': string;
53
+ 'easing-function': 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end' | `cubic-bezier(${string})` | `steps(${string})`;
54
+ shadow: string;
55
+ gradient: string;
56
+ ident: string;
57
+ string: string;
58
+ };
59
+ type CssValueTypeName = keyof CssValue; //#endregion
60
+ //#endregion
61
+ export { ColorFn, ColorKeyword, CssAngle, CssColor, CssLength, CssPercentage, CssRatio, CssTime, CssValue, CssValueTypeName, HexColor, HslColor, RgbColor };
package/dist/config.d.ts CHANGED
@@ -1,13 +1,40 @@
1
1
  import { defaultColors } from "./config/dist/consts/defaultColors.js";
2
2
  import { TokenType, VarGroupDef, VarTokenDef, VarsConfig } from "./config/dist/types.js";
3
- import { GlobalStylesDef, UdsConfig, UdsConfigData, buildTokenReference, createConfigBuilder, darker, lighter, resolveConfig } from "./config/dist/createConfig.js";
3
+ import { GetModifierFromInput, GlobalStylesDef, UdsConfig, UdsConfigData, buildTokenReference, createConfigBuilder, darker, lighter, resolveConfig } from "./config/dist/createConfig.js";
4
4
  import { SerializedConfig, TokenRef, buildReverseMap, deserializeConfig, serializeConfig } from "./config/dist/serialize.js";
5
5
  import { ComponentsConfig } from "./config/dist/index.js";
6
6
  import * as _$_uds_types0 from "@uds/types";
7
7
 
8
8
  //#region src/config.d.ts
9
9
  declare const uds: UdsConfig<_$_uds_types0.ModifierProp, {}, {}, {}, {}, never, {}>;
10
- declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "_dark" | "_sm" | "_md" | "_lg" | "_xl" | "_2xl", {
10
+ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | GetModifierFromInput<{
11
+ readonly colorMode: {
12
+ readonly options: {
13
+ readonly dark: {
14
+ readonly css: ".dark";
15
+ };
16
+ };
17
+ };
18
+ readonly responsive: {
19
+ readonly options: {
20
+ readonly sm: {
21
+ readonly media: "(min-width: 640px)";
22
+ };
23
+ readonly md: {
24
+ readonly media: "(min-width: 768px)";
25
+ };
26
+ readonly lg: {
27
+ readonly media: "(min-width: 1024px)";
28
+ };
29
+ readonly xl: {
30
+ readonly media: "(min-width: 1280px)";
31
+ };
32
+ readonly "2xl": {
33
+ readonly media: "(min-width: 1536px)";
34
+ };
35
+ };
36
+ };
37
+ }>, {
11
38
  opacity: {
12
39
  0: string;
13
40
  5: string;
@@ -40,8 +67,8 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
40
67
  };
41
68
  rotate: {
42
69
  0: string;
43
- 2: string;
44
70
  1: string;
71
+ 2: string;
45
72
  3: string;
46
73
  6: string;
47
74
  12: string;
@@ -195,16 +222,16 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
195
222
  spacing: {
196
223
  0: string;
197
224
  4: string;
198
- 2: string;
199
- 5: string;
200
225
  1: string;
201
226
  px: string;
227
+ 2: string;
202
228
  8: string;
203
229
  0.5: string;
204
230
  1.5: string;
205
231
  2.5: string;
206
232
  3: string;
207
233
  3.5: string;
234
+ 5: string;
208
235
  6: string;
209
236
  7: string;
210
237
  9: string;
@@ -238,30 +265,30 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
238
265
  outlineWidth: {
239
266
  0: string;
240
267
  4: string;
241
- 2: string;
242
268
  1: string;
269
+ 2: string;
243
270
  8: string;
244
271
  };
245
272
  outlineOffset: {
246
273
  0: string;
247
274
  4: string;
248
- 2: string;
249
275
  1: string;
276
+ 2: string;
250
277
  8: string;
251
278
  };
252
279
  ringWidth: {
253
280
  0: string;
254
281
  4: string;
255
282
  inset: string;
256
- 2: string;
257
283
  1: string;
284
+ 2: string;
258
285
  8: string;
259
286
  };
260
287
  ringOffsetWidth: {
261
288
  0: string;
262
289
  4: string;
263
- 2: string;
264
290
  1: string;
291
+ 2: string;
265
292
  8: string;
266
293
  };
267
294
  shadow: {
@@ -277,8 +304,8 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
277
304
  };
278
305
  strokeWidth: {
279
306
  0: string;
280
- 2: string;
281
307
  1: string;
308
+ 2: string;
282
309
  };
283
310
  fontFamily: {
284
311
  sans: string;
@@ -289,9 +316,9 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
289
316
  normal: string;
290
317
  thin: string;
291
318
  bold: string;
292
- light: string;
293
319
  medium: string;
294
320
  extralight: string;
321
+ light: string;
295
322
  semibold: string;
296
323
  extrabold: string;
297
324
  black: string;
@@ -331,20 +358,20 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
331
358
  0: string;
332
359
  4: string;
333
360
  full: string;
334
- 2: string;
335
- 5: string;
336
361
  1: string;
337
362
  "1/2": string;
338
363
  "1/3": string;
339
364
  "2/3": string;
340
365
  "1/4": string;
341
366
  "3/4": string;
367
+ 2: string;
342
368
  8: string;
343
369
  0.5: string;
344
370
  1.5: string;
345
371
  2.5: string;
346
372
  3: string;
347
373
  3.5: string;
374
+ 5: string;
348
375
  6: string;
349
376
  7: string;
350
377
  9: string;
@@ -386,13 +413,40 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
386
413
  };
387
414
  skew: {
388
415
  0: string;
389
- 2: string;
390
416
  1: string;
417
+ 2: string;
391
418
  3: string;
392
419
  6: string;
393
420
  12: string;
394
421
  };
395
- }, {}, {}, {}, "_light" | "_dark" | "_sm" | "_md" | "_lg" | "_xl" | "_2xl", {
422
+ }, {}, {}, {}, GetModifierFromInput<{
423
+ readonly colorMode: {
424
+ readonly options: {
425
+ readonly dark: {
426
+ readonly css: ".dark";
427
+ };
428
+ };
429
+ };
430
+ readonly responsive: {
431
+ readonly options: {
432
+ readonly sm: {
433
+ readonly media: "(min-width: 640px)";
434
+ };
435
+ readonly md: {
436
+ readonly media: "(min-width: 768px)";
437
+ };
438
+ readonly lg: {
439
+ readonly media: "(min-width: 1024px)";
440
+ };
441
+ readonly xl: {
442
+ readonly media: "(min-width: 1280px)";
443
+ };
444
+ readonly "2xl": {
445
+ readonly media: "(min-width: 1536px)";
446
+ };
447
+ };
448
+ };
449
+ }>, {
396
450
  readonly color: {
397
451
  readonly $type: "color";
398
452
  readonly inherit: {
@@ -1,7 +1,6 @@
1
1
  import { CompositeStylesConfig } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/compositeStyles.d.ts
4
- //#region src/compositeStyles.d.ts
5
4
  /** Set the composite-styles config (called by loader at build time) */
6
5
  declare function setCompositeStylesConfig(config: CompositeStylesConfig): void;
7
6
  /** Get the current composite-styles config */
@@ -17,6 +16,6 @@ declare function getCompositeStylesConfig(): CompositeStylesConfig;
17
16
  declare function expandCompositeStyles(props: Record<string, unknown>, config?: CompositeStylesConfig): {
18
17
  expanded: Record<string, unknown>;
19
18
  markerClasses: string[];
20
- }; //#endregion
19
+ };
21
20
  //#endregion
22
21
  export { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig };
@@ -1,7 +1,6 @@
1
1
  import { CreateComponentConfig, CreateComponentProps, CreateComponentRenderFn, CreateComponentSlotTagConfig, CreateComponentTypeInput } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/createComponent.d.ts
4
- //#region src/createComponent.d.ts
5
4
  type PrimitiveTag = keyof React.JSX.IntrinsicElements;
6
5
  type SpecConfig<TSpec> = TSpec extends {
7
6
  config: infer TConfig extends CreateComponentTypeInput;
@@ -52,6 +51,6 @@ declare function createComponent<TSpecOrProps = {}>(tag: PrimitiveTag): React.FC
52
51
  props: infer TOwnProps;
53
52
  } ? CreateComponentProps<TConfig, TOwnProps, PrimitiveTag> : PrimitiveOwnProps<TSpecOrProps>>;
54
53
  declare function createComponent<TSpec>(renderFn: CreateComponentRenderFn<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>): React.FC<CreateComponentProps<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>>;
55
- declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>; //#endregion
54
+ declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>;
56
55
  //#endregion
57
56
  export { createComponent };
@@ -1,7 +1,6 @@
1
1
  import { ComponentProps, ComponentType } from "react";
2
2
 
3
3
  //#region ../core/dist/createComponentExample.d.ts
4
- //#region src/createComponentExample.d.ts
5
4
  /**
6
5
  * Extracts variant fixtures from a Component's props type.
7
6
  * If Button has `variant?: 'brand' | 'outline'` and `size?: 'sm' | 'md'`,
@@ -37,6 +36,6 @@ type ExamplesResult<TComponent extends ComponentType<any>> = {
37
36
  * }));
38
37
  * ```
39
38
  */
40
- declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>; //#endregion
39
+ declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>;
41
40
  //#endregion
42
41
  export { ComponentExample, createComponentExample };
@@ -1,5 +1,4 @@
1
1
  //#region ../core/dist/createProvider.d.ts
2
- //#region src/createProvider.d.ts
3
2
  type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
4
3
  children: React.ReactNode;
5
4
  } & TProps) => {
@@ -8,6 +7,6 @@ type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
8
7
  };
9
8
  declare function createProvider<TContext, TProps = Record<never, never>>(name: string, renderFn: ProviderRenderFn<TContext, TProps>): [React.FC<{
10
9
  children: React.ReactNode;
11
- } & TProps>, () => TContext]; //#endregion
10
+ } & TProps>, () => TContext];
12
11
  //#endregion
13
12
  export { createProvider };
@@ -1,5 +1,4 @@
1
1
  //#region ../core/dist/generated/stylePropsTwMap.d.ts
2
- //#region src/generated/stylePropsTwMap.d.ts
3
2
  declare const stylePropsTwMap: {
4
3
  readonly "border-boolean": {
5
4
  readonly border: "boolean";
@@ -1696,6 +1695,6 @@ declare const stylePropsTwMap: {
1696
1695
  readonly "hyphens-manual": {
1697
1696
  readonly hyphens: "manual";
1698
1697
  };
1699
- }; //#endregion
1698
+ };
1700
1699
  //#endregion
1701
1700
  export { stylePropsTwMap };
@@ -1,7 +1,6 @@
1
1
  import { ComponentRegistry, ComponentSlotsOf, ComponentVariantsOf } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/getComponentStyles.d.ts
4
- //#region src/getComponentStyles.d.ts
5
4
  type ResolveSlots<Name extends string> = Name extends keyof ComponentRegistry ? ComponentSlotsOf<Name> : string;
6
5
  type ResolveVariants<Name extends string> = Name extends keyof ComponentRegistry ? ComponentVariantsOf<Name> : Record<string, string>;
7
6
  interface UdsRuntimeMeta {
@@ -45,6 +44,6 @@ interface ComponentStyler<Name extends string> {
45
44
  * @param slots - Array of slot names
46
45
  * @param element - Optional HTML element tag for element-specific prop forwarding
47
46
  */
48
- declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>; //#endregion
47
+ declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>;
49
48
  //#endregion
50
49
  export { createComponentStyler };
@@ -2,7 +2,6 @@ import { ClassValue } from "clsx";
2
2
  import { ModifierProp, ModifierProps, StyleAndModifierProps, StyleProps } from "@uds/types";
3
3
 
4
4
  //#region ../core/dist/getStyles.d.ts
5
- //#region src/getStyles.d.ts
6
5
  /** Convert kebab-case CSS property to camelCase for React inline styles.
7
6
  * CSS custom properties (--*) are kept as-is since React supports them verbatim. */
8
7
  declare function toCamelCase(str: string): string;
@@ -38,6 +37,6 @@ interface GetStylesParams extends StyleProps, ModifierProps {
38
37
  * so they can be included in the CSS safelist.
39
38
  */
40
39
  declare function getStyles(props: GetStylesParams): string;
41
- declare function getVariantClassName(componentName: string, variant: string | undefined): string; //#endregion
40
+ declare function getVariantClassName(componentName: string, variant: string | undefined): string;
42
41
  //#endregion
43
42
  export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
@@ -1,7 +1,6 @@
1
1
  import { ConfigurableProp, ModifierProp, StyleProp } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/propMappings.d.ts
4
- //#region src/propMappings.d.ts
5
4
  interface PropMapping {
6
5
  /** Class name prefix for runtime class generation. 'no-prefix' means value IS the class. */
7
6
  classPrefix: string;
@@ -72,6 +71,6 @@ interface ModifierEntry {
72
71
  *
73
72
  * e.g. `bg="primary"` + `bgOpacity="75"` → class `bg-primary_75`
74
73
  */
75
- declare const colorPropToOpacityProp: Record<string, string>; //#endregion
74
+ declare const colorPropToOpacityProp: Record<string, string>;
76
75
  //#endregion
77
76
  export { ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, colorPropToOpacityProp, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, modifierMappings, propMappings };
@@ -1,5 +1,4 @@
1
1
  //#region ../core/dist/resolveMotionState.d.ts
2
- //#region src/resolveMotionState.d.ts
3
- declare function resolveMotionState(stateKeyframe: Record<string, unknown>, index: number): Record<string, number>; //#endregion
2
+ declare function resolveMotionState(stateKeyframe: Record<string, unknown>, index: number): Record<string, number>;
4
3
  //#endregion
5
4
  export { resolveMotionState };
@@ -1,7 +1,6 @@
1
1
  import { MotionPreset } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/transformPreset.d.ts
4
- //#region src/transformPreset.d.ts
5
4
  interface TransformedMotionProps {
6
5
  initial?: Record<string, unknown>;
7
6
  animate?: Record<string, unknown>;
@@ -13,6 +12,6 @@ interface TransformedMotionProps {
13
12
  /**
14
13
  * Convert a JS-runtime MotionPreset to a motion/react-compatible props object.
15
14
  */
16
- declare function transformPreset(preset: MotionPreset): TransformedMotionProps; //#endregion
15
+ declare function transformPreset(preset: MotionPreset): TransformedMotionProps;
17
16
  //#endregion
18
17
  export { TransformedMotionProps, transformPreset };
@@ -1,7 +1,6 @@
1
1
  import { BorderRadius, GridSpan, GridStartEnd, GridTemplate, StyleAndModifierProps } from "@uds/types";
2
2
 
3
3
  //#region ../core/dist/withDefaultStyleProps.d.ts
4
- //#region src/withDefaultStyleProps.d.ts
5
4
  interface StackDefaultsInput extends StyleAndModifierProps {
6
5
  gap?: StyleAndModifierProps['gap'];
7
6
  }
@@ -39,6 +38,6 @@ declare const withDefaultStyleProps: {
39
38
  shape?: BorderRadius;
40
39
  }) => StyleAndModifierProps;
41
40
  Svg: (props: SvgDefaultsInput) => StyleAndModifierProps;
42
- }; //#endregion
41
+ };
43
42
  //#endregion
44
43
  export { withDefaultStyleProps };