@kbach/react 0.5.33 → 0.5.35

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.
@@ -26,6 +26,26 @@ module.exports = __toCommonJS(vite_plugin_exports);
26
26
  var import_fs = require("fs");
27
27
  var import_path = require("path");
28
28
 
29
+ // src/core/platform.ts
30
+ var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
31
+ var _cssGenMode = false;
32
+ function setCSSGenMode(on) {
33
+ _cssGenMode = on;
34
+ }
35
+ function getEffectiveIsWeb() {
36
+ return isWeb || _cssGenMode;
37
+ }
38
+ function toNativeValue(raw) {
39
+ if (/^-?\d+(\.\d+)?px$/.test(raw)) return parseFloat(raw);
40
+ if (/^-?\d+(\.\d+)?rem$/.test(raw)) return parseFloat(raw) * 16;
41
+ if (/^-?\d+(\.\d+)?em$/.test(raw)) return parseFloat(raw) * 16;
42
+ if (/^-?\d+(\.\d+)?$/.test(raw)) return parseFloat(raw);
43
+ return raw;
44
+ }
45
+ function escapeCSSSelector(cls) {
46
+ return cls.replace(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, "\\$&");
47
+ }
48
+
29
49
  // src/core/theme.ts
30
50
  var defaultColors = {
31
51
  transparent: "transparent",
@@ -562,19 +582,6 @@ var defaultTheme = {
562
582
  }
563
583
  };
564
584
 
565
- // src/core/platform.ts
566
- var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
567
- function toNativeValue(raw) {
568
- if (/^-?\d+(\.\d+)?px$/.test(raw)) return parseFloat(raw);
569
- if (/^-?\d+(\.\d+)?rem$/.test(raw)) return parseFloat(raw) * 16;
570
- if (/^-?\d+(\.\d+)?em$/.test(raw)) return parseFloat(raw) * 16;
571
- if (/^-?\d+(\.\d+)?$/.test(raw)) return parseFloat(raw);
572
- return raw;
573
- }
574
- function escapeCSSSelector(cls) {
575
- return cls.replace(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, "\\$&");
576
- }
577
-
578
585
  // src/core/utilities.ts
579
586
  function resolveColor(value, colors, isArbitrary) {
580
587
  if (isArbitrary) return value;
@@ -644,8 +651,12 @@ function hexToRgba(hex, alpha) {
644
651
  }
645
652
  function resolveSpacing(value, negative, spacing, isArbitrary) {
646
653
  if (isArbitrary) {
647
- const resolved = isWeb ? value : toNativeValue(value);
648
- return negative && typeof resolved === "number" ? -resolved : resolved;
654
+ const resolved = getEffectiveIsWeb() ? value : toNativeValue(value);
655
+ if (negative) {
656
+ if (typeof resolved === "number") return -resolved;
657
+ if (typeof resolved === "string" && /^\d/.test(resolved)) return `-${resolved}`;
658
+ }
659
+ return resolved;
649
660
  }
650
661
  const raw = spacing[value];
651
662
  if (raw === void 0) return null;
@@ -657,7 +668,7 @@ function resolveSpacing(value, negative, spacing, isArbitrary) {
657
668
  return raw;
658
669
  }
659
670
  function resolveSizing(value, spacing, isArbitrary) {
660
- if (isArbitrary) return isWeb ? value : toNativeValue(value);
671
+ if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
661
672
  const raw = spacing[value];
662
673
  if (raw !== void 0) return raw;
663
674
  if (/^\d+\/\d+$/.test(value)) {
@@ -667,356 +678,364 @@ function resolveSizing(value, spacing, isArbitrary) {
667
678
  return null;
668
679
  }
669
680
  function resolveRadius(value, radii, isArbitrary) {
670
- if (isArbitrary) return isWeb ? value : toNativeValue(value);
681
+ if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
671
682
  const key = value === "" ? "DEFAULT" : value;
672
683
  return radii[key] ?? null;
673
684
  }
674
685
  function resolveFontSize(value, fontSizes, isArbitrary) {
675
- if (isArbitrary) return isWeb ? value : toNativeValue(value);
686
+ if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
676
687
  return fontSizes[value] ?? null;
677
688
  }
678
689
  var FILTER_COMPOSE = "var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)";
679
690
  var BACKDROP_FILTER_COMPOSE = "var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)";
680
- var STANDALONE = {
681
- // Display
682
- // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
683
- // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
684
- // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
685
- flex: { display: "flex" },
686
- block: isWeb ? { display: "block" } : null,
687
- "inline-block": isWeb ? { display: "inline-block" } : null,
688
- inline: isWeb ? { display: "inline" } : null,
689
- grid: isWeb ? { display: "grid" } : null,
690
- grd: isWeb ? { display: "grid" } : null,
691
- "inline-flex": { display: isWeb ? "inline-flex" : "flex" },
692
- "inline-grid": isWeb ? { display: "inline-grid" } : null,
693
- hidden: { display: "none" },
694
- contents: isWeb ? { display: "contents" } : null,
695
- "flow-root": isWeb ? { display: "flow-root" } : null,
696
- // Flex direction (both web and native)
697
- "flex-row": { flexDirection: "row" },
698
- "flex-col": { flexDirection: "column" },
699
- "flex-row-reverse": { flexDirection: "row-reverse" },
700
- "flex-col-reverse": { flexDirection: "column-reverse" },
701
- // Flex wrap (both)
702
- "flex-wrap": { flexWrap: "wrap" },
703
- "flex-wrap-reverse": { flexWrap: "wrap-reverse" },
704
- "flex-nowrap": { flexWrap: "nowrap" },
705
- // Flex grow / shrink (both)
706
- "flex-grow": { flexGrow: 1 },
707
- "flex-grow-0": { flexGrow: 0 },
708
- "flex-shrink": { flexShrink: 1 },
709
- "flex-shrink-0": { flexShrink: 0 },
710
- // Align items (both)
711
- "items-start": { alignItems: "flex-start" },
712
- "items-end": { alignItems: "flex-end" },
713
- "items-center": { alignItems: "center" },
714
- "items-baseline": { alignItems: "baseline" },
715
- "items-stretch": { alignItems: "stretch" },
716
- // Justify content (both)
717
- "justify-start": { justifyContent: "flex-start" },
718
- "justify-end": { justifyContent: "flex-end" },
719
- "justify-center": { justifyContent: "center" },
720
- "justify-between": { justifyContent: "space-between" },
721
- "justify-around": { justifyContent: "space-around" },
722
- "justify-evenly": { justifyContent: "space-evenly" },
723
- // Align content (both)
724
- "content-start": { alignContent: "flex-start" },
725
- "content-end": { alignContent: "flex-end" },
726
- "content-center": { alignContent: "center" },
727
- "content-between": { alignContent: "space-between" },
728
- "content-around": { alignContent: "space-around" },
729
- "content-evenly": { alignContent: "space-evenly" },
730
- "content-stretch": { alignContent: "stretch" },
731
- // Align self (both)
732
- "self-auto": { alignSelf: "auto" },
733
- "self-start": { alignSelf: "flex-start" },
734
- "self-end": { alignSelf: "flex-end" },
735
- "self-center": { alignSelf: "center" },
736
- "self-stretch": { alignSelf: "stretch" },
737
- "self-baseline": { alignSelf: "baseline" },
738
- // Text align (both)
739
- "text-left": { textAlign: "left" },
740
- "text-right": { textAlign: "right" },
741
- "text-center": { textAlign: "center" },
742
- "text-justify": { textAlign: "justify" },
743
- // Font weight shortcuts (both)
744
- "font-thin": { fontWeight: "100" },
745
- "font-extralight": { fontWeight: "200" },
746
- "font-light": { fontWeight: "300" },
747
- "font-normal": { fontWeight: "400" },
748
- "font-medium": { fontWeight: "500" },
749
- "font-semibold": { fontWeight: "600" },
750
- "font-bold": { fontWeight: "700" },
751
- "font-extrabold": { fontWeight: "800" },
752
- "font-black": { fontWeight: "900" },
753
- // Text decoration (overline is web-only)
754
- underline: { textDecorationLine: "underline" },
755
- overline: isWeb ? { textDecorationLine: "overline" } : null,
756
- "line-through": { textDecorationLine: "line-through" },
757
- "no-underline": { textDecorationLine: "none" },
758
- // Text transform (both)
759
- uppercase: { textTransform: "uppercase" },
760
- lowercase: { textTransform: "lowercase" },
761
- capitalize: { textTransform: "capitalize" },
762
- "normal-case": { textTransform: "none" },
763
- // Font style (both)
764
- italic: { fontStyle: "italic" },
765
- "non-italic": { fontStyle: "normal" },
766
- // Position (fixed/sticky/static are web-only; RN only supports relative/absolute)
767
- relative: { position: "relative" },
768
- absolute: { position: "absolute" },
769
- fixed: isWeb ? { position: "fixed" } : null,
770
- sticky: isWeb ? { position: "sticky" } : null,
771
- static: isWeb ? { position: "static" } : null,
772
- // Visibility (no `visibility` prop on native; use opacity instead)
773
- visible: isWeb ? { visibility: "visible" } : null,
774
- invisible: isWeb ? { visibility: "hidden" } : { opacity: 0 },
775
- // Overflow (RN supports 'hidden' | 'visible' | 'scroll'; not 'auto')
776
- "overflow-hidden": { overflow: "hidden" },
777
- "overflow-visible": { overflow: "visible" },
778
- "overflow-scroll": { overflow: "scroll" },
779
- "overflow-auto": isWeb ? { overflow: "auto" } : { overflow: "scroll" },
780
- // overflowX / overflowY are web-only
781
- "overflow-x-hidden": isWeb ? { overflowX: "hidden" } : null,
782
- "overflow-x-scroll": isWeb ? { overflowX: "scroll" } : null,
783
- "overflow-x-auto": isWeb ? { overflowX: "auto" } : null,
784
- "overflow-y-hidden": isWeb ? { overflowY: "hidden" } : null,
785
- "overflow-y-scroll": isWeb ? { overflowY: "scroll" } : null,
786
- "overflow-y-auto": isWeb ? { overflowY: "auto" } : null,
787
- // Object fit (web-only; use resizeMode prop on RN Image)
788
- "object-contain": isWeb ? { objectFit: "contain" } : null,
789
- "object-cover": isWeb ? { objectFit: "cover" } : null,
790
- "object-fill": isWeb ? { objectFit: "fill" } : null,
791
- "object-none": isWeb ? { objectFit: "none" } : null,
792
- "object-scale-down": isWeb ? { objectFit: "scale-down" } : null,
793
- // Border style (both)
794
- "border-solid": { borderStyle: "solid" },
795
- "border-dashed": { borderStyle: "dashed" },
796
- "border-dotted": { borderStyle: "dotted" },
797
- "border-none": { borderWidth: 0 },
798
- // Border sides default width (both)
799
- "border-t": { borderTopWidth: 1 },
800
- "border-r": { borderRightWidth: 1 },
801
- "border-b": { borderBottomWidth: 1 },
802
- "border-l": { borderLeftWidth: 1 },
803
- // Cursor (web-only)
804
- "cursor-auto": isWeb ? { cursor: "auto" } : null,
805
- "cursor-default": isWeb ? { cursor: "default" } : null,
806
- "cursor-pointer": isWeb ? { cursor: "pointer" } : null,
807
- "cursor-wait": isWeb ? { cursor: "wait" } : null,
808
- "cursor-text": isWeb ? { cursor: "text" } : null,
809
- "cursor-move": isWeb ? { cursor: "move" } : null,
810
- "cursor-not-allowed": isWeb ? { cursor: "not-allowed" } : null,
811
- // User select (web-only)
812
- "select-none": isWeb ? { userSelect: "none" } : null,
813
- "select-text": isWeb ? { userSelect: "text" } : null,
814
- "select-all": isWeb ? { userSelect: "all" } : null,
815
- "select-auto": isWeb ? { userSelect: "auto" } : null,
816
- // Pointer events (both)
817
- "pointer-events-none": { pointerEvents: "none" },
818
- "pointer-events-auto": { pointerEvents: "auto" },
819
- // Whitespace (web-only; RN Text uses numberOfLines prop instead)
820
- "whitespace-normal": isWeb ? { whiteSpace: "normal" } : null,
821
- "whitespace-nowrap": isWeb ? { whiteSpace: "nowrap" } : null,
822
- "whitespace-pre": isWeb ? { whiteSpace: "pre" } : null,
823
- "whitespace-pre-wrap": isWeb ? { whiteSpace: "pre-wrap" } : null,
824
- "whitespace-pre-line": isWeb ? { whiteSpace: "pre-line" } : null,
825
- // Word break (web-only)
826
- "break-normal": isWeb ? { overflowWrap: "normal", wordBreak: "normal" } : null,
827
- "break-words": isWeb ? { overflowWrap: "break-word" } : null,
828
- "break-all": isWeb ? { wordBreak: "break-all" } : null,
829
- // Misc web-only
830
- truncate: isWeb ? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } : null,
831
- "box-border": isWeb ? { boxSizing: "border-box" } : null,
832
- "box-content": isWeb ? { boxSizing: "content-box" } : null,
833
- "appearance-none": isWeb ? { appearance: "none" } : null,
834
- "outline-none": isWeb ? { outline: "none", outlineOffset: "0" } : null,
835
- outline: isWeb ? { outline: "2px solid transparent", outlineOffset: "2px" } : null,
836
- resize: isWeb ? { resize: "both" } : null,
837
- "resize-none": isWeb ? { resize: "none" } : null,
838
- "resize-y": isWeb ? { resize: "vertical" } : null,
839
- "resize-x": isWeb ? { resize: "horizontal" } : null,
840
- antialiased: isWeb ? { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" } : null,
841
- "subpixel-antialiased": isWeb ? { WebkitFontSmoothing: "subpixel-antialiased", MozOsxFontSmoothing: "auto" } : null,
842
- "overflow-ellipsis": isWeb ? { textOverflow: "ellipsis" } : null,
843
- "sr-only": isWeb ? {
844
- position: "absolute",
845
- width: 1,
846
- height: 1,
847
- padding: 0,
848
- margin: -1,
849
- overflow: "hidden",
850
- clip: "rect(0,0,0,0)",
851
- whiteSpace: "nowrap",
852
- border: 0
853
- } : null,
854
- "not-sr-only": isWeb ? {
855
- position: "static",
856
- width: "auto",
857
- height: "auto",
858
- padding: 0,
859
- margin: 0,
860
- overflow: "visible",
861
- clip: "auto",
862
- whiteSpace: "normal"
863
- } : null,
864
- // Lists (web-only)
865
- "list-none": isWeb ? { listStyleType: "none" } : null,
866
- "list-disc": isWeb ? { listStyleType: "disc" } : null,
867
- "list-decimal": isWeb ? { listStyleType: "decimal" } : null,
868
- // Background clip (web-only)
869
- "bg-clip-border": isWeb ? { backgroundClip: "border-box" } : null,
870
- "bg-clip-padding": isWeb ? { backgroundClip: "padding-box" } : null,
871
- "bg-clip-content": isWeb ? { backgroundClip: "content-box" } : null,
872
- "bg-clip-text": isWeb ? { backgroundClip: "text", WebkitBackgroundClip: "text" } : null,
873
- // Background image
874
- "bg-none": isWeb ? { backgroundImage: "none" } : null,
875
- // Background size (web-only)
876
- "bg-auto": isWeb ? { backgroundSize: "auto" } : null,
877
- "bg-cover": isWeb ? { backgroundSize: "cover" } : null,
878
- "bg-contain": isWeb ? { backgroundSize: "contain" } : null,
879
- // Background position (web-only)
880
- "bg-center": isWeb ? { backgroundPosition: "center" } : null,
881
- "bg-top": isWeb ? { backgroundPosition: "top" } : null,
882
- "bg-bottom": isWeb ? { backgroundPosition: "bottom" } : null,
883
- "bg-left": isWeb ? { backgroundPosition: "left" } : null,
884
- "bg-right": isWeb ? { backgroundPosition: "right" } : null,
885
- "bg-left-top": isWeb ? { backgroundPosition: "left top" } : null,
886
- "bg-left-bottom": isWeb ? { backgroundPosition: "left bottom" } : null,
887
- "bg-right-top": isWeb ? { backgroundPosition: "right top" } : null,
888
- "bg-right-bottom": isWeb ? { backgroundPosition: "right bottom" } : null,
889
- // Background repeat (web-only)
890
- "bg-repeat": isWeb ? { backgroundRepeat: "repeat" } : null,
891
- "bg-no-repeat": isWeb ? { backgroundRepeat: "no-repeat" } : null,
892
- "bg-repeat-x": isWeb ? { backgroundRepeat: "repeat-x" } : null,
893
- "bg-repeat-y": isWeb ? { backgroundRepeat: "repeat-y" } : null,
894
- "bg-repeat-round": isWeb ? { backgroundRepeat: "round" } : null,
895
- "bg-repeat-space": isWeb ? { backgroundRepeat: "space" } : null,
896
- // Background attachment (web-only)
897
- "bg-fixed": isWeb ? { backgroundAttachment: "fixed" } : null,
898
- "bg-local": isWeb ? { backgroundAttachment: "local" } : null,
899
- "bg-scroll": isWeb ? { backgroundAttachment: "scroll" } : null,
900
- // Object position (web-only)
901
- "object-center": isWeb ? { objectPosition: "center" } : null,
902
- "object-top": isWeb ? { objectPosition: "top" } : null,
903
- "object-bottom": isWeb ? { objectPosition: "bottom" } : null,
904
- "object-left": isWeb ? { objectPosition: "left" } : null,
905
- "object-right": isWeb ? { objectPosition: "right" } : null,
906
- "object-left-top": isWeb ? { objectPosition: "left top" } : null,
907
- "object-left-bottom": isWeb ? { objectPosition: "left bottom" } : null,
908
- "object-right-top": isWeb ? { objectPosition: "right top" } : null,
909
- "object-right-bottom": isWeb ? { objectPosition: "right bottom" } : null,
910
- // Table (web-only)
911
- table: isWeb ? { display: "table" } : null,
912
- "table-auto": isWeb ? { tableLayout: "auto" } : null,
913
- "table-fixed": isWeb ? { tableLayout: "fixed" } : null,
914
- "caption-top": isWeb ? { captionSide: "top" } : null,
915
- "caption-bottom": isWeb ? { captionSide: "bottom" } : null,
916
- "border-collapse": isWeb ? { borderCollapse: "collapse" } : null,
917
- "border-separate": isWeb ? { borderCollapse: "separate" } : null,
918
- // List style position (web-only)
919
- "list-inside": isWeb ? { listStylePosition: "inside" } : null,
920
- "list-outside": isWeb ? { listStylePosition: "outside" } : null,
921
- // Font variant numeric (web-only)
922
- "normal-nums": isWeb ? { fontVariantNumeric: "normal" } : null,
923
- ordinal: isWeb ? { fontVariantNumeric: "ordinal" } : null,
924
- "slashed-zero": isWeb ? { fontVariantNumeric: "slashed-zero" } : null,
925
- "lining-nums": isWeb ? { fontVariantNumeric: "lining-nums" } : null,
926
- "oldstyle-nums": isWeb ? { fontVariantNumeric: "oldstyle-nums" } : null,
927
- "proportional-nums": isWeb ? { fontVariantNumeric: "proportional-nums" } : null,
928
- "tabular-nums": isWeb ? { fontVariantNumeric: "tabular-nums" } : null,
929
- "diagonal-fractions": isWeb ? { fontVariantNumeric: "diagonal-fractions" } : null,
930
- "stacked-fractions": isWeb ? { fontVariantNumeric: "stacked-fractions" } : null,
931
- // Isolation (web-only)
932
- isolate: isWeb ? { isolation: "isolate" } : null,
933
- "isolation-auto": isWeb ? { isolation: "auto" } : null,
934
- // Backface visibility (both iOS and Android)
935
- "backface-visible": { backfaceVisibility: "visible" },
936
- "backface-hidden": { backfaceVisibility: "hidden" },
937
- // CSS filters — standalone = default/full effect (web-only)
938
- grayscale: isWeb ? { "--tw-grayscale": "grayscale(100%)", filter: FILTER_COMPOSE } : null,
939
- invert: isWeb ? { "--tw-invert": "invert(100%)", filter: FILTER_COMPOSE } : null,
940
- sepia: isWeb ? { "--tw-sepia": "sepia(100%)", filter: FILTER_COMPOSE } : null,
941
- // Divide none
942
- "divide-none": isWeb ? { __divideX: 0, __divideY: 0 } : null,
943
- // Group / peer markers (no-op: no style emitted; just ensures isKnownUtility returns true)
944
- group: isWeb ? {} : null,
945
- peer: isWeb ? {} : null,
946
- // Text-wrap (web-only)
947
- "text-wrap": isWeb ? { textWrap: "wrap" } : null,
948
- "text-nowrap": isWeb ? { textWrap: "nowrap" } : null,
949
- "text-balance": isWeb ? { textWrap: "balance" } : null,
950
- "text-pretty": isWeb ? { textWrap: "pretty" } : null,
951
- // Screen sizing (vw values are web-only; vh values work cross-platform via spacing scale for h-*)
952
- "w-screen": isWeb ? { width: "100vw" } : null,
953
- "min-h-screen": { minHeight: "100vh" },
954
- "max-h-screen": { maxHeight: "100vh" },
955
- "min-w-screen": isWeb ? { minWidth: "100vw" } : null,
956
- "max-w-screen": isWeb ? { maxWidth: "100vw" } : null,
957
- // max-w named container sizes (mirrors Tailwind's container scale)
958
- "max-w-none": { maxWidth: "none" },
959
- "max-w-xs": { maxWidth: 320 },
960
- "max-w-sm": { maxWidth: 384 },
961
- "max-w-md": { maxWidth: 448 },
962
- "max-w-lg": { maxWidth: 512 },
963
- "max-w-xl": { maxWidth: 576 },
964
- "max-w-2xl": { maxWidth: 672 },
965
- "max-w-3xl": { maxWidth: 768 },
966
- "max-w-4xl": { maxWidth: 896 },
967
- "max-w-5xl": { maxWidth: 1024 },
968
- "max-w-6xl": { maxWidth: 1152 },
969
- "max-w-7xl": { maxWidth: 1280 },
970
- "max-w-prose": isWeb ? { maxWidth: "65ch" } : null,
971
- // Extended cursors (web-only)
972
- "cursor-grab": isWeb ? { cursor: "grab" } : null,
973
- "cursor-grabbing": isWeb ? { cursor: "grabbing" } : null,
974
- "cursor-zoom-in": isWeb ? { cursor: "zoom-in" } : null,
975
- "cursor-zoom-out": isWeb ? { cursor: "zoom-out" } : null,
976
- "cursor-crosshair": isWeb ? { cursor: "crosshair" } : null,
977
- "cursor-help": isWeb ? { cursor: "help" } : null,
978
- "cursor-none": isWeb ? { cursor: "none" } : null,
979
- // Overflow clip (web-only)
980
- "overflow-clip": isWeb ? { overflow: "clip" } : null,
981
- "overflow-x-clip": isWeb ? { overflowX: "clip" } : null,
982
- "overflow-y-clip": isWeb ? { overflowY: "clip" } : null,
983
- // Scroll behavior (web-only)
984
- "scroll-smooth": isWeb ? { scrollBehavior: "smooth" } : null,
985
- "scroll-auto": isWeb ? { scrollBehavior: "auto" } : null,
986
- // Float (web-only)
987
- "float-left": isWeb ? { float: "left" } : null,
988
- "float-right": isWeb ? { float: "right" } : null,
989
- "float-start": isWeb ? { float: "inline-start" } : null,
990
- "float-end": isWeb ? { float: "inline-end" } : null,
991
- "float-none": isWeb ? { float: "none" } : null,
992
- // Clear (web-only)
993
- "clear-left": isWeb ? { clear: "left" } : null,
994
- "clear-right": isWeb ? { clear: "right" } : null,
995
- "clear-both": isWeb ? { clear: "both" } : null,
996
- "clear-start": isWeb ? { clear: "inline-start" } : null,
997
- "clear-end": isWeb ? { clear: "inline-end" } : null,
998
- "clear-none": isWeb ? { clear: "none" } : null,
999
- // Vertical align (web-only)
1000
- "align-baseline": isWeb ? { verticalAlign: "baseline" } : null,
1001
- "align-top": isWeb ? { verticalAlign: "top" } : null,
1002
- "align-middle": isWeb ? { verticalAlign: "middle" } : null,
1003
- "align-bottom": isWeb ? { verticalAlign: "bottom" } : null,
1004
- "align-text-top": isWeb ? { verticalAlign: "text-top" } : null,
1005
- "align-text-bottom": isWeb ? { verticalAlign: "text-bottom" } : null,
1006
- "align-sub": isWeb ? { verticalAlign: "sub" } : null,
1007
- "align-super": isWeb ? { verticalAlign: "super" } : null,
1008
- // Touch action (web-only)
1009
- "touch-auto": isWeb ? { touchAction: "auto" } : null,
1010
- "touch-none": isWeb ? { touchAction: "none" } : null,
1011
- "touch-pan-x": isWeb ? { touchAction: "pan-x" } : null,
1012
- "touch-pan-y": isWeb ? { touchAction: "pan-y" } : null,
1013
- "touch-pan-left": isWeb ? { touchAction: "pan-left" } : null,
1014
- "touch-pan-right": isWeb ? { touchAction: "pan-right" } : null,
1015
- "touch-pan-up": isWeb ? { touchAction: "pan-up" } : null,
1016
- "touch-pan-down": isWeb ? { touchAction: "pan-down" } : null,
1017
- "touch-pinch-zoom": isWeb ? { touchAction: "pinch-zoom" } : null,
1018
- "touch-manipulation": isWeb ? { touchAction: "manipulation" } : null
1019
- };
691
+ var _standalone = null;
692
+ function buildStandalone() {
693
+ const web = getEffectiveIsWeb();
694
+ return {
695
+ // Display
696
+ // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
697
+ // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
698
+ // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
699
+ flex: { display: "flex" },
700
+ block: web ? { display: "block" } : null,
701
+ "inline-block": web ? { display: "inline-block" } : null,
702
+ inline: web ? { display: "inline" } : null,
703
+ grid: web ? { display: "grid" } : null,
704
+ grd: web ? { display: "grid" } : null,
705
+ "inline-flex": { display: web ? "inline-flex" : "flex" },
706
+ "inline-grid": web ? { display: "inline-grid" } : null,
707
+ hidden: { display: "none" },
708
+ contents: web ? { display: "contents" } : null,
709
+ "flow-root": web ? { display: "flow-root" } : null,
710
+ // Flex direction (both web and native)
711
+ "flex-row": { flexDirection: "row" },
712
+ "flex-col": { flexDirection: "column" },
713
+ "flex-row-reverse": { flexDirection: "row-reverse" },
714
+ "flex-col-reverse": { flexDirection: "column-reverse" },
715
+ // Flex wrap (both)
716
+ "flex-wrap": { flexWrap: "wrap" },
717
+ "flex-wrap-reverse": { flexWrap: "wrap-reverse" },
718
+ "flex-nowrap": { flexWrap: "nowrap" },
719
+ // Flex grow / shrink (both)
720
+ "flex-grow": { flexGrow: 1 },
721
+ "flex-grow-0": { flexGrow: 0 },
722
+ "flex-shrink": { flexShrink: 1 },
723
+ "flex-shrink-0": { flexShrink: 0 },
724
+ // Align items (both)
725
+ "items-start": { alignItems: "flex-start" },
726
+ "items-end": { alignItems: "flex-end" },
727
+ "items-center": { alignItems: "center" },
728
+ "items-baseline": { alignItems: "baseline" },
729
+ "items-stretch": { alignItems: "stretch" },
730
+ // Justify content (both)
731
+ "justify-start": { justifyContent: "flex-start" },
732
+ "justify-end": { justifyContent: "flex-end" },
733
+ "justify-center": { justifyContent: "center" },
734
+ "justify-between": { justifyContent: "space-between" },
735
+ "justify-around": { justifyContent: "space-around" },
736
+ "justify-evenly": { justifyContent: "space-evenly" },
737
+ // Align content (both)
738
+ "content-start": { alignContent: "flex-start" },
739
+ "content-end": { alignContent: "flex-end" },
740
+ "content-center": { alignContent: "center" },
741
+ "content-between": { alignContent: "space-between" },
742
+ "content-around": { alignContent: "space-around" },
743
+ "content-evenly": { alignContent: "space-evenly" },
744
+ "content-stretch": { alignContent: "stretch" },
745
+ // Align self (both)
746
+ "self-auto": { alignSelf: "auto" },
747
+ "self-start": { alignSelf: "flex-start" },
748
+ "self-end": { alignSelf: "flex-end" },
749
+ "self-center": { alignSelf: "center" },
750
+ "self-stretch": { alignSelf: "stretch" },
751
+ "self-baseline": { alignSelf: "baseline" },
752
+ // Text align (both)
753
+ "text-left": { textAlign: "left" },
754
+ "text-right": { textAlign: "right" },
755
+ "text-center": { textAlign: "center" },
756
+ "text-justify": { textAlign: "justify" },
757
+ // Font weight shortcuts (both)
758
+ "font-thin": { fontWeight: "100" },
759
+ "font-extralight": { fontWeight: "200" },
760
+ "font-light": { fontWeight: "300" },
761
+ "font-normal": { fontWeight: "400" },
762
+ "font-medium": { fontWeight: "500" },
763
+ "font-semibold": { fontWeight: "600" },
764
+ "font-bold": { fontWeight: "700" },
765
+ "font-extrabold": { fontWeight: "800" },
766
+ "font-black": { fontWeight: "900" },
767
+ // Text decoration (overline is web-only)
768
+ underline: { textDecorationLine: "underline" },
769
+ overline: web ? { textDecorationLine: "overline" } : null,
770
+ "line-through": { textDecorationLine: "line-through" },
771
+ "no-underline": { textDecorationLine: "none" },
772
+ // Text transform (both)
773
+ uppercase: { textTransform: "uppercase" },
774
+ lowercase: { textTransform: "lowercase" },
775
+ capitalize: { textTransform: "capitalize" },
776
+ "normal-case": { textTransform: "none" },
777
+ // Font style (both)
778
+ italic: { fontStyle: "italic" },
779
+ "non-italic": { fontStyle: "normal" },
780
+ // Position (fixed/sticky/static are web-only; RN only supports relative/absolute)
781
+ relative: { position: "relative" },
782
+ absolute: { position: "absolute" },
783
+ fixed: web ? { position: "fixed" } : null,
784
+ sticky: web ? { position: "sticky" } : null,
785
+ static: web ? { position: "static" } : null,
786
+ // Visibility (no `visibility` prop on native; use opacity instead)
787
+ visible: web ? { visibility: "visible" } : null,
788
+ invisible: web ? { visibility: "hidden" } : { opacity: 0 },
789
+ // Overflow (RN supports 'hidden' | 'visible' | 'scroll'; not 'auto')
790
+ "overflow-hidden": { overflow: "hidden" },
791
+ "overflow-visible": { overflow: "visible" },
792
+ "overflow-scroll": { overflow: "scroll" },
793
+ "overflow-auto": web ? { overflow: "auto" } : { overflow: "scroll" },
794
+ // overflowX / overflowY are web-only
795
+ "overflow-x-hidden": web ? { overflowX: "hidden" } : null,
796
+ "overflow-x-scroll": web ? { overflowX: "scroll" } : null,
797
+ "overflow-x-auto": web ? { overflowX: "auto" } : null,
798
+ "overflow-y-hidden": web ? { overflowY: "hidden" } : null,
799
+ "overflow-y-scroll": web ? { overflowY: "scroll" } : null,
800
+ "overflow-y-auto": web ? { overflowY: "auto" } : null,
801
+ // Object fit (web-only; use resizeMode prop on RN Image)
802
+ "object-contain": web ? { objectFit: "contain" } : null,
803
+ "object-cover": web ? { objectFit: "cover" } : null,
804
+ "object-fill": web ? { objectFit: "fill" } : null,
805
+ "object-none": web ? { objectFit: "none" } : null,
806
+ "object-scale-down": web ? { objectFit: "scale-down" } : null,
807
+ // Border style (both)
808
+ "border-solid": { borderStyle: "solid" },
809
+ "border-dashed": { borderStyle: "dashed" },
810
+ "border-dotted": { borderStyle: "dotted" },
811
+ "border-none": { borderWidth: 0 },
812
+ // Border sides default width (both)
813
+ "border-t": { borderTopWidth: 1 },
814
+ "border-r": { borderRightWidth: 1 },
815
+ "border-b": { borderBottomWidth: 1 },
816
+ "border-l": { borderLeftWidth: 1 },
817
+ // Cursor (web-only)
818
+ "cursor-auto": web ? { cursor: "auto" } : null,
819
+ "cursor-default": web ? { cursor: "default" } : null,
820
+ "cursor-pointer": web ? { cursor: "pointer" } : null,
821
+ "cursor-wait": web ? { cursor: "wait" } : null,
822
+ "cursor-text": web ? { cursor: "text" } : null,
823
+ "cursor-move": web ? { cursor: "move" } : null,
824
+ "cursor-not-allowed": web ? { cursor: "not-allowed" } : null,
825
+ // User select (web-only)
826
+ "select-none": web ? { userSelect: "none" } : null,
827
+ "select-text": web ? { userSelect: "text" } : null,
828
+ "select-all": web ? { userSelect: "all" } : null,
829
+ "select-auto": web ? { userSelect: "auto" } : null,
830
+ // Pointer events (both)
831
+ "pointer-events-none": { pointerEvents: "none" },
832
+ "pointer-events-auto": { pointerEvents: "auto" },
833
+ // Whitespace (web-only; RN Text uses numberOfLines prop instead)
834
+ "whitespace-normal": web ? { whiteSpace: "normal" } : null,
835
+ "whitespace-nowrap": web ? { whiteSpace: "nowrap" } : null,
836
+ "whitespace-pre": web ? { whiteSpace: "pre" } : null,
837
+ "whitespace-pre-wrap": web ? { whiteSpace: "pre-wrap" } : null,
838
+ "whitespace-pre-line": web ? { whiteSpace: "pre-line" } : null,
839
+ // Word break (web-only)
840
+ "break-normal": web ? { overflowWrap: "normal", wordBreak: "normal" } : null,
841
+ "break-words": web ? { overflowWrap: "break-word" } : null,
842
+ "break-all": web ? { wordBreak: "break-all" } : null,
843
+ // Misc web-only
844
+ truncate: web ? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } : null,
845
+ "box-border": web ? { boxSizing: "border-box" } : null,
846
+ "box-content": web ? { boxSizing: "content-box" } : null,
847
+ "appearance-none": web ? { appearance: "none" } : null,
848
+ "outline-none": web ? { outline: "none", outlineOffset: "0" } : null,
849
+ outline: web ? { outline: "2px solid transparent", outlineOffset: "2px" } : null,
850
+ resize: web ? { resize: "both" } : null,
851
+ "resize-none": web ? { resize: "none" } : null,
852
+ "resize-y": web ? { resize: "vertical" } : null,
853
+ "resize-x": web ? { resize: "horizontal" } : null,
854
+ antialiased: web ? { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" } : null,
855
+ "subpixel-antialiased": web ? { WebkitFontSmoothing: "subpixel-antialiased", MozOsxFontSmoothing: "auto" } : null,
856
+ "overflow-ellipsis": web ? { textOverflow: "ellipsis" } : null,
857
+ "sr-only": web ? {
858
+ position: "absolute",
859
+ width: 1,
860
+ height: 1,
861
+ padding: 0,
862
+ margin: -1,
863
+ overflow: "hidden",
864
+ clip: "rect(0,0,0,0)",
865
+ whiteSpace: "nowrap",
866
+ border: 0
867
+ } : null,
868
+ "not-sr-only": web ? {
869
+ position: "static",
870
+ width: "auto",
871
+ height: "auto",
872
+ padding: 0,
873
+ margin: 0,
874
+ overflow: "visible",
875
+ clip: "auto",
876
+ whiteSpace: "normal"
877
+ } : null,
878
+ // Lists (web-only)
879
+ "list-none": web ? { listStyleType: "none" } : null,
880
+ "list-disc": web ? { listStyleType: "disc" } : null,
881
+ "list-decimal": web ? { listStyleType: "decimal" } : null,
882
+ // Background clip (web-only)
883
+ "bg-clip-border": web ? { backgroundClip: "border-box" } : null,
884
+ "bg-clip-padding": web ? { backgroundClip: "padding-box" } : null,
885
+ "bg-clip-content": web ? { backgroundClip: "content-box" } : null,
886
+ "bg-clip-text": web ? { backgroundClip: "text", WebkitBackgroundClip: "text" } : null,
887
+ // Background image
888
+ "bg-none": web ? { backgroundImage: "none" } : null,
889
+ // Background size (web-only)
890
+ "bg-auto": web ? { backgroundSize: "auto" } : null,
891
+ "bg-cover": web ? { backgroundSize: "cover" } : null,
892
+ "bg-contain": web ? { backgroundSize: "contain" } : null,
893
+ // Background position (web-only)
894
+ "bg-center": web ? { backgroundPosition: "center" } : null,
895
+ "bg-top": web ? { backgroundPosition: "top" } : null,
896
+ "bg-bottom": web ? { backgroundPosition: "bottom" } : null,
897
+ "bg-left": web ? { backgroundPosition: "left" } : null,
898
+ "bg-right": web ? { backgroundPosition: "right" } : null,
899
+ "bg-left-top": web ? { backgroundPosition: "left top" } : null,
900
+ "bg-left-bottom": web ? { backgroundPosition: "left bottom" } : null,
901
+ "bg-right-top": web ? { backgroundPosition: "right top" } : null,
902
+ "bg-right-bottom": web ? { backgroundPosition: "right bottom" } : null,
903
+ // Background repeat (web-only)
904
+ "bg-repeat": web ? { backgroundRepeat: "repeat" } : null,
905
+ "bg-no-repeat": web ? { backgroundRepeat: "no-repeat" } : null,
906
+ "bg-repeat-x": web ? { backgroundRepeat: "repeat-x" } : null,
907
+ "bg-repeat-y": web ? { backgroundRepeat: "repeat-y" } : null,
908
+ "bg-repeat-round": web ? { backgroundRepeat: "round" } : null,
909
+ "bg-repeat-space": web ? { backgroundRepeat: "space" } : null,
910
+ // Background attachment (web-only)
911
+ "bg-fixed": web ? { backgroundAttachment: "fixed" } : null,
912
+ "bg-local": web ? { backgroundAttachment: "local" } : null,
913
+ "bg-scroll": web ? { backgroundAttachment: "scroll" } : null,
914
+ // Object position (web-only)
915
+ "object-center": web ? { objectPosition: "center" } : null,
916
+ "object-top": web ? { objectPosition: "top" } : null,
917
+ "object-bottom": web ? { objectPosition: "bottom" } : null,
918
+ "object-left": web ? { objectPosition: "left" } : null,
919
+ "object-right": web ? { objectPosition: "right" } : null,
920
+ "object-left-top": web ? { objectPosition: "left top" } : null,
921
+ "object-left-bottom": web ? { objectPosition: "left bottom" } : null,
922
+ "object-right-top": web ? { objectPosition: "right top" } : null,
923
+ "object-right-bottom": web ? { objectPosition: "right bottom" } : null,
924
+ // Table (web-only)
925
+ table: web ? { display: "table" } : null,
926
+ "table-auto": web ? { tableLayout: "auto" } : null,
927
+ "table-fixed": web ? { tableLayout: "fixed" } : null,
928
+ "caption-top": web ? { captionSide: "top" } : null,
929
+ "caption-bottom": web ? { captionSide: "bottom" } : null,
930
+ "border-collapse": web ? { borderCollapse: "collapse" } : null,
931
+ "border-separate": web ? { borderCollapse: "separate" } : null,
932
+ // List style position (web-only)
933
+ "list-inside": web ? { listStylePosition: "inside" } : null,
934
+ "list-outside": web ? { listStylePosition: "outside" } : null,
935
+ // Font variant numeric (web-only)
936
+ "normal-nums": web ? { fontVariantNumeric: "normal" } : null,
937
+ ordinal: web ? { fontVariantNumeric: "ordinal" } : null,
938
+ "slashed-zero": web ? { fontVariantNumeric: "slashed-zero" } : null,
939
+ "lining-nums": web ? { fontVariantNumeric: "lining-nums" } : null,
940
+ "oldstyle-nums": web ? { fontVariantNumeric: "oldstyle-nums" } : null,
941
+ "proportional-nums": web ? { fontVariantNumeric: "proportional-nums" } : null,
942
+ "tabular-nums": web ? { fontVariantNumeric: "tabular-nums" } : null,
943
+ "diagonal-fractions": web ? { fontVariantNumeric: "diagonal-fractions" } : null,
944
+ "stacked-fractions": web ? { fontVariantNumeric: "stacked-fractions" } : null,
945
+ // Isolation (web-only)
946
+ isolate: web ? { isolation: "isolate" } : null,
947
+ "isolation-auto": web ? { isolation: "auto" } : null,
948
+ // Backface visibility (both iOS and Android)
949
+ "backface-visible": { backfaceVisibility: "visible" },
950
+ "backface-hidden": { backfaceVisibility: "hidden" },
951
+ // CSS filters — standalone = default/full effect (web-only)
952
+ grayscale: web ? { "--tw-grayscale": "grayscale(100%)", filter: FILTER_COMPOSE } : null,
953
+ invert: web ? { "--tw-invert": "invert(100%)", filter: FILTER_COMPOSE } : null,
954
+ sepia: web ? { "--tw-sepia": "sepia(100%)", filter: FILTER_COMPOSE } : null,
955
+ // Divide none
956
+ "divide-none": web ? { __divideX: 0, __divideY: 0 } : null,
957
+ // Group / peer markers (no-op: no style emitted; just ensures isKnownUtility returns true)
958
+ group: web ? {} : null,
959
+ peer: web ? {} : null,
960
+ // Text-wrap (web-only)
961
+ "text-wrap": web ? { textWrap: "wrap" } : null,
962
+ "text-nowrap": web ? { textWrap: "nowrap" } : null,
963
+ "text-balance": web ? { textWrap: "balance" } : null,
964
+ "text-pretty": web ? { textWrap: "pretty" } : null,
965
+ // Screen sizing (vw values are web-only; vh values work cross-platform via spacing scale for h-*)
966
+ "w-screen": web ? { width: "100vw" } : null,
967
+ "min-h-screen": { minHeight: "100vh" },
968
+ "max-h-screen": { maxHeight: "100vh" },
969
+ "min-w-screen": web ? { minWidth: "100vw" } : null,
970
+ "max-w-screen": web ? { maxWidth: "100vw" } : null,
971
+ // max-w named container sizes (mirrors Tailwind's container scale)
972
+ "max-w-none": { maxWidth: "none" },
973
+ "max-w-xs": { maxWidth: 320 },
974
+ "max-w-sm": { maxWidth: 384 },
975
+ "max-w-md": { maxWidth: 448 },
976
+ "max-w-lg": { maxWidth: 512 },
977
+ "max-w-xl": { maxWidth: 576 },
978
+ "max-w-2xl": { maxWidth: 672 },
979
+ "max-w-3xl": { maxWidth: 768 },
980
+ "max-w-4xl": { maxWidth: 896 },
981
+ "max-w-5xl": { maxWidth: 1024 },
982
+ "max-w-6xl": { maxWidth: 1152 },
983
+ "max-w-7xl": { maxWidth: 1280 },
984
+ "max-w-prose": web ? { maxWidth: "65ch" } : null,
985
+ // Extended cursors (web-only)
986
+ "cursor-grab": web ? { cursor: "grab" } : null,
987
+ "cursor-grabbing": web ? { cursor: "grabbing" } : null,
988
+ "cursor-zoom-in": web ? { cursor: "zoom-in" } : null,
989
+ "cursor-zoom-out": web ? { cursor: "zoom-out" } : null,
990
+ "cursor-crosshair": web ? { cursor: "crosshair" } : null,
991
+ "cursor-help": web ? { cursor: "help" } : null,
992
+ "cursor-none": web ? { cursor: "none" } : null,
993
+ // Overflow clip (web-only)
994
+ "overflow-clip": web ? { overflow: "clip" } : null,
995
+ "overflow-x-clip": web ? { overflowX: "clip" } : null,
996
+ "overflow-y-clip": web ? { overflowY: "clip" } : null,
997
+ // Scroll behavior (web-only)
998
+ "scroll-smooth": web ? { scrollBehavior: "smooth" } : null,
999
+ "scroll-auto": web ? { scrollBehavior: "auto" } : null,
1000
+ // Float (web-only)
1001
+ "float-left": web ? { float: "left" } : null,
1002
+ "float-right": web ? { float: "right" } : null,
1003
+ "float-start": web ? { float: "inline-start" } : null,
1004
+ "float-end": web ? { float: "inline-end" } : null,
1005
+ "float-none": web ? { float: "none" } : null,
1006
+ // Clear (web-only)
1007
+ "clear-left": web ? { clear: "left" } : null,
1008
+ "clear-right": web ? { clear: "right" } : null,
1009
+ "clear-both": web ? { clear: "both" } : null,
1010
+ "clear-start": web ? { clear: "inline-start" } : null,
1011
+ "clear-end": web ? { clear: "inline-end" } : null,
1012
+ "clear-none": web ? { clear: "none" } : null,
1013
+ // Vertical align (web-only)
1014
+ "align-baseline": web ? { verticalAlign: "baseline" } : null,
1015
+ "align-top": web ? { verticalAlign: "top" } : null,
1016
+ "align-middle": web ? { verticalAlign: "middle" } : null,
1017
+ "align-bottom": web ? { verticalAlign: "bottom" } : null,
1018
+ "align-text-top": web ? { verticalAlign: "text-top" } : null,
1019
+ "align-text-bottom": web ? { verticalAlign: "text-bottom" } : null,
1020
+ "align-sub": web ? { verticalAlign: "sub" } : null,
1021
+ "align-super": web ? { verticalAlign: "super" } : null,
1022
+ // Touch action (web-only)
1023
+ "touch-auto": web ? { touchAction: "auto" } : null,
1024
+ "touch-none": web ? { touchAction: "none" } : null,
1025
+ "touch-pan-x": web ? { touchAction: "pan-x" } : null,
1026
+ "touch-pan-y": web ? { touchAction: "pan-y" } : null,
1027
+ "touch-pan-left": web ? { touchAction: "pan-left" } : null,
1028
+ "touch-pan-right": web ? { touchAction: "pan-right" } : null,
1029
+ "touch-pan-up": web ? { touchAction: "pan-up" } : null,
1030
+ "touch-pan-down": web ? { touchAction: "pan-down" } : null,
1031
+ "touch-pinch-zoom": web ? { touchAction: "pinch-zoom" } : null,
1032
+ "touch-manipulation": web ? { touchAction: "manipulation" } : null
1033
+ };
1034
+ }
1035
+ function getStandalone() {
1036
+ if (!_standalone) _standalone = buildStandalone();
1037
+ return _standalone;
1038
+ }
1020
1039
  var RESOLVERS = {
1021
1040
  // ── Background ─────────────────────────────────────────────────────────────
1022
1041
  bg: ({ value, isArbitrary }, { colors }) => {
@@ -1024,7 +1043,7 @@ var RESOLVERS = {
1024
1043
  return color ? { backgroundColor: color } : null;
1025
1044
  },
1026
1045
  "bg-opacity": ({ value }, _) => {
1027
- if (!isWeb) return null;
1046
+ if (!getEffectiveIsWeb()) return null;
1028
1047
  const v = parseFloat(value) / 100;
1029
1048
  return isNaN(v) ? null : { "--bg-opacity": v };
1030
1049
  },
@@ -1034,7 +1053,7 @@ var RESOLVERS = {
1034
1053
  if (!isArbitrary && size !== null) return { fontSize: size };
1035
1054
  if (isArbitrary) {
1036
1055
  if (/^\d/.test(value) || /^(calc|min|max|clamp)/.test(value)) {
1037
- return { fontSize: isWeb ? value : toNativeValue(value) };
1056
+ return { fontSize: getEffectiveIsWeb() ? value : toNativeValue(value) };
1038
1057
  }
1039
1058
  return { color: value };
1040
1059
  }
@@ -1042,7 +1061,7 @@ var RESOLVERS = {
1042
1061
  return color ? { color } : null;
1043
1062
  },
1044
1063
  "text-opacity": ({ value }, _) => {
1045
- if (!isWeb) return null;
1064
+ if (!getEffectiveIsWeb()) return null;
1046
1065
  const v = parseFloat(value) / 100;
1047
1066
  return isNaN(v) ? null : { "--text-opacity": v };
1048
1067
  },
@@ -1238,7 +1257,7 @@ var RESOLVERS = {
1238
1257
  },
1239
1258
  // ── Grid template columns/rows (Tailwind-style aliases, web-only) ──────────
1240
1259
  "grid-cols": ({ value, isArbitrary }) => {
1241
- if (!isWeb) return null;
1260
+ if (!getEffectiveIsWeb()) return null;
1242
1261
  if (!value) return null;
1243
1262
  if (isArbitrary) return { display: "grid", gridTemplateColumns: value };
1244
1263
  if (value === "none") return { display: "grid", gridTemplateColumns: "none" };
@@ -1247,7 +1266,7 @@ var RESOLVERS = {
1247
1266
  return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
1248
1267
  },
1249
1268
  "grid-rows": ({ value, isArbitrary }) => {
1250
- if (!isWeb) return null;
1269
+ if (!getEffectiveIsWeb()) return null;
1251
1270
  if (!value) return null;
1252
1271
  if (isArbitrary) return { gridTemplateRows: value };
1253
1272
  if (value === "none") return { gridTemplateRows: "none" };
@@ -1257,7 +1276,7 @@ var RESOLVERS = {
1257
1276
  },
1258
1277
  // ── Grid auto flow (web-only) ─────────────────────────────────────────────
1259
1278
  "grid-flow": ({ value }) => {
1260
- if (!isWeb) return null;
1279
+ if (!getEffectiveIsWeb()) return null;
1261
1280
  const flows = {
1262
1281
  row: "row",
1263
1282
  col: "column",
@@ -1270,7 +1289,7 @@ var RESOLVERS = {
1270
1289
  },
1271
1290
  // ── Grid auto sizing (web-only) ───────────────────────────────────────────
1272
1291
  "auto-cols": ({ value, isArbitrary }) => {
1273
- if (!isWeb) return null;
1292
+ if (!getEffectiveIsWeb()) return null;
1274
1293
  if (isArbitrary) return { gridAutoColumns: value };
1275
1294
  const presets = {
1276
1295
  auto: "auto",
@@ -1282,7 +1301,7 @@ var RESOLVERS = {
1282
1301
  return v ? { gridAutoColumns: v } : null;
1283
1302
  },
1284
1303
  "auto-rows": ({ value, isArbitrary }) => {
1285
- if (!isWeb) return null;
1304
+ if (!getEffectiveIsWeb()) return null;
1286
1305
  if (isArbitrary) return { gridAutoRows: value };
1287
1306
  const presets = {
1288
1307
  auto: "auto",
@@ -1295,54 +1314,54 @@ var RESOLVERS = {
1295
1314
  },
1296
1315
  // ── Grid column placement (web-only) ──────────────────────────────────────
1297
1316
  "col-span": ({ value }) => {
1298
- if (!isWeb) return null;
1317
+ if (!getEffectiveIsWeb()) return null;
1299
1318
  if (value === "full") return { gridColumn: "1 / -1" };
1300
1319
  const n = parseInt(value, 10);
1301
1320
  return isNaN(n) ? null : { gridColumn: `span ${n} / span ${n}` };
1302
1321
  },
1303
1322
  "col-start": ({ value, isArbitrary }) => {
1304
- if (!isWeb) return null;
1323
+ if (!getEffectiveIsWeb()) return null;
1305
1324
  if (value === "auto") return { gridColumnStart: "auto" };
1306
1325
  if (isArbitrary) return { gridColumnStart: value };
1307
1326
  const n = parseInt(value, 10);
1308
1327
  return isNaN(n) ? null : { gridColumnStart: n };
1309
1328
  },
1310
1329
  "col-end": ({ value, isArbitrary }) => {
1311
- if (!isWeb) return null;
1330
+ if (!getEffectiveIsWeb()) return null;
1312
1331
  if (value === "auto") return { gridColumnEnd: "auto" };
1313
1332
  if (isArbitrary) return { gridColumnEnd: value };
1314
1333
  const n = parseInt(value, 10);
1315
1334
  return isNaN(n) ? null : { gridColumnEnd: n };
1316
1335
  },
1317
1336
  col: ({ value, isArbitrary }) => {
1318
- if (!isWeb) return null;
1337
+ if (!getEffectiveIsWeb()) return null;
1319
1338
  if (!value || value === "auto") return { gridColumn: "auto" };
1320
1339
  if (isArbitrary) return { gridColumn: value };
1321
1340
  return null;
1322
1341
  },
1323
1342
  // ── Grid row placement (web-only) ─────────────────────────────────────────
1324
1343
  "row-span": ({ value }) => {
1325
- if (!isWeb) return null;
1344
+ if (!getEffectiveIsWeb()) return null;
1326
1345
  if (value === "full") return { gridRow: "1 / -1" };
1327
1346
  const n = parseInt(value, 10);
1328
1347
  return isNaN(n) ? null : { gridRow: `span ${n} / span ${n}` };
1329
1348
  },
1330
1349
  "row-start": ({ value, isArbitrary }) => {
1331
- if (!isWeb) return null;
1350
+ if (!getEffectiveIsWeb()) return null;
1332
1351
  if (value === "auto") return { gridRowStart: "auto" };
1333
1352
  if (isArbitrary) return { gridRowStart: value };
1334
1353
  const n = parseInt(value, 10);
1335
1354
  return isNaN(n) ? null : { gridRowStart: n };
1336
1355
  },
1337
1356
  "row-end": ({ value, isArbitrary }) => {
1338
- if (!isWeb) return null;
1357
+ if (!getEffectiveIsWeb()) return null;
1339
1358
  if (value === "auto") return { gridRowEnd: "auto" };
1340
1359
  if (isArbitrary) return { gridRowEnd: value };
1341
1360
  const n = parseInt(value, 10);
1342
1361
  return isNaN(n) ? null : { gridRowEnd: n };
1343
1362
  },
1344
1363
  row: ({ value, isArbitrary }) => {
1345
- if (!isWeb) return null;
1364
+ if (!getEffectiveIsWeb()) return null;
1346
1365
  if (!value || value === "auto") return { gridRow: "auto" };
1347
1366
  if (isArbitrary) return { gridRow: value };
1348
1367
  return null;
@@ -1350,7 +1369,7 @@ var RESOLVERS = {
1350
1369
  // ── Grid alignment (web-only) ──────────────────────────────────────────────
1351
1370
  // place-items is shorthand for align-items + justify-items on a grid container
1352
1371
  "place-items": ({ value }) => {
1353
- if (!isWeb) return null;
1372
+ if (!getEffectiveIsWeb()) return null;
1354
1373
  const map = {
1355
1374
  start: "start",
1356
1375
  end: "end",
@@ -1362,7 +1381,7 @@ var RESOLVERS = {
1362
1381
  },
1363
1382
  // place-content is shorthand for align-content + justify-content on a grid container
1364
1383
  "place-content": ({ value }) => {
1365
- if (!isWeb) return null;
1384
+ if (!getEffectiveIsWeb()) return null;
1366
1385
  const map = {
1367
1386
  start: "start",
1368
1387
  end: "end",
@@ -1377,7 +1396,7 @@ var RESOLVERS = {
1377
1396
  },
1378
1397
  // justify-items controls inline-axis alignment of grid items within their cells
1379
1398
  "justify-items": ({ value }) => {
1380
- if (!isWeb) return null;
1399
+ if (!getEffectiveIsWeb()) return null;
1381
1400
  const map = {
1382
1401
  start: "start",
1383
1402
  end: "end",
@@ -1388,7 +1407,7 @@ var RESOLVERS = {
1388
1407
  },
1389
1408
  // place-self is shorthand for align-self + justify-self on a grid item
1390
1409
  "place-self": ({ value }) => {
1391
- if (!isWeb) return null;
1410
+ if (!getEffectiveIsWeb()) return null;
1392
1411
  const map = {
1393
1412
  auto: "auto",
1394
1413
  start: "start",
@@ -1400,7 +1419,7 @@ var RESOLVERS = {
1400
1419
  },
1401
1420
  // justify-self controls inline-axis self-alignment of a grid item
1402
1421
  "justify-self": ({ value }) => {
1403
- if (!isWeb) return null;
1422
+ if (!getEffectiveIsWeb()) return null;
1404
1423
  const map = {
1405
1424
  auto: "auto",
1406
1425
  start: "start",
@@ -1412,7 +1431,7 @@ var RESOLVERS = {
1412
1431
  },
1413
1432
  // ── CSS Filters (composable via CSS variables, web-only) ─────────────────
1414
1433
  blur: ({ value, isArbitrary }) => {
1415
- if (!isWeb) return null;
1434
+ if (!getEffectiveIsWeb()) return null;
1416
1435
  const sizes = {
1417
1436
  "": "blur(8px)",
1418
1437
  sm: "blur(4px)",
@@ -1427,43 +1446,43 @@ var RESOLVERS = {
1427
1446
  return v !== void 0 ? { "--tw-blur": v, filter: FILTER_COMPOSE } : null;
1428
1447
  },
1429
1448
  brightness: ({ value, isArbitrary }) => {
1430
- if (!isWeb) return null;
1449
+ if (!getEffectiveIsWeb()) return null;
1431
1450
  const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
1432
1451
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-brightness": v, filter: FILTER_COMPOSE };
1433
1452
  },
1434
1453
  contrast: ({ value, isArbitrary }) => {
1435
- if (!isWeb) return null;
1454
+ if (!getEffectiveIsWeb()) return null;
1436
1455
  const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
1437
1456
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-contrast": v, filter: FILTER_COMPOSE };
1438
1457
  },
1439
1458
  grayscale: ({ value }) => {
1440
- if (!isWeb) return null;
1459
+ if (!getEffectiveIsWeb()) return null;
1441
1460
  const v = value === "0" ? "grayscale(0)" : "grayscale(100%)";
1442
1461
  return { "--tw-grayscale": v, filter: FILTER_COMPOSE };
1443
1462
  },
1444
1463
  "hue-rotate": ({ value, negative, isArbitrary }) => {
1445
- if (!isWeb) return null;
1464
+ if (!getEffectiveIsWeb()) return null;
1446
1465
  const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
1447
1466
  if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
1448
1467
  return { "--tw-hue-rotate": `hue-rotate(${deg})`, filter: FILTER_COMPOSE };
1449
1468
  },
1450
1469
  invert: ({ value }) => {
1451
- if (!isWeb) return null;
1470
+ if (!getEffectiveIsWeb()) return null;
1452
1471
  const v = value === "0" ? "invert(0)" : "invert(100%)";
1453
1472
  return { "--tw-invert": v, filter: FILTER_COMPOSE };
1454
1473
  },
1455
1474
  saturate: ({ value, isArbitrary }) => {
1456
- if (!isWeb) return null;
1475
+ if (!getEffectiveIsWeb()) return null;
1457
1476
  const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
1458
1477
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-saturate": v, filter: FILTER_COMPOSE };
1459
1478
  },
1460
1479
  sepia: ({ value }) => {
1461
- if (!isWeb) return null;
1480
+ if (!getEffectiveIsWeb()) return null;
1462
1481
  const v = value === "0" ? "sepia(0)" : "sepia(100%)";
1463
1482
  return { "--tw-sepia": v, filter: FILTER_COMPOSE };
1464
1483
  },
1465
1484
  "drop-shadow": ({ value, isArbitrary }) => {
1466
- if (!isWeb) return null;
1485
+ if (!getEffectiveIsWeb()) return null;
1467
1486
  if (isArbitrary) return { "--tw-drop-shadow": `drop-shadow(${value.replace(/_/g, " ")})`, filter: FILTER_COMPOSE };
1468
1487
  const presets = {
1469
1488
  "": "drop-shadow(0 1px 2px rgb(0 0 0/0.1)) drop-shadow(0 1px 1px rgb(0 0 0/0.06))",
@@ -1479,14 +1498,14 @@ var RESOLVERS = {
1479
1498
  },
1480
1499
  // Arbitrary full filter string: filter-[blur(4px)_grayscale(1)]
1481
1500
  filter: ({ value, isArbitrary }) => {
1482
- if (!isWeb) return null;
1501
+ if (!getEffectiveIsWeb()) return null;
1483
1502
  if (isArbitrary) return { filter: value.replace(/_/g, " ") };
1484
1503
  if (value === "none") return { filter: "none" };
1485
1504
  return null;
1486
1505
  },
1487
1506
  // ── Backdrop Filters (composable via CSS variables, web-only) ────────────
1488
1507
  "backdrop-blur": ({ value, isArbitrary }) => {
1489
- if (!isWeb) return null;
1508
+ if (!getEffectiveIsWeb()) return null;
1490
1509
  const sizes = {
1491
1510
  "": "blur(8px)",
1492
1511
  sm: "blur(4px)",
@@ -1501,52 +1520,52 @@ var RESOLVERS = {
1501
1520
  return v !== void 0 ? { "--tw-backdrop-blur": v, backdropFilter: BACKDROP_FILTER_COMPOSE } : null;
1502
1521
  },
1503
1522
  "backdrop-brightness": ({ value, isArbitrary }) => {
1504
- if (!isWeb) return null;
1523
+ if (!getEffectiveIsWeb()) return null;
1505
1524
  const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
1506
1525
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-brightness": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
1507
1526
  },
1508
1527
  "backdrop-contrast": ({ value, isArbitrary }) => {
1509
- if (!isWeb) return null;
1528
+ if (!getEffectiveIsWeb()) return null;
1510
1529
  const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
1511
1530
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-contrast": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
1512
1531
  },
1513
1532
  "backdrop-grayscale": ({ value }) => {
1514
- if (!isWeb) return null;
1533
+ if (!getEffectiveIsWeb()) return null;
1515
1534
  return { "--tw-backdrop-grayscale": value === "0" ? "grayscale(0)" : "grayscale(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
1516
1535
  },
1517
1536
  "backdrop-hue-rotate": ({ value, negative, isArbitrary }) => {
1518
- if (!isWeb) return null;
1537
+ if (!getEffectiveIsWeb()) return null;
1519
1538
  const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
1520
1539
  if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
1521
1540
  return { "--tw-backdrop-hue-rotate": `hue-rotate(${deg})`, backdropFilter: BACKDROP_FILTER_COMPOSE };
1522
1541
  },
1523
1542
  "backdrop-invert": ({ value }) => {
1524
- if (!isWeb) return null;
1543
+ if (!getEffectiveIsWeb()) return null;
1525
1544
  return { "--tw-backdrop-invert": value === "0" ? "invert(0)" : "invert(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
1526
1545
  },
1527
1546
  "backdrop-opacity": ({ value, isArbitrary }) => {
1528
- if (!isWeb) return null;
1547
+ if (!getEffectiveIsWeb()) return null;
1529
1548
  const v = isArbitrary ? `opacity(${value})` : `opacity(${parseFloat(value) / 100})`;
1530
1549
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-opacity": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
1531
1550
  },
1532
1551
  "backdrop-saturate": ({ value, isArbitrary }) => {
1533
- if (!isWeb) return null;
1552
+ if (!getEffectiveIsWeb()) return null;
1534
1553
  const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
1535
1554
  return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-saturate": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
1536
1555
  },
1537
1556
  "backdrop-sepia": ({ value }) => {
1538
- if (!isWeb) return null;
1557
+ if (!getEffectiveIsWeb()) return null;
1539
1558
  return { "--tw-backdrop-sepia": value === "0" ? "sepia(0)" : "sepia(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
1540
1559
  },
1541
1560
  "backdrop-filter": ({ value, isArbitrary }) => {
1542
- if (!isWeb) return null;
1561
+ if (!getEffectiveIsWeb()) return null;
1543
1562
  if (isArbitrary) return { backdropFilter: value.replace(/_/g, " ") };
1544
1563
  if (value === "none") return { backdropFilter: "none" };
1545
1564
  return null;
1546
1565
  },
1547
1566
  // ── Background gradient (CSS variable gradient stops, web-only) ──────────
1548
1567
  "bg-gradient-to": ({ value }) => {
1549
- if (!isWeb) return null;
1568
+ if (!getEffectiveIsWeb()) return null;
1550
1569
  const directions = {
1551
1570
  t: "to top",
1552
1571
  tr: "to top right",
@@ -1564,7 +1583,7 @@ var RESOLVERS = {
1564
1583
  };
1565
1584
  },
1566
1585
  from: ({ value, isArbitrary }, { colors }) => {
1567
- if (!isWeb) return null;
1586
+ if (!getEffectiveIsWeb()) return null;
1568
1587
  const color = resolveColor(value, colors, isArbitrary);
1569
1588
  if (!color) return null;
1570
1589
  return {
@@ -1573,7 +1592,7 @@ var RESOLVERS = {
1573
1592
  };
1574
1593
  },
1575
1594
  via: ({ value, isArbitrary }, { colors }) => {
1576
- if (!isWeb) return null;
1595
+ if (!getEffectiveIsWeb()) return null;
1577
1596
  const color = resolveColor(value, colors, isArbitrary);
1578
1597
  if (!color) return null;
1579
1598
  return {
@@ -1582,7 +1601,7 @@ var RESOLVERS = {
1582
1601
  };
1583
1602
  },
1584
1603
  to: ({ value, isArbitrary }, { colors }) => {
1585
- if (!isWeb) return null;
1604
+ if (!getEffectiveIsWeb()) return null;
1586
1605
  const color = resolveColor(value, colors, isArbitrary);
1587
1606
  if (!color) return null;
1588
1607
  return { "--tw-gradient-to": color };
@@ -1591,23 +1610,23 @@ var RESOLVERS = {
1591
1610
  "skew-x": ({ value, negative, isArbitrary }) => {
1592
1611
  const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
1593
1612
  if (!isArbitrary && isNaN(parseFloat(value))) return null;
1594
- return isWeb ? { transform: `skewX(${deg})` } : { transform: [{ skewX: deg }] };
1613
+ return getEffectiveIsWeb() ? { transform: `skewX(${deg})` } : { transform: [{ skewX: deg }] };
1595
1614
  },
1596
1615
  "skew-y": ({ value, negative, isArbitrary }) => {
1597
1616
  const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
1598
1617
  if (!isArbitrary && isNaN(parseFloat(value))) return null;
1599
- return isWeb ? { transform: `skewY(${deg})` } : { transform: [{ skewY: deg }] };
1618
+ return getEffectiveIsWeb() ? { transform: `skewY(${deg})` } : { transform: [{ skewY: deg }] };
1600
1619
  },
1601
1620
  // Arbitrary full transform string: transform-[rotate(45deg)_scale(1.5)]
1602
1621
  transform: ({ value, isArbitrary }) => {
1603
- if (!isWeb) return null;
1622
+ if (!getEffectiveIsWeb()) return null;
1604
1623
  if (isArbitrary) return { transform: value.replace(/_/g, " ") };
1605
1624
  if (value === "none") return { transform: "none" };
1606
1625
  return null;
1607
1626
  },
1608
1627
  // Transform origin
1609
1628
  origin: ({ value, isArbitrary }) => {
1610
- if (!isWeb) return null;
1629
+ if (!getEffectiveIsWeb()) return null;
1611
1630
  if (isArbitrary) return { transformOrigin: value.replace(/_/g, " ") };
1612
1631
  const origins = {
1613
1632
  center: "center",
@@ -1624,7 +1643,7 @@ var RESOLVERS = {
1624
1643
  },
1625
1644
  // ── Text decoration advanced (web-only) ───────────────────────────────────
1626
1645
  decoration: ({ value, isArbitrary }, { colors }) => {
1627
- if (!isWeb) return null;
1646
+ if (!getEffectiveIsWeb()) return null;
1628
1647
  if (isArbitrary) {
1629
1648
  if (/^\d/.test(value) || value.startsWith("calc(")) return { textDecorationThickness: value };
1630
1649
  return { textDecorationColor: value };
@@ -1651,7 +1670,7 @@ var RESOLVERS = {
1651
1670
  return color ? { textDecorationColor: color } : null;
1652
1671
  },
1653
1672
  "underline-offset": ({ value, isArbitrary }) => {
1654
- if (!isWeb) return null;
1673
+ if (!getEffectiveIsWeb()) return null;
1655
1674
  if (isArbitrary) return { textUnderlineOffset: value };
1656
1675
  const offsets = {
1657
1676
  auto: "auto",
@@ -1665,7 +1684,7 @@ var RESOLVERS = {
1665
1684
  },
1666
1685
  // ── Outline extended (web-only) ───────────────────────────────────────────
1667
1686
  outline: ({ value, isArbitrary }, { colors }) => {
1668
- if (!isWeb) return null;
1687
+ if (!getEffectiveIsWeb()) return null;
1669
1688
  if (!value) return { outline: "2px solid transparent", outlineOffset: "2px" };
1670
1689
  if (value === "none") return { outline: "none", outlineOffset: "0" };
1671
1690
  if (isArbitrary) {
@@ -1678,14 +1697,14 @@ var RESOLVERS = {
1678
1697
  return color ? { outlineColor: color } : null;
1679
1698
  },
1680
1699
  "outline-offset": ({ value, isArbitrary }) => {
1681
- if (!isWeb) return null;
1700
+ if (!getEffectiveIsWeb()) return null;
1682
1701
  if (isArbitrary) return { outlineOffset: value };
1683
1702
  const offsets = { "0": "0px", "1": "1px", "2": "2px", "4": "4px", "8": "8px" };
1684
1703
  return offsets[value] ? { outlineOffset: offsets[value] } : null;
1685
1704
  },
1686
1705
  // ── Columns (web-only) ─────────────────────────────────────────────────────
1687
1706
  columns: ({ value, isArbitrary }) => {
1688
- if (!isWeb) return null;
1707
+ if (!getEffectiveIsWeb()) return null;
1689
1708
  if (isArbitrary) return { columnCount: value };
1690
1709
  if (value === "auto") return { columnCount: "auto" };
1691
1710
  const n = parseInt(value, 10);
@@ -1709,7 +1728,7 @@ var RESOLVERS = {
1709
1728
  },
1710
1729
  // ── Mix / background blend mode (web-only) ───────────────────────────────
1711
1730
  "mix-blend": ({ value }) => {
1712
- if (!isWeb) return null;
1731
+ if (!getEffectiveIsWeb()) return null;
1713
1732
  const modes = [
1714
1733
  "normal",
1715
1734
  "multiply",
@@ -1732,7 +1751,7 @@ var RESOLVERS = {
1732
1751
  return modes.includes(value) ? { mixBlendMode: value } : null;
1733
1752
  },
1734
1753
  "bg-blend": ({ value }) => {
1735
- if (!isWeb) return null;
1754
+ if (!getEffectiveIsWeb()) return null;
1736
1755
  const modes = [
1737
1756
  "normal",
1738
1757
  "multiply",
@@ -1755,7 +1774,7 @@ var RESOLVERS = {
1755
1774
  },
1756
1775
  // ── Will-change (web-only) ─────────────────────────────────────────────────
1757
1776
  "will-change": ({ value, isArbitrary }) => {
1758
- if (!isWeb) return null;
1777
+ if (!getEffectiveIsWeb()) return null;
1759
1778
  if (isArbitrary) return { willChange: value.replace(/_/g, ", ") };
1760
1779
  const presets = {
1761
1780
  auto: "auto",
@@ -1769,21 +1788,21 @@ var RESOLVERS = {
1769
1788
  // These return special __divide* markers that resolver.ts converts to
1770
1789
  // .cls > * + * { border-... } CSS rules. No inline style is applied.
1771
1790
  "divide-x": ({ value, isArbitrary }) => {
1772
- if (!isWeb) return null;
1791
+ if (!getEffectiveIsWeb()) return null;
1773
1792
  if (value === "reverse") return null;
1774
1793
  if (!value) return { __divideX: 1 };
1775
1794
  const n = parseFloat(value);
1776
1795
  return isNaN(n) ? null : { __divideX: n };
1777
1796
  },
1778
1797
  "divide-y": ({ value, isArbitrary }) => {
1779
- if (!isWeb) return null;
1798
+ if (!getEffectiveIsWeb()) return null;
1780
1799
  if (value === "reverse") return null;
1781
1800
  if (!value) return { __divideY: 1 };
1782
1801
  const n = parseFloat(value);
1783
1802
  return isNaN(n) ? null : { __divideY: n };
1784
1803
  },
1785
1804
  divide: ({ value, isArbitrary }, { colors }) => {
1786
- if (!isWeb) return null;
1805
+ if (!getEffectiveIsWeb()) return null;
1787
1806
  if (isArbitrary) return { __divideColor: value };
1788
1807
  const styleTokens = {
1789
1808
  solid: "solid",
@@ -1800,7 +1819,7 @@ var RESOLVERS = {
1800
1819
  // Named presets give cross-platform shadow; arbitrary is web-only.
1801
1820
  "text-shadow": ({ value, isArbitrary }, { colors }) => {
1802
1821
  if (value === "none") {
1803
- return isWeb ? { textShadow: "none" } : { textShadowColor: "transparent", textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 0 };
1822
+ return getEffectiveIsWeb() ? { textShadow: "none" } : { textShadowColor: "transparent", textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 0 };
1804
1823
  }
1805
1824
  const webPresets = {
1806
1825
  "": "0 2px 4px rgba(0,0,0,0.3)",
@@ -1817,15 +1836,15 @@ var RESOLVERS = {
1817
1836
  xl: { textShadowColor: "rgba(0,0,0,0.5)", textShadowOffset: { width: 0, height: 16 }, textShadowRadius: 32 }
1818
1837
  };
1819
1838
  if (value in webPresets) {
1820
- if (isWeb) return { textShadow: webPresets[value] };
1839
+ if (getEffectiveIsWeb()) return { textShadow: webPresets[value] };
1821
1840
  return nativePresets[value] ?? null;
1822
1841
  }
1823
1842
  if (isArbitrary) {
1824
- return isWeb ? { textShadow: value.replace(/_/g, " ") } : null;
1843
+ return getEffectiveIsWeb() ? { textShadow: value.replace(/_/g, " ") } : null;
1825
1844
  }
1826
1845
  const color = resolveColor(value, colors, false);
1827
1846
  if (color) {
1828
- return isWeb ? { textShadow: `0 2px 4px ${color}` } : { textShadowColor: color };
1847
+ return getEffectiveIsWeb() ? { textShadow: `0 2px 4px ${color}` } : { textShadowColor: color };
1829
1848
  }
1830
1849
  return null;
1831
1850
  },
@@ -1833,13 +1852,13 @@ var RESOLVERS = {
1833
1852
  perspective: ({ value, isArbitrary }) => {
1834
1853
  if (isArbitrary) {
1835
1854
  const numPx = parseFloat(value);
1836
- if (isWeb) return { transform: `perspective(${value})` };
1855
+ if (getEffectiveIsWeb()) return { transform: `perspective(${value})` };
1837
1856
  return isNaN(numPx) ? null : { transform: [{ perspective: numPx }] };
1838
1857
  }
1839
- if (value === "none") return isWeb ? { transform: "none" } : null;
1858
+ if (value === "none") return getEffectiveIsWeb() ? { transform: "none" } : null;
1840
1859
  const n = parseFloat(value);
1841
1860
  if (isNaN(n)) return null;
1842
- return isWeb ? { transform: `perspective(${n}px)` } : { transform: [{ perspective: n }] };
1861
+ return getEffectiveIsWeb() ? { transform: `perspective(${n}px)` } : { transform: [{ perspective: n }] };
1843
1862
  },
1844
1863
  // ── Tint color (native-only, for Image and icon components) ──────────────
1845
1864
  tint: ({ value, isArbitrary }, { colors }) => {
@@ -1857,7 +1876,7 @@ var RESOLVERS = {
1857
1876
  // resolver.ts detects __keyframe, injects the rule, then strips the marker
1858
1877
  // so it never reaches element inline styles.
1859
1878
  animate: ({ value, isArbitrary }) => {
1860
- if (!isWeb) return null;
1879
+ if (!getEffectiveIsWeb()) return null;
1861
1880
  if (isArbitrary) return { animation: value.replace(/_/g, " ") };
1862
1881
  const defs = {
1863
1882
  none: { animation: "none" },
@@ -1883,7 +1902,7 @@ var RESOLVERS = {
1883
1902
  },
1884
1903
  // ── Line-clamp (web-only) ─────────────────────────────────────────────────
1885
1904
  "line-clamp": ({ value }) => {
1886
- if (!isWeb) return null;
1905
+ if (!getEffectiveIsWeb()) return null;
1887
1906
  if (value === "none") return { overflow: "visible", display: "block", WebkitLineClamp: "unset" };
1888
1907
  const n = parseInt(value, 10);
1889
1908
  if (isNaN(n) || n < 1) return null;
@@ -1896,14 +1915,14 @@ var RESOLVERS = {
1896
1915
  },
1897
1916
  // ── Caret color (web-only) ────────────────────────────────────────────────
1898
1917
  caret: ({ value, isArbitrary }, { colors }) => {
1899
- if (!isWeb) return null;
1918
+ if (!getEffectiveIsWeb()) return null;
1900
1919
  if (value === "auto" || value === "transparent") return { caretColor: value };
1901
1920
  const color = resolveColor(value, colors, isArbitrary);
1902
1921
  return color ? { caretColor: color } : null;
1903
1922
  },
1904
1923
  // ── Accent color (web-only) ───────────────────────────────────────────────
1905
1924
  accent: ({ value, isArbitrary }, { colors }) => {
1906
- if (!isWeb) return null;
1925
+ if (!getEffectiveIsWeb()) return null;
1907
1926
  if (value === "auto") return { accentColor: "auto" };
1908
1927
  const color = resolveColor(value, colors, isArbitrary);
1909
1928
  return color ? { accentColor: color } : null;
@@ -1987,7 +2006,7 @@ var RESOLVERS = {
1987
2006
  }
1988
2007
  const v = zIndex[value];
1989
2008
  if (v !== void 0) {
1990
- if (v === "auto") return isWeb ? { zIndex: "auto" } : null;
2009
+ if (v === "auto") return getEffectiveIsWeb() ? { zIndex: "auto" } : null;
1991
2010
  return { zIndex: v };
1992
2011
  }
1993
2012
  const n = parseInt(value);
@@ -2016,13 +2035,13 @@ var RESOLVERS = {
2016
2035
  },
2017
2036
  // ── Line height ────────────────────────────────────────────────────────────
2018
2037
  leading: ({ value, isArbitrary }, { lineHeight }) => {
2019
- if (isArbitrary) return { lineHeight: isWeb ? value : toNativeValue(value) };
2038
+ if (isArbitrary) return { lineHeight: getEffectiveIsWeb() ? value : toNativeValue(value) };
2020
2039
  const v = lineHeight[value];
2021
2040
  return v !== void 0 ? { lineHeight: v } : null;
2022
2041
  },
2023
2042
  // ── Letter spacing ─────────────────────────────────────────────────────────
2024
2043
  tracking: ({ value, isArbitrary }, { letterSpacing }) => {
2025
- if (isArbitrary) return { letterSpacing: isWeb ? value : toNativeValue(value) };
2044
+ if (isArbitrary) return { letterSpacing: getEffectiveIsWeb() ? value : toNativeValue(value) };
2026
2045
  const v = letterSpacing[value];
2027
2046
  return v !== void 0 ? { letterSpacing: v } : null;
2028
2047
  },
@@ -2037,34 +2056,34 @@ var RESOLVERS = {
2037
2056
  scale: ({ value, isArbitrary }) => {
2038
2057
  const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
2039
2058
  if (isNaN(n)) return null;
2040
- return isWeb ? { transform: `scale(${n})` } : { transform: [{ scale: n }] };
2059
+ return getEffectiveIsWeb() ? { transform: `scale(${n})` } : { transform: [{ scale: n }] };
2041
2060
  },
2042
2061
  "scale-x": ({ value, isArbitrary }) => {
2043
2062
  const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
2044
2063
  if (isNaN(n)) return null;
2045
- return isWeb ? { transform: `scaleX(${n})` } : { transform: [{ scaleX: n }] };
2064
+ return getEffectiveIsWeb() ? { transform: `scaleX(${n})` } : { transform: [{ scaleX: n }] };
2046
2065
  },
2047
2066
  "scale-y": ({ value, isArbitrary }) => {
2048
2067
  const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
2049
2068
  if (isNaN(n)) return null;
2050
- return isWeb ? { transform: `scaleY(${n})` } : { transform: [{ scaleY: n }] };
2069
+ return getEffectiveIsWeb() ? { transform: `scaleY(${n})` } : { transform: [{ scaleY: n }] };
2051
2070
  },
2052
2071
  // ── Rotate ─────────────────────────────────────────────────────────────────
2053
2072
  rotate: ({ value, negative, isArbitrary }) => {
2054
2073
  if (isArbitrary) {
2055
2074
  const finalValue = negative ? `-${value}` : value;
2056
- return isWeb ? { transform: `rotate(${finalValue})` } : { transform: [{ rotate: finalValue }] };
2075
+ return getEffectiveIsWeb() ? { transform: `rotate(${finalValue})` } : { transform: [{ rotate: finalValue }] };
2057
2076
  }
2058
2077
  const deg = parseFloat(value);
2059
2078
  if (isNaN(deg)) return null;
2060
2079
  const finalDeg = negative ? -deg : deg;
2061
- return isWeb ? { transform: `rotate(${finalDeg}deg)` } : { transform: [{ rotate: `${finalDeg}deg` }] };
2080
+ return getEffectiveIsWeb() ? { transform: `rotate(${finalDeg}deg)` } : { transform: [{ rotate: `${finalDeg}deg` }] };
2062
2081
  },
2063
2082
  // ── Translate ──────────────────────────────────────────────────────────────
2064
2083
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2065
2084
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2066
2085
  if (v === null) return null;
2067
- if (isWeb) return { transform: `translateX(${v})` };
2086
+ if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2068
2087
  if (typeof v === "string") {
2069
2088
  const n = parseFloat(v);
2070
2089
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2074,7 +2093,7 @@ var RESOLVERS = {
2074
2093
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2075
2094
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2076
2095
  if (v === null) return null;
2077
- if (isWeb) return { transform: `translateY(${v})` };
2096
+ if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2078
2097
  if (typeof v === "string") {
2079
2098
  const n = parseFloat(v);
2080
2099
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
@@ -2087,12 +2106,12 @@ var RESOLVERS = {
2087
2106
  const presets = { auto: "auto", square: 1, video: 16 / 9 };
2088
2107
  if (!(value in presets)) return null;
2089
2108
  const v = presets[value];
2090
- if (v === "auto") return isWeb ? { aspectRatio: "auto" } : null;
2109
+ if (v === "auto") return getEffectiveIsWeb() ? { aspectRatio: "auto" } : null;
2091
2110
  return { aspectRatio: v };
2092
2111
  },
2093
2112
  // ── Transition (web-only; use Animated API on native) ─────────────────────
2094
2113
  transition: ({ value }) => {
2095
- if (!isWeb) return null;
2114
+ if (!getEffectiveIsWeb()) return null;
2096
2115
  const presets = {
2097
2116
  "": "color 150ms, background-color 150ms, border-color 150ms, opacity 150ms, box-shadow 150ms",
2098
2117
  all: "all 150ms",
@@ -2106,18 +2125,18 @@ var RESOLVERS = {
2106
2125
  return v !== void 0 ? { transition: v } : null;
2107
2126
  },
2108
2127
  duration: ({ value, isArbitrary }) => {
2109
- if (!isWeb) return null;
2128
+ if (!getEffectiveIsWeb()) return null;
2110
2129
  const ms = isArbitrary ? value : `${value}ms`;
2111
2130
  return { transitionDuration: ms };
2112
2131
  },
2113
2132
  delay: ({ value, isArbitrary }) => {
2114
- if (!isWeb) return null;
2133
+ if (!getEffectiveIsWeb()) return null;
2115
2134
  const ms = isArbitrary ? value : `${value}ms`;
2116
2135
  return { transitionDelay: ms };
2117
2136
  },
2118
2137
  // ── Ring (web-only: box-shadow outline ring) ──────────────────────────────
2119
2138
  ring: ({ value, isArbitrary }, { colors }) => {
2120
- if (!isWeb) return null;
2139
+ if (!getEffectiveIsWeb()) return null;
2121
2140
  const DEFAULT_COLOR = "rgba(59, 130, 246, 0.5)";
2122
2141
  const DEFAULT_WIDTH = 3;
2123
2142
  if (!value) {
@@ -2144,7 +2163,7 @@ var RESOLVERS = {
2144
2163
  return null;
2145
2164
  },
2146
2165
  "ring-offset": ({ value, isArbitrary }, _theme) => {
2147
- if (!isWeb) return null;
2166
+ if (!getEffectiveIsWeb()) return null;
2148
2167
  const DEFAULT_RING_COLOR = "rgba(59, 130, 246, 0.5)";
2149
2168
  const DEFAULT_RING_WIDTH = 3;
2150
2169
  const offsetTokens = { "0": 0, "1": 1, "2": 2, "4": 4, "8": 8 };
@@ -2173,7 +2192,7 @@ function resolveUtility(parsed, theme) {
2173
2192
  if (parsed.utility === "inline-grid") {
2174
2193
  return { display: "inline-grid" };
2175
2194
  }
2176
- if (parsed.utility in STANDALONE) return STANDALONE[parsed.utility] ?? null;
2195
+ if (parsed.utility in getStandalone()) return getStandalone()[parsed.utility] ?? null;
2177
2196
  }
2178
2197
  const resolver = PLUGIN_RESOLVERS[parsed.utility] ?? RESOLVERS[parsed.utility];
2179
2198
  if (resolver) return resolver(parsed, theme);
@@ -2877,7 +2896,7 @@ function parseClass(className) {
2877
2896
  const bracketStart = remaining.lastIndexOf("-[");
2878
2897
  if (bracketStart > 0 && remaining.endsWith("]")) {
2879
2898
  const utility = remaining.slice(0, bracketStart);
2880
- const value = remaining.slice(bracketStart + 2, -1);
2899
+ const value = remaining.slice(bracketStart + 2, -1).replace(/_/g, " ");
2881
2900
  return { original: trimmed, modifiers, negative, important, utility, value, isArbitrary: true };
2882
2901
  }
2883
2902
  if (STANDALONE_UTILITIES.has(remaining)) {
@@ -2906,10 +2925,29 @@ function parseClass(className) {
2906
2925
  }
2907
2926
  return { original: trimmed, modifiers, negative, important, utility: remaining, value: "", isArbitrary: false };
2908
2927
  }
2928
+ function splitClassTokens(classString) {
2929
+ const tokens = [];
2930
+ let current = "";
2931
+ let depth = 0;
2932
+ for (let i = 0; i < classString.length; i++) {
2933
+ const ch = classString[i];
2934
+ if (ch === "[") depth++;
2935
+ else if (ch === "]") depth--;
2936
+ if (/\s/.test(ch) && depth === 0) {
2937
+ if (current) {
2938
+ tokens.push(current);
2939
+ current = "";
2940
+ }
2941
+ } else {
2942
+ current += ch;
2943
+ }
2944
+ }
2945
+ if (current) tokens.push(current);
2946
+ return tokens;
2947
+ }
2909
2948
  function parseClasses(classString) {
2910
2949
  const results = [];
2911
- for (const token of classString.split(/\s+/)) {
2912
- if (!token) continue;
2950
+ for (const token of splitClassTokens(classString)) {
2913
2951
  const parsed = parseClass(token);
2914
2952
  if (parsed) results.push(parsed);
2915
2953
  }
@@ -3347,6 +3385,7 @@ var customVariants = new Proxy(
3347
3385
  );
3348
3386
 
3349
3387
  // src/vite-plugin.ts
3388
+ setCSSGenMode(true);
3350
3389
  var KBACH_START = "/* kbach:start */";
3351
3390
  var KBACH_END = "/* kbach:end */";
3352
3391
  var GROUPS = [
@@ -3489,7 +3528,7 @@ function kbach(userConfig) {
3489
3528
  for (const dir of ["src", "app", "pages", "components", "views", "layouts"]) {
3490
3529
  scanDir((0, import_path.join)(root, dir), (code) => {
3491
3530
  for (const cls of extractClassStrings(code))
3492
- for (const token of cls.split(/\s+/).filter(Boolean))
3531
+ for (const token of splitClassTokens(cls))
3493
3532
  if (!tokenCSS.has(token)) {
3494
3533
  const css = generateClassCSS(token, cfg.theme, cfg.darkMode, screens);
3495
3534
  tokenCSS.set(token, css);