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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +436 -394
  2. package/dist/babel-types-BKDTT4--.d.ts +18 -0
  3. package/dist/chunks/async-storage-f9j9JRtq.js +37 -0
  4. package/dist/chunks/async-storage-f9j9JRtq.js.map +1 -0
  5. package/dist/chunks/build-config-5d8WlQbq.js +60 -0
  6. package/dist/chunks/build-config-5d8WlQbq.js.map +1 -0
  7. package/dist/{collector-BpkjNQDo.js → chunks/collector-CjCak4iE.js} +25 -119
  8. package/dist/chunks/collector-CjCak4iE.js.map +1 -0
  9. package/dist/chunks/config-engine-uOFYZidB.js +272 -0
  10. package/dist/chunks/config-engine-uOFYZidB.js.map +1 -0
  11. package/dist/chunks/config-file-DlZXJMj8.js +25 -0
  12. package/dist/chunks/config-file-DlZXJMj8.js.map +1 -0
  13. package/dist/chunks/css-definitions-ubrHP97m.js +910 -0
  14. package/dist/chunks/css-definitions-ubrHP97m.js.map +1 -0
  15. package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
  16. package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
  17. package/dist/chunks/debug-CJ31U_WE.js +502 -0
  18. package/dist/chunks/debug-CJ31U_WE.js.map +1 -0
  19. package/dist/chunks/dsl-DYSJc1-T.js +1383 -0
  20. package/dist/chunks/dsl-DYSJc1-T.js.map +1 -0
  21. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  22. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  23. package/dist/chunks/react-runtime-CyyCI02N.js +689 -0
  24. package/dist/chunks/react-runtime-CyyCI02N.js.map +1 -0
  25. package/dist/chunks/runtime-engine-BQmOu5-W.js +2432 -0
  26. package/dist/chunks/runtime-engine-BQmOu5-W.js.map +1 -0
  27. package/dist/chunks/runtime-state-DEsyUMU-.js +152 -0
  28. package/dist/chunks/runtime-state-DEsyUMU-.js.map +1 -0
  29. package/dist/{merge-styles-B0lMso5W.js → chunks/shared-utils-y-HjvPN4.js} +60 -55
  30. package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
  31. package/dist/chunks/style-engine-BX2LshDZ.js +5466 -0
  32. package/dist/chunks/style-engine-BX2LshDZ.js.map +1 -0
  33. package/dist/{css-writer-BHjTF0YN.js → chunks/zero-engine-Dw0P4yGM.js} +65 -145
  34. package/dist/chunks/zero-engine-Dw0P4yGM.js.map +1 -0
  35. package/dist/{collector-D8o4Wdq-.d.ts → collector-CTU-nl0g.d.ts} +23 -4
  36. package/dist/{config-De8L9NWM.d.ts → config-CcxqSZI2.d.ts} +274 -78
  37. package/dist/core/index.d.ts +5 -5
  38. package/dist/core/index.js +9 -6
  39. package/dist/hydrate-CRyjjAyl.d.ts +22 -0
  40. package/dist/{index-DzGxoeyN.d.ts → index-xtey-KDu.d.ts} +350 -253
  41. package/dist/index.d.ts +5 -5
  42. package/dist/index.js +11 -867
  43. package/dist/{merge-styles-DLm4wdnb.d.ts → merge-styles-DSkVc6CD.d.ts} +2 -3
  44. package/dist/ssr/astro-client.d.ts +1 -1
  45. package/dist/ssr/astro-client.js +1 -14
  46. package/dist/ssr/astro-client.js.map +1 -1
  47. package/dist/ssr/astro-middleware-extract-static.d.ts +10 -0
  48. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  49. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  50. package/dist/ssr/astro-middleware-extract.d.ts +10 -0
  51. package/dist/ssr/astro-middleware-extract.js +9 -0
  52. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  53. package/dist/ssr/astro-middleware-static.d.ts +3 -2
  54. package/dist/ssr/astro-middleware-static.js +0 -11
  55. package/dist/ssr/astro-middleware-static.js.map +1 -1
  56. package/dist/ssr/astro-middleware.d.ts +3 -2
  57. package/dist/ssr/astro-middleware.js +0 -12
  58. package/dist/ssr/astro-middleware.js.map +1 -1
  59. package/dist/ssr/astro.d.ts +40 -6
  60. package/dist/ssr/astro.js +157 -93
  61. package/dist/ssr/astro.js.map +1 -1
  62. package/dist/ssr/client.d.ts +2 -0
  63. package/dist/ssr/client.js +2 -0
  64. package/dist/ssr/index.d.ts +5 -25
  65. package/dist/ssr/index.js +5 -5
  66. package/dist/ssr/index.js.map +1 -1
  67. package/dist/ssr/next-config.d.ts +64 -0
  68. package/dist/ssr/next-config.js +123 -0
  69. package/dist/ssr/next-config.js.map +1 -0
  70. package/dist/ssr/next.d.ts +9 -8
  71. package/dist/ssr/next.js +29 -43
  72. package/dist/ssr/next.js.map +1 -1
  73. package/dist/static/index.d.ts +8 -9
  74. package/dist/static/index.js +4 -22
  75. package/dist/static/index.js.map +1 -1
  76. package/dist/static/inject.d.ts +1 -2
  77. package/dist/{index-KUYya3x7.d.ts → types-DJEM_BOJ.d.ts} +741 -590
  78. package/dist/zero/babel.d.ts +67 -2
  79. package/dist/zero/babel.js +77 -140
  80. package/dist/zero/babel.js.map +1 -1
  81. package/dist/zero/index.d.ts +62 -8
  82. package/dist/zero/index.js +24 -2
  83. package/dist/zero/index.js.map +1 -0
  84. package/dist/zero/next.d.ts +4 -5
  85. package/dist/zero/next.js +3 -38
  86. package/dist/zero/next.js.map +1 -1
  87. package/docs/README.md +16 -8
  88. package/docs/adoption.md +69 -36
  89. package/docs/ai-agents.md +118 -86
  90. package/docs/comparison.md +77 -47
  91. package/docs/configuration.md +434 -108
  92. package/docs/debug.md +21 -8
  93. package/docs/design-system.md +152 -31
  94. package/docs/dsl.md +483 -211
  95. package/docs/getting-started.md +130 -50
  96. package/docs/injector.md +117 -68
  97. package/docs/methodology.md +81 -50
  98. package/docs/migration-v3.md +52 -52
  99. package/docs/pipeline.md +54 -30
  100. package/docs/plugins.md +59 -75
  101. package/docs/react-api.md +135 -53
  102. package/docs/runtime-benchmarks.md +388 -0
  103. package/docs/ssr.md +285 -101
  104. package/docs/styles.md +128 -33
  105. package/docs/tasty-static.md +272 -135
  106. package/package.json +119 -34
  107. package/dist/async-storage-DKK-wTD4.js +0 -44
  108. package/dist/async-storage-DKK-wTD4.js.map +0 -1
  109. package/dist/babel-R2qT7yLN.d.ts +0 -83
  110. package/dist/collector-BpkjNQDo.js.map +0 -1
  111. package/dist/config-DOCuTykY.js +0 -12315
  112. package/dist/config-DOCuTykY.js.map +0 -1
  113. package/dist/context-CA8YKeMn.js +0 -24
  114. package/dist/context-CA8YKeMn.js.map +0 -1
  115. package/dist/core-p6iTbQnn.js +0 -1550
  116. package/dist/core-p6iTbQnn.js.map +0 -1
  117. package/dist/css-writer-BHjTF0YN.js.map +0 -1
  118. package/dist/format-global-rules-DklyaXv-.js +0 -22
  119. package/dist/format-global-rules-DklyaXv-.js.map +0 -1
  120. package/dist/format-rules-Cb0YIjyS.js +0 -143
  121. package/dist/format-rules-Cb0YIjyS.js.map +0 -1
  122. package/dist/hydrate-xnaB3SDm.js +0 -37
  123. package/dist/hydrate-xnaB3SDm.js.map +0 -1
  124. package/dist/index.js.map +0 -1
  125. package/dist/keyframes-DiXjNoBZ.js +0 -424
  126. package/dist/keyframes-DiXjNoBZ.js.map +0 -1
  127. package/dist/merge-styles-B0lMso5W.js.map +0 -1
  128. package/dist/resolve-recipes-C9nAuwgR.js +0 -144
  129. package/dist/resolve-recipes-C9nAuwgR.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenphi/tasty",
3
- "version": "0.0.0-snapshot.e4609d6",
3
+ "version": "0.0.0-snapshot.e4e4347",
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",
@@ -52,11 +52,21 @@
52
52
  "import": "./dist/ssr/next.js",
53
53
  "default": "./dist/ssr/next.js"
54
54
  },
55
+ "./ssr/next-config": {
56
+ "types": "./dist/ssr/next-config.d.ts",
57
+ "import": "./dist/ssr/next-config.js",
58
+ "default": "./dist/ssr/next-config.js"
59
+ },
55
60
  "./ssr/astro": {
56
61
  "types": "./dist/ssr/astro.d.ts",
57
62
  "import": "./dist/ssr/astro.js",
58
63
  "default": "./dist/ssr/astro.js"
59
64
  },
65
+ "./ssr/client": {
66
+ "types": "./dist/ssr/client.d.ts",
67
+ "import": "./dist/ssr/client.js",
68
+ "default": "./dist/ssr/client.js"
69
+ },
60
70
  "./ssr/astro-client": {
61
71
  "types": "./dist/ssr/astro-client.d.ts",
62
72
  "import": "./dist/ssr/astro-client.js",
@@ -72,6 +82,16 @@
72
82
  "import": "./dist/ssr/astro-middleware-static.js",
73
83
  "default": "./dist/ssr/astro-middleware-static.js"
74
84
  },
85
+ "./ssr/astro-middleware-extract": {
86
+ "types": "./dist/ssr/astro-middleware-extract.d.ts",
87
+ "import": "./dist/ssr/astro-middleware-extract.js",
88
+ "default": "./dist/ssr/astro-middleware-extract.js"
89
+ },
90
+ "./ssr/astro-middleware-extract-static": {
91
+ "types": "./dist/ssr/astro-middleware-extract-static.d.ts",
92
+ "import": "./dist/ssr/astro-middleware-extract-static.js",
93
+ "default": "./dist/ssr/astro-middleware-extract-static.js"
94
+ },
75
95
  "./tasty.config": "./tasty.config.ts"
76
96
  },
77
97
  "files": [
@@ -85,7 +105,9 @@
85
105
  "./dist/ssr/astro.js",
86
106
  "./dist/ssr/astro-client.js",
87
107
  "./dist/ssr/astro-middleware.js",
88
- "./dist/ssr/astro-middleware-static.js"
108
+ "./dist/ssr/astro-middleware-static.js",
109
+ "./dist/ssr/astro-middleware-extract.js",
110
+ "./dist/ssr/astro-middleware-extract-static.js"
89
111
  ],
90
112
  "engines": {
91
113
  "node": ">=20"
@@ -106,11 +128,19 @@
106
128
  "size": "size-limit",
107
129
  "bench": "vitest bench --project node",
108
130
  "bench:browser": "vitest bench --project browser",
131
+ "bench:overhead": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-overhead.bench.tsx",
132
+ "bench:injection": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-injection.bench.ts",
133
+ "bench:interaction": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-interaction.bench.tsx",
134
+ "bench:tree": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-tree.bench.tsx",
135
+ "bench:cold-start": "node scripts/cold-start/index.mjs",
109
136
  "prepublishOnly": "pnpm run build",
110
137
  "changeset": "changeset",
111
138
  "version": "changeset version",
112
139
  "release": "changeset publish",
113
140
  "knip": "knip",
141
+ "check:build": "node scripts/check-built-entries.mjs",
142
+ "check:react-compat": "node scripts/check-react-compat.mjs",
143
+ "check:test-only": "node scripts/check-test-only-code.mjs",
114
144
  "hygiene": "pnpm lint && pnpm format:check && pnpm typecheck",
115
145
  "hygiene:fix": "pnpm lint:fix && pnpm format && pnpm typecheck"
116
146
  },
@@ -167,55 +197,84 @@
167
197
  "csstype": "^3.1.0"
168
198
  },
169
199
  "devDependencies": {
170
- "@babel/core": "^7.24.0",
171
- "@babel/helper-plugin-utils": "^7.24.0",
172
- "@babel/types": "^7.24.0",
173
- "@changesets/changelog-github": "^0.7.0",
174
- "@changesets/cli": "^2.29.8",
200
+ "@astrojs/react": "^7.0.0",
201
+ "@babel/core": "^7.29.7",
202
+ "@babel/helper-plugin-utils": "^7.29.7",
203
+ "@babel/types": "^7.29.8",
204
+ "@changesets/changelog-github": "^1.0.1",
205
+ "@changesets/cli": "^3.0.3",
175
206
  "@eslint/js": "^10.0.1",
176
- "@size-limit/esbuild": "^12.0.0",
177
- "@size-limit/file": "^12.0.0",
178
- "@tenphi/eslint-plugin-tasty": "^0.11.3",
179
- "@testing-library/jest-dom": "^6.9.1",
180
- "@testing-library/react": "^16.3.2",
207
+ "@size-limit/esbuild": "^14.0.0",
208
+ "@size-limit/file": "^14.0.0",
209
+ "@tenphi/eslint-plugin-tasty": "^1.5.1",
210
+ "@testing-library/jest-dom": "^7.0.1",
211
+ "@testing-library/react": "^16.3.3",
181
212
  "@types/babel__core": "^7.20.5",
182
213
  "@types/babel__helper-plugin-utils": "^7.10.3",
183
- "@types/node": "^25.3.2",
184
- "@types/react": "^19.0.0",
185
- "@vitest/browser-playwright": "^4.1.10",
186
- "eslint": "^10.0.0",
214
+ "@types/node": "^24.13.6",
215
+ "@types/react": "^19.3.0",
216
+ "@types/react-dom": "^19.3.0",
217
+ "@vitest/browser-playwright": "^4.1.11",
218
+ "astro": "^7.3.4",
219
+ "esbuild": "^0.28.2",
220
+ "eslint": "^10.11.0",
187
221
  "eslint-config-prettier": "^10.1.8",
188
- "jiti": "^2.6.1",
189
- "knip": "^5.61.3",
190
- "next": "^16.0.0",
191
- "playwright": "^1.62.1",
192
- "prettier": "^3.8.1",
193
- "react": "^19.0.0",
194
- "size-limit": "^12.0.0",
195
- "tsdown": "^0.22.0",
196
- "typescript": "^6.0.2",
197
- "typescript-eslint": "^8.56.0",
198
- "vitest": "^4.1.10"
222
+ "jiti": "^2.7.0",
223
+ "knip": "^6.38.0",
224
+ "next": "^16.3.6",
225
+ "playwright": "^1.63.0",
226
+ "prettier": "^3.9.9",
227
+ "react": "^19.3.0",
228
+ "react-dom": "^19.3.0",
229
+ "size-limit": "^14.0.0",
230
+ "tsdown": "^0.23.0",
231
+ "typescript": "^6.0.3",
232
+ "typescript-eslint": "^8.70.1",
233
+ "vitest": "^4.1.11"
199
234
  },
200
- "packageManager": "pnpm@11.0.8",
235
+ "packageManager": "pnpm@11.27.1",
201
236
  "size-limit": [
202
237
  {
203
238
  "name": "main (import *)",
204
239
  "path": "dist/index.js",
205
240
  "import": "*",
206
- "limit": "57.5 kB"
241
+ "limit": "59.65 kB"
242
+ },
243
+ {
244
+ "name": "main (tasty)",
245
+ "path": "dist/index.js",
246
+ "import": "{ tasty }",
247
+ "limit": "52.67 kB"
248
+ },
249
+ {
250
+ "name": "main (StyleParser)",
251
+ "path": "dist/index.js",
252
+ "import": "{ StyleParser }",
253
+ "limit": "6.94 kB"
254
+ },
255
+ {
256
+ "name": "main (parseColor)",
257
+ "path": "dist/index.js",
258
+ "import": "{ parseColor }",
259
+ "limit": "7.59 kB"
260
+ },
261
+ {
262
+ "name": "main (useRawCSS)",
263
+ "path": "dist/index.js",
264
+ "import": "{ useRawCSS }",
265
+ "limit": "32.48 kB"
207
266
  },
208
267
  {
209
268
  "name": "core (import *)",
210
269
  "path": "dist/core/index.js",
211
270
  "import": "*",
212
- "limit": "54.5 kB"
271
+ "limit": "55.23 kB"
213
272
  },
214
273
  {
215
274
  "name": "static",
216
275
  "path": "dist/static/index.js",
217
276
  "import": "*",
218
- "limit": "18.75 kB"
277
+ "limit": "1.08 kB"
219
278
  },
220
279
  {
221
280
  "name": "zero",
@@ -226,7 +285,7 @@
226
285
  "path",
227
286
  "crypto"
228
287
  ],
229
- "limit": "33.25 kB"
288
+ "limit": "39.13 kB"
230
289
  },
231
290
  {
232
291
  "name": "babel-plugin",
@@ -235,9 +294,35 @@
235
294
  "ignore": [
236
295
  "fs",
237
296
  "path",
238
- "crypto"
297
+ "crypto",
298
+ "node:module",
299
+ "node:path"
300
+ ],
301
+ "limit": "43.55 kB"
302
+ },
303
+ {
304
+ "name": "astro client",
305
+ "path": "dist/ssr/astro-client.js",
306
+ "import": "*",
307
+ "limit": "0.5 kB"
308
+ },
309
+ {
310
+ "name": "ssr client",
311
+ "path": "dist/ssr/client.js",
312
+ "import": "{ hydrateTastyClasses }",
313
+ "limit": "0.5 kB"
314
+ },
315
+ {
316
+ "name": "Next.js config",
317
+ "path": "dist/ssr/next-config.js",
318
+ "import": "{ withTastyNext }",
319
+ "ignore": [
320
+ "node:crypto",
321
+ "node:fs",
322
+ "node:module",
323
+ "node:path"
239
324
  ],
240
- "limit": "50.75 kB"
325
+ "limit": "40.18 kB"
241
326
  }
242
327
  ]
243
328
  }
@@ -1,44 +0,0 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
- //#region src/ssr/async-storage.ts
3
- /**
4
- * AsyncLocalStorage integration for SSR collector discovery.
5
- *
6
- * Used by Astro middleware and generic framework integrations where
7
- * the library cannot wrap the React tree with a context provider.
8
- * The middleware calls runWithCollector() around the render, and
9
- * useStyles() calls getSSRCollector() to find it.
10
- *
11
- * Uses globalThis to ensure the AsyncLocalStorage instance is shared
12
- * across module instances — frameworks like Astro may load middleware
13
- * and page components from separate module graphs.
14
- *
15
- * This module imports from 'node:async_hooks' — it must be excluded
16
- * from client bundles via the build configuration.
17
- */
18
- const ALS_KEY = "__tasty_ssr_als__";
19
- function getSharedStorage() {
20
- const g = globalThis;
21
- if (!g[ALS_KEY]) g[ALS_KEY] = new AsyncLocalStorage();
22
- return g[ALS_KEY];
23
- }
24
- /**
25
- * Run a function with a ServerStyleCollector bound to the current
26
- * async context. All useStyles() calls within `fn` (and any async
27
- * continuations) will find this collector via getSSRCollector().
28
- */
29
- function runWithCollector(collector, fn) {
30
- return getSharedStorage().run(collector, fn);
31
- }
32
- /**
33
- * Retrieve the ServerStyleCollector bound to the current async context.
34
- * Returns null when called outside of runWithCollector() or on the client.
35
- */
36
- function getSSRCollector() {
37
- const storage = getSharedStorage();
38
- if (typeof storage?.getStore !== "function") return null;
39
- return storage.getStore() ?? null;
40
- }
41
- //#endregion
42
- export { runWithCollector as n, getSSRCollector as t };
43
-
44
- //# sourceMappingURL=async-storage-DKK-wTD4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"async-storage-DKK-wTD4.js","names":[],"sources":["../src/ssr/async-storage.ts"],"sourcesContent":["/**\n * AsyncLocalStorage integration for SSR collector discovery.\n *\n * Used by Astro middleware and generic framework integrations where\n * the library cannot wrap the React tree with a context provider.\n * The middleware calls runWithCollector() around the render, and\n * useStyles() calls getSSRCollector() to find it.\n *\n * Uses globalThis to ensure the AsyncLocalStorage instance is shared\n * across module instances — frameworks like Astro may load middleware\n * and page components from separate module graphs.\n *\n * This module imports from 'node:async_hooks' — it must be excluded\n * from client bundles via the build configuration.\n */\n\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nimport type { ServerStyleCollector } from './collector';\n\nconst ALS_KEY = '__tasty_ssr_als__';\n\nfunction getSharedStorage(): AsyncLocalStorage<ServerStyleCollector> {\n const g = globalThis as Record<string, unknown>;\n if (!g[ALS_KEY]) {\n g[ALS_KEY] = new AsyncLocalStorage<ServerStyleCollector>();\n }\n return g[ALS_KEY] as AsyncLocalStorage<ServerStyleCollector>;\n}\n\n/**\n * Run a function with a ServerStyleCollector bound to the current\n * async context. All useStyles() calls within `fn` (and any async\n * continuations) will find this collector via getSSRCollector().\n */\nexport function runWithCollector<T>(\n collector: ServerStyleCollector,\n fn: () => T,\n): T {\n return getSharedStorage().run(collector, fn);\n}\n\n/**\n * Retrieve the ServerStyleCollector bound to the current async context.\n * Returns null when called outside of runWithCollector() or on the client.\n */\nexport function getSSRCollector(): ServerStyleCollector | null {\n const storage = getSharedStorage();\n if (typeof storage?.getStore !== 'function') return null;\n return storage.getStore() ?? null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,UAAU;AAEhB,SAAS,mBAA4D;CACnE,MAAM,IAAI;CACV,IAAI,CAAC,EAAE,UACL,EAAE,WAAW,IAAI,kBAAwC;CAE3D,OAAO,EAAE;AACX;;;;;;AAOA,SAAgB,iBACd,WACA,IACG;CACH,OAAO,iBAAiB,CAAC,CAAC,IAAI,WAAW,EAAE;AAC7C;;;;;AAMA,SAAgB,kBAA+C;CAC7D,MAAM,UAAU,iBAAiB;CACjC,IAAI,OAAO,SAAS,aAAa,YAAY,OAAO;CACpD,OAAO,QAAQ,SAAS,KAAK;AAC/B"}
@@ -1,83 +0,0 @@
1
- import { t as TastyConfig } from "./config-De8L9NWM.js";
2
- import { PluginPass } from "@babel/core";
3
-
4
- //#region src/zero/babel-types.d.ts
5
- /**
6
- * Build-time configuration for zero-runtime mode.
7
- * Subset of TastyConfig excluding runtime-only DOM options
8
- * (`nonce`, `maxRulesPerSheet`, `forceTextInjection`, `gc`)
9
- * and overriding `devMode` default to `false`.
10
- */
11
- type TastyZeroConfig = Omit<TastyConfig, 'nonce' | 'maxRulesPerSheet' | 'forceTextInjection' | 'gc' | 'devMode'> & {
12
- /**
13
- * Enable development mode features: source comments in generated CSS.
14
- * @default false
15
- */
16
- devMode?: boolean;
17
- };
18
- //#endregion
19
- //#region src/zero/babel.d.ts
20
- /**
21
- * Options for the `@tenphi/tasty/babel-plugin` Babel plugin.
22
- */
23
- interface TastyZeroBabelOptions {
24
- /** Output path for generated CSS (default: 'tasty.css') */
25
- output?: string;
26
- /**
27
- * Tasty configuration for build-time processing.
28
- * Can be a static object or a factory function that returns fresh config.
29
- * A factory is called on each plugin invocation, enabling hot reload
30
- * of config values that depend on external files (e.g. theme tokens).
31
- */
32
- config?: TastyZeroConfig | (() => TastyZeroConfig);
33
- /**
34
- * Absolute path to a TypeScript/JavaScript module that default-exports
35
- * a `TastyZeroConfig` object. The module is loaded via jiti on each
36
- * plugin invocation, enabling hot reload when the file changes.
37
- *
38
- * This option is JSON-serializable and is the primary way Turbopack
39
- * passes config to the Babel plugin (since Turbopack loader options
40
- * must be plain primitives/objects/arrays).
41
- *
42
- * When both `config` and `configFile` are set, `config` takes precedence.
43
- *
44
- * @example '/absolute/path/to/tasty-zero.config.ts'
45
- */
46
- configFile?: string;
47
- /**
48
- * Absolute file paths whose content affects the generated CSS.
49
- * When any of these files change, babel-loader invalidates its cache
50
- * and re-runs the plugin with fresh config values.
51
- *
52
- * Typically includes theme files that define Glaze palettes or token values.
53
- * Paths must be absolute (resolved by the Next.js wrapper).
54
- */
55
- configDeps?: string[];
56
- /**
57
- * Automatically replace `@tenphi/tasty/static` imports with an import
58
- * of the generated CSS file. This eliminates the need for users to
59
- * manually import the CSS in their app entry point.
60
- *
61
- * @default true
62
- */
63
- injectImport?: boolean;
64
- /**
65
- * Output mode for extracted CSS.
66
- *
67
- * - `'file'` (default): CSS is written to a single output file and
68
- * the `@tenphi/tasty/static` import is rewritten to import that file.
69
- * - `'inject'`: CSS is embedded inline in the JS output and injected
70
- * at runtime via a tiny injector from `@tenphi/tasty/static/inject`.
71
- * No CSS file is written. Each `tastyStatic` call becomes
72
- * self-contained. Best for reusable components and extensions.
73
- *
74
- * When `mode` is `'inject'`, `output` and `injectImport` are ignored.
75
- *
76
- * @default 'file'
77
- */
78
- mode?: 'file' | 'inject';
79
- }
80
- declare const _default: (api: object, options: TastyZeroBabelOptions | null | undefined, dirname: string) => import("@babel/core").PluginObj<PluginPass>;
81
- //#endregion
82
- export { _default as n, TastyZeroConfig as r, TastyZeroBabelOptions as t };
83
- //# sourceMappingURL=babel-R2qT7yLN.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collector-BpkjNQDo.js","names":[],"sources":["../src/ssr/collector.ts"],"sourcesContent":["/**\n * ServerStyleCollector — server-safe style collector for SSR.\n *\n * Accumulates CSS rules and cache metadata during server rendering.\n * This is the server-side counterpart to StyleInjector: it allocates\n * hash-based class names using the configured `namePrefix` (defaults\n * to `'t'`), formats CSS rules into text, and tracks rendered class\n * names for lightweight client transfer.\n *\n * One instance is created per HTTP request. Concurrent requests\n * each get their own collector (via AsyncLocalStorage or React context).\n */\n\nimport {\n getEffectiveProperties,\n getGlobalStyles,\n getGlobalCounterStyles,\n getGlobalFontFaces,\n getGlobalFunctions,\n getGlobalConfigTokens,\n getNamePrefix,\n} from '../config';\nimport { formatCounterStyleRule } from '../counter-style';\nimport { fontFaceContentHash, formatFontFaceRule } from '../font-face';\nimport { formatFunctionRule, parseFunctionName } from '../functions';\nimport { renderStyles } from '../pipeline';\nimport type { StyleResult } from '../pipeline';\nimport { hashString } from '../utils/hash';\nimport {\n makeClassName,\n makeCounterStyleName,\n makeKeyframeName,\n validateNamePrefix,\n} from '../utils/name-prefix';\nimport { formatPropertyCSS } from './format-property';\nimport { formatGlobalRules } from './format-global-rules';\nimport { formatRules } from './format-rules';\n\nexport class ServerStyleCollector {\n private chunks = new Map<string, string>();\n private cacheKeyToClassName = new Map<string, string>();\n private flushedKeys = new Set<string>();\n private propertyRules = new Map<string, string>();\n private flushedPropertyKeys = new Set<string>();\n private keyframeRules = new Map<string, string>();\n private flushedKeyframeKeys = new Set<string>();\n private globalStyles = new Map<string, string>();\n private flushedGlobalKeys = new Set<string>();\n private rawCSS = new Map<string, string>();\n private flushedRawKeys = new Set<string>();\n private fontFaceRules = new Map<string, string>();\n private flushedFontFaceKeys = new Set<string>();\n private counterStyleRules = new Map<string, string>();\n private flushedCounterStyleKeys = new Set<string>();\n private functionRules = new Map<string, string>();\n private flushedFunctionKeys = new Set<string>();\n private keyframesCounter = 0;\n private counterStyleCounter = 0;\n private internalsCollected = false;\n private namePrefix: string;\n\n /**\n * @param namePrefix - Optional override for the configured prefix.\n * Defaults to the value from `configure({ namePrefix })` (or `'t'`).\n * Pass an explicit prefix when constructing a collector outside the\n * normal configure() lifecycle (e.g. in tests). Validated eagerly\n * so misconfiguration fails before any CSS is collected.\n */\n constructor(namePrefix?: string) {\n if (namePrefix !== undefined) {\n validateNamePrefix(namePrefix);\n }\n this.namePrefix = namePrefix ?? getNamePrefix();\n }\n\n private generateClassName(cacheKey: string): string {\n return makeClassName(this.namePrefix, hashString(cacheKey));\n }\n\n /**\n * Collect internal @property rules and :root token defaults.\n * Mirrors markStylesGenerated() from the client-side injector.\n * Called automatically on first chunk collection; idempotent.\n *\n * Internals are always emitted here — the RSC path deliberately\n * defers to SSR so that tokens appear exactly once per page in\n * <style data-tasty-ssr> (avoiding duplication of large token sets).\n */\n collectInternals(): void {\n if (this.internalsCollected) return;\n this.internalsCollected = true;\n\n for (const [token, definition] of Object.entries(\n getEffectiveProperties(),\n )) {\n const css = formatPropertyCSS(token, definition);\n if (css) {\n this.collectProperty(`__prop:${token}`, css);\n }\n }\n\n const tokenStyles = getGlobalConfigTokens();\n if (tokenStyles && Object.keys(tokenStyles).length > 0) {\n const tokenRules = renderStyles(tokenStyles, ':root') as StyleResult[];\n if (tokenRules.length > 0) {\n const css = formatGlobalRules(tokenRules);\n if (css) {\n this.collectGlobalStyles('__global:tokens', css);\n }\n }\n }\n\n const globalFF = getGlobalFontFaces();\n if (globalFF) {\n for (const [family, input] of Object.entries(globalFF)) {\n const descriptors = Array.isArray(input) ? input : [input];\n for (const desc of descriptors) {\n const hash = fontFaceContentHash(family, desc);\n const css = formatFontFaceRule(family, desc);\n this.collectFontFace(hash, css);\n }\n }\n }\n\n const globalCS = getGlobalCounterStyles();\n if (globalCS) {\n for (const [name, descriptors] of Object.entries(globalCS)) {\n const css = formatCounterStyleRule(name, descriptors);\n this.collectCounterStyle(name, css, { weak: true });\n }\n }\n\n const globalFn = getGlobalFunctions();\n if (globalFn) {\n for (const [name, definition] of Object.entries(globalFn)) {\n const css = formatFunctionRule(name, definition);\n this.collectFunction(parseFunctionName(name), css, { weak: true });\n }\n }\n\n const globalStyles = getGlobalStyles();\n if (globalStyles) {\n for (const [selector, styles] of Object.entries(globalStyles)) {\n if (Object.keys(styles).length > 0) {\n const rules = renderStyles(styles, selector) as StyleResult[];\n if (rules.length > 0) {\n const css = formatGlobalRules(rules);\n if (css) {\n this.collectGlobalStyles(`__global:styles:${selector}`, css);\n }\n }\n }\n }\n }\n }\n\n /**\n * Allocate a className for a cache key, server-side.\n * Mirrors StyleInjector.allocateClassName but without DOM access.\n */\n allocateClassName(cacheKey: string): {\n className: string;\n isNewAllocation: boolean;\n } {\n const existing = this.cacheKeyToClassName.get(cacheKey);\n if (existing) {\n return { className: existing, isNewAllocation: false };\n }\n\n const className = this.generateClassName(cacheKey);\n this.cacheKeyToClassName.set(cacheKey, className);\n\n return { className, isNewAllocation: true };\n }\n\n /**\n * Record CSS rules for a chunk.\n * Called by useStyles during server render.\n */\n collectChunk(\n cacheKey: string,\n className: string,\n rules: StyleResult[],\n ): void {\n if (this.chunks.has(cacheKey)) return;\n const css = formatRules(rules, className);\n if (css) {\n this.chunks.set(cacheKey, css);\n }\n }\n\n /**\n * Record a @property rule. Deduplicated by name.\n */\n collectProperty(name: string, css: string): void {\n if (!this.propertyRules.has(name)) {\n this.propertyRules.set(name, css);\n }\n }\n\n /**\n * Record a @keyframes rule. Deduplicated by name.\n */\n collectKeyframes(name: string, css: string): void {\n if (!this.keyframeRules.has(name)) {\n this.keyframeRules.set(name, css);\n }\n }\n\n /**\n * Allocate a keyframe name for SSR. Uses provided name or generates one.\n */\n allocateKeyframeName(providedName?: string): string {\n return (\n providedName ??\n makeKeyframeName(this.namePrefix, String(this.keyframesCounter++))\n );\n }\n\n /**\n * Record a @font-face rule. Deduplicated by key (content hash).\n */\n collectFontFace(key: string, css: string): void {\n if (!this.fontFaceRules.has(key)) {\n this.fontFaceRules.set(key, css);\n }\n }\n\n /**\n * Record a @counter-style rule. Deduplicated by name and overrides an\n * existing rule by default. Pass `weak: true` for global `configure()`\n * definitions, which never clobber an existing rule.\n */\n collectCounterStyle(\n name: string,\n css: string,\n options?: { weak?: boolean },\n ): void {\n const existing = this.counterStyleRules.get(name);\n if (existing === undefined) {\n this.counterStyleRules.set(name, css);\n return;\n }\n if (options?.weak || existing === css) return;\n this.counterStyleRules.set(name, css);\n // If a rule with this name was already flushed (streaming), allow the\n // overriding rule to be flushed again so it wins by source order.\n this.flushedCounterStyleKeys.delete(name);\n }\n\n /**\n * Record a @function rule. Deduplicated by CSS function name and overrides an\n * existing rule by default. Pass `weak: true` for global `configure()`\n * definitions, which never clobber an existing rule.\n */\n collectFunction(\n name: string,\n css: string,\n options?: { weak?: boolean },\n ): void {\n const existing = this.functionRules.get(name);\n if (existing === undefined) {\n this.functionRules.set(name, css);\n return;\n }\n if (options?.weak || existing === css) return;\n this.functionRules.set(name, css);\n // If a rule with this name was already flushed (streaming), allow the\n // overriding rule to be flushed again so it wins by source order.\n this.flushedFunctionKeys.delete(name);\n }\n\n /**\n * Allocate a counter-style name for SSR. Uses provided name or generates one.\n */\n allocateCounterStyleName(providedName?: string): string {\n return (\n providedName ??\n makeCounterStyleName(this.namePrefix, String(this.counterStyleCounter++))\n );\n }\n\n /**\n * Record global styles (from useGlobalStyles). Deduplicated by key.\n *\n * Pass `replace` for slot-keyed entries (an explicit `id`), where the last\n * write must win to match the client's update-tracking behavior.\n */\n collectGlobalStyles(key: string, css: string, replace?: boolean): void {\n if (replace || !this.globalStyles.has(key)) {\n this.globalStyles.set(key, css);\n }\n }\n\n /**\n * Record raw CSS text (from useRawCSS). Deduplicated by key.\n *\n * Pass `replace` for slot-keyed entries (an explicit `id`), where the last\n * write must win to match the client's update-tracking behavior.\n */\n collectRawCSS(key: string, css: string, replace?: boolean): void {\n if (replace || !this.rawCSS.has(key)) {\n this.rawCSS.set(key, css);\n }\n }\n\n /**\n * Extract all CSS collected so far as a single string.\n * Includes @property and @keyframes rules.\n * Used for non-streaming SSR (renderToString).\n */\n getCSS(): string {\n const parts: string[] = [];\n\n for (const css of this.propertyRules.values()) {\n parts.push(css);\n }\n\n for (const css of this.fontFaceRules.values()) {\n parts.push(css);\n }\n\n for (const css of this.counterStyleRules.values()) {\n parts.push(css);\n }\n\n for (const css of this.functionRules.values()) {\n parts.push(css);\n }\n\n for (const css of this.rawCSS.values()) {\n parts.push(css);\n }\n\n for (const css of this.globalStyles.values()) {\n parts.push(css);\n }\n\n for (const css of this.chunks.values()) {\n parts.push(css);\n }\n\n for (const css of this.keyframeRules.values()) {\n parts.push(css);\n }\n\n return parts.join('\\n');\n }\n\n /**\n * Flush only newly collected CSS since the last flush.\n * Used for streaming SSR (renderToPipeableStream + useServerInsertedHTML).\n */\n flushCSS(): string {\n const parts: string[] = [];\n\n for (const [name, css] of this.propertyRules) {\n if (!this.flushedPropertyKeys.has(name)) {\n parts.push(css);\n this.flushedPropertyKeys.add(name);\n }\n }\n\n for (const [key, css] of this.fontFaceRules) {\n if (!this.flushedFontFaceKeys.has(key)) {\n parts.push(css);\n this.flushedFontFaceKeys.add(key);\n }\n }\n\n for (const [key, css] of this.counterStyleRules) {\n if (!this.flushedCounterStyleKeys.has(key)) {\n parts.push(css);\n this.flushedCounterStyleKeys.add(key);\n }\n }\n\n for (const [key, css] of this.functionRules) {\n if (!this.flushedFunctionKeys.has(key)) {\n parts.push(css);\n this.flushedFunctionKeys.add(key);\n }\n }\n\n for (const [key, css] of this.rawCSS) {\n if (!this.flushedRawKeys.has(key)) {\n parts.push(css);\n this.flushedRawKeys.add(key);\n }\n }\n\n for (const [key, css] of this.globalStyles) {\n if (!this.flushedGlobalKeys.has(key)) {\n parts.push(css);\n this.flushedGlobalKeys.add(key);\n }\n }\n\n for (const [key, css] of this.chunks) {\n if (!this.flushedKeys.has(key)) {\n parts.push(css);\n this.flushedKeys.add(key);\n }\n }\n\n for (const [name, css] of this.keyframeRules) {\n if (!this.flushedKeyframeKeys.has(name)) {\n parts.push(css);\n this.flushedKeyframeKeys.add(name);\n }\n }\n\n return parts.join('\\n');\n }\n\n private flushedClassNames = new Set<string>();\n\n /**\n * Return class names rendered since the last call (for streaming).\n * Used to emit lightweight class-list scripts for client hydration.\n */\n getRenderedClassNames(): string[] {\n const names: string[] = [];\n for (const className of this.cacheKeyToClassName.values()) {\n if (!this.flushedClassNames.has(className)) {\n this.flushedClassNames.add(className);\n names.push(className);\n }\n }\n return names;\n }\n}\n\n/**\n * Factory for creating a {@link ServerStyleCollector} instance.\n *\n * Canonical functional entry point; the `ServerStyleCollector` class remains\n * exported for advanced/internal use.\n *\n * @param namePrefix - Optional override for the configured class-name prefix.\n * Defaults to the value from `configure({ namePrefix })` (or `'t'`).\n *\n * @example\n * ```ts\n * import { createServerStyleCollector } from '@tenphi/tasty/ssr';\n *\n * const collector = createServerStyleCollector();\n * ```\n */\nexport function createServerStyleCollector(\n namePrefix?: string,\n): ServerStyleCollector {\n return new ServerStyleCollector(namePrefix);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAa,uBAAb,MAAkC;CAChC,yBAAiB,IAAI,IAAoB;CACzC,sCAA8B,IAAI,IAAoB;CACtD,8BAAsB,IAAI,IAAY;CACtC,gCAAwB,IAAI,IAAoB;CAChD,sCAA8B,IAAI,IAAY;CAC9C,gCAAwB,IAAI,IAAoB;CAChD,sCAA8B,IAAI,IAAY;CAC9C,+BAAuB,IAAI,IAAoB;CAC/C,oCAA4B,IAAI,IAAY;CAC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