@tenphi/tasty 0.0.0-snapshot.002b1b3
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/LICENSE +21 -0
- package/README.md +637 -0
- package/dist/async-storage-B7_o6FKt.js +44 -0
- package/dist/async-storage-B7_o6FKt.js.map +1 -0
- package/dist/collector-LuU1vZ68.d.ts +98 -0
- package/dist/collector-MOYY2SOr.js +230 -0
- package/dist/collector-MOYY2SOr.js.map +1 -0
- package/dist/config-A237aY9H.js +10235 -0
- package/dist/config-A237aY9H.js.map +1 -0
- package/dist/config-vuCRkBWX.d.ts +884 -0
- package/dist/context-CkSg-kDT.js +24 -0
- package/dist/context-CkSg-kDT.js.map +1 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +6 -0
- package/dist/core-BkKav78f.js +1592 -0
- package/dist/core-BkKav78f.js.map +1 -0
- package/dist/css-writer-Cos9tQRM.js +329 -0
- package/dist/css-writer-Cos9tQRM.js.map +1 -0
- package/dist/format-global-rules-Dbc_1tc3.js +22 -0
- package/dist/format-global-rules-Dbc_1tc3.js.map +1 -0
- package/dist/format-rules-C2oiTsEO.js +143 -0
- package/dist/format-rules-C2oiTsEO.js.map +1 -0
- package/dist/hydrate-miFzWIKR.js +45 -0
- package/dist/hydrate-miFzWIKR.js.map +1 -0
- package/dist/index-CJMXAAO5.d.ts +1602 -0
- package/dist/index-dUtwpOux.d.ts +1266 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +732 -0
- package/dist/index.js.map +1 -0
- package/dist/keyframes-DDtNo_hl.js +587 -0
- package/dist/keyframes-DDtNo_hl.js.map +1 -0
- package/dist/merge-styles-CtDJMhpJ.d.ts +7 -0
- package/dist/merge-styles-D_HbBOlq.js +144 -0
- package/dist/merge-styles-D_HbBOlq.js.map +1 -0
- package/dist/resolve-recipes-B7-823LL.js +144 -0
- package/dist/resolve-recipes-B7-823LL.js.map +1 -0
- package/dist/ssr/astro-client.d.ts +1 -0
- package/dist/ssr/astro-client.js +19 -0
- package/dist/ssr/astro-client.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +15 -0
- package/dist/ssr/astro-middleware.js +19 -0
- package/dist/ssr/astro-middleware.js.map +1 -0
- package/dist/ssr/astro.d.ts +97 -0
- package/dist/ssr/astro.js +149 -0
- package/dist/ssr/astro.js.map +1 -0
- package/dist/ssr/index.d.ts +44 -0
- package/dist/ssr/index.js +10 -0
- package/dist/ssr/index.js.map +1 -0
- package/dist/ssr/next.d.ts +46 -0
- package/dist/ssr/next.js +75 -0
- package/dist/ssr/next.js.map +1 -0
- package/dist/static/index.d.ts +91 -0
- package/dist/static/index.js +50 -0
- package/dist/static/index.js.map +1 -0
- package/dist/static/inject.d.ts +5 -0
- package/dist/static/inject.js +17 -0
- package/dist/static/inject.js.map +1 -0
- package/dist/zero/babel.d.ts +81 -0
- package/dist/zero/babel.js +466 -0
- package/dist/zero/babel.js.map +1 -0
- package/dist/zero/index.d.ts +67 -0
- package/dist/zero/index.js +2 -0
- package/dist/zero/next.d.ts +86 -0
- package/dist/zero/next.js +143 -0
- package/dist/zero/next.js.map +1 -0
- package/docs/README.md +31 -0
- package/docs/adoption.md +298 -0
- package/docs/comparison.md +419 -0
- package/docs/configuration.md +394 -0
- package/docs/debug.md +320 -0
- package/docs/design-system.md +436 -0
- package/docs/dsl.md +688 -0
- package/docs/getting-started.md +217 -0
- package/docs/injector.md +544 -0
- package/docs/methodology.md +616 -0
- package/docs/pipeline.md +673 -0
- package/docs/react-api.md +557 -0
- package/docs/ssr.md +442 -0
- package/docs/styles.md +596 -0
- package/docs/tasty-static.md +532 -0
- package/package.json +222 -0
- package/tasty.config.ts +15 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
//#region src/ssr/context.ts
|
|
3
|
+
/**
|
|
4
|
+
* React context for SSR collector discovery.
|
|
5
|
+
*
|
|
6
|
+
* Used by Next.js TastyRegistry to provide the ServerStyleCollector
|
|
7
|
+
* to useStyles() via React context (the streaming-compatible path).
|
|
8
|
+
*
|
|
9
|
+
* This avoids relying on globalThis for cross-layer communication,
|
|
10
|
+
* which leaks between RSC and SSR module graphs in Next.js App Router.
|
|
11
|
+
*
|
|
12
|
+
* The context is created lazily to avoid calling createContext() at
|
|
13
|
+
* module evaluation time, which would break Server Components that
|
|
14
|
+
* import from `@tenphi/tasty` without using any React hooks.
|
|
15
|
+
*/
|
|
16
|
+
let _ctx;
|
|
17
|
+
function getTastySSRContext() {
|
|
18
|
+
if (!_ctx) _ctx = createContext(null);
|
|
19
|
+
return _ctx;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { getTastySSRContext as t };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=context-CkSg-kDT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-CkSg-kDT.js","names":[],"sources":["../src/ssr/context.ts"],"sourcesContent":["/**\n * React context for SSR collector discovery.\n *\n * Used by Next.js TastyRegistry to provide the ServerStyleCollector\n * to useStyles() via React context (the streaming-compatible path).\n *\n * This avoids relying on globalThis for cross-layer communication,\n * which leaks between RSC and SSR module graphs in Next.js App Router.\n *\n * The context is created lazily to avoid calling createContext() at\n * module evaluation time, which would break Server Components that\n * import from `@tenphi/tasty` without using any React hooks.\n */\n\nimport { createContext, type Context } from 'react';\n\nimport type { ServerStyleCollector } from './collector';\n\nlet _ctx: Context<ServerStyleCollector | null> | undefined;\n\nexport function getTastySSRContext(): Context<ServerStyleCollector | null> {\n if (!_ctx) {\n _ctx = createContext<ServerStyleCollector | null>(null);\n }\n return _ctx;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAI;AAEJ,SAAgB,qBAA2D;AACzE,KAAI,CAAC,KACH,QAAO,cAA2C,KAAK;AAEzD,QAAO"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { $ as strToRgb, A as RawStyleHandler, B as getGlobalFuncs, C as SuffixForSelector, Ct as RawCSSResult, D as CUSTOM_UNITS, Dt as StyleInjectorConfig, E as CSSMap, Et as SheetInfo, F as StylePropValue, G as parseStyle, H as getGlobalPredefinedTokens, I as StyleValue, J as stringifyStyles, K as resetGlobalPredefinedTokens, L as StyleValueStateMap, M as StyleHandlerDefinition, N as StyleHandlerResult, O as DIRECTIONS, Ot as StyleRule, P as StyleMap, Q as hslToRgbValues, R as customFunc, S as StylesWithoutSelectors, St as PropertyDefinition, T as TastyPresetNames, Tt as RuleInfo, U as normalizeColorTokenValue, V as getGlobalParser, W as parseColor, X as getRgbValuesFromRgbaString, Y as getNamedColorHex, Z as hexToRgb, _ as NotSelector, _t as InjectionMode, a as ParseStateKeyOptions, at as StyleDetailsPart, b as Styles, bt as KeyframesResult, c as ParsedAdvancedState, ct as CacheMetrics, d as getGlobalPredefinedStates, dt as FontFaceDescriptors, et as StyleParser, f as setGlobalPredefinedStates, ft as FontFaceInput, g as NoType, gt as InjectResult, h as ConfigTokens, i as renderStyles, it as StyleDetails, j as StyleHandler, k as ParsedColor, kt as StyleUsage, l as StateParserContext, lt as CounterStyleDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as ParserOptions, o as parseStateKey, ot as UnitHandler, p as ConditionNode, pt as GCConfig, q as setGlobalPredefinedTokens, r as isSelector, rt as ProcessedStyle, s as AtRuleContext, st as CSSProperties, t as RenderResult, tt as Bucket, u as createStateParserContext, ut as DisposeFunction, v as RecipeStyles, vt as KeyframesCacheEntry, w as TastyNamedColors, wt as RootRegistry, x as StylesInterface, xt as KeyframesSteps, y as Selector, yt as KeyframesInfo, z as filterMods } from "../index-dUtwpOux.js";
|
|
2
|
+
import { _ as TypographyTokenValue, a as getGlobalFontFace, b as StyleInjector, c as hasGlobalKeyframes, d as isConfigLocked, f as isTestEnvironment, g as TypographyPreset, h as TastyPluginFactory, i as getGlobalCounterStyle, l as hasGlobalRecipes, m as TastyPlugin, n as configure, o as getGlobalKeyframes, p as resetConfig, r as getConfig, s as getGlobalRecipes, t as TastyConfig, u as hasStylesGenerated, v as generateTypographyTokens, x as SheetManager, y as ColorSpace } from "../config-vuCRkBWX.js";
|
|
3
|
+
import { A as chunkSheetRegistry, At as TastyThemeNames, Bt as DIMENSION_STYLES, C as injectRawCSS, Ct as Mods, D as property, Dt as ShortGridStyles, E as keyframes, Et as Props, Ft as BLOCK_INNER_STYLES, Gt as TEXT_STYLES, Ht as INNER_STYLES, It as BLOCK_OUTER_STYLES, Jt as ChunkName, Kt as CHUNK_NAMES, Lt as BLOCK_STYLES, M as ComputeStylesResult, Mt as TokenValue, N as computeStyles, Nt as Tokens, O as touch, Ot as TagName, P as styleHandlers, Pt as BASE_STYLES, Qt as okhslPlugin, Rt as COLOR_STYLES, S as injectGlobal, St as ModValue, T as isPropertyDefined, Tt as PositionStyleProps, Ut as OUTER_STYLES, Vt as FLOW_STYLES, Wt as POSITION_STYLES, Xt as categorizeStyleKeys, Yt as STYLE_TO_CHUNK, Zt as okhslFunc, _ as getCssText, _t as ContainerStyleProps, a as resolveRecipes, b as getRawCSSText, bt as GlobalStyledProps, c as color, d as cleanup, f as counterStyle, ft as BaseStyleProps, g as gc, gt as ColorStyleProps, h as fontFace, ht as BlockStyleProps, i as warn, j as ComputeStylesOptions, jt as TextStyleProps, k as ChunkSheetRegistry, kt as TastyExtensionConfig, l as filterBaseProps, m as destroy, mt as BlockOuterStyleProps, n as processTokens, o as dotize, p as createInjector, pt as BlockInnerStyleProps, qt as ChunkInfo, r as deprecationWarning, s as _modAttrs, t as tastyDebug, u as PropertyOptions, v as getCssTextForNode, vt as DimensionStyleProps, w as injector, wt as OuterStyleProps, x as inject, xt as InnerStyleProps, y as getIsTestEnvironment, yt as FlowStyleProps, zt as CONTAINER_STYLES } from "../index-CJMXAAO5.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-CtDJMhpJ.js";
|
|
5
|
+
export { AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CSSMap, CSSProperties, CUSTOM_UNITS, CacheMetrics, ChunkInfo, ChunkName, ChunkSheetRegistry, ColorSpace, ColorStyleProps, ComputeStylesOptions, ComputeStylesResult, ConditionNode, ConfigTokenValue, ConfigTokens, ContainerStyleProps, CounterStyleDescriptors, DIMENSION_STYLES, DIRECTIONS, DimensionStyleProps, DisposeFunction, FLOW_STYLES, FlowStyleProps, FontFaceDescriptors, FontFaceInput, GCConfig, GCOptions, GlobalStyledProps, INNER_STYLES, InjectResult, InjectionMode, InnerStyleProps, KeyframesCacheEntry, KeyframesInfo, KeyframesResult, KeyframesSteps, ModValue, Mods, NoType, NotSelector, OUTER_STYLES, OuterStyleProps, POSITION_STYLES, ParseStateKeyOptions, ParsedAdvancedState, ParsedColor, ParserOptions, PositionStyleProps, ProcessedStyle, PropertyDefinition, PropertyOptions, Props, RawCSSResult, RawStyleHandler, RecipeStyles, RenderResult, RootRegistry, RuleInfo, STYLE_TO_CHUNK, Selector, SheetInfo, SheetManager, ShortGridStyles, StateParserContext, StyleDetails, StyleDetailsPart, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleInjector, StyleInjectorConfig, StyleMap, StyleParser, StylePropValue, StyleResult, StyleRule, StyleUsage, StyleValue, StyleValueStateMap, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TEXT_STYLES, TagName, TastyConfig, TastyExtensionConfig, TastyNamedColors, TastyPlugin, TastyPluginFactory, TastyPresetNames, TastyThemeNames, TextStyleProps, TokenValue, Tokens, TypographyPreset, TypographyTokenValue, UnitHandler, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, gc, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch, warn };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { $ as parseStyle, B as deprecationWarning, D as getGlobalPredefinedStates, G as DIRECTIONS, J as getGlobalFuncs, K as customFunc, L as SheetManager, O as setGlobalPredefinedStates, Q as parseColor, S as parseStateKey, St as strToRgb, V as warn, W as CUSTOM_UNITS, X as getGlobalPredefinedTokens, Y as getGlobalParser, Z as normalizeColorTokenValue, _ as resetConfig, a as getGlobalCounterStyle, at as StyleParser, b as isSelector, bt as hexToRgb, c as getGlobalKeyframes, d as hasGlobalKeyframes, et as resetGlobalPredefinedTokens, f as hasGlobalRecipes, h as isTestEnvironment, it as okhslPlugin, k as StyleInjector, l as getGlobalRecipes, m as isConfigLocked, n as getConfig, nt as stringifyStyles, o as getGlobalFontFace, ot as Bucket, p as hasStylesGenerated, q as filterMods, rt as okhslFunc, t as configure, tt as setGlobalPredefinedTokens, v as generateTypographyTokens, vt as getNamedColorHex, w as createStateParserContext, x as renderStyles, xt as hslToRgbValues, yt as getRgbValuesFromRgbaString, z as styleHandlers } from "../config-A237aY9H.js";
|
|
2
|
+
import { d as categorizeStyleKeys, l as CHUNK_NAMES, u as STYLE_TO_CHUNK } from "../keyframes-DDtNo_hl.js";
|
|
3
|
+
import { A as property, B as DIMENSION_STYLES, C as getRawCSSText, D as injector, E as injectRawCSS, F as BLOCK_INNER_STYLES, G as TEXT_STYLES, H as INNER_STYLES, I as BLOCK_OUTER_STYLES, L as BLOCK_STYLES, M as ChunkSheetRegistry, N as chunkSheetRegistry, O as isPropertyDefined, P as BASE_STYLES, R as COLOR_STYLES, S as getIsTestEnvironment, T as injectGlobal, U as OUTER_STYLES, V as FLOW_STYLES, W as POSITION_STYLES, _ as destroy, a as color, b as getCssText, 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 getCssTextForNode, y as gc, z as CONTAINER_STYLES } from "../core-BkKav78f.js";
|
|
4
|
+
import { t as mergeStyles } from "../merge-styles-D_HbBOlq.js";
|
|
5
|
+
import { t as resolveRecipes } from "../resolve-recipes-B7-823LL.js";
|
|
6
|
+
export { BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DIMENSION_STYLES, DIRECTIONS, FLOW_STYLES, INNER_STYLES, OUTER_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, gc, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch, warn };
|