@tenphi/tasty 3.7.0 → 3.8.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 (54) hide show
  1. package/dist/{astro-CeYENy2x.js → astro-w8r-u4qo.js} +3 -3
  2. package/dist/{astro-CeYENy2x.js.map → astro-w8r-u4qo.js.map} +1 -1
  3. package/dist/{babel-DWCsafYw.d.ts → babel-Cp_dRhuS.d.ts} +2 -2
  4. package/dist/{collector-B3OsM252.js → collector-C7YBiY7D.js} +3 -3
  5. package/dist/{collector-B3OsM252.js.map → collector-C7YBiY7D.js.map} +1 -1
  6. package/dist/{collector-BTVXj2hS.d.ts → collector-CUtAFyIb.d.ts} +2 -2
  7. package/dist/{config-LfIDmVHx.d.ts → config-BY1e5y7V.d.ts} +2 -2
  8. package/dist/{config-B3gPdCqd.js → config-yXpe2jAV.js} +404 -157
  9. package/dist/config-yXpe2jAV.js.map +1 -0
  10. package/dist/core/index.d.ts +4 -4
  11. package/dist/core/index.js +5 -5
  12. package/dist/{core-DGm0CFHP.js → core-DoEZAHJq.js} +5 -5
  13. package/dist/{core-DGm0CFHP.js.map → core-DoEZAHJq.js.map} +1 -1
  14. package/dist/{css-writer-Bgowobbx.js → css-writer-BiumPvq-.js} +3 -3
  15. package/dist/{css-writer-Bgowobbx.js.map → css-writer-BiumPvq-.js.map} +1 -1
  16. package/dist/{format-rules-XRw9u7d4.js → format-rules-DHuG25KU.js} +2 -2
  17. package/dist/{format-rules-XRw9u7d4.js.map → format-rules-DHuG25KU.js.map} +1 -1
  18. package/dist/{hydrate-CNOmZprz.js → hydrate-BvRP6QEC.js} +2 -2
  19. package/dist/{hydrate-CNOmZprz.js.map → hydrate-BvRP6QEC.js.map} +1 -1
  20. package/dist/{index-BmogEzTo.d.ts → index-DBjd4MAb.d.ts} +46 -5
  21. package/dist/{index-Bm9ltvdH.d.ts → index-uX74k5jG.d.ts} +93 -46
  22. package/dist/index.d.ts +4 -4
  23. package/dist/index.js +6 -6
  24. package/dist/{keyframes-DE-OE76F.js → keyframes-B8uPLZwx.js} +2 -2
  25. package/dist/{keyframes-DE-OE76F.js.map → keyframes-B8uPLZwx.js.map} +1 -1
  26. package/dist/{merge-styles-DuoZEsm9.js → merge-styles-ChW1k-ZM.js} +2 -2
  27. package/dist/{merge-styles-DuoZEsm9.js.map → merge-styles-ChW1k-ZM.js.map} +1 -1
  28. package/dist/{merge-styles-BcLl1u_d.d.ts → merge-styles-pf6iPs82.d.ts} +2 -2
  29. package/dist/{resolve-recipes-H9NqOQuP.js → resolve-recipes-BNmjANzT.js} +3 -3
  30. package/dist/{resolve-recipes-H9NqOQuP.js.map → resolve-recipes-BNmjANzT.js.map} +1 -1
  31. package/dist/ssr/astro-client.js +1 -1
  32. package/dist/ssr/astro-middleware-extract-static.js +1 -1
  33. package/dist/ssr/astro-middleware-extract.js +1 -1
  34. package/dist/ssr/astro-middleware-static.js +1 -1
  35. package/dist/ssr/astro-middleware.js +1 -1
  36. package/dist/ssr/astro.js +1 -1
  37. package/dist/ssr/index.d.ts +1 -1
  38. package/dist/ssr/index.js +2 -2
  39. package/dist/ssr/next-config.d.ts +1 -1
  40. package/dist/ssr/next-config.js +2 -2
  41. package/dist/ssr/next.d.ts +1 -1
  42. package/dist/ssr/next.js +3 -3
  43. package/dist/static/index.d.ts +2 -2
  44. package/dist/static/index.js +1 -1
  45. package/dist/zero/babel.d.ts +1 -1
  46. package/dist/zero/babel.js +4 -4
  47. package/dist/zero/index.d.ts +1 -1
  48. package/dist/zero/index.js +1 -1
  49. package/dist/zero/next.d.ts +1 -1
  50. package/docs/ai-agents.md +8 -3
  51. package/docs/methodology.md +3 -3
  52. package/docs/styles.md +43 -11
  53. package/package.json +6 -6
  54. package/dist/config-B3gPdCqd.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { _ as TastyPluginFactory, w as StyleInjector } from "./config-LfIDmVHx.js";
2
- import { B as StyleValueStateMap, D as CSSMap, I as StyleHandlerResult, M as ResolvedStyleValue, R as StylePropValue, St as KeyframesSteps, _t as InjectResult, at as CSSProperties$1, b as Styles, dt as FunctionDefinition, gt as InjectOptions, ht as GlobalInjectResult, j as RawStyleHandler, kt as StyleInjectorConfig, lt as FontFaceDescriptors, mt as GCOptions, n as StyleResult, nt as StyleDetails, ot as CacheMetrics, st as CounterStyleDescriptors, ut as FontFaceInput, wt as PropertyOptions, x as StylesInterface, xt as KeyframesResult, z as StyleValue } from "./index-BmogEzTo.js";
3
- import { r as ServerStyleCollector } from "./collector-BTVXj2hS.js";
1
+ import { _ as TastyPluginFactory, w as StyleInjector } from "./config-BY1e5y7V.js";
2
+ import { B as StyleValueStateMap, D as CSSMap, I as StyleHandlerResult, M as ResolvedStyleValue, N as StyleHandler, R as StylePropValue, St as KeyframesSteps, _t as InjectResult, at as CSSProperties$1, b as Styles, dt as FunctionDefinition, gt as InjectOptions, ht as GlobalInjectResult, j as RawStyleHandler, kt as StyleInjectorConfig, lt as FontFaceDescriptors, mt as GCOptions, n as StyleResult, nt as StyleDetails, ot as CacheMetrics, st as CounterStyleDescriptors, ut as FontFaceInput, wt as PropertyOptions, x as StylesInterface, xt as KeyframesResult, z as StyleValue } from "./index-DBjd4MAb.js";
3
+ import { r as ServerStyleCollector } from "./collector-CUtAFyIb.js";
4
4
  import { AllHTMLAttributes, CSSProperties, ComponentType, ElementType, ForwardRefExoticComponent, JSX, PropsWithoutRef, ReactNode, RefAttributes } from "react";
5
5
 
6
6
  //#region src/utils/name-prefix.d.ts
@@ -31,17 +31,17 @@ declare const DEFAULT_ZERO_NAME_PREFIX = "ts";
31
31
  //#endregion
32
32
  //#region src/styles/list.d.ts
33
33
  declare const BASE_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition"];
34
- declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin"];
35
- declare const BLOCK_INNER_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign"];
36
- declare const BLOCK_OUTER_STYLES: readonly ["border", "radius", "shadow", "outline"];
37
- declare const BLOCK_STYLES: readonly ["padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline"];
34
+ declare const POSITION_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding"];
35
+ declare const BLOCK_INNER_STYLES: readonly ["padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign"];
36
+ declare const BLOCK_OUTER_STYLES: readonly ["border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
37
+ declare const BLOCK_STYLES: readonly ["padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
38
38
  declare const COLOR_STYLES: readonly ["color", "fill", "fade", "image"];
39
39
  declare const TEXT_STYLES: readonly ["textTransform", "fontWeight", "fontStyle"];
40
- declare const DIMENSION_STYLES: readonly ["width", "height", "flexBasis", "flexGrow", "flexShrink", "flex"];
40
+ declare const DIMENSION_STYLES: readonly ["width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex"];
41
41
  declare const FLOW_STYLES: readonly ["flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
42
- declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "border", "radius", "shadow", "outline", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
43
- declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "inset", "position", "scrollMargin", "width", "height", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "radius", "shadow", "outline"];
44
- declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "paddingInline", "paddingBlock", "overflow", "scrollbar", "textAlign", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
42
+ declare const CONTAINER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex", "gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding", "padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
43
+ declare const OUTER_STYLES: readonly ["gridArea", "order", "gridColumn", "gridRow", "placeSelf", "alignSelf", "justifySelf", "zIndex", "margin", "blockMargin", "inlineMargin", "inset", "blockInset", "inlineInset", "position", "scrollMargin", "blockScrollMargin", "inlineScrollMargin", "scrollPadding", "blockScrollPadding", "inlineScrollPadding", "width", "height", "blockSize", "inlineSize", "flexBasis", "flexGrow", "flexShrink", "flex", "border", "blockBorder", "inlineBorder", "radius", "shadow", "outline"];
44
+ declare const INNER_STYLES: readonly ["display", "font", "preset", "hide", "whiteSpace", "opacity", "transition", "color", "fill", "fade", "image", "padding", "blockPadding", "inlinePadding", "overflow", "scrollbar", "textAlign", "flow", "place", "placeItems", "placeContent", "alignItems", "alignContent", "justifyItems", "justifyContent", "align", "justify", "gap", "columnGap", "rowGap", "gridColumns", "gridRows", "gridTemplate", "gridAreas"];
45
45
  //#endregion
46
46
  //#region src/types.d.ts
47
47
  /**
@@ -887,8 +887,8 @@ declare function resolveFunctionColor(str: string): string | null;
887
887
  /**
888
888
  * Chunk names, the built-in chunk style lists, and the style→chunk lookup.
889
889
  *
890
- * This is a **leaf module with no imports**. It exists separately from
891
- * `definitions.ts` for two reasons:
890
+ * This module only imports data-only style-name lists. It exists separately
891
+ * from `definitions.ts` for two reasons:
892
892
  *
893
893
  * 1. The style handler registry (`styles/predefined.ts`) needs to assign chunk
894
894
  * membership for custom handlers. Reaching for `definitions.ts` would create an
@@ -917,7 +917,7 @@ type ChunkName = (typeof CHUNK_NAMES)[keyof typeof CHUNK_NAMES];
917
917
  *
918
918
  * @public
919
919
  */
920
- declare const APPEARANCE_CHUNK_STYLES: readonly ["fill", "color", "opacity", "border", "radius", "outline", "outlineOffset", "shadow", "fade"];
920
+ declare const APPEARANCE_CHUNK_STYLES: readonly ["fill", "color", "opacity", "border", "blockBorder", "inlineBorder", "radius", "outline", "outlineOffset", "shadow", "fade"];
921
921
  /**
922
922
  * Font chunk - typography styles
923
923
  *
@@ -931,13 +931,15 @@ declare const FONT_CHUNK_STYLES: readonly ["preset", "font", "fontWeight", "font
931
931
  * Dimension chunk - sizing and spacing
932
932
  *
933
933
  * Handler dependencies (all styles in each handler MUST stay in this chunk):
934
- * ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left, paddingBlock/Inline
935
- * ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left, marginBlock/Inline
934
+ * ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left
935
+ * ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left
936
936
  * ⚠️ widthStyle: width, minWidth, maxWidth
937
937
  * ⚠️ heightStyle: height, minHeight, maxHeight
938
+ * ⚠️ blockSizeStyle: blockSize, minBlockSize, maxBlockSize
939
+ * ⚠️ inlineSizeStyle: inlineSize, minInlineSize, maxInlineSize
938
940
  */
939
941
  /** @public */
940
- declare const DIMENSION_CHUNK_STYLES: readonly ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingBlock", "paddingInline", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginBlock", "marginInline", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "flexBasis", "flexGrow", "flexShrink", "flex"];
942
+ declare const DIMENSION_CHUNK_STYLES: readonly ["padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "blockPadding", "inlinePadding", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "blockMargin", "inlineMargin", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "blockSize", "minBlockSize", "maxBlockSize", "inlineSize", "minInlineSize", "maxInlineSize", "flexBasis", "flexGrow", "flexShrink", "flex"];
941
943
  /**
942
944
  * Display chunk - display mode, layout flow, text overflow, and scrollbar
943
945
  *
@@ -961,10 +963,10 @@ declare const LAYOUT_CHUNK_STYLES: readonly ["placeItems", "placeContent", "alig
961
963
  * Position chunk - element positioning
962
964
  *
963
965
  * Handler dependencies (all styles in each handler MUST stay in this chunk):
964
- * ⚠️ insetStyle: inset, insetBlock, insetInline, top, right, bottom, left
966
+ * ⚠️ insetStyle: inset, top, right, bottom, left
965
967
  */
966
968
  /** @public */
967
- declare const POSITION_CHUNK_STYLES: readonly ["position", "inset", "insetBlock", "insetInline", "top", "right", "bottom", "left", "zIndex", "gridArea", "gridColumn", "gridRow", "order", "placeSelf", "alignSelf", "justifySelf", "transform", "transition", "animation"];
969
+ declare const POSITION_CHUNK_STYLES: readonly ["position", "inset", "blockInset", "inlineInset", "top", "right", "bottom", "left", "blockScrollMargin", "inlineScrollMargin", "blockScrollPadding", "inlineScrollPadding", "zIndex", "gridArea", "gridColumn", "gridRow", "order", "placeSelf", "alignSelf", "justifySelf", "transform", "transition", "animation"];
968
970
  /**
969
971
  * Map for O(1) style-to-chunk lookup. Seeded with the built-in lists above and
970
972
  * extended by {@link assignStyleChunk} when a custom handler declares style names
@@ -1013,6 +1015,20 @@ declare namespace borderStyle {
1013
1015
  var __lookupStyles: string[];
1014
1016
  }
1015
1017
  //#endregion
1018
+ //#region src/styles/blockSize.d.ts
1019
+ declare function blockSizeStyle({
1020
+ blockSize,
1021
+ minBlockSize,
1022
+ maxBlockSize
1023
+ }: {
1024
+ blockSize?: string | number | boolean;
1025
+ minBlockSize?: string | number | boolean;
1026
+ maxBlockSize?: string | number | boolean;
1027
+ }): Record<string, string | string[]> | null;
1028
+ declare namespace blockSizeStyle {
1029
+ var __lookupStyles: ("blockSize" | "maxBlockSize" | "minBlockSize")[];
1030
+ }
1031
+ //#endregion
1016
1032
  //#region src/styles/color.d.ts
1017
1033
  declare function colorStyle({
1018
1034
  color
@@ -1165,16 +1181,12 @@ declare namespace heightStyle {
1165
1181
  //#region src/styles/inset.d.ts
1166
1182
  declare function insetStyle({
1167
1183
  inset,
1168
- insetBlock,
1169
- insetInline,
1170
1184
  top,
1171
1185
  right,
1172
1186
  bottom,
1173
1187
  left
1174
1188
  }: {
1175
1189
  inset?: string | number | boolean;
1176
- insetBlock?: string | number | boolean;
1177
- insetInline?: string | number | boolean;
1178
1190
  top?: string | number | boolean;
1179
1191
  right?: string | number | boolean;
1180
1192
  bottom?: string | number | boolean;
@@ -1184,19 +1196,29 @@ declare namespace insetStyle {
1184
1196
  var __lookupStyles: string[];
1185
1197
  }
1186
1198
  //#endregion
1199
+ //#region src/styles/inlineSize.d.ts
1200
+ declare function inlineSizeStyle({
1201
+ inlineSize,
1202
+ minInlineSize,
1203
+ maxInlineSize
1204
+ }: {
1205
+ inlineSize?: string | number | boolean;
1206
+ minInlineSize?: string | number | boolean;
1207
+ maxInlineSize?: string | number | boolean;
1208
+ }): Record<string, string | string[]> | null;
1209
+ declare namespace inlineSizeStyle {
1210
+ var __lookupStyles: ("inlineSize" | "maxInlineSize" | "minInlineSize")[];
1211
+ }
1212
+ //#endregion
1187
1213
  //#region src/styles/margin.d.ts
1188
1214
  declare function marginStyle({
1189
1215
  margin,
1190
- marginBlock,
1191
- marginInline,
1192
1216
  marginTop,
1193
1217
  marginRight,
1194
1218
  marginBottom,
1195
1219
  marginLeft
1196
1220
  }: {
1197
1221
  margin?: string | number | boolean;
1198
- marginBlock?: string | number | boolean;
1199
- marginInline?: string | number | boolean;
1200
1222
  marginTop?: string | number | boolean;
1201
1223
  marginRight?: string | number | boolean;
1202
1224
  marginBottom?: string | number | boolean;
@@ -1236,16 +1258,12 @@ declare namespace outlineStyle {
1236
1258
  //#region src/styles/padding.d.ts
1237
1259
  declare function paddingStyle({
1238
1260
  padding,
1239
- paddingBlock,
1240
- paddingInline,
1241
1261
  paddingTop,
1242
1262
  paddingRight,
1243
1263
  paddingBottom,
1244
1264
  paddingLeft
1245
1265
  }: {
1246
1266
  padding?: string | number | boolean;
1247
- paddingBlock?: string | number | boolean;
1248
- paddingInline?: string | number | boolean;
1249
1267
  paddingTop?: string | number | boolean;
1250
1268
  paddingRight?: string | number | boolean;
1251
1269
  paddingBottom?: string | number | boolean;
@@ -1354,16 +1372,12 @@ declare namespace radiusStyle {
1354
1372
  //#region src/styles/scrollMargin.d.ts
1355
1373
  declare function scrollMarginStyle({
1356
1374
  scrollMargin,
1357
- scrollMarginBlock,
1358
- scrollMarginInline,
1359
1375
  scrollMarginTop,
1360
1376
  scrollMarginRight,
1361
1377
  scrollMarginBottom,
1362
1378
  scrollMarginLeft
1363
1379
  }: {
1364
1380
  scrollMargin?: string | number | boolean;
1365
- scrollMarginBlock?: string | number | boolean;
1366
- scrollMarginInline?: string | number | boolean;
1367
1381
  scrollMarginTop?: string | number | boolean;
1368
1382
  scrollMarginRight?: string | number | boolean;
1369
1383
  scrollMarginBottom?: string | number | boolean;
@@ -1373,6 +1387,24 @@ declare namespace scrollMarginStyle {
1373
1387
  var __lookupStyles: string[];
1374
1388
  }
1375
1389
  //#endregion
1390
+ //#region src/styles/scrollPadding.d.ts
1391
+ declare function scrollPaddingStyle({
1392
+ scrollPadding,
1393
+ scrollPaddingTop,
1394
+ scrollPaddingRight,
1395
+ scrollPaddingBottom,
1396
+ scrollPaddingLeft
1397
+ }: {
1398
+ scrollPadding?: string | number | boolean;
1399
+ scrollPaddingTop?: string | number | boolean;
1400
+ scrollPaddingRight?: string | number | boolean;
1401
+ scrollPaddingBottom?: string | number | boolean;
1402
+ scrollPaddingLeft?: string | number | boolean;
1403
+ }): Record<string, string> | null;
1404
+ declare namespace scrollPaddingStyle {
1405
+ var __lookupStyles: string[];
1406
+ }
1407
+ //#endregion
1376
1408
  //#region src/styles/scrollbar.d.ts
1377
1409
  interface ScrollbarStyleProps {
1378
1410
  scrollbar?: string | boolean;
@@ -1460,16 +1492,6 @@ declare namespace widthStyle {
1460
1492
  * ```
1461
1493
  */
1462
1494
  declare const styleHandlers: {
1463
- readonly border: typeof borderStyle;
1464
- readonly color: typeof colorStyle;
1465
- readonly display: typeof displayStyle;
1466
- readonly fade: typeof fadeStyle;
1467
- readonly fill: typeof fillStyle;
1468
- readonly svgFill: typeof svgFillStyle;
1469
- readonly flow: typeof flowStyle;
1470
- readonly gap: typeof gapStyle;
1471
- readonly height: typeof heightStyle;
1472
- readonly inset: typeof insetStyle;
1473
1495
  readonly margin: typeof marginStyle;
1474
1496
  readonly outline: typeof outlineStyle;
1475
1497
  readonly padding: typeof paddingStyle;
@@ -1477,10 +1499,35 @@ declare const styleHandlers: {
1477
1499
  readonly preset: typeof presetStyle;
1478
1500
  readonly radius: typeof radiusStyle;
1479
1501
  readonly scrollMargin: typeof scrollMarginStyle;
1502
+ readonly scrollPadding: typeof scrollPaddingStyle;
1480
1503
  readonly scrollbar: typeof scrollbarStyle;
1481
1504
  readonly shadow: typeof shadowStyle;
1482
1505
  readonly transition: typeof transitionStyle;
1483
1506
  readonly width: typeof widthStyle;
1507
+ readonly blockPadding: StyleHandler<Partial<Record<"blockPadding", string | number | boolean | undefined>>>;
1508
+ readonly inlinePadding: StyleHandler<Partial<Record<"inlinePadding", string | number | boolean | undefined>>>;
1509
+ readonly blockMargin: StyleHandler<Partial<Record<"blockMargin", string | number | boolean | undefined>>>;
1510
+ readonly inlineMargin: StyleHandler<Partial<Record<"inlineMargin", string | number | boolean | undefined>>>;
1511
+ readonly blockInset: StyleHandler<Partial<Record<"blockInset", string | number | boolean | undefined>>>;
1512
+ readonly inlineInset: StyleHandler<Partial<Record<"inlineInset", string | number | boolean | undefined>>>;
1513
+ readonly blockScrollMargin: StyleHandler<Partial<Record<"blockScrollMargin", string | number | boolean | undefined>>>;
1514
+ readonly inlineScrollMargin: StyleHandler<Partial<Record<"inlineScrollMargin", string | number | boolean | undefined>>>;
1515
+ readonly blockScrollPadding: StyleHandler<Partial<Record<"blockScrollPadding", string | number | boolean | undefined>>>;
1516
+ readonly inlineScrollPadding: StyleHandler<Partial<Record<"inlineScrollPadding", string | number | boolean | undefined>>>;
1517
+ readonly blockBorder: StyleHandler<Partial<Record<"blockBorder", string | number | boolean | undefined>>>;
1518
+ readonly inlineBorder: StyleHandler<Partial<Record<"inlineBorder", string | number | boolean | undefined>>>;
1519
+ readonly blockSize: typeof blockSizeStyle;
1520
+ readonly border: typeof borderStyle;
1521
+ readonly color: typeof colorStyle;
1522
+ readonly display: typeof displayStyle;
1523
+ readonly fade: typeof fadeStyle;
1524
+ readonly fill: typeof fillStyle;
1525
+ readonly svgFill: typeof svgFillStyle;
1526
+ readonly flow: typeof flowStyle;
1527
+ readonly gap: typeof gapStyle;
1528
+ readonly height: typeof heightStyle;
1529
+ readonly inset: typeof insetStyle;
1530
+ readonly inlineSize: typeof inlineSizeStyle;
1484
1531
  };
1485
1532
  //#endregion
1486
1533
  //#region src/styles/define-handler.d.ts
@@ -1930,4 +1977,4 @@ declare const tastyDebug: {
1930
1977
  };
1931
1978
  //#endregion
1932
1979
  export { resolveFunctionColor as $, Mods as $t, isPropertyDefined as A, TastyComponentPropsWithDefaults as At, defineHandler as B, BaseProps as Bt, getCSSTextForNode as C, DEFAULT_NAME_PREFIX as Cn, ModPropsInput as Ct, injectGlobal as D, ResolveTokenProps as Dt, inject as E, ResolveModProps as Et, ChunkSheetRegistry as F, TokenPropsInput as Ft, CHUNK_NAMES as G, BlockStyleProps as Gt, ChunkInfo as H, BaseStyleProps as Ht, chunkSheetRegistry as I, VariantMap as It, DISPLAY_CHUNK_STYLES as J, DimensionStyleProps as Jt, ChunkName as K, ColorStyleProps as Kt, ComputeStylesOptions as L, WithVariant as Lt, ownKeyframes as M, TastyElementProps as Mt, property as N, TastyPolymorphicComponent as Nt, injectRawCSS as O, SubElementDefinition as Ot, touch as P, TastyProps as Pt, STYLE_TO_CHUNK as Q, ModValue as Qt, ComputeStylesResult as R, tasty as Rt, getCSSText as S, TEXT_STYLES as Sn, ModPropDef as St, holdKeyframes as T, ResolveModPropDef as Tt, categorizeStyleKeys as U, BlockInnerStyleProps as Ut, styleHandlers as V, BasePropsWithoutChildren as Vt, APPEARANCE_CHUNK_STYLES as W, BlockOuterStyleProps as Wt, LAYOUT_CHUNK_STYLES as X, FlowStyleProps as Xt, FONT_CHUNK_STYLES as Y, ExtraBaseStyleProps as Yt, POSITION_CHUNK_STYLES as Z, InnerStyleProps as Zt, createInjector as _, DIMENSION_STYLES as _n, UseStylesResult as _t, DebugOptions as a, TastyCustomProps as an, getDisplayName as at, func as b, OUTER_STYLES as bn, Element$1 as bt, tastyDebug as c, TextStyleProps as cn, UseFunctionOptions as ct, dotize as d, BASE_STYLES as dn, useFontFace as dt, OuterStyleProps as en, createColorFunc as et, _modAttrs as f, BLOCK_INNER_STYLES as fn, UsePropertyOptions as ft, counterStyle as g, CONTAINER_STYLES as gn, useGlobalStyles as gt, cleanup as h, COLOR_STYLES as hn, useRawCSS as ht, DebugChunkInfo as i, TastyBaseStylePropNames as in, okhslPlugin as it, keyframes as j, TastyElementOptions as jt, injector as k, SubElementProps as kt, processTokens as l, TokenValue as ln, useFunction as lt, filterBaseProps as m, BLOCK_STYLES as mn, useKeyframes as mt, CacheStatus as n, ShortGridStyles as nn, okhstPlugin as nt, InspectResult as o, TastyExtensionConfig as on, TastyBatchProvider as ot, color$1 as p, BLOCK_OUTER_STYLES as pn, useProperty as pt, DIMENSION_CHUNK_STYLES as q, ContainerStyleProps as qt, ChunkBreakdown as r, TagName as rn, okhslFunction as rt, Summary as s, TastyThemeNames as sn, TastyBatchProviderProps as st, CSSOptions as t, PositionStyleProps as tn, okhstFunction as tt, resolveRecipes as u, Tokens as un, useCounterStyle as ut, destroy as v, FLOW_STYLES as vn, useStyles as vt, getRawCSSText as w, DEFAULT_ZERO_NAME_PREFIX as wn, ResolveAsProps as wt, gc as x, POSITION_STYLES as xn, ElementsDefinition as xt, fontFace as y, INNER_STYLES as yn, AllBasePropsWithMods as yt, computeStyles as z, AllBaseProps as zt };
1933
- //# sourceMappingURL=index-Bm9ltvdH.d.ts.map
1980
+ //# sourceMappingURL=index-uX74k5jG.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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-LfIDmVHx.js";
2
- import { $ as StyleParser, A as ParsedColor, At as StyleRule, B as StyleValueStateMap, C as SuffixForSelector, Ct as PropertyDefinition, D as CSSMap, Dt as RuleInfo, E as AnyStyleHandler, Et as RootRegistry, F as StyleHandlerProps, Ft as resetStyleBatch, G as parseColor, H as getGlobalParser, I as StyleHandlerResult, J as getNamedColorHex, K as parseStyle, L as StyleMap, M as ResolvedStyleValue, Mt as QueuedWrite, N as StyleHandler, Nt as flushStyles, O as CUSTOM_UNITS, Ot as SheetInfo, P as StyleHandlerDefinition, Pt as hasPendingStyleWrites, Q as strToRgb, R as StylePropValue, S as StylesWithoutSelectors, St as KeyframesSteps, T as TastyPresetNames, Tt as RawCSSResult, U as getGlobalPredefinedTokens, V as filterMods, W as normalizeColorTokenValue, X as hexToRgb, Y as getRgbValuesFromRgbaString, Z as hslToRgbValues, _ as NotSelector, _t as InjectResult, a as ParseStateKeyOptions, at as CSSProperties, b as Styles, bt as KeyframesInfo, 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 InjectOptions, h as ConfigTokens, i as renderStyles, it as UnitHandler, j as RawStyleHandler, jt as StyleUsage, k as DIRECTIONS, kt as StyleInjectorConfig, 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 InjectionMode, w as TastyNamedColors, wt as PropertyOptions, x as StylesInterface, xt as KeyframesResult, y as Selector, yt as KeyframesCacheEntry, z as StyleValue } from "./index-BmogEzTo.js";
3
- import { $ as resolveFunctionColor, $t as Mods, A as isPropertyDefined, At as TastyComponentPropsWithDefaults, B as defineHandler, Bt as BaseProps, C as getCSSTextForNode, Cn as DEFAULT_NAME_PREFIX, Ct as ModPropsInput, D as injectGlobal, Dt as ResolveTokenProps, E as inject, Et as ResolveModProps, F as ChunkSheetRegistry, Ft as TokenPropsInput, G as CHUNK_NAMES, Gt as BlockStyleProps, H as ChunkInfo, Ht as BaseStyleProps, I as chunkSheetRegistry, It as VariantMap, J as DISPLAY_CHUNK_STYLES, Jt as DimensionStyleProps, K as ChunkName, Kt as ColorStyleProps, L as ComputeStylesOptions, Lt as WithVariant, M as ownKeyframes, Mt as TastyElementProps, N as property, Nt as TastyPolymorphicComponent, O as injectRawCSS, Ot as SubElementDefinition, P as touch, Pt as TastyProps, Q as STYLE_TO_CHUNK, Qt as ModValue, R as ComputeStylesResult, Rt as tasty, S as getCSSText, Sn as TEXT_STYLES, St as ModPropDef, T as holdKeyframes, Tt as ResolveModPropDef, U as categorizeStyleKeys, Ut as BlockInnerStyleProps, V as styleHandlers, Vt as BasePropsWithoutChildren, W as APPEARANCE_CHUNK_STYLES, Wt as BlockOuterStyleProps, X as LAYOUT_CHUNK_STYLES, Xt as FlowStyleProps, Y as FONT_CHUNK_STYLES, Yt as ExtraBaseStyleProps, Z as POSITION_CHUNK_STYLES, Zt as InnerStyleProps, _ as createInjector, _n as DIMENSION_STYLES, _t as UseStylesResult, a as DebugOptions, an as TastyCustomProps, at as getDisplayName, b as func, bn as OUTER_STYLES, bt as Element, c as tastyDebug, cn as TextStyleProps, ct as UseFunctionOptions, d as dotize, dn as BASE_STYLES, dt as useFontFace, en as OuterStyleProps, et as createColorFunc, f as _modAttrs, fn as BLOCK_INNER_STYLES, ft as UsePropertyOptions, g as counterStyle, gn as CONTAINER_STYLES, gt as useGlobalStyles, h as cleanup, hn as COLOR_STYLES, ht as useRawCSS, i as DebugChunkInfo, in as TastyBaseStylePropNames, it as okhslPlugin, j as keyframes, jt as TastyElementOptions, k as injector, kt as SubElementProps, l as processTokens, ln as TokenValue, lt as useFunction, m as filterBaseProps, mn as BLOCK_STYLES, mt as useKeyframes, n as CacheStatus, nn as ShortGridStyles, nt as okhstPlugin, o as InspectResult, on as TastyExtensionConfig, ot as TastyBatchProvider, p as color, pn as BLOCK_OUTER_STYLES, pt as useProperty, q as DIMENSION_CHUNK_STYLES, qt as ContainerStyleProps, r as ChunkBreakdown, rn as TagName, rt as okhslFunction, s as Summary, sn as TastyThemeNames, st as TastyBatchProviderProps, t as CSSOptions, tn as PositionStyleProps, tt as okhstFunction, u as resolveRecipes, un as Tokens, ut as useCounterStyle, v as destroy, vn as FLOW_STYLES, vt as useStyles, w as getRawCSSText, wn as DEFAULT_ZERO_NAME_PREFIX, wt as ResolveAsProps, x as gc, xn as POSITION_STYLES, xt as ElementsDefinition, y as fontFace, yn as INNER_STYLES, yt as AllBasePropsWithMods, z as computeStyles, zt as AllBaseProps } from "./index-Bm9ltvdH.js";
4
- import { t as mergeStyles } from "./merge-styles-BcLl1u_d.js";
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-BY1e5y7V.js";
2
+ import { $ as StyleParser, A as ParsedColor, At as StyleRule, B as StyleValueStateMap, C as SuffixForSelector, Ct as PropertyDefinition, D as CSSMap, Dt as RuleInfo, E as AnyStyleHandler, Et as RootRegistry, F as StyleHandlerProps, Ft as resetStyleBatch, G as parseColor, H as getGlobalParser, I as StyleHandlerResult, J as getNamedColorHex, K as parseStyle, L as StyleMap, M as ResolvedStyleValue, Mt as QueuedWrite, N as StyleHandler, Nt as flushStyles, O as CUSTOM_UNITS, Ot as SheetInfo, P as StyleHandlerDefinition, Pt as hasPendingStyleWrites, Q as strToRgb, R as StylePropValue, S as StylesWithoutSelectors, St as KeyframesSteps, T as TastyPresetNames, Tt as RawCSSResult, U as getGlobalPredefinedTokens, V as filterMods, W as normalizeColorTokenValue, X as hexToRgb, Y as getRgbValuesFromRgbaString, Z as hslToRgbValues, _ as NotSelector, _t as InjectResult, a as ParseStateKeyOptions, at as CSSProperties, b as Styles, bt as KeyframesInfo, 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 InjectOptions, h as ConfigTokens, i as renderStyles, it as UnitHandler, j as RawStyleHandler, jt as StyleUsage, k as DIRECTIONS, kt as StyleInjectorConfig, 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 InjectionMode, w as TastyNamedColors, wt as PropertyOptions, x as StylesInterface, xt as KeyframesResult, y as Selector, yt as KeyframesCacheEntry, z as StyleValue } from "./index-DBjd4MAb.js";
3
+ import { $ as resolveFunctionColor, $t as Mods, A as isPropertyDefined, At as TastyComponentPropsWithDefaults, B as defineHandler, Bt as BaseProps, C as getCSSTextForNode, Cn as DEFAULT_NAME_PREFIX, Ct as ModPropsInput, D as injectGlobal, Dt as ResolveTokenProps, E as inject, Et as ResolveModProps, F as ChunkSheetRegistry, Ft as TokenPropsInput, G as CHUNK_NAMES, Gt as BlockStyleProps, H as ChunkInfo, Ht as BaseStyleProps, I as chunkSheetRegistry, It as VariantMap, J as DISPLAY_CHUNK_STYLES, Jt as DimensionStyleProps, K as ChunkName, Kt as ColorStyleProps, L as ComputeStylesOptions, Lt as WithVariant, M as ownKeyframes, Mt as TastyElementProps, N as property, Nt as TastyPolymorphicComponent, O as injectRawCSS, Ot as SubElementDefinition, P as touch, Pt as TastyProps, Q as STYLE_TO_CHUNK, Qt as ModValue, R as ComputeStylesResult, Rt as tasty, S as getCSSText, Sn as TEXT_STYLES, St as ModPropDef, T as holdKeyframes, Tt as ResolveModPropDef, U as categorizeStyleKeys, Ut as BlockInnerStyleProps, V as styleHandlers, Vt as BasePropsWithoutChildren, W as APPEARANCE_CHUNK_STYLES, Wt as BlockOuterStyleProps, X as LAYOUT_CHUNK_STYLES, Xt as FlowStyleProps, Y as FONT_CHUNK_STYLES, Yt as ExtraBaseStyleProps, Z as POSITION_CHUNK_STYLES, Zt as InnerStyleProps, _ as createInjector, _n as DIMENSION_STYLES, _t as UseStylesResult, a as DebugOptions, an as TastyCustomProps, at as getDisplayName, b as func, bn as OUTER_STYLES, bt as Element, c as tastyDebug, cn as TextStyleProps, ct as UseFunctionOptions, d as dotize, dn as BASE_STYLES, dt as useFontFace, en as OuterStyleProps, et as createColorFunc, f as _modAttrs, fn as BLOCK_INNER_STYLES, ft as UsePropertyOptions, g as counterStyle, gn as CONTAINER_STYLES, gt as useGlobalStyles, h as cleanup, hn as COLOR_STYLES, ht as useRawCSS, i as DebugChunkInfo, in as TastyBaseStylePropNames, it as okhslPlugin, j as keyframes, jt as TastyElementOptions, k as injector, kt as SubElementProps, l as processTokens, ln as TokenValue, lt as useFunction, m as filterBaseProps, mn as BLOCK_STYLES, mt as useKeyframes, n as CacheStatus, nn as ShortGridStyles, nt as okhstPlugin, o as InspectResult, on as TastyExtensionConfig, ot as TastyBatchProvider, p as color, pn as BLOCK_OUTER_STYLES, pt as useProperty, q as DIMENSION_CHUNK_STYLES, qt as ContainerStyleProps, r as ChunkBreakdown, rn as TagName, rt as okhslFunction, s as Summary, sn as TastyThemeNames, st as TastyBatchProviderProps, t as CSSOptions, tn as PositionStyleProps, tt as okhstFunction, u as resolveRecipes, un as Tokens, ut as useCounterStyle, v as destroy, vn as FLOW_STYLES, vt as useStyles, w as getRawCSSText, wn as DEFAULT_ZERO_NAME_PREFIX, wt as ResolveAsProps, x as gc, xn as POSITION_STYLES, xt as ElementsDefinition, y as fontFace, yn as INNER_STYLES, yt as AllBasePropsWithMods, z as computeStyles, zt as AllBaseProps } from "./index-uX74k5jG.js";
4
+ import { t as mergeStyles } from "./merge-styles-pf6iPs82.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 InjectOptions, 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, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, 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-B3gPdCqd.js";
2
- import { A as keyframes, C as getRawCSSText, D as injectRawCSS, E as injectGlobal, F as chunkSheetRegistry, I as resolveFunctionColor, M as property, N as touch, O as injector, P as ChunkSheetRegistry, S as getCSSTextForNode, T as inject, _ 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 ownKeyframes, k as isPropertyDefined, 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 holdKeyframes, x as getCSSText, y as func } from "./core-DGm0CFHP.js";
3
- import { d as categorizeStyleKeys } from "./keyframes-DE-OE76F.js";
4
- import { n as formatPropertyCSS } from "./format-rules-XRw9u7d4.js";
5
- import { t as mergeStyles } from "./merge-styles-DuoZEsm9.js";
6
- import { t as resolveRecipes } from "./resolve-recipes-H9NqOQuP.js";
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-yXpe2jAV.js";
2
+ import { A as keyframes, C as getRawCSSText, D as injectRawCSS, E as injectGlobal, F as chunkSheetRegistry, I as resolveFunctionColor, M as property, N as touch, O as injector, P as ChunkSheetRegistry, S as getCSSTextForNode, T as inject, _ 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 ownKeyframes, k as isPropertyDefined, 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 holdKeyframes, x as getCSSText, y as func } from "./core-DoEZAHJq.js";
3
+ import { d as categorizeStyleKeys } from "./keyframes-B8uPLZwx.js";
4
+ import { n as formatPropertyCSS } from "./format-rules-DHuG25KU.js";
5
+ import { t as mergeStyles } from "./merge-styles-ChW1k-ZM.js";
6
+ import { t as resolveRecipes } from "./resolve-recipes-BNmjANzT.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";
@@ -1,4 +1,4 @@
1
- import { At as STYLE_TO_CHUNK, F as hasPipelineCacheEntry, H as extractPredefinedStateRefs, I as isSelector, L as renderStyles, V as extractLocalPredefinedStates, _t as hashString, wt as CHUNK_NAMES } from "./config-B3gPdCqd.js";
1
+ import { At as STYLE_TO_CHUNK, F as hasPipelineCacheEntry, H as extractPredefinedStateRefs, I as isSelector, L as renderStyles, V as extractLocalPredefinedStates, _t as hashString, wt as CHUNK_NAMES } from "./config-yXpe2jAV.js";
2
2
  //#region src/chunks/definitions.ts
3
3
  /**
4
4
  * Style chunk definitions for CSS chunking optimization.
@@ -532,4 +532,4 @@ function filterUsedKeyframes(keyframes, usedNames) {
532
532
  //#endregion
533
533
  export { mergeKeyframes as a, resolveKeyframesNames as c, categorizeStyleKeys as d, hasLocalKeyframes as i, renderStylesForChunk as l, extractLocalKeyframes as n, referencesAnimation as o, filterUsedKeyframes as r, replaceAnimationNames as s, extractAnimationNamesFromStyles as t, generateChunkCacheKey as u };
534
534
 
535
- //# sourceMappingURL=keyframes-DE-OE76F.js.map
535
+ //# sourceMappingURL=keyframes-B8uPLZwx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyframes-DE-OE76F.js","names":[],"sources":["../src/chunks/definitions.ts","../src/chunks/cacheKey.ts","../src/chunks/renderChunk.ts","../src/keyframes/index.ts"],"sourcesContent":["/**\n * Style chunk definitions for CSS chunking optimization.\n *\n * Styles are grouped into chunks based on:\n * 1. Handler dependencies - styles that share a handler MUST be in the same chunk\n * 2. Logical grouping - related styles grouped for better cache reuse\n *\n * See STYLE_CHUNKING_SPEC.md for detailed rationale.\n *\n * ============================================================================\n * ⚠️ CRITICAL ARCHITECTURAL CONSTRAINT: NO CROSS-CHUNK HANDLER DEPENDENCIES\n * ============================================================================\n *\n * Style handlers declare their dependencies via `__lookupStyles` array.\n * This creates a dependency graph where handlers read multiple style props.\n *\n * **ALL styles in a handler's `__lookupStyles` MUST be in the SAME chunk.**\n *\n * Why this matters:\n * 1. Each chunk computes a cache key from ONLY its own style values\n * 2. If a handler reads a style from another chunk, that value isn't in the cache key\n * 3. Changing the cross-chunk style won't invalidate this chunk's cache\n * 4. Result: stale CSS output or incorrect cache hits\n *\n * Example of a violation:\n * ```\n * // flowStyle.__lookupStyles = ['display', 'flow']\n * // If 'display' is in DISPLAY chunk and 'flow' is in LAYOUT chunk:\n * // - User sets { display: 'grid', flow: 'column' }\n * // - LAYOUT chunk caches CSS with flow=column, display=grid\n * // - User changes to { display: 'flex', flow: 'column' }\n * // - LAYOUT chunk cache key unchanged (only has 'flow')\n * // - Returns stale CSS computed with display=grid!\n * ```\n *\n * Before adding/moving styles, verify:\n * 1. Find all handlers that use this style (grep for the style name in __lookupStyles)\n * 2. Ensure ALL styles from each handler's __lookupStyles are in the same chunk\n *\n * For **custom** handlers registered through `configure({ handlers })` this is no\n * longer only a convention: `alignHandlerChunks()` in `styles/predefined.ts` pulls\n * any style name the lists below don't know into its handler's existing chunk, and\n * warns when a handler bridges two chunks defined here. The lists below are still\n * hand-maintained, so the constraint must be checked by hand when editing them.\n * ============================================================================\n */\n\nimport { isSelector } from '../pipeline';\n\nimport { CHUNK_NAMES, STYLE_TO_CHUNK } from './style-chunk-map';\nimport type { ChunkName } from './style-chunk-map';\n\n// ============================================================================\n// Chunk Style Lists\n// ============================================================================\n\n// The chunk style lists and the style→chunk map live in `style-chunk-map.ts` so\n// that the map is populated by importing *that* module, independent of whether\n// this one has been loaded. Re-exported here for the original import paths.\nexport {\n APPEARANCE_CHUNK_STYLES,\n DIMENSION_CHUNK_STYLES,\n DISPLAY_CHUNK_STYLES,\n FONT_CHUNK_STYLES,\n LAYOUT_CHUNK_STYLES,\n POSITION_CHUNK_STYLES,\n} from './style-chunk-map';\nexport { CHUNK_NAMES, STYLE_TO_CHUNK } from './style-chunk-map';\nexport type { ChunkName } from './style-chunk-map';\n\n// ============================================================================\n// Chunk Priority Order\n// ============================================================================\n\n/**\n * Chunk processing order. This ensures deterministic className allocation\n * regardless of style key order in the input.\n */\nconst CHUNK_ORDER: readonly string[] = [\n CHUNK_NAMES.APPEARANCE,\n CHUNK_NAMES.FONT,\n CHUNK_NAMES.DIMENSION,\n CHUNK_NAMES.DISPLAY,\n CHUNK_NAMES.LAYOUT,\n CHUNK_NAMES.POSITION,\n CHUNK_NAMES.MISC,\n CHUNK_NAMES.SUBCOMPONENTS,\n] as const;\n\n/**\n * Map from chunk name to its priority index for sorting.\n */\nconst _CHUNK_PRIORITY = new Map<string, number>(\n CHUNK_ORDER.map((name, index) => [name, index]),\n);\n\n// ============================================================================\n// Chunk Info Interface\n// ============================================================================\n\nexport interface ChunkInfo {\n /** Name of the chunk */\n name: ChunkName | string;\n /** Style keys belonging to this chunk */\n styleKeys: string[];\n}\n\n// ============================================================================\n// Style Categorization\n// ============================================================================\n\n/**\n * Categorize style keys into chunks.\n *\n * Returns chunks in a deterministic order (by CHUNK_ORDER) regardless\n * of the order of keys in the input styles object.\n *\n * @param styles - The styles object to categorize\n * @returns Map of chunk name to array of style keys in that chunk (in priority order)\n */\nexport function categorizeStyleKeys(\n styles: Record<string, unknown>,\n): Map<string, string[]> {\n // First pass: collect keys into chunks (unordered)\n const chunkData: Record<string, string[]> = {};\n const keys = Object.keys(styles);\n\n for (const key of keys) {\n // Skip the $ helper key (used for selector combinators)\n // Skip @keyframes and @property (processed separately in useStyles)\n // Skip recipe (resolved before pipeline by resolveRecipes)\n if (\n key === '$' ||\n key === '@keyframes' ||\n key === '@property' ||\n key === '@font-face' ||\n key === '@counter-style' ||\n key === '@function' ||\n key === 'recipe'\n ) {\n continue;\n }\n\n if (isSelector(key)) {\n // All selectors go into the subcomponents chunk\n if (!chunkData[CHUNK_NAMES.SUBCOMPONENTS]) {\n chunkData[CHUNK_NAMES.SUBCOMPONENTS] = [];\n }\n chunkData[CHUNK_NAMES.SUBCOMPONENTS].push(key);\n } else {\n // Look up the chunk for this style, default to misc\n const chunkName = STYLE_TO_CHUNK.get(key) ?? CHUNK_NAMES.MISC;\n if (!chunkData[chunkName]) {\n chunkData[chunkName] = [];\n }\n chunkData[chunkName].push(key);\n }\n }\n\n // Second pass: build ordered Map based on CHUNK_ORDER\n const orderedChunks = new Map<string, string[]>();\n\n // Add chunks in priority order\n for (const chunkName of CHUNK_ORDER) {\n if (chunkData[chunkName] && chunkData[chunkName].length > 0) {\n // Sort keys within chunk for consistent cache key generation\n orderedChunks.set(chunkName, chunkData[chunkName].sort());\n }\n }\n\n // Handle any unknown chunks (shouldn't happen, but be defensive)\n for (const chunkName of Object.keys(chunkData)) {\n if (!orderedChunks.has(chunkName)) {\n orderedChunks.set(chunkName, chunkData[chunkName].sort());\n }\n }\n\n return orderedChunks;\n}\n","/**\n * Chunk-specific cache key generation.\n *\n * Generates cache keys that only include styles relevant to a specific chunk,\n * enabling more granular caching and reuse.\n *\n * Enhanced to support predefined states:\n * - Global predefined states don't affect cache keys (constant across app)\n * - Local predefined states only affect cache keys if referenced in the chunk\n */\n\nimport {\n extractLocalPredefinedStates,\n extractPredefinedStateRefs,\n} from '../states';\nimport type { Styles } from '../styles/types';\n\nconst _stableStringifyCache = new WeakMap<object, string>();\n\ninterface ChunkKeyEntry {\n /**\n * Flat `[key0, value0, key1, value1, …]` record of exactly what the key was\n * built from. Interleaving keeps an entry to one allocation.\n */\n snapshot: unknown[];\n key: string;\n}\n\n/**\n * Per-styles-object memo of generated keys, keyed by chunk name.\n *\n * Reading from this is free, so every call checks it. Writing to it is not:\n * the `WeakMap.set` plus the snapshot allocation measured ~35% of the cost of\n * generating a key from scratch, and it is pure waste for a styles object that\n * is never seen again. Callers therefore have to opt in via `reusable`, and\n * only for an object they know outlives the render that produced it.\n *\n * `Styles` is a plain mutable object, and nothing in the public\n * `computeStyles` / `useStyles` contract asks callers to freeze it, so a hit is\n * only returned after re-reading every value the key was built from and\n * confirming none of them changed. That check is deliberately shallow: it\n * compares the same references `stableStringify` would have looked up in\n * `_stableStringifyCache`, so a memoized key is stale in exactly the cases the\n * un-memoized function was already stale in — an object-valued style mutated\n * in place — and in no others.\n */\nconst _chunkKeyCache = new WeakMap<object, Map<string, ChunkKeyEntry>>();\n\n/**\n * Is `entry` still a valid key for this chunk of `styles`?\n *\n * True only when the chunk asks for the same style keys, in the same order,\n * and every one of them still reads back the value the key was built from.\n */\nfunction isEntryFresh(\n styles: Styles,\n entry: ChunkKeyEntry,\n styleKeys: string[],\n): boolean {\n const snapshot = entry.snapshot;\n const length = styleKeys.length;\n\n if (snapshot.length !== length * 2) return false;\n\n for (let i = 0, at = 0; i < length; i++, at += 2) {\n const key = styleKeys[i];\n if (snapshot[at] !== key) return false;\n if (styles[key] !== snapshot[at + 1]) return false;\n }\n\n return true;\n}\n\n/**\n * Recursively serialize a value with sorted keys for stable output.\n * This ensures that {a: 1, b: 2} and {b: 2, a: 1} produce the same string.\n * Uses a WeakMap cache for object values to avoid re-serializing the same references.\n */\nfunction stableStringify(value: unknown): string {\n if (value === null) {\n return 'null';\n }\n if (value === undefined) {\n return 'undefined';\n }\n if (typeof value !== 'object') {\n return JSON.stringify(value);\n }\n\n const cached = _stableStringifyCache.get(value as object);\n if (cached !== undefined) return cached;\n\n let result: string;\n if (Array.isArray(value)) {\n result = '[' + value.map(stableStringify).join(',') + ']';\n } else {\n const obj = value as Record<string, unknown>;\n const sortedKeys = Object.keys(obj).sort();\n const parts: string[] = [];\n for (const key of sortedKeys) {\n if (obj[key] !== undefined) {\n parts.push(`${JSON.stringify(key)}:${stableStringify(obj[key])}`);\n }\n }\n result = '{' + parts.join(',') + '}';\n }\n\n _stableStringifyCache.set(value as object, result);\n return result;\n}\n\nfunction computeChunkCacheKey(\n styles: Styles,\n chunkName: string,\n snapshot: unknown[],\n): string {\n // Start with chunk name for namespace separation\n const parts: string[] = [chunkName];\n\n // styleKeys are already sorted by categorizeStyleKeys\n let chunkStylesStr = '';\n\n // Reading from the snapshot rather than from `styles` guarantees the key and\n // the values a memo entry validates against are the same values.\n for (let at = 0; at < snapshot.length; at += 2) {\n const value = snapshot[at + 1];\n if (value !== undefined) {\n // Use stable stringify for consistent serialization regardless of key order\n const serialized = stableStringify(value);\n parts.push(`${snapshot[at] as string}:${serialized}`);\n chunkStylesStr += serialized;\n }\n }\n\n // Extract local predefined states from the full styles object\n const localStates = extractLocalPredefinedStates(styles);\n\n // Only include local predefined states that are actually referenced in this chunk\n if (Object.keys(localStates).length > 0) {\n const referencedStates = extractPredefinedStateRefs(chunkStylesStr);\n const relevantLocalStates: string[] = [];\n\n for (const stateName of referencedStates) {\n if (localStates[stateName]) {\n relevantLocalStates.push(`${stateName}=${localStates[stateName]}`);\n }\n }\n\n // Add relevant local states to the cache key (sorted for stability)\n if (relevantLocalStates.length > 0) {\n relevantLocalStates.sort();\n parts.unshift(`[states:${relevantLocalStates.join('|')}]`);\n }\n }\n\n // Use null character as separator (safe, not in JSON output)\n return parts.join('\\0');\n}\n\n/**\n * Generate a cache key for a specific chunk.\n *\n * Only includes the styles that belong to this chunk, allowing\n * chunks to be cached independently.\n *\n * Also includes relevant local predefined states that are referenced\n * by this chunk's styles.\n *\n * @param styles - The full styles object\n * @param chunkName - Name of the chunk\n * @param styleKeys - Keys of styles belonging to this chunk\n * @param reusable - Pass `true` only when `styles` outlives this render and\n * will be keyed again — a `tasty()` factory's own styles object, for\n * instance. It stores the result so the next render can skip serializing\n * every value again, which is worth doing only if there is a next render for\n * this exact object. Freshly merged per-render objects must leave it `false`:\n * storing them costs more than the key they would never reuse. Reading an\n * existing entry does not require it.\n * @returns A stable cache key string\n */\nexport function generateChunkCacheKey(\n styles: Styles,\n chunkName: string,\n styleKeys: string[],\n reusable = false,\n): string {\n let perStyles = _chunkKeyCache.get(styles as object);\n\n if (perStyles !== undefined) {\n const entry = perStyles.get(chunkName);\n if (entry !== undefined && isEntryFresh(styles, entry, styleKeys)) {\n return entry.key;\n }\n }\n\n const length = styleKeys.length;\n const snapshot: unknown[] = new Array(length * 2);\n\n for (let i = 0, at = 0; i < length; i++, at += 2) {\n const styleKey = styleKeys[i];\n snapshot[at] = styleKey;\n snapshot[at + 1] = styles[styleKey];\n }\n\n const key = computeChunkCacheKey(styles, chunkName, snapshot);\n\n if (reusable) {\n if (perStyles === undefined) {\n perStyles = new Map();\n _chunkKeyCache.set(styles as object, perStyles);\n }\n perStyles.set(chunkName, { snapshot, key });\n }\n\n return key;\n}\n","/**\n * Chunk-specific style rendering.\n *\n * Renders styles for a specific chunk by filtering the styles object\n * to only include relevant keys before passing to renderStyles.\n */\n\nimport type { RenderResult } from '../pipeline';\nimport { hasPipelineCacheEntry, renderStyles } from '../pipeline';\nimport { extractLocalPredefinedStates } from '../states';\nimport type { Styles } from '../styles/types';\n\nimport { CHUNK_NAMES } from './definitions';\n\n/**\n * Build a filtered styles object for a regular chunk.\n */\nfunction buildFilteredStyles(styles: Styles, styleKeys: string[]): Styles {\n const localPredefinedStates = extractLocalPredefinedStates(styles);\n const filteredStyles: Styles = {};\n\n for (const [key, value] of Object.entries(localPredefinedStates)) {\n filteredStyles[key] = value;\n }\n\n for (const key of styleKeys) {\n const value = styles[key];\n if (value !== undefined) {\n filteredStyles[key] = value;\n }\n }\n\n return filteredStyles;\n}\n\n/**\n * Build a filtered styles object for the subcomponents chunk.\n */\nfunction buildSubcomponentFilteredStyles(\n styles: Styles,\n selectorKeys: string[],\n): Styles {\n const localPredefinedStates = extractLocalPredefinedStates(styles);\n const filteredStyles: Styles = {};\n\n for (const [key, value] of Object.entries(localPredefinedStates)) {\n filteredStyles[key] = value;\n }\n\n for (const key of selectorKeys) {\n const value = styles[key];\n if (value !== undefined) {\n filteredStyles[key] = value;\n }\n }\n\n if (styles.$ !== undefined) {\n filteredStyles.$ = styles.$;\n }\n\n return filteredStyles;\n}\n\n/**\n * Render styles for a specific chunk.\n *\n * On pipeline cache hit, avoids building the filtered styles object entirely.\n * Only constructs it on cache miss when the pipeline actually needs the styles.\n *\n * IMPORTANT: Local predefined states (e.g., '@mobile': '@media(w < 600px)')\n * are always included in the filtered styles, regardless of which chunk is\n * being rendered. This ensures that state references like '@mobile' in any\n * chunk can be properly resolved by the pipeline.\n *\n * @param styles - The full styles object\n * @param chunkName - Name of the chunk being rendered\n * @param styleKeys - Keys of styles belonging to this chunk\n * @returns RenderResult with rules for this chunk\n */\nexport function renderStylesForChunk(\n styles: Styles,\n chunkName: string,\n styleKeys: string[],\n pipelineCacheKey?: string,\n): RenderResult {\n if (styleKeys.length === 0) {\n return { rules: [], className: '' };\n }\n\n // Fast path: skip building filteredStyles when pipeline has a cached result\n if (pipelineCacheKey && hasPipelineCacheEntry(pipelineCacheKey)) {\n return renderStyles(undefined, undefined, undefined, pipelineCacheKey);\n }\n\n // Cache miss: build filtered styles and run pipeline\n const filteredStyles =\n chunkName === CHUNK_NAMES.SUBCOMPONENTS\n ? buildSubcomponentFilteredStyles(styles, styleKeys)\n : buildFilteredStyles(styles, styleKeys);\n\n return renderStyles(filteredStyles, undefined, undefined, pipelineCacheKey);\n}\n","/**\n * Keyframes Utilities\n *\n * Optimized utilities for extracting and processing keyframes in styles.\n * Designed for zero overhead when no keyframes are used.\n */\n\nimport type { KeyframesSteps } from '../injector/types';\nimport type { Styles } from '../styles/types';\nimport { hashString } from '../utils/hash';\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst KEYFRAMES_KEY = '@keyframes';\n\n/**\n * Pattern to extract animation names from CSS animation property values.\n * Animation name is typically the first identifier in the shorthand.\n * Handles: \"fadeIn 300ms ease-in\", \"pulse 1s infinite\", etc.\n *\n * CSS animation shorthand order (all optional except name):\n * animation: name | duration | timing | delay | iteration | direction | fill-mode | play-state\n *\n * Animation names must:\n * - Start with a letter, underscore, or hyphen (but not a digit or CSS keyword)\n * - Not be CSS keywords: none, initial, inherit, unset, revert\n */\nconst CSS_KEYWORDS = new Set([\n 'none',\n 'initial',\n 'inherit',\n 'unset',\n 'revert',\n 'auto',\n 'normal',\n 'running',\n 'paused',\n]);\n\n/**\n * Pattern to match animation name at the start of an animation value.\n * Must start with letter, underscore, or hyphen (not digit).\n */\nconst ANIMATION_NAME_PATTERN = /^([a-zA-Z_-][a-zA-Z0-9_-]*)/;\n\n// ============================================================================\n// Extraction Functions\n// ============================================================================\n\n/**\n * Check if styles object has local @keyframes definition.\n * Fast path: single property lookup.\n */\nexport function hasLocalKeyframes(styles: Styles): boolean {\n return KEYFRAMES_KEY in styles;\n}\n\n/**\n * Extract local @keyframes from styles object.\n * Returns null if no local keyframes (fast path).\n */\nexport function extractLocalKeyframes(\n styles: Styles,\n): Record<string, KeyframesSteps> | null {\n const keyframes = styles[KEYFRAMES_KEY];\n if (!keyframes || typeof keyframes !== 'object') {\n return null;\n }\n return keyframes as Record<string, KeyframesSteps>;\n}\n\n/**\n * Merge local and global keyframes.\n * Local keyframes take priority over global.\n * Returns null if no keyframes exist (fast path).\n */\nexport function mergeKeyframes(\n local: Record<string, KeyframesSteps> | null,\n global: Record<string, KeyframesSteps> | null,\n): Record<string, KeyframesSteps> | null {\n if (!local && !global) return null;\n if (!local) return global;\n if (!global) return local;\n // Local overrides global\n return { ...global, ...local };\n}\n\n// ============================================================================\n// Animation Name Extraction\n// ============================================================================\n\n/**\n * Extract animation name from a single animation value.\n * Returns null if no valid name found.\n *\n * Examples:\n * - \"fadeIn 300ms ease-in\" → \"fadeIn\"\n * - \"1s pulse infinite\" → \"pulse\" (name can be anywhere)\n * - \"none\" → null (CSS keyword)\n * - \"300ms ease-in\" → null (no name, just duration/timing)\n */\nfunction extractAnimationNameFromValue(value: string): string | null {\n const trimmed = value.trim();\n if (!trimmed) return null;\n\n // Split by whitespace and find the first valid animation name\n const parts = trimmed.split(/\\s+/);\n\n for (const part of parts) {\n // Skip CSS keywords\n if (CSS_KEYWORDS.has(part.toLowerCase())) continue;\n\n // Skip time values (e.g., 300ms, 1s, 0.5s)\n if (/^-?[\\d.]+m?s$/i.test(part)) continue;\n\n // Skip iteration counts (e.g., infinite, 3)\n if (part === 'infinite' || /^\\d+$/.test(part)) continue;\n\n // Skip direction values\n if (\n ['normal', 'reverse', 'alternate', 'alternate-reverse'].includes(\n part.toLowerCase(),\n )\n )\n continue;\n\n // Skip fill-mode values\n if (['forwards', 'backwards', 'both'].includes(part.toLowerCase()))\n continue;\n\n // Skip play-state values\n if (['running', 'paused'].includes(part.toLowerCase())) continue;\n\n // Skip timing functions (ease, linear, ease-in, etc., or cubic-bezier/steps)\n if (\n /^(ease|linear|ease-in|ease-out|ease-in-out|step-start|step-end)$/i.test(\n part,\n )\n )\n continue;\n if (/^(cubic-bezier|steps)\\(/i.test(part)) continue;\n\n // Check if it looks like a valid animation name\n const match = ANIMATION_NAME_PATTERN.exec(part);\n if (match) {\n return match[1];\n }\n }\n\n return null;\n}\n\n/**\n * Extract all animation names from an animation property value.\n * Handles multiple animations separated by commas.\n *\n * Example: \"fadeIn 300ms, slideIn 500ms ease-out\" → [\"fadeIn\", \"slideIn\"]\n */\nfunction extractAnimationNamesFromAnimationValue(value: string): string[] {\n const names: string[] = [];\n\n // Split by comma for multiple animations\n const animations = value.split(',');\n\n for (const animation of animations) {\n const name = extractAnimationNameFromValue(animation);\n if (name && !names.includes(name)) {\n names.push(name);\n }\n }\n\n return names;\n}\n\n/**\n * Extract animation names from a style value (handles mappings and arrays).\n */\nfunction extractAnimationNamesFromStyleValue(\n value: unknown,\n names: Set<string>,\n): void {\n if (typeof value === 'string') {\n for (const name of extractAnimationNamesFromAnimationValue(value)) {\n names.add(name);\n }\n } else if (Array.isArray(value)) {\n // Responsive array\n for (const v of value) {\n extractAnimationNamesFromStyleValue(v, names);\n }\n } else if (value && typeof value === 'object') {\n // State mapping\n for (const v of Object.values(value)) {\n extractAnimationNamesFromStyleValue(v, names);\n }\n }\n}\n\n/**\n * Extract all animation names referenced in styles.\n * Scans 'animation' and 'animationName' properties including in state mappings.\n * Returns empty set if no animation properties found (fast path).\n */\nexport function extractAnimationNamesFromStyles(styles: Styles): Set<string> {\n const names = new Set<string>();\n\n // Check animation property\n if ('animation' in styles) {\n extractAnimationNamesFromStyleValue(styles.animation, names);\n }\n\n // Check animationName property\n if ('animationName' in styles) {\n extractAnimationNamesFromStyleValue(styles.animationName, names);\n }\n\n // Check nested selectors (sub-elements)\n for (const [key, value] of Object.entries(styles)) {\n // Skip non-selector keys and special keys\n if (key === '$' || key === KEYFRAMES_KEY) continue;\n\n // Check if it's a selector (starts with &, ., or uppercase)\n if (\n (key.startsWith('&') || key.startsWith('.') || /^[A-Z]/.test(key)) &&\n value &&\n typeof value === 'object'\n ) {\n // Recursively extract from nested styles\n const nestedNames = extractAnimationNamesFromStyles(value as Styles);\n for (const name of nestedNames) {\n names.add(name);\n }\n }\n }\n\n return names;\n}\n\n// ============================================================================\n// Name Replacement\n// ============================================================================\n\n/**\n * Replace animation names in CSS declarations with injected names.\n * Optimized to avoid regex creation - uses simple string replacement.\n *\n * @param declarations CSS declarations string\n * @param nameMap Map from original name to injected name (only contains names that differ)\n * @returns Updated declarations string\n */\n/**\n * The name a local `@keyframes` block is emitted under.\n *\n * Content-addressed, and a pure function of what was authored: the same steps\n * always produce the same name, and different steps under the same authored\n * name cannot collide. That is what lets the server and the client agree —\n * a name handed out by whichever injector happened to see the definition first\n * depends on run order, so the two would disagree on both the animation name\n * and the class that references it.\n */\nexport function resolveKeyframesName(\n authored: string,\n steps: KeyframesSteps,\n): string {\n return `${authored}-${hashString(JSON.stringify(steps))}`;\n}\n\n/**\n * The emitted name for every local `@keyframes` in `styles`, by authored name.\n * Pure — the server, the RSC pass and the client all reach the same answer.\n */\nexport function resolveKeyframesNames(\n used: Record<string, KeyframesSteps>,\n): Map<string, string> {\n const names = new Map<string, string>();\n\n for (const [authored, steps] of Object.entries(used)) {\n names.set(authored, resolveKeyframesName(authored, steps));\n }\n\n return names;\n}\n\n/**\n * Whether `declarations` names `animation` as an animation to run.\n *\n * Only `animation` and `animation-name` values count, and only whole tokens\n * within them: an animation called `crossfade` does not use keyframes called\n * `fade`. Same parsing as `replaceAnimationNames`, so the two agree on what\n * counts as a reference.\n */\nexport function referencesAnimation(\n declarations: string,\n animation: string,\n): boolean {\n if (!declarations.includes('animation')) return false;\n\n for (const part of declarations.split(';')) {\n const colonIdx = part.indexOf(':');\n if (colonIdx === -1) continue;\n\n const prop = part.slice(0, colonIdx).trim().toLowerCase();\n if (prop !== 'animation' && prop !== 'animation-name') continue;\n\n const value = part.slice(colonIdx + 1);\n if (replaceWord(value, animation, '\\u0000') !== value) return true;\n }\n\n return false;\n}\n\nexport function replaceAnimationNames(\n declarations: string,\n nameMap: Map<string, string>,\n): string {\n // Fast path: no animation properties\n if (!declarations.includes('animation')) return declarations;\n\n // Parse and replace\n const parts = declarations.split(';');\n let modified = false;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const colonIdx = part.indexOf(':');\n if (colonIdx === -1) continue;\n\n const prop = part.slice(0, colonIdx).trim().toLowerCase();\n\n if (prop === 'animation' || prop === 'animation-name') {\n const prefix = part.slice(0, colonIdx + 1);\n let value = part.slice(colonIdx + 1);\n\n // Replace each animation name using simple word replacement\n for (const [original, injected] of nameMap) {\n // Simple word boundary replacement without regex\n const newValue = replaceWord(value, original, injected);\n if (newValue !== value) {\n value = newValue;\n modified = true;\n }\n }\n\n parts[i] = prefix + value;\n }\n }\n\n return modified ? parts.join(';') : declarations;\n}\n\n/**\n * Replace a word in a string (word boundary aware, no regex).\n */\nfunction replaceWord(str: string, word: string, replacement: string): string {\n let result = str;\n let idx = 0;\n\n while ((idx = result.indexOf(word, idx)) !== -1) {\n // Check word boundaries\n const before = idx === 0 ? ' ' : result[idx - 1];\n const after =\n idx + word.length >= result.length ? ' ' : result[idx + word.length];\n\n const isWordBoundaryBefore = !/[a-zA-Z0-9_-]/.test(before);\n const isWordBoundaryAfter = !/[a-zA-Z0-9_-]/.test(after);\n\n if (isWordBoundaryBefore && isWordBoundaryAfter) {\n result =\n result.slice(0, idx) + replacement + result.slice(idx + word.length);\n idx += replacement.length;\n } else {\n idx += word.length;\n }\n }\n\n return result;\n}\n\n// ============================================================================\n// Filter Functions\n// ============================================================================\n\n/**\n * Filter keyframes to only those that are actually used.\n * Returns null if no keyframes are used (fast path).\n */\nexport function filterUsedKeyframes(\n keyframes: Record<string, KeyframesSteps> | null,\n usedNames: Set<string>,\n): Record<string, KeyframesSteps> | null {\n if (!keyframes || usedNames.size === 0) return null;\n\n const used: Record<string, KeyframesSteps> = {};\n let hasAny = false;\n\n for (const name of usedNames) {\n if (keyframes[name]) {\n used[name] = keyframes[name];\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M,SAAS,QAAQ,IAAI,MAAM,OAAO,MAAM;EAC9C,MAAM,QACJ,MAAM,KAAK,UAAU,OAAO,SAAS,MAAM,OAAO,MAAM,KAAK;EAE/D,MAAM,uBAAuB,CAAC,gBAAgB,KAAK,MAAM;EACzD,MAAM,sBAAsB,CAAC,gBAAgB,KAAK,KAAK;EAEvD,IAAI,wBAAwB,qBAAqB;GAC/C,SACE,OAAO,MAAM,GAAG,GAAG,IAAI,cAAc,OAAO,MAAM,MAAM,KAAK,MAAM;GACrE,OAAO,YAAY;EACrB,OACE,OAAO,KAAK;CAEhB;CAEA,OAAO;AACT;;;;;AAUA,SAAgB,oBACd,WACA,WACuC;CACvC,IAAI,CAAC,aAAa,UAAU,SAAS,GAAG,OAAO;CAE/C,MAAM,OAAuC,CAAC;CAC9C,IAAI,SAAS;CAEb,KAAK,MAAM,QAAQ,WACjB,IAAI,UAAU,OAAO;EACnB,KAAK,QAAQ,UAAU;EACvB,SAAS;CACX;CAGF,OAAO,SAAS,OAAO;AACzB"}
1
+ {"version":3,"file":"keyframes-B8uPLZwx.js","names":[],"sources":["../src/chunks/definitions.ts","../src/chunks/cacheKey.ts","../src/chunks/renderChunk.ts","../src/keyframes/index.ts"],"sourcesContent":["/**\n * Style chunk definitions for CSS chunking optimization.\n *\n * Styles are grouped into chunks based on:\n * 1. Handler dependencies - styles that share a handler MUST be in the same chunk\n * 2. Logical grouping - related styles grouped for better cache reuse\n *\n * See STYLE_CHUNKING_SPEC.md for detailed rationale.\n *\n * ============================================================================\n * ⚠️ CRITICAL ARCHITECTURAL CONSTRAINT: NO CROSS-CHUNK HANDLER DEPENDENCIES\n * ============================================================================\n *\n * Style handlers declare their dependencies via `__lookupStyles` array.\n * This creates a dependency graph where handlers read multiple style props.\n *\n * **ALL styles in a handler's `__lookupStyles` MUST be in the SAME chunk.**\n *\n * Why this matters:\n * 1. Each chunk computes a cache key from ONLY its own style values\n * 2. If a handler reads a style from another chunk, that value isn't in the cache key\n * 3. Changing the cross-chunk style won't invalidate this chunk's cache\n * 4. Result: stale CSS output or incorrect cache hits\n *\n * Example of a violation:\n * ```\n * // flowStyle.__lookupStyles = ['display', 'flow']\n * // If 'display' is in DISPLAY chunk and 'flow' is in LAYOUT chunk:\n * // - User sets { display: 'grid', flow: 'column' }\n * // - LAYOUT chunk caches CSS with flow=column, display=grid\n * // - User changes to { display: 'flex', flow: 'column' }\n * // - LAYOUT chunk cache key unchanged (only has 'flow')\n * // - Returns stale CSS computed with display=grid!\n * ```\n *\n * Before adding/moving styles, verify:\n * 1. Find all handlers that use this style (grep for the style name in __lookupStyles)\n * 2. Ensure ALL styles from each handler's __lookupStyles are in the same chunk\n *\n * For **custom** handlers registered through `configure({ handlers })` this is no\n * longer only a convention: `alignHandlerChunks()` in `styles/predefined.ts` pulls\n * any style name the lists below don't know into its handler's existing chunk, and\n * warns when a handler bridges two chunks defined here. The lists below are still\n * hand-maintained, so the constraint must be checked by hand when editing them.\n * ============================================================================\n */\n\nimport { isSelector } from '../pipeline';\n\nimport { CHUNK_NAMES, STYLE_TO_CHUNK } from './style-chunk-map';\nimport type { ChunkName } from './style-chunk-map';\n\n// ============================================================================\n// Chunk Style Lists\n// ============================================================================\n\n// The chunk style lists and the style→chunk map live in `style-chunk-map.ts` so\n// that the map is populated by importing *that* module, independent of whether\n// this one has been loaded. Re-exported here for the original import paths.\nexport {\n APPEARANCE_CHUNK_STYLES,\n DIMENSION_CHUNK_STYLES,\n DISPLAY_CHUNK_STYLES,\n FONT_CHUNK_STYLES,\n LAYOUT_CHUNK_STYLES,\n POSITION_CHUNK_STYLES,\n} from './style-chunk-map';\nexport { CHUNK_NAMES, STYLE_TO_CHUNK } from './style-chunk-map';\nexport type { ChunkName } from './style-chunk-map';\n\n// ============================================================================\n// Chunk Priority Order\n// ============================================================================\n\n/**\n * Chunk processing order. This ensures deterministic className allocation\n * regardless of style key order in the input.\n */\nconst CHUNK_ORDER: readonly string[] = [\n CHUNK_NAMES.APPEARANCE,\n CHUNK_NAMES.FONT,\n CHUNK_NAMES.DIMENSION,\n CHUNK_NAMES.DISPLAY,\n CHUNK_NAMES.LAYOUT,\n CHUNK_NAMES.POSITION,\n CHUNK_NAMES.MISC,\n CHUNK_NAMES.SUBCOMPONENTS,\n] as const;\n\n/**\n * Map from chunk name to its priority index for sorting.\n */\nconst _CHUNK_PRIORITY = new Map<string, number>(\n CHUNK_ORDER.map((name, index) => [name, index]),\n);\n\n// ============================================================================\n// Chunk Info Interface\n// ============================================================================\n\nexport interface ChunkInfo {\n /** Name of the chunk */\n name: ChunkName | string;\n /** Style keys belonging to this chunk */\n styleKeys: string[];\n}\n\n// ============================================================================\n// Style Categorization\n// ============================================================================\n\n/**\n * Categorize style keys into chunks.\n *\n * Returns chunks in a deterministic order (by CHUNK_ORDER) regardless\n * of the order of keys in the input styles object.\n *\n * @param styles - The styles object to categorize\n * @returns Map of chunk name to array of style keys in that chunk (in priority order)\n */\nexport function categorizeStyleKeys(\n styles: Record<string, unknown>,\n): Map<string, string[]> {\n // First pass: collect keys into chunks (unordered)\n const chunkData: Record<string, string[]> = {};\n const keys = Object.keys(styles);\n\n for (const key of keys) {\n // Skip the $ helper key (used for selector combinators)\n // Skip @keyframes and @property (processed separately in useStyles)\n // Skip recipe (resolved before pipeline by resolveRecipes)\n if (\n key === '$' ||\n key === '@keyframes' ||\n key === '@property' ||\n key === '@font-face' ||\n key === '@counter-style' ||\n key === '@function' ||\n key === 'recipe'\n ) {\n continue;\n }\n\n if (isSelector(key)) {\n // All selectors go into the subcomponents chunk\n if (!chunkData[CHUNK_NAMES.SUBCOMPONENTS]) {\n chunkData[CHUNK_NAMES.SUBCOMPONENTS] = [];\n }\n chunkData[CHUNK_NAMES.SUBCOMPONENTS].push(key);\n } else {\n // Look up the chunk for this style, default to misc\n const chunkName = STYLE_TO_CHUNK.get(key) ?? CHUNK_NAMES.MISC;\n if (!chunkData[chunkName]) {\n chunkData[chunkName] = [];\n }\n chunkData[chunkName].push(key);\n }\n }\n\n // Second pass: build ordered Map based on CHUNK_ORDER\n const orderedChunks = new Map<string, string[]>();\n\n // Add chunks in priority order\n for (const chunkName of CHUNK_ORDER) {\n if (chunkData[chunkName] && chunkData[chunkName].length > 0) {\n // Sort keys within chunk for consistent cache key generation\n orderedChunks.set(chunkName, chunkData[chunkName].sort());\n }\n }\n\n // Handle any unknown chunks (shouldn't happen, but be defensive)\n for (const chunkName of Object.keys(chunkData)) {\n if (!orderedChunks.has(chunkName)) {\n orderedChunks.set(chunkName, chunkData[chunkName].sort());\n }\n }\n\n return orderedChunks;\n}\n","/**\n * Chunk-specific cache key generation.\n *\n * Generates cache keys that only include styles relevant to a specific chunk,\n * enabling more granular caching and reuse.\n *\n * Enhanced to support predefined states:\n * - Global predefined states don't affect cache keys (constant across app)\n * - Local predefined states only affect cache keys if referenced in the chunk\n */\n\nimport {\n extractLocalPredefinedStates,\n extractPredefinedStateRefs,\n} from '../states';\nimport type { Styles } from '../styles/types';\n\nconst _stableStringifyCache = new WeakMap<object, string>();\n\ninterface ChunkKeyEntry {\n /**\n * Flat `[key0, value0, key1, value1, …]` record of exactly what the key was\n * built from. Interleaving keeps an entry to one allocation.\n */\n snapshot: unknown[];\n key: string;\n}\n\n/**\n * Per-styles-object memo of generated keys, keyed by chunk name.\n *\n * Reading from this is free, so every call checks it. Writing to it is not:\n * the `WeakMap.set` plus the snapshot allocation measured ~35% of the cost of\n * generating a key from scratch, and it is pure waste for a styles object that\n * is never seen again. Callers therefore have to opt in via `reusable`, and\n * only for an object they know outlives the render that produced it.\n *\n * `Styles` is a plain mutable object, and nothing in the public\n * `computeStyles` / `useStyles` contract asks callers to freeze it, so a hit is\n * only returned after re-reading every value the key was built from and\n * confirming none of them changed. That check is deliberately shallow: it\n * compares the same references `stableStringify` would have looked up in\n * `_stableStringifyCache`, so a memoized key is stale in exactly the cases the\n * un-memoized function was already stale in — an object-valued style mutated\n * in place — and in no others.\n */\nconst _chunkKeyCache = new WeakMap<object, Map<string, ChunkKeyEntry>>();\n\n/**\n * Is `entry` still a valid key for this chunk of `styles`?\n *\n * True only when the chunk asks for the same style keys, in the same order,\n * and every one of them still reads back the value the key was built from.\n */\nfunction isEntryFresh(\n styles: Styles,\n entry: ChunkKeyEntry,\n styleKeys: string[],\n): boolean {\n const snapshot = entry.snapshot;\n const length = styleKeys.length;\n\n if (snapshot.length !== length * 2) return false;\n\n for (let i = 0, at = 0; i < length; i++, at += 2) {\n const key = styleKeys[i];\n if (snapshot[at] !== key) return false;\n if (styles[key] !== snapshot[at + 1]) return false;\n }\n\n return true;\n}\n\n/**\n * Recursively serialize a value with sorted keys for stable output.\n * This ensures that {a: 1, b: 2} and {b: 2, a: 1} produce the same string.\n * Uses a WeakMap cache for object values to avoid re-serializing the same references.\n */\nfunction stableStringify(value: unknown): string {\n if (value === null) {\n return 'null';\n }\n if (value === undefined) {\n return 'undefined';\n }\n if (typeof value !== 'object') {\n return JSON.stringify(value);\n }\n\n const cached = _stableStringifyCache.get(value as object);\n if (cached !== undefined) return cached;\n\n let result: string;\n if (Array.isArray(value)) {\n result = '[' + value.map(stableStringify).join(',') + ']';\n } else {\n const obj = value as Record<string, unknown>;\n const sortedKeys = Object.keys(obj).sort();\n const parts: string[] = [];\n for (const key of sortedKeys) {\n if (obj[key] !== undefined) {\n parts.push(`${JSON.stringify(key)}:${stableStringify(obj[key])}`);\n }\n }\n result = '{' + parts.join(',') + '}';\n }\n\n _stableStringifyCache.set(value as object, result);\n return result;\n}\n\nfunction computeChunkCacheKey(\n styles: Styles,\n chunkName: string,\n snapshot: unknown[],\n): string {\n // Start with chunk name for namespace separation\n const parts: string[] = [chunkName];\n\n // styleKeys are already sorted by categorizeStyleKeys\n let chunkStylesStr = '';\n\n // Reading from the snapshot rather than from `styles` guarantees the key and\n // the values a memo entry validates against are the same values.\n for (let at = 0; at < snapshot.length; at += 2) {\n const value = snapshot[at + 1];\n if (value !== undefined) {\n // Use stable stringify for consistent serialization regardless of key order\n const serialized = stableStringify(value);\n parts.push(`${snapshot[at] as string}:${serialized}`);\n chunkStylesStr += serialized;\n }\n }\n\n // Extract local predefined states from the full styles object\n const localStates = extractLocalPredefinedStates(styles);\n\n // Only include local predefined states that are actually referenced in this chunk\n if (Object.keys(localStates).length > 0) {\n const referencedStates = extractPredefinedStateRefs(chunkStylesStr);\n const relevantLocalStates: string[] = [];\n\n for (const stateName of referencedStates) {\n if (localStates[stateName]) {\n relevantLocalStates.push(`${stateName}=${localStates[stateName]}`);\n }\n }\n\n // Add relevant local states to the cache key (sorted for stability)\n if (relevantLocalStates.length > 0) {\n relevantLocalStates.sort();\n parts.unshift(`[states:${relevantLocalStates.join('|')}]`);\n }\n }\n\n // Use null character as separator (safe, not in JSON output)\n return parts.join('\\0');\n}\n\n/**\n * Generate a cache key for a specific chunk.\n *\n * Only includes the styles that belong to this chunk, allowing\n * chunks to be cached independently.\n *\n * Also includes relevant local predefined states that are referenced\n * by this chunk's styles.\n *\n * @param styles - The full styles object\n * @param chunkName - Name of the chunk\n * @param styleKeys - Keys of styles belonging to this chunk\n * @param reusable - Pass `true` only when `styles` outlives this render and\n * will be keyed again — a `tasty()` factory's own styles object, for\n * instance. It stores the result so the next render can skip serializing\n * every value again, which is worth doing only if there is a next render for\n * this exact object. Freshly merged per-render objects must leave it `false`:\n * storing them costs more than the key they would never reuse. Reading an\n * existing entry does not require it.\n * @returns A stable cache key string\n */\nexport function generateChunkCacheKey(\n styles: Styles,\n chunkName: string,\n styleKeys: string[],\n reusable = false,\n): string {\n let perStyles = _chunkKeyCache.get(styles as object);\n\n if (perStyles !== undefined) {\n const entry = perStyles.get(chunkName);\n if (entry !== undefined && isEntryFresh(styles, entry, styleKeys)) {\n return entry.key;\n }\n }\n\n const length = styleKeys.length;\n const snapshot: unknown[] = new Array(length * 2);\n\n for (let i = 0, at = 0; i < length; i++, at += 2) {\n const styleKey = styleKeys[i];\n snapshot[at] = styleKey;\n snapshot[at + 1] = styles[styleKey];\n }\n\n const key = computeChunkCacheKey(styles, chunkName, snapshot);\n\n if (reusable) {\n if (perStyles === undefined) {\n perStyles = new Map();\n _chunkKeyCache.set(styles as object, perStyles);\n }\n perStyles.set(chunkName, { snapshot, key });\n }\n\n return key;\n}\n","/**\n * Chunk-specific style rendering.\n *\n * Renders styles for a specific chunk by filtering the styles object\n * to only include relevant keys before passing to renderStyles.\n */\n\nimport type { RenderResult } from '../pipeline';\nimport { hasPipelineCacheEntry, renderStyles } from '../pipeline';\nimport { extractLocalPredefinedStates } from '../states';\nimport type { Styles } from '../styles/types';\n\nimport { CHUNK_NAMES } from './definitions';\n\n/**\n * Build a filtered styles object for a regular chunk.\n */\nfunction buildFilteredStyles(styles: Styles, styleKeys: string[]): Styles {\n const localPredefinedStates = extractLocalPredefinedStates(styles);\n const filteredStyles: Styles = {};\n\n for (const [key, value] of Object.entries(localPredefinedStates)) {\n filteredStyles[key] = value;\n }\n\n for (const key of styleKeys) {\n const value = styles[key];\n if (value !== undefined) {\n filteredStyles[key] = value;\n }\n }\n\n return filteredStyles;\n}\n\n/**\n * Build a filtered styles object for the subcomponents chunk.\n */\nfunction buildSubcomponentFilteredStyles(\n styles: Styles,\n selectorKeys: string[],\n): Styles {\n const localPredefinedStates = extractLocalPredefinedStates(styles);\n const filteredStyles: Styles = {};\n\n for (const [key, value] of Object.entries(localPredefinedStates)) {\n filteredStyles[key] = value;\n }\n\n for (const key of selectorKeys) {\n const value = styles[key];\n if (value !== undefined) {\n filteredStyles[key] = value;\n }\n }\n\n if (styles.$ !== undefined) {\n filteredStyles.$ = styles.$;\n }\n\n return filteredStyles;\n}\n\n/**\n * Render styles for a specific chunk.\n *\n * On pipeline cache hit, avoids building the filtered styles object entirely.\n * Only constructs it on cache miss when the pipeline actually needs the styles.\n *\n * IMPORTANT: Local predefined states (e.g., '@mobile': '@media(w < 600px)')\n * are always included in the filtered styles, regardless of which chunk is\n * being rendered. This ensures that state references like '@mobile' in any\n * chunk can be properly resolved by the pipeline.\n *\n * @param styles - The full styles object\n * @param chunkName - Name of the chunk being rendered\n * @param styleKeys - Keys of styles belonging to this chunk\n * @returns RenderResult with rules for this chunk\n */\nexport function renderStylesForChunk(\n styles: Styles,\n chunkName: string,\n styleKeys: string[],\n pipelineCacheKey?: string,\n): RenderResult {\n if (styleKeys.length === 0) {\n return { rules: [], className: '' };\n }\n\n // Fast path: skip building filteredStyles when pipeline has a cached result\n if (pipelineCacheKey && hasPipelineCacheEntry(pipelineCacheKey)) {\n return renderStyles(undefined, undefined, undefined, pipelineCacheKey);\n }\n\n // Cache miss: build filtered styles and run pipeline\n const filteredStyles =\n chunkName === CHUNK_NAMES.SUBCOMPONENTS\n ? buildSubcomponentFilteredStyles(styles, styleKeys)\n : buildFilteredStyles(styles, styleKeys);\n\n return renderStyles(filteredStyles, undefined, undefined, pipelineCacheKey);\n}\n","/**\n * Keyframes Utilities\n *\n * Optimized utilities for extracting and processing keyframes in styles.\n * Designed for zero overhead when no keyframes are used.\n */\n\nimport type { KeyframesSteps } from '../injector/types';\nimport type { Styles } from '../styles/types';\nimport { hashString } from '../utils/hash';\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst KEYFRAMES_KEY = '@keyframes';\n\n/**\n * Pattern to extract animation names from CSS animation property values.\n * Animation name is typically the first identifier in the shorthand.\n * Handles: \"fadeIn 300ms ease-in\", \"pulse 1s infinite\", etc.\n *\n * CSS animation shorthand order (all optional except name):\n * animation: name | duration | timing | delay | iteration | direction | fill-mode | play-state\n *\n * Animation names must:\n * - Start with a letter, underscore, or hyphen (but not a digit or CSS keyword)\n * - Not be CSS keywords: none, initial, inherit, unset, revert\n */\nconst CSS_KEYWORDS = new Set([\n 'none',\n 'initial',\n 'inherit',\n 'unset',\n 'revert',\n 'auto',\n 'normal',\n 'running',\n 'paused',\n]);\n\n/**\n * Pattern to match animation name at the start of an animation value.\n * Must start with letter, underscore, or hyphen (not digit).\n */\nconst ANIMATION_NAME_PATTERN = /^([a-zA-Z_-][a-zA-Z0-9_-]*)/;\n\n// ============================================================================\n// Extraction Functions\n// ============================================================================\n\n/**\n * Check if styles object has local @keyframes definition.\n * Fast path: single property lookup.\n */\nexport function hasLocalKeyframes(styles: Styles): boolean {\n return KEYFRAMES_KEY in styles;\n}\n\n/**\n * Extract local @keyframes from styles object.\n * Returns null if no local keyframes (fast path).\n */\nexport function extractLocalKeyframes(\n styles: Styles,\n): Record<string, KeyframesSteps> | null {\n const keyframes = styles[KEYFRAMES_KEY];\n if (!keyframes || typeof keyframes !== 'object') {\n return null;\n }\n return keyframes as Record<string, KeyframesSteps>;\n}\n\n/**\n * Merge local and global keyframes.\n * Local keyframes take priority over global.\n * Returns null if no keyframes exist (fast path).\n */\nexport function mergeKeyframes(\n local: Record<string, KeyframesSteps> | null,\n global: Record<string, KeyframesSteps> | null,\n): Record<string, KeyframesSteps> | null {\n if (!local && !global) return null;\n if (!local) return global;\n if (!global) return local;\n // Local overrides global\n return { ...global, ...local };\n}\n\n// ============================================================================\n// Animation Name Extraction\n// ============================================================================\n\n/**\n * Extract animation name from a single animation value.\n * Returns null if no valid name found.\n *\n * Examples:\n * - \"fadeIn 300ms ease-in\" → \"fadeIn\"\n * - \"1s pulse infinite\" → \"pulse\" (name can be anywhere)\n * - \"none\" → null (CSS keyword)\n * - \"300ms ease-in\" → null (no name, just duration/timing)\n */\nfunction extractAnimationNameFromValue(value: string): string | null {\n const trimmed = value.trim();\n if (!trimmed) return null;\n\n // Split by whitespace and find the first valid animation name\n const parts = trimmed.split(/\\s+/);\n\n for (const part of parts) {\n // Skip CSS keywords\n if (CSS_KEYWORDS.has(part.toLowerCase())) continue;\n\n // Skip time values (e.g., 300ms, 1s, 0.5s)\n if (/^-?[\\d.]+m?s$/i.test(part)) continue;\n\n // Skip iteration counts (e.g., infinite, 3)\n if (part === 'infinite' || /^\\d+$/.test(part)) continue;\n\n // Skip direction values\n if (\n ['normal', 'reverse', 'alternate', 'alternate-reverse'].includes(\n part.toLowerCase(),\n )\n )\n continue;\n\n // Skip fill-mode values\n if (['forwards', 'backwards', 'both'].includes(part.toLowerCase()))\n continue;\n\n // Skip play-state values\n if (['running', 'paused'].includes(part.toLowerCase())) continue;\n\n // Skip timing functions (ease, linear, ease-in, etc., or cubic-bezier/steps)\n if (\n /^(ease|linear|ease-in|ease-out|ease-in-out|step-start|step-end)$/i.test(\n part,\n )\n )\n continue;\n if (/^(cubic-bezier|steps)\\(/i.test(part)) continue;\n\n // Check if it looks like a valid animation name\n const match = ANIMATION_NAME_PATTERN.exec(part);\n if (match) {\n return match[1];\n }\n }\n\n return null;\n}\n\n/**\n * Extract all animation names from an animation property value.\n * Handles multiple animations separated by commas.\n *\n * Example: \"fadeIn 300ms, slideIn 500ms ease-out\" → [\"fadeIn\", \"slideIn\"]\n */\nfunction extractAnimationNamesFromAnimationValue(value: string): string[] {\n const names: string[] = [];\n\n // Split by comma for multiple animations\n const animations = value.split(',');\n\n for (const animation of animations) {\n const name = extractAnimationNameFromValue(animation);\n if (name && !names.includes(name)) {\n names.push(name);\n }\n }\n\n return names;\n}\n\n/**\n * Extract animation names from a style value (handles mappings and arrays).\n */\nfunction extractAnimationNamesFromStyleValue(\n value: unknown,\n names: Set<string>,\n): void {\n if (typeof value === 'string') {\n for (const name of extractAnimationNamesFromAnimationValue(value)) {\n names.add(name);\n }\n } else if (Array.isArray(value)) {\n // Responsive array\n for (const v of value) {\n extractAnimationNamesFromStyleValue(v, names);\n }\n } else if (value && typeof value === 'object') {\n // State mapping\n for (const v of Object.values(value)) {\n extractAnimationNamesFromStyleValue(v, names);\n }\n }\n}\n\n/**\n * Extract all animation names referenced in styles.\n * Scans 'animation' and 'animationName' properties including in state mappings.\n * Returns empty set if no animation properties found (fast path).\n */\nexport function extractAnimationNamesFromStyles(styles: Styles): Set<string> {\n const names = new Set<string>();\n\n // Check animation property\n if ('animation' in styles) {\n extractAnimationNamesFromStyleValue(styles.animation, names);\n }\n\n // Check animationName property\n if ('animationName' in styles) {\n extractAnimationNamesFromStyleValue(styles.animationName, names);\n }\n\n // Check nested selectors (sub-elements)\n for (const [key, value] of Object.entries(styles)) {\n // Skip non-selector keys and special keys\n if (key === '$' || key === KEYFRAMES_KEY) continue;\n\n // Check if it's a selector (starts with &, ., or uppercase)\n if (\n (key.startsWith('&') || key.startsWith('.') || /^[A-Z]/.test(key)) &&\n value &&\n typeof value === 'object'\n ) {\n // Recursively extract from nested styles\n const nestedNames = extractAnimationNamesFromStyles(value as Styles);\n for (const name of nestedNames) {\n names.add(name);\n }\n }\n }\n\n return names;\n}\n\n// ============================================================================\n// Name Replacement\n// ============================================================================\n\n/**\n * Replace animation names in CSS declarations with injected names.\n * Optimized to avoid regex creation - uses simple string replacement.\n *\n * @param declarations CSS declarations string\n * @param nameMap Map from original name to injected name (only contains names that differ)\n * @returns Updated declarations string\n */\n/**\n * The name a local `@keyframes` block is emitted under.\n *\n * Content-addressed, and a pure function of what was authored: the same steps\n * always produce the same name, and different steps under the same authored\n * name cannot collide. That is what lets the server and the client agree —\n * a name handed out by whichever injector happened to see the definition first\n * depends on run order, so the two would disagree on both the animation name\n * and the class that references it.\n */\nexport function resolveKeyframesName(\n authored: string,\n steps: KeyframesSteps,\n): string {\n return `${authored}-${hashString(JSON.stringify(steps))}`;\n}\n\n/**\n * The emitted name for every local `@keyframes` in `styles`, by authored name.\n * Pure — the server, the RSC pass and the client all reach the same answer.\n */\nexport function resolveKeyframesNames(\n used: Record<string, KeyframesSteps>,\n): Map<string, string> {\n const names = new Map<string, string>();\n\n for (const [authored, steps] of Object.entries(used)) {\n names.set(authored, resolveKeyframesName(authored, steps));\n }\n\n return names;\n}\n\n/**\n * Whether `declarations` names `animation` as an animation to run.\n *\n * Only `animation` and `animation-name` values count, and only whole tokens\n * within them: an animation called `crossfade` does not use keyframes called\n * `fade`. Same parsing as `replaceAnimationNames`, so the two agree on what\n * counts as a reference.\n */\nexport function referencesAnimation(\n declarations: string,\n animation: string,\n): boolean {\n if (!declarations.includes('animation')) return false;\n\n for (const part of declarations.split(';')) {\n const colonIdx = part.indexOf(':');\n if (colonIdx === -1) continue;\n\n const prop = part.slice(0, colonIdx).trim().toLowerCase();\n if (prop !== 'animation' && prop !== 'animation-name') continue;\n\n const value = part.slice(colonIdx + 1);\n if (replaceWord(value, animation, '\\u0000') !== value) return true;\n }\n\n return false;\n}\n\nexport function replaceAnimationNames(\n declarations: string,\n nameMap: Map<string, string>,\n): string {\n // Fast path: no animation properties\n if (!declarations.includes('animation')) return declarations;\n\n // Parse and replace\n const parts = declarations.split(';');\n let modified = false;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const colonIdx = part.indexOf(':');\n if (colonIdx === -1) continue;\n\n const prop = part.slice(0, colonIdx).trim().toLowerCase();\n\n if (prop === 'animation' || prop === 'animation-name') {\n const prefix = part.slice(0, colonIdx + 1);\n let value = part.slice(colonIdx + 1);\n\n // Replace each animation name using simple word replacement\n for (const [original, injected] of nameMap) {\n // Simple word boundary replacement without regex\n const newValue = replaceWord(value, original, injected);\n if (newValue !== value) {\n value = newValue;\n modified = true;\n }\n }\n\n parts[i] = prefix + value;\n }\n }\n\n return modified ? parts.join(';') : declarations;\n}\n\n/**\n * Replace a word in a string (word boundary aware, no regex).\n */\nfunction replaceWord(str: string, word: string, replacement: string): string {\n let result = str;\n let idx = 0;\n\n while ((idx = result.indexOf(word, idx)) !== -1) {\n // Check word boundaries\n const before = idx === 0 ? ' ' : result[idx - 1];\n const after =\n idx + word.length >= result.length ? ' ' : result[idx + word.length];\n\n const isWordBoundaryBefore = !/[a-zA-Z0-9_-]/.test(before);\n const isWordBoundaryAfter = !/[a-zA-Z0-9_-]/.test(after);\n\n if (isWordBoundaryBefore && isWordBoundaryAfter) {\n result =\n result.slice(0, idx) + replacement + result.slice(idx + word.length);\n idx += replacement.length;\n } else {\n idx += word.length;\n }\n }\n\n return result;\n}\n\n// ============================================================================\n// Filter Functions\n// ============================================================================\n\n/**\n * Filter keyframes to only those that are actually used.\n * Returns null if no keyframes are used (fast path).\n */\nexport function filterUsedKeyframes(\n keyframes: Record<string, KeyframesSteps> | null,\n usedNames: Set<string>,\n): Record<string, KeyframesSteps> | null {\n if (!keyframes || usedNames.size === 0) return null;\n\n const used: Record<string, KeyframesSteps> = {};\n let hasAny = false;\n\n for (const name of usedNames) {\n if (keyframes[name]) {\n used[name] = keyframes[name];\n hasAny = true;\n }\n }\n\n return hasAny ? used : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,MAAM,cAAiC;CACrC,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;AACd;AAKwB,IAAI,IAC1B,YAAY,KAAK,MAAM,UAAU,CAAC,MAAM,KAAK,CAAC,CAChD;;;;;;;;;;AA0BA,SAAgB,oBACd,QACuB;CAEvB,MAAM,YAAsC,CAAC;CAC7C,MAAM,OAAO,OAAO,KAAK,MAAM;CAE/B,KAAK,MAAM,OAAO,MAAM;EAItB,IACE,QAAQ,OACR,QAAQ,gBACR,QAAQ,eACR,QAAQ,gBACR,QAAQ,oBACR,QAAQ,eACR,QAAQ,UAER;EAGF,IAAI,WAAW,GAAG,GAAG;GAEnB,IAAI,CAAC,UAAU,YAAY,gBACzB,UAAU,YAAY,iBAAiB,CAAC;GAE1C,UAAU,YAAY,cAAc,CAAC,KAAK,GAAG;EAC/C,OAAO;GAEL,MAAM,YAAY,eAAe,IAAI,GAAG,KAAK,YAAY;GACzD,IAAI,CAAC,UAAU,YACb,UAAU,aAAa,CAAC;GAE1B,UAAU,UAAU,CAAC,KAAK,GAAG;EAC/B;CACF;CAGA,MAAM,gCAAgB,IAAI,IAAsB;CAGhD,KAAK,MAAM,aAAa,aACtB,IAAI,UAAU,cAAc,UAAU,UAAU,CAAC,SAAS,GAExD,cAAc,IAAI,WAAW,UAAU,UAAU,CAAC,KAAK,CAAC;CAK5D,KAAK,MAAM,aAAa,OAAO,KAAK,SAAS,GAC3C,IAAI,CAAC,cAAc,IAAI,SAA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,IAAI;AACtC;;;;AAKA,SAAS,YAAY,KAAa,MAAc,aAA6B;CAC3E,IAAI,SAAS;CACb,IAAI,MAAM;CAEV,QAAQ,MAAM,OAAO,QAAQ,MAAM,GAAG,OAAO,IAAI;EAE/C,MAAM,SAAS,QAAQ,IAAI,MAAM,OAAO,MAAM;EAC9C,MAAM,QACJ,MAAM,KAAK,UAAU,OAAO,SAAS,MAAM,OAAO,MAAM,KAAK;EAE/D,MAAM,uBAAuB,CAAC,gBAAgB,KAAK,MAAM;EACzD,MAAM,sBAAsB,CAAC,gBAAgB,KAAK,KAAK;EAEvD,IAAI,wBAAwB,qBAAqB;GAC/C,SACE,OAAO,MAAM,GAAG,GAAG,IAAI,cAAc,OAAO,MAAM,MAAM,KAAK,MAAM;GACrE,OAAO,YAAY;EACrB,OACE,OAAO,KAAK;CAEhB;CAEA,OAAO;AACT;;;;;AAUA,SAAgB,oBACd,WACA,WACuC;CACvC,IAAI,CAAC,aAAa,UAAU,SAAS,GAAG,OAAO;CAE/C,MAAM,OAAuC,CAAC;CAC9C,IAAI,SAAS;CAEb,KAAK,MAAM,QAAQ,WACjB,IAAI,UAAU,OAAO;EACnB,KAAK,QAAQ,UAAU;EACvB,SAAS;CACX;CAGF,OAAO,SAAS,OAAO;AACzB"}
@@ -1,4 +1,4 @@
1
- import { I as isSelector, Qt as isDevEnv } from "./config-B3gPdCqd.js";
1
+ import { I as isSelector, Qt as isDevEnv } from "./config-yXpe2jAV.js";
2
2
  //#region src/utils/merge-styles.ts
3
3
  const devMode = isDevEnv();
4
4
  const INHERIT_VALUE = "@inherit";
@@ -141,4 +141,4 @@ function mergeStyles(...objects) {
141
141
  //#endregion
142
142
  export { mergeStyles as t };
143
143
 
144
- //# sourceMappingURL=merge-styles-DuoZEsm9.js.map
144
+ //# sourceMappingURL=merge-styles-ChW1k-ZM.js.map