@marktiderman/genesis-ui-native 3.10.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +69 -0
  2. package/dist/{chunk-ZUR4PK77.js → chunk-47CDRP43.js} +45 -166
  3. package/dist/chunk-47CDRP43.js.map +1 -0
  4. package/dist/{chunk-SG7LYX7Z.js → chunk-BQYT6TH2.js} +14 -6
  5. package/dist/chunk-BQYT6TH2.js.map +1 -0
  6. package/dist/{chunk-EAHK7D7N.js → chunk-C2ARUGT7.js} +146 -42
  7. package/dist/chunk-C2ARUGT7.js.map +1 -0
  8. package/dist/{chunk-VEWSY4TZ.js → chunk-D4UU6KIF.js} +236 -21
  9. package/dist/chunk-D4UU6KIF.js.map +1 -0
  10. package/dist/{chunk-GGH3ZQNO.js → chunk-TUDJDIGC.js} +4 -4
  11. package/dist/{chunk-GGH3ZQNO.js.map → chunk-TUDJDIGC.js.map} +1 -1
  12. package/dist/{chunk-PMS2V46D.js → chunk-VHUUOH46.js} +2 -2
  13. package/dist/{chunk-PMS2V46D.js.map → chunk-VHUUOH46.js.map} +1 -1
  14. package/dist/{chunk-IWWXERKQ.js → chunk-X5CPLUPZ.js} +1236 -136
  15. package/dist/chunk-X5CPLUPZ.js.map +1 -0
  16. package/dist/components/index.d.ts +510 -25
  17. package/dist/components/index.js +5 -5
  18. package/dist/data/index.d.ts +176 -34
  19. package/dist/data/index.js +1312 -985
  20. package/dist/data/index.js.map +1 -1
  21. package/dist/hooks/index.d.ts +2 -2
  22. package/dist/hooks/index.js +1 -1
  23. package/dist/icons/lucide.d.ts +1 -1
  24. package/dist/index.d.ts +6 -3
  25. package/dist/index.js +7 -7
  26. package/dist/layouts/index.d.ts +79 -6
  27. package/dist/layouts/index.js +5 -5
  28. package/dist/{native-modules-Bkm1jHO-.d.ts → native-modules-6JnyeGR-.d.ts} +55 -1
  29. package/package.json +70 -4
  30. package/src/components/__tests__/combobox.test.tsx +20 -0
  31. package/src/components/__tests__/number-input.test.tsx +112 -1
  32. package/src/components/__tests__/parity-controls.test.tsx +366 -0
  33. package/src/components/__tests__/parity-display.test.tsx +295 -0
  34. package/src/components/__tests__/twin-props.test.tsx +114 -0
  35. package/src/components/badge.tsx +3 -0
  36. package/src/components/button-group.tsx +50 -0
  37. package/src/components/calendar.tsx +183 -0
  38. package/src/components/carousel.tsx +175 -0
  39. package/src/components/chart.tsx +268 -0
  40. package/src/components/chip-group.tsx +34 -14
  41. package/src/components/choice-card.tsx +56 -19
  42. package/src/components/combobox.tsx +6 -5
  43. package/src/components/empty-state.tsx +40 -0
  44. package/src/components/flatten-children.ts +13 -0
  45. package/src/components/index.ts +49 -1
  46. package/src/components/inline-alert.tsx +3 -1
  47. package/src/components/input-group.tsx +99 -0
  48. package/src/components/input-otp.tsx +124 -0
  49. package/src/components/input.tsx +40 -12
  50. package/src/components/list-item.tsx +20 -4
  51. package/src/components/number-input.tsx +45 -15
  52. package/src/components/radio-group.tsx +5 -0
  53. package/src/components/resource.tsx +227 -0
  54. package/src/components/settings-row.tsx +194 -0
  55. package/src/components/slider.tsx +3 -9
  56. package/src/components/sortable-list.tsx +287 -0
  57. package/src/components/stat-card.tsx +106 -0
  58. package/src/components/stepper.tsx +4 -2
  59. package/src/components/widget-tile.tsx +66 -0
  60. package/src/components/workspace-switcher.tsx +217 -0
  61. package/src/data/NativeCustomView.tsx +117 -0
  62. package/src/data/NativeFormFields.tsx +312 -0
  63. package/src/data/NativeRecordPeek.tsx +130 -0
  64. package/src/data/NativeResourceFormField.tsx +32 -0
  65. package/src/data/__tests__/parity-data.test.tsx +350 -0
  66. package/src/data/index.ts +13 -0
  67. package/src/data/resource-view/NativeResourceView.tsx +17 -2
  68. package/src/data/resource-view/__tests__/native-resource-gallery.test.tsx +8 -0
  69. package/src/data/resource-view/index.ts +1 -0
  70. package/src/data/resource-view/mapping.ts +4 -4
  71. package/src/layouts/__tests__/keyboard-scroll.test.tsx +58 -2
  72. package/src/layouts/__tests__/notifications-page.test.tsx +12 -0
  73. package/src/layouts/index.ts +13 -0
  74. package/src/layouts/keyboard.tsx +22 -2
  75. package/src/layouts/notifications-page.tsx +13 -35
  76. package/src/layouts/pages.tsx +262 -0
  77. package/src/native-modules.tsx +37 -0
  78. package/dist/chunk-EAHK7D7N.js.map +0 -1
  79. package/dist/chunk-IWWXERKQ.js.map +0 -1
  80. package/dist/chunk-SG7LYX7Z.js.map +0 -1
  81. package/dist/chunk-VEWSY4TZ.js.map +0 -1
  82. package/dist/chunk-ZUR4PK77.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { usePressFeedback, useThemeRoles, useGenesisModules, useMotion, useHaptics } from './chunk-PMS2V46D.js';
1
+ import { usePressFeedback, useThemeRoles, useGenesisModules, useMotion, useReducedMotion, useHaptics } from './chunk-VHUUOH46.js';
2
2
  import { cn } from './chunk-OHZD7KRO.js';
3
3
  import { cva } from 'class-variance-authority';
4
- import { Text, Pressable, Animated, View, ActivityIndicator, ScrollView, Dimensions, Platform, Modal, KeyboardAvoidingView, RefreshControl, TextInput, Easing, AccessibilityInfo } from 'react-native';
4
+ import { Text, Pressable, Animated, View, ActivityIndicator, ScrollView, Dimensions, Platform, Modal, KeyboardAvoidingView, RefreshControl, TextInput, Easing, Image, AccessibilityInfo } from 'react-native';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { useOptionalTheme, brandGradientCss } from '@marktiderman/genesis-design-system';
7
7
  import { createContext, useState, useEffect, useContext, useRef, useCallback } from 'react';
@@ -440,6 +440,141 @@ function NativeEmptyState({
440
440
  }
441
441
  );
442
442
  }
443
+ function NativeNoFeaturesFound({ onCreate, testID = "no-features-found" }) {
444
+ return /* @__PURE__ */ jsx(
445
+ NativeEmptyState,
446
+ {
447
+ testID,
448
+ title: "No features found",
449
+ body: "Start building your product roadmap by creating your first epic.",
450
+ primaryAction: onCreate ? /* @__PURE__ */ jsx(NativeButton, { onPress: onCreate, testID: `${testID}-create`, children: "Create Epic" }) : void 0
451
+ }
452
+ );
453
+ }
454
+ function NativeNoFeedbackFound({ testID = "no-feedback-found" }) {
455
+ return /* @__PURE__ */ jsx(NativeEmptyState, { testID, title: "No feedback yet", body: "Feedback from users will appear here as they use the app." });
456
+ }
457
+ function NativeNoSearchResults({ query, onClear, testID = "no-search-results" }) {
458
+ return /* @__PURE__ */ jsx(
459
+ NativeEmptyState,
460
+ {
461
+ testID,
462
+ variant: "no-results",
463
+ title: "No results found",
464
+ body: query ? `No results found for "${query}". Try a different search term.` : "No results match your current filters.",
465
+ primaryAction: onClear ? /* @__PURE__ */ jsx(NativeButton, { variant: "ghost", onPress: onClear, testID: `${testID}-clear`, children: "Clear search" }) : void 0
466
+ }
467
+ );
468
+ }
469
+ var variantClasses = {
470
+ info: "bg-secondary border-border",
471
+ success: "bg-primary/10 border-primary/30",
472
+ warning: "bg-warning/10 border-warning/30",
473
+ destructive: "bg-destructive/10 border-destructive/30"
474
+ };
475
+ var titleClasses = {
476
+ info: "text-foreground",
477
+ success: "text-primary-text",
478
+ // The warning token is an amber that reads at about 2:1 on the tint, under the 4.5:1 text
479
+ // needs: the tint and border carry the warning, as on the web's InlineAlert.
480
+ warning: "text-foreground",
481
+ destructive: "text-destructive"
482
+ };
483
+ function AlertExtras({ children, actions, testID }) {
484
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
485
+ children ? /* @__PURE__ */ jsx(View, { testID: testID ? `${testID}-content` : void 0, className: "mt-2", children }) : null,
486
+ actions ? /* @__PURE__ */ jsx(View, { testID: testID ? `${testID}-actions` : void 0, className: "mt-3 flex-row flex-wrap gap-2", children: actions }) : null
487
+ ] });
488
+ }
489
+ function NativeInlineAlert({
490
+ variant = "info",
491
+ title,
492
+ description,
493
+ icon,
494
+ onDismiss,
495
+ children,
496
+ actions,
497
+ className,
498
+ testID
499
+ }) {
500
+ return /* @__PURE__ */ jsxs(
501
+ View,
502
+ {
503
+ testID: testID ?? `inline-alert-${variant}`,
504
+ accessibilityRole: "alert",
505
+ className: cn(
506
+ "flex-row gap-3 rounded-md border p-3",
507
+ variantClasses[variant],
508
+ className
509
+ ),
510
+ children: [
511
+ icon ? /* @__PURE__ */ jsx(View, { className: "pt-0.5", children: icon }) : null,
512
+ /* @__PURE__ */ jsxs(View, { className: "flex-1", children: [
513
+ title ? /* @__PURE__ */ jsx(Text, { className: cn("text-sm font-semibold", titleClasses[variant]), children: title }) : null,
514
+ description ? /* @__PURE__ */ jsx(Text, { className: "mt-0.5 text-sm text-foreground/80", children: description }) : null,
515
+ /* @__PURE__ */ jsx(AlertExtras, { testID, actions, children })
516
+ ] }),
517
+ onDismiss ? /* @__PURE__ */ jsx(
518
+ Pressable,
519
+ {
520
+ testID: testID ? `${testID}-dismiss` : void 0,
521
+ accessibilityRole: "button",
522
+ accessibilityLabel: "Dismiss",
523
+ onPress: onDismiss,
524
+ hitSlop: 8,
525
+ className: "min-h-[24px] min-w-[24px] items-center justify-center",
526
+ children: /* @__PURE__ */ jsx(Text, { className: "text-base text-muted-foreground", children: "\u2715" })
527
+ }
528
+ ) : null
529
+ ]
530
+ }
531
+ );
532
+ }
533
+ function NativeBanner({
534
+ variant = "info",
535
+ title,
536
+ description,
537
+ icon,
538
+ onDismiss,
539
+ children,
540
+ actions,
541
+ className,
542
+ testID
543
+ }) {
544
+ return /* @__PURE__ */ jsxs(
545
+ View,
546
+ {
547
+ testID: testID ?? `banner-${variant}`,
548
+ accessibilityRole: "alert",
549
+ accessibilityLiveRegion: "polite",
550
+ className: cn(
551
+ "flex-row items-start gap-3 border-b px-4 py-3",
552
+ variantClasses[variant],
553
+ className
554
+ ),
555
+ children: [
556
+ icon ? /* @__PURE__ */ jsx(View, { className: "pt-0.5", children: icon }) : null,
557
+ /* @__PURE__ */ jsxs(View, { className: "flex-1", children: [
558
+ title ? /* @__PURE__ */ jsx(Text, { className: cn("text-sm font-semibold", titleClasses[variant]), children: title }) : null,
559
+ description ? /* @__PURE__ */ jsx(Text, { className: "mt-0.5 text-sm text-foreground/80", children: description }) : null,
560
+ /* @__PURE__ */ jsx(AlertExtras, { testID, actions, children })
561
+ ] }),
562
+ onDismiss ? /* @__PURE__ */ jsx(
563
+ Pressable,
564
+ {
565
+ testID: testID ? `${testID}-dismiss` : void 0,
566
+ accessibilityRole: "button",
567
+ accessibilityLabel: "Dismiss",
568
+ onPress: onDismiss,
569
+ hitSlop: 8,
570
+ className: "min-h-[24px] min-w-[24px] items-center justify-center",
571
+ children: /* @__PURE__ */ jsx(Text, { className: "text-base text-muted-foreground", children: "\u2715" })
572
+ }
573
+ ) : null
574
+ ]
575
+ }
576
+ );
577
+ }
443
578
 
444
579
  // src/icon-names.ts
445
580
  var SF_SYMBOLS = {
@@ -544,6 +679,9 @@ function NativeListItem({
544
679
  showChevron,
545
680
  onPress,
546
681
  disabled,
682
+ accessibilityRole = "button",
683
+ accessibilityState,
684
+ accessibilityLabel,
547
685
  className,
548
686
  testID
549
687
  }) {
@@ -568,9 +706,9 @@ function NativeListItem({
568
706
  Pressable,
569
707
  {
570
708
  testID: testID ?? "native-list-item",
571
- accessibilityRole: "button",
572
- accessibilityLabel: subtitle ? `${title}, ${subtitle}` : title,
573
- accessibilityState: { disabled },
709
+ accessibilityRole,
710
+ accessibilityLabel: accessibilityLabel ?? (subtitle ? `${title}, ${subtitle}` : title),
711
+ accessibilityState: { disabled, ...accessibilityState },
574
712
  disabled,
575
713
  onPress,
576
714
  className: cn(
@@ -586,7 +724,7 @@ function NativeListItem({
586
724
  View,
587
725
  {
588
726
  testID: testID ?? "native-list-item",
589
- accessibilityLabel: subtitle ? `${title}, ${subtitle}` : title,
727
+ accessibilityLabel: accessibilityLabel ?? (subtitle ? `${title}, ${subtitle}` : title),
590
728
  className: cn(
591
729
  "min-h-[44px] flex-row items-center bg-background px-4 py-3",
592
730
  className
@@ -652,7 +790,9 @@ var badgeVariants = cva(
652
790
  success: "border-transparent bg-success/15",
653
791
  warning: "border-transparent bg-warning/15",
654
792
  info: "border-transparent bg-info/15",
655
- muted: "border-transparent bg-muted"
793
+ muted: "border-transparent bg-muted",
794
+ // The tinted red (StatusBadge's offTrack / blocked, a "danger" chip); `destructive` is the solid fill.
795
+ danger: "border-transparent bg-destructive/15 dark:bg-destructive/20"
656
796
  }
657
797
  },
658
798
  defaultVariants: {
@@ -680,7 +820,8 @@ var badgeTextVariants = cva("text-xs font-medium", {
680
820
  success: "text-emerald-700 dark:text-emerald-300",
681
821
  warning: "text-amber-800 dark:text-amber-200",
682
822
  info: "text-blue-700 dark:text-blue-300",
683
- muted: "text-muted-foreground"
823
+ muted: "text-muted-foreground",
824
+ danger: "text-red-700 dark:text-red-300"
684
825
  }
685
826
  },
686
827
  defaultVariants: {
@@ -709,25 +850,44 @@ function NativeInput({
709
850
  error,
710
851
  editable = true,
711
852
  placeholderTextColor,
853
+ leading,
854
+ trailing,
712
855
  ...props
713
856
  }) {
857
+ const grouped = leading != null || trailing != null;
858
+ const input = /* @__PURE__ */ jsx(
859
+ TextInput,
860
+ {
861
+ className: cn(
862
+ "h-10 rounded-md border border-input bg-background px-3 text-base text-foreground",
863
+ !editable && !grouped && "opacity-50",
864
+ error && "border-destructive",
865
+ grouped && "h-full min-w-0 flex-1 border-0 bg-transparent",
866
+ inputClassName
867
+ ),
868
+ editable,
869
+ placeholderTextColor: placeholderTextColor ?? nativeColors.neutral[400],
870
+ accessibilityLabel: label,
871
+ ...props
872
+ }
873
+ );
714
874
  return /* @__PURE__ */ jsxs(View, { className: cn("gap-1.5", className), children: [
715
875
  label ? /* @__PURE__ */ jsx(Text, { className: "text-sm font-medium text-foreground", children: label }) : null,
716
- /* @__PURE__ */ jsx(
717
- TextInput,
876
+ grouped ? /* @__PURE__ */ jsxs(
877
+ View,
718
878
  {
719
879
  className: cn(
720
- "h-10 rounded-md border border-input bg-background px-3 text-base text-foreground",
880
+ "h-10 flex-row items-center rounded-md border border-input bg-background",
721
881
  !editable && "opacity-50",
722
- error && "border-destructive",
723
- inputClassName
882
+ error && "border-destructive"
724
883
  ),
725
- editable,
726
- placeholderTextColor: placeholderTextColor ?? nativeColors.neutral[400],
727
- accessibilityLabel: label,
728
- ...props
884
+ children: [
885
+ leading != null ? /* @__PURE__ */ jsx(View, { className: "pl-3", children: leading }) : null,
886
+ input,
887
+ trailing != null ? /* @__PURE__ */ jsx(View, { className: "pr-1", children: trailing }) : null
888
+ ]
729
889
  }
730
- ),
890
+ ) : input,
731
891
  error ? /* @__PURE__ */ jsx(Text, { className: "text-sm text-destructive", children: error }) : null
732
892
  ] });
733
893
  }
@@ -859,6 +1019,61 @@ function NativeLoadingState({
859
1019
  }
860
1020
  );
861
1021
  }
1022
+ var FILL = { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 };
1023
+ function NativeImage({
1024
+ src,
1025
+ alt,
1026
+ className,
1027
+ width,
1028
+ height,
1029
+ contentFit = "cover",
1030
+ placeholder,
1031
+ cacheKey,
1032
+ recyclingKey,
1033
+ priority,
1034
+ onError,
1035
+ testID
1036
+ }) {
1037
+ const { image: ExpoImage } = useGenesisModules();
1038
+ const reducedMotion = useReducedMotion();
1039
+ const a11y = alt ? { accessible: true, accessibilityRole: "image", accessibilityLabel: alt } : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
1040
+ return /* @__PURE__ */ jsx(
1041
+ View,
1042
+ {
1043
+ ...a11y,
1044
+ testID,
1045
+ className: cn("overflow-hidden bg-muted", className),
1046
+ style: width !== void 0 || height !== void 0 ? { width, height } : void 0,
1047
+ children: ExpoImage ? /* @__PURE__ */ jsx(
1048
+ ExpoImage,
1049
+ {
1050
+ testID: testID ? `${testID}-image` : void 0,
1051
+ accessible: false,
1052
+ source: cacheKey ? { uri: src, cacheKey } : { uri: src },
1053
+ style: FILL,
1054
+ contentFit,
1055
+ cachePolicy: "memory-disk",
1056
+ placeholder,
1057
+ placeholderContentFit: contentFit,
1058
+ transition: reducedMotion ? null : 150,
1059
+ recyclingKey: recyclingKey ?? cacheKey ?? src,
1060
+ priority,
1061
+ onError
1062
+ }
1063
+ ) : /* @__PURE__ */ jsx(
1064
+ Image,
1065
+ {
1066
+ testID: testID ? `${testID}-image` : void 0,
1067
+ accessible: false,
1068
+ source: { uri: src },
1069
+ style: FILL,
1070
+ resizeMode: contentFit,
1071
+ onError
1072
+ }
1073
+ )
1074
+ }
1075
+ );
1076
+ }
862
1077
  var IOS_DISMISS_FALLBACK_MS = 600;
863
1078
  function NativeContextMenu({ open, onOpenChange, actions, title, cancelLabel = "Cancel", testID = "context-menu" }) {
864
1079
  const colors = useThemeRoles();
@@ -944,6 +1159,6 @@ function NativeSwipeRow({ actions, children, testID = "swipe-row" }) {
944
1159
  );
945
1160
  }
946
1161
 
947
- export { NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeContextMenu, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSkeleton, NativeSwipeRow, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants };
948
- //# sourceMappingURL=chunk-VEWSY4TZ.js.map
949
- //# sourceMappingURL=chunk-VEWSY4TZ.js.map
1162
+ export { NATIVE_ICON_NAMES, NativeBadge, NativeBanner, NativeButton, NativeContextMenu, NativeEmptyState, NativeIcon, NativeImage, NativeInlineAlert, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeNoFeaturesFound, NativeNoFeedbackFound, NativeNoSearchResults, NativeRefreshControl, NativeSectionListHeader, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSkeleton, NativeSwipeRow, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants };
1163
+ //# sourceMappingURL=chunk-D4UU6KIF.js.map
1164
+ //# sourceMappingURL=chunk-D4UU6KIF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/text.tsx","../src/components/button.tsx","../src/components/sheet.tsx","../src/components/empty-state.tsx","../src/components/inline-alert.tsx","../src/icon-names.ts","../src/components/icon.tsx","../src/components/list-item.tsx","../src/components/section-list.tsx","../src/components/refresh-control.tsx","../src/components/badge.tsx","../src/components/input.tsx","../src/components/skeleton.tsx","../src/components/loading-state.tsx","../src/components/image.tsx","../src/components/context-menu.tsx","../src/components/swipe-row.tsx"],"names":["RNText","cva","jsx","jsxs","Pressable","View","Text","Fragment","Platform","useEffect","useRef","Animated","ActivityIndicator"],"mappings":";;;;;;;;;;AAUA,IAAM,YAAA,GAAe,IAAI,iBAAA,EAAmB;AAAA,EAC1C,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,IAAA,EAAM,iCAAA;AAAA,MACN,SAAA,EAAW,+BAAA;AAAA,MACX,OAAA,EAAS,+BAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ;AAAA;AAEZ,CAAC;AA6BD,SAAS,UAAA,CAAW;AAAA,EAClB,SAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,WAAW,EAAA,CAAG,YAAA,CAAa,EAAE,MAAA,EAAQ,GAAG,SAAS,CAAA;AAAA,MAChD,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;ACnDA,IAAM,cAAA,GAAiBC,GAAAA;AAAA,EACrB,iDAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,YAAA;AAAA,QACT,SAAA,EAAW,cAAA;AAAA,QACX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A,IAAQ;AACvB,QAAA,MAAA,CAAO,OAAA,EAAQ;AAAA,MACjB,CAAA;AAAA,MACA,KAAA,EAAO,EAAE,KAAA,EAAO,YAAA,EAAc,YAAY,QAAA,EAAU,cAAA,EAAgB,QAAA,EAAU,eAAA,EAAiB,MAAA,CAAO,WAAA,GAAc,MAAA,CAAO,WAAA,GAAc,OAAO,IAAA,EAAK;AAAA,MAErJ,QAAA,kBAAAF,GAAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,MAAA,CAAO,WAAA,GAAc,6BAAA,GAAgC,yBAAA,EAA2B,MAAA,EAAO,OAAA,EAC3G,QAAA,EAAA,MAAA,CAAO,KAAA,EACV;AAAA,KAAA;AAAA,IAVK,MAAA,CAAO;AAAA,GAYf,CAAA,EACH,CAAA;AAGF,EAAA,uBACEA,GAAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAK,KAAA;AAAA,MACL,MAAA;AAAA,MACA,QAAA,EAAU,CAAA;AAAA,MACV,aAAA,EAAe,KAAA;AAAA,MACf,cAAA,EAAgB,KAAA;AAAA,MAChB,mBAAA,EAAqB,MAAM,IAAA,CAAK,QAAQ,CAAA;AAAA,MACxC,iBAAA,EAAmB,OAAA,CAAQ,MAAA,GAAS,KAAA,CAAM,OAAO,CAAA,GAAI,MAAA;AAAA,MACrD,kBAAA,EAAoB,QAAA,CAAS,MAAA,GAAS,KAAA,CAAM,QAAQ,CAAA,GAAI,MAAA;AAAA,MAEvD;AAAA;AAAA,GACH;AAEJ","file":"chunk-D4UU6KIF.js","sourcesContent":["/**\n * Text — typography primitive with semantic presets (h1, h2, body, caption, etc.).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ComponentRef, Ref } from \"react\";\nimport { Text as RNText, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst textVariants = cva(\"text-foreground\", {\n variants: {\n preset: {\n h1: \"text-3xl font-bold leading-9\",\n h2: \"text-2xl font-bold leading-8\",\n h3: \"text-xl font-semibold leading-7\",\n h4: \"text-lg font-semibold leading-7\",\n body: \"text-base font-normal leading-6\",\n \"body-sm\": \"text-sm font-normal leading-5\",\n caption: \"text-xs font-normal leading-4\",\n label: \"text-sm font-medium leading-5\",\n },\n },\n defaultVariants: {\n preset: \"body\",\n },\n});\n\n// `className` is declared explicitly here — not inherited from react-native's\n// `TextProps` via NativeWind's global augmentation, which does not resolve across\n// the RN / nativewind / react-native-css-interop version matrix. Mirrors every\n// other ui-native primitive (Button, Tooltip, ChipGroup, …); the implementation\n// already consumes `className` below.\nexport interface NativeTextProps\n extends TextProps,\n VariantProps<typeof textVariants> {\n /** NativeWind utility class string applied to the underlying Text. */\n className?: string;\n /** The underlying Text (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof RNText>> | undefined;\n}\n\n/**\n * Allowed `preset` values on {@link NativeText}. Re-exported as a named type\n * so consumer brand packages can build preset-driven typography APIs without\n * having to reach into `NativeTextProps['preset']` themselves.\n *\n * Example (consumer):\n * ```ts\n * import type { TextPreset } from \"@marktiderman/genesis-ui-native\";\n * function Heading({ as }: { as: TextPreset }) { ... }\n * ```\n */\nexport type TextPreset = NonNullable<NativeTextProps[\"preset\"]>;\n\nfunction NativeText({\n className,\n preset,\n children,\n ...props\n}: NativeTextProps) {\n return (\n <RNText\n className={cn(textVariants({ preset }), className)}\n {...props}\n >\n {children}\n </RNText>\n );\n}\n\nexport { NativeText, textVariants };\n","/**\n * Button — primary touch target. Variants: default, secondary, outline, ghost, destructive,\n * gradient (the brand's `gradients.primary` from the nearest `GenesisThemeProvider`, else the\n * primary).\n * It answers a touch with `usePressFeedback`: what's inside shrinks a little while held (or dims\n * under Reduce Motion), the same as every Genesis pressable. The background stays still. Layout\n * classes in `className` (`justify-start`, `gap-3`, `flex-col`) apply to what's inside.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ComponentRef, Ref } from \"react\";\nimport { ActivityIndicator, Animated, Pressable, Text, View, type AccessibilityState, type StyleProp, type ViewStyle } from \"react-native\";\nimport { brandGradientCss, useOptionalTheme } from \"@marktiderman/genesis-design-system\";\nimport type { HapticKind } from \"../hooks/use-haptics\";\nimport { usePressFeedback } from \"../hooks/use-press-feedback\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n \"flex-row items-center justify-center rounded-md\",\n {\n variants: {\n variant: {\n default: \"bg-primary\",\n secondary: \"bg-secondary\",\n outline: \"border border-input bg-transparent\",\n ghost: \"bg-transparent\",\n destructive: \"bg-destructive\",\n gradient: \"bg-primary\",\n },\n size: {\n sm: \"h-9 px-3 gap-1.5\",\n md: \"h-10 px-4 gap-2\",\n lg: \"h-11 px-8 gap-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n }\n);\n\nconst buttonTextVariants = cva(\"font-medium text-center\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n outline: \"text-foreground\",\n ghost: \"text-foreground\",\n destructive: \"text-destructive-foreground\",\n gradient: \"text-primary-foreground\",\n },\n size: {\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\n/** How what's inside is laid out: the same gap per size as the button's own. */\nconst contentVariants = cva(\"flex-row items-center justify-center\", {\n variants: { size: { sm: \"gap-1.5\", md: \"gap-2\", lg: \"gap-2\" } },\n defaultVariants: { size: \"md\" },\n});\n\n/** A caller's classes that lay out the button's content, which now sits a level inside it. */\nconst contentClasses = (className: string | undefined) =>\n className\n ?.split(/\\s+/)\n .filter((c) => /^(flex-(row|col)|justify-|items-|gap-)/.test(c))\n .join(\" \");\n\nexport interface NativeButtonProps\n extends VariantProps<typeof buttonVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n onPress?: () => void;\n disabled?: boolean;\n loading?: boolean;\n testID?: string;\n /** What a screen reader says, when the text alone isn't enough (\"Vote for Dark mode\"). Default: the text. */\n accessibilityLabel?: string;\n accessibilityHint?: string;\n /** Merged with the button's own `disabled` and `busy`: `{ selected: true }` for a vote cast, a filter on. */\n accessibilityState?: AccessibilityState;\n /**\n * A haptic through `GenesisModules.haptics` (`light` for a vote, `success` for a save): it plays\n * when the press counts, except `select`, which ticks on press-in as `usePressFeedback` does. Default none.\n */\n haptic?: HapticKind | undefined;\n /** Styles for the pressable, after the classes: colors or sizes from a theme object. */\n style?: StyleProp<ViewStyle> | undefined;\n /** The pressable (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof View>> | undefined;\n}\n\nfunction NativeButton({\n className,\n textClassName,\n variant,\n size,\n children,\n onPress,\n disabled,\n loading,\n accessibilityState,\n haptic,\n style,\n ...props\n}: NativeButtonProps) {\n const isDisabled = disabled || loading;\n const theme = useOptionalTheme();\n // React Native 0.80+ paints a CSS gradient as `experimental_backgroundImage`; older versions\n // ignore it and the `bg-primary` underneath shows.\n const gradient = variant === \"gradient\" && theme ? brandGradientCss(theme.brand) : undefined;\n const gradientStyle = gradient ? ({ experimental_backgroundImage: gradient } as ViewStyle) : undefined;\n const feedback = usePressFeedback({ haptic: onPress ? (haptic ?? false) : false, disabled: Boolean(isDisabled) });\n const press = onPress\n ? () => {\n feedback.confirm();\n onPress();\n }\n : undefined;\n\n return (\n <Pressable\n className={cn(\n buttonVariants({ variant, size }),\n isDisabled && \"opacity-50\",\n className\n )}\n onPress={press}\n onPressIn={feedback.onPressIn}\n onPressOut={feedback.onPressOut}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ ...accessibilityState, disabled: isDisabled, busy: loading ?? accessibilityState?.busy }}\n {...props}\n // The brand gradient under the caller's own style, not replaced by it.\n style={gradientStyle ? (style ? [gradientStyle, style] : gradientStyle) : style}\n >\n {/* Inside the Pressable, which keeps the button's size and classes: a wrapper would lose a `flex-1`. */}\n <Animated.View style={[{ flexGrow: 1 }, feedback.style]}>\n <View className={cn(contentVariants({ size }), contentClasses(className))}>\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={\n variant === \"outline\" || variant === \"ghost\"\n ? undefined\n : \"white\"\n }\n />\n ) : null}\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n buttonTextVariants({ variant, size }),\n textClassName\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n </Animated.View>\n </Pressable>\n );\n}\n\nexport { NativeButton, buttonVariants, buttonTextVariants };\n","/**\n * Sheet / BottomSheet — modal that slides up from the bottom.\n *\n * Use for non-blocking selections, filters, and short flows that benefit\n * from preserving screen context. For blocking confirmations, use\n * <NativeDialog>. For full-screen flows, use a navigation route.\n *\n * By default this is React Native's own `Modal`, which needs nothing mounted\n * above it: the system page sheet on iOS (swipe down to close) and a bottom\n * panel over a scrim on Android (back button or a tap on the scrim closes\n * it). Content gets its own safe area (`useSafeAreaInsets` inside the sheet\n * is the sheet's), and the bottom inset is padded. Put scrolling content in\n * `NativeSheetScrollView`. The sheet doesn't move above the keyboard.\n *\n * `@gorhom/bottom-sheet` (snap points, drag between heights) is used only\n * when the app opts in by mounting `<NativeSheetProvider bottomSheet={…}>`\n * (or passing `bottomSheet` to `GenesisNativeApp`), never because the\n * library happens to be installed: it throws on open unless its\n * `BottomSheetModalProvider` is mounted, and it needs gesture-handler's\n * `GestureHandlerRootView` at the root and Reanimated set up.\n * `snapPoints` and `initialSnapIndex` apply only to that path.\n *\n * A short menu or form passes `fitContent`: the sheet is as tall as what is in it.\n *\n * A sheet that is a screen of its own (a link can open it) belongs in the\n * router instead: an expo-router screen with `presentation: \"formSheet\"` and\n * `sheetAllowedDetents` (e.g. `[0.5, 1]`) is the system sheet with detents.\n *\n * @stability Beta\n */\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\nimport { AccessibilityInfo, Dimensions, KeyboardAvoidingView, Modal, Platform, Pressable, ScrollView, View, type ScrollViewProps, type ViewStyle } from \"react-native\";\nimport { SafeAreaProvider, useSafeAreaInsets } from \"react-native-safe-area-context\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\n\nexport interface NativeSheetProps {\n /** Controlled visibility. */\n open: boolean;\n /** Fired when the user dismisses the sheet (backdrop, swipe down, Android back). Set `open` false in it. */\n onOpenChange: (open: boolean) => void;\n /** Snap points, with `@gorhom/bottom-sheet` only (see `NativeSheetProvider`). e.g. [\"25%\", \"50%\", \"90%\"]. */\n snapPoints?: (string | number)[];\n /** Index of initial snap point, with `@gorhom/bottom-sheet` only. Default 0. */\n initialSnapIndex?: number;\n /** Keep the sheet open when the user taps the backdrop, swipes it down or presses Android back. Default false. */\n disableBackdropDismiss?: boolean;\n /**\n * As tall as its content (up to 90% of the screen) instead of the full page sheet, for a short\n * menu or form. On iOS this is a bottom panel over a scrim, like Android's (a tap on the scrim\n * or the VoiceOver escape gesture closes it; it doesn't follow a swipe down), and it moves above\n * the keyboard. Under `NativeSheetProvider` the library sizes it (`enableDynamicSizing`) and\n * `snapPoints` is ignored. Default false.\n */\n fitContent?: boolean;\n /** The sheet has finished going, where the platform says so (iOS's modal, the library): another modal can present now. */\n onDismissed?: () => void;\n children: ReactNode;\n testID?: string;\n}\n\ntype AnyComponent = ComponentType<Record<string, unknown>>;\n\n/**\n * The parts of `@gorhom/bottom-sheet` (v5) the sheet uses. Pass the whole\n * module: `import * as BottomSheet from \"@gorhom/bottom-sheet\"`.\n */\nexport interface NativeSheetLibrary {\n BottomSheetModal: unknown;\n BottomSheetView: unknown;\n BottomSheetBackdrop: unknown;\n BottomSheetModalProvider: unknown;\n /** Used by `NativeSheetScrollView` when present. */\n BottomSheetScrollView?: unknown;\n}\n\nconst REQUIRED_EXPORTS = [\"BottomSheetModal\", \"BottomSheetView\", \"BottomSheetBackdrop\", \"BottomSheetModalProvider\"] as const;\n\nconst SheetLibraryContext = createContext<NativeSheetLibrary | null>(null);\n\nexport interface NativeSheetProviderProps {\n /**\n * `@gorhom/bottom-sheet` v5 (`import * as BottomSheet from \"@gorhom/bottom-sheet\"`).\n * Read once. The app must also wrap its root in gesture-handler's\n * `GestureHandlerRootView` and set Reanimated up, as the library requires.\n * Sheet content renders in the library's portal, inside this provider:\n * mount it below the providers sheets read (data, session, navigation).\n */\n bottomSheet: NativeSheetLibrary;\n children: ReactNode;\n}\n\n/**\n * Opts every `NativeSheet` below it into `@gorhom/bottom-sheet` and mounts\n * the library's `BottomSheetModalProvider`. A module missing any export the\n * sheet needs is reported with `console.error` and ignored, so sheets fall\n * back to the native modal instead of crashing on open.\n *\n * @stability Beta\n */\nexport function NativeSheetProvider({ bottomSheet, children }: NativeSheetProviderProps) {\n // Frozen: a different module later would remount everything below the provider.\n const [library] = useState(() => (isSheetLibrary(bottomSheet) ? bottomSheet : null));\n const [problem] = useState(() => (library ? null : invalidLibraryMessage(bottomSheet)));\n useEffect(() => {\n if (problem) console.error(problem);\n }, [problem]);\n if (!library) return <>{children}</>;\n const Provider = library.BottomSheetModalProvider as ComponentType<{ children: ReactNode }>;\n return (\n <SheetLibraryContext.Provider value={library}>\n <Provider>{children}</Provider>\n </SheetLibraryContext.Provider>\n );\n}\n\nfunction isSheetLibrary(value: unknown): value is NativeSheetLibrary {\n if (!value || typeof value !== \"object\") return false;\n const mod = value as Record<string, unknown>;\n return REQUIRED_EXPORTS.every((name) => mod[name] != null);\n}\n\nfunction invalidLibraryMessage(value: unknown): string {\n const mod = (value && typeof value === \"object\" ? value : {}) as Record<string, unknown>;\n const missing = REQUIRED_EXPORTS.filter((name) => mod[name] == null);\n return (\n `NativeSheetProvider: \\`bottomSheet\\` is missing ${missing.join(\", \")}, so sheets use the native modal. ` +\n 'Pass the whole module: `import * as BottomSheet from \"@gorhom/bottom-sheet\"`.'\n );\n}\n\n/** @stability Beta */\nexport function NativeSheet(props: NativeSheetProps) {\n const library = useContext(SheetLibraryContext);\n if (library) return <LibrarySheet library={library} {...props} />;\n return <ModalSheet {...props} />;\n}\n\n/**\n * A `ScrollView` for sheet content: the library's `BottomSheetScrollView`\n * under `NativeSheetProvider` (so scrolling and dragging the sheet don't\n * fight), React Native's otherwise. Sized to its content until it reaches\n * the sheet's height.\n *\n * @stability Beta\n */\nexport function NativeSheetScrollView({ style, ...props }: ScrollViewProps) {\n const library = useContext(SheetLibraryContext);\n const Scroll = (library?.BottomSheetScrollView as ComponentType<ScrollViewProps> | undefined) ?? ScrollView;\n const own: ViewStyle = { flexGrow: 0 };\n return <Scroll style={[own, ...(Array.isArray(style) ? style : style ? [style] : [])]} {...props} />;\n}\n\ntype SheetHandle = { present: () => void; dismiss: () => void };\n\nfunction LibrarySheet({\n library,\n open,\n onOpenChange,\n snapPoints = [\"50%\", \"90%\"],\n initialSnapIndex = 0,\n disableBackdropDismiss = false,\n fitContent = false,\n onDismissed,\n testID,\n children,\n}: NativeSheetProps & { library: NativeSheetLibrary }) {\n const sheet = useRef<SheetHandle | null>(null);\n // What the app asked for last, read when the library reports a dismiss: a dismiss\n // that finishes after the app reopened the sheet is not the user closing it.\n const wanted = useRef(open);\n const onOpenChangeRef = useRef(onOpenChange);\n onOpenChangeRef.current = onOpenChange;\n const onDismissedRef = useRef(onDismissed);\n onDismissedRef.current = onDismissed;\n\n // Child refs are attached before this runs, so the first render presents too.\n useEffect(() => {\n wanted.current = open;\n if (open) sheet.current?.present();\n else sheet.current?.dismiss();\n }, [open]);\n\n const BottomSheetModal = library.BottomSheetModal as AnyComponent;\n const BottomSheetView = library.BottomSheetView as AnyComponent;\n const BottomSheetBackdrop = library.BottomSheetBackdrop as AnyComponent;\n\n const onDismiss = useCallback(() => {\n if (wanted.current) {\n wanted.current = false;\n onOpenChangeRef.current(false);\n }\n onDismissedRef.current?.();\n }, []);\n const backdrop = useCallback(\n (p: Record<string, unknown>) => (\n <BottomSheetBackdrop\n {...p}\n appearsOnIndex={0}\n disappearsOnIndex={-1}\n pressBehavior={disableBackdropDismiss ? \"none\" : \"close\"}\n />\n ),\n [BottomSheetBackdrop, disableBackdropDismiss],\n );\n\n return (\n <BottomSheetModal\n ref={sheet}\n snapPoints={fitContent ? undefined : snapPoints}\n index={fitContent ? 0 : initialSnapIndex}\n // v5 sizes to the content by default and adds that as a snap point, which would shift the\n // indexes: only a sheet that fits its content asks for it, and then it is the only one.\n enableDynamicSizing={fitContent}\n // Long content would otherwise grow the sheet to the full height, under the status bar.\n {...(fitContent ? { maxDynamicContentSize: Math.round(Dimensions.get(\"window\").height * 0.9) } : {})}\n onDismiss={onDismiss}\n enablePanDownToClose={!disableBackdropDismiss}\n backdropComponent={backdrop}\n >\n <BottomSheetView testID={testID ?? \"native-sheet\"}>{children}</BottomSheetView>\n </BottomSheetModal>\n );\n}\n\n/**\n * Whether Reduce Motion is on, or `null` until the system has answered: a\n * sheet mounted open waits for it, since the presentation animation is\n * chosen when the sheet is presented.\n */\nfunction useReduceMotionAnswer(): boolean | null {\n const [reduced, setReduced] = useState<boolean | null>(null);\n useEffect(() => {\n let mounted = true;\n AccessibilityInfo.isReduceMotionEnabled().then(\n (value) => mounted && setReduced(value),\n () => mounted && setReduced(false),\n );\n const sub = AccessibilityInfo.addEventListener(\"reduceMotionChanged\", (value: boolean) => setReduced(value));\n return () => {\n mounted = false;\n sub?.remove?.();\n };\n }, []);\n return reduced;\n}\n\n/**\n * React Native's `Modal`, which needs no provider. iOS: the system page\n * sheet (`presentationStyle=\"pageSheet\"`), following the finger when swiped\n * down (`allowSwipeDismissal`); with `disableBackdropDismiss` a swipe only\n * asks and the sheet springs back. Android: a transparent modal with a scrim\n * and a panel at the bottom, drawn under the system bars. `fitContent` on iOS: the same bottom\n * panel, kept above the keyboard.\n */\nfunction ModalSheet({ open, onOpenChange, disableBackdropDismiss = false, fitContent = false, onDismissed, testID, children }: NativeSheetProps) {\n const reducedMotion = useReduceMotionAnswer();\n const roles = useThemeRoles();\n const requestClose = () => {\n if (!disableBackdropDismiss) onOpenChange(false);\n };\n const visible = open && reducedMotion !== null;\n const animationType = reducedMotion ? \"none\" : \"slide\";\n const id = testID ?? \"native-sheet\";\n\n const ios = Platform.OS === \"ios\";\n if (ios && !fitContent) {\n return (\n <Modal\n visible={visible}\n animationType={animationType}\n presentationStyle=\"pageSheet\"\n allowSwipeDismissal={!disableBackdropDismiss}\n backdropColor={roles.background}\n onRequestClose={requestClose}\n onDismiss={onDismissed}\n >\n <SafeAreaProvider>\n <SheetBody\n testID={id}\n onAccessibilityEscape={disableBackdropDismiss ? undefined : requestClose}\n style={{ flex: 1, backgroundColor: roles.background }}\n >\n {children}\n </SheetBody>\n </SafeAreaProvider>\n </Modal>\n );\n }\n\n return (\n <Modal\n visible={visible}\n transparent\n animationType={animationType}\n statusBarTranslucent\n navigationBarTranslucent\n onRequestClose={requestClose}\n onDismiss={onDismissed}\n >\n <SafeAreaProvider>\n <KeyboardPanel ios={ios}>\n <Pressable\n testID={`${id}-backdrop`}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Close\"\n disabled={disableBackdropDismiss}\n importantForAccessibility={disableBackdropDismiss ? \"no-hide-descendants\" : \"auto\"}\n onPress={requestClose}\n style={{ position: \"absolute\", top: 0, right: 0, bottom: 0, left: 0, backgroundColor: \"rgba(0,0,0,0.4)\" }}\n />\n <SheetBody\n testID={id}\n onAccessibilityEscape={disableBackdropDismiss ? undefined : requestClose}\n style={{\n maxHeight: \"90%\",\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n backgroundColor: roles.surface,\n paddingTop: 12,\n }}\n >\n <View\n style={{ alignSelf: \"center\", width: 32, height: 4, borderRadius: 2, marginBottom: 8, backgroundColor: roles.tertiaryLabel }}\n />\n {children}\n </SheetBody>\n </KeyboardPanel>\n </SafeAreaProvider>\n </Modal>\n );\n}\n\n/**\n * The bottom panel's frame: on iOS it moves up with the keyboard, less the home indicator's\n * inset the sheet already pads, so it sits on the keyboard without a gap.\n */\nfunction KeyboardPanel({ ios, children }: { ios: boolean; children: ReactNode }) {\n const insets = useSafeAreaInsets();\n return (\n <KeyboardAvoidingView behavior={ios ? \"padding\" : undefined} keyboardVerticalOffset={ios ? -insets.bottom : 0} style={{ flex: 1, justifyContent: \"flex-end\" }}>\n {children}\n </KeyboardAvoidingView>\n );\n}\n\n/** The sheet's root, padded by the sheet's own bottom inset (the home indicator, the navigation bar). */\nfunction SheetBody({\n testID,\n style,\n onAccessibilityEscape,\n children,\n}: {\n testID: string;\n style: ViewStyle;\n onAccessibilityEscape?: () => void;\n children: ReactNode;\n}) {\n const insets = useSafeAreaInsets();\n return (\n <View testID={testID} accessibilityViewIsModal onAccessibilityEscape={onAccessibilityEscape} style={{ ...style, paddingBottom: insets.bottom }}>\n {children}\n </View>\n );\n}\n","/**\n * EmptyState — what to show when a list / screen has no data.\n *\n * Three semantic variants drive default messaging:\n * - \"first-run\": user has never had data here. Optimistic.\n * - \"no-results\": user filtered/searched and got nothing. Suggest reset.\n * - \"error\": fetching failed. Suggest retry.\n *\n * The variant only sets sensible defaults for `title` and tone — pass\n * your own `title`, `body`, `primaryAction`, `secondaryAction`, etc. to\n * override. Mirrors the @marktiderman/genesis-ui web `<EmptyState>` API where\n * possible (illustration vs icon slot, primary/secondary actions).\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { NativeButton } from \"./button\";\n\nexport type NativeEmptyStateVariant = \"first-run\" | \"no-results\" | \"error\";\n\n/**\n * Action descriptor for primary/secondary CTAs. Either pass a structured\n * object (renders a Pressable button via the consumer's button slot) or\n * pass an arbitrary node via `action` for maximum flexibility.\n */\nexport interface NativeEmptyStateAction {\n label: string;\n onPress: () => void;\n testID?: string;\n}\n\nexport interface NativeEmptyStateProps {\n /** Variant drives default tone + default title. Default \"first-run\". */\n variant?: NativeEmptyStateVariant;\n /** Headline. Falls back to a variant-specific default. */\n title?: string;\n /** Body copy shown below the title. (Alias: `description`.) */\n body?: string;\n /**\n * @deprecated Prefer `body`. `description` remains for back-compat with\n * the original C3 API; both are accepted but `body` wins if both passed.\n */\n description?: string;\n /** Optional illustration (artwork node) above the title. */\n illustration?: React.ReactNode;\n /** Optional icon node above the title (use either icon or illustration). */\n icon?: React.ReactNode;\n /**\n * Primary CTA. When provided, the consumer is responsible for rendering\n * the button itself (we accept a node, not a label) so brand + token\n * styling is honored. The web API takes a `{label, onPress}` descriptor;\n * on native, prefer to pass a `<NativeButton>` directly to avoid\n * cross-package coupling.\n */\n primaryAction?: React.ReactNode;\n /** Secondary CTA, rendered below the primary. */\n secondaryAction?: React.ReactNode;\n /**\n * Free-form action slot. Equivalent to `primaryAction`; accepted for\n * back-compat with the C3 API. If both `action` and `primaryAction` are\n * passed, `primaryAction` wins.\n */\n action?: React.ReactNode;\n /**\n * Developer-facing error details. Only rendered when __DEV__ is true at\n * runtime (we infer by reading `process.env.NODE_ENV !== \"production\"`).\n */\n details?: string;\n className?: string;\n testID?: string;\n}\n\nconst defaults: Record<NativeEmptyStateVariant, { title: string; tone: string }> = {\n \"first-run\": { title: \"Nothing here yet\", tone: \"text-muted-foreground\" },\n \"no-results\": { title: \"No results\", tone: \"text-muted-foreground\" },\n error: { title: \"Something went wrong\", tone: \"text-destructive\" },\n};\n\nexport function NativeEmptyState({\n variant = \"first-run\",\n title,\n body,\n description,\n illustration,\n icon,\n primaryAction,\n secondaryAction,\n action,\n details,\n className,\n testID,\n}: NativeEmptyStateProps) {\n const meta = defaults[variant];\n const resolvedBody = body ?? description;\n const resolvedPrimary = primaryAction ?? action;\n // Read NODE_ENV defensively — some bundlers don't define `process` at\n // runtime (e.g., RN classic), so we guard via globalThis. The `details`\n // slot is dev-only; we explicitly enumerate non-production values so an\n // undefined NODE_ENV doesn't accidentally leak diagnostic strings.\n const proc = (globalThis as { process?: { env?: { NODE_ENV?: string } } })\n .process;\n const nodeEnv = proc?.env?.NODE_ENV;\n const isDev = nodeEnv === \"development\" || nodeEnv === \"test\";\n\n return (\n <View\n testID={testID ?? `empty-state-${variant}`}\n accessibilityRole=\"summary\"\n className={cn(\n \"items-center justify-center gap-3 px-8 py-12\",\n className\n )}\n >\n {illustration ? <View accessibilityElementsHidden>{illustration}</View> : null}\n {icon && !illustration ? (\n <View accessibilityElementsHidden>{icon}</View>\n ) : null}\n <Text\n testID={testID ? `${testID}-title` : undefined}\n className={cn(\n \"text-center text-lg font-semibold\",\n variant === \"error\" ? \"text-destructive\" : \"text-foreground\"\n )}\n >\n {title ?? meta.title}\n </Text>\n {resolvedBody ? (\n <Text\n testID={testID ? `${testID}-body` : undefined}\n className={cn(\"max-w-sm text-center text-sm\", meta.tone)}\n >\n {resolvedBody}\n </Text>\n ) : null}\n {resolvedPrimary ? (\n <View\n testID={testID ? `${testID}-primary-action` : undefined}\n className=\"mt-2\"\n >\n {resolvedPrimary}\n </View>\n ) : null}\n {secondaryAction ? (\n <View\n testID={testID ? `${testID}-secondary-action` : undefined}\n className=\"mt-1\"\n >\n {secondaryAction}\n </View>\n ) : null}\n {details && isDev ? (\n <Text\n testID={testID ? `${testID}-details` : undefined}\n className=\"mt-2 max-w-sm text-center text-xs text-muted-foreground\"\n >\n {details}\n </Text>\n ) : null}\n </View>\n );\n}\n\n// Presets, the twins of genesis-ui's NoFeaturesFound, NoFeedbackFound and NoSearchResults: the\n// same words on NativeEmptyState, so a phone screen doesn't retype them.\n\n/** An empty roadmap or feature list. */\nexport function NativeNoFeaturesFound({ onCreate, testID = \"no-features-found\" }: { onCreate?: () => void; testID?: string }) {\n return (\n <NativeEmptyState\n testID={testID}\n title=\"No features found\"\n body=\"Start building your product roadmap by creating your first epic.\"\n primaryAction={onCreate ? <NativeButton onPress={onCreate} testID={`${testID}-create`}>Create Epic</NativeButton> : undefined}\n />\n );\n}\n\n/** A feedback inbox with nothing in it yet. */\nexport function NativeNoFeedbackFound({ testID = \"no-feedback-found\" }: { testID?: string }) {\n return <NativeEmptyState testID={testID} title=\"No feedback yet\" body=\"Feedback from users will appear here as they use the app.\" />;\n}\n\n/** A search or filter that matched nothing. */\nexport function NativeNoSearchResults({ query, onClear, testID = \"no-search-results\" }: { query?: string; onClear?: () => void; testID?: string }) {\n return (\n <NativeEmptyState\n testID={testID}\n variant=\"no-results\"\n title=\"No results found\"\n body={query ? `No results found for \"${query}\". Try a different search term.` : \"No results match your current filters.\"}\n primaryAction={\n onClear ? (\n <NativeButton variant=\"ghost\" onPress={onClear} testID={`${testID}-clear`}>\n Clear search\n </NativeButton>\n ) : undefined\n }\n />\n );\n}\n","/**\n * InlineAlert + Banner — non-blocking system messaging.\n *\n * NativeInlineAlert: contextual message that lives inline with related\n * content (e.g., between form fields).\n *\n * NativeBanner: top-of-screen system message (e.g., \"You're offline\").\n * Persists until the user dismisses or the condition clears. Use\n * sparingly — for transient confirmation use <NativeToast>; for\n * blocking issues use <NativeDialog>.\n *\n * Both share variants: info / success / warning / destructive. Under the\n * description, `children` takes any content (an error summary's list of\n * links, a status line) and `actions` a row of buttons (\"Retry\", \"Review\"),\n * so neither has to be drawn by hand around the alert.\n *\n * @stability Beta\n */\nimport { Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport type NativeInlineAlertVariant =\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"destructive\";\n\ninterface BaseProps {\n variant?: NativeInlineAlertVariant;\n title?: string;\n description?: string;\n /** Optional icon node rendered to the left of the text. */\n icon?: React.ReactNode;\n /** When provided, renders an \"✕\" dismiss button with this label. */\n onDismiss?: () => void;\n /** Content under the description (a list of the fields to fix, a status line). */\n children?: React.ReactNode;\n /** A row of buttons under the content (NativeButton size=\"sm\"). */\n actions?: React.ReactNode;\n className?: string;\n testID?: string;\n}\n\nconst variantClasses: Record<NativeInlineAlertVariant, string> = {\n info: \"bg-secondary border-border\",\n success: \"bg-primary/10 border-primary/30\",\n warning: \"bg-warning/10 border-warning/30\",\n destructive: \"bg-destructive/10 border-destructive/30\",\n};\n\nconst titleClasses: Record<NativeInlineAlertVariant, string> = {\n info: \"text-foreground\",\n success: \"text-primary-text\",\n // The warning token is an amber that reads at about 2:1 on the tint, under the 4.5:1 text\n // needs: the tint and border carry the warning, as on the web's InlineAlert.\n warning: \"text-foreground\",\n destructive: \"text-destructive\",\n};\n\n/** The alert's content and actions slots, under the description. */\nfunction AlertExtras({ children, actions, testID }: { children?: React.ReactNode; actions?: React.ReactNode; testID?: string | undefined }) {\n return (\n <>\n {children ? (\n <View testID={testID ? `${testID}-content` : undefined} className=\"mt-2\">\n {children}\n </View>\n ) : null}\n {actions ? (\n <View testID={testID ? `${testID}-actions` : undefined} className=\"mt-3 flex-row flex-wrap gap-2\">\n {actions}\n </View>\n ) : null}\n </>\n );\n}\n\nexport interface NativeInlineAlertProps extends BaseProps {}\n\nexport function NativeInlineAlert({\n variant = \"info\",\n title,\n description,\n icon,\n onDismiss,\n children,\n actions,\n className,\n testID,\n}: NativeInlineAlertProps) {\n return (\n <View\n testID={testID ?? `inline-alert-${variant}`}\n accessibilityRole=\"alert\"\n className={cn(\n \"flex-row gap-3 rounded-md border p-3\",\n variantClasses[variant],\n className\n )}\n >\n {icon ? <View className=\"pt-0.5\">{icon}</View> : null}\n <View className=\"flex-1\">\n {title ? (\n <Text className={cn(\"text-sm font-semibold\", titleClasses[variant])}>\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text className=\"mt-0.5 text-sm text-foreground/80\">\n {description}\n </Text>\n ) : null}\n <AlertExtras testID={testID} actions={actions}>\n {children}\n </AlertExtras>\n </View>\n {onDismiss ? (\n <Pressable\n testID={testID ? `${testID}-dismiss` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Dismiss\"\n onPress={onDismiss}\n hitSlop={8}\n className=\"min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-base text-muted-foreground\">✕</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n\nexport interface NativeBannerProps extends BaseProps {}\n\nexport function NativeBanner({\n variant = \"info\",\n title,\n description,\n icon,\n onDismiss,\n children,\n actions,\n className,\n testID,\n}: NativeBannerProps) {\n return (\n <View\n testID={testID ?? `banner-${variant}`}\n accessibilityRole=\"alert\"\n accessibilityLiveRegion=\"polite\"\n className={cn(\n \"flex-row items-start gap-3 border-b px-4 py-3\",\n variantClasses[variant],\n className\n )}\n >\n {icon ? <View className=\"pt-0.5\">{icon}</View> : null}\n <View className=\"flex-1\">\n {title ? (\n <Text className={cn(\"text-sm font-semibold\", titleClasses[variant])}>\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text className=\"mt-0.5 text-sm text-foreground/80\">\n {description}\n </Text>\n ) : null}\n <AlertExtras testID={testID} actions={actions}>\n {children}\n </AlertExtras>\n </View>\n {onDismiss ? (\n <Pressable\n testID={testID ? `${testID}-dismiss` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Dismiss\"\n onPress={onDismiss}\n hitSlop={8}\n className=\"min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-base text-muted-foreground\">✕</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * The semantic icon names Genesis components ask for, and the SF Symbol each\n * one draws on iOS. Components say \"settings\" or \"bell\", never a library's\n * own name; `lucideIcons` (`/icons/lucide`) maps the same names for Android,\n * web and the SF Symbol fallback.\n *\n * @stability Beta\n */\nexport const SF_SYMBOLS = {\n aperture: \"camera.aperture\",\n \"arrow-left\": \"arrow.left\",\n \"arrow-up\": \"arrow.up\",\n bell: \"bell\",\n calendar: \"calendar\",\n camera: \"camera\",\n \"camera-flip\": \"arrow.triangle.2.circlepath.camera\",\n check: \"checkmark\",\n \"chevron-down\": \"chevron.down\",\n \"chevron-left\": \"chevron.left\",\n \"chevron-right\": \"chevron.right\",\n \"chevron-up\": \"chevron.up\",\n clapperboard: \"movieclapper\",\n clock: \"clock\",\n close: \"xmark\",\n compose: \"square.and.pencil\",\n copy: \"doc.on.doc\",\n download: \"square.and.arrow.down\",\n edit: \"pencil\",\n error: \"xmark.circle\",\n expand: \"arrow.up.left.and.arrow.down.right\",\n \"external-link\": \"arrow.up.right.square\",\n eye: \"eye\",\n file: \"doc\",\n filter: \"line.3.horizontal.decrease\",\n \"folder-plus\": \"folder.badge.plus\",\n grid: \"square.grid.2x2\",\n grip: \"line.3.horizontal\",\n heart: \"heart\",\n home: \"house\",\n image: \"photo\",\n info: \"info.circle\",\n link: \"link\",\n list: \"list.bullet\",\n lock: \"lock\",\n \"log-out\": \"rectangle.portrait.and.arrow.right\",\n mail: \"envelope\",\n maximize: \"arrow.up.left.and.arrow.down.right\",\n menu: \"line.3.horizontal\",\n message: \"bubble.left\",\n mic: \"mic\",\n minus: \"minus\",\n more: \"ellipsis\",\n paperclip: \"paperclip\",\n pause: \"pause.fill\",\n pin: \"pin\",\n play: \"play.fill\",\n plus: \"plus\",\n radio: \"dot.radiowaves.left.and.right\",\n redo: \"arrow.uturn.forward\",\n refresh: \"arrow.clockwise\",\n reply: \"arrowshape.turn.up.left\",\n search: \"magnifyingglass\",\n settings: \"gearshape\",\n \"settings-2\": \"slider.horizontal.3\",\n share: \"square.and.arrow.up\",\n smile: \"face.smiling\",\n sort: \"arrow.up.arrow.down\",\n star: \"star\",\n stop: \"stop.fill\",\n success: \"checkmark.circle\",\n table: \"tablecells\",\n trash: \"trash\",\n undo: \"arrow.uturn.backward\",\n upload: \"tray.and.arrow.up\",\n user: \"person\",\n video: \"video\",\n volume: \"speaker.wave.2.fill\",\n \"volume-off\": \"speaker.slash.fill\",\n warning: \"exclamationmark.triangle\",\n} as const;\n\n/** A semantic icon name: what the icon is for. */\nexport type NativeIconName = keyof typeof SF_SYMBOLS;\n\n/** Every semantic icon name. */\nexport const NATIVE_ICON_NAMES = Object.keys(SF_SYMBOLS) as NativeIconName[];\n","/**\n * NativeIcon — an icon by what it is for (\"settings\", \"bell\"), not by a\n * library's name. On iOS it draws the SF Symbol (expo-symbols' `SymbolView`,\n * passed as `modules.symbol`); on Android and web, and as the SF Symbol's\n * fallback, it draws the icon set given as `modules.icons` (`lucideIcons`\n * from `@marktiderman/genesis-ui-native/icons/lucide`). With neither, it\n * keeps the icon's space empty and warns once in development.\n *\n * Decorative by default (hidden from screen readers). Give `label` when the\n * icon carries meaning on its own, such as an icon-only button's content.\n *\n * @stability Beta\n */\nimport { Platform, View, type ColorValue } from \"react-native\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { SF_SYMBOLS, type NativeIconName } from \"../icon-names\";\nimport { useGenesisModules } from \"../native-modules\";\n\nexport interface NativeIconProps {\n name: NativeIconName;\n /** Points. Default 20. */\n size?: number;\n /** Default the theme's label color. */\n color?: ColorValue;\n /** iOS SF Symbol weight. */\n weight?: \"ultraLight\" | \"thin\" | \"light\" | \"regular\" | \"medium\" | \"semibold\" | \"bold\" | \"heavy\" | \"black\";\n /** Read by screen readers. Without it the icon is decorative and hidden from them. */\n label?: string;\n testID?: string;\n}\n\ndeclare const __DEV__: boolean | undefined;\nconst warned = new Set<string>();\n\nfunction warnOnce(name: string) {\n if (typeof __DEV__ === \"undefined\" || !__DEV__ || warned.has(name)) return;\n warned.add(name);\n console.warn(\n `[genesis] NativeIcon \"${name}\" has nothing to draw with: pass modules.icons (lucideIcons from \"@marktiderman/genesis-ui-native/icons/lucide\") and, for SF Symbols on iOS, modules.symbol (SymbolView from \"expo-symbols\") to GenesisModulesProvider.`,\n );\n}\n\nexport function NativeIcon({ name, size = 20, color, weight, label, testID }: NativeIconProps) {\n const { symbol: SymbolView, icons } = useGenesisModules();\n const roles = useThemeRoles();\n const tint = color ?? roles.label;\n const a11y = label\n ? { accessible: true, accessibilityRole: \"image\" as const, accessibilityLabel: label }\n : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: \"no-hide-descendants\" as const };\n const Fallback = icons?.[name];\n const fallback = Fallback ? <Fallback size={size} color={tint} testID={testID ? `${testID}-fallback` : undefined} /> : null;\n\n if (Platform.OS === \"ios\" && SymbolView) {\n return (\n <View {...a11y} testID={testID} style={{ width: size, height: size }}>\n <SymbolView name={SF_SYMBOLS[name]} size={size} tintColor={tint} weight={weight} fallback={fallback} style={{ width: size, height: size }} />\n </View>\n );\n }\n if (!fallback) warnOnce(name);\n return (\n <View {...a11y} testID={testID} style={{ width: size, height: size, alignItems: \"center\", justifyContent: \"center\" }}>\n {fallback}\n </View>\n );\n}\n","/**\n * ListItem — recurring row in a list (settings, contacts, results).\n *\n * Slots: leading (avatar / icon), title, subtitle, trailing\n * (chevron / accessory / action). Supports pressable variants with\n * automatic divider rendering between adjacent items via a wrapper\n * pattern (see <NativeListItemDivider>).\n *\n * For platform-default chevrons, pass `showChevron`; the chevron uses\n * the muted-foreground token.\n *\n * @stability Beta\n */\nimport { Platform, Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { NativeIcon } from \"./icon\";\n\nexport interface NativeListItemProps {\n title: string;\n subtitle?: string;\n /** Slot rendered to the left of the title (avatar / icon). */\n leading?: React.ReactNode;\n /** Slot rendered to the right of the title (badge / accessory). */\n trailing?: React.ReactNode;\n /** When true, renders a chevron-right at the end. */\n showChevron?: boolean;\n /** When provided, the row becomes pressable. */\n onPress?: () => void;\n disabled?: boolean;\n /**\n * What a pressable row is to a screen reader. Default `button`; a row that flips its switch\n * (NativeToggleRow) is a `switch`, and one choice of several (NativeWorkspaceSwitcher) a\n * `radio`, each with `accessibilityState.checked`.\n */\n accessibilityRole?: \"button\" | \"switch\" | \"link\" | \"menuitem\" | \"radio\";\n /**\n * What a screen reader reads for the row. Default its title and subtitle. The row is one\n * element, so a `trailing` badge's own label is not read: put its words here too.\n */\n accessibilityLabel?: string;\n /** Merged over the row's own (`disabled`). */\n accessibilityState?: { checked?: boolean; selected?: boolean };\n className?: string;\n testID?: string;\n}\n\nexport function NativeListItem({\n title,\n subtitle,\n leading,\n trailing,\n showChevron,\n onPress,\n disabled,\n accessibilityRole = \"button\",\n accessibilityState,\n accessibilityLabel,\n className,\n testID,\n}: NativeListItemProps) {\n const inner = (\n <>\n {leading ? <View className=\"mr-3\">{leading}</View> : null}\n <View className=\"flex-1\">\n <Text className=\"text-base text-foreground\" numberOfLines={1}>\n {title}\n </Text>\n {subtitle ? (\n <Text\n className=\"mt-0.5 text-xs text-muted-foreground\"\n numberOfLines={2}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n {trailing ? <View className=\"ml-3\">{trailing}</View> : null}\n {showChevron ? <Chevron /> : null}\n </>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"native-list-item\"}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={accessibilityLabel ?? (subtitle ? `${title}, ${subtitle}` : title)}\n accessibilityState={{ disabled, ...accessibilityState }}\n disabled={disabled}\n onPress={onPress}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n disabled && \"opacity-50\",\n className\n )}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View\n testID={testID ?? \"native-list-item\"}\n accessibilityLabel={accessibilityLabel ?? (subtitle ? `${title}, ${subtitle}` : title)}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n className\n )}\n >\n {inner}\n </View>\n );\n}\n\n/**\n * The drill-in chevron: an SF Symbol on iOS or the app's icon set\n * (`modules.symbol` / `modules.icons`) when given, else a text \"›\".\n */\nfunction Chevron() {\n const { symbol, icons } = useGenesisModules();\n const roles = useThemeRoles();\n if ((Platform.OS === \"ios\" && symbol) || icons?.[\"chevron-right\"]) {\n return (\n <View className=\"ml-2\">\n <NativeIcon name=\"chevron-right\" size={14} weight=\"semibold\" color={roles.tertiaryLabel} testID=\"native-list-item-chevron\" />\n </View>\n );\n }\n return (\n <Text\n accessibilityElementsHidden\n className=\"ml-2 text-base text-muted-foreground\"\n >\n ›\n </Text>\n );\n}\n\nexport function NativeListItemDivider({ className }: { className?: string }) {\n return <View className={cn(\"h-px bg-border\", className)} />;\n}\n","/**\n * SectionList header pattern — opinionated header style for\n * react-native SectionList rows.\n *\n * The full SectionList API stays with React Native; Genesis ships the\n * header component so consumers can pass it as `renderSectionHeader`\n * and get a consistent visual: muted background, uppercase tracking,\n * sticky-friendly padding.\n *\n * Pattern:\n *\n * <SectionList\n * sections={...}\n * renderItem={({ item }) => <NativeListItem title={item.label} />}\n * renderSectionHeader={({ section }) => (\n * <NativeSectionListHeader title={section.title} />\n * )}\n * />\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSectionListHeaderProps {\n title: string;\n /** Optional trailing content (e.g., a count badge). */\n trailing?: React.ReactNode;\n className?: string;\n testID?: string;\n}\n\nexport function NativeSectionListHeader({\n title,\n trailing,\n className,\n testID,\n}: NativeSectionListHeaderProps) {\n return (\n <View\n testID={testID ?? \"native-section-header\"}\n accessibilityRole=\"header\"\n className={cn(\n \"flex-row items-center justify-between border-b border-border bg-muted px-4 py-2\",\n className\n )}\n >\n <Text className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {title}\n </Text>\n {trailing}\n </View>\n );\n}\n","/**\n * RefreshControl wrapper — token-aware tint over RN's RefreshControl.\n *\n * Use as the `refreshControl` prop on ScrollView / FlatList / SectionList.\n * The tint defaults to the theme's `tint` role; consumers can override\n * per-call. We re-export RN's\n * RefreshControl shape so the API mirrors what consumers already know.\n *\n * @stability Beta\n */\nimport { RefreshControl } from \"react-native\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\n\nexport interface NativeRefreshControlProps {\n refreshing: boolean;\n onRefresh: () => void;\n /** Hex / RGB color override. Falls back to the theme primary. */\n tintColor?: string;\n /** Title shown under the iOS spinner. */\n title?: string;\n /** Color of the iOS title text. */\n titleColor?: string;\n /** Android colors prop (an array of progress colors). */\n colors?: string[];\n /** Android progress background. */\n progressBackgroundColor?: string;\n testID?: string;\n}\n\n/**\n * Pull to refresh, tinted with the theme's `tint` role. Works under any Genesis root.\n */\n// The tint comes from `useThemeRoles`, not `useGenesisTheme` from `providers/native`: that is\n// another context, which the native app shell's `GenesisThemeProvider` never mounts, so it threw there.\nexport function NativeRefreshControl({ tintColor, colors, testID, ...rest }: NativeRefreshControlProps) {\n const tint = useThemeRoles().tint;\n const androidTint = typeof tint === \"string\" ? [tint] : undefined;\n return <RefreshControl {...rest} tintColor={tintColor ?? (tint as string)} colors={colors ?? androidTint} testID={testID ?? \"native-refresh-control\"} />;\n}\n","/**\n * Badge — compact status / count / category tag.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst badgeVariants = cva(\n \"flex-row items-center self-start rounded-full border px-2.5 py-0.5\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary\",\n secondary: \"border-transparent bg-secondary\",\n destructive: \"border-transparent bg-destructive\",\n outline: \"border-border bg-transparent\",\n success: \"border-transparent bg-success/15\",\n warning: \"border-transparent bg-warning/15\",\n info: \"border-transparent bg-info/15\",\n muted: \"border-transparent bg-muted\",\n // The tinted red (StatusBadge's offTrack / blocked, a \"danger\" chip); `destructive` is the solid fill.\n danger: \"border-transparent bg-destructive/15 dark:bg-destructive/20\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst badgeTextVariants = cva(\"text-xs font-medium\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n destructive: \"text-destructive-foreground\",\n outline: \"text-foreground\",\n // AA-safe status text on the /15 tint. The bare status token\n // (text-success ~2.2:1) fails WCAG AA. The `-dark` stop is optional in\n // the brand schema (only `status.*.DEFAULT` is required) AND regresses\n // dark mode — a dark shade on the dark-surface tint drops to ~1.7–2.6:1.\n // Instead use the semantic Tailwind ramp (always present, brand-\n // independent, same hues as the Genesis status tokens) with a `dark:`\n // stop. Measured: light /15 tint emerald-700 4.76 / amber-800 6.32 /\n // blue-700 5.64; dark-surface tint emerald-300 ≥8.2 / amber-200 ≥10.8 /\n // blue-300 ≥8.2 — AA in both modes across the static preset and the\n // themeFromBrand() runtime dark map.\n success: \"text-emerald-700 dark:text-emerald-300\",\n warning: \"text-amber-800 dark:text-amber-200\",\n info: \"text-blue-700 dark:text-blue-300\",\n muted: \"text-muted-foreground\",\n danger: \"text-red-700 dark:text-red-300\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeBadgeProps\n extends VariantProps<typeof badgeVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n accessibilityLabel?: string;\n testID?: string;\n}\n\nfunction NativeBadge({\n className,\n textClassName,\n variant,\n children,\n ...props\n}: NativeBadgeProps) {\n return (\n <View className={cn(badgeVariants({ variant }), className)} accessibilityRole=\"text\" {...props}>\n {typeof children === \"string\" ? (\n <Text\n className={cn(badgeTextVariants({ variant }), textClassName)}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n );\n}\n\nexport { NativeBadge, badgeVariants, badgeTextVariants };\n","/**\n * Input — single-line text field.\n *\n * @stability Stable\n */\nimport type { ComponentRef, Ref } from \"react\";\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeInputProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n /**\n * Content fixed before the text, inside the field's border: an icon, a currency sign, \"https://\".\n * With `leading` or `trailing` the field is an input group (NativeInputGroup).\n */\n leading?: React.ReactNode;\n /** Content fixed after the text, inside the field's border: a unit, a clear or show button. */\n trailing?: React.ReactNode;\n /** The underlying TextInput (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof TextInput>> | undefined;\n}\n\nfunction NativeInput({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n placeholderTextColor,\n leading,\n trailing,\n ...props\n}: NativeInputProps) {\n const grouped = leading != null || trailing != null;\n const input = (\n <TextInput\n className={cn(\n \"h-10 rounded-md border border-input bg-background px-3 text-base text-foreground\",\n !editable && !grouped && \"opacity-50\",\n error && \"border-destructive\",\n grouped && \"h-full min-w-0 flex-1 border-0 bg-transparent\",\n inputClassName\n )}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}\n accessibilityLabel={label}\n {...props}\n />\n );\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">\n {label}\n </Text>\n ) : null}\n {grouped ? (\n <View\n className={cn(\n \"h-10 flex-row items-center rounded-md border border-input bg-background\",\n !editable && \"opacity-50\",\n error && \"border-destructive\"\n )}\n >\n {leading != null ? <View className=\"pl-3\">{leading}</View> : null}\n {input}\n {trailing != null ? <View className=\"pr-1\">{trailing}</View> : null}\n </View>\n ) : (\n input\n )}\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeInput };\n","/**\n * Skeleton — loading placeholder block.\n *\n * Pulses with Reanimated 4 when the app passes it (`modules.reanimated` on\n * `GenesisModulesProvider`), else with React Native's Animated. While Reduce\n * Motion is on it holds still at a legible opacity.\n *\n * @stability Stable\n */\nimport { useEffect, useRef } from \"react\";\nimport { Animated, Easing } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useMotion } from \"../hooks/use-motion\";\nimport { useGenesisModules, type GenesisReanimatedModule } from \"../native-modules\";\n\nexport interface NativeSkeletonProps {\n className?: string;\n /**\n * Width of the skeleton. Use className for NativeWind sizing instead\n * when possible (e.g. className=\"w-24 h-4\").\n */\n width?: number;\n height?: number;\n /** Shorthand that sets both width and height (useful for circle skeletons). */\n size?: number;\n circle?: boolean;\n testID?: string;\n}\n\nconst LOW = 0.3;\nconst HIGH = 1;\n// Held still under Reduce Motion (visual-regression flow\n// `screenshot-reduced-motion.yaml`; Apple HIG / WCAG 2.3.3).\nconst STILL = 0.6;\n\nfunction sizeStyles({ width, height, size }: NativeSkeletonProps): Array<{ width?: number; height?: number }> {\n const w = width ?? size;\n const h = height ?? size;\n const styles: Array<{ width?: number; height?: number }> = [];\n if (w !== undefined) styles.push({ width: w });\n if (h !== undefined) styles.push({ height: h });\n return styles;\n}\n\nfunction skeletonClass({ className, circle }: NativeSkeletonProps) {\n return cn(\"rounded-md bg-muted\", circle && \"rounded-full\", className);\n}\n\nfunction NativeSkeleton(props: NativeSkeletonProps) {\n const { reanimated } = useGenesisModules();\n return reanimated ? <ReanimatedSkeleton {...props} reanimated={reanimated} /> : <AnimatedSkeleton {...props} />;\n}\n\nfunction ReanimatedSkeleton({ reanimated: R, ...props }: NativeSkeletonProps & { reanimated: GenesisReanimatedModule }) {\n // One pulse cycle from the shared motion tokens; under Reduce Motion it holds still (a zero-length repeat would flash).\n const motion = useMotion();\n const reduceMotion = motion.reduced;\n const PULSE_MS = motion.duration.pulse;\n const opacity = R.useSharedValue(LOW);\n useEffect(() => {\n R.cancelAnimation(opacity);\n if (reduceMotion) {\n opacity.value = STILL;\n return undefined;\n }\n opacity.value = LOW;\n opacity.value = R.withRepeat(R.withTiming(HIGH, { duration: PULSE_MS, easing: R.Easing.inOut(R.Easing.ease) }), -1, true);\n return () => R.cancelAnimation(opacity);\n // `R` and `opacity` are stable for the component's life.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reduceMotion]);\n const animatedStyle = R.useAnimatedStyle(() => {\n \"worklet\";\n return { opacity: opacity.value };\n });\n const AnimatedView = R.default.View;\n return (\n <AnimatedView\n className={skeletonClass(props)}\n style={[animatedStyle, ...sizeStyles(props)]}\n testID={props.testID}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n );\n}\n\nfunction AnimatedSkeleton(props: NativeSkeletonProps) {\n const opacity = useRef(new Animated.Value(LOW)).current;\n // One pulse cycle from the shared motion tokens; under Reduce Motion it holds still (a zero-length repeat would flash).\n const motion = useMotion();\n const reduceMotion = motion.reduced;\n const PULSE_MS = motion.duration.pulse;\n\n useEffect(() => {\n if (reduceMotion) {\n opacity.setValue(STILL);\n return;\n }\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(opacity, {\n toValue: HIGH,\n duration: PULSE_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n Animated.timing(opacity, {\n toValue: LOW,\n duration: PULSE_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n ])\n );\n animation.start();\n return () => animation.stop();\n }, [opacity, reduceMotion]);\n\n return (\n <Animated.View\n className={skeletonClass(props)}\n style={[{ opacity }, ...sizeStyles(props)] as any[]}\n testID={props.testID}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n );\n}\n\nexport { NativeSkeleton };\n","/**\n * LoadingState — a centred spinner for a screen (or part of one) that is\n * waiting: a redirect while the session loads, the first fetch of a page.\n *\n * Use it instead of a hand-rolled `<View><ActivityIndicator /></View>`: the\n * spinner takes the theme tint, screen readers hear one \"Loading\" progress\n * bar (or your `label`), and the full-screen form sits inside the safe area\n * on the screen background. For content-shaped placeholders (a list about to\n * appear) use `NativeSkeleton`; for known progress use `NativeProgress`.\n *\n * if (!session) return <NativeLoadingState />; // whole screen\n * <NativeLoadingState fullScreen={false} label=\"Loading more\" size=\"small\" />\n *\n * `ScreenContainer loading` renders the inline form in place of its body.\n *\n * @stability Beta\n */\nimport { ActivityIndicator, View, type ColorValue } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { cn } from \"../utils\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeText } from \"./text\";\n\nexport type NativeLoadingStateEdge = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport interface NativeLoadingStateProps {\n /** Text shown under the spinner. It is also what screen readers announce. */\n label?: string;\n /** What screen readers announce when no `label` is shown. Default `\"Loading\"`. */\n accessibilityLabel?: string;\n /** Spinner size. Default `\"large\"`. */\n size?: \"small\" | \"large\";\n /**\n * `true` (default): fill the screen on the theme background, inside the\n * safe area. `false`: a padded, centred block that fills its parent, for a\n * screen body, a section or a list footer.\n */\n fullScreen?: boolean;\n /** Safe-area edges when `fullScreen`. Default all four. */\n safeAreaEdges?: NativeLoadingStateEdge[];\n /** Spinner color. Defaults to the theme tint. */\n color?: ColorValue;\n className?: string;\n /** testID on the root; the spinner is `${testID}-spinner`, the label `${testID}-label`. Default `\"loading-state\"`. */\n testID?: string;\n}\n\nconst ALL_EDGES: NativeLoadingStateEdge[] = [\"top\", \"bottom\", \"left\", \"right\"];\n\nexport function NativeLoadingState({\n label,\n accessibilityLabel,\n size = \"large\",\n fullScreen = true,\n safeAreaEdges = ALL_EDGES,\n color,\n className,\n testID = \"loading-state\",\n}: NativeLoadingStateProps) {\n const roles = useThemeRoles();\n const spoken = label ?? accessibilityLabel ?? \"Loading\";\n\n const content = (\n <View\n testID={fullScreen ? `${testID}-content` : testID}\n className={cn(\"items-center justify-center gap-3 px-4 py-8\", !fullScreen && \"flex-grow\", !fullScreen && className)}\n accessible\n accessibilityRole=\"progressbar\"\n accessibilityLabel={spoken}\n accessibilityState={{ busy: true }}\n >\n <ActivityIndicator testID={`${testID}-spinner`} size={size} color={(color ?? roles.tint) as string} />\n {label ? (\n <NativeText testID={`${testID}-label`} preset=\"body-sm\" className=\"text-muted-foreground text-center\">\n {label}\n </NativeText>\n ) : null}\n </View>\n );\n\n if (!fullScreen) return content;\n\n return (\n <SafeAreaView\n testID={testID}\n edges={safeAreaEdges}\n className={cn(\"flex-1 items-center justify-center bg-background\", className)}\n >\n {content}\n </SafeAreaView>\n );\n}\n","/**\n * NativeImage — a remote picture (thumbnail, cover, photo) with caching.\n *\n * Draws with expo-image when the app passes it (`modules.image` on\n * `GenesisModulesProvider`): cached in memory and on disk, an optional\n * blurhash/thumbhash `placeholder`, a cross-fade that Reduce Motion turns\n * off, and a `recyclingKey` (the URL by default) so a recycled FlashList row\n * never flashes the previous picture. A `cacheKey` caches the picture under a\n * stable key instead of its URL, for signed URLs that rotate (a new expiry or\n * signature would otherwise miss the disk cache and download it again).\n * Without it, React Native's `Image`.\n *\n * Give it a size (className or `width`/`height`). Decorative unless `alt` is\n * given.\n *\n * @stability Beta\n */\nimport { Image, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useReducedMotion } from \"../hooks/use-reduced-motion\";\nimport { useGenesisModules } from \"../native-modules\";\n\nexport interface NativeImageProps {\n src: string;\n /** Read by screen readers. Without it the picture is decorative. */\n alt?: string;\n className?: string;\n width?: number;\n height?: number;\n /** Default `\"cover\"`. */\n contentFit?: \"cover\" | \"contain\";\n /** expo-image only: `{ blurhash }` or `{ thumbhash }` shown while loading. */\n placeholder?: { blurhash: string } | { thumbhash: string };\n /**\n * expo-image only: caches the picture under this key instead of its URL, so a signed URL\n * that rotates (a new expiry or signature for the same file) still hits the memory and disk\n * cache. Use a key that names the file, such as its storage path or id.\n */\n cacheKey?: string;\n /** expo-image only: resets the view when it changes (recycled rows). Default `cacheKey`, then `src`. */\n recyclingKey?: string;\n /** expo-image only: load order among images. */\n priority?: \"low\" | \"normal\" | \"high\";\n /** The picture couldn't be loaded (draw a fallback). */\n onError?: () => void;\n testID?: string;\n}\n\nconst FILL = { position: \"absolute\" as const, top: 0, right: 0, bottom: 0, left: 0 };\n\nexport function NativeImage({\n src,\n alt,\n className,\n width,\n height,\n contentFit = \"cover\",\n placeholder,\n cacheKey,\n recyclingKey,\n priority,\n onError,\n testID,\n}: NativeImageProps) {\n const { image: ExpoImage } = useGenesisModules();\n const reducedMotion = useReducedMotion();\n const a11y = alt\n ? { accessible: true, accessibilityRole: \"image\" as const, accessibilityLabel: alt }\n : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: \"no-hide-descendants\" as const };\n return (\n <View\n {...a11y}\n testID={testID}\n className={cn(\"overflow-hidden bg-muted\", className)}\n style={width !== undefined || height !== undefined ? { width, height } : undefined}\n >\n {ExpoImage ? (\n <ExpoImage\n testID={testID ? `${testID}-image` : undefined}\n accessible={false}\n source={cacheKey ? { uri: src, cacheKey } : { uri: src }}\n style={FILL}\n contentFit={contentFit}\n cachePolicy=\"memory-disk\"\n placeholder={placeholder}\n placeholderContentFit={contentFit}\n transition={reducedMotion ? null : 150}\n // A rotated URL for the same picture keeps the view, so it doesn't flash.\n recyclingKey={recyclingKey ?? cacheKey ?? src}\n priority={priority}\n onError={onError}\n />\n ) : (\n <Image\n testID={testID ? `${testID}-image` : undefined}\n accessible={false}\n source={{ uri: src }}\n style={FILL}\n resizeMode={contentFit}\n onError={onError}\n />\n )}\n </View>\n );\n}\n","/**\n * NativeContextMenu — what a long press opens: a short list of actions in a\n * sheet that fits them, with Cancel, instead of the system `Alert`. It's the\n * same on iOS and Android, a row of its own for each action (44pt, a destructive\n * one in the theme's `destructive`), and opening it taps `medium`.\n *\n * Controlled, like `NativeSheet`: keep `open` in your screen and set it from\n * `onLongPress`. Offer the same actions as accessibility actions on the\n * pressable too (`accessibilityActions`), since VoiceOver doesn't long press.\n *\n * An action runs once, and once the sheet has gone: iOS won't present an alert\n * or another modal over one that's still dismissing.\n *\n * @stability Beta\n */\nimport { useEffect, useRef } from \"react\";\nimport { Platform, Pressable, View } from \"react-native\";\nimport { useHaptics } from \"../hooks/use-haptics\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeSheet } from \"./sheet\";\nimport { NativeText } from \"./text\";\n\nexport interface NativeContextMenuAction {\n id: string;\n label: string;\n onPress: () => void;\n destructive?: boolean;\n}\n\nexport interface NativeContextMenuProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n actions: readonly NativeContextMenuAction[];\n /** Over the actions: what they act on. */\n title?: string;\n cancelLabel?: string;\n testID?: string;\n}\n\n/** If iOS never says the sheet has gone (Modal's `onDismiss` can be skipped), run the action after this. */\nconst IOS_DISMISS_FALLBACK_MS = 600;\n\nexport function NativeContextMenu({ open, onOpenChange, actions, title, cancelLabel = \"Cancel\", testID = \"context-menu\" }: NativeContextMenuProps) {\n const colors = useThemeRoles();\n const play = useHaptics();\n const opened = useRef(false);\n // What was tapped, until the sheet has gone. Taken once: a second tap, or the fallback after onDismiss, finds nothing.\n const tapped = useRef<(() => void) | null>(null);\n const ran = useRef(false);\n const fallback = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => {\n if (open && !opened.current) {\n play(\"medium\");\n ran.current = false;\n }\n opened.current = open;\n }, [open, play]);\n\n const runTapped = () => {\n if (fallback.current) clearTimeout(fallback.current);\n fallback.current = null;\n const action = tapped.current;\n tapped.current = null;\n action?.();\n };\n const run = (action: NativeContextMenuAction) => {\n if (ran.current) return;\n ran.current = true;\n tapped.current = action.onPress;\n onOpenChange(false);\n if (Platform.OS === \"ios\") fallback.current = setTimeout(runTapped, IOS_DISMISS_FALLBACK_MS);\n else runTapped();\n };\n\n return (\n <NativeSheet open={open} onOpenChange={onOpenChange} fitContent onDismissed={runTapped} testID={testID}>\n <View style={{ paddingHorizontal: 16, paddingBottom: 8 }}>\n {title ? (\n <NativeText testID={`${testID}-title`} accessibilityRole=\"header\" numberOfLines={2} style={{ paddingVertical: 8, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textAlign: \"center\" }}>\n {title}\n </NativeText>\n ) : null}\n {actions.map((action) => (\n <Pressable\n key={action.id}\n testID={`${testID}-action-${action.id}`}\n accessibilityRole=\"button\"\n accessibilityLabel={action.label}\n onPress={() => run(action)}\n style={{ minHeight: 48, alignItems: \"center\", justifyContent: \"center\" }}\n >\n <NativeText style={{ color: action.destructive ? colors.destructive : colors.tint, fontSize: 17, lineHeight: 22 }}>{action.label}</NativeText>\n </Pressable>\n ))}\n <Pressable testID={`${testID}-cancel`} accessibilityRole=\"button\" accessibilityLabel={cancelLabel} onPress={() => onOpenChange(false)} style={{ minHeight: 48, alignItems: \"center\", justifyContent: \"center\" }}>\n <NativeText style={{ color: colors.label, fontSize: 17, lineHeight: 22, fontWeight: \"600\" }}>{cancelLabel}</NativeText>\n </Pressable>\n </View>\n </NativeSheet>\n );\n}\n","/**\n * NativeSwipeRow — a row with actions behind a swipe: Archive to one side,\n * Delete to the other (each action's `side`, trailing by default).\n *\n * The gesture is the app's `GenesisModules.swipeable` (react-native-gesture-\n * handler's `ReanimatedSwipeable`, an optional peer). Without it, the row draws\n * as it is, so an action must always be reachable another way too: `InboxPage`\n * puts them in the accessibility actions and on long press. The buttons behind\n * the row are hidden from VoiceOver for that reason (a screen reader doesn't\n * swipe), and a swipe that opens taps `medium` through `useHaptics`.\n *\n * @stability Beta\n */\nimport { useRef, type ReactNode } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport type { InboxSwipeAction } from \"@marktiderman/genesis-core/conversation\";\nimport { useHaptics } from \"../hooks/use-haptics\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { NativeText } from \"./text\";\n\nexport interface NativeSwipeRowProps {\n actions: readonly InboxSwipeAction[];\n children?: ReactNode;\n testID?: string;\n}\n\n/** A button's width behind the row: room for a short label. */\nconst ACTION_WIDTH = 80;\n\nexport function NativeSwipeRow({ actions, children, testID = \"swipe-row\" }: NativeSwipeRowProps) {\n const { swipeable: Swipeable } = useGenesisModules();\n const colors = useThemeRoles();\n const play = useHaptics();\n const swipe = useRef<{ close?: () => void } | null>(null);\n if (!Swipeable || actions.length === 0) return <>{children}</>;\n\n const leading = actions.filter((a) => a.side === \"leading\");\n const trailing = actions.filter((a) => a.side !== \"leading\");\n const group = (list: readonly InboxSwipeAction[]) => () => (\n <View accessibilityElementsHidden importantForAccessibility=\"no-hide-descendants\" style={{ flexDirection: \"row\" }}>\n {list.map((action) => (\n <Pressable\n key={action.id}\n testID={`${testID}-action-${action.id}`}\n onPress={() => {\n swipe.current?.close?.();\n action.onPress();\n }}\n style={{ width: ACTION_WIDTH, alignItems: \"center\", justifyContent: \"center\", backgroundColor: action.destructive ? colors.destructive : colors.tint }}\n >\n <NativeText className={action.destructive ? \"text-destructive-foreground\" : \"text-primary-foreground\"} preset=\"label\">\n {action.label}\n </NativeText>\n </Pressable>\n ))}\n </View>\n );\n\n return (\n <Swipeable\n ref={swipe}\n testID={testID}\n friction={2}\n overshootLeft={false}\n overshootRight={false}\n onSwipeableWillOpen={() => play(\"medium\")}\n renderLeftActions={leading.length ? group(leading) : undefined}\n renderRightActions={trailing.length ? group(trailing) : undefined}\n >\n {children}\n </Swipeable>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { NativeLoadingState, NativeRefreshControl, NativeSwipeRow, NativeContextMenu, NativeText, NativeBadge, NativeEmptyState, NativeButton } from './chunk-VEWSY4TZ.js';
2
- import { useThemeMode, useThemeRoles } from './chunk-PMS2V46D.js';
1
+ import { NativeLoadingState, NativeRefreshControl, NativeSwipeRow, NativeContextMenu, NativeText, NativeBadge, NativeEmptyState, NativeButton } from './chunk-D4UU6KIF.js';
2
+ import { useThemeMode, useThemeRoles } from './chunk-VHUUOH46.js';
3
3
  import { cn } from './chunk-OHZD7KRO.js';
4
4
  import { View, ScrollView, StatusBar, Pressable, Text, TextInput, FlatList, Platform, Alert, StyleSheet } from 'react-native';
5
5
  import { SafeAreaView } from 'react-native-safe-area-context';
@@ -485,5 +485,5 @@ function DefaultEmpty({ title, body, actionLabel, onAction, testID }) {
485
485
  }
486
486
 
487
487
  export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, getInboxPageStackOptions, showInboxActions };
488
- //# sourceMappingURL=chunk-GGH3ZQNO.js.map
489
- //# sourceMappingURL=chunk-GGH3ZQNO.js.map
488
+ //# sourceMappingURL=chunk-TUDJDIGC.js.map
489
+ //# sourceMappingURL=chunk-TUDJDIGC.js.map