@tenphi/tasty 0.0.0-snapshot.b2ad8a7 → 0.0.0-snapshot.b317d64

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 (119) hide show
  1. package/README.md +6 -6
  2. package/dist/babel-types-C_7kRP38.d.ts +18 -0
  3. package/dist/chunks/async-storage-CG5HnUT5.js +20 -0
  4. package/dist/chunks/async-storage-CG5HnUT5.js.map +1 -0
  5. package/dist/chunks/build-config-BDLYGmKn.js +60 -0
  6. package/dist/chunks/build-config-BDLYGmKn.js.map +1 -0
  7. package/dist/{collector-DCI2yzwx.js → chunks/collector-DqcB0UUT.js} +25 -119
  8. package/dist/chunks/collector-DqcB0UUT.js.map +1 -0
  9. package/dist/chunks/config-engine-CGIMO2PV.js +272 -0
  10. package/dist/chunks/config-engine-CGIMO2PV.js.map +1 -0
  11. package/dist/chunks/css-definitions-BibU6ZnP.js +904 -0
  12. package/dist/chunks/css-definitions-BibU6ZnP.js.map +1 -0
  13. package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
  14. package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
  15. package/dist/chunks/debug-Dy36S1sU.js +502 -0
  16. package/dist/chunks/debug-Dy36S1sU.js.map +1 -0
  17. package/dist/chunks/dsl-DRhFWQzo.js +1378 -0
  18. package/dist/chunks/dsl-DRhFWQzo.js.map +1 -0
  19. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  20. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  21. package/dist/chunks/react-runtime-BljxMd6C.js +582 -0
  22. package/dist/chunks/react-runtime-BljxMd6C.js.map +1 -0
  23. package/dist/chunks/runtime-engine-CPYI2bA8.js +2415 -0
  24. package/dist/chunks/runtime-engine-CPYI2bA8.js.map +1 -0
  25. package/dist/chunks/runtime-state-C0u1jp-Q.js +141 -0
  26. package/dist/chunks/runtime-state-C0u1jp-Q.js.map +1 -0
  27. package/dist/{merge-styles-CzVxdtav.js → chunks/shared-utils-y-HjvPN4.js} +60 -55
  28. package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
  29. package/dist/chunks/style-engine-D35rvcdB.js +5420 -0
  30. package/dist/chunks/style-engine-D35rvcdB.js.map +1 -0
  31. package/dist/{css-writer-Cq0fg5v8.js → chunks/zero-engine-b--JCZad.js} +51 -146
  32. package/dist/chunks/zero-engine-b--JCZad.js.map +1 -0
  33. package/dist/{collector-CQDeU7WS.d.ts → collector-w4mBj5gd.d.ts} +23 -4
  34. package/dist/{config-CwRr6-fG.d.ts → config-CrZOfNJ5.d.ts} +110 -96
  35. package/dist/core/index.d.ts +5 -5
  36. package/dist/core/index.js +9 -6
  37. package/dist/{index-C0W21Qcb.d.ts → index-CYJtAI9a.d.ts} +243 -281
  38. package/dist/index.d.ts +5 -5
  39. package/dist/index.js +11 -998
  40. package/dist/{merge-styles-Bpwfy1CS.d.ts → merge-styles-VXwJ0Frr.d.ts} +2 -3
  41. package/dist/ssr/astro-client.d.ts +1 -1
  42. package/dist/ssr/astro-client.js +1 -14
  43. package/dist/ssr/astro-client.js.map +1 -1
  44. package/dist/ssr/astro-middleware-extract-static.d.ts +10 -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 +10 -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 +3 -2
  51. package/dist/ssr/astro-middleware-static.js +0 -11
  52. package/dist/ssr/astro-middleware-static.js.map +1 -1
  53. package/dist/ssr/astro-middleware.d.ts +3 -2
  54. package/dist/ssr/astro-middleware.js +0 -12
  55. package/dist/ssr/astro-middleware.js.map +1 -1
  56. package/dist/ssr/astro.d.ts +40 -6
  57. package/dist/ssr/astro.js +157 -93
  58. package/dist/ssr/astro.js.map +1 -1
  59. package/dist/ssr/index.d.ts +10 -11
  60. package/dist/ssr/index.js +4 -4
  61. package/dist/ssr/index.js.map +1 -1
  62. package/dist/ssr/next-config.d.ts +64 -0
  63. package/dist/ssr/next-config.js +134 -0
  64. package/dist/ssr/next-config.js.map +1 -0
  65. package/dist/ssr/next.d.ts +9 -8
  66. package/dist/ssr/next.js +29 -43
  67. package/dist/ssr/next.js.map +1 -1
  68. package/dist/static/index.d.ts +8 -9
  69. package/dist/static/index.js +4 -22
  70. package/dist/static/index.js.map +1 -1
  71. package/dist/static/inject.d.ts +1 -2
  72. package/dist/{index-DpykQKO8.d.ts → types-JEY8PVYP.d.ts} +986 -972
  73. package/dist/zero/babel.d.ts +67 -2
  74. package/dist/zero/babel.js +57 -131
  75. package/dist/zero/babel.js.map +1 -1
  76. package/dist/zero/index.d.ts +44 -8
  77. package/dist/zero/index.js +24 -2
  78. package/dist/zero/index.js.map +1 -0
  79. package/dist/zero/next.d.ts +4 -5
  80. package/dist/zero/next.js +0 -31
  81. package/dist/zero/next.js.map +1 -1
  82. package/docs/ai-agents.md +31 -5
  83. package/docs/configuration.md +18 -2
  84. package/docs/debug.md +15 -5
  85. package/docs/dsl.md +56 -8
  86. package/docs/getting-started.md +13 -11
  87. package/docs/injector.md +21 -7
  88. package/docs/methodology.md +5 -5
  89. package/docs/pipeline.md +34 -10
  90. package/docs/plugins.md +1 -1
  91. package/docs/react-api.md +9 -0
  92. package/docs/runtime-benchmarks.md +282 -110
  93. package/docs/ssr.md +179 -20
  94. package/docs/styles.md +89 -19
  95. package/docs/tasty-static.md +34 -1
  96. package/package.json +101 -36
  97. package/dist/async-storage-DKK-wTD4.js +0 -44
  98. package/dist/async-storage-DKK-wTD4.js.map +0 -1
  99. package/dist/babel-B_P8t-f0.d.ts +0 -83
  100. package/dist/collector-DCI2yzwx.js.map +0 -1
  101. package/dist/config-B97n_EIv.js +0 -12612
  102. package/dist/config-B97n_EIv.js.map +0 -1
  103. package/dist/context-CA8YKeMn.js +0 -24
  104. package/dist/context-CA8YKeMn.js.map +0 -1
  105. package/dist/core-DWrUWxog.js +0 -1645
  106. package/dist/core-DWrUWxog.js.map +0 -1
  107. package/dist/css-writer-Cq0fg5v8.js.map +0 -1
  108. package/dist/format-global-rules-DklyaXv-.js +0 -22
  109. package/dist/format-global-rules-DklyaXv-.js.map +0 -1
  110. package/dist/format-rules-Wb7dJOoL.js +0 -130
  111. package/dist/format-rules-Wb7dJOoL.js.map +0 -1
  112. package/dist/hydrate-gFTLBDK9.js +0 -37
  113. package/dist/hydrate-gFTLBDK9.js.map +0 -1
  114. package/dist/index.js.map +0 -1
  115. package/dist/merge-styles-CzVxdtav.js.map +0 -1
  116. package/dist/renderChunk-COXABoQz.js +0 -290
  117. package/dist/renderChunk-COXABoQz.js.map +0 -1
  118. package/dist/resolve-recipes-BnrUEjWV.js +0 -144
  119. package/dist/resolve-recipes-BnrUEjWV.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.b2ad8a7",
3
+ "version": "0.0.0-snapshot.b317d64",
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,6 +52,11 @@
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",
@@ -72,6 +77,16 @@
72
77
  "import": "./dist/ssr/astro-middleware-static.js",
73
78
  "default": "./dist/ssr/astro-middleware-static.js"
74
79
  },
80
+ "./ssr/astro-middleware-extract": {
81
+ "types": "./dist/ssr/astro-middleware-extract.d.ts",
82
+ "import": "./dist/ssr/astro-middleware-extract.js",
83
+ "default": "./dist/ssr/astro-middleware-extract.js"
84
+ },
85
+ "./ssr/astro-middleware-extract-static": {
86
+ "types": "./dist/ssr/astro-middleware-extract-static.d.ts",
87
+ "import": "./dist/ssr/astro-middleware-extract-static.js",
88
+ "default": "./dist/ssr/astro-middleware-extract-static.js"
89
+ },
75
90
  "./tasty.config": "./tasty.config.ts"
76
91
  },
77
92
  "files": [
@@ -85,7 +100,9 @@
85
100
  "./dist/ssr/astro.js",
86
101
  "./dist/ssr/astro-client.js",
87
102
  "./dist/ssr/astro-middleware.js",
88
- "./dist/ssr/astro-middleware-static.js"
103
+ "./dist/ssr/astro-middleware-static.js",
104
+ "./dist/ssr/astro-middleware-extract.js",
105
+ "./dist/ssr/astro-middleware-extract-static.js"
89
106
  ],
90
107
  "engines": {
91
108
  "node": ">=20"
@@ -108,12 +125,15 @@
108
125
  "bench:browser": "vitest bench --project browser",
109
126
  "bench:overhead": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-overhead.bench.tsx",
110
127
  "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",
128
+ "bench:interaction": "vitest bench --config vitest.production-browser-bench.config.ts src/tasty-interaction.bench.tsx",
129
+ "bench:cold-start": "node scripts/cold-start/index.mjs",
112
130
  "prepublishOnly": "pnpm run build",
113
131
  "changeset": "changeset",
114
132
  "version": "changeset version",
115
133
  "release": "changeset publish",
116
134
  "knip": "knip",
135
+ "check:build": "node scripts/check-built-entries.mjs",
136
+ "check:react-compat": "node scripts/check-react-compat.mjs",
117
137
  "check:test-only": "node scripts/check-test-only-code.mjs",
118
138
  "hygiene": "pnpm lint && pnpm format:check && pnpm typecheck",
119
139
  "hygiene:fix": "pnpm lint:fix && pnpm format && pnpm typecheck"
@@ -171,57 +191,84 @@
171
191
  "csstype": "^3.1.0"
172
192
  },
173
193
  "devDependencies": {
174
- "@babel/core": "^7.24.0",
175
- "@babel/helper-plugin-utils": "^7.24.0",
176
- "@babel/types": "^7.24.0",
177
- "@changesets/changelog-github": "^0.7.0",
178
- "@changesets/cli": "^2.29.8",
194
+ "@astrojs/react": "^7.0.0",
195
+ "@babel/core": "^7.29.7",
196
+ "@babel/helper-plugin-utils": "^7.29.7",
197
+ "@babel/types": "^7.29.8",
198
+ "@changesets/changelog-github": "^1.0.1",
199
+ "@changesets/cli": "^3.0.3",
179
200
  "@eslint/js": "^10.0.1",
180
- "@size-limit/esbuild": "^12.0.0",
181
- "@size-limit/file": "^12.0.0",
182
- "@tenphi/eslint-plugin-tasty": "^0.11.3",
183
- "@testing-library/jest-dom": "^6.9.1",
184
- "@testing-library/react": "^16.3.2",
201
+ "@size-limit/esbuild": "^14.0.0",
202
+ "@size-limit/file": "^14.0.0",
203
+ "@tenphi/eslint-plugin-tasty": "^1.1.0",
204
+ "@testing-library/jest-dom": "^7.0.1",
205
+ "@testing-library/react": "^16.3.3",
185
206
  "@types/babel__core": "^7.20.5",
186
207
  "@types/babel__helper-plugin-utils": "^7.10.3",
187
- "@types/node": "^25.3.2",
188
- "@types/react": "^19.0.0",
189
- "@types/react-dom": "^19.0.0",
190
- "@vitest/browser-playwright": "^4.1.10",
191
- "eslint": "^10.0.0",
208
+ "@types/node": "^24.13.6",
209
+ "@types/react": "^19.3.0",
210
+ "@types/react-dom": "^19.3.0",
211
+ "@vitest/browser-playwright": "^4.1.11",
212
+ "astro": "^7.3.4",
213
+ "esbuild": "^0.28.2",
214
+ "eslint": "^10.11.0",
192
215
  "eslint-config-prettier": "^10.1.8",
193
- "jiti": "^2.6.1",
194
- "knip": "^5.61.3",
195
- "next": "^16.0.0",
196
- "playwright": "^1.62.1",
197
- "prettier": "^3.8.1",
198
- "react": "^19.0.0",
199
- "react-dom": "^19.0.0",
200
- "size-limit": "^12.0.0",
201
- "tsdown": "^0.22.0",
202
- "typescript": "^6.0.2",
203
- "typescript-eslint": "^8.56.0",
204
- "vitest": "^4.1.10"
216
+ "jiti": "^2.7.0",
217
+ "knip": "^6.38.0",
218
+ "next": "^16.3.6",
219
+ "playwright": "^1.63.0",
220
+ "prettier": "^3.9.9",
221
+ "react": "^19.3.0",
222
+ "react-dom": "^19.3.0",
223
+ "size-limit": "^14.0.0",
224
+ "tsdown": "^0.23.0",
225
+ "typescript": "^6.0.3",
226
+ "typescript-eslint": "^8.70.1",
227
+ "vitest": "^4.1.11"
205
228
  },
206
- "packageManager": "pnpm@11.24.0",
229
+ "packageManager": "pnpm@11.27.1",
207
230
  "size-limit": [
208
231
  {
209
232
  "name": "main (import *)",
210
233
  "path": "dist/index.js",
211
234
  "import": "*",
212
- "limit": "57.1 kB"
235
+ "limit": "58.54 kB"
236
+ },
237
+ {
238
+ "name": "main (tasty)",
239
+ "path": "dist/index.js",
240
+ "import": "{ tasty }",
241
+ "limit": "51.51 kB"
242
+ },
243
+ {
244
+ "name": "main (StyleParser)",
245
+ "path": "dist/index.js",
246
+ "import": "{ StyleParser }",
247
+ "limit": "6.94 kB"
248
+ },
249
+ {
250
+ "name": "main (parseColor)",
251
+ "path": "dist/index.js",
252
+ "import": "{ parseColor }",
253
+ "limit": "7.59 kB"
254
+ },
255
+ {
256
+ "name": "main (useRawCSS)",
257
+ "path": "dist/index.js",
258
+ "import": "{ useRawCSS }",
259
+ "limit": "31.2 kB"
213
260
  },
214
261
  {
215
262
  "name": "core (import *)",
216
263
  "path": "dist/core/index.js",
217
264
  "import": "*",
218
- "limit": "53.95 kB"
265
+ "limit": "55.23 kB"
219
266
  },
220
267
  {
221
268
  "name": "static",
222
269
  "path": "dist/static/index.js",
223
270
  "import": "*",
224
- "limit": "16.8 kB"
271
+ "limit": "1.08 kB"
225
272
  },
226
273
  {
227
274
  "name": "zero",
@@ -232,7 +279,7 @@
232
279
  "path",
233
280
  "crypto"
234
281
  ],
235
- "limit": "31.25 kB"
282
+ "limit": "37.98 kB"
236
283
  },
237
284
  {
238
285
  "name": "babel-plugin",
@@ -243,7 +290,25 @@
243
290
  "path",
244
291
  "crypto"
245
292
  ],
246
- "limit": "49.8 kB"
293
+ "limit": "42.44 kB"
294
+ },
295
+ {
296
+ "name": "astro client",
297
+ "path": "dist/ssr/astro-client.js",
298
+ "import": "*",
299
+ "limit": "0.5 kB"
300
+ },
301
+ {
302
+ "name": "Next.js config",
303
+ "path": "dist/ssr/next-config.js",
304
+ "import": "{ withTastyNext }",
305
+ "ignore": [
306
+ "node:crypto",
307
+ "node:fs",
308
+ "node:module",
309
+ "node:path"
310
+ ],
311
+ "limit": "39.13 kB"
247
312
  }
248
313
  ]
249
314
  }
@@ -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-CwRr6-fG.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-B_P8t-f0.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collector-DCI2yzwx.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;CAC5C,yBAAiB,IAAI,IAAoB;CACzC,iCAAyB,IAAI,IAAY;CACzC,gCAAwB,IAAI,IAAoB;CAChD,sCAA8B,IAAI,IAAY;CAC9C,oCAA4B,IAAI,IAAoB;CACpD,0CAAkC,IAAI,IAAY;CAClD,gCAAwB,IAAI,IAAoB;CAChD,sCAA8B,IAAI,IAAY;CAC9C,mBAA2B;CAC3B,sBAA8B;CAC9B,qBAA6B;CAC7B;;;;;;;;CASA,YAAY,YAAqB;EAC/B,IAAI,eAAe,KAAA,GACjB,mBAAmB,UAAU;EAE/B,KAAK,aAAa,cAAc,cAAc;CAChD;CAEA,kBAA0B,UAA0B;EAClD,OAAO,cAAc,KAAK,YAAY,WAAW,QAAQ,CAAC;CAC5D;;;;;;;;;;CAWA,mBAAyB;EACvB,IAAI,KAAK,oBAAoB;EAC7B,KAAK,qBAAqB;EAE1B,KAAK,MAAM,CAAC,OAAO,eAAe,OAAO,QACvC,uBAAuB,CACzB,GAAG;GACD,MAAM,MAAM,kBAAkB,OAAO,UAAU;GAC/C,IAAI,KACF,KAAK,gBAAgB,UAA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