@kbach/react-native 1.0.0-beta.7 → 1.0.0-beta.9

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.
@@ -356,16 +356,51 @@ var PALETTE = {
356
356
  // src/theme.ts
357
357
  var defaultTheme = {
358
358
  colors: PALETTE,
359
+ // Real Tailwind's default spacing scale in full — every step is exactly
360
+ // `n * 4px`, including the fractional `.5` steps (`1.5` -> 6px, `2.5` ->
361
+ // 10px, `3.5` -> 14px) and the "px" literal (a bare 1px). Only the
362
+ // "usual stops", though — `jsEngine/shared.ts`'s `spacingPx` (and the
363
+ // native Rust dispatcher's own `spacing_px`) falls back to Tailwind v4's
364
+ // live `n * 4px` formula for any bare numeric step not listed here
365
+ // (`p-0.25`, `w-13`, ...), so this table names the common values and
366
+ // gives a theme override something to target, not the full resolvable
367
+ // set. Mirrors @kbach/react's theme.ts exactly.
359
368
  spacing: {
360
- // "0" is always a hardcoded zero in real Tailwind's own scale too,
361
- // regardless of the base spacing unit — needed for `p-0`/`m-0`/etc.
362
- // Mirrors the identical fix in @kbach/react's theme.ts.
363
369
  "0": 0,
370
+ "px": 1,
371
+ "0.5": 2,
364
372
  "1": 4,
373
+ "1.5": 6,
365
374
  "2": 8,
375
+ "2.5": 10,
376
+ "3": 12,
377
+ "3.5": 14,
366
378
  "4": 16,
379
+ "5": 20,
367
380
  "6": 24,
368
- "8": 32
381
+ "7": 28,
382
+ "8": 32,
383
+ "9": 36,
384
+ "10": 40,
385
+ "11": 44,
386
+ "12": 48,
387
+ "14": 56,
388
+ "16": 64,
389
+ "20": 80,
390
+ "24": 96,
391
+ "28": 112,
392
+ "32": 128,
393
+ "36": 144,
394
+ "40": 160,
395
+ "44": 176,
396
+ "48": 192,
397
+ "52": 208,
398
+ "56": 224,
399
+ "60": 240,
400
+ "64": 256,
401
+ "72": 288,
402
+ "80": 320,
403
+ "96": 384
369
404
  },
370
405
  screens: {
371
406
  sm: 640,
@@ -374,9 +409,26 @@ var defaultTheme = {
374
409
  xl: 1280,
375
410
  "2xl": 1536
376
411
  },
377
- darkMode: "attribute"
412
+ // Byte-for-byte the same three stacks
413
+ // packages/core-engine/src/resolvers/typography.rs's `font_family_value`
414
+ // falls back to. On native these three still effectively no-op (see
415
+ // `first_font_name`'s own doc comment for why a generic CSS keyword
416
+ // isn't a real loadable font) — only a caller-configured custom name
417
+ // changes native rendering; Expo Web uses the full stack as-is.
418
+ fontFamily: {
419
+ sans: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
420
+ serif: 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
421
+ mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
422
+ },
423
+ darkMode: "attribute",
424
+ // Empty by default, matching real Tailwind's own defaults.
425
+ container: {}
378
426
  };
427
+ var activeTheme = defaultTheme;
379
428
  var activeThemeJson = JSON.stringify(defaultTheme);
429
+ function getTheme() {
430
+ return activeTheme;
431
+ }
380
432
  function getThemeJson() {
381
433
  return activeThemeJson;
382
434
  }
@@ -404,11 +456,1199 @@ function getGlobalDarkMode() {
404
456
  return isDark;
405
457
  }
406
458
 
459
+ // src/jsEngine/parser.ts
460
+ var VALUE_PREFIXES = [
461
+ "bg-opacity-",
462
+ "text-opacity-",
463
+ "bg-blend-",
464
+ "text-shadow-",
465
+ "bg-",
466
+ "text-",
467
+ "border-x-",
468
+ "border-y-",
469
+ "border-t-",
470
+ "border-r-",
471
+ "border-b-",
472
+ "border-l-",
473
+ "border-",
474
+ "caret-",
475
+ "accent-",
476
+ "fill-",
477
+ "stroke-width-",
478
+ "stroke-",
479
+ "resize-",
480
+ "touch-",
481
+ "will-change-",
482
+ "scroll-mx-",
483
+ "scroll-my-",
484
+ "scroll-mt-",
485
+ "scroll-mr-",
486
+ "scroll-mb-",
487
+ "scroll-ml-",
488
+ "scroll-m-",
489
+ "scroll-px-",
490
+ "scroll-py-",
491
+ "scroll-pt-",
492
+ "scroll-pr-",
493
+ "scroll-pb-",
494
+ "scroll-pl-",
495
+ "scroll-p-",
496
+ "px-",
497
+ "py-",
498
+ "pt-",
499
+ "pr-",
500
+ "pb-",
501
+ "pl-",
502
+ "p-",
503
+ "mx-",
504
+ "my-",
505
+ "mt-",
506
+ "mr-",
507
+ "mb-",
508
+ "ml-",
509
+ "m-",
510
+ "gap-x-",
511
+ "gap-y-",
512
+ "gap-",
513
+ "min-w-",
514
+ "max-w-",
515
+ "w-",
516
+ "min-h-",
517
+ "max-h-",
518
+ "h-",
519
+ "size-",
520
+ "basis-",
521
+ "rounded-tl-",
522
+ "rounded-tr-",
523
+ "rounded-br-",
524
+ "rounded-bl-",
525
+ "rounded-t-",
526
+ "rounded-r-",
527
+ "rounded-b-",
528
+ "rounded-l-",
529
+ "rounded-",
530
+ "ring-offset-",
531
+ "ring-",
532
+ "outline-offset-",
533
+ "outline-",
534
+ "shadow-",
535
+ "opacity-",
536
+ "duration-",
537
+ "delay-",
538
+ "ease-",
539
+ "cursor-",
540
+ "mix-blend-",
541
+ "animate-",
542
+ "leading-",
543
+ "tracking-",
544
+ "font-",
545
+ "z-",
546
+ "inset-",
547
+ "top-",
548
+ "right-",
549
+ "bottom-",
550
+ "left-",
551
+ "divide-color-",
552
+ "space-x-",
553
+ "space-y-",
554
+ "flex-",
555
+ "grow-",
556
+ "shrink-",
557
+ "order-",
558
+ "grid-cols-",
559
+ "grid-rows-",
560
+ "grid-flow-",
561
+ "auto-cols-",
562
+ "auto-rows-",
563
+ "col-span-",
564
+ "col-start-",
565
+ "col-end-",
566
+ "col-",
567
+ "row-span-",
568
+ "row-start-",
569
+ "row-end-",
570
+ "row-",
571
+ "place-items-",
572
+ "place-content-",
573
+ "place-self-",
574
+ "justify-items-",
575
+ "justify-self-",
576
+ "scale-x-",
577
+ "scale-y-",
578
+ "scale-",
579
+ "rotate-",
580
+ "translate-x-",
581
+ "translate-y-",
582
+ "skew-x-",
583
+ "skew-y-",
584
+ "origin-",
585
+ "blur-",
586
+ "brightness-",
587
+ "contrast-",
588
+ "grayscale-",
589
+ "hue-rotate-",
590
+ "invert-",
591
+ "saturate-",
592
+ "sepia-",
593
+ "drop-shadow-",
594
+ "filter-",
595
+ "backdrop-blur-",
596
+ "backdrop-brightness-",
597
+ "backdrop-contrast-",
598
+ "backdrop-grayscale-",
599
+ "backdrop-hue-rotate-",
600
+ "backdrop-invert-",
601
+ "backdrop-opacity-",
602
+ "backdrop-saturate-",
603
+ "backdrop-sepia-",
604
+ "backdrop-filter-",
605
+ "decoration-",
606
+ "underline-offset-",
607
+ "indent-",
608
+ "from-",
609
+ "via-",
610
+ "to-"
611
+ ];
612
+ var ARBITRARY_PROPERTY_SENTINEL = "[arbitrary-property]";
613
+ function isSafeArbitraryValue(value) {
614
+ return !value.includes("{") && !value.includes("}") && !value.includes(";");
615
+ }
616
+ function splitRespectingBrackets(token) {
617
+ const parts = [];
618
+ let depth = 0;
619
+ let start = 0;
620
+ for (let i = 0; i < token.length; i++) {
621
+ const ch = token[i];
622
+ if (ch === "[") depth += 1;
623
+ else if (ch === "]") depth -= 1;
624
+ else if (ch === ":" && depth <= 0) {
625
+ parts.push(token.slice(start, i));
626
+ start = i + 1;
627
+ }
628
+ }
629
+ parts.push(token.slice(start));
630
+ return parts;
631
+ }
632
+ function parseClass(token) {
633
+ const parts = splitRespectingBrackets(token);
634
+ let base = parts.pop() ?? token;
635
+ const modifiers = parts;
636
+ const important = base.startsWith("!");
637
+ if (important) {
638
+ base = base.slice(1);
639
+ }
640
+ const negative = base.startsWith("-");
641
+ if (negative) {
642
+ base = base.slice(1);
643
+ }
644
+ if (base.length >= 2 && base.startsWith("[") && base.endsWith("]")) {
645
+ const raw = base.slice(1, -1);
646
+ const colonIdx = raw.indexOf(":");
647
+ if (colonIdx !== -1) {
648
+ const property = raw.slice(0, colonIdx);
649
+ const rawValue = raw.slice(colonIdx + 1);
650
+ if (property !== "" && rawValue !== "" && isSafeArbitraryValue(raw)) {
651
+ const value = rawValue.replace(/_/g, " ");
652
+ return {
653
+ modifiers,
654
+ utility: ARBITRARY_PROPERTY_SENTINEL,
655
+ value: `${property}:${value}`,
656
+ isArbitrary: true,
657
+ important,
658
+ negative,
659
+ original: token
660
+ };
661
+ }
662
+ }
663
+ }
664
+ for (const prefix of VALUE_PREFIXES) {
665
+ if (!base.startsWith(prefix)) continue;
666
+ const value = base.slice(prefix.length);
667
+ if (value === "") continue;
668
+ if (value.length >= 2 && value.startsWith("[") && value.endsWith("]")) {
669
+ const raw = value.slice(1, -1);
670
+ if (!isSafeArbitraryValue(raw)) {
671
+ continue;
672
+ }
673
+ const spaced = raw.replace(/_/g, " ");
674
+ return {
675
+ modifiers,
676
+ utility: prefix.slice(0, -1),
677
+ value: spaced,
678
+ isArbitrary: true,
679
+ important,
680
+ negative,
681
+ original: token
682
+ };
683
+ }
684
+ return {
685
+ modifiers,
686
+ utility: prefix.slice(0, -1),
687
+ value,
688
+ isArbitrary: false,
689
+ important,
690
+ negative,
691
+ original: token
692
+ };
693
+ }
694
+ return {
695
+ modifiers,
696
+ utility: base,
697
+ value: null,
698
+ isArbitrary: false,
699
+ important,
700
+ negative,
701
+ original: token
702
+ };
703
+ }
704
+
705
+ // src/jsEngine/shared.ts
706
+ function decl(property, value) {
707
+ return { property, value };
708
+ }
709
+ function spacingPx(theme, value) {
710
+ const fromTable = theme.spacing[value];
711
+ if (fromTable !== void 0) return fromTable;
712
+ const n = Number(value);
713
+ return Number.isFinite(n) && value.trim() !== "" ? n * 4 : void 0;
714
+ }
715
+ function resolveLength(theme, parsed) {
716
+ if (parsed.negative) return null;
717
+ const value = parsed.value;
718
+ if (value === null) return null;
719
+ if (parsed.isArbitrary) return value;
720
+ if (value === "full") return "100%";
721
+ if (value === "auto") return "auto";
722
+ const px = spacingPx(theme, value);
723
+ return px === void 0 ? null : `${px}px`;
724
+ }
725
+ function resolveNegatableLength(theme, parsed) {
726
+ if (!parsed.negative) return resolveLength(theme, parsed);
727
+ if (parsed.isArbitrary) return null;
728
+ const value = parsed.value;
729
+ if (value === null) return null;
730
+ const px = spacingPx(theme, value);
731
+ if (px === void 0) return null;
732
+ if (px === 0) return "0px";
733
+ return `-${px}px`;
734
+ }
735
+
736
+ // src/jsEngine/resolvers/layout.ts
737
+ function negateRaw(value, negative) {
738
+ return negative ? `-${value}` : value;
739
+ }
740
+ function resolve(parsed, theme) {
741
+ switch (parsed.utility) {
742
+ case "flex":
743
+ return parsed.value === null ? [decl("display", "flex")] : null;
744
+ case "grid":
745
+ return [decl("display", "grid")];
746
+ case "block":
747
+ return [decl("display", "block")];
748
+ case "inline-block":
749
+ return [decl("display", "inline-block")];
750
+ case "inline":
751
+ return [decl("display", "inline")];
752
+ case "inline-flex":
753
+ return [decl("display", "inline-flex")];
754
+ case "inline-grid":
755
+ return [decl("display", "inline-grid")];
756
+ case "contents":
757
+ return [decl("display", "contents")];
758
+ case "flow-root":
759
+ return [decl("display", "flow-root")];
760
+ case "hidden":
761
+ return [decl("display", "none")];
762
+ case "@container":
763
+ return [decl("container-type", "inline-size")];
764
+ case "items-center":
765
+ return [decl("align-items", "center")];
766
+ case "items-start":
767
+ return [decl("align-items", "flex-start")];
768
+ case "items-end":
769
+ return [decl("align-items", "flex-end")];
770
+ case "items-baseline":
771
+ return [decl("align-items", "baseline")];
772
+ case "items-stretch":
773
+ return [decl("align-items", "stretch")];
774
+ case "justify-center":
775
+ return [decl("justify-content", "center")];
776
+ case "justify-start":
777
+ return [decl("justify-content", "flex-start")];
778
+ case "justify-end":
779
+ return [decl("justify-content", "flex-end")];
780
+ case "justify-between":
781
+ return [decl("justify-content", "space-between")];
782
+ case "justify-around":
783
+ return [decl("justify-content", "space-around")];
784
+ case "justify-evenly":
785
+ return [decl("justify-content", "space-evenly")];
786
+ case "content-start":
787
+ return [decl("align-content", "flex-start")];
788
+ case "content-end":
789
+ return [decl("align-content", "flex-end")];
790
+ case "content-center":
791
+ return [decl("align-content", "center")];
792
+ case "content-between":
793
+ return [decl("align-content", "space-between")];
794
+ case "content-around":
795
+ return [decl("align-content", "space-around")];
796
+ case "content-evenly":
797
+ return [decl("align-content", "space-evenly")];
798
+ case "content-stretch":
799
+ return [decl("align-content", "stretch")];
800
+ case "self-auto":
801
+ return [decl("align-self", "auto")];
802
+ case "self-center":
803
+ return [decl("align-self", "center")];
804
+ case "self-start":
805
+ return [decl("align-self", "flex-start")];
806
+ case "self-end":
807
+ return [decl("align-self", "flex-end")];
808
+ case "self-stretch":
809
+ return [decl("align-self", "stretch")];
810
+ case "self-baseline":
811
+ return [decl("align-self", "baseline")];
812
+ case "overflow-hidden":
813
+ return [decl("overflow", "hidden")];
814
+ case "overflow-auto":
815
+ return [decl("overflow", "auto")];
816
+ case "overflow-scroll":
817
+ return [decl("overflow", "scroll")];
818
+ case "overflow-visible":
819
+ return [decl("overflow", "visible")];
820
+ case "static":
821
+ return [decl("position", "static")];
822
+ case "relative":
823
+ return [decl("position", "relative")];
824
+ case "absolute":
825
+ return [decl("position", "absolute")];
826
+ case "fixed":
827
+ return [decl("position", "fixed")];
828
+ case "sticky":
829
+ return [decl("position", "sticky")];
830
+ case "z":
831
+ return parsed.value === null ? null : [decl("z-index", negateRaw(parsed.value, parsed.negative))];
832
+ case "order":
833
+ return parsed.value === null ? null : [decl("order", negateRaw(parsed.value, parsed.negative))];
834
+ case "grow":
835
+ return [decl("flex-grow", parsed.value ?? "1")];
836
+ case "shrink":
837
+ return [decl("flex-shrink", parsed.value ?? "1")];
838
+ // top/right/bottom/left/inset support real Tailwind's negative-value
839
+ // convention ("-top-4") — see resolveNegatableLength's own doc comment.
840
+ case "top": {
841
+ const v = resolveNegatableLength(theme, parsed);
842
+ return v === null ? null : [decl("top", v)];
843
+ }
844
+ case "right": {
845
+ const v = resolveNegatableLength(theme, parsed);
846
+ return v === null ? null : [decl("right", v)];
847
+ }
848
+ case "bottom": {
849
+ const v = resolveNegatableLength(theme, parsed);
850
+ return v === null ? null : [decl("bottom", v)];
851
+ }
852
+ case "left": {
853
+ const v = resolveNegatableLength(theme, parsed);
854
+ return v === null ? null : [decl("left", v)];
855
+ }
856
+ case "inset": {
857
+ const v = resolveNegatableLength(theme, parsed);
858
+ return v === null ? null : [decl("inset", v)];
859
+ }
860
+ case "aspect-square":
861
+ return [decl("aspect-ratio", "1 / 1")];
862
+ case "aspect-video":
863
+ return [decl("aspect-ratio", "16 / 9")];
864
+ default:
865
+ return null;
866
+ }
867
+ }
868
+ function resolveFlex(parsed, web) {
869
+ if (parsed.utility !== "flex") return null;
870
+ const value = parsed.value;
871
+ if (value === null) return null;
872
+ if (parsed.isArbitrary) return [decl("flex", value)];
873
+ switch (value) {
874
+ case "row":
875
+ return [decl("flex-direction", "row")];
876
+ case "col":
877
+ return [decl("flex-direction", "column")];
878
+ case "row-reverse":
879
+ return [decl("flex-direction", "row-reverse")];
880
+ case "col-reverse":
881
+ return [decl("flex-direction", "column-reverse")];
882
+ case "wrap":
883
+ return [decl("flex-wrap", "wrap")];
884
+ case "wrap-reverse":
885
+ return [decl("flex-wrap", "wrap-reverse")];
886
+ case "nowrap":
887
+ return [decl("flex-wrap", "nowrap")];
888
+ case "1":
889
+ return [decl("flex", "1")];
890
+ case "auto":
891
+ return [decl("flex", web ? "auto" : "1")];
892
+ case "initial":
893
+ return [decl("flex", web ? "initial" : "1")];
894
+ case "none":
895
+ return [decl("flex", web ? "none" : "0")];
896
+ case "grow":
897
+ return [decl("flex-grow", "1")];
898
+ case "grow-0":
899
+ return [decl("flex-grow", "0")];
900
+ case "shrink":
901
+ return [decl("flex-shrink", "1")];
902
+ case "shrink-0":
903
+ return [decl("flex-shrink", "0")];
904
+ default:
905
+ return null;
906
+ }
907
+ }
908
+
909
+ // src/jsEngine/resolvers/spacing.ts
910
+ function namedSize(key) {
911
+ switch (key) {
912
+ case "sm":
913
+ return "24rem";
914
+ case "md":
915
+ return "28rem";
916
+ case "lg":
917
+ return "32rem";
918
+ case "xl":
919
+ return "36rem";
920
+ case "2xl":
921
+ return "42rem";
922
+ case "3xl":
923
+ return "48rem";
924
+ case "4xl":
925
+ return "56rem";
926
+ case "5xl":
927
+ return "64rem";
928
+ case "6xl":
929
+ return "72rem";
930
+ case "7xl":
931
+ return "80rem";
932
+ case "8xl":
933
+ return "88rem";
934
+ case "9xl":
935
+ return "96rem";
936
+ default:
937
+ return null;
938
+ }
939
+ }
940
+ function fractionPercent(value) {
941
+ const slashIdx = value.indexOf("/");
942
+ if (slashIdx === -1) return null;
943
+ const numStr = value.slice(0, slashIdx);
944
+ const denStr = value.slice(slashIdx + 1);
945
+ const num = Number(numStr);
946
+ const den = Number(denStr);
947
+ if (!Number.isFinite(num) || !Number.isFinite(den) || numStr.trim() === "" || denStr.trim() === "") return null;
948
+ if (den === 0) return null;
949
+ const pct = num / den * 100;
950
+ const formatted = pct.toFixed(6);
951
+ const trimmed = formatted.replace(/0+$/, "").replace(/\.$/, "");
952
+ return `${trimmed}%`;
953
+ }
954
+ function cssSizeKeyword(key) {
955
+ switch (key) {
956
+ case "min":
957
+ return "min-content";
958
+ case "max":
959
+ return "max-content";
960
+ case "fit":
961
+ return "fit-content";
962
+ default:
963
+ return null;
964
+ }
965
+ }
966
+ function resolveSize(theme, parsed) {
967
+ if (!parsed.isArbitrary && parsed.value !== null) {
968
+ const named = namedSize(parsed.value);
969
+ if (named !== null) return named;
970
+ const kw = cssSizeKeyword(parsed.value);
971
+ if (kw !== null) return kw;
972
+ const fraction = fractionPercent(parsed.value);
973
+ if (fraction !== null) return fraction;
974
+ }
975
+ return resolveLength(theme, parsed);
976
+ }
977
+ function resolve2(parsed, theme) {
978
+ const length = () => resolveLength(theme, parsed);
979
+ const size = () => resolveSize(theme, parsed);
980
+ const negatableLength = () => resolveNegatableLength(theme, parsed);
981
+ switch (parsed.utility) {
982
+ case "p": {
983
+ const v = length();
984
+ return v === null ? null : [decl("padding", v)];
985
+ }
986
+ case "px": {
987
+ const v = length();
988
+ return v === null ? null : [decl("padding-left", v), decl("padding-right", v)];
989
+ }
990
+ case "py": {
991
+ const v = length();
992
+ return v === null ? null : [decl("padding-top", v), decl("padding-bottom", v)];
993
+ }
994
+ case "pt": {
995
+ const v = length();
996
+ return v === null ? null : [decl("padding-top", v)];
997
+ }
998
+ case "pr": {
999
+ const v = length();
1000
+ return v === null ? null : [decl("padding-right", v)];
1001
+ }
1002
+ case "pb": {
1003
+ const v = length();
1004
+ return v === null ? null : [decl("padding-bottom", v)];
1005
+ }
1006
+ case "pl": {
1007
+ const v = length();
1008
+ return v === null ? null : [decl("padding-left", v)];
1009
+ }
1010
+ case "m": {
1011
+ const v = negatableLength();
1012
+ return v === null ? null : [decl("margin", v)];
1013
+ }
1014
+ case "mx": {
1015
+ const v = negatableLength();
1016
+ return v === null ? null : [decl("margin-left", v), decl("margin-right", v)];
1017
+ }
1018
+ case "my": {
1019
+ const v = negatableLength();
1020
+ return v === null ? null : [decl("margin-top", v), decl("margin-bottom", v)];
1021
+ }
1022
+ case "mt": {
1023
+ const v = negatableLength();
1024
+ return v === null ? null : [decl("margin-top", v)];
1025
+ }
1026
+ case "mr": {
1027
+ const v = negatableLength();
1028
+ return v === null ? null : [decl("margin-right", v)];
1029
+ }
1030
+ case "mb": {
1031
+ const v = negatableLength();
1032
+ return v === null ? null : [decl("margin-bottom", v)];
1033
+ }
1034
+ case "ml": {
1035
+ const v = negatableLength();
1036
+ return v === null ? null : [decl("margin-left", v)];
1037
+ }
1038
+ case "gap": {
1039
+ const v = length();
1040
+ return v === null ? null : [decl("gap", v)];
1041
+ }
1042
+ case "gap-x": {
1043
+ const v = length();
1044
+ return v === null ? null : [decl("column-gap", v)];
1045
+ }
1046
+ case "gap-y": {
1047
+ const v = length();
1048
+ return v === null ? null : [decl("row-gap", v)];
1049
+ }
1050
+ case "w": {
1051
+ const v = size();
1052
+ return v === null ? null : [decl("width", v)];
1053
+ }
1054
+ case "h": {
1055
+ const v = size();
1056
+ return v === null ? null : [decl("height", v)];
1057
+ }
1058
+ case "min-w": {
1059
+ const v = size();
1060
+ return v === null ? null : [decl("min-width", v)];
1061
+ }
1062
+ case "max-w": {
1063
+ const v = size();
1064
+ return v === null ? null : [decl("max-width", v)];
1065
+ }
1066
+ case "min-h": {
1067
+ const v = size();
1068
+ return v === null ? null : [decl("min-height", v)];
1069
+ }
1070
+ case "max-h": {
1071
+ const v = size();
1072
+ return v === null ? null : [decl("max-height", v)];
1073
+ }
1074
+ case "size": {
1075
+ const v = size();
1076
+ return v === null ? null : [decl("width", v), decl("height", v)];
1077
+ }
1078
+ case "basis": {
1079
+ const v = size();
1080
+ return v === null ? null : [decl("flex-basis", v)];
1081
+ }
1082
+ default:
1083
+ return null;
1084
+ }
1085
+ }
1086
+
1087
+ // src/jsEngine/resolvers/color.ts
1088
+ function lookupHex(theme, key) {
1089
+ const entry = theme.colors[key];
1090
+ return typeof entry === "string" ? entry : null;
1091
+ }
1092
+
1093
+ // src/jsEngine/resolvers/border.ts
1094
+ function radiusSize(key) {
1095
+ switch (key) {
1096
+ case "none":
1097
+ return "0px";
1098
+ case "sm":
1099
+ return "0.125rem";
1100
+ case "md":
1101
+ return "0.375rem";
1102
+ case "lg":
1103
+ return "0.5rem";
1104
+ case "xl":
1105
+ return "0.75rem";
1106
+ case "2xl":
1107
+ return "1rem";
1108
+ case "3xl":
1109
+ return "1.5rem";
1110
+ case "full":
1111
+ return "9999px";
1112
+ default:
1113
+ return null;
1114
+ }
1115
+ }
1116
+ function borderSideProperty(side) {
1117
+ switch (side) {
1118
+ case "t":
1119
+ return "border-top";
1120
+ case "r":
1121
+ return "border-right";
1122
+ case "b":
1123
+ return "border-bottom";
1124
+ case "l":
1125
+ return "border-left";
1126
+ default:
1127
+ return null;
1128
+ }
1129
+ }
1130
+ function borderValue(theme, parsed) {
1131
+ const value = parsed.value;
1132
+ if (value === null) return null;
1133
+ if (!parsed.isArbitrary) {
1134
+ const side = borderSideProperty(value);
1135
+ if (side !== null) {
1136
+ return [decl(`${side}-width`, "1px"), decl(`${side}-style`, "solid")];
1137
+ }
1138
+ if (value === "collapse") return [decl("border-collapse", "collapse")];
1139
+ if (value === "separate") return [decl("border-collapse", "separate")];
1140
+ }
1141
+ if (parsed.isArbitrary) {
1142
+ return [decl("border-width", value)];
1143
+ }
1144
+ if (Number.isFinite(Number(value)) && value.trim() !== "") {
1145
+ const v = resolveLength(theme, parsed);
1146
+ return v === null ? null : [decl("border-width", v)];
1147
+ }
1148
+ if (value === "solid" || value === "dashed" || value === "dotted" || value === "double" || value === "hidden" || value === "none") {
1149
+ return [decl("border-style", value)];
1150
+ }
1151
+ const hex = lookupHex(theme, value);
1152
+ return hex === null ? null : [decl("border-color", hex)];
1153
+ }
1154
+ function borderSideValue(theme, parsed, sideProperty) {
1155
+ const value = parsed.value;
1156
+ if (value === null) return null;
1157
+ if (parsed.isArbitrary) return [decl(`${sideProperty}-width`, value)];
1158
+ if (Number.isFinite(Number(value)) && value.trim() !== "") {
1159
+ const v = resolveLength(theme, parsed);
1160
+ return v === null ? null : [decl(`${sideProperty}-width`, v)];
1161
+ }
1162
+ if (value === "solid" || value === "dashed" || value === "dotted" || value === "double" || value === "hidden" || value === "none") {
1163
+ return [decl(`${sideProperty}-style`, value)];
1164
+ }
1165
+ const hex = lookupHex(theme, value);
1166
+ return hex === null ? null : [decl(`${sideProperty}-color`, hex)];
1167
+ }
1168
+ function borderAxisValue(theme, parsed, sideA, sideB) {
1169
+ const value = parsed.value;
1170
+ if (value === null) return null;
1171
+ if (parsed.isArbitrary) return [decl(`${sideA}-width`, value), decl(`${sideB}-width`, value)];
1172
+ if (Number.isFinite(Number(value)) && value.trim() !== "") {
1173
+ const v = resolveLength(theme, parsed);
1174
+ return v === null ? null : [decl(`${sideA}-width`, v), decl(`${sideB}-width`, v)];
1175
+ }
1176
+ if (value === "solid" || value === "dashed" || value === "dotted" || value === "double" || value === "hidden" || value === "none") {
1177
+ return [decl(`${sideA}-style`, value), decl(`${sideB}-style`, value)];
1178
+ }
1179
+ const hex = lookupHex(theme, value);
1180
+ return hex === null ? null : [decl(`${sideA}-color`, hex), decl(`${sideB}-color`, hex)];
1181
+ }
1182
+ function radiusProperties(side) {
1183
+ switch (side) {
1184
+ case "t":
1185
+ return ["border-top-left-radius", "border-top-right-radius"];
1186
+ case "r":
1187
+ return ["border-top-right-radius", "border-bottom-right-radius"];
1188
+ case "b":
1189
+ return ["border-bottom-right-radius", "border-bottom-left-radius"];
1190
+ case "l":
1191
+ return ["border-top-left-radius", "border-bottom-left-radius"];
1192
+ case "tl":
1193
+ return ["border-top-left-radius"];
1194
+ case "tr":
1195
+ return ["border-top-right-radius"];
1196
+ case "br":
1197
+ return ["border-bottom-right-radius"];
1198
+ case "bl":
1199
+ return ["border-bottom-left-radius"];
1200
+ default:
1201
+ return null;
1202
+ }
1203
+ }
1204
+ function resolveRadiusValue(theme, parsed) {
1205
+ if (!parsed.isArbitrary && parsed.value !== null) {
1206
+ const size = radiusSize(parsed.value);
1207
+ if (size !== null) return size;
1208
+ }
1209
+ return resolveLength(theme, parsed);
1210
+ }
1211
+ function resolveRadiusSide(theme, parsed, side) {
1212
+ const properties = radiusProperties(side);
1213
+ if (properties === null) return null;
1214
+ const value = resolveRadiusValue(theme, parsed);
1215
+ if (value === null) return null;
1216
+ return properties.map((p) => decl(p, value));
1217
+ }
1218
+ var OUTLINE_STYLES = ["solid", "dashed", "dotted", "double"];
1219
+ function outlineWidthValue(key) {
1220
+ switch (key) {
1221
+ case "0":
1222
+ return "0px";
1223
+ case "1":
1224
+ return "1px";
1225
+ case "2":
1226
+ return "2px";
1227
+ case "4":
1228
+ return "4px";
1229
+ case "8":
1230
+ return "8px";
1231
+ default:
1232
+ return null;
1233
+ }
1234
+ }
1235
+ function outlineValue(theme, parsed) {
1236
+ const value = parsed.value;
1237
+ if (value === null) return null;
1238
+ if (parsed.isArbitrary) return [decl("outline-width", value)];
1239
+ const w = outlineWidthValue(value);
1240
+ if (w !== null) return [decl("outline-width", w)];
1241
+ if (OUTLINE_STYLES.includes(value)) return [decl("outline-style", value)];
1242
+ const hex = lookupHex(theme, value);
1243
+ return hex === null ? null : [decl("outline-color", hex)];
1244
+ }
1245
+ function outlineOffsetValue(parsed) {
1246
+ const value = parsed.value;
1247
+ if (value === null) return null;
1248
+ if (parsed.isArbitrary) return [decl("outline-offset", value)];
1249
+ const w = outlineWidthValue(value);
1250
+ return w === null ? null : [decl("outline-offset", w)];
1251
+ }
1252
+ var RING_BOX_SHADOW = "var(--kb-ring-inset,) 0 0 0 var(--kb-ring-offset-width, 0px) var(--kb-ring-offset-color, #fff), var(--kb-ring-inset,) 0 0 0 calc(var(--kb-ring-width, 0px) + var(--kb-ring-offset-width, 0px)) var(--kb-ring-color, rgba(59,130,246,0.5))";
1253
+ function ringWidth(key) {
1254
+ switch (key) {
1255
+ case "0":
1256
+ return "0px";
1257
+ case "1":
1258
+ return "1px";
1259
+ case "2":
1260
+ return "2px";
1261
+ case "4":
1262
+ return "4px";
1263
+ case "8":
1264
+ return "8px";
1265
+ default:
1266
+ return null;
1267
+ }
1268
+ }
1269
+ function ringValue(theme, parsed) {
1270
+ const value = parsed.value;
1271
+ if (value === null) return null;
1272
+ if (value === "inset") {
1273
+ return [decl("--kb-ring-inset", "inset"), decl("box-shadow", RING_BOX_SHADOW)];
1274
+ }
1275
+ if (!parsed.isArbitrary) {
1276
+ const w = ringWidth(value);
1277
+ if (w !== null) return [decl("--kb-ring-width", w), decl("box-shadow", RING_BOX_SHADOW)];
1278
+ }
1279
+ const color = parsed.isArbitrary ? value : lookupHex(theme, value);
1280
+ if (color === null) return null;
1281
+ return [decl("--kb-ring-color", color), decl("box-shadow", RING_BOX_SHADOW)];
1282
+ }
1283
+ function ringOffsetValue(theme, parsed) {
1284
+ const value = parsed.value;
1285
+ if (value === null) return null;
1286
+ if (!parsed.isArbitrary) {
1287
+ const w = ringWidth(value);
1288
+ if (w !== null) return [decl("--kb-ring-offset-width", w), decl("box-shadow", RING_BOX_SHADOW)];
1289
+ }
1290
+ const color = parsed.isArbitrary ? value : lookupHex(theme, value);
1291
+ if (color === null) return null;
1292
+ return [decl("--kb-ring-offset-color", color), decl("box-shadow", RING_BOX_SHADOW)];
1293
+ }
1294
+ var RADIUS_SIDES = /* @__PURE__ */ new Set(["t", "r", "b", "l", "tl", "tr", "br", "bl"]);
1295
+ function resolve3(parsed, theme) {
1296
+ switch (parsed.utility) {
1297
+ case "border":
1298
+ if (parsed.value === null) return [decl("border-width", "1px"), decl("border-style", "solid")];
1299
+ return borderValue(theme, parsed);
1300
+ case "border-t":
1301
+ return borderSideValue(theme, parsed, "border-top");
1302
+ case "border-r":
1303
+ return borderSideValue(theme, parsed, "border-right");
1304
+ case "border-b":
1305
+ return borderSideValue(theme, parsed, "border-bottom");
1306
+ case "border-l":
1307
+ return borderSideValue(theme, parsed, "border-left");
1308
+ case "border-x":
1309
+ return borderAxisValue(theme, parsed, "border-left", "border-right");
1310
+ case "border-y":
1311
+ return borderAxisValue(theme, parsed, "border-top", "border-bottom");
1312
+ case "rounded": {
1313
+ if (parsed.value === null) return [decl("border-radius", "0.25rem")];
1314
+ const value = parsed.value;
1315
+ if (!parsed.isArbitrary) {
1316
+ const size = radiusSize(value);
1317
+ if (size !== null) return [decl("border-radius", size)];
1318
+ }
1319
+ const v = resolveLength(theme, parsed);
1320
+ return v === null ? null : [decl("border-radius", v)];
1321
+ }
1322
+ case "ring":
1323
+ if (parsed.value === null) return [decl("--kb-ring-width", "3px"), decl("box-shadow", RING_BOX_SHADOW)];
1324
+ return ringValue(theme, parsed);
1325
+ case "ring-offset":
1326
+ return ringOffsetValue(theme, parsed);
1327
+ case "outline":
1328
+ if (parsed.value === null) return [decl("outline-style", "solid")];
1329
+ if (parsed.value === "none") return [decl("outline", "none")];
1330
+ return outlineValue(theme, parsed);
1331
+ case "outline-offset":
1332
+ return outlineOffsetValue(parsed);
1333
+ default:
1334
+ if (parsed.utility.startsWith("rounded-") && RADIUS_SIDES.has(parsed.utility.slice("rounded-".length))) {
1335
+ return resolveRadiusSide(theme, parsed, parsed.utility.slice("rounded-".length));
1336
+ }
1337
+ return null;
1338
+ }
1339
+ }
1340
+
1341
+ // src/jsEngine/resolvers/typography.ts
1342
+ function textSize(key) {
1343
+ switch (key) {
1344
+ case "xs":
1345
+ return "0.75rem";
1346
+ case "sm":
1347
+ return "0.875rem";
1348
+ case "base":
1349
+ return "1rem";
1350
+ case "lg":
1351
+ return "1.125rem";
1352
+ case "xl":
1353
+ return "1.25rem";
1354
+ case "2xl":
1355
+ return "1.5rem";
1356
+ case "3xl":
1357
+ return "1.875rem";
1358
+ case "4xl":
1359
+ return "2.25rem";
1360
+ default:
1361
+ return null;
1362
+ }
1363
+ }
1364
+ function lineHeightSize(key) {
1365
+ switch (key) {
1366
+ case "3":
1367
+ return "0.75rem";
1368
+ case "4":
1369
+ return "1rem";
1370
+ case "5":
1371
+ return "1.25rem";
1372
+ case "6":
1373
+ return "1.5rem";
1374
+ case "7":
1375
+ return "1.75rem";
1376
+ case "8":
1377
+ return "2rem";
1378
+ case "9":
1379
+ return "2.25rem";
1380
+ case "10":
1381
+ return "2.5rem";
1382
+ default:
1383
+ return null;
1384
+ }
1385
+ }
1386
+ function textAlign(key) {
1387
+ switch (key) {
1388
+ case "left":
1389
+ return "left";
1390
+ case "center":
1391
+ return "center";
1392
+ case "right":
1393
+ return "right";
1394
+ case "justify":
1395
+ return "justify";
1396
+ default:
1397
+ return null;
1398
+ }
1399
+ }
1400
+ function fontWeight(key) {
1401
+ switch (key) {
1402
+ case "thin":
1403
+ return "100";
1404
+ case "normal":
1405
+ return "400";
1406
+ case "medium":
1407
+ return "500";
1408
+ case "semibold":
1409
+ return "600";
1410
+ case "bold":
1411
+ return "700";
1412
+ case "extrabold":
1413
+ return "800";
1414
+ default:
1415
+ return null;
1416
+ }
1417
+ }
1418
+
1419
+ // src/jsEngine/resolvers/effects.ts
1420
+ function nativeShadowValue(key) {
1421
+ switch (key) {
1422
+ case "sm":
1423
+ return { offsetY: 1, radius: 2, opacity: 0.05, elevation: 1 };
1424
+ case "DEFAULT":
1425
+ return { offsetY: 1, radius: 3, opacity: 0.1, elevation: 2 };
1426
+ case "md":
1427
+ return { offsetY: 4, radius: 6, opacity: 0.1, elevation: 4 };
1428
+ case "lg":
1429
+ return { offsetY: 10, radius: 15, opacity: 0.1, elevation: 8 };
1430
+ case "xl":
1431
+ return { offsetY: 20, radius: 25, opacity: 0.1, elevation: 12 };
1432
+ case "2xl":
1433
+ return { offsetY: 25, radius: 50, opacity: 0.25, elevation: 16 };
1434
+ case "none":
1435
+ return { offsetY: 0, radius: 0, opacity: 0, elevation: 0 };
1436
+ default:
1437
+ return null;
1438
+ }
1439
+ }
1440
+ function nativeShadowDeclarations(parsed) {
1441
+ if (parsed.utility !== "shadow" || parsed.isArbitrary) return null;
1442
+ const key = parsed.value ?? "DEFAULT";
1443
+ const s = nativeShadowValue(key);
1444
+ if (s === null) return null;
1445
+ return [
1446
+ decl("shadow-color", "#000000"),
1447
+ decl("shadow-offset-x", "0"),
1448
+ decl("shadow-offset-y", String(s.offsetY)),
1449
+ decl("shadow-opacity", String(s.opacity)),
1450
+ decl("shadow-radius", String(s.radius)),
1451
+ decl("elevation", String(s.elevation))
1452
+ ];
1453
+ }
1454
+
1455
+ // src/jsEngine/resolveUtilityNative.ts
1456
+ function resolveTypographyNative(parsed) {
1457
+ switch (parsed.utility) {
1458
+ case "font": {
1459
+ if (parsed.value === null) return null;
1460
+ const w = fontWeight(parsed.value);
1461
+ return w === null ? null : [decl("font-weight", w)];
1462
+ }
1463
+ case "uppercase":
1464
+ return [decl("text-transform", "uppercase")];
1465
+ case "lowercase":
1466
+ return [decl("text-transform", "lowercase")];
1467
+ case "capitalize":
1468
+ return [decl("text-transform", "capitalize")];
1469
+ case "underline":
1470
+ return [decl("text-decoration-line", "underline")];
1471
+ case "line-through":
1472
+ return [decl("text-decoration-line", "line-through")];
1473
+ case "no-underline":
1474
+ return [decl("text-decoration-line", "none")];
1475
+ case "italic":
1476
+ return [decl("font-style", "italic")];
1477
+ case "not-italic":
1478
+ return [decl("font-style", "normal")];
1479
+ default:
1480
+ return null;
1481
+ }
1482
+ }
1483
+ function resolveLeadingTrackingNative(parsed) {
1484
+ const value = parsed.value;
1485
+ if (value === null) return null;
1486
+ if (parsed.utility === "leading") {
1487
+ if (parsed.isArbitrary) return [decl("line-height", value)];
1488
+ const v = lineHeightSize(value);
1489
+ return v === null ? null : [decl("line-height", v)];
1490
+ }
1491
+ if (parsed.utility === "tracking" && parsed.isArbitrary) {
1492
+ return [decl("letter-spacing", value)];
1493
+ }
1494
+ return null;
1495
+ }
1496
+ function nativeHexColor(parsed, theme) {
1497
+ const value = parsed.value;
1498
+ if (value === null) return null;
1499
+ return parsed.isArbitrary ? value : lookupHex(theme, value);
1500
+ }
1501
+ function resolveTextNative(parsed, theme) {
1502
+ if (!parsed.isArbitrary && parsed.value !== null) {
1503
+ const size = textSize(parsed.value);
1504
+ if (size !== null) return [decl("font-size", size)];
1505
+ const align = textAlign(parsed.value);
1506
+ if (align !== null) return [decl("text-align", align)];
1507
+ }
1508
+ const hex = nativeHexColor(parsed, theme);
1509
+ return hex === null ? null : [decl("color", hex)];
1510
+ }
1511
+ function resolveColorNative(parsed, theme) {
1512
+ switch (parsed.utility) {
1513
+ case "bg": {
1514
+ const hex = nativeHexColor(parsed, theme);
1515
+ return hex === null ? null : [decl("background-color", hex)];
1516
+ }
1517
+ case "text":
1518
+ return resolveTextNative(parsed, theme);
1519
+ default:
1520
+ return null;
1521
+ }
1522
+ }
1523
+ function resolveUtilityNative(parsed, theme) {
1524
+ return resolveFlex(parsed, false) ?? resolve(parsed, theme) ?? resolve2(parsed, theme) ?? resolve3(parsed, theme) ?? resolveColorNative(parsed, theme) ?? resolveLeadingTrackingNative(parsed) ?? resolveTypographyNative(parsed) ?? nativeShadowDeclarations(parsed);
1525
+ }
1526
+
1527
+ // src/jsEngine/resolveStyle.ts
1528
+ var RESPONSIVE_BREAKPOINTS = /* @__PURE__ */ new Set(["sm", "md", "lg", "xl", "2xl"]);
1529
+ function nativeModifierState(modifier, theme, colorScheme, pressed, width) {
1530
+ if (modifier === "dark") return colorScheme === "dark";
1531
+ if (modifier === "active") return pressed;
1532
+ if (RESPONSIVE_BREAKPOINTS.has(modifier)) {
1533
+ const minWidth = theme.screens[modifier];
1534
+ if (minWidth === void 0) return null;
1535
+ return width >= minWidth;
1536
+ }
1537
+ return null;
1538
+ }
1539
+ function kebabToCamel(s) {
1540
+ return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
1541
+ }
1542
+ var NUMERIC_LENGTH_PROPS = /* @__PURE__ */ new Set([
1543
+ "padding",
1544
+ "padding-top",
1545
+ "padding-right",
1546
+ "padding-bottom",
1547
+ "padding-left",
1548
+ "margin",
1549
+ "margin-top",
1550
+ "margin-right",
1551
+ "margin-bottom",
1552
+ "margin-left",
1553
+ "gap",
1554
+ "column-gap",
1555
+ "row-gap",
1556
+ "width",
1557
+ "height",
1558
+ "min-width",
1559
+ "max-width",
1560
+ "min-height",
1561
+ "max-height",
1562
+ "top",
1563
+ "right",
1564
+ "bottom",
1565
+ "left",
1566
+ "inset",
1567
+ "border-radius",
1568
+ "border-width",
1569
+ "font-size",
1570
+ "z-index",
1571
+ "line-height",
1572
+ "letter-spacing",
1573
+ "flex",
1574
+ "flex-grow",
1575
+ "flex-shrink",
1576
+ "order",
1577
+ "flex-basis",
1578
+ "shadow-opacity",
1579
+ "shadow-radius",
1580
+ "elevation",
1581
+ // Per-side border width + per-corner radius — see resolvers/border.ts's
1582
+ // new borderSideValue/borderAxisValue/resolveRadiusSide additions; RN's
1583
+ // style system wants plain numbers for these exactly like the generic
1584
+ // "border-width"/"border-radius" forms above.
1585
+ "border-top-width",
1586
+ "border-right-width",
1587
+ "border-bottom-width",
1588
+ "border-left-width",
1589
+ "border-top-left-radius",
1590
+ "border-top-right-radius",
1591
+ "border-bottom-right-radius",
1592
+ "border-bottom-left-radius",
1593
+ "outline-width",
1594
+ "outline-offset"
1595
+ ]);
1596
+ function rnStyleValue(property, value) {
1597
+ if (NUMERIC_LENGTH_PROPS.has(property)) {
1598
+ let px = null;
1599
+ if (value.endsWith("px")) {
1600
+ const n = Number(value.slice(0, -2));
1601
+ px = Number.isFinite(n) ? n : null;
1602
+ } else if (value.endsWith("rem")) {
1603
+ const n = Number(value.slice(0, -3));
1604
+ px = Number.isFinite(n) ? n * 16 : null;
1605
+ } else {
1606
+ const n = Number(value);
1607
+ px = value.trim() !== "" && Number.isFinite(n) ? n : null;
1608
+ }
1609
+ if (px !== null) return px;
1610
+ }
1611
+ return value;
1612
+ }
1613
+ function resolveStyleJs(classString, theme, colorScheme, pressed, width) {
1614
+ const style = {};
1615
+ let shadowOffset = null;
1616
+ for (const token of classString.split(/\s+/).filter(Boolean)) {
1617
+ const parsed = parseClass(token);
1618
+ const allModifiersHold = parsed.modifiers.every(
1619
+ (m) => nativeModifierState(m, theme, colorScheme, pressed, width) === true
1620
+ );
1621
+ if (!allModifiersHold) continue;
1622
+ const decls = resolveUtilityNative(parsed, theme);
1623
+ if (decls === null) continue;
1624
+ for (const d of decls) {
1625
+ if (d.property.startsWith("__")) {
1626
+ continue;
1627
+ }
1628
+ if (d.property === "shadow-offset-x" || d.property === "shadow-offset-y") {
1629
+ const n = Number(d.value);
1630
+ if (!Number.isFinite(n)) continue;
1631
+ if (shadowOffset === null) shadowOffset = {};
1632
+ shadowOffset[d.property === "shadow-offset-x" ? "width" : "height"] = n;
1633
+ continue;
1634
+ }
1635
+ style[kebabToCamel(d.property)] = rnStyleValue(d.property, d.value);
1636
+ }
1637
+ }
1638
+ if (shadowOffset !== null) {
1639
+ style.shadowOffset = { width: shadowOffset.width ?? 0, height: shadowOffset.height ?? 0 };
1640
+ }
1641
+ return style;
1642
+ }
1643
+
407
1644
  // src/nativeBridge.ts
408
1645
  function resolveStyle(classString, pressed = false) {
409
- const KbachModule = import_react_native3.TurboModuleRegistry.getEnforcing("KbachModule");
410
1646
  const colorScheme = getGlobalDarkMode() ? "dark" : "light";
411
1647
  const width = import_react_native3.Dimensions.get("window").width;
1648
+ const KbachModule = import_react_native3.TurboModuleRegistry.get("KbachModule");
1649
+ if (!KbachModule) {
1650
+ return resolveStyleJs(classString, getTheme(), colorScheme, pressed, width);
1651
+ }
412
1652
  const json = KbachModule.resolveStyle(classString, getThemeJson(), colorScheme, pressed, width);
413
1653
  return JSON.parse(json);
414
1654
  }