@tenphi/tasty 0.0.0-snapshot.8a8eb7d → 0.0.0-snapshot.8be165d
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.
- package/README.md +176 -131
- package/dist/astro-C_by9qPq.js +307 -0
- package/dist/astro-C_by9qPq.js.map +1 -0
- package/dist/{async-storage-B7_o6FKt.js → async-storage-DKK-wTD4.js} +1 -1
- package/dist/{async-storage-B7_o6FKt.js.map → async-storage-DKK-wTD4.js.map} +1 -1
- package/dist/babel-BUQGeOXA.d.ts +83 -0
- package/dist/{collector-o-UYCV-b.js → collector-BevHh16N.js} +108 -24
- package/dist/collector-BevHh16N.js.map +1 -0
- package/dist/{collector-CpU85p2G.d.ts → collector-CLVr5_p3.d.ts} +62 -7
- package/dist/{config-DOvjo65E.js → config-NcdqU9PC.js} +2812 -1496
- package/dist/config-NcdqU9PC.js.map +1 -0
- package/dist/{config-3h7BtX4l.d.ts → config-YsxGv4tq.d.ts} +351 -33
- package/dist/{context-CkSg-kDT.js → context-CA8YKeMn.js} +1 -1
- package/dist/{context-CkSg-kDT.js.map → context-CA8YKeMn.js.map} +1 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +6 -6
- package/dist/{core-CPx5Lqjr.js → core-D7s7u-k1.js} +150 -182
- package/dist/core-D7s7u-k1.js.map +1 -0
- package/dist/{css-writer-DJvsfR1w.js → css-writer-BDPmetHV.js} +54 -15
- package/dist/css-writer-BDPmetHV.js.map +1 -0
- package/dist/{format-global-rules-Dbc_1tc3.js → format-global-rules-DklyaXv-.js} +1 -1
- package/dist/{format-global-rules-Dbc_1tc3.js.map → format-global-rules-DklyaXv-.js.map} +1 -1
- package/dist/{format-rules-aRlqFAd1.js → format-rules-BQCn7JZH.js} +4 -17
- package/dist/format-rules-BQCn7JZH.js.map +1 -0
- package/dist/{hydrate-Ddw7yjyx.js → hydrate-C3cfqlaQ.js} +3 -11
- package/dist/{hydrate-Ddw7yjyx.js.map → hydrate-C3cfqlaQ.js.map} +1 -1
- package/dist/{index-C_SRmAWj.d.ts → index-CBK778ne.d.ts} +294 -161
- package/dist/{index-BsJz5xBF.d.ts → index-Cd45t5NM.d.ts} +297 -62
- package/dist/index.d.ts +5 -5
- package/dist/index.js +250 -60
- package/dist/index.js.map +1 -1
- package/dist/{keyframes-C4ObN2Vc.js → keyframes-ByhOtsXB.js} +97 -199
- package/dist/keyframes-ByhOtsXB.js.map +1 -0
- package/dist/{merge-styles-BbyWO2Gc.js → merge-styles-BKfagXfV.js} +2 -2
- package/dist/{merge-styles-BbyWO2Gc.js.map → merge-styles-BKfagXfV.js.map} +1 -1
- package/dist/{merge-styles-BzOwGOGC.d.ts → merge-styles-CU7JbEwg.d.ts} +2 -2
- package/dist/{resolve-recipes-CqTtBOKx.js → resolve-recipes-vvygrWLw.js} +3 -3
- package/dist/{resolve-recipes-CqTtBOKx.js.map → resolve-recipes-vvygrWLw.js.map} +1 -1
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro-client.js.map +1 -1
- package/dist/ssr/astro-middleware-extract-static.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract-static.js +9 -0
- package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
- package/dist/ssr/astro-middleware-extract.d.ts +11 -0
- package/dist/ssr/astro-middleware-extract.js +9 -0
- package/dist/ssr/astro-middleware-extract.js.map +1 -0
- package/dist/ssr/astro-middleware-static.d.ts +18 -0
- package/dist/ssr/astro-middleware-static.js +18 -0
- package/dist/ssr/astro-middleware-static.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +11 -7
- package/dist/ssr/astro-middleware.js +10 -10
- package/dist/ssr/astro-middleware.js.map +1 -1
- package/dist/ssr/astro.d.ts +37 -7
- package/dist/ssr/astro.js +2 -147
- package/dist/ssr/index.d.ts +2 -9
- package/dist/ssr/index.js +5 -5
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next.d.ts +2 -3
- package/dist/ssr/next.js +6 -7
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +2 -2
- package/dist/static/index.js +4 -4
- package/dist/static/index.js.map +1 -1
- package/dist/static/inject.js.map +1 -1
- package/dist/zero/babel.d.ts +2 -81
- package/dist/zero/babel.js +27 -23
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +16 -2
- package/dist/zero/index.js +2 -2
- package/dist/zero/next.d.ts +1 -1
- package/dist/zero/next.js +1 -1
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +17 -9
- package/docs/adoption.md +56 -31
- package/docs/ai-agents.md +224 -0
- package/docs/comparison.md +69 -40
- package/docs/configuration.md +470 -85
- package/docs/debug.md +7 -7
- package/docs/design-system.md +43 -24
- package/docs/dsl.md +407 -185
- package/docs/getting-started.md +60 -39
- package/docs/injector.md +58 -5
- package/docs/methodology.md +44 -38
- package/docs/migration-v3.md +285 -0
- package/docs/pipeline.md +4 -7
- package/docs/plugins.md +353 -0
- package/docs/react-api.md +142 -42
- package/docs/runtime-benchmarks.md +216 -0
- package/docs/ssr.md +132 -86
- package/docs/styles.md +56 -9
- package/docs/tasty-static.md +140 -105
- package/package.json +50 -18
- package/tasty.config.ts +4 -0
- package/dist/collector-o-UYCV-b.js.map +0 -1
- package/dist/config-DOvjo65E.js.map +0 -1
- package/dist/core-CPx5Lqjr.js.map +0 -1
- package/dist/css-writer-DJvsfR1w.js.map +0 -1
- package/dist/format-rules-aRlqFAd1.js.map +0 -1
- package/dist/keyframes-C4ObN2Vc.js.map +0 -1
- package/dist/ssr/astro.js.map +0 -1
package/dist/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { _ as
|
|
3
|
-
import {
|
|
4
|
-
import { t as mergeStyles } from "../merge-styles-
|
|
5
|
-
import { t as resolveRecipes } from "../resolve-recipes-
|
|
6
|
-
export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES,
|
|
1
|
+
import { $ as SheetManager, $t as StyleParser, A as FLOW_STYLES, At as STYLE_TO_CHUNK, B as createStateParserContext, C as BASE_STYLES, Ct as APPEARANCE_CHUNK_STYLES, D as COLOR_STYLES, Dt as FONT_CHUNK_STYLES, E as BLOCK_STYLES, Et as DISPLAY_CHUNK_STYLES, G as StyleInjector, Gt as parseStyle, Ht as getGlobalPredefinedTokens, I as isSelector, Jt as okhstPlugin, Kt as stringifyStyles, L as renderStyles, Lt as CUSTOM_UNITS, M as OUTER_STYLES, N as POSITION_STYLES, O as CONTAINER_STYLES, Ot as LAYOUT_CHUNK_STYLES, P as TEXT_STYLES, R as parseStateKey, Rt as DIRECTIONS, T as BLOCK_OUTER_STYLES, Tt as DIMENSION_CHUNK_STYLES, U as getGlobalPredefinedStates, Ut as normalizeColorTokenValue, Vt as getGlobalParser, W as setGlobalPredefinedStates, Wt as parseColor, Xt as okhslPlugin, Yt as okhslFunction, Zt as createColorFunc, a as getGlobalCounterStyles, an as hslToRgbValues, b as resetConfig, dt as DEFAULT_ZERO_NAME_PREFIX, f as getNamePrefix, g as isConfigLocked, h as hasStylesGenerated, in as hexToRgb, j as INNER_STYLES, k as DIMENSION_STYLES, kt as POSITION_CHUNK_STYLES, l as getGlobalKeyframes, lt as resetStyleBatch, m as hasGlobalRecipes, n as getConfig, nn as getNamedColorHex, nt as styleHandlers, o as getGlobalFontFaces, on as strToRgb, ot as flushStyles, p as hasGlobalKeyframes, qt as okhstFunction, rn as getRgbValuesFromRgbaString, s as getGlobalFunctions, st as hasPendingStyleWrites, t as configure, tt as defineHandler, u as getGlobalRecipes, ut as DEFAULT_NAME_PREFIX, v as isTestEnvironment, w as BLOCK_INNER_STYLES, wt as CHUNK_NAMES, x as generateTypographyTokens, zt as filterMods } from "../config-NcdqU9PC.js";
|
|
2
|
+
import { A as property, C as getRawCSSText, D as injector, E as injectRawCSS, M as ChunkSheetRegistry, N as chunkSheetRegistry, O as isPropertyDefined, P as resolveFunctionColor, S as getCSSTextForNode, T as injectGlobal, _ as destroy, a as color, b as gc, g as createInjector, h as counterStyle, i as _modAttrs, j as touch, k as keyframes, m as cleanup, n as processTokens, o as filterBaseProps, r as dotize, s as computeStyles, t as tastyDebug, v as fontFace, w as inject, x as getCSSText, y as func } from "../core-D7s7u-k1.js";
|
|
3
|
+
import { l as categorizeStyleKeys } from "../keyframes-ByhOtsXB.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-BKfagXfV.js";
|
|
5
|
+
import { t as resolveRecipes } from "../resolve-recipes-vvygrWLw.js";
|
|
6
|
+
export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, FLOW_STYLES, FONT_CHUNK_STYLES, INNER_STYLES, LAYOUT_CHUNK_STYLES, OUTER_STYLES, POSITION_CHUNK_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, dotize, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
|
|
@@ -1,104 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as formatPropertyCSS, r as getRegisteredSSRCollector, t as formatRules } from "./format-rules-
|
|
4
|
-
import { t as resolveRecipes } from "./resolve-recipes-
|
|
1
|
+
import { Bt as getGlobalParseFunctions, G as StyleInjector, Gt as parseStyle, It as registerLocalFunctionPolyfills, J as hasLocalCounterStyle, K as extractLocalCounterStyle, Mt as formatFunctionRule, Nt as hasLocalFunctions, Pt as parseFunctionName, Q as hasLocalFontFace, Qt as isDevEnv, Ut as normalizeColorTokenValue, Vt as getGlobalParser, X as fontFaceContentHash, Y as extractLocalFontFace, Z as formatFontFaceRule, _ as isFunctionsPolyfillEnabled, _t as hashString, bt as hasLocalProperties, c as getGlobalInjector, en as Lru, et as STYLE_HANDLER_MAP, f as getNamePrefix, ft as makeClassName, ht as tastyClassRegex, it as PropertyTypeResolver, jt as extractLocalFunctions, l as getGlobalKeyframes, n as getConfig, p as hasGlobalKeyframes, q as formatCounterStyleRule, rt as createStyle, sn as normalizeDslName, tn as overrideColorAlpha, v as isTestEnvironment, vt as extractLocalProperties, wt as CHUNK_NAMES, xt as parsePropertyToken, y as markStylesGenerated, z as camelToKebab } from "./config-NcdqU9PC.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-ByhOtsXB.js";
|
|
3
|
+
import { n as formatPropertyCSS, r as getRegisteredSSRCollector, t as formatRules } from "./format-rules-BQCn7JZH.js";
|
|
4
|
+
import { t as resolveRecipes } from "./resolve-recipes-vvygrWLw.js";
|
|
5
5
|
import { cache } from "react";
|
|
6
|
-
//#region src/
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
];
|
|
6
|
+
//#region src/utils/function-color.ts
|
|
7
|
+
const RE_FUNC_NAME = /^([a-z][a-z0-9-]*)\s*\(/i;
|
|
8
|
+
const RE_COLOR_OUT = /^(?:rgb|hsl|hwb|lab|lch|oklab|oklch|color)\(|^#|^var\(--/i;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a `name(...)` value produced by a registered custom parse function
|
|
11
|
+
* into its concrete color output.
|
|
12
|
+
*
|
|
13
|
+
* A color function is just a `functions` entry whose output is an already
|
|
14
|
+
* supported color (`rgb`, `hsl`, `#…`, `oklch`, …). This helper delegates the
|
|
15
|
+
* value to the global parser (which already runs the registered parse function)
|
|
16
|
+
* and returns the result only when it looks like a color. Returns `null` when
|
|
17
|
+
* `str` is not a registered custom function or its output is not a color.
|
|
18
|
+
*
|
|
19
|
+
* This is the generic replacement for the previously hardcoded okhsl/okhst
|
|
20
|
+
* conversion branches scattered across `strToRgb`, `resolveToRgbaValues`, and
|
|
21
|
+
* the `#token.alpha` injection path.
|
|
22
|
+
*/
|
|
23
|
+
function resolveFunctionColor(str) {
|
|
24
|
+
const m = RE_FUNC_NAME.exec(str);
|
|
25
|
+
if (!m) return null;
|
|
26
|
+
const name = m[1].toLowerCase();
|
|
27
|
+
getGlobalParser();
|
|
28
|
+
if (!(name in getGlobalParseFunctions())) return null;
|
|
29
|
+
const out = getGlobalParser().process(str).output;
|
|
30
|
+
if (!out || !RE_COLOR_OUT.test(out)) return null;
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
102
33
|
//#endregion
|
|
103
34
|
//#region src/injector/chunk-sheet-registry.ts
|
|
104
35
|
/**
|
|
@@ -265,23 +196,42 @@ function fontFace(family, descriptors, options) {
|
|
|
265
196
|
/**
|
|
266
197
|
* Inject a CSS @counter-style rule.
|
|
267
198
|
*
|
|
268
|
-
* Permanent and global — no dispose or ref-counting.
|
|
269
|
-
*
|
|
199
|
+
* Permanent and global — no dispose or ref-counting. Deduplicates by name and
|
|
200
|
+
* overrides an existing rule by default. Pass `weak: true` for global
|
|
201
|
+
* `configure()` definitions, which never clobber an existing rule.
|
|
270
202
|
*/
|
|
271
203
|
function counterStyle(name, descriptors, options) {
|
|
272
204
|
return getGlobalInjector().counterStyle(name, descriptors, options);
|
|
273
205
|
}
|
|
274
206
|
/**
|
|
207
|
+
* Inject a CSS @function rule (custom function).
|
|
208
|
+
*
|
|
209
|
+
* Permanent and global — no dispose or ref-counting. Deduplicates by function
|
|
210
|
+
* name and overrides an existing rule by default. Pass `weak: true` for global
|
|
211
|
+
* `configure()` definitions, which never clobber an existing rule.
|
|
212
|
+
*
|
|
213
|
+
* @param name - The function name (`$$name`, `$name`, or `--name`)
|
|
214
|
+
* @param definition - Function definition (args, returns, result, local vars)
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* func('$$negative', { args: ['$value'], result: '(-1 * $value)' });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
function func(name, definition, options) {
|
|
222
|
+
return getGlobalInjector().func(name, definition, options);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
275
225
|
* Get CSS text from all sheets (for SSR)
|
|
276
226
|
*/
|
|
277
|
-
function
|
|
278
|
-
return getGlobalInjector().
|
|
227
|
+
function getCSSText(options) {
|
|
228
|
+
return getGlobalInjector().getCSSText(options);
|
|
279
229
|
}
|
|
280
230
|
/**
|
|
281
231
|
* Collect only CSS used by a rendered subtree (like jest-styled-components).
|
|
282
232
|
* Pass the container returned by render(...).
|
|
283
233
|
*/
|
|
284
|
-
function
|
|
234
|
+
function getCSSTextForNode(node, options) {
|
|
285
235
|
const classRegex = tastyClassRegex(getNamePrefix());
|
|
286
236
|
const classSet = /* @__PURE__ */ new Set();
|
|
287
237
|
const readClasses = (el) => {
|
|
@@ -292,7 +242,7 @@ function getCssTextForNode(node, options) {
|
|
|
292
242
|
if (node.getAttribute) readClasses(node);
|
|
293
243
|
const elements = node.querySelectorAll ? node.querySelectorAll("[class]") : [];
|
|
294
244
|
if (elements) elements.forEach(readClasses);
|
|
295
|
-
return getGlobalInjector().
|
|
245
|
+
return getGlobalInjector().getCSSTextForClasses(classSet, options);
|
|
296
246
|
}
|
|
297
247
|
/**
|
|
298
248
|
* Force cleanup of unused rules
|
|
@@ -320,12 +270,6 @@ function gc(options) {
|
|
|
320
270
|
return getGlobalInjector().gc(options);
|
|
321
271
|
}
|
|
322
272
|
/**
|
|
323
|
-
* Check if we're currently running in a test environment
|
|
324
|
-
*/
|
|
325
|
-
function getIsTestEnvironment() {
|
|
326
|
-
return isTestEnvironment();
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
273
|
* Get the global injector instance for debugging
|
|
330
274
|
*/
|
|
331
275
|
const injector = { get instance() {
|
|
@@ -368,6 +312,7 @@ const getRSCCache = cache(() => ({
|
|
|
368
312
|
emittedKeys: /* @__PURE__ */ new Set(),
|
|
369
313
|
internalsEmitted: false,
|
|
370
314
|
pendingCSS: [],
|
|
315
|
+
keyToIndex: /* @__PURE__ */ new Map(),
|
|
371
316
|
generatedNames: /* @__PURE__ */ new Map()
|
|
372
317
|
}));
|
|
373
318
|
function rscAllocateClassName(rscCache, cacheKey) {
|
|
@@ -391,15 +336,28 @@ function flushPendingCSS(rscCache) {
|
|
|
391
336
|
if (rscCache.pendingCSS.length === 0) return "";
|
|
392
337
|
const css = rscCache.pendingCSS.join("\n");
|
|
393
338
|
rscCache.pendingCSS.length = 0;
|
|
339
|
+
rscCache.keyToIndex.clear();
|
|
394
340
|
return css;
|
|
395
341
|
}
|
|
396
342
|
/**
|
|
397
343
|
* Push CSS into the RSC pending buffer with dedup via emittedKeys.
|
|
398
344
|
* Returns true if the CSS was added, false if it was already emitted.
|
|
345
|
+
*
|
|
346
|
+
* Pass `replace` for slot-keyed entries (an explicit `id`), where the last write
|
|
347
|
+
* must win to match the client's update-tracking behavior. If the slot has
|
|
348
|
+
* already been flushed into a `<style>` tag the new CSS is appended instead,
|
|
349
|
+
* which still wins by cascade order.
|
|
399
350
|
*/
|
|
400
|
-
function pushRSCCSS(rscCache, key, css) {
|
|
401
|
-
if (
|
|
351
|
+
function pushRSCCSS(rscCache, key, css, replace) {
|
|
352
|
+
if (replace) {
|
|
353
|
+
const pendingIndex = rscCache.keyToIndex.get(key);
|
|
354
|
+
if (pendingIndex !== void 0) {
|
|
355
|
+
rscCache.pendingCSS[pendingIndex] = css;
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
} else if (rscCache.emittedKeys.has(key)) return false;
|
|
402
359
|
rscCache.emittedKeys.add(key);
|
|
360
|
+
rscCache.keyToIndex.set(key, rscCache.pendingCSS.length);
|
|
403
361
|
rscCache.pendingCSS.push(css);
|
|
404
362
|
return true;
|
|
405
363
|
}
|
|
@@ -429,7 +387,7 @@ function getStyleTarget() {
|
|
|
429
387
|
function scanAndEmitAutoProperties(rules, styles, emit) {
|
|
430
388
|
const registered = /* @__PURE__ */ new Set();
|
|
431
389
|
if (styles) {
|
|
432
|
-
const localProps = styles["@
|
|
390
|
+
const localProps = styles["@property"];
|
|
433
391
|
if (localProps && typeof localProps === "object") for (const token of Object.keys(localProps)) {
|
|
434
392
|
const parsed = parsePropertyToken(token);
|
|
435
393
|
if (parsed.isValid) registered.add(parsed.cssName);
|
|
@@ -455,7 +413,7 @@ function scanAndEmitAutoProperties(rules, styles, emit) {
|
|
|
455
413
|
*
|
|
456
414
|
* @param rules - Rendered style rules containing CSS declarations
|
|
457
415
|
* @param collector - SSR collector to emit @property CSS into
|
|
458
|
-
* @param styles - Original styles object (used to skip explicit @
|
|
416
|
+
* @param styles - Original styles object (used to skip explicit @property)
|
|
459
417
|
*/
|
|
460
418
|
function collectAutoInferredProperties(rules, collector, styles) {
|
|
461
419
|
scanAndEmitAutoProperties(rules, styles, (name, css) => {
|
|
@@ -626,13 +584,23 @@ function collectAncillaryRSC(rscCache, styles) {
|
|
|
626
584
|
}
|
|
627
585
|
}
|
|
628
586
|
}
|
|
587
|
+
if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
|
|
588
|
+
const localFunctions = extractLocalFunctions(styles);
|
|
589
|
+
if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) {
|
|
590
|
+
const key = `__func:${parseFunctionName(name)}`;
|
|
591
|
+
if (!rscCache.emittedKeys.has(key)) {
|
|
592
|
+
rscCache.emittedKeys.add(key);
|
|
593
|
+
parts.push(formatFunctionRule(name, definition));
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
629
597
|
return parts.join("\n");
|
|
630
598
|
}
|
|
631
599
|
/**
|
|
632
600
|
* Process all chunks in RSC mode: render CSS to strings, allocate classNames,
|
|
633
601
|
* and return combined { className, css }.
|
|
634
602
|
*/
|
|
635
|
-
function computeStylesRSC(styles, chunkMap) {
|
|
603
|
+
function computeStylesRSC(styles, chunkMap, stableStyles) {
|
|
636
604
|
const rscCache = getRSCCache();
|
|
637
605
|
const cssParts = [];
|
|
638
606
|
const classNames = [];
|
|
@@ -642,7 +610,7 @@ function computeStylesRSC(styles, chunkMap) {
|
|
|
642
610
|
if (internalsCSS) cssParts.push(internalsCSS);
|
|
643
611
|
for (const [chunkName, chunkStyleKeys] of chunkMap) {
|
|
644
612
|
if (chunkStyleKeys.length === 0) continue;
|
|
645
|
-
const { className, isNew } = rscAllocateClassName(rscCache, generateChunkCacheKey(styles, chunkName, chunkStyleKeys));
|
|
613
|
+
const { className, isNew } = rscAllocateClassName(rscCache, generateChunkCacheKey(styles, chunkName, chunkStyleKeys, stableStyles));
|
|
646
614
|
classNames.push(className);
|
|
647
615
|
if (isNew) {
|
|
648
616
|
const renderResult = renderStylesForChunk(styles, chunkName, chunkStyleKeys);
|
|
@@ -676,9 +644,9 @@ function getUsedKeyframes(styles) {
|
|
|
676
644
|
/**
|
|
677
645
|
* Process a chunk on the SSR path: allocate via collector, render, collect CSS.
|
|
678
646
|
*/
|
|
679
|
-
function processChunkSSR(collector, styles, chunkName, styleKeys) {
|
|
647
|
+
function processChunkSSR(collector, styles, chunkName, styleKeys, stableStyles) {
|
|
680
648
|
if (styleKeys.length === 0) return null;
|
|
681
|
-
const cacheKey = generateChunkCacheKey(styles, chunkName, styleKeys);
|
|
649
|
+
const cacheKey = generateChunkCacheKey(styles, chunkName, styleKeys, stableStyles);
|
|
682
650
|
const { className, isNewAllocation } = collector.allocateClassName(cacheKey);
|
|
683
651
|
if (isNewAllocation) {
|
|
684
652
|
const renderResult = renderStylesForChunk(styles, chunkName, styleKeys);
|
|
@@ -706,9 +674,9 @@ function processChunkSSR(collector, styles, chunkName, styleKeys) {
|
|
|
706
674
|
* Process a chunk on the client: render, allocate className, and inject
|
|
707
675
|
* CSS synchronously. The injector's cache makes this idempotent.
|
|
708
676
|
*/
|
|
709
|
-
function processChunkSync(styles, chunkName, styleKeys, root) {
|
|
677
|
+
function processChunkSync(styles, chunkName, styleKeys, stableStyles, root) {
|
|
710
678
|
if (styleKeys.length === 0) return null;
|
|
711
|
-
const cacheKey = generateChunkCacheKey(styles, chunkName, styleKeys);
|
|
679
|
+
const cacheKey = generateChunkCacheKey(styles, chunkName, styleKeys, stableStyles);
|
|
712
680
|
const renderResult = renderStylesForChunk(styles, chunkName, styleKeys, cacheKey);
|
|
713
681
|
if (renderResult.rules.length === 0) return null;
|
|
714
682
|
const { className } = inject(renderResult.rules, {
|
|
@@ -775,6 +743,10 @@ function injectAncillarySync(styles, root) {
|
|
|
775
743
|
const localCounterStyle = extractLocalCounterStyle(styles);
|
|
776
744
|
if (localCounterStyle) for (const [name, descriptors] of Object.entries(localCounterStyle)) counterStyle(name, descriptors, { root });
|
|
777
745
|
}
|
|
746
|
+
if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
|
|
747
|
+
const localFunctions = extractLocalFunctions(styles);
|
|
748
|
+
if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) func(name, definition, { root });
|
|
749
|
+
}
|
|
778
750
|
}
|
|
779
751
|
/**
|
|
780
752
|
* Collect all ancillary rules into the SSR collector.
|
|
@@ -810,6 +782,13 @@ function collectAncillarySSR(collector, styles, chunks) {
|
|
|
810
782
|
collector.collectCounterStyle(name, css);
|
|
811
783
|
}
|
|
812
784
|
}
|
|
785
|
+
if (!isFunctionsPolyfillEnabled() && hasLocalFunctions(styles)) {
|
|
786
|
+
const localFunctions = extractLocalFunctions(styles);
|
|
787
|
+
if (localFunctions) for (const [name, definition] of Object.entries(localFunctions)) {
|
|
788
|
+
const css = formatFunctionRule(name, definition);
|
|
789
|
+
collector.collectFunction(parseFunctionName(name), css);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
813
792
|
if (getConfig().autoPropertyTypes !== false) {
|
|
814
793
|
const allRules = chunks.flatMap((c) => c.renderResult.rules);
|
|
815
794
|
if (allRules.length > 0) collectAutoInferredProperties(allRules, collector, styles);
|
|
@@ -833,24 +812,26 @@ function collectAncillarySSR(collector, styles, chunks) {
|
|
|
833
812
|
function computeStyles(styles, options) {
|
|
834
813
|
if (!styles || !hasKeys(styles)) return EMPTY_RESULT;
|
|
835
814
|
const resolved = resolveRecipes(styles);
|
|
815
|
+
const stableStyles = options?.stableStyles === true && resolved === styles;
|
|
816
|
+
if (isFunctionsPolyfillEnabled() && hasLocalFunctions(resolved)) registerLocalFunctionPolyfills(resolved);
|
|
836
817
|
const chunkMap = categorizeStyleKeys(resolved);
|
|
837
818
|
const collector = options?.ssrCollector !== void 0 ? options.ssrCollector : getRegisteredSSRCollector();
|
|
838
819
|
const chunks = [];
|
|
839
820
|
if (collector) {
|
|
840
821
|
collector.collectInternals();
|
|
841
822
|
for (const [chunkName, chunkStyleKeys] of chunkMap) {
|
|
842
|
-
const chunk = processChunkSSR(collector, resolved, chunkName, chunkStyleKeys);
|
|
823
|
+
const chunk = processChunkSSR(collector, resolved, chunkName, chunkStyleKeys, stableStyles);
|
|
843
824
|
if (chunk) chunks.push(chunk);
|
|
844
825
|
}
|
|
845
826
|
collectAncillarySSR(collector, resolved, chunks);
|
|
846
|
-
} else if (typeof document === "undefined") return computeStylesRSC(resolved, chunkMap);
|
|
827
|
+
} else if (typeof document === "undefined") return computeStylesRSC(resolved, chunkMap, stableStyles);
|
|
847
828
|
else {
|
|
848
829
|
const root = options?.root;
|
|
849
830
|
injectAncillarySync(resolved, root);
|
|
850
831
|
const usedKf = getUsedKeyframes(resolved);
|
|
851
832
|
const nameMap = usedKf ? injectKeyframesSync(usedKf, root) : null;
|
|
852
833
|
for (const [chunkName, chunkStyleKeys] of chunkMap) {
|
|
853
|
-
const chunk = processChunkSync(resolved, chunkName, chunkStyleKeys, root);
|
|
834
|
+
const chunk = processChunkSync(resolved, chunkName, chunkStyleKeys, stableStyles, root);
|
|
854
835
|
if (chunk) chunks.push(chunk);
|
|
855
836
|
}
|
|
856
837
|
if (nameMap) injectChunkRulesSync(chunks, nameMap, root);
|
|
@@ -905,7 +886,7 @@ function filterBaseProps(props, opts = {}) {
|
|
|
905
886
|
//#endregion
|
|
906
887
|
//#region src/utils/colors.ts
|
|
907
888
|
function color(name, opacity = 1) {
|
|
908
|
-
if (opacity !== 1) return
|
|
889
|
+
if (opacity !== 1) return overrideColorAlpha(`var(--${name}-color)`, String(opacity));
|
|
909
890
|
return `var(--${name}-color)`;
|
|
910
891
|
}
|
|
911
892
|
//#endregion
|
|
@@ -935,7 +916,7 @@ function modAttrs(map) {
|
|
|
935
916
|
if (value === true) attrs[attrName] = "";
|
|
936
917
|
else if (typeof value === "string") attrs[attrName] = value;
|
|
937
918
|
else if (typeof value === "number") attrs[attrName] = String(value);
|
|
938
|
-
else console.warn(`Tasty
|
|
919
|
+
else console.warn(`[Tasty] Invalid mod value for "${key}". Expected boolean, string, or number, got ${typeof value}`);
|
|
939
920
|
return attrs;
|
|
940
921
|
}, {}) : null;
|
|
941
922
|
}
|
|
@@ -1062,28 +1043,13 @@ const dotize = {
|
|
|
1062
1043
|
//#endregion
|
|
1063
1044
|
//#region src/utils/process-tokens.ts
|
|
1064
1045
|
/**
|
|
1065
|
-
* Extract color components in the configured color space.
|
|
1066
|
-
* Returns a CSS variable reference for token colors, or decomposed
|
|
1067
|
-
* components as a space-separated string.
|
|
1068
|
-
*/
|
|
1069
|
-
function extractColorSpaceValue(colorValue, parsedOutput) {
|
|
1070
|
-
const suffix = getColorSpaceSuffix();
|
|
1071
|
-
const varMatch = parsedOutput.match(/var\(--([a-z0-9-]+)-color\)/);
|
|
1072
|
-
if (varMatch) return `var(--${varMatch[1]}-color-${suffix})`;
|
|
1073
|
-
const componentsFromParsed = getColorSpaceComponents(parsedOutput);
|
|
1074
|
-
if (componentsFromParsed !== parsedOutput) return componentsFromParsed;
|
|
1075
|
-
const components = getColorSpaceComponents(colorValue);
|
|
1076
|
-
if (components !== colorValue) return components;
|
|
1077
|
-
return parsedOutput;
|
|
1078
|
-
}
|
|
1079
|
-
/**
|
|
1080
1046
|
* Check if a value is a valid token value (string, number, or boolean - not object).
|
|
1081
1047
|
* Returns false for `false` values (they mean "skip this token").
|
|
1082
1048
|
*/
|
|
1083
1049
|
function isValidTokenValue(value) {
|
|
1084
1050
|
if (value === void 0 || value === null || value === false) return false;
|
|
1085
1051
|
if (typeof value === "object") {
|
|
1086
|
-
console.warn("Tasty
|
|
1052
|
+
console.warn("[Tasty] Object values are not allowed in tokens prop. Tokens do not support state-based styling. Use a primitive value instead.");
|
|
1087
1053
|
return false;
|
|
1088
1054
|
}
|
|
1089
1055
|
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
@@ -1100,9 +1066,24 @@ function processTokenValue(value) {
|
|
|
1100
1066
|
return parseStyle(value).output;
|
|
1101
1067
|
}
|
|
1102
1068
|
/**
|
|
1069
|
+
* Resolve one `$name` / `#name` entry to the custom property it declares and
|
|
1070
|
+
* the value to declare, or `null` when the entry declares nothing.
|
|
1071
|
+
*
|
|
1072
|
+
* The two sigils differ only in the property name they build and in how `true`
|
|
1073
|
+
* is read: for a custom property it is the empty value, for a color it is
|
|
1074
|
+
* `transparent`.
|
|
1075
|
+
*/
|
|
1076
|
+
function resolveTokenEntry(key, value) {
|
|
1077
|
+
const name = `--${normalizeDslName(key.slice(1))}`;
|
|
1078
|
+
if (key[0] === "$") return [name, processTokenValue(value === true ? "" : value)];
|
|
1079
|
+
const colorValue = normalizeColorTokenValue(value);
|
|
1080
|
+
if (colorValue === null) return null;
|
|
1081
|
+
return [`${name}-color`, processTokenValue(colorValue)];
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1103
1084
|
* Process tokens object into inline style properties.
|
|
1104
|
-
* -
|
|
1105
|
-
* -
|
|
1085
|
+
* - `$name` -> `--name` with the parsed value
|
|
1086
|
+
* - `#name` -> `--name-color` with the parsed value
|
|
1106
1087
|
*
|
|
1107
1088
|
* @param tokens - The tokens object to process
|
|
1108
1089
|
* @returns CSSProperties object or undefined if no tokens to process
|
|
@@ -1115,24 +1096,11 @@ function processTokens(tokens) {
|
|
|
1115
1096
|
for (const key of keys) {
|
|
1116
1097
|
const value = tokens[key];
|
|
1117
1098
|
if (!isValidTokenValue(value)) continue;
|
|
1118
|
-
if (key
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
} else if (key.startsWith("#")) {
|
|
1124
|
-
const colorName = key.slice(1);
|
|
1125
|
-
const suffix = getColorSpaceSuffix();
|
|
1126
|
-
const effectiveValue = normalizeColorTokenValue(value);
|
|
1127
|
-
if (effectiveValue === null) continue;
|
|
1128
|
-
const originalValue = typeof effectiveValue === "number" ? String(effectiveValue) : effectiveValue;
|
|
1129
|
-
const lowerValue = originalValue.toLowerCase();
|
|
1130
|
-
const processedValue = processTokenValue(effectiveValue);
|
|
1131
|
-
if (!result) result = {};
|
|
1132
|
-
result[`--${colorName}-color`] = processedValue;
|
|
1133
|
-
if (/^#current(?:\.|$)/i.test(lowerValue)) continue;
|
|
1134
|
-
result[`--${colorName}-color-${suffix}`] = extractColorSpaceValue(originalValue, processedValue);
|
|
1135
|
-
}
|
|
1099
|
+
if (key[0] !== "$" && key[0] !== "#") continue;
|
|
1100
|
+
const entry = resolveTokenEntry(key, value);
|
|
1101
|
+
if (!entry) continue;
|
|
1102
|
+
if (!result) result = {};
|
|
1103
|
+
result[entry[0]] = entry[1];
|
|
1136
1104
|
}
|
|
1137
1105
|
return result;
|
|
1138
1106
|
}
|
|
@@ -1251,7 +1219,7 @@ function buildChunkBreakdown(root = document) {
|
|
|
1251
1219
|
ruleCount: 0
|
|
1252
1220
|
};
|
|
1253
1221
|
byChunk[chunk].classes.push(className);
|
|
1254
|
-
const css = injector.instance.
|
|
1222
|
+
const css = injector.instance.getCSSTextForClasses([className], { root });
|
|
1255
1223
|
byChunk[chunk].cssSize += css.length;
|
|
1256
1224
|
byChunk[chunk].ruleCount += countRules(css);
|
|
1257
1225
|
}
|
|
@@ -1369,34 +1337,34 @@ const tastyDebug = {
|
|
|
1369
1337
|
const src = getSourceCssForClasses([target], root);
|
|
1370
1338
|
if (src) css = src;
|
|
1371
1339
|
else {
|
|
1372
|
-
if (!raw) console.warn("
|
|
1373
|
-
css = injector.instance.
|
|
1340
|
+
if (!raw) console.warn("[Tasty] source CSS not available (requires dev mode or TASTY_DEBUG=true). Falling back to live CSSOM.");
|
|
1341
|
+
css = injector.instance.getCSSTextForClasses([target], { root });
|
|
1374
1342
|
}
|
|
1375
1343
|
} else if (source && Array.isArray(target)) {
|
|
1376
1344
|
const src = getSourceCssForClasses(target, root);
|
|
1377
1345
|
if (src) css = src;
|
|
1378
1346
|
else {
|
|
1379
|
-
if (!raw) console.warn("
|
|
1380
|
-
css = injector.instance.
|
|
1347
|
+
if (!raw) console.warn("[Tasty] source CSS not available. Falling back to live CSSOM.");
|
|
1348
|
+
css = injector.instance.getCSSTextForClasses(target, { root });
|
|
1381
1349
|
}
|
|
1382
|
-
} else if (typeof target === "string") if (target === "all") css = injector.instance.
|
|
1350
|
+
} else if (typeof target === "string") if (target === "all") css = injector.instance.getCSSText({ root });
|
|
1383
1351
|
else if (target === "global") {
|
|
1384
1352
|
css = getGlobalTypeCSS("global", root).css;
|
|
1385
1353
|
return css;
|
|
1386
1354
|
} else if (target === "active") {
|
|
1387
1355
|
const active = findDomTastyClasses(root);
|
|
1388
|
-
css = injector.instance.
|
|
1356
|
+
css = injector.instance.getCSSTextForClasses(active, { root });
|
|
1389
1357
|
} else if (target === "unused") {
|
|
1390
1358
|
const unused = getUnusedClasses(root);
|
|
1391
|
-
css = injector.instance.
|
|
1359
|
+
css = injector.instance.getCSSTextForClasses(unused, { root });
|
|
1392
1360
|
} else if (target === "page") css = getPageCSS(root);
|
|
1393
|
-
else if (classRegex.test(target)) css = injector.instance.
|
|
1361
|
+
else if (classRegex.test(target)) css = injector.instance.getCSSTextForClasses([target], { root });
|
|
1394
1362
|
else {
|
|
1395
1363
|
const el = root.querySelector?.(target);
|
|
1396
|
-
if (el) css =
|
|
1364
|
+
if (el) css = getCSSTextForNode(el, { root });
|
|
1397
1365
|
}
|
|
1398
|
-
else if (Array.isArray(target)) css = injector.instance.
|
|
1399
|
-
else if (target instanceof Element) css =
|
|
1366
|
+
else if (Array.isArray(target)) css = injector.instance.getCSSTextForClasses(target, { root });
|
|
1367
|
+
else if (target instanceof Element) css = getCSSTextForNode(target, { root });
|
|
1400
1368
|
const result = prettify ? prettifyCSS(css) : css;
|
|
1401
1369
|
if (!raw) {
|
|
1402
1370
|
const label = Array.isArray(target) ? `[${target.join(", ")}]` : target;
|
|
@@ -1419,7 +1387,7 @@ const tastyDebug = {
|
|
|
1419
1387
|
size: 0,
|
|
1420
1388
|
rules: 0
|
|
1421
1389
|
};
|
|
1422
|
-
if (!raw) console.warn("
|
|
1390
|
+
if (!raw) console.warn("[Tasty] debug.inspect: element not found");
|
|
1423
1391
|
return empty;
|
|
1424
1392
|
}
|
|
1425
1393
|
const classList = element.getAttribute("class") || "";
|
|
@@ -1429,7 +1397,7 @@ const tastyDebug = {
|
|
|
1429
1397
|
className,
|
|
1430
1398
|
chunkName: getChunkForClass(className, root)
|
|
1431
1399
|
}));
|
|
1432
|
-
const css =
|
|
1400
|
+
const css = getCSSTextForNode(element, { root });
|
|
1433
1401
|
const rules = countRules(css);
|
|
1434
1402
|
const result = {
|
|
1435
1403
|
element,
|
|
@@ -1456,9 +1424,9 @@ const tastyDebug = {
|
|
|
1456
1424
|
const activeClasses = findDomTastyClasses(root);
|
|
1457
1425
|
const unusedClasses = getUnusedClasses(root);
|
|
1458
1426
|
const totalStyledClasses = [...activeClasses, ...unusedClasses];
|
|
1459
|
-
const activeCSS = injector.instance.
|
|
1460
|
-
const unusedCSS = injector.instance.
|
|
1461
|
-
const allCSS = injector.instance.
|
|
1427
|
+
const activeCSS = injector.instance.getCSSTextForClasses(activeClasses, { root });
|
|
1428
|
+
const unusedCSS = injector.instance.getCSSTextForClasses(unusedClasses, { root });
|
|
1429
|
+
const allCSS = injector.instance.getCSSText({ root });
|
|
1462
1430
|
const activeRuleCount = countRules(activeCSS);
|
|
1463
1431
|
const unusedRuleCount = countRules(unusedCSS);
|
|
1464
1432
|
const globalData = getGlobalTypeCSS("global", root);
|
|
@@ -1593,6 +1561,6 @@ function getPageCSS(root = document) {
|
|
|
1593
1561
|
}
|
|
1594
1562
|
if (typeof window !== "undefined" && isDevEnv()) tastyDebug.install();
|
|
1595
1563
|
//#endregion
|
|
1596
|
-
export { property as A,
|
|
1564
|
+
export { property as A, getRawCSSText as C, injector as D, injectRawCSS as E, ChunkSheetRegistry as M, chunkSheetRegistry as N, isPropertyDefined as O, resolveFunctionColor as P, 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
1565
|
|
|
1598
|
-
//# sourceMappingURL=core-
|
|
1566
|
+
//# sourceMappingURL=core-D7s7u-k1.js.map
|