windrunner 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1442,12 +1442,7 @@ function getConfigOptions(options = {}, pluginKeys = []) {
1442
1442
  const newTheme = {};
1443
1443
  const themeKeys = Object.keys(config_default.theme);
1444
1444
  themeKeys.forEach((key) => {
1445
- newTheme[key] = theme2[key] || config_default.theme[key];
1446
- if (isFunction(newTheme[key])) {
1447
- newTheme[key] = newTheme[key]({
1448
- theme: (keyRef) => config_default.theme[keyRef]
1449
- });
1450
- }
1445
+ newTheme[key] = Object.prototype.hasOwnProperty.call(theme2, key) ? theme2[key] : config_default.theme[key];
1451
1446
  });
1452
1447
  themeKeys.forEach((key) => {
1453
1448
  if (isFunction(newTheme[key])) {
@@ -1671,6 +1666,64 @@ var BOX_SIZING_MAP = {
1671
1666
  border: "box-sizing: border-box;",
1672
1667
  content: "box-sizing: content-box;"
1673
1668
  };
1669
+ var BREAK_AFTER_MAP = {
1670
+ auto: "break-after: auto;",
1671
+ avoid: "break-after: avoid;",
1672
+ "avoid-page": "break-after: avoid-page;",
1673
+ "avoid-column": "break-after: avoid-column;",
1674
+ page: "break-after: page;",
1675
+ left: "break-after: left;",
1676
+ right: "break-after: right;",
1677
+ recto: "break-after: recto;",
1678
+ verso: "break-after: verso;"
1679
+ };
1680
+ var BREAK_BEFORE_MAP = {
1681
+ auto: "break-before: auto;",
1682
+ avoid: "break-before: avoid;",
1683
+ "avoid-page": "break-before: avoid-page;",
1684
+ "avoid-column": "break-before: avoid-column;",
1685
+ page: "break-before: page;",
1686
+ left: "break-before: left;",
1687
+ right: "break-before: right;",
1688
+ recto: "break-before: recto;",
1689
+ verso: "break-before: verso;"
1690
+ };
1691
+ var BREAK_INSIDE_MAP = {
1692
+ auto: "break-inside: auto;",
1693
+ avoid: "break-inside: avoid;",
1694
+ "avoid-page": "break-inside: avoid-page;",
1695
+ "avoid-column": "break-inside: avoid-column;"
1696
+ };
1697
+ var BOX_DECORATION_BREAK_MAP = {
1698
+ slice: "box-decoration-break: slice;",
1699
+ clone: "box-decoration-break: clone;"
1700
+ };
1701
+ var HYPHENS_MAP = {
1702
+ none: "hyphens: none;",
1703
+ manual: "hyphens: manual;",
1704
+ auto: "hyphens: auto;"
1705
+ };
1706
+ var COLOR_SCHEME_MAP = {
1707
+ light: "color-scheme: light;",
1708
+ dark: "color-scheme: dark;",
1709
+ normal: "color-scheme: normal;"
1710
+ };
1711
+ var SCROLLBAR_COLOR_MAP = {
1712
+ auto: "scrollbar-color: auto;",
1713
+ transparent: "scrollbar-color: transparent;",
1714
+ current: "scrollbar-color: currentColor;"
1715
+ };
1716
+ var SCROLLBAR_WIDTH_MAP = {
1717
+ auto: "scrollbar-width: auto;",
1718
+ thin: "scrollbar-width: thin;",
1719
+ none: "scrollbar-width: none;"
1720
+ };
1721
+ var SCROLLBAR_GUTTER_MAP = {
1722
+ auto: "scrollbar-gutter: auto;",
1723
+ stable: "scrollbar-gutter: stable;",
1724
+ "stable-both-edges": "scrollbar-gutter: stable both-edges;",
1725
+ "both-edges": "scrollbar-gutter: both-edges;"
1726
+ };
1674
1727
  var TABLE_LAYOUT_MAP = {
1675
1728
  auto: "table-layout: auto;",
1676
1729
  fixed: "table-layout: fixed;"
@@ -1827,6 +1880,16 @@ function buildLayoutDeclaration(baseToken, theme2) {
1827
1880
  const val = resolveThemeValue(theme2.order || {}, baseToken.slice(6));
1828
1881
  if (val !== void 0) return `order: ${val};`;
1829
1882
  }
1883
+ if (baseToken.startsWith("break-after-")) return BREAK_AFTER_MAP[baseToken.slice(12)] ?? void 0;
1884
+ if (baseToken.startsWith("break-before-")) return BREAK_BEFORE_MAP[baseToken.slice(13)] ?? void 0;
1885
+ if (baseToken.startsWith("break-inside-")) return BREAK_INSIDE_MAP[baseToken.slice(13)] ?? void 0;
1886
+ if (baseToken.startsWith("box-decoration-break-")) return BOX_DECORATION_BREAK_MAP[baseToken.slice(21)] ?? void 0;
1887
+ if (baseToken.startsWith("hyphens-")) return HYPHENS_MAP[baseToken.slice(8)] ?? void 0;
1888
+ if (baseToken.startsWith("color-scheme-")) return COLOR_SCHEME_MAP[baseToken.slice(13)] ?? void 0;
1889
+ if (baseToken.startsWith("scrollbar-color-")) return SCROLLBAR_COLOR_MAP[baseToken.slice(16)] ?? void 0;
1890
+ if (baseToken.startsWith("scrollbar-width-")) return SCROLLBAR_WIDTH_MAP[baseToken.slice(16)] ?? void 0;
1891
+ if (baseToken.startsWith("scrollbar-gutter-")) return SCROLLBAR_GUTTER_MAP[baseToken.slice(17)] ?? void 0;
1892
+ if (baseToken.startsWith("scroll-behavior-")) return SCROLL_BEHAVIOR_MAP[baseToken.slice(16)] ?? void 0;
1830
1893
  if (baseToken.startsWith("aspect-")) {
1831
1894
  const val = resolveThemeValue(theme2.aspectRatio || {}, baseToken.slice(7));
1832
1895
  if (val !== void 0) return `aspect-ratio: ${val};`;
@@ -1873,10 +1936,14 @@ function buildLayoutDeclaration(baseToken, theme2) {
1873
1936
  if (val !== void 0) return `will-change: ${val};`;
1874
1937
  }
1875
1938
  if (baseToken.startsWith("content-")) {
1876
- const val = resolveThemeValue(theme2.content || {}, baseToken.slice(8));
1877
- if (val !== void 0) return `content: "${val}";`;
1878
- const arb = resolveArbitraryValue(baseToken.slice(8));
1879
- if (arb !== void 0) return `content: ${arb};`;
1939
+ const valueKey = baseToken.slice(8);
1940
+ if (valueKey.startsWith("[") && valueKey.endsWith("]")) {
1941
+ const arb = resolveArbitraryValue(valueKey);
1942
+ if (arb !== void 0) return `content: ${arb};`;
1943
+ } else {
1944
+ const val = resolveThemeValue(theme2.content || {}, valueKey);
1945
+ if (val !== void 0) return `content: "${val}";`;
1946
+ }
1880
1947
  }
1881
1948
  if (baseToken.startsWith("size-")) {
1882
1949
  const val = resolveThemeValue(theme2.size || theme2.spacing || {}, baseToken.slice(5));
@@ -1959,6 +2026,12 @@ function buildGapDeclaration(baseToken, theme2) {
1959
2026
  }
1960
2027
  function buildDimensionDeclaration(baseToken, theme2) {
1961
2028
  const patterns = [
2029
+ { prefix: "min-inline-size-", prop: "min-inline-size", scale: theme2.minWidth || theme2.width || theme2.spacing || {} },
2030
+ { prefix: "max-inline-size-", prop: "max-inline-size", scale: theme2.maxWidth || theme2.width || theme2.spacing || {} },
2031
+ { prefix: "inline-size-", prop: "inline-size", scale: theme2.width || theme2.spacing || {} },
2032
+ { prefix: "min-block-size-", prop: "min-block-size", scale: theme2.minHeight || theme2.height || theme2.spacing || {} },
2033
+ { prefix: "max-block-size-", prop: "max-block-size", scale: theme2.maxHeight || theme2.height || theme2.spacing || {} },
2034
+ { prefix: "block-size-", prop: "block-size", scale: theme2.height || theme2.spacing || {} },
1962
2035
  { prefix: "min-w-", prop: "min-width", scale: theme2.minWidth || theme2.width || {} },
1963
2036
  { prefix: "max-w-", prop: "max-width", scale: theme2.maxWidth || theme2.width || {} },
1964
2037
  { prefix: "min-h-", prop: "min-height", scale: theme2.minHeight || theme2.height || {} },
@@ -2224,6 +2297,35 @@ var FONT_STYLE_MAP = {
2224
2297
  italic: "font-style: italic;",
2225
2298
  "not-italic": "font-style: normal;"
2226
2299
  };
2300
+ var FONT_STRETCH_MAP = {
2301
+ "ultra-condensed": "font-stretch: ultra-condensed;",
2302
+ "extra-condensed": "font-stretch: extra-condensed;",
2303
+ condensed: "font-stretch: condensed;",
2304
+ "semi-condensed": "font-stretch: semi-condensed;",
2305
+ normal: "font-stretch: normal;",
2306
+ "semi-expanded": "font-stretch: semi-expanded;",
2307
+ expanded: "font-stretch: expanded;",
2308
+ "extra-expanded": "font-stretch: extra-expanded;",
2309
+ "ultra-expanded": "font-stretch: ultra-expanded;"
2310
+ };
2311
+ var FONT_VARIANT_NUMERIC_MAP = {
2312
+ ordinal: "font-variant-numeric: ordinal;",
2313
+ "slashed-zero": "font-variant-numeric: slashed-zero;",
2314
+ "lining-nums": "font-variant-numeric: lining-nums;",
2315
+ "oldstyle-nums": "font-variant-numeric: oldstyle-nums;",
2316
+ "proportional-nums": "font-variant-numeric: proportional-nums;",
2317
+ "tabular-nums": "font-variant-numeric: tabular-nums;",
2318
+ "diagonal-fractions": "font-variant-numeric: diagonal-fractions;",
2319
+ "stacked-fractions": "font-variant-numeric: stacked-fractions;"
2320
+ };
2321
+ var LIST_STYLE_IMAGE_MAP = {
2322
+ none: "list-style-image: none;"
2323
+ };
2324
+ var HYPHENS_MAP2 = {
2325
+ none: "hyphens: none;",
2326
+ manual: "hyphens: manual;",
2327
+ auto: "hyphens: auto;"
2328
+ };
2227
2329
  var FONT_SMOOTHING_MAP = {
2228
2330
  antialiased: "-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;",
2229
2331
  "subpixel-antialiased": "-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;"
@@ -2272,6 +2374,12 @@ function buildTypographyDeclaration(baseToken, theme2) {
2272
2374
  return `font-family: ${fontFamily};`;
2273
2375
  }
2274
2376
  }
2377
+ if (baseToken.startsWith("font-stretch-")) {
2378
+ return FONT_STRETCH_MAP[baseToken.slice(13)] ?? void 0;
2379
+ }
2380
+ if (baseToken.startsWith("font-variant-numeric-")) {
2381
+ return FONT_VARIANT_NUMERIC_MAP[baseToken.slice(21)] ?? void 0;
2382
+ }
2275
2383
  if (baseToken.startsWith("leading-")) {
2276
2384
  const val = resolveThemeValue(theme2.lineHeight || {}, baseToken.slice(8));
2277
2385
  if (val !== void 0) return `line-height: ${val};`;
@@ -2299,13 +2407,18 @@ function buildTypographyDeclaration(baseToken, theme2) {
2299
2407
  if (baseToken.startsWith("list-")) {
2300
2408
  const key = baseToken.slice(5);
2301
2409
  if (LIST_STYLE_POSITION_MAP[key]) return LIST_STYLE_POSITION_MAP[key];
2410
+ if (LIST_STYLE_IMAGE_MAP[baseToken]) return LIST_STYLE_IMAGE_MAP[baseToken.slice(17)] ?? void 0;
2302
2411
  const val = resolveThemeValue(theme2.listStyleType || {}, key);
2303
2412
  if (val !== void 0) return `list-style-type: ${val};`;
2304
2413
  }
2414
+ if (baseToken.startsWith("list-style-image-")) {
2415
+ return LIST_STYLE_IMAGE_MAP[baseToken.slice(17)] ?? void 0;
2416
+ }
2305
2417
  if (baseToken.startsWith("whitespace-")) {
2306
2418
  const key = baseToken.slice(11);
2307
2419
  if (WHITESPACE_MAP[key]) return WHITESPACE_MAP[key];
2308
2420
  }
2421
+ if (baseToken.startsWith("hyphens-")) return HYPHENS_MAP2[baseToken.slice(8)] ?? void 0;
2309
2422
  if (baseToken === "text-wrap") return "text-wrap: wrap;";
2310
2423
  if (baseToken === "text-nowrap") return "text-wrap: nowrap;";
2311
2424
  if (baseToken === "text-balance") return "text-wrap: balance;";
@@ -2444,6 +2557,48 @@ var PERSPECTIVE_MAP = {
2444
2557
  midrange: "perspective: 800px;",
2445
2558
  distant: "perspective: 1200px;"
2446
2559
  };
2560
+ var PERSPECTIVE_ORIGIN_MAP = {
2561
+ center: "perspective-origin: center;",
2562
+ top: "perspective-origin: top;",
2563
+ bottom: "perspective-origin: bottom;",
2564
+ left: "perspective-origin: left;",
2565
+ right: "perspective-origin: right;",
2566
+ "top-left": "perspective-origin: top left;",
2567
+ "top-right": "perspective-origin: top right;",
2568
+ "bottom-left": "perspective-origin: bottom left;",
2569
+ "bottom-right": "perspective-origin: bottom right;"
2570
+ };
2571
+ var MASK_CLIP_MAP = {
2572
+ "mask-clip-border": "mask-clip: border; -webkit-mask-clip: border;",
2573
+ "mask-clip-padding": "mask-clip: padding; -webkit-mask-clip: padding;",
2574
+ "mask-clip-content": "mask-clip: content; -webkit-mask-clip: content;",
2575
+ "mask-clip-text": "mask-clip: text; -webkit-mask-clip: text;"
2576
+ };
2577
+ var MASK_COMPOSITE_MAP = {
2578
+ "mask-composite-add": "mask-composite: add; -webkit-mask-composite: add;",
2579
+ "mask-composite-subtract": "mask-composite: subtract; -webkit-mask-composite: subtract;",
2580
+ "mask-composite-intersect": "mask-composite: intersect; -webkit-mask-composite: intersect;",
2581
+ "mask-composite-exclude": "mask-composite: exclude; -webkit-mask-composite: exclude;",
2582
+ "mask-composite-replace": "mask-composite: replace; -webkit-mask-composite: replace;",
2583
+ "mask-composite-xor": "mask-composite: xor; -webkit-mask-composite: xor;"
2584
+ };
2585
+ var MASK_MODE_MAP = {
2586
+ "mask-mode-alpha": "mask-mode: alpha; -webkit-mask-mode: alpha;",
2587
+ "mask-mode-luminance": "mask-mode: luminance; -webkit-mask-mode: luminance;",
2588
+ "mask-mode-match-source": "mask-mode: match-source; -webkit-mask-mode: match-source;"
2589
+ };
2590
+ var MASK_ORIGIN_MAP = {
2591
+ "mask-origin-border": "mask-origin: border-box; -webkit-mask-origin: border-box;",
2592
+ "mask-origin-padding": "mask-origin: padding-box; -webkit-mask-origin: padding-box;",
2593
+ "mask-origin-content": "mask-origin: content-box; -webkit-mask-origin: content-box;",
2594
+ "mask-origin-fill": "mask-origin: fill-box; -webkit-mask-origin: fill-box;",
2595
+ "mask-origin-stroke": "mask-origin: stroke-box; -webkit-mask-origin: stroke-box;",
2596
+ "mask-origin-view": "mask-origin: view-box; -webkit-mask-origin: view-box;"
2597
+ };
2598
+ var MASK_TYPE_MAP = {
2599
+ "mask-type-luminance": "mask-type: luminance; -webkit-mask-type: luminance;",
2600
+ "mask-type-alpha": "mask-type: alpha; -webkit-mask-type: alpha;"
2601
+ };
2447
2602
  var MASK_LINEAR_MAP = {
2448
2603
  "mask-linear-to-t": "mask-image: linear-gradient(to top, black, transparent); -webkit-mask-image: linear-gradient(to top, black, transparent);",
2449
2604
  "mask-linear-to-tr": "mask-image: linear-gradient(to top right, black, transparent); -webkit-mask-image: linear-gradient(to top right, black, transparent);",
@@ -2640,7 +2795,10 @@ function buildRingOffsetDeclaration(baseToken, theme2) {
2640
2795
  if (widthVal !== void 0) {
2641
2796
  return `--tw-ring-offset-width: ${widthVal}; box-shadow: 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color, #fff), var(--tw-ring-shadow, 0 0 #0000);`;
2642
2797
  }
2643
- const color = resolveColorWithOpacity(theme2.ringOffsetColor || theme2.colors || {}, key);
2798
+ let color = resolveColorWithOpacity(theme2.ringOffsetColor || {}, key);
2799
+ if (color === void 0) {
2800
+ color = resolveColorWithOpacity(theme2.colors || {}, key);
2801
+ }
2644
2802
  if (color !== void 0) return `--tw-ring-offset-color: ${color};`;
2645
2803
  return void 0;
2646
2804
  }
@@ -2761,6 +2919,12 @@ function buildTransformDeclaration(baseToken, theme2) {
2761
2919
  const val = resolveThemeValue(theme2.transformOrigin || {}, normalized.slice(7));
2762
2920
  if (val !== void 0) return `transform-origin: ${val};`;
2763
2921
  }
2922
+ if (normalized.startsWith("perspective-origin-")) {
2923
+ const key = normalized.slice(19);
2924
+ if (PERSPECTIVE_ORIGIN_MAP[key]) return PERSPECTIVE_ORIGIN_MAP[key];
2925
+ const arb = resolveArbitraryValue(key);
2926
+ if (arb !== void 0) return `perspective-origin: ${arb};`;
2927
+ }
2764
2928
  if (normalized.startsWith("perspective-")) {
2765
2929
  const key = normalized.slice(12);
2766
2930
  if (PERSPECTIVE_MAP[key]) return PERSPECTIVE_MAP[key];
@@ -2784,15 +2948,26 @@ function buildFilterDeclaration(baseToken, theme2) {
2784
2948
  }
2785
2949
  return theme2[key] || {};
2786
2950
  };
2951
+ if (rest === "filter") {
2952
+ return `${prefix}: none;`;
2953
+ }
2787
2954
  if (rest === "blur" || rest.startsWith("blur-")) {
2788
2955
  const key = rest === "blur" ? "DEFAULT" : rest.slice(5);
2789
2956
  const val = resolveThemeValue(getScale("blur"), key);
2790
2957
  if (val !== void 0) return `${prefix}: blur(${val});`;
2791
2958
  }
2959
+ if (rest === "brightness") {
2960
+ const val = resolveThemeValue(getScale("brightness"), "100") || resolveThemeValue(getScale("brightness"), "DEFAULT") || "1";
2961
+ return `${prefix}: brightness(${val});`;
2962
+ }
2792
2963
  if (rest.startsWith("brightness-")) {
2793
2964
  const val = resolveThemeValue(getScale("brightness"), rest.slice(11));
2794
2965
  if (val !== void 0) return `${prefix}: brightness(${val});`;
2795
2966
  }
2967
+ if (rest === "contrast") {
2968
+ const val = resolveThemeValue(getScale("contrast"), "100") || resolveThemeValue(getScale("contrast"), "DEFAULT") || "1";
2969
+ return `${prefix}: contrast(${val});`;
2970
+ }
2796
2971
  if (rest.startsWith("contrast-")) {
2797
2972
  const val = resolveThemeValue(getScale("contrast"), rest.slice(9));
2798
2973
  if (val !== void 0) return `${prefix}: contrast(${val});`;
@@ -2802,6 +2977,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2802
2977
  const val = resolveThemeValue(getScale("grayscale"), key);
2803
2978
  if (val !== void 0) return `${prefix}: grayscale(${val});`;
2804
2979
  }
2980
+ if (rest === "hue-rotate") {
2981
+ const val = resolveThemeValue(getScale("hueRotate"), "0") || resolveThemeValue(getScale("hueRotate"), "DEFAULT") || "0deg";
2982
+ return `${prefix}: hue-rotate(${val});`;
2983
+ }
2805
2984
  if (rest.startsWith("hue-rotate-")) {
2806
2985
  const val = resolveThemeValue(getScale("hueRotate"), rest.slice(11));
2807
2986
  if (val !== void 0) {
@@ -2814,6 +2993,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2814
2993
  const val = resolveThemeValue(getScale("invert"), key);
2815
2994
  if (val !== void 0) return `${prefix}: invert(${val});`;
2816
2995
  }
2996
+ if (rest === "saturate") {
2997
+ const val = resolveThemeValue(getScale("saturate"), "100") || resolveThemeValue(getScale("saturate"), "DEFAULT") || "1";
2998
+ return `${prefix}: saturate(${val});`;
2999
+ }
2817
3000
  if (rest.startsWith("saturate-")) {
2818
3001
  const val = resolveThemeValue(getScale("saturate"), rest.slice(9));
2819
3002
  if (val !== void 0) return `${prefix}: saturate(${val});`;
@@ -2831,6 +3014,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2831
3014
  const val = resolveThemeValue(theme2.dropShadow || {}, rest.slice(12) || "DEFAULT");
2832
3015
  if (val !== void 0) return `filter: drop-shadow(${val});`;
2833
3016
  }
3017
+ if (isBackdrop && rest === "opacity") {
3018
+ const val = resolveThemeValue(theme2.backdropOpacity || theme2.opacity || {}, "DEFAULT") || "1";
3019
+ return `backdrop-filter: opacity(${val});`;
3020
+ }
2834
3021
  if (isBackdrop && rest.startsWith("opacity-")) {
2835
3022
  const val = resolveThemeValue(theme2.backdropOpacity || theme2.opacity || {}, rest.slice(8));
2836
3023
  if (val !== void 0) return `backdrop-filter: opacity(${val});`;
@@ -2877,6 +3064,11 @@ function buildAnimationDeclaration(baseToken) {
2877
3064
  return void 0;
2878
3065
  }
2879
3066
  function buildMaskDeclaration(baseToken) {
3067
+ if (MASK_CLIP_MAP[baseToken]) return MASK_CLIP_MAP[baseToken];
3068
+ if (MASK_COMPOSITE_MAP[baseToken]) return MASK_COMPOSITE_MAP[baseToken];
3069
+ if (MASK_MODE_MAP[baseToken]) return MASK_MODE_MAP[baseToken];
3070
+ if (MASK_ORIGIN_MAP[baseToken]) return MASK_ORIGIN_MAP[baseToken];
3071
+ if (MASK_TYPE_MAP[baseToken]) return MASK_TYPE_MAP[baseToken];
2880
3072
  if (MASK_LINEAR_MAP[baseToken]) return MASK_LINEAR_MAP[baseToken];
2881
3073
  if (MASK_REPEAT_MAP[baseToken]) return MASK_REPEAT_MAP[baseToken];
2882
3074
  if (MASK_SIZE_MAP[baseToken]) return MASK_SIZE_MAP[baseToken];
@@ -2909,6 +3101,7 @@ function buildInteractivityDeclaration(baseToken, theme2) {
2909
3101
  if (baseToken.startsWith("cursor-")) return CURSOR_MAP[baseToken.slice(7)] ?? void 0;
2910
3102
  if (baseToken.startsWith("pointer-events-")) return POINTER_EVENTS_MAP[baseToken.slice(15)] ?? void 0;
2911
3103
  if (baseToken.startsWith("select-")) return USER_SELECT_MAP[baseToken.slice(7)] ?? void 0;
3104
+ if (baseToken.startsWith("user-select-")) return USER_SELECT_MAP[baseToken.slice(12)] ?? void 0;
2912
3105
  if (baseToken.startsWith("appearance-")) {
2913
3106
  return APPEARANCE_MAP[baseToken.slice(11)] ? `appearance: ${baseToken.slice(11)};` : void 0;
2914
3107
  }
@@ -3219,8 +3412,8 @@ function resolveRuntimeContext(options = {}) {
3219
3412
  return {
3220
3413
  config,
3221
3414
  theme: config.theme || {},
3222
- screens: config.theme && config.theme.screens || {},
3223
- containers: config.theme && config.theme.containers || {}
3415
+ screens: config.theme && config.theme.screens || config.screens || {},
3416
+ containers: config.theme && config.theme.containers || config.containers || {}
3224
3417
  };
3225
3418
  }
3226
3419
  function getBaseTailwindOptions(options = {}) {
@@ -3273,24 +3466,16 @@ function compileRuntimeClassNameWithContext(className, context) {
3273
3466
  const needsSpaceChildSelector = parsed.baseToken.startsWith("space-x-") && parsed.baseToken !== "space-x-reverse" || parsed.baseToken.startsWith("space-y-") && parsed.baseToken !== "space-y-reverse";
3274
3467
  const scopedSelector = needsSpaceChildSelector ? `${variantSelector} > :not(:first-child)` : variantSelector;
3275
3468
  const ruleBody = `${scopedSelector} { ${finalDeclaration} }`;
3469
+ let result = ruleBody;
3276
3470
  if (parsed.breakpoint) {
3277
- return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${ruleBody} }`;
3278
- }
3279
- if (parsed.containerBreakpoint) {
3280
- return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${ruleBody} }`;
3471
+ result = `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${ruleBody} }`;
3472
+ } else if (parsed.containerBreakpoint) {
3473
+ result = `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${ruleBody} }`;
3281
3474
  }
3282
- return ruleBody;
3283
3475
  if (parsed.starting) {
3284
- const wrapped = parsed.breakpoint ? `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }` : parsed.containerBreakpoint ? `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }` : rule;
3285
- return `@starting-style { ${wrapped} }`;
3286
- }
3287
- if (parsed.breakpoint) {
3288
- return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }`;
3289
- }
3290
- if (parsed.containerBreakpoint) {
3291
- return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }`;
3476
+ return `@starting-style { ${result} }`;
3292
3477
  }
3293
- return rule;
3478
+ return result;
3294
3479
  }
3295
3480
  function compileClass(className, options = {}) {
3296
3481
  return compileRuntimeClassNameWithContext(className, resolveRuntimeContext(options));
@@ -3416,18 +3601,18 @@ function createWindrunner(options = {}) {
3416
3601
  cache.set(className, cssRule);
3417
3602
  return cssRule;
3418
3603
  };
3419
- const insertRule = (rule2) => {
3420
- if (!rule2 || insertedRules.has(rule2)) return;
3604
+ const insertRule = (rule) => {
3605
+ if (!rule || insertedRules.has(rule)) return;
3421
3606
  if (typeof document !== "object") return;
3422
3607
  if (!styleElement) styleElement = findOrCreateRuntimeStyle(styleId);
3423
3608
  if (styleElement) loadExistingRules(styleElement);
3424
- if (insertedRules.has(rule2)) return;
3425
- insertedRules.add(rule2);
3609
+ if (insertedRules.has(rule)) return;
3610
+ insertedRules.add(rule);
3426
3611
  if (!styleElement || !styleElement.sheet) return;
3427
3612
  try {
3428
- styleElement.sheet.insertRule(rule2, styleElement.sheet.cssRules.length);
3613
+ styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);
3429
3614
  } catch {
3430
- styleElement.appendChild(document.createTextNode(`${rule2}
3615
+ styleElement.appendChild(document.createTextNode(`${rule}
3431
3616
  `));
3432
3617
  }
3433
3618
  };