@tenphi/tasty 0.0.0-snapshot.01d8a9e → 0.0.0-snapshot.047dfbb

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 (342) hide show
  1. package/README.md +13 -8
  2. package/dist/{ssr/async-storage.js → async-storage-DKK-wTD4.js} +2 -2
  3. package/dist/async-storage-DKK-wTD4.js.map +1 -0
  4. package/dist/{ssr/collector.d.ts → collector-CddJZDOr.d.ts} +17 -3
  5. package/dist/{ssr/collector.js → collector-J6LwZR0N.js} +53 -43
  6. package/dist/collector-J6LwZR0N.js.map +1 -0
  7. package/dist/config-C3F4Ogo1.js +10993 -0
  8. package/dist/config-C3F4Ogo1.js.map +1 -0
  9. package/dist/config-C3SKYuxY.d.ts +945 -0
  10. package/dist/{ssr/context.js → context-CA8YKeMn.js} +11 -3
  11. package/dist/context-CA8YKeMn.js.map +1 -0
  12. package/dist/core/index.d.ts +5 -34
  13. package/dist/core/index.js +6 -27
  14. package/dist/core-DxHmF6S9.js +1598 -0
  15. package/dist/core-DxHmF6S9.js.map +1 -0
  16. package/dist/{zero/extractor.js → css-writer-IC7tdnIf.js} +98 -13
  17. package/dist/css-writer-IC7tdnIf.js.map +1 -0
  18. package/dist/{ssr/format-global-rules.js → format-global-rules-DklyaXv-.js} +2 -2
  19. package/dist/format-global-rules-DklyaXv-.js.map +1 -0
  20. package/dist/format-rules-DTLY39Hm.js +143 -0
  21. package/dist/format-rules-DTLY39Hm.js.map +1 -0
  22. package/dist/{ssr/hydrate.js → hydrate-8Zglgy_C.js} +3 -3
  23. package/dist/hydrate-8Zglgy_C.js.map +1 -0
  24. package/dist/index-ByBYTH9l.d.ts +1778 -0
  25. package/dist/index-C5owZ15q.d.ts +1293 -0
  26. package/dist/index.d.ts +5 -51
  27. package/dist/index.js +732 -36
  28. package/dist/index.js.map +1 -0
  29. package/dist/keyframes-DgGkipNK.js +595 -0
  30. package/dist/keyframes-DgGkipNK.js.map +1 -0
  31. package/dist/{utils/merge-styles.js → merge-styles-CAdKaHxh.js} +3 -4
  32. package/dist/merge-styles-CAdKaHxh.js.map +1 -0
  33. package/dist/{utils/merge-styles.d.ts → merge-styles-CvUi7SOD.d.ts} +3 -3
  34. package/dist/{utils/resolve-recipes.js → resolve-recipes-BQNdunBd.js} +4 -6
  35. package/dist/resolve-recipes-BQNdunBd.js.map +1 -0
  36. package/dist/ssr/astro-client.js +1 -1
  37. package/dist/ssr/astro-client.js.map +1 -1
  38. package/dist/ssr/astro-middleware.js.map +1 -1
  39. package/dist/ssr/astro.d.ts +1 -12
  40. package/dist/ssr/astro.js +7 -9
  41. package/dist/ssr/astro.js.map +1 -1
  42. package/dist/ssr/index.d.ts +44 -4
  43. package/dist/ssr/index.js +4 -4
  44. package/dist/ssr/index.js.map +1 -1
  45. package/dist/ssr/next.d.ts +2 -3
  46. package/dist/ssr/next.js +6 -6
  47. package/dist/ssr/next.js.map +1 -1
  48. package/dist/static/index.d.ts +91 -5
  49. package/dist/static/index.js +49 -3
  50. package/dist/static/index.js.map +1 -0
  51. package/dist/static/inject.js.map +1 -1
  52. package/dist/zero/babel.d.ts +2 -3
  53. package/dist/zero/babel.js +22 -10
  54. package/dist/zero/babel.js.map +1 -1
  55. package/dist/zero/index.d.ts +67 -3
  56. package/dist/zero/index.js +1 -2
  57. package/dist/zero/next.js.map +1 -1
  58. package/docs/README.md +2 -2
  59. package/docs/configuration.md +44 -0
  60. package/docs/debug.md +11 -9
  61. package/docs/dsl.md +124 -13
  62. package/docs/injector.md +2 -2
  63. package/docs/methodology.md +26 -0
  64. package/docs/pipeline.md +744 -0
  65. package/docs/react-api.md +24 -0
  66. package/docs/ssr.md +5 -3
  67. package/docs/styles.md +25 -8
  68. package/docs/tasty-static.md +15 -0
  69. package/package.json +22 -12
  70. package/tasty.config.ts +2 -0
  71. package/dist/_virtual/_rolldown/runtime.js +0 -7
  72. package/dist/chunks/cacheKey.d.ts +0 -1
  73. package/dist/chunks/cacheKey.js +0 -77
  74. package/dist/chunks/cacheKey.js.map +0 -1
  75. package/dist/chunks/definitions.d.ts +0 -37
  76. package/dist/chunks/definitions.js +0 -258
  77. package/dist/chunks/definitions.js.map +0 -1
  78. package/dist/chunks/index.d.ts +0 -1
  79. package/dist/chunks/renderChunk.d.ts +0 -1
  80. package/dist/chunks/renderChunk.js +0 -59
  81. package/dist/chunks/renderChunk.js.map +0 -1
  82. package/dist/compute-styles.d.ts +0 -31
  83. package/dist/compute-styles.js +0 -336
  84. package/dist/compute-styles.js.map +0 -1
  85. package/dist/config.d.ts +0 -407
  86. package/dist/config.js +0 -591
  87. package/dist/config.js.map +0 -1
  88. package/dist/counter-style/index.js +0 -51
  89. package/dist/counter-style/index.js.map +0 -1
  90. package/dist/debug.d.ts +0 -89
  91. package/dist/debug.js +0 -453
  92. package/dist/debug.js.map +0 -1
  93. package/dist/font-face/index.js +0 -63
  94. package/dist/font-face/index.js.map +0 -1
  95. package/dist/hooks/index.d.ts +0 -7
  96. package/dist/hooks/useCounterStyle.d.ts +0 -36
  97. package/dist/hooks/useCounterStyle.js +0 -65
  98. package/dist/hooks/useCounterStyle.js.map +0 -1
  99. package/dist/hooks/useFontFace.d.ts +0 -45
  100. package/dist/hooks/useFontFace.js +0 -66
  101. package/dist/hooks/useFontFace.js.map +0 -1
  102. package/dist/hooks/useGlobalStyles.d.ts +0 -46
  103. package/dist/hooks/useGlobalStyles.js +0 -88
  104. package/dist/hooks/useGlobalStyles.js.map +0 -1
  105. package/dist/hooks/useKeyframes.d.ts +0 -58
  106. package/dist/hooks/useKeyframes.js +0 -55
  107. package/dist/hooks/useKeyframes.js.map +0 -1
  108. package/dist/hooks/useProperty.d.ts +0 -81
  109. package/dist/hooks/useProperty.js +0 -96
  110. package/dist/hooks/useProperty.js.map +0 -1
  111. package/dist/hooks/useRawCSS.d.ts +0 -22
  112. package/dist/hooks/useRawCSS.js +0 -103
  113. package/dist/hooks/useRawCSS.js.map +0 -1
  114. package/dist/hooks/useStyles.d.ts +0 -40
  115. package/dist/hooks/useStyles.js +0 -31
  116. package/dist/hooks/useStyles.js.map +0 -1
  117. package/dist/injector/index.d.ts +0 -182
  118. package/dist/injector/index.js +0 -185
  119. package/dist/injector/index.js.map +0 -1
  120. package/dist/injector/injector.d.ts +0 -198
  121. package/dist/injector/injector.js +0 -651
  122. package/dist/injector/injector.js.map +0 -1
  123. package/dist/injector/sheet-manager.d.ts +0 -132
  124. package/dist/injector/sheet-manager.js +0 -699
  125. package/dist/injector/sheet-manager.js.map +0 -1
  126. package/dist/injector/types.d.ts +0 -235
  127. package/dist/keyframes/index.js +0 -206
  128. package/dist/keyframes/index.js.map +0 -1
  129. package/dist/parser/classify.js +0 -319
  130. package/dist/parser/classify.js.map +0 -1
  131. package/dist/parser/const.js +0 -60
  132. package/dist/parser/const.js.map +0 -1
  133. package/dist/parser/lru.js +0 -109
  134. package/dist/parser/lru.js.map +0 -1
  135. package/dist/parser/parser.d.ts +0 -25
  136. package/dist/parser/parser.js +0 -115
  137. package/dist/parser/parser.js.map +0 -1
  138. package/dist/parser/tokenizer.js +0 -69
  139. package/dist/parser/tokenizer.js.map +0 -1
  140. package/dist/parser/types.d.ts +0 -51
  141. package/dist/parser/types.js +0 -46
  142. package/dist/parser/types.js.map +0 -1
  143. package/dist/pipeline/conditions.d.ts +0 -134
  144. package/dist/pipeline/conditions.js +0 -406
  145. package/dist/pipeline/conditions.js.map +0 -1
  146. package/dist/pipeline/exclusive.js +0 -283
  147. package/dist/pipeline/exclusive.js.map +0 -1
  148. package/dist/pipeline/index.d.ts +0 -55
  149. package/dist/pipeline/index.js +0 -708
  150. package/dist/pipeline/index.js.map +0 -1
  151. package/dist/pipeline/materialize.js +0 -1157
  152. package/dist/pipeline/materialize.js.map +0 -1
  153. package/dist/pipeline/parseStateKey.d.ts +0 -15
  154. package/dist/pipeline/parseStateKey.js +0 -446
  155. package/dist/pipeline/parseStateKey.js.map +0 -1
  156. package/dist/pipeline/simplify.js +0 -690
  157. package/dist/pipeline/simplify.js.map +0 -1
  158. package/dist/pipeline/warnings.js +0 -18
  159. package/dist/pipeline/warnings.js.map +0 -1
  160. package/dist/plugins/index.d.ts +0 -2
  161. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  162. package/dist/plugins/okhsl-plugin.js +0 -97
  163. package/dist/plugins/okhsl-plugin.js.map +0 -1
  164. package/dist/plugins/types.d.ts +0 -87
  165. package/dist/properties/index.js +0 -222
  166. package/dist/properties/index.js.map +0 -1
  167. package/dist/properties/property-type-resolver.d.ts +0 -24
  168. package/dist/properties/property-type-resolver.js +0 -90
  169. package/dist/properties/property-type-resolver.js.map +0 -1
  170. package/dist/rsc-cache.js +0 -79
  171. package/dist/rsc-cache.js.map +0 -1
  172. package/dist/ssr/async-storage.d.ts +0 -17
  173. package/dist/ssr/async-storage.js.map +0 -1
  174. package/dist/ssr/collect-auto-properties.js +0 -58
  175. package/dist/ssr/collect-auto-properties.js.map +0 -1
  176. package/dist/ssr/collector.js.map +0 -1
  177. package/dist/ssr/context.js.map +0 -1
  178. package/dist/ssr/format-global-rules.js.map +0 -1
  179. package/dist/ssr/format-keyframes.js +0 -69
  180. package/dist/ssr/format-keyframes.js.map +0 -1
  181. package/dist/ssr/format-property.js +0 -49
  182. package/dist/ssr/format-property.js.map +0 -1
  183. package/dist/ssr/format-rules.js +0 -73
  184. package/dist/ssr/format-rules.js.map +0 -1
  185. package/dist/ssr/hydrate.d.ts +0 -29
  186. package/dist/ssr/hydrate.js.map +0 -1
  187. package/dist/ssr/ssr-collector-ref.js +0 -29
  188. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  189. package/dist/states/index.d.ts +0 -49
  190. package/dist/states/index.js +0 -170
  191. package/dist/states/index.js.map +0 -1
  192. package/dist/static/tastyStatic.d.ts +0 -46
  193. package/dist/static/tastyStatic.js +0 -30
  194. package/dist/static/tastyStatic.js.map +0 -1
  195. package/dist/static/types.d.ts +0 -49
  196. package/dist/static/types.js +0 -24
  197. package/dist/static/types.js.map +0 -1
  198. package/dist/styles/border.d.ts +0 -25
  199. package/dist/styles/border.js +0 -120
  200. package/dist/styles/border.js.map +0 -1
  201. package/dist/styles/color.d.ts +0 -14
  202. package/dist/styles/color.js +0 -26
  203. package/dist/styles/color.js.map +0 -1
  204. package/dist/styles/const.js +0 -17
  205. package/dist/styles/const.js.map +0 -1
  206. package/dist/styles/createStyle.js +0 -79
  207. package/dist/styles/createStyle.js.map +0 -1
  208. package/dist/styles/dimension.js +0 -109
  209. package/dist/styles/dimension.js.map +0 -1
  210. package/dist/styles/directional.js +0 -133
  211. package/dist/styles/directional.js.map +0 -1
  212. package/dist/styles/display.d.ts +0 -30
  213. package/dist/styles/display.js +0 -73
  214. package/dist/styles/display.js.map +0 -1
  215. package/dist/styles/fade.d.ts +0 -15
  216. package/dist/styles/fade.js +0 -62
  217. package/dist/styles/fade.js.map +0 -1
  218. package/dist/styles/fill.d.ts +0 -42
  219. package/dist/styles/fill.js +0 -51
  220. package/dist/styles/fill.js.map +0 -1
  221. package/dist/styles/flow.d.ts +0 -16
  222. package/dist/styles/flow.js +0 -12
  223. package/dist/styles/flow.js.map +0 -1
  224. package/dist/styles/gap.d.ts +0 -31
  225. package/dist/styles/gap.js +0 -38
  226. package/dist/styles/gap.js.map +0 -1
  227. package/dist/styles/height.d.ts +0 -17
  228. package/dist/styles/height.js +0 -19
  229. package/dist/styles/height.js.map +0 -1
  230. package/dist/styles/index.d.ts +0 -1
  231. package/dist/styles/index.js +0 -8
  232. package/dist/styles/index.js.map +0 -1
  233. package/dist/styles/inset.d.ts +0 -24
  234. package/dist/styles/inset.js +0 -34
  235. package/dist/styles/inset.js.map +0 -1
  236. package/dist/styles/list.d.ts +0 -16
  237. package/dist/styles/list.js +0 -100
  238. package/dist/styles/list.js.map +0 -1
  239. package/dist/styles/margin.d.ts +0 -24
  240. package/dist/styles/margin.js +0 -32
  241. package/dist/styles/margin.js.map +0 -1
  242. package/dist/styles/outline.d.ts +0 -29
  243. package/dist/styles/outline.js +0 -55
  244. package/dist/styles/outline.js.map +0 -1
  245. package/dist/styles/padding.d.ts +0 -24
  246. package/dist/styles/padding.js +0 -32
  247. package/dist/styles/padding.js.map +0 -1
  248. package/dist/styles/placement.d.ts +0 -37
  249. package/dist/styles/placement.js +0 -74
  250. package/dist/styles/placement.js.map +0 -1
  251. package/dist/styles/predefined.d.ts +0 -71
  252. package/dist/styles/predefined.js +0 -237
  253. package/dist/styles/predefined.js.map +0 -1
  254. package/dist/styles/preset.d.ts +0 -52
  255. package/dist/styles/preset.js +0 -127
  256. package/dist/styles/preset.js.map +0 -1
  257. package/dist/styles/radius.d.ts +0 -12
  258. package/dist/styles/radius.js +0 -83
  259. package/dist/styles/radius.js.map +0 -1
  260. package/dist/styles/scrollMargin.d.ts +0 -24
  261. package/dist/styles/scrollMargin.js +0 -32
  262. package/dist/styles/scrollMargin.js.map +0 -1
  263. package/dist/styles/scrollbar.d.ts +0 -25
  264. package/dist/styles/scrollbar.js +0 -51
  265. package/dist/styles/scrollbar.js.map +0 -1
  266. package/dist/styles/shadow.d.ts +0 -14
  267. package/dist/styles/shadow.js +0 -25
  268. package/dist/styles/shadow.js.map +0 -1
  269. package/dist/styles/shared.js +0 -17
  270. package/dist/styles/shared.js.map +0 -1
  271. package/dist/styles/transition.d.ts +0 -14
  272. package/dist/styles/transition.js +0 -159
  273. package/dist/styles/transition.js.map +0 -1
  274. package/dist/styles/types.d.ts +0 -564
  275. package/dist/styles/width.d.ts +0 -17
  276. package/dist/styles/width.js +0 -19
  277. package/dist/styles/width.js.map +0 -1
  278. package/dist/tasty.d.ts +0 -134
  279. package/dist/tasty.js +0 -248
  280. package/dist/tasty.js.map +0 -1
  281. package/dist/types.d.ts +0 -184
  282. package/dist/utils/cache-wrapper.js +0 -21
  283. package/dist/utils/cache-wrapper.js.map +0 -1
  284. package/dist/utils/case-converter.js +0 -8
  285. package/dist/utils/case-converter.js.map +0 -1
  286. package/dist/utils/color-math.d.ts +0 -46
  287. package/dist/utils/color-math.js +0 -749
  288. package/dist/utils/color-math.js.map +0 -1
  289. package/dist/utils/color-space.d.ts +0 -5
  290. package/dist/utils/color-space.js +0 -228
  291. package/dist/utils/color-space.js.map +0 -1
  292. package/dist/utils/colors.d.ts +0 -5
  293. package/dist/utils/colors.js +0 -10
  294. package/dist/utils/colors.js.map +0 -1
  295. package/dist/utils/css-types.d.ts +0 -7
  296. package/dist/utils/deps-equal.js +0 -15
  297. package/dist/utils/deps-equal.js.map +0 -1
  298. package/dist/utils/dotize.d.ts +0 -26
  299. package/dist/utils/dotize.js +0 -122
  300. package/dist/utils/dotize.js.map +0 -1
  301. package/dist/utils/filter-base-props.d.ts +0 -15
  302. package/dist/utils/filter-base-props.js +0 -45
  303. package/dist/utils/filter-base-props.js.map +0 -1
  304. package/dist/utils/get-display-name.d.ts +0 -7
  305. package/dist/utils/get-display-name.js +0 -10
  306. package/dist/utils/get-display-name.js.map +0 -1
  307. package/dist/utils/has-keys.js +0 -13
  308. package/dist/utils/has-keys.js.map +0 -1
  309. package/dist/utils/hash.js +0 -14
  310. package/dist/utils/hash.js.map +0 -1
  311. package/dist/utils/is-dev-env.js +0 -19
  312. package/dist/utils/is-dev-env.js.map +0 -1
  313. package/dist/utils/is-valid-element-type.js +0 -15
  314. package/dist/utils/is-valid-element-type.js.map +0 -1
  315. package/dist/utils/merge-styles.js.map +0 -1
  316. package/dist/utils/mod-attrs.d.ts +0 -6
  317. package/dist/utils/mod-attrs.js +0 -20
  318. package/dist/utils/mod-attrs.js.map +0 -1
  319. package/dist/utils/process-tokens.d.ts +0 -17
  320. package/dist/utils/process-tokens.js +0 -83
  321. package/dist/utils/process-tokens.js.map +0 -1
  322. package/dist/utils/resolve-recipes.d.ts +0 -17
  323. package/dist/utils/resolve-recipes.js.map +0 -1
  324. package/dist/utils/selector-transform.js +0 -32
  325. package/dist/utils/selector-transform.js.map +0 -1
  326. package/dist/utils/string.js +0 -8
  327. package/dist/utils/string.js.map +0 -1
  328. package/dist/utils/styles.d.ts +0 -99
  329. package/dist/utils/styles.js +0 -220
  330. package/dist/utils/styles.js.map +0 -1
  331. package/dist/utils/typography.d.ts +0 -58
  332. package/dist/utils/typography.js +0 -51
  333. package/dist/utils/typography.js.map +0 -1
  334. package/dist/utils/warnings.d.ts +0 -16
  335. package/dist/utils/warnings.js +0 -16
  336. package/dist/utils/warnings.js.map +0 -1
  337. package/dist/zero/css-writer.d.ts +0 -45
  338. package/dist/zero/css-writer.js +0 -73
  339. package/dist/zero/css-writer.js.map +0 -1
  340. package/dist/zero/extractor.d.ts +0 -24
  341. package/dist/zero/extractor.js.map +0 -1
  342. package/docs/PIPELINE.md +0 -519
@@ -0,0 +1,1778 @@
1
+ import { Dt as StyleInjectorConfig, I as StyleValue, L as StyleValueStateMap, b as Styles, bt as KeyframesResult, ct as CacheMetrics, dt as FontFaceDescriptors, ft as FontFaceInput, gt as InjectResult, ht as GlobalInjectResult, it as StyleDetails, lt as CounterStyleDescriptors, mt as GCOptions, n as StyleResult, st as CSSProperties$1, x as StylesInterface, xt as KeyframesSteps } from "./index-C5owZ15q.js";
2
+ import { g as TastyPluginFactory, x as StyleInjector } from "./config-C3SKYuxY.js";
3
+ import { t as ServerStyleCollector } from "./collector-CddJZDOr.js";
4
+ import { AllHTMLAttributes, CSSProperties, ComponentType, ElementType, ForwardRefExoticComponent, JSX, PropsWithoutRef, RefAttributes } from "react";
5
+
6
+ //#region src/utils/name-prefix.d.ts
7
+ /**
8
+ * Name prefix utilities for generated identifiers.
9
+ *
10
+ * Tasty generates three kinds of identifiers from content hashes:
11
+ * - class names (used in DOM `class` attribute)
12
+ * - keyframe names (used in CSS `animation`)
13
+ * - counter-style names (used in CSS `list-style-type`)
14
+ *
15
+ * All three derive from a single configurable prefix so that an app
16
+ * can namespace every identifier under one string. Discriminator letters
17
+ * (`k`, `c`) keep the three kinds visually distinct in devtools — they
18
+ * are not required for correctness (CSS keeps these in separate
19
+ * namespaces), only for readability.
20
+ *
21
+ * The runtime / SSR / RSC paths must agree on the prefix; otherwise the
22
+ * client-side hash for a given style will not match the server-rendered
23
+ * class and hydration breaks. The zero-runtime build path uses a
24
+ * different default (`'ts'`) so its classes can't collide with runtime
25
+ * (`'t'`) classes when both are loaded on the same page.
26
+ */
27
+ /** Default prefix used by the runtime / SSR / RSC paths. */
28
+ declare const DEFAULT_NAME_PREFIX = "t";
29
+ /** Default prefix used by the zero-runtime (`tastyStatic`) build path. */
30
+ declare const DEFAULT_ZERO_NAME_PREFIX = "ts";
31
+ //#endregion
32
+ //#region src/styles/list.d.ts
33
+ declare const BASE_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition"];
34
+ declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin"];
35
+ declare const BLOCK_INNER_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign"];
36
+ declare const BLOCK_OUTER_STYLES: readonly ["border", "radius", "shadow", "outline"];
37
+ declare const BLOCK_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline"];
38
+ declare const COLOR_STYLES: readonly ["color", "fill", "fade", "image"];
39
+ declare const TEXT_STYLES: readonly ["textTransform", "fontWeight", "fontStyle"];
40
+ declare const DIMENSION_STYLES: readonly ["width", "height", "flexBasis", "flexGrow", "flexShrink", "flex"];
41
+ declare const FLOW_STYLES: readonly ["flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
42
+ declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
43
+ declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "radius", "shadow", "outline"];
44
+ declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
45
+ //#endregion
46
+ //#region src/types.d.ts
47
+ interface GlobalStyledProps {
48
+ breakpoints?: number[];
49
+ }
50
+ /**
51
+ * Extensible interface for theme names.
52
+ * Augment this interface to register project-specific theme names for autocomplete.
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * declare module '@tenphi/tasty' {
57
+ * interface TastyThemeNames {
58
+ * danger: true;
59
+ * success: true;
60
+ * }
61
+ * }
62
+ * ```
63
+ */
64
+ interface TastyThemeNames {}
65
+ type ThemeNameKey = Extract<keyof TastyThemeNames, string>;
66
+ type ThemeName = [ThemeNameKey] extends [never] ? string : ThemeNameKey;
67
+ /** Allowed mod value types */
68
+ type ModValue = boolean | string | number | undefined | null;
69
+ /**
70
+ * Type for element modifiers (mods prop).
71
+ * Can be used as a generic to define known modifiers with autocomplete:
72
+ * @example
73
+ * type ButtonMods = Mods<{
74
+ * loading?: boolean;
75
+ * selected?: boolean;
76
+ * }>;
77
+ */
78
+ type Mods<T extends Record<string, ModValue> = Record<string, ModValue>> = T & Record<string, ModValue>;
79
+ /**
80
+ * Token value: string or number (processed), boolean for special handling, undefined/null (skipped).
81
+ * For color tokens (#name), boolean `true` is converted to `transparent`.
82
+ * For non-color tokens ($name), boolean `true` results in an empty string value.
83
+ * Boolean `false` results in no CSS output (token is skipped).
84
+ */
85
+ type TokenValue = string | number | boolean | undefined | null;
86
+ /**
87
+ * Tokens definition for inline CSS custom properties.
88
+ * - `$name` keys become `--name` CSS properties
89
+ * - `#name` keys become `--name-color` and `--name-color-{colorSpace}` CSS properties
90
+ */
91
+ type Tokens = Record<`$${string}` | `#${string}`, TokenValue>;
92
+ type Caps = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
93
+ interface BasePropsWithoutChildren<K extends TagName = TagName> extends Pick<AllHTMLAttributes<HTMLElement>, 'className' | 'role' | 'id'> {
94
+ /** The HTML tag or React component to render as */
95
+ as?: K | ComponentType<any>;
96
+ /** QA ID for e2e testing. An alias for `data-qa` attribute. */
97
+ qa?: string;
98
+ /** QA value for e2e testing. An alias for `data-qaval` attribute. */
99
+ qaVal?: string | number;
100
+ /** Inner element name */
101
+ element?: `${Caps}${string}`;
102
+ /** The style map */
103
+ styles?: Styles;
104
+ /** The list of responsive points in pixels */
105
+ breakpoints?: number[];
106
+ /** Whether the element has the block layout outside */
107
+ block?: boolean;
108
+ /** Whether the element has the inline layout outside */
109
+ inline?: boolean;
110
+ /** The list of element modifiers **/
111
+ mods?: Mods;
112
+ /** Whether the element is hidden (`hidden` attribute is set) */
113
+ isHidden?: boolean;
114
+ /** Whether the element is disabled (`disabled` attribute is set) */
115
+ isDisabled?: boolean;
116
+ /** Plain css for the element */
117
+ css?: string;
118
+ /** The CSS style map */
119
+ style?: CSSProperties$1 | (CSSProperties$1 & Record<string, string | number | null | undefined>);
120
+ /** User-defined theme for the element. Mapped to `data-theme` attribute. Augment `TastyThemeNames` to register project-specific themes for autocomplete. */
121
+ theme?: ThemeName | (string & {});
122
+ /** CSS custom property tokens rendered as inline styles */
123
+ tokens?: Tokens;
124
+ }
125
+ interface BaseProps<K extends TagName = TagName> extends BasePropsWithoutChildren<K>, Pick<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'children'> {}
126
+ interface AllBaseProps<K extends TagName = TagName> extends BaseProps<K>, Omit<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'style' | 'disabled' | 'hidden' | 'css' | 'content' | 'translate' | 'as' | 'form' | 'bgcolor' | 'background' | 'align' | 'border' | 'color' | 'height' | 'size' | 'width' | 'prefix'> {}
127
+ type BaseStyleProps = Pick<Styles, (typeof BASE_STYLES)[number]>;
128
+ type PositionStyleProps = Pick<Styles, (typeof POSITION_STYLES)[number]>;
129
+ type BlockStyleProps = Pick<Styles, (typeof BLOCK_STYLES)[number]>;
130
+ type BlockInnerStyleProps = Pick<Styles, (typeof BLOCK_INNER_STYLES)[number]>;
131
+ type BlockOuterStyleProps = Pick<Styles, (typeof BLOCK_OUTER_STYLES)[number]>;
132
+ type ColorStyleProps = Pick<Styles, (typeof COLOR_STYLES)[number]>;
133
+ type TextStyleProps = Pick<Styles, (typeof TEXT_STYLES)[number]>;
134
+ type DimensionStyleProps = Pick<Styles, (typeof DIMENSION_STYLES)[number]>;
135
+ type FlowStyleProps = Pick<Styles, (typeof FLOW_STYLES)[number]>;
136
+ type ContainerStyleProps = Pick<Styles, (typeof CONTAINER_STYLES)[number]>;
137
+ type OuterStyleProps = Pick<Styles, (typeof OUTER_STYLES)[number]>;
138
+ type InnerStyleProps = Pick<Styles, (typeof INNER_STYLES)[number]>;
139
+ interface ShortGridStyles {
140
+ template?: Styles['gridTemplate'];
141
+ columns?: Styles['gridColumns'];
142
+ rows?: Styles['gridRows'];
143
+ areas?: Styles['gridAreas'];
144
+ }
145
+ type Props = Record<string, any>;
146
+ type TagName = keyof HTMLElementTagNameMap;
147
+ /**
148
+ * Configuration type for tasty.config.ts files.
149
+ * Used by the Tasty VSCode extension for validation and autocomplete.
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * import type { TastyExtensionConfig } from '@tenphi/tasty';
154
+ *
155
+ * const config: TastyExtensionConfig = {
156
+ * tokens: ['#primary', '#danger', '$spacing'],
157
+ * units: ['x', 'r', 'bw'],
158
+ * states: ['@mobile', '@tablet', '@dark'],
159
+ * presets: ['h1', 'h2', 't1', 't2'],
160
+ * };
161
+ *
162
+ * export default config;
163
+ * ```
164
+ */
165
+ interface TastyExtensionConfig {
166
+ /**
167
+ * Extend another config file. Path is relative to this config file.
168
+ * The extended config is merged first, then this config's values are added.
169
+ * @example '../tasty.config.ts'
170
+ */
171
+ extends?: string;
172
+ /**
173
+ * Valid token names for validation and autocomplete.
174
+ * Use # prefix for colors, $ prefix for custom properties.
175
+ * Set to `false` to disable token validation (overrides parent).
176
+ * @example ['#primary', '#danger', '$spacing', '$gap']
177
+ */
178
+ tokens?: false | string[];
179
+ /**
180
+ * Valid custom unit names.
181
+ * Set to `false` to disable unit validation (overrides parent).
182
+ * @example ['x', 'r', 'bw', 'cols']
183
+ */
184
+ units?: false | string[];
185
+ /**
186
+ * Valid custom function names.
187
+ * Set to `false` to disable function validation (overrides parent).
188
+ * @example ['clamp', 'double']
189
+ */
190
+ funcs?: false | string[];
191
+ /**
192
+ * State alias names for autocomplete.
193
+ * Must start with @ prefix.
194
+ * @example ['@mobile', '@tablet', '@dark']
195
+ */
196
+ states?: string[];
197
+ /**
198
+ * Valid preset names for the `preset` style property.
199
+ * Tasty has no built-in presets - they are project-specific.
200
+ * @example ['h1', 'h2', 'h3', 't1', 't2', 't3', 'tag']
201
+ */
202
+ presets?: string[];
203
+ /**
204
+ * Custom style property names added via configure({ handlers }).
205
+ * Suppresses "unknown property" warnings for these names.
206
+ * @example ['myGradient', 'customLayout', 'brandBorder']
207
+ */
208
+ styles?: string[];
209
+ /**
210
+ * Descriptions for presets, shown on hover in the extension.
211
+ * Maps preset names to human-readable descriptions.
212
+ * @example { h1: 'Heading 1 (36px/44px, semibold)', t1: 'Text large (18px/24px)' }
213
+ */
214
+ presetDescriptions?: Record<string, string>;
215
+ /**
216
+ * Descriptions for state aliases, shown on hover in the extension.
217
+ * Maps state names to human-readable descriptions.
218
+ * @example { '@mobile': 'Mobile viewport (width < 768px)' }
219
+ */
220
+ stateDescriptions?: Record<string, string>;
221
+ }
222
+ //#endregion
223
+ //#region src/tasty.d.ts
224
+ type StyleList = readonly (keyof { [key in keyof StylesInterface]: StylesInterface[key] })[];
225
+ /** Type descriptor for a single mod prop: a JS constructor or an enum array. */
226
+ type ModPropDef = BooleanConstructor | StringConstructor | NumberConstructor | readonly string[];
227
+ /** Array form: list of mod key names (types default to ModValue). */
228
+ type ModPropsList = readonly string[];
229
+ /** Object form: map of mod key names to type descriptors. */
230
+ type ModPropsMap = Readonly<Record<string, ModPropDef>>;
231
+ /** Either array or object form accepted by `modProps` option. */
232
+ type ModPropsInput = ModPropsList | ModPropsMap;
233
+ /** Resolve a single ModPropDef to its TypeScript type. */
234
+ type ResolveModPropDef<T> = T extends BooleanConstructor ? boolean : T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends readonly (infer U)[] ? U : ModValue;
235
+ /** Resolve an entire `modProps` definition to the component prop types it adds. */
236
+ type ResolveModProps<M extends ModPropsInput> = M extends readonly (infer K)[] ? Partial<Record<K & string, ModValue>> : M extends Record<string, ModPropDef> ? { [key in keyof M & string]?: ResolveModPropDef<M[key]> } : {};
237
+ /** A token key with `$` or `#` prefix. */
238
+ type TokenPropKey = `$${string}` | `#${string}`;
239
+ /** Array form: list of prop names. Names ending in `Color` map to `#` color tokens. */
240
+ type TokenPropsList = readonly string[];
241
+ /** Object form: prop name -> token key with explicit `$`/`#` prefix. */
242
+ type TokenPropsMap = Readonly<Record<string, TokenPropKey>>;
243
+ /** Either array or object form accepted by `tokenProps` option. */
244
+ type TokenPropsInput = TokenPropsList | TokenPropsMap;
245
+ /** Resolve a `tokenProps` definition to the component prop types it adds. */
246
+ type ResolveTokenProps<TP extends TokenPropsInput> = TP extends readonly (infer K)[] ? Partial<Record<K & string, TokenValue>> : TP extends Record<string, TokenPropKey> ? Partial<Record<keyof TP & string, TokenValue>> : {};
247
+ type PropsWithStyles = {
248
+ styles?: Styles;
249
+ } & Omit<Props, 'styles'>;
250
+ type VariantMap = Record<string, Styles>;
251
+ interface WithVariant<V extends VariantMap> {
252
+ variant?: keyof V;
253
+ }
254
+ /**
255
+ * Definition for a sub-element. Can be either:
256
+ * - A tag name string (e.g., 'div', 'span')
257
+ * - An object with configuration options
258
+ */
259
+ type SubElementDefinition<Tag extends keyof JSX.IntrinsicElements = 'div'> = Tag | {
260
+ as?: Tag;
261
+ qa?: string;
262
+ qaVal?: string | number;
263
+ };
264
+ /**
265
+ * Map of sub-element definitions.
266
+ * Keys become the sub-component names (e.g., { Icon: 'span' } -> Component.Icon)
267
+ */
268
+ type ElementsDefinition = Record<string, SubElementDefinition<keyof JSX.IntrinsicElements>>;
269
+ /**
270
+ * Resolves the tag from a SubElementDefinition
271
+ */
272
+ type ResolveElementTag<T extends SubElementDefinition<any>> = T extends string ? T : T extends {
273
+ as?: infer Tag;
274
+ } ? Tag extends keyof JSX.IntrinsicElements ? Tag : 'div' : 'div';
275
+ /**
276
+ * Props for sub-element components.
277
+ * Combines HTML attributes with tasty-specific props (qa, qaVal, mods, tokens, isDisabled, etc.)
278
+ */
279
+ type SubElementProps<Tag extends keyof JSX.IntrinsicElements = 'div'> = Omit<JSX.IntrinsicElements[Tag], 'ref' | 'color' | 'content' | 'translate'> & {
280
+ qa?: string;
281
+ qaVal?: string | number;
282
+ mods?: Mods;
283
+ tokens?: Tokens;
284
+ isDisabled?: boolean;
285
+ isHidden?: boolean;
286
+ isChecked?: boolean;
287
+ };
288
+ /**
289
+ * Generates the sub-element component types from an ElementsDefinition
290
+ */
291
+ type SubElementComponents<E extends ElementsDefinition> = { [K in keyof E]: ForwardRefExoticComponent<PropsWithoutRef<SubElementProps<ResolveElementTag<E[K]>>> & RefAttributes<ResolveElementTag<E[K]> extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[ResolveElementTag<E[K]>] : Element$1>> };
292
+ /**
293
+ * Base type containing common properties shared between TastyProps and TastyElementOptions.
294
+ * Separated to avoid code duplication while allowing different type constraints.
295
+ */
296
+ type TastyBaseProps<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = {
297
+ /** Default styles of the element. */styles?: Styles; /** The list of styles that can be provided by props */
298
+ styleProps?: K; /** Modifier keys exposed as top-level component props (array or typed object form). */
299
+ modProps?: M; /** Token keys exposed as top-level component props (array or typed object form). */
300
+ tokenProps?: TP;
301
+ element?: BaseProps['element'];
302
+ variants?: V; /** Default tokens for inline CSS custom properties */
303
+ tokens?: Tokens; /** Sub-element definitions for compound components */
304
+ elements?: E;
305
+ } & Pick<BaseProps, 'qa' | 'qaVal'> & WithVariant<V>;
306
+ type TastyProps<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, DefaultProps = Props, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = TastyBaseProps<K, V, E, M, TP> & {
307
+ /** The tag name of the element or a React component. */as?: string | ComponentType<any>;
308
+ } & Partial<Omit<DefaultProps, 'as' | 'styles' | 'styleProps' | 'modProps' | 'tokenProps' | 'tokens'>>;
309
+ /**
310
+ * Resolves the props of a polymorphic `as` value (intrinsic tag or component).
311
+ * - For intrinsic tags (`'div'`, `'button'`, ...): returns `JSX.IntrinsicElements[Tag]`.
312
+ * - For React component types: returns the component's own props.
313
+ * - Falls back to an empty record for anything else.
314
+ */
315
+ type ResolveAsProps<AsType extends ElementType> = AsType extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[AsType] : AsType extends ComponentType<infer P> ? P : Record<string, never>;
316
+ /**
317
+ * TastyElementOptions is used for the element-creation overload of tasty().
318
+ * It includes an `AsType` generic that allows TypeScript to infer the correct
319
+ * element type from the `as` prop — both for intrinsic tags and for React
320
+ * components (so the wrapped component's prop API is preserved).
321
+ *
322
+ * Note: Uses a separate index signature with `unknown` instead of inheriting
323
+ * from Props (which has `any`) to ensure strict type checking for styles.
324
+ */
325
+ type TastyElementOptions<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = TastyBaseProps<K, V, E, M, TP> & {
326
+ /** The tag name of the element or a React component. */as?: AsType;
327
+ } & Record<string, unknown>;
328
+ type AllBasePropsWithMods<K extends StyleList, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = AllBaseProps & { [key in K[number]]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]> } & BaseStyleProps & ResolveModProps<M> & ResolveTokenProps<TP>;
329
+ /**
330
+ * Keys from BasePropsWithoutChildren that should be omitted from HTML attributes.
331
+ * This excludes event handlers so they can be properly typed from JSX.IntrinsicElements.
332
+ */
333
+ type TastySpecificKeys = 'as' | 'qa' | 'qaVal' | 'element' | 'styles' | 'breakpoints' | 'block' | 'inline' | 'mods' | 'isHidden' | 'isDisabled' | 'css' | 'style' | 'theme' | 'tokens' | 'ref' | 'color';
334
+ /** Extract prop key names from a ModPropsInput (array elements or object keys). */
335
+ type ModPropsKeys<M extends ModPropsInput> = M extends readonly (infer K)[] ? K & string : keyof M & string;
336
+ /** Extract prop key names from a TokenPropsInput (array elements or object keys). */
337
+ type TokenPropsKeys<TP extends TokenPropsInput> = TP extends readonly (infer K)[] ? K & string : keyof TP & string;
338
+ /**
339
+ * Props type for tasty elements that combines:
340
+ * - AllBasePropsWithMods for style props with strict tokens type
341
+ * - HTML attributes for flexibility (properly typed based on `as`)
342
+ * - Variant support
343
+ *
344
+ * AllBasePropsWithMods carries generic AllHTMLAttributes which can conflict
345
+ * with element-specific types (e.g. `src` is `string` in AllHTMLAttributes but
346
+ * `string | Blob` in ImgHTMLAttributes, or the custom props on a third-party
347
+ * component like Next.js `Link`). To avoid intersection-narrowing, we Omit
348
+ * element-specific keys from AllBasePropsWithMods (keeping TastySpecificKeys,
349
+ * style props, mod props, and token props) and let the resolved `as` props
350
+ * supply the authoritative attribute types. The `AllHTMLAttributes<HTMLElement>`
351
+ * baseline is preserved so generic HTML attributes still work even when `as`
352
+ * is a component type with a narrower prop API.
353
+ */
354
+ type TastyElementProps<K extends StyleList, V extends VariantMap, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]> = Omit<AllBasePropsWithMods<K, M, TP>, Exclude<keyof ResolveAsProps<AsType>, TastySpecificKeys | K[number] | ModPropsKeys<M> | TokenPropsKeys<TP>>> & WithVariant<V> & Omit<Omit<AllHTMLAttributes<HTMLElement>, keyof ResolveAsProps<AsType>> & ResolveAsProps<AsType>, TastySpecificKeys | K[number] | ModPropsKeys<M> | TokenPropsKeys<TP>>;
355
+ type TastyComponentPropsWithDefaults<Props extends PropsWithStyles, DefaultProps extends Partial<Props>> = keyof DefaultProps extends never ? Props : { [key in Extract<keyof Props, keyof DefaultProps>]?: Props[key] } & { [key in keyof Omit<Props, keyof DefaultProps>]: Props[key] };
356
+ /**
357
+ * The component type returned by the `tasty(options)` element-factory overload.
358
+ *
359
+ * It's a regular React forward-ref component whose props are typed from the
360
+ * factory-time `as` value. Polymorphism is at factory time: each call to
361
+ * `tasty({ as: X })` produces a component whose prop API includes `X`'s own
362
+ * props (so `tasty({ as: NextLink })` exposes `href`, `replace`, `prefetch`,
363
+ * etc.) alongside the Tasty-specific props (`mods`, `tokens`, `styleProps`,
364
+ * `modProps`, `tokenProps`).
365
+ *
366
+ * Note: a render-time `<X as={SomeComponent} />` does not re-infer props from
367
+ * `SomeComponent`; create another `tasty({ as: SomeComponent })` for that.
368
+ */
369
+ type TastyPolymorphicComponent<DefaultAs extends ElementType, K extends StyleList, V extends VariantMap, M extends ModPropsInput, TP extends TokenPropsInput> = ForwardRefExoticComponent<PropsWithoutRef<TastyElementProps<K, V, DefaultAs, M, TP>> & RefAttributes<unknown>>;
370
+ declare function tasty<K extends StyleList, V extends VariantMap, E extends ElementsDefinition = Record<string, never>, AsType extends ElementType = 'div', M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]>(options: TastyElementOptions<K, V, E, AsType, M, TP>, secondArg?: never): TastyPolymorphicComponent<AsType, K, V, M, TP> & SubElementComponents<E>;
371
+ declare function tasty<Props extends PropsWithStyles, DefaultProps extends Partial<Props> = Partial<Props>, K extends StyleList = readonly never[], V extends VariantMap = VariantMap, E extends ElementsDefinition = Record<string, never>, M extends ModPropsInput = readonly never[], TP extends TokenPropsInput = readonly never[]>(Component: ComponentType<Props>, options?: TastyProps<K, V, E, Props, M, TP>): ComponentType<TastyComponentPropsWithDefaults<Props, DefaultProps>>;
372
+ declare const Element$1: TastyPolymorphicComponent<"div", StyleList, VariantMap, readonly never[], readonly never[]> & SubElementComponents<Record<string, never>>;
373
+ //#endregion
374
+ //#region src/hooks/useStyles.d.ts
375
+ /**
376
+ * Tasty styles object to generate CSS classes for.
377
+ * Can be undefined or empty object for no styles.
378
+ */
379
+ type UseStylesOptions = Styles | undefined;
380
+ interface UseStylesResult {
381
+ /**
382
+ * Generated className(s) to apply to the element.
383
+ * Can be empty string if no styles are provided.
384
+ * With chunking enabled, may contain multiple space-separated class names.
385
+ */
386
+ className: string;
387
+ }
388
+ /**
389
+ * Hook to generate CSS classes from Tasty styles.
390
+ * Thin wrapper around `computeStyles()` that adds React context-based
391
+ * SSR collector discovery for backward compatibility with TastyRegistry.
392
+ *
393
+ * For hook-free usage (e.g. in server components), use `computeStyles()` directly.
394
+ *
395
+ * @example
396
+ * ```tsx
397
+ * function MyComponent() {
398
+ * const { className } = useStyles({
399
+ * padding: '2x',
400
+ * fill: '#purple',
401
+ * radius: '1r',
402
+ * });
403
+ *
404
+ * return <div className={className}>Styled content</div>;
405
+ * }
406
+ * ```
407
+ */
408
+ declare function useStyles(styles: UseStylesOptions, options?: {
409
+ root?: Document | ShadowRoot;
410
+ }): UseStylesResult;
411
+ //#endregion
412
+ //#region src/hooks/useGlobalStyles.d.ts
413
+ interface UseGlobalStylesOptions {
414
+ /**
415
+ * Stable identifier for update tracking (client-only). When provided,
416
+ * changing the styles will dispose the previous injection and inject the
417
+ * new one. Without an id, the selector is used as the slot key.
418
+ * In RSC mode, renders are single-pass so update tracking does not apply.
419
+ */
420
+ id?: string;
421
+ /** Shadow root or document to inject into (client only). */
422
+ root?: Document | ShadowRoot;
423
+ }
424
+ /**
425
+ * Inject global styles for a given selector.
426
+ * Useful for styling elements by selector without generating classNames.
427
+ *
428
+ * SSR-aware: when a ServerStyleCollector is available, CSS is collected
429
+ * during the render phase instead of being injected into the DOM.
430
+ *
431
+ * Works in all environments: client, SSR with collector, and React Server Components.
432
+ *
433
+ * Injected styles are permanent — they are not cleaned up on component unmount.
434
+ * Use the `id` option for update tracking when styles change over the
435
+ * component lifecycle.
436
+ *
437
+ * @param selector - CSS selector to apply styles to (e.g., '.my-class', ':root', 'body')
438
+ * @param styles - Tasty styles object
439
+ * @param options - Optional settings including `id` for update tracking
440
+ *
441
+ * @example
442
+ * ```tsx
443
+ * function MyComponent() {
444
+ * useGlobalStyles('.card', {
445
+ * padding: '2x',
446
+ * radius: '1r',
447
+ * fill: '#white',
448
+ * });
449
+ *
450
+ * return <div className="card">Content</div>;
451
+ * }
452
+ * ```
453
+ */
454
+ declare function useGlobalStyles(selector: string, styles?: Styles, options?: UseGlobalStylesOptions): void;
455
+ //#endregion
456
+ //#region src/hooks/useRawCSS.d.ts
457
+ interface UseRawCSSOptions {
458
+ /**
459
+ * Shadow root or document to inject into.
460
+ * Note: `root` is not part of the update-tracking comparison — changing
461
+ * only the root for the same id/content will not re-inject.
462
+ */
463
+ root?: Document | ShadowRoot;
464
+ /**
465
+ * Stable identifier for update tracking (client-only). When provided,
466
+ * changing the CSS content will dispose the previous injection and inject
467
+ * the new one. Without an id, deduplication is purely content-based (same
468
+ * CSS is injected only once). In RSC mode, renders are single-pass so
469
+ * update tracking does not apply.
470
+ */
471
+ id?: string;
472
+ }
473
+ declare function useRawCSS(css: string, options?: UseRawCSSOptions): void;
474
+ declare function useRawCSS(factory: () => string, deps: readonly unknown[], options?: UseRawCSSOptions): void;
475
+ //#endregion
476
+ //#region src/hooks/useKeyframes.d.ts
477
+ interface UseKeyframesOptions {
478
+ name?: string;
479
+ root?: Document | ShadowRoot;
480
+ }
481
+ /**
482
+ * Inject CSS @keyframes and return the generated animation name.
483
+ * Deduplicates by content — identical steps always return the same name.
484
+ *
485
+ * Works in all environments: client, SSR with collector, and React Server Components.
486
+ *
487
+ * @example Basic usage - steps object is the dependency
488
+ * ```tsx
489
+ * function MyComponent() {
490
+ * const bounce = useKeyframes({
491
+ * '0%': { transform: 'scale(1)' },
492
+ * '50%': { transform: 'scale(1.1)' },
493
+ * '100%': { transform: 'scale(1)' },
494
+ * });
495
+ *
496
+ * return <div style={{ animation: `${bounce} 1s infinite` }}>Bouncing</div>;
497
+ * }
498
+ * ```
499
+ *
500
+ * @example With custom name
501
+ * ```tsx
502
+ * function MyComponent() {
503
+ * const fadeIn = useKeyframes(
504
+ * { from: { opacity: 0 }, to: { opacity: 1 } },
505
+ * { name: 'fadeIn' }
506
+ * );
507
+ *
508
+ * return <div style={{ animation: `${fadeIn} 0.3s ease-out` }}>Fading in</div>;
509
+ * }
510
+ * ```
511
+ *
512
+ * @example Factory function with dependencies
513
+ * ```tsx
514
+ * function MyComponent({ scale }: { scale: number }) {
515
+ * const pulse = useKeyframes(
516
+ * () => ({
517
+ * '0%': { transform: 'scale(1)' },
518
+ * '100%': { transform: `scale(${scale})` },
519
+ * }),
520
+ * [scale]
521
+ * );
522
+ *
523
+ * return <div style={{ animation: `${pulse} 1s infinite` }}>Pulsing</div>;
524
+ * }
525
+ * ```
526
+ */
527
+ declare function useKeyframes(steps: KeyframesSteps, options?: UseKeyframesOptions): string;
528
+ declare function useKeyframes(factory: () => KeyframesSteps, deps: readonly unknown[], options?: UseKeyframesOptions): string;
529
+ //#endregion
530
+ //#region src/hooks/useProperty.d.ts
531
+ interface UsePropertyOptions {
532
+ /**
533
+ * CSS syntax string for the property (e.g., '<color>', '<length>', '<angle>').
534
+ * For color tokens (#name), this is auto-set to '<color>' and cannot be overridden.
535
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
536
+ */
537
+ syntax?: string;
538
+ /**
539
+ * Whether the property inherits from parent elements
540
+ * @default true
541
+ */
542
+ inherits?: boolean;
543
+ /**
544
+ * Initial value for the property.
545
+ * For color tokens (#name), this defaults to 'transparent' if not specified.
546
+ */
547
+ initialValue?: string | number;
548
+ /**
549
+ * Shadow root or document to inject into
550
+ */
551
+ root?: Document | ShadowRoot;
552
+ }
553
+ /**
554
+ * Register a CSS @property custom property.
555
+ * This enables advanced features like animating custom properties.
556
+ *
557
+ * Note: @property rules are global and persistent once defined.
558
+ * The function ensures the property is only registered once per root.
559
+ *
560
+ * Accepts tasty token syntax for the property name:
561
+ * - `$name` → defines `--name`
562
+ * - `#name` → defines `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')
563
+ * - `--name` → defines `--name` (legacy format)
564
+ *
565
+ * Works in all environments: client, SSR with collector, and React Server Components.
566
+ *
567
+ * @param name - The property token ($name, #name) or CSS property name (--name)
568
+ * @param options - Property configuration
569
+ *
570
+ * @example Basic property with token syntax
571
+ * ```tsx
572
+ * function Spinner() {
573
+ * useProperty('$rotation', {
574
+ * syntax: '<angle>',
575
+ * inherits: false,
576
+ * initialValue: '0deg',
577
+ * });
578
+ *
579
+ * return <div className="spinner" />;
580
+ * }
581
+ * ```
582
+ *
583
+ * @example Color property with token syntax (auto-sets syntax)
584
+ * ```tsx
585
+ * function MyComponent() {
586
+ * useProperty('#theme', {
587
+ * initialValue: 'red', // syntax: '<color>' is auto-set
588
+ * });
589
+ *
590
+ * // Now --theme-color can be animated with CSS transitions
591
+ * return <div style={{ '--theme-color': 'blue' } as React.CSSProperties}>Colored</div>;
592
+ * }
593
+ * ```
594
+ *
595
+ * @example Legacy format (still supported)
596
+ * ```tsx
597
+ * function ResizableBox() {
598
+ * useProperty('--box-size', {
599
+ * syntax: '<length>',
600
+ * initialValue: '100px',
601
+ * });
602
+ *
603
+ * return <div style={{ width: 'var(--box-size)' }} />;
604
+ * }
605
+ * ```
606
+ */
607
+ declare function useProperty(name: string, options?: UsePropertyOptions): void;
608
+ //#endregion
609
+ //#region src/hooks/useFontFace.d.ts
610
+ interface UseFontFaceOptions {
611
+ root?: Document | ShadowRoot;
612
+ }
613
+ /**
614
+ * Inject CSS @font-face rules.
615
+ * Permanent — no cleanup on unmount. Deduplicates by content hash.
616
+ *
617
+ * Works in all environments: client, SSR with collector, and React Server Components.
618
+ *
619
+ * @param family - The font-family name
620
+ * @param input - Single descriptor object or array of descriptors (for multiple weights/styles)
621
+ * @param options - Optional settings (e.g. Shadow DOM root)
622
+ *
623
+ * @example Single weight
624
+ * ```tsx
625
+ * function App() {
626
+ * useFontFace('Brand Sans', {
627
+ * src: 'url("/fonts/brand-sans.woff2") format("woff2")',
628
+ * fontWeight: '400 700',
629
+ * fontDisplay: 'swap',
630
+ * });
631
+ *
632
+ * return <div style={{ fontFamily: '"Brand Sans", sans-serif' }}>Hello</div>;
633
+ * }
634
+ * ```
635
+ *
636
+ * @example Multiple weights
637
+ * ```tsx
638
+ * function App() {
639
+ * useFontFace('Brand Sans', [
640
+ * { src: 'url("/fonts/brand-regular.woff2") format("woff2")', fontWeight: 400, fontDisplay: 'swap' },
641
+ * { src: 'url("/fonts/brand-bold.woff2") format("woff2")', fontWeight: 700, fontDisplay: 'swap' },
642
+ * ]);
643
+ *
644
+ * return <div style={{ fontFamily: '"Brand Sans", sans-serif' }}>Hello</div>;
645
+ * }
646
+ * ```
647
+ */
648
+ declare function useFontFace(family: string, input: FontFaceInput, options?: UseFontFaceOptions): void;
649
+ //#endregion
650
+ //#region src/hooks/useCounterStyle.d.ts
651
+ interface UseCounterStyleOptions {
652
+ name?: string;
653
+ root?: Document | ShadowRoot;
654
+ }
655
+ /**
656
+ * Inject a CSS @counter-style rule and return the generated name.
657
+ * Permanent — no cleanup on unmount. Deduplicates by name.
658
+ *
659
+ * Works in all environments: client, SSR with collector, and React Server Components.
660
+ *
661
+ * @example Basic usage
662
+ * ```tsx
663
+ * function EmojiList() {
664
+ * const styleName = useCounterStyle({
665
+ * system: 'cyclic',
666
+ * symbols: '"👍"',
667
+ * suffix: '" "',
668
+ * }, { name: 'thumbs' });
669
+ *
670
+ * return (
671
+ * <ol style={{ listStyleType: styleName }}>
672
+ * <li>First</li>
673
+ * <li>Second</li>
674
+ * </ol>
675
+ * );
676
+ * }
677
+ * ```
678
+ *
679
+ */
680
+ declare function useCounterStyle(descriptors: CounterStyleDescriptors, options?: UseCounterStyleOptions): string;
681
+ //#endregion
682
+ //#region src/utils/get-display-name.d.ts
683
+ declare function getDisplayName<T>(Component: ElementType<T>, fallbackName?: string): string;
684
+ //#endregion
685
+ //#region src/index.d.ts
686
+ declare module './utils/css-types' {
687
+ interface CSSProperties extends CSSProperties {}
688
+ }
689
+ //#endregion
690
+ //#region src/plugins/okhsl-plugin.d.ts
691
+ /**
692
+ * The okhsl function handler for tasty parser.
693
+ * Receives parsed style groups and returns an RGB color string.
694
+ */
695
+ declare const okhslFunc: (groups: StyleDetails[]) => string;
696
+ /**
697
+ * OKHSL Plugin for Tasty.
698
+ *
699
+ * Adds support for the `okhsl()` color function in tasty styles.
700
+ *
701
+ * @example
702
+ * ```ts
703
+ * import { configure } from '@tenphi/tasty';
704
+ * import { okhslPlugin } from '@tenphi/tasty';
705
+ *
706
+ * configure({
707
+ * plugins: [okhslPlugin()],
708
+ * });
709
+ *
710
+ * // Now you can use okhsl in styles:
711
+ * const Box = tasty({
712
+ * styles: {
713
+ * fill: 'okhsl(240 50% 50%)',
714
+ * },
715
+ * });
716
+ * ```
717
+ */
718
+ declare const okhslPlugin: TastyPluginFactory;
719
+ //#endregion
720
+ //#region src/plugins/okhst-plugin.d.ts
721
+ /**
722
+ * The okhst function handler for tasty parser.
723
+ * Receives parsed style groups and returns an RGB color string.
724
+ */
725
+ declare const okhstFunc: (groups: StyleDetails[]) => string;
726
+ /**
727
+ * OKHST Plugin for Tasty.
728
+ *
729
+ * Adds support for the `okhst()` color function in tasty styles.
730
+ *
731
+ * @example
732
+ * ```ts
733
+ * import { configure } from '@tenphi/tasty';
734
+ * import { okhstPlugin } from '@tenphi/tasty';
735
+ *
736
+ * configure({
737
+ * plugins: [okhstPlugin()],
738
+ * });
739
+ *
740
+ * // Now you can use okhst in styles:
741
+ * const Box = tasty({
742
+ * styles: {
743
+ * fill: 'okhst(240 50% 50%)',
744
+ * },
745
+ * });
746
+ * ```
747
+ */
748
+ declare const okhstPlugin: TastyPluginFactory;
749
+ //#endregion
750
+ //#region src/chunks/definitions.d.ts
751
+ /**
752
+ * Style chunk definitions for CSS chunking optimization.
753
+ *
754
+ * Styles are grouped into chunks based on:
755
+ * 1. Handler dependencies - styles that share a handler MUST be in the same chunk
756
+ * 2. Logical grouping - related styles grouped for better cache reuse
757
+ *
758
+ * See STYLE_CHUNKING_SPEC.md for detailed rationale.
759
+ *
760
+ * ============================================================================
761
+ * ⚠️ CRITICAL ARCHITECTURAL CONSTRAINT: NO CROSS-CHUNK HANDLER DEPENDENCIES
762
+ * ============================================================================
763
+ *
764
+ * Style handlers declare their dependencies via `__lookupStyles` array.
765
+ * This creates a dependency graph where handlers read multiple style props.
766
+ *
767
+ * **ALL styles in a handler's `__lookupStyles` MUST be in the SAME chunk.**
768
+ *
769
+ * Why this matters:
770
+ * 1. Each chunk computes a cache key from ONLY its own style values
771
+ * 2. If a handler reads a style from another chunk, that value isn't in the cache key
772
+ * 3. Changing the cross-chunk style won't invalidate this chunk's cache
773
+ * 4. Result: stale CSS output or incorrect cache hits
774
+ *
775
+ * Example of a violation:
776
+ * ```
777
+ * // flowStyle.__lookupStyles = ['display', 'flow']
778
+ * // If 'display' is in DISPLAY chunk and 'flow' is in LAYOUT chunk:
779
+ * // - User sets { display: 'grid', flow: 'column' }
780
+ * // - LAYOUT chunk caches CSS with flow=column, display=grid
781
+ * // - User changes to { display: 'flex', flow: 'column' }
782
+ * // - LAYOUT chunk cache key unchanged (only has 'flow')
783
+ * // - Returns stale CSS computed with display=grid!
784
+ * ```
785
+ *
786
+ * Before adding/moving styles, verify:
787
+ * 1. Find all handlers that use this style (grep for the style name in __lookupStyles)
788
+ * 2. Ensure ALL styles from each handler's __lookupStyles are in the same chunk
789
+ * ============================================================================
790
+ */
791
+ /**
792
+ * Appearance chunk - visual styling with independent handlers
793
+ *
794
+ * @public
795
+ */
796
+ declare const APPEARANCE_CHUNK_STYLES: readonly ["fill", "color", "opacity", "border", "radius", "outline", "outlineOffset", "shadow", "fade"];
797
+ /**
798
+ * Font chunk - typography styles
799
+ *
800
+ * Handler dependencies (all styles in each handler MUST stay in this chunk):
801
+ * ⚠️ presetStyle: preset, fontSize, lineHeight, letterSpacing, textTransform,
802
+ * fontWeight, fontStyle, font
803
+ */
804
+ /** @public */
805
+ declare const FONT_CHUNK_STYLES: readonly ["preset", "font", "fontWeight", "fontStyle", "fontSize", "lineHeight", "letterSpacing", "textTransform", "fontFamily", "textAlign", "textDecoration", "wordBreak", "wordWrap", "boldFontWeight"];
806
+ /**
807
+ * Dimension chunk - sizing and spacing
808
+ *
809
+ * Handler dependencies (all styles in each handler MUST stay in this chunk):
810
+ * ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left, paddingBlock/Inline
811
+ * ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left, marginBlock/Inline
812
+ * ⚠️ widthStyle: width, minWidth, maxWidth
813
+ * ⚠️ heightStyle: height, minHeight, maxHeight
814
+ */
815
+ /** @public */
816
+ declare const DIMENSION_CHUNK_STYLES: readonly ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingBlock", "paddingInline", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginBlock", "marginInline", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "flexBasis", "flexGrow", "flexShrink", "flex"];
817
+ /**
818
+ * Display chunk - display mode, layout flow, text overflow, and scrollbar
819
+ *
820
+ * Handler dependencies (all styles in each handler MUST stay in this chunk):
821
+ * ⚠️ displayStyle: display, hide, textOverflow, overflow, whiteSpace
822
+ * ⚠️ flowStyle: display, flow
823
+ * ⚠️ gapStyle: display, flow, gap
824
+ * ⚠️ scrollbarStyle: scrollbar, overflow
825
+ */
826
+ /** @public */
827
+ declare const DISPLAY_CHUNK_STYLES: readonly ["display", "hide", "textOverflow", "overflow", "whiteSpace", "flow", "gap", "scrollbar"];
828
+ /**
829
+ * Layout chunk - flex/grid alignment and grid templates
830
+ *
831
+ * Note: flow and gap are in DISPLAY chunk due to handler dependencies
832
+ * (flowStyle and gapStyle both require 'display' prop).
833
+ */
834
+ /** @public */
835
+ declare const LAYOUT_CHUNK_STYLES: readonly ["placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "place", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas", "gridAutoFlow", "gridAutoColumns", "gridAutoRows"];
836
+ /**
837
+ * Position chunk - element positioning
838
+ *
839
+ * Handler dependencies (all styles in each handler MUST stay in this chunk):
840
+ * ⚠️ insetStyle: inset, insetBlock, insetInline, top, right, bottom, left
841
+ */
842
+ /** @public */
843
+ declare const POSITION_CHUNK_STYLES: readonly ["position", "inset", "insetBlock", "insetInline", "top", "right", "bottom", "left", "zIndex", "gridArea", "gridColumn", "gridRow", "order", "placeSelf", "alignSelf", "justifySelf", "transform", "transition", "animation"];
844
+ declare const CHUNK_NAMES: {
845
+ /** Special chunk for styles that cannot be split */readonly COMBINED: "combined";
846
+ readonly SUBCOMPONENTS: "subcomponents";
847
+ readonly APPEARANCE: "appearance";
848
+ readonly FONT: "font";
849
+ readonly DIMENSION: "dimension";
850
+ readonly DISPLAY: "display";
851
+ readonly LAYOUT: "layout";
852
+ readonly POSITION: "position";
853
+ readonly MISC: "misc";
854
+ };
855
+ type ChunkName = (typeof CHUNK_NAMES)[keyof typeof CHUNK_NAMES];
856
+ /**
857
+ * Pre-computed map for O(1) style-to-chunk lookup.
858
+ * Built once at module load time.
859
+ */
860
+ declare const STYLE_TO_CHUNK: Map<string, ChunkName>;
861
+ interface ChunkInfo$1 {
862
+ /** Name of the chunk */
863
+ name: ChunkName | string;
864
+ /** Style keys belonging to this chunk */
865
+ styleKeys: string[];
866
+ }
867
+ /**
868
+ * Categorize style keys into chunks.
869
+ *
870
+ * Returns chunks in a deterministic order (by CHUNK_ORDER) regardless
871
+ * of the order of keys in the input styles object.
872
+ *
873
+ * @param styles - The styles object to categorize
874
+ * @returns Map of chunk name to array of style keys in that chunk (in priority order)
875
+ */
876
+ declare function categorizeStyleKeys(styles: Record<string, unknown>): Map<string, string[]>;
877
+ //#endregion
878
+ //#region src/styles/border.d.ts
879
+ /**
880
+ * Border style handler with multi-group support.
881
+ *
882
+ * Single group (backward compatible):
883
+ * - `border="1bw solid #red"` - all sides
884
+ * - `border="1bw solid #red top left"` - only top and left
885
+ *
886
+ * Multi-group (new):
887
+ * - `border="1bw #red, 2bw #blue top"` - all sides red 1bw, then top overridden to blue 2bw
888
+ * - `border="1bw, dashed top bottom, #purple left right"` - base 1bw, dashed on top/bottom, purple on left/right
889
+ *
890
+ * Later groups override earlier groups for conflicting directions.
891
+ */
892
+ declare function borderStyle({
893
+ border
894
+ }: {
895
+ border?: string | number | boolean;
896
+ }): Record<string, string> | null;
897
+ declare namespace borderStyle {
898
+ var __lookupStyles: string[];
899
+ }
900
+ //#endregion
901
+ //#region src/styles/color.d.ts
902
+ declare function colorStyle({
903
+ color
904
+ }: {
905
+ color?: string | boolean;
906
+ }): {
907
+ color: string;
908
+ } | null;
909
+ declare namespace colorStyle {
910
+ var __lookupStyles: string[];
911
+ }
912
+ //#endregion
913
+ //#region src/styles/display.d.ts
914
+ interface DisplayStyleProps {
915
+ display?: string;
916
+ hide?: boolean;
917
+ textOverflow?: string | boolean;
918
+ overflow?: string;
919
+ whiteSpace?: string;
920
+ }
921
+ /**
922
+ * Handles display, hide, textOverflow, overflow, and whiteSpace styles.
923
+ *
924
+ * Priority:
925
+ * 1. `hide` takes precedence (display: none)
926
+ * 2. Multi-line `textOverflow` forces display: -webkit-box
927
+ * 3. Single-line `textOverflow` defaults white-space to nowrap
928
+ * 4. Explicit `whiteSpace` overrides the default from `textOverflow`
929
+ */
930
+ declare function displayStyle({
931
+ display,
932
+ hide,
933
+ textOverflow,
934
+ overflow,
935
+ whiteSpace
936
+ }: DisplayStyleProps): Record<string, string | number> | null;
937
+ declare namespace displayStyle {
938
+ var __lookupStyles: string[];
939
+ }
940
+ //#endregion
941
+ //#region src/styles/fade.d.ts
942
+ declare function fadeStyle({
943
+ fade
944
+ }: {
945
+ fade?: string;
946
+ }): {
947
+ mask: string;
948
+ 'mask-composite': string;
949
+ } | null;
950
+ declare namespace fadeStyle {
951
+ var __lookupStyles: string[];
952
+ }
953
+ //#endregion
954
+ //#region src/styles/fill.d.ts
955
+ declare function fillStyle({
956
+ fill,
957
+ backgroundColor,
958
+ image,
959
+ backgroundImage,
960
+ backgroundPosition,
961
+ backgroundSize,
962
+ backgroundRepeat,
963
+ backgroundAttachment,
964
+ backgroundOrigin,
965
+ backgroundClip,
966
+ background
967
+ }: {
968
+ fill?: string;
969
+ backgroundColor?: string;
970
+ image?: string;
971
+ backgroundImage?: string;
972
+ backgroundPosition?: string;
973
+ backgroundSize?: string;
974
+ backgroundRepeat?: string;
975
+ backgroundAttachment?: string;
976
+ backgroundOrigin?: string;
977
+ backgroundClip?: string;
978
+ background?: string;
979
+ }): Record<string, string> | null;
980
+ declare namespace fillStyle {
981
+ var __lookupStyles: string[];
982
+ }
983
+ declare function svgFillStyle({
984
+ svgFill
985
+ }: {
986
+ svgFill?: string;
987
+ }): {
988
+ fill: string;
989
+ } | null;
990
+ declare namespace svgFillStyle {
991
+ var __lookupStyles: string[];
992
+ }
993
+ //#endregion
994
+ //#region src/styles/flow.d.ts
995
+ declare function flowStyle({
996
+ display,
997
+ flow
998
+ }: {
999
+ display?: string;
1000
+ flow?: string;
1001
+ }): {
1002
+ [x: string]: string | undefined;
1003
+ } | null;
1004
+ declare namespace flowStyle {
1005
+ var __lookupStyles: string[];
1006
+ }
1007
+ //#endregion
1008
+ //#region src/styles/gap.d.ts
1009
+ declare function gapStyle({
1010
+ display,
1011
+ flow,
1012
+ gap
1013
+ }: {
1014
+ display?: string;
1015
+ flow?: string;
1016
+ gap?: string | number | boolean;
1017
+ }): {
1018
+ gap: string;
1019
+ $?: undefined;
1020
+ } | ({
1021
+ 'margin-right': string;
1022
+ 'margin-bottom': string;
1023
+ $?: undefined;
1024
+ } | {
1025
+ $: string;
1026
+ 'margin-right': string;
1027
+ 'margin-bottom': string;
1028
+ })[] | {
1029
+ [x: string]: string;
1030
+ $: string;
1031
+ gap?: undefined;
1032
+ } | null;
1033
+ declare namespace gapStyle {
1034
+ var __lookupStyles: string[];
1035
+ }
1036
+ //#endregion
1037
+ //#region src/styles/height.d.ts
1038
+ interface HeightStyleProps {
1039
+ height?: string | number | boolean;
1040
+ minHeight?: string | number | boolean;
1041
+ maxHeight?: string | number | boolean;
1042
+ }
1043
+ declare function heightStyle({
1044
+ height,
1045
+ minHeight,
1046
+ maxHeight
1047
+ }: HeightStyleProps): Record<string, string | string[]> | null;
1048
+ declare namespace heightStyle {
1049
+ var __lookupStyles: string[];
1050
+ }
1051
+ //#endregion
1052
+ //#region src/styles/inset.d.ts
1053
+ declare function insetStyle({
1054
+ inset,
1055
+ insetBlock,
1056
+ insetInline,
1057
+ top,
1058
+ right,
1059
+ bottom,
1060
+ left
1061
+ }: {
1062
+ inset?: string | number | boolean;
1063
+ insetBlock?: string | number | boolean;
1064
+ insetInline?: string | number | boolean;
1065
+ top?: string | number | boolean;
1066
+ right?: string | number | boolean;
1067
+ bottom?: string | number | boolean;
1068
+ left?: string | number | boolean;
1069
+ }): Record<string, string> | null;
1070
+ declare namespace insetStyle {
1071
+ var __lookupStyles: string[];
1072
+ }
1073
+ //#endregion
1074
+ //#region src/styles/margin.d.ts
1075
+ declare function marginStyle({
1076
+ margin,
1077
+ marginBlock,
1078
+ marginInline,
1079
+ marginTop,
1080
+ marginRight,
1081
+ marginBottom,
1082
+ marginLeft
1083
+ }: {
1084
+ margin?: string | number | boolean;
1085
+ marginBlock?: string | number | boolean;
1086
+ marginInline?: string | number | boolean;
1087
+ marginTop?: string | number | boolean;
1088
+ marginRight?: string | number | boolean;
1089
+ marginBottom?: string | number | boolean;
1090
+ marginLeft?: string | number | boolean;
1091
+ }): Record<string, string> | null;
1092
+ declare namespace marginStyle {
1093
+ var __lookupStyles: string[];
1094
+ }
1095
+ //#endregion
1096
+ //#region src/styles/outline.d.ts
1097
+ interface OutlineStyleProps {
1098
+ outline?: string | boolean | number;
1099
+ outlineOffset?: string | number;
1100
+ }
1101
+ /**
1102
+ * Generates CSS for outline property with optional offset.
1103
+ *
1104
+ * Syntax:
1105
+ * - `outline="2px solid #red"` - outline only
1106
+ * - `outline="2px solid #red / 4px"` - outline with offset (slash separator)
1107
+ * - `outline="2px / 4px"` - width with offset (simpler form)
1108
+ * - `outline={true}` - default 1ow solid outline
1109
+ * - `outlineOffset="4px"` - offset as separate prop (can be combined with outline)
1110
+ *
1111
+ * Priority: slash syntax in outline takes precedence over outlineOffset prop
1112
+ *
1113
+ * @return CSS properties for outline and optionally outline-offset
1114
+ */
1115
+ declare function outlineStyle({
1116
+ outline,
1117
+ outlineOffset
1118
+ }: OutlineStyleProps): Record<string, string> | null;
1119
+ declare namespace outlineStyle {
1120
+ var __lookupStyles: string[];
1121
+ }
1122
+ //#endregion
1123
+ //#region src/styles/padding.d.ts
1124
+ declare function paddingStyle({
1125
+ padding,
1126
+ paddingBlock,
1127
+ paddingInline,
1128
+ paddingTop,
1129
+ paddingRight,
1130
+ paddingBottom,
1131
+ paddingLeft
1132
+ }: {
1133
+ padding?: string | number | boolean;
1134
+ paddingBlock?: string | number | boolean;
1135
+ paddingInline?: string | number | boolean;
1136
+ paddingTop?: string | number | boolean;
1137
+ paddingRight?: string | number | boolean;
1138
+ paddingBottom?: string | number | boolean;
1139
+ paddingLeft?: string | number | boolean;
1140
+ }): Record<string, string> | null;
1141
+ declare namespace paddingStyle {
1142
+ var __lookupStyles: string[];
1143
+ }
1144
+ //#endregion
1145
+ //#region src/styles/placement.d.ts
1146
+ interface PlacementStyleProps {
1147
+ place?: string | boolean;
1148
+ placeItems?: string | boolean;
1149
+ placeContent?: string | boolean;
1150
+ align?: string | boolean;
1151
+ justify?: string | boolean;
1152
+ alignItems?: string | boolean;
1153
+ alignContent?: string | boolean;
1154
+ justifyItems?: string | boolean;
1155
+ justifyContent?: string | boolean;
1156
+ }
1157
+ /**
1158
+ * Unified placement handler replacing align, justify, and place.
1159
+ *
1160
+ * Priority (later overrides earlier):
1161
+ * 1. place (lowest) — sets all 4 longhands
1162
+ * 2. placeItems, placeContent, align, justify (medium) — each sets 2 longhands
1163
+ * 3. alignItems, alignContent, justifyItems, justifyContent (highest) — each sets 1 longhand
1164
+ */
1165
+ declare function placementStyle({
1166
+ place,
1167
+ placeItems,
1168
+ placeContent,
1169
+ align,
1170
+ justify,
1171
+ alignItems,
1172
+ alignContent,
1173
+ justifyItems,
1174
+ justifyContent
1175
+ }: PlacementStyleProps): Record<string, string> | null;
1176
+ declare namespace placementStyle {
1177
+ var __lookupStyles: string[];
1178
+ }
1179
+ //#endregion
1180
+ //#region src/styles/preset.d.ts
1181
+ interface PresetStyleProps {
1182
+ preset?: string | boolean;
1183
+ fontSize?: string | number;
1184
+ lineHeight?: string | number;
1185
+ textTransform?: string;
1186
+ letterSpacing?: string | number;
1187
+ fontWeight?: string | number;
1188
+ fontStyle?: string | boolean;
1189
+ fontFamily?: string;
1190
+ /** Alias for fontFamily with special handling for 'monospace' and boolean */
1191
+ font?: string | boolean;
1192
+ }
1193
+ /**
1194
+ * Handles typography preset and individual font properties.
1195
+ *
1196
+ * Preset syntax uses `/` to separate the name from one or more
1197
+ * space-separated modifiers:
1198
+ * - `preset="h1"` — name only
1199
+ * - `preset="h2 / strong"` — name + modifier
1200
+ * - `preset="h2 / strong italic"` — name + multiple modifiers
1201
+ * - `preset="bold"` — modifier-only shorthand (name defaults to `inherit`)
1202
+ * - `preset="bold italic"` — modifier-only shorthand with multiple modifiers
1203
+ *
1204
+ * When `preset` is defined, it sets up CSS custom properties for typography.
1205
+ * Individual font props can be used with or without `preset`:
1206
+ * - With `preset`: overrides the preset value for that property
1207
+ * - Without `preset`: outputs the CSS directly
1208
+ *
1209
+ * Number values are converted to pixels for fontSize, lineHeight, letterSpacing.
1210
+ * fontWeight accepts numbers directly (e.g., 400, 700).
1211
+ *
1212
+ * font vs fontFamily:
1213
+ * - `font` is the recommended prop with special handling (monospace, boolean, fallback)
1214
+ * - `fontFamily` is a direct value without special handling
1215
+ */
1216
+ declare function presetStyle({
1217
+ preset,
1218
+ fontSize,
1219
+ lineHeight,
1220
+ textTransform,
1221
+ letterSpacing,
1222
+ fontWeight,
1223
+ fontStyle,
1224
+ fontFamily,
1225
+ font
1226
+ }: PresetStyleProps): Styles | null;
1227
+ declare namespace presetStyle {
1228
+ var __lookupStyles: string[];
1229
+ }
1230
+ //#endregion
1231
+ //#region src/styles/radius.d.ts
1232
+ declare function radiusStyle({
1233
+ radius
1234
+ }: {
1235
+ radius?: string | number | boolean;
1236
+ }): Record<string, string> | null;
1237
+ declare namespace radiusStyle {
1238
+ var __lookupStyles: string[];
1239
+ }
1240
+ //#endregion
1241
+ //#region src/styles/scrollMargin.d.ts
1242
+ declare function scrollMarginStyle({
1243
+ scrollMargin,
1244
+ scrollMarginBlock,
1245
+ scrollMarginInline,
1246
+ scrollMarginTop,
1247
+ scrollMarginRight,
1248
+ scrollMarginBottom,
1249
+ scrollMarginLeft
1250
+ }: {
1251
+ scrollMargin?: string | number | boolean;
1252
+ scrollMarginBlock?: string | number | boolean;
1253
+ scrollMarginInline?: string | number | boolean;
1254
+ scrollMarginTop?: string | number | boolean;
1255
+ scrollMarginRight?: string | number | boolean;
1256
+ scrollMarginBottom?: string | number | boolean;
1257
+ scrollMarginLeft?: string | number | boolean;
1258
+ }): Record<string, string> | null;
1259
+ declare namespace scrollMarginStyle {
1260
+ var __lookupStyles: string[];
1261
+ }
1262
+ //#endregion
1263
+ //#region src/styles/scrollbar.d.ts
1264
+ interface ScrollbarStyleProps {
1265
+ scrollbar?: string | boolean;
1266
+ overflow?: string;
1267
+ }
1268
+ /**
1269
+ * Standard CSS scrollbar styling via `scrollbar-width`, `scrollbar-color`,
1270
+ * and `scrollbar-gutter`.
1271
+ *
1272
+ * Width values: `thin` (default), `auto`, `none`
1273
+ * Modifiers: `stable`, `both-edges`, `always`
1274
+ *
1275
+ * Note: `auto` is classified as a VALUE_KEYWORD by the parser, so it lands
1276
+ * in `values` rather than `mods`. Both locations are checked for robustness.
1277
+ */
1278
+ declare function scrollbarStyle({
1279
+ scrollbar,
1280
+ overflow
1281
+ }: ScrollbarStyleProps): Record<string, string> | null;
1282
+ declare namespace scrollbarStyle {
1283
+ var __lookupStyles: string[];
1284
+ }
1285
+ //#endregion
1286
+ //#region src/styles/shadow.d.ts
1287
+ declare function shadowStyle({
1288
+ shadow
1289
+ }: {
1290
+ shadow?: string | boolean;
1291
+ }): {
1292
+ 'box-shadow': string;
1293
+ } | null;
1294
+ declare namespace shadowStyle {
1295
+ var __lookupStyles: string[];
1296
+ }
1297
+ //#endregion
1298
+ //#region src/styles/transition.d.ts
1299
+ declare function transitionStyle({
1300
+ transition
1301
+ }: {
1302
+ transition?: string;
1303
+ }): {
1304
+ transition: string;
1305
+ } | null;
1306
+ declare namespace transitionStyle {
1307
+ var __lookupStyles: string[];
1308
+ }
1309
+ //#endregion
1310
+ //#region src/styles/width.d.ts
1311
+ interface WidthStyleProps {
1312
+ width?: string | number | boolean;
1313
+ minWidth?: string | number | boolean;
1314
+ maxWidth?: string | number | boolean;
1315
+ }
1316
+ declare function widthStyle({
1317
+ width,
1318
+ minWidth,
1319
+ maxWidth
1320
+ }: WidthStyleProps): Record<string, string | string[]> | null;
1321
+ declare namespace widthStyle {
1322
+ var __lookupStyles: string[];
1323
+ }
1324
+ //#endregion
1325
+ //#region src/styles/predefined.d.ts
1326
+ /**
1327
+ * Exported object containing wrapped predefined style handlers.
1328
+ * Users can import and call these to extend or delegate to built-in behavior.
1329
+ *
1330
+ * Internal handlers use *Style suffix for searchability.
1331
+ * External API uses short names for convenience.
1332
+ *
1333
+ * @example
1334
+ * ```ts
1335
+ * import { styleHandlers, configure } from '@tenphi/tasty';
1336
+ *
1337
+ * configure({
1338
+ * handlers: {
1339
+ * fill: ({ fill }) => {
1340
+ * if (fill?.startsWith('gradient:')) {
1341
+ * return { background: fill.slice(9) };
1342
+ * }
1343
+ * return styleHandlers.fill({ fill });
1344
+ * },
1345
+ * },
1346
+ * });
1347
+ * ```
1348
+ */
1349
+ declare const styleHandlers: {
1350
+ readonly border: typeof borderStyle;
1351
+ readonly color: typeof colorStyle;
1352
+ readonly display: typeof displayStyle;
1353
+ readonly fade: typeof fadeStyle;
1354
+ readonly fill: typeof fillStyle;
1355
+ readonly svgFill: typeof svgFillStyle;
1356
+ readonly flow: typeof flowStyle;
1357
+ readonly gap: typeof gapStyle;
1358
+ readonly height: typeof heightStyle;
1359
+ readonly inset: typeof insetStyle;
1360
+ readonly margin: typeof marginStyle;
1361
+ readonly outline: typeof outlineStyle;
1362
+ readonly padding: typeof paddingStyle;
1363
+ readonly placement: typeof placementStyle;
1364
+ readonly preset: typeof presetStyle;
1365
+ readonly radius: typeof radiusStyle;
1366
+ readonly scrollMargin: typeof scrollMarginStyle;
1367
+ readonly scrollbar: typeof scrollbarStyle;
1368
+ readonly shadow: typeof shadowStyle;
1369
+ readonly transition: typeof transitionStyle;
1370
+ readonly width: typeof widthStyle;
1371
+ };
1372
+ //#endregion
1373
+ //#region src/compute-styles.d.ts
1374
+ interface ComputeStylesResult {
1375
+ className: string;
1376
+ /** CSS text to emit as an inline <style> tag (RSC mode only). */
1377
+ css?: string;
1378
+ }
1379
+ interface ComputeStylesOptions {
1380
+ ssrCollector?: ServerStyleCollector | null;
1381
+ /** Target root for style injection (client only). Defaults to `document`. */
1382
+ root?: Document | ShadowRoot;
1383
+ }
1384
+ /**
1385
+ * Synchronous, hook-free style computation.
1386
+ *
1387
+ * Resolves recipes, categorizes style keys into chunks, renders CSS rules,
1388
+ * allocates class names, and injects / collects / returns the CSS.
1389
+ *
1390
+ * Three code paths:
1391
+ * 1. SSR collector — discovered via ALS or passed explicitly; CSS collected
1392
+ * 2. RSC inline — no collector and no `document`; CSS returned as `result.css`
1393
+ * for the caller to emit as an inline `<style>` tag
1394
+ * 3. Client inject — CSS injected synchronously into the DOM (idempotent)
1395
+ *
1396
+ * @param styles - Tasty styles object (or undefined for no styles)
1397
+ * @param options - Optional SSR collector override
1398
+ */
1399
+ declare function computeStyles(styles: Styles | undefined, options?: ComputeStylesOptions): ComputeStylesResult;
1400
+ //#endregion
1401
+ //#region src/injector/chunk-sheet-registry.d.ts
1402
+ /**
1403
+ * Global registry mapping CSS content hashes to shared constructable
1404
+ * CSSStyleSheet objects with reference counting.
1405
+ *
1406
+ * Multiple shadow roots adopting the same chunk share a single underlying
1407
+ * stylesheet object — parse once, adopt everywhere.
1408
+ */
1409
+ declare class ChunkSheetRegistry {
1410
+ private sheets;
1411
+ private sheetToHash;
1412
+ /**
1413
+ * Get or create a CSSStyleSheet for the given CSS text.
1414
+ * Increments refCount. Uses content hash as the dedup key.
1415
+ */
1416
+ acquire(cssText: string): CSSStyleSheet;
1417
+ /**
1418
+ * Decrement refCount for a sheet. When refCount reaches 0,
1419
+ * the sheet is removed from the registry.
1420
+ */
1421
+ release(sheet: CSSStyleSheet): void;
1422
+ /**
1423
+ * Bulk acquire — returns an array of CSSStyleSheet in the same order.
1424
+ */
1425
+ acquireAll(cssTexts: string[]): CSSStyleSheet[];
1426
+ /**
1427
+ * Bulk release — decrements refCount for each sheet.
1428
+ */
1429
+ releaseAll(sheets: CSSStyleSheet[]): void;
1430
+ /** Number of unique sheets currently held. */
1431
+ get size(): number;
1432
+ }
1433
+ /** Module-level singleton shared across the entire application. */
1434
+ declare const chunkSheetRegistry: ChunkSheetRegistry;
1435
+ //#endregion
1436
+ //#region src/injector/index.d.ts
1437
+ /**
1438
+ * Inject styles and return className with dispose function
1439
+ */
1440
+ declare function inject(rules: StyleResult[], options?: {
1441
+ root?: Document | ShadowRoot;
1442
+ cacheKey?: string;
1443
+ }): InjectResult;
1444
+ /**
1445
+ * Inject global rules that should not reserve tasty class names
1446
+ */
1447
+ declare function injectGlobal(rules: StyleResult[], options?: {
1448
+ root?: Document | ShadowRoot;
1449
+ }): GlobalInjectResult;
1450
+ /**
1451
+ * Inject raw CSS text directly without parsing
1452
+ * This is a low-overhead method for injecting raw CSS that doesn't need tasty processing.
1453
+ * The CSS is inserted into a separate style element to avoid conflicts with tasty's chunking.
1454
+ *
1455
+ * @example
1456
+ * ```tsx
1457
+ * // Inject raw CSS
1458
+ * const { dispose } = injectRawCSS(`
1459
+ * body { margin: 0; padding: 0; }
1460
+ * .my-class { color: red; }
1461
+ * `);
1462
+ *
1463
+ * // Later, remove the injected CSS
1464
+ * dispose();
1465
+ * ```
1466
+ */
1467
+ declare function injectRawCSS(css: string, options?: {
1468
+ root?: Document | ShadowRoot;
1469
+ }): {
1470
+ dispose: () => void;
1471
+ };
1472
+ /**
1473
+ * Get raw CSS text for SSR
1474
+ */
1475
+ declare function getRawCSSText(options?: {
1476
+ root?: Document | ShadowRoot;
1477
+ }): string;
1478
+ /**
1479
+ * Inject keyframes and return object with toString() and dispose()
1480
+ */
1481
+ declare function keyframes(steps: KeyframesSteps, nameOrOptions?: string | {
1482
+ root?: Document | ShadowRoot;
1483
+ name?: string;
1484
+ }): KeyframesResult;
1485
+ interface PropertyOptions {
1486
+ /**
1487
+ * CSS syntax string for the property (e.g., '<color>', '<length>', '<angle>')
1488
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
1489
+ */
1490
+ syntax?: string;
1491
+ /**
1492
+ * Whether the property inherits from parent elements
1493
+ * @default true
1494
+ */
1495
+ inherits?: boolean;
1496
+ /**
1497
+ * Initial value for the property
1498
+ */
1499
+ initialValue?: string | number;
1500
+ /**
1501
+ * Shadow root or document to inject into
1502
+ */
1503
+ root?: Document | ShadowRoot;
1504
+ }
1505
+ /**
1506
+ * Define a CSS @property custom property.
1507
+ * This enables advanced features like animating custom properties.
1508
+ *
1509
+ * Note: @property rules are global and persistent once defined.
1510
+ * Re-registering the same property name is a no-op.
1511
+ *
1512
+ * @param name - The custom property name (must start with --)
1513
+ * @param options - Property configuration
1514
+ *
1515
+ * @example
1516
+ * ```ts
1517
+ * // Define a color property that can be animated
1518
+ * property('--my-color', {
1519
+ * syntax: '<color>',
1520
+ * initialValue: 'red',
1521
+ * });
1522
+ *
1523
+ * // Define an angle property
1524
+ * property('--rotation', {
1525
+ * syntax: '<angle>',
1526
+ * inherits: false,
1527
+ * initialValue: '0deg',
1528
+ * });
1529
+ * ```
1530
+ */
1531
+ declare function property$1(name: string, options?: PropertyOptions): void;
1532
+ /**
1533
+ * Check if a CSS @property has already been defined
1534
+ *
1535
+ * @param name - The custom property name to check
1536
+ * @param options - Options including root
1537
+ */
1538
+ declare function isPropertyDefined(name: string, options?: {
1539
+ root?: Document | ShadowRoot;
1540
+ }): boolean;
1541
+ /**
1542
+ * Inject a CSS @font-face rule.
1543
+ *
1544
+ * Permanent and global — no dispose or ref-counting.
1545
+ * Deduplicates by content hash (family + descriptors).
1546
+ */
1547
+ declare function fontFace(family: string, descriptors: FontFaceDescriptors, options?: {
1548
+ root?: Document | ShadowRoot;
1549
+ }): void;
1550
+ /**
1551
+ * Inject a CSS @counter-style rule.
1552
+ *
1553
+ * Permanent and global — no dispose or ref-counting.
1554
+ * Deduplicates by name (first definition wins).
1555
+ */
1556
+ declare function counterStyle(name: string, descriptors: CounterStyleDescriptors, options?: {
1557
+ root?: Document | ShadowRoot;
1558
+ }): void;
1559
+ /**
1560
+ * Get CSS text from all sheets (for SSR)
1561
+ */
1562
+ declare function getCssText(options?: {
1563
+ root?: Document | ShadowRoot;
1564
+ }): string;
1565
+ /**
1566
+ * Collect only CSS used by a rendered subtree (like jest-styled-components).
1567
+ * Pass the container returned by render(...).
1568
+ */
1569
+ declare function getCssTextForNode(node: ParentNode | Element | DocumentFragment, options?: {
1570
+ root?: Document | ShadowRoot;
1571
+ }): string;
1572
+ /**
1573
+ * Force cleanup of unused rules
1574
+ */
1575
+ declare function cleanup(root?: Document | ShadowRoot): void;
1576
+ /**
1577
+ * Record a render-time usage hit for one or more classNames.
1578
+ * Used internally by computeStyles and tasty() to track usage for GC.
1579
+ * When the global touch counter reaches `touchInterval`, schedules GC.
1580
+ */
1581
+ declare function touch(className: string, options?: {
1582
+ root?: Document | ShadowRoot;
1583
+ }): void;
1584
+ /**
1585
+ * Synchronous garbage collection of unused styles.
1586
+ * Evicts the oldest unused styles when usageMap exceeds capacity.
1587
+ * With `{ force: true }`, removes ALL unused styles regardless of capacity.
1588
+ *
1589
+ * @returns Number of styles evicted.
1590
+ */
1591
+ declare function gc(options?: GCOptions): number;
1592
+ /**
1593
+ * Check if we're currently running in a test environment
1594
+ */
1595
+ declare function getIsTestEnvironment(): boolean;
1596
+ /**
1597
+ * Get the global injector instance for debugging
1598
+ */
1599
+ declare const injector: {
1600
+ readonly instance: StyleInjector;
1601
+ };
1602
+ /**
1603
+ * Destroy all resources and clean up
1604
+ */
1605
+ declare function destroy(root?: Document | ShadowRoot): void;
1606
+ /**
1607
+ * Create a new isolated injector instance
1608
+ */
1609
+ declare function createInjector(config?: Partial<StyleInjectorConfig>): StyleInjector;
1610
+ //#endregion
1611
+ //#region src/utils/filter-base-props.d.ts
1612
+ interface PropsFilterOptions {
1613
+ labelable?: boolean;
1614
+ propNames?: Set<string>;
1615
+ eventProps?: boolean;
1616
+ }
1617
+ /**
1618
+ * Filters out all props that aren't valid DOM props or defined via override prop obj.
1619
+ * @param props - The component props to be filtered.
1620
+ * @param opts - Props to override.
1621
+ */
1622
+ declare function filterBaseProps<T extends object>(props: T, opts?: PropsFilterOptions): Partial<T>;
1623
+ //#endregion
1624
+ //#region src/utils/colors.d.ts
1625
+ declare function color$1(name: string, opacity?: number): string;
1626
+ //#endregion
1627
+ //#region src/utils/mod-attrs.d.ts
1628
+ declare const _modAttrs: (firstArg: Record<string, ModValue> | undefined, secondArg?: unknown) => Record<string, string> | null;
1629
+ //#endregion
1630
+ //#region src/utils/dotize.d.ts
1631
+ declare const dotize: {
1632
+ valTypes: {
1633
+ none: string;
1634
+ primitive: string;
1635
+ object: string;
1636
+ array: string;
1637
+ };
1638
+ getValType: (val: any) => string | undefined;
1639
+ getPathType: (arrPath: any) => string[];
1640
+ isUndefined: (obj: any) => obj is undefined;
1641
+ isNumber: (f: any) => boolean;
1642
+ isEmptyObj: (obj: any) => boolean;
1643
+ isPlainObject: (obj: any) => boolean;
1644
+ isNotObject: (obj: any) => boolean;
1645
+ isEmptyArray: (arr: any) => boolean;
1646
+ isNotArray: (arr: any) => boolean;
1647
+ removeEmptyArrayItem: (arr: any) => any;
1648
+ getFieldName: (field: any, prefix: any, isRoot: any, isArrayItem: any, isArray: any) => string;
1649
+ startsWith: (val: any, valToSearch: any) => boolean;
1650
+ convert: (obj: any, prefix?: string) => any;
1651
+ backward: (obj: any, prefix: any) => any;
1652
+ };
1653
+ //#endregion
1654
+ //#region src/utils/resolve-recipes.d.ts
1655
+ /**
1656
+ * Resolve all `recipe` style properties in a styles object.
1657
+ *
1658
+ * Handles both top-level and sub-element recipe references.
1659
+ * Returns the same object reference if no recipes are present anywhere
1660
+ * (zero overhead for the common case).
1661
+ *
1662
+ * @param styles - The styles object potentially containing `recipe` keys
1663
+ * @returns Resolved styles with recipe values merged in, or the original object if unchanged
1664
+ */
1665
+ declare function resolveRecipes(styles: Styles): Styles;
1666
+ //#endregion
1667
+ //#region src/utils/warnings.d.ts
1668
+ declare function warn(...args: unknown[]): void;
1669
+ declare function deprecationWarning(condition: unknown, {
1670
+ property,
1671
+ name,
1672
+ betterAlternative,
1673
+ reason
1674
+ }: {
1675
+ property: string;
1676
+ name: string;
1677
+ betterAlternative: (() => string) | string;
1678
+ reason?: (() => string) | string;
1679
+ }): void;
1680
+ //#endregion
1681
+ //#region src/utils/process-tokens.d.ts
1682
+ /**
1683
+ * Process tokens object into inline style properties.
1684
+ * - $name -> --name with parsed value
1685
+ * - #name -> --name-color AND --name-color-{colorSpace} with parsed values
1686
+ *
1687
+ * @param tokens - The tokens object to process
1688
+ * @returns CSSProperties object or undefined if no tokens to process
1689
+ */
1690
+ declare function processTokens(tokens: Tokens | undefined): CSSProperties$1 | undefined;
1691
+ //#endregion
1692
+ //#region src/debug.d.ts
1693
+ declare global {
1694
+ interface Window {
1695
+ tastyDebug?: typeof tastyDebug;
1696
+ }
1697
+ }
1698
+ type CSSTarget = 'all' | 'global' | 'active' | 'unused' | 'page' | string | string[] | Element;
1699
+ interface DebugOptions {
1700
+ root?: Document | ShadowRoot;
1701
+ /** Suppress console logging and return data only (default: false) */
1702
+ raw?: boolean;
1703
+ }
1704
+ interface CssOptions extends DebugOptions {
1705
+ prettify?: boolean;
1706
+ /** Read from stored source CSS (dev-mode only) instead of live CSSOM */
1707
+ source?: boolean;
1708
+ }
1709
+ interface ChunkInfo {
1710
+ className: string;
1711
+ chunkName: string | null;
1712
+ }
1713
+ interface InspectResult {
1714
+ element?: Element | null;
1715
+ classes: string[];
1716
+ chunks: ChunkInfo[];
1717
+ css: string;
1718
+ size: number;
1719
+ rules: number;
1720
+ }
1721
+ interface CacheStatus {
1722
+ classes: {
1723
+ active: string[];
1724
+ unused: string[];
1725
+ all: string[];
1726
+ };
1727
+ metrics: CacheMetrics | null;
1728
+ }
1729
+ interface ChunkBreakdown {
1730
+ byChunk: Record<string, {
1731
+ classes: string[];
1732
+ cssSize: number;
1733
+ ruleCount: number;
1734
+ }>;
1735
+ totalChunkTypes: number;
1736
+ totalClasses: number;
1737
+ }
1738
+ interface Summary {
1739
+ activeClasses: string[];
1740
+ unusedClasses: string[];
1741
+ totalStyledClasses: string[];
1742
+ activeCSSSize: number;
1743
+ unusedCSSSize: number;
1744
+ globalCSSSize: number;
1745
+ rawCSSSize: number;
1746
+ keyframesCSSSize: number;
1747
+ propertyCSSSize: number;
1748
+ totalCSSSize: number;
1749
+ activeRuleCount: number;
1750
+ unusedRuleCount: number;
1751
+ globalRuleCount: number;
1752
+ rawRuleCount: number;
1753
+ keyframesRuleCount: number;
1754
+ propertyRuleCount: number;
1755
+ totalRuleCount: number;
1756
+ metrics: CacheMetrics | null;
1757
+ definedProperties: string[];
1758
+ definedKeyframes: {
1759
+ name: string;
1760
+ refCount: number;
1761
+ }[];
1762
+ chunkBreakdown: ChunkBreakdown;
1763
+ }
1764
+ declare const tastyDebug: {
1765
+ css(target: CSSTarget, opts?: CssOptions): string;
1766
+ inspect(target: string | Element, opts?: DebugOptions): InspectResult;
1767
+ summary(opts?: DebugOptions): Summary;
1768
+ chunks(opts?: DebugOptions): ChunkBreakdown;
1769
+ cache(opts?: DebugOptions): CacheStatus;
1770
+ cleanup(opts?: {
1771
+ root?: Document | ShadowRoot;
1772
+ }): void;
1773
+ help(): void;
1774
+ install(): void;
1775
+ };
1776
+ //#endregion
1777
+ export { UsePropertyOptions as $, BLOCK_OUTER_STYLES as $t, chunkSheetRegistry as A, BlockInnerStyleProps as At, DISPLAY_CHUNK_STYLES as B, Mods as Bt, injectRawCSS as C, VariantMap as Ct, property$1 as D, BaseProps as Dt, keyframes as E, AllBaseProps as Et, APPEARANCE_CHUNK_STYLES as F, DimensionStyleProps as Ft, categorizeStyleKeys as G, TagName as Gt, LAYOUT_CHUNK_STYLES as H, PositionStyleProps as Ht, CHUNK_NAMES as I, FlowStyleProps as It, okhslFunc as J, TextStyleProps as Jt, okhstFunc as K, TastyExtensionConfig as Kt, ChunkInfo$1 as L, GlobalStyledProps as Lt, ComputeStylesResult as M, BlockStyleProps as Mt, computeStyles as N, ColorStyleProps as Nt, touch as O, BasePropsWithoutChildren as Ot, styleHandlers as P, ContainerStyleProps as Pt, useFontFace as Q, BLOCK_INNER_STYLES as Qt, ChunkName as R, InnerStyleProps as Rt, injectGlobal as S, TokenPropsInput as St, isPropertyDefined as T, tasty as Tt, POSITION_CHUNK_STYLES as U, Props as Ut, FONT_CHUNK_STYLES as V, OuterStyleProps as Vt, STYLE_TO_CHUNK as W, ShortGridStyles as Wt, getDisplayName as X, Tokens as Xt, okhslPlugin as Y, TokenValue as Yt, useCounterStyle as Z, BASE_STYLES as Zt, getCssText as _, SubElementProps as _t, resolveRecipes as a, INNER_STYLES as an, UseStylesResult as at, getRawCSSText as b, TastyPolymorphicComponent as bt, color$1 as c, TEXT_STYLES as cn, Element$1 as ct, cleanup as d, ModPropsInput as dt, BLOCK_STYLES as en, useProperty as et, counterStyle as f, ResolveAsProps as ft, gc as g, SubElementDefinition as gt, fontFace as h, ResolveTokenProps as ht, warn as i, FLOW_STYLES as in, UseStylesOptions as it, ComputeStylesOptions as j, BlockOuterStyleProps as jt, ChunkSheetRegistry as k, BaseStyleProps as kt, filterBaseProps as l, DEFAULT_NAME_PREFIX as ln, ElementsDefinition as lt, destroy as m, ResolveModProps as mt, processTokens as n, CONTAINER_STYLES as nn, useRawCSS as nt, dotize as o, OUTER_STYLES as on, useStyles as ot, createInjector as p, ResolveModPropDef as pt, okhstPlugin as q, TastyThemeNames as qt, deprecationWarning as r, DIMENSION_STYLES as rn, useGlobalStyles as rt, _modAttrs as s, POSITION_STYLES as sn, AllBasePropsWithMods as st, tastyDebug as t, COLOR_STYLES as tn, useKeyframes as tt, PropertyOptions as u, DEFAULT_ZERO_NAME_PREFIX as un, ModPropDef as ut, getCssTextForNode as v, TastyElementOptions as vt, injector as w, WithVariant as wt, inject as x, TastyProps as xt, getIsTestEnvironment as y, TastyElementProps as yt, DIMENSION_CHUNK_STYLES as z, ModValue as zt };
1778
+ //# sourceMappingURL=index-ByBYTH9l.d.ts.map