@tenphi/tasty 0.0.0-snapshot.cca2ea6 → 0.0.0-snapshot.cd6580c
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/dist/astro-r3wQ-RQn.js +307 -0
- package/dist/astro-r3wQ-RQn.js.map +1 -0
- package/dist/{babel-CHy3n_M7.d.ts → babel-Bu_bhevw.d.ts} +2 -2
- package/dist/{collector-0YO-P1vW.d.ts → collector-BTVXj2hS.d.ts} +20 -2
- package/dist/{collector-Eve9-4dP.js → collector-CudWaexa.js} +36 -13
- package/dist/collector-CudWaexa.js.map +1 -0
- package/dist/{config-Bwerr9rW.js → config-CHz_SFr_.js} +32 -24
- package/dist/config-CHz_SFr_.js.map +1 -0
- package/dist/{config-DRp9aYRG.d.ts → config-ClpSyptP.d.ts} +29 -11
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +6 -6
- package/dist/{core-C9nPCkW6.js → core-COC2UQ48.js} +150 -67
- package/dist/core-COC2UQ48.js.map +1 -0
- package/dist/{css-writer-7SOcy4BM.js → css-writer-Dji9t0wk.js} +3 -3
- package/dist/{css-writer-7SOcy4BM.js.map → css-writer-Dji9t0wk.js.map} +1 -1
- package/dist/{format-rules-Cb8LAho6.js → format-rules-U9Od0aqv.js} +2 -2
- package/dist/{format-rules-Cb8LAho6.js.map → format-rules-U9Od0aqv.js.map} +1 -1
- package/dist/{hydrate-DfL38fk5.js → hydrate-DA-ttBga.js} +2 -2
- package/dist/{hydrate-DfL38fk5.js.map → hydrate-DA-ttBga.js.map} +1 -1
- package/dist/{index-B1A0pcCf.d.ts → index-CV_fhEm0.d.ts} +18 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/{keyframes-CygCEfJG.js → keyframes-KkxDZ9xu.js} +45 -3
- package/dist/keyframes-KkxDZ9xu.js.map +1 -0
- package/dist/{merge-styles-Bh_wsNk_.js → merge-styles-BGM4RJWC.js} +2 -2
- package/dist/{merge-styles-Bh_wsNk_.js.map → merge-styles-BGM4RJWC.js.map} +1 -1
- package/dist/{resolve-recipes-Da6piP7f.js → resolve-recipes-DbeVYQFr.js} +3 -3
- package/dist/{resolve-recipes-Da6piP7f.js.map → resolve-recipes-DbeVYQFr.js.map} +1 -1
- package/dist/ssr/astro-client.js +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 +3 -1
- package/dist/ssr/astro-middleware-static.js +1 -1
- package/dist/ssr/astro-middleware.d.ts +3 -1
- package/dist/ssr/astro-middleware.js +1 -1
- package/dist/ssr/astro.d.ts +37 -3
- package/dist/ssr/astro.js +1 -156
- package/dist/ssr/index.d.ts +2 -2
- package/dist/ssr/index.js +3 -3
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next.d.ts +1 -1
- package/dist/ssr/next.js +4 -4
- package/dist/static/index.js +1 -1
- package/dist/zero/babel.d.ts +1 -1
- package/dist/zero/babel.js +4 -4
- package/dist/zero/index.js +1 -1
- package/dist/zero/next.d.ts +1 -1
- package/docs/ssr.md +48 -9
- package/package.json +18 -4
- package/dist/collector-Eve9-4dP.js.map +0 -1
- package/dist/config-Bwerr9rW.js.map +0 -1
- package/dist/core-C9nPCkW6.js.map +0 -1
- package/dist/keyframes-CygCEfJG.js.map +0 -1
- package/dist/ssr/astro.js.map +0 -1
|
@@ -6387,41 +6387,47 @@ var StyleInjector = class {
|
|
|
6387
6387
|
return this.sheetManager.getRawCSSText(root);
|
|
6388
6388
|
}
|
|
6389
6389
|
/**
|
|
6390
|
-
*
|
|
6391
|
-
*
|
|
6390
|
+
* Take a reference on local `@keyframes`, under the deterministic names the
|
|
6391
|
+
* caller resolved.
|
|
6392
6392
|
*
|
|
6393
|
-
* One reference per distinct set of steps,
|
|
6394
|
-
*
|
|
6395
|
-
*
|
|
6396
|
-
* count climbing for the life of the page. The reference goes when the last
|
|
6397
|
-
* of those classes is deleted.
|
|
6393
|
+
* One reference per distinct set of steps, shared by every class that ends up
|
|
6394
|
+
* animating it, so a repeat render takes nothing further. Ownership is
|
|
6395
|
+
* assigned by `ownKeyframes()` once the rules exist to be inspected.
|
|
6398
6396
|
*/
|
|
6399
|
-
holdKeyframes(
|
|
6397
|
+
holdKeyframes(steps, names, options) {
|
|
6400
6398
|
const root = options?.root || document;
|
|
6401
6399
|
const registry = this.sheetManager.getRegistry(root);
|
|
6402
|
-
|
|
6400
|
+
const keys = /* @__PURE__ */ new Map();
|
|
6403
6401
|
for (const [authored, definition] of Object.entries(steps)) {
|
|
6404
|
-
const
|
|
6405
|
-
let entry = registry.localKeyframes.get(
|
|
6402
|
+
const resolved = names.get(authored) ?? authored;
|
|
6403
|
+
let entry = registry.localKeyframes.get(resolved);
|
|
6406
6404
|
if (!entry) {
|
|
6407
6405
|
const injected = this.keyframes(definition, {
|
|
6408
|
-
name:
|
|
6409
|
-
root
|
|
6406
|
+
name: resolved,
|
|
6407
|
+
root,
|
|
6408
|
+
distinctByName: true
|
|
6410
6409
|
});
|
|
6411
6410
|
entry = {
|
|
6412
6411
|
name: injected.toString(),
|
|
6413
6412
|
dispose: injected.dispose,
|
|
6414
6413
|
owners: /* @__PURE__ */ new Set()
|
|
6415
6414
|
};
|
|
6416
|
-
registry.localKeyframes.set(
|
|
6417
|
-
}
|
|
6418
|
-
for (const className of classNames) entry.owners.add(className);
|
|
6419
|
-
if (entry.name !== authored) {
|
|
6420
|
-
if (!nameMap) nameMap = /* @__PURE__ */ new Map();
|
|
6421
|
-
nameMap.set(authored, entry.name);
|
|
6415
|
+
registry.localKeyframes.set(resolved, entry);
|
|
6422
6416
|
}
|
|
6417
|
+
keys.set(authored, resolved);
|
|
6423
6418
|
}
|
|
6424
|
-
return
|
|
6419
|
+
return keys;
|
|
6420
|
+
}
|
|
6421
|
+
/**
|
|
6422
|
+
* Record that `className` animates these keyframes, so the reference is
|
|
6423
|
+
* released when the last such class is collected.
|
|
6424
|
+
*
|
|
6425
|
+
* Only classes whose rules actually reference the animation should be here:
|
|
6426
|
+
* a class that merely rendered alongside one would otherwise keep the
|
|
6427
|
+
* keyframes alive for as long as it lives.
|
|
6428
|
+
*/
|
|
6429
|
+
ownKeyframes(key, className, options) {
|
|
6430
|
+
this.sheetManager.getRegistry(options?.root || document).localKeyframes.get(key)?.owners.add(className);
|
|
6425
6431
|
}
|
|
6426
6432
|
/**
|
|
6427
6433
|
* Pin an already-injected cacheKey and return the handle that releases it.
|
|
@@ -6679,13 +6685,14 @@ var StyleInjector = class {
|
|
|
6679
6685
|
keyframes(steps, nameOrOptions) {
|
|
6680
6686
|
const isStringName = typeof nameOrOptions === "string";
|
|
6681
6687
|
const providedName = isStringName ? nameOrOptions : nameOrOptions?.name;
|
|
6688
|
+
const distinctByName = isStringName ? false : nameOrOptions?.distinctByName ?? false;
|
|
6682
6689
|
const root = isStringName ? document : nameOrOptions?.root || document;
|
|
6683
6690
|
const registry = this.sheetManager.getRegistry(root);
|
|
6684
6691
|
if (Object.keys(steps).length === 0) return {
|
|
6685
6692
|
toString: () => "",
|
|
6686
6693
|
dispose: () => {}
|
|
6687
6694
|
};
|
|
6688
|
-
const contentHash = JSON.stringify(steps);
|
|
6695
|
+
const contentHash = distinctByName && providedName ? `${providedName}\u0000${JSON.stringify(steps)}` : JSON.stringify(steps);
|
|
6689
6696
|
const existing = registry.keyframesCache.get(contentHash);
|
|
6690
6697
|
if (existing) {
|
|
6691
6698
|
existing.refCount++;
|
|
@@ -6783,7 +6790,8 @@ var StyleInjector = class {
|
|
|
6783
6790
|
*
|
|
6784
6791
|
* @deprecated The class name is ignored — pass anything, or stop calling it.
|
|
6785
6792
|
* Collection no longer records per-class usage, and scheduling does not need
|
|
6786
|
-
* to know which class was rendered.
|
|
6793
|
+
* to know which class was rendered. A class handed back by `inject()` is
|
|
6794
|
+
* marked wanted there, which is what reuse actually goes through.
|
|
6787
6795
|
*/
|
|
6788
6796
|
touch(_className, options) {
|
|
6789
6797
|
if (typeof document === "undefined") return;
|
|
@@ -11785,7 +11793,7 @@ function createDefaultConfig(isTest) {
|
|
|
11785
11793
|
function markStylesGenerated() {
|
|
11786
11794
|
if (stylesGenerated) return;
|
|
11787
11795
|
stylesGenerated = true;
|
|
11788
|
-
if (typeof document !== "undefined" && document.querySelector("
|
|
11796
|
+
if (typeof document !== "undefined" && document.querySelector("[data-tasty-ssr]")) {
|
|
11789
11797
|
warnOnce("ssr-globals-skip", "[Tasty] SSR styles detected — skipping client-side global CSS injection to avoid duplicates.");
|
|
11790
11798
|
return;
|
|
11791
11799
|
}
|
|
@@ -12354,4 +12362,4 @@ function resetConfig() {
|
|
|
12354
12362
|
//#endregion
|
|
12355
12363
|
export { SheetManager as $, StyleParser as $t, FLOW_STYLES as A, STYLE_TO_CHUNK as At, createStateParserContext as B, getGlobalParseFunctions as Bt, BASE_STYLES as C, APPEARANCE_CHUNK_STYLES as Ct, COLOR_STYLES as D, FONT_CHUNK_STYLES as Dt, BLOCK_STYLES as E, DISPLAY_CHUNK_STYLES as Et, hasPipelineCacheEntry as F, registerFunctionPolyfill as Ft, StyleInjector as G, parseStyle as Gt, extractPredefinedStateRefs as H, getGlobalPredefinedTokens as Ht, isSelector as I, registerLocalFunctionPolyfills as It, hasLocalCounterStyle as J, okhstPlugin as Jt, extractLocalCounterStyle as K, stringifyStyles as Kt, renderStyles as L, CUSTOM_UNITS as Lt, OUTER_STYLES as M, formatFunctionRule as Mt, POSITION_STYLES as N, hasLocalFunctions as Nt, CONTAINER_STYLES as O, LAYOUT_CHUNK_STYLES as Ot, TEXT_STYLES as P, parseFunctionName as Pt, hasLocalFontFace as Q, isDevEnv as Qt, parseStateKey as R, DIRECTIONS as Rt, baseStylePropsRegistry as S, propHandlerRegistry as St, BLOCK_OUTER_STYLES as T, DIMENSION_CHUNK_STYLES as Tt, getGlobalPredefinedStates as U, normalizeColorTokenValue as Ut, extractLocalPredefinedStates as V, getGlobalParser as Vt, setGlobalPredefinedStates as W, parseColor as Wt, fontFaceContentHash as X, okhslPlugin as Xt, extractLocalFontFace as Y, okhslFunction as Yt, formatFontFaceRule as Z, createColorFunc as Zt, isFunctionsPolyfillEnabled as _, hashString as _t, getGlobalCounterStyles as a, hslToRgbValues as an, closeBatchWindow as at, resetConfig as b, hasLocalProperties as bt, getGlobalInjector as c, openBatchWindow as ct, getGlobalStyles as d, DEFAULT_ZERO_NAME_PREFIX as dt, Lru as en, STYLE_HANDLER_MAP as et, getNamePrefix as f, makeClassName as ft, isConfigLocked as g, validateNamePrefix as gt, hasStylesGenerated as h, tastyClassRegex as ht, getGlobalConfigTokens as i, hexToRgb as in, PropertyTypeResolver as it, INNER_STYLES as j, extractLocalFunctions as jt, DIMENSION_STYLES as k, POSITION_CHUNK_STYLES as kt, getGlobalKeyframes as l, resetStyleBatch as lt, hasGlobalRecipes as m, makeKeyframeName as mt, getConfig as n, getNamedColorHex as nn, styleHandlers as nt, getGlobalFontFaces as o, strToRgb as on, flushStyles as ot, hasGlobalKeyframes as p, makeCounterStyleName as pt, formatCounterStyleRule as q, okhstFunction as qt, getEffectiveProperties as r, getRgbValuesFromRgbaString as rn, createStyle as rt, getGlobalFunctions as s, normalizeDslName as sn, hasPendingStyleWrites as st, configure as t, overrideColorAlpha as tn, defineHandler as tt, getGlobalRecipes as u, DEFAULT_NAME_PREFIX as ut, isTestEnvironment as v, extractLocalProperties as vt, BLOCK_INNER_STYLES as w, CHUNK_NAMES as wt, generateTypographyTokens as x, parsePropertyToken as xt, markStylesGenerated as y, getEffectiveDefinition as yt, camelToKebab as z, filterMods as zt };
|
|
12356
12364
|
|
|
12357
|
-
//# sourceMappingURL=config-
|
|
12365
|
+
//# sourceMappingURL=config-CHz_SFr_.js.map
|