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/README.md CHANGED
@@ -42,11 +42,18 @@ npm install windrunner
42
42
 
43
43
  ```html
44
44
  <script type="module">
45
- import { windrunner } from "https://cdn.jsdelivr.net/npm/windrunner@1.0.0/dist/index.min.js";
45
+ import { windrunner } from "https://cdn.jsdelivr.net/npm/windrunner@1.0.1/dist/index.min.js";
46
46
  windrunner({ autoStart: true });
47
47
  </script>
48
48
  ```
49
49
 
50
+ ### Live demo / Example landing page
51
+
52
+ Try the example landing page:
53
+
54
+ - CodeSandbox (example landing): https://xj6q66.csb.app
55
+
56
+
50
57
  ### React / Vue
51
58
 
52
59
  ```js
package/dist/index.esm.js CHANGED
@@ -1414,12 +1414,7 @@ function getConfigOptions(options = {}, pluginKeys = []) {
1414
1414
  const newTheme = {};
1415
1415
  const themeKeys = Object.keys(config_default.theme);
1416
1416
  themeKeys.forEach((key) => {
1417
- newTheme[key] = theme2[key] || config_default.theme[key];
1418
- if (isFunction(newTheme[key])) {
1419
- newTheme[key] = newTheme[key]({
1420
- theme: (keyRef) => config_default.theme[keyRef]
1421
- });
1422
- }
1417
+ newTheme[key] = Object.prototype.hasOwnProperty.call(theme2, key) ? theme2[key] : config_default.theme[key];
1423
1418
  });
1424
1419
  themeKeys.forEach((key) => {
1425
1420
  if (isFunction(newTheme[key])) {
@@ -1643,6 +1638,64 @@ var BOX_SIZING_MAP = {
1643
1638
  border: "box-sizing: border-box;",
1644
1639
  content: "box-sizing: content-box;"
1645
1640
  };
1641
+ var BREAK_AFTER_MAP = {
1642
+ auto: "break-after: auto;",
1643
+ avoid: "break-after: avoid;",
1644
+ "avoid-page": "break-after: avoid-page;",
1645
+ "avoid-column": "break-after: avoid-column;",
1646
+ page: "break-after: page;",
1647
+ left: "break-after: left;",
1648
+ right: "break-after: right;",
1649
+ recto: "break-after: recto;",
1650
+ verso: "break-after: verso;"
1651
+ };
1652
+ var BREAK_BEFORE_MAP = {
1653
+ auto: "break-before: auto;",
1654
+ avoid: "break-before: avoid;",
1655
+ "avoid-page": "break-before: avoid-page;",
1656
+ "avoid-column": "break-before: avoid-column;",
1657
+ page: "break-before: page;",
1658
+ left: "break-before: left;",
1659
+ right: "break-before: right;",
1660
+ recto: "break-before: recto;",
1661
+ verso: "break-before: verso;"
1662
+ };
1663
+ var BREAK_INSIDE_MAP = {
1664
+ auto: "break-inside: auto;",
1665
+ avoid: "break-inside: avoid;",
1666
+ "avoid-page": "break-inside: avoid-page;",
1667
+ "avoid-column": "break-inside: avoid-column;"
1668
+ };
1669
+ var BOX_DECORATION_BREAK_MAP = {
1670
+ slice: "box-decoration-break: slice;",
1671
+ clone: "box-decoration-break: clone;"
1672
+ };
1673
+ var HYPHENS_MAP = {
1674
+ none: "hyphens: none;",
1675
+ manual: "hyphens: manual;",
1676
+ auto: "hyphens: auto;"
1677
+ };
1678
+ var COLOR_SCHEME_MAP = {
1679
+ light: "color-scheme: light;",
1680
+ dark: "color-scheme: dark;",
1681
+ normal: "color-scheme: normal;"
1682
+ };
1683
+ var SCROLLBAR_COLOR_MAP = {
1684
+ auto: "scrollbar-color: auto;",
1685
+ transparent: "scrollbar-color: transparent;",
1686
+ current: "scrollbar-color: currentColor;"
1687
+ };
1688
+ var SCROLLBAR_WIDTH_MAP = {
1689
+ auto: "scrollbar-width: auto;",
1690
+ thin: "scrollbar-width: thin;",
1691
+ none: "scrollbar-width: none;"
1692
+ };
1693
+ var SCROLLBAR_GUTTER_MAP = {
1694
+ auto: "scrollbar-gutter: auto;",
1695
+ stable: "scrollbar-gutter: stable;",
1696
+ "stable-both-edges": "scrollbar-gutter: stable both-edges;",
1697
+ "both-edges": "scrollbar-gutter: both-edges;"
1698
+ };
1646
1699
  var TABLE_LAYOUT_MAP = {
1647
1700
  auto: "table-layout: auto;",
1648
1701
  fixed: "table-layout: fixed;"
@@ -1799,6 +1852,16 @@ function buildLayoutDeclaration(baseToken, theme2) {
1799
1852
  const val = resolveThemeValue(theme2.order || {}, baseToken.slice(6));
1800
1853
  if (val !== void 0) return `order: ${val};`;
1801
1854
  }
1855
+ if (baseToken.startsWith("break-after-")) return BREAK_AFTER_MAP[baseToken.slice(12)] ?? void 0;
1856
+ if (baseToken.startsWith("break-before-")) return BREAK_BEFORE_MAP[baseToken.slice(13)] ?? void 0;
1857
+ if (baseToken.startsWith("break-inside-")) return BREAK_INSIDE_MAP[baseToken.slice(13)] ?? void 0;
1858
+ if (baseToken.startsWith("box-decoration-break-")) return BOX_DECORATION_BREAK_MAP[baseToken.slice(21)] ?? void 0;
1859
+ if (baseToken.startsWith("hyphens-")) return HYPHENS_MAP[baseToken.slice(8)] ?? void 0;
1860
+ if (baseToken.startsWith("color-scheme-")) return COLOR_SCHEME_MAP[baseToken.slice(13)] ?? void 0;
1861
+ if (baseToken.startsWith("scrollbar-color-")) return SCROLLBAR_COLOR_MAP[baseToken.slice(16)] ?? void 0;
1862
+ if (baseToken.startsWith("scrollbar-width-")) return SCROLLBAR_WIDTH_MAP[baseToken.slice(16)] ?? void 0;
1863
+ if (baseToken.startsWith("scrollbar-gutter-")) return SCROLLBAR_GUTTER_MAP[baseToken.slice(17)] ?? void 0;
1864
+ if (baseToken.startsWith("scroll-behavior-")) return SCROLL_BEHAVIOR_MAP[baseToken.slice(16)] ?? void 0;
1802
1865
  if (baseToken.startsWith("aspect-")) {
1803
1866
  const val = resolveThemeValue(theme2.aspectRatio || {}, baseToken.slice(7));
1804
1867
  if (val !== void 0) return `aspect-ratio: ${val};`;
@@ -1845,10 +1908,14 @@ function buildLayoutDeclaration(baseToken, theme2) {
1845
1908
  if (val !== void 0) return `will-change: ${val};`;
1846
1909
  }
1847
1910
  if (baseToken.startsWith("content-")) {
1848
- const val = resolveThemeValue(theme2.content || {}, baseToken.slice(8));
1849
- if (val !== void 0) return `content: "${val}";`;
1850
- const arb = resolveArbitraryValue(baseToken.slice(8));
1851
- if (arb !== void 0) return `content: ${arb};`;
1911
+ const valueKey = baseToken.slice(8);
1912
+ if (valueKey.startsWith("[") && valueKey.endsWith("]")) {
1913
+ const arb = resolveArbitraryValue(valueKey);
1914
+ if (arb !== void 0) return `content: ${arb};`;
1915
+ } else {
1916
+ const val = resolveThemeValue(theme2.content || {}, valueKey);
1917
+ if (val !== void 0) return `content: "${val}";`;
1918
+ }
1852
1919
  }
1853
1920
  if (baseToken.startsWith("size-")) {
1854
1921
  const val = resolveThemeValue(theme2.size || theme2.spacing || {}, baseToken.slice(5));
@@ -1931,6 +1998,12 @@ function buildGapDeclaration(baseToken, theme2) {
1931
1998
  }
1932
1999
  function buildDimensionDeclaration(baseToken, theme2) {
1933
2000
  const patterns = [
2001
+ { prefix: "min-inline-size-", prop: "min-inline-size", scale: theme2.minWidth || theme2.width || theme2.spacing || {} },
2002
+ { prefix: "max-inline-size-", prop: "max-inline-size", scale: theme2.maxWidth || theme2.width || theme2.spacing || {} },
2003
+ { prefix: "inline-size-", prop: "inline-size", scale: theme2.width || theme2.spacing || {} },
2004
+ { prefix: "min-block-size-", prop: "min-block-size", scale: theme2.minHeight || theme2.height || theme2.spacing || {} },
2005
+ { prefix: "max-block-size-", prop: "max-block-size", scale: theme2.maxHeight || theme2.height || theme2.spacing || {} },
2006
+ { prefix: "block-size-", prop: "block-size", scale: theme2.height || theme2.spacing || {} },
1934
2007
  { prefix: "min-w-", prop: "min-width", scale: theme2.minWidth || theme2.width || {} },
1935
2008
  { prefix: "max-w-", prop: "max-width", scale: theme2.maxWidth || theme2.width || {} },
1936
2009
  { prefix: "min-h-", prop: "min-height", scale: theme2.minHeight || theme2.height || {} },
@@ -2196,6 +2269,35 @@ var FONT_STYLE_MAP = {
2196
2269
  italic: "font-style: italic;",
2197
2270
  "not-italic": "font-style: normal;"
2198
2271
  };
2272
+ var FONT_STRETCH_MAP = {
2273
+ "ultra-condensed": "font-stretch: ultra-condensed;",
2274
+ "extra-condensed": "font-stretch: extra-condensed;",
2275
+ condensed: "font-stretch: condensed;",
2276
+ "semi-condensed": "font-stretch: semi-condensed;",
2277
+ normal: "font-stretch: normal;",
2278
+ "semi-expanded": "font-stretch: semi-expanded;",
2279
+ expanded: "font-stretch: expanded;",
2280
+ "extra-expanded": "font-stretch: extra-expanded;",
2281
+ "ultra-expanded": "font-stretch: ultra-expanded;"
2282
+ };
2283
+ var FONT_VARIANT_NUMERIC_MAP = {
2284
+ ordinal: "font-variant-numeric: ordinal;",
2285
+ "slashed-zero": "font-variant-numeric: slashed-zero;",
2286
+ "lining-nums": "font-variant-numeric: lining-nums;",
2287
+ "oldstyle-nums": "font-variant-numeric: oldstyle-nums;",
2288
+ "proportional-nums": "font-variant-numeric: proportional-nums;",
2289
+ "tabular-nums": "font-variant-numeric: tabular-nums;",
2290
+ "diagonal-fractions": "font-variant-numeric: diagonal-fractions;",
2291
+ "stacked-fractions": "font-variant-numeric: stacked-fractions;"
2292
+ };
2293
+ var LIST_STYLE_IMAGE_MAP = {
2294
+ none: "list-style-image: none;"
2295
+ };
2296
+ var HYPHENS_MAP2 = {
2297
+ none: "hyphens: none;",
2298
+ manual: "hyphens: manual;",
2299
+ auto: "hyphens: auto;"
2300
+ };
2199
2301
  var FONT_SMOOTHING_MAP = {
2200
2302
  antialiased: "-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;",
2201
2303
  "subpixel-antialiased": "-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;"
@@ -2244,6 +2346,12 @@ function buildTypographyDeclaration(baseToken, theme2) {
2244
2346
  return `font-family: ${fontFamily};`;
2245
2347
  }
2246
2348
  }
2349
+ if (baseToken.startsWith("font-stretch-")) {
2350
+ return FONT_STRETCH_MAP[baseToken.slice(13)] ?? void 0;
2351
+ }
2352
+ if (baseToken.startsWith("font-variant-numeric-")) {
2353
+ return FONT_VARIANT_NUMERIC_MAP[baseToken.slice(21)] ?? void 0;
2354
+ }
2247
2355
  if (baseToken.startsWith("leading-")) {
2248
2356
  const val = resolveThemeValue(theme2.lineHeight || {}, baseToken.slice(8));
2249
2357
  if (val !== void 0) return `line-height: ${val};`;
@@ -2271,13 +2379,18 @@ function buildTypographyDeclaration(baseToken, theme2) {
2271
2379
  if (baseToken.startsWith("list-")) {
2272
2380
  const key = baseToken.slice(5);
2273
2381
  if (LIST_STYLE_POSITION_MAP[key]) return LIST_STYLE_POSITION_MAP[key];
2382
+ if (LIST_STYLE_IMAGE_MAP[baseToken]) return LIST_STYLE_IMAGE_MAP[baseToken.slice(17)] ?? void 0;
2274
2383
  const val = resolveThemeValue(theme2.listStyleType || {}, key);
2275
2384
  if (val !== void 0) return `list-style-type: ${val};`;
2276
2385
  }
2386
+ if (baseToken.startsWith("list-style-image-")) {
2387
+ return LIST_STYLE_IMAGE_MAP[baseToken.slice(17)] ?? void 0;
2388
+ }
2277
2389
  if (baseToken.startsWith("whitespace-")) {
2278
2390
  const key = baseToken.slice(11);
2279
2391
  if (WHITESPACE_MAP[key]) return WHITESPACE_MAP[key];
2280
2392
  }
2393
+ if (baseToken.startsWith("hyphens-")) return HYPHENS_MAP2[baseToken.slice(8)] ?? void 0;
2281
2394
  if (baseToken === "text-wrap") return "text-wrap: wrap;";
2282
2395
  if (baseToken === "text-nowrap") return "text-wrap: nowrap;";
2283
2396
  if (baseToken === "text-balance") return "text-wrap: balance;";
@@ -2416,6 +2529,48 @@ var PERSPECTIVE_MAP = {
2416
2529
  midrange: "perspective: 800px;",
2417
2530
  distant: "perspective: 1200px;"
2418
2531
  };
2532
+ var PERSPECTIVE_ORIGIN_MAP = {
2533
+ center: "perspective-origin: center;",
2534
+ top: "perspective-origin: top;",
2535
+ bottom: "perspective-origin: bottom;",
2536
+ left: "perspective-origin: left;",
2537
+ right: "perspective-origin: right;",
2538
+ "top-left": "perspective-origin: top left;",
2539
+ "top-right": "perspective-origin: top right;",
2540
+ "bottom-left": "perspective-origin: bottom left;",
2541
+ "bottom-right": "perspective-origin: bottom right;"
2542
+ };
2543
+ var MASK_CLIP_MAP = {
2544
+ "mask-clip-border": "mask-clip: border; -webkit-mask-clip: border;",
2545
+ "mask-clip-padding": "mask-clip: padding; -webkit-mask-clip: padding;",
2546
+ "mask-clip-content": "mask-clip: content; -webkit-mask-clip: content;",
2547
+ "mask-clip-text": "mask-clip: text; -webkit-mask-clip: text;"
2548
+ };
2549
+ var MASK_COMPOSITE_MAP = {
2550
+ "mask-composite-add": "mask-composite: add; -webkit-mask-composite: add;",
2551
+ "mask-composite-subtract": "mask-composite: subtract; -webkit-mask-composite: subtract;",
2552
+ "mask-composite-intersect": "mask-composite: intersect; -webkit-mask-composite: intersect;",
2553
+ "mask-composite-exclude": "mask-composite: exclude; -webkit-mask-composite: exclude;",
2554
+ "mask-composite-replace": "mask-composite: replace; -webkit-mask-composite: replace;",
2555
+ "mask-composite-xor": "mask-composite: xor; -webkit-mask-composite: xor;"
2556
+ };
2557
+ var MASK_MODE_MAP = {
2558
+ "mask-mode-alpha": "mask-mode: alpha; -webkit-mask-mode: alpha;",
2559
+ "mask-mode-luminance": "mask-mode: luminance; -webkit-mask-mode: luminance;",
2560
+ "mask-mode-match-source": "mask-mode: match-source; -webkit-mask-mode: match-source;"
2561
+ };
2562
+ var MASK_ORIGIN_MAP = {
2563
+ "mask-origin-border": "mask-origin: border-box; -webkit-mask-origin: border-box;",
2564
+ "mask-origin-padding": "mask-origin: padding-box; -webkit-mask-origin: padding-box;",
2565
+ "mask-origin-content": "mask-origin: content-box; -webkit-mask-origin: content-box;",
2566
+ "mask-origin-fill": "mask-origin: fill-box; -webkit-mask-origin: fill-box;",
2567
+ "mask-origin-stroke": "mask-origin: stroke-box; -webkit-mask-origin: stroke-box;",
2568
+ "mask-origin-view": "mask-origin: view-box; -webkit-mask-origin: view-box;"
2569
+ };
2570
+ var MASK_TYPE_MAP = {
2571
+ "mask-type-luminance": "mask-type: luminance; -webkit-mask-type: luminance;",
2572
+ "mask-type-alpha": "mask-type: alpha; -webkit-mask-type: alpha;"
2573
+ };
2419
2574
  var MASK_LINEAR_MAP = {
2420
2575
  "mask-linear-to-t": "mask-image: linear-gradient(to top, black, transparent); -webkit-mask-image: linear-gradient(to top, black, transparent);",
2421
2576
  "mask-linear-to-tr": "mask-image: linear-gradient(to top right, black, transparent); -webkit-mask-image: linear-gradient(to top right, black, transparent);",
@@ -2612,7 +2767,10 @@ function buildRingOffsetDeclaration(baseToken, theme2) {
2612
2767
  if (widthVal !== void 0) {
2613
2768
  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);`;
2614
2769
  }
2615
- const color = resolveColorWithOpacity(theme2.ringOffsetColor || theme2.colors || {}, key);
2770
+ let color = resolveColorWithOpacity(theme2.ringOffsetColor || {}, key);
2771
+ if (color === void 0) {
2772
+ color = resolveColorWithOpacity(theme2.colors || {}, key);
2773
+ }
2616
2774
  if (color !== void 0) return `--tw-ring-offset-color: ${color};`;
2617
2775
  return void 0;
2618
2776
  }
@@ -2733,6 +2891,12 @@ function buildTransformDeclaration(baseToken, theme2) {
2733
2891
  const val = resolveThemeValue(theme2.transformOrigin || {}, normalized.slice(7));
2734
2892
  if (val !== void 0) return `transform-origin: ${val};`;
2735
2893
  }
2894
+ if (normalized.startsWith("perspective-origin-")) {
2895
+ const key = normalized.slice(19);
2896
+ if (PERSPECTIVE_ORIGIN_MAP[key]) return PERSPECTIVE_ORIGIN_MAP[key];
2897
+ const arb = resolveArbitraryValue(key);
2898
+ if (arb !== void 0) return `perspective-origin: ${arb};`;
2899
+ }
2736
2900
  if (normalized.startsWith("perspective-")) {
2737
2901
  const key = normalized.slice(12);
2738
2902
  if (PERSPECTIVE_MAP[key]) return PERSPECTIVE_MAP[key];
@@ -2756,15 +2920,26 @@ function buildFilterDeclaration(baseToken, theme2) {
2756
2920
  }
2757
2921
  return theme2[key] || {};
2758
2922
  };
2923
+ if (rest === "filter") {
2924
+ return `${prefix}: none;`;
2925
+ }
2759
2926
  if (rest === "blur" || rest.startsWith("blur-")) {
2760
2927
  const key = rest === "blur" ? "DEFAULT" : rest.slice(5);
2761
2928
  const val = resolveThemeValue(getScale("blur"), key);
2762
2929
  if (val !== void 0) return `${prefix}: blur(${val});`;
2763
2930
  }
2931
+ if (rest === "brightness") {
2932
+ const val = resolveThemeValue(getScale("brightness"), "100") || resolveThemeValue(getScale("brightness"), "DEFAULT") || "1";
2933
+ return `${prefix}: brightness(${val});`;
2934
+ }
2764
2935
  if (rest.startsWith("brightness-")) {
2765
2936
  const val = resolveThemeValue(getScale("brightness"), rest.slice(11));
2766
2937
  if (val !== void 0) return `${prefix}: brightness(${val});`;
2767
2938
  }
2939
+ if (rest === "contrast") {
2940
+ const val = resolveThemeValue(getScale("contrast"), "100") || resolveThemeValue(getScale("contrast"), "DEFAULT") || "1";
2941
+ return `${prefix}: contrast(${val});`;
2942
+ }
2768
2943
  if (rest.startsWith("contrast-")) {
2769
2944
  const val = resolveThemeValue(getScale("contrast"), rest.slice(9));
2770
2945
  if (val !== void 0) return `${prefix}: contrast(${val});`;
@@ -2774,6 +2949,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2774
2949
  const val = resolveThemeValue(getScale("grayscale"), key);
2775
2950
  if (val !== void 0) return `${prefix}: grayscale(${val});`;
2776
2951
  }
2952
+ if (rest === "hue-rotate") {
2953
+ const val = resolveThemeValue(getScale("hueRotate"), "0") || resolveThemeValue(getScale("hueRotate"), "DEFAULT") || "0deg";
2954
+ return `${prefix}: hue-rotate(${val});`;
2955
+ }
2777
2956
  if (rest.startsWith("hue-rotate-")) {
2778
2957
  const val = resolveThemeValue(getScale("hueRotate"), rest.slice(11));
2779
2958
  if (val !== void 0) {
@@ -2786,6 +2965,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2786
2965
  const val = resolveThemeValue(getScale("invert"), key);
2787
2966
  if (val !== void 0) return `${prefix}: invert(${val});`;
2788
2967
  }
2968
+ if (rest === "saturate") {
2969
+ const val = resolveThemeValue(getScale("saturate"), "100") || resolveThemeValue(getScale("saturate"), "DEFAULT") || "1";
2970
+ return `${prefix}: saturate(${val});`;
2971
+ }
2789
2972
  if (rest.startsWith("saturate-")) {
2790
2973
  const val = resolveThemeValue(getScale("saturate"), rest.slice(9));
2791
2974
  if (val !== void 0) return `${prefix}: saturate(${val});`;
@@ -2803,6 +2986,10 @@ function buildFilterDeclaration(baseToken, theme2) {
2803
2986
  const val = resolveThemeValue(theme2.dropShadow || {}, rest.slice(12) || "DEFAULT");
2804
2987
  if (val !== void 0) return `filter: drop-shadow(${val});`;
2805
2988
  }
2989
+ if (isBackdrop && rest === "opacity") {
2990
+ const val = resolveThemeValue(theme2.backdropOpacity || theme2.opacity || {}, "DEFAULT") || "1";
2991
+ return `backdrop-filter: opacity(${val});`;
2992
+ }
2806
2993
  if (isBackdrop && rest.startsWith("opacity-")) {
2807
2994
  const val = resolveThemeValue(theme2.backdropOpacity || theme2.opacity || {}, rest.slice(8));
2808
2995
  if (val !== void 0) return `backdrop-filter: opacity(${val});`;
@@ -2849,6 +3036,11 @@ function buildAnimationDeclaration(baseToken) {
2849
3036
  return void 0;
2850
3037
  }
2851
3038
  function buildMaskDeclaration(baseToken) {
3039
+ if (MASK_CLIP_MAP[baseToken]) return MASK_CLIP_MAP[baseToken];
3040
+ if (MASK_COMPOSITE_MAP[baseToken]) return MASK_COMPOSITE_MAP[baseToken];
3041
+ if (MASK_MODE_MAP[baseToken]) return MASK_MODE_MAP[baseToken];
3042
+ if (MASK_ORIGIN_MAP[baseToken]) return MASK_ORIGIN_MAP[baseToken];
3043
+ if (MASK_TYPE_MAP[baseToken]) return MASK_TYPE_MAP[baseToken];
2852
3044
  if (MASK_LINEAR_MAP[baseToken]) return MASK_LINEAR_MAP[baseToken];
2853
3045
  if (MASK_REPEAT_MAP[baseToken]) return MASK_REPEAT_MAP[baseToken];
2854
3046
  if (MASK_SIZE_MAP[baseToken]) return MASK_SIZE_MAP[baseToken];
@@ -2881,6 +3073,7 @@ function buildInteractivityDeclaration(baseToken, theme2) {
2881
3073
  if (baseToken.startsWith("cursor-")) return CURSOR_MAP[baseToken.slice(7)] ?? void 0;
2882
3074
  if (baseToken.startsWith("pointer-events-")) return POINTER_EVENTS_MAP[baseToken.slice(15)] ?? void 0;
2883
3075
  if (baseToken.startsWith("select-")) return USER_SELECT_MAP[baseToken.slice(7)] ?? void 0;
3076
+ if (baseToken.startsWith("user-select-")) return USER_SELECT_MAP[baseToken.slice(12)] ?? void 0;
2884
3077
  if (baseToken.startsWith("appearance-")) {
2885
3078
  return APPEARANCE_MAP[baseToken.slice(11)] ? `appearance: ${baseToken.slice(11)};` : void 0;
2886
3079
  }
@@ -3191,8 +3384,8 @@ function resolveRuntimeContext(options = {}) {
3191
3384
  return {
3192
3385
  config,
3193
3386
  theme: config.theme || {},
3194
- screens: config.theme && config.theme.screens || {},
3195
- containers: config.theme && config.theme.containers || {}
3387
+ screens: config.theme && config.theme.screens || config.screens || {},
3388
+ containers: config.theme && config.theme.containers || config.containers || {}
3196
3389
  };
3197
3390
  }
3198
3391
  function getBaseTailwindOptions(options = {}) {
@@ -3245,24 +3438,16 @@ function compileRuntimeClassNameWithContext(className, context) {
3245
3438
  const needsSpaceChildSelector = parsed.baseToken.startsWith("space-x-") && parsed.baseToken !== "space-x-reverse" || parsed.baseToken.startsWith("space-y-") && parsed.baseToken !== "space-y-reverse";
3246
3439
  const scopedSelector = needsSpaceChildSelector ? `${variantSelector} > :not(:first-child)` : variantSelector;
3247
3440
  const ruleBody = `${scopedSelector} { ${finalDeclaration} }`;
3441
+ let result = ruleBody;
3248
3442
  if (parsed.breakpoint) {
3249
- return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${ruleBody} }`;
3250
- }
3251
- if (parsed.containerBreakpoint) {
3252
- return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${ruleBody} }`;
3443
+ result = `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${ruleBody} }`;
3444
+ } else if (parsed.containerBreakpoint) {
3445
+ result = `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${ruleBody} }`;
3253
3446
  }
3254
- return ruleBody;
3255
3447
  if (parsed.starting) {
3256
- const wrapped = parsed.breakpoint ? `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }` : parsed.containerBreakpoint ? `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }` : rule;
3257
- return `@starting-style { ${wrapped} }`;
3258
- }
3259
- if (parsed.breakpoint) {
3260
- return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }`;
3261
- }
3262
- if (parsed.containerBreakpoint) {
3263
- return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }`;
3448
+ return `@starting-style { ${result} }`;
3264
3449
  }
3265
- return rule;
3450
+ return result;
3266
3451
  }
3267
3452
  function compileClass(className, options = {}) {
3268
3453
  return compileRuntimeClassNameWithContext(className, resolveRuntimeContext(options));
@@ -3388,18 +3573,18 @@ function createWindrunner(options = {}) {
3388
3573
  cache.set(className, cssRule);
3389
3574
  return cssRule;
3390
3575
  };
3391
- const insertRule = (rule2) => {
3392
- if (!rule2 || insertedRules.has(rule2)) return;
3576
+ const insertRule = (rule) => {
3577
+ if (!rule || insertedRules.has(rule)) return;
3393
3578
  if (typeof document !== "object") return;
3394
3579
  if (!styleElement) styleElement = findOrCreateRuntimeStyle(styleId);
3395
3580
  if (styleElement) loadExistingRules(styleElement);
3396
- if (insertedRules.has(rule2)) return;
3397
- insertedRules.add(rule2);
3581
+ if (insertedRules.has(rule)) return;
3582
+ insertedRules.add(rule);
3398
3583
  if (!styleElement || !styleElement.sheet) return;
3399
3584
  try {
3400
- styleElement.sheet.insertRule(rule2, styleElement.sheet.cssRules.length);
3585
+ styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);
3401
3586
  } catch {
3402
- styleElement.appendChild(document.createTextNode(`${rule2}
3587
+ styleElement.appendChild(document.createTextNode(`${rule}
3403
3588
  `));
3404
3589
  }
3405
3590
  };