@tenphi/tasty 0.0.0-snapshot.bae20d4 → 0.0.0-snapshot.bbd36bd

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 (351) hide show
  1. package/README.md +309 -293
  2. package/dist/astro-CeYENy2x.js +301 -0
  3. package/dist/astro-CeYENy2x.js.map +1 -0
  4. package/dist/{ssr/async-storage.js → async-storage-DKK-wTD4.js} +17 -8
  5. package/dist/async-storage-DKK-wTD4.js.map +1 -0
  6. package/dist/babel-DWCsafYw.d.ts +83 -0
  7. package/dist/collector-B3OsM252.js +327 -0
  8. package/dist/collector-B3OsM252.js.map +1 -0
  9. package/dist/collector-BTVXj2hS.d.ts +163 -0
  10. package/dist/config-B3gPdCqd.js +12421 -0
  11. package/dist/config-B3gPdCqd.js.map +1 -0
  12. package/dist/config-LfIDmVHx.d.ts +1363 -0
  13. package/dist/context-CA8YKeMn.js +24 -0
  14. package/dist/context-CA8YKeMn.js.map +1 -0
  15. package/dist/core/index.d.ts +5 -34
  16. package/dist/core/index.js +6 -27
  17. package/dist/core-DGm0CFHP.js +1732 -0
  18. package/dist/core-DGm0CFHP.js.map +1 -0
  19. package/dist/css-resources-Cyl_axbI.js +149 -0
  20. package/dist/css-resources-Cyl_axbI.js.map +1 -0
  21. package/dist/{zero/extractor.js → css-writer-Bgowobbx.js} +188 -13
  22. package/dist/css-writer-Bgowobbx.js.map +1 -0
  23. package/dist/{ssr/format-global-rules.js → format-global-rules-DklyaXv-.js} +3 -3
  24. package/dist/format-global-rules-DklyaXv-.js.map +1 -0
  25. package/dist/{ssr/format-rules.js → format-rules-XRw9u7d4.js} +41 -7
  26. package/dist/format-rules-XRw9u7d4.js.map +1 -0
  27. package/dist/hydrate-CNOmZprz.js +37 -0
  28. package/dist/hydrate-CNOmZprz.js.map +1 -0
  29. package/dist/index-Bm9ltvdH.d.ts +1933 -0
  30. package/dist/index-BmogEzTo.d.ts +1575 -0
  31. package/dist/index.d.ts +5 -49
  32. package/dist/index.js +921 -33
  33. package/dist/index.js.map +1 -0
  34. package/dist/keyframes-DE-OE76F.js +535 -0
  35. package/dist/keyframes-DE-OE76F.js.map +1 -0
  36. package/dist/{utils/merge-styles.d.ts → merge-styles-BcLl1u_d.d.ts} +3 -3
  37. package/dist/{utils/merge-styles.js → merge-styles-DuoZEsm9.js} +4 -6
  38. package/dist/merge-styles-DuoZEsm9.js.map +1 -0
  39. package/dist/{utils/resolve-recipes.js → resolve-recipes-H9NqOQuP.js} +5 -8
  40. package/dist/resolve-recipes-H9NqOQuP.js.map +1 -0
  41. package/dist/ssr/astro-client.d.ts +1 -0
  42. package/dist/ssr/astro-client.js +19 -0
  43. package/dist/ssr/astro-client.js.map +1 -0
  44. package/dist/ssr/astro-middleware-extract-static.d.ts +11 -0
  45. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  46. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  47. package/dist/ssr/astro-middleware-extract.d.ts +11 -0
  48. package/dist/ssr/astro-middleware-extract.js +9 -0
  49. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  50. package/dist/ssr/astro-middleware-static.d.ts +18 -0
  51. package/dist/ssr/astro-middleware-static.js +18 -0
  52. package/dist/ssr/astro-middleware-static.js.map +1 -0
  53. package/dist/ssr/astro-middleware.d.ts +19 -0
  54. package/dist/ssr/astro-middleware.js +19 -0
  55. package/dist/ssr/astro-middleware.js.map +1 -0
  56. package/dist/ssr/astro.d.ts +117 -11
  57. package/dist/ssr/astro.js +2 -65
  58. package/dist/ssr/index.d.ts +37 -5
  59. package/dist/ssr/index.js +7 -9
  60. package/dist/ssr/index.js.map +1 -1
  61. package/dist/ssr/next-config.d.ts +66 -0
  62. package/dist/ssr/next-config.js +115 -0
  63. package/dist/ssr/next-config.js.map +1 -0
  64. package/dist/ssr/next.d.ts +14 -7
  65. package/dist/ssr/next.js +40 -20
  66. package/dist/ssr/next.js.map +1 -1
  67. package/dist/ssr-collector-ref-COs_ioWl.js +29 -0
  68. package/dist/ssr-collector-ref-COs_ioWl.js.map +1 -0
  69. package/dist/static/index.d.ts +91 -5
  70. package/dist/static/index.js +49 -4
  71. package/dist/static/index.js.map +1 -0
  72. package/dist/static/inject.d.ts +5 -0
  73. package/dist/static/inject.js +17 -0
  74. package/dist/static/inject.js.map +1 -0
  75. package/dist/zero/babel.d.ts +2 -155
  76. package/dist/zero/babel.js +183 -51
  77. package/dist/zero/babel.js.map +1 -1
  78. package/dist/zero/index.d.ts +81 -3
  79. package/dist/zero/index.js +2 -4
  80. package/dist/zero/next.d.ts +13 -1
  81. package/dist/zero/next.js +6 -5
  82. package/dist/zero/next.js.map +1 -1
  83. package/docs/README.md +39 -0
  84. package/docs/adoption.md +72 -35
  85. package/docs/ai-agents.md +224 -0
  86. package/docs/comparison.md +88 -53
  87. package/docs/configuration.md +623 -63
  88. package/docs/debug.md +172 -342
  89. package/docs/design-system.md +83 -29
  90. package/docs/dsl.md +614 -133
  91. package/docs/getting-started.md +80 -43
  92. package/docs/injector.md +159 -53
  93. package/docs/methodology.md +178 -31
  94. package/docs/migration-v3.md +285 -0
  95. package/docs/pipeline.md +741 -0
  96. package/docs/plugins.md +353 -0
  97. package/docs/react-api.md +681 -0
  98. package/docs/runtime-benchmarks.md +351 -0
  99. package/docs/ssr.md +356 -128
  100. package/docs/styles.md +103 -32
  101. package/docs/tasty-static.md +227 -65
  102. package/package.json +83 -22
  103. package/tasty.config.ts +6 -0
  104. package/dist/_virtual/_rolldown/runtime.js +0 -8
  105. package/dist/chunks/cacheKey.js +0 -78
  106. package/dist/chunks/cacheKey.js.map +0 -1
  107. package/dist/chunks/definitions.d.ts +0 -37
  108. package/dist/chunks/definitions.js +0 -259
  109. package/dist/chunks/definitions.js.map +0 -1
  110. package/dist/chunks/renderChunk.js +0 -60
  111. package/dist/chunks/renderChunk.js.map +0 -1
  112. package/dist/config.d.ts +0 -323
  113. package/dist/config.js +0 -465
  114. package/dist/config.js.map +0 -1
  115. package/dist/debug.d.ts +0 -204
  116. package/dist/debug.js +0 -733
  117. package/dist/debug.js.map +0 -1
  118. package/dist/hooks/useGlobalStyles.d.ts +0 -30
  119. package/dist/hooks/useGlobalStyles.js +0 -83
  120. package/dist/hooks/useGlobalStyles.js.map +0 -1
  121. package/dist/hooks/useKeyframes.d.ts +0 -56
  122. package/dist/hooks/useKeyframes.js +0 -69
  123. package/dist/hooks/useKeyframes.js.map +0 -1
  124. package/dist/hooks/useProperty.d.ts +0 -79
  125. package/dist/hooks/useProperty.js +0 -114
  126. package/dist/hooks/useProperty.js.map +0 -1
  127. package/dist/hooks/useRawCSS.d.ts +0 -53
  128. package/dist/hooks/useRawCSS.js +0 -40
  129. package/dist/hooks/useRawCSS.js.map +0 -1
  130. package/dist/hooks/useStyles.d.ts +0 -45
  131. package/dist/hooks/useStyles.js +0 -249
  132. package/dist/hooks/useStyles.js.map +0 -1
  133. package/dist/injector/index.d.ts +0 -165
  134. package/dist/injector/index.js +0 -162
  135. package/dist/injector/index.js.map +0 -1
  136. package/dist/injector/injector.d.ts +0 -148
  137. package/dist/injector/injector.js +0 -430
  138. package/dist/injector/injector.js.map +0 -1
  139. package/dist/injector/sheet-manager.d.ts +0 -136
  140. package/dist/injector/sheet-manager.js +0 -729
  141. package/dist/injector/sheet-manager.js.map +0 -1
  142. package/dist/injector/types.d.ts +0 -144
  143. package/dist/keyframes/index.js +0 -206
  144. package/dist/keyframes/index.js.map +0 -1
  145. package/dist/parser/classify.js +0 -320
  146. package/dist/parser/classify.js.map +0 -1
  147. package/dist/parser/const.js +0 -33
  148. package/dist/parser/const.js.map +0 -1
  149. package/dist/parser/lru.js +0 -109
  150. package/dist/parser/lru.js.map +0 -1
  151. package/dist/parser/parser.d.ts +0 -25
  152. package/dist/parser/parser.js +0 -116
  153. package/dist/parser/parser.js.map +0 -1
  154. package/dist/parser/tokenizer.js +0 -69
  155. package/dist/parser/tokenizer.js.map +0 -1
  156. package/dist/parser/types.d.ts +0 -51
  157. package/dist/parser/types.js +0 -46
  158. package/dist/parser/types.js.map +0 -1
  159. package/dist/pipeline/conditions.d.ts +0 -134
  160. package/dist/pipeline/conditions.js +0 -406
  161. package/dist/pipeline/conditions.js.map +0 -1
  162. package/dist/pipeline/exclusive.js +0 -231
  163. package/dist/pipeline/exclusive.js.map +0 -1
  164. package/dist/pipeline/index.d.ts +0 -53
  165. package/dist/pipeline/index.js +0 -670
  166. package/dist/pipeline/index.js.map +0 -1
  167. package/dist/pipeline/materialize.js +0 -1105
  168. package/dist/pipeline/materialize.js.map +0 -1
  169. package/dist/pipeline/parseStateKey.d.ts +0 -15
  170. package/dist/pipeline/parseStateKey.js +0 -447
  171. package/dist/pipeline/parseStateKey.js.map +0 -1
  172. package/dist/pipeline/simplify.js +0 -516
  173. package/dist/pipeline/simplify.js.map +0 -1
  174. package/dist/pipeline/warnings.js +0 -18
  175. package/dist/pipeline/warnings.js.map +0 -1
  176. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  177. package/dist/plugins/okhsl-plugin.js +0 -98
  178. package/dist/plugins/okhsl-plugin.js.map +0 -1
  179. package/dist/plugins/types.d.ts +0 -76
  180. package/dist/properties/index.js +0 -223
  181. package/dist/properties/index.js.map +0 -1
  182. package/dist/properties/property-type-resolver.d.ts +0 -24
  183. package/dist/properties/property-type-resolver.js +0 -91
  184. package/dist/properties/property-type-resolver.js.map +0 -1
  185. package/dist/ssr/astro.js.map +0 -1
  186. package/dist/ssr/async-storage.d.ts +0 -17
  187. package/dist/ssr/async-storage.js.map +0 -1
  188. package/dist/ssr/collect-auto-properties.js +0 -40
  189. package/dist/ssr/collect-auto-properties.js.map +0 -1
  190. package/dist/ssr/collector.d.ts +0 -85
  191. package/dist/ssr/collector.js +0 -183
  192. package/dist/ssr/collector.js.map +0 -1
  193. package/dist/ssr/context.d.ts +0 -8
  194. package/dist/ssr/context.js +0 -14
  195. package/dist/ssr/context.js.map +0 -1
  196. package/dist/ssr/format-global-rules.js.map +0 -1
  197. package/dist/ssr/format-keyframes.js +0 -70
  198. package/dist/ssr/format-keyframes.js.map +0 -1
  199. package/dist/ssr/format-property.js +0 -50
  200. package/dist/ssr/format-property.js.map +0 -1
  201. package/dist/ssr/format-rules.js.map +0 -1
  202. package/dist/ssr/hydrate.d.ts +0 -22
  203. package/dist/ssr/hydrate.js +0 -50
  204. package/dist/ssr/hydrate.js.map +0 -1
  205. package/dist/ssr/ssr-collector-ref.js +0 -12
  206. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  207. package/dist/states/index.d.ts +0 -49
  208. package/dist/states/index.js +0 -169
  209. package/dist/states/index.js.map +0 -1
  210. package/dist/static/tastyStatic.d.ts +0 -46
  211. package/dist/static/tastyStatic.js +0 -31
  212. package/dist/static/tastyStatic.js.map +0 -1
  213. package/dist/static/types.d.ts +0 -49
  214. package/dist/static/types.js +0 -24
  215. package/dist/static/types.js.map +0 -1
  216. package/dist/styles/align.d.ts +0 -15
  217. package/dist/styles/align.js +0 -14
  218. package/dist/styles/align.js.map +0 -1
  219. package/dist/styles/border.d.ts +0 -25
  220. package/dist/styles/border.js +0 -114
  221. package/dist/styles/border.js.map +0 -1
  222. package/dist/styles/color.d.ts +0 -14
  223. package/dist/styles/color.js +0 -27
  224. package/dist/styles/color.js.map +0 -1
  225. package/dist/styles/createStyle.js +0 -80
  226. package/dist/styles/createStyle.js.map +0 -1
  227. package/dist/styles/dimension.js +0 -97
  228. package/dist/styles/dimension.js.map +0 -1
  229. package/dist/styles/display.d.ts +0 -37
  230. package/dist/styles/display.js +0 -67
  231. package/dist/styles/display.js.map +0 -1
  232. package/dist/styles/fade.d.ts +0 -15
  233. package/dist/styles/fade.js +0 -58
  234. package/dist/styles/fade.js.map +0 -1
  235. package/dist/styles/fill.d.ts +0 -42
  236. package/dist/styles/fill.js +0 -52
  237. package/dist/styles/fill.js.map +0 -1
  238. package/dist/styles/flow.d.ts +0 -16
  239. package/dist/styles/flow.js +0 -12
  240. package/dist/styles/flow.js.map +0 -1
  241. package/dist/styles/gap.d.ts +0 -31
  242. package/dist/styles/gap.js +0 -37
  243. package/dist/styles/gap.js.map +0 -1
  244. package/dist/styles/height.d.ts +0 -17
  245. package/dist/styles/height.js +0 -20
  246. package/dist/styles/height.js.map +0 -1
  247. package/dist/styles/index.d.ts +0 -2
  248. package/dist/styles/index.js +0 -9
  249. package/dist/styles/index.js.map +0 -1
  250. package/dist/styles/inset.d.ts +0 -52
  251. package/dist/styles/inset.js +0 -150
  252. package/dist/styles/inset.js.map +0 -1
  253. package/dist/styles/justify.d.ts +0 -15
  254. package/dist/styles/justify.js +0 -14
  255. package/dist/styles/justify.js.map +0 -1
  256. package/dist/styles/list.d.ts +0 -16
  257. package/dist/styles/list.js +0 -98
  258. package/dist/styles/list.js.map +0 -1
  259. package/dist/styles/margin.d.ts +0 -24
  260. package/dist/styles/margin.js +0 -104
  261. package/dist/styles/margin.js.map +0 -1
  262. package/dist/styles/outline.d.ts +0 -29
  263. package/dist/styles/outline.js +0 -65
  264. package/dist/styles/outline.js.map +0 -1
  265. package/dist/styles/padding.d.ts +0 -24
  266. package/dist/styles/padding.js +0 -104
  267. package/dist/styles/padding.js.map +0 -1
  268. package/dist/styles/predefined.d.ts +0 -71
  269. package/dist/styles/predefined.js +0 -238
  270. package/dist/styles/predefined.js.map +0 -1
  271. package/dist/styles/preset.d.ts +0 -47
  272. package/dist/styles/preset.js +0 -126
  273. package/dist/styles/preset.js.map +0 -1
  274. package/dist/styles/radius.d.ts +0 -14
  275. package/dist/styles/radius.js +0 -51
  276. package/dist/styles/radius.js.map +0 -1
  277. package/dist/styles/scrollbar.d.ts +0 -25
  278. package/dist/styles/scrollbar.js +0 -48
  279. package/dist/styles/scrollbar.js.map +0 -1
  280. package/dist/styles/shadow.d.ts +0 -14
  281. package/dist/styles/shadow.js +0 -24
  282. package/dist/styles/shadow.js.map +0 -1
  283. package/dist/styles/transition.d.ts +0 -14
  284. package/dist/styles/transition.js +0 -158
  285. package/dist/styles/transition.js.map +0 -1
  286. package/dist/styles/types.d.ts +0 -508
  287. package/dist/styles/width.d.ts +0 -17
  288. package/dist/styles/width.js +0 -20
  289. package/dist/styles/width.js.map +0 -1
  290. package/dist/tasty.d.ts +0 -981
  291. package/dist/tasty.js +0 -219
  292. package/dist/tasty.js.map +0 -1
  293. package/dist/types.d.ts +0 -184
  294. package/dist/utils/cache-wrapper.js +0 -22
  295. package/dist/utils/cache-wrapper.js.map +0 -1
  296. package/dist/utils/case-converter.js +0 -8
  297. package/dist/utils/case-converter.js.map +0 -1
  298. package/dist/utils/color-math.d.ts +0 -45
  299. package/dist/utils/color-math.js +0 -749
  300. package/dist/utils/color-math.js.map +0 -1
  301. package/dist/utils/color-space.d.ts +0 -5
  302. package/dist/utils/color-space.js +0 -228
  303. package/dist/utils/color-space.js.map +0 -1
  304. package/dist/utils/colors.d.ts +0 -5
  305. package/dist/utils/colors.js +0 -11
  306. package/dist/utils/colors.js.map +0 -1
  307. package/dist/utils/css-types.d.ts +0 -7
  308. package/dist/utils/dotize.d.ts +0 -26
  309. package/dist/utils/dotize.js +0 -122
  310. package/dist/utils/dotize.js.map +0 -1
  311. package/dist/utils/filter-base-props.d.ts +0 -15
  312. package/dist/utils/filter-base-props.js +0 -45
  313. package/dist/utils/filter-base-props.js.map +0 -1
  314. package/dist/utils/get-display-name.d.ts +0 -7
  315. package/dist/utils/get-display-name.js +0 -10
  316. package/dist/utils/get-display-name.js.map +0 -1
  317. package/dist/utils/has-keys.js +0 -13
  318. package/dist/utils/has-keys.js.map +0 -1
  319. package/dist/utils/is-dev-env.js +0 -19
  320. package/dist/utils/is-dev-env.js.map +0 -1
  321. package/dist/utils/is-valid-element-type.js +0 -15
  322. package/dist/utils/is-valid-element-type.js.map +0 -1
  323. package/dist/utils/merge-styles.js.map +0 -1
  324. package/dist/utils/mod-attrs.d.ts +0 -8
  325. package/dist/utils/mod-attrs.js +0 -21
  326. package/dist/utils/mod-attrs.js.map +0 -1
  327. package/dist/utils/process-tokens.d.ts +0 -21
  328. package/dist/utils/process-tokens.js +0 -91
  329. package/dist/utils/process-tokens.js.map +0 -1
  330. package/dist/utils/resolve-recipes.d.ts +0 -17
  331. package/dist/utils/resolve-recipes.js.map +0 -1
  332. package/dist/utils/selector-transform.js +0 -32
  333. package/dist/utils/selector-transform.js.map +0 -1
  334. package/dist/utils/string.js +0 -8
  335. package/dist/utils/string.js.map +0 -1
  336. package/dist/utils/styles.d.ts +0 -101
  337. package/dist/utils/styles.js +0 -223
  338. package/dist/utils/styles.js.map +0 -1
  339. package/dist/utils/typography.d.ts +0 -47
  340. package/dist/utils/typography.js +0 -43
  341. package/dist/utils/typography.js.map +0 -1
  342. package/dist/utils/warnings.d.ts +0 -16
  343. package/dist/utils/warnings.js +0 -16
  344. package/dist/utils/warnings.js.map +0 -1
  345. package/dist/zero/css-writer.d.ts +0 -45
  346. package/dist/zero/css-writer.js +0 -74
  347. package/dist/zero/css-writer.js.map +0 -1
  348. package/dist/zero/extractor.d.ts +0 -24
  349. package/dist/zero/extractor.js.map +0 -1
  350. package/docs/PIPELINE.md +0 -519
  351. package/docs/runtime.md +0 -291
package/docs/debug.md CHANGED
@@ -6,11 +6,13 @@ Runtime CSS inspection and diagnostics for the Tasty styling system. Inspect inj
6
6
 
7
7
  ## Overview
8
8
 
9
- `tastyDebug` is a diagnostic object that exposes every aspect of Tasty's runtime CSS state. It is designed for development use: inspecting which CSS is active, what's cached, how chunks are distributed, and whether cleanup is working as expected.
9
+ `tastyDebug` is a diagnostic object that exposes Tasty's runtime CSS state. It is designed for development use but can be manually installed in production for debugging.
10
10
 
11
- In development mode (`isDevEnv()` returns `true`), `tastyDebug` is automatically installed on `window.tastyDebug`. In production, you can install it manually when needed.
11
+ In development mode (`isDevEnv()` returns `true`), `tastyDebug` is automatically installed on `window.tastyDebug`. In production, install it manually when needed.
12
12
 
13
- > **Note:** This is a development/debugging tool. It does not affect style generation or application behavior.
13
+ All methods **log to the console by default**. Pass `{ raw: true }` to suppress logging and only return data.
14
+
15
+ > **Note (2.0.0+):** Class names use a content-addressed base36 hash format (e.g. `t3a5f`) instead of the previous sequential `t{number}` format. Cross-environment hydration reads the rendered class list from `window.__TASTY__` (the legacy `window.__TASTY_SSR_CACHE__` global was removed in 2.0.0).
14
16
 
15
17
  ---
16
18
 
@@ -24,50 +26,46 @@ tastyDebug.install();
24
26
  // Print a quick-start guide
25
27
  tastyDebug.help();
26
28
 
27
- // Get a comprehensive overview logged to the console
28
- tastyDebug.summary({ log: true });
29
+ // Get a comprehensive overview (logged automatically)
30
+ tastyDebug.summary();
29
31
 
30
- // See all active CSS (for components currently in the DOM)
31
- tastyDebug.log('active');
32
+ // See all active CSS
33
+ tastyDebug.css('active');
32
34
 
33
35
  // Inspect a specific element
34
36
  tastyDebug.inspect('.my-button');
35
37
 
36
- // Check cache hit rates
37
- tastyDebug.metrics();
38
+ // Silent mode — return data only, no console output
39
+ const data = tastyDebug.summary({ raw: true });
38
40
  ```
39
41
 
40
42
  ---
41
43
 
42
- ## Core Types
43
-
44
- ### `CSSTarget`
44
+ ## Options
45
45
 
46
- The `target` parameter accepted by `css()`, `log()`, and related methods:
46
+ All methods accept a shared options object:
47
47
 
48
48
  ```typescript
49
- type CSSTarget =
50
- | 'all' // All tasty CSS (component + global + raw)
51
- | 'global' // Only global CSS (from injectGlobal)
52
- | 'active' // CSS for classes currently present in the DOM
53
- | 'unused' // CSS with refCount = 0 (cached but not actively used)
54
- | 'page' // ALL CSS on the page, including non-tasty stylesheets
55
- | string // A tasty class ('t123') or a CSS selector ('.my-class')
56
- | string[] // Array of tasty classes (['t0', 't5', 't12'])
57
- | Element; // A DOM element
49
+ interface DebugOptions {
50
+ root?: Document | ShadowRoot; // Target root (default: document)
51
+ raw?: boolean; // Suppress console logging (default: false)
52
+ }
58
53
  ```
59
54
 
60
- ### `CssOptions`
55
+ When `raw` is `false` (the default), results are logged to the console **and** returned. When `raw` is `true`, results are returned silently.
61
56
 
62
- Common options for CSS retrieval methods:
57
+ ### Environments Without a DOM
63
58
 
64
- ```typescript
65
- interface CssOptions {
66
- root?: Document | ShadowRoot; // Target root (default: document)
67
- prettify?: boolean; // Format CSS output (default: true)
68
- log?: boolean; // Auto-log to console (default: false)
69
- }
70
- ```
59
+ `tastyDebug` reads the document, so on a server — SSR, a Node REPL, a test
60
+ runner in the `node` environment — there is nothing for it to read. Every
61
+ method returns its empty result (`''`, an empty `InspectResult`, a summary of
62
+ zeroes, `metrics: null`) instead of throwing, and explains itself once with a
63
+ console warning. `{ raw: true }` suppresses that warning along with the rest of
64
+ the logging.
65
+
66
+ To see the styles a server render produced, read the `ServerStyleCollector`
67
+ instead — `collector.getCSS()` and `collector.getRenderedClassNames()`. See
68
+ [SSR](./ssr.md).
71
69
 
72
70
  ---
73
71
 
@@ -75,45 +73,48 @@ interface CssOptions {
75
73
 
76
74
  ### `css(target, opts?): string`
77
75
 
78
- Retrieves CSS text for a given target. This is the primary method for extracting CSS from the runtime.
76
+ Retrieves CSS text for a given target. Logs the result with rule count and size.
79
77
 
80
- ```typescript
81
- // All tasty CSS
82
- tastyDebug.css('all');
78
+ **Targets:**
83
79
 
84
- // Only CSS for classes currently in the DOM
85
- tastyDebug.css('active');
80
+ | Target | Description |
81
+ |---|---|
82
+ | `'all'` | All tasty CSS (component + global + raw) |
83
+ | `'active'` | CSS for classes currently in the DOM |
84
+ | `'unused'` | CSS for injected classes no element carries (cached but not rendered) |
85
+ | `'global'` | Only global CSS (from `injectGlobal`) |
86
+ | `'page'` | All CSS on the page (including non-tasty) |
87
+ | `'t3a5f'` | CSS for a specific tasty class (class names are `t` + base36 hash) |
88
+ | `['t3a5f', 't9k2']` | CSS for multiple tasty classes |
89
+ | `'.my-button'` | CSS affecting a DOM element (by selector) |
90
+ | `element` | CSS affecting a DOM element (by reference) |
86
91
 
87
- // CSS for unused classes (refCount = 0, still in cache)
88
- tastyDebug.css('unused');
92
+ **Extra options:**
89
93
 
90
- // Only global CSS (injected via injectGlobal)
91
- tastyDebug.css('global');
92
-
93
- // ALL CSS on the page (including non-tasty stylesheets)
94
- tastyDebug.css('page');
95
-
96
- // CSS for a specific tasty class
97
- tastyDebug.css('t42');
98
-
99
- // CSS for multiple tasty classes
100
- tastyDebug.css(['t0', 't5', 't12']);
94
+ ```typescript
95
+ interface CSSOptions extends DebugOptions {
96
+ prettify?: boolean; // Format output (default: true)
97
+ source?: boolean; // Read original CSS instead of live CSSOM (default: false, dev-mode only)
98
+ }
99
+ ```
101
100
 
102
- // CSS affecting a DOM element (by selector)
103
- tastyDebug.css('.my-button');
101
+ ```typescript
102
+ // Active CSS with stats
103
+ tastyDebug.css('active');
104
104
 
105
- // CSS affecting a DOM element (by reference)
106
- const el = document.querySelector('.my-button');
107
- tastyDebug.css(el);
105
+ // Specific class, silent
106
+ const css = tastyDebug.css('t3a5f', { raw: true });
108
107
 
109
- // With options
110
- tastyDebug.css('active', { prettify: false, log: true });
108
+ // Compare original vs browser-parsed CSS (dev mode only)
109
+ tastyDebug.css('t3a5f'); // live CSSOM
110
+ tastyDebug.css('t3a5f', { source: true }); // original output
111
111
 
112
112
  // Shadow DOM
113
- const shadowRoot = host.shadowRoot;
114
113
  tastyDebug.css('all', { root: shadowRoot });
115
114
  ```
116
115
 
116
+ The `source` option reads from `RuleInfo.cssText`, which is only populated when `devMode` is active (development environment or `localStorage.TASTY_DEBUG = 'true'`). In production without debug mode, it falls back to the live CSSOM with a warning.
117
+
117
118
  ---
118
119
 
119
120
  ### `inspect(target, opts?): InspectResult`
@@ -123,309 +124,177 @@ Inspects a DOM element and returns detailed information about its tasty styles,
123
124
  ```typescript
124
125
  interface InspectResult {
125
126
  element?: Element | null;
126
- classes: string[]; // Tasty classes found on the element (e.g., ['t0', 't5'])
127
- chunks: ChunkInfo[]; // Chunk assignment per class
128
- css: string; // Prettified CSS affecting the element
129
- size: number; // CSS size in characters
130
- rules: number; // Number of CSS rule blocks
127
+ classes: string[]; // Tasty classes on the element
128
+ chunks: DebugChunkInfo[]; // Chunk assignment per class
129
+ css: string; // Prettified CSS
130
+ size: number; // CSS size in characters
131
+ rules: number; // Number of CSS rule blocks
131
132
  }
132
133
 
133
- interface ChunkInfo {
134
- className: string; // e.g., 't0'
134
+ interface DebugChunkInfo {
135
+ className: string;
135
136
  chunkName: string | null; // e.g., 'appearance', 'font', 'dimension'
136
137
  }
137
138
  ```
138
139
 
139
140
  ```typescript
140
- // By CSS selector
141
- const result = tastyDebug.inspect('.my-card');
142
- console.log(result.classes); // ['t3', 't7', 't12']
143
- console.log(result.chunks); // [{className: 't3', chunkName: 'appearance'}, ...]
144
- console.log(result.rules); // 5
145
- console.log(result.css); // prettified CSS
146
-
147
- // By element reference
148
- const el = document.querySelector('[data-element="Title"]');
149
- tastyDebug.inspect(el);
141
+ tastyDebug.inspect('.my-card');
142
+ // Logs: inspect div — 3 classes, 5 rules, 1.2KB
143
+ // Chunks: t3a5f→appearance, t9k2→font, tb71→dimension
150
144
 
151
- // Shadow DOM
152
- tastyDebug.inspect('.shadow-component', { root: shadowRoot });
145
+ // Silent
146
+ const result = tastyDebug.inspect('.my-card', { raw: true });
147
+ console.log(result.classes); // ['t3a5f', 't9k2', 'tb71']
148
+ console.log(result.rules); // 5
153
149
  ```
154
150
 
155
151
  ---
156
152
 
157
- ### `cache(opts?): CacheStatus`
153
+ ### `summary(opts?): Summary`
158
154
 
159
- Returns the current state of the style cache: which classes are active, which are unused, and performance metrics.
155
+ One-shot overview of the entire Tasty CSS state. Logs a compact report.
160
156
 
161
157
  ```typescript
162
- interface CacheStatus {
163
- classes: {
164
- active: string[]; // Classes with refCount > 0 and present in DOM
165
- unused: string[]; // Classes with refCount = 0 but still in cache
166
- all: string[]; // Union of active and unused
167
- };
158
+ interface Summary {
159
+ activeClasses: string[];
160
+ unusedClasses: string[];
161
+ totalStyledClasses: string[];
162
+
163
+ activeCSSSize: number;
164
+ unusedCSSSize: number;
165
+ globalCSSSize: number;
166
+ rawCSSSize: number;
167
+ keyframesCSSSize: number;
168
+ propertyCSSSize: number;
169
+ totalCSSSize: number;
170
+
171
+ activeRuleCount: number;
172
+ unusedRuleCount: number;
173
+ globalRuleCount: number;
174
+ rawRuleCount: number;
175
+ keyframesRuleCount: number;
176
+ propertyRuleCount: number;
177
+ totalRuleCount: number;
178
+
168
179
  metrics: CacheMetrics | null;
180
+ definedProperties: string[];
181
+ definedKeyframes: { name: string; refCount: number }[];
182
+ chunkBreakdown: ChunkBreakdown;
169
183
  }
170
184
  ```
171
185
 
172
186
  ```typescript
173
- const status = tastyDebug.cache();
174
-
175
- console.log(status.classes.active.length); // 42
176
- console.log(status.classes.unused.length); // 8
177
- console.log(status.metrics?.hits); // 156
187
+ // Logged automatically
188
+ tastyDebug.summary();
189
+ // Output:
190
+ // Active: 42 classes, 186 rules, 12.4KB
191
+ // Unused: 3 classes, 8 rules, 0.5KB
192
+ // Global: 12 rules, 1.1KB
193
+ // Total: 45 classes, 206 rules, 14.0KB
194
+ // Cache: 94.2% hit rate (312 lookups)
195
+
196
+ // Silent
197
+ const s = tastyDebug.summary({ raw: true });
198
+ console.log(s.totalRuleCount); // 206
178
199
  ```
179
200
 
180
201
  ---
181
202
 
182
- ### `cleanup(opts?): void`
183
-
184
- Forces immediate cleanup of all unused styles (those with `refCount = 0`).
185
-
186
- ```typescript
187
- tastyDebug.cleanup();
188
-
189
- // Shadow DOM
190
- tastyDebug.cleanup({ root: shadowRoot });
191
- ```
192
-
193
- ---
194
-
195
- ### `metrics(opts?): CacheMetrics | null`
203
+ ### `chunks(opts?): ChunkBreakdown`
196
204
 
197
- Returns performance metrics for the style cache. Only available when `devMode` is enabled.
205
+ Breakdown of styles by chunk type.
198
206
 
199
207
  ```typescript
200
- interface CacheMetrics {
201
- hits: number; // Successful cache hits
202
- misses: number; // New styles injected (cache misses)
203
- bulkCleanups: number; // Number of bulk cleanup operations
204
- totalInsertions: number; // Lifetime style insertions
205
- totalUnused: number; // Total styles marked as unused
206
- stylesCleanedUp: number; // Total styles removed by cleanup
207
- startTime: number; // Metrics collection start timestamp
208
- unusedHits?: number; // Reactivations of cached unused styles
209
- cleanupHistory: {
210
- timestamp: number;
211
- classesDeleted: number;
208
+ interface ChunkBreakdown {
209
+ byChunk: Record<string, {
210
+ classes: string[];
212
211
  cssSize: number;
213
- rulesDeleted: number;
214
- }[];
212
+ ruleCount: number;
213
+ }>;
214
+ totalChunkTypes: number;
215
+ totalClasses: number;
215
216
  }
216
217
  ```
217
218
 
218
219
  ```typescript
219
- const m = tastyDebug.metrics();
220
-
221
- if (m) {
222
- const hitRate = ((m.hits + (m.unusedHits || 0)) / (m.hits + m.misses)) * 100;
223
- console.log(`Cache hit rate: ${hitRate.toFixed(1)}%`);
224
- console.log(`Total insertions: ${m.totalInsertions}`);
225
- console.log(`Bulk cleanups: ${m.bulkCleanups}`);
226
- }
220
+ tastyDebug.chunks();
221
+ // Output:
222
+ // appearance: 24 cls, 48 rules, 3.2KB
223
+ // font: 18 cls, 18 rules, 1.1KB
224
+ // dimension: 31 cls, 45 rules, 2.4KB
227
225
  ```
228
226
 
229
- ### `resetMetrics(opts?): void`
230
-
231
- Resets all performance metrics counters.
232
-
233
- ```typescript
234
- tastyDebug.resetMetrics();
235
- ```
236
-
237
- ---
238
-
239
- ### `chunks(opts?): ChunkBreakdown`
240
-
241
- Returns a breakdown of styles by chunk type. With style chunking enabled, styles are split into logical chunks (appearance, font, dimension, etc.) for better caching and CSS reuse.
242
-
243
- ```typescript
244
- const breakdown = tastyDebug.chunks();
245
-
246
- console.log(breakdown.totalChunkTypes); // 6
247
- console.log(breakdown.totalClasses); // 87
248
-
249
- for (const [chunkName, data] of Object.entries(breakdown.byChunk)) {
250
- console.log(`${chunkName}: ${data.classes.length} classes, ${data.cssSize}B`);
251
- }
252
-
253
- // Log a formatted breakdown to the console
254
- tastyDebug.chunks({ log: true });
255
- ```
256
-
257
- Chunk types: `combined` (non-chunked), `appearance`, `font`, `dimension`, `display`, `layout`, `position`, `misc`, `subcomponents`.
258
-
259
- ---
260
-
261
- ### `getGlobalTypeCSS(type, opts?): { css: string; ruleCount: number; size: number }`
262
-
263
- Retrieves CSS for a specific global injection type.
264
-
265
- ```typescript
266
- // CSS injected via injectGlobal()
267
- const global = tastyDebug.getGlobalTypeCSS('global');
268
-
269
- // CSS injected via injectRawCSS() / useRawCSS()
270
- const raw = tastyDebug.getGlobalTypeCSS('raw');
271
-
272
- // @keyframes CSS
273
- const keyframes = tastyDebug.getGlobalTypeCSS('keyframes');
274
-
275
- // @property CSS
276
- const properties = tastyDebug.getGlobalTypeCSS('property');
277
-
278
- console.log(`Global: ${global.ruleCount} rules, ${global.size}B`);
279
- console.log(`Raw: ${raw.ruleCount} rules, ${raw.size}B`);
280
- console.log(`Keyframes: ${keyframes.ruleCount} rules, ${keyframes.size}B`);
281
- console.log(`Properties: ${properties.ruleCount} rules, ${properties.size}B`);
282
- ```
227
+ Chunk types: `combined`, `appearance`, `font`, `dimension`, `display`, `layout`, `position`, `misc`, `subcomponents`.
283
228
 
284
229
  ---
285
230
 
286
- ### `defs(opts?): Definitions`
231
+ ### `cache(opts?): CacheStatus`
287
232
 
288
- Returns all defined `@property` and `@keyframes` entries.
233
+ Cache state and performance metrics.
289
234
 
290
235
  ```typescript
291
- interface Definitions {
292
- properties: string[]; // Defined via @property (e.g., ['--primary-color', '--gap'])
293
- keyframes: { name: string; refCount: number }[];
236
+ interface CacheStatus {
237
+ classes: {
238
+ active: string[];
239
+ unused: string[];
240
+ all: string[];
241
+ };
242
+ metrics: CacheMetrics | null;
294
243
  }
295
244
  ```
296
245
 
297
246
  ```typescript
298
- const defs = tastyDebug.defs();
299
-
300
- console.log('Properties:', defs.properties);
301
- // ['--primary-color', '--surface-color', ...]
302
-
303
- console.log('Keyframes:', defs.keyframes);
304
- // [{ name: 'fadeIn', refCount: 2 }, { name: 'pulse', refCount: 1 }]
247
+ tastyDebug.cache();
248
+ // Output:
249
+ // Active: 42, Unused: 3
250
+ // Hits: 294, Misses: 18, Rate: 94.2%
305
251
  ```
306
252
 
307
253
  ---
308
254
 
309
- ### `summary(opts?): Summary`
310
-
311
- One-shot comprehensive overview of the entire Tasty CSS state. Returns detailed statistics and optionally logs a formatted report.
312
-
313
- ```typescript
314
- interface SummaryOptions {
315
- root?: Document | ShadowRoot;
316
- log?: boolean;
317
- includePageCSS?:
318
- | false // Do not include page-level CSS stats (default)
319
- | true // Include sizes/counts only
320
- | 'all'; // Include stats and return full page CSS string
321
- }
322
- ```
323
-
324
- The returned `Summary` object contains:
325
-
326
- - **Classes**: `activeClasses`, `unusedClasses`, `totalStyledClasses`
327
- - **CSS sizes**: `activeCSSSize`, `unusedCSSSize`, `globalCSSSize`, `rawCSSSize`, `keyframesCSSSize`, `propertyCSSSize`, `totalCSSSize`
328
- - **CSS payloads**: `activeCSS`, `unusedCSS`, `globalCSS`, `rawCSS`, `keyframesCSS`, `propertyCSS`, `allCSS`
329
- - **Rule counts**: `globalRuleCount`, `rawRuleCount`, `keyframesRuleCount`, `propertyRuleCount`
330
- - **Page CSS** (when `includePageCSS` is set): `page.cssSize`, `page.ruleCount`, `page.stylesheetCount`, `page.skippedStylesheets`
331
- - **Metrics & definitions**: `metrics`, `definedProperties`, `definedKeyframes`, `propertyCount`, `keyframeCount`
332
- - **Cleanup summary**: `cleanupSummary.totalCleanups`, `cleanupSummary.totalClassesDeleted`, `cleanupSummary.lastCleanup`, etc.
333
- - **Chunk breakdown**: `chunkBreakdown.byChunk`, `chunkBreakdown.totalChunkTypes`
334
-
335
- ```typescript
336
- // Log a formatted report
337
- tastyDebug.summary({ log: true });
338
-
339
- // Get the data programmatically
340
- const s = tastyDebug.summary();
341
- console.log(`Active: ${s.activeClasses.length} classes, ${s.activeCSSSize}B`);
342
- console.log(`Unused: ${s.unusedClasses.length} classes, ${s.unusedCSSSize}B`);
343
- console.log(`Total CSS: ${s.totalCSSSize}B`);
344
-
345
- // Include page-level CSS stats
346
- const withPage = tastyDebug.summary({ includePageCSS: true });
347
- console.log(`Page CSS: ${withPage.page?.cssSize}B across ${withPage.page?.stylesheetCount} stylesheets`);
348
- ```
349
-
350
- ---
351
-
352
- ### `pageCSS(opts?): string`
353
-
354
- Returns all CSS on the page across all stylesheets (not only tasty-generated CSS).
355
-
356
- ```typescript
357
- // Get all page CSS
358
- const css = tastyDebug.pageCSS();
359
-
360
- // Log it
361
- tastyDebug.pageCSS({ log: true });
362
-
363
- // Raw (unformatted)
364
- tastyDebug.pageCSS({ prettify: false });
365
-
366
- // Exclude cross-origin stylesheet placeholders
367
- tastyDebug.pageCSS({ includeCrossOrigin: false });
368
- ```
369
-
370
- ### `pageStats(opts?): PageStats`
255
+ ### `cleanup(opts?): void`
371
256
 
372
- Returns size and rule count statistics for all page CSS without extracting the full text.
257
+ Removes every injected style that is neither carried by an element nor pinned by
258
+ an outstanding `inject()` handle — the same set `summary()` reports as unused.
259
+ Equivalent to `gc({ force: true })`.
373
260
 
374
261
  ```typescript
375
- const stats = tastyDebug.pageStats();
376
- console.log(`${stats.cssSize}B across ${stats.stylesheetCount} stylesheets`);
377
- console.log(`${stats.ruleCount} rules, ${stats.skippedStylesheets} skipped (CORS)`);
262
+ tastyDebug.cleanup();
263
+ tastyDebug.cleanup({ root: shadowRoot });
378
264
  ```
379
265
 
380
266
  ---
381
267
 
382
- ### `log(target, opts?): void`
268
+ ### `help(): void`
383
269
 
384
- Logs CSS for a target to the console with formatted output, collapsible groups, and sub-element detection.
270
+ Prints a quick-start guide to the console.
385
271
 
386
272
  ```typescript
387
- // Log active CSS with stats header
388
- tastyDebug.log('active');
389
-
390
- // Log CSS for a specific class
391
- tastyDebug.log('t42');
392
-
393
- // Log with custom title
394
- tastyDebug.log('active', { title: 'Button styles' });
395
-
396
- // Log CSS for an element
397
- tastyDebug.log('.my-card');
273
+ tastyDebug.help();
398
274
  ```
399
275
 
400
- The output includes:
401
- - Rule count, line count, and byte size
402
- - Sub-element breakdown (detects `[data-element="..."]` selectors)
403
- - Full CSS in a collapsible group
404
-
405
276
  ---
406
277
 
407
- ### `help(): void`
278
+ ### `install(): void`
408
279
 
409
- Prints a quick-start guide to the console with available commands and common targets.
280
+ Attaches `tastyDebug` to `window.tastyDebug`. Called automatically in development mode.
410
281
 
411
282
  ```typescript
412
- tastyDebug.help();
283
+ import { tastyDebug } from '@tenphi/tasty';
284
+ tastyDebug.install();
413
285
  ```
414
286
 
415
287
  ---
416
288
 
417
- ### `install(): void`
289
+ ## Shadow DOM Support
418
290
 
419
- Attaches `tastyDebug` to `window.tastyDebug` for console access. Called automatically in development mode.
291
+ All methods accept a `root` option to target a Shadow DOM:
420
292
 
421
293
  ```typescript
422
- import { tastyDebug } from '@tenphi/tasty';
423
-
424
- // Manual install (e.g., in staging/production for debugging)
425
- tastyDebug.install();
426
-
427
- // Then use from the browser console:
428
- // > tastyDebug.summary({ log: true })
294
+ const shadowRoot = host.shadowRoot;
295
+ tastyDebug.css('all', { root: shadowRoot });
296
+ tastyDebug.inspect('.shadow-component', { root: shadowRoot });
297
+ tastyDebug.summary({ root: shadowRoot });
429
298
  ```
430
299
 
431
300
  ---
@@ -435,71 +304,32 @@ tastyDebug.install();
435
304
  ### Debugging a component's styles
436
305
 
437
306
  ```typescript
438
- // 1. Find the element
307
+ // 1. Inspect the element
439
308
  tastyDebug.inspect('.my-button');
440
- // → { classes: ['t3', 't7'], chunks: [...], css: '...', rules: 4 }
441
309
 
442
310
  // 2. See CSS for a specific class
443
- tastyDebug.log('t3');
311
+ tastyDebug.css('t3a5f');
444
312
 
445
- // 3. Check which chunk it belongs to
446
- tastyDebug.inspect('.my-button').chunks;
447
- // → [{ className: 't3', chunkName: 'appearance' }, { className: 't7', chunkName: 'font' }]
313
+ // 3. Compare original vs browser-parsed (dev mode)
314
+ tastyDebug.css('t3a5f', { source: true });
448
315
  ```
449
316
 
450
317
  ### Checking cache efficiency
451
318
 
452
319
  ```typescript
453
- const m = tastyDebug.metrics();
454
- const hitRate = m ? ((m.hits + (m.unusedHits || 0)) / (m.hits + m.misses)) * 100 : 0;
455
- console.log(`Hit rate: ${hitRate.toFixed(1)}%`);
456
- console.log(`Unused style reactivations: ${m?.unusedHits}`);
320
+ const { metrics } = tastyDebug.cache({ raw: true });
321
+ if (metrics) {
322
+ const total = metrics.hits + metrics.misses;
323
+ const rate = total > 0 ? ((metrics.hits / total) * 100).toFixed(1) : 0;
324
+ console.log(`Cache hit rate: ${rate}%`);
325
+ }
457
326
  ```
458
327
 
459
328
  ### Monitoring CSS growth
460
329
 
461
330
  ```typescript
462
- const s = tastyDebug.summary();
463
- console.log(`Total tasty CSS: ${(s.totalCSSSize / 1024).toFixed(1)}KB`);
464
- console.log(`Active: ${(s.activeCSSSize / 1024).toFixed(1)}KB`);
465
- console.log(`Unused (pending cleanup): ${(s.unusedCSSSize / 1024).toFixed(1)}KB`);
466
-
467
- // Compare with total page CSS
468
- const page = tastyDebug.pageStats();
469
- const ratio = ((s.totalCSSSize / page.cssSize) * 100).toFixed(1);
470
- console.log(`Tasty is ${ratio}% of total page CSS`);
331
+ const s = tastyDebug.summary({ raw: true });
332
+ console.log(`Total: ${s.totalRuleCount} rules, ${(s.totalCSSSize / 1024).toFixed(1)}KB`);
333
+ console.log(`Active: ${s.activeRuleCount} rules`);
334
+ console.log(`Unused: ${s.unusedRuleCount} rules`);
471
335
  ```
472
-
473
- ### Analyzing chunk distribution
474
-
475
- ```typescript
476
- tastyDebug.chunks({ log: true });
477
- // → Formatted breakdown:
478
- // • appearance: 24 classes, 3.2KB, 48 rules
479
- // • font: 18 classes, 1.1KB, 18 rules
480
- // • dimension: 31 classes, 2.4KB, 45 rules
481
- // • ...
482
- ```
483
-
484
- ---
485
-
486
- ## Shadow DOM Support
487
-
488
- All methods accept a `root` option to target a Shadow DOM instead of the main document:
489
-
490
- ```typescript
491
- const shadowRoot = host.shadowRoot;
492
-
493
- tastyDebug.css('all', { root: shadowRoot });
494
- tastyDebug.inspect('.shadow-component', { root: shadowRoot });
495
- tastyDebug.summary({ root: shadowRoot, log: true });
496
- tastyDebug.chunks({ root: shadowRoot, log: true });
497
- ```
498
-
499
- ---
500
-
501
- ## Integration with Tasty
502
-
503
- `tastyDebug` reads directly from the [Style Injector](./injector.md)'s internal registries. It does not inject, modify, or intercept any styles. The `cleanup()` method is the only method with side effects — it triggers the injector's garbage collection for unused styles.
504
-
505
- For most development, you'll use the [Runtime API](./runtime.md) to create components and the debug utilities to inspect the resulting CSS at runtime.