@tenphi/tasty 3.8.0 → 3.9.1

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 (102) hide show
  1. package/README.md +6 -6
  2. package/dist/{babel-Cp_dRhuS.d.ts → babel-Zs1Q03qt.d.ts} +2 -2
  3. package/dist/chunks/async-storage-CG5HnUT5.js +20 -0
  4. package/dist/chunks/async-storage-CG5HnUT5.js.map +1 -0
  5. package/dist/chunks/build-config-CUQVwdWF.js +42 -0
  6. package/dist/chunks/build-config-CUQVwdWF.js.map +1 -0
  7. package/dist/{collector-C7YBiY7D.js → chunks/collector-B0LTHw6Z.js} +6 -125
  8. package/dist/chunks/collector-B0LTHw6Z.js.map +1 -0
  9. package/dist/chunks/config-engine-C3pF9EK9.js +267 -0
  10. package/dist/chunks/config-engine-C3pF9EK9.js.map +1 -0
  11. package/dist/chunks/css-definitions-D_it4XZH.js +875 -0
  12. package/dist/chunks/css-definitions-D_it4XZH.js.map +1 -0
  13. package/dist/{css-resources-Cyl_axbI.js → chunks/css-resources-BN8apgxt.js} +1 -8
  14. package/dist/chunks/css-resources-BN8apgxt.js.map +1 -0
  15. package/dist/chunks/debug-C9LeNVoJ.js +501 -0
  16. package/dist/chunks/debug-C9LeNVoJ.js.map +1 -0
  17. package/dist/chunks/dsl-C5yuAn41.js +1373 -0
  18. package/dist/chunks/dsl-C5yuAn41.js.map +1 -0
  19. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  20. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  21. package/dist/chunks/react-runtime-O-OUrKLH.js +557 -0
  22. package/dist/chunks/react-runtime-O-OUrKLH.js.map +1 -0
  23. package/dist/chunks/runtime-engine-DvnE2g-E.js +2437 -0
  24. package/dist/chunks/runtime-engine-DvnE2g-E.js.map +1 -0
  25. package/dist/chunks/runtime-state-BTDqSYBk.js +127 -0
  26. package/dist/chunks/runtime-state-BTDqSYBk.js.map +1 -0
  27. package/dist/{merge-styles-ChW1k-ZM.js → chunks/shared-utils-DWA4LjIa.js} +55 -54
  28. package/dist/chunks/shared-utils-DWA4LjIa.js.map +1 -0
  29. package/dist/chunks/style-engine-C1ECBZxR.js +5131 -0
  30. package/dist/chunks/style-engine-C1ECBZxR.js.map +1 -0
  31. package/dist/{css-writer-BiumPvq-.js → chunks/zero-engine-B6EnYcXY.js} +3 -120
  32. package/dist/chunks/zero-engine-B6EnYcXY.js.map +1 -0
  33. package/dist/{collector-CUtAFyIb.d.ts → collector-hl5KNH7k.d.ts} +6 -4
  34. package/dist/{config-BY1e5y7V.d.ts → config-DWL1ZYue.d.ts} +20 -25
  35. package/dist/core/index.d.ts +5 -5
  36. package/dist/core/index.js +9 -6
  37. package/dist/{index-uX74k5jG.d.ts → index-D9N9GV24.d.ts} +17 -50
  38. package/dist/index.d.ts +5 -5
  39. package/dist/index.js +11 -922
  40. package/dist/{merge-styles-pf6iPs82.d.ts → merge-styles-C_oMoJVd.d.ts} +2 -2
  41. package/dist/ssr/astro-client.js +1 -14
  42. package/dist/ssr/astro-client.js.map +1 -1
  43. package/dist/ssr/astro-middleware-extract-static.js +1 -1
  44. package/dist/ssr/astro-middleware-extract.js +1 -1
  45. package/dist/ssr/astro-middleware-static.js +1 -12
  46. package/dist/ssr/astro-middleware-static.js.map +1 -1
  47. package/dist/ssr/astro-middleware.js +1 -13
  48. package/dist/ssr/astro-middleware.js.map +1 -1
  49. package/dist/ssr/astro.js +219 -1
  50. package/dist/ssr/astro.js.map +1 -0
  51. package/dist/ssr/index.d.ts +6 -6
  52. package/dist/ssr/index.js +4 -4
  53. package/dist/ssr/next-config.d.ts +1 -1
  54. package/dist/ssr/next-config.js +29 -20
  55. package/dist/ssr/next-config.js.map +1 -1
  56. package/dist/ssr/next.d.ts +1 -1
  57. package/dist/ssr/next.js +5 -37
  58. package/dist/ssr/next.js.map +1 -1
  59. package/dist/static/index.d.ts +2 -2
  60. package/dist/static/index.js +1 -19
  61. package/dist/static/index.js.map +1 -1
  62. package/dist/{index-DBjd4MAb.d.ts → types-jKZNpias.d.ts} +800 -800
  63. package/dist/zero/babel.d.ts +1 -1
  64. package/dist/zero/babel.js +25 -96
  65. package/dist/zero/babel.js.map +1 -1
  66. package/dist/zero/index.d.ts +1 -1
  67. package/dist/zero/index.js +1 -1
  68. package/dist/zero/next.d.ts +1 -1
  69. package/dist/zero/next.js +0 -31
  70. package/dist/zero/next.js.map +1 -1
  71. package/docs/debug.md +2 -5
  72. package/docs/pipeline.md +3 -0
  73. package/docs/runtime-benchmarks.md +105 -68
  74. package/docs/ssr.md +1 -1
  75. package/package.json +49 -6
  76. package/dist/astro-w8r-u4qo.js +0 -301
  77. package/dist/astro-w8r-u4qo.js.map +0 -1
  78. package/dist/async-storage-DKK-wTD4.js +0 -44
  79. package/dist/async-storage-DKK-wTD4.js.map +0 -1
  80. package/dist/collector-C7YBiY7D.js.map +0 -1
  81. package/dist/config-yXpe2jAV.js +0 -12668
  82. package/dist/config-yXpe2jAV.js.map +0 -1
  83. package/dist/context-CA8YKeMn.js +0 -24
  84. package/dist/context-CA8YKeMn.js.map +0 -1
  85. package/dist/core-DoEZAHJq.js +0 -1732
  86. package/dist/core-DoEZAHJq.js.map +0 -1
  87. package/dist/css-resources-Cyl_axbI.js.map +0 -1
  88. package/dist/css-writer-BiumPvq-.js.map +0 -1
  89. package/dist/format-global-rules-DklyaXv-.js +0 -22
  90. package/dist/format-global-rules-DklyaXv-.js.map +0 -1
  91. package/dist/format-rules-DHuG25KU.js +0 -104
  92. package/dist/format-rules-DHuG25KU.js.map +0 -1
  93. package/dist/hydrate-BvRP6QEC.js +0 -37
  94. package/dist/hydrate-BvRP6QEC.js.map +0 -1
  95. package/dist/index.js.map +0 -1
  96. package/dist/keyframes-B8uPLZwx.js +0 -535
  97. package/dist/keyframes-B8uPLZwx.js.map +0 -1
  98. package/dist/merge-styles-ChW1k-ZM.js.map +0 -1
  99. package/dist/resolve-recipes-BNmjANzT.js +0 -144
  100. package/dist/resolve-recipes-BNmjANzT.js.map +0 -1
  101. package/dist/ssr-collector-ref-COs_ioWl.js +0 -29
  102. package/dist/ssr-collector-ref-COs_ioWl.js.map +0 -1
@@ -0,0 +1,127 @@
1
+ import { L as DEFAULT_PROPERTIES } from "./css-definitions-D_it4XZH.js";
2
+ //#region src/config-resources.ts
3
+ let runtimeConfig = null;
4
+ let globalFontFace = null;
5
+ let globalCounterStyle = null;
6
+ let globalFunction = null;
7
+ let globalProperties = null;
8
+ let globalConfigTokens = null;
9
+ let globalStyles = null;
10
+ const GTKEY_TOKENS = "__tasty_cfg_tokens__";
11
+ const GTKEY_FONT_FACE = "__tasty_cfg_font_face__";
12
+ const GTKEY_COUNTER_STYLE = "__tasty_cfg_counter_style__";
13
+ const GTKEY_FUNCTION = "__tasty_cfg_function__";
14
+ const GTKEY_PROPERTIES = "__tasty_cfg_properties__";
15
+ const GTKEY_GLOBAL_STYLES = "__tasty_cfg_global_styles__";
16
+ function setOnGlobalThis(key, value) {
17
+ globalThis[key] = value;
18
+ }
19
+ function getFromGlobalThis(key) {
20
+ return globalThis[key];
21
+ }
22
+ function getRuntimeConfigState() {
23
+ return runtimeConfig;
24
+ }
25
+ function setRuntimeConfigState(config) {
26
+ runtimeConfig = config;
27
+ }
28
+ function getEffectiveProperties() {
29
+ const properties = globalProperties ?? getFromGlobalThis(GTKEY_PROPERTIES);
30
+ return properties ? {
31
+ ...DEFAULT_PROPERTIES,
32
+ ...properties
33
+ } : DEFAULT_PROPERTIES;
34
+ }
35
+ function getGlobalFontFaces() {
36
+ return globalFontFace ?? getFromGlobalThis(GTKEY_FONT_FACE) ?? null;
37
+ }
38
+ function getGlobalCounterStyles() {
39
+ return globalCounterStyle ?? getFromGlobalThis(GTKEY_COUNTER_STYLE) ?? null;
40
+ }
41
+ function getGlobalFunctions() {
42
+ return globalFunction ?? getFromGlobalThis(GTKEY_FUNCTION) ?? null;
43
+ }
44
+ function getGlobalConfigTokens() {
45
+ return globalConfigTokens ?? getFromGlobalThis(GTKEY_TOKENS) ?? null;
46
+ }
47
+ function getGlobalStyles() {
48
+ return globalStyles ?? getFromGlobalThis(GTKEY_GLOBAL_STYLES) ?? null;
49
+ }
50
+ function mergeGlobalProperties(properties) {
51
+ globalProperties = {
52
+ ...globalProperties ?? getFromGlobalThis(GTKEY_PROPERTIES) ?? {},
53
+ ...properties
54
+ };
55
+ setOnGlobalThis(GTKEY_PROPERTIES, globalProperties);
56
+ }
57
+ function mergeGlobalFontFaces(fontFaces) {
58
+ globalFontFace = {
59
+ ...getGlobalFontFaces() ?? {},
60
+ ...fontFaces
61
+ };
62
+ setOnGlobalThis(GTKEY_FONT_FACE, globalFontFace);
63
+ }
64
+ function mergeGlobalCounterStyles(counterStyles) {
65
+ globalCounterStyle = {
66
+ ...getGlobalCounterStyles() ?? {},
67
+ ...counterStyles
68
+ };
69
+ setOnGlobalThis(GTKEY_COUNTER_STYLE, globalCounterStyle);
70
+ }
71
+ function mergeGlobalFunctions(functions) {
72
+ globalFunction = {
73
+ ...getGlobalFunctions() ?? {},
74
+ ...functions
75
+ };
76
+ setOnGlobalThis(GTKEY_FUNCTION, globalFunction);
77
+ }
78
+ function mergeGlobalConfigTokens(styles) {
79
+ globalConfigTokens = globalConfigTokens ? {
80
+ ...globalConfigTokens,
81
+ ...styles
82
+ } : styles;
83
+ setOnGlobalThis(GTKEY_TOKENS, globalConfigTokens);
84
+ }
85
+ function mergeGlobalStyles(styles) {
86
+ if (globalStyles) for (const [selector, selectorStyles] of Object.entries(styles)) globalStyles[selector] = globalStyles[selector] ? {
87
+ ...globalStyles[selector],
88
+ ...selectorStyles
89
+ } : selectorStyles;
90
+ else globalStyles = { ...styles };
91
+ setOnGlobalThis(GTKEY_GLOBAL_STYLES, globalStyles);
92
+ }
93
+ function resetConfigResources() {
94
+ runtimeConfig = null;
95
+ globalProperties = null;
96
+ globalFontFace = null;
97
+ globalCounterStyle = null;
98
+ globalFunction = null;
99
+ globalConfigTokens = null;
100
+ globalStyles = null;
101
+ const globalState = globalThis;
102
+ delete globalState[GTKEY_TOKENS];
103
+ delete globalState[GTKEY_FONT_FACE];
104
+ delete globalState[GTKEY_COUNTER_STYLE];
105
+ delete globalState[GTKEY_FUNCTION];
106
+ delete globalState[GTKEY_PROPERTIES];
107
+ delete globalState[GTKEY_GLOBAL_STYLES];
108
+ }
109
+ //#endregion
110
+ //#region src/ssr/ssr-collector-ref.ts
111
+ const GETTER_KEY = "__tasty_ssr_collector_getter__";
112
+ let _getSSRCollector = null;
113
+ function registerSSRCollectorGetter(fn) {
114
+ _getSSRCollector = fn;
115
+ }
116
+ function registerSSRCollectorGetterGlobal(fn) {
117
+ globalThis[GETTER_KEY] = fn;
118
+ }
119
+ function getRegisteredSSRCollector() {
120
+ if (_getSSRCollector) return _getSSRCollector();
121
+ const getter = globalThis[GETTER_KEY];
122
+ return getter ? getter() : null;
123
+ }
124
+ //#endregion
125
+ export { resetConfigResources as _, getGlobalConfigTokens as a, getGlobalFunctions as c, mergeGlobalConfigTokens as d, mergeGlobalCounterStyles as f, mergeGlobalStyles as g, mergeGlobalProperties as h, getEffectiveProperties as i, getGlobalStyles as l, mergeGlobalFunctions as m, registerSSRCollectorGetter as n, getGlobalCounterStyles as o, mergeGlobalFontFaces as p, registerSSRCollectorGetterGlobal as r, getGlobalFontFaces as s, getRegisteredSSRCollector as t, getRuntimeConfigState as u, setRuntimeConfigState as v };
126
+
127
+ //# sourceMappingURL=runtime-state-BTDqSYBk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-state-BTDqSYBk.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 PropertyDefinition,\n} from './injector/types';\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;\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__';\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\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\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 resetConfigResources(): void {\n runtimeConfig = null;\n globalProperties = null;\n globalFontFace = null;\n globalCounterStyle = null;\n globalFunction = null;\n globalConfigTokens = null;\n globalStyles = 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}\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":";;AAwBA,IAAI,gBAA2C;AAC/C,IAAI,iBAAuD;AAC3D,IAAI,qBAAqE;AACzE,IAAI,iBAA4D;AAChE,IAAI,mBAA8D;AAClE,IAAI,qBAA0C;AAC9C,IAAI,eAA8C;AAElD,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,sBAAsB;AAC5B,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAE5B,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,SAAgB,qBAA2D;CACzE,OACE,kBACA,kBAAiD,eAAe,KAChE;AAEJ;AAEA,SAAgB,yBAGP;CACP,OACE,sBACA,kBACE,mBACF,KACA;AAEJ;AAEA,SAAgB,qBAGP;CACP,OACE,kBACA,kBAAsD,cAAc,KACpE;AAEJ;AAEA,SAAgB,wBAA6C;CAC3D,OACE,sBAAsB,kBAAgC,YAAY,KAAK;AAE3E;AAEA,SAAgB,kBAAiD;CAC/D,OACE,gBACA,kBAA0C,mBAAmB,KAC7D;AAEJ;AAEA,SAAgB,sBACd,YACM;CACN,mBAAmB;EACjB,GAA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AAgB,4BAAyD;CACvE,IAAI,kBAAkB,OAAO,iBAAiB;CAC9C,MAAM,SAAU,WAAuC;CAEvD,OAAO,SAAS,OAAO,IAAI;AAC7B"}
@@ -1,36 +1,49 @@
1
- import { I as isSelector, Qt as isDevEnv } from "./config-yXpe2jAV.js";
1
+ //#region src/utils/is-dev-env.ts
2
+ function isDevEnv() {
3
+ if (typeof window !== "undefined" && window.localStorage) try {
4
+ const forceTastyDebug = window.localStorage.getItem("TASTY_DEBUG");
5
+ if (forceTastyDebug !== null && forceTastyDebug.toLowerCase() === "true") return true;
6
+ } catch {}
7
+ if (typeof process === "undefined") return false;
8
+ return true;
9
+ }
10
+ //#endregion
11
+ //#region src/utils/warnings.ts
12
+ const PREFIX = "[Tasty]";
13
+ const emittedWarnings = /* @__PURE__ */ new Set();
14
+ function warn(...args) {
15
+ console.warn(PREFIX, ...args);
16
+ }
17
+ function warnOnceDev(key, message) {
18
+ if (emittedWarnings.has(key)) return;
19
+ emittedWarnings.add(key);
20
+ if (!isDevEnv()) return;
21
+ console.warn(`${PREFIX} ${message}`);
22
+ }
23
+ function resetStyleWarnings() {
24
+ emittedWarnings.clear();
25
+ }
26
+ //#endregion
27
+ //#region src/utils/is-selector.ts
28
+ function isSelector(key) {
29
+ const first = key.charCodeAt(0);
30
+ return first === 38 || first === 46 || first >= 65 && first <= 90;
31
+ }
32
+ //#endregion
2
33
  //#region src/utils/merge-styles.ts
3
34
  const devMode = isDevEnv();
4
35
  const INHERIT_VALUE = "@inherit";
5
- /**
6
- * Check if a value is a state map (object, not array).
7
- */
36
+ function warnMissingInherit(key) {
37
+ if (devMode) console.warn(`[Tasty] @inherit used for state '${key}' that does not exist in the parent style map. Entry skipped.`);
38
+ }
8
39
  function isStateMap(value) {
9
40
  return typeof value === "object" && value !== null && !Array.isArray(value);
10
41
  }
11
- /**
12
- * Normalize a parent value to a state map.
13
- * - Already a state map → return as-is
14
- * - Non-null, non-false primitive → wrap as `{ '': value }`
15
- * - null / undefined / false → return null (no parent to merge with)
16
- */
17
42
  function normalizeToStateMap(value) {
18
43
  if (isStateMap(value)) return value;
19
44
  if (value != null && value !== false) return { "": value };
20
45
  return null;
21
46
  }
22
- /**
23
- * Resolve a child state map against a parent value.
24
- *
25
- * Mode is determined by whether the child contains a `''` (default) key:
26
- * - No `''` → extend mode: parent entries preserved, child adds/overrides/repositions
27
- * - Has `''` → replace mode: child defines everything, `@inherit` cherry-picks from parent
28
- *
29
- * In both modes:
30
- * - `@inherit` value → resolve from parent state map
31
- * - `null` value → remove this state from the result
32
- * - `false` value → tombstone, persists through all layers, blocks recipe
33
- */
34
47
  function resolveStateMap(parentValue, childMap) {
35
48
  const isExtend = !("" in childMap);
36
49
  const parentMap = normalizeToStateMap(parentValue);
@@ -46,49 +59,37 @@ function resolveStateMap(parentValue, childMap) {
46
59
  if (isExtend) return resolveExtendMode(parentMap, childMap);
47
60
  return resolveReplaceMode(parentMap, childMap);
48
61
  }
49
- /**
50
- * Extend mode: parent entries are preserved, child entries add/override/reposition.
51
- */
52
62
  function resolveExtendMode(parentMap, childMap) {
53
- const inheritKeys = /* @__PURE__ */ new Set();
54
- const removeKeys = /* @__PURE__ */ new Set();
55
- const overrideKeys = /* @__PURE__ */ new Map();
56
- for (const key of Object.keys(childMap)) {
57
- const val = childMap[key];
58
- if (val === INHERIT_VALUE) {
59
- if (key in parentMap) inheritKeys.add(key);
60
- else if (devMode) console.warn(`[Tasty] @inherit used for state '${key}' that does not exist in the parent style map. Entry skipped.`);
61
- } else if (val === null) removeKeys.add(key);
62
- else if (key in parentMap) overrideKeys.set(key, val);
63
- }
64
63
  const result = {};
64
+ const childKeys = Object.keys(childMap);
65
+ const childKeySet = new Set(childKeys);
65
66
  for (const key of Object.keys(parentMap)) {
66
- if (removeKeys.has(key)) continue;
67
- if (inheritKeys.has(key)) continue;
68
- if (overrideKeys.has(key)) result[key] = overrideKeys.get(key);
69
- else result[key] = parentMap[key];
67
+ if (!childKeySet.has(key)) {
68
+ result[key] = parentMap[key];
69
+ continue;
70
+ }
71
+ const childValue = childMap[key];
72
+ if (childValue === null || childValue === INHERIT_VALUE) continue;
73
+ result[key] = childValue;
74
+ }
75
+ for (const key of childKeys) {
76
+ const value = childMap[key];
77
+ if (value === INHERIT_VALUE) if (key in parentMap) result[key] = parentMap[key];
78
+ else warnMissingInherit(key);
79
+ else if (value !== null && !(key in parentMap)) result[key] = value;
70
80
  }
71
- for (const key of Object.keys(childMap)) if (inheritKeys.has(key)) result[key] = parentMap[key];
72
- else if (!removeKeys.has(key) && !overrideKeys.has(key) && childMap[key] !== INHERIT_VALUE) result[key] = childMap[key];
73
81
  return result;
74
82
  }
75
- /**
76
- * Replace mode: child entries define the result, `@inherit` pulls from parent.
77
- */
78
83
  function resolveReplaceMode(parentMap, childMap) {
79
84
  const result = {};
80
85
  for (const key of Object.keys(childMap)) {
81
86
  const val = childMap[key];
82
- if (val === INHERIT_VALUE) {
83
- if (key in parentMap) result[key] = parentMap[key];
84
- else if (devMode) console.warn(`[Tasty] @inherit used for state '${key}' that does not exist in the parent style map. Entry skipped.`);
85
- } else if (val !== null) result[key] = val;
87
+ if (val === INHERIT_VALUE) if (key in parentMap) result[key] = parentMap[key];
88
+ else warnMissingInherit(key);
89
+ else if (val !== null) result[key] = val;
86
90
  }
87
91
  return result;
88
92
  }
89
- /**
90
- * Merge sub-element properties with state map / null / undefined support.
91
- */
92
93
  function mergeSubElementStyles(parentSub, childSub) {
93
94
  const parent = parentSub;
94
95
  const child = childSub;
@@ -139,6 +140,6 @@ function mergeStyles(...objects) {
139
140
  return styles;
140
141
  }
141
142
  //#endregion
142
- export { mergeStyles as t };
143
+ export { warnOnceDev as a, warn as i, isSelector as n, isDevEnv as o, resetStyleWarnings as r, mergeStyles as t };
143
144
 
144
- //# sourceMappingURL=merge-styles-ChW1k-ZM.js.map
145
+ //# sourceMappingURL=shared-utils-DWA4LjIa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-utils-DWA4LjIa.js","names":[],"sources":["../../src/utils/is-dev-env.ts","../../src/utils/warnings.ts","../../src/utils/is-selector.ts","../../src/utils/merge-styles.ts"],"sourcesContent":["/**\n * Check if we're in a development environment at runtime\n * Uses bracket notation to avoid bundler compilation\n * Also checks for TASTY_DEBUG localStorage setting\n */\nexport function isDevEnv(): boolean {\n // Check localStorage for DEBUG_TASTY setting (browser environment)\n if (typeof window !== 'undefined' && window.localStorage) {\n try {\n const forceTastyDebug = window.localStorage.getItem('TASTY_DEBUG');\n if (\n forceTastyDebug !== null &&\n forceTastyDebug.toLowerCase() === 'true'\n ) {\n return true;\n }\n } catch {\n // localStorage might not be available (private browsing, etc.)\n // Continue with other checks\n }\n }\n\n // Check NODE_ENV for Node.js environments\n if (typeof process === 'undefined') return false;\n\n // Use bracket notation to avoid bundler replacement\n const nodeEnv = process.env?.['NODE_ENV'];\n return nodeEnv !== 'test' && nodeEnv !== 'production';\n}\n","import { isDevEnv } from './is-dev-env';\n\nconst PREFIX = '[Tasty]';\n\n/** Warning keys already emitted, so each distinct diagnostic warns once. */\nconst emittedWarnings = new Set<string>();\n\nexport function warn(...args: unknown[]) {\n console.warn(PREFIX, ...args);\n}\n\n/** Emit a warning at most once per key. No-op outside development mode. */\nexport function warnOnceDev(key: string, message: string): void {\n if (emittedWarnings.has(key)) return;\n emittedWarnings.add(key);\n\n if (!isDevEnv()) return;\n\n console.warn(`${PREFIX} ${message}`);\n}\n\n/** Forget emitted style warnings. Called by `resetConfig()` for test isolation. */\nexport function resetStyleWarnings(): void {\n emittedWarnings.clear();\n}\n","/** Check whether a style-object key identifies a nested CSS selector. */\nexport function isSelector(key: string): boolean {\n const first = key.charCodeAt(0);\n return (\n first === 38 || // &\n first === 46 || // .\n (first >= 65 && first <= 90) // A-Z\n );\n}\n","import type { Styles, StylesWithoutSelectors } from '../styles/types';\n\nimport { isDevEnv } from './is-dev-env';\nimport { isSelector } from './is-selector';\n\nconst devMode = isDevEnv();\n\nconst INHERIT_VALUE = '@inherit';\n\nfunction warnMissingInherit(key: string): void {\n if (devMode) {\n console.warn(\n `[Tasty] @inherit used for state '${key}' that does not exist in the parent style map. Entry skipped.`,\n );\n }\n}\n\n/**\n * Check if a value is a state map (object, not array).\n */\nfunction isStateMap(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Normalize a parent value to a state map.\n * - Already a state map → return as-is\n * - Non-null, non-false primitive → wrap as `{ '': value }`\n * - null / undefined / false → return null (no parent to merge with)\n */\nfunction normalizeToStateMap(value: unknown): Record<string, unknown> | null {\n if (isStateMap(value)) return value as Record<string, unknown>;\n if (value != null && value !== false) return { '': value };\n return null;\n}\n\n/**\n * Resolve a child state map against a parent value.\n *\n * Mode is determined by whether the child contains a `''` (default) key:\n * - No `''` → extend mode: parent entries preserved, child adds/overrides/repositions\n * - Has `''` → replace mode: child defines everything, `@inherit` cherry-picks from parent\n *\n * In both modes:\n * - `@inherit` value → resolve from parent state map\n * - `null` value → remove this state from the result\n * - `false` value → tombstone, persists through all layers, blocks recipe\n */\nfunction resolveStateMap(\n parentValue: unknown,\n childMap: Record<string, unknown>,\n): Record<string, unknown> {\n const isExtend = !('' in childMap);\n const parentMap = normalizeToStateMap(parentValue);\n\n if (!parentMap) {\n // No parent to merge with — strip nulls and @inherit, return child entries\n const result: Record<string, unknown> = {};\n for (const key of Object.keys(childMap)) {\n const val = childMap[key];\n if (val === null || val === INHERIT_VALUE) continue;\n result[key] = val;\n }\n return result;\n }\n\n if (isExtend) {\n return resolveExtendMode(parentMap, childMap);\n }\n\n return resolveReplaceMode(parentMap, childMap);\n}\n\n/**\n * Extend mode: parent entries are preserved, child entries add/override/reposition.\n */\nfunction resolveExtendMode(\n parentMap: Record<string, unknown>,\n childMap: Record<string, unknown>,\n): Record<string, unknown> {\n // 1. Parent entries in order (skip removed, skip repositioned, apply overrides)\n const result: Record<string, unknown> = {};\n const childKeys = Object.keys(childMap);\n const childKeySet = new Set(childKeys);\n for (const key of Object.keys(parentMap)) {\n if (!childKeySet.has(key)) {\n result[key] = parentMap[key];\n continue;\n }\n const childValue = childMap[key];\n if (childValue === null || childValue === INHERIT_VALUE) continue;\n result[key] = childValue;\n }\n\n // 2. Append new + repositioned entries in child declaration order\n for (const key of childKeys) {\n const value = childMap[key];\n if (value === INHERIT_VALUE) {\n if (key in parentMap) {\n result[key] = parentMap[key];\n } else warnMissingInherit(key);\n } else if (value !== null && !(key in parentMap)) {\n result[key] = value;\n }\n }\n\n return result;\n}\n\n/**\n * Replace mode: child entries define the result, `@inherit` pulls from parent.\n */\nfunction resolveReplaceMode(\n parentMap: Record<string, unknown>,\n childMap: Record<string, unknown>,\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n\n for (const key of Object.keys(childMap)) {\n const val = childMap[key];\n if (val === INHERIT_VALUE) {\n if (key in parentMap) {\n result[key] = parentMap[key];\n } else warnMissingInherit(key);\n } else if (val !== null) {\n result[key] = val;\n }\n }\n\n return result;\n}\n\n/**\n * Merge sub-element properties with state map / null / undefined support.\n */\nfunction mergeSubElementStyles(\n parentSub: StylesWithoutSelectors | undefined,\n childSub: StylesWithoutSelectors,\n): StylesWithoutSelectors {\n const parent = parentSub as Record<string, unknown> | undefined;\n const child = childSub as Record<string, unknown>;\n const merged: Record<string, unknown> = { ...parent, ...child };\n\n for (const key of Object.keys(child)) {\n const val = child[key];\n\n if (val === undefined) {\n if (parent && key in parent) {\n merged[key] = parent[key];\n }\n } else if (val === null) {\n delete merged[key];\n } else if (isStateMap(val)) {\n merged[key] = resolveStateMap(\n parent ? parent[key] : undefined,\n val as Record<string, unknown>,\n );\n }\n }\n\n return merged as StylesWithoutSelectors;\n}\n\nexport function mergeStyles(...objects: (Styles | undefined | null)[]): Styles {\n let styles: Styles = objects[0] ? { ...objects[0] } : {};\n let pos = 1;\n\n while (pos in objects) {\n const selectorKeys = Object.keys(styles).filter(\n (key) => isSelector(key) && styles[key],\n );\n const newStyles = objects[pos];\n\n if (newStyles) {\n const resultStyles = { ...styles, ...newStyles };\n\n // Collect all selector keys from both parent and child\n const newSelectorKeys = Object.keys(newStyles).filter(isSelector);\n const allSelectorKeys = new Set([...selectorKeys, ...newSelectorKeys]);\n\n for (const key of allSelectorKeys) {\n const newValue = newStyles?.[key];\n\n if (newValue === false || newValue === null) {\n delete resultStyles[key];\n } else if (newValue === undefined) {\n resultStyles[key] = styles[key];\n } else if (newValue) {\n resultStyles[key] = mergeSubElementStyles(\n styles[key] as StylesWithoutSelectors,\n newValue as StylesWithoutSelectors,\n );\n }\n }\n\n // Handle non-selector properties: state maps, null, undefined\n for (const key of Object.keys(newStyles)) {\n if (isSelector(key)) continue;\n\n const newValue = newStyles[key];\n\n if (newValue === undefined) {\n if (key in styles) {\n resultStyles[key] = styles[key];\n } else {\n delete resultStyles[key];\n }\n } else if (newValue === null) {\n delete resultStyles[key];\n } else if (isStateMap(newValue)) {\n (resultStyles as Record<string, unknown>)[key] = resolveStateMap(\n styles[key],\n newValue as Record<string, unknown>,\n );\n }\n }\n\n styles = resultStyles;\n }\n\n pos++;\n }\n\n return styles;\n}\n"],"mappings":";AAKA,SAAgB,WAAoB;CAElC,IAAI,OAAO,WAAW,eAAe,OAAO,cAC1C,IAAI;EACF,MAAM,kBAAkB,OAAO,aAAa,QAAQ,aAAa;EACjE,IACE,oBAAoB,QACpB,gBAAgB,YAAY,MAAM,QAElC,OAAO;CAEX,QAAQ,CAGR;CAIF,IAAI,OAAO,YAAY,aAAa,OAAO;CAI3C,OAA6B;AAC/B;;;AC1BA,MAAM,SAAS;AAGf,MAAM,kCAAkB,IAAI,IAAY;AAExC,SAAgB,KAAK,GAAG,MAAiB;CACvC,QAAQ,KAAK,QAAQ,GAAG,IAAI;AAC9B;AAGA,SAAgB,YAAY,KAAa,SAAuB;CAC9D,IAAI,gBAAgB,IAAI,GAAG,GAAG;CAC9B,gBAAgB,IAAI,GAAG;CAEvB,IAAI,CAAC,SAAS,GAAG;CAEjB,QAAQ,KAAK,GAAG,OAAO,GAAG,SAAS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