@marktiderman/genesis-ui-native 2.4.1 → 2.5.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.
package/README.md CHANGED
@@ -52,6 +52,36 @@ as a direct dependency of your app (`npx expo install react-native-gesture-handl
52
52
  root in its `GestureHandlerRootView`; don't rely on another package bringing it in. The drawer's
53
53
  swipe uses React Native's `PanResponder`.
54
54
 
55
+ ## Loading screens: `NativeLoadingState` and `ScreenContainer loading`
56
+
57
+ For a screen that is waiting (a redirect while the session loads, a first fetch), don't hand-roll
58
+ `<View><ActivityIndicator /></View>`. `NativeLoadingState` is a centred spinner in the theme tint,
59
+ read by screen readers as one "Loading" progress bar (or your `label`, which also shows under the
60
+ spinner). By default it fills the screen on the background, inside the safe area; `fullScreen={false}`
61
+ makes it a centred block for a screen body, a section or a list footer.
62
+
63
+ ```tsx
64
+ import { NativeLoadingState, ScreenContainer } from "@marktiderman/genesis-ui-native";
65
+
66
+ if (!session) return <NativeLoadingState label="Signing you in" />;
67
+
68
+ <ScreenContainer scroll loading={isLoading} loadingLabel="Loading your plan">{body}</ScreenContainer>;
69
+ ```
70
+
71
+ `ScreenContainer`'s `loading` puts the inline form in place of the body, keeping its safe area,
72
+ background and status bar. `InboxPage` uses it for its first load and "Loading more" footer. Use
73
+ `NativeSkeleton` for a placeholder shaped like the content, and `NativeProgress` for known progress.
74
+ `loading` is for a screen's first load: the body is unmounted while it's on, so don't use it to
75
+ cover a form the person is filling in (its state would be lost); show `NativeLoadingState
76
+ fullScreen={false}` or a button's busy state instead. `loadingLabel` is shown and read by
77
+ VoiceOver, so pass translated text; without it the screen reader hears `accessibilityLabel`
78
+ ("Loading" by default) and nothing is shown.
79
+
80
+ `genesis doctor` (native pack) flags a raw `ActivityIndicator` from `react-native` and points here.
81
+ A route whose only screen is a full-screen `NativeLoadingState` (a redirect or loading bridge,
82
+ optionally with `Stack.Screen` options) counts as a screen for `native-screen-layout`; one that
83
+ also renders other content, imports it, or uses `fullScreen={false}` still needs a layout.
84
+
55
85
  ## Keyboard toolbar
56
86
 
57
87
  `KeyboardScrollProvider` (from `/layouts`) takes an optional `toolbar`: react-native-keyboard-controller's
@@ -1,8 +1,9 @@
1
- import { useGenesisModules } from './chunk-EFXCJ5AN.js';
1
+ import { useGenesisModules, NativeText } from './chunk-EFXCJ5AN.js';
2
2
  import { useThemeRoles } from './chunk-Z3AQYVUA.js';
3
3
  import { cn } from './chunk-OHZD7KRO.js';
4
- import { View, Text, Platform, Pressable, RefreshControl } from 'react-native';
4
+ import { View, Text, Platform, Pressable, RefreshControl, ActivityIndicator } from 'react-native';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+ import { SafeAreaView } from 'react-native-safe-area-context';
6
7
 
7
8
  var defaults = {
8
9
  "first-run": { title: "Nothing here yet", tone: "text-muted-foreground" },
@@ -272,7 +273,46 @@ function NativeRefreshControl({ tintColor, colors, testID, ...rest }) {
272
273
  const androidTint = typeof tint === "string" ? [tint] : void 0;
273
274
  return /* @__PURE__ */ jsx(RefreshControl, { ...rest, tintColor: tintColor ?? tint, colors: colors ?? androidTint, testID: testID ?? "native-refresh-control" });
274
275
  }
276
+ var ALL_EDGES = ["top", "bottom", "left", "right"];
277
+ function NativeLoadingState({
278
+ label,
279
+ accessibilityLabel,
280
+ size = "large",
281
+ fullScreen = true,
282
+ safeAreaEdges = ALL_EDGES,
283
+ color,
284
+ className,
285
+ testID = "loading-state"
286
+ }) {
287
+ const roles = useThemeRoles();
288
+ const spoken = label ?? accessibilityLabel ?? "Loading";
289
+ const content = /* @__PURE__ */ jsxs(
290
+ View,
291
+ {
292
+ testID: fullScreen ? `${testID}-content` : testID,
293
+ className: cn("items-center justify-center gap-3 px-4 py-8", !fullScreen && "flex-grow", !fullScreen && className),
294
+ accessible: true,
295
+ accessibilityRole: "progressbar",
296
+ accessibilityLabel: spoken,
297
+ accessibilityState: { busy: true },
298
+ children: [
299
+ /* @__PURE__ */ jsx(ActivityIndicator, { testID: `${testID}-spinner`, size, color: color ?? roles.tint }),
300
+ label ? /* @__PURE__ */ jsx(NativeText, { testID: `${testID}-label`, preset: "body-sm", className: "text-muted-foreground text-center", children: label }) : null
301
+ ]
302
+ }
303
+ );
304
+ if (!fullScreen) return content;
305
+ return /* @__PURE__ */ jsx(
306
+ SafeAreaView,
307
+ {
308
+ testID,
309
+ edges: safeAreaEdges,
310
+ className: cn("flex-1 items-center justify-center bg-background", className),
311
+ children: content
312
+ }
313
+ );
314
+ }
275
315
 
276
- export { NATIVE_ICON_NAMES, NativeEmptyState, NativeIcon, NativeListItem, NativeListItemDivider, NativeRefreshControl, NativeSectionListHeader, SF_SYMBOLS };
277
- //# sourceMappingURL=chunk-BPD5DCFP.js.map
278
- //# sourceMappingURL=chunk-BPD5DCFP.js.map
316
+ export { NATIVE_ICON_NAMES, NativeEmptyState, NativeIcon, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, SF_SYMBOLS };
317
+ //# sourceMappingURL=chunk-IDHW2NOP.js.map
318
+ //# sourceMappingURL=chunk-IDHW2NOP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/empty-state.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/loading-state.tsx"],"names":["jsx","View","jsxs","Text","Platform"],"mappings":";;;;;;;AAwEA,IAAM,QAAA,GAA6E;AAAA,EACjF,WAAA,EAAa,EAAE,KAAA,EAAO,kBAAA,EAAoB,MAAM,uBAAA,EAAwB;AAAA,EACxE,YAAA,EAAc,EAAE,KAAA,EAAO,YAAA,EAAc,MAAM,uBAAA,EAAwB;AAAA,EACnE,KAAA,EAAO,EAAE,KAAA,EAAO,sBAAA,EAAwB,MAAM,kBAAA;AAChD,CAAA;AAEO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,OAAA,GAAU,WAAA;AAAA,EACV,KAAA;AAAA,EACA,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IAAA,EAAM,IAAA,EAAK;AAAA,MAEjC,QAAA,EAAA;AAAA,wBAAAD,GAAAA,CAAC,iBAAA,EAAA,EAAkB,MAAA,EAAQ,CAAA,EAAG,MAAM,YAAY,IAAA,EAAY,KAAA,EAAQ,KAAA,IAAS,KAAA,CAAM,IAAA,EAAiB,CAAA;AAAA,QACnG,KAAA,mBACCA,GAAAA,CAAC,UAAA,EAAA,EAAW,MAAA,EAAQ,CAAA,EAAG,MAAM,CAAA,MAAA,CAAA,EAAU,MAAA,EAAO,SAAA,EAAU,SAAA,EAAU,mCAAA,EAC/D,iBACH,CAAA,GACE;AAAA;AAAA;AAAA,GACN;AAGF,EAAA,IAAI,CAAC,YAAY,OAAO,OAAA;AAExB,EAAA,uBACEA,GAAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,KAAA,EAAO,aAAA;AAAA,MACP,SAAA,EAAW,EAAA,CAAG,kDAAA,EAAoD,SAAS,CAAA;AAAA,MAE1E,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-IDHW2NOP.js","sourcesContent":["/**\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\";\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 * 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 \"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 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 file: \"doc\",\n filter: \"line.3.horizontal.decrease\",\n heart: \"heart\",\n home: \"house\",\n image: \"photo\",\n info: \"info.circle\",\n lock: \"lock\",\n \"log-out\": \"rectangle.portrait.and.arrow.right\",\n mail: \"envelope\",\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 refresh: \"arrow.clockwise\",\n reply: \"arrowshape.turn.up.left\",\n search: \"magnifyingglass\",\n settings: \"gearshape\",\n share: \"square.and.arrow.up\",\n smile: \"face.smiling\",\n star: \"star\",\n stop: \"stop.fill\",\n success: \"checkmark.circle\",\n trash: \"trash\",\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 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 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=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n accessibilityState={{ disabled }}\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={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 * 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"]}
@@ -1,8 +1,8 @@
1
- import { NativeListItem, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl } from './chunk-BPD5DCFP.js';
1
+ import { NativeLoadingState, NativeListItem, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl } from './chunk-IDHW2NOP.js';
2
2
  import { NativeText, NativeButton, useGenesisModules, NativeBadge, NativeInput } from './chunk-EFXCJ5AN.js';
3
3
  import { useThemeMode, useThemeRoles } from './chunk-Z3AQYVUA.js';
4
4
  import { cn } from './chunk-OHZD7KRO.js';
5
- import { ScrollView, View, StatusBar, Pressable, Text, TextInput, Platform, StyleSheet, Alert, KeyboardAvoidingView, RefreshControl, SectionList, ActivityIndicator, FlatList, Image } from 'react-native';
5
+ import { View, ScrollView, StatusBar, Pressable, Text, TextInput, Platform, StyleSheet, Alert, KeyboardAvoidingView, RefreshControl, SectionList, FlatList, Image, ActivityIndicator } from 'react-native';
6
6
  import { SafeAreaView, SafeAreaInsetsContext } from 'react-native-safe-area-context';
7
7
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
8
  import { nativeColors } from '@marktiderman/genesis-design-system/tokens/native';
@@ -54,13 +54,15 @@ function ScreenContainer({
54
54
  className,
55
55
  contentClassName,
56
56
  keyboardShouldPersistTaps = "handled",
57
+ loading = false,
58
+ loadingLabel,
57
59
  style,
58
60
  testID
59
61
  }) {
60
62
  const osMode = useThemeMode();
61
63
  const resolvedMode = themeMode === "system" ? osMode : themeMode;
62
64
  const barStyle = resolveBarStyle(statusBar, resolvedMode);
63
- const body = scroll ? /* @__PURE__ */ jsx(
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(
64
66
  ScrollView,
65
67
  {
66
68
  testID: testID ? `${testID}-scroll` : void 0,
@@ -833,7 +835,7 @@ function InboxPage({
833
835
  refreshControl,
834
836
  children: [
835
837
  headerNode,
836
- loading ? /* @__PURE__ */ jsx(View, { testID: `${testID}-loading`, style: { paddingVertical: 32 }, children: /* @__PURE__ */ jsx(ActivityIndicator, { accessibilityLabel: "Loading" }) }) : renderSlot(
838
+ loading ? /* @__PURE__ */ jsx(NativeLoadingState, { fullScreen: false, testID: `${testID}-loading` }) : renderSlot(
837
839
  DefaultEmpty2,
838
840
  slots.empty,
839
841
  error ? {
@@ -992,7 +994,7 @@ function UnreadDot2({ unread, testID, color }) {
992
994
  }
993
995
  function DefaultFooter({ loadingMore, testID }) {
994
996
  if (!loadingMore) return null;
995
- return /* @__PURE__ */ jsx(View, { testID, style: { paddingVertical: 16 }, children: /* @__PURE__ */ jsx(ActivityIndicator, { accessibilityLabel: "Loading more" }) });
997
+ return /* @__PURE__ */ jsx(NativeLoadingState, { fullScreen: false, size: "small", accessibilityLabel: "Loading more", className: "py-4", testID });
996
998
  }
997
999
  function DefaultEmpty2({ title, body, actionLabel, onAction, testID }) {
998
1000
  return /* @__PURE__ */ jsx(
@@ -1583,5 +1585,5 @@ function googleProvider({ onPress, label = "Continue with Google", icon, disable
1583
1585
  }
1584
1586
 
1585
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 };
1586
- //# sourceMappingURL=chunk-6TLBCRS6.js.map
1587
- //# sourceMappingURL=chunk-6TLBCRS6.js.map
1588
+ //# sourceMappingURL=chunk-YI7XVY2D.js.map
1589
+ //# sourceMappingURL=chunk-YI7XVY2D.js.map