@tenphi/tasty 0.0.0-snapshot.db103fd → 0.0.0-snapshot.dd9840e

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 (334) hide show
  1. package/README.md +29 -23
  2. package/dist/{ssr/async-storage.js → async-storage-B7_o6FKt.js} +16 -6
  3. package/dist/async-storage-B7_o6FKt.js.map +1 -0
  4. package/dist/{ssr/collector.js → collector-DrgDE7QB.js} +36 -32
  5. package/dist/collector-DrgDE7QB.js.map +1 -0
  6. package/dist/{ssr/collector.d.ts → collector-LuU1vZ68.d.ts} +11 -15
  7. package/dist/config-_aQ_PZ-P.js +10131 -0
  8. package/dist/config-_aQ_PZ-P.js.map +1 -0
  9. package/dist/config-vuCRkBWX.d.ts +884 -0
  10. package/dist/context-CkSg-kDT.js +24 -0
  11. package/dist/context-CkSg-kDT.js.map +1 -0
  12. package/dist/core/index.d.ts +5 -33
  13. package/dist/core/index.js +6 -26
  14. package/dist/core-BqO8pplb.js +1592 -0
  15. package/dist/core-BqO8pplb.js.map +1 -0
  16. package/dist/{zero/extractor.js → css-writer-D--REwtp.js} +74 -11
  17. package/dist/css-writer-D--REwtp.js.map +1 -0
  18. package/dist/{ssr/format-global-rules.js → format-global-rules-Dbc_1tc3.js} +2 -2
  19. package/dist/format-global-rules-Dbc_1tc3.js.map +1 -0
  20. package/dist/format-rules-xwteB7a1.js +143 -0
  21. package/dist/format-rules-xwteB7a1.js.map +1 -0
  22. package/dist/hydrate-BvPT4ndL.js +45 -0
  23. package/dist/hydrate-BvPT4ndL.js.map +1 -0
  24. package/dist/index-dUtwpOux.d.ts +1266 -0
  25. package/dist/index-h0MibUBL.d.ts +1602 -0
  26. package/dist/index.d.ts +5 -50
  27. package/dist/index.js +732 -35
  28. package/dist/index.js.map +1 -0
  29. package/dist/keyframes-ClPFWy33.js +587 -0
  30. package/dist/keyframes-ClPFWy33.js.map +1 -0
  31. package/dist/{utils/merge-styles.js → merge-styles-BUQsEpbv.js} +3 -4
  32. package/dist/merge-styles-BUQsEpbv.js.map +1 -0
  33. package/dist/{utils/merge-styles.d.ts → merge-styles-CtDJMhpJ.d.ts} +3 -3
  34. package/dist/{utils/resolve-recipes.js → resolve-recipes-C0-AMzCz.js} +4 -6
  35. package/dist/resolve-recipes-C0-AMzCz.js.map +1 -0
  36. package/dist/ssr/astro-client.js +19 -0
  37. package/dist/ssr/astro-client.js.map +1 -0
  38. package/dist/ssr/astro-middleware.d.ts +15 -0
  39. package/dist/ssr/astro-middleware.js +19 -0
  40. package/dist/ssr/astro-middleware.js.map +1 -0
  41. package/dist/ssr/astro.d.ts +89 -10
  42. package/dist/ssr/astro.js +115 -30
  43. package/dist/ssr/astro.js.map +1 -1
  44. package/dist/ssr/index.d.ts +44 -5
  45. package/dist/ssr/index.js +6 -7
  46. package/dist/ssr/index.js.map +1 -1
  47. package/dist/ssr/next.d.ts +5 -4
  48. package/dist/ssr/next.js +16 -10
  49. package/dist/ssr/next.js.map +1 -1
  50. package/dist/static/index.d.ts +91 -5
  51. package/dist/static/index.js +49 -3
  52. package/dist/static/index.js.map +1 -0
  53. package/dist/zero/babel.d.ts +7 -108
  54. package/dist/zero/babel.js +45 -17
  55. package/dist/zero/babel.js.map +1 -1
  56. package/dist/zero/index.d.ts +67 -3
  57. package/dist/zero/index.js +1 -2
  58. package/docs/README.md +4 -4
  59. package/docs/adoption.md +5 -3
  60. package/docs/comparison.md +24 -25
  61. package/docs/configuration.md +69 -1
  62. package/docs/debug.md +11 -9
  63. package/docs/design-system.md +22 -10
  64. package/docs/dsl.md +23 -8
  65. package/docs/getting-started.md +10 -10
  66. package/docs/injector.md +43 -27
  67. package/docs/methodology.md +52 -3
  68. package/docs/{PIPELINE.md → pipeline.md} +204 -50
  69. package/docs/{runtime.md → react-api.md} +104 -32
  70. package/docs/ssr.md +139 -81
  71. package/docs/styles.md +14 -0
  72. package/docs/tasty-static.md +14 -2
  73. package/package.json +17 -10
  74. package/dist/_virtual/_rolldown/runtime.js +0 -7
  75. package/dist/chunks/cacheKey.js +0 -77
  76. package/dist/chunks/cacheKey.js.map +0 -1
  77. package/dist/chunks/definitions.d.ts +0 -37
  78. package/dist/chunks/definitions.js +0 -258
  79. package/dist/chunks/definitions.js.map +0 -1
  80. package/dist/chunks/index.d.ts +0 -1
  81. package/dist/chunks/renderChunk.d.ts +0 -1
  82. package/dist/chunks/renderChunk.js +0 -59
  83. package/dist/chunks/renderChunk.js.map +0 -1
  84. package/dist/config.d.ts +0 -366
  85. package/dist/config.js +0 -503
  86. package/dist/config.js.map +0 -1
  87. package/dist/counter-style/index.js +0 -51
  88. package/dist/counter-style/index.js.map +0 -1
  89. package/dist/debug.d.ts +0 -89
  90. package/dist/debug.js +0 -453
  91. package/dist/debug.js.map +0 -1
  92. package/dist/font-face/index.js +0 -63
  93. package/dist/font-face/index.js.map +0 -1
  94. package/dist/hooks/index.d.ts +0 -7
  95. package/dist/hooks/resolve-ssr-collector.js +0 -14
  96. package/dist/hooks/resolve-ssr-collector.js.map +0 -1
  97. package/dist/hooks/useCounterStyle.d.ts +0 -50
  98. package/dist/hooks/useCounterStyle.js +0 -46
  99. package/dist/hooks/useCounterStyle.js.map +0 -1
  100. package/dist/hooks/useFontFace.d.ts +0 -43
  101. package/dist/hooks/useFontFace.js +0 -70
  102. package/dist/hooks/useFontFace.js.map +0 -1
  103. package/dist/hooks/useGlobalStyles.d.ts +0 -30
  104. package/dist/hooks/useGlobalStyles.js +0 -78
  105. package/dist/hooks/useGlobalStyles.js.map +0 -1
  106. package/dist/hooks/useKeyframes.d.ts +0 -56
  107. package/dist/hooks/useKeyframes.js +0 -64
  108. package/dist/hooks/useKeyframes.js.map +0 -1
  109. package/dist/hooks/useProperty.d.ts +0 -79
  110. package/dist/hooks/useProperty.js +0 -109
  111. package/dist/hooks/useProperty.js.map +0 -1
  112. package/dist/hooks/useRawCSS.d.ts +0 -53
  113. package/dist/hooks/useRawCSS.js +0 -35
  114. package/dist/hooks/useRawCSS.js.map +0 -1
  115. package/dist/hooks/useStyles.d.ts +0 -45
  116. package/dist/hooks/useStyles.js +0 -237
  117. package/dist/hooks/useStyles.js.map +0 -1
  118. package/dist/injector/index.d.ts +0 -183
  119. package/dist/injector/index.js +0 -179
  120. package/dist/injector/index.js.map +0 -1
  121. package/dist/injector/injector.d.ts +0 -166
  122. package/dist/injector/injector.js +0 -464
  123. package/dist/injector/injector.js.map +0 -1
  124. package/dist/injector/sheet-manager.d.ts +0 -136
  125. package/dist/injector/sheet-manager.js +0 -733
  126. package/dist/injector/sheet-manager.js.map +0 -1
  127. package/dist/injector/types.d.ts +0 -204
  128. package/dist/keyframes/index.js +0 -206
  129. package/dist/keyframes/index.js.map +0 -1
  130. package/dist/parser/classify.js +0 -319
  131. package/dist/parser/classify.js.map +0 -1
  132. package/dist/parser/const.js +0 -49
  133. package/dist/parser/const.js.map +0 -1
  134. package/dist/parser/lru.js +0 -109
  135. package/dist/parser/lru.js.map +0 -1
  136. package/dist/parser/parser.d.ts +0 -25
  137. package/dist/parser/parser.js +0 -115
  138. package/dist/parser/parser.js.map +0 -1
  139. package/dist/parser/tokenizer.js +0 -69
  140. package/dist/parser/tokenizer.js.map +0 -1
  141. package/dist/parser/types.d.ts +0 -51
  142. package/dist/parser/types.js +0 -46
  143. package/dist/parser/types.js.map +0 -1
  144. package/dist/pipeline/conditions.d.ts +0 -134
  145. package/dist/pipeline/conditions.js +0 -406
  146. package/dist/pipeline/conditions.js.map +0 -1
  147. package/dist/pipeline/exclusive.js +0 -230
  148. package/dist/pipeline/exclusive.js.map +0 -1
  149. package/dist/pipeline/index.d.ts +0 -55
  150. package/dist/pipeline/index.js +0 -708
  151. package/dist/pipeline/index.js.map +0 -1
  152. package/dist/pipeline/materialize.js +0 -1103
  153. package/dist/pipeline/materialize.js.map +0 -1
  154. package/dist/pipeline/parseStateKey.d.ts +0 -15
  155. package/dist/pipeline/parseStateKey.js +0 -446
  156. package/dist/pipeline/parseStateKey.js.map +0 -1
  157. package/dist/pipeline/simplify.js +0 -515
  158. package/dist/pipeline/simplify.js.map +0 -1
  159. package/dist/pipeline/warnings.js +0 -18
  160. package/dist/pipeline/warnings.js.map +0 -1
  161. package/dist/plugins/index.d.ts +0 -2
  162. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  163. package/dist/plugins/okhsl-plugin.js +0 -97
  164. package/dist/plugins/okhsl-plugin.js.map +0 -1
  165. package/dist/plugins/types.d.ts +0 -76
  166. package/dist/properties/index.js +0 -222
  167. package/dist/properties/index.js.map +0 -1
  168. package/dist/properties/property-type-resolver.d.ts +0 -24
  169. package/dist/properties/property-type-resolver.js +0 -90
  170. package/dist/properties/property-type-resolver.js.map +0 -1
  171. package/dist/ssr/async-storage.d.ts +0 -17
  172. package/dist/ssr/async-storage.js.map +0 -1
  173. package/dist/ssr/collect-auto-properties.js +0 -39
  174. package/dist/ssr/collect-auto-properties.js.map +0 -1
  175. package/dist/ssr/collector.js.map +0 -1
  176. package/dist/ssr/context.d.ts +0 -8
  177. package/dist/ssr/context.js +0 -13
  178. package/dist/ssr/context.js.map +0 -1
  179. package/dist/ssr/format-global-rules.js.map +0 -1
  180. package/dist/ssr/format-keyframes.js +0 -69
  181. package/dist/ssr/format-keyframes.js.map +0 -1
  182. package/dist/ssr/format-property.js +0 -49
  183. package/dist/ssr/format-property.js.map +0 -1
  184. package/dist/ssr/format-rules.js +0 -73
  185. package/dist/ssr/format-rules.js.map +0 -1
  186. package/dist/ssr/hydrate.d.ts +0 -22
  187. package/dist/ssr/hydrate.js +0 -49
  188. package/dist/ssr/hydrate.js.map +0 -1
  189. package/dist/ssr/ssr-collector-ref.js +0 -12
  190. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  191. package/dist/states/index.d.ts +0 -49
  192. package/dist/states/index.js +0 -170
  193. package/dist/states/index.js.map +0 -1
  194. package/dist/static/tastyStatic.d.ts +0 -46
  195. package/dist/static/tastyStatic.js +0 -30
  196. package/dist/static/tastyStatic.js.map +0 -1
  197. package/dist/static/types.d.ts +0 -49
  198. package/dist/static/types.js +0 -24
  199. package/dist/static/types.js.map +0 -1
  200. package/dist/styles/align.d.ts +0 -15
  201. package/dist/styles/align.js +0 -14
  202. package/dist/styles/align.js.map +0 -1
  203. package/dist/styles/border.d.ts +0 -25
  204. package/dist/styles/border.js +0 -113
  205. package/dist/styles/border.js.map +0 -1
  206. package/dist/styles/color.d.ts +0 -14
  207. package/dist/styles/color.js +0 -26
  208. package/dist/styles/color.js.map +0 -1
  209. package/dist/styles/createStyle.js +0 -79
  210. package/dist/styles/createStyle.js.map +0 -1
  211. package/dist/styles/dimension.js +0 -96
  212. package/dist/styles/dimension.js.map +0 -1
  213. package/dist/styles/display.d.ts +0 -37
  214. package/dist/styles/display.js +0 -66
  215. package/dist/styles/display.js.map +0 -1
  216. package/dist/styles/fade.d.ts +0 -15
  217. package/dist/styles/fade.js +0 -57
  218. package/dist/styles/fade.js.map +0 -1
  219. package/dist/styles/fill.d.ts +0 -42
  220. package/dist/styles/fill.js +0 -51
  221. package/dist/styles/fill.js.map +0 -1
  222. package/dist/styles/flow.d.ts +0 -16
  223. package/dist/styles/flow.js +0 -12
  224. package/dist/styles/flow.js.map +0 -1
  225. package/dist/styles/gap.d.ts +0 -31
  226. package/dist/styles/gap.js +0 -36
  227. package/dist/styles/gap.js.map +0 -1
  228. package/dist/styles/height.d.ts +0 -17
  229. package/dist/styles/height.js +0 -19
  230. package/dist/styles/height.js.map +0 -1
  231. package/dist/styles/index.d.ts +0 -1
  232. package/dist/styles/index.js +0 -8
  233. package/dist/styles/index.js.map +0 -1
  234. package/dist/styles/inset.d.ts +0 -52
  235. package/dist/styles/inset.js +0 -149
  236. package/dist/styles/inset.js.map +0 -1
  237. package/dist/styles/justify.d.ts +0 -15
  238. package/dist/styles/justify.js +0 -14
  239. package/dist/styles/justify.js.map +0 -1
  240. package/dist/styles/list.d.ts +0 -16
  241. package/dist/styles/list.js +0 -98
  242. package/dist/styles/list.js.map +0 -1
  243. package/dist/styles/margin.d.ts +0 -24
  244. package/dist/styles/margin.js +0 -103
  245. package/dist/styles/margin.js.map +0 -1
  246. package/dist/styles/outline.d.ts +0 -29
  247. package/dist/styles/outline.js +0 -64
  248. package/dist/styles/outline.js.map +0 -1
  249. package/dist/styles/padding.d.ts +0 -24
  250. package/dist/styles/padding.js +0 -103
  251. package/dist/styles/padding.js.map +0 -1
  252. package/dist/styles/predefined.d.ts +0 -71
  253. package/dist/styles/predefined.js +0 -237
  254. package/dist/styles/predefined.js.map +0 -1
  255. package/dist/styles/preset.d.ts +0 -52
  256. package/dist/styles/preset.js +0 -126
  257. package/dist/styles/preset.js.map +0 -1
  258. package/dist/styles/radius.d.ts +0 -12
  259. package/dist/styles/radius.js +0 -71
  260. package/dist/styles/radius.js.map +0 -1
  261. package/dist/styles/scrollbar.d.ts +0 -25
  262. package/dist/styles/scrollbar.js +0 -46
  263. package/dist/styles/scrollbar.js.map +0 -1
  264. package/dist/styles/shadow.d.ts +0 -14
  265. package/dist/styles/shadow.js +0 -23
  266. package/dist/styles/shadow.js.map +0 -1
  267. package/dist/styles/transition.d.ts +0 -14
  268. package/dist/styles/transition.js +0 -157
  269. package/dist/styles/transition.js.map +0 -1
  270. package/dist/styles/types.d.ts +0 -549
  271. package/dist/styles/width.d.ts +0 -17
  272. package/dist/styles/width.js +0 -19
  273. package/dist/styles/width.js.map +0 -1
  274. package/dist/tasty.d.ts +0 -119
  275. package/dist/tasty.js +0 -231
  276. package/dist/tasty.js.map +0 -1
  277. package/dist/types.d.ts +0 -184
  278. package/dist/utils/cache-wrapper.js +0 -21
  279. package/dist/utils/cache-wrapper.js.map +0 -1
  280. package/dist/utils/case-converter.js +0 -8
  281. package/dist/utils/case-converter.js.map +0 -1
  282. package/dist/utils/color-math.d.ts +0 -46
  283. package/dist/utils/color-math.js +0 -749
  284. package/dist/utils/color-math.js.map +0 -1
  285. package/dist/utils/color-space.d.ts +0 -5
  286. package/dist/utils/color-space.js +0 -228
  287. package/dist/utils/color-space.js.map +0 -1
  288. package/dist/utils/colors.d.ts +0 -5
  289. package/dist/utils/colors.js +0 -10
  290. package/dist/utils/colors.js.map +0 -1
  291. package/dist/utils/css-types.d.ts +0 -7
  292. package/dist/utils/dotize.d.ts +0 -26
  293. package/dist/utils/dotize.js +0 -122
  294. package/dist/utils/dotize.js.map +0 -1
  295. package/dist/utils/filter-base-props.d.ts +0 -15
  296. package/dist/utils/filter-base-props.js +0 -45
  297. package/dist/utils/filter-base-props.js.map +0 -1
  298. package/dist/utils/get-display-name.d.ts +0 -7
  299. package/dist/utils/get-display-name.js +0 -10
  300. package/dist/utils/get-display-name.js.map +0 -1
  301. package/dist/utils/has-keys.js +0 -13
  302. package/dist/utils/has-keys.js.map +0 -1
  303. package/dist/utils/is-dev-env.js +0 -19
  304. package/dist/utils/is-dev-env.js.map +0 -1
  305. package/dist/utils/is-valid-element-type.js +0 -15
  306. package/dist/utils/is-valid-element-type.js.map +0 -1
  307. package/dist/utils/merge-styles.js.map +0 -1
  308. package/dist/utils/mod-attrs.d.ts +0 -6
  309. package/dist/utils/mod-attrs.js +0 -20
  310. package/dist/utils/mod-attrs.js.map +0 -1
  311. package/dist/utils/process-tokens.d.ts +0 -21
  312. package/dist/utils/process-tokens.js +0 -90
  313. package/dist/utils/process-tokens.js.map +0 -1
  314. package/dist/utils/resolve-recipes.d.ts +0 -17
  315. package/dist/utils/resolve-recipes.js.map +0 -1
  316. package/dist/utils/selector-transform.js +0 -32
  317. package/dist/utils/selector-transform.js.map +0 -1
  318. package/dist/utils/string.js +0 -8
  319. package/dist/utils/string.js.map +0 -1
  320. package/dist/utils/styles.d.ts +0 -99
  321. package/dist/utils/styles.js +0 -220
  322. package/dist/utils/styles.js.map +0 -1
  323. package/dist/utils/typography.d.ts +0 -47
  324. package/dist/utils/typography.js +0 -51
  325. package/dist/utils/typography.js.map +0 -1
  326. package/dist/utils/warnings.d.ts +0 -16
  327. package/dist/utils/warnings.js +0 -16
  328. package/dist/utils/warnings.js.map +0 -1
  329. package/dist/zero/css-writer.d.ts +0 -45
  330. package/dist/zero/css-writer.js +0 -73
  331. package/dist/zero/css-writer.js.map +0 -1
  332. package/dist/zero/extractor.d.ts +0 -24
  333. package/dist/zero/extractor.js.map +0 -1
  334. /package/dist/{chunks/cacheKey.d.ts → ssr/astro-client.d.ts} +0 -0
@@ -6,56 +6,109 @@ This document describes the style rendering pipeline that transforms style objec
6
6
 
7
7
  ## Overview
8
8
 
9
- The pipeline takes a `Styles` object and produces an array of `CSSRule` objects ready for injection into the DOM. Entry points include `renderStylesPipeline` (full pipeline + optional class-name prefixing) and `renderStyles` (direct selector/class mode). The per-handler flow has seven main stages:
9
+ The pipeline takes a `Styles` object and produces an array of `CSSRule` objects ready for injection into the DOM. Entry points include `renderStylesPipeline` (full pipeline + optional class-name prefixing) and `renderStyles` (direct selector/class mode). The per-handler flow is:
10
10
 
11
11
  ```
12
12
  Input: Styles Object
13
13
  ↓
14
- ┌─────────────────────────────────────┐
15
- │ 1. PARSE CONDITIONS │
16
- │ parseStyleEntries + parseStateKey│
17
- └─────────────────────────────────────┘
14
+ ┌──────────────────────────────────────────┐
15
+ │ 0. PRE-PARSE NORMALIZATION │
16
+ │ extractCompoundStates │
17
+ │ (drop don't-care AND atoms) │
18
+ └──────────────────────────────────────────┘
18
19
  ↓
19
- ┌─────────────────────────────────────┐
20
- │ 2. BUILD EXCLUSIVE CONDITIONS │
21
- │ Negate higher-priority entries │
22
- └─────────────────────────────────────┘
20
+ ┌──────────────────────────────────────────┐
21
+ │ 1. PARSE CONDITIONS │
22
+ │ parseStyleEntries + parseStateKey │
23
+ └──────────────────────────────────────────┘
23
24
  ↓
24
- ┌─────────────────────────────────────┐
25
- │ 3. EXPAND AT-RULE OR BRANCHES │
26
- │ expandExclusiveOrs (when needed)│
27
- └─────────────────────────────────────┘
25
+ ┌──────────────────────────────────────────┐
26
+ │ 1b. MERGE ENTRIES BY VALUE │
27
+ │ mergeEntriesByValue │
28
+ │ (collapse same-value non-defaults) │
29
+ └──────────────────────────────────────────┘
28
30
  ↓
29
- ┌─────────────────────────────────────┐
30
- │ 4. COMPUTE STATE COMBINATIONS │
31
- │ Cartesian product across styles │
32
- └─────────────────────────────────────┘
31
+ ┌──────────────────────────────────────────┐
32
+ │ 2a. EXPAND USER OR BRANCHES │
33
+ │ expandOrConditions │
34
+ │ (A | B | C → A, B&!A, C&!A&!B) │
35
+ └──────────────────────────────────────────┘
33
36
  ↓
34
- ┌─────────────────────────────────────┐
35
- │ 5. CALL HANDLERS │
36
- │ Compute CSS declarations │
37
- └─────────────────────────────────────┘
37
+ ┌──────────────────────────────────────────┐
38
+ │ 2b. BUILD EXCLUSIVE CONDITIONS │
39
+ │ Negate higher-priority entries │
40
+ └──────────────────────────────────────────┘
38
41
  ↓
39
- ┌─────────────────────────────────────┐
40
- │ 6. MERGE BY VALUE │
41
- │ Combine rules with same output │
42
- └─────────────────────────────────────┘
42
+ ┌──────────────────────────────────────────┐
43
+ │ 3. EXPAND DE MORGAN OR BRANCHES │
44
+ │ expandExclusiveOrs │
45
+ │ (only for at-rule ORs from negation) │
46
+ └──────────────────────────────────────────┘
43
47
  ↓
44
- ┌─────────────────────────────────────┐
45
- │ 7. MATERIALIZE CSS │
46
- │ Condition → selectors + at-rules│
47
- └─────────────────────────────────────┘
48
+ ┌──────────────────────────────────────────┐
49
+ │ 4. COMPUTE STATE COMBINATIONS │
50
+ │ Cartesian product across styles │
51
+ └──────────────────────────────────────────┘
48
52
  ↓
49
- ┌─────────────────────────────────────┐
50
- │ runPipeline: dedupe identical rules │
51
- └─────────────────────────────────────┘
53
+ ┌──────────────────────────────────────────┐
54
+ │ 5. CALL HANDLERS │
55
+ │ Compute CSS declarations │
56
+ └──────────────────────────────────────────┘
57
+ ↓
58
+ ┌──────────────────────────────────────────┐
59
+ │ 6. MERGE BY VALUE │
60
+ │ Combine rules with same output │
61
+ └──────────────────────────────────────────┘
62
+ ↓
63
+ ┌──────────────────────────────────────────┐
64
+ │ 7. MATERIALIZE CSS │
65
+ │ Condition → selectors + at-rules │
66
+ └──────────────────────────────────────────┘
67
+ ↓
68
+ ┌──────────────────────────────────────────┐
69
+ │ runPipeline post-pass: │
70
+ │ - dedupe identical rules │
71
+ │ - emit @starting-style rules last │
72
+ └──────────────────────────────────────────┘
52
73
  ↓
53
74
  Output: CSSRule[]
54
75
  ```
55
76
 
56
- **Simplification** (`simplifyCondition` in `simplify.ts`) is not a separate numbered stage. It runs inside exclusive building, `expandExclusiveOrs` branch cleanup, combination ANDs, merge-by-value ORs, and materialization as needed.
77
+ **Simplification** (`simplifyCondition` in `simplify.ts`) is not a separate numbered stage. It runs inside OR expansion, exclusive building, `expandExclusiveOrs` branch cleanup, combination ANDs, merge-by-value ORs, and materialization. Every call is cached by condition unique-id, so the repetition is cheap.
57
78
 
58
- **Post-pass:** After `processStyles` collects rules from every handler, `runPipeline` filters duplicates using a key of `selector|declarations|atRules|rootPrefix` so identical emitted rules appear once.
79
+ **Post-pass:** After `processStyles` collects rules from every handler, `runPipeline` (`index.ts:188`) filters duplicates using a key of `selector|declarations|atRules|rootPrefix|startingStyle` and then reorders rules so every `@starting-style` rule is emitted **after** all normal rules. This ordering is cascade-critical: `@starting-style` rules share specificity with their normal counterparts, and source order decides which value wins.
80
+
81
+ ---
82
+
83
+ ## Stage 0: Pre-parse Normalization
84
+
85
+ **File:** `exclusive.ts` (`extractCompoundStates`)
86
+
87
+ ### What It Does
88
+
89
+ Runs on each style's value map **before** any parsing. If a compound AND state key shares a value with the "atom absent" variant, the atom is a don't-care and every key is simplified by dropping it. Duplicate keys collapse.
90
+
91
+ ### How It Works
92
+
93
+ 1. Gather the unique set of top-level AND atoms across all keys.
94
+ 2. An atom is **redundant** when every entry that contains it has a same-value partner with the atom absent and the rest of the atoms identical.
95
+ 3. Keys containing `|`, `^`, or `,` at top level are treated as opaque single atoms (they don't participate in atom-level extraction).
96
+ 4. Drop redundant atoms from every key; collapse duplicates.
97
+
98
+ ### Why
99
+
100
+ Removing don't-care dimensions before parsing prevents combinatorial blowup in later stages. `mergeEntriesByValue`, `buildExclusiveConditions`, and materialization all see fewer entries and fewer spurious conditions. Implemented as part of the Apr 2026 fix for overlapping CSS rules (commit 7cd9dbe).
101
+
102
+ ### Example
103
+
104
+ ```typescript
105
+ // Input (value map)
106
+ { '': 'A', '@dark': 'B', '@hc': 'A', '@dark & @hc': 'B' }
107
+ // @hc is a don't-care: its presence never changes the value.
108
+
109
+ // Output
110
+ { '': 'A', '@dark': 'B' }
111
+ ```
59
112
 
60
113
  ---
61
114
 
@@ -120,7 +173,75 @@ The condition tree representation enables:
120
173
 
121
174
  ---
122
175
 
123
- ## Stage 2: Build Exclusive Conditions
176
+ ## Stage 1b: Merge Entries By Value
177
+
178
+ **File:** `exclusive.ts` (`mergeEntriesByValue`)
179
+
180
+ ### What It Does
181
+
182
+ Collapses parsed entries that share the same value. Only **non-default** entries are merged — an entry with the default state (`''` → `TrueCondition`) is never merged with a non-default entry.
183
+
184
+ ### How It Works
185
+
186
+ 1. Group entries by serialized value.
187
+ 2. Within each group, split out default (TRUE) entries.
188
+ 3. Keep default entries as-is; they must retain TRUE so they participate correctly in exclusive building.
189
+ 4. Combine non-default entries into a single entry with condition `OR(e1.condition, e2.condition, …)`, simplified via `simplifyCondition`. The merged entry keeps the **highest** priority in the group.
190
+ 5. Re-sort by priority (highest first).
191
+
192
+ ### Why
193
+
194
+ Without this, a value map like `{ '@dark': 'red', '@dark & @hc': 'red' }` would create two separate entries that later produce two CSS rules with identical output. Merging before exclusive building keeps the exclusive condition algebra small and avoids duplicate CSS.
195
+
196
+ **Why defaults are kept separate:** merging `TRUE | X` collapses to `TRUE`, destroying X's participation in the exclusive cascade. Intermediate-priority states would then lose their `:not(X)` negation, producing overlapping CSS rules. See `exclusive.ts:140-160` for the rationale.
197
+
198
+ ### Example
199
+
200
+ ```typescript
201
+ // Input entries (highest priority first)
202
+ [
203
+ { stateKey: '@dark & @hc', value: 'red', condition: dark & hc },
204
+ { stateKey: '@dark', value: 'red', condition: dark },
205
+ ]
206
+
207
+ // Output: one merged entry
208
+ [
209
+ { stateKey: '@dark & @hc | @dark', value: 'red',
210
+ condition: simplify((dark & hc) | dark) = dark }
211
+ ]
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Stage 2a: Expand User OR Branches
217
+
218
+ **File:** `exclusive.ts` (`expandOrConditions`)
219
+
220
+ ### What It Does
221
+
222
+ Runs **before** `buildExclusiveConditions`. Splits any user-authored OR in a parsed entry's condition into multiple sibling entries, each made exclusive against the OR branches that come before it.
223
+
224
+ ### How It Works
225
+
226
+ For an entry with condition `A | B | C`:
227
+
228
+ ```
229
+ A (first branch, no prior)
230
+ B & !A (second branch exclusive from first)
231
+ C & !A & !B (third branch exclusive from first two)
232
+ ```
233
+
234
+ Each expanded branch gets a `stateKey` suffix like `[0]`, `[1]`, `[2]`. Branches that simplify to `FALSE` are dropped. Branches inherit the original entry's priority.
235
+
236
+ This pass does **not** sort branches — user ORs are authored in the natural order they appear and aren't the product of De Morgan negation, so at-rule-aware sorting isn't required here (that's Stage 3's job).
237
+
238
+ ### Why
239
+
240
+ Running this before exclusive building means the Stage 2b negation cascade sees one branch per entry and never has to reason about nested ORs while computing `!prior`. It also avoids emitting overlapping CSS rules: `{ 'compact | @media(dark)': 'red' }` becomes two mutually exclusive entries rather than one rule whose two branches could both match simultaneously.
241
+
242
+ ---
243
+
244
+ ## Stage 2b: Build Exclusive Conditions
124
245
 
125
246
  **File:** `exclusive.ts` (`buildExclusiveConditions`)
126
247
 
@@ -167,28 +288,41 @@ This eliminates CSS specificity wars. Instead of relying on cascade order, each
167
288
 
168
289
  ---
169
290
 
170
- ## Stage 3: Expand At-Rule OR Branches
291
+ ## Stage 3: Expand De Morgan OR Branches
171
292
 
172
- **File:** `exclusive.ts` (`expandExclusiveOrs`)
293
+ **File:** `exclusive.ts` (`expandExclusiveOrs`, `sortOrBranchesForExpansion`)
173
294
 
174
295
  ### What It Does
175
296
 
176
- Runs **after** `buildExclusiveConditions`. When an entry’s **exclusive** condition contains a top-level OR that mixes **at-rule** context (`media`, `container`, `supports`, `starting`) with other branches, those ORs are split into mutually exclusive branches so each branch keeps the correct at-rule wrapping (e.g. after De Morgan: `!(A & B)` → `!A | !B`).
297
+ Runs **after** `buildExclusiveConditions`. Handles ORs that arise **during** exclusive building from De Morgan negation — e.g. when a higher-priority condition `A & B` gets negated into the next entry's exclusive as `!(A & B) = !A | !B`. When such an OR mixes **at-rule** context (`media`, `container`, `supports`, `starting`) with other branches, each branch needs to keep its own at-rule wrapping.
298
+
299
+ This is the companion to **Stage 2a** (user-OR expansion). The split exists because the two passes have different data and different correctness needs:
300
+
301
+ | Stage | Runs on | Sees ORs from | Sorts branches? |
302
+ |---|---|---|---|
303
+ | 2a `expandOrConditions` | `ParsedStyleEntry.condition` | User-authored `|` in state keys | No — user order is stable |
304
+ | 3 `expandExclusiveOrs` | `ExclusiveStyleEntry.exclusiveCondition` | De Morgan negation inside `buildExclusiveConditions` | Yes — at-rule branches first |
177
305
 
178
306
  ### How It Works
179
307
 
180
308
  1. Collect top-level OR branches of `exclusiveCondition`.
181
- 2. If there is no OR, or **no** branch involves at-rule context, the entry is unchanged (pure selector ORs are handled later via `:is()` / variant merging in materialization).
182
- 3. Otherwise, branches are sorted with `sortOrBranchesForExpansion` so at-rule-heavy branches come first, then each branch is made exclusive against prior branches: `branch & !prior[0] & !prior[1] & ...`, then simplified.
183
- 4. Impossible branches are dropped; expanded entries get a synthetic `stateKey` suffix like `[or:0]`.
309
+ 2. If there is no OR (single branch), the entry is unchanged. Pure selector ORs with no at-rule context are also left alone (materialization handles them via `:is()` / variant merging).
310
+ 3. Otherwise `sortOrBranchesForExpansion` reorders branches so at-rule-heavy branches come first. This is load-bearing for correctness (see below).
311
+ 4. Each branch is made exclusive against prior branches: `branch & !prior[0] & !prior[1] & ...`, then simplified.
312
+ 5. Impossible branches are dropped; expanded entries get a synthetic `stateKey` suffix like `[or:0]`.
184
313
 
185
- ### Why
314
+ ### Why the sort matters
315
+
316
+ Consider `!A | !B` where A is an at-rule (e.g. `@supports(grid)`) and B is a modifier (e.g. `:has(foo)`):
186
317
 
187
- Without this pass, a condition like `!(@supports & :has)` could produce one rule missing the `@supports` wrapper. Exclusive OR expansion ensures negated at-rule groups still nest modifiers correctly.
318
+ - **With at-rule-first sort** (`!A`, then `!B & A`): the first branch emits "outside `@supports`", the second emits "inside `@supports` with `:not(:has(foo))`". Full coverage.
319
+ - **Without the sort** (`!B`, then `!A & B`): the first branch emits `:not(:has(foo))` as a bare selector with no at-rule context — leaking the rule outside `@supports`. The second is incomplete.
320
+
321
+ The pre-build Stage 2a pass doesn't need this because user-authored ORs aren't produced by negation and their branches are expected to apply in each branch's own scope.
188
322
 
189
323
  ### Example (conceptual)
190
324
 
191
- See the comment block in `exclusive.ts` (~195–206): a default value’s exclusive condition can become `!@supports | !:has`; expansion yields one branch under `@supports (not …)` and another under `@supports (…) { :not(:has()) }` instead of a bare `:not(:has())` rule.
325
+ See the comment block in `exclusive.ts:500-523`: a default value whose higher-priority sibling is `@supports(...) & :has(...)` gets an exclusive of `!@supports | !:has`. Expansion yields one branch under `@supports (not ...)` and another under `@supports (...) { :not(:has()) }` instead of a bare `:not(:has())` rule.
192
326
 
193
327
  ---
194
328
 
@@ -402,16 +536,20 @@ Applies boolean algebra rules to reduce condition complexity and detect impossib
402
536
  - `A & (A | B) = A`
403
537
  - `A | (A & B) = A`
404
538
 
405
- 7. **Range intersection**: For **media and container** dimension queries, impossible ranges simplify to `FALSE` (e.g. `@media(w > 400px) & @media(w < 300px)`).
539
+ 7. **Range intersection**: For **media and container** dimension queries, impossible ranges simplify to `FALSE` (e.g. `@media(w > 400px) & @media(w < 300px)`). Ranges with compatible bounds are also merged in place (`w >= 400 & w <= 800` → a single bounded range).
406
540
 
407
541
  8. **Container style queries**: Conflicting or redundant `@container` style conditions on the same property can be reduced (see `simplify.ts` around the container-style conflict pass).
408
542
 
409
543
  9. **Attribute conflict detection**:
410
544
  - `[data-theme="dark"] & [data-theme="light"] = FALSE`
411
545
 
546
+ 10. **Complementary factoring** (OR context): `(A & B) | (A & !B) = A`. Also works on **compound complements** — if two AND-clauses differ only by a child that is a compound negation of the other (e.g. `X` vs `!X` where X is itself `(P & Q)`), the clauses factor correctly.
547
+
548
+ 11. **Consensus / resolution** (AND context, dual of #10): `(A | B) & (A | !B) = A`. Added in commit f9038bd to eliminate overlapping CSS selectors from compound-state OR branches.
549
+
412
550
  ### Why
413
551
 
414
- Simplification reduces CSS output size and catches impossible combinations early, preventing invalid CSS rules from being generated.
552
+ Simplification reduces CSS output size and catches impossible combinations early, preventing invalid CSS rules from being generated. Every `simplifyCondition` call is memoized by the condition's unique id, so the cost of running it many times across stages is negligible after the first hit.
415
553
 
416
554
  ---
417
555
 
@@ -452,7 +590,15 @@ const styles = {
452
590
  'hovered' → ModifierCondition(attribute: 'data-hovered')
453
591
  ```
454
592
 
455
- ### Stages 2–3: Exclusive conditions + expand OR
593
+ ### Stage 0 + 1b: Normalization
594
+
595
+ No compound AND keys, no same-value duplicates — the value map is unchanged.
596
+
597
+ ### Stage 1 + 2a: Parse and expand user ORs
598
+
599
+ No user ORs — three entries pass through unchanged.
600
+
601
+ ### Stage 2b + 3: Exclusive conditions + De Morgan expansion
456
602
 
457
603
  Processing order (highest priority first): `hovered`, `@media(dark)`, default.
458
604
 
@@ -462,7 +608,7 @@ hovered: [data-hovered]
462
608
  !hovered & !@media(dark): :not([data-hovered]) & not @media(dark)
463
609
  ```
464
610
 
465
- No at-rule OR expansion needed on these exclusives.
611
+ The default entry's exclusive is `!hovered & !@media(dark)` — no top-level OR, so Stage 3 expansion does nothing. If a higher-priority entry had been `@media(dark) & :has(foo)`, the default's exclusive would have expanded via De Morgan into two at-rule-aware branches (see Stage 3 for that scenario).
466
612
 
467
613
  ### Stages 4–5: Compute combinations and call handler
468
614
 
@@ -506,9 +652,17 @@ Using `renderStyles(styles, '.t1')` (single class prefix; `renderStylesPipeline`
506
652
 
507
653
  Rather than relying on CSS cascade rules, we generate mutually exclusive selectors. This makes styling predictable and debuggable.
508
654
 
509
- ### 2. OR Handling: DNF, `:is()`, and `expandExclusiveOrs`
655
+ ### 2. OR Handling in Three Layers
656
+
657
+ Boolean OR appears in three different shapes during the pipeline, and each is handled where it's cheapest to get right:
658
+
659
+ 1. **User-authored ORs in state keys** (Stage 2a, `expandOrConditions`): A user-authored condition like `'compact | @media(w < 768px)'` is split into multiple exclusive entries **before** exclusive building so the negation cascade doesn't have to reason about nested ORs.
660
+
661
+ 2. **De Morgan ORs from negation** (Stage 3, `expandExclusiveOrs`): When `buildExclusiveConditions` negates a higher-priority compound like `A & B`, the result is `!A | !B`. If branches involve at-rules, they're split with `sortOrBranchesForExpansion` so at-rule context is preserved per branch.
662
+
663
+ 3. **Pure selector ORs** (materialization): ORs that only mention modifiers/pseudos are kept intact until the `conditionToCSS` layer, where they're merged into `:is()` / `:not()` groups or emitted as comma-separated selectors. There's no gain from expanding these earlier — CSS already has compact syntax for selector-only disjunction.
510
664
 
511
- OR of conditions is ultimately expressed as DNF (OR of ANDs) for CSS—comma-separated selectors, multiple rules, or `:is()` / `:not()` groups. **User-authored** ORs on pure selector conditions are handled in materialization. **`expandExclusiveOrs`** is an additional, **post-exclusive** pass for ORs that appear on **exclusive** conditions and involve **at-rule** branches (often from De Morgan on `@supports` / `@media` / `@container` / `@starting`), so each branch keeps correct at-rule nesting.
665
+ Ultimately every emitted CSS rule corresponds to one conjunctive clause (DNF), produced by whichever of the three paths handled the OR.
512
666
 
513
667
  ### 3. Early Contradiction Detection
514
668
 
@@ -1,6 +1,8 @@
1
- # Runtime API
1
+ # React API
2
2
 
3
- The React-specific `tasty()` component factory, component props, and hooks. For the shared style language (state maps, tokens, units, extending semantics), see [Style DSL](dsl.md). For global configuration, see [Configuration](configuration.md). For the broader docs map, see the [Docs Hub](README.md).
3
+ The React-specific `tasty()` component factory, component props, and style functions. All Tasty style functions — `tasty()` components, `useStyles()`, `useGlobalStyles()`, `useRawCSS()`, `useKeyframes()`, `useProperty()`, `useFontFace()`, and `useCounterStyle()` — are hook-free and compatible with React Server Components. No `'use client'` directive needed. For the shared style language (state maps, tokens, units, extending semantics), see [Style DSL](dsl.md). For global configuration, see [Configuration](configuration.md). For the broader docs map, see the [Docs Hub](README.md).
4
+
5
+ > **Note:** This file was previously named `runtime.md`. All functionality documented here works in both server and client contexts — "runtime" referred to style computation during React rendering, not to client-side JavaScript.
4
6
 
5
7
  ---
6
8
 
@@ -154,6 +156,75 @@ For architecture guidance on when to use modifiers vs `styleProps`, see [Methodo
154
156
 
155
157
  ---
156
158
 
159
+ ## Token Props
160
+
161
+ Use `tokenProps` to expose token keys as direct component props instead of requiring the `tokens` object:
162
+
163
+ ```jsx
164
+ // Before: tokens object
165
+ <ProgressBar tokens={{ $progress: '75%', '#accent': '#purple' }} />
166
+
167
+ // After: token props
168
+ <ProgressBar progress="75%" accentColor="#purple" />
169
+ ```
170
+
171
+ ### Array form
172
+
173
+ List prop names. Names ending in `Color` map to `#` color tokens; everything else maps to `$` custom property tokens:
174
+
175
+ ```jsx
176
+ const ProgressBar = tasty({
177
+ tokenProps: ['progress', 'accentColor'] as const,
178
+ styles: { width: '$progress', fill: '#accent' },
179
+ });
180
+
181
+ <ProgressBar progress="75%" accentColor="#purple" />
182
+ // 'progress' → $progress → --progress
183
+ // 'accentColor' → #accent → --accent-color + --accent-color-oklch
184
+ ```
185
+
186
+ ### Object form
187
+
188
+ Map prop names to explicit `$`/`#`-prefixed token keys:
189
+
190
+ ```tsx
191
+ const Card = tasty({
192
+ tokenProps: {
193
+ size: '$card-size',
194
+ color: '#card-accent',
195
+ },
196
+ styles: { padding: '$card-size', fill: '#card-accent' },
197
+ });
198
+
199
+ <Card size="4x" color="#purple" />
200
+ ```
201
+
202
+ ### Merge with `tokens`
203
+
204
+ Token props and the `tokens` prop can be used together. Token props take precedence over `tokens`, which takes precedence over default `tokens` in `tasty({...})`:
205
+
206
+ ```jsx
207
+ const Bar = tasty({
208
+ tokenProps: ['progress'] as const,
209
+ tokens: { $progress: '0%' }, // default
210
+ });
211
+
212
+ <Bar tokens={{ $progress: '50%' }} progress="90%" />
213
+ // progress="90%" wins (from token prop)
214
+ ```
215
+
216
+ ### When to use `tokenProps` vs `tokens`
217
+
218
+ | Use case | Recommendation |
219
+ |---|---|
220
+ | Component has a fixed set of known token keys | `tokenProps` — cleaner API, better TypeScript autocomplete |
221
+ | Component needs arbitrary/dynamic token values | `tokens` — open-ended `Record<string, TokenValue>` |
222
+ | Both fixed and dynamic | Combine: `tokenProps` for known keys, `tokens` for ad-hoc |
223
+
224
+ For architecture guidance, see [Methodology — tokenProps](methodology.md#tokenprops).
225
+
226
+ ---
227
+
157
228
  ## Variants
158
229
 
159
230
  Define named style variations. Only CSS for variants actually used at runtime is injected:
@@ -264,11 +335,33 @@ For the mental model behind sub-elements — how they share root state context a
264
335
 
265
336
  ---
266
337
 
267
- ## Hooks
338
+ ## computeStyles
339
+
340
+ Hook-free, synchronous style computation. Can be used anywhere — including React Server Components, plain functions, and non-React code:
341
+
342
+ ```tsx
343
+ import { computeStyles } from '@tenphi/tasty';
344
+
345
+ const { className } = computeStyles({
346
+ padding: '2x',
347
+ fill: '#surface',
348
+ radius: '1r',
349
+ });
350
+ ```
351
+
352
+ On the client, CSS is injected synchronously into the DOM (idempotent via the injector cache). On the server, CSS is collected via the SSR collector if one is available. This is the same function that `tasty()` components use internally.
353
+
354
+ ---
355
+
356
+ ## Style Functions
357
+
358
+ All style functions below are plain functions (not React hooks) and can be used in any environment: client components, SSR with a `ServerStyleCollector`, and React Server Components. They retain their `use` prefix for backward compatibility, but do not use any React hooks internally.
359
+
360
+ In server-only contexts (Next.js RSC without `'use client'`, Astro without `client:*` directives, SSG), components that use only Tasty style functions produce zero client JavaScript. Tasty never forces the `'use client'` boundary — that decision belongs to your component when it needs React interactivity (state, effects, event handlers).
268
361
 
269
362
  ### useStyles
270
363
 
271
- Generate a className from a style object:
364
+ Generate a className from a style object. Thin wrapper around `computeStyles()`:
272
365
 
273
366
  ```tsx
274
367
  import { useStyles } from '@tenphi/tasty';
@@ -286,7 +379,7 @@ function MyComponent() {
286
379
 
287
380
  ### useGlobalStyles
288
381
 
289
- Inject global styles for a CSS selector:
382
+ Inject global styles for a CSS selector. Accepts an optional third argument with an `id` for update tracking — when the styles change, the previous injection is disposed and the new one is injected:
290
383
 
291
384
  ```tsx
292
385
  import { useGlobalStyles } from '@tenphi/tasty';
@@ -304,7 +397,7 @@ function ThemeStyles() {
304
397
 
305
398
  ### useRawCSS
306
399
 
307
- Inject raw CSS strings:
400
+ Inject raw CSS strings. Accepts an optional `id` in the options for update tracking — when the CSS changes for the same id, the previous injection is replaced:
308
401
 
309
402
  ```tsx
310
403
  import { useRawCSS } from '@tenphi/tasty';
@@ -338,7 +431,7 @@ function Spinner() {
338
431
  }
339
432
  ```
340
433
 
341
- `useKeyframes()` also supports a factory function with dependencies:
434
+ `useKeyframes()` also supports a factory function. The deps array is accepted for backward compatibility but the factory is called on every invocation — deduplication is handled internally by content hash:
342
435
 
343
436
  ```tsx
344
437
  function Pulse({ scale }: { scale: number }) {
@@ -434,43 +527,22 @@ function EmojiList() {
434
527
  }
435
528
  ```
436
529
 
437
- Factory form with dependencies:
438
-
439
- ```tsx
440
- function DynamicList({ marker }: { marker: string }) {
441
- const styleName = useCounterStyle(
442
- () => ({
443
- system: 'cyclic',
444
- symbols: `"${marker}"`,
445
- suffix: '" "',
446
- }),
447
- [marker],
448
- );
449
-
450
- return <ol style={{ listStyleType: styleName }}>...</ol>;
451
- }
452
- ```
453
-
454
- Signatures:
530
+ Signature:
455
531
 
456
532
  ```ts
457
533
  function useCounterStyle(
458
534
  descriptors: CounterStyleDescriptors,
459
535
  options?: { name?: string; root?: Document | ShadowRoot },
460
536
  ): string;
461
-
462
- function useCounterStyle(
463
- factory: () => CounterStyleDescriptors,
464
- deps: readonly unknown[],
465
- options?: { name?: string; root?: Document | ShadowRoot },
466
- ): string;
467
537
  ```
468
538
 
469
539
  ### Troubleshooting
470
540
 
471
541
  - Styles are not updating: make sure `configure()` runs before first render, and verify the generated class name or global rule with [Debug Utilities](debug.md).
472
- - SSR output looks wrong: check the [SSR guide](ssr.md) because the hooks integrate with SSR collectors differently than the client-only runtime path.
542
+ - SSR output looks wrong: check the [SSR guide](ssr.md) for collector setup. All style functions discover the SSR collector via `AsyncLocalStorage` or the global getter registered by `TastyRegistry`.
473
543
  - Animation/custom property issues: prefer `useKeyframes()` and `useProperty()` over raw CSS when you want Tasty to manage injection and SSR collection for you.
544
+ - For dynamic styles that change over the component lifecycle, use the `id` option in `useGlobalStyles()` and `useRawCSS()` to enable update tracking.
545
+ - RSC inline mode: CSS accumulated by standalone style functions (`useGlobalStyles`, `useRawCSS`, etc.) is flushed into inline `<style>` tags by the next `tasty()` component in the render tree. If your page uses only standalone style functions without any `tasty()` component, the CSS will not be emitted. Ensure at least one `tasty()` component is present in each RSC render tree.
474
546
 
475
547
  ---
476
548