@marktiderman/genesis-ui-native 2.5.0 → 2.6.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 (39) hide show
  1. package/dist/{chunk-IDHW2NOP.js → chunk-3S5XVER4.js} +231 -6
  2. package/dist/chunk-3S5XVER4.js.map +1 -0
  3. package/dist/chunk-56QLEHHV.js +1231 -0
  4. package/dist/chunk-56QLEHHV.js.map +1 -0
  5. package/dist/chunk-6JBNSW4D.js +479 -0
  6. package/dist/chunk-6JBNSW4D.js.map +1 -0
  7. package/dist/{chunk-YJV5MMZX.js → chunk-KZEIF4YI.js} +7 -741
  8. package/dist/chunk-KZEIF4YI.js.map +1 -0
  9. package/dist/{chunk-YI7XVY2D.js → chunk-VMSIKSU2.js} +13 -479
  10. package/dist/chunk-VMSIKSU2.js.map +1 -0
  11. package/dist/components/index.d.ts +3 -1
  12. package/dist/components/index.js +3 -4
  13. package/dist/data/index.d.ts +382 -4
  14. package/dist/data/index.js +1067 -19
  15. package/dist/data/index.js.map +1 -1
  16. package/dist/inbox-page-DZUR-PJ1.d.ts +199 -0
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.js +5 -5
  19. package/dist/layouts/index.d.ts +4 -195
  20. package/dist/layouts/index.js +3 -3
  21. package/package.json +2 -2
  22. package/src/components/image.tsx +5 -0
  23. package/src/data/NativeDetailPanel.tsx +8 -1
  24. package/src/data/index.ts +1 -0
  25. package/src/data/resource-view/NativeResourceFormSheet.tsx +305 -0
  26. package/src/data/resource-view/NativeResourceView.tsx +528 -0
  27. package/src/data/resource-view/__tests__/native-resource-view.test.tsx +870 -0
  28. package/src/data/resource-view/display.tsx +256 -0
  29. package/src/data/resource-view/index.ts +50 -0
  30. package/src/data/resource-view/mapping.ts +326 -0
  31. package/src/data/resource-view/messages.ts +121 -0
  32. package/src/data/resource-view/use-native-resource-view.ts +307 -0
  33. package/dist/chunk-EFXCJ5AN.js +0 -234
  34. package/dist/chunk-EFXCJ5AN.js.map +0 -1
  35. package/dist/chunk-FIITITXO.js +0 -492
  36. package/dist/chunk-FIITITXO.js.map +0 -1
  37. package/dist/chunk-IDHW2NOP.js.map +0 -1
  38. package/dist/chunk-YI7XVY2D.js.map +0 -1
  39. package/dist/chunk-YJV5MMZX.js.map +0 -1
@@ -1,232 +1,13 @@
1
- import { NativeLoadingState, NativeListItem, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl } from './chunk-IDHW2NOP.js';
2
- import { NativeText, NativeButton, useGenesisModules, NativeBadge, NativeInput } from './chunk-EFXCJ5AN.js';
3
- import { useThemeMode, useThemeRoles } from './chunk-Z3AQYVUA.js';
1
+ import { composeHeaderOptions, ScreenContainer, NavBarSaveButton } from './chunk-6JBNSW4D.js';
2
+ import { NativeText, NativeListItem, NativeButton, useGenesisModules, NativeSectionListHeader, NativeEmptyState, NativeInput } from './chunk-3S5XVER4.js';
3
+ import { useThemeRoles, useThemeMode } from './chunk-Z3AQYVUA.js';
4
4
  import { cn } from './chunk-OHZD7KRO.js';
5
- import { View, ScrollView, StatusBar, Pressable, Text, TextInput, Platform, StyleSheet, Alert, KeyboardAvoidingView, RefreshControl, SectionList, FlatList, Image, ActivityIndicator } from 'react-native';
6
- import { SafeAreaView, SafeAreaInsetsContext } from 'react-native-safe-area-context';
7
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
- import { nativeColors } from '@marktiderman/genesis-design-system/tokens/native';
9
5
  import { createContext, Fragment, useState, useMemo, createElement, useContext, useCallback, useRef, useEffect } from 'react';
10
6
  import { renderSlot } from '@marktiderman/genesis-core/slots';
7
+ import { Platform, View, StyleSheet, Alert, KeyboardAvoidingView, ScrollView, RefreshControl, SectionList, Pressable, Image, TextInput, ActivityIndicator, Text } from 'react-native';
8
+ import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
9
+ import { SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';
11
10
 
12
- function composeHeaderOptions(props) {
13
- const {
14
- headerTitle,
15
- headerLeft,
16
- headerRight,
17
- large,
18
- scrollEdgeBehavior,
19
- headerOptions
20
- } = props;
21
- const opts = {};
22
- if (headerTitle !== void 0) opts.title = headerTitle;
23
- if (headerLeft) opts.headerLeft = headerLeft;
24
- if (headerRight) opts.headerRight = headerRight;
25
- if (large) {
26
- opts.headerLargeTitle = true;
27
- if (scrollEdgeBehavior === "transparent") {
28
- opts.headerTransparent = true;
29
- } else if (scrollEdgeBehavior === "opaque") {
30
- opts.headerLargeTitleShadowVisible = true;
31
- }
32
- }
33
- if (headerOptions) {
34
- Object.assign(opts, headerOptions);
35
- }
36
- return opts;
37
- }
38
- var DEFAULT_EDGES = ["left", "right"];
39
- var TRANSLUCENT_ANDROID_BAR = { translucent: true, backgroundColor: "transparent" };
40
- function resolveBarStyle(statusBar, resolvedMode) {
41
- if (statusBar === "auto") {
42
- return resolvedMode === "dark" ? "light-content" : "dark-content";
43
- }
44
- if (statusBar === "light") return "light-content";
45
- if (statusBar === "dark") return "dark-content";
46
- return "default";
47
- }
48
- function ScreenContainer({
49
- children,
50
- scroll = false,
51
- safeAreaEdges = DEFAULT_EDGES,
52
- statusBar = "auto",
53
- themeMode = "system",
54
- className,
55
- contentClassName,
56
- keyboardShouldPersistTaps = "handled",
57
- loading = false,
58
- loadingLabel,
59
- style,
60
- testID
61
- }) {
62
- const osMode = useThemeMode();
63
- const resolvedMode = themeMode === "system" ? osMode : themeMode;
64
- const barStyle = resolveBarStyle(statusBar, resolvedMode);
65
- const body = loading ? /* @__PURE__ */ jsx(View, { testID: testID ? `${testID}-body` : void 0, className: cn("flex-1", contentClassName), children: /* @__PURE__ */ jsx(NativeLoadingState, { fullScreen: false, label: loadingLabel, testID: `${testID ?? "screen-container"}-loading` }) }) : scroll ? /* @__PURE__ */ jsx(
66
- ScrollView,
67
- {
68
- testID: testID ? `${testID}-scroll` : void 0,
69
- keyboardShouldPersistTaps,
70
- contentInsetAdjustmentBehavior: "automatic",
71
- contentContainerClassName: cn("flex-grow", contentClassName),
72
- children
73
- }
74
- ) : /* @__PURE__ */ jsx(
75
- View,
76
- {
77
- testID: testID ? `${testID}-body` : void 0,
78
- className: cn("flex-1", contentClassName),
79
- children
80
- }
81
- );
82
- return /* @__PURE__ */ jsxs(
83
- SafeAreaView,
84
- {
85
- testID: testID ?? "screen-container",
86
- edges: safeAreaEdges,
87
- className: cn("flex-1 bg-background", className),
88
- style,
89
- children: [
90
- statusBar !== "hidden" ? /* @__PURE__ */ jsx(
91
- StatusBar,
92
- {
93
- barStyle,
94
- ...TRANSLUCENT_ANDROID_BAR
95
- }
96
- ) : /* @__PURE__ */ jsx(StatusBar, { hidden: true }),
97
- body
98
- ]
99
- }
100
- );
101
- }
102
- function NavBarSaveButton({
103
- onPress,
104
- label = "Save",
105
- disabled,
106
- loading,
107
- destructive,
108
- className,
109
- testID
110
- }) {
111
- const isDisabled = !!disabled || !!loading || !onPress;
112
- return /* @__PURE__ */ jsx(
113
- Pressable,
114
- {
115
- testID: testID ?? "nav-bar-save-button",
116
- accessibilityRole: "button",
117
- accessibilityLabel: label,
118
- accessibilityState: { disabled: isDisabled, busy: !!loading },
119
- onPress: isDisabled ? void 0 : onPress,
120
- disabled: isDisabled,
121
- className: cn("min-h-[44px] justify-center px-3", className),
122
- hitSlop: 8,
123
- children: /* @__PURE__ */ jsx(
124
- Text,
125
- {
126
- className: cn(
127
- "text-base font-semibold",
128
- destructive ? "text-destructive" : "text-primary",
129
- isDisabled && "opacity-40"
130
- ),
131
- children: loading ? "\u2026" : label
132
- }
133
- )
134
- }
135
- );
136
- }
137
- function NavBarTitle({
138
- title,
139
- subtitle,
140
- onPress,
141
- className,
142
- testID
143
- }) {
144
- const inner = /* @__PURE__ */ jsxs(View, { className: cn("items-center justify-center", className), children: [
145
- /* @__PURE__ */ jsx(
146
- Text,
147
- {
148
- testID: testID ? `${testID}-title` : void 0,
149
- className: "text-base font-semibold text-foreground",
150
- numberOfLines: 1,
151
- children: title
152
- }
153
- ),
154
- subtitle ? /* @__PURE__ */ jsx(
155
- Text,
156
- {
157
- testID: testID ? `${testID}-subtitle` : void 0,
158
- className: "text-xs text-muted-foreground",
159
- numberOfLines: 1,
160
- children: subtitle
161
- }
162
- ) : null
163
- ] });
164
- if (onPress) {
165
- return /* @__PURE__ */ jsx(
166
- Pressable,
167
- {
168
- testID: testID ?? "nav-bar-title",
169
- accessibilityRole: "button",
170
- accessibilityLabel: subtitle ? `${title}, ${subtitle}` : title,
171
- onPress,
172
- hitSlop: 8,
173
- children: inner
174
- }
175
- );
176
- }
177
- return /* @__PURE__ */ jsx(View, { testID: testID ?? "nav-bar-title", accessibilityRole: "header", children: inner });
178
- }
179
- function NavBarSearchBar({
180
- value,
181
- onChangeText,
182
- placeholder = "Search",
183
- onSubmit,
184
- clearable = true,
185
- className,
186
- testID
187
- }) {
188
- return /* @__PURE__ */ jsxs(
189
- View,
190
- {
191
- testID: testID ?? "nav-bar-search",
192
- className: cn(
193
- "min-h-[36px] flex-row items-center rounded-full bg-muted px-3",
194
- className
195
- ),
196
- children: [
197
- /* @__PURE__ */ jsx(
198
- TextInput,
199
- {
200
- testID: testID ? `${testID}-input` : void 0,
201
- accessibilityLabel: placeholder,
202
- value,
203
- onChangeText,
204
- onSubmitEditing: onSubmit,
205
- placeholder,
206
- placeholderTextColor: nativeColors.neutral[400],
207
- returnKeyType: "search",
208
- autoCorrect: false,
209
- autoCapitalize: "none",
210
- clearButtonMode: clearable ? "while-editing" : "never",
211
- className: "flex-1 text-base text-foreground"
212
- }
213
- ),
214
- clearable && value.length > 0 ? /* @__PURE__ */ jsx(
215
- Pressable,
216
- {
217
- testID: testID ? `${testID}-clear` : void 0,
218
- accessibilityRole: "button",
219
- accessibilityLabel: "Clear search",
220
- onPress: () => onChangeText(""),
221
- hitSlop: 8,
222
- className: "ml-2 px-1",
223
- children: /* @__PURE__ */ jsx(Text, { className: "text-base text-muted-foreground", children: "\xD7" })
224
- }
225
- ) : null
226
- ]
227
- }
228
- );
229
- }
230
11
  function getSettingsPageStackOptions(props) {
231
12
  return composeHeaderOptions({
232
13
  headerTitle: props.headerTitle ?? "Settings",
@@ -761,253 +542,6 @@ function UnreadDot({
761
542
  }
762
543
  );
763
544
  }
764
- function getInboxPageStackOptions(props) {
765
- return composeHeaderOptions({
766
- headerTitle: props.headerTitle ?? "Inbox",
767
- large: props.large ?? true,
768
- scrollEdgeBehavior: props.scrollEdgeBehavior ?? "match",
769
- headerLeft: props.headerLeft,
770
- headerRight: props.headerRight,
771
- headerOptions: props.headerOptions
772
- });
773
- }
774
- var DAY_MS = 24 * 60 * 60 * 1e3;
775
- function formatInboxTime(date, now) {
776
- const start = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
777
- const days = Math.round((start(now) - start(date)) / DAY_MS);
778
- if (days <= 0) return date.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
779
- if (days === 1) return "Yesterday";
780
- if (days < 7) return date.toLocaleDateString(void 0, { weekday: "long" });
781
- return date.toLocaleDateString(void 0, { day: "numeric", month: "short", year: date.getFullYear() === now.getFullYear() ? void 0 : "numeric" });
782
- }
783
- var ROW_PADDING = 16;
784
- var LEADING_WIDTH = 18;
785
- var DEFAULT_AVATAR = 40;
786
- var AVATAR_GAP = 12;
787
- var IOS_GROUP_MARGIN2 = 16;
788
- function iosGroupRadius2() {
789
- return Number.parseFloat(String(Platform.Version)) >= 26 ? 26 : 10;
790
- }
791
- function InboxPage({
792
- items,
793
- refreshing,
794
- onRefresh,
795
- onEndReached,
796
- loadingMore = false,
797
- header,
798
- sectionTitle,
799
- emptyTitle,
800
- emptyBody,
801
- emptyActionLabel,
802
- onEmptyAction,
803
- loading = false,
804
- error = false,
805
- errorTitle,
806
- errorBody,
807
- formatTime = formatInboxTime,
808
- now = () => /* @__PURE__ */ new Date(),
809
- slots = {},
810
- slotProps = {},
811
- testID = "inbox-page"
812
- }) {
813
- const colors = useThemeRoles();
814
- const clock = now();
815
- const rows = items.map((item, index) => ({
816
- ...item,
817
- testID: item.testID ?? `${testID}-row-${item.id}`,
818
- isFirst: index === 0,
819
- isLast: index === items.length - 1,
820
- timeLabel: item.timestamp ? formatTime(typeof item.timestamp === "string" ? new Date(item.timestamp) : item.timestamp, clock) : null
821
- }));
822
- const headerNode = /* @__PURE__ */ jsxs(View, { children: [
823
- header ?? renderSlot(EmptyPart, slots.header, { testID: `${testID}-header` }, slotProps.header),
824
- sectionTitle ? /* @__PURE__ */ jsx(SectionTitle, { title: sectionTitle, testID: `${testID}-section-title` }) : null
825
- ] });
826
- const refreshControl = onRefresh ? /* @__PURE__ */ jsx(NativeRefreshControl, { testID: `${testID}-refresh`, refreshing: !!refreshing, onRefresh: () => void onRefresh() }) : void 0;
827
- if (items.length === 0) {
828
- return /* @__PURE__ */ jsx(SafeAreaView, { testID, edges: ["left", "right", "bottom"], style: { flex: 1, backgroundColor: colors.groupedBackground }, children: /* @__PURE__ */ jsxs(
829
- ScrollView,
830
- {
831
- testID: `${testID}-empty-scroll`,
832
- contentInsetAdjustmentBehavior: "automatic",
833
- keyboardShouldPersistTaps: "handled",
834
- contentContainerStyle: { flexGrow: 1, paddingTop: 8, paddingBottom: 32 },
835
- refreshControl,
836
- children: [
837
- headerNode,
838
- loading ? /* @__PURE__ */ jsx(NativeLoadingState, { fullScreen: false, testID: `${testID}-loading` }) : renderSlot(
839
- DefaultEmpty2,
840
- slots.empty,
841
- error ? {
842
- title: errorTitle ?? "Couldn't load this",
843
- body: errorBody ?? "Check your connection, then pull to refresh.",
844
- actionLabel: onRefresh ? "Try again" : void 0,
845
- onAction: onRefresh ? () => void onRefresh() : void 0,
846
- testID: `${testID}-error`
847
- } : {
848
- title: emptyTitle ?? "Nothing here yet",
849
- body: emptyBody ?? "When there's something new, it shows up here.",
850
- actionLabel: emptyActionLabel,
851
- onAction: onEmptyAction,
852
- testID: `${testID}-empty`
853
- },
854
- slotProps.empty
855
- )
856
- ]
857
- }
858
- ) });
859
- }
860
- return /* @__PURE__ */ jsx(SafeAreaView, { testID, edges: ["left", "right", "bottom"], style: { flex: 1, backgroundColor: colors.groupedBackground }, children: /* @__PURE__ */ jsx(
861
- FlatList,
862
- {
863
- testID: `${testID}-list`,
864
- data: rows,
865
- keyExtractor: (row) => row.id,
866
- contentInsetAdjustmentBehavior: "automatic",
867
- keyboardShouldPersistTaps: "handled",
868
- ListHeaderComponent: headerNode,
869
- ListFooterComponent: renderSlot(DefaultFooter, slots.footer, { loadingMore, testID: `${testID}-footer` }, slotProps.footer),
870
- contentContainerStyle: { paddingTop: 8, paddingBottom: 32 },
871
- onEndReached,
872
- onEndReachedThreshold: 0.5,
873
- refreshControl,
874
- renderItem: ({ item: row }) => {
875
- const content = renderSlot(DefaultRow3, slots.row, row, slotProps.row);
876
- const actions = row.swipeActions ?? [];
877
- return /* @__PURE__ */ jsx(Fragment, { children: actions.length && slots.swipeable !== null ? renderSlot(PassThroughSwipeable, slots.swipeable, { actions, testID: `${row.testID}-swipe`, children: content }, slotProps.swipeable) : content });
878
- }
879
- }
880
- ) });
881
- }
882
- function EmptyPart(_props) {
883
- return null;
884
- }
885
- function PassThroughSwipeable({ children }) {
886
- return /* @__PURE__ */ jsx(Fragment$1, { children });
887
- }
888
- function SectionTitle({ title, testID }) {
889
- const colors = useThemeRoles();
890
- const ios = Platform.OS === "ios";
891
- return /* @__PURE__ */ jsx(
892
- NativeText,
893
- {
894
- testID,
895
- accessibilityRole: "header",
896
- className: ios ? "px-4 pb-1.5 pt-2" : "px-4 pb-2 pt-4 text-primary",
897
- style: ios ? { marginHorizontal: IOS_GROUP_MARGIN2, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textTransform: "uppercase" } : { fontSize: 14, lineHeight: 20, fontWeight: "500" },
898
- children: title
899
- }
900
- );
901
- }
902
- function showInboxActions(title, actions, cancelLabel = "Cancel") {
903
- Alert.alert(title, void 0, [
904
- ...actions.map((a) => ({ text: a.label, style: a.destructive ? "destructive" : "default", onPress: a.onPress })),
905
- { text: cancelLabel, style: "cancel" }
906
- ]);
907
- }
908
- function DefaultRow3(row) {
909
- const colors = useThemeRoles();
910
- const ios = Platform.OS === "ios";
911
- const [pressed, setPressed] = useState(false);
912
- const actions = row.swipeActions ?? [];
913
- const radius = iosGroupRadius2();
914
- const unreadLabel = row.unreadCount && row.unreadCount > 0 ? `${row.unreadCount} unread` : row.unread ? "Unread" : null;
915
- const label = [unreadLabel, row.avatar ? row.avatarLabel : null, row.title, row.timeLabel, row.preview, row.meta].filter(Boolean).join(", ");
916
- const [avatarWidth, setAvatarWidth] = useState(0);
917
- const separatorInset = ROW_PADDING + LEADING_WIDTH + (row.avatar ? (avatarWidth || DEFAULT_AVATAR) + AVATAR_GAP : 0);
918
- return /* @__PURE__ */ jsxs(
919
- View,
920
- {
921
- testID: `${row.testID}-cell`,
922
- style: [
923
- { backgroundColor: colors.surface },
924
- ios ? {
925
- marginHorizontal: IOS_GROUP_MARGIN2,
926
- borderTopLeftRadius: row.isFirst ? radius : 0,
927
- borderTopRightRadius: row.isFirst ? radius : 0,
928
- borderBottomLeftRadius: row.isLast ? radius : 0,
929
- borderBottomRightRadius: row.isLast ? radius : 0,
930
- overflow: "hidden"
931
- } : null
932
- ],
933
- children: [
934
- /* @__PURE__ */ jsxs(
935
- Pressable,
936
- {
937
- testID: row.testID,
938
- accessibilityRole: row.onPress ? "button" : void 0,
939
- accessibilityLabel: label,
940
- accessibilityActions: actions.map((a) => ({ name: a.id, label: a.label })),
941
- onAccessibilityAction: (event) => actions.find((a) => a.id === event.nativeEvent.actionName)?.onPress(),
942
- onPress: row.onPress,
943
- onLongPress: actions.length ? () => showInboxActions(row.title, actions) : void 0,
944
- onPressIn: () => setPressed(true),
945
- onPressOut: () => setPressed(false),
946
- style: { flexDirection: "row", alignItems: "center", paddingHorizontal: ROW_PADDING, paddingVertical: 11, minHeight: 60, backgroundColor: pressed && row.onPress ? colors.fill : void 0 },
947
- children: [
948
- /* @__PURE__ */ jsx(View, { style: { width: LEADING_WIDTH, alignItems: "flex-start" }, children: row.leading ?? (row.unreadCount && row.unreadCount > 0 ? null : /* @__PURE__ */ jsx(UnreadDot2, { unread: !!row.unread, testID: `${row.testID}-unread`, color: colors.tint })) }),
949
- row.avatar ? /* @__PURE__ */ jsx(
950
- View,
951
- {
952
- testID: `${row.testID}-avatar`,
953
- accessibilityElementsHidden: true,
954
- importantForAccessibility: "no-hide-descendants",
955
- onLayout: (e) => setAvatarWidth(Math.round(e.nativeEvent.layout.width)),
956
- style: { marginRight: AVATAR_GAP },
957
- children: row.avatar
958
- }
959
- ) : null,
960
- /* @__PURE__ */ jsxs(View, { style: { flex: 1, minWidth: 0 }, children: [
961
- /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "baseline" }, children: [
962
- /* @__PURE__ */ jsx(
963
- NativeText,
964
- {
965
- numberOfLines: 1,
966
- style: { flex: 1, color: colors.label, fontSize: 17, lineHeight: 22, fontWeight: row.unread || (row.unreadCount ?? 0) > 0 ? "600" : "400" },
967
- children: row.title
968
- }
969
- ),
970
- row.timeLabel ? /* @__PURE__ */ jsx(NativeText, { testID: `${row.testID}-time`, style: { marginLeft: 8, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }, children: row.timeLabel }) : null
971
- ] }),
972
- row.preview ? /* @__PURE__ */ jsx(NativeText, { numberOfLines: 2, style: { marginTop: 2, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }, children: row.preview }) : null,
973
- row.meta ? /* @__PURE__ */ jsx(NativeText, { testID: `${row.testID}-meta`, style: { marginTop: 4, color: colors.tertiaryLabel, fontSize: 13, lineHeight: 18 }, children: row.meta }) : null
974
- ] }),
975
- row.unreadCount && row.unreadCount > 0 ? /* @__PURE__ */ jsx(View, { style: { marginLeft: 8 }, children: /* @__PURE__ */ jsx(NativeBadge, { testID: `${row.testID}-count`, children: String(row.unreadCount) }) }) : null,
976
- row.trailing ? /* @__PURE__ */ jsx(View, { style: { marginLeft: 8 }, children: row.trailing }) : row.onPress ? /* @__PURE__ */ jsx(Chevron, { color: colors.tertiaryLabel }) : null
977
- ]
978
- }
979
- ),
980
- row.isLast ? null : /* @__PURE__ */ jsxs(View, { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: { flexDirection: "row", height: StyleSheet.hairlineWidth }, children: [
981
- /* @__PURE__ */ jsx(View, { testID: `${row.testID}-separator-inset`, style: { width: separatorInset } }),
982
- /* @__PURE__ */ jsx(View, { testID: `${row.testID}-separator-line`, style: { flex: 1, backgroundColor: colors.separator } })
983
- ] })
984
- ]
985
- }
986
- );
987
- }
988
- function Chevron({ color }) {
989
- return /* @__PURE__ */ jsx(NativeText, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { marginLeft: 8, color, fontSize: 20, lineHeight: 22 }, children: "\u203A" });
990
- }
991
- function UnreadDot2({ unread, testID, color }) {
992
- if (!unread) return /* @__PURE__ */ jsx(View, { testID, style: { width: 10, height: 10 } });
993
- return /* @__PURE__ */ jsx(View, { testID, style: { width: 10, height: 10, borderRadius: 5, backgroundColor: color } });
994
- }
995
- function DefaultFooter({ loadingMore, testID }) {
996
- if (!loadingMore) return null;
997
- return /* @__PURE__ */ jsx(NativeLoadingState, { fullScreen: false, size: "small", accessibilityLabel: "Loading more", className: "py-4", testID });
998
- }
999
- function DefaultEmpty2({ title, body, actionLabel, onAction, testID }) {
1000
- return /* @__PURE__ */ jsx(
1001
- NativeEmptyState,
1002
- {
1003
- variant: "first-run",
1004
- title,
1005
- body,
1006
- testID,
1007
- primaryAction: actionLabel && onAction ? /* @__PURE__ */ jsx(NativeButton, { onPress: onAction, testID: `${testID}-action`, children: actionLabel }) : void 0
1008
- }
1009
- );
1010
- }
1011
545
  var DEFAULT_LABELS = { you: "You", sending: "Sending", notSent: "Not sent. Tap to retry.", retryHint: "Double tap to send again" };
1012
546
  function getThreadPageStackOptions(props) {
1013
547
  return composeHeaderOptions({
@@ -1069,7 +603,7 @@ function ThreadPage({
1069
603
  slotProps.earlier
1070
604
  ) : null,
1071
605
  /* @__PURE__ */ jsx(View, { testID: `${testID}-messages`, accessibilityRole: "list", style: { flexGrow: 1, justifyContent: "flex-end", paddingHorizontal: 12, paddingVertical: 8, gap: 6 }, children: messages.length === 0 ? renderSlot(
1072
- DefaultEmpty3,
606
+ DefaultEmpty2,
1073
607
  slots.empty,
1074
608
  { title: emptyTitle ?? "No messages yet", body: emptyBody ?? "Write the first one below.", testID: `${testID}-empty` },
1075
609
  slotProps.empty
@@ -1145,7 +679,7 @@ function Nothing(_props) {
1145
679
  function DefaultEarlier({ loading, onPress, label, testID }) {
1146
680
  return /* @__PURE__ */ jsx(View, { style: { alignItems: "center", paddingTop: 8 }, children: /* @__PURE__ */ jsx(NativeButton, { variant: "ghost", size: "sm", onPress, loading, testID, children: label }) });
1147
681
  }
1148
- function DefaultEmpty3({ title, body, testID }) {
682
+ function DefaultEmpty2({ title, body, testID }) {
1149
683
  return /* @__PURE__ */ jsx(NativeEmptyState, { variant: "first-run", title, body, testID });
1150
684
  }
1151
685
  var MINE_TEXT = { fontSize: 17, lineHeight: 22 };
@@ -1483,7 +1017,7 @@ function AuthScreen({
1483
1017
  branding ? renderSlot(AuthBranding, slots.branding, { ...branding, testID: branding.testID ?? `${testID}-branding` }, slotProps.branding) : null,
1484
1018
  providers?.length ? renderSlot(DefaultSocial, slots.social, { providers, testID: `${testID}-social` }, slotProps.social) : null,
1485
1019
  renderSlot(AuthForm, slots.form, formProps, slotProps.form),
1486
- footer ? renderSlot(DefaultFooter2, slots.footer, { children: footer, testID: `${testID}-footer` }, slotProps.footer) : null
1020
+ footer ? renderSlot(DefaultFooter, slots.footer, { children: footer, testID: `${testID}-footer` }, slotProps.footer) : null
1487
1021
  ] });
1488
1022
  if (KeyboardScroll) {
1489
1023
  return /* @__PURE__ */ jsxs(ScreenContainer, { testID, children: [
@@ -1518,7 +1052,7 @@ function warnIfNoAppleSignIn(providers) {
1518
1052
  function DefaultSocial({ providers, testID }) {
1519
1053
  return /* @__PURE__ */ jsx(SocialAuthRow, { providers, testID });
1520
1054
  }
1521
- function DefaultFooter2({ children, testID }) {
1055
+ function DefaultFooter({ children, testID }) {
1522
1056
  return /* @__PURE__ */ jsx(View, { testID, className: "items-center", children });
1523
1057
  }
1524
1058
  function AppleSignInButton({
@@ -1584,6 +1118,6 @@ function googleProvider({ onPress, label = "Continue with Google", icon, disable
1584
1118
  return { id: "google", label, icon, onPress, disabled };
1585
1119
  }
1586
1120
 
1587
- export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, InboxPage, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, composeHeaderOptions, confirmDiscardChanges, defaultStickyHeaderOffset, formatInboxTime, getInboxPageStackOptions, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, showInboxActions, useKeyboardScroll, useKeyboardToolbar };
1588
- //# sourceMappingURL=chunk-YI7XVY2D.js.map
1589
- //# sourceMappingURL=chunk-YI7XVY2D.js.map
1121
+ export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NotificationsPage, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, useKeyboardScroll, useKeyboardToolbar };
1122
+ //# sourceMappingURL=chunk-VMSIKSU2.js.map
1123
+ //# sourceMappingURL=chunk-VMSIKSU2.js.map