@tenphi/tasty 0.0.0-snapshot.ef967bb → 0.0.0-snapshot.effc80a

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