@yahoo/uds-v5-wip 1.14.0 → 1.15.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 (31) hide show
  1. package/dist/config/dist/createConfig.d.ts +14 -2
  2. package/dist/config/dist/createConfig.js +36 -7
  3. package/dist/config/dist/index.d.ts +1 -1
  4. package/dist/config/dist/index.js +1 -0
  5. package/dist/config/dist/preset-merge.js +3 -0
  6. package/dist/config/dist/resolveTokenTypes.d.ts +1 -0
  7. package/dist/config/dist/resolveTokenTypes.js +149 -0
  8. package/dist/config/dist/types.d.ts +32 -5
  9. package/dist/config.d.ts +44 -2
  10. package/dist/foundational-presets/dist/boldVibrant.d.ts +42 -0
  11. package/dist/foundational-presets/dist/brutalist.d.ts +42 -0
  12. package/dist/foundational-presets/dist/candy.d.ts +42 -0
  13. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +42 -0
  14. package/dist/foundational-presets/dist/corporate.d.ts +42 -0
  15. package/dist/foundational-presets/dist/darkMoody.d.ts +42 -0
  16. package/dist/foundational-presets/dist/defaultPreset.d.ts +42 -0
  17. package/dist/foundational-presets/dist/defaultPreset.js +69 -9
  18. package/dist/foundational-presets/dist/forest.d.ts +42 -0
  19. package/dist/foundational-presets/dist/highContrast.d.ts +42 -0
  20. package/dist/foundational-presets/dist/lavender.d.ts +42 -0
  21. package/dist/foundational-presets/dist/luxury.d.ts +42 -0
  22. package/dist/foundational-presets/dist/monochrome.d.ts +42 -0
  23. package/dist/foundational-presets/dist/neonCyber.d.ts +42 -0
  24. package/dist/foundational-presets/dist/newspaper.d.ts +42 -0
  25. package/dist/foundational-presets/dist/ocean.d.ts +42 -0
  26. package/dist/foundational-presets/dist/slate.d.ts +42 -0
  27. package/dist/foundational-presets/dist/sunset.d.ts +42 -0
  28. package/dist/foundational-presets/dist/terminal.d.ts +42 -0
  29. package/dist/foundational-presets/dist/warmOrganic.d.ts +42 -0
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { PropertyGroupId } from "./propertyGroups.js";
2
- import { VarsConfig } from "./types.js";
2
+ import { TokenType, VarsConfig } from "./types.js";
3
3
  import { BaseModifierProp, ComponentsConfig, ConfigurableProp, MacroConfig, ModifierProp, MotionPreset, RemotionComponentDef, RemotionConfig, RemotionTransitionDef, StyleProp } from "@uds/types";
4
4
 
5
5
  //#region ../config/dist/createConfig.d.ts
@@ -48,11 +48,23 @@ interface ArbitraryTokenGroup {
48
48
  type AtomicTokenValue<M extends ModifierNameShape> = {
49
49
  name: string;
50
50
  value: string;
51
+ /**
52
+ * Resolved DTCG-aligned token type. Populated per-token only when the
53
+ * token overrides the group-level `type` (e.g. a `'string'`-typed
54
+ * `transparent` sitting inside a `'color'` namespace).
55
+ */
56
+ type?: TokenType;
51
57
  modifiers?: Partial<Record<M, string>>;
52
58
  };
53
59
  interface AtomicToken<M extends ModifierNameShape = ModifierNameShape> {
54
60
  properties: ConfigurableProp[];
55
61
  tokens: AtomicTokenValue<M>[];
62
+ /**
63
+ * Resolved DTCG-aligned token type for the whole group. Set from
64
+ * `$type` on `defineVars`, or inferred from `defineScopes` / value sniff
65
+ * during config resolution.
66
+ */
67
+ type?: TokenType;
56
68
  /**
57
69
  * Optional CSS variable prefix override
58
70
  *
@@ -83,7 +95,7 @@ type MergeTokens<A, B> = { [K in keyof A | keyof B]: K extends keyof B ? K exten
83
95
  * in addition to var-namespace access (e.g., `tokens.radius`).
84
96
  * Used by `defineScopes` to populate tokens without an explicit utility mapping.
85
97
  */
86
- type VarsToTokens<TVars extends VarsConfig> = { [K in keyof TVars]: { [T in keyof TVars[K]]: string } } & Record<string, Record<string, string>>;
98
+ type VarsToTokens<TVars extends VarsConfig> = { [K in keyof TVars]: { [T in Exclude<keyof TVars[K], '$type'>]: string } } & Record<string, Record<string, string>>;
87
99
  /** Empty tokens type for initial state */
88
100
  type EmptyTokens = {};
89
101
  /** Empty vars type for initial state */
@@ -4,8 +4,9 @@ import "../../utils/dist/index.js";
4
4
  import { getConfigurablePropMapping } from "../../core/dist/propMappings.js";
5
5
  import "../../core/dist/index.js";
6
6
  import { buildMotionReference, resolveComponentMotionAliases, validateComponentVariants } from "./component-resolution.js";
7
- import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
8
7
  import { expandPropertyGroups } from "./propertyGroups.js";
8
+ import { resolveTokenType, sniffTokenTypeFromValue } from "./resolveTokenTypes.js";
9
+ import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
9
10
  //#region ../config/dist/createConfig.js
10
11
  /** biome-ignore-all lint/suspicious/noExplicitAny: necessary for dynamic builder to work correctly */
11
12
  /** Build a structured token reference object from atomic tokens */
@@ -39,22 +40,41 @@ function buildMacroReference(macros) {
39
40
  }
40
41
  return result;
41
42
  }
42
- /** Convert a VarGroupDef into AtomicToken tokens, extracting modifier overrides. */
43
+ /**
44
+ * Convert a VarGroupDef into AtomicToken tokens, extracting modifier overrides.
45
+ *
46
+ * Also extracts `$type` metadata:
47
+ * - A top-level `$type` on the group → `groupType`
48
+ * - A `$type` on an individual token → `type` on that token (overrides group)
49
+ *
50
+ * `$type` is filtered out of the emitted tokens; it is metadata only.
51
+ */
43
52
  function varGroupToTokens(varGroup, knownModifiers) {
53
+ let groupType;
44
54
  const tokens = [];
45
- for (const [tokenName, tokenDef] of Object.entries(varGroup)) {
55
+ for (const [tokenName, rawDef] of Object.entries(varGroup)) {
56
+ if (tokenName === "$type") {
57
+ if (typeof rawDef === "string") groupType = rawDef;
58
+ continue;
59
+ }
60
+ if (rawDef == null || typeof rawDef !== "object") continue;
61
+ const tokenDef = rawDef;
46
62
  const modifiers = {};
47
63
  for (const [key, val] of Object.entries(tokenDef)) {
48
- if (key === "value" || val === void 0) continue;
64
+ if (key === "value" || key === "$type" || val === void 0) continue;
49
65
  if (key.startsWith("_") && knownModifiers.has(key)) modifiers[key] = val;
50
66
  }
51
67
  tokens.push({
52
68
  name: tokenName,
53
69
  value: tokenDef.value,
70
+ ...tokenDef.$type ? { type: tokenDef.$type } : {},
54
71
  ...Object.keys(modifiers).length > 0 ? { modifiers } : {}
55
72
  });
56
73
  }
57
- return tokens;
74
+ return {
75
+ tokens,
76
+ groupType
77
+ };
58
78
  }
59
79
  /**
60
80
  * Sort properties so the one matching the cssPrefix comes last.
@@ -82,13 +102,22 @@ function synthesizeAtomicFromScopesAndVars(vars, scopes, modes) {
82
102
  if (!varGroup) continue;
83
103
  const properties = expandPropertyGroups(groupIds);
84
104
  if (properties.length === 0) continue;
85
- const tokens = varGroupToTokens(varGroup, knownModifiers);
105
+ const { tokens, groupType } = varGroupToTokens(varGroup, knownModifiers);
86
106
  const cssPfx = (properties.includes(namespace) ? getConfigurablePropMapping(namespace) : void 0)?.defaultVarPrefix ?? kebabCase(namespace);
87
107
  const sorted = sortPropertiesByPrefixMatch(properties, namespace, cssPfx);
108
+ const resolvedGroupType = resolveTokenType({
109
+ explicit: groupType,
110
+ scopes: groupIds
111
+ });
112
+ if (resolvedGroupType && resolvedGroupType !== "string") for (const token of tokens) {
113
+ if (token.type) continue;
114
+ if (sniffTokenTypeFromValue(token.value) === "string") token.type = "string";
115
+ }
88
116
  result.push({
89
117
  properties: sorted,
90
118
  tokens,
91
- cssPrefix: cssPfx
119
+ cssPrefix: cssPfx,
120
+ ...resolvedGroupType ? { type: resolvedGroupType } : {}
92
121
  });
93
122
  }
94
123
  return disambiguateOverlappingProperties(result, scopes);
@@ -1,6 +1,6 @@
1
1
  import { defaultColors } from "./consts/defaultColors.js";
2
2
  import { PropertyGroupId } from "./propertyGroups.js";
3
- import { VarGroupDef, VarTokenDef, VarsConfig } from "./types.js";
3
+ import { TokenType, VarGroupDef, VarTokenDef, VarsConfig } from "./types.js";
4
4
  import { ArbitraryTokenGroup, AtomicToken, BuildOptions, ComponentConfig, DefineComponentInput, DefineComponentMotionInput, ExampleDef, ExampleEntryDef, ExampleLayoutStyles, GlobalStylesDef, InterpolateMarker, ModeGroup, ModifierDef, MotionPresetsDef, UdsConfig, UdsConfigData, buildTokenReference, createConfigBuilder, darker, lighter, resolveConfig } from "./createConfig.js";
5
5
  import { SerializedConfig, TokenRef, buildReverseMap, deserializeConfig, serializeConfig } from "./serialize.js";
6
6
  import { ComponentsConfig as ComponentsConfig$1 } from "@uds/types";
@@ -1,5 +1,6 @@
1
1
  import "./consts/defaultColors.js";
2
2
  import "./component-resolution.js";
3
3
  import "./propertyGroups.js";
4
+ import "./resolveTokenTypes.js";
4
5
  import "./createConfig.js";
5
6
  import "./serialize.js";
@@ -14,6 +14,7 @@ function flattenAtomic(atomic) {
14
14
  for (const group of atomic) for (const property of group.properties) for (const token of group.tokens) entries.push({
15
15
  property,
16
16
  cssPrefix: group.cssPrefix,
17
+ groupType: group.type,
17
18
  token
18
19
  });
19
20
  return entries;
@@ -39,11 +40,13 @@ function mergeAtomic(base, incoming, mode) {
39
40
  const existing = regrouped.get(groupKey);
40
41
  if (existing) {
41
42
  existing.tokens.push(entry.token);
43
+ if (entry.groupType) existing.type = entry.groupType;
42
44
  continue;
43
45
  }
44
46
  regrouped.set(groupKey, {
45
47
  properties: [entry.property],
46
48
  ...entry.cssPrefix ? { cssPrefix: entry.cssPrefix } : {},
49
+ ...entry.groupType ? { type: entry.groupType } : {},
47
50
  tokens: [entry.token]
48
51
  });
49
52
  }
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,149 @@
1
+ //#region ../config/dist/resolveTokenTypes.js
2
+ /**
3
+ * Default `TokenType` for each property group. Used to infer a var
4
+ * namespace's type when no explicit `$type` is declared — e.g. a namespace
5
+ * scoped to `['textColor', 'background']` is clearly a `color` namespace.
6
+ *
7
+ * Property groups that hold composite values (`shadow`, `textShadow`) or
8
+ * mixed-kind values (`transform` — mixes rotate/scale/translate/skew) are
9
+ * intentionally omitted; they fall through to `undefined` until the
10
+ * Composite Tokens RFC lands.
11
+ */
12
+ const propertyGroupDefaultType = {
13
+ textColor: "color",
14
+ background: "color",
15
+ borderColor: "color",
16
+ outlineColor: "color",
17
+ ringColor: "color",
18
+ divideColor: "color",
19
+ shadowColor: "color",
20
+ svgFill: "color",
21
+ svgStroke: "color",
22
+ caretColor: "color",
23
+ textDecorationColor: "color",
24
+ opacity: "number",
25
+ colorOpacity: "number",
26
+ bgOpacity: "number",
27
+ borderColorOpacity: "number",
28
+ divideColorOpacity: "number",
29
+ outlineColorOpacity: "number",
30
+ ringColorOpacity: "number",
31
+ textDecorationColorOpacity: "number",
32
+ svgFillOpacity: "number",
33
+ svgStrokeOpacity: "number",
34
+ shadowColorOpacity: "number",
35
+ caretColorOpacity: "number",
36
+ fontFamily: "fontFamily",
37
+ fontSize: "dimension",
38
+ fontWeight: "fontWeight",
39
+ lineHeight: "number",
40
+ letterSpacing: "dimension",
41
+ blur: "dimension",
42
+ backdropBlur: "dimension",
43
+ animation: "duration",
44
+ zIndex: "number",
45
+ borderWidth: "dimension",
46
+ borderRadius: "dimension",
47
+ outlineWidth: "dimension",
48
+ divideWidth: "dimension",
49
+ ringWidth: "dimension",
50
+ padding: "dimension",
51
+ margin: "dimension",
52
+ offset: "dimension",
53
+ gap: "dimension",
54
+ indent: "dimension",
55
+ scrollSnapGap: "dimension",
56
+ scrollSnapSpacing: "dimension",
57
+ tableBorderSpacing: "dimension",
58
+ width: "dimension",
59
+ height: "dimension",
60
+ aspectRatio: "number",
61
+ positionPlacement: "dimension",
62
+ flex: "number",
63
+ strokeWidth: "dimension"
64
+ };
65
+ /**
66
+ * Resolve a token's `TokenType` in priority order:
67
+ *
68
+ * 1. Explicit `$type` (from the token or its group)
69
+ * 2. Derived from `defineScopes` — when all scopes agree on a default type
70
+ * 3. Value sniff (last resort) — regex-matches obvious value shapes
71
+ *
72
+ * Returns `undefined` when none of the strategies produce a confident answer.
73
+ * Consumers (Studio, tooling) should treat `undefined` as "render a plain
74
+ * string input" — never guess wrong.
75
+ */
76
+ function resolveTokenType(input) {
77
+ if (input.explicit) return input.explicit;
78
+ if (input.scopes && input.scopes.length > 0) {
79
+ const types = /* @__PURE__ */ new Set();
80
+ for (const scope of input.scopes) {
81
+ const t = propertyGroupDefaultType[scope];
82
+ if (t) types.add(t);
83
+ }
84
+ if (types.size === 1) {
85
+ const [only] = types;
86
+ return only;
87
+ }
88
+ }
89
+ if (typeof input.value === "string") {
90
+ const sniffed = sniffTokenTypeFromValue(input.value);
91
+ if (sniffed) return sniffed;
92
+ }
93
+ }
94
+ /**
95
+ * Heuristic last-resort classifier for a raw CSS value. Returns `undefined`
96
+ * when no confident match is possible (e.g. `var(...)` references).
97
+ *
98
+ * Exported for testing; prefer `resolveTokenType` in most call sites.
99
+ */
100
+ function sniffTokenTypeFromValue(value) {
101
+ const v = value.trim();
102
+ if (v.length === 0) return void 0;
103
+ if (CSS_WIDE_KEYWORDS.has(v)) return "string";
104
+ if (v.startsWith("var(")) return void 0;
105
+ if (COLOR_FUNCTION_RE.test(v)) return "color";
106
+ if (HEX_COLOR_RE.test(v)) return "color";
107
+ if (NAMED_COLOR_KEYWORDS.has(v.toLowerCase())) return "color";
108
+ if (DURATION_RE.test(v)) return "duration";
109
+ if (DIMENSION_RE.test(v)) return "dimension";
110
+ if (PURE_NUMBER_RE.test(v)) return "number";
111
+ }
112
+ const CSS_WIDE_KEYWORDS = new Set([
113
+ "inherit",
114
+ "initial",
115
+ "unset",
116
+ "revert",
117
+ "revert-layer",
118
+ "auto",
119
+ "none",
120
+ "currentColor",
121
+ "currentcolor",
122
+ "transparent"
123
+ ]);
124
+ const HEX_COLOR_RE = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
125
+ const COLOR_FUNCTION_RE = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\s*\(/i;
126
+ const NUMBER_RE_SRC = "(?:\\d+(?:\\.\\d+)?|\\.\\d+)";
127
+ const DIMENSION_RE = new RegExp(`^-?${NUMBER_RE_SRC}(?:px|rem|em|%|vh|vw|vmin|vmax|vi|vb|svh|svw|lvh|lvw|dvh|dvw|ch|ex|cap|ic|lh|rlh|pt|pc|in|cm|mm|q|fr|deg|turn|rad|grad)$`, "i");
128
+ const DURATION_RE = new RegExp(`^-?${NUMBER_RE_SRC}(?:ms|s)$`, "i");
129
+ const PURE_NUMBER_RE = new RegExp(`^-?${NUMBER_RE_SRC}$`);
130
+ const NAMED_COLOR_KEYWORDS = new Set([
131
+ "black",
132
+ "white",
133
+ "red",
134
+ "green",
135
+ "blue",
136
+ "yellow",
137
+ "orange",
138
+ "purple",
139
+ "pink",
140
+ "gray",
141
+ "grey",
142
+ "brown",
143
+ "cyan",
144
+ "magenta",
145
+ "silver",
146
+ "gold"
147
+ ]);
148
+ //#endregion
149
+ export { propertyGroupDefaultType, resolveTokenType, sniffTokenTypeFromValue };
@@ -1,5 +1,16 @@
1
1
  //#region ../config/dist/types.d.ts
2
2
  //#region src/types.d.ts
3
+ /**
4
+ * Scalar DTCG-aligned token types. Composite types (shadow, gradient,
5
+ * typography, border, transition, cubicBezier) are intentionally deferred
6
+ * to a future RFC — they require structured (non-string) value shapes.
7
+ *
8
+ * `string` is the catch-all for raw CSS values (keywords like `inherit`,
9
+ * `currentColor`, `transparent`, and anything else that does not fit a
10
+ * more specific type). It is also the graceful fallback when no type
11
+ * can be determined.
12
+ */
13
+ type TokenType = 'color' | 'dimension' | 'number' | 'fontFamily' | 'fontWeight' | 'duration' | 'strokeStyle' | 'string';
3
14
  /**
4
15
  * A single design token definition with a base value and optional modifier overrides.
5
16
  * Modifier keys use the `_` prefix convention (e.g., `_dark`, `_hover`).
@@ -7,28 +18,44 @@
7
18
  * When `M` is narrowed (e.g., `'_dark' | '_light'`), only those modifier keys are
8
19
  * accepted — TypeScript will flag unknown modifiers like `_eggs` at compile time.
9
20
  *
21
+ * The optional `$type` annotation lets individual tokens override the group-level
22
+ * type (e.g. a `keyword`-valued token inside a `color` namespace).
23
+ *
10
24
  * @example
11
25
  * { value: '#1167f4', _dark: '#88bcfb' }
26
+ * { value: 'transparent', $type: 'string' }
12
27
  */
13
28
  type VarTokenDef<M extends `_${string}` = `_${string}`> = {
14
29
  value: string;
30
+ $type?: TokenType;
15
31
  } & { [K in M]?: string };
16
32
  /**
17
33
  * A group of named tokens within a var namespace.
18
34
  *
35
+ * The group may declare a `$type` that applies to all tokens in the group;
36
+ * individual tokens may override it with their own `$type`.
37
+ *
19
38
  * @example
20
- * { brand: { value: '#1167f4', _dark: '#88bcfb' }, accent: { value: '#7c3aed' } }
39
+ * {
40
+ * $type: 'color',
41
+ * brand: { value: '#1167f4', _dark: '#88bcfb' },
42
+ * accent: { value: '#7c3aed' },
43
+ * }
21
44
  */
22
- type VarGroupDef<M extends `_${string}` = `_${string}`> = Record<string, VarTokenDef<M>>;
45
+ type VarGroupDef<M extends `_${string}` = `_${string}`> = {
46
+ $type?: TokenType;
47
+ } & {
48
+ [tokenName: string]: VarTokenDef<M> | TokenType | undefined;
49
+ };
23
50
  /**
24
51
  * Top-level vars config — namespaces to groups of tokens.
25
52
  *
26
53
  * @example
27
54
  * {
28
- * color: { brand: { value: '#1167f4', _dark: '#88bcfb' } },
29
- * spacing: { 1: { value: '0.25rem' }, 2: { value: '0.5rem' } },
55
+ * color: { $type: 'color', brand: { value: '#1167f4', _dark: '#88bcfb' } },
56
+ * spacing: { $type: 'dimension', 1: { value: '0.25rem' }, 2: { value: '0.5rem' } },
30
57
  * }
31
58
  */
32
59
  type VarsConfig<M extends `_${string}` = `_${string}`> = Record<string, VarGroupDef<M>>; //#endregion
33
60
  //#endregion
34
- export { VarGroupDef, VarTokenDef, VarsConfig };
61
+ export { TokenType, VarGroupDef, VarTokenDef, VarsConfig };
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defaultColors } from "./config/dist/consts/defaultColors.js";
2
- import { VarGroupDef, VarTokenDef, VarsConfig } from "./config/dist/types.js";
2
+ import { TokenType, VarGroupDef, VarTokenDef, VarsConfig } from "./config/dist/types.js";
3
3
  import { 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";
@@ -11,6 +11,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
11
11
  [x: string]: Record<string, string>;
12
12
  }, {}, {}, {}, "_light" | "_dark" | "_sm" | "_md" | "_lg" | "_xl" | "_2xl", {
13
13
  readonly color: {
14
+ readonly $type: "color";
14
15
  readonly inherit: {
15
16
  readonly value: "inherit";
16
17
  };
@@ -100,6 +101,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
100
101
  };
101
102
  };
102
103
  readonly bg: {
104
+ readonly $type: "color";
103
105
  readonly brand: {
104
106
  readonly value: "#1e6ff5";
105
107
  readonly _dark: "#71affb";
@@ -178,6 +180,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
178
180
  };
179
181
  };
180
182
  readonly borderColor: {
183
+ readonly $type: "color";
181
184
  readonly brand: {
182
185
  readonly value: "#1e6ff5";
183
186
  readonly _dark: "#71affb";
@@ -240,6 +243,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
240
243
  };
241
244
  };
242
245
  readonly borderWidth: {
246
+ readonly $type: "dimension";
243
247
  readonly none: {
244
248
  readonly value: "0px";
245
249
  };
@@ -254,6 +258,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
254
258
  };
255
259
  };
256
260
  readonly outlineWidth: {
261
+ readonly $type: "dimension";
257
262
  readonly 0: {
258
263
  readonly value: "0px";
259
264
  };
@@ -271,6 +276,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
271
276
  };
272
277
  };
273
278
  readonly outlineOffset: {
279
+ readonly $type: "dimension";
274
280
  readonly 0: {
275
281
  readonly value: "0px";
276
282
  };
@@ -288,6 +294,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
288
294
  };
289
295
  };
290
296
  readonly divideWidth: {
297
+ readonly $type: "dimension";
291
298
  readonly 0: {
292
299
  readonly value: "0px";
293
300
  };
@@ -302,9 +309,11 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
302
309
  };
303
310
  readonly reverse: {
304
311
  readonly value: "reverse";
312
+ readonly $type: "string";
305
313
  };
306
314
  };
307
315
  readonly ringWidth: {
316
+ readonly $type: "dimension";
308
317
  readonly 0: {
309
318
  readonly value: "0px";
310
319
  };
@@ -322,9 +331,11 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
322
331
  };
323
332
  readonly inset: {
324
333
  readonly value: "inset";
334
+ readonly $type: "string";
325
335
  };
326
336
  };
327
337
  readonly ringOffsetWidth: {
338
+ readonly $type: "dimension";
328
339
  readonly 0: {
329
340
  readonly value: "0px";
330
341
  };
@@ -342,6 +353,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
342
353
  };
343
354
  };
344
355
  readonly fontWeight: {
356
+ readonly $type: "fontWeight";
345
357
  readonly thin: {
346
358
  readonly value: "100";
347
359
  };
@@ -371,6 +383,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
371
383
  };
372
384
  };
373
385
  readonly lineHeight: {
386
+ readonly $type: "number";
374
387
  readonly none: {
375
388
  readonly value: "1";
376
389
  };
@@ -385,6 +398,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
385
398
  };
386
399
  };
387
400
  readonly letterSpacing: {
401
+ readonly $type: "dimension";
388
402
  readonly tighter: {
389
403
  readonly value: "-0.05em";
390
404
  };
@@ -405,6 +419,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
405
419
  };
406
420
  };
407
421
  readonly spacing: {
422
+ readonly $type: "dimension";
408
423
  readonly px: {
409
424
  readonly value: "1px";
410
425
  };
@@ -512,8 +527,10 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
512
527
  };
513
528
  };
514
529
  readonly position: {
530
+ readonly $type: "dimension";
515
531
  readonly auto: {
516
532
  readonly value: "auto";
533
+ readonly $type: "string";
517
534
  };
518
535
  readonly full: {
519
536
  readonly value: "100%";
@@ -538,6 +555,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
538
555
  };
539
556
  };
540
557
  readonly aspectRatio: {
558
+ readonly $type: "string";
541
559
  readonly square: {
542
560
  readonly value: "1 / 1";
543
561
  };
@@ -558,6 +576,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
558
576
  };
559
577
  };
560
578
  readonly flex: {
579
+ readonly $type: "string";
561
580
  readonly 1: {
562
581
  readonly value: "1 1 0%";
563
582
  };
@@ -572,6 +591,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
572
591
  };
573
592
  };
574
593
  readonly flexGrow: {
594
+ readonly $type: "number";
575
595
  readonly 0: {
576
596
  readonly value: "0";
577
597
  };
@@ -580,11 +600,13 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
580
600
  };
581
601
  };
582
602
  readonly flexShrink: {
603
+ readonly $type: "number";
583
604
  readonly 0: {
584
605
  readonly value: "0";
585
606
  };
586
607
  };
587
608
  readonly opacity: {
609
+ readonly $type: "number";
588
610
  readonly 0: {
589
611
  readonly value: "0";
590
612
  };
@@ -632,6 +654,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
632
654
  };
633
655
  };
634
656
  readonly radius: {
657
+ readonly $type: "dimension";
635
658
  readonly none: {
636
659
  readonly value: "0px";
637
660
  };
@@ -655,6 +678,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
655
678
  };
656
679
  };
657
680
  readonly animation: {
681
+ readonly $type: "string";
658
682
  readonly none: {
659
683
  readonly value: "none";
660
684
  };
@@ -666,6 +690,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
666
690
  };
667
691
  };
668
692
  readonly shadow: {
693
+ readonly $type: "string";
669
694
  readonly "2xs": {
670
695
  readonly value: "0 1px rgb(0 0 0 / 0.05)";
671
696
  };
@@ -695,6 +720,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
695
720
  };
696
721
  };
697
722
  readonly blur: {
723
+ readonly $type: "string";
698
724
  readonly none: {
699
725
  readonly value: "blur(0)";
700
726
  };
@@ -718,6 +744,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
718
744
  };
719
745
  };
720
746
  readonly textShadow: {
747
+ readonly $type: "string";
721
748
  readonly "2xs": {
722
749
  readonly value: "0 1px 0 rgb(0 0 0 / 0.15)";
723
750
  };
@@ -738,8 +765,10 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
738
765
  };
739
766
  };
740
767
  readonly zIndex: {
768
+ readonly $type: "number";
741
769
  readonly auto: {
742
770
  readonly value: "auto";
771
+ readonly $type: "string";
743
772
  };
744
773
  readonly 0: {
745
774
  readonly value: "0";
@@ -761,20 +790,25 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
761
790
  };
762
791
  };
763
792
  readonly size: {
793
+ readonly $type: "dimension";
764
794
  readonly auto: {
765
795
  readonly value: "auto";
796
+ readonly $type: "string";
766
797
  };
767
798
  readonly full: {
768
799
  readonly value: "100%";
769
800
  };
770
801
  readonly min: {
771
802
  readonly value: "min-content";
803
+ readonly $type: "string";
772
804
  };
773
805
  readonly max: {
774
806
  readonly value: "max-content";
807
+ readonly $type: "string";
775
808
  };
776
809
  readonly fit: {
777
810
  readonly value: "fit-content";
811
+ readonly $type: "string";
778
812
  };
779
813
  readonly "1/2": {
780
814
  readonly value: "50%";
@@ -823,6 +857,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
823
857
  };
824
858
  };
825
859
  readonly w: {
860
+ readonly $type: "dimension";
826
861
  readonly screen: {
827
862
  readonly value: "100vw";
828
863
  };
@@ -837,6 +872,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
837
872
  };
838
873
  };
839
874
  readonly h: {
875
+ readonly $type: "dimension";
840
876
  readonly screen: {
841
877
  readonly value: "100vh";
842
878
  };
@@ -851,6 +887,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
851
887
  };
852
888
  };
853
889
  readonly rotate: {
890
+ readonly $type: "dimension";
854
891
  readonly 0: {
855
892
  readonly value: "0deg";
856
893
  };
@@ -880,6 +917,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
880
917
  };
881
918
  };
882
919
  readonly scale: {
920
+ readonly $type: "number";
883
921
  readonly 0: {
884
922
  readonly value: "0";
885
923
  };
@@ -915,6 +953,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
915
953
  };
916
954
  };
917
955
  readonly skew: {
956
+ readonly $type: "dimension";
918
957
  readonly 0: {
919
958
  readonly value: "0deg";
920
959
  };
@@ -935,6 +974,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
935
974
  };
936
975
  };
937
976
  readonly translate: {
977
+ readonly $type: "dimension";
938
978
  readonly 0: {
939
979
  readonly value: "0px";
940
980
  };
@@ -1057,6 +1097,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
1057
1097
  };
1058
1098
  };
1059
1099
  readonly strokeWidth: {
1100
+ readonly $type: "dimension";
1060
1101
  readonly 0: {
1061
1102
  readonly value: "0px";
1062
1103
  };
@@ -1068,6 +1109,7 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
1068
1109
  };
1069
1110
  };
1070
1111
  readonly fontFamily: {
1112
+ readonly $type: "fontFamily";
1071
1113
  readonly sans: {
1072
1114
  readonly value: "var(--uds-font-family-geist, ui-sans-serif, system-ui, sans-serif)";
1073
1115
  };
@@ -1080,4 +1122,4 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | "_light" | "
1080
1122
  };
1081
1123
  }>;
1082
1124
  //#endregion
1083
- export { type ComponentsConfig, type GlobalStylesDef, type SerializedConfig, type TokenRef, type UdsConfig, type UdsConfigData, type VarGroupDef, type VarTokenDef, type VarsConfig, buildReverseMap, buildTokenReference, createConfigBuilder, darker, defaultColors, defaultPreset, deserializeConfig, lighter, resolveConfig, serializeConfig, uds };
1125
+ export { type ComponentsConfig, type GlobalStylesDef, type SerializedConfig, type TokenRef, type TokenType, type UdsConfig, type UdsConfigData, type VarGroupDef, type VarTokenDef, type VarsConfig, buildReverseMap, buildTokenReference, createConfigBuilder, darker, defaultColors, defaultPreset, deserializeConfig, lighter, resolveConfig, serializeConfig, uds };