@tenphi/tasty 0.0.0-snapshot.d2dcdeb → 0.0.0-snapshot.d4ccea8

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 (357) hide show
  1. package/README.md +181 -131
  2. package/dist/{ssr/async-storage.js → async-storage-DKK-wTD4.js} +2 -2
  3. package/dist/async-storage-DKK-wTD4.js.map +1 -0
  4. package/dist/babel-eMs_zZjM.d.ts +83 -0
  5. package/dist/{ssr/collector.js → collector-BjkQEtbh.js} +111 -38
  6. package/dist/collector-BjkQEtbh.js.map +1 -0
  7. package/dist/{ssr/collector.d.ts → collector-DzeNxHOq.d.ts} +58 -7
  8. package/dist/config-DMslHK_e.d.ts +1298 -0
  9. package/dist/config-DX126v_w.js +12318 -0
  10. package/dist/config-DX126v_w.js.map +1 -0
  11. package/dist/{ssr/context.js → context-CA8YKeMn.js} +11 -3
  12. package/dist/context-CA8YKeMn.js.map +1 -0
  13. package/dist/core/index.d.ts +5 -34
  14. package/dist/core/index.js +6 -27
  15. package/dist/core-CMn-Tj2X.js +1573 -0
  16. package/dist/core-CMn-Tj2X.js.map +1 -0
  17. package/dist/{zero/extractor.js → css-writer-C8ShXK5R.js} +148 -24
  18. package/dist/css-writer-C8ShXK5R.js.map +1 -0
  19. package/dist/{ssr/format-global-rules.js → format-global-rules-DklyaXv-.js} +2 -2
  20. package/dist/format-global-rules-DklyaXv-.js.map +1 -0
  21. package/dist/{ssr/format-rules.js → format-rules-BkstDvlN.js} +59 -2
  22. package/dist/format-rules-BkstDvlN.js.map +1 -0
  23. package/dist/{ssr/hydrate.js → hydrate-DXXWZgm0.js} +4 -12
  24. package/dist/hydrate-DXXWZgm0.js.map +1 -0
  25. package/dist/index-BcsaHo8x.d.ts +1568 -0
  26. package/dist/index-CC0wykKn.d.ts +1909 -0
  27. package/dist/index.d.ts +5 -51
  28. package/dist/index.js +922 -36
  29. package/dist/index.js.map +1 -0
  30. package/dist/keyframes-Z0YLVOWq.js +493 -0
  31. package/dist/keyframes-Z0YLVOWq.js.map +1 -0
  32. package/dist/{utils/merge-styles.d.ts → merge-styles-BTFAkYSD.d.ts} +3 -3
  33. package/dist/{utils/merge-styles.js → merge-styles-Dpueyn82.js} +3 -4
  34. package/dist/merge-styles-Dpueyn82.js.map +1 -0
  35. package/dist/{utils/resolve-recipes.js → resolve-recipes-B2Vjr7ET.js} +4 -6
  36. package/dist/resolve-recipes-B2Vjr7ET.js.map +1 -0
  37. package/dist/ssr/astro-client.js +1 -1
  38. package/dist/ssr/astro-client.js.map +1 -1
  39. package/dist/ssr/astro-middleware-static.d.ts +16 -0
  40. package/dist/ssr/astro-middleware-static.js +18 -0
  41. package/dist/ssr/astro-middleware-static.js.map +1 -0
  42. package/dist/ssr/astro-middleware.d.ts +8 -6
  43. package/dist/ssr/astro-middleware.js +10 -10
  44. package/dist/ssr/astro-middleware.js.map +1 -1
  45. package/dist/ssr/astro.d.ts +2 -17
  46. package/dist/ssr/astro.js +29 -21
  47. package/dist/ssr/astro.js.map +1 -1
  48. package/dist/ssr/index.d.ts +37 -4
  49. package/dist/ssr/index.js +5 -5
  50. package/dist/ssr/index.js.map +1 -1
  51. package/dist/ssr/next.d.ts +2 -3
  52. package/dist/ssr/next.js +7 -8
  53. package/dist/ssr/next.js.map +1 -1
  54. package/dist/static/index.d.ts +91 -5
  55. package/dist/static/index.js +49 -3
  56. package/dist/static/index.js.map +1 -0
  57. package/dist/static/inject.js.map +1 -1
  58. package/dist/zero/babel.d.ts +2 -81
  59. package/dist/zero/babel.js +45 -29
  60. package/dist/zero/babel.js.map +1 -1
  61. package/dist/zero/index.d.ts +81 -3
  62. package/dist/zero/index.js +2 -3
  63. package/dist/zero/next.d.ts +1 -1
  64. package/dist/zero/next.js +1 -1
  65. package/dist/zero/next.js.map +1 -1
  66. package/docs/README.md +18 -10
  67. package/docs/adoption.md +56 -31
  68. package/docs/ai-agents.md +224 -0
  69. package/docs/comparison.md +69 -40
  70. package/docs/configuration.md +501 -72
  71. package/docs/debug.md +22 -18
  72. package/docs/design-system.md +43 -24
  73. package/docs/dsl.md +512 -179
  74. package/docs/getting-started.md +60 -39
  75. package/docs/injector.md +110 -32
  76. package/docs/methodology.md +68 -36
  77. package/docs/migration-v3.md +285 -0
  78. package/docs/pipeline.md +741 -0
  79. package/docs/plugins.md +353 -0
  80. package/docs/react-api.md +164 -40
  81. package/docs/runtime-benchmarks.md +216 -0
  82. package/docs/ssr.md +92 -81
  83. package/docs/styles.md +65 -16
  84. package/docs/tasty-static.md +149 -99
  85. package/package.json +49 -21
  86. package/tasty.config.ts +6 -0
  87. package/dist/_virtual/_rolldown/runtime.js +0 -7
  88. package/dist/chunks/cacheKey.d.ts +0 -1
  89. package/dist/chunks/cacheKey.js +0 -77
  90. package/dist/chunks/cacheKey.js.map +0 -1
  91. package/dist/chunks/definitions.d.ts +0 -37
  92. package/dist/chunks/definitions.js +0 -258
  93. package/dist/chunks/definitions.js.map +0 -1
  94. package/dist/chunks/index.d.ts +0 -1
  95. package/dist/chunks/renderChunk.d.ts +0 -1
  96. package/dist/chunks/renderChunk.js +0 -59
  97. package/dist/chunks/renderChunk.js.map +0 -1
  98. package/dist/compute-styles.d.ts +0 -31
  99. package/dist/compute-styles.js +0 -335
  100. package/dist/compute-styles.js.map +0 -1
  101. package/dist/config.d.ts +0 -407
  102. package/dist/config.js +0 -587
  103. package/dist/config.js.map +0 -1
  104. package/dist/counter-style/index.js +0 -51
  105. package/dist/counter-style/index.js.map +0 -1
  106. package/dist/debug.d.ts +0 -89
  107. package/dist/debug.js +0 -453
  108. package/dist/debug.js.map +0 -1
  109. package/dist/font-face/index.js +0 -63
  110. package/dist/font-face/index.js.map +0 -1
  111. package/dist/hooks/index.d.ts +0 -7
  112. package/dist/hooks/useCounterStyle.d.ts +0 -36
  113. package/dist/hooks/useCounterStyle.js +0 -65
  114. package/dist/hooks/useCounterStyle.js.map +0 -1
  115. package/dist/hooks/useFontFace.d.ts +0 -45
  116. package/dist/hooks/useFontFace.js +0 -66
  117. package/dist/hooks/useFontFace.js.map +0 -1
  118. package/dist/hooks/useGlobalStyles.d.ts +0 -46
  119. package/dist/hooks/useGlobalStyles.js +0 -88
  120. package/dist/hooks/useGlobalStyles.js.map +0 -1
  121. package/dist/hooks/useKeyframes.d.ts +0 -58
  122. package/dist/hooks/useKeyframes.js +0 -55
  123. package/dist/hooks/useKeyframes.js.map +0 -1
  124. package/dist/hooks/useProperty.d.ts +0 -81
  125. package/dist/hooks/useProperty.js +0 -96
  126. package/dist/hooks/useProperty.js.map +0 -1
  127. package/dist/hooks/useRawCSS.d.ts +0 -22
  128. package/dist/hooks/useRawCSS.js +0 -103
  129. package/dist/hooks/useRawCSS.js.map +0 -1
  130. package/dist/hooks/useStyles.d.ts +0 -40
  131. package/dist/hooks/useStyles.js +0 -31
  132. package/dist/hooks/useStyles.js.map +0 -1
  133. package/dist/injector/index.d.ts +0 -182
  134. package/dist/injector/index.js +0 -185
  135. package/dist/injector/index.js.map +0 -1
  136. package/dist/injector/injector.d.ts +0 -198
  137. package/dist/injector/injector.js +0 -651
  138. package/dist/injector/injector.js.map +0 -1
  139. package/dist/injector/sheet-manager.d.ts +0 -132
  140. package/dist/injector/sheet-manager.js +0 -699
  141. package/dist/injector/sheet-manager.js.map +0 -1
  142. package/dist/injector/types.d.ts +0 -235
  143. package/dist/keyframes/index.js +0 -206
  144. package/dist/keyframes/index.js.map +0 -1
  145. package/dist/parser/classify.js +0 -319
  146. package/dist/parser/classify.js.map +0 -1
  147. package/dist/parser/const.js +0 -60
  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 -115
  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 -230
  163. package/dist/pipeline/exclusive.js.map +0 -1
  164. package/dist/pipeline/index.d.ts +0 -55
  165. package/dist/pipeline/index.js +0 -708
  166. package/dist/pipeline/index.js.map +0 -1
  167. package/dist/pipeline/materialize.js +0 -1103
  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 -446
  171. package/dist/pipeline/parseStateKey.js.map +0 -1
  172. package/dist/pipeline/simplify.js +0 -515
  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/index.d.ts +0 -2
  177. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  178. package/dist/plugins/okhsl-plugin.js +0 -97
  179. package/dist/plugins/okhsl-plugin.js.map +0 -1
  180. package/dist/plugins/types.d.ts +0 -87
  181. package/dist/properties/index.js +0 -222
  182. package/dist/properties/index.js.map +0 -1
  183. package/dist/properties/property-type-resolver.d.ts +0 -24
  184. package/dist/properties/property-type-resolver.js +0 -90
  185. package/dist/properties/property-type-resolver.js.map +0 -1
  186. package/dist/rsc-cache.js +0 -79
  187. package/dist/rsc-cache.js.map +0 -1
  188. package/dist/ssr/async-storage.d.ts +0 -17
  189. package/dist/ssr/async-storage.js.map +0 -1
  190. package/dist/ssr/collect-auto-properties.js +0 -58
  191. package/dist/ssr/collect-auto-properties.js.map +0 -1
  192. package/dist/ssr/collector.js.map +0 -1
  193. package/dist/ssr/context.js.map +0 -1
  194. package/dist/ssr/format-global-rules.js.map +0 -1
  195. package/dist/ssr/format-keyframes.js +0 -69
  196. package/dist/ssr/format-keyframes.js.map +0 -1
  197. package/dist/ssr/format-property.js +0 -49
  198. package/dist/ssr/format-property.js.map +0 -1
  199. package/dist/ssr/format-rules.js.map +0 -1
  200. package/dist/ssr/hydrate.d.ts +0 -29
  201. package/dist/ssr/hydrate.js.map +0 -1
  202. package/dist/ssr/ssr-collector-ref.js +0 -29
  203. package/dist/ssr/ssr-collector-ref.js.map +0 -1
  204. package/dist/states/index.d.ts +0 -49
  205. package/dist/states/index.js +0 -170
  206. package/dist/states/index.js.map +0 -1
  207. package/dist/static/tastyStatic.d.ts +0 -46
  208. package/dist/static/tastyStatic.js +0 -30
  209. package/dist/static/tastyStatic.js.map +0 -1
  210. package/dist/static/types.d.ts +0 -49
  211. package/dist/static/types.js +0 -24
  212. package/dist/static/types.js.map +0 -1
  213. package/dist/styles/border.d.ts +0 -25
  214. package/dist/styles/border.js +0 -120
  215. package/dist/styles/border.js.map +0 -1
  216. package/dist/styles/color.d.ts +0 -14
  217. package/dist/styles/color.js +0 -26
  218. package/dist/styles/color.js.map +0 -1
  219. package/dist/styles/const.js +0 -17
  220. package/dist/styles/const.js.map +0 -1
  221. package/dist/styles/createStyle.js +0 -79
  222. package/dist/styles/createStyle.js.map +0 -1
  223. package/dist/styles/dimension.js +0 -109
  224. package/dist/styles/dimension.js.map +0 -1
  225. package/dist/styles/directional.js +0 -133
  226. package/dist/styles/directional.js.map +0 -1
  227. package/dist/styles/display.d.ts +0 -30
  228. package/dist/styles/display.js +0 -73
  229. package/dist/styles/display.js.map +0 -1
  230. package/dist/styles/fade.d.ts +0 -15
  231. package/dist/styles/fade.js +0 -62
  232. package/dist/styles/fade.js.map +0 -1
  233. package/dist/styles/fill.d.ts +0 -42
  234. package/dist/styles/fill.js +0 -51
  235. package/dist/styles/fill.js.map +0 -1
  236. package/dist/styles/flow.d.ts +0 -16
  237. package/dist/styles/flow.js +0 -12
  238. package/dist/styles/flow.js.map +0 -1
  239. package/dist/styles/gap.d.ts +0 -31
  240. package/dist/styles/gap.js +0 -38
  241. package/dist/styles/gap.js.map +0 -1
  242. package/dist/styles/height.d.ts +0 -17
  243. package/dist/styles/height.js +0 -19
  244. package/dist/styles/height.js.map +0 -1
  245. package/dist/styles/index.d.ts +0 -1
  246. package/dist/styles/index.js +0 -8
  247. package/dist/styles/index.js.map +0 -1
  248. package/dist/styles/inset.d.ts +0 -24
  249. package/dist/styles/inset.js +0 -34
  250. package/dist/styles/inset.js.map +0 -1
  251. package/dist/styles/list.d.ts +0 -16
  252. package/dist/styles/list.js +0 -100
  253. package/dist/styles/list.js.map +0 -1
  254. package/dist/styles/margin.d.ts +0 -24
  255. package/dist/styles/margin.js +0 -32
  256. package/dist/styles/margin.js.map +0 -1
  257. package/dist/styles/outline.d.ts +0 -29
  258. package/dist/styles/outline.js +0 -55
  259. package/dist/styles/outline.js.map +0 -1
  260. package/dist/styles/padding.d.ts +0 -24
  261. package/dist/styles/padding.js +0 -32
  262. package/dist/styles/padding.js.map +0 -1
  263. package/dist/styles/placement.d.ts +0 -37
  264. package/dist/styles/placement.js +0 -74
  265. package/dist/styles/placement.js.map +0 -1
  266. package/dist/styles/predefined.d.ts +0 -71
  267. package/dist/styles/predefined.js +0 -237
  268. package/dist/styles/predefined.js.map +0 -1
  269. package/dist/styles/preset.d.ts +0 -52
  270. package/dist/styles/preset.js +0 -127
  271. package/dist/styles/preset.js.map +0 -1
  272. package/dist/styles/radius.d.ts +0 -12
  273. package/dist/styles/radius.js +0 -83
  274. package/dist/styles/radius.js.map +0 -1
  275. package/dist/styles/scrollMargin.d.ts +0 -24
  276. package/dist/styles/scrollMargin.js +0 -32
  277. package/dist/styles/scrollMargin.js.map +0 -1
  278. package/dist/styles/scrollbar.d.ts +0 -25
  279. package/dist/styles/scrollbar.js +0 -51
  280. package/dist/styles/scrollbar.js.map +0 -1
  281. package/dist/styles/shadow.d.ts +0 -14
  282. package/dist/styles/shadow.js +0 -25
  283. package/dist/styles/shadow.js.map +0 -1
  284. package/dist/styles/shared.js +0 -17
  285. package/dist/styles/shared.js.map +0 -1
  286. package/dist/styles/transition.d.ts +0 -14
  287. package/dist/styles/transition.js +0 -159
  288. package/dist/styles/transition.js.map +0 -1
  289. package/dist/styles/types.d.ts +0 -564
  290. package/dist/styles/width.d.ts +0 -17
  291. package/dist/styles/width.js +0 -19
  292. package/dist/styles/width.js.map +0 -1
  293. package/dist/tasty.d.ts +0 -134
  294. package/dist/tasty.js +0 -248
  295. package/dist/tasty.js.map +0 -1
  296. package/dist/types.d.ts +0 -184
  297. package/dist/utils/cache-wrapper.js +0 -21
  298. package/dist/utils/cache-wrapper.js.map +0 -1
  299. package/dist/utils/case-converter.js +0 -8
  300. package/dist/utils/case-converter.js.map +0 -1
  301. package/dist/utils/color-math.d.ts +0 -46
  302. package/dist/utils/color-math.js +0 -749
  303. package/dist/utils/color-math.js.map +0 -1
  304. package/dist/utils/color-space.d.ts +0 -5
  305. package/dist/utils/color-space.js +0 -228
  306. package/dist/utils/color-space.js.map +0 -1
  307. package/dist/utils/colors.d.ts +0 -5
  308. package/dist/utils/colors.js +0 -10
  309. package/dist/utils/colors.js.map +0 -1
  310. package/dist/utils/css-types.d.ts +0 -7
  311. package/dist/utils/deps-equal.js +0 -15
  312. package/dist/utils/deps-equal.js.map +0 -1
  313. package/dist/utils/dotize.d.ts +0 -26
  314. package/dist/utils/dotize.js +0 -122
  315. package/dist/utils/dotize.js.map +0 -1
  316. package/dist/utils/filter-base-props.d.ts +0 -15
  317. package/dist/utils/filter-base-props.js +0 -45
  318. package/dist/utils/filter-base-props.js.map +0 -1
  319. package/dist/utils/get-display-name.d.ts +0 -7
  320. package/dist/utils/get-display-name.js +0 -10
  321. package/dist/utils/get-display-name.js.map +0 -1
  322. package/dist/utils/has-keys.js +0 -13
  323. package/dist/utils/has-keys.js.map +0 -1
  324. package/dist/utils/hash.js +0 -14
  325. package/dist/utils/hash.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 -6
  332. package/dist/utils/mod-attrs.js +0 -20
  333. package/dist/utils/mod-attrs.js.map +0 -1
  334. package/dist/utils/process-tokens.d.ts +0 -17
  335. package/dist/utils/process-tokens.js +0 -83
  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.map +0 -1
  339. package/dist/utils/selector-transform.js +0 -32
  340. package/dist/utils/selector-transform.js.map +0 -1
  341. package/dist/utils/string.js +0 -8
  342. package/dist/utils/string.js.map +0 -1
  343. package/dist/utils/styles.d.ts +0 -99
  344. package/dist/utils/styles.js +0 -220
  345. package/dist/utils/styles.js.map +0 -1
  346. package/dist/utils/typography.d.ts +0 -58
  347. package/dist/utils/typography.js +0 -51
  348. package/dist/utils/typography.js.map +0 -1
  349. package/dist/utils/warnings.d.ts +0 -16
  350. package/dist/utils/warnings.js +0 -16
  351. package/dist/utils/warnings.js.map +0 -1
  352. package/dist/zero/css-writer.d.ts +0 -45
  353. package/dist/zero/css-writer.js +0 -73
  354. package/dist/zero/css-writer.js.map +0 -1
  355. package/dist/zero/extractor.d.ts +0 -24
  356. package/dist/zero/extractor.js.map +0 -1
  357. package/docs/PIPELINE.md +0 -519
@@ -1,6 +1,8 @@
1
- # Zero Runtime Mode (tastyStatic)
1
+ # Build-Time Extraction (`tastyStatic`)
2
2
 
3
- `tastyStatic` is a build-time utility for generating CSS with zero runtime overhead. It's designed for static sites, no-JS websites, and performance-critical applications where you want to eliminate all runtime styling code. For the broader docs map, see the [Docs Hub](README.md).
3
+ `tastyStatic` is Tasty's framework-agnostic build-time utility for extracting CSS before rendering. It produces no client styling runtime in file mode, but it is not the only way to achieve zero-runtime delivery: server-only `tasty()` also ships no Tasty runtime to the browser while retaining the full React component API. Astro's `tastyIntegration({ islands: false })` is the clearest example; the same architecture applies to server-only Next.js RSC.
4
+
5
+ Choose `tastyStatic` specifically when styles must be generated during the build, when the consumer is not React, or when you want static class-name objects instead of components. For the broader docs map, see the [Docs Hub](README.md).
4
6
 
5
7
  ---
6
8
 
@@ -8,19 +10,19 @@
8
10
 
9
11
  - **Static site generation (SSG)** — Pre-render all styles at build time
10
12
  - **No-JavaScript websites** — CSS works without any JS runtime
11
- - **Performance-critical pages** — Zero runtime overhead for styling
13
+ - **Performance-critical pages** — CSS extracted before the application renders
12
14
  - **Landing pages** — Minimal bundle size with pre-generated CSS
13
15
 
14
16
  ## Requirements
15
17
 
16
- The zero-runtime mode is part of the main `@tenphi/tasty` package but requires additional peer dependencies depending on your setup:
18
+ Build-time extraction is part of the main `@tenphi/tasty` package but requires additional peer dependencies depending on your setup:
17
19
 
18
- | Dependency | Version | Required for |
19
- |---|---|---|
20
- | `@babel/core` | >= 7.24 | Babel plugin (`@tenphi/tasty/babel-plugin`) |
21
- | `@babel/helper-plugin-utils` | >= 7.24 | Babel plugin |
22
- | `@babel/types` | >= 7.24 | Babel plugin |
23
- | `jiti` | >= 2.6 | Next.js wrapper (`@tenphi/tasty/next`) when using `configFile` option |
20
+ | Dependency | Version | Required for |
21
+ | ---------------------------- | ------- | -------------------------------------------------------------------------- |
22
+ | `@babel/core` | >= 7.24 | Babel plugin (`@tenphi/tasty/babel-plugin`) |
23
+ | `@babel/helper-plugin-utils` | >= 7.24 | Babel plugin |
24
+ | `@babel/types` | >= 7.24 | Babel plugin |
25
+ | `jiti` | >= 2.6 | Next.js wrapper (`@tenphi/tasty/zero/next`) when using `configFile` option |
24
26
 
25
27
  All of these are declared as optional peer dependencies of `@tenphi/tasty`. Install only what your setup requires:
26
28
 
@@ -107,11 +109,11 @@ tastyStatic('body', {
107
109
 
108
110
  ## StaticStyle Object
109
111
 
110
- | Property | Type | Description |
111
- |----------|------|-------------|
112
- | `className` | `string` | Space-separated class names for use in JSX |
113
- | `styles` | `Styles` | The original (or merged) styles object |
114
- | `toString()` | `() => string` | Returns `className` for string coercion |
112
+ | Property | Type | Description |
113
+ | ------------ | -------------- | ------------------------------------------ |
114
+ | `className` | `string` | Space-separated class names for use in JSX |
115
+ | `styles` | `Styles` | The original (or merged) styles object |
116
+ | `toString()` | `() => string` | Returns `className` for string coercion |
115
117
 
116
118
  ---
117
119
 
@@ -123,61 +125,83 @@ tastyStatic('body', {
123
125
  // babel.config.js
124
126
  module.exports = {
125
127
  plugins: [
126
- ['@tenphi/tasty/babel-plugin', {
127
- output: 'public/tasty.css',
128
- }]
129
- ]
128
+ [
129
+ '@tenphi/tasty/babel-plugin',
130
+ {
131
+ output: 'public/tasty.css',
132
+ },
133
+ ],
134
+ ],
130
135
  };
131
136
  ```
132
137
 
133
- These examples use `data-schema="dark"` as the root-state convention. If your app already uses a different root attribute such as `data-theme`, keep the same alias pattern and swap the attribute name consistently in your zero-runtime config.
138
+ These examples use `data-schema="dark"` as the root-state convention. If your app already uses a different root attribute such as `data-theme`, keep the same alias pattern and swap the attribute name consistently in your build-time config.
134
139
 
135
140
  ### With Configuration
136
141
 
137
142
  ```javascript
138
143
  module.exports = {
139
144
  plugins: [
140
- ['@tenphi/tasty/babel-plugin', {
141
- output: 'public/tasty.css',
142
- config: {
143
- states: {
144
- '@mobile': '@media(w < 768px)',
145
- '@tablet': '@media(w < 1024px)',
146
- '@dark': '@root(schema=dark)',
145
+ [
146
+ '@tenphi/tasty/babel-plugin',
147
+ {
148
+ output: 'public/tasty.css',
149
+ config: {
150
+ states: {
151
+ '@mobile': '@media(w < 768px)',
152
+ '@tablet': '@media(w < 1024px)',
153
+ '@dark': '@root(schema=dark)',
154
+ },
155
+ devMode: true,
147
156
  },
148
- devMode: true,
149
157
  },
150
- }]
151
- ]
158
+ ],
159
+ ],
152
160
  };
153
161
  ```
154
162
 
155
163
  ### Plugin Options
156
164
 
157
- | Option | Type | Default | Description |
158
- |--------|------|---------|-------------|
159
- | `output` | `string` | `'tasty.css'` | Path for generated CSS file |
160
- | `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS (see [Inject Mode](#inject-mode)) |
161
- | `configFile` | `string` | — | Absolute path to a TS/JS module that default-exports a `TastyZeroConfig` object. JSON-serializable alternative to `config` — required for Turbopack. |
162
- | `config` | `TastyZeroConfig \| () => TastyZeroConfig` | `{}` | Inline config object or factory function. Takes precedence over `configFile`. |
163
- | `configDeps` | `string[]` | `[]` | Absolute file paths that affect config (for cache invalidation) |
164
- | `injectImport` | `boolean` | `true` | Replace `@tenphi/tasty/static` imports with an import of the generated CSS file. Set to `false` to manage CSS imports manually. |
165
- | `config.states` | `Record<string, string>` | `{}` | Predefined state aliases (e.g. `{ '@mobile': '@media(w < 768px)' }`) |
166
- | `config.devMode` | `boolean` | `false` | Add source comments to CSS |
167
- | `config.tokens` | `ConfigTokens` | — | Design tokens injected as CSS custom properties on `:root`. Values are parsed through the Tasty DSL. Supports state maps for responsive/themed tokens. |
168
- | `config.replaceTokens` | `Record<string, string \| number>` | — | Parse-time token substitution. Keys use `$name` for custom properties and `#name` for color tokens. |
169
- | `config.recipes` | `Record<string, RecipeStyles>` | `{}` | Predefined style recipes |
170
- | `config.keyframes` | `Record<string, KeyframesSteps>` | — | Global `@keyframes` definitions available to all `tastyStatic` calls |
171
- | `config.fontFace` | `Record<string, FontFaceInput>` | — | Global `@font-face` definitions |
172
- | `config.counterStyle` | `Record<string, CounterStyleDescriptors>` | — | Global `@counter-style` definitions |
173
- | `config.units` | `Record<string, string \| UnitHandler>` | — | Custom units for the style parser (merged with built-ins). E.g. `{ em: 'em', vw: 'vw' }` |
174
- | `config.funcs` | `Record<string, Function>` | — | Custom functions for the style parser (merged with existing) |
175
- | `config.plugins` | `TastyPlugin[]` | — | Plugins that extend tasty with custom functions, units, states, and handlers |
176
- | `config.handlers` | `Record<string, StyleHandlerDefinition>` | — | Custom style handlers that transform style properties into CSS declarations |
177
- | `config.presets` | `Record<string, TypographyPreset>` | — | Typography presets — shorthand for `generateTypographyTokens()`. Generated tokens merge under explicit `tokens`. |
178
- | `config.globalStyles` | `Record<string, Styles>` | — | Global Tasty styles keyed by CSS selector. Supports the full style syntax. |
179
- | `config.autoPropertyTypes` | `boolean` | `true` | Automatically infer and register CSS `@property` declarations from values |
180
- | `config.parserCacheSize` | `number` | `1000` | Parser LRU cache size. Larger values improve performance for builds with many unique style values |
165
+ | Option | Type | Default | Description |
166
+ | -------------------------- | ------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
167
+ | `output` | `string` | `'tasty.css'` | Path for generated CSS file |
168
+ | `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS (see [Inject Mode](#inject-mode)) |
169
+ | `configFile` | `string` | — | Absolute path to a TS/JS module that default-exports a `TastyZeroConfig` object. JSON-serializable alternative to `config` — required for Turbopack. |
170
+ | `config` | `TastyZeroConfig \| () => TastyZeroConfig` | `{}` | Inline config object or factory function. Takes precedence over `configFile`. |
171
+ | `configDeps` | `string[]` | `[]` | Absolute file paths that affect config (for cache invalidation) |
172
+ | `injectImport` | `boolean` | `true` | Replace `@tenphi/tasty/static` imports with an import of the generated CSS file. Set to `false` to manage CSS imports manually. |
173
+ | `config.states` | `Record<string, string>` | `{}` | Predefined state aliases (e.g. `{ '@mobile': '@media(w < 768px)' }`) |
174
+ | `config.devMode` | `boolean` | `false` | Add source comments to CSS |
175
+ | `config.tokens` | `ConfigTokens` | — | Design tokens injected as CSS custom properties on `:root`. Values are parsed through the Tasty DSL. Supports state maps for responsive/themed tokens. |
176
+ | `config.replaceTokens` | `Record<string, string \| number>` | — | Parse-time token substitution. Keys use `$name` for custom properties and `#name` for color tokens. |
177
+ | `config.recipes` | `Record<string, RecipeStyles>` | `{}` | Predefined style recipes |
178
+ | `config.keyframes` | `Record<string, KeyframesSteps>` | — | Global `@keyframes` definitions available to all `tastyStatic` calls |
179
+ | `config.fontFaces` | `Record<string, FontFaceInput>` | — | Global `@font-face` definitions |
180
+ | `config.counterStyles` | `Record<string, CounterStyleDescriptors>` | — | Global `@counter-style` definitions |
181
+ | `config.units` | `Record<string, string \| UnitHandler>` | — | Custom units for the style parser (merged with built-ins). E.g. `{ em: 'em', vw: 'vw' }` |
182
+ | `config.functions` | `Record<string, FunctionDefinition \| Function>` | — | Custom functions (merged). Bare keys → parse functions; `$$name` keys → declarative CSS `@function` definitions |
183
+ | `config.polyfills` | `{ functions?: boolean }` | `{}` | Opt-in polyfills. `functions: true` inlines `@function` calls into plain CSS at build time |
184
+ | `config.plugins` | `TastyPlugin[]` | — | Plugins that extend tasty with custom functions, units, states, and handlers |
185
+ | `config.handlers` | `Record<string, StyleHandlerDefinition>` | — | Custom style handlers that transform style properties into CSS declarations |
186
+ | `config.presets` | `Record<string, TypographyPreset>` | — | Typography presets — shorthand for `generateTypographyTokens()`. Generated tokens merge under explicit `tokens`. |
187
+ | `config.globalStyles` | `Record<string, Styles>` | — | Global Tasty styles keyed by CSS selector. Supports the full style syntax. |
188
+ | `config.autoPropertyTypes` | `boolean` | `true` | Automatically infer and register CSS `@property` declarations from values |
189
+ | `config.parserCacheSize` | `number` | `1000` | Parser LRU cache size. Larger values improve performance for builds with many unique style values |
190
+ | `config.namePrefix` | `string` | `'ts'` | Prefix prepended to every generated identifier. Defaults to `'ts'` so static classes never collide with runtime (`'t'`) classes. See [Configuration: Name prefix](configuration.md#name-prefix). |
191
+
192
+ ### Coexisting with `tasty()`
193
+
194
+ When a page mixes `tastyStatic` with `tasty`, both must use **different** `namePrefix` values. The defaults handle this automatically (`'t'` for React rendering, `'ts'` for build-time extraction). If you customize one, customize the other:
195
+
196
+ ```ts
197
+ // tasty-zero.config.ts (Babel plugin)
198
+ export default { namePrefix: 'mbs' };
199
+ ```
200
+
201
+ ```ts
202
+ // app entry (`tasty()` configure)
203
+ configure({ namePrefix: 'mb' });
204
+ ```
181
205
 
182
206
  ---
183
207
 
@@ -189,16 +213,24 @@ Recipes work with `tastyStatic` the same way as with runtime `tasty`:
189
213
  // babel.config.js
190
214
  module.exports = {
191
215
  plugins: [
192
- ['@tenphi/tasty/babel-plugin', {
193
- output: 'public/tasty.css',
194
- config: {
195
- recipes: {
196
- card: { padding: '4x', fill: '#surface', radius: '1r', border: true },
197
- elevated: { shadow: '2x 2x 4x #shadow' },
216
+ [
217
+ '@tenphi/tasty/babel-plugin',
218
+ {
219
+ output: 'public/tasty.css',
220
+ config: {
221
+ recipes: {
222
+ card: {
223
+ padding: '4x',
224
+ fill: '#surface',
225
+ radius: '1r',
226
+ border: true,
227
+ },
228
+ elevated: { shadow: '2x 2x 4x #shadow' },
229
+ },
198
230
  },
199
231
  },
200
- }]
201
- ]
232
+ ],
233
+ ],
202
234
  };
203
235
  ```
204
236
 
@@ -210,7 +242,7 @@ const card = tastyStatic({
210
242
  color: '#text',
211
243
  });
212
244
 
213
- <div className={card}>Styled card</div>
245
+ <div className={card}>Styled card</div>;
214
246
  ```
215
247
 
216
248
  ---
@@ -221,7 +253,7 @@ The `withTastyZero` wrapper configures both **webpack** and **Turbopack** automa
221
253
 
222
254
  ```typescript
223
255
  // next.config.ts
224
- import { withTastyZero } from '@tenphi/tasty/next';
256
+ import { withTastyZero } from '@tenphi/tasty/zero/next';
225
257
 
226
258
  export default withTastyZero({
227
259
  output: 'public/tasty.css',
@@ -234,14 +266,14 @@ export default withTastyZero({
234
266
 
235
267
  ### `withTastyZero` Options
236
268
 
237
- | Option | Type | Default | Description |
238
- |--------|------|---------|-------------|
239
- | `output` | `string` | `'public/tasty.css'` | Output path for CSS relative to project root |
240
- | `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS |
241
- | `enabled` | `boolean` | `true` | Enable/disable the plugin |
242
- | `configFile` | `string` | — | Path to a TS/JS module that default-exports `TastyZeroConfig`. Recommended for Turbopack compatibility. |
243
- | `config` | `TastyZeroConfig` | — | Inline config object. For static configs that don't change during dev. |
244
- | `configDeps` | `string[]` | `[]` | Extra files the config depends on (for cache invalidation) |
269
+ | Option | Type | Default | Description |
270
+ | ------------ | -------------------- | -------------------- | ------------------------------------------------------------------------------------------------------- |
271
+ | `output` | `string` | `'public/tasty.css'` | Output path for CSS relative to project root |
272
+ | `mode` | `'file' \| 'inject'` | `'file'` | `'file'` writes CSS to disk; `'inject'` embeds CSS inline in JS |
273
+ | `enabled` | `boolean` | `true` | Enable/disable the plugin |
274
+ | `configFile` | `string` | — | Path to a TS/JS module that default-exports `TastyZeroConfig`. Recommended for Turbopack compatibility. |
275
+ | `config` | `TastyZeroConfig` | — | Inline config object. For static configs that don't change during dev. |
276
+ | `configDeps` | `string[]` | `[]` | Extra files the config depends on (for cache invalidation) |
245
277
 
246
278
  ### Turbopack Support
247
279
 
@@ -279,12 +311,15 @@ export default defineConfig({
279
311
  react({
280
312
  babel: {
281
313
  plugins: [
282
- ['@tenphi/tasty/babel-plugin', {
283
- output: 'public/tasty.css',
284
- config: {
285
- states: { '@mobile': '@media(w < 768px)' },
314
+ [
315
+ '@tenphi/tasty/babel-plugin',
316
+ {
317
+ output: 'public/tasty.css',
318
+ config: {
319
+ states: { '@mobile': '@media(w < 768px)' },
320
+ },
286
321
  },
287
- }],
322
+ ],
288
323
  ],
289
324
  },
290
325
  }),
@@ -318,7 +353,9 @@ export const Button = () => <button className={button}>Click</button>;
318
353
  const button = {
319
354
  className: 'ts3f2a1b ts8c4d2e',
320
355
  styles: { padding: '2x 4x', fill: '#purple', color: '#white' },
321
- toString() { return this.className; }
356
+ toString() {
357
+ return this.className;
358
+ },
322
359
  };
323
360
 
324
361
  export const Button = () => <button className={button}>Click</button>;
@@ -366,13 +403,16 @@ This is ideal for **reusable components**, **extensions**, and **libraries** whe
366
403
  // babel.config.js
367
404
  module.exports = {
368
405
  plugins: [
369
- ['@tenphi/tasty/babel-plugin', {
370
- mode: 'inject',
371
- config: {
372
- states: { '@mobile': '@media(w < 768px)' },
406
+ [
407
+ '@tenphi/tasty/babel-plugin',
408
+ {
409
+ mode: 'inject',
410
+ config: {
411
+ states: { '@mobile': '@media(w < 768px)' },
412
+ },
373
413
  },
374
- }]
375
- ]
414
+ ],
415
+ ],
376
416
  };
377
417
  ```
378
418
 
@@ -380,7 +420,7 @@ With Next.js:
380
420
 
381
421
  ```typescript
382
422
  // next.config.ts
383
- import { withTastyZero } from '@tenphi/tasty/next';
423
+ import { withTastyZero } from '@tenphi/tasty/zero/next';
384
424
 
385
425
  export default withTastyZero({
386
426
  mode: 'inject',
@@ -412,13 +452,20 @@ tastyStatic('.heading', { preset: 'h1' });
412
452
  ```tsx
413
453
  import { injectCSS as _$i } from '@tenphi/tasty/static/inject';
414
454
 
415
- const button = (_$i("ts3f2a1b ts8c4d2e", ".ts3f2a1b.ts3f2a1b{padding:16px 32px}\n.ts8c4d2e.ts8c4d2e{background:#9370db}"), {
416
- className: 'ts3f2a1b ts8c4d2e',
417
- styles: { padding: '2x 4x', fill: '#purple' },
418
- toString() { return this.className; }
419
- });
420
-
421
- _$i(".heading", ".heading{font-size:2.5rem;font-weight:700;line-height:1.2}");
455
+ const button =
456
+ (_$i(
457
+ 'ts3f2a1b ts8c4d2e',
458
+ '.ts3f2a1b.ts3f2a1b{padding:16px 32px}\n.ts8c4d2e.ts8c4d2e{background:#9370db}',
459
+ ),
460
+ {
461
+ className: 'ts3f2a1b ts8c4d2e',
462
+ styles: { padding: '2x 4x', fill: '#purple' },
463
+ toString() {
464
+ return this.className;
465
+ },
466
+ });
467
+
468
+ _$i('.heading', '.heading{font-size:2.5rem;font-weight:700;line-height:1.2}');
422
469
  ```
423
470
 
424
471
  ### Dev Mode / HMR
@@ -427,7 +474,7 @@ Class names are content-hashed (`ts` + MD5). When styles change, a new hash prod
427
474
 
428
475
  ### Limitations (inject mode)
429
476
 
430
- - **Client-side only** — Styles are injected via the DOM, so they are not available during SSR. For server-rendered apps, use `mode: 'file'` or the runtime `tasty()`.
477
+ - **Client-side only** — Styles are injected via the DOM, so they are not available during SSR. For server-rendered apps, use `mode: 'file'` or React `tasty()`.
431
478
  - **Larger JS bundle** — CSS is embedded in JavaScript, increasing bundle size. Best suited for components and extensions, not full-app styling.
432
479
 
433
480
  ---
@@ -496,13 +543,15 @@ For dynamic styling needs, combine with regular CSS or CSS variables:
496
543
  ```tsx
497
544
  const card = tastyStatic({
498
545
  padding: '4x',
499
- fill: 'var(--card-bg, #white)',
546
+ fill: '($card-bg, #white)',
500
547
  });
501
548
 
502
549
  <div
503
550
  className={card}
504
- style={{ '--card-bg': isActive ? '#purple' : '#white' }}
505
- />
551
+ style={{
552
+ '--card-bg': isActive ? 'var(--purple-color)' : 'var(--white-color)',
553
+ }}
554
+ />;
506
555
  ```
507
556
 
508
557
  ---
@@ -519,14 +568,15 @@ const card = tastyStatic({
519
568
  ## Common Issues
520
569
 
521
570
  - No CSS file is generated: make sure the Babel plugin actually runs for files importing `@tenphi/tasty/static`, and verify the `output` path is writable.
522
- - Styles stay dynamic by mistake: `tastyStatic()` only supports build-time-known values. Move runtime values to CSS variables or switch that component to runtime `tasty()`.
571
+ - Styles stay dynamic by mistake: `tastyStatic()` only supports build-time-known values. Move dynamic values to CSS variables or switch that component to React `tasty()`.
523
572
  - Turbopack config behaves inconsistently: prefer `configFile` over inline functions so the setup stays JSON-serializable.
524
573
 
525
574
  ---
526
575
 
527
576
  ## Related
528
577
 
529
- - [Docs Hub](README.md) — Choose the right guide by task or rendering mode
578
+ - [Docs Hub](README.md) — Choose the right guide by task or CSS delivery model
530
579
  - [Style DSL](dsl.md) — State maps, tokens, units, extending semantics (shared by runtime and static)
531
- - [React API](react-api.md) — Runtime styling: `tasty()` factory, component props, variants, sub-elements, style functions
580
+ - [React API](react-api.md) — Client or server rendering with `tasty()`: component props, variants, sub-elements, and style functions
532
581
  - [Configuration](configuration.md) — Global configuration: tokens, recipes, custom units, and style handlers
582
+ - [Plugins & Extension Points](plugins.md) — Which extension points work at build time (`functions`, `units`, `states`, `handlers`, `recipes`) and which do not (`propHandlers` — `tastyStatic()` takes styles objects, not props)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenphi/tasty",
3
- "version": "0.0.0-snapshot.d2dcdeb",
3
+ "version": "0.0.0-snapshot.d4ccea8",
4
4
  "description": "A design-system-integrated styling system and DSL for concise, state-aware UI styling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "import": "./dist/zero/index.js",
33
33
  "default": "./dist/zero/index.js"
34
34
  },
35
- "./next": {
35
+ "./zero/next": {
36
36
  "types": "./dist/zero/next.d.ts",
37
37
  "import": "./dist/zero/next.js",
38
38
  "default": "./dist/zero/next.js"
@@ -62,6 +62,16 @@
62
62
  "import": "./dist/ssr/astro-client.js",
63
63
  "default": "./dist/ssr/astro-client.js"
64
64
  },
65
+ "./ssr/astro-middleware": {
66
+ "types": "./dist/ssr/astro-middleware.d.ts",
67
+ "import": "./dist/ssr/astro-middleware.js",
68
+ "default": "./dist/ssr/astro-middleware.js"
69
+ },
70
+ "./ssr/astro-middleware-static": {
71
+ "types": "./dist/ssr/astro-middleware-static.d.ts",
72
+ "import": "./dist/ssr/astro-middleware-static.js",
73
+ "default": "./dist/ssr/astro-middleware-static.js"
74
+ },
65
75
  "./tasty.config": "./tasty.config.ts"
66
76
  },
67
77
  "files": [
@@ -73,7 +83,9 @@
73
83
  "./dist/ssr/index.js",
74
84
  "./dist/ssr/next.js",
75
85
  "./dist/ssr/astro.js",
76
- "./dist/ssr/astro-client.js"
86
+ "./dist/ssr/astro-client.js",
87
+ "./dist/ssr/astro-middleware.js",
88
+ "./dist/ssr/astro-middleware-static.js"
77
89
  ],
78
90
  "engines": {
79
91
  "node": ">=20"
@@ -81,6 +93,9 @@
81
93
  "scripts": {
82
94
  "build": "tsdown",
83
95
  "test": "vitest run",
96
+ "test:node": "vitest run --project node",
97
+ "test:browser": "vitest run --project browser",
98
+ "test:setup": "playwright install chromium",
84
99
  "test:watch": "vitest",
85
100
  "test:coverage": "vitest run --coverage",
86
101
  "typecheck": "tsc --noEmit",
@@ -89,11 +104,17 @@
89
104
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
90
105
  "format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
91
106
  "size": "size-limit",
92
- "bench": "vitest bench",
107
+ "bench": "vitest bench --project node",
108
+ "bench:browser": "vitest bench --project browser",
109
+ "bench:overhead": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-overhead.bench.tsx",
110
+ "bench:injection": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-injection.bench.ts",
111
+ "bench:tree": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-tree.bench.tsx",
93
112
  "prepublishOnly": "pnpm run build",
94
113
  "changeset": "changeset",
95
114
  "version": "changeset version",
96
115
  "release": "changeset publish",
116
+ "knip": "knip",
117
+ "check:test-only": "node scripts/check-test-only-code.mjs",
97
118
  "hygiene": "pnpm lint && pnpm format:check && pnpm typecheck",
98
119
  "hygiene:fix": "pnpm lint:fix && pnpm format && pnpm typecheck"
99
120
  },
@@ -123,6 +144,7 @@
123
144
  "@babel/helper-plugin-utils": "^7.24.0",
124
145
  "@babel/types": "^7.24.0",
125
146
  "jiti": "^2.6.1",
147
+ "next": ">=14.0.0",
126
148
  "react": "^18.0.0 || ^19.0.0"
127
149
  },
128
150
  "peerDependenciesMeta": {
@@ -140,6 +162,9 @@
140
162
  },
141
163
  "jiti": {
142
164
  "optional": true
165
+ },
166
+ "next": {
167
+ "optional": true
143
168
  }
144
169
  },
145
170
  "dependencies": {
@@ -147,53 +172,56 @@
147
172
  },
148
173
  "devDependencies": {
149
174
  "@babel/core": "^7.24.0",
150
- "@changesets/changelog-github": "^0.6.0",
175
+ "@babel/helper-plugin-utils": "^7.24.0",
176
+ "@babel/types": "^7.24.0",
177
+ "@changesets/changelog-github": "^0.7.0",
151
178
  "@changesets/cli": "^2.29.8",
152
179
  "@eslint/js": "^10.0.1",
153
180
  "@size-limit/esbuild": "^12.0.0",
154
181
  "@size-limit/file": "^12.0.0",
182
+ "@tenphi/eslint-plugin-tasty": "^0.11.3",
155
183
  "@testing-library/jest-dom": "^6.9.1",
156
184
  "@testing-library/react": "^16.3.2",
157
185
  "@types/babel__core": "^7.20.5",
158
186
  "@types/babel__helper-plugin-utils": "^7.10.3",
159
187
  "@types/node": "^25.3.2",
160
188
  "@types/react": "^19.0.0",
161
- "@vitest/runner": "^4.0.18",
189
+ "@types/react-dom": "^19.0.0",
190
+ "@vitest/browser-playwright": "^4.1.10",
162
191
  "eslint": "^10.0.0",
163
192
  "eslint-config-prettier": "^10.1.8",
164
- "jsdom": "^29.0.1",
193
+ "jiti": "^2.6.1",
194
+ "knip": "^5.61.3",
195
+ "next": "^16.0.0",
196
+ "playwright": "^1.62.1",
165
197
  "prettier": "^3.8.1",
166
198
  "react": "^19.0.0",
199
+ "react-dom": "^19.0.0",
167
200
  "size-limit": "^12.0.0",
168
- "tsdown": "^0.21.7",
169
- "typescript": "^5.9.3",
201
+ "tsdown": "^0.22.0",
202
+ "typescript": "^6.0.2",
170
203
  "typescript-eslint": "^8.56.0",
171
- "vitest": "^4.0.18"
172
- },
173
- "pnpm": {
174
- "onlyBuiltDependencies": [
175
- "esbuild"
176
- ]
204
+ "vitest": "^4.1.10"
177
205
  },
178
- "packageManager": "pnpm@10.32.1",
206
+ "packageManager": "pnpm@11.24.0",
179
207
  "size-limit": [
180
208
  {
181
209
  "name": "main (import *)",
182
210
  "path": "dist/index.js",
183
211
  "import": "*",
184
- "limit": "49 kB"
212
+ "limit": "56.6 kB"
185
213
  },
186
214
  {
187
215
  "name": "core (import *)",
188
216
  "path": "dist/core/index.js",
189
217
  "import": "*",
190
- "limit": "46 kB"
218
+ "limit": "53.65 kB"
191
219
  },
192
220
  {
193
221
  "name": "static",
194
222
  "path": "dist/static/index.js",
195
223
  "import": "*",
196
- "limit": "2 kB"
224
+ "limit": "16.8 kB"
197
225
  },
198
226
  {
199
227
  "name": "zero",
@@ -204,7 +232,7 @@
204
232
  "path",
205
233
  "crypto"
206
234
  ],
207
- "limit": "28.5 kB"
235
+ "limit": "31.25 kB"
208
236
  },
209
237
  {
210
238
  "name": "babel-plugin",
@@ -215,7 +243,7 @@
215
243
  "path",
216
244
  "crypto"
217
245
  ],
218
- "limit": "42 kB"
246
+ "limit": "49.35 kB"
219
247
  }
220
248
  ]
221
249
  }
package/tasty.config.ts CHANGED
@@ -3,6 +3,7 @@ export default {
3
3
  '#white',
4
4
  '#black',
5
5
  '#current',
6
+ '#clear',
6
7
  '$gap',
7
8
  '$radius',
8
9
  '$border-width',
@@ -11,4 +12,9 @@ export default {
11
12
  '$sharp-radius',
12
13
  '$bold-font-weight',
13
14
  ],
15
+ styles: ['viewTransitionName'],
16
+ // This repo imports its own API relatively, so the plugin's default
17
+ // `@tenphi/tasty` import tracking never matches. List the local entry points so
18
+ // `tasty({ styles })` call sites are actually linted.
19
+ importSources: ['@tenphi/tasty', './tasty', '../tasty', './src/tasty'],
14
20
  };
@@ -1,7 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
3
- if (typeof require !== "undefined") return require.apply(this, arguments);
4
- throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
5
- });
6
- //#endregion
7
- export { __require };
@@ -1 +0,0 @@
1
- export { };