@marktiderman/genesis-ui-native 2.2.0 → 2.3.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.
Files changed (79) hide show
  1. package/README.md +82 -0
  2. package/dist/chunk-7PCWEY6R.js +27 -0
  3. package/dist/chunk-7PCWEY6R.js.map +1 -0
  4. package/dist/chunk-D5RKSPMH.js +24 -0
  5. package/dist/chunk-D5RKSPMH.js.map +1 -0
  6. package/dist/{chunk-5HRGIA6F.js → chunk-EFXCJ5AN.js} +76 -3
  7. package/dist/chunk-EFXCJ5AN.js.map +1 -0
  8. package/dist/{chunk-2WCXMJL6.js → chunk-FIITITXO.js} +67 -108
  9. package/dist/chunk-FIITITXO.js.map +1 -0
  10. package/dist/chunk-H4Q7COTI.js +1587 -0
  11. package/dist/chunk-H4Q7COTI.js.map +1 -0
  12. package/dist/{chunk-TXJT55JC.js → chunk-Q445I7WO.js} +715 -324
  13. package/dist/chunk-Q445I7WO.js.map +1 -0
  14. package/dist/{chunk-ULS7I6ZS.js → chunk-W2UBJ56D.js} +99 -12
  15. package/dist/chunk-W2UBJ56D.js.map +1 -0
  16. package/dist/components/index.d.ts +146 -18
  17. package/dist/components/index.js +6 -4
  18. package/dist/data/index.d.ts +7 -1
  19. package/dist/data/index.js +31 -6
  20. package/dist/data/index.js.map +1 -1
  21. package/dist/hooks/index.js +2 -1
  22. package/dist/icons/lucide.d.ts +7 -0
  23. package/dist/icons/lucide.js +60 -0
  24. package/dist/icons/lucide.js.map +1 -0
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +7 -6
  27. package/dist/layouts/index.d.ts +329 -4
  28. package/dist/layouts/index.js +3 -3
  29. package/dist/native-modules-BGO2MnFF.d.ts +219 -0
  30. package/package.json +34 -5
  31. package/src/__tests__/fake-modules.tsx +134 -0
  32. package/src/__tests__/native-modules-lists.test.tsx +71 -0
  33. package/src/__tests__/native-modules.test.tsx +631 -0
  34. package/src/components/__tests__/refresh-control.test.tsx +35 -0
  35. package/src/components/__tests__/sheet.test.tsx +193 -0
  36. package/src/components/__tests__/toast.test.tsx +15 -0
  37. package/src/components/avatar.tsx +69 -16
  38. package/src/components/date-time-picker.tsx +128 -10
  39. package/src/components/drawer.tsx +158 -68
  40. package/src/components/dropdown-menu.tsx +7 -6
  41. package/src/components/glass-surface.tsx +150 -0
  42. package/src/components/icon.tsx +66 -0
  43. package/src/components/image.tsx +89 -0
  44. package/src/components/index.ts +33 -2
  45. package/src/components/list-item.tsx +29 -9
  46. package/src/components/popover.tsx +12 -9
  47. package/src/components/refresh-control.tsx +11 -45
  48. package/src/components/segmented-control.tsx +7 -1
  49. package/src/components/sheet.tsx +276 -133
  50. package/src/components/skeleton.tsx +75 -53
  51. package/src/components/toast.tsx +185 -87
  52. package/src/data/NativeResourcePage.tsx +48 -3
  53. package/src/data/__tests__/resource-page-offline.test.tsx +47 -0
  54. package/src/hooks/use-reduced-motion.ts +24 -10
  55. package/src/icon-names.ts +62 -0
  56. package/src/icons/lucide.ts +114 -0
  57. package/src/layouts/__tests__/google-sign-in.test.tsx +26 -0
  58. package/src/layouts/__tests__/inbox-page.test.tsx +200 -0
  59. package/src/layouts/__tests__/keyboard-scroll.test.tsx +42 -1
  60. package/src/layouts/__tests__/settings-page-native-look.test.tsx +142 -0
  61. package/src/layouts/__tests__/thread-page.test.tsx +128 -0
  62. package/src/layouts/auth-screen.tsx +6 -3
  63. package/src/layouts/google-sign-in.tsx +42 -0
  64. package/src/layouts/inbox-page.tsx +455 -0
  65. package/src/layouts/index.ts +37 -2
  66. package/src/layouts/keyboard.tsx +61 -9
  67. package/src/layouts/notifications-page.tsx +133 -16
  68. package/src/layouts/settings-page.tsx +117 -14
  69. package/src/layouts/settings-sub-page.tsx +9 -3
  70. package/src/layouts/thread-page.tsx +444 -0
  71. package/src/native-modules.tsx +186 -0
  72. package/dist/chunk-2WCXMJL6.js.map +0 -1
  73. package/dist/chunk-5HRGIA6F.js.map +0 -1
  74. package/dist/chunk-F2TGDKOO.js +0 -43
  75. package/dist/chunk-F2TGDKOO.js.map +0 -1
  76. package/dist/chunk-FZTUSM56.js +0 -935
  77. package/dist/chunk-FZTUSM56.js.map +0 -1
  78. package/dist/chunk-TXJT55JC.js.map +0 -1
  79. package/dist/chunk-ULS7I6ZS.js.map +0 -1
@@ -1,5 +1,7 @@
1
+ import { useGenesisModules } from './chunk-EFXCJ5AN.js';
2
+ import { useThemeRoles } from './chunk-Z3AQYVUA.js';
1
3
  import { cn } from './chunk-OHZD7KRO.js';
2
- import { View, Text, Pressable } from 'react-native';
4
+ import { View, Text, Platform, Pressable, RefreshControl } from 'react-native';
3
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
6
 
5
7
  var defaults = {
@@ -86,6 +88,78 @@ function NativeEmptyState({
86
88
  }
87
89
  );
88
90
  }
91
+
92
+ // src/icon-names.ts
93
+ var SF_SYMBOLS = {
94
+ "arrow-left": "arrow.left",
95
+ "arrow-up": "arrow.up",
96
+ bell: "bell",
97
+ calendar: "calendar",
98
+ camera: "camera",
99
+ check: "checkmark",
100
+ "chevron-down": "chevron.down",
101
+ "chevron-left": "chevron.left",
102
+ "chevron-right": "chevron.right",
103
+ "chevron-up": "chevron.up",
104
+ clock: "clock",
105
+ close: "xmark",
106
+ compose: "square.and.pencil",
107
+ copy: "doc.on.doc",
108
+ edit: "pencil",
109
+ error: "xmark.circle",
110
+ "external-link": "arrow.up.right.square",
111
+ file: "doc",
112
+ filter: "line.3.horizontal.decrease",
113
+ heart: "heart",
114
+ home: "house",
115
+ image: "photo",
116
+ info: "info.circle",
117
+ lock: "lock",
118
+ "log-out": "rectangle.portrait.and.arrow.right",
119
+ mail: "envelope",
120
+ menu: "line.3.horizontal",
121
+ message: "bubble.left",
122
+ mic: "mic",
123
+ minus: "minus",
124
+ more: "ellipsis",
125
+ paperclip: "paperclip",
126
+ pause: "pause.fill",
127
+ pin: "pin",
128
+ play: "play.fill",
129
+ plus: "plus",
130
+ refresh: "arrow.clockwise",
131
+ reply: "arrowshape.turn.up.left",
132
+ search: "magnifyingglass",
133
+ settings: "gearshape",
134
+ share: "square.and.arrow.up",
135
+ star: "star",
136
+ success: "checkmark.circle",
137
+ trash: "trash",
138
+ user: "person",
139
+ warning: "exclamationmark.triangle"
140
+ };
141
+ var NATIVE_ICON_NAMES = Object.keys(SF_SYMBOLS);
142
+ var warned = /* @__PURE__ */ new Set();
143
+ function warnOnce(name) {
144
+ if (typeof __DEV__ === "undefined" || !__DEV__ || warned.has(name)) return;
145
+ warned.add(name);
146
+ console.warn(
147
+ `[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.`
148
+ );
149
+ }
150
+ function NativeIcon({ name, size = 20, color, weight, label, testID }) {
151
+ const { symbol: SymbolView, icons } = useGenesisModules();
152
+ const roles = useThemeRoles();
153
+ const tint = color ?? roles.label;
154
+ const a11y = label ? { accessible: true, accessibilityRole: "image", accessibilityLabel: label } : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
155
+ const Fallback = icons?.[name];
156
+ const fallback = Fallback ? /* @__PURE__ */ jsx(Fallback, { size, color: tint, testID: testID ? `${testID}-fallback` : void 0 }) : null;
157
+ if (Platform.OS === "ios" && SymbolView) {
158
+ return /* @__PURE__ */ jsx(View, { ...a11y, testID, style: { width: size, height: size }, children: /* @__PURE__ */ jsx(SymbolView, { name: SF_SYMBOLS[name], size, tintColor: tint, weight, fallback, style: { width: size, height: size } }) });
159
+ }
160
+ if (!fallback) warnOnce(name);
161
+ return /* @__PURE__ */ jsx(View, { ...a11y, testID, style: { width: size, height: size, alignItems: "center", justifyContent: "center" }, children: fallback });
162
+ }
89
163
  function NativeListItem({
90
164
  title,
91
165
  subtitle,
@@ -111,14 +185,7 @@ function NativeListItem({
111
185
  ) : null
112
186
  ] }),
113
187
  trailing ? /* @__PURE__ */ jsx(View, { className: "ml-3", children: trailing }) : null,
114
- showChevron ? /* @__PURE__ */ jsx(
115
- Text,
116
- {
117
- accessibilityElementsHidden: true,
118
- className: "ml-2 text-base text-muted-foreground",
119
- children: "\u203A"
120
- }
121
- ) : null
188
+ showChevron ? /* @__PURE__ */ jsx(Chevron, {}) : null
122
189
  ] });
123
190
  if (onPress) {
124
191
  return /* @__PURE__ */ jsx(
@@ -152,6 +219,21 @@ function NativeListItem({
152
219
  }
153
220
  );
154
221
  }
222
+ function Chevron() {
223
+ const { symbol, icons } = useGenesisModules();
224
+ const roles = useThemeRoles();
225
+ if (Platform.OS === "ios" && symbol || icons?.["chevron-right"]) {
226
+ return /* @__PURE__ */ jsx(View, { className: "ml-2", children: /* @__PURE__ */ jsx(NativeIcon, { name: "chevron-right", size: 14, weight: "semibold", color: roles.tertiaryLabel, testID: "native-list-item-chevron" }) });
227
+ }
228
+ return /* @__PURE__ */ jsx(
229
+ Text,
230
+ {
231
+ accessibilityElementsHidden: true,
232
+ className: "ml-2 text-base text-muted-foreground",
233
+ children: "\u203A"
234
+ }
235
+ );
236
+ }
155
237
  function NativeListItemDivider({ className }) {
156
238
  return /* @__PURE__ */ jsx(View, { className: cn("h-px bg-border", className) });
157
239
  }
@@ -177,7 +259,12 @@ function NativeSectionListHeader({
177
259
  }
178
260
  );
179
261
  }
262
+ function NativeRefreshControl({ tintColor, colors, testID, ...rest }) {
263
+ const tint = useThemeRoles().tint;
264
+ const androidTint = typeof tint === "string" ? [tint] : void 0;
265
+ return /* @__PURE__ */ jsx(RefreshControl, { ...rest, tintColor: tintColor ?? tint, colors: colors ?? androidTint, testID: testID ?? "native-refresh-control" });
266
+ }
180
267
 
181
- export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader };
182
- //# sourceMappingURL=chunk-ULS7I6ZS.js.map
183
- //# sourceMappingURL=chunk-ULS7I6ZS.js.map
268
+ export { NATIVE_ICON_NAMES, NativeEmptyState, NativeIcon, NativeListItem, NativeListItemDivider, NativeRefreshControl, NativeSectionListHeader, SF_SYMBOLS };
269
+ //# sourceMappingURL=chunk-W2UBJ56D.js.map
270
+ //# sourceMappingURL=chunk-W2UBJ56D.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"],"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,IAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,IAAA,GAAO,SAAS,OAAO,CAAA;AAC7B,EAAA,MAAM,eAAe,IAAA,IAAQ,WAAA;AAC7B,EAAA,MAAM,kBAAkB,aAAA,IAAiB,MAAA;AAKzC,EAAA,MAAM,OAAQ,UAAA,CACX,OAAA;AACH,EAAA,MAAM,OAAA,GAAU,MAAM,GAAA,EAAK,QAAA;AAC3B,EAAA,MAAM,KAAA,GAAQ,OAAA,KAAY,aAAA,IAAiB,OAAA,KAAY,MAAA;AAEvD,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,MAAA,IAAU,CAAA,YA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C3D;AC/FO,SAAS,uBAAA,CAAwB;AAAA,EACtC,KAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAC/B,EAAA,uBACEC,IAAAA;AAAA,IAACD,IAAAA;AAAA,IAAA;AAAA,MACC,QAAQ,MAAA,IAAU,uBAAA;AAAA,MAClB,iBAAA,EAAkB,QAAA;AAAA,MAClB,SAAA,EAAW,EAAA;AAAA,QACT,iFAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAAD,GAAAA,CAACG,IAAAA,EAAA,EAAK,SAAA,EAAU,wEACb,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ;ACnBO,SAAS,qBAAqB,EAAE,SAAA,EAAW,QAAQ,MAAA,EAAQ,GAAG,MAAK,EAA8B;AACtG,EAAA,MAAM,IAAA,GAAO,eAAc,CAAE,IAAA;AAC7B,EAAA,MAAM,cAAc,OAAO,IAAA,KAAS,QAAA,GAAW,CAAC,IAAI,CAAA,GAAI,MAAA;AACxD,EAAA,uBAAOH,GAAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,IAAA,EAAM,SAAA,EAAW,SAAA,IAAc,IAAA,EAAiB,MAAA,EAAQ,MAAA,IAAU,WAAA,EAAa,MAAA,EAAQ,UAAU,wBAAA,EAA0B,CAAA;AACxJ","file":"chunk-W2UBJ56D.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 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 edit: \"pencil\",\n error: \"xmark.circle\",\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 star: \"star\",\n success: \"checkmark.circle\",\n trash: \"trash\",\n user: \"person\",\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"]}
@@ -1,8 +1,10 @@
1
1
  import * as react from 'react';
2
- import react__default from 'react';
2
+ import react__default, { ReactNode } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import { TextProps, TextInputProps, ViewProps, SwitchProps } from 'react-native';
5
+ import { TextProps, ScrollViewProps, TextInputProps, ViewProps, SwitchProps, ColorValue } from 'react-native';
6
+ import { o as NativeIconName, b as GenesisGlassModule } from '../native-modules-BGO2MnFF.js';
7
+ export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, c as GenesisIconComponent, d as GenesisIconSet, e as GenesisImageComponent, f as GenesisImageProps, g as GenesisListComponent, h as GenesisListProps, i as GenesisModules, j as GenesisModulesProvider, k as GenesisModulesProviderProps, l as GenesisReanimatedModule, m as GenesisSymbolComponent, n as GenesisSymbolProps, N as NATIVE_ICON_NAMES, S as SF_SYMBOLS, u as useGenesisModules } from '../native-modules-BGO2MnFF.js';
6
8
 
7
9
  declare const textVariants: (props?: ({
8
10
  preset?: "h1" | "h2" | "h3" | "h4" | "body" | "body-sm" | "caption" | "label" | null | undefined;
@@ -124,18 +126,60 @@ declare function useToast(): NativeToastContextValue;
124
126
  interface NativeSheetProps {
125
127
  /** Controlled visibility. */
126
128
  open: boolean;
127
- /** Fired when the user dismisses the sheet (backdrop, gesture, swipe). */
129
+ /** Fired when the user dismisses the sheet (backdrop, swipe down, Android back). Set `open` false in it. */
128
130
  onOpenChange: (open: boolean) => void;
129
- /** Snap points (gorhom-style). e.g. ["25%", "50%", "90%"]. */
131
+ /** Snap points, with `@gorhom/bottom-sheet` only (see `NativeSheetProvider`). e.g. ["25%", "50%", "90%"]. */
130
132
  snapPoints?: (string | number)[];
131
- /** Index of initial snap point. Default 0. */
133
+ /** Index of initial snap point, with `@gorhom/bottom-sheet` only. Default 0. */
132
134
  initialSnapIndex?: number;
133
- /** Disable dismissing by tapping the backdrop. Default false. */
135
+ /** Keep the sheet open when the user taps the backdrop, swipes it down or presses Android back. Default false. */
134
136
  disableBackdropDismiss?: boolean;
135
- children: React.ReactNode;
137
+ children: ReactNode;
136
138
  testID?: string;
137
139
  }
138
- declare function NativeSheet({ open, onOpenChange, snapPoints, initialSnapIndex, disableBackdropDismiss, children, testID, }: NativeSheetProps): react.JSX.Element;
140
+ /**
141
+ * The parts of `@gorhom/bottom-sheet` (v5) the sheet uses. Pass the whole
142
+ * module: `import * as BottomSheet from "@gorhom/bottom-sheet"`.
143
+ */
144
+ interface NativeSheetLibrary {
145
+ BottomSheetModal: unknown;
146
+ BottomSheetView: unknown;
147
+ BottomSheetBackdrop: unknown;
148
+ BottomSheetModalProvider: unknown;
149
+ /** Used by `NativeSheetScrollView` when present. */
150
+ BottomSheetScrollView?: unknown;
151
+ }
152
+ interface NativeSheetProviderProps {
153
+ /**
154
+ * `@gorhom/bottom-sheet` v5 (`import * as BottomSheet from "@gorhom/bottom-sheet"`).
155
+ * Read once. The app must also wrap its root in gesture-handler's
156
+ * `GestureHandlerRootView` and set Reanimated up, as the library requires.
157
+ * Sheet content renders in the library's portal, inside this provider:
158
+ * mount it below the providers sheets read (data, session, navigation).
159
+ */
160
+ bottomSheet: NativeSheetLibrary;
161
+ children: ReactNode;
162
+ }
163
+ /**
164
+ * Opts every `NativeSheet` below it into `@gorhom/bottom-sheet` and mounts
165
+ * the library's `BottomSheetModalProvider`. A module missing any export the
166
+ * sheet needs is reported with `console.error` and ignored, so sheets fall
167
+ * back to the native modal instead of crashing on open.
168
+ *
169
+ * @stability Beta
170
+ */
171
+ declare function NativeSheetProvider({ bottomSheet, children }: NativeSheetProviderProps): react.JSX.Element;
172
+ /** @stability Beta */
173
+ declare function NativeSheet(props: NativeSheetProps): react.JSX.Element;
174
+ /**
175
+ * A `ScrollView` for sheet content: the library's `BottomSheetScrollView`
176
+ * under `NativeSheetProvider` (so scrolling and dragging the sheet don't
177
+ * fight), React Native's otherwise. Sized to its content until it reaches
178
+ * the sheet's height.
179
+ *
180
+ * @stability Beta
181
+ */
182
+ declare function NativeSheetScrollView({ style, ...props }: ScrollViewProps): react.JSX.Element;
139
183
 
140
184
  interface NativePopoverProps {
141
185
  open?: boolean;
@@ -172,7 +216,7 @@ interface NativeDrawerProps {
172
216
  className?: string;
173
217
  testID?: string;
174
218
  }
175
- declare function NativeDrawer({ open, onOpenChange, side, width, children, className, testID, }: NativeDrawerProps): react.JSX.Element;
219
+ declare function NativeDrawer(props: NativeDrawerProps): react.JSX.Element;
176
220
 
177
221
  type NativeAccordionType = "single" | "multiple";
178
222
  interface NativeAccordionProps {
@@ -483,13 +527,16 @@ interface NativeRefreshControlProps {
483
527
  progressBackgroundColor?: string;
484
528
  testID?: string;
485
529
  }
486
- declare function NativeRefreshControl(props: NativeRefreshControlProps): react.JSX.Element | null;
530
+ /**
531
+ * Pull to refresh, tinted with the theme's `tint` role. Works under any Genesis root.
532
+ */
533
+ declare function NativeRefreshControl({ tintColor, colors, testID, ...rest }: NativeRefreshControlProps): react.JSX.Element;
487
534
 
488
535
  declare const badgeVariants: (props?: ({
489
- variant?: "default" | "secondary" | "outline" | "destructive" | "success" | "info" | "warning" | "muted" | null | undefined;
536
+ variant?: "default" | "secondary" | "outline" | "destructive" | "info" | "success" | "warning" | "muted" | null | undefined;
490
537
  } & class_variance_authority_types.ClassProp) | undefined) => string;
491
538
  declare const badgeTextVariants: (props?: ({
492
- variant?: "default" | "secondary" | "outline" | "destructive" | "success" | "info" | "warning" | "muted" | null | undefined;
539
+ variant?: "default" | "secondary" | "outline" | "destructive" | "info" | "success" | "warning" | "muted" | null | undefined;
493
540
  } & class_variance_authority_types.ClassProp) | undefined) => string;
494
541
  interface NativeBadgeProps extends VariantProps<typeof badgeVariants> {
495
542
  className?: string;
@@ -526,16 +573,16 @@ interface NativeSkeletonProps {
526
573
  circle?: boolean;
527
574
  testID?: string;
528
575
  }
529
- declare function NativeSkeleton({ className, width, height, size, circle, ...props }: NativeSkeletonProps): react.JSX.Element;
576
+ declare function NativeSkeleton(props: NativeSkeletonProps): react.JSX.Element;
530
577
 
531
578
  declare const alertVariants: (props?: ({
532
- variant?: "default" | "destructive" | "success" | "info" | "warning" | null | undefined;
579
+ variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
533
580
  } & class_variance_authority_types.ClassProp) | undefined) => string;
534
581
  declare const alertTitleTextVariants: (props?: ({
535
- variant?: "default" | "destructive" | "success" | "info" | "warning" | null | undefined;
582
+ variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
536
583
  } & class_variance_authority_types.ClassProp) | undefined) => string;
537
584
  declare const alertDescriptionTextVariants: (props?: ({
538
- variant?: "default" | "destructive" | "success" | "info" | "warning" | null | undefined;
585
+ variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
539
586
  } & class_variance_authority_types.ClassProp) | undefined) => string;
540
587
  interface NativeAlertProps extends VariantProps<typeof alertVariants> {
541
588
  className?: string;
@@ -566,9 +613,23 @@ interface NativeAvatarProps {
566
613
  fallback?: string;
567
614
  /** Size in pixels. Defaults to 40. Use className for NativeWind sizing. */
568
615
  size?: number;
616
+ /**
617
+ * expo-image only: a blurhash or thumbhash shown while the picture loads,
618
+ * as expo-image's `placeholder` takes it (`{ blurhash }`, `{ thumbhash }`).
619
+ */
620
+ placeholder?: {
621
+ blurhash: string;
622
+ } | {
623
+ thumbhash: string;
624
+ };
625
+ /**
626
+ * expo-image only: resets the view when it changes, for rows a recycling
627
+ * list (FlashList) reuses. Default the image URL.
628
+ */
629
+ recyclingKey?: string;
569
630
  testID?: string;
570
631
  }
571
- declare function NativeAvatar({ className, src, alt, fallback, size, ...props }: NativeAvatarProps): react.JSX.Element;
632
+ declare function NativeAvatar({ className, src, alt, fallback, size, placeholder, recyclingKey, testID, }: NativeAvatarProps): react.JSX.Element;
572
633
 
573
634
  interface NativeProgressProps {
574
635
  className?: string;
@@ -914,4 +975,71 @@ interface GridProps extends ViewProps {
914
975
  */
915
976
  declare function Grid({ columns, gap, className, children, ...props }: GridProps): react.JSX.Element;
916
977
 
917
- export { Box, type BoxBackground, type BoxProps, type FlexAlign, type FlexJustify, Grid, type GridProps, Inline, type InlineProps, NativeAccordion, NativeAccordionContent, type NativeAccordionContentProps, NativeAccordionItem, type NativeAccordionItemProps, type NativeAccordionProps, NativeAccordionTrigger, type NativeAccordionTriggerProps, type NativeAccordionType, NativeAlert, NativeAlertDescription, type NativeAlertDescriptionProps, type NativeAlertProps, NativeAlertTitle, type NativeAlertTitleProps, NativeAvatar, type NativeAvatarProps, NativeBadge, type NativeBadgeProps, NativeBanner, type NativeBannerProps, NativeButton, type NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, type NativeCardProps, NativeCardTitle, type NativeCardTitleProps, NativeCheckbox, type NativeCheckboxProps, NativeChip, NativeChipGroup, type NativeChipGroupMode, type NativeChipGroupProps, type NativeChipProps, NativeCombobox, type NativeComboboxOption, type NativeComboboxProps, NativeDatePicker, type NativeDatePickerProps, NativeDialog, NativeDialogContent, type NativeDialogContentProps, NativeDialogDescription, type NativeDialogDescriptionProps, NativeDialogFooter, type NativeDialogFooterProps, NativeDialogHeader, type NativeDialogHeaderProps, type NativeDialogProps, NativeDialogTitle, type NativeDialogTitleProps, NativeDrawer, type NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, type NativeDropdownMenuContentProps, NativeDropdownMenuItem, type NativeDropdownMenuItemProps, type NativeDropdownMenuProps, NativeDropdownMenuTrigger, type NativeDropdownMenuTriggerProps, NativeEmptyState, type NativeEmptyStateProps, type NativeEmptyStateVariant, NativeHeaderCard, type NativeHeaderCardProps, NativeInlineAlert, type NativeInlineAlertProps, type NativeInlineAlertVariant, NativeInput, type NativeInputProps, NativeLabel, type NativeLabelProps, NativeListItem, NativeListItemDivider, type NativeListItemProps, NativeNumberInput, type NativeNumberInputProps, NativePagination, type NativePaginationProps, NativePopover, NativePopoverContent, type NativePopoverContentProps, type NativePopoverProps, NativePopoverTrigger, type NativePopoverTriggerProps, NativeProgress, type NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, type NativeRadioGroupItemProps, type NativeRadioGroupProps, NativeRangeSlider, type NativeRangeSliderProps, NativeRefreshControl, type NativeRefreshControlProps, NativeSearchBar, type NativeSearchBarProps, NativeSectionListHeader, type NativeSectionListHeaderProps, NativeSegmentedControl, type NativeSegmentedControlOption, type NativeSegmentedControlProps, NativeSelect, NativeSelectContent, type NativeSelectContentProps, NativeSelectItem, type NativeSelectItemProps, type NativeSelectProps, NativeSelectTrigger, type NativeSelectTriggerProps, NativeSeparator, type NativeSeparatorProps, NativeSheet, type NativeSheetProps, NativeSkeleton, type NativeSkeletonProps, NativeSlider, type NativeSliderProps, NativeStepper, type NativeStepperProps, type NativeStepperStep, NativeSwitch, type NativeSwitchProps, NativeTabs, NativeTabsContent, type NativeTabsContentProps, NativeTabsList, type NativeTabsListProps, type NativeTabsProps, NativeTabsTrigger, type NativeTabsTriggerProps, NativeText, type NativeTextProps, NativeTextarea, type NativeTextareaProps, NativeTimePicker, type NativeTimePickerProps, type NativeToastOptions, NativeToastProvider, type NativeToastProviderProps, type NativeToastVariant, NativeToggle, type NativeToggleProps, NativeTooltip, NativeTooltipContent, type NativeTooltipContentProps, type NativeTooltipProps, NativeTooltipTrigger, type NativeTooltipTriggerProps, type SpaceToken, type SpacingPrefix, Stack, type StackProps, type TextPreset, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, spaceScale, spacingClass, textVariants, toggleVariants, useToast };
978
+ interface NativeIconProps {
979
+ name: NativeIconName;
980
+ /** Points. Default 20. */
981
+ size?: number;
982
+ /** Default the theme's label color. */
983
+ color?: ColorValue;
984
+ /** iOS SF Symbol weight. */
985
+ weight?: "ultraLight" | "thin" | "light" | "regular" | "medium" | "semibold" | "bold" | "heavy" | "black";
986
+ /** Read by screen readers. Without it the icon is decorative and hidden from them. */
987
+ label?: string;
988
+ testID?: string;
989
+ }
990
+ declare function NativeIcon({ name, size, color, weight, label, testID }: NativeIconProps): react.JSX.Element;
991
+
992
+ interface NativeImageProps {
993
+ src: string;
994
+ /** Read by screen readers. Without it the picture is decorative. */
995
+ alt?: string;
996
+ className?: string;
997
+ width?: number;
998
+ height?: number;
999
+ /** Default `"cover"`. */
1000
+ contentFit?: "cover" | "contain";
1001
+ /** expo-image only: `{ blurhash }` or `{ thumbhash }` shown while loading. */
1002
+ placeholder?: {
1003
+ blurhash: string;
1004
+ } | {
1005
+ thumbhash: string;
1006
+ };
1007
+ /** expo-image only: resets the view when it changes (recycled rows). Default `src`. */
1008
+ recyclingKey?: string;
1009
+ /** expo-image only: load order among images. */
1010
+ priority?: "low" | "normal" | "high";
1011
+ testID?: string;
1012
+ }
1013
+ declare function NativeImage({ src, alt, className, width, height, contentFit, placeholder, recyclingKey, priority, testID, }: NativeImageProps): react.JSX.Element;
1014
+
1015
+ /**
1016
+ * True while the user has Reduce Transparency on (iOS), `null` until the
1017
+ * first answer. Always false elsewhere, and on a runtime that can't say.
1018
+ */
1019
+ declare function useReduceTransparency(): boolean | null;
1020
+ /** expo-glass-effect's `GlassView` when Liquid Glass can be drawn here, else `null`. */
1021
+ declare function useLiquidGlass(): GenesisGlassModule["GlassView"] | null;
1022
+ interface NativeGlassSurfaceProps {
1023
+ children?: ReactNode;
1024
+ /**
1025
+ * Layout classes (padding, gap, width). Without glass they merge with
1026
+ * `fallbackClassName` on one view, so they can override it (`rounded-*`,
1027
+ * `bg-*`). On glass they go on the view inside the glass: the glass's shape
1028
+ * comes from `radius` alone, and a `bg-*` here paints over the glass.
1029
+ */
1030
+ className?: string;
1031
+ /** The solid look when glass can't be drawn, radius included. Default `"rounded-xl border border-border bg-card"`. */
1032
+ fallbackClassName?: string;
1033
+ /** The glass's corner radius in points. Default 16. */
1034
+ radius?: number;
1035
+ /** Glass tint (a color string). */
1036
+ tintColor?: string;
1037
+ /** Glass reacts to touch. Default false. */
1038
+ interactive?: boolean;
1039
+ /** Default `"regular"`. */
1040
+ glassEffectStyle?: "regular" | "clear";
1041
+ testID?: string;
1042
+ }
1043
+ declare function NativeGlassSurface({ children, className, fallbackClassName, radius, tintColor, interactive, glassEffectStyle, testID, }: NativeGlassSurfaceProps): react.JSX.Element;
1044
+
1045
+ export { Box, type BoxBackground, type BoxProps, type FlexAlign, type FlexJustify, GenesisGlassModule, Grid, type GridProps, Inline, type InlineProps, NativeAccordion, NativeAccordionContent, type NativeAccordionContentProps, NativeAccordionItem, type NativeAccordionItemProps, type NativeAccordionProps, NativeAccordionTrigger, type NativeAccordionTriggerProps, type NativeAccordionType, NativeAlert, NativeAlertDescription, type NativeAlertDescriptionProps, type NativeAlertProps, NativeAlertTitle, type NativeAlertTitleProps, NativeAvatar, type NativeAvatarProps, NativeBadge, type NativeBadgeProps, NativeBanner, type NativeBannerProps, NativeButton, type NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, type NativeCardProps, NativeCardTitle, type NativeCardTitleProps, NativeCheckbox, type NativeCheckboxProps, NativeChip, NativeChipGroup, type NativeChipGroupMode, type NativeChipGroupProps, type NativeChipProps, NativeCombobox, type NativeComboboxOption, type NativeComboboxProps, NativeDatePicker, type NativeDatePickerProps, NativeDialog, NativeDialogContent, type NativeDialogContentProps, NativeDialogDescription, type NativeDialogDescriptionProps, NativeDialogFooter, type NativeDialogFooterProps, NativeDialogHeader, type NativeDialogHeaderProps, type NativeDialogProps, NativeDialogTitle, type NativeDialogTitleProps, NativeDrawer, type NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, type NativeDropdownMenuContentProps, NativeDropdownMenuItem, type NativeDropdownMenuItemProps, type NativeDropdownMenuProps, NativeDropdownMenuTrigger, type NativeDropdownMenuTriggerProps, NativeEmptyState, type NativeEmptyStateProps, type NativeEmptyStateVariant, NativeGlassSurface, type NativeGlassSurfaceProps, NativeHeaderCard, type NativeHeaderCardProps, NativeIcon, NativeIconName, type NativeIconProps, NativeImage, type NativeImageProps, NativeInlineAlert, type NativeInlineAlertProps, type NativeInlineAlertVariant, NativeInput, type NativeInputProps, NativeLabel, type NativeLabelProps, NativeListItem, NativeListItemDivider, type NativeListItemProps, NativeNumberInput, type NativeNumberInputProps, NativePagination, type NativePaginationProps, NativePopover, NativePopoverContent, type NativePopoverContentProps, type NativePopoverProps, NativePopoverTrigger, type NativePopoverTriggerProps, NativeProgress, type NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, type NativeRadioGroupItemProps, type NativeRadioGroupProps, NativeRangeSlider, type NativeRangeSliderProps, NativeRefreshControl, type NativeRefreshControlProps, NativeSearchBar, type NativeSearchBarProps, NativeSectionListHeader, type NativeSectionListHeaderProps, NativeSegmentedControl, type NativeSegmentedControlOption, type NativeSegmentedControlProps, NativeSelect, NativeSelectContent, type NativeSelectContentProps, NativeSelectItem, type NativeSelectItemProps, type NativeSelectProps, NativeSelectTrigger, type NativeSelectTriggerProps, NativeSeparator, type NativeSeparatorProps, NativeSheet, type NativeSheetLibrary, type NativeSheetProps, NativeSheetProvider, type NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, type NativeSkeletonProps, NativeSlider, type NativeSliderProps, NativeStepper, type NativeStepperProps, type NativeStepperStep, NativeSwitch, type NativeSwitchProps, NativeTabs, NativeTabsContent, type NativeTabsContentProps, NativeTabsList, type NativeTabsListProps, type NativeTabsProps, NativeTabsTrigger, type NativeTabsTriggerProps, NativeText, type NativeTextProps, NativeTextarea, type NativeTextareaProps, NativeTimePicker, type NativeTimePickerProps, type NativeToastOptions, NativeToastProvider, type NativeToastProviderProps, type NativeToastVariant, NativeToggle, type NativeToggleProps, NativeTooltip, NativeTooltipContent, type NativeTooltipContentProps, type NativeTooltipProps, NativeTooltipTrigger, type NativeTooltipTriggerProps, type SpaceToken, type SpacingPrefix, Stack, type StackProps, type TextPreset, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, spaceScale, spacingClass, textVariants, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
@@ -1,7 +1,9 @@
1
- export { Box, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeHeaderCard, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRefreshControl, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useToast } from '../chunk-TXJT55JC.js';
2
- export { NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeBadge, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeLabel, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSkeleton, NativeSwitch, NativeTextarea, alertVariants, badgeTextVariants, badgeVariants } from '../chunk-2WCXMJL6.js';
3
- export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader } from '../chunk-ULS7I6ZS.js';
4
- export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from '../chunk-5HRGIA6F.js';
1
+ export { Box, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeGlassSurface, NativeHeaderCard, NativeImage, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from '../chunk-Q445I7WO.js';
2
+ export { NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeLabel, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSkeleton, NativeSwitch, NativeTextarea, alertVariants } from '../chunk-FIITITXO.js';
3
+ import '../chunk-7PCWEY6R.js';
4
+ export { NATIVE_ICON_NAMES, NativeEmptyState, NativeIcon, NativeListItem, NativeListItemDivider, NativeRefreshControl, NativeSectionListHeader, SF_SYMBOLS } from '../chunk-W2UBJ56D.js';
5
+ export { GenesisModulesProvider, NativeBadge, NativeButton, NativeInput, NativeText, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants, useGenesisModules } from '../chunk-EFXCJ5AN.js';
6
+ import '../chunk-Z3AQYVUA.js';
5
7
  import '../chunk-OHZD7KRO.js';
6
8
  import '../chunk-DGUM43GV.js';
7
9
  //# sourceMappingURL=index.js.map
@@ -110,7 +110,13 @@ interface NativeResourcePageProps<T extends BaseRecord = BaseRecord> {
110
110
  createLabel?: string;
111
111
  headerRight?: ReactNode;
112
112
  emptyState?: ReactNode;
113
+ /**
114
+ * Shown while the list has nothing saved and its fetch is paused because
115
+ * the device is offline (`networkMode: "offlineFirst"`), instead of an empty
116
+ * list that says there is nothing. Default: a one-line offline message.
117
+ */
118
+ offlineState?: ReactNode;
113
119
  }
114
- declare function NativeResourcePage<T extends BaseRecord = BaseRecord>({ resource, resourceOptions, title, subtitle, cardFields, renderItem, searchFields, searchPlaceholder, statusFilter, onItemPress, titleField, onCreatePress, createLabel, headerRight, emptyState, }: NativeResourcePageProps<T>): react.JSX.Element;
120
+ declare function NativeResourcePage<T extends BaseRecord = BaseRecord>({ resource, resourceOptions, title, subtitle, cardFields, renderItem, searchFields, searchPlaceholder, statusFilter, onItemPress, titleField, onCreatePress, createLabel, headerRight, emptyState, offlineState, }: NativeResourcePageProps<T>): react.JSX.Element;
115
121
 
116
122
  export { type NativeCardFieldDef, NativeDataFilters, type NativeDataFiltersProps, NativeDataPageShell, type NativeDataPageShellProps, type NativeDetailField, NativeDetailPanel, type NativeDetailPanelProps, NativeEmptyState, type NativeEmptyStateProps, NativeResourceForm, NativeResourceFormFieldRenderer, type NativeResourceFormFieldRendererProps, type NativeResourceFormProps, NativeResourcePage, type NativeResourcePageProps };
@@ -1,5 +1,6 @@
1
- import { NativeBadge, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-2WCXMJL6.js';
2
- import { NativeText, NativeButton, NativeInput } from '../chunk-5HRGIA6F.js';
1
+ import { NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-FIITITXO.js';
2
+ import '../chunk-7PCWEY6R.js';
3
+ import { NativeText, NativeButton, NativeInput, NativeBadge, useGenesisModules } from '../chunk-EFXCJ5AN.js';
3
4
  import '../chunk-OHZD7KRO.js';
4
5
  import '../chunk-DGUM43GV.js';
5
6
  import { View, ScrollView, Pressable, FlatList } from 'react-native';
@@ -556,8 +557,10 @@ function NativeResourcePage({
556
557
  onCreatePress,
557
558
  createLabel = "New",
558
559
  headerRight,
559
- emptyState
560
+ emptyState,
561
+ offlineState
560
562
  }) {
563
+ const { list: FlashList } = useGenesisModules();
561
564
  const [search, setSearchLocal] = useState("");
562
565
  const [selectedStatuses, setSelectedStatuses] = useState([]);
563
566
  const statusFilterConfig = useMemo(() => {
@@ -604,6 +607,7 @@ function NativeResourcePage({
604
607
  const items = list.data?.data ?? [];
605
608
  const isLoading = list.isLoading;
606
609
  const hasError = list.isError;
610
+ const isOfflineEmpty = list.isPaused && list.data === void 0;
607
611
  const resolvedFields = useMemo(() => {
608
612
  if (titleField && cardFields) {
609
613
  const resolved = cardFields.map((f, i) => resolveField(f, i));
@@ -698,14 +702,18 @@ function NativeResourcePage({
698
702
  [search, searchPlaceholder, statusOptions, selectedStatuses]
699
703
  );
700
704
  const ListEmptyComponent = useMemo(
701
- () => isLoading ? null : /* @__PURE__ */ jsx(Fragment, { children: emptyState ?? /* @__PURE__ */ jsx(
705
+ () => isLoading ? null : isOfflineEmpty ? (
706
+ // In the list, under its header, so search and filters stay usable offline: clearing a
707
+ // search brings back the saved rows.
708
+ /* @__PURE__ */ jsx(View, { testID: "native-resource-offline", className: "flex-1 items-center justify-center px-4 py-12 gap-4", children: offlineState ?? /* @__PURE__ */ jsx(NativeText, { preset: "body", className: "text-muted-foreground text-center", children: "You're offline. This list loads when you're back online." }) })
709
+ ) : /* @__PURE__ */ jsx(Fragment, { children: emptyState ?? /* @__PURE__ */ jsx(
702
710
  NativeEmptyState,
703
711
  {
704
712
  hasFilters: hasActiveFilters,
705
713
  onClearFilters: hasActiveFilters ? handleClearFilters : void 0
706
714
  }
707
715
  ) }),
708
- [isLoading, emptyState, hasActiveFilters, handleClearFilters]
716
+ [isLoading, isOfflineEmpty, offlineState, emptyState, hasActiveFilters, handleClearFilters]
709
717
  );
710
718
  const renderPageContent = () => {
711
719
  if (isLoading) {
@@ -722,16 +730,33 @@ function NativeResourcePage({
722
730
  /* @__PURE__ */ jsx(NativeButton, { variant: "outline", size: "sm", onPress: () => list.refetch(), children: "Try Again" })
723
731
  ] });
724
732
  }
733
+ if (FlashList) {
734
+ return /* @__PURE__ */ jsx(
735
+ FlashList,
736
+ {
737
+ testID: "native-resource-page-list",
738
+ data: items,
739
+ keyExtractor,
740
+ renderItem: renderFlatListItem,
741
+ ListHeaderComponent,
742
+ ListEmptyComponent,
743
+ contentContainerStyle: { paddingBottom: 24 },
744
+ refreshing: refreshing && !list.isPaused,
745
+ onRefresh: handleRefresh
746
+ }
747
+ );
748
+ }
725
749
  return /* @__PURE__ */ jsx(
726
750
  FlatList,
727
751
  {
752
+ testID: "native-resource-page-list",
728
753
  data: items,
729
754
  keyExtractor,
730
755
  renderItem: renderFlatListItem,
731
756
  ListHeaderComponent,
732
757
  ListEmptyComponent,
733
758
  contentContainerStyle: { flexGrow: 1, paddingBottom: 24 },
734
- refreshing,
759
+ refreshing: refreshing && !list.isPaused,
735
760
  onRefresh: handleRefresh
736
761
  }
737
762
  );