@tenphi/tasty 3.16.0 → 3.17.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.
Files changed (47) hide show
  1. package/dist/{babel-types-CCAgO9ZM.d.ts → babel-types-Dc5zghyE.d.ts} +2 -2
  2. package/dist/chunks/{build-config-BTMXiCMW.js → build-config-D9Iq8QQm.js} +4 -4
  3. package/dist/chunks/{build-config-BTMXiCMW.js.map → build-config-D9Iq8QQm.js.map} +1 -1
  4. package/dist/chunks/{collector-Dit2r0Jc.js → collector-Cb8ah2JF.js} +4 -4
  5. package/dist/chunks/{collector-Dit2r0Jc.js.map → collector-Cb8ah2JF.js.map} +1 -1
  6. package/dist/chunks/{config-engine-IYvCVLNM.js → config-engine-CMYFZYQh.js} +3 -3
  7. package/dist/chunks/{config-engine-IYvCVLNM.js.map → config-engine-CMYFZYQh.js.map} +1 -1
  8. package/dist/chunks/{css-definitions-D6ToG43M.js → css-definitions-B4aWBkH3.js} +2 -2
  9. package/dist/chunks/{css-definitions-D6ToG43M.js.map → css-definitions-B4aWBkH3.js.map} +1 -1
  10. package/dist/chunks/{debug-BmIXavn5.js → debug-D2Pu7Xhy.js} +4 -4
  11. package/dist/chunks/{debug-BmIXavn5.js.map → debug-D2Pu7Xhy.js.map} +1 -1
  12. package/dist/chunks/{react-runtime-B52DjXFu.js → react-runtime-DHiopXCu.js} +5 -5
  13. package/dist/chunks/{react-runtime-B52DjXFu.js.map → react-runtime-DHiopXCu.js.map} +1 -1
  14. package/dist/chunks/{runtime-engine-rlmL8Koo.js → runtime-engine-NGCofNXy.js} +5 -5
  15. package/dist/chunks/{runtime-engine-rlmL8Koo.js.map → runtime-engine-NGCofNXy.js.map} +1 -1
  16. package/dist/chunks/{runtime-state-CB3ZPAKl.js → runtime-state-lZjMbvwV.js} +2 -2
  17. package/dist/chunks/{runtime-state-CB3ZPAKl.js.map → runtime-state-lZjMbvwV.js.map} +1 -1
  18. package/dist/chunks/{style-engine-Cq7kL3Xh.js → style-engine-DnkV_4Jg.js} +2 -8
  19. package/dist/chunks/style-engine-DnkV_4Jg.js.map +1 -0
  20. package/dist/chunks/{zero-engine-B1PkpmG-.js → zero-engine-DcwaCvFs.js} +5 -5
  21. package/dist/chunks/{zero-engine-B1PkpmG-.js.map → zero-engine-DcwaCvFs.js.map} +1 -1
  22. package/dist/{collector-C6RV9oQV.d.ts → collector-D2OT6I2G.d.ts} +2 -2
  23. package/dist/{config-RsgpMdyc.d.ts → config-C4ftFxgI.d.ts} +2 -2
  24. package/dist/core/index.d.ts +4 -4
  25. package/dist/core/index.js +6 -6
  26. package/dist/{index-CDRJqQIM.d.ts → index-DxQNRj50.d.ts} +5 -5
  27. package/dist/index.d.ts +4 -4
  28. package/dist/index.js +7 -7
  29. package/dist/{merge-styles-CkJeO9AJ.d.ts → merge-styles-D39qBtox.d.ts} +2 -2
  30. package/dist/ssr/astro.js +2 -2
  31. package/dist/ssr/index.d.ts +1 -1
  32. package/dist/ssr/index.js +2 -2
  33. package/dist/ssr/next-config.d.ts +1 -1
  34. package/dist/ssr/next-config.js +3 -3
  35. package/dist/ssr/next.d.ts +1 -1
  36. package/dist/ssr/next.js +3 -3
  37. package/dist/static/index.d.ts +2 -2
  38. package/dist/{types-DeVUQ6o-.d.ts → types-CYQIhUg1.d.ts} +2 -2
  39. package/dist/zero/babel.d.ts +1 -1
  40. package/dist/zero/babel.js +4 -4
  41. package/dist/zero/index.d.ts +3 -3
  42. package/dist/zero/index.js +3 -3
  43. package/dist/zero/next.d.ts +1 -1
  44. package/docs/ai-agents.md +1 -1
  45. package/docs/styles.md +16 -20
  46. package/package.json +1 -1
  47. package/dist/chunks/style-engine-Cq7kL3Xh.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { P as DEFAULT_PROPERTIES, R as indexPropertiesByName } from "./css-definitions-D6ToG43M.js";
1
+ import { P as DEFAULT_PROPERTIES, R as indexPropertiesByName } from "./css-definitions-B4aWBkH3.js";
2
2
  //#region src/config-resources.ts
3
3
  let runtimeConfig = null;
4
4
  let globalFontFace = null;
@@ -149,4 +149,4 @@ function getRegisteredSSRCollector() {
149
149
  //#endregion
150
150
  export { mergeGlobalKeyframes as _, getEffectivePropertiesByName as a, resetConfigResources as b, getGlobalFontFaces as c, getGlobalStyles as d, getRuntimeConfigState as f, mergeGlobalFunctions as g, mergeGlobalFontFaces as h, getEffectiveProperties as i, getGlobalFunctions as l, mergeGlobalCounterStyles as m, registerSSRCollectorGetter as n, getGlobalConfigTokens as o, mergeGlobalConfigTokens as p, registerSSRCollectorGetterGlobal as r, getGlobalCounterStyles as s, getRegisteredSSRCollector as t, getGlobalKeyframes as u, mergeGlobalProperties as v, setRuntimeConfigState as x, mergeGlobalStyles as y };
151
151
 
152
- //# sourceMappingURL=runtime-state-CB3ZPAKl.js.map
152
+ //# sourceMappingURL=runtime-state-lZjMbvwV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-state-CB3ZPAKl.js","names":[],"sources":["../../src/config-resources.ts","../../src/ssr/ssr-collector-ref.ts"],"sourcesContent":["/**\n * DOM-free storage for configured CSS resources shared by the browser runtime\n * and server collectors.\n *\n * Astro can evaluate middleware and application code in separate module\n * graphs, so resources used by SSR are mirrored on globalThis. Keeping this\n * state outside config.ts lets server-only entrypoints read it without loading\n * StyleInjector and the rest of the browser runtime.\n */\n\nimport type {\n CounterStyleDescriptors,\n FontFaceInput,\n FunctionDefinition,\n KeyframesSteps,\n PropertyDefinition,\n} from './injector/types';\nimport type { DeclaredPropertyEntry } from './properties';\nimport { indexPropertiesByName } from './properties';\nimport { DEFAULT_PROPERTIES } from './properties/defaults';\nimport type { ConfigTokens, Styles } from './styles/types';\n\ninterface RuntimeConfigState {\n namePrefix?: string;\n nonce?: string;\n}\n\nlet runtimeConfig: RuntimeConfigState | null = null;\nlet globalFontFace: Record<string, FontFaceInput> | null = null;\nlet globalCounterStyle: Record<string, CounterStyleDescriptors> | null = null;\nlet globalFunction: Record<string, FunctionDefinition> | null = null;\nlet globalProperties: Record<string, PropertyDefinition> | null = null;\nlet globalConfigTokens: ConfigTokens | null = null;\nlet globalStyles: Record<string, Styles> | null = null;\nlet globalKeyframes: Record<string, KeyframesSteps> | null = null;\n\nconst GTKEY_TOKENS = '__tasty_cfg_tokens__';\nconst GTKEY_FONT_FACE = '__tasty_cfg_font_face__';\nconst GTKEY_COUNTER_STYLE = '__tasty_cfg_counter_style__';\nconst GTKEY_FUNCTION = '__tasty_cfg_function__';\nconst GTKEY_PROPERTIES = '__tasty_cfg_properties__';\nconst GTKEY_GLOBAL_STYLES = '__tasty_cfg_global_styles__';\nconst GTKEY_KEYFRAMES = '__tasty_cfg_keyframes__';\n\nfunction setOnGlobalThis(key: string, value: unknown): void {\n (globalThis as Record<string, unknown>)[key] = value;\n}\n\nfunction getFromGlobalThis<T>(key: string): T | undefined {\n return (globalThis as Record<string, unknown>)[key] as T | undefined;\n}\n\nexport function getRuntimeConfigState(): RuntimeConfigState | null {\n return runtimeConfig;\n}\n\nexport function setRuntimeConfigState(config: RuntimeConfigState): void {\n runtimeConfig = config;\n}\n\nexport function getEffectiveProperties(): Record<string, PropertyDefinition> {\n const properties =\n globalProperties ??\n getFromGlobalThis<Record<string, PropertyDefinition>>(GTKEY_PROPERTIES);\n return properties\n ? { ...DEFAULT_PROPERTIES, ...properties }\n : DEFAULT_PROPERTIES;\n}\n\nlet effectivePropertyIndex: {\n source: Record<string, PropertyDefinition> | null | undefined;\n index: ReadonlyMap<string, DeclaredPropertyEntry>;\n} | null = null;\n\n/**\n * The effective properties (Tasty's defaults and `configure({ properties })`)\n * keyed by the custom property each one registers — see\n * `indexPropertiesByName()`. Rebuilt only when `configure({ properties })`\n * replaces the set.\n */\nexport function getEffectivePropertiesByName(): ReadonlyMap<\n string,\n DeclaredPropertyEntry\n> {\n const source =\n globalProperties ??\n getFromGlobalThis<Record<string, PropertyDefinition>>(GTKEY_PROPERTIES);\n\n if (effectivePropertyIndex && effectivePropertyIndex.source === source) {\n return effectivePropertyIndex.index;\n }\n\n const index = indexPropertiesByName(getEffectiveProperties());\n effectivePropertyIndex = { source, index };\n return index;\n}\n\nexport function getGlobalFontFaces(): Record<string, FontFaceInput> | null {\n return (\n globalFontFace ??\n getFromGlobalThis<Record<string, FontFaceInput>>(GTKEY_FONT_FACE) ??\n null\n );\n}\n\nexport function getGlobalCounterStyles(): Record<\n string,\n CounterStyleDescriptors\n> | null {\n return (\n globalCounterStyle ??\n getFromGlobalThis<Record<string, CounterStyleDescriptors>>(\n GTKEY_COUNTER_STYLE,\n ) ??\n null\n );\n}\n\nexport function getGlobalFunctions(): Record<\n string,\n FunctionDefinition\n> | null {\n return (\n globalFunction ??\n getFromGlobalThis<Record<string, FunctionDefinition>>(GTKEY_FUNCTION) ??\n null\n );\n}\n\nexport function getGlobalConfigTokens(): ConfigTokens | null {\n return (\n globalConfigTokens ?? getFromGlobalThis<ConfigTokens>(GTKEY_TOKENS) ?? null\n );\n}\n\nexport function getGlobalStyles(): Record<string, Styles> | null {\n return (\n globalStyles ??\n getFromGlobalThis<Record<string, Styles>>(GTKEY_GLOBAL_STYLES) ??\n null\n );\n}\n\n/**\n * Get global keyframes configuration.\n * Returns null if no keyframes configured (fast path for zero-overhead).\n */\nexport function getGlobalKeyframes(): Record<string, KeyframesSteps> | null {\n return (\n globalKeyframes ??\n getFromGlobalThis<Record<string, KeyframesSteps>>(GTKEY_KEYFRAMES) ??\n null\n );\n}\n\nexport function mergeGlobalProperties(\n properties: Record<string, PropertyDefinition>,\n): void {\n globalProperties = {\n ...(globalProperties ?? getFromGlobalThis(GTKEY_PROPERTIES) ?? {}),\n ...properties,\n };\n setOnGlobalThis(GTKEY_PROPERTIES, globalProperties);\n}\n\nexport function mergeGlobalFontFaces(\n fontFaces: Record<string, FontFaceInput>,\n): void {\n globalFontFace = { ...(getGlobalFontFaces() ?? {}), ...fontFaces };\n setOnGlobalThis(GTKEY_FONT_FACE, globalFontFace);\n}\n\nexport function mergeGlobalCounterStyles(\n counterStyles: Record<string, CounterStyleDescriptors>,\n): void {\n globalCounterStyle = {\n ...(getGlobalCounterStyles() ?? {}),\n ...counterStyles,\n };\n setOnGlobalThis(GTKEY_COUNTER_STYLE, globalCounterStyle);\n}\n\nexport function mergeGlobalFunctions(\n functions: Record<string, FunctionDefinition>,\n): void {\n globalFunction = { ...(getGlobalFunctions() ?? {}), ...functions };\n setOnGlobalThis(GTKEY_FUNCTION, globalFunction);\n}\n\nexport function mergeGlobalConfigTokens(styles: ConfigTokens): void {\n globalConfigTokens = globalConfigTokens\n ? { ...globalConfigTokens, ...styles }\n : styles;\n setOnGlobalThis(GTKEY_TOKENS, globalConfigTokens);\n}\n\nexport function mergeGlobalStyles(styles: Record<string, Styles>): void {\n if (globalStyles) {\n for (const [selector, selectorStyles] of Object.entries(styles)) {\n globalStyles[selector] = globalStyles[selector]\n ? { ...globalStyles[selector], ...selectorStyles }\n : selectorStyles;\n }\n } else {\n globalStyles = { ...styles };\n }\n setOnGlobalThis(GTKEY_GLOBAL_STYLES, globalStyles);\n}\n\nexport function mergeGlobalKeyframes(\n keyframes: Record<string, KeyframesSteps>,\n): void {\n globalKeyframes = { ...(getGlobalKeyframes() ?? {}), ...keyframes };\n setOnGlobalThis(GTKEY_KEYFRAMES, globalKeyframes);\n}\n\nexport function resetConfigResources(): void {\n runtimeConfig = null;\n globalProperties = null;\n globalFontFace = null;\n globalCounterStyle = null;\n globalFunction = null;\n globalConfigTokens = null;\n globalStyles = null;\n globalKeyframes = null;\n\n const globalState = globalThis as Record<string, unknown>;\n delete globalState[GTKEY_TOKENS];\n delete globalState[GTKEY_FONT_FACE];\n delete globalState[GTKEY_COUNTER_STYLE];\n delete globalState[GTKEY_FUNCTION];\n delete globalState[GTKEY_PROPERTIES];\n delete globalState[GTKEY_GLOBAL_STYLES];\n delete globalState[GTKEY_KEYFRAMES];\n}\n","/**\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 | undefined;\n return getter ? getter() : null;\n}\n"],"mappings":";;AA2BA,IAAI,gBAA2C;AAC/C,IAAI,iBAAuD;AAC3D,IAAI,qBAAqE;AACzE,IAAI,iBAA4D;AAChE,IAAI,mBAA8D;AAClE,IAAI,qBAA0C;AAC9C,IAAI,eAA8C;AAClD,IAAI,kBAAyD;AAE7D,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,sBAAsB;AAC5B,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,kBAAkB;AAExB,SAAS,gBAAgB,KAAa,OA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;AAC7B"}
1
+ {"version":3,"file":"runtime-state-lZjMbvwV.js","names":[],"sources":["../../src/config-resources.ts","../../src/ssr/ssr-collector-ref.ts"],"sourcesContent":["/**\n * DOM-free storage for configured CSS resources shared by the browser runtime\n * and server collectors.\n *\n * Astro can evaluate middleware and application code in separate module\n * graphs, so resources used by SSR are mirrored on globalThis. Keeping this\n * state outside config.ts lets server-only entrypoints read it without loading\n * StyleInjector and the rest of the browser runtime.\n */\n\nimport type {\n CounterStyleDescriptors,\n FontFaceInput,\n FunctionDefinition,\n KeyframesSteps,\n PropertyDefinition,\n} from './injector/types';\nimport type { DeclaredPropertyEntry } from './properties';\nimport { indexPropertiesByName } from './properties';\nimport { DEFAULT_PROPERTIES } from './properties/defaults';\nimport type { ConfigTokens, Styles } from './styles/types';\n\ninterface RuntimeConfigState {\n namePrefix?: string;\n nonce?: string;\n}\n\nlet runtimeConfig: RuntimeConfigState | null = null;\nlet globalFontFace: Record<string, FontFaceInput> | null = null;\nlet globalCounterStyle: Record<string, CounterStyleDescriptors> | null = null;\nlet globalFunction: Record<string, FunctionDefinition> | null = null;\nlet globalProperties: Record<string, PropertyDefinition> | null = null;\nlet globalConfigTokens: ConfigTokens | null = null;\nlet globalStyles: Record<string, Styles> | null = null;\nlet globalKeyframes: Record<string, KeyframesSteps> | null = null;\n\nconst GTKEY_TOKENS = '__tasty_cfg_tokens__';\nconst GTKEY_FONT_FACE = '__tasty_cfg_font_face__';\nconst GTKEY_COUNTER_STYLE = '__tasty_cfg_counter_style__';\nconst GTKEY_FUNCTION = '__tasty_cfg_function__';\nconst GTKEY_PROPERTIES = '__tasty_cfg_properties__';\nconst GTKEY_GLOBAL_STYLES = '__tasty_cfg_global_styles__';\nconst GTKEY_KEYFRAMES = '__tasty_cfg_keyframes__';\n\nfunction setOnGlobalThis(key: string, value: unknown): void {\n (globalThis as Record<string, unknown>)[key] = value;\n}\n\nfunction getFromGlobalThis<T>(key: string): T | undefined {\n return (globalThis as Record<string, unknown>)[key] as T | undefined;\n}\n\nexport function getRuntimeConfigState(): RuntimeConfigState | null {\n return runtimeConfig;\n}\n\nexport function setRuntimeConfigState(config: RuntimeConfigState): void {\n runtimeConfig = config;\n}\n\nexport function getEffectiveProperties(): Record<string, PropertyDefinition> {\n const properties =\n globalProperties ??\n getFromGlobalThis<Record<string, PropertyDefinition>>(GTKEY_PROPERTIES);\n return properties\n ? { ...DEFAULT_PROPERTIES, ...properties }\n : DEFAULT_PROPERTIES;\n}\n\nlet effectivePropertyIndex: {\n source: Record<string, PropertyDefinition> | null | undefined;\n index: ReadonlyMap<string, DeclaredPropertyEntry>;\n} | null = null;\n\n/**\n * The effective properties (Tasty's defaults and `configure({ properties })`)\n * keyed by the custom property each one registers — see\n * `indexPropertiesByName()`. Rebuilt only when `configure({ properties })`\n * replaces the set.\n */\nexport function getEffectivePropertiesByName(): ReadonlyMap<\n string,\n DeclaredPropertyEntry\n> {\n const source =\n globalProperties ??\n getFromGlobalThis<Record<string, PropertyDefinition>>(GTKEY_PROPERTIES);\n\n if (effectivePropertyIndex && effectivePropertyIndex.source === source) {\n return effectivePropertyIndex.index;\n }\n\n const index = indexPropertiesByName(getEffectiveProperties());\n effectivePropertyIndex = { source, index };\n return index;\n}\n\nexport function getGlobalFontFaces(): Record<string, FontFaceInput> | null {\n return (\n globalFontFace ??\n getFromGlobalThis<Record<string, FontFaceInput>>(GTKEY_FONT_FACE) ??\n null\n );\n}\n\nexport function getGlobalCounterStyles(): Record<\n string,\n CounterStyleDescriptors\n> | null {\n return (\n globalCounterStyle ??\n getFromGlobalThis<Record<string, CounterStyleDescriptors>>(\n GTKEY_COUNTER_STYLE,\n ) ??\n null\n );\n}\n\nexport function getGlobalFunctions(): Record<\n string,\n FunctionDefinition\n> | null {\n return (\n globalFunction ??\n getFromGlobalThis<Record<string, FunctionDefinition>>(GTKEY_FUNCTION) ??\n null\n );\n}\n\nexport function getGlobalConfigTokens(): ConfigTokens | null {\n return (\n globalConfigTokens ?? getFromGlobalThis<ConfigTokens>(GTKEY_TOKENS) ?? null\n );\n}\n\nexport function getGlobalStyles(): Record<string, Styles> | null {\n return (\n globalStyles ??\n getFromGlobalThis<Record<string, Styles>>(GTKEY_GLOBAL_STYLES) ??\n null\n );\n}\n\n/**\n * Get global keyframes configuration.\n * Returns null if no keyframes configured (fast path for zero-overhead).\n */\nexport function getGlobalKeyframes(): Record<string, KeyframesSteps> | null {\n return (\n globalKeyframes ??\n getFromGlobalThis<Record<string, KeyframesSteps>>(GTKEY_KEYFRAMES) ??\n null\n );\n}\n\nexport function mergeGlobalProperties(\n properties: Record<string, PropertyDefinition>,\n): void {\n globalProperties = {\n ...(globalProperties ?? getFromGlobalThis(GTKEY_PROPERTIES) ?? {}),\n ...properties,\n };\n setOnGlobalThis(GTKEY_PROPERTIES, globalProperties);\n}\n\nexport function mergeGlobalFontFaces(\n fontFaces: Record<string, FontFaceInput>,\n): void {\n globalFontFace = { ...(getGlobalFontFaces() ?? {}), ...fontFaces };\n setOnGlobalThis(GTKEY_FONT_FACE, globalFontFace);\n}\n\nexport function mergeGlobalCounterStyles(\n counterStyles: Record<string, CounterStyleDescriptors>,\n): void {\n globalCounterStyle = {\n ...(getGlobalCounterStyles() ?? {}),\n ...counterStyles,\n };\n setOnGlobalThis(GTKEY_COUNTER_STYLE, globalCounterStyle);\n}\n\nexport function mergeGlobalFunctions(\n functions: Record<string, FunctionDefinition>,\n): void {\n globalFunction = { ...(getGlobalFunctions() ?? {}), ...functions };\n setOnGlobalThis(GTKEY_FUNCTION, globalFunction);\n}\n\nexport function mergeGlobalConfigTokens(styles: ConfigTokens): void {\n globalConfigTokens = globalConfigTokens\n ? { ...globalConfigTokens, ...styles }\n : styles;\n setOnGlobalThis(GTKEY_TOKENS, globalConfigTokens);\n}\n\nexport function mergeGlobalStyles(styles: Record<string, Styles>): void {\n if (globalStyles) {\n for (const [selector, selectorStyles] of Object.entries(styles)) {\n globalStyles[selector] = globalStyles[selector]\n ? { ...globalStyles[selector], ...selectorStyles }\n : selectorStyles;\n }\n } else {\n globalStyles = { ...styles };\n }\n setOnGlobalThis(GTKEY_GLOBAL_STYLES, globalStyles);\n}\n\nexport function mergeGlobalKeyframes(\n keyframes: Record<string, KeyframesSteps>,\n): void {\n globalKeyframes = { ...(getGlobalKeyframes() ?? {}), ...keyframes };\n setOnGlobalThis(GTKEY_KEYFRAMES, globalKeyframes);\n}\n\nexport function resetConfigResources(): void {\n runtimeConfig = null;\n globalProperties = null;\n globalFontFace = null;\n globalCounterStyle = null;\n globalFunction = null;\n globalConfigTokens = null;\n globalStyles = null;\n globalKeyframes = null;\n\n const globalState = globalThis as Record<string, unknown>;\n delete globalState[GTKEY_TOKENS];\n delete globalState[GTKEY_FONT_FACE];\n delete globalState[GTKEY_COUNTER_STYLE];\n delete globalState[GTKEY_FUNCTION];\n delete globalState[GTKEY_PROPERTIES];\n delete globalState[GTKEY_GLOBAL_STYLES];\n delete globalState[GTKEY_KEYFRAMES];\n}\n","/**\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 | undefined;\n return getter ? getter() : null;\n}\n"],"mappings":";;AA2BA,IAAI,gBAA2C;AAC/C,IAAI,iBAAuD;AAC3D,IAAI,qBAAqE;AACzE,IAAI,iBAA4D;AAChE,IAAI,mBAA8D;AAClE,IAAI,qBAA0C;AAC9C,IAAI,eAA8C;AAClD,IAAI,kBAAyD;AAE7D,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,sBAAsB;AAC5B,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,kBAAkB;AAExB,SAAS,gBAAgB,KAAa,OAAsB;CAC1D,WAAwC,OAAO;AACjD;AAEA,SAAS,kBAAqB,KAA4B;CACxD,OAAQ,WAAuC;AACjD;AAEA,SAAgB,wBAAmD;CACjE,OAAO;AACT;AAEA,SAAgB,sBAAsB,QAAkC;CACtE,gBAAgB;AAClB;AAEA,SAAgB,yBAA6D;CAC3E,MAAM,aACJ,oBACA,kBAAsD,gBAAgB;CACxE,OAAO,aACH;EAAE,GAAG;EAAoB,GAAG;CAAW,IACvC;AACN;AAEA,IAAI,yBAGO;AAQX,SAAgB,+BAGd;CACA,MAAM,SACJ,oBACA,kBAAsD,gBAAgB;CAExE,IAAI,0BAA0B,uBAAuB,WAAW,QAC9D,OAAO,uBAAuB;CAGhC,MAAM,QAAQ,sBAAsB,uBAAuB,CAAC;CAC5D,yBAAyB;EAAE;EAAQ;CAAM;CACzC,OAAO;AACT;AAEA,SAAgB,qBAA2D;CACzE,O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AACnD;AAEA,SAAgB,qBACd,WACM;CACN,kBAAkB;EAAE,GAAI,mBAAmB,KAAK,CAAC;EAAI,GAAG;CAAU;CAClE,gBAAgB,iBAAiB,eAAe;AAClD;AAEA,SAAgB,uBAA6B;CAC3C,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;CACjB,qBAAqB;CACrB,iBAAiB;CACjB,qBAAqB;CACrB,eAAe;CACf,kBAAkB;CAElB,MAAM,cAAc;CACpB,OAAO,YAAY;CACnB,OAAO,YAAY;CACnB,OAAO,YAAY;CACnB,OAAO,YAAY;CACnB,OAAO,YAAY;CACnB,OAAO,YAAY;CACnB,OAAO,YAAY;AACrB;;;ACpNA,MAAM,aAAa;AAEnB,IAAI,mBAA8C;AAMlD,SAAgB,2BAA2B,IAA8B;CACvE,mBAAmB;AACrB;AAMA,SAAgB,iCAAiC,IAA8B;CAC7E,WAAwC,cAAc;AACxD;AAKA,SAAgB,4BAAyD;CACvE,IAAI,kBAAkB,OAAO,iBAAiB;CAC9C,MAAM,SAAU,WAAuC;CAEvD,OAAO,SAAS,OAAO,IAAI;AAC7B"}
@@ -809,14 +809,8 @@ fadeStyle.__lookupStyles = ["fade"];
809
809
  //#endregion
810
810
  //#region src/styles/fill.ts
811
811
  function mixFillColors(property, value, groups) {
812
- if (groups.length > 2) warnOnceDev(`fill-mix-extra:${property}:${value}`, `${property}="${value}": a mix takes two colors. The extra ones are ignored.`);
812
+ warnOnceDev(`fill-mix:${property}:${value}`, `${property}="${value}": mixing colors with a comma is deprecated. Layer the colors as a compound color instead: "#dark 4%, #surface" is "#surface+#dark.04". For any other mix, write color-mix() itself, such as "color-mix(in srgb, #dark $weight, #surface)".` + (groups.length > 2 ? " A mix takes two colors; the rest are ignored." : ""));
813
813
  const [first, second] = groups;
814
- for (const group of [first, second]) {
815
- if (group.all.length !== 1) continue;
816
- const color = group.colors[0];
817
- const fade = color && parseAlphaMix(color);
818
- if (color === "transparent" || fade && fade.percentage !== "100%") warnOnceDev(`fill-mix-alpha:${property}:${value}`, `${property}="${value}": "${group.input}" is translucent and has no percentage, so its alpha weighs it down on top of its share of the mix and the background comes out see-through. To paint it over the other color, layer it: "#surface+#dark.04", not "#dark.04, #surface". Or give it a percentage: "#dark 4%, #surface". A transparent color mixes in nothing; leave it out.`);
819
- }
820
814
  return `color-mix(in srgb, ${first.output}, ${second.output})`;
821
815
  }
822
816
  function fillStyle({ fill, backgroundColor, image, backgroundImage, backgroundPosition, backgroundSize, backgroundRepeat, backgroundAttachment, backgroundOrigin, backgroundClip, background }) {
@@ -5605,4 +5599,4 @@ function renderStylesForChunk(styles, chunkName, styleKeys, pipelineCacheKey) {
5605
5599
  //#endregion
5606
5600
  export { styleHandlers as A, STYLE_TO_CHUNK as B, camelToKebab as C, normalizeHandlerDefinition as D, defineHandler as E, DIMENSION_CHUNK_STYLES as F, setGlobalPredefinedStates as G, clearGlobalPredefinedStates as H, DISPLAY_CHUNK_STYLES as I, markStylesGeneratedState as J, hasStylesGenerated as K, FONT_CHUNK_STYLES as L, createStyle as M, APPEARANCE_CHUNK_STYLES as N, registerHandler as O, CHUNK_NAMES as P, LAYOUT_CHUNK_STYLES as R, parseStateKey as S, STYLE_HANDLER_MAP as T, createStateParserContext as U, resetStyleChunks as V, getGlobalPredefinedStates as W, resetStylesGeneratedState as X, resetGlobalPolyfillsState as Y, setGlobalPolyfillsState as Z, POSITION_STYLES as _, registerBaseStyleProps as a, renderStyles as b, BLOCK_INNER_STYLES as c, COLOR_STYLES as d, CONTAINER_STYLES as f, OUTER_STYLES as g, INNER_STYLES as h, baseStylePropsRegistry as i, scanAnimationNames as j, resetHandlers as k, BLOCK_OUTER_STYLES as l, FLOW_STYLES as m, generateChunkCacheKey as n, resetBaseStyleProps as o, DIMENSION_STYLES as p, isFunctionsPolyfillEnabled as q, categorizeStyleKeys as r, BASE_STYLES as s, renderStylesForChunk as t, BLOCK_STYLES as u, TEXT_STYLES as v, splitSelectorsSafely as w, clearParseCache as x, clearPipelineCache as y, POSITION_CHUNK_STYLES as z };
5607
5601
 
5608
- //# sourceMappingURL=style-engine-Cq7kL3Xh.js.map
5602
+ //# sourceMappingURL=style-engine-DnkV_4Jg.js.map