@marktiderman/genesis-ui-native 3.4.0 → 3.5.1

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.
@@ -1,4 +1,4 @@
1
- import { NativeLoadingState, NativeText, NativeBadge, NativeEmptyState, NativeButton, NativeRefreshControl } from './chunk-6KWEAGRD.js';
1
+ import { NativeLoadingState, NativeRefreshControl, NativeText, NativeBadge, NativeEmptyState, NativeButton } from './chunk-6KWEAGRD.js';
2
2
  import { useThemeMode, useThemeRoles } from './chunk-Z3AQYVUA.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';
@@ -55,16 +55,19 @@ function ScreenContainer({
55
55
  keyboardShouldPersistTaps = "handled",
56
56
  loading = false,
57
57
  loadingLabel,
58
+ onRefresh,
59
+ refreshing = false,
58
60
  style,
59
61
  testID
60
62
  }) {
61
63
  const osMode = useThemeMode();
62
64
  const resolvedMode = themeMode === "system" ? osMode : themeMode;
63
65
  const barStyle = resolveBarStyle(statusBar, resolvedMode);
64
- 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
+ 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 || onRefresh ? /* @__PURE__ */ jsx(
65
67
  ScrollView,
66
68
  {
67
69
  testID: testID ? `${testID}-scroll` : void 0,
70
+ refreshControl: onRefresh ? /* @__PURE__ */ jsx(NativeRefreshControl, { testID: `${testID ?? "screen-container"}-refresh`, refreshing, onRefresh: () => void onRefresh() }) : void 0,
68
71
  keyboardShouldPersistTaps,
69
72
  contentInsetAdjustmentBehavior: "automatic",
70
73
  contentContainerClassName: cn("flex-grow", contentClassName),
@@ -475,5 +478,5 @@ function DefaultEmpty({ title, body, actionLabel, onAction, testID }) {
475
478
  }
476
479
 
477
480
  export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions };
478
- //# sourceMappingURL=chunk-ZHVQTMNV.js.map
479
- //# sourceMappingURL=chunk-ZHVQTMNV.js.map
481
+ //# sourceMappingURL=chunk-ONH2PCGH.js.map
482
+ //# sourceMappingURL=chunk-ONH2PCGH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/layouts/screen-container.tsx","../src/layouts/nav-bar.tsx","../src/layouts/inbox-page.tsx"],"names":["jsx","jsxs","View","SafeAreaView","ScrollView","Fragment","Pressable"],"mappings":";;;;;;;;;;AAkIO,SAAS,qBACd,KAAA,EACyB;AACzB,EAAA,MAAM;AAAA,IACJ,WAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,kBAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,OAAgC,EAAC;AACvC,EAAA,IAAI,WAAA,KAAgB,MAAA,EAAW,IAAA,CAAK,KAAA,GAAQ,WAAA;AAC5C,EAAA,IAAI,UAAA,OAAiB,UAAA,GAAa,UAAA;AAClC,EAAA,IAAI,WAAA,OAAkB,WAAA,GAAc,WAAA;AACpC,EAAA,IAAI,KAAA,EAAO;AAET,IAAA,IAAA,CAAK,gBAAA,GAAmB,IAAA;AACxB,IAAA,IAAI,uBAAuB,aAAA,EAAe;AACxC,MAAA,IAAA,CAAK,iBAAA,GAAoB,IAAA;AAAA,IAC3B,CAAA,MAAA,IAAW,uBAAuB,QAAA,EAAU;AAC1C,MAAA,IAAA,CAAK,6BAAA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itive.\n *\n * Wires the chrome every layout needs without imposing layout structure:\n * - Safe-area edges (configurable via `safeAreaEdges`)\n * - StatusBar style (light / dark / auto)\n * - Scroll vs static body\n * - Tokens-aware background (`bg-background`)\n * - A loading state (`loading`): a centred `NativeLoadingState` in place of the body\n * - Pull to refresh (`onRefresh` + `refreshing`): a theme-tinted `NativeRefreshControl`\n *\n * Header customization is delegated: pass `headerLeft`, `headerRight`,\n * `large`, `scrollEdgeBehavior`, `safeAreaEdges`, plus any direct\n * `headerOptions` passthrough to `<Stack.Screen options={...} />`. We\n * **do not** render the navigation header ourselves — Expo Router /\n * React Navigation render the platform-native header. Consumer either:\n *\n * (a) Wraps the screen in `<ScreenContainer>` and ALSO declares\n * `<Stack.Screen options={headerOptionsFromProps(props)} />` at the\n * top of the screen (we export a helper `composeHeaderOptions` for\n * this), OR\n * (b) Imports `<NavBarTitle>` / `<NavBarSearchBar>` / `<NavBarSaveButton>`\n * sub-primitives and threads them through `headerLeft` / `headerRight`\n * options manually.\n *\n * The Layer-3/4 layouts (SettingsPage, etc.) compose ScreenContainer + a\n * helper that wires Stack.Screen so consumers get the 3-line ergonomics.\n *\n * @stability Beta\n */\nimport type { ReactNode } from \"react\";\nimport { ScrollView, StatusBar, View, type ViewStyle } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { cn } from \"../utils\";\nimport { useThemeMode } from \"../hooks/use-theme-mode\";\nimport { NativeLoadingState } from \"../components/loading-state\";\nimport { NativeRefreshControl } from \"../components/refresh-control\";\n\nexport type SafeAreaEdge = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport type ScrollEdgeBehavior = \"match\" | \"transparent\" | \"opaque\";\n\nexport interface ScreenContainerProps {\n /** Screen body. Pass any node tree. */\n children: ReactNode;\n /** When `true`, the body is wrapped in a vertical ScrollView. Default `false`. */\n scroll?: boolean;\n /**\n * SafeAreaView edges. Defaults to `[\"left\", \"right\"]` — top/bottom are\n * normally handled by the navigation header / tab bar.\n */\n safeAreaEdges?: SafeAreaEdge[];\n /**\n * StatusBar appearance. `\"auto\"` follows the resolved theme mode.\n */\n statusBar?: \"light\" | \"dark\" | \"auto\" | \"hidden\";\n /**\n * Force light or dark theme on this screen regardless of OS preference.\n * Default `\"system\"` (follow OS).\n */\n themeMode?: \"light\" | \"dark\" | \"system\";\n /** Override root container className. */\n className?: string;\n /** Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). */\n contentClassName?: string;\n /**\n * `keyboardShouldPersistTaps` for the inner ScrollView. Default `\"handled\"`.\n * Only used when `scroll` is true.\n */\n keyboardShouldPersistTaps?: \"always\" | \"never\" | \"handled\";\n /**\n * When `true`, a centred `NativeLoadingState` (theme-tinted spinner,\n * announced as loading) replaces the body, inside the same safe area and\n * background. Use it for redirect and first-load screens: the body is\n * unmounted while it's on, so a form underneath loses its state. Default `false`.\n */\n loading?: boolean;\n /** Text under the spinner while `loading`, and what screen readers announce: pass translated text. */\n loadingLabel?: string;\n /**\n * Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and\n * NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll\n * (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList,\n * NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those\n * lists have their own pull to refresh.\n */\n onRefresh?: () => void | Promise<void>;\n /** The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. */\n refreshing?: boolean;\n /** Style on the root, e.g. a theme-role background color. */\n style?: ViewStyle;\n /** testID on the root container. */\n testID?: string;\n}\n\n/**\n * Layer-3 named-prop slots that layouts can accept and forward to\n * `composeHeaderOptions()` for `<Stack.Screen options={...}>`.\n */\nexport interface ScreenHeaderProps {\n /** Custom header title. Falls back to `<Stack.Screen name>` mapping. */\n headerTitle?: string;\n /** Custom node rendered on the left of the nav bar. */\n headerLeft?: () => ReactNode;\n /** Custom node rendered on the right of the nav bar. */\n headerRight?: () => ReactNode;\n /** When true, iOS uses large-title mode + scroll-edge appearance. */\n large?: boolean;\n /** iOS scroll-edge behavior. `\"match\"` collapses, `\"transparent\"` always transparent, `\"opaque\"` always opaque. */\n scrollEdgeBehavior?: ScrollEdgeBehavior;\n /** Direct passthrough merged INTO the resolved options object. Wins over named props. */\n headerOptions?: Record<string, unknown>;\n}\n\n/**\n * Compose a `<Stack.Screen options={...}>` object from Layer-3 named\n * props + a direct `headerOptions` passthrough. Layouts call this and\n * pass the result to `<Stack.Screen>` so the host's expo-router stack\n * renders a platform-native large title / scroll-edge appearance.\n *\n * Usage (in a layout primitive):\n *\n * const opts = composeHeaderOptions({\n * headerTitle: \"Settings\",\n * large: true,\n * scrollEdgeBehavior: \"match\",\n * headerOptions: rest.headerOptions,\n * });\n * return <><Stack.Screen options={opts} /><ScreenContainer>...</ScreenContainer></>;\n */\nexport function composeHeaderOptions(\n props: ScreenHeaderProps,\n): Record<string, unknown> {\n const {\n headerTitle,\n headerLeft,\n headerRight,\n large,\n scrollEdgeBehavior,\n headerOptions,\n } = props;\n\n const opts: Record<string, unknown> = {};\n if (headerTitle !== undefined) opts.title = headerTitle;\n if (headerLeft) opts.headerLeft = headerLeft;\n if (headerRight) opts.headerRight = headerRight;\n if (large) {\n // iOS large-title mode. Android falls back to standard.\n opts.headerLargeTitle = true;\n if (scrollEdgeBehavior === \"transparent\") {\n opts.headerTransparent = true;\n } else if (scrollEdgeBehavior === \"opaque\") {\n opts.headerLargeTitleShadowVisible = true;\n }\n }\n // Direct passthrough wins.\n if (headerOptions) {\n Object.assign(opts, headerOptions);\n }\n return opts;\n}\n\nconst DEFAULT_EDGES: SafeAreaEdge[] = [\"left\", \"right\"];\n\n// A see-through Android status bar. React Native 0.88 dropped both props from StatusBar's types\n// (Android is always edge to edge there, so they do nothing); earlier versions still need them.\n// Spread untyped so the screen compiles against either.\nconst TRANSLUCENT_ANDROID_BAR: Record<string, unknown> = { translucent: true, backgroundColor: \"transparent\" };\n\n/**\n * Resolve the StatusBar bar style from the user's `statusBar` setting +\n * the resolved theme mode. `\"auto\"` follows theme; explicit overrides\n * win; anything else falls back to `\"default\"`.\n */\nfunction resolveBarStyle(\n statusBar: \"light\" | \"dark\" | \"auto\" | \"hidden\",\n resolvedMode: \"light\" | \"dark\",\n): \"default\" | \"light-content\" | \"dark-content\" {\n if (statusBar === \"auto\") {\n return resolvedMode === \"dark\" ? \"light-content\" : \"dark-content\";\n }\n if (statusBar === \"light\") return \"light-content\";\n if (statusBar === \"dark\") return \"dark-content\";\n return \"default\";\n}\n\nexport function ScreenContainer({\n children,\n scroll = false,\n safeAreaEdges = DEFAULT_EDGES,\n statusBar = \"auto\",\n themeMode = \"system\",\n className,\n contentClassName,\n keyboardShouldPersistTaps = \"handled\",\n loading = false,\n loadingLabel,\n onRefresh,\n refreshing = false,\n style,\n testID,\n}: ScreenContainerProps) {\n const osMode = useThemeMode();\n const resolvedMode = themeMode === \"system\" ? osMode : themeMode;\n const barStyle = resolveBarStyle(statusBar, resolvedMode);\n\n const body = loading ? (\n <View testID={testID ? `${testID}-body` : undefined} className={cn(\"flex-1\", contentClassName)}>\n <NativeLoadingState fullScreen={false} label={loadingLabel} testID={`${testID ?? \"screen-container\"}-loading`} />\n </View>\n ) : scroll || onRefresh ? (\n <ScrollView\n testID={testID ? `${testID}-scroll` : undefined}\n refreshControl={\n onRefresh ? (\n <NativeRefreshControl testID={`${testID ?? \"screen-container\"}-refresh`} refreshing={refreshing} onRefresh={() => void onRefresh()} />\n ) : undefined\n }\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n contentInsetAdjustmentBehavior=\"automatic\"\n contentContainerClassName={cn(\"flex-grow\", contentClassName)}\n >\n {children}\n </ScrollView>\n ) : (\n <View\n testID={testID ? `${testID}-body` : undefined}\n className={cn(\"flex-1\", contentClassName)}\n >\n {children}\n </View>\n );\n\n return (\n <SafeAreaView\n testID={testID ?? \"screen-container\"}\n edges={safeAreaEdges}\n className={cn(\"flex-1 bg-background\", className)}\n style={style}\n >\n {statusBar !== \"hidden\" ? (\n <StatusBar\n barStyle={\n barStyle as\n | \"default\"\n | \"light-content\"\n | \"dark-content\"\n }\n {...TRANSLUCENT_ANDROID_BAR}\n />\n ) : (\n <StatusBar hidden />\n )}\n {body}\n </SafeAreaView>\n );\n}\n","/**\n * Nav-bar sub-primitives — escape hatches for `<Stack.Screen>` `headerLeft`,\n * `headerRight`, and custom title view.\n *\n * Use these when the named-prop slots on a layout aren't enough — e.g.,\n * a screen needs a save button on the right that's wired to dirty-state,\n * or a search bar replaces the title on a results screen.\n *\n * Pass directly into `headerLeft={() => <NavBarSearchBar ... />}` or\n * compose into a custom `headerTitle={() => <NavBarTitle ... />}` slot.\n *\n * @stability Beta\n */\nimport { Pressable, Text, TextInput, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\n// ---------------------------------------------------------------------------\n// NavBarSaveButton\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSaveButtonProps {\n /** Press handler. Disabled when not provided OR when `disabled`/`loading`. */\n onPress?: () => void;\n /** Visible label. Default `\"Save\"`. */\n label?: string;\n /** When true, the button is muted and not pressable. Use this for clean / pristine forms. */\n disabled?: boolean;\n /** When true, label switches to a busy indicator and presses are blocked. */\n loading?: boolean;\n /** When true, render label in destructive tone. */\n destructive?: boolean;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarSaveButton({\n onPress,\n label = \"Save\",\n disabled,\n loading,\n destructive,\n className,\n testID,\n}: NavBarSaveButtonProps) {\n const isDisabled = !!disabled || !!loading || !onPress;\n return (\n <Pressable\n testID={testID ?? \"nav-bar-save-button\"}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n accessibilityState={{ disabled: isDisabled, busy: !!loading }}\n onPress={isDisabled ? undefined : onPress}\n disabled={isDisabled}\n className={cn(\"min-h-[44px] justify-center px-3\", className)}\n hitSlop={8}\n >\n <Text\n className={cn(\n \"text-base font-semibold\",\n destructive ? \"text-destructive\" : \"text-primary\",\n isDisabled && \"opacity-40\"\n )}\n >\n {loading ? \"…\" : label}\n </Text>\n </Pressable>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarTitle\n// ---------------------------------------------------------------------------\n\nexport interface NavBarTitleProps {\n /** Title text. */\n title: string;\n /** Optional smaller subtitle line under the title. */\n subtitle?: string;\n /** Optional press handler — turns the title row into a tap target (e.g., reveal a picker). */\n onPress?: () => void;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarTitle({\n title,\n subtitle,\n onPress,\n className,\n testID,\n}: NavBarTitleProps) {\n const inner = (\n <View className={cn(\"items-center justify-center\", className)}>\n <Text\n testID={testID ? `${testID}-title` : undefined}\n className=\"text-base font-semibold text-foreground\"\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n testID={testID ? `${testID}-subtitle` : undefined}\n className=\"text-xs text-muted-foreground\"\n numberOfLines={1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"nav-bar-title\"}\n accessibilityRole=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n onPress={onPress}\n hitSlop={8}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View testID={testID ?? \"nav-bar-title\"} accessibilityRole=\"header\">\n {inner}\n </View>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarSearchBar\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSearchBarProps {\n value: string;\n onChangeText: (next: string) => void;\n placeholder?: string;\n /** Called when the user submits the search (return key). */\n onSubmit?: () => void;\n /** Render a clear (X) button when value is non-empty. Default true. */\n clearable?: boolean;\n className?: string;\n testID?: string;\n}\n\n/**\n * Inline search input meant to occupy the title slot on a search results\n * screen. For a sticky search-below-the-header pattern, prefer the\n * standalone <NativeSearchBar> primitive.\n */\nexport function NavBarSearchBar({\n value,\n onChangeText,\n placeholder = \"Search\",\n onSubmit,\n clearable = true,\n className,\n testID,\n}: NavBarSearchBarProps) {\n return (\n <View\n testID={testID ?? \"nav-bar-search\"}\n className={cn(\n \"min-h-[36px] flex-row items-center rounded-full bg-muted px-3\",\n className\n )}\n >\n <TextInput\n testID={testID ? `${testID}-input` : undefined}\n accessibilityLabel={placeholder}\n value={value}\n onChangeText={onChangeText}\n onSubmitEditing={onSubmit}\n placeholder={placeholder}\n placeholderTextColor={nativeColors.neutral[400]}\n returnKeyType=\"search\"\n autoCorrect={false}\n autoCapitalize=\"none\"\n clearButtonMode={clearable ? \"while-editing\" : \"never\"}\n className=\"flex-1 text-base text-foreground\"\n />\n {clearable && value.length > 0 ? (\n <Pressable\n testID={testID ? `${testID}-clear` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Clear search\"\n onPress={() => onChangeText(\"\")}\n hitSlop={8}\n className=\"ml-2 px-1\"\n >\n <Text className=\"text-base text-muted-foreground\">×</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * InboxPage — a list of conversations or tickets: unread state, a time, a\n * preview line, swipe actions, pull to refresh, paging and an empty state.\n *\n * Generic: the rows are whatever the app has (support reports, direct\n * messages, an idea board). Data and actions come in as props; the layout\n * draws them the platform's way. On iOS it is the Settings app's inset\n * grouped style, like `SettingsPage`: the page is `groupedBackground`, the\n * rows one rounded group on `surface` with hairline separators that start at\n * the text. On Android rows are full width.\n *\n * Swipe actions: each row's `swipeActions` are always reachable without a\n * gesture library, as VoiceOver / TalkBack custom actions and on long press\n * (a menu). For the swipe itself, fill the `swipeable` slot with your\n * gesture-handler wrapper (`ReanimatedSwipeable` from\n * react-native-gesture-handler, an optional peer); it receives the actions\n * and the row.\n *\n * Rows: `avatar` puts a picture of who it is between the unread dot and the\n * text (an unread count shows at the end of the row, as in Mail); `leading`\n * replaces the dot.\n *\n * Slots: `row`, `swipeable`, `header` (above the group), `footer` (below it,\n * the paging spinner by default) and `empty`. `slots` swaps a part for your\n * component (same props), `slotProps` feeds the default more props, `null`\n * drops it.\n *\n * Header: `getInboxPageStackOptions()` for `<Stack.Screen options>`.\n *\n * @stability Beta\n */\nimport { Fragment, useState, type ReactNode } from \"react\";\nimport { renderSlot, type SlotPropsFor, type Slots } from \"@marktiderman/genesis-core/slots\";\nimport { Alert, FlatList, Platform, Pressable, ScrollView, StyleSheet, View } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeEmptyState } from \"../components/empty-state\";\nimport { NativeText } from \"../components/text\";\nimport { NativeButton } from \"../components/button\";\nimport { NativeBadge } from \"../components/badge\";\nimport { NativeRefreshControl } from \"../components/refresh-control\";\nimport { NativeLoadingState } from \"../components/loading-state\";\nimport { composeHeaderOptions, type ScreenHeaderProps } from \"./screen-container\";\n\n/** An action on a row: swipe, long press, or an accessibility action. */\nexport interface InboxSwipeAction {\n id: string;\n label: string;\n onPress: () => void;\n /** Destructive tone (delete, leave). */\n destructive?: boolean;\n}\n\nexport interface InboxItem {\n /** Stable id for keying. */\n id: string;\n title: string;\n /** The latest message or a summary, at most two lines. */\n preview?: string;\n /** When it last changed. Shown as a short time or date. */\n timestamp?: string | Date;\n /** Something new the person hasn't read: a dot, and the title in bold. */\n unread?: boolean;\n /** How many unread messages; shown as a count instead of the dot when above 0. */\n unreadCount?: number;\n /** A short status shown under the preview (\"In progress\", \"12 votes\"). */\n meta?: string;\n /** Replaces the unread dot (an icon). For a picture of who it is, use `avatar`, which keeps the dot. */\n leading?: ReactNode;\n /**\n * A picture of who or what it is (a `NativeAvatar`, about 40pt), between the\n * unread dot and the text. The separator then starts at the text. It is hidden\n * from screen readers; when it shows someone `title` doesn't name, say who in\n * `avatarLabel`.\n */\n avatar?: ReactNode;\n /** Who the avatar shows, read before the title, when `title` doesn't name them. */\n avatarLabel?: string;\n /** Shown at the end of the row (a vote button, a badge). Replaces the chevron. */\n trailing?: ReactNode;\n /** Opens the conversation. Rows with `onPress` show a chevron unless `trailing` is set. */\n onPress?: () => void;\n swipeActions?: InboxSwipeAction[];\n /** testID override. Default `<page testID>-row-<id>`. */\n testID?: string;\n}\n\n/** The parts `slots` and `slotProps` reach, with the props each receives. */\nexport type InboxPageSlotMap = {\n row: InboxItem & { testID: string; isFirst: boolean; isLast: boolean; timeLabel: string | null };\n swipeable: { actions: InboxSwipeAction[]; testID: string; children?: ReactNode };\n header: { testID: string };\n footer: { loadingMore: boolean; testID: string };\n empty: { title: string; body: string; actionLabel?: string; onAction?: () => void; testID: string };\n};\n\nexport interface InboxPageProps extends ScreenHeaderProps {\n /** Newest first, as they should show. Empty → the empty state. */\n items: InboxItem[];\n refreshing?: boolean;\n onRefresh?: () => void | Promise<void>;\n /** Called near the end of the list, to load the next page. */\n onEndReached?: () => void;\n /** A next page is loading: the default footer shows a spinner. */\n loadingMore?: boolean;\n /** Above the group (a filter, a call to action). Prefer `slots.header` for a component. */\n header?: ReactNode;\n /** An optional title over the group, in the Settings header style. */\n sectionTitle?: string;\n emptyTitle?: string;\n emptyBody?: string;\n /** The first page is loading: a spinner instead of the empty state. */\n loading?: boolean;\n /** The read failed: the empty slot shows `errorTitle` / `errorBody` instead (and pull to refresh retries). */\n error?: boolean;\n errorTitle?: string;\n errorBody?: string;\n /** A button in the empty state (\"Send feedback\"). */\n emptyActionLabel?: string;\n onEmptyAction?: () => void;\n /** How a row's time reads. Default: the time today, \"Yesterday\", the weekday this week, else the date. */\n formatTime?: (date: Date, now: Date) => string;\n /** The clock, for tests. */\n now?: () => Date;\n slots?: Slots<InboxPageSlotMap>;\n slotProps?: SlotPropsFor<InboxPageSlotMap>;\n /** testID on the root. Default `\"inbox-page\"`. */\n testID?: string;\n}\n\n/** `<Stack.Screen options>` for an InboxPage: a large title that collapses on scroll. */\nexport function getInboxPageStackOptions(props: ScreenHeaderProps & { headerTitle?: string }): Record<string, unknown> {\n return composeHeaderOptions({\n headerTitle: props.headerTitle ?? \"Inbox\",\n large: props.large ?? true,\n scrollEdgeBehavior: props.scrollEdgeBehavior ?? \"match\",\n headerLeft: props.headerLeft,\n headerRight: props.headerRight,\n headerOptions: props.headerOptions,\n });\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** The default row time: `9:41`, `Yesterday`, `Monday`, then a short date. */\nexport function formatInboxTime(date: Date, now: Date): string {\n const start = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n const days = Math.round((start(now) - start(date)) / DAY_MS);\n if (days <= 0) return date.toLocaleTimeString(undefined, { hour: \"numeric\", minute: \"2-digit\" });\n if (days === 1) return \"Yesterday\";\n if (days < 7) return date.toLocaleDateString(undefined, { weekday: \"long\" });\n return date.toLocaleDateString(undefined, { day: \"numeric\", month: \"short\", year: date.getFullYear() === now.getFullYear() ? undefined : \"numeric\" });\n}\n\n/** The row's leading padding, the unread dot's column, an avatar's default size and its gap to the text. */\nconst ROW_PADDING = 16;\nconst LEADING_WIDTH = 18;\nconst DEFAULT_AVATAR = 40;\nconst AVATAR_GAP = 12;\n\n/** UIKit's inset grouped margin on a phone, in points (as SettingsPage). */\nconst IOS_GROUP_MARGIN = 16;\n\nfunction iosGroupRadius(): number {\n return Number.parseFloat(String(Platform.Version)) >= 26 ? 26 : 10;\n}\n\nexport function InboxPage({\n items,\n refreshing,\n onRefresh,\n onEndReached,\n loadingMore = false,\n header,\n sectionTitle,\n emptyTitle,\n emptyBody,\n emptyActionLabel,\n onEmptyAction,\n loading = false,\n error = false,\n errorTitle,\n errorBody,\n formatTime = formatInboxTime,\n now = () => new Date(),\n slots = {},\n slotProps = {},\n testID = \"inbox-page\",\n}: InboxPageProps) {\n const colors = useThemeRoles();\n const clock = now();\n const rows: InboxPageSlotMap[\"row\"][] = items.map((item, index) => ({\n ...item,\n testID: item.testID ?? `${testID}-row-${item.id}`,\n isFirst: index === 0,\n isLast: index === items.length - 1,\n timeLabel: item.timestamp ? formatTime(typeof item.timestamp === \"string\" ? new Date(item.timestamp) : item.timestamp, clock) : null,\n }));\n\n const headerNode = (\n <View>\n {header ?? renderSlot(EmptyPart, slots.header, { testID: `${testID}-header` }, slotProps.header)}\n {sectionTitle ? <SectionTitle title={sectionTitle} testID={`${testID}-section-title`} /> : null}\n </View>\n );\n\n const refreshControl = onRefresh ? <NativeRefreshControl testID={`${testID}-refresh`} refreshing={!!refreshing} onRefresh={() => void onRefresh()} /> : undefined;\n\n if (items.length === 0) {\n // A scroll view, not a plain view: under a large-title (or translucent) header only a\n // scroll view's automatic content inset moves the content below the header, and pull to\n // refresh needs one too.\n return (\n <SafeAreaView testID={testID} edges={[\"left\", \"right\", \"bottom\"]} style={{ flex: 1, backgroundColor: colors.groupedBackground }}>\n <ScrollView\n testID={`${testID}-empty-scroll`}\n contentInsetAdjustmentBehavior=\"automatic\"\n keyboardShouldPersistTaps=\"handled\"\n contentContainerStyle={{ flexGrow: 1, paddingTop: 8, paddingBottom: 32 }}\n refreshControl={refreshControl}\n >\n {headerNode}\n {loading ? (\n <NativeLoadingState fullScreen={false} testID={`${testID}-loading`} />\n ) : (\n renderSlot(\n DefaultEmpty,\n slots.empty,\n error\n ? {\n title: errorTitle ?? \"Couldn't load this\",\n body: errorBody ?? \"Check your connection, then pull to refresh.\",\n actionLabel: onRefresh ? \"Try again\" : undefined,\n onAction: onRefresh ? () => void onRefresh() : undefined,\n testID: `${testID}-error`,\n }\n : {\n title: emptyTitle ?? \"Nothing here yet\",\n body: emptyBody ?? \"When there's something new, it shows up here.\",\n actionLabel: emptyActionLabel,\n onAction: onEmptyAction,\n testID: `${testID}-empty`,\n },\n slotProps.empty,\n )\n )}\n </ScrollView>\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView testID={testID} edges={[\"left\", \"right\", \"bottom\"]} style={{ flex: 1, backgroundColor: colors.groupedBackground }}>\n <FlatList\n testID={`${testID}-list`}\n data={rows}\n keyExtractor={(row) => row.id}\n contentInsetAdjustmentBehavior=\"automatic\"\n // The header can hold a text field (the idea board's \"Suggest\"): its button's first tap\n // must press it, not only close the keyboard.\n keyboardShouldPersistTaps=\"handled\"\n ListHeaderComponent={headerNode}\n ListFooterComponent={renderSlot(DefaultFooter, slots.footer, { loadingMore, testID: `${testID}-footer` }, slotProps.footer)}\n contentContainerStyle={{ paddingTop: 8, paddingBottom: 32 }}\n onEndReached={onEndReached}\n onEndReachedThreshold={0.5}\n refreshControl={refreshControl}\n renderItem={({ item: row }) => {\n const content = renderSlot(DefaultRow, slots.row, row, slotProps.row);\n const actions = row.swipeActions ?? [];\n return (\n <Fragment>\n {actions.length && slots.swipeable !== null\n ? renderSlot(PassThroughSwipeable, slots.swipeable, { actions, testID: `${row.testID}-swipe`, children: content }, slotProps.swipeable)\n : content}\n </Fragment>\n );\n }}\n />\n </SafeAreaView>\n );\n}\n\nfunction EmptyPart(_props: InboxPageSlotMap[\"header\"]) {\n return null;\n}\n\n/** The default `swipeable`: no gesture, just the row (its actions are on long press and in the accessibility actions). */\nfunction PassThroughSwipeable({ children }: InboxPageSlotMap[\"swipeable\"]) {\n return <>{children}</>;\n}\n\nfunction SectionTitle({ title, testID }: { title: string; testID: string }) {\n const colors = useThemeRoles();\n const ios = Platform.OS === \"ios\";\n return (\n <NativeText\n testID={testID}\n accessibilityRole=\"header\"\n className={ios ? \"px-4 pb-1.5 pt-2\" : \"px-4 pb-2 pt-4 text-primary\"}\n style={\n ios\n ? { marginHorizontal: IOS_GROUP_MARGIN, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textTransform: \"uppercase\" }\n : { fontSize: 14, lineHeight: 20, fontWeight: \"500\" }\n }\n >\n {title}\n </NativeText>\n );\n}\n\n/** Opens a row's actions as a menu (long press). */\nexport function showInboxActions(title: string, actions: InboxSwipeAction[], cancelLabel = \"Cancel\"): void {\n Alert.alert(title, undefined, [\n ...actions.map((a) => ({ text: a.label, style: a.destructive ? (\"destructive\" as const) : (\"default\" as const), onPress: a.onPress })),\n { text: cancelLabel, style: \"cancel\" as const },\n ]);\n}\n\nfunction DefaultRow(row: InboxPageSlotMap[\"row\"]) {\n const colors = useThemeRoles();\n const ios = Platform.OS === \"ios\";\n const [pressed, setPressed] = useState(false);\n const actions = row.swipeActions ?? [];\n const radius = iosGroupRadius();\n const unreadLabel = row.unreadCount && row.unreadCount > 0 ? `${row.unreadCount} unread` : row.unread ? \"Unread\" : null;\n const label = [unreadLabel, row.avatar ? row.avatarLabel : null, row.title, row.timeLabel, row.preview, row.meta].filter(Boolean).join(\", \");\n // The separator starts at the text: the row's padding, the dot's column, and the avatar when there is one.\n const [avatarWidth, setAvatarWidth] = useState(0);\n const separatorInset = ROW_PADDING + LEADING_WIDTH + (row.avatar ? (avatarWidth || DEFAULT_AVATAR) + AVATAR_GAP : 0);\n return (\n <View\n testID={`${row.testID}-cell`}\n style={[\n { backgroundColor: colors.surface },\n ios\n ? {\n marginHorizontal: IOS_GROUP_MARGIN,\n borderTopLeftRadius: row.isFirst ? radius : 0,\n borderTopRightRadius: row.isFirst ? radius : 0,\n borderBottomLeftRadius: row.isLast ? radius : 0,\n borderBottomRightRadius: row.isLast ? radius : 0,\n overflow: \"hidden\",\n }\n : null,\n ]}\n >\n <Pressable\n testID={row.testID}\n accessibilityRole={row.onPress ? \"button\" : undefined}\n accessibilityLabel={label}\n accessibilityActions={actions.map((a) => ({ name: a.id, label: a.label }))}\n onAccessibilityAction={(event) => actions.find((a) => a.id === event.nativeEvent.actionName)?.onPress()}\n onPress={row.onPress}\n onLongPress={actions.length ? () => showInboxActions(row.title, actions) : undefined}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n style={{ flexDirection: \"row\", alignItems: \"center\", paddingHorizontal: ROW_PADDING, paddingVertical: 11, minHeight: 60, backgroundColor: pressed && row.onPress ? colors.fill : undefined }}\n >\n <View style={{ width: LEADING_WIDTH, alignItems: \"flex-start\" }}>\n {row.leading ?? (row.unreadCount && row.unreadCount > 0 ? null : <UnreadDot unread={!!row.unread} testID={`${row.testID}-unread`} color={colors.tint} />)}\n </View>\n {row.avatar ? (\n <View\n testID={`${row.testID}-avatar`}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n onLayout={(e) => setAvatarWidth(Math.round(e.nativeEvent.layout.width))}\n style={{ marginRight: AVATAR_GAP }}\n >\n {row.avatar}\n </View>\n ) : null}\n <View style={{ flex: 1, minWidth: 0 }}>\n <View style={{ flexDirection: \"row\", alignItems: \"baseline\" }}>\n <NativeText\n numberOfLines={1}\n style={{ flex: 1, color: colors.label, fontSize: 17, lineHeight: 22, fontWeight: row.unread || (row.unreadCount ?? 0) > 0 ? \"600\" : \"400\" }}\n >\n {row.title}\n </NativeText>\n {row.timeLabel ? (\n <NativeText testID={`${row.testID}-time`} style={{ marginLeft: 8, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }}>\n {row.timeLabel}\n </NativeText>\n ) : null}\n </View>\n {row.preview ? (\n <NativeText numberOfLines={2} style={{ marginTop: 2, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }}>\n {row.preview}\n </NativeText>\n ) : null}\n {row.meta ? (\n <NativeText testID={`${row.testID}-meta`} style={{ marginTop: 4, color: colors.tertiaryLabel, fontSize: 13, lineHeight: 18 }}>\n {row.meta}\n </NativeText>\n ) : null}\n </View>\n {row.unreadCount && row.unreadCount > 0 ? (\n <View style={{ marginLeft: 8 }}>\n <NativeBadge testID={`${row.testID}-count`}>{String(row.unreadCount)}</NativeBadge>\n </View>\n ) : null}\n {row.trailing ? <View style={{ marginLeft: 8 }}>{row.trailing}</View> : row.onPress ? <Chevron color={colors.tertiaryLabel} /> : null}\n </Pressable>\n {row.isLast ? null : (\n <View accessibilityElementsHidden importantForAccessibility=\"no-hide-descendants\" style={{ flexDirection: \"row\", height: StyleSheet.hairlineWidth }}>\n <View testID={`${row.testID}-separator-inset`} style={{ width: separatorInset }} />\n <View testID={`${row.testID}-separator-line`} style={{ flex: 1, backgroundColor: colors.separator }} />\n </View>\n )}\n </View>\n );\n}\n\nfunction Chevron({ color }: { color: unknown }) {\n return (\n <NativeText accessibilityElementsHidden importantForAccessibility=\"no\" style={{ marginLeft: 8, color: color as string, fontSize: 20, lineHeight: 22 }}>\n ›\n </NativeText>\n );\n}\n\nfunction UnreadDot({ unread, testID, color }: { unread: boolean; testID: string; color: unknown }) {\n if (!unread) return <View testID={testID} style={{ width: 10, height: 10 }} />;\n return <View testID={testID} style={{ width: 10, height: 10, borderRadius: 5, backgroundColor: color as string }} />;\n}\n\nfunction DefaultFooter({ loadingMore, testID }: InboxPageSlotMap[\"footer\"]) {\n if (!loadingMore) return null;\n return (\n <NativeLoadingState fullScreen={false} size=\"small\" accessibilityLabel=\"Loading more\" className=\"py-4\" testID={testID} />\n );\n}\n\nfunction DefaultEmpty({ title, body, actionLabel, onAction, testID }: InboxPageSlotMap[\"empty\"]) {\n return (\n <NativeEmptyState\n variant=\"first-run\"\n title={title}\n body={body}\n testID={testID}\n primaryAction={\n actionLabel && onAction ? (\n <NativeButton onPress={onAction} testID={`${testID}-action`}>\n {actionLabel}\n </NativeButton>\n ) : undefined\n }\n />\n );\n}\n"]}
@@ -3,7 +3,7 @@ import { ReactNode, ComponentType } from 'react';
3
3
  import { ResourceFormFieldDef, BaseRecord, DataRow, FieldReference, ResourceContract } from '@marktiderman/genesis-core';
4
4
  import { Control, UseFormReturn } from 'react-hook-form';
5
5
  import { UseResourceOptions } from '@marktiderman/genesis-core/hooks';
6
- import { d as InboxSwipeAction, c as InboxPageSlotMap, g as ScreenHeaderProps } from '../inbox-page-DZUR-PJ1.js';
6
+ import { d as InboxSwipeAction, c as InboxPageSlotMap, g as ScreenHeaderProps } from '../inbox-page-BEarNEIP.js';
7
7
  import { ResourceView, DisplayHint, ResolvedFormField, ResolvedLink, Allowed, RowSummary, RowPicture, Viewer, ResolvedColumn, RecordView } from '@marktiderman/genesis-core/resource-view';
8
8
  import { ReadinessLabels } from '@marktiderman/genesis-core/resource';
9
9
  import '@marktiderman/genesis-core/slots';
@@ -403,6 +403,11 @@ interface UseNativeResourceViewReturn<T extends Row$2 = Row$2> {
403
403
  loadPrevious: () => void;
404
404
  loadingPrevious: boolean;
405
405
  hasPrevious: boolean;
406
+ /**
407
+ * How many rows sit above `rows[0]`: the rows `maxPages` dropped from the front, 0 at the top.
408
+ * A grid cuts its lines from here, so dropping or loading back a page never regroups them.
409
+ */
410
+ rowOffset: number;
406
411
  /** What the search box shows (the server sees it 300 ms after the last keystroke). */
407
412
  search: string;
408
413
  setSearch: (text: string) => void;
@@ -454,6 +459,45 @@ type Row$1 = Record<string, unknown>;
454
459
  type NativeResourceSwipeableProps = Omit<InboxPageSlotMap["swipeable"], "actions"> & {
455
460
  actions: NativeResourceSwipeAction[];
456
461
  };
462
+ /** How rows show: a list (the default) or cards in columns, as the web's `mode`. */
463
+ type NativeResourceViewMode = "list" | "grid";
464
+ /**
465
+ * Spread onto your card's Pressable: the press (the screen's `onRowPress`, else the peek), the
466
+ * long press (the row's actions), and the label and actions screen readers use. The same wiring
467
+ * the built-in rows have, so a custom card never hand-rolls it.
468
+ */
469
+ interface NativeResourceCardPressableProps {
470
+ testID: string;
471
+ accessibilityRole: "button";
472
+ accessibilityLabel: string;
473
+ accessibilityActions: {
474
+ name: string;
475
+ label: string;
476
+ }[];
477
+ onAccessibilityAction: (event: {
478
+ nativeEvent: {
479
+ actionName: string;
480
+ };
481
+ }) => void;
482
+ onPress: () => void;
483
+ onLongPress: (() => void) | undefined;
484
+ }
485
+ /** What `renderCard` gets beside the row: the native counterpart of the web's ResourceCardActions. */
486
+ interface NativeResourceCardActions {
487
+ /** `view.summary(row)`: the title, subtitle, chips and picture the built-in row draws. */
488
+ item: NativeResourceRowItem;
489
+ /** The row's actions (edit, delete), each refusal with its reason; pressing one acts or explains. */
490
+ actions: NativeResourceSwipeAction[];
491
+ /** Opens the row, as pressing a built-in row does. */
492
+ open: () => void;
493
+ /** Shows the row's actions in an action sheet (what a long press does). */
494
+ showActions: () => void;
495
+ /** Everything above, for a Pressable: `<Pressable {...card.pressableProps}>`. */
496
+ pressableProps: NativeResourceCardPressableProps;
497
+ /** First and last in its section (list mode), for rounded group corners and separators. */
498
+ first: boolean;
499
+ last: boolean;
500
+ }
457
501
  interface NativeResourceViewProps<T extends Row$1 = Row$1> extends NativeResourceViewOptions<T> {
458
502
  view: AnyResourceView<T>;
459
503
  /** The heading above the list. Default the view's title; `false` when the navigation bar shows it. */
@@ -470,6 +514,22 @@ interface NativeResourceViewProps<T extends Row$1 = Row$1> extends NativeResourc
470
514
  header?: ReactNode;
471
515
  /** Replaces the empty state. */
472
516
  emptyState?: ReactNode;
517
+ /**
518
+ * `"grid"`: cards in `numColumns` columns, as the web's `mode="grid"`. Sections, paging, pull to
519
+ * refresh, the empty and error states, long press, accessibility and swipe actions all stay.
520
+ * Default `"list"`.
521
+ */
522
+ mode?: NativeResourceViewMode;
523
+ /** Columns in grid mode (React Native's FlatList name). Default 2. */
524
+ numColumns?: number;
525
+ /**
526
+ * Draws each row (list) or card (grid) yourself, as the web's `renderCard`. Spread
527
+ * `card.pressableProps` on your Pressable for the press, long press and accessibility; the
528
+ * screen still wraps it in `swipeable`. It owns the whole row: no inset group cell or separator
529
+ * is drawn around it. `index` is the row's place in its section. Pass a stable function
530
+ * (`useCallback`) so rows redraw only when their data does.
531
+ */
532
+ renderCard?: (row: T, index: number, card: NativeResourceCardActions) => ReactNode;
473
533
  /** Hide the search box. Shown by default when the view has something to search. */
474
534
  searchable?: boolean;
475
535
  /**
@@ -687,4 +747,4 @@ declare const defaultNativeResourceWorkspaceMessages: NativeRecordViewMessages;
687
747
  */
688
748
  declare function parseSettingNumber(text: string): number | null;
689
749
 
690
- export { type AnyResourceView, DEFAULT_MAX_PAGES, type DisplayContext, type DisplayRenderer, type DisplayRenderers, DisplayRenderersProvider, type DisplayTimeZones, DisplayTimeZonesProvider, type NativeCardFieldDef, NativeDataFilters, type NativeDataFiltersProps, NativeDataPageShell, type NativeDataPageShellProps, type NativeDetailField, NativeDetailPanel, type NativeDetailPanelProps, NativeEmptyState, type NativeEmptyStateProps, type NativeFormField, type NativeFormFieldKind, NativeRecordView, type NativeRecordViewHeaderProps, NativeRecordViewMenu, type NativeRecordViewMessages, type NativeRecordViewProps, NativeResourceForm, NativeResourceFormFieldRenderer, type NativeResourceFormFieldRendererProps, type NativeResourceFormProps, NativeResourceFormSheet, type NativeResourceFormSheetProps, NativeResourcePage, type NativeResourcePageProps, type NativeResourceRowItem, type NativeResourceScreenCan, type NativeResourceSection, type NativeResourceSwipeAction, type NativeResourceSwipeableProps, NativeResourceView, type NativeResourceViewMessages, NativeResourceViewMessagesProvider, type NativeResourceViewOptions, type NativeResourceViewProps, NativeResourceWorkspace, type NativeResourceWorkspaceHeaderProps, NativeResourceWorkspaceMenu, type NativeResourceWorkspaceMessages, type NativeResourceWorkspaceProps, SEARCH_DEBOUNCE_MS, SEGMENTED_SECTIONS_MAX, type SaveResult, type UseNativeResourceViewReturn, allowed, dateToDay, dayToDate, defaultNativeRecordViewMessages, defaultNativeResourceViewMessages, defaultNativeResourceWorkspaceMessages, displayText, formFieldsFor, formatDay, formatInstant, getNativeRecordViewStackOptions, getNativeResourceWorkspaceStackOptions, nativeDisplayRenderers, openableUrl, parseSettingNumber, resolveZone, rowItem, screenValues, sectionsFor, serverSort, serverSorts, swipeActionsFor, useDisplayCell, useDisplayTimeZones, useNativeResourceView, useNativeResourceViewMessages, validateValues, writableValues };
750
+ export { type AnyResourceView, DEFAULT_MAX_PAGES, type DisplayContext, type DisplayRenderer, type DisplayRenderers, DisplayRenderersProvider, type DisplayTimeZones, DisplayTimeZonesProvider, type NativeCardFieldDef, NativeDataFilters, type NativeDataFiltersProps, NativeDataPageShell, type NativeDataPageShellProps, type NativeDetailField, NativeDetailPanel, type NativeDetailPanelProps, NativeEmptyState, type NativeEmptyStateProps, type NativeFormField, type NativeFormFieldKind, NativeRecordView, type NativeRecordViewHeaderProps, NativeRecordViewMenu, type NativeRecordViewMessages, type NativeRecordViewProps, type NativeResourceCardActions, type NativeResourceCardPressableProps, NativeResourceForm, NativeResourceFormFieldRenderer, type NativeResourceFormFieldRendererProps, type NativeResourceFormProps, NativeResourceFormSheet, type NativeResourceFormSheetProps, NativeResourcePage, type NativeResourcePageProps, type NativeResourceRowItem, type NativeResourceScreenCan, type NativeResourceSection, type NativeResourceSwipeAction, type NativeResourceSwipeableProps, NativeResourceView, type NativeResourceViewMessages, NativeResourceViewMessagesProvider, type NativeResourceViewMode, type NativeResourceViewOptions, type NativeResourceViewProps, NativeResourceWorkspace, type NativeResourceWorkspaceHeaderProps, NativeResourceWorkspaceMenu, type NativeResourceWorkspaceMessages, type NativeResourceWorkspaceProps, SEARCH_DEBOUNCE_MS, SEGMENTED_SECTIONS_MAX, type SaveResult, type UseNativeResourceViewReturn, allowed, dateToDay, dayToDate, defaultNativeRecordViewMessages, defaultNativeResourceViewMessages, defaultNativeResourceWorkspaceMessages, displayText, formFieldsFor, formatDay, formatInstant, getNativeRecordViewStackOptions, getNativeResourceWorkspaceStackOptions, nativeDisplayRenderers, openableUrl, parseSettingNumber, resolveZone, rowItem, screenValues, sectionsFor, serverSort, serverSorts, swipeActionsFor, useDisplayCell, useDisplayTimeZones, useNativeResourceView, useNativeResourceViewMessages, validateValues, writableValues };