@tenphi/tasty 2.11.1 → 3.0.0

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 (76) hide show
  1. package/README.md +32 -7
  2. package/dist/astro-B53trJyX.js +156 -0
  3. package/dist/astro-B53trJyX.js.map +1 -0
  4. package/dist/babel-HlEpSZrj.d.ts +83 -0
  5. package/dist/{collector-DYA5AOwr.d.ts → collector-BPzZezAG.d.ts} +44 -7
  6. package/dist/{collector-AHZaBSv8.js → collector-D14DcZx9.js} +75 -14
  7. package/dist/collector-D14DcZx9.js.map +1 -0
  8. package/dist/{config-YDAcLaVf.js → config-CCcE_tqx.js} +2312 -1131
  9. package/dist/config-CCcE_tqx.js.map +1 -0
  10. package/dist/{config-BtK9fUaz.d.ts → config-D2INrjr_.d.ts} +252 -25
  11. package/dist/core/index.d.ts +5 -5
  12. package/dist/core/index.js +6 -6
  13. package/dist/{core-CS4bzqGu.js → core-B5d0IPi2.js} +85 -133
  14. package/dist/core-B5d0IPi2.js.map +1 -0
  15. package/dist/{css-writer-BXSANVrq.js → css-writer-B5DBoxhf.js} +54 -15
  16. package/dist/css-writer-B5DBoxhf.js.map +1 -0
  17. package/dist/{format-rules-CYriCDwq.js → format-rules-BbKDjsfO.js} +2 -2
  18. package/dist/{format-rules-CYriCDwq.js.map → format-rules-BbKDjsfO.js.map} +1 -1
  19. package/dist/{hydrate-GVTorHpU.js → hydrate-CwALW3J9.js} +3 -11
  20. package/dist/{hydrate-GVTorHpU.js.map → hydrate-CwALW3J9.js.map} +1 -1
  21. package/dist/{index-BYtnj_gA.d.ts → index-BAAbdfRs.d.ts} +228 -153
  22. package/dist/{index-B9ih23uv.d.ts → index-l_NdJSUS.d.ts} +172 -61
  23. package/dist/index.d.ts +5 -5
  24. package/dist/index.js +191 -56
  25. package/dist/index.js.map +1 -1
  26. package/dist/{keyframes-CtcSlw4k.js → keyframes-B8M1FmtE.js} +10 -181
  27. package/dist/keyframes-B8M1FmtE.js.map +1 -0
  28. package/dist/{merge-styles-D4ITH4bc.js → merge-styles--1zOSFlS.js} +2 -2
  29. package/dist/{merge-styles-D4ITH4bc.js.map → merge-styles--1zOSFlS.js.map} +1 -1
  30. package/dist/{merge-styles-BZV-XAwX.d.ts → merge-styles-NEvqayL_.d.ts} +2 -2
  31. package/dist/{resolve-recipes-llr0COs8.js → resolve-recipes-Caix5NnH.js} +3 -3
  32. package/dist/{resolve-recipes-llr0COs8.js.map → resolve-recipes-Caix5NnH.js.map} +1 -1
  33. package/dist/ssr/astro-client.js +1 -1
  34. package/dist/ssr/astro-middleware.js +1 -1
  35. package/dist/ssr/astro-middleware.js.map +1 -1
  36. package/dist/ssr/astro.d.ts +1 -5
  37. package/dist/ssr/astro.js +2 -147
  38. package/dist/ssr/index.d.ts +2 -9
  39. package/dist/ssr/index.js +4 -4
  40. package/dist/ssr/index.js.map +1 -1
  41. package/dist/ssr/next.d.ts +1 -1
  42. package/dist/ssr/next.js +5 -6
  43. package/dist/ssr/next.js.map +1 -1
  44. package/dist/static/index.d.ts +2 -2
  45. package/dist/static/index.js +1 -1
  46. package/dist/zero/babel.d.ts +2 -80
  47. package/dist/zero/babel.js +27 -23
  48. package/dist/zero/babel.js.map +1 -1
  49. package/dist/zero/index.d.ts +16 -2
  50. package/dist/zero/index.js +2 -2
  51. package/dist/zero/next.d.ts +1 -1
  52. package/dist/zero/next.js +1 -1
  53. package/dist/zero/next.js.map +1 -1
  54. package/docs/README.md +3 -1
  55. package/docs/ai-agents.md +21 -7
  56. package/docs/configuration.md +220 -30
  57. package/docs/debug.md +7 -7
  58. package/docs/design-system.md +2 -2
  59. package/docs/dsl.md +68 -8
  60. package/docs/injector.md +46 -4
  61. package/docs/methodology.md +1 -1
  62. package/docs/migration-v3.md +285 -0
  63. package/docs/pipeline.md +3 -3
  64. package/docs/plugins.md +349 -0
  65. package/docs/react-api.md +82 -3
  66. package/docs/ssr.md +40 -33
  67. package/docs/styles.md +27 -9
  68. package/docs/tasty-static.md +8 -6
  69. package/package.json +7 -7
  70. package/tasty.config.ts +4 -0
  71. package/dist/collector-AHZaBSv8.js.map +0 -1
  72. package/dist/config-YDAcLaVf.js.map +0 -1
  73. package/dist/core-CS4bzqGu.js.map +0 -1
  74. package/dist/css-writer-BXSANVrq.js.map +0 -1
  75. package/dist/keyframes-CtcSlw4k.js.map +0 -1
  76. package/dist/ssr/astro.js.map +0 -1
@@ -1,105 +1,8 @@
1
- import { A as StyleInjector, At as extractLocalProperties, F as fontFaceContentHash, I as formatFontFaceRule, L as hasLocalFontFace, M as formatCounterStyleRule, Mt as hasLocalProperties, N as hasLocalCounterStyle, Nt as parsePropertyToken, P as extractLocalFontFace, Q as normalizeColorTokenValue, St as getColorSpaceSuffix, U as createStyle, W as PropertyTypeResolver, _ as markStylesGenerated, _t as isDevEnv, bt as getColorSpaceComponents, c as getGlobalKeyframes, d as getNamePrefix, et as parseStyle, f as hasGlobalKeyframes, ft as makeClassName, g as isTestEnvironment, ht as tastyClassRegex, j as extractLocalCounterStyle, kt as Lru, n as getConfig, s as getGlobalInjector, vt as hashString, w as camelToKebab, xt as getColorSpaceFunc, z as STYLE_HANDLER_MAP } from "./config-YDAcLaVf.js";
2
- import { _ as categorizeStyleKeys, a as mergeKeyframes, c as generateChunkCacheKey, i as hasLocalKeyframes, n as extractLocalKeyframes, o as replaceAnimationNames, r as filterUsedKeyframes, s as renderStylesForChunk, t as extractAnimationNamesFromStyles, u as CHUNK_NAMES } from "./keyframes-CtcSlw4k.js";
3
- import { n as formatPropertyCSS, r as getRegisteredSSRCollector, t as formatRules } from "./format-rules-CYriCDwq.js";
4
- import { t as resolveRecipes } from "./resolve-recipes-llr0COs8.js";
1
+ import { Dt as formatFunctionRule, Et as extractLocalFunctions, G as StyleInjector, J as hasLocalCounterStyle, K as extractLocalCounterStyle, Kt as isDevEnv, Lt as normalizeColorTokenValue, Ot as hasLocalFunctions, Q as hasLocalFontFace, X as fontFaceContentHash, Xt as getColorSpaceFunc, Y as extractLocalFontFace, Yt as getColorSpaceComponents, Z as formatFontFaceRule, Zt as getColorSpaceSuffix, _ as isFunctionsPolyfillEnabled, an as Lru, c as getGlobalInjector, et as STYLE_HANDLER_MAP, f as getNamePrefix, ft as hashString, gt as parsePropertyToken, ht as hasLocalProperties, it as PropertyTypeResolver, jt as registerLocalFunctionPolyfills, kt as parseFunctionName, l as getGlobalKeyframes, n as getConfig, p as hasGlobalKeyframes, pt as extractLocalProperties, q as formatCounterStyleRule, rt as createStyle, st as makeClassName, ut as tastyClassRegex, v as isTestEnvironment, y as markStylesGenerated, yt as CHUNK_NAMES, z as camelToKebab, zt as parseStyle } from "./config-CCcE_tqx.js";
2
+ import { a as mergeKeyframes, c as generateChunkCacheKey, i as hasLocalKeyframes, l as categorizeStyleKeys, n as extractLocalKeyframes, o as replaceAnimationNames, r as filterUsedKeyframes, s as renderStylesForChunk, t as extractAnimationNamesFromStyles } from "./keyframes-B8M1FmtE.js";
3
+ import { n as formatPropertyCSS, r as getRegisteredSSRCollector, t as formatRules } from "./format-rules-BbKDjsfO.js";
4
+ import { t as resolveRecipes } from "./resolve-recipes-Caix5NnH.js";
5
5
  import { cache } from "react";
6
- //#region src/styles/list.ts
7
- const BASE_STYLES = [
8
- "display",
9
- "font",
10
- "preset",
11
- "hide",
12
- "whiteSpace",
13
- "opacity",
14
- "transition"
15
- ];
16
- const POSITION_STYLES = [
17
- "gridArea",
18
- "order",
19
- "gridColumn",
20
- "gridRow",
21
- "placeSelf",
22
- "alignSelf",
23
- "justifySelf",
24
- "zIndex",
25
- "margin",
26
- "inset",
27
- "position",
28
- "scrollMargin"
29
- ];
30
- const BLOCK_INNER_STYLES = [
31
- "padding",
32
- "paddingInline",
33
- "paddingBlock",
34
- "overflow",
35
- "scrollbar",
36
- "textAlign"
37
- ];
38
- const BLOCK_OUTER_STYLES = [
39
- "border",
40
- "radius",
41
- "shadow",
42
- "outline"
43
- ];
44
- const BLOCK_STYLES = [...BLOCK_INNER_STYLES, ...BLOCK_OUTER_STYLES];
45
- const COLOR_STYLES = [
46
- "color",
47
- "fill",
48
- "fade",
49
- "image"
50
- ];
51
- const TEXT_STYLES = [
52
- "textTransform",
53
- "fontWeight",
54
- "fontStyle"
55
- ];
56
- const DIMENSION_STYLES = [
57
- "width",
58
- "height",
59
- "flexBasis",
60
- "flexGrow",
61
- "flexShrink",
62
- "flex"
63
- ];
64
- const FLOW_STYLES = [
65
- "flow",
66
- "place",
67
- "placeItems",
68
- "placeContent",
69
- "alignItems",
70
- "alignContent",
71
- "justifyItems",
72
- "justifyContent",
73
- "align",
74
- "justify",
75
- "gap",
76
- "columnGap",
77
- "rowGap",
78
- "gridColumns",
79
- "gridRows",
80
- "gridTemplate",
81
- "gridAreas"
82
- ];
83
- const CONTAINER_STYLES = [
84
- ...BASE_STYLES,
85
- ...COLOR_STYLES,
86
- ...DIMENSION_STYLES,
87
- ...POSITION_STYLES,
88
- ...BLOCK_STYLES,
89
- ...FLOW_STYLES
90
- ];
91
- const OUTER_STYLES = [
92
- ...POSITION_STYLES,
93
- ...DIMENSION_STYLES,
94
- ...BLOCK_OUTER_STYLES
95
- ];
96
- const INNER_STYLES = [
97
- ...BASE_STYLES,
98
- ...COLOR_STYLES,
99
- ...BLOCK_INNER_STYLES,
100
- ...FLOW_STYLES
101
- ];
102
- //#endregion
103
6
  //#region src/injector/chunk-sheet-registry.ts
104
7
  /**
105
8
  * Global registry mapping CSS content hashes to shared constructable
@@ -265,23 +168,42 @@ function fontFace(family, descriptors, options) {
265
168
  /**
266
169
  * Inject a CSS @counter-style rule.
267
170
  *
268
- * Permanent and global — no dispose or ref-counting.
269
- * Deduplicates by name (first definition wins).
171
+ * Permanent and global — no dispose or ref-counting. Deduplicates by name and
172
+ * overrides an existing rule by default. Pass `weak: true` for global
173
+ * `configure()` definitions, which never clobber an existing rule.
270
174
  */
271
175
  function counterStyle(name, descriptors, options) {
272
176
  return getGlobalInjector().counterStyle(name, descriptors, options);
273
177
  }
274
178
  /**
179
+ * Inject a CSS @function rule (custom function).
180
+ *
181
+ * Permanent and global — no dispose or ref-counting. Deduplicates by function
182
+ * name and overrides an existing rule by default. Pass `weak: true` for global
183
+ * `configure()` definitions, which never clobber an existing rule.
184
+ *
185
+ * @param name - The function name (`$$name`, `$name`, or `--name`)
186
+ * @param definition - Function definition (args, returns, result, local vars)
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * func('$$negative', { args: ['$value'], result: '(-1 * $value)' });
191
+ * ```
192
+ */
193
+ function func(name, definition, options) {
194
+ return getGlobalInjector().func(name, definition, options);
195
+ }
196
+ /**
275
197
  * Get CSS text from all sheets (for SSR)
276
198
  */
277
- function getCssText(options) {
278
- return getGlobalInjector().getCssText(options);
199
+ function getCSSText(options) {
200
+ return getGlobalInjector().getCSSText(options);
279
201
  }
280
202
  /**
281
203
  * Collect only CSS used by a rendered subtree (like jest-styled-components).
282
204
  * Pass the container returned by render(...).
283
205
  */
284
- function getCssTextForNode(node, options) {
206
+ function getCSSTextForNode(node, options) {
285
207
  const classRegex = tastyClassRegex(getNamePrefix());
286
208
  const classSet = /* @__PURE__ */ new Set();
287
209
  const readClasses = (el) => {
@@ -292,7 +214,7 @@ function getCssTextForNode(node, options) {
292
214
  if (node.getAttribute) readClasses(node);
293
215
  const elements = node.querySelectorAll ? node.querySelectorAll("[class]") : [];
294
216
  if (elements) elements.forEach(readClasses);
295
- return getGlobalInjector().getCssTextForClasses(classSet, options);
217
+ return getGlobalInjector().getCSSTextForClasses(classSet, options);
296
218
  }
297
219
  /**
298
220
  * Force cleanup of unused rules
@@ -320,12 +242,6 @@ function gc(options) {
320
242
  return getGlobalInjector().gc(options);
321
243
  }
322
244
  /**
323
- * Check if we're currently running in a test environment
324
- */
325
- function getIsTestEnvironment() {
326
- return isTestEnvironment();
327
- }
328
- /**
329
245
  * Get the global injector instance for debugging
330
246
  */
331
247
  const injector = { get instance() {
@@ -368,6 +284,7 @@ const getRSCCache = cache(() => ({
368
284
  emittedKeys: /* @__PURE__ */ new Set(),
369
285
  internalsEmitted: false,
370
286
  pendingCSS: [],
287
+ keyToIndex: /* @__PURE__ */ new Map(),
371
288
  generatedNames: /* @__PURE__ */ new Map()
372
289
  }));
373
290
  function rscAllocateClassName(rscCache, cacheKey) {
@@ -391,15 +308,28 @@ function flushPendingCSS(rscCache) {
391
308
  if (rscCache.pendingCSS.length === 0) return "";
392
309
  const css = rscCache.pendingCSS.join("\n");
393
310
  rscCache.pendingCSS.length = 0;
311
+ rscCache.keyToIndex.clear();
394
312
  return css;
395
313
  }
396
314
  /**
397
315
  * Push CSS into the RSC pending buffer with dedup via emittedKeys.
398
316
  * Returns true if the CSS was added, false if it was already emitted.
317
+ *
318
+ * Pass `replace` for slot-keyed entries (an explicit `id`), where the last write
319
+ * must win to match the client's update-tracking behavior. If the slot has
320
+ * already been flushed into a `<style>` tag the new CSS is appended instead,
321
+ * which still wins by cascade order.
399
322
  */
400
- function pushRSCCSS(rscCache, key, css) {
401
- if (rscCache.emittedKeys.has(key)) return false;
323
+ function pushRSCCSS(rscCache, key, css, replace) {
324
+ if (replace) {
325
+ const pendingIndex = rscCache.keyToIndex.get(key);
326
+ if (pendingIndex !== void 0) {
327
+ rscCache.pendingCSS[pendingIndex] = css;
328
+ return true;
329
+ }
330
+ } else if (rscCache.emittedKeys.has(key)) return false;
402
331
  rscCache.emittedKeys.add(key);
332
+ rscCache.keyToIndex.set(key, rscCache.pendingCSS.length);
403
333
  rscCache.pendingCSS.push(css);
404
334
  return true;
405
335
  }
@@ -429,7 +359,7 @@ function getStyleTarget() {
429
359
  function scanAndEmitAutoProperties(rules, styles, emit) {
430
360
  const registered = /* @__PURE__ */ new Set();
431
361
  if (styles) {
432
- const localProps = styles["@properties"];
362
+ const localProps = styles["@property"];
433
363
  if (localProps && typeof localProps === "object") for (const token of Object.keys(localProps)) {
434
364
  const parsed = parsePropertyToken(token);
435
365
  if (parsed.isValid) registered.add(parsed.cssName);
@@ -455,7 +385,7 @@ function scanAndEmitAutoProperties(rules, styles, emit) {
455
385
  *
456
386
  * @param rules - Rendered style rules containing CSS declarations
457
387
  * @param collector - SSR collector to emit @property CSS into
458
- * @param styles - Original styles object (used to skip explicit @properties)
388
+ * @param styles - Original styles object (used to skip explicit @property)
459
389
  */
460
390
  function collectAutoInferredProperties(rules, collector, styles) {
461
391
  scanAndEmitAutoProperties(rules, styles, (name, css) => {
@@ -626,6 +556,16 @@ function collectAncillaryRSC(rscCache, styles) {
626
556
  }
627
557
  }
628
558
  }
559
+ if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
560
+ const localFunctions = extractLocalFunctions(styles);
561
+ if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) {
562
+ const key = `__func:${parseFunctionName(name)}`;
563
+ if (!rscCache.emittedKeys.has(key)) {
564
+ rscCache.emittedKeys.add(key);
565
+ parts.push(formatFunctionRule(name, definition));
566
+ }
567
+ }
568
+ }
629
569
  return parts.join("\n");
630
570
  }
631
571
  /**
@@ -775,6 +715,10 @@ function injectAncillarySync(styles, root) {
775
715
  const localCounterStyle = extractLocalCounterStyle(styles);
776
716
  if (localCounterStyle) for (const [name, descriptors] of Object.entries(localCounterStyle)) counterStyle(name, descriptors, { root });
777
717
  }
718
+ if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
719
+ const localFunctions = extractLocalFunctions(styles);
720
+ if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) func(name, definition, { root });
721
+ }
778
722
  }
779
723
  /**
780
724
  * Collect all ancillary rules into the SSR collector.
@@ -810,6 +754,13 @@ function collectAncillarySSR(collector, styles, chunks) {
810
754
  collector.collectCounterStyle(name, css);
811
755
  }
812
756
  }
757
+ if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
758
+ const localFunctions = extractLocalFunctions(styles);
759
+ if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) {
760
+ const css = formatFunctionRule(name, definition);
761
+ collector.collectFunction(parseFunctionName(name), css);
762
+ }
763
+ }
813
764
  if (getConfig().autoPropertyTypes !== false) {
814
765
  const allRules = chunks.flatMap((c) => c.renderResult.rules);
815
766
  if (allRules.length > 0) collectAutoInferredProperties(allRules, collector, styles);
@@ -833,6 +784,7 @@ function collectAncillarySSR(collector, styles, chunks) {
833
784
  function computeStyles(styles, options) {
834
785
  if (!styles || !hasKeys(styles)) return EMPTY_RESULT;
835
786
  const resolved = resolveRecipes(styles);
787
+ if (isFunctionsPolyfillEnabled() && hasLocalFunctions(resolved)) registerLocalFunctionPolyfills(resolved);
836
788
  const chunkMap = categorizeStyleKeys(resolved);
837
789
  const collector = options?.ssrCollector !== void 0 ? options.ssrCollector : getRegisteredSSRCollector();
838
790
  const chunks = [];
@@ -1251,7 +1203,7 @@ function buildChunkBreakdown(root = document) {
1251
1203
  ruleCount: 0
1252
1204
  };
1253
1205
  byChunk[chunk].classes.push(className);
1254
- const css = injector.instance.getCssTextForClasses([className], { root });
1206
+ const css = injector.instance.getCSSTextForClasses([className], { root });
1255
1207
  byChunk[chunk].cssSize += css.length;
1256
1208
  byChunk[chunk].ruleCount += countRules(css);
1257
1209
  }
@@ -1370,33 +1322,33 @@ const tastyDebug = {
1370
1322
  if (src) css = src;
1371
1323
  else {
1372
1324
  if (!raw) console.warn("[Tasty] source CSS not available (requires dev mode or TASTY_DEBUG=true). Falling back to live CSSOM.");
1373
- css = injector.instance.getCssTextForClasses([target], { root });
1325
+ css = injector.instance.getCSSTextForClasses([target], { root });
1374
1326
  }
1375
1327
  } else if (source && Array.isArray(target)) {
1376
1328
  const src = getSourceCssForClasses(target, root);
1377
1329
  if (src) css = src;
1378
1330
  else {
1379
1331
  if (!raw) console.warn("[Tasty] source CSS not available. Falling back to live CSSOM.");
1380
- css = injector.instance.getCssTextForClasses(target, { root });
1332
+ css = injector.instance.getCSSTextForClasses(target, { root });
1381
1333
  }
1382
- } else if (typeof target === "string") if (target === "all") css = injector.instance.getCssText({ root });
1334
+ } else if (typeof target === "string") if (target === "all") css = injector.instance.getCSSText({ root });
1383
1335
  else if (target === "global") {
1384
1336
  css = getGlobalTypeCSS("global", root).css;
1385
1337
  return css;
1386
1338
  } else if (target === "active") {
1387
1339
  const active = findDomTastyClasses(root);
1388
- css = injector.instance.getCssTextForClasses(active, { root });
1340
+ css = injector.instance.getCSSTextForClasses(active, { root });
1389
1341
  } else if (target === "unused") {
1390
1342
  const unused = getUnusedClasses(root);
1391
- css = injector.instance.getCssTextForClasses(unused, { root });
1343
+ css = injector.instance.getCSSTextForClasses(unused, { root });
1392
1344
  } else if (target === "page") css = getPageCSS(root);
1393
- else if (classRegex.test(target)) css = injector.instance.getCssTextForClasses([target], { root });
1345
+ else if (classRegex.test(target)) css = injector.instance.getCSSTextForClasses([target], { root });
1394
1346
  else {
1395
1347
  const el = root.querySelector?.(target);
1396
- if (el) css = getCssTextForNode(el, { root });
1348
+ if (el) css = getCSSTextForNode(el, { root });
1397
1349
  }
1398
- else if (Array.isArray(target)) css = injector.instance.getCssTextForClasses(target, { root });
1399
- else if (target instanceof Element) css = getCssTextForNode(target, { root });
1350
+ else if (Array.isArray(target)) css = injector.instance.getCSSTextForClasses(target, { root });
1351
+ else if (target instanceof Element) css = getCSSTextForNode(target, { root });
1400
1352
  const result = prettify ? prettifyCSS(css) : css;
1401
1353
  if (!raw) {
1402
1354
  const label = Array.isArray(target) ? `[${target.join(", ")}]` : target;
@@ -1429,7 +1381,7 @@ const tastyDebug = {
1429
1381
  className,
1430
1382
  chunkName: getChunkForClass(className, root)
1431
1383
  }));
1432
- const css = getCssTextForNode(element, { root });
1384
+ const css = getCSSTextForNode(element, { root });
1433
1385
  const rules = countRules(css);
1434
1386
  const result = {
1435
1387
  element,
@@ -1456,9 +1408,9 @@ const tastyDebug = {
1456
1408
  const activeClasses = findDomTastyClasses(root);
1457
1409
  const unusedClasses = getUnusedClasses(root);
1458
1410
  const totalStyledClasses = [...activeClasses, ...unusedClasses];
1459
- const activeCSS = injector.instance.getCssTextForClasses(activeClasses, { root });
1460
- const unusedCSS = injector.instance.getCssTextForClasses(unusedClasses, { root });
1461
- const allCSS = injector.instance.getCssText({ root });
1411
+ const activeCSS = injector.instance.getCSSTextForClasses(activeClasses, { root });
1412
+ const unusedCSS = injector.instance.getCSSTextForClasses(unusedClasses, { root });
1413
+ const allCSS = injector.instance.getCSSText({ root });
1462
1414
  const activeRuleCount = countRules(activeCSS);
1463
1415
  const unusedRuleCount = countRules(unusedCSS);
1464
1416
  const globalData = getGlobalTypeCSS("global", root);
@@ -1593,6 +1545,6 @@ function getPageCSS(root = document) {
1593
1545
  }
1594
1546
  if (typeof window !== "undefined" && isDevEnv()) tastyDebug.install();
1595
1547
  //#endregion
1596
- export { property as A, DIMENSION_STYLES as B, getRawCSSText as C, injector as D, injectRawCSS as E, BLOCK_INNER_STYLES as F, TEXT_STYLES as G, INNER_STYLES as H, BLOCK_OUTER_STYLES as I, BLOCK_STYLES as L, ChunkSheetRegistry as M, chunkSheetRegistry as N, isPropertyDefined as O, BASE_STYLES as P, COLOR_STYLES as R, getIsTestEnvironment as S, injectGlobal as T, OUTER_STYLES as U, FLOW_STYLES as V, POSITION_STYLES as W, destroy as _, color as a, getCssText as b, hasKeys as c, collectAutoInferredPropertiesRSC as d, getStyleTarget as f, createInjector as g, counterStyle as h, _modAttrs as i, touch as j, keyframes as k, formatKeyframesCSS as l, cleanup as m, processTokens as n, filterBaseProps as o, pushRSCCSS as p, dotize as r, computeStyles as s, tastyDebug as t, collectAutoInferredProperties as u, fontFace as v, inject as w, getCssTextForNode as x, gc as y, CONTAINER_STYLES as z };
1548
+ export { property as A, getRawCSSText as C, injector as D, injectRawCSS as E, ChunkSheetRegistry as M, chunkSheetRegistry as N, isPropertyDefined as O, getCSSTextForNode as S, injectGlobal as T, destroy as _, color as a, gc as b, hasKeys as c, collectAutoInferredPropertiesRSC as d, getStyleTarget as f, createInjector as g, counterStyle as h, _modAttrs as i, touch as j, keyframes as k, formatKeyframesCSS as l, cleanup as m, processTokens as n, filterBaseProps as o, pushRSCCSS as p, dotize as r, computeStyles as s, tastyDebug as t, collectAutoInferredProperties as u, fontFace as v, inject as w, getCSSText as x, func as y };
1597
1549
 
1598
- //# sourceMappingURL=core-CS4bzqGu.js.map
1550
+ //# sourceMappingURL=core-B5d0IPi2.js.map