@tenphi/tasty 0.0.0-snapshot.fafcbfe → 0.0.0-snapshot.ffe00e9

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 (306) hide show
  1. package/README.md +315 -159
  2. package/dist/_virtual/_rolldown/runtime.js +1 -2
  3. package/dist/chunks/cacheKey.d.ts +1 -0
  4. package/dist/chunks/cacheKey.js +17 -10
  5. package/dist/chunks/cacheKey.js.map +1 -1
  6. package/dist/chunks/definitions.d.ts +1 -1
  7. package/dist/chunks/definitions.js +3 -5
  8. package/dist/chunks/definitions.js.map +1 -1
  9. package/dist/chunks/index.d.ts +1 -0
  10. package/dist/chunks/renderChunk.d.ts +1 -0
  11. package/dist/chunks/renderChunk.js +32 -34
  12. package/dist/chunks/renderChunk.js.map +1 -1
  13. package/dist/compute-styles.d.ts +31 -0
  14. package/dist/compute-styles.js +357 -0
  15. package/dist/compute-styles.js.map +1 -0
  16. package/dist/config.d.ts +116 -30
  17. package/dist/config.js +144 -45
  18. package/dist/config.js.map +1 -1
  19. package/dist/core/index.d.ts +12 -11
  20. package/dist/core/index.js +11 -10
  21. package/dist/counter-style/index.js +51 -0
  22. package/dist/counter-style/index.js.map +1 -0
  23. package/dist/debug.d.ts +26 -141
  24. package/dist/debug.js +357 -637
  25. package/dist/debug.js.map +1 -1
  26. package/dist/font-face/index.js +63 -0
  27. package/dist/font-face/index.js.map +1 -0
  28. package/dist/hooks/index.d.ts +7 -0
  29. package/dist/hooks/useCounterStyle.d.ts +50 -0
  30. package/dist/hooks/useCounterStyle.js +45 -0
  31. package/dist/hooks/useCounterStyle.js.map +1 -0
  32. package/dist/hooks/useFontFace.d.ts +43 -0
  33. package/dist/hooks/useFontFace.js +69 -0
  34. package/dist/hooks/useFontFace.js.map +1 -0
  35. package/dist/hooks/useGlobalStyles.d.ts +3 -0
  36. package/dist/hooks/useGlobalStyles.js +23 -2
  37. package/dist/hooks/useGlobalStyles.js.map +1 -1
  38. package/dist/hooks/useKeyframes.js +13 -4
  39. package/dist/hooks/useKeyframes.js.map +1 -1
  40. package/dist/hooks/useProperty.js +31 -14
  41. package/dist/hooks/useProperty.js.map +1 -1
  42. package/dist/hooks/useRawCSS.js +8 -2
  43. package/dist/hooks/useRawCSS.js.map +1 -1
  44. package/dist/hooks/useStyles.d.ts +4 -4
  45. package/dist/hooks/useStyles.js +7 -147
  46. package/dist/hooks/useStyles.js.map +1 -1
  47. package/dist/index.d.ts +23 -12
  48. package/dist/index.js +14 -11
  49. package/dist/injector/index.d.ts +41 -11
  50. package/dist/injector/index.js +48 -11
  51. package/dist/injector/index.js.map +1 -1
  52. package/dist/injector/injector.d.ts +58 -3
  53. package/dist/injector/injector.js +204 -41
  54. package/dist/injector/injector.js.map +1 -1
  55. package/dist/injector/sheet-manager.d.ts +18 -17
  56. package/dist/injector/sheet-manager.js +45 -73
  57. package/dist/injector/sheet-manager.js.map +1 -1
  58. package/dist/injector/types.d.ts +119 -19
  59. package/dist/keyframes/index.js +1 -1
  60. package/dist/parser/classify.js +6 -6
  61. package/dist/parser/classify.js.map +1 -1
  62. package/dist/parser/const.js +30 -3
  63. package/dist/parser/const.js.map +1 -1
  64. package/dist/parser/lru.js +1 -1
  65. package/dist/parser/lru.js.map +1 -1
  66. package/dist/parser/parser.js +2 -3
  67. package/dist/parser/parser.js.map +1 -1
  68. package/dist/parser/tokenizer.js +1 -1
  69. package/dist/parser/tokenizer.js.map +1 -1
  70. package/dist/parser/types.js +1 -1
  71. package/dist/parser/types.js.map +1 -1
  72. package/dist/pipeline/conditions.js +15 -9
  73. package/dist/pipeline/conditions.js.map +1 -1
  74. package/dist/pipeline/exclusive.js +1 -2
  75. package/dist/pipeline/exclusive.js.map +1 -1
  76. package/dist/pipeline/index.d.ts +3 -1
  77. package/dist/pipeline/index.js +139 -72
  78. package/dist/pipeline/index.js.map +1 -1
  79. package/dist/pipeline/materialize.js +405 -210
  80. package/dist/pipeline/materialize.js.map +1 -1
  81. package/dist/pipeline/parseStateKey.d.ts +1 -1
  82. package/dist/pipeline/parseStateKey.js +38 -22
  83. package/dist/pipeline/parseStateKey.js.map +1 -1
  84. package/dist/pipeline/simplify.js +112 -154
  85. package/dist/pipeline/simplify.js.map +1 -1
  86. package/dist/pipeline/warnings.js +18 -0
  87. package/dist/pipeline/warnings.js.map +1 -0
  88. package/dist/plugins/index.d.ts +2 -0
  89. package/dist/plugins/okhsl-plugin.js +3 -277
  90. package/dist/plugins/okhsl-plugin.js.map +1 -1
  91. package/dist/plugins/types.d.ts +9 -2
  92. package/dist/properties/index.js +83 -19
  93. package/dist/properties/index.js.map +1 -1
  94. package/dist/properties/property-type-resolver.d.ts +24 -0
  95. package/dist/properties/property-type-resolver.js +90 -0
  96. package/dist/properties/property-type-resolver.js.map +1 -0
  97. package/dist/ssr/astro.d.ts +29 -0
  98. package/dist/ssr/astro.js +64 -0
  99. package/dist/ssr/astro.js.map +1 -0
  100. package/dist/ssr/async-storage.d.ts +17 -0
  101. package/dist/ssr/async-storage.js +34 -0
  102. package/dist/ssr/async-storage.js.map +1 -0
  103. package/dist/ssr/collect-auto-properties.js +39 -0
  104. package/dist/ssr/collect-auto-properties.js.map +1 -0
  105. package/dist/ssr/collector.d.ts +102 -0
  106. package/dist/ssr/collector.js +219 -0
  107. package/dist/ssr/collector.js.map +1 -0
  108. package/dist/ssr/format-global-rules.js +22 -0
  109. package/dist/ssr/format-global-rules.js.map +1 -0
  110. package/dist/ssr/format-keyframes.js +69 -0
  111. package/dist/ssr/format-keyframes.js.map +1 -0
  112. package/dist/ssr/format-property.js +49 -0
  113. package/dist/ssr/format-property.js.map +1 -0
  114. package/dist/ssr/format-rules.js +73 -0
  115. package/dist/ssr/format-rules.js.map +1 -0
  116. package/dist/ssr/hydrate.d.ts +22 -0
  117. package/dist/ssr/hydrate.js +49 -0
  118. package/dist/ssr/hydrate.js.map +1 -0
  119. package/dist/ssr/index.d.ts +4 -0
  120. package/dist/ssr/index.js +10 -0
  121. package/dist/ssr/index.js.map +1 -0
  122. package/dist/ssr/next.d.ts +43 -0
  123. package/dist/ssr/next.js +74 -0
  124. package/dist/ssr/next.js.map +1 -0
  125. package/dist/ssr/ssr-collector-ref.js +12 -0
  126. package/dist/ssr/ssr-collector-ref.js.map +1 -0
  127. package/dist/states/index.js +13 -259
  128. package/dist/states/index.js.map +1 -1
  129. package/dist/static/index.js +1 -2
  130. package/dist/static/inject.d.ts +5 -0
  131. package/dist/static/inject.js +17 -0
  132. package/dist/static/inject.js.map +1 -0
  133. package/dist/static/tastyStatic.js +1 -2
  134. package/dist/static/tastyStatic.js.map +1 -1
  135. package/dist/static/types.js +1 -1
  136. package/dist/styles/border.d.ts +2 -2
  137. package/dist/styles/border.js +30 -24
  138. package/dist/styles/border.js.map +1 -1
  139. package/dist/styles/color.d.ts +3 -3
  140. package/dist/styles/color.js +11 -8
  141. package/dist/styles/color.js.map +1 -1
  142. package/dist/styles/const.js +17 -0
  143. package/dist/styles/const.js.map +1 -0
  144. package/dist/styles/createStyle.js +29 -27
  145. package/dist/styles/createStyle.js.map +1 -1
  146. package/dist/styles/dimension.js +15 -3
  147. package/dist/styles/dimension.js.map +1 -1
  148. package/dist/styles/directional.js +133 -0
  149. package/dist/styles/directional.js.map +1 -0
  150. package/dist/styles/display.d.ts +3 -10
  151. package/dist/styles/display.js +45 -39
  152. package/dist/styles/display.js.map +1 -1
  153. package/dist/styles/fade.d.ts +2 -2
  154. package/dist/styles/fade.js +9 -5
  155. package/dist/styles/fade.js.map +1 -1
  156. package/dist/styles/fill.d.ts +15 -17
  157. package/dist/styles/fill.js +9 -9
  158. package/dist/styles/fill.js.map +1 -1
  159. package/dist/styles/flow.d.ts +3 -3
  160. package/dist/styles/flow.js +1 -1
  161. package/dist/styles/flow.js.map +1 -1
  162. package/dist/styles/gap.d.ts +1 -1
  163. package/dist/styles/gap.js +4 -3
  164. package/dist/styles/gap.js.map +1 -1
  165. package/dist/styles/height.d.ts +1 -1
  166. package/dist/styles/height.js +1 -2
  167. package/dist/styles/height.js.map +1 -1
  168. package/dist/styles/index.d.ts +0 -1
  169. package/dist/styles/index.js +3 -4
  170. package/dist/styles/index.js.map +1 -1
  171. package/dist/styles/inset.d.ts +1 -29
  172. package/dist/styles/inset.js +19 -135
  173. package/dist/styles/inset.js.map +1 -1
  174. package/dist/styles/list.d.ts +5 -5
  175. package/dist/styles/list.js +4 -2
  176. package/dist/styles/list.js.map +1 -1
  177. package/dist/styles/margin.d.ts +1 -1
  178. package/dist/styles/margin.js +17 -89
  179. package/dist/styles/margin.js.map +1 -1
  180. package/dist/styles/outline.d.ts +1 -1
  181. package/dist/styles/outline.js +6 -16
  182. package/dist/styles/outline.js.map +1 -1
  183. package/dist/styles/padding.d.ts +1 -1
  184. package/dist/styles/padding.js +17 -89
  185. package/dist/styles/padding.js.map +1 -1
  186. package/dist/styles/placement.d.ts +37 -0
  187. package/dist/styles/placement.js +74 -0
  188. package/dist/styles/placement.js.map +1 -0
  189. package/dist/styles/predefined.d.ts +4 -6
  190. package/dist/styles/predefined.js +9 -13
  191. package/dist/styles/predefined.js.map +1 -1
  192. package/dist/styles/preset.d.ts +6 -1
  193. package/dist/styles/preset.js +54 -53
  194. package/dist/styles/preset.js.map +1 -1
  195. package/dist/styles/radius.d.ts +2 -4
  196. package/dist/styles/radius.js +38 -6
  197. package/dist/styles/radius.js.map +1 -1
  198. package/dist/styles/scrollMargin.d.ts +24 -0
  199. package/dist/styles/scrollMargin.js +32 -0
  200. package/dist/styles/scrollMargin.js.map +1 -0
  201. package/dist/styles/scrollbar.d.ts +9 -5
  202. package/dist/styles/scrollbar.js +31 -85
  203. package/dist/styles/scrollbar.js.map +1 -1
  204. package/dist/styles/shadow.d.ts +3 -3
  205. package/dist/styles/shadow.js +4 -3
  206. package/dist/styles/shadow.js.map +1 -1
  207. package/dist/styles/shared.js +17 -0
  208. package/dist/styles/shared.js.map +1 -0
  209. package/dist/styles/transition.d.ts +2 -2
  210. package/dist/styles/transition.js +6 -5
  211. package/dist/styles/transition.js.map +1 -1
  212. package/dist/styles/types.d.ts +94 -28
  213. package/dist/styles/width.d.ts +1 -1
  214. package/dist/styles/width.js +1 -2
  215. package/dist/styles/width.js.map +1 -1
  216. package/dist/tasty.d.ts +46 -894
  217. package/dist/tasty.js +112 -60
  218. package/dist/tasty.js.map +1 -1
  219. package/dist/types.d.ts +3 -3
  220. package/dist/utils/cache-wrapper.js +4 -9
  221. package/dist/utils/cache-wrapper.js.map +1 -1
  222. package/dist/utils/case-converter.js +1 -1
  223. package/dist/utils/color-math.d.ts +46 -0
  224. package/dist/utils/color-math.js +749 -0
  225. package/dist/utils/color-math.js.map +1 -0
  226. package/dist/utils/color-space.d.ts +5 -0
  227. package/dist/utils/color-space.js +228 -0
  228. package/dist/utils/color-space.js.map +1 -0
  229. package/dist/utils/colors.d.ts +1 -1
  230. package/dist/utils/colors.js +3 -2
  231. package/dist/utils/colors.js.map +1 -1
  232. package/dist/utils/css-types.d.ts +1 -1
  233. package/dist/utils/dotize.d.ts +1 -1
  234. package/dist/utils/dotize.js +1 -1
  235. package/dist/utils/dotize.js.map +1 -1
  236. package/dist/utils/filter-base-props.js +1 -1
  237. package/dist/utils/get-display-name.js +1 -1
  238. package/dist/utils/has-keys.js +13 -0
  239. package/dist/utils/has-keys.js.map +1 -0
  240. package/dist/utils/is-dev-env.js +1 -1
  241. package/dist/utils/is-dev-env.js.map +1 -1
  242. package/dist/utils/is-valid-element-type.js +1 -1
  243. package/dist/utils/merge-styles.js +1 -2
  244. package/dist/utils/merge-styles.js.map +1 -1
  245. package/dist/utils/mod-attrs.d.ts +0 -2
  246. package/dist/utils/mod-attrs.js +3 -4
  247. package/dist/utils/mod-attrs.js.map +1 -1
  248. package/dist/utils/process-tokens.d.ts +3 -17
  249. package/dist/utils/process-tokens.js +19 -107
  250. package/dist/utils/process-tokens.js.map +1 -1
  251. package/dist/utils/resolve-recipes.js +1 -2
  252. package/dist/utils/resolve-recipes.js.map +1 -1
  253. package/dist/utils/selector-transform.js +32 -0
  254. package/dist/utils/selector-transform.js.map +1 -0
  255. package/dist/utils/string.js +1 -1
  256. package/dist/utils/string.js.map +1 -1
  257. package/dist/utils/styles.d.ts +5 -89
  258. package/dist/utils/styles.js +35 -400
  259. package/dist/utils/styles.js.map +1 -1
  260. package/dist/utils/typography.d.ts +24 -13
  261. package/dist/utils/typography.js +15 -17
  262. package/dist/utils/typography.js.map +1 -1
  263. package/dist/utils/warnings.js +1 -1
  264. package/dist/zero/babel.d.ts +84 -10
  265. package/dist/zero/babel.js +193 -37
  266. package/dist/zero/babel.js.map +1 -1
  267. package/dist/zero/css-writer.js +1 -2
  268. package/dist/zero/css-writer.js.map +1 -1
  269. package/dist/zero/extractor.js +119 -3
  270. package/dist/zero/extractor.js.map +1 -1
  271. package/dist/zero/index.js +1 -2
  272. package/dist/zero/next.d.ts +56 -30
  273. package/dist/zero/next.js +105 -40
  274. package/dist/zero/next.js.map +1 -1
  275. package/docs/PIPELINE.md +519 -0
  276. package/docs/README.md +31 -0
  277. package/docs/adoption.md +296 -0
  278. package/docs/comparison.md +420 -0
  279. package/docs/configuration.md +326 -0
  280. package/docs/debug.md +318 -0
  281. package/docs/design-system.md +424 -0
  282. package/docs/dsl.md +673 -0
  283. package/docs/getting-started.md +217 -0
  284. package/docs/injector.md +543 -0
  285. package/docs/methodology.md +616 -0
  286. package/docs/runtime.md +572 -0
  287. package/docs/ssr.md +354 -0
  288. package/docs/styles.md +596 -0
  289. package/docs/tasty-static.md +520 -0
  290. package/package.json +106 -31
  291. package/dist/styles/align.d.ts +0 -15
  292. package/dist/styles/align.js +0 -14
  293. package/dist/styles/align.js.map +0 -1
  294. package/dist/styles/justify.d.ts +0 -15
  295. package/dist/styles/justify.js +0 -14
  296. package/dist/styles/justify.js.map +0 -1
  297. package/dist/styles/styledScrollbar.d.ts +0 -47
  298. package/dist/styles/styledScrollbar.js +0 -38
  299. package/dist/styles/styledScrollbar.js.map +0 -1
  300. package/dist/tokens/typography.d.ts +0 -19
  301. package/dist/tokens/typography.js +0 -237
  302. package/dist/tokens/typography.js.map +0 -1
  303. package/dist/utils/hsl-to-rgb.js +0 -38
  304. package/dist/utils/hsl-to-rgb.js.map +0 -1
  305. package/dist/utils/okhsl-to-rgb.js +0 -296
  306. 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,8 +40,9 @@ 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
- interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font' | 'outline' | 'type' | 'gap' | 'padding' | 'margin' | 'width' | 'height' | 'border' | 'transition' | 'placeContent' | 'placeItems'> {
45
+ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font' | 'outline' | 'type' | 'gap' | 'padding' | 'margin' | 'width' | 'height' | 'border' | 'transition' | 'placeContent' | 'placeItems' | 'scrollMargin' | 'scrollMarginTop' | 'scrollMarginRight' | 'scrollMarginBottom' | 'scrollMarginLeft' | 'scrollMarginBlock' | 'scrollMarginInline'> {
45
46
  /**
46
47
  * @deprecated Use `flow` style instead.
47
48
  */
@@ -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
  */
@@ -265,7 +277,7 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
265
277
  *
266
278
  * Syntax: `[value] [modifiers]` | `[shape]` | `true`
267
279
  *
268
- * Shapes: `round` (fully rounded), `ellipse` (50%), `leaf`, `backleaf` (asymmetric)
280
+ * Shapes: `round` (fully rounded), `ellipse` (50%), `leaf`, `backleaf` (asymmetric), `inherit` (inherit from parent)
269
281
  * Directional modifiers: `top`, `right`, `bottom`, `left`
270
282
  *
271
283
  * Examples:
@@ -274,8 +286,10 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
274
286
  * - `radius="round"` // fully rounded (9999rem)
275
287
  * - `radius="leaf"` // asymmetric leaf shape
276
288
  * - `radius="1r top"` // round only top corners
289
+ * - `radius="inherit"` // inherit border-radius from parent
290
+ * - `radius="inherit right"` // inherit only right corners (uses longhand properties)
277
291
  */
278
- radius?: 'round' | 'ellipse' | 'leaf' | 'backleaf' | string | true;
292
+ radius?: 'round' | 'ellipse' | 'leaf' | 'backleaf' | 'inherit' | string | true;
279
293
  /**
280
294
  * The flow style is a unified shorthand for controlling layout direction and wrapping in both flex and grid containers. Replaces `flexDirection` and `gridAutoFlow`.
281
295
  *
@@ -354,11 +368,13 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
354
368
  /**
355
369
  * The preset style sets base text settings according to named presets. Affects `font-size`, `line-height`, `letter-spacing`, `font-weight`, and `text-transform`.
356
370
  *
371
+ * Syntax: `name`, `name / modifier`, or `modifier` (shorthand, name defaults to `inherit`).
357
372
  * Preset names are project-specific. Augment `TastyPresetNames` to register them for autocomplete.
358
373
  *
359
374
  * Examples:
360
375
  * - `preset="h1"` // heading 1 typography
361
- * - `preset="h2 strong"` // bold heading 2
376
+ * - `preset="h2 / strong"` // bold heading 2
377
+ * - `preset="bold"` // inherit with bold (shorthand)
362
378
  * - `preset="t3"` // text size 3
363
379
  */
364
380
  preset?: PresetName | (string & {});
@@ -381,12 +397,12 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
381
397
  */
382
398
  justify?: CSSProperties['justifyItems'] | CSSProperties['justifyContent'];
383
399
  /**
384
- * Shorthand for `place-items` and `place-content`. Sets both properties for unified alignment of both axes in grid/flex layouts.
400
+ * Shorthand for all placement properties. Sets all 4 longhands: align-items, justify-items, align-content, justify-content.
385
401
  *
386
402
  * Examples:
387
- * - `place="center"` // place-items: center; place-content: center
388
- * - `place="start end"` // place-items: start; place-content: end
389
- * - `place="stretch"` // place both to stretch
403
+ * - `place="center"` // all 4 longhands: center
404
+ * - `place="start end"` // align-*: start; justify-*: end
405
+ * - `place="stretch"` // all 4 longhands: stretch
390
406
  */
391
407
  place?: CSSProperties['placeItems'] | CSSProperties['placeContent'] | string;
392
408
  /**
@@ -405,6 +421,21 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
405
421
  * - `placeItems="start end"` // start on block axis, end on inline axis
406
422
  */
407
423
  placeItems?: CSSProperties['placeItems'];
424
+ /**
425
+ * Shorthand for scroll-margin on all sides. Supports custom units and directional modifiers.
426
+ *
427
+ * Examples:
428
+ * - `scrollMargin="2x"` // scroll-margin on all sides: 2x
429
+ * - `scrollMargin="2x top"` // only top scroll-margin: 2x
430
+ * - `scrollMargin={true}` // default scroll-margin on all sides
431
+ */
432
+ scrollMargin?: CSSProperties['scrollMargin'] | string | boolean;
433
+ scrollMarginTop?: string | number | boolean;
434
+ scrollMarginRight?: string | number | boolean;
435
+ scrollMarginBottom?: string | number | boolean;
436
+ scrollMarginLeft?: string | number | boolean;
437
+ scrollMarginBlock?: string | number | boolean;
438
+ scrollMarginInline?: string | number | boolean;
408
439
  /**
409
440
  * Shorthand for `top`, `right`, `bottom`, and `left` offsets. Supports custom units, directional modifiers, and positioning.
410
441
  *
@@ -438,6 +469,24 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
438
469
  * - `'@properties': { '#theme': { initialValue: 'purple' } }` // syntax: '<color>' is auto-set
439
470
  */
440
471
  '@properties'?: Record<string, PropertyDefinition>;
472
+ /**
473
+ * Local @font-face definitions for this component.
474
+ * Keys are font-family names, values are descriptors or arrays of descriptors
475
+ * (for multiple weights/styles of the same family).
476
+ *
477
+ * Examples:
478
+ * - `'@fontFace': { Icons: { src: 'url("/fonts/icons.woff2") format("woff2")', fontDisplay: 'block' } }`
479
+ * - `'@fontFace': { 'Brand Sans': [{ src: '...', fontWeight: 400 }, { src: '...', fontWeight: 700 }] }`
480
+ */
481
+ '@fontFace'?: Record<string, FontFaceInput>;
482
+ /**
483
+ * Local @counter-style definitions for this component.
484
+ * Keys are counter-style names, values are descriptor objects.
485
+ *
486
+ * Examples:
487
+ * - `'@counterStyle': { thumbs: { system: 'cyclic', symbols: '"👍"', suffix: '" "' } }`
488
+ */
489
+ '@counterStyle'?: Record<string, CounterStyleDescriptors>;
441
490
  /**
442
491
  * Apply one or more predefined style recipes by name.
443
492
  * Recipes are defined globally via `configure({ recipes: { ... } })`.
@@ -458,7 +507,7 @@ type SuffixForSelector = '&' | '.' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | '
458
507
  type Selector = `${SuffixForSelector}${string}`;
459
508
  type NotSelector = Exclude<string, Selector | keyof StylesInterface>;
460
509
  /** Special style keys that should not be wrapped in StyleValue/StyleValueStateMap */
461
- type SpecialStyleKeys = '@keyframes' | '@properties' | 'recipe';
510
+ type SpecialStyleKeys = '@keyframes' | '@properties' | '@fontFace' | '@counterStyle' | 'recipe';
462
511
  type StylesWithoutSelectors = { [key in keyof StylesInterface as key extends SpecialStyleKeys ? never : key]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]> };
463
512
  /**
464
513
  * Index signature for recipe-specific arbitrary keys.
@@ -476,16 +525,20 @@ type RecipeIndexSignature = Record<string, StyleValue<string | number | boolean
476
525
  type RecipeStyles = StylesWithoutSelectors & RecipeIndexSignature & {
477
526
  '@keyframes'?: StylesInterface['@keyframes'];
478
527
  '@properties'?: StylesInterface['@properties'];
528
+ '@fontFace'?: StylesInterface['@fontFace'];
529
+ '@counterStyle'?: StylesInterface['@counterStyle'];
479
530
  };
480
531
  /** Special properties that are not regular style values */
481
532
  interface SpecialStyleProperties {
482
533
  '@keyframes'?: StylesInterface['@keyframes'];
483
534
  '@properties'?: StylesInterface['@properties'];
535
+ '@fontFace'?: StylesInterface['@fontFace'];
536
+ '@counterStyle'?: StylesInterface['@counterStyle'];
484
537
  recipe?: StylesInterface['recipe'];
485
538
  }
486
539
  /** Index signature for arbitrary style keys (sub-elements, CSS variables, etc.) */
487
540
  interface StylesIndexSignature {
488
- [key: string]: StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined> | Styles | false | StylesInterface['@keyframes'] | StylesInterface['@properties'];
541
+ [key: string]: StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined> | Styles | false | StylesInterface['@keyframes'] | StylesInterface['@properties'] | StylesInterface['@fontFace'] | StylesInterface['@counterStyle'];
489
542
  /**
490
543
  * Selector combinator: `undefined` (descendant, default), `'>'` (child), `'+'` (adjacent), `'~'` (sibling).
491
544
  * Can chain with capitalized names: `'> Body > Row >'`. Spaces required around combinators.
@@ -493,6 +546,19 @@ interface StylesIndexSignature {
493
546
  $?: string;
494
547
  }
495
548
  type Styles = StylesWithoutSelectors & SpecialStyleProperties & StylesIndexSignature;
549
+ /**
550
+ * Value type for design tokens passed to `configure({ tokens })`.
551
+ * Can be a direct value or a state map for responsive/theme-aware tokens.
552
+ */
553
+ type ConfigTokenValue = string | number | boolean | Record<string, string | number | boolean | undefined | null | '@inherit'>;
554
+ /**
555
+ * Design tokens injected as CSS custom properties on `:root`.
556
+ * Keys must start with `$` (value tokens) or `#` (color tokens).
557
+ *
558
+ * - `$name` keys become `--name` CSS custom properties
559
+ * - `#name` keys become `--name-color` and `--name-color-{colorSpace}` properties
560
+ */
561
+ type ConfigTokens = Record<`$${string}` | `#${string}`, ConfigTokenValue>;
496
562
  //#endregion
497
- export { NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames };
563
+ export { ConfigTokenValue, ConfigTokens, NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames };
498
564
  //# sourceMappingURL=types.d.ts.map
@@ -8,7 +8,7 @@ declare function widthStyle({
8
8
  width,
9
9
  minWidth,
10
10
  maxWidth
11
- }: WidthStyleProps): Record<string, string | string[]> | undefined;
11
+ }: WidthStyleProps): Record<string, string | string[]> | null;
12
12
  declare namespace widthStyle {
13
13
  var __lookupStyles: string[];
14
14
  }
@@ -1,5 +1,4 @@
1
1
  import { dimensionStyle } from "./dimension.js";
2
-
3
2
  //#region src/styles/width.ts
4
3
  const dimension = dimensionStyle("width");
5
4
  function widthStyle({ width, minWidth, maxWidth }) {
@@ -14,7 +13,7 @@ widthStyle.__lookupStyles = [
14
13
  "minWidth",
15
14
  "maxWidth"
16
15
  ];
17
-
18
16
  //#endregion
19
17
  export { widthStyle };
18
+
20
19
  //# sourceMappingURL=width.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"width.js","names":[],"sources":["../../src/styles/width.ts"],"sourcesContent":["import { dimensionStyle } from './dimension';\n\nconst dimension = dimensionStyle('width');\n\ninterface WidthStyleProps {\n width?: string | number | boolean;\n minWidth?: string | number | boolean;\n maxWidth?: string | number | boolean;\n}\n\nexport function widthStyle({ width, minWidth, maxWidth }: WidthStyleProps) {\n return dimension({ value: width, min: minWidth, max: maxWidth });\n}\n\nwidthStyle.__lookupStyles = ['width', 'minWidth', 'maxWidth'];\n"],"mappings":";;;AAEA,MAAM,YAAY,eAAe,QAAQ;AAQzC,SAAgB,WAAW,EAAE,OAAO,UAAU,YAA6B;AACzE,QAAO,UAAU;EAAE,OAAO;EAAO,KAAK;EAAU,KAAK;EAAU,CAAC;;AAGlE,WAAW,iBAAiB;CAAC;CAAS;CAAY;CAAW"}
1
+ {"version":3,"file":"width.js","names":[],"sources":["../../src/styles/width.ts"],"sourcesContent":["import { dimensionStyle } from './dimension';\n\nconst dimension = dimensionStyle('width');\n\ninterface WidthStyleProps {\n width?: string | number | boolean;\n minWidth?: string | number | boolean;\n maxWidth?: string | number | boolean;\n}\n\nexport function widthStyle({ width, minWidth, maxWidth }: WidthStyleProps) {\n return dimension({ value: width, min: minWidth, max: maxWidth });\n}\n\nwidthStyle.__lookupStyles = ['width', 'minWidth', 'maxWidth'];\n"],"mappings":";;AAEA,MAAM,YAAY,eAAe,QAAQ;AAQzC,SAAgB,WAAW,EAAE,OAAO,UAAU,YAA6B;AACzE,QAAO,UAAU;EAAE,OAAO;EAAO,KAAK;EAAU,KAAK;EAAU,CAAC;;AAGlE,WAAW,iBAAiB;CAAC;CAAS;CAAY;CAAW"}