@tenphi/tasty 0.0.0-snapshot.26b4630 → 0.0.0-snapshot.2705ab9

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 (218) hide show
  1. package/README.md +315 -159
  2. package/dist/chunks/cacheKey.js +16 -8
  3. package/dist/chunks/cacheKey.js.map +1 -1
  4. package/dist/chunks/definitions.d.ts +1 -1
  5. package/dist/chunks/definitions.js +2 -3
  6. package/dist/chunks/definitions.js.map +1 -1
  7. package/dist/chunks/renderChunk.js +31 -32
  8. package/dist/chunks/renderChunk.js.map +1 -1
  9. package/dist/config.d.ts +98 -12
  10. package/dist/config.js +134 -33
  11. package/dist/config.js.map +1 -1
  12. package/dist/core/index.d.ts +11 -10
  13. package/dist/core/index.js +8 -7
  14. package/dist/counter-style/index.js +51 -0
  15. package/dist/counter-style/index.js.map +1 -0
  16. package/dist/debug.d.ts +26 -141
  17. package/dist/debug.js +356 -635
  18. package/dist/debug.js.map +1 -1
  19. package/dist/font-face/index.js +63 -0
  20. package/dist/font-face/index.js.map +1 -0
  21. package/dist/hooks/resolve-ssr-collector.js +15 -0
  22. package/dist/hooks/resolve-ssr-collector.js.map +1 -0
  23. package/dist/hooks/useCounterStyle.d.ts +50 -0
  24. package/dist/hooks/useCounterStyle.js +47 -0
  25. package/dist/hooks/useCounterStyle.js.map +1 -0
  26. package/dist/hooks/useFontFace.d.ts +43 -0
  27. package/dist/hooks/useFontFace.js +71 -0
  28. package/dist/hooks/useFontFace.js.map +1 -0
  29. package/dist/hooks/useGlobalStyles.d.ts +3 -0
  30. package/dist/hooks/useGlobalStyles.js +24 -1
  31. package/dist/hooks/useGlobalStyles.js.map +1 -1
  32. package/dist/hooks/useKeyframes.js +14 -3
  33. package/dist/hooks/useKeyframes.js.map +1 -1
  34. package/dist/hooks/useProperty.js +32 -13
  35. package/dist/hooks/useProperty.js.map +1 -1
  36. package/dist/hooks/useRawCSS.js +9 -1
  37. package/dist/hooks/useRawCSS.js.map +1 -1
  38. package/dist/hooks/useStyles.d.ts +5 -0
  39. package/dist/hooks/useStyles.js +115 -46
  40. package/dist/hooks/useStyles.js.map +1 -1
  41. package/dist/index.d.ts +22 -11
  42. package/dist/index.js +10 -7
  43. package/dist/injector/index.d.ts +28 -2
  44. package/dist/injector/index.js +27 -1
  45. package/dist/injector/index.js.map +1 -1
  46. package/dist/injector/injector.d.ts +28 -1
  47. package/dist/injector/injector.js +93 -32
  48. package/dist/injector/injector.js.map +1 -1
  49. package/dist/injector/sheet-manager.d.ts +16 -7
  50. package/dist/injector/sheet-manager.js +31 -11
  51. package/dist/injector/sheet-manager.js.map +1 -1
  52. package/dist/injector/types.d.ts +70 -1
  53. package/dist/parser/classify.js +5 -4
  54. package/dist/parser/classify.js.map +1 -1
  55. package/dist/parser/const.js +17 -1
  56. package/dist/parser/const.js.map +1 -1
  57. package/dist/parser/parser.js +1 -1
  58. package/dist/pipeline/conditions.js +14 -8
  59. package/dist/pipeline/conditions.js.map +1 -1
  60. package/dist/pipeline/index.d.ts +3 -1
  61. package/dist/pipeline/index.js +137 -69
  62. package/dist/pipeline/index.js.map +1 -1
  63. package/dist/pipeline/materialize.js +404 -208
  64. package/dist/pipeline/materialize.js.map +1 -1
  65. package/dist/pipeline/parseStateKey.d.ts +1 -1
  66. package/dist/pipeline/parseStateKey.js +37 -20
  67. package/dist/pipeline/parseStateKey.js.map +1 -1
  68. package/dist/pipeline/simplify.js +111 -152
  69. package/dist/pipeline/simplify.js.map +1 -1
  70. package/dist/pipeline/warnings.js +18 -0
  71. package/dist/pipeline/warnings.js.map +1 -0
  72. package/dist/plugins/okhsl-plugin.js +2 -275
  73. package/dist/plugins/okhsl-plugin.js.map +1 -1
  74. package/dist/plugins/types.d.ts +9 -2
  75. package/dist/properties/index.js +82 -17
  76. package/dist/properties/index.js.map +1 -1
  77. package/dist/properties/property-type-resolver.d.ts +24 -0
  78. package/dist/properties/property-type-resolver.js +91 -0
  79. package/dist/properties/property-type-resolver.js.map +1 -0
  80. package/dist/ssr/astro.d.ts +29 -0
  81. package/dist/ssr/astro.js +65 -0
  82. package/dist/ssr/astro.js.map +1 -0
  83. package/dist/ssr/async-storage.d.ts +17 -0
  84. package/dist/ssr/async-storage.js +35 -0
  85. package/dist/ssr/async-storage.js.map +1 -0
  86. package/dist/ssr/collect-auto-properties.js +40 -0
  87. package/dist/ssr/collect-auto-properties.js.map +1 -0
  88. package/dist/ssr/collector.d.ts +102 -0
  89. package/dist/ssr/collector.js +227 -0
  90. package/dist/ssr/collector.js.map +1 -0
  91. package/dist/ssr/context.d.ts +8 -0
  92. package/dist/ssr/context.js +14 -0
  93. package/dist/ssr/context.js.map +1 -0
  94. package/dist/ssr/format-global-rules.js +22 -0
  95. package/dist/ssr/format-global-rules.js.map +1 -0
  96. package/dist/ssr/format-keyframes.js +70 -0
  97. package/dist/ssr/format-keyframes.js.map +1 -0
  98. package/dist/ssr/format-property.js +50 -0
  99. package/dist/ssr/format-property.js.map +1 -0
  100. package/dist/ssr/format-rules.js +73 -0
  101. package/dist/ssr/format-rules.js.map +1 -0
  102. package/dist/ssr/hydrate.d.ts +22 -0
  103. package/dist/ssr/hydrate.js +50 -0
  104. package/dist/ssr/hydrate.js.map +1 -0
  105. package/dist/ssr/index.d.ts +5 -0
  106. package/dist/ssr/index.js +12 -0
  107. package/dist/ssr/index.js.map +1 -0
  108. package/dist/ssr/next.d.ts +45 -0
  109. package/dist/ssr/next.js +71 -0
  110. package/dist/ssr/next.js.map +1 -0
  111. package/dist/ssr/ssr-collector-ref.js +12 -0
  112. package/dist/ssr/ssr-collector-ref.js.map +1 -0
  113. package/dist/states/index.js +12 -257
  114. package/dist/states/index.js.map +1 -1
  115. package/dist/styles/align.d.ts +1 -1
  116. package/dist/styles/align.js.map +1 -1
  117. package/dist/styles/border.d.ts +1 -1
  118. package/dist/styles/border.js +2 -2
  119. package/dist/styles/border.js.map +1 -1
  120. package/dist/styles/color.d.ts +2 -2
  121. package/dist/styles/color.js +9 -5
  122. package/dist/styles/color.js.map +1 -1
  123. package/dist/styles/createStyle.js +25 -22
  124. package/dist/styles/createStyle.js.map +1 -1
  125. package/dist/styles/fade.d.ts +1 -1
  126. package/dist/styles/fade.js.map +1 -1
  127. package/dist/styles/fill.d.ts +14 -16
  128. package/dist/styles/fill.js +6 -5
  129. package/dist/styles/fill.js.map +1 -1
  130. package/dist/styles/flow.d.ts +3 -3
  131. package/dist/styles/flow.js.map +1 -1
  132. package/dist/styles/index.js +1 -1
  133. package/dist/styles/justify.d.ts +1 -1
  134. package/dist/styles/justify.js.map +1 -1
  135. package/dist/styles/predefined.d.ts +0 -2
  136. package/dist/styles/predefined.js +1 -4
  137. package/dist/styles/predefined.js.map +1 -1
  138. package/dist/styles/preset.d.ts +5 -0
  139. package/dist/styles/preset.js +48 -47
  140. package/dist/styles/preset.js.map +1 -1
  141. package/dist/styles/radius.d.ts +1 -1
  142. package/dist/styles/radius.js.map +1 -1
  143. package/dist/styles/scrollbar.d.ts +9 -5
  144. package/dist/styles/scrollbar.js +25 -82
  145. package/dist/styles/scrollbar.js.map +1 -1
  146. package/dist/styles/shadow.d.ts +2 -2
  147. package/dist/styles/shadow.js.map +1 -1
  148. package/dist/styles/transition.d.ts +1 -1
  149. package/dist/styles/transition.js +1 -1
  150. package/dist/styles/transition.js.map +1 -1
  151. package/dist/styles/types.d.ts +70 -21
  152. package/dist/tasty.d.ts +30 -893
  153. package/dist/tasty.js +60 -19
  154. package/dist/tasty.js.map +1 -1
  155. package/dist/types.d.ts +3 -3
  156. package/dist/utils/cache-wrapper.js +4 -8
  157. package/dist/utils/cache-wrapper.js.map +1 -1
  158. package/dist/utils/color-math.d.ts +46 -0
  159. package/dist/utils/color-math.js +749 -0
  160. package/dist/utils/color-math.js.map +1 -0
  161. package/dist/utils/color-space.d.ts +5 -0
  162. package/dist/utils/color-space.js +229 -0
  163. package/dist/utils/color-space.js.map +1 -0
  164. package/dist/utils/colors.d.ts +1 -1
  165. package/dist/utils/colors.js +3 -1
  166. package/dist/utils/colors.js.map +1 -1
  167. package/dist/utils/css-types.d.ts +1 -1
  168. package/dist/utils/dotize.d.ts +1 -1
  169. package/dist/utils/has-keys.js +13 -0
  170. package/dist/utils/has-keys.js.map +1 -0
  171. package/dist/utils/mod-attrs.js +2 -2
  172. package/dist/utils/mod-attrs.js.map +1 -1
  173. package/dist/utils/process-tokens.d.ts +3 -13
  174. package/dist/utils/process-tokens.js +18 -98
  175. package/dist/utils/process-tokens.js.map +1 -1
  176. package/dist/utils/selector-transform.js +32 -0
  177. package/dist/utils/selector-transform.js.map +1 -0
  178. package/dist/utils/string.js.map +1 -1
  179. package/dist/utils/styles.d.ts +4 -88
  180. package/dist/utils/styles.js +34 -398
  181. package/dist/utils/styles.js.map +1 -1
  182. package/dist/utils/typography.d.ts +24 -13
  183. package/dist/utils/typography.js +14 -16
  184. package/dist/utils/typography.js.map +1 -1
  185. package/dist/zero/babel.d.ts +67 -8
  186. package/dist/zero/babel.js +109 -17
  187. package/dist/zero/babel.js.map +1 -1
  188. package/dist/zero/extractor.js +118 -1
  189. package/dist/zero/extractor.js.map +1 -1
  190. package/dist/zero/next.d.ts +44 -30
  191. package/dist/zero/next.js +102 -38
  192. package/dist/zero/next.js.map +1 -1
  193. package/docs/PIPELINE.md +519 -0
  194. package/docs/README.md +31 -0
  195. package/docs/adoption.md +296 -0
  196. package/docs/comparison.md +420 -0
  197. package/docs/configuration.md +326 -0
  198. package/docs/debug.md +318 -0
  199. package/docs/design-system.md +424 -0
  200. package/docs/dsl.md +673 -0
  201. package/docs/getting-started.md +217 -0
  202. package/docs/injector.md +528 -0
  203. package/docs/methodology.md +567 -0
  204. package/docs/runtime.md +485 -0
  205. package/docs/ssr.md +384 -0
  206. package/docs/styles.md +579 -0
  207. package/docs/tasty-static.md +433 -0
  208. package/package.json +98 -28
  209. package/dist/styles/styledScrollbar.d.ts +0 -47
  210. package/dist/styles/styledScrollbar.js +0 -38
  211. package/dist/styles/styledScrollbar.js.map +0 -1
  212. package/dist/tokens/typography.d.ts +0 -19
  213. package/dist/tokens/typography.js +0 -237
  214. package/dist/tokens/typography.js.map +0 -1
  215. package/dist/utils/hsl-to-rgb.js +0 -38
  216. package/dist/utils/hsl-to-rgb.js.map +0 -1
  217. package/dist/utils/okhsl-to-rgb.js +0 -296
  218. package/dist/utils/okhsl-to-rgb.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { KeyframesSteps, PropertyDefinition } from "../injector/types.js";
1
+ import { CounterStyleDescriptors, FontFaceInput, KeyframesSteps, PropertyDefinition } from "../injector/types.js";
2
2
  import { CSSProperties } from "../utils/css-types.js";
3
3
  import { StyleValue, StyleValueStateMap } from "../utils/styles.js";
4
4
 
@@ -40,6 +40,7 @@ type PresetNameKey = Extract<keyof TastyPresetNames, string>;
40
40
  type PresetName = [PresetNameKey] extends [never] ? string : PresetNameKey;
41
41
  type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
42
42
  type OpaquePercentage = '' | `.${Digit}` | `.${Digit}${Digit}` | '.100';
43
+ type ColorValue = `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `hsl(${string})` | `okhsl(${string})` | `oklch(${string})` | (string & {});
43
44
  type NoType = false | null | undefined;
44
45
  interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font' | 'outline' | 'type' | 'gap' | 'padding' | 'margin' | 'width' | 'height' | 'border' | 'transition' | 'placeContent' | 'placeItems'> {
45
46
  /**
@@ -57,13 +58,20 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
57
58
  /**
58
59
  * Set the background color of the element. Shortcut for `background-color` with enhanced support for Tasty color tokens and syntaxes.
59
60
  *
61
+ * Supports double-color syntax: the second color is applied as a foreground overlay via a CSS custom property.
62
+ *
60
63
  * Examples:
61
64
  * - `fill="#purple.10"` // purple background with 10% opacity
62
65
  * - `fill="#danger"` // danger theme color
63
66
  * - `fill="rgb(255 128 0)"` // custom RGB color
67
+ * - `fill="rgb(255 128 0 / 0.5)"` // RGB with opacity
68
+ * - `fill="hsl(200 100% 50%)"` // HSL color
69
+ * - `fill="okhsl(200 100% 50%)"` // perceptually uniform OKHSL color
70
+ * - `fill="oklch(0.7 0.15 200)"` // OKLCH color
71
+ * - `fill="#primary #secondary"` // double color (second as foreground overlay)
64
72
  * - `fill={true}` // default fill color
65
73
  */
66
- fill?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | boolean | (string & {});
74
+ fill?: ColorValue | boolean;
67
75
  /**
68
76
  * @deprecated Use `fill` instead.
69
77
  */
@@ -92,19 +100,26 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
92
100
  * - `svgFill="#purple.10"` // purple fill with 10% opacity
93
101
  * - `svgFill="#danger"` // danger theme color
94
102
  * - `svgFill="rgb(255 128 0)"` // custom RGB color
103
+ * - `svgFill="hsl(200 100% 50%)"` // HSL color
104
+ * - `svgFill="okhsl(200 100% 50%)"` // OKHSL color
105
+ * - `svgFill="oklch(0.7 0.15 200)"` // OKLCH color
95
106
  * - `svgFill="currentColor"` // inherit from parent color
96
107
  */
97
- svgFill?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | (string & {});
108
+ svgFill?: ColorValue;
98
109
  /**
99
110
  * Set the text (current) color of the element. Shortcut for `color` with enhanced support for Tasty color tokens and syntaxes.
100
111
  *
101
112
  * Examples:
102
113
  * - `color="#purple"` // purple text color
103
114
  * - `color="#danger.6"` // danger color with 60% opacity
115
+ * - `color="rgb(255 128 0)"` // custom RGB color
116
+ * - `color="hsl(200 100% 50%)"` // HSL color
117
+ * - `color="okhsl(200 100% 50%)"` // OKHSL color
118
+ * - `color="oklch(0.7 0.15 200)"` // OKLCH color
104
119
  * - `color="red"` // CSS color name
105
120
  * - `color={true}` // currentColor
106
121
  */
107
- color?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | boolean | string;
122
+ color?: ColorValue | boolean;
108
123
  /**
109
124
  * The fade style applies gradient-based fading masks to the edges of an element. Replaces complex CSS mask gradients with a simple, declarative API.
110
125
  *
@@ -128,25 +143,22 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
128
143
  */
129
144
  fade?: 'top' | 'right' | 'bottom' | 'left' | string;
130
145
  /**
131
- * @deprecated Use `scrollbar` style instead.
132
- * Whether the element has styled scrollbar.
133
- */
134
- styledScrollbar?: boolean;
135
- /**
136
- * The scrollbar style provides a powerful and flexible way to control the appearance and behavior of scrollbars across browsers. It supports custom sizing, color, visibility, and advanced modifiers for modern UI needs.
146
+ * Scrollbar styling using standard CSS properties (`scrollbar-width`, `scrollbar-color`, `scrollbar-gutter`).
137
147
  *
138
- * Syntax: `[modifiers] [size] [color1] [color2] [color3]`
148
+ * Syntax: `[width] [modifiers...] [thumb-color] [track-color]`
139
149
  *
140
- * Modifiers: `thin`, `none`, `auto`, `stable`, `both-edges`, `always`, `styled`
150
+ * Width values: `thin` (default), `auto`, `none`
151
+ * Modifiers: `stable`, `both-edges`, `always`
141
152
  *
142
153
  * Examples:
143
- * - `scrollbar={true}` // thin scrollbar, default color
144
- * - `scrollbar="thin 10px #purple.40 #dark.04"`
145
- * - `scrollbar="styled 12px #purple.40 #dark.04 #white.10"`
154
+ * - `scrollbar={true}` // thin scrollbar, default colors
155
+ * - `scrollbar="thin #purple.40 #dark.04"`
156
+ * - `scrollbar="auto #red #blue"`
146
157
  * - `scrollbar="none"`
147
- * - `scrollbar="always 8px #primary.50 #white.02"`
158
+ * - `scrollbar="always #primary.50 #white.02"`
159
+ * - `scrollbar="thin stable #red #blue"`
148
160
  */
149
- scrollbar?: string | boolean | number;
161
+ scrollbar?: string | boolean;
150
162
  /**
151
163
  * Set font weight for bold texts.
152
164
  */
@@ -354,11 +366,13 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
354
366
  /**
355
367
  * The preset style sets base text settings according to named presets. Affects `font-size`, `line-height`, `letter-spacing`, `font-weight`, and `text-transform`.
356
368
  *
369
+ * Syntax: `name`, `name / modifier`, or `modifier` (shorthand, name defaults to `inherit`).
357
370
  * Preset names are project-specific. Augment `TastyPresetNames` to register them for autocomplete.
358
371
  *
359
372
  * Examples:
360
373
  * - `preset="h1"` // heading 1 typography
361
- * - `preset="h2 strong"` // bold heading 2
374
+ * - `preset="h2 / strong"` // bold heading 2
375
+ * - `preset="bold"` // inherit with bold (shorthand)
362
376
  * - `preset="t3"` // text size 3
363
377
  */
364
378
  preset?: PresetName | (string & {});
@@ -438,6 +452,24 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
438
452
  * - `'@properties': { '#theme': { initialValue: 'purple' } }` // syntax: '<color>' is auto-set
439
453
  */
440
454
  '@properties'?: Record<string, PropertyDefinition>;
455
+ /**
456
+ * Local @font-face definitions for this component.
457
+ * Keys are font-family names, values are descriptors or arrays of descriptors
458
+ * (for multiple weights/styles of the same family).
459
+ *
460
+ * Examples:
461
+ * - `'@fontFace': { Icons: { src: 'url("/fonts/icons.woff2") format("woff2")', fontDisplay: 'block' } }`
462
+ * - `'@fontFace': { 'Brand Sans': [{ src: '...', fontWeight: 400 }, { src: '...', fontWeight: 700 }] }`
463
+ */
464
+ '@fontFace'?: Record<string, FontFaceInput>;
465
+ /**
466
+ * Local @counter-style definitions for this component.
467
+ * Keys are counter-style names, values are descriptor objects.
468
+ *
469
+ * Examples:
470
+ * - `'@counterStyle': { thumbs: { system: 'cyclic', symbols: '"👍"', suffix: '" "' } }`
471
+ */
472
+ '@counterStyle'?: Record<string, CounterStyleDescriptors>;
441
473
  /**
442
474
  * Apply one or more predefined style recipes by name.
443
475
  * Recipes are defined globally via `configure({ recipes: { ... } })`.
@@ -458,7 +490,7 @@ type SuffixForSelector = '&' | '.' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | '
458
490
  type Selector = `${SuffixForSelector}${string}`;
459
491
  type NotSelector = Exclude<string, Selector | keyof StylesInterface>;
460
492
  /** Special style keys that should not be wrapped in StyleValue/StyleValueStateMap */
461
- type SpecialStyleKeys = '@keyframes' | '@properties' | 'recipe';
493
+ type SpecialStyleKeys = '@keyframes' | '@properties' | '@fontFace' | '@counterStyle' | 'recipe';
462
494
  type StylesWithoutSelectors = { [key in keyof StylesInterface as key extends SpecialStyleKeys ? never : key]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]> };
463
495
  /**
464
496
  * Index signature for recipe-specific arbitrary keys.
@@ -476,16 +508,20 @@ type RecipeIndexSignature = Record<string, StyleValue<string | number | boolean
476
508
  type RecipeStyles = StylesWithoutSelectors & RecipeIndexSignature & {
477
509
  '@keyframes'?: StylesInterface['@keyframes'];
478
510
  '@properties'?: StylesInterface['@properties'];
511
+ '@fontFace'?: StylesInterface['@fontFace'];
512
+ '@counterStyle'?: StylesInterface['@counterStyle'];
479
513
  };
480
514
  /** Special properties that are not regular style values */
481
515
  interface SpecialStyleProperties {
482
516
  '@keyframes'?: StylesInterface['@keyframes'];
483
517
  '@properties'?: StylesInterface['@properties'];
518
+ '@fontFace'?: StylesInterface['@fontFace'];
519
+ '@counterStyle'?: StylesInterface['@counterStyle'];
484
520
  recipe?: StylesInterface['recipe'];
485
521
  }
486
522
  /** Index signature for arbitrary style keys (sub-elements, CSS variables, etc.) */
487
523
  interface StylesIndexSignature {
488
- [key: string]: StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined> | Styles | false | StylesInterface['@keyframes'] | StylesInterface['@properties'];
524
+ [key: string]: StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined> | Styles | false | StylesInterface['@keyframes'] | StylesInterface['@properties'] | StylesInterface['@fontFace'] | StylesInterface['@counterStyle'];
489
525
  /**
490
526
  * Selector combinator: `undefined` (descendant, default), `'>'` (child), `'+'` (adjacent), `'~'` (sibling).
491
527
  * Can chain with capitalized names: `'> Body > Row >'`. Spaces required around combinators.
@@ -493,6 +529,19 @@ interface StylesIndexSignature {
493
529
  $?: string;
494
530
  }
495
531
  type Styles = StylesWithoutSelectors & SpecialStyleProperties & StylesIndexSignature;
532
+ /**
533
+ * Value type for design tokens passed to `configure({ tokens })`.
534
+ * Can be a direct value or a state map for responsive/theme-aware tokens.
535
+ */
536
+ type ConfigTokenValue = string | number | boolean | Record<string, string | number | boolean | undefined | null | '@inherit'>;
537
+ /**
538
+ * Design tokens injected as CSS custom properties on `:root`.
539
+ * Keys must start with `$` (value tokens) or `#` (color tokens).
540
+ *
541
+ * - `$name` keys become `--name` CSS custom properties
542
+ * - `#name` keys become `--name-color` and `--name-color-{colorSpace}` properties
543
+ */
544
+ type ConfigTokens = Record<`$${string}` | `#${string}`, ConfigTokenValue>;
496
545
  //#endregion
497
- export { NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames };
546
+ export { ConfigTokenValue, ConfigTokens, NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames };
498
547
  //# sourceMappingURL=types.d.ts.map