@tenphi/tasty 3.9.10 → 3.10.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.
- package/dist/babel-types-C_7kRP38.d.ts +18 -0
- package/dist/chunks/build-config-l2Ys-AJr.js +60 -0
- package/dist/chunks/build-config-l2Ys-AJr.js.map +1 -0
- package/dist/chunks/{collector-D2ARGT2L.js → collector-CaNtsRtn.js} +8 -6
- package/dist/chunks/collector-CaNtsRtn.js.map +1 -0
- package/dist/chunks/{config-engine-DEmmPPdp.js → config-engine-CpExZO_T.js} +3 -3
- package/dist/chunks/{config-engine-DEmmPPdp.js.map → config-engine-CpExZO_T.js.map} +1 -1
- package/dist/chunks/{css-definitions-DotDkIXt.js → css-definitions-DAIJxzFY.js} +45 -22
- package/dist/chunks/{css-definitions-DotDkIXt.js.map → css-definitions-DAIJxzFY.js.map} +1 -1
- package/dist/chunks/{debug-D8pg9RGI.js → debug-CKy49GEr.js} +4 -4
- package/dist/chunks/{debug-D8pg9RGI.js.map → debug-CKy49GEr.js.map} +1 -1
- package/dist/chunks/{react-runtime-BpxlOTbO.js → react-runtime-oi6i3ELR.js} +27 -7
- package/dist/chunks/react-runtime-oi6i3ELR.js.map +1 -0
- package/dist/chunks/{runtime-engine-CKFXUH-A.js → runtime-engine-DoULyhPt.js} +22 -23
- package/dist/chunks/runtime-engine-DoULyhPt.js.map +1 -0
- package/dist/chunks/{runtime-state-BxaLhVdP.js → runtime-state-CZ2J5QiZ.js} +17 -3
- package/dist/chunks/runtime-state-CZ2J5QiZ.js.map +1 -0
- package/dist/chunks/{style-engine-BBbBuSkT.js → style-engine-CeKsjtIr.js} +194 -48
- package/dist/chunks/style-engine-CeKsjtIr.js.map +1 -0
- package/dist/chunks/{zero-engine-gJrKBRiw.js → zero-engine-fxKu8Jbn.js} +48 -28
- package/dist/chunks/zero-engine-fxKu8Jbn.js.map +1 -0
- package/dist/{config-CZWCzBr6.d.ts → config-CrZOfNJ5.d.ts} +8 -8
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +6 -6
- package/dist/{index-G9JuwM9p.d.ts → index-CYJtAI9a.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/ssr/astro.js +2 -2
- package/dist/ssr/index.js +2 -2
- package/dist/ssr/next-config.d.ts +1 -1
- package/dist/ssr/next-config.js +10 -4
- package/dist/ssr/next-config.js.map +1 -1
- package/dist/ssr/next.js +3 -3
- package/dist/zero/babel.d.ts +67 -2
- package/dist/zero/babel.js +21 -29
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +39 -2
- package/dist/zero/index.js +24 -2
- package/dist/zero/index.js.map +1 -0
- package/dist/zero/next.d.ts +2 -1
- package/docs/configuration.md +1 -1
- package/docs/dsl.md +2 -0
- package/docs/pipeline.md +2 -2
- package/docs/react-api.md +7 -0
- package/docs/runtime-benchmarks.md +7 -7
- package/docs/tasty-static.md +33 -0
- package/package.json +7 -7
- package/dist/babel-rZcEwPLM.d.ts +0 -82
- package/dist/chunks/build-config-CL4eRu2z.js +0 -42
- package/dist/chunks/build-config-CL4eRu2z.js.map +0 -1
- package/dist/chunks/collector-D2ARGT2L.js.map +0 -1
- package/dist/chunks/react-runtime-BpxlOTbO.js.map +0 -1
- package/dist/chunks/runtime-engine-CKFXUH-A.js.map +0 -1
- package/dist/chunks/runtime-state-BxaLhVdP.js.map +0 -1
- package/dist/chunks/style-engine-BBbBuSkT.js.map +0 -1
- package/dist/chunks/zero-engine-gJrKBRiw.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as parseStyle, j as normalizeDslName, m as resetGlobalPredefinedTokens, p as resetGlobalParseFunctions, u as normalizeColorTokenValue, w as Lru } from "./dsl-DRhFWQzo.js";
|
|
2
2
|
import { i as warn, n as isSelector, o as isDevEnv, r as resetStyleWarnings } from "./shared-utils-y-HjvPN4.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import { n as applyStyleConfig, r as normalizeConfig, t as resolveRecipesWith } from "./config-engine-
|
|
6
|
-
import { _ as
|
|
3
|
+
import { A as rscClassRegexGlobal, B as extractLocalFunctions, D as makeClassName, F as getEffectiveDefinition, G as parseFunctionName, H as formatFunctionPrelude, J as resetFunctionPolyfills, L as normalizePropertyDefinition, M as validateNamePrefix, N as hashString, P as extractLocalProperties, R as parsePropertyToken, S as formatFontFaceRule, U as formatFunctionRule, V as formatFunctionDeclarations, _ as formatCounterStyleRule, b as fontFaceContentHash, c as extractLocalKeyframes, d as mergeKeyframes, f as replaceAnimationNames, g as formatCounterStyleDeclarations, h as extractLocalCounterStyle, i as formatKeyframesCSS, j as tastyClassRegex, k as makeKeyframeName, l as filterUsedKeyframes, m as resolveSelectorKeyframes, o as formatPropertyCSS, p as resolveKeyframesNames, q as registerLocalFunctionPolyfills, r as formatRules, s as extractAnimationNamesFromStyles, u as hasLocalKeyframes, w as PropertyTypeResolver, x as formatFontFaceDeclarations, y as extractLocalFontFace } from "./css-definitions-DAIJxzFY.js";
|
|
4
|
+
import { C as camelToKebab, J as markStylesGeneratedState, K as hasStylesGenerated, M as createStyle, T as STYLE_HANDLER_MAP, V as resetStyleChunks, X as resetStylesGeneratedState, Y as resetGlobalPolyfillsState, a as registerBaseStyleProps, b as renderStyles, k as resetHandlers, n as generateChunkCacheKey, o as resetBaseStyleProps, q as isFunctionsPolyfillEnabled, r as categorizeStyleKeys, t as renderStylesForChunk, w as splitSelectorsSafely, y as clearPipelineCache } from "./style-engine-CeKsjtIr.js";
|
|
5
|
+
import { n as applyStyleConfig, r as normalizeConfig, t as resolveRecipesWith } from "./config-engine-CpExZO_T.js";
|
|
6
|
+
import { _ as mergeGlobalProperties, a as getGlobalConfigTokens, b as setRuntimeConfigState, c as getGlobalFunctions, f as mergeGlobalConfigTokens, g as mergeGlobalKeyframes, h as mergeGlobalFunctions, i as getEffectiveProperties, l as getGlobalKeyframes, m as mergeGlobalFontFaces, o as getGlobalCounterStyles, p as mergeGlobalCounterStyles, s as getGlobalFontFaces, t as getRegisteredSSRCollector, u as getGlobalStyles, v as mergeGlobalStyles, y as resetConfigResources } from "./runtime-state-CZ2J5QiZ.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
//#region src/prop-handlers.ts
|
|
9
9
|
const GTKEY = "__tasty_prop_handlers__";
|
|
@@ -363,7 +363,7 @@ var SheetManager = class {
|
|
|
363
363
|
} catch (e) {
|
|
364
364
|
const selectors = splitSelectorsSafely(rule.selector);
|
|
365
365
|
if (selectors.length > 1) for (const sel of selectors) {
|
|
366
|
-
const singleRule = wrapAtRules(`${sel} { ${
|
|
366
|
+
const singleRule = wrapAtRules(`${sel} { ${innerContent} }`, rule.atRules);
|
|
367
367
|
try {
|
|
368
368
|
const maxIdx = styleSheet.cssRules.length;
|
|
369
369
|
const atomicIdx = this.findAvailableRuleIndex(targetSheet);
|
|
@@ -1596,7 +1596,6 @@ function warnOnce(key, message) {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
1598
|
let currentConfig = null;
|
|
1599
|
-
let globalKeyframes = null;
|
|
1600
1599
|
let globalRecipes = null;
|
|
1601
1600
|
const GLOBAL_INJECTOR_KEY = "__TASTY_GLOBAL_INJECTOR__";
|
|
1602
1601
|
function isTestEnvironment() {
|
|
@@ -1648,28 +1647,27 @@ function markStylesGenerated() {
|
|
|
1648
1647
|
}
|
|
1649
1648
|
if (configuredGlobalStyles) {
|
|
1650
1649
|
for (const [selector, styles] of Object.entries(configuredGlobalStyles)) if (Object.keys(styles).length > 0) {
|
|
1651
|
-
const
|
|
1652
|
-
if (
|
|
1650
|
+
const rendered = renderStyles(styles, selector);
|
|
1651
|
+
if (rendered.length > 0) {
|
|
1652
|
+
const { rules, keyframes } = resolveSelectorKeyframes(styles, rendered, getGlobalKeyframes());
|
|
1653
|
+
for (const [name, steps] of keyframes ?? []) injector.keyframes(steps, {
|
|
1654
|
+
name,
|
|
1655
|
+
distinctByName: true
|
|
1656
|
+
});
|
|
1657
|
+
injector.injectGlobal(rules);
|
|
1658
|
+
}
|
|
1653
1659
|
}
|
|
1654
1660
|
}
|
|
1655
1661
|
}
|
|
1656
|
-
let _hasGlobalKeyframes = false;
|
|
1657
1662
|
function hasGlobalKeyframes() {
|
|
1658
|
-
return
|
|
1659
|
-
}
|
|
1660
|
-
function getGlobalKeyframes() {
|
|
1661
|
-
return globalKeyframes;
|
|
1663
|
+
return getGlobalKeyframes() !== null;
|
|
1662
1664
|
}
|
|
1663
1665
|
function setGlobalKeyframes(keyframes) {
|
|
1664
1666
|
if (hasStylesGenerated()) {
|
|
1665
1667
|
warnOnce("keyframes-after-styles", "[Tasty] Cannot update keyframes after styles have been generated.\nThe new keyframes will be ignored.");
|
|
1666
1668
|
return;
|
|
1667
1669
|
}
|
|
1668
|
-
|
|
1669
|
-
...globalKeyframes ?? {},
|
|
1670
|
-
...keyframes
|
|
1671
|
-
};
|
|
1672
|
-
_hasGlobalKeyframes = Object.keys(globalKeyframes).length > 0;
|
|
1670
|
+
mergeGlobalKeyframes(keyframes);
|
|
1673
1671
|
}
|
|
1674
1672
|
function setGlobalProperties(properties) {
|
|
1675
1673
|
if (hasStylesGenerated()) {
|
|
@@ -1787,8 +1785,6 @@ function getGlobalInjector() {
|
|
|
1787
1785
|
function resetConfig() {
|
|
1788
1786
|
resetStylesGeneratedState();
|
|
1789
1787
|
currentConfig = null;
|
|
1790
|
-
globalKeyframes = null;
|
|
1791
|
-
_hasGlobalKeyframes = false;
|
|
1792
1788
|
resetGlobalPolyfillsState();
|
|
1793
1789
|
globalRecipes = null;
|
|
1794
1790
|
resetConfigResources();
|
|
@@ -2108,8 +2104,11 @@ function computeStylesRSC(styles, chunkMap, stableStyles) {
|
|
|
2108
2104
|
}
|
|
2109
2105
|
const ancillaryCSS = collectAncillaryRSC(rscCache, styles, rscUsedKf, rscKeyframeNames);
|
|
2110
2106
|
if (ancillaryCSS) cssParts.push(ancillaryCSS);
|
|
2111
|
-
if (classNames.length === 0) return EMPTY_RESULT;
|
|
2112
2107
|
const css = cssParts.join("\n");
|
|
2108
|
+
if (classNames.length === 0) return css ? {
|
|
2109
|
+
className: "",
|
|
2110
|
+
css
|
|
2111
|
+
} : EMPTY_RESULT;
|
|
2113
2112
|
return {
|
|
2114
2113
|
className: classNames.join(" "),
|
|
2115
2114
|
css: css || void 0
|
|
@@ -2411,6 +2410,6 @@ function depsEqual(a, b) {
|
|
|
2411
2410
|
return true;
|
|
2412
2411
|
}
|
|
2413
2412
|
//#endregion
|
|
2414
|
-
export {
|
|
2413
|
+
export { ownKeyframes as A, hasGlobalKeyframes as B, holdKeyframes as C, injector as D, injectRawCSS as E, configure as F, StyleInjector as G, isConfigLocked as H, getConfig as I, flushStyles as J, SheetManager as K, getGlobalInjector as L, touch as M, ChunkSheetRegistry as N, isPropertyDefined as O, chunkSheetRegistry as P, propHandlerRegistry as Q, getGlobalRecipes as R, getRawCSSText as S, injectGlobal as T, isTestEnvironment as U, hasGlobalRecipes as V, resetConfig as W, openBatchWindow as X, hasPendingStyleWrites as Y, resetStyleBatch as Z, fontFace as _, filterBaseProps as a, getCSSText as b, hasKeys as c, getStyleTarget as d, pushRSCCSS as f, destroy as g, createInjector as h, modAttrs as i, property as j, keyframes as k, collectAutoInferredProperties as l, counterStyle as m, createClientState as n, computeStyles as o, cleanup as p, closeBatchWindow as q, processTokens as r, resolveRecipes as s, depsEqual as t, collectAutoInferredPropertiesRSC as u, func as v, inject as w, getCSSTextForNode as x, gc as y, getNamePrefix as z };
|
|
2415
2414
|
|
|
2416
|
-
//# sourceMappingURL=runtime-engine-
|
|
2415
|
+
//# sourceMappingURL=runtime-engine-DoULyhPt.js.map
|