@tenphi/tasty 0.0.0-snapshot.e4aff73 → 0.0.0-snapshot.e4e4347

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