@tenphi/tasty 3.3.1 → 3.4.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/{collector-BKqNBmzA.js → collector-DTahQUiV.js} +3 -3
- package/dist/{collector-BKqNBmzA.js.map → collector-DTahQUiV.js.map} +1 -1
- package/dist/{config-BCdCTIED.js → config-B5kHzuNz.js} +40 -57
- package/dist/config-B5kHzuNz.js.map +1 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +5 -5
- package/dist/{core-wxP3GHQu.js → core-Dr4u1NVD.js} +15 -14
- package/dist/core-Dr4u1NVD.js.map +1 -0
- package/dist/{css-writer-D64NY9AX.js → css-writer-B-J87ncv.js} +3 -3
- package/dist/{css-writer-D64NY9AX.js.map → css-writer-B-J87ncv.js.map} +1 -1
- package/dist/{format-rules-Bo_e2u7r.js → format-rules-DKOA-6qu.js} +2 -2
- package/dist/{format-rules-Bo_e2u7r.js.map → format-rules-DKOA-6qu.js.map} +1 -1
- package/dist/{hydrate-CMKOuKAx.js → hydrate-OeMX99We.js} +2 -2
- package/dist/{hydrate-CMKOuKAx.js.map → hydrate-OeMX99We.js.map} +1 -1
- package/dist/{index-DhhUI0yi.d.ts → index-PqN-DIpn.d.ts} +8 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/{keyframes-D737PShJ.js → keyframes-CV8azJf3.js} +89 -20
- package/dist/keyframes-CV8azJf3.js.map +1 -0
- package/dist/{merge-styles-CUIQcs5v.js → merge-styles-oklji0KB.js} +2 -2
- package/dist/{merge-styles-CUIQcs5v.js.map → merge-styles-oklji0KB.js.map} +1 -1
- package/dist/{resolve-recipes-Df1Ta-Q0.js → resolve-recipes-DTG81rzl.js} +3 -3
- package/dist/{resolve-recipes-Df1Ta-Q0.js.map → resolve-recipes-DTG81rzl.js.map} +1 -1
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro.js +3 -3
- package/dist/ssr/index.js +3 -3
- package/dist/ssr/next.js +4 -4
- package/dist/static/index.js +1 -1
- package/dist/zero/babel.js +4 -4
- package/dist/zero/index.js +1 -1
- package/package.json +1 -1
- package/dist/config-BCdCTIED.js.map +0 -1
- package/dist/core-wxP3GHQu.js.map +0 -1
- package/dist/keyframes-D737PShJ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as parseStyle, yt as getEffectiveDefinition } from "./config-
|
|
1
|
+
import { Gt as parseStyle, yt as getEffectiveDefinition } from "./config-B5kHzuNz.js";
|
|
2
2
|
//#region src/ssr/ssr-collector-ref.ts
|
|
3
3
|
const GETTER_KEY = "__tasty_ssr_collector_getter__";
|
|
4
4
|
let _getSSRCollector = null;
|
|
@@ -127,4 +127,4 @@ function formatRules(rules, className) {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
export { registerSSRCollectorGetterGlobal as a, registerSSRCollectorGetter as i, formatPropertyCSS as n, getRegisteredSSRCollector as r, formatRules as t };
|
|
129
129
|
|
|
130
|
-
//# sourceMappingURL=format-rules-
|
|
130
|
+
//# sourceMappingURL=format-rules-DKOA-6qu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-rules-
|
|
1
|
+
{"version":3,"file":"format-rules-DKOA-6qu.js","names":[],"sources":["../src/ssr/ssr-collector-ref.ts","../src/ssr/format-property.ts","../src/ssr/format-rules.ts"],"sourcesContent":["/**\n * Global reference to the SSR collector getter function.\n *\n * This indirection avoids importing 'node:async_hooks' in the browser bundle.\n * The SSR entry point sets this ref when loaded on the server. The useStyles\n * hook calls it if set; on the client it stays null and is never called.\n *\n * Uses a module-level variable as the primary mechanism. In Next.js App\n * Router the RSC and SSR module graphs load separate copies of this module,\n * so the getter registered by TastyRegistry (SSR layer) is invisible to\n * server components (RSC layer) — which correctly fall through to inline\n * RSC styles.\n *\n * A globalThis fallback (`registerSSRCollectorGetterGlobal`) is provided\n * for frameworks like Astro where middleware and page components live in\n * different module graphs and must share the getter across them.\n */\n\nimport type { ServerStyleCollector } from './collector';\n\ntype SSRCollectorGetter = () => ServerStyleCollector | null;\n\nconst GETTER_KEY = '__tasty_ssr_collector_getter__';\n\nlet _getSSRCollector: SSRCollectorGetter | null = null;\n\n/**\n * Register the collector getter in the current module graph only.\n * Used by Next.js TastyRegistry.\n */\nexport function registerSSRCollectorGetter(fn: SSRCollectorGetter): void {\n _getSSRCollector = fn;\n}\n\n/**\n * Register the collector getter on globalThis so it is visible across\n * separate module graphs (e.g. Astro middleware ↔ page components).\n */\nexport function registerSSRCollectorGetterGlobal(fn: SSRCollectorGetter): void {\n (globalThis as Record<string, unknown>)[GETTER_KEY] = fn;\n}\n\n/**\n * Retrieve the SSR collector: module-level first, globalThis fallback.\n */\nexport function getRegisteredSSRCollector(): ServerStyleCollector | null {\n if (_getSSRCollector) return _getSSRCollector();\n const getter = (globalThis as Record<string, unknown>)[GETTER_KEY] as\n | SSRCollectorGetter\n | undefined;\n return getter ? getter() : null;\n}\n","/**\n * Format @property CSS rules for SSR output.\n *\n * Replicates the CSS construction from StyleInjector.property()\n * but returns a CSS string instead of inserting into the DOM.\n */\n\nimport type { PropertyDefinition } from '../injector/types';\nimport { getEffectiveDefinition } from '../properties';\nimport type { StyleValue } from '../utils/styles';\nimport { parseStyle } from '../utils/styles';\n\n/**\n * Format a single @property rule as a CSS string.\n *\n * Returns the full `@property --name { ... }` text, or empty string\n * if the token is invalid.\n */\nexport function formatPropertyCSS(\n token: string,\n definition: PropertyDefinition,\n): string {\n const result = getEffectiveDefinition(token, definition);\n if (!result.isValid) return '';\n\n return buildPropertyRule(result.cssName, result.definition);\n}\n\nfunction buildPropertyRule(\n cssName: string,\n definition: PropertyDefinition,\n): string {\n const parts: string[] = [];\n\n if (definition.syntax != null) {\n let syntax = String(definition.syntax).trim();\n if (!/^['\"]/u.test(syntax)) syntax = `\"${syntax}\"`;\n parts.push(`syntax: ${syntax};`);\n }\n\n const inherits = definition.inherits ?? true;\n parts.push(`inherits: ${inherits ? 'true' : 'false'};`);\n\n if (definition.initialValue != null) {\n let initialValueStr: string;\n if (typeof definition.initialValue === 'number') {\n initialValueStr = String(definition.initialValue);\n } else {\n initialValueStr = parseStyle(\n definition.initialValue as StyleValue,\n ).output;\n }\n parts.push(`initial-value: ${initialValueStr};`);\n }\n\n const declarations = parts.join(' ').trim();\n return `@property ${cssName} { ${declarations} }`;\n}\n","/**\n * Shared CSS rule formatting utility.\n *\n * Extracted from SheetManager to allow both the DOM-based injector (client)\n * and the ServerStyleCollector (server) to produce identical CSS text\n * from StyleResult arrays.\n */\n\nimport type { StyleResult } from '../pipeline';\n\n/**\n * Resolve selectors for a rule, applying className-based specificity doubling\n * and rootPrefix handling. Mirrors the logic in StyleInjector.inject().\n */\nfunction resolveSelector(rule: StyleResult, className: string): string {\n let selector = rule.selector;\n\n if (rule.needsClassName) {\n const selectorParts = selector ? selector.split('|||') : [''];\n const classPrefix = `.${className}.${className}`;\n\n selector = selectorParts\n .map((part) => {\n const classSelector = part ? `${classPrefix}${part}` : classPrefix;\n\n if (rule.rootPrefix) {\n return `${rule.rootPrefix} ${classSelector}`;\n }\n return classSelector;\n })\n .join(', ');\n }\n\n return selector;\n}\n\ninterface GroupedRule {\n selector: string;\n declarations: string;\n atRules?: string[];\n startingStyle?: boolean;\n}\n\n/**\n * Group rules by selector + at-rules + startingStyle and merge their declarations.\n * Mirrors the grouping logic in SheetManager.insertRule().\n */\nfunction groupRules(rules: GroupedRule[]): GroupedRule[] {\n const groupMap = new Map<string, GroupedRule>();\n const order: string[] = [];\n\n const atKey = (at?: string[]) => (at && at.length ? at.join('|') : '');\n\n for (const r of rules) {\n const key = `${atKey(r.atRules)}||${r.selector}||${r.startingStyle ? '1' : '0'}`;\n const existing = groupMap.get(key);\n if (existing) {\n existing.declarations = existing.declarations\n ? `${existing.declarations} ${r.declarations}`\n : r.declarations;\n } else {\n groupMap.set(key, {\n selector: r.selector,\n atRules: r.atRules,\n startingStyle: r.startingStyle,\n declarations: r.declarations,\n });\n order.push(key);\n }\n }\n\n return order.map((key) => groupMap.get(key)!);\n}\n\n/**\n * Format an array of StyleResult rules into a CSS text string.\n *\n * Applies className-based specificity doubling (.cls.cls),\n * groups rules by selector + at-rules, and wraps with at-rule blocks.\n *\n * Produces the same CSS text as SheetManager.insertRule() would insert\n * into the DOM, but as a plain string suitable for SSR output.\n */\nexport function formatRules(rules: StyleResult[], className: string): string {\n if (rules.length === 0) return '';\n\n const resolvedRules = rules.map((rule) => ({\n selector: resolveSelector(rule, className),\n declarations: rule.declarations,\n atRules: rule.atRules,\n startingStyle: rule.startingStyle,\n }));\n\n const grouped = groupRules(resolvedRules);\n const cssRules: string[] = [];\n\n for (const rule of grouped) {\n const innerContent = rule.startingStyle\n ? `@starting-style { ${rule.declarations} }`\n : rule.declarations;\n const baseRule = `${rule.selector} { ${innerContent} }`;\n\n let fullRule = baseRule;\n if (rule.atRules && rule.atRules.length > 0) {\n fullRule = rule.atRules.reduce(\n (css, atRule) => `${atRule} { ${css} }`,\n baseRule,\n );\n }\n\n cssRules.push(fullRule);\n }\n\n return cssRules.join('\\n');\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getGlobalInjector } from "./config-
|
|
1
|
+
import { c as getGlobalInjector } from "./config-B5kHzuNz.js";
|
|
2
2
|
//#region src/ssr/hydrate.ts
|
|
3
3
|
/**
|
|
4
4
|
* Client-side cache hydration for SSR/RSC.
|
|
@@ -34,4 +34,4 @@ function hydrateTastyClasses(classes) {
|
|
|
34
34
|
//#endregion
|
|
35
35
|
export { hydrateTastyClasses as t };
|
|
36
36
|
|
|
37
|
-
//# sourceMappingURL=hydrate-
|
|
37
|
+
//# sourceMappingURL=hydrate-OeMX99We.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrate-
|
|
1
|
+
{"version":3,"file":"hydrate-OeMX99We.js","names":[],"sources":["../src/ssr/hydrate.ts"],"sourcesContent":["/**\n * Client-side cache hydration for SSR/RSC.\n *\n * Pre-populates the client injector's rules map with class names\n * rendered on the server. With hash-based naming, the client derives\n * the same class name from the same cache key, so only the class name\n * list needs to cross the wire — no cache keys or counters.\n */\n\nimport { getGlobalInjector } from '../config';\nimport { HYDRATED_RULE_INDEX } from '../injector/types';\n\n/**\n * Pre-populate the client-side style registry from the server's class name list.\n *\n * Call this before ReactDOM.hydrateRoot() or ensure it runs before\n * any tasty() component renders on the client.\n *\n * When called without arguments, reads the class list from `window.__TASTY__`\n * (populated by inline scripts emitted during SSR/RSC streaming).\n */\nexport function hydrateTastyClasses(classes?: string[]): void {\n if (typeof document === 'undefined') return;\n\n if (!classes) {\n classes = typeof window !== 'undefined' ? window.__TASTY__ : undefined;\n }\n\n if (!classes?.length) return;\n\n const injector = getGlobalInjector();\n const registry = injector._sheetManager.getRegistry(document);\n\n for (const cls of classes) {\n if (!registry.rules.has(cls)) {\n registry.rules.set(cls, {\n className: cls,\n ruleIndex: HYDRATED_RULE_INDEX,\n sheetIndex: HYDRATED_RULE_INDEX,\n });\n registry.refCounts.set(cls, 0);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,oBAAoB,SAA0B;CAC5D,IAAI,OAAO,aAAa,aAAa;CAErC,IAAI,CAAC,SACH,UAAU,OAAO,WAAW,cAAc,OAAO,YAAY,KAAA;CAG/D,IAAI,CAAC,SAAS,QAAQ;CAGtB,MAAM,WADW,kBACO,CAAC,CAAC,cAAc,YAAY,QAAQ;CAE5D,KAAK,MAAM,OAAO,SAChB,IAAI,CAAC,SAAS,MAAM,IAAI,GAAG,GAAG;EAC5B,SAAS,MAAM,IAAI,KAAK;GACtB,WAAW;GACX,WAAA;GACA,YAAA;EACF,CAAC;EACD,SAAS,UAAU,IAAI,KAAK,CAAC;CAC/B;AAEJ"}
|
|
@@ -1523,6 +1523,13 @@ interface ComputeStylesOptions {
|
|
|
1523
1523
|
ssrCollector?: ServerStyleCollector | null;
|
|
1524
1524
|
/** Target root for style injection (client only). Defaults to `document`. */
|
|
1525
1525
|
root?: Document | ShadowRoot;
|
|
1526
|
+
/**
|
|
1527
|
+
* Set when `styles` outlives this call and will be passed in again — a
|
|
1528
|
+
* `tasty()` factory's own styles object rather than a per-render merge.
|
|
1529
|
+
* It lets chunk cache keys be memoized on the object, which is worth the
|
|
1530
|
+
* bookkeeping only when there is a next render to spend it on.
|
|
1531
|
+
*/
|
|
1532
|
+
stableStyles?: boolean;
|
|
1526
1533
|
}
|
|
1527
1534
|
/**
|
|
1528
1535
|
* Synchronous, hook-free style computation.
|
|
@@ -1901,4 +1908,4 @@ declare const tastyDebug: {
|
|
|
1901
1908
|
};
|
|
1902
1909
|
//#endregion
|
|
1903
1910
|
export { okhstFunction as $, PositionStyleProps as $t, keyframes as A, TastyElementProps as At, ChunkInfo as B, BaseStyleProps as Bt, getCSSTextForNode as C, ResolveModPropDef as Ct, injectRawCSS as D, SubElementProps as Dt, injectGlobal as E, SubElementDefinition as Et, ComputeStylesOptions as F, WithVariant as Ft, DIMENSION_CHUNK_STYLES as G, ContainerStyleProps as Gt, APPEARANCE_CHUNK_STYLES as H, BlockOuterStyleProps as Ht, ComputeStylesResult as I, tasty as It, LAYOUT_CHUNK_STYLES as J, FlowStyleProps as Jt, DISPLAY_CHUNK_STYLES as K, DimensionStyleProps as Kt, computeStyles as L, AllBaseProps as Lt, touch as M, TastyProps as Mt, ChunkSheetRegistry as N, TokenPropsInput as Nt, injector as O, TastyComponentPropsWithDefaults as Ot, chunkSheetRegistry as P, VariantMap as Pt, createColorFunc as Q, OuterStyleProps as Qt, defineHandler as R, BaseProps as Rt, getCSSText as S, DEFAULT_ZERO_NAME_PREFIX as Sn, ResolveAsProps as St, inject as T, ResolveTokenProps as Tt, CHUNK_NAMES as U, BlockStyleProps as Ut, categorizeStyleKeys as V, BlockInnerStyleProps as Vt, ChunkName as W, ColorStyleProps as Wt, STYLE_TO_CHUNK as X, ModValue as Xt, POSITION_CHUNK_STYLES as Y, InnerStyleProps as Yt, resolveFunctionColor as Z, Mods as Zt, createInjector as _, INNER_STYLES as _n, AllBasePropsWithMods as _t, DebugOptions as a, TastyThemeNames as an, TastyBatchProviderProps as at, func as b, TEXT_STYLES as bn, ModPropDef as bt, tastyDebug as c, Tokens as cn, useCounterStyle as ct, dotize as d, BLOCK_OUTER_STYLES as dn, useProperty as dt, ShortGridStyles as en, okhstPlugin as et, _modAttrs as f, BLOCK_STYLES as fn, useKeyframes as ft, counterStyle as g, FLOW_STYLES as gn, useStyles as gt, cleanup as h, DIMENSION_STYLES as hn, UseStylesResult as ht, DebugChunkInfo as i, TastyExtensionConfig as in, TastyBatchProvider as it, property as j, TastyPolymorphicComponent as jt, isPropertyDefined as k, TastyElementOptions as kt, processTokens as l, BASE_STYLES as ln, useFontFace as lt, filterBaseProps as m, CONTAINER_STYLES as mn, useGlobalStyles as mt, CacheStatus as n, TastyBaseStylePropNames as nn, okhslPlugin as nt, InspectResult as o, TextStyleProps as on, UseFunctionOptions as ot, color$1 as p, COLOR_STYLES as pn, useRawCSS as pt, FONT_CHUNK_STYLES as q, ExtraBaseStyleProps as qt, ChunkBreakdown as r, TastyCustomProps as rn, getDisplayName as rt, Summary as s, TokenValue as sn, useFunction as st, CSSOptions as t, TagName as tn, okhslFunction as tt, resolveRecipes as u, BLOCK_INNER_STYLES as un, UsePropertyOptions as ut, destroy as v, OUTER_STYLES as vn, Element$1 as vt, getRawCSSText as w, ResolveModProps as wt, gc as x, DEFAULT_NAME_PREFIX as xn, ModPropsInput as xt, fontFace as y, POSITION_STYLES as yn, ElementsDefinition as yt, styleHandlers as z, BasePropsWithoutChildren as zt };
|
|
1904
|
-
//# sourceMappingURL=index-
|
|
1911
|
+
//# sourceMappingURL=index-PqN-DIpn.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as ParseFunction, D as PropHandlerDefinition, E as PropHandler, O as PropHandlerProps, S as FunctionsConfig, T as SheetManager, _ as TastyPluginFactory, a as getGlobalFontFaces, b as generateTypographyTokens, c as getGlobalRecipes, d as hasGlobalRecipes, f as hasStylesGenerated, g as TastyPlugin, h as resetConfig, i as getGlobalCounterStyles, l as getNamePrefix, m as isTestEnvironment, n as configure, o as getGlobalFunctions, p as isConfigLocked, r as getConfig, s as getGlobalKeyframes, t as TastyConfig, u as hasGlobalKeyframes, v as TypographyPreset, w as StyleInjector, x as ColorSpace, y as TypographyTokenValue } from "./config-YsxGv4tq.js";
|
|
2
2
|
import { $ as StyleParser, A as ParsedColor, At as StyleUsage, B as StyleValueStateMap, C as SuffixForSelector, Ct as PropertyOptions, D as CSSMap, Dt as SheetInfo, E as AnyStyleHandler, Et as RuleInfo, F as StyleHandlerProps, G as parseColor, H as getGlobalParser, I as StyleHandlerResult, J as getNamedColorHex, K as parseStyle, L as StyleMap, M as ResolvedStyleValue, Mt as flushStyles, N as StyleHandler, Nt as hasPendingStyleWrites, O as CUSTOM_UNITS, Ot as StyleInjectorConfig, P as StyleHandlerDefinition, Pt as resetStyleBatch, Q as strToRgb, R as StylePropValue, S as StylesWithoutSelectors, St as PropertyDefinition, T as TastyPresetNames, Tt as RootRegistry, U as getGlobalPredefinedTokens, V as filterMods, W as normalizeColorTokenValue, X as hexToRgb, Y as getRgbValuesFromRgbaString, Z as hslToRgbValues, _ as NotSelector, _t as InjectionMode, a as ParseStateKeyOptions, at as CSSProperties, b as Styles, bt as KeyframesResult, c as ParsedAdvancedState, ct as DisposeFunction, d as getGlobalPredefinedStates, dt as FunctionDefinition, et as ParserOptions, f as setGlobalPredefinedStates, ft as FunctionParameter, g as NoType, gt as InjectResult, h as ConfigTokens, i as renderStyles, it as UnitHandler, j as RawStyleHandler, jt as QueuedWrite, k as DIRECTIONS, kt as StyleRule, l as StateParserContext, lt as FontFaceDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as StyleDetails, o as parseStateKey, ot as CacheMetrics, p as ConditionNode, pt as GCConfig, q as stringifyStyles, r as isSelector, rt as StyleDetailsPart, s as AtRuleContext, st as CounterStyleDescriptors, t as RenderResult, tt as ProcessedStyle, u as createStateParserContext, ut as FontFaceInput, v as RecipeStyles, vt as KeyframesCacheEntry, w as TastyNamedColors, wt as RawCSSResult, x as StylesInterface, xt as KeyframesSteps, y as Selector, yt as KeyframesInfo, z as StyleValue } from "./index-Cd45t5NM.js";
|
|
3
|
-
import { $ as okhstFunction, $t as PositionStyleProps, A as keyframes, At as TastyElementProps, B as ChunkInfo, Bt as BaseStyleProps, C as getCSSTextForNode, Ct as ResolveModPropDef, D as injectRawCSS, Dt as SubElementProps, E as injectGlobal, Et as SubElementDefinition, F as ComputeStylesOptions, Ft as WithVariant, G as DIMENSION_CHUNK_STYLES, Gt as ContainerStyleProps, H as APPEARANCE_CHUNK_STYLES, Ht as BlockOuterStyleProps, I as ComputeStylesResult, It as tasty, J as LAYOUT_CHUNK_STYLES, Jt as FlowStyleProps, K as DISPLAY_CHUNK_STYLES, Kt as DimensionStyleProps, L as computeStyles, Lt as AllBaseProps, M as touch, Mt as TastyProps, N as ChunkSheetRegistry, Nt as TokenPropsInput, O as injector, Ot as TastyComponentPropsWithDefaults, P as chunkSheetRegistry, Pt as VariantMap, Q as createColorFunc, Qt as OuterStyleProps, R as defineHandler, Rt as BaseProps, S as getCSSText, Sn as DEFAULT_ZERO_NAME_PREFIX, St as ResolveAsProps, T as inject, Tt as ResolveTokenProps, U as CHUNK_NAMES, Ut as BlockStyleProps, V as categorizeStyleKeys, Vt as BlockInnerStyleProps, W as ChunkName, Wt as ColorStyleProps, X as STYLE_TO_CHUNK, Xt as ModValue, Y as POSITION_CHUNK_STYLES, Yt as InnerStyleProps, Z as resolveFunctionColor, Zt as Mods, _ as createInjector, _n as INNER_STYLES, _t as AllBasePropsWithMods, a as DebugOptions, an as TastyThemeNames, at as TastyBatchProviderProps, b as func, bn as TEXT_STYLES, bt as ModPropDef, c as tastyDebug, cn as Tokens, ct as useCounterStyle, d as dotize, dn as BLOCK_OUTER_STYLES, dt as useProperty, en as ShortGridStyles, et as okhstPlugin, f as _modAttrs, fn as BLOCK_STYLES, ft as useKeyframes, g as counterStyle, gn as FLOW_STYLES, gt as useStyles, h as cleanup, hn as DIMENSION_STYLES, ht as UseStylesResult, i as DebugChunkInfo, in as TastyExtensionConfig, it as TastyBatchProvider, j as property, jt as TastyPolymorphicComponent, k as isPropertyDefined, kt as TastyElementOptions, l as processTokens, ln as BASE_STYLES, lt as useFontFace, m as filterBaseProps, mn as CONTAINER_STYLES, mt as useGlobalStyles, n as CacheStatus, nn as TastyBaseStylePropNames, nt as okhslPlugin, o as InspectResult, on as TextStyleProps, ot as UseFunctionOptions, p as color, pn as COLOR_STYLES, pt as useRawCSS, q as FONT_CHUNK_STYLES, qt as ExtraBaseStyleProps, r as ChunkBreakdown, rn as TastyCustomProps, rt as getDisplayName, s as Summary, sn as TokenValue, st as useFunction, t as CSSOptions, tn as TagName, tt as okhslFunction, u as resolveRecipes, un as BLOCK_INNER_STYLES, ut as UsePropertyOptions, v as destroy, vn as OUTER_STYLES, vt as Element, w as getRawCSSText, wt as ResolveModProps, x as gc, xn as DEFAULT_NAME_PREFIX, xt as ModPropsInput, y as fontFace, yn as POSITION_STYLES, yt as ElementsDefinition, z as styleHandlers, zt as BasePropsWithoutChildren } from "./index-
|
|
3
|
+
import { $ as okhstFunction, $t as PositionStyleProps, A as keyframes, At as TastyElementProps, B as ChunkInfo, Bt as BaseStyleProps, C as getCSSTextForNode, Ct as ResolveModPropDef, D as injectRawCSS, Dt as SubElementProps, E as injectGlobal, Et as SubElementDefinition, F as ComputeStylesOptions, Ft as WithVariant, G as DIMENSION_CHUNK_STYLES, Gt as ContainerStyleProps, H as APPEARANCE_CHUNK_STYLES, Ht as BlockOuterStyleProps, I as ComputeStylesResult, It as tasty, J as LAYOUT_CHUNK_STYLES, Jt as FlowStyleProps, K as DISPLAY_CHUNK_STYLES, Kt as DimensionStyleProps, L as computeStyles, Lt as AllBaseProps, M as touch, Mt as TastyProps, N as ChunkSheetRegistry, Nt as TokenPropsInput, O as injector, Ot as TastyComponentPropsWithDefaults, P as chunkSheetRegistry, Pt as VariantMap, Q as createColorFunc, Qt as OuterStyleProps, R as defineHandler, Rt as BaseProps, S as getCSSText, Sn as DEFAULT_ZERO_NAME_PREFIX, St as ResolveAsProps, T as inject, Tt as ResolveTokenProps, U as CHUNK_NAMES, Ut as BlockStyleProps, V as categorizeStyleKeys, Vt as BlockInnerStyleProps, W as ChunkName, Wt as ColorStyleProps, X as STYLE_TO_CHUNK, Xt as ModValue, Y as POSITION_CHUNK_STYLES, Yt as InnerStyleProps, Z as resolveFunctionColor, Zt as Mods, _ as createInjector, _n as INNER_STYLES, _t as AllBasePropsWithMods, a as DebugOptions, an as TastyThemeNames, at as TastyBatchProviderProps, b as func, bn as TEXT_STYLES, bt as ModPropDef, c as tastyDebug, cn as Tokens, ct as useCounterStyle, d as dotize, dn as BLOCK_OUTER_STYLES, dt as useProperty, en as ShortGridStyles, et as okhstPlugin, f as _modAttrs, fn as BLOCK_STYLES, ft as useKeyframes, g as counterStyle, gn as FLOW_STYLES, gt as useStyles, h as cleanup, hn as DIMENSION_STYLES, ht as UseStylesResult, i as DebugChunkInfo, in as TastyExtensionConfig, it as TastyBatchProvider, j as property, jt as TastyPolymorphicComponent, k as isPropertyDefined, kt as TastyElementOptions, l as processTokens, ln as BASE_STYLES, lt as useFontFace, m as filterBaseProps, mn as CONTAINER_STYLES, mt as useGlobalStyles, n as CacheStatus, nn as TastyBaseStylePropNames, nt as okhslPlugin, o as InspectResult, on as TextStyleProps, ot as UseFunctionOptions, p as color, pn as COLOR_STYLES, pt as useRawCSS, q as FONT_CHUNK_STYLES, qt as ExtraBaseStyleProps, r as ChunkBreakdown, rn as TastyCustomProps, rt as getDisplayName, s as Summary, sn as TokenValue, st as useFunction, t as CSSOptions, tn as TagName, tt as okhslFunction, u as resolveRecipes, un as BLOCK_INNER_STYLES, ut as UsePropertyOptions, v as destroy, vn as OUTER_STYLES, vt as Element, w as getRawCSSText, wt as ResolveModProps, x as gc, xn as DEFAULT_NAME_PREFIX, xt as ModPropsInput, y as fontFace, yn as POSITION_STYLES, yt as ElementsDefinition, z as styleHandlers, zt as BasePropsWithoutChildren } from "./index-PqN-DIpn.js";
|
|
4
4
|
import { t as mergeStyles } from "./merge-styles-CU7JbEwg.js";
|
|
5
5
|
export { APPEARANCE_CHUNK_STYLES, type AllBaseProps, type AllBasePropsWithMods, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComputeStylesOptions, type ComputeStylesResult, type ConditionNode, type ConfigTokenValue, type ConfigTokens, type ContainerStyleProps, type CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, Element, type ElementsDefinition, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModPropDef, type ModPropsInput, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolveAsProps, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, TastyBatchProvider, type TastyBatchProviderProps, type TastyComponentPropsWithDefaults, type TastyConfig, type TastyCustomProps, type TastyElementOptions, type TastyElementProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPolymorphicComponent, type TastyPresetNames, type TastyProps, type TastyThemeNames, type TextStyleProps, type TokenPropsInput, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, type UseFunctionOptions, type UsePropertyOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, dotize, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, 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, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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, Ft as registerFunctionPolyfill, 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, Mt as formatFunctionRule, N as POSITION_STYLES, O as CONTAINER_STYLES, Ot as LAYOUT_CHUNK_STYLES, P as TEXT_STYLES, Pt as parseFunctionName, R as parseStateKey, Rt as DIRECTIONS, S as baseStylePropsRegistry, St as propHandlerRegistry, 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, X as fontFaceContentHash, Xt as okhslPlugin, Yt as okhslFunction, Z as formatFontFaceRule, Zt as createColorFunc, _ as isFunctionsPolyfillEnabled, _t as hashString, a as getGlobalCounterStyles, an as hslToRgbValues, at as closeBatchWindow, b as resetConfig, c as getGlobalInjector, ct as openBatchWindow, 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, mt as makeKeyframeName, n as getConfig, nn as getNamedColorHex, nt as styleHandlers, o as getGlobalFontFaces, on as strToRgb, ot as flushStyles, p as hasGlobalKeyframes, pt as makeCounterStyleName, q as formatCounterStyleRule, 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-
|
|
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, c as hasKeys, d as collectAutoInferredPropertiesRSC, f as getStyleTarget, g as createInjector, h as counterStyle, i as _modAttrs, j as touch, k as keyframes, l as formatKeyframesCSS, m as cleanup, n as processTokens, o as filterBaseProps, p as pushRSCCSS, r as dotize, s as computeStyles, t as tastyDebug, u as collectAutoInferredProperties, v as fontFace, w as inject, x as getCSSText, y as func } from "./core-
|
|
3
|
-
import { l as categorizeStyleKeys } from "./keyframes-
|
|
4
|
-
import { n as formatPropertyCSS } from "./format-rules-
|
|
5
|
-
import { t as mergeStyles } from "./merge-styles-
|
|
6
|
-
import { t as resolveRecipes } from "./resolve-recipes-
|
|
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, Ft as registerFunctionPolyfill, 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, Mt as formatFunctionRule, N as POSITION_STYLES, O as CONTAINER_STYLES, Ot as LAYOUT_CHUNK_STYLES, P as TEXT_STYLES, Pt as parseFunctionName, R as parseStateKey, Rt as DIRECTIONS, S as baseStylePropsRegistry, St as propHandlerRegistry, 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, X as fontFaceContentHash, Xt as okhslPlugin, Yt as okhslFunction, Z as formatFontFaceRule, Zt as createColorFunc, _ as isFunctionsPolyfillEnabled, _t as hashString, a as getGlobalCounterStyles, an as hslToRgbValues, at as closeBatchWindow, b as resetConfig, c as getGlobalInjector, ct as openBatchWindow, 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, mt as makeKeyframeName, n as getConfig, nn as getNamedColorHex, nt as styleHandlers, o as getGlobalFontFaces, on as strToRgb, ot as flushStyles, p as hasGlobalKeyframes, pt as makeCounterStyleName, q as formatCounterStyleRule, 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-B5kHzuNz.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, c as hasKeys, d as collectAutoInferredPropertiesRSC, f as getStyleTarget, g as createInjector, h as counterStyle, i as _modAttrs, j as touch, k as keyframes, l as formatKeyframesCSS, m as cleanup, n as processTokens, o as filterBaseProps, p as pushRSCCSS, r as dotize, s as computeStyles, t as tastyDebug, u as collectAutoInferredProperties, v as fontFace, w as inject, x as getCSSText, y as func } from "./core-Dr4u1NVD.js";
|
|
3
|
+
import { l as categorizeStyleKeys } from "./keyframes-CV8azJf3.js";
|
|
4
|
+
import { n as formatPropertyCSS } from "./format-rules-DKOA-6qu.js";
|
|
5
|
+
import { t as mergeStyles } from "./merge-styles-oklji0KB.js";
|
|
6
|
+
import { t as resolveRecipes } from "./resolve-recipes-DTG81rzl.js";
|
|
7
7
|
import { t as getTastySSRContext } from "./context-CA8YKeMn.js";
|
|
8
8
|
import { t as formatGlobalRules } from "./format-global-rules-DklyaXv-.js";
|
|
9
9
|
import { Fragment, createElement, forwardRef, useContext, useInsertionEffect } from "react";
|
|
@@ -160,6 +160,7 @@ function tastyElement(tastyOptions) {
|
|
|
160
160
|
const modPropsKeys = modPropsDef ? Array.isArray(modPropsDef) ? modPropsDef : Object.keys(modPropsDef) : void 0;
|
|
161
161
|
const tokenPropsMapping = tokenPropsDef ? buildTokenPropsMapping(tokenPropsDef) : void 0;
|
|
162
162
|
const classNameCache = /* @__PURE__ */ new Map();
|
|
163
|
+
const STABLE_STYLES = { stableStyles: true };
|
|
163
164
|
const _TastyComponent = forwardRef((incomingProps, ref) => {
|
|
164
165
|
const applyPropHandlers = propHandlerRegistry.apply;
|
|
165
166
|
const { as, styles: rawStyles, variant, mods, element, qa, qaVal, className: userClassName, tokens, style, theme, ...otherProps } = applyPropHandlers ? applyPropHandlers(incomingProps) : incomingProps;
|
|
@@ -206,7 +207,7 @@ function tastyElement(tastyOptions) {
|
|
|
206
207
|
stylesResult = { className: classNameCache.get(allStyles) };
|
|
207
208
|
touch(stylesResult.className);
|
|
208
209
|
} else {
|
|
209
|
-
stylesResult = computeStyles(allStyles);
|
|
210
|
+
stylesResult = computeStyles(allStyles, !useFactoryCache && allStyles === baseStyles ? STABLE_STYLES : void 0);
|
|
210
211
|
if (useFactoryCache && allStyles === baseStyles) classNameCache.set(allStyles, stylesResult.className);
|
|
211
212
|
}
|
|
212
213
|
let mergedTokens;
|