@tenphi/tasty 0.0.0-snapshot.a7fb1f5 → 0.0.0-snapshot.a8a2a5d

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