@marktiderman/genesis-ui-native 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +69 -0
  2. package/dist/{chunk-ZUR4PK77.js → chunk-47CDRP43.js} +45 -166
  3. package/dist/chunk-47CDRP43.js.map +1 -0
  4. package/dist/{chunk-SG7LYX7Z.js → chunk-BQYT6TH2.js} +14 -6
  5. package/dist/chunk-BQYT6TH2.js.map +1 -0
  6. package/dist/{chunk-EAHK7D7N.js → chunk-C2ARUGT7.js} +146 -42
  7. package/dist/chunk-C2ARUGT7.js.map +1 -0
  8. package/dist/{chunk-VEWSY4TZ.js → chunk-D4UU6KIF.js} +236 -21
  9. package/dist/chunk-D4UU6KIF.js.map +1 -0
  10. package/dist/{chunk-GGH3ZQNO.js → chunk-TUDJDIGC.js} +4 -4
  11. package/dist/{chunk-GGH3ZQNO.js.map → chunk-TUDJDIGC.js.map} +1 -1
  12. package/dist/{chunk-PMS2V46D.js → chunk-VHUUOH46.js} +2 -2
  13. package/dist/{chunk-PMS2V46D.js.map → chunk-VHUUOH46.js.map} +1 -1
  14. package/dist/{chunk-IWWXERKQ.js → chunk-X5CPLUPZ.js} +1236 -136
  15. package/dist/chunk-X5CPLUPZ.js.map +1 -0
  16. package/dist/components/index.d.ts +510 -25
  17. package/dist/components/index.js +5 -5
  18. package/dist/data/index.d.ts +167 -33
  19. package/dist/data/index.js +1082 -760
  20. package/dist/data/index.js.map +1 -1
  21. package/dist/hooks/index.d.ts +2 -2
  22. package/dist/hooks/index.js +1 -1
  23. package/dist/icons/lucide.d.ts +1 -1
  24. package/dist/index.d.ts +6 -3
  25. package/dist/index.js +7 -7
  26. package/dist/layouts/index.d.ts +79 -6
  27. package/dist/layouts/index.js +5 -5
  28. package/dist/{native-modules-Bkm1jHO-.d.ts → native-modules-6JnyeGR-.d.ts} +55 -1
  29. package/package.json +70 -4
  30. package/src/components/__tests__/combobox.test.tsx +20 -0
  31. package/src/components/__tests__/number-input.test.tsx +112 -1
  32. package/src/components/__tests__/parity-controls.test.tsx +366 -0
  33. package/src/components/__tests__/parity-display.test.tsx +295 -0
  34. package/src/components/__tests__/twin-props.test.tsx +114 -0
  35. package/src/components/badge.tsx +3 -0
  36. package/src/components/button-group.tsx +50 -0
  37. package/src/components/calendar.tsx +183 -0
  38. package/src/components/carousel.tsx +175 -0
  39. package/src/components/chart.tsx +268 -0
  40. package/src/components/chip-group.tsx +34 -14
  41. package/src/components/choice-card.tsx +56 -19
  42. package/src/components/combobox.tsx +6 -5
  43. package/src/components/empty-state.tsx +40 -0
  44. package/src/components/flatten-children.ts +13 -0
  45. package/src/components/index.ts +49 -1
  46. package/src/components/inline-alert.tsx +3 -1
  47. package/src/components/input-group.tsx +99 -0
  48. package/src/components/input-otp.tsx +124 -0
  49. package/src/components/input.tsx +40 -12
  50. package/src/components/list-item.tsx +20 -4
  51. package/src/components/number-input.tsx +45 -15
  52. package/src/components/radio-group.tsx +5 -0
  53. package/src/components/resource.tsx +227 -0
  54. package/src/components/settings-row.tsx +194 -0
  55. package/src/components/slider.tsx +3 -9
  56. package/src/components/sortable-list.tsx +287 -0
  57. package/src/components/stat-card.tsx +106 -0
  58. package/src/components/stepper.tsx +4 -2
  59. package/src/components/widget-tile.tsx +66 -0
  60. package/src/components/workspace-switcher.tsx +217 -0
  61. package/src/data/NativeCustomView.tsx +117 -0
  62. package/src/data/NativeFormFields.tsx +312 -0
  63. package/src/data/NativeRecordPeek.tsx +130 -0
  64. package/src/data/NativeResourceFormField.tsx +32 -0
  65. package/src/data/__tests__/parity-data.test.tsx +350 -0
  66. package/src/data/index.ts +13 -0
  67. package/src/layouts/__tests__/keyboard-scroll.test.tsx +58 -2
  68. package/src/layouts/__tests__/notifications-page.test.tsx +12 -0
  69. package/src/layouts/index.ts +13 -0
  70. package/src/layouts/keyboard.tsx +22 -2
  71. package/src/layouts/notifications-page.tsx +13 -35
  72. package/src/layouts/pages.tsx +262 -0
  73. package/src/native-modules.tsx +37 -0
  74. package/dist/chunk-EAHK7D7N.js.map +0 -1
  75. package/dist/chunk-IWWXERKQ.js.map +0 -1
  76. package/dist/chunk-SG7LYX7Z.js.map +0 -1
  77. package/dist/chunk-VEWSY4TZ.js.map +0 -1
  78. package/dist/chunk-ZUR4PK77.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/thread-list.tsx","../src/components/composer-bar.tsx"],"names":["useState","useEffect","Platform","AccessibilityInfo","jsxs","View","jsx","Pressable","Fragment"],"mappings":";;;;;;;AAoDA,IAAM,QAAA,GAAW,CAAC,IAAA,KAAkB,iBAAA,CAAyE,2BAA2B,IAAI,CAAA;AAGrI,IAAM,uBAAA,GAA0B;AAGvC,IAAM,WAAA,GAAc,GAAA;AAGb,SAAS,gBAAA,CAAiB,CAAA,EAAkB,KAAA,GAAQ,uBAAA,EAAkC;AAC3F,EAAA,OAAO,CAAA,CAAE,cAAc,CAAA,GAAI,CAAA,CAAE,kBAAkB,MAAA,IAAU,CAAA,CAAE,YAAY,MAAA,GAAS,KAAA;AAClF;AASO,SAAS,cAAA,CACd,KAAA,EACA,aAAA,EACA,cAAA,GAAiB,CAAA,EACoE;AACrF,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,MAAM,SAAA,GAAY,iBAAiB,CAAA,GAAI,IAAA,CAAK,IAAI,CAAA,EAAG,uBAAA,GAA0B,cAAc,CAAA,GAAI,GAAA;AAC/F,IAAA,OAAO;AAAA,MACL,aAAA,EAAe,KAAA;AAAA,MACf,8BAAA,EAAgC,EAAE,wBAAA,EAA0B,IAAA,EAAM,6BAA6B,SAAA,EAAW,yBAAA,EAA2B,CAAC,aAAA;AAAc,KACtJ;AAAA,EACF;AACA,EAAA,OAAO,EAAE,aAAA,EAAe,IAAA,EAAM,gCAAgC,EAAE,kBAAA,EAAoB,GAAE,EAAE;AAC1F;AA2FA,SAAS,qBAAA,CAAyB,OAAiC,GAAA,EAAiD;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,IAAA,GAAO,MAAA,CAAO,IAAA,EAAK;AAAA,cAE9L,QAAA,EAAA,OAAA,mBACCD,GAAAA,CAAC,UAAA,EAAA,EAAW,MAAK,UAAA,EAAW,IAAA,EAAM,EAAA,EAAI,KAAA,EAAO,OAAA,GAAU,MAAA,CAAO,UAAA,GAAa,MAAA,CAAO,eAAe,CAAA,mBAEjGA,GAAAA,CAAC,UAAA,EAAA,EAAW,MAAA,EAAO,OAAA,EAAQ,SAAA,EAAW,OAAA,GAAU,4BAA4B,MAAA,EAAW,KAAA,EAAO,OAAA,GAAU,MAAA,GAAY,EAAE,KAAA,EAAO,MAAA,CAAO,aAAA,IACjI,QAAA,EAAA,SAAA,EACH;AAAA;AAAA,WAEJ,EACF;AAAA,SAAA,EAEJ,CAAA;AAAA,QACC,OAAA,IAAW,OAAA,CAAQ,MAAA,GAAS,CAAA,mBAAIA,IAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,QAAA,EAAU,YAAA,EAAc,WAAA,EAAa,OAAA,EAAmB,GAAI,gBAAA,GAAmB,EAAE,KAAA,EAAO,gBAAA,EAAiB,GAAI,IAAK,MAAA,EAAQ,CAAA,EAAG,MAAM,CAAA,UAAA,CAAA,EAAc,CAAA,GAAK;AAAA;AAAA;AAAA,GAClN;AAEJ","file":"chunk-SG7LYX7Z.js","sourcesContent":["/**\n * NativeThreadList — a conversation's list: oldest first, top to bottom (the\n * order VoiceOver reads), that opens at the newest row, follows new rows only\n * while you're at the bottom, keeps your place while earlier rows load at the\n * top, and can go to one row (a search result, the first unread).\n *\n * The atom under ThreadPage, and the one any app builds its own thread from:\n * it renders the rows it's given and never fetches. Earlier pages come from\n * `onLoadEarlier`, a row out of reach from `onLoadUntil(id)`.\n *\n * FlashList v2 (`GenesisModules.list`) when the app passed it: its chat mode\n * (`startRenderingFromBottom`, `autoscrollToBottomThreshold`, the first\n * visible row held when rows prepend). Without it, FlatList, which keeps its\n * place with `maintainVisibleContentPosition` (anchored past the header) and\n * follows the bottom by hand.\n *\n * Not inverted: in an inverted FlashList a new row at index 0 lands under the\n * composer, and VoiceOver reads each day's heading after its messages.\n *\n * Earlier rows load by themselves near the top, and the explicit \"Load\n * earlier\" button stays: VoiceOver can't reach rows a virtualized list hasn't\n * rendered. Going to a row waits for `loading`, loads until it's held,\n * scrolls to it (again after FlashList's own placement on open), highlights\n * it for two seconds and announces it. Reduce Motion scrolls without\n * animating. The reader's touch wins: a drag during a jump ends the list's own\n * scrolling and drops the jump, even one still loading, so nothing snaps back.\n *\n * A row is gone when, once `onLoadUntil` has settled, no row answers to its\n * id. The list knows only its rows: a row that's drawn (a deleted message's\n * tombstone) is there, and whatever isn't drawn isn't, whatever a cache holds.\n *\n * Promoted from genesis-chat's thread and its `useJumpToMessage` (G4); chat\n * moves onto it later.\n *\n * @stability Beta\n */\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, type ComponentType, type ReactElement, type ReactNode } from \"react\";\nimport { AccessibilityInfo, FlatList, Platform, Pressable, View } from \"react-native\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { useReducedMotion } from \"../hooks/use-reduced-motion\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useThreadJump } from \"@marktiderman/genesis-core/conversation\";\nimport { NativeSkeleton } from \"./skeleton\";\nimport { NativeText } from \"./text\";\n\n/** The scroll event fields the list reads. */\ninterface ScrollMetrics {\n contentOffset: { y: number };\n contentSize: { height: number };\n layoutMeasurement: { height: number };\n}\n\nconst announce = (text: string) => (AccessibilityInfo as { announceForAccessibility?: (t: string) => void }).announceForAccessibility?.(text);\n\n/** Points from the bottom that still count as \"at the bottom\". */\nexport const THREAD_AT_BOTTOM_POINTS = 120;\n\n/** After the list scrolls itself (to the newest, to a row), how long its own scroll events don't count. */\nconst SETTLING_MS = 400;\n\n/** Whether a scroll position is at (or near) the bottom of its content. */\nexport function threadNearBottom(m: ScrollMetrics, slack = THREAD_AT_BOTTOM_POINTS): boolean {\n return m.contentOffset.y + m.layoutMeasurement.height >= m.contentSize.height - slack;\n}\n\n/**\n * How the list is set up. FlashList follows by itself, within\n * `THREAD_AT_BOTTOM_POINTS` of the bottom (its threshold is a fraction of the\n * viewport: a fifth until the viewport's height is known); FlatList keeps its\n * place on prepend, anchored on the first row past the header (index 1: the\n * header is child 0), and the list follows the bottom by hand.\n */\nexport function threadListMode(\n flash: boolean,\n reducedMotion: boolean,\n viewportHeight = 0,\n): { followsByHand: boolean; maintainVisibleContentPosition: Record<string, unknown> } {\n if (flash) {\n const threshold = viewportHeight > 0 ? Math.min(1, THREAD_AT_BOTTOM_POINTS / viewportHeight) : 0.2;\n return {\n followsByHand: false,\n maintainVisibleContentPosition: { startRenderingFromBottom: true, autoscrollToBottomThreshold: threshold, animateAutoScrollToBottom: !reducedMotion },\n };\n }\n return { followsByHand: true, maintainVisibleContentPosition: { minIndexForVisible: 1 } };\n}\n\nexport interface NativeThreadListHandle {\n /** Go to the newest row (after a send: what you send is what you look at next). */\n scrollToEnd: (options?: { animated?: boolean }) => void;\n}\n\n/** What `renderItem` is told about a row besides the row itself. */\nexport interface ThreadRowInfo {\n index: number;\n /** The row a jump just landed on, for two seconds. */\n highlighted: boolean;\n}\n\nexport interface NativeThreadListProps<T> {\n /** Oldest first. */\n data: readonly T[];\n /** A row's id. It must stay the same across refreshes (from a cache to the server), or rows jump. */\n keyExtractor: (row: T) => string;\n renderItem: (row: T, info: ThreadRowInfo) => ReactElement | null;\n /** Rows of different shapes recycle apart (FlashList): \"mine\", \"theirs\", \"event\". */\n getItemType?: (row: T) => string;\n /** The first page is loading: shows `loadingView` (a skeleton by default), and a jump waits. */\n loading?: boolean;\n loadingView?: ReactNode;\n /** There are earlier rows: loads them near the top, and shows the \"Load earlier\" button. */\n hasEarlier?: boolean;\n onLoadEarlier?: () => void;\n loadingEarlier?: boolean;\n earlierLabel?: string;\n /** Replaces the default \"Load earlier\" button. */\n renderEarlier?: (props: { loading: boolean; onPress: () => void; label: string; testID: string }) => ReactNode;\n /** Go to this row, loading earlier pages with `onLoadUntil` until it's here. A new id, or the same one after `null`, goes again. */\n jumpTo?: string | null;\n /**\n * The id `jumpTo` names a row by, when it isn't the row's key: a message keyed by the id the\n * phone gave it (so it keeps its row when the server's copy lands) and gone to by the server's\n * id. `null` for a row that can't be gone to (a day heading). `keyExtractor` by default.\n * Pass a stable function (module scope, or `useCallback`): a new one each render re-renders every row.\n */\n jumpId?: (row: T) => string | null | undefined;\n /** Load earlier pages until the row is held; resolve false when it can't be found. */\n onLoadUntil?: (id: string) => Promise<boolean>;\n /** What VoiceOver says on arriving at `jumpTo`. */\n jumpAnnouncement?: (row: T) => string;\n /** No row answers to this id once `onLoadUntil` has settled, or it failed. The list goes back to the newest row first. */\n onJumpFailed?: (id: string) => void;\n /** Whether the reader is at the bottom, as it changes (to show a \"new messages\" pill, say). */\n onAtBottomChange?: (atBottom: boolean) => void;\n /** Above the first row, before the \"Load earlier\" button: what the thread is about. */\n header?: ReactNode;\n /** Under the last row: who is typing, a \"Sending…\" line. */\n footer?: ReactNode;\n /** Shown instead of the rows when there are none. */\n empty?: ReactNode;\n testID?: string;\n}\n\n/** The FlatList and FlashList v2 props the thread passes. */\ninterface ThreadListComponentProps {\n ref?: unknown;\n data: readonly unknown[];\n renderItem: (info: { item: unknown; index: number }) => ReactElement | null;\n keyExtractor: (row: unknown) => string;\n getItemType?: (row: unknown) => string;\n extraData?: unknown;\n onStartReached?: () => void;\n onStartReachedThreshold?: number;\n ListHeaderComponent?: ReactElement | null;\n ListFooterComponent?: ReactElement | null;\n keyboardShouldPersistTaps?: \"handled\";\n keyboardDismissMode?: \"interactive\" | \"on-drag\";\n contentInsetAdjustmentBehavior?: \"automatic\";\n contentContainerStyle?: Record<string, unknown>;\n maintainVisibleContentPosition?: Record<string, unknown>;\n onScroll?: (e: { nativeEvent: ScrollMetrics }) => void;\n onScrollBeginDrag?: () => void;\n scrollEventThrottle?: number;\n onContentSizeChange?: () => void;\n onLayout?: () => void;\n onScrollToIndexFailed?: (info: { index: number; averageItemLength: number }) => void;\n accessibilityRole?: \"list\";\n testID?: string;\n}\n\ninterface ListRef {\n scrollToEnd?: (o?: { animated?: boolean }) => void;\n scrollToIndex?: (o: { index: number; animated?: boolean; viewPosition?: number }) => void;\n scrollToOffset?: (o: { offset: number; animated?: boolean }) => void;\n}\n\nfunction NativeThreadListInner<T>(props: NativeThreadListProps<T>, ref: React.ForwardedRef<NativeThreadListHandle>) {\n const {\n data,\n keyExtractor,\n renderItem,\n getItemType,\n loading = false,\n loadingView,\n hasEarlier = false,\n onLoadEarlier,\n loadingEarlier = false,\n earlierLabel = \"Load earlier messages\",\n renderEarlier,\n jumpTo,\n jumpId,\n onLoadUntil,\n jumpAnnouncement,\n onJumpFailed,\n onAtBottomChange,\n footer,\n header,\n empty,\n testID = \"thread-list\",\n } = props;\n const genesis = useGenesisModules();\n const reducedMotion = useReducedMotion();\n const List = (genesis.list ?? FlatList) as unknown as ComponentType<ThreadListComponentProps>;\n const [viewport, setViewport] = useState(0);\n const mode = threadListMode(Boolean(genesis.list), reducedMotion, viewport);\n // The last position the list reported, to re-check \"at the bottom\" after it moves itself.\n const metrics = useRef<ScrollMetrics | null>(null);\n const recheck = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => () => {\n if (recheck.current) clearTimeout(recheck.current);\n }, []);\n const listRef = useRef<ListRef | null>(null);\n // At the bottom (or not yet scrolled): new rows and a shorter list keep it there.\n const atBottom = useRef(true);\n // FlatList opens at the top and is moved down a frame later: until then the top isn't \"reached\".\n const placed = useRef(!mode.followsByHand);\n // While the list scrolls itself, its own scroll events don't move \"at the bottom\".\n const settlingUntil = useRef(0);\n // Bumped by each move the list starts and by the reader's touch: a queued try from an older move doesn't run.\n const moveId = useRef(0);\n const timers = useRef(new Set<ReturnType<typeof setTimeout>>());\n const later = useCallback((fn: () => void, ms: number) => {\n const t = setTimeout(() => {\n timers.current.delete(t);\n fn();\n }, ms);\n timers.current.add(t);\n }, []);\n useEffect(() => {\n const pending = timers.current;\n return () => pending.forEach(clearTimeout);\n }, []);\n const idOf = jumpId ?? keyExtractor;\n const latest = useRef({ data, idOf, jumpAnnouncement, onJumpFailed, onAtBottomChange });\n latest.current = { data, idOf, jumpAnnouncement, onJumpFailed, onAtBottomChange };\n // The row a jump names, by `jumpId` (the key by default).\n const indexOf = useCallback((id: string) => latest.current.data.findIndex((row) => latest.current.idOf(row) === id), []);\n\n const setAtBottom = useCallback((v: boolean) => {\n if (atBottom.current === v) return;\n atBottom.current = v;\n latest.current.onAtBottomChange?.(v);\n }, []);\n\n const toBottom = useCallback(\n (animated: boolean) => {\n settlingUntil.current = Date.now() + SETTLING_MS;\n const move = ++moveId.current;\n const go = (a: boolean) => listRef.current?.scrollToEnd?.({ animated: a && !reducedMotion });\n requestAnimationFrame(() => {\n go(animated);\n placed.current = true;\n });\n // Once more after a new row has its size (FlashList measures it after the first pass).\n if (animated) later(() => move === moveId.current && go(true), 180);\n },\n [later, reducedMotion],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToEnd: (options) => {\n setAtBottom(true);\n toBottom(options?.animated ?? true);\n },\n }),\n [setAtBottom, toBottom],\n );\n\n // Going to a row: by id, so a page loading in between can't send it to the wrong row.\n const jumpTries = useRef<{ id: string; tries: number } | null>(null);\n const scrollToRow = useCallback(\n (id: string) => {\n const move = ++moveId.current;\n const scroll = () => {\n if (move !== moveId.current) return;\n const at = indexOf(id);\n if (at < 0) return;\n // Each try moves the list again: its events don't count until this one settles.\n settlingUntil.current = Date.now() + SETTLING_MS;\n listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });\n };\n jumpTries.current = { id, tries: 0 };\n settlingUntil.current = Date.now() + SETTLING_MS;\n requestAnimationFrame(scroll);\n // Once more after the first layout: on open, FlashList's start-at-the-bottom placement comes after\n // the first frame and would win, leaving the thread at the bottom.\n later(scroll, 250);\n },\n [indexOf, later, reducedMotion],\n );\n // A jump to a row already in view moves nothing, so no scroll event says where the list is: look\n // once its own scrolling has settled (a second try extends that; mid-way it can still read as the\n // bottom). No scroll event yet means the list hasn't moved from where it opens, the bottom.\n const lookForBottom = useCallback(() => {\n if (recheck.current) clearTimeout(recheck.current);\n const look = () => {\n const wait = settlingUntil.current - Date.now();\n if (wait > 0) {\n recheck.current = setTimeout(look, wait + 50);\n return;\n }\n if (!metrics.current || threadNearBottom(metrics.current)) setAtBottom(true);\n };\n recheck.current = setTimeout(look, SETTLING_MS + 50);\n }, [setAtBottom]);\n const has = useCallback((id: string) => indexOf(id) >= 0, [indexOf]);\n // `has` must change when the rows do, so the jump looks again.\n const hasNow = useMemo(() => (id: string) => has(id), [has, data]); // eslint-disable-line react-hooks/exhaustive-deps\n const { highlightedId, jumping, cancel: cancelJump } = useThreadJump({\n target: jumpTo,\n has: hasNow,\n loading,\n loadUntil: onLoadUntil,\n scrollTo: scrollToRow,\n onStart: () => {\n setAtBottom(false);\n placed.current = true;\n },\n onLanded: (id) => {\n lookForBottom();\n const at = indexOf(id);\n const said = at >= 0 ? latest.current.jumpAnnouncement?.(latest.current.data[at]!) : undefined;\n if (said) announce(said);\n },\n onGone: (id) => {\n // Back to where the thread opens: the newest rows.\n setAtBottom(true);\n toBottom(false);\n latest.current.onJumpFailed?.(id);\n },\n });\n\n const loadEarlier = useCallback(() => {\n if (placed.current && !jumping && hasEarlier && !loadingEarlier) onLoadEarlier?.();\n }, [hasEarlier, jumping, loadingEarlier, onLoadEarlier]);\n\n const earlierProps = { loading: loadingEarlier, onPress: () => onLoadEarlier?.(), label: earlierLabel, testID: `${testID}-earlier` };\n const listHeader = (\n <View>\n {header}\n {hasEarlier && onLoadEarlier ? (renderEarlier ? renderEarlier(earlierProps) : <DefaultEarlier {...earlierProps} />) : null}\n </View>\n );\n\n const renderListItem = useCallback(\n ({ item, index }: { item: unknown; index: number }) => renderItem(item as T, { index, highlighted: highlightedId !== null && idOf(item as T) === highlightedId }),\n [highlightedId, idOf, renderItem],\n );\n const listKey = useCallback((row: unknown) => keyExtractor(row as T), [keyExtractor]);\n const listItemType = useMemo(() => (getItemType ? (row: unknown) => getItemType(row as T) : undefined), [getItemType]);\n const onScroll = useCallback(\n (e: { nativeEvent: ScrollMetrics }) => {\n metrics.current = { contentOffset: { y: e.nativeEvent.contentOffset.y }, contentSize: { height: e.nativeEvent.contentSize.height }, layoutMeasurement: { height: e.nativeEvent.layoutMeasurement.height } };\n const height = e.nativeEvent.layoutMeasurement.height;\n setViewport((v) => (Math.abs(v - height) < 1 ? v : height));\n // The list's own scroll (to the newest, to a row) isn't the reader moving. Going to a row starts\n // at the bottom, so its first events say \"at the bottom\": taken, that turned following back on,\n // and FlatList's next layout scrolled to the end, away from the row. After a jump, onLanded\n // looks again once it has settled.\n if (Date.now() < settlingUntil.current) return;\n setAtBottom(threadNearBottom(e.nativeEvent));\n },\n [setAtBottom],\n );\n // The reader's touch ends the list's own scroll: from here their scrolling counts, even mid-jump,\n // the tries still queued don't snap them back, and a jump still loading doesn't land. Only a drag:\n // a fling follows one, and onMomentumScrollBegin isn't promised to be the reader's alone (Android\n // may report a programmatic smooth scroll), which would cancel the list's own retry. VoiceOver's\n // three-finger scroll and a wheel send no drag, so those count once the settling window (400ms) ends.\n const readerTookOver = useCallback(() => {\n settlingUntil.current = 0;\n moveId.current += 1;\n jumpTries.current = null;\n cancelJump();\n }, [cancelJump]);\n const onScrollToIndexFailed = useCallback(\n ({ index, averageItemLength }: { index: number; averageItemLength: number }) => {\n const target = jumpTries.current;\n // The reader took over.\n if (!target) return;\n // FlatList hasn't measured that far up yet: get near it, then try again by id (three times at most).\n listRef.current?.scrollToOffset?.({ offset: Math.max(0, index * averageItemLength - 200), animated: false });\n if (target.tries >= 3) return;\n target.tries += 1;\n later(() => {\n if (jumpTries.current !== target) return;\n const at = indexOf(target.id);\n if (at < 0) return;\n settlingUntil.current = Date.now() + SETTLING_MS;\n listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });\n lookForBottom();\n }, 250);\n },\n [indexOf, later, lookForBottom, reducedMotion],\n );\n const follow = useCallback(() => {\n if (atBottom.current && !jumping) toBottom(false);\n }, [jumping, toBottom]);\n\n if (loading && data.length === 0) {\n return (\n <View testID={`${testID}-loading`} accessible accessibilityLabel=\"Loading\" style={{ flex: 1, justifyContent: \"flex-end\", padding: 16, gap: 10 }}>\n {loadingView ?? <DefaultLoading />}\n </View>\n );\n }\n\n if (data.length === 0 && empty) {\n return (\n <View testID={testID} style={{ flex: 1, justifyContent: \"center\" }}>\n {listHeader}\n {empty}\n </View>\n );\n }\n\n return (\n <List\n ref={listRef}\n testID={testID}\n accessibilityRole=\"list\"\n data={data as readonly unknown[]}\n renderItem={renderListItem}\n keyExtractor={listKey}\n getItemType={listItemType}\n extraData={highlightedId}\n onStartReached={loadEarlier}\n onStartReachedThreshold={0.5}\n keyboardShouldPersistTaps=\"handled\"\n keyboardDismissMode={Platform.select({ ios: \"interactive\" as const, default: \"on-drag\" as const })}\n contentInsetAdjustmentBehavior=\"automatic\"\n contentContainerStyle={{ paddingVertical: 8, paddingHorizontal: 12 }}\n maintainVisibleContentPosition={mode.maintainVisibleContentPosition}\n scrollEventThrottle={32}\n onScroll={onScroll}\n onScrollBeginDrag={readerTookOver}\n onScrollToIndexFailed={onScrollToIndexFailed}\n {...(mode.followsByHand ? { onContentSizeChange: follow, onLayout: follow } : {})}\n ListHeaderComponent={listHeader}\n ListFooterComponent={footer ? <View>{footer}</View> : null}\n />\n );\n}\n\n/** A conversation's list. See the module docs. */\nexport const NativeThreadList = forwardRef(NativeThreadListInner) as <T>(\n props: NativeThreadListProps<T> & { ref?: React.Ref<NativeThreadListHandle> },\n) => ReactElement | null;\n\nfunction DefaultEarlier({ loading, label, onPress, testID }: { loading: boolean; label: string; onPress: () => void; testID: string }) {\n const colors = useThemeRoles();\n return (\n <View style={{ alignItems: \"center\", paddingVertical: 12 }}>\n {loading ? (\n <View testID={`${testID}-loading`} accessible accessibilityLabel={label} accessibilityState={{ busy: true }} style={{ gap: 8, alignItems: \"center\" }}>\n <NativeSkeleton width={180} height={14} />\n <NativeSkeleton width={120} height={14} />\n </View>\n ) : (\n <Pressable testID={testID} accessibilityRole=\"button\" accessibilityLabel={label} onPress={onPress} style={{ minHeight: 44, justifyContent: \"center\", paddingHorizontal: 16 }}>\n <NativeText preset=\"label\" style={{ color: colors.tint }}>\n {label}\n </NativeText>\n </Pressable>\n )}\n </View>\n );\n}\n\nfunction DefaultLoading() {\n return (\n <>\n <NativeSkeleton width={200} height={36} className=\"rounded-2xl\" />\n <View style={{ alignItems: \"flex-end\" }}>\n <NativeSkeleton width={160} height={36} className=\"rounded-2xl\" />\n </View>\n <NativeSkeleton width={240} height={36} className=\"rounded-2xl\" />\n </>\n );\n}\n","/**\n * NativeComposerBar — the bar you write a message in: an input that grows\n * with what you type (up to `maxLines`, then scrolls), a send button, and\n * slots beside and above it. ThreadPage's composer; chat, comments and AI\n * prompts build on it too.\n *\n * - **Modes:** `modes` with a `tone` each (\"Reply\" / \"Internal note\"). The\n * picker sits above the input, and an `internal` tone edges the bar and\n * the input in the theme's `warning` role, so a staff-only note never\n * reads like a reply (the send button keeps the tint: text on `warning`\n * would fail contrast). The row it sends carries the same tone (ThreadPage).\n * - **Slots:** `leading` (attach), `trailing` (beside send: an emoji button),\n * `above` (a reply preview, attachments waiting to send), `idleAction` (in\n * Send's place while there's nothing to send: a hold-to-record mic) and\n * `replaceInput` (instead of `leading` and the input: a recording's\n * waveform). Attachments with no text: pass `hasContent`.\n * - **More ways to send:** `sendActions` (\"Schedule\"). Touch and hold Send:\n * one action runs, several open a menu. Each is also an accessibility\n * action on Send.\n * - **Keyboard:** the bar doesn't move itself. Put it under a keyboard-aware\n * container (ThreadPage does, with `GenesisModules.keyboardAvoidingView`);\n * the list above it dismisses the keyboard interactively on a drag.\n * - **Accessibility:** send and the mode picker are 44pt targets, the input\n * is labelled by its placeholder (and says when it writes an internal\n * note), Sending is announced, and the input stays editable while a\n * message sends (the keyboard stays up).\n *\n * @stability Beta\n */\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { AccessibilityInfo, ActivityIndicator, Animated, Dimensions, Platform, Pressable, TextInput, View } from \"react-native\";\nimport type { ComposerMode } from \"@marktiderman/genesis-core/conversation\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { usePressFeedback } from \"../hooks/use-press-feedback\";\nimport { NativeContextMenu } from \"./context-menu\";\nimport { NativeIcon } from \"./icon\";\nimport { NativeText } from \"./text\";\n\nexport type { ComposerMode, ComposerTone } from \"@marktiderman/genesis-core/conversation\";\n\nexport interface NativeComposerBarProps {\n value: string;\n onChangeText: (text: string) => void;\n onSend: () => void;\n /** A send is in flight: the button spins and won't send twice. */\n sending?: boolean;\n /** Turns sending off (besides a blank value). */\n disabled?: boolean;\n placeholder?: string;\n /** Send's label, to VoiceOver. Default \"Send\". */\n sendLabel?: string;\n sendingLabel?: string;\n maxLength?: number;\n /** The input grows to this many lines, then scrolls. Default 6. */\n maxLines?: number;\n /** Ways to send (\"Reply\", \"Internal note\"). Two or more show the picker. */\n modes?: readonly ComposerMode[];\n /** The picker's name, to VoiceOver. Default \"Send as\". */\n modesLabel?: string;\n /** The chosen mode's id. Default the first. */\n mode?: string;\n onModeChange?: (id: string) => void;\n leading?: ReactNode;\n trailing?: ReactNode;\n above?: ReactNode;\n /**\n * Whether there's something to send. By default, a `value` that isn't blank; pass `true` when\n * attachments are waiting and no text is needed, and `false` while `replaceInput` is showing.\n */\n hasContent?: boolean;\n /** Takes Send's place (the same 44pt spot) while there's nothing to send and nothing sending: a hold-to-record mic. */\n idleAction?: ReactNode;\n /** Shown instead of `leading` and the input (a recording in progress). Label it yourself: it's one region to VoiceOver. */\n replaceInput?: ReactNode;\n /** Touch and hold Send for these (one runs straight away; several open a menu). Each is also an accessibility action on Send. */\n sendActions?: readonly ComposerSendAction[];\n /** Title of the menu when there are several `sendActions`. */\n sendActionsTitle?: string;\n /** The hint on Send when it has `sendActions`. Default \"Touch and hold for more options\". */\n sendActionsHint?: string;\n /** Passed to the input (to insert at the cursor, say). */\n onSelectionChange?: (e: { nativeEvent: { selection: { start: number; end: number } } }) => void;\n /**\n * The input takes text (default). When false, Send is off and the input reads as disabled.\n * `idleAction` is the app's, so disable it too.\n */\n editable?: boolean;\n testID?: string;\n}\n\n/** Another way to send (touch and hold Send). */\nexport interface ComposerSendAction {\n id: string;\n label: string;\n onPress: () => void;\n destructive?: boolean;\n}\n\nconst LINE = 22;\nconst PAD_Y = 8;\n\nexport function NativeComposerBar({\n value,\n onChangeText,\n onSend,\n sending = false,\n disabled = false,\n placeholder = \"Message\",\n sendLabel = \"Send\",\n sendingLabel = \"Sending\",\n maxLength,\n maxLines = 6,\n modes,\n modesLabel = \"Send as\",\n mode,\n onModeChange,\n leading,\n trailing,\n above,\n hasContent,\n idleAction,\n replaceInput,\n sendActions,\n sendActionsTitle,\n sendActionsHint = \"Touch and hold for more options\",\n onSelectionChange,\n editable = true,\n testID = \"composer\",\n}: NativeComposerBarProps) {\n const colors = useThemeRoles();\n const { symbol, icons } = useGenesisModules();\n // No icon module: the arrow would draw nothing, so the button says its label.\n const hasIcon = Boolean(symbol || icons?.[\"arrow-up\"]);\n const current = modes?.find((m) => m.id === mode) ?? modes?.[0];\n const internal = current?.tone === \"internal\";\n const blank = !(hasContent ?? value.trim().length > 0);\n const canSend = !blank && !disabled && !sending && editable;\n const actions = sendActions?.length ? sendActions : null;\n const [menuOpen, setMenuOpen] = useState(false);\n const idle = idleAction != null && blank && !sending;\n const sendPress = usePressFeedback({ haptic: \"light\", scale: 0.9, disabled: !canSend });\n // A multiline input grows with its text by itself; this caps it, after which it scrolls.\n // Lines grow with the person's text size (Dynamic Type, Android font scale).\n const fontScale = Dimensions.get(\"window\").fontScale || 1;\n const maxHeight = Math.ceil(LINE * fontScale) * maxLines + PAD_Y * 2;\n // Say \"Sending\" on iOS too (a live region is Android-only).\n useEffect(() => {\n if (sending && Platform.OS === \"ios\") (AccessibilityInfo as { announceForAccessibility?: (t: string) => void }).announceForAccessibility?.(sendingLabel);\n }, [sending, sendingLabel]);\n\n return (\n <View\n testID={testID}\n style={{\n paddingHorizontal: 12,\n paddingTop: 8,\n paddingBottom: 8,\n gap: 6,\n backgroundColor: colors.groupedBackground,\n borderTopWidth: internal ? 2 : 0,\n borderTopColor: colors.warning,\n }}\n >\n {modes && modes.length > 1 ? (\n <View testID={`${testID}-modes`} accessibilityRole=\"tablist\" accessibilityLabel={modesLabel} style={{ flexDirection: \"row\", gap: 4 }}>\n {modes.map((m) => {\n const on = m.id === current?.id;\n return (\n <Pressable\n key={m.id}\n testID={`${testID}-mode-${m.id}`}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: on }}\n accessibilityLabel={m.label}\n onPress={() => onModeChange?.(m.id)}\n style={{\n minHeight: 44,\n justifyContent: \"center\",\n paddingHorizontal: 12,\n borderRadius: 22,\n backgroundColor: on ? colors.fill : \"transparent\",\n borderWidth: m.tone === \"internal\" ? 1 : 0,\n borderColor: colors.warning,\n }}\n >\n <NativeText preset=\"label\" style={{ color: on ? colors.label : colors.secondaryLabel }}>\n {m.label}\n </NativeText>\n </Pressable>\n );\n })}\n </View>\n ) : null}\n {above}\n <View style={{ flexDirection: \"row\", alignItems: \"flex-end\", gap: 8 }}>\n {replaceInput != null ? (\n <View style={{ flex: 1, minHeight: 44, justifyContent: \"center\" }}>{replaceInput}</View>\n ) : (\n <>\n {leading}\n <TextInput\n testID={`${testID}-input`}\n value={value}\n onChangeText={onChangeText}\n placeholder={internal ? current!.label : placeholder}\n placeholderTextColor={colors.tertiaryLabel as string}\n accessibilityLabel={internal ? current!.label : placeholder}\n accessibilityState={editable ? undefined : { disabled: true }}\n editable={editable}\n onSelectionChange={onSelectionChange}\n multiline\n maxLength={maxLength}\n style={{\n flex: 1,\n minHeight: 44,\n maxHeight,\n textAlignVertical: \"center\",\n paddingHorizontal: 14,\n paddingTop: PAD_Y,\n paddingBottom: PAD_Y,\n borderRadius: 22,\n fontSize: 17,\n lineHeight: LINE,\n color: colors.label as string,\n backgroundColor: colors.surface,\n borderWidth: internal ? 1 : 0,\n borderColor: colors.warning,\n opacity: editable ? 1 : 0.6,\n }}\n />\n </>\n )}\n {trailing}\n {idle ? (\n <View testID={`${testID}-idle`} style={{ minWidth: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" }}>\n {idleAction}\n </View>\n ) : sending ? (\n <View testID={`${testID}-sending`} accessible accessibilityLabel={sendingLabel} accessibilityLiveRegion=\"polite\" style={{ width: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" }}>\n <ActivityIndicator />\n </View>\n ) : (\n <Animated.View style={sendPress.style}>\n <Pressable\n testID={`${testID}-send`}\n accessibilityRole=\"button\"\n accessibilityLabel={sendLabel}\n accessibilityState={{ disabled: !canSend }}\n accessibilityHint={actions ? sendActionsHint : undefined}\n accessibilityActions={actions && canSend ? actions.map((a) => ({ name: a.id, label: a.label })) : undefined}\n onAccessibilityAction={actions ? (e) => actions.find((a) => a.id === e.nativeEvent.actionName)?.onPress() : undefined}\n onLongPress={actions ? () => (actions.length === 1 ? actions[0]!.onPress() : setMenuOpen(true)) : undefined}\n disabled={!canSend}\n onPressIn={sendPress.onPressIn}\n onPressOut={sendPress.onPressOut}\n onPress={() => {\n sendPress.confirm();\n onSend();\n }}\n style={{ minWidth: 44, height: 44, paddingHorizontal: hasIcon ? 0 : 14, borderRadius: 22, alignItems: \"center\", justifyContent: \"center\", backgroundColor: canSend ? colors.tint : colors.fill }}\n >\n {hasIcon ? (\n <NativeIcon name=\"arrow-up\" size={20} color={canSend ? colors.background : colors.tertiaryLabel} />\n ) : (\n <NativeText preset=\"label\" className={canSend ? \"text-primary-foreground\" : undefined} style={canSend ? undefined : { color: colors.tertiaryLabel }}>\n {sendLabel}\n </NativeText>\n )}\n </Pressable>\n </Animated.View>\n )}\n </View>\n {actions && actions.length > 1 ? <NativeContextMenu open={menuOpen} onOpenChange={setMenuOpen} actions={actions} {...(sendActionsTitle ? { title: sendActionsTitle } : {})} testID={`${testID}-send-menu`} /> : null}\n </View>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/text.tsx","../src/components/button.tsx","../src/components/sheet.tsx","../src/components/empty-state.tsx","../src/icon-names.ts","../src/components/icon.tsx","../src/components/list-item.tsx","../src/components/section-list.tsx","../src/components/refresh-control.tsx","../src/components/badge.tsx","../src/components/input.tsx","../src/components/skeleton.tsx","../src/components/loading-state.tsx","../src/components/context-menu.tsx","../src/components/swipe-row.tsx"],"names":["RNText","cva","jsx","jsxs","Pressable","View","Text","Platform","Fragment","useEffect","useRef","Animated","ActivityIndicator"],"mappings":";;;;;;;;;;AAUA,IAAM,YAAA,GAAe,IAAI,iBAAA,EAAmB;AAAA,EAC1C,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,IAAA,EAAM,iCAAA;AAAA,MACN,SAAA,EAAW,+BAAA;AAAA,MACX,OAAA,EAAS,+BAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ;AAAA;AAEZ,CAAC;AA6BD,SAAS,UAAA,CAAW;AAAA,EAClB,SAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,WAAW,EAAA,CAAG,YAAA,CAAa,EAAE,MAAA,EAAQ,GAAG,SAAS,CAAA;AAAA,MAChD,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;ACnDA,IAAM,cAAA,GAAiBC,GAAAA;AAAA,EACrB,iDAAA;AAAA,EACA;AAAA,IACE,QAAA,EA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AA,CAAO,WAAA,GAAc,MAAA,CAAO,WAAA,GAAc,OAAO,IAAA,EAAK;AAAA,MAErJ,QAAA,kBAAAF,GAAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,MAAA,CAAO,WAAA,GAAc,6BAAA,GAAgC,yBAAA,EAA2B,MAAA,EAAO,OAAA,EAC3G,QAAA,EAAA,MAAA,CAAO,KAAA,EACV;AAAA,KAAA;AAAA,IAVK,MAAA,CAAO;AAAA,GAYf,CAAA,EACH,CAAA;AAGF,EAAA,uBACEA,GAAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAK,KAAA;AAAA,MACL,MAAA;AAAA,MACA,QAAA,EAAU,CAAA;AAAA,MACV,aAAA,EAAe,KAAA;AAAA,MACf,cAAA,EAAgB,KAAA;AAAA,MAChB,mBAAA,EAAqB,MAAM,IAAA,CAAK,QAAQ,CAAA;AAAA,MACxC,iBAAA,EAAmB,OAAA,CAAQ,MAAA,GAAS,KAAA,CAAM,OAAO,CAAA,GAAI,MAAA;AAAA,MACrD,kBAAA,EAAoB,QAAA,CAAS,MAAA,GAAS,KAAA,CAAM,QAAQ,CAAA,GAAI,MAAA;AAAA,MAEvD;AAAA;AAAA,GACH;AAEJ","file":"chunk-VEWSY4TZ.js","sourcesContent":["/**\n * Text — typography primitive with semantic presets (h1, h2, body, caption, etc.).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ComponentRef, Ref } from \"react\";\nimport { Text as RNText, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst textVariants = cva(\"text-foreground\", {\n variants: {\n preset: {\n h1: \"text-3xl font-bold leading-9\",\n h2: \"text-2xl font-bold leading-8\",\n h3: \"text-xl font-semibold leading-7\",\n h4: \"text-lg font-semibold leading-7\",\n body: \"text-base font-normal leading-6\",\n \"body-sm\": \"text-sm font-normal leading-5\",\n caption: \"text-xs font-normal leading-4\",\n label: \"text-sm font-medium leading-5\",\n },\n },\n defaultVariants: {\n preset: \"body\",\n },\n});\n\n// `className` is declared explicitly here — not inherited from react-native's\n// `TextProps` via NativeWind's global augmentation, which does not resolve across\n// the RN / nativewind / react-native-css-interop version matrix. Mirrors every\n// other ui-native primitive (Button, Tooltip, ChipGroup, …); the implementation\n// already consumes `className` below.\nexport interface NativeTextProps\n extends TextProps,\n VariantProps<typeof textVariants> {\n /** NativeWind utility class string applied to the underlying Text. */\n className?: string;\n /** The underlying Text (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof RNText>> | undefined;\n}\n\n/**\n * Allowed `preset` values on {@link NativeText}. Re-exported as a named type\n * so consumer brand packages can build preset-driven typography APIs without\n * having to reach into `NativeTextProps['preset']` themselves.\n *\n * Example (consumer):\n * ```ts\n * import type { TextPreset } from \"@marktiderman/genesis-ui-native\";\n * function Heading({ as }: { as: TextPreset }) { ... }\n * ```\n */\nexport type TextPreset = NonNullable<NativeTextProps[\"preset\"]>;\n\nfunction NativeText({\n className,\n preset,\n children,\n ...props\n}: NativeTextProps) {\n return (\n <RNText\n className={cn(textVariants({ preset }), className)}\n {...props}\n >\n {children}\n </RNText>\n );\n}\n\nexport { NativeText, textVariants };\n","/**\n * Button — primary touch target. Variants: default, secondary, outline, ghost, destructive,\n * gradient (the brand's `gradients.primary` from the nearest `GenesisThemeProvider`, else the\n * primary).\n * It answers a touch with `usePressFeedback`: what's inside shrinks a little while held (or dims\n * under Reduce Motion), the same as every Genesis pressable. The background stays still. Layout\n * classes in `className` (`justify-start`, `gap-3`, `flex-col`) apply to what's inside.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ComponentRef, Ref } from \"react\";\nimport { ActivityIndicator, Animated, Pressable, Text, View, type AccessibilityState, type StyleProp, type ViewStyle } from \"react-native\";\nimport { brandGradientCss, useOptionalTheme } from \"@marktiderman/genesis-design-system\";\nimport type { HapticKind } from \"../hooks/use-haptics\";\nimport { usePressFeedback } from \"../hooks/use-press-feedback\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n \"flex-row items-center justify-center rounded-md\",\n {\n variants: {\n variant: {\n default: \"bg-primary\",\n secondary: \"bg-secondary\",\n outline: \"border border-input bg-transparent\",\n ghost: \"bg-transparent\",\n destructive: \"bg-destructive\",\n gradient: \"bg-primary\",\n },\n size: {\n sm: \"h-9 px-3 gap-1.5\",\n md: \"h-10 px-4 gap-2\",\n lg: \"h-11 px-8 gap-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n }\n);\n\nconst buttonTextVariants = cva(\"font-medium text-center\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n outline: \"text-foreground\",\n ghost: \"text-foreground\",\n destructive: \"text-destructive-foreground\",\n gradient: \"text-primary-foreground\",\n },\n size: {\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\n/** How what's inside is laid out: the same gap per size as the button's own. */\nconst contentVariants = cva(\"flex-row items-center justify-center\", {\n variants: { size: { sm: \"gap-1.5\", md: \"gap-2\", lg: \"gap-2\" } },\n defaultVariants: { size: \"md\" },\n});\n\n/** A caller's classes that lay out the button's content, which now sits a level inside it. */\nconst contentClasses = (className: string | undefined) =>\n className\n ?.split(/\\s+/)\n .filter((c) => /^(flex-(row|col)|justify-|items-|gap-)/.test(c))\n .join(\" \");\n\nexport interface NativeButtonProps\n extends VariantProps<typeof buttonVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n onPress?: () => void;\n disabled?: boolean;\n loading?: boolean;\n testID?: string;\n /** What a screen reader says, when the text alone isn't enough (\"Vote for Dark mode\"). Default: the text. */\n accessibilityLabel?: string;\n accessibilityHint?: string;\n /** Merged with the button's own `disabled` and `busy`: `{ selected: true }` for a vote cast, a filter on. */\n accessibilityState?: AccessibilityState;\n /**\n * A haptic through `GenesisModules.haptics` (`light` for a vote, `success` for a save): it plays\n * when the press counts, except `select`, which ticks on press-in as `usePressFeedback` does. Default none.\n */\n haptic?: HapticKind | undefined;\n /** Styles for the pressable, after the classes: colors or sizes from a theme object. */\n style?: StyleProp<ViewStyle> | undefined;\n /** The pressable (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof View>> | undefined;\n}\n\nfunction NativeButton({\n className,\n textClassName,\n variant,\n size,\n children,\n onPress,\n disabled,\n loading,\n accessibilityState,\n haptic,\n style,\n ...props\n}: NativeButtonProps) {\n const isDisabled = disabled || loading;\n const theme = useOptionalTheme();\n // React Native 0.80+ paints a CSS gradient as `experimental_backgroundImage`; older versions\n // ignore it and the `bg-primary` underneath shows.\n const gradient = variant === \"gradient\" && theme ? brandGradientCss(theme.brand) : undefined;\n const gradientStyle = gradient ? ({ experimental_backgroundImage: gradient } as ViewStyle) : undefined;\n const feedback = usePressFeedback({ haptic: onPress ? (haptic ?? false) : false, disabled: Boolean(isDisabled) });\n const press = onPress\n ? () => {\n feedback.confirm();\n onPress();\n }\n : undefined;\n\n return (\n <Pressable\n className={cn(\n buttonVariants({ variant, size }),\n isDisabled && \"opacity-50\",\n className\n )}\n onPress={press}\n onPressIn={feedback.onPressIn}\n onPressOut={feedback.onPressOut}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ ...accessibilityState, disabled: isDisabled, busy: loading ?? accessibilityState?.busy }}\n {...props}\n // The brand gradient under the caller's own style, not replaced by it.\n style={gradientStyle ? (style ? [gradientStyle, style] : gradientStyle) : style}\n >\n {/* Inside the Pressable, which keeps the button's size and classes: a wrapper would lose a `flex-1`. */}\n <Animated.View style={[{ flexGrow: 1 }, feedback.style]}>\n <View className={cn(contentVariants({ size }), contentClasses(className))}>\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={\n variant === \"outline\" || variant === \"ghost\"\n ? undefined\n : \"white\"\n }\n />\n ) : null}\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n buttonTextVariants({ variant, size }),\n textClassName\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n </Animated.View>\n </Pressable>\n );\n}\n\nexport { NativeButton, buttonVariants, buttonTextVariants };\n","/**\n * Sheet / BottomSheet — modal that slides up from the bottom.\n *\n * Use for non-blocking selections, filters, and short flows that benefit\n * from preserving screen context. For blocking confirmations, use\n * <NativeDialog>. For full-screen flows, use a navigation route.\n *\n * By default this is React Native's own `Modal`, which needs nothing mounted\n * above it: the system page sheet on iOS (swipe down to close) and a bottom\n * panel over a scrim on Android (back button or a tap on the scrim closes\n * it). Content gets its own safe area (`useSafeAreaInsets` inside the sheet\n * is the sheet's), and the bottom inset is padded. Put scrolling content in\n * `NativeSheetScrollView`. The sheet doesn't move above the keyboard.\n *\n * `@gorhom/bottom-sheet` (snap points, drag between heights) is used only\n * when the app opts in by mounting `<NativeSheetProvider bottomSheet={…}>`\n * (or passing `bottomSheet` to `GenesisNativeApp`), never because the\n * library happens to be installed: it throws on open unless its\n * `BottomSheetModalProvider` is mounted, and it needs gesture-handler's\n * `GestureHandlerRootView` at the root and Reanimated set up.\n * `snapPoints` and `initialSnapIndex` apply only to that path.\n *\n * A short menu or form passes `fitContent`: the sheet is as tall as what is in it.\n *\n * A sheet that is a screen of its own (a link can open it) belongs in the\n * router instead: an expo-router screen with `presentation: \"formSheet\"` and\n * `sheetAllowedDetents` (e.g. `[0.5, 1]`) is the system sheet with detents.\n *\n * @stability Beta\n */\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\nimport { AccessibilityInfo, Dimensions, KeyboardAvoidingView, Modal, Platform, Pressable, ScrollView, View, type ScrollViewProps, type ViewStyle } from \"react-native\";\nimport { SafeAreaProvider, useSafeAreaInsets } from \"react-native-safe-area-context\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\n\nexport interface NativeSheetProps {\n /** Controlled visibility. */\n open: boolean;\n /** Fired when the user dismisses the sheet (backdrop, swipe down, Android back). Set `open` false in it. */\n onOpenChange: (open: boolean) => void;\n /** Snap points, with `@gorhom/bottom-sheet` only (see `NativeSheetProvider`). e.g. [\"25%\", \"50%\", \"90%\"]. */\n snapPoints?: (string | number)[];\n /** Index of initial snap point, with `@gorhom/bottom-sheet` only. Default 0. */\n initialSnapIndex?: number;\n /** Keep the sheet open when the user taps the backdrop, swipes it down or presses Android back. Default false. */\n disableBackdropDismiss?: boolean;\n /**\n * As tall as its content (up to 90% of the screen) instead of the full page sheet, for a short\n * menu or form. On iOS this is a bottom panel over a scrim, like Android's (a tap on the scrim\n * or the VoiceOver escape gesture closes it; it doesn't follow a swipe down), and it moves above\n * the keyboard. Under `NativeSheetProvider` the library sizes it (`enableDynamicSizing`) and\n * `snapPoints` is ignored. Default false.\n */\n fitContent?: boolean;\n /** The sheet has finished going, where the platform says so (iOS's modal, the library): another modal can present now. */\n onDismissed?: () => void;\n children: ReactNode;\n testID?: string;\n}\n\ntype AnyComponent = ComponentType<Record<string, unknown>>;\n\n/**\n * The parts of `@gorhom/bottom-sheet` (v5) the sheet uses. Pass the whole\n * module: `import * as BottomSheet from \"@gorhom/bottom-sheet\"`.\n */\nexport interface NativeSheetLibrary {\n BottomSheetModal: unknown;\n BottomSheetView: unknown;\n BottomSheetBackdrop: unknown;\n BottomSheetModalProvider: unknown;\n /** Used by `NativeSheetScrollView` when present. */\n BottomSheetScrollView?: unknown;\n}\n\nconst REQUIRED_EXPORTS = [\"BottomSheetModal\", \"BottomSheetView\", \"BottomSheetBackdrop\", \"BottomSheetModalProvider\"] as const;\n\nconst SheetLibraryContext = createContext<NativeSheetLibrary | null>(null);\n\nexport interface NativeSheetProviderProps {\n /**\n * `@gorhom/bottom-sheet` v5 (`import * as BottomSheet from \"@gorhom/bottom-sheet\"`).\n * Read once. The app must also wrap its root in gesture-handler's\n * `GestureHandlerRootView` and set Reanimated up, as the library requires.\n * Sheet content renders in the library's portal, inside this provider:\n * mount it below the providers sheets read (data, session, navigation).\n */\n bottomSheet: NativeSheetLibrary;\n children: ReactNode;\n}\n\n/**\n * Opts every `NativeSheet` below it into `@gorhom/bottom-sheet` and mounts\n * the library's `BottomSheetModalProvider`. A module missing any export the\n * sheet needs is reported with `console.error` and ignored, so sheets fall\n * back to the native modal instead of crashing on open.\n *\n * @stability Beta\n */\nexport function NativeSheetProvider({ bottomSheet, children }: NativeSheetProviderProps) {\n // Frozen: a different module later would remount everything below the provider.\n const [library] = useState(() => (isSheetLibrary(bottomSheet) ? bottomSheet : null));\n const [problem] = useState(() => (library ? null : invalidLibraryMessage(bottomSheet)));\n useEffect(() => {\n if (problem) console.error(problem);\n }, [problem]);\n if (!library) return <>{children}</>;\n const Provider = library.BottomSheetModalProvider as ComponentType<{ children: ReactNode }>;\n return (\n <SheetLibraryContext.Provider value={library}>\n <Provider>{children}</Provider>\n </SheetLibraryContext.Provider>\n );\n}\n\nfunction isSheetLibrary(value: unknown): value is NativeSheetLibrary {\n if (!value || typeof value !== \"object\") return false;\n const mod = value as Record<string, unknown>;\n return REQUIRED_EXPORTS.every((name) => mod[name] != null);\n}\n\nfunction invalidLibraryMessage(value: unknown): string {\n const mod = (value && typeof value === \"object\" ? value : {}) as Record<string, unknown>;\n const missing = REQUIRED_EXPORTS.filter((name) => mod[name] == null);\n return (\n `NativeSheetProvider: \\`bottomSheet\\` is missing ${missing.join(\", \")}, so sheets use the native modal. ` +\n 'Pass the whole module: `import * as BottomSheet from \"@gorhom/bottom-sheet\"`.'\n );\n}\n\n/** @stability Beta */\nexport function NativeSheet(props: NativeSheetProps) {\n const library = useContext(SheetLibraryContext);\n if (library) return <LibrarySheet library={library} {...props} />;\n return <ModalSheet {...props} />;\n}\n\n/**\n * A `ScrollView` for sheet content: the library's `BottomSheetScrollView`\n * under `NativeSheetProvider` (so scrolling and dragging the sheet don't\n * fight), React Native's otherwise. Sized to its content until it reaches\n * the sheet's height.\n *\n * @stability Beta\n */\nexport function NativeSheetScrollView({ style, ...props }: ScrollViewProps) {\n const library = useContext(SheetLibraryContext);\n const Scroll = (library?.BottomSheetScrollView as ComponentType<ScrollViewProps> | undefined) ?? ScrollView;\n const own: ViewStyle = { flexGrow: 0 };\n return <Scroll style={[own, ...(Array.isArray(style) ? style : style ? [style] : [])]} {...props} />;\n}\n\ntype SheetHandle = { present: () => void; dismiss: () => void };\n\nfunction LibrarySheet({\n library,\n open,\n onOpenChange,\n snapPoints = [\"50%\", \"90%\"],\n initialSnapIndex = 0,\n disableBackdropDismiss = false,\n fitContent = false,\n onDismissed,\n testID,\n children,\n}: NativeSheetProps & { library: NativeSheetLibrary }) {\n const sheet = useRef<SheetHandle | null>(null);\n // What the app asked for last, read when the library reports a dismiss: a dismiss\n // that finishes after the app reopened the sheet is not the user closing it.\n const wanted = useRef(open);\n const onOpenChangeRef = useRef(onOpenChange);\n onOpenChangeRef.current = onOpenChange;\n const onDismissedRef = useRef(onDismissed);\n onDismissedRef.current = onDismissed;\n\n // Child refs are attached before this runs, so the first render presents too.\n useEffect(() => {\n wanted.current = open;\n if (open) sheet.current?.present();\n else sheet.current?.dismiss();\n }, [open]);\n\n const BottomSheetModal = library.BottomSheetModal as AnyComponent;\n const BottomSheetView = library.BottomSheetView as AnyComponent;\n const BottomSheetBackdrop = library.BottomSheetBackdrop as AnyComponent;\n\n const onDismiss = useCallback(() => {\n if (wanted.current) {\n wanted.current = false;\n onOpenChangeRef.current(false);\n }\n onDismissedRef.current?.();\n }, []);\n const backdrop = useCallback(\n (p: Record<string, unknown>) => (\n <BottomSheetBackdrop\n {...p}\n appearsOnIndex={0}\n disappearsOnIndex={-1}\n pressBehavior={disableBackdropDismiss ? \"none\" : \"close\"}\n />\n ),\n [BottomSheetBackdrop, disableBackdropDismiss],\n );\n\n return (\n <BottomSheetModal\n ref={sheet}\n snapPoints={fitContent ? undefined : snapPoints}\n index={fitContent ? 0 : initialSnapIndex}\n // v5 sizes to the content by default and adds that as a snap point, which would shift the\n // indexes: only a sheet that fits its content asks for it, and then it is the only one.\n enableDynamicSizing={fitContent}\n // Long content would otherwise grow the sheet to the full height, under the status bar.\n {...(fitContent ? { maxDynamicContentSize: Math.round(Dimensions.get(\"window\").height * 0.9) } : {})}\n onDismiss={onDismiss}\n enablePanDownToClose={!disableBackdropDismiss}\n backdropComponent={backdrop}\n >\n <BottomSheetView testID={testID ?? \"native-sheet\"}>{children}</BottomSheetView>\n </BottomSheetModal>\n );\n}\n\n/**\n * Whether Reduce Motion is on, or `null` until the system has answered: a\n * sheet mounted open waits for it, since the presentation animation is\n * chosen when the sheet is presented.\n */\nfunction useReduceMotionAnswer(): boolean | null {\n const [reduced, setReduced] = useState<boolean | null>(null);\n useEffect(() => {\n let mounted = true;\n AccessibilityInfo.isReduceMotionEnabled().then(\n (value) => mounted && setReduced(value),\n () => mounted && setReduced(false),\n );\n const sub = AccessibilityInfo.addEventListener(\"reduceMotionChanged\", (value: boolean) => setReduced(value));\n return () => {\n mounted = false;\n sub?.remove?.();\n };\n }, []);\n return reduced;\n}\n\n/**\n * React Native's `Modal`, which needs no provider. iOS: the system page\n * sheet (`presentationStyle=\"pageSheet\"`), following the finger when swiped\n * down (`allowSwipeDismissal`); with `disableBackdropDismiss` a swipe only\n * asks and the sheet springs back. Android: a transparent modal with a scrim\n * and a panel at the bottom, drawn under the system bars. `fitContent` on iOS: the same bottom\n * panel, kept above the keyboard.\n */\nfunction ModalSheet({ open, onOpenChange, disableBackdropDismiss = false, fitContent = false, onDismissed, testID, children }: NativeSheetProps) {\n const reducedMotion = useReduceMotionAnswer();\n const roles = useThemeRoles();\n const requestClose = () => {\n if (!disableBackdropDismiss) onOpenChange(false);\n };\n const visible = open && reducedMotion !== null;\n const animationType = reducedMotion ? \"none\" : \"slide\";\n const id = testID ?? \"native-sheet\";\n\n const ios = Platform.OS === \"ios\";\n if (ios && !fitContent) {\n return (\n <Modal\n visible={visible}\n animationType={animationType}\n presentationStyle=\"pageSheet\"\n allowSwipeDismissal={!disableBackdropDismiss}\n backdropColor={roles.background}\n onRequestClose={requestClose}\n onDismiss={onDismissed}\n >\n <SafeAreaProvider>\n <SheetBody\n testID={id}\n onAccessibilityEscape={disableBackdropDismiss ? undefined : requestClose}\n style={{ flex: 1, backgroundColor: roles.background }}\n >\n {children}\n </SheetBody>\n </SafeAreaProvider>\n </Modal>\n );\n }\n\n return (\n <Modal\n visible={visible}\n transparent\n animationType={animationType}\n statusBarTranslucent\n navigationBarTranslucent\n onRequestClose={requestClose}\n onDismiss={onDismissed}\n >\n <SafeAreaProvider>\n <KeyboardPanel ios={ios}>\n <Pressable\n testID={`${id}-backdrop`}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Close\"\n disabled={disableBackdropDismiss}\n importantForAccessibility={disableBackdropDismiss ? \"no-hide-descendants\" : \"auto\"}\n onPress={requestClose}\n style={{ position: \"absolute\", top: 0, right: 0, bottom: 0, left: 0, backgroundColor: \"rgba(0,0,0,0.4)\" }}\n />\n <SheetBody\n testID={id}\n onAccessibilityEscape={disableBackdropDismiss ? undefined : requestClose}\n style={{\n maxHeight: \"90%\",\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n backgroundColor: roles.surface,\n paddingTop: 12,\n }}\n >\n <View\n style={{ alignSelf: \"center\", width: 32, height: 4, borderRadius: 2, marginBottom: 8, backgroundColor: roles.tertiaryLabel }}\n />\n {children}\n </SheetBody>\n </KeyboardPanel>\n </SafeAreaProvider>\n </Modal>\n );\n}\n\n/**\n * The bottom panel's frame: on iOS it moves up with the keyboard, less the home indicator's\n * inset the sheet already pads, so it sits on the keyboard without a gap.\n */\nfunction KeyboardPanel({ ios, children }: { ios: boolean; children: ReactNode }) {\n const insets = useSafeAreaInsets();\n return (\n <KeyboardAvoidingView behavior={ios ? \"padding\" : undefined} keyboardVerticalOffset={ios ? -insets.bottom : 0} style={{ flex: 1, justifyContent: \"flex-end\" }}>\n {children}\n </KeyboardAvoidingView>\n );\n}\n\n/** The sheet's root, padded by the sheet's own bottom inset (the home indicator, the navigation bar). */\nfunction SheetBody({\n testID,\n style,\n onAccessibilityEscape,\n children,\n}: {\n testID: string;\n style: ViewStyle;\n onAccessibilityEscape?: () => void;\n children: ReactNode;\n}) {\n const insets = useSafeAreaInsets();\n return (\n <View testID={testID} accessibilityViewIsModal onAccessibilityEscape={onAccessibilityEscape} style={{ ...style, paddingBottom: insets.bottom }}>\n {children}\n </View>\n );\n}\n","/**\n * EmptyState — what to show when a list / screen has no data.\n *\n * Three semantic variants drive default messaging:\n * - \"first-run\": user has never had data here. Optimistic.\n * - \"no-results\": user filtered/searched and got nothing. Suggest reset.\n * - \"error\": fetching failed. Suggest retry.\n *\n * The variant only sets sensible defaults for `title` and tone — pass\n * your own `title`, `body`, `primaryAction`, `secondaryAction`, etc. to\n * override. Mirrors the @marktiderman/genesis-ui web `<EmptyState>` API where\n * possible (illustration vs icon slot, primary/secondary actions).\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\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 aperture: \"camera.aperture\",\n \"arrow-left\": \"arrow.left\",\n \"arrow-up\": \"arrow.up\",\n bell: \"bell\",\n calendar: \"calendar\",\n camera: \"camera\",\n \"camera-flip\": \"arrow.triangle.2.circlepath.camera\",\n check: \"checkmark\",\n \"chevron-down\": \"chevron.down\",\n \"chevron-left\": \"chevron.left\",\n \"chevron-right\": \"chevron.right\",\n \"chevron-up\": \"chevron.up\",\n clapperboard: \"movieclapper\",\n clock: \"clock\",\n close: \"xmark\",\n compose: \"square.and.pencil\",\n copy: \"doc.on.doc\",\n download: \"square.and.arrow.down\",\n edit: \"pencil\",\n error: \"xmark.circle\",\n expand: \"arrow.up.left.and.arrow.down.right\",\n \"external-link\": \"arrow.up.right.square\",\n eye: \"eye\",\n file: \"doc\",\n filter: \"line.3.horizontal.decrease\",\n \"folder-plus\": \"folder.badge.plus\",\n grid: \"square.grid.2x2\",\n grip: \"line.3.horizontal\",\n heart: \"heart\",\n home: \"house\",\n image: \"photo\",\n info: \"info.circle\",\n link: \"link\",\n list: \"list.bullet\",\n lock: \"lock\",\n \"log-out\": \"rectangle.portrait.and.arrow.right\",\n mail: \"envelope\",\n maximize: \"arrow.up.left.and.arrow.down.right\",\n menu: \"line.3.horizontal\",\n message: \"bubble.left\",\n mic: \"mic\",\n minus: \"minus\",\n more: \"ellipsis\",\n paperclip: \"paperclip\",\n pause: \"pause.fill\",\n pin: \"pin\",\n play: \"play.fill\",\n plus: \"plus\",\n radio: \"dot.radiowaves.left.and.right\",\n redo: \"arrow.uturn.forward\",\n refresh: \"arrow.clockwise\",\n reply: \"arrowshape.turn.up.left\",\n search: \"magnifyingglass\",\n settings: \"gearshape\",\n \"settings-2\": \"slider.horizontal.3\",\n share: \"square.and.arrow.up\",\n smile: \"face.smiling\",\n sort: \"arrow.up.arrow.down\",\n star: \"star\",\n stop: \"stop.fill\",\n success: \"checkmark.circle\",\n table: \"tablecells\",\n trash: \"trash\",\n undo: \"arrow.uturn.backward\",\n upload: \"tray.and.arrow.up\",\n user: \"person\",\n video: \"video\",\n volume: \"speaker.wave.2.fill\",\n \"volume-off\": \"speaker.slash.fill\",\n warning: \"exclamationmark.triangle\",\n} as const;\n\n/** A semantic icon name: what the icon is for. */\nexport type NativeIconName = keyof typeof SF_SYMBOLS;\n\n/** Every semantic icon name. */\nexport const NATIVE_ICON_NAMES = Object.keys(SF_SYMBOLS) as NativeIconName[];\n","/**\n * NativeIcon — an icon by what it is for (\"settings\", \"bell\"), not by a\n * library's name. On iOS it draws the SF Symbol (expo-symbols' `SymbolView`,\n * passed as `modules.symbol`); on Android and web, and as the SF Symbol's\n * fallback, it draws the icon set given as `modules.icons` (`lucideIcons`\n * from `@marktiderman/genesis-ui-native/icons/lucide`). With neither, it\n * keeps the icon's space empty and warns once in development.\n *\n * Decorative by default (hidden from screen readers). Give `label` when the\n * icon carries meaning on its own, such as an icon-only button's content.\n *\n * @stability Beta\n */\nimport { Platform, View, type ColorValue } from \"react-native\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { SF_SYMBOLS, type NativeIconName } from \"../icon-names\";\nimport { useGenesisModules } from \"../native-modules\";\n\nexport interface NativeIconProps {\n name: NativeIconName;\n /** Points. Default 20. */\n size?: number;\n /** Default the theme's label color. */\n color?: ColorValue;\n /** iOS SF Symbol weight. */\n weight?: \"ultraLight\" | \"thin\" | \"light\" | \"regular\" | \"medium\" | \"semibold\" | \"bold\" | \"heavy\" | \"black\";\n /** Read by screen readers. Without it the icon is decorative and hidden from them. */\n label?: string;\n testID?: string;\n}\n\ndeclare const __DEV__: boolean | undefined;\nconst warned = new Set<string>();\n\nfunction warnOnce(name: string) {\n if (typeof __DEV__ === \"undefined\" || !__DEV__ || warned.has(name)) return;\n warned.add(name);\n console.warn(\n `[genesis] NativeIcon \"${name}\" has nothing to draw with: pass modules.icons (lucideIcons from \"@marktiderman/genesis-ui-native/icons/lucide\") and, for SF Symbols on iOS, modules.symbol (SymbolView from \"expo-symbols\") to GenesisModulesProvider.`,\n );\n}\n\nexport function NativeIcon({ name, size = 20, color, weight, label, testID }: NativeIconProps) {\n const { symbol: SymbolView, icons } = useGenesisModules();\n const roles = useThemeRoles();\n const tint = color ?? roles.label;\n const a11y = label\n ? { accessible: true, accessibilityRole: \"image\" as const, accessibilityLabel: label }\n : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: \"no-hide-descendants\" as const };\n const Fallback = icons?.[name];\n const fallback = Fallback ? <Fallback size={size} color={tint} testID={testID ? `${testID}-fallback` : undefined} /> : null;\n\n if (Platform.OS === \"ios\" && SymbolView) {\n return (\n <View {...a11y} testID={testID} style={{ width: size, height: size }}>\n <SymbolView name={SF_SYMBOLS[name]} size={size} tintColor={tint} weight={weight} fallback={fallback} style={{ width: size, height: size }} />\n </View>\n );\n }\n if (!fallback) warnOnce(name);\n return (\n <View {...a11y} testID={testID} style={{ width: size, height: size, alignItems: \"center\", justifyContent: \"center\" }}>\n {fallback}\n </View>\n );\n}\n","/**\n * ListItem — recurring row in a list (settings, contacts, results).\n *\n * Slots: leading (avatar / icon), title, subtitle, trailing\n * (chevron / accessory / action). Supports pressable variants with\n * automatic divider rendering between adjacent items via a wrapper\n * pattern (see <NativeListItemDivider>).\n *\n * For platform-default chevrons, pass `showChevron`; the chevron uses\n * the muted-foreground token.\n *\n * @stability Beta\n */\nimport { Platform, Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { NativeIcon } from \"./icon\";\n\nexport interface NativeListItemProps {\n title: string;\n subtitle?: string;\n /** Slot rendered to the left of the title (avatar / icon). */\n leading?: React.ReactNode;\n /** Slot rendered to the right of the title (badge / accessory). */\n trailing?: React.ReactNode;\n /** When true, renders a chevron-right at the end. */\n showChevron?: boolean;\n /** When provided, the row becomes pressable. */\n onPress?: () => void;\n disabled?: boolean;\n className?: string;\n testID?: string;\n}\n\nexport function NativeListItem({\n title,\n subtitle,\n leading,\n trailing,\n showChevron,\n onPress,\n disabled,\n className,\n testID,\n}: NativeListItemProps) {\n const inner = (\n <>\n {leading ? <View className=\"mr-3\">{leading}</View> : null}\n <View className=\"flex-1\">\n <Text className=\"text-base text-foreground\" numberOfLines={1}>\n {title}\n </Text>\n {subtitle ? (\n <Text\n className=\"mt-0.5 text-xs text-muted-foreground\"\n numberOfLines={2}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n {trailing ? <View className=\"ml-3\">{trailing}</View> : null}\n {showChevron ? <Chevron /> : null}\n </>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"native-list-item\"}\n accessibilityRole=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={onPress}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n disabled && \"opacity-50\",\n className\n )}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View\n testID={testID ?? \"native-list-item\"}\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n className\n )}\n >\n {inner}\n </View>\n );\n}\n\n/**\n * The drill-in chevron: an SF Symbol on iOS or the app's icon set\n * (`modules.symbol` / `modules.icons`) when given, else a text \"›\".\n */\nfunction Chevron() {\n const { symbol, icons } = useGenesisModules();\n const roles = useThemeRoles();\n if ((Platform.OS === \"ios\" && symbol) || icons?.[\"chevron-right\"]) {\n return (\n <View className=\"ml-2\">\n <NativeIcon name=\"chevron-right\" size={14} weight=\"semibold\" color={roles.tertiaryLabel} testID=\"native-list-item-chevron\" />\n </View>\n );\n }\n return (\n <Text\n accessibilityElementsHidden\n className=\"ml-2 text-base text-muted-foreground\"\n >\n ›\n </Text>\n );\n}\n\nexport function NativeListItemDivider({ className }: { className?: string }) {\n return <View className={cn(\"h-px bg-border\", className)} />;\n}\n","/**\n * SectionList header pattern — opinionated header style for\n * react-native SectionList rows.\n *\n * The full SectionList API stays with React Native; Genesis ships the\n * header component so consumers can pass it as `renderSectionHeader`\n * and get a consistent visual: muted background, uppercase tracking,\n * sticky-friendly padding.\n *\n * Pattern:\n *\n * <SectionList\n * sections={...}\n * renderItem={({ item }) => <NativeListItem title={item.label} />}\n * renderSectionHeader={({ section }) => (\n * <NativeSectionListHeader title={section.title} />\n * )}\n * />\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSectionListHeaderProps {\n title: string;\n /** Optional trailing content (e.g., a count badge). */\n trailing?: React.ReactNode;\n className?: string;\n testID?: string;\n}\n\nexport function NativeSectionListHeader({\n title,\n trailing,\n className,\n testID,\n}: NativeSectionListHeaderProps) {\n return (\n <View\n testID={testID ?? \"native-section-header\"}\n accessibilityRole=\"header\"\n className={cn(\n \"flex-row items-center justify-between border-b border-border bg-muted px-4 py-2\",\n className\n )}\n >\n <Text className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {title}\n </Text>\n {trailing}\n </View>\n );\n}\n","/**\n * RefreshControl wrapper — token-aware tint over RN's RefreshControl.\n *\n * Use as the `refreshControl` prop on ScrollView / FlatList / SectionList.\n * The tint defaults to the theme's `tint` role; consumers can override\n * per-call. We re-export RN's\n * RefreshControl shape so the API mirrors what consumers already know.\n *\n * @stability Beta\n */\nimport { RefreshControl } from \"react-native\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\n\nexport interface NativeRefreshControlProps {\n refreshing: boolean;\n onRefresh: () => void;\n /** Hex / RGB color override. Falls back to the theme primary. */\n tintColor?: string;\n /** Title shown under the iOS spinner. */\n title?: string;\n /** Color of the iOS title text. */\n titleColor?: string;\n /** Android colors prop (an array of progress colors). */\n colors?: string[];\n /** Android progress background. */\n progressBackgroundColor?: string;\n testID?: string;\n}\n\n/**\n * Pull to refresh, tinted with the theme's `tint` role. Works under any Genesis root.\n */\n// The tint comes from `useThemeRoles`, not `useGenesisTheme` from `providers/native`: that is\n// another context, which the native app shell's `GenesisThemeProvider` never mounts, so it threw there.\nexport function NativeRefreshControl({ tintColor, colors, testID, ...rest }: NativeRefreshControlProps) {\n const tint = useThemeRoles().tint;\n const androidTint = typeof tint === \"string\" ? [tint] : undefined;\n return <RefreshControl {...rest} tintColor={tintColor ?? (tint as string)} colors={colors ?? androidTint} testID={testID ?? \"native-refresh-control\"} />;\n}\n","/**\n * Badge — compact status / count / category tag.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst badgeVariants = cva(\n \"flex-row items-center self-start rounded-full border px-2.5 py-0.5\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary\",\n secondary: \"border-transparent bg-secondary\",\n destructive: \"border-transparent bg-destructive\",\n outline: \"border-border bg-transparent\",\n success: \"border-transparent bg-success/15\",\n warning: \"border-transparent bg-warning/15\",\n info: \"border-transparent bg-info/15\",\n muted: \"border-transparent bg-muted\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst badgeTextVariants = cva(\"text-xs font-medium\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n destructive: \"text-destructive-foreground\",\n outline: \"text-foreground\",\n // AA-safe status text on the /15 tint. The bare status token\n // (text-success ~2.2:1) fails WCAG AA. The `-dark` stop is optional in\n // the brand schema (only `status.*.DEFAULT` is required) AND regresses\n // dark mode — a dark shade on the dark-surface tint drops to ~1.7–2.6:1.\n // Instead use the semantic Tailwind ramp (always present, brand-\n // independent, same hues as the Genesis status tokens) with a `dark:`\n // stop. Measured: light /15 tint emerald-700 4.76 / amber-800 6.32 /\n // blue-700 5.64; dark-surface tint emerald-300 ≥8.2 / amber-200 ≥10.8 /\n // blue-300 ≥8.2 — AA in both modes across the static preset and the\n // themeFromBrand() runtime dark map.\n success: \"text-emerald-700 dark:text-emerald-300\",\n warning: \"text-amber-800 dark:text-amber-200\",\n info: \"text-blue-700 dark:text-blue-300\",\n muted: \"text-muted-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeBadgeProps\n extends VariantProps<typeof badgeVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n accessibilityLabel?: string;\n testID?: string;\n}\n\nfunction NativeBadge({\n className,\n textClassName,\n variant,\n children,\n ...props\n}: NativeBadgeProps) {\n return (\n <View className={cn(badgeVariants({ variant }), className)} accessibilityRole=\"text\" {...props}>\n {typeof children === \"string\" ? (\n <Text\n className={cn(badgeTextVariants({ variant }), textClassName)}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n );\n}\n\nexport { NativeBadge, badgeVariants, badgeTextVariants };\n","/**\n * Input — single-line text field.\n *\n * @stability Stable\n */\nimport type { ComponentRef, Ref } from \"react\";\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeInputProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n /** The underlying TextInput (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof TextInput>> | undefined;\n}\n\nfunction NativeInput({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n placeholderTextColor,\n ...props\n}: NativeInputProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">\n {label}\n </Text>\n ) : null}\n <TextInput\n className={cn(\n \"h-10 rounded-md border border-input bg-background px-3 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}\n accessibilityLabel={label}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeInput };\n","/**\n * Skeleton — loading placeholder block.\n *\n * Pulses with Reanimated 4 when the app passes it (`modules.reanimated` on\n * `GenesisModulesProvider`), else with React Native's Animated. While Reduce\n * Motion is on it holds still at a legible opacity.\n *\n * @stability Stable\n */\nimport { useEffect, useRef } from \"react\";\nimport { Animated, Easing } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useMotion } from \"../hooks/use-motion\";\nimport { useGenesisModules, type GenesisReanimatedModule } from \"../native-modules\";\n\nexport interface NativeSkeletonProps {\n className?: string;\n /**\n * Width of the skeleton. Use className for NativeWind sizing instead\n * when possible (e.g. className=\"w-24 h-4\").\n */\n width?: number;\n height?: number;\n /** Shorthand that sets both width and height (useful for circle skeletons). */\n size?: number;\n circle?: boolean;\n testID?: string;\n}\n\nconst LOW = 0.3;\nconst HIGH = 1;\n// Held still under Reduce Motion (visual-regression flow\n// `screenshot-reduced-motion.yaml`; Apple HIG / WCAG 2.3.3).\nconst STILL = 0.6;\n\nfunction sizeStyles({ width, height, size }: NativeSkeletonProps): Array<{ width?: number; height?: number }> {\n const w = width ?? size;\n const h = height ?? size;\n const styles: Array<{ width?: number; height?: number }> = [];\n if (w !== undefined) styles.push({ width: w });\n if (h !== undefined) styles.push({ height: h });\n return styles;\n}\n\nfunction skeletonClass({ className, circle }: NativeSkeletonProps) {\n return cn(\"rounded-md bg-muted\", circle && \"rounded-full\", className);\n}\n\nfunction NativeSkeleton(props: NativeSkeletonProps) {\n const { reanimated } = useGenesisModules();\n return reanimated ? <ReanimatedSkeleton {...props} reanimated={reanimated} /> : <AnimatedSkeleton {...props} />;\n}\n\nfunction ReanimatedSkeleton({ reanimated: R, ...props }: NativeSkeletonProps & { reanimated: GenesisReanimatedModule }) {\n // One pulse cycle from the shared motion tokens; under Reduce Motion it holds still (a zero-length repeat would flash).\n const motion = useMotion();\n const reduceMotion = motion.reduced;\n const PULSE_MS = motion.duration.pulse;\n const opacity = R.useSharedValue(LOW);\n useEffect(() => {\n R.cancelAnimation(opacity);\n if (reduceMotion) {\n opacity.value = STILL;\n return undefined;\n }\n opacity.value = LOW;\n opacity.value = R.withRepeat(R.withTiming(HIGH, { duration: PULSE_MS, easing: R.Easing.inOut(R.Easing.ease) }), -1, true);\n return () => R.cancelAnimation(opacity);\n // `R` and `opacity` are stable for the component's life.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reduceMotion]);\n const animatedStyle = R.useAnimatedStyle(() => {\n \"worklet\";\n return { opacity: opacity.value };\n });\n const AnimatedView = R.default.View;\n return (\n <AnimatedView\n className={skeletonClass(props)}\n style={[animatedStyle, ...sizeStyles(props)]}\n testID={props.testID}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n );\n}\n\nfunction AnimatedSkeleton(props: NativeSkeletonProps) {\n const opacity = useRef(new Animated.Value(LOW)).current;\n // One pulse cycle from the shared motion tokens; under Reduce Motion it holds still (a zero-length repeat would flash).\n const motion = useMotion();\n const reduceMotion = motion.reduced;\n const PULSE_MS = motion.duration.pulse;\n\n useEffect(() => {\n if (reduceMotion) {\n opacity.setValue(STILL);\n return;\n }\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(opacity, {\n toValue: HIGH,\n duration: PULSE_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n Animated.timing(opacity, {\n toValue: LOW,\n duration: PULSE_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n ])\n );\n animation.start();\n return () => animation.stop();\n }, [opacity, reduceMotion]);\n\n return (\n <Animated.View\n className={skeletonClass(props)}\n style={[{ opacity }, ...sizeStyles(props)] as any[]}\n testID={props.testID}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n />\n );\n}\n\nexport { NativeSkeleton };\n","/**\n * LoadingState — a centred spinner for a screen (or part of one) that is\n * waiting: a redirect while the session loads, the first fetch of a page.\n *\n * Use it instead of a hand-rolled `<View><ActivityIndicator /></View>`: the\n * spinner takes the theme tint, screen readers hear one \"Loading\" progress\n * bar (or your `label`), and the full-screen form sits inside the safe area\n * on the screen background. For content-shaped placeholders (a list about to\n * appear) use `NativeSkeleton`; for known progress use `NativeProgress`.\n *\n * if (!session) return <NativeLoadingState />; // whole screen\n * <NativeLoadingState fullScreen={false} label=\"Loading more\" size=\"small\" />\n *\n * `ScreenContainer loading` renders the inline form in place of its body.\n *\n * @stability Beta\n */\nimport { ActivityIndicator, View, type ColorValue } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { cn } from \"../utils\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeText } from \"./text\";\n\nexport type NativeLoadingStateEdge = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport interface NativeLoadingStateProps {\n /** Text shown under the spinner. It is also what screen readers announce. */\n label?: string;\n /** What screen readers announce when no `label` is shown. Default `\"Loading\"`. */\n accessibilityLabel?: string;\n /** Spinner size. Default `\"large\"`. */\n size?: \"small\" | \"large\";\n /**\n * `true` (default): fill the screen on the theme background, inside the\n * safe area. `false`: a padded, centred block that fills its parent, for a\n * screen body, a section or a list footer.\n */\n fullScreen?: boolean;\n /** Safe-area edges when `fullScreen`. Default all four. */\n safeAreaEdges?: NativeLoadingStateEdge[];\n /** Spinner color. Defaults to the theme tint. */\n color?: ColorValue;\n className?: string;\n /** testID on the root; the spinner is `${testID}-spinner`, the label `${testID}-label`. Default `\"loading-state\"`. */\n testID?: string;\n}\n\nconst ALL_EDGES: NativeLoadingStateEdge[] = [\"top\", \"bottom\", \"left\", \"right\"];\n\nexport function NativeLoadingState({\n label,\n accessibilityLabel,\n size = \"large\",\n fullScreen = true,\n safeAreaEdges = ALL_EDGES,\n color,\n className,\n testID = \"loading-state\",\n}: NativeLoadingStateProps) {\n const roles = useThemeRoles();\n const spoken = label ?? accessibilityLabel ?? \"Loading\";\n\n const content = (\n <View\n testID={fullScreen ? `${testID}-content` : testID}\n className={cn(\"items-center justify-center gap-3 px-4 py-8\", !fullScreen && \"flex-grow\", !fullScreen && className)}\n accessible\n accessibilityRole=\"progressbar\"\n accessibilityLabel={spoken}\n accessibilityState={{ busy: true }}\n >\n <ActivityIndicator testID={`${testID}-spinner`} size={size} color={(color ?? roles.tint) as string} />\n {label ? (\n <NativeText testID={`${testID}-label`} preset=\"body-sm\" className=\"text-muted-foreground text-center\">\n {label}\n </NativeText>\n ) : null}\n </View>\n );\n\n if (!fullScreen) return content;\n\n return (\n <SafeAreaView\n testID={testID}\n edges={safeAreaEdges}\n className={cn(\"flex-1 items-center justify-center bg-background\", className)}\n >\n {content}\n </SafeAreaView>\n );\n}\n","/**\n * NativeContextMenu — what a long press opens: a short list of actions in a\n * sheet that fits them, with Cancel, instead of the system `Alert`. It's the\n * same on iOS and Android, a row of its own for each action (44pt, a destructive\n * one in the theme's `destructive`), and opening it taps `medium`.\n *\n * Controlled, like `NativeSheet`: keep `open` in your screen and set it from\n * `onLongPress`. Offer the same actions as accessibility actions on the\n * pressable too (`accessibilityActions`), since VoiceOver doesn't long press.\n *\n * An action runs once, and once the sheet has gone: iOS won't present an alert\n * or another modal over one that's still dismissing.\n *\n * @stability Beta\n */\nimport { useEffect, useRef } from \"react\";\nimport { Platform, Pressable, View } from \"react-native\";\nimport { useHaptics } from \"../hooks/use-haptics\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeSheet } from \"./sheet\";\nimport { NativeText } from \"./text\";\n\nexport interface NativeContextMenuAction {\n id: string;\n label: string;\n onPress: () => void;\n destructive?: boolean;\n}\n\nexport interface NativeContextMenuProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n actions: readonly NativeContextMenuAction[];\n /** Over the actions: what they act on. */\n title?: string;\n cancelLabel?: string;\n testID?: string;\n}\n\n/** If iOS never says the sheet has gone (Modal's `onDismiss` can be skipped), run the action after this. */\nconst IOS_DISMISS_FALLBACK_MS = 600;\n\nexport function NativeContextMenu({ open, onOpenChange, actions, title, cancelLabel = \"Cancel\", testID = \"context-menu\" }: NativeContextMenuProps) {\n const colors = useThemeRoles();\n const play = useHaptics();\n const opened = useRef(false);\n // What was tapped, until the sheet has gone. Taken once: a second tap, or the fallback after onDismiss, finds nothing.\n const tapped = useRef<(() => void) | null>(null);\n const ran = useRef(false);\n const fallback = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => {\n if (open && !opened.current) {\n play(\"medium\");\n ran.current = false;\n }\n opened.current = open;\n }, [open, play]);\n\n const runTapped = () => {\n if (fallback.current) clearTimeout(fallback.current);\n fallback.current = null;\n const action = tapped.current;\n tapped.current = null;\n action?.();\n };\n const run = (action: NativeContextMenuAction) => {\n if (ran.current) return;\n ran.current = true;\n tapped.current = action.onPress;\n onOpenChange(false);\n if (Platform.OS === \"ios\") fallback.current = setTimeout(runTapped, IOS_DISMISS_FALLBACK_MS);\n else runTapped();\n };\n\n return (\n <NativeSheet open={open} onOpenChange={onOpenChange} fitContent onDismissed={runTapped} testID={testID}>\n <View style={{ paddingHorizontal: 16, paddingBottom: 8 }}>\n {title ? (\n <NativeText testID={`${testID}-title`} accessibilityRole=\"header\" numberOfLines={2} style={{ paddingVertical: 8, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textAlign: \"center\" }}>\n {title}\n </NativeText>\n ) : null}\n {actions.map((action) => (\n <Pressable\n key={action.id}\n testID={`${testID}-action-${action.id}`}\n accessibilityRole=\"button\"\n accessibilityLabel={action.label}\n onPress={() => run(action)}\n style={{ minHeight: 48, alignItems: \"center\", justifyContent: \"center\" }}\n >\n <NativeText style={{ color: action.destructive ? colors.destructive : colors.tint, fontSize: 17, lineHeight: 22 }}>{action.label}</NativeText>\n </Pressable>\n ))}\n <Pressable testID={`${testID}-cancel`} accessibilityRole=\"button\" accessibilityLabel={cancelLabel} onPress={() => onOpenChange(false)} style={{ minHeight: 48, alignItems: \"center\", justifyContent: \"center\" }}>\n <NativeText style={{ color: colors.label, fontSize: 17, lineHeight: 22, fontWeight: \"600\" }}>{cancelLabel}</NativeText>\n </Pressable>\n </View>\n </NativeSheet>\n );\n}\n","/**\n * NativeSwipeRow — a row with actions behind a swipe: Archive to one side,\n * Delete to the other (each action's `side`, trailing by default).\n *\n * The gesture is the app's `GenesisModules.swipeable` (react-native-gesture-\n * handler's `ReanimatedSwipeable`, an optional peer). Without it, the row draws\n * as it is, so an action must always be reachable another way too: `InboxPage`\n * puts them in the accessibility actions and on long press. The buttons behind\n * the row are hidden from VoiceOver for that reason (a screen reader doesn't\n * swipe), and a swipe that opens taps `medium` through `useHaptics`.\n *\n * @stability Beta\n */\nimport { useRef, type ReactNode } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport type { InboxSwipeAction } from \"@marktiderman/genesis-core/conversation\";\nimport { useHaptics } from \"../hooks/use-haptics\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { useGenesisModules } from \"../native-modules\";\nimport { NativeText } from \"./text\";\n\nexport interface NativeSwipeRowProps {\n actions: readonly InboxSwipeAction[];\n children?: ReactNode;\n testID?: string;\n}\n\n/** A button's width behind the row: room for a short label. */\nconst ACTION_WIDTH = 80;\n\nexport function NativeSwipeRow({ actions, children, testID = \"swipe-row\" }: NativeSwipeRowProps) {\n const { swipeable: Swipeable } = useGenesisModules();\n const colors = useThemeRoles();\n const play = useHaptics();\n const swipe = useRef<{ close?: () => void } | null>(null);\n if (!Swipeable || actions.length === 0) return <>{children}</>;\n\n const leading = actions.filter((a) => a.side === \"leading\");\n const trailing = actions.filter((a) => a.side !== \"leading\");\n const group = (list: readonly InboxSwipeAction[]) => () => (\n <View accessibilityElementsHidden importantForAccessibility=\"no-hide-descendants\" style={{ flexDirection: \"row\" }}>\n {list.map((action) => (\n <Pressable\n key={action.id}\n testID={`${testID}-action-${action.id}`}\n onPress={() => {\n swipe.current?.close?.();\n action.onPress();\n }}\n style={{ width: ACTION_WIDTH, alignItems: \"center\", justifyContent: \"center\", backgroundColor: action.destructive ? colors.destructive : colors.tint }}\n >\n <NativeText className={action.destructive ? \"text-destructive-foreground\" : \"text-primary-foreground\"} preset=\"label\">\n {action.label}\n </NativeText>\n </Pressable>\n ))}\n </View>\n );\n\n return (\n <Swipeable\n ref={swipe}\n testID={testID}\n friction={2}\n overshootLeft={false}\n overshootRight={false}\n onSwipeableWillOpen={() => play(\"medium\")}\n renderLeftActions={leading.length ? group(leading) : undefined}\n renderRightActions={trailing.length ? group(trailing) : undefined}\n >\n {children}\n </Swipeable>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/card.tsx","../src/components/date-time-picker.tsx","../src/components/segmented-control.tsx","../src/components/inline-alert.tsx","../src/components/search-bar.tsx","../src/components/separator.tsx","../src/components/alert.tsx","../src/components/avatar.tsx","../src/components/checkbox.tsx","../src/components/label.tsx","../src/components/select.tsx","../src/components/switch.tsx","../src/components/textarea.tsx","../src/components/image.tsx","../src/components/gallery-grid.tsx"],"names":["jsx","Text","View","Pressable","jsxs","Fragment","useState","TextInput","FILL","Image","useMemo"],"mappings":";;;;;;;;;;;AAcA,SAA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K,KAAA,GAAQ,IAAI,GAAA,EAAI;AAAA,QAE7C,eAAK,KAAA,CAAM,GAAA,CAAI,CAAC,CAAA,KAAM,IAAA,CAAK,EAAE,IAAA,EAAM,CAAA,CAAE,KAAA,EAAO,EAAE,OAAO,CAAA,CAAE,KAAA,EAAO,QAAQ,CAAA,CAAE,MAAA,EAAQ,CAAC;AAAA;AAAA,KACpF;AAAA,EAEJ,CAAA;AAEA,EAAA,uBACEF,GAAAA,CAACE,IAAAA,EAAA,EAAK,MAAA,EAAgB,QAAA,EAAoB,SAAA,EAAW,EAAA,CAAG,eAAA,EAAiB,SAAS,CAAA,EAC/E,QAAA,EAAA,KAAA,GAAQ,oBACPF,GAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,GAAG,MAAM,CAAA,KAAA,CAAA;AAAA,MACjB,8BAAA;AAAA,MACA,IAAA,EAAM,KAAA;AAAA,MACN,YAAA,EAAc,CAAC,IAAA,KAAS,IAAA,CAAK,GAAA;AAAA,MAC7B,UAAA,EAAY,UAAA;AAAA,MACZ,qBAAqB,MAAA,mBAASA,IAAAK,QAAAA,EAAA,EAAG,kBAAO,CAAA,GAAM,MAAA;AAAA,MAC9C,qBAAqB,MAAA,mBAASL,IAAAK,QAAAA,EAAA,EAAG,kBAAO,CAAA,GAAM,MAAA;AAAA,MAC9C,YAAA,EAAc,QAAA,GAAW,MAAM,QAAA,EAAS,GAAI,MAAA;AAAA,MAC5C,qBAAA,EAAuB,GAAA;AAAA,MACvB,kBAAA,EAAoB,CAAA;AAAA,MACpB,UAAA,EAAY;AAAA;AAAA,MAEZ,IAAA,EACN,CAAA;AAEJ","file":"chunk-ZUR4PK77.js","sourcesContent":["/**\n * Card — flat container surface. The 90% case is `<Card>{children}</Card>`. See HeaderCard for structured layouts.\n *\n * @stability Stable\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCardProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCard({ className, children, ...props }: NativeCardProps) {\n return (\n <View\n className={cn(\n \"rounded-xl border border-border bg-card p-0 shadow-sm\",\n className\n )}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nfunction NativeCardHeader({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"flex-col gap-1.5 p-6\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nexport interface NativeCardTitleProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardTitle({\n className,\n children,\n ...props\n}: NativeCardTitleProps) {\n return (\n <Text\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight text-card-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeCardDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardDescription({\n className,\n children,\n ...props\n}: NativeCardDescriptionProps) {\n return (\n <Text\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nfunction NativeCardContent({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"p-6 pt-0\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nfunction NativeCardFooter({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View\n className={cn(\"flex-row items-center p-6 pt-0\", className)}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport {\n NativeCard,\n NativeCardHeader,\n NativeCardTitle,\n NativeCardDescription,\n NativeCardContent,\n NativeCardFooter,\n};\n","/**\n * DatePicker / TimePicker — wraps @react-native-community/datetimepicker\n * with platform-correct UX (iOS wheel, Android calendar/clock dialog).\n *\n * NativeDatePicker exposes a date as a Pressable button labeled with the\n * formatted value; tapping presents the platform-native picker. Same\n * pattern for NativeTimePicker.\n *\n * Consumers must install @react-native-community/datetimepicker (peer\n * dep, marked optional). When the dep is missing, the component falls\n * back to a read-only Text label so screens still render — useful for\n * sample/demo apps without native module setup.\n *\n * Optional backend: pass `@expo/ui`'s drop-in picker as `modules.datePicker`\n * (`import DateTimePicker from \"@expo/ui/community/datetime-picker\"`) on\n * `GenesisModulesProvider` to draw SwiftUI / Jetpack Compose pickers instead.\n * Same props and behavior; the community picker stays the fallback.\n *\n * @stability Beta\n */\nimport { useMemo, useState } from \"react\";\nimport { Platform, Pressable, Text } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useGenesisModules, type GenesisDatePickerComponent } from \"../native-modules\";\n\nfunction resolveDateTimePicker(): React.ComponentType<{\n value: Date;\n mode: \"date\" | \"time\";\n display?: string;\n onChange: (e: unknown, d?: Date) => void;\n disabled?: boolean;\n style?: object;\n testID?: string;\n}> | null {\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n return require(\"@react-native-community/datetimepicker\").default;\n } catch {\n return null;\n }\n}\n\ninterface BasePickerProps {\n value: Date;\n onChange: (next: Date) => void;\n /** Disable the picker. */\n disabled?: boolean;\n /** Override the rendered button text. */\n formatLabel?: (d: Date) => string;\n className?: string;\n testID?: string;\n}\n\nexport type NativeDatePickerProps = BasePickerProps;\nexport type NativeTimePickerProps = BasePickerProps;\n\nfunction PickerButton({\n value,\n onChange,\n mode,\n formatLabel,\n disabled,\n className,\n testID,\n}: BasePickerProps & { mode: \"date\" | \"time\" }) {\n const { datePicker: ExpoUiPicker } = useGenesisModules();\n const Picker = ExpoUiPicker ? null : resolveDateTimePicker();\n const [showAndroid, setShowAndroid] = useState(false);\n const isIOS = Platform.OS === \"ios\";\n\n const label = useMemo(() => {\n if (formatLabel) return formatLabel(value);\n if (mode === \"date\") return value.toDateString();\n return value.toLocaleTimeString([], { hour: \"2-digit\", minute: \"2-digit\" });\n }, [formatLabel, mode, value]);\n\n if (ExpoUiPicker) {\n return (\n <ExpoUiPickerButton\n Picker={ExpoUiPicker}\n value={value}\n onChange={onChange}\n mode={mode}\n label={label}\n disabled={disabled}\n className={className}\n testID={testID}\n />\n );\n }\n\n if (!Picker) {\n return (\n <Text\n testID={testID}\n className={cn(\n \"min-h-[44px] rounded-md border border-input bg-background px-3 py-3 text-base text-muted-foreground\",\n className\n )}\n >\n {label} (picker module not installed)\n </Text>\n );\n }\n\n // iOS: the compact picker is itself the button (it shows the value and\n // opens the wheel), so it renders alone; a button beside it showed the\n // value twice.\n if (isIOS) {\n return (\n <Picker\n testID={testID ?? `native-${mode}-picker`}\n value={value}\n mode={mode}\n display=\"compact\"\n disabled={disabled}\n style={disabled ? { opacity: 0.5 } : undefined}\n onChange={(_e, d) => {\n if (d && !disabled) onChange(d);\n }}\n />\n );\n }\n\n // Android: a button that opens the platform dialog.\n return (\n <>\n <Pressable\n testID={testID ?? `native-${mode}-picker`}\n accessibilityRole=\"button\"\n accessibilityLabel={`Pick a ${mode}`}\n accessibilityValue={{ text: label }}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={() => setShowAndroid(true)}\n className={cn(\n \"min-h-[44px] flex-row items-center rounded-md border border-input bg-background px-3\",\n disabled && \"opacity-50\",\n className\n )}\n >\n <Text className=\"flex-1 text-base text-foreground\">{label}</Text>\n </Pressable>\n {showAndroid ? (\n <Picker\n testID={testID ? `${testID}-picker` : undefined}\n value={value}\n mode={mode}\n display=\"default\"\n onChange={(_e, d) => {\n setShowAndroid(false);\n if (d) onChange(d);\n }}\n />\n ) : null}\n </>\n );\n}\n\n/**\n * The @expo/ui backend (`@expo/ui/community/datetime-picker`, SwiftUI on iOS\n * and Jetpack Compose on Android), a drop-in for the community picker. iOS:\n * the compact picker is the button, as above. Android: a button that mounts\n * the picker as a dialog; it fires `onValueChange` on confirm and\n * `onDismiss` on cancel, and is unmounted on either.\n */\nfunction ExpoUiPickerButton({\n Picker,\n value,\n onChange,\n mode,\n label,\n disabled,\n className,\n testID,\n}: {\n Picker: GenesisDatePickerComponent;\n value: Date;\n onChange: (next: Date) => void;\n mode: \"date\" | \"time\";\n label: string;\n disabled?: boolean;\n className?: string;\n testID?: string;\n}) {\n const [showAndroid, setShowAndroid] = useState(false);\n if (Platform.OS === \"ios\") {\n // As with the community picker: the native compact picker draws and\n // announces its own value, so `className` and the button label don't apply.\n return (\n <Picker\n testID={testID ?? `native-${mode}-picker`}\n value={value}\n mode={mode}\n display=\"compact\"\n disabled={disabled}\n style={disabled ? { opacity: 0.5 } : undefined}\n onValueChange={(_e, d) => {\n if (d && !disabled) onChange(d);\n }}\n />\n );\n }\n return (\n <>\n <Pressable\n testID={testID ?? `native-${mode}-picker`}\n accessibilityRole=\"button\"\n accessibilityLabel={`Pick a ${mode}`}\n accessibilityValue={{ text: label }}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={() => setShowAndroid(true)}\n className={cn(\n \"min-h-[44px] flex-row items-center rounded-md border border-input bg-background px-3\",\n disabled && \"opacity-50\",\n className\n )}\n >\n <Text className=\"flex-1 text-base text-foreground\">{label}</Text>\n </Pressable>\n {showAndroid ? (\n <Picker\n testID={testID ? `${testID}-picker` : undefined}\n value={value}\n mode={mode}\n presentation=\"dialog\"\n onValueChange={(_e, d) => {\n setShowAndroid(false);\n if (d) onChange(d);\n }}\n onDismiss={() => setShowAndroid(false)}\n />\n ) : null}\n </>\n );\n}\n\nexport function NativeDatePicker(props: NativeDatePickerProps) {\n return <PickerButton {...props} mode=\"date\" />;\n}\n\nexport function NativeTimePicker(props: NativeTimePickerProps) {\n return <PickerButton {...props} mode=\"time\" />;\n}\n","/**\n * SegmentedControl — iOS-style horizontal segmented picker.\n *\n * Use for 2-5 mutually exclusive options that fit on one line. For more\n * than 5, prefer <NativeTabs> or <NativeSelect>. Renders an Android-\n * acceptable filled-pill variant; the visual remains compact on both\n * platforms.\n *\n * @stability Beta\n */\nimport { Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSegmentedControlOption<T = string> {\n value: T;\n label: string;\n}\n\nexport interface NativeSegmentedControlProps<T = string> {\n options: NativeSegmentedControlOption<T>[];\n value: T;\n onChange: (value: T) => void;\n /** Disable the entire control. */\n disabled?: boolean;\n className?: string;\n testID?: string;\n}\n\nconst SELECTED_LIFT = { shadowColor: \"black\", shadowOpacity: 0.08, shadowRadius: 2, shadowOffset: { width: 0, height: 1 }, elevation: 1 } as const;\nconst UNSELECTED_LIFT = { shadowColor: \"black\", shadowOpacity: 0, shadowRadius: 0, shadowOffset: { width: 0, height: 0 }, elevation: 0 } as const;\n\nexport function NativeSegmentedControl<T = string>({\n options,\n value,\n onChange,\n disabled,\n className,\n testID,\n}: NativeSegmentedControlProps<T>) {\n return (\n <View\n testID={testID ?? \"native-segmented\"}\n accessibilityRole=\"radiogroup\"\n className={cn(\n \"flex-row rounded-md border border-border bg-muted p-0.5\",\n disabled && \"opacity-50\",\n className\n )}\n >\n {options.map((opt) => {\n const selected = opt.value === value;\n return (\n <Pressable\n key={String(opt.value)}\n testID={\n testID\n ? `${testID}-option-${String(opt.value)}`\n : `segmented-option-${String(opt.value)}`\n }\n disabled={disabled}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected, disabled }}\n onPress={() => onChange(opt.value)}\n className={cn(\n \"min-h-[36px] flex-1 items-center justify-center rounded px-3 py-1\",\n selected && \"bg-background\"\n )}\n // The lift as a style, not a `shadow-sm` class toggled on select: NativeWind treats a\n // shadow class that appears later as an upgrade and, in development, crashes printing it.\n style={selected ? SELECTED_LIFT : UNSELECTED_LIFT}\n >\n <Text\n className={cn(\n \"text-sm\",\n selected ? \"font-semibold text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {opt.label}\n </Text>\n </Pressable>\n );\n })}\n </View>\n );\n}\n","/**\n * InlineAlert + Banner — non-blocking system messaging.\n *\n * NativeInlineAlert: contextual message that lives inline with related\n * content (e.g., between form fields).\n *\n * NativeBanner: top-of-screen system message (e.g., \"You're offline\").\n * Persists until the user dismisses or the condition clears. Use\n * sparingly — for transient confirmation use <NativeToast>; for\n * blocking issues use <NativeDialog>.\n *\n * Both share variants: info / success / warning / destructive. Under the\n * description, `children` takes any content (an error summary's list of\n * links, a status line) and `actions` a row of buttons (\"Retry\", \"Review\"),\n * so neither has to be drawn by hand around the alert.\n *\n * @stability Beta\n */\nimport { Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport type NativeInlineAlertVariant =\n | \"info\"\n | \"success\"\n | \"warning\"\n | \"destructive\";\n\ninterface BaseProps {\n variant?: NativeInlineAlertVariant;\n title?: string;\n description?: string;\n /** Optional icon node rendered to the left of the text. */\n icon?: React.ReactNode;\n /** When provided, renders an \"✕\" dismiss button with this label. */\n onDismiss?: () => void;\n /** Content under the description (a list of the fields to fix, a status line). */\n children?: React.ReactNode;\n /** A row of buttons under the content (NativeButton size=\"sm\"). */\n actions?: React.ReactNode;\n className?: string;\n testID?: string;\n}\n\nconst variantClasses: Record<NativeInlineAlertVariant, string> = {\n info: \"bg-secondary border-border\",\n success: \"bg-primary/10 border-primary/30\",\n warning: \"bg-warning/10 border-warning/30\",\n destructive: \"bg-destructive/10 border-destructive/30\",\n};\n\nconst titleClasses: Record<NativeInlineAlertVariant, string> = {\n info: \"text-foreground\",\n success: \"text-primary-text\",\n warning: \"text-warning\",\n destructive: \"text-destructive\",\n};\n\n/** The alert's content and actions slots, under the description. */\nfunction AlertExtras({ children, actions, testID }: { children?: React.ReactNode; actions?: React.ReactNode; testID?: string | undefined }) {\n return (\n <>\n {children ? (\n <View testID={testID ? `${testID}-content` : undefined} className=\"mt-2\">\n {children}\n </View>\n ) : null}\n {actions ? (\n <View testID={testID ? `${testID}-actions` : undefined} className=\"mt-3 flex-row flex-wrap gap-2\">\n {actions}\n </View>\n ) : null}\n </>\n );\n}\n\nexport interface NativeInlineAlertProps extends BaseProps {}\n\nexport function NativeInlineAlert({\n variant = \"info\",\n title,\n description,\n icon,\n onDismiss,\n children,\n actions,\n className,\n testID,\n}: NativeInlineAlertProps) {\n return (\n <View\n testID={testID ?? `inline-alert-${variant}`}\n accessibilityRole=\"alert\"\n className={cn(\n \"flex-row gap-3 rounded-md border p-3\",\n variantClasses[variant],\n className\n )}\n >\n {icon ? <View className=\"pt-0.5\">{icon}</View> : null}\n <View className=\"flex-1\">\n {title ? (\n <Text className={cn(\"text-sm font-semibold\", titleClasses[variant])}>\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text className=\"mt-0.5 text-sm text-foreground/80\">\n {description}\n </Text>\n ) : null}\n <AlertExtras testID={testID} actions={actions}>\n {children}\n </AlertExtras>\n </View>\n {onDismiss ? (\n <Pressable\n testID={testID ? `${testID}-dismiss` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Dismiss\"\n onPress={onDismiss}\n hitSlop={8}\n className=\"min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-base text-muted-foreground\">✕</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n\nexport interface NativeBannerProps extends BaseProps {}\n\nexport function NativeBanner({\n variant = \"info\",\n title,\n description,\n icon,\n onDismiss,\n children,\n actions,\n className,\n testID,\n}: NativeBannerProps) {\n return (\n <View\n testID={testID ?? `banner-${variant}`}\n accessibilityRole=\"alert\"\n accessibilityLiveRegion=\"polite\"\n className={cn(\n \"flex-row items-start gap-3 border-b px-4 py-3\",\n variantClasses[variant],\n className\n )}\n >\n {icon ? <View className=\"pt-0.5\">{icon}</View> : null}\n <View className=\"flex-1\">\n {title ? (\n <Text className={cn(\"text-sm font-semibold\", titleClasses[variant])}>\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text className=\"mt-0.5 text-sm text-foreground/80\">\n {description}\n </Text>\n ) : null}\n <AlertExtras testID={testID} actions={actions}>\n {children}\n </AlertExtras>\n </View>\n {onDismiss ? (\n <Pressable\n testID={testID ? `${testID}-dismiss` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Dismiss\"\n onPress={onDismiss}\n hitSlop={8}\n className=\"min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-base text-muted-foreground\">✕</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * SearchBar — text input with cancel + clear + optional voice trigger.\n *\n * Use as the search affordance for lists and result screens. iOS-style\n * \"Cancel\" button slides in only when the input is focused and clears\n * focus on press. The clear \"✕\" appears whenever there's a value.\n *\n * Voice support is opt-in: pass `onVoicePress` to render the voice\n * button. The actual STT integration is the consumer's responsibility\n * (e.g., expo-speech-recognition); this primitive only renders the\n * trigger affordance.\n *\n * @stability Beta\n */\nimport { useRef, useState } from \"react\";\nimport { Pressable, Text, TextInput, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSearchBarProps {\n value: string;\n onChange: (value: string) => void;\n /** Submit handler (return key on the keyboard). */\n onSubmit?: (value: string) => void;\n placeholder?: string;\n /**\n * Color used for the placeholder text. Defaults to a token-aware muted\n * value that matches NativeWind's `text-muted-foreground` resolution.\n * Override per-call when an alternate brand demands a different shade.\n */\n placeholderTextColor?: string;\n /** When provided, renders a microphone trigger. */\n onVoicePress?: () => void;\n /** Show the \"Cancel\" button when focused. Default true. */\n showCancel?: boolean;\n /** Cancel button label. Default \"Cancel\". */\n cancelLabel?: string;\n className?: string;\n testID?: string;\n}\n\nexport function NativeSearchBar({\n value,\n onChange,\n onSubmit,\n placeholder = \"Search\",\n placeholderTextColor,\n onVoicePress,\n showCancel = true,\n cancelLabel = \"Cancel\",\n className,\n testID,\n}: NativeSearchBarProps) {\n const [focused, setFocused] = useState(false);\n const inputRef = useRef<React.ComponentRef<typeof TextInput>>(null);\n\n return (\n <View\n testID={testID ?? \"native-search-bar\"}\n className={cn(\"flex-row items-center gap-2\", className)}\n >\n <View className=\"flex-1 flex-row items-center rounded-md border border-input bg-background px-3\">\n <Text accessibilityElementsHidden className=\"text-sm text-muted-foreground\">\n {\"\\u{1F50D}\"}\n </Text>\n <TextInput\n ref={inputRef}\n testID={testID ? `${testID}-input` : \"search-input\"}\n value={value}\n onChangeText={onChange}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onSubmitEditing={() => onSubmit?.(value)}\n placeholder={placeholder}\n placeholderTextColor={placeholderTextColor}\n accessibilityLabel={placeholder}\n returnKeyType=\"search\"\n autoCorrect={false}\n autoCapitalize=\"none\"\n clearButtonMode=\"never\"\n className=\"ml-2 min-h-[44px] flex-1 text-base text-foreground\"\n />\n {value.length > 0 ? (\n <Pressable\n testID={testID ? `${testID}-clear` : \"search-clear\"}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Clear search\"\n hitSlop={8}\n onPress={() => onChange(\"\")}\n className=\"ml-1 min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-sm text-muted-foreground\">✕</Text>\n </Pressable>\n ) : null}\n {onVoicePress ? (\n <Pressable\n testID={testID ? `${testID}-voice` : \"search-voice\"}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Voice search\"\n hitSlop={8}\n onPress={onVoicePress}\n className=\"ml-2 min-h-[24px] min-w-[24px] items-center justify-center\"\n >\n <Text className=\"text-sm text-muted-foreground\">{\"\\u{1F3A4}\"}</Text>\n </Pressable>\n ) : null}\n </View>\n {showCancel && focused ? (\n <Pressable\n testID={testID ? `${testID}-cancel` : \"search-cancel\"}\n accessibilityRole=\"button\"\n accessibilityLabel={cancelLabel}\n onPress={() => {\n onChange(\"\");\n // Dismiss the keyboard along with the cancel — matches iOS native\n // behavior. setFocused(false) will be triggered by the resulting\n // onBlur as well, but call it eagerly to hide the cancel button\n // immediately for snappier UX.\n inputRef.current?.blur();\n setFocused(false);\n }}\n className=\"min-h-[44px] items-center justify-center px-2\"\n >\n <Text className=\"text-base text-primary-text\">{cancelLabel}</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * Separator — visual divider line (horizontal or vertical).\n *\n * @stability Stable\n */\nimport { View, type ViewProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSeparatorProps extends ViewProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction NativeSeparator({\n className,\n orientation = \"horizontal\",\n ...props\n}: NativeSeparatorProps) {\n return (\n <View\n className={cn(\n \"bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className\n )}\n accessibilityRole=\"none\"\n {...props}\n />\n );\n}\n\nexport { NativeSeparator };\n","/**\n * Alert — inline status message (info / success / warning / destructive).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst alertVariants = cva(\n \"rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background\",\n destructive: \"border-destructive/50 bg-destructive/10\",\n success: \"border-success/50 bg-success/10\",\n warning: \"border-warning/50 bg-warning/10\",\n info: \"border-info/50 bg-info/10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst alertTitleTextVariants = cva(\"text-base font-semibold leading-6\", {\n variants: {\n variant: {\n default: \"text-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nconst alertDescriptionTextVariants = cva(\"text-sm leading-5\", {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeAlertProps\n extends VariantProps<typeof alertVariants> {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeAlert({\n className,\n variant,\n children,\n ...props\n}: NativeAlertProps) {\n return (\n <View\n className={cn(alertVariants({ variant }), className)}\n accessibilityRole=\"alert\"\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport interface NativeAlertTitleProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertTitleTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertTitle({\n className,\n variant,\n children,\n}: NativeAlertTitleProps) {\n return (\n <Text\n className={cn(alertTitleTextVariants({ variant }), className)}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeAlertDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertDescriptionTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertDescription({\n className,\n variant,\n children,\n}: NativeAlertDescriptionProps) {\n return (\n <Text\n className={cn(\n alertDescriptionTextVariants({ variant }),\n \"mt-1\",\n className\n )}\n >\n {children}\n </Text>\n );\n}\n\nexport {\n NativeAlert,\n NativeAlertTitle,\n NativeAlertDescription,\n alertVariants,\n};\n","/**\n * Avatar — user/entity image with fallback initials.\n *\n * Draws with expo-image when the app passes it (`modules.image` on\n * `GenesisModulesProvider`): cached in memory and on disk, a cross-fade that\n * Reduce Motion turns off, an optional blurhash/thumbhash `placeholder`, and\n * a `recyclingKey` (the image URL by default) so a recycled list row never\n * shows the previous person's picture. Without it, React Native's `Image`.\n * The initials show until the picture loads, and again if it fails.\n *\n * @stability Stable\n */\nimport { useState } from \"react\";\nimport { Image, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useReducedMotion } from \"../hooks/use-reduced-motion\";\nimport { useGenesisModules } from \"../native-modules\";\n\nconst FILL = { position: \"absolute\" as const, top: 0, right: 0, bottom: 0, left: 0 };\n\nexport interface NativeAvatarProps {\n className?: string;\n /** Image URL */\n src?: string | null;\n /** Alt text for accessibility */\n alt?: string;\n /** Fallback text (typically initials, e.g. \"MT\") */\n fallback?: string;\n /** Size in pixels. Defaults to 40. Use className for NativeWind sizing. */\n size?: number;\n /**\n * expo-image only: a blurhash or thumbhash shown while the picture loads,\n * as expo-image's `placeholder` takes it (`{ blurhash }`, `{ thumbhash }`).\n */\n placeholder?: { blurhash: string } | { thumbhash: string };\n /**\n * expo-image only: resets the view when it changes, for rows a recycling\n * list (FlashList) reuses. Default the image URL.\n */\n recyclingKey?: string;\n testID?: string;\n}\n\nfunction NativeAvatar({\n className,\n src,\n alt,\n fallback,\n size = 40,\n placeholder,\n recyclingKey,\n testID,\n}: NativeAvatarProps) {\n const { image: ExpoImage } = useGenesisModules();\n const reducedMotion = useReducedMotion();\n // Which URL loaded or failed, not a flag: a row FlashList recycles for\n // someone else gets the right state on its first frame, with no reset.\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const [loadedSrc, setLoadedSrc] = useState<string | null>(null);\n const showImage = !!src && failedSrc !== src;\n const loaded = !!src && loadedSrc === src;\n const imageProps = {\n accessible: false,\n onError: () => setFailedSrc(src ?? null),\n onLoad: () => setLoadedSrc(src ?? null),\n };\n\n return (\n <View\n className={cn(\n \"items-center justify-center overflow-hidden rounded-full bg-muted\",\n className\n )}\n style={[{ width: size, height: size }]}\n accessible\n accessibilityRole=\"image\"\n accessibilityLabel={alt || fallback || \"Avatar\"}\n testID={testID}\n >\n {!showImage || !loaded ? (\n <Text\n className=\"text-sm font-medium text-muted-foreground\"\n accessibilityElementsHidden\n importantForAccessibility=\"no\"\n style={{\n fontSize: Math.round(size * 0.4),\n lineHeight: Math.round(size * 0.5),\n }}\n >\n {fallback || \"?\"}\n </Text>\n ) : null}\n {showImage ? (\n ExpoImage ? (\n <ExpoImage\n {...imageProps}\n testID={testID ? `${testID}-image` : undefined}\n source={{ uri: src }}\n style={FILL}\n contentFit=\"cover\"\n cachePolicy=\"memory-disk\"\n placeholder={placeholder}\n placeholderContentFit=\"cover\"\n transition={reducedMotion ? null : 150}\n recyclingKey={recyclingKey ?? src}\n />\n ) : (\n <Image\n {...imageProps}\n testID={testID ? `${testID}-image` : undefined}\n source={{ uri: src }}\n style={FILL}\n resizeMode=\"cover\"\n />\n )\n ) : null}\n </View>\n );\n}\n\nexport { NativeAvatar };\n","/**\n * Checkbox — binary on/off control with optional label.\n *\n * @stability Stable\n */\nimport { useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCheckboxProps {\n className?: string;\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeCheckbox({\n className,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled,\n ...props\n}: NativeCheckboxProps) {\n const [uncontrolledChecked, setUncontrolledChecked] =\n useState(defaultChecked);\n const isChecked = controlledChecked ?? uncontrolledChecked;\n\n function handlePress() {\n const next = !isChecked;\n if (controlledChecked === undefined) {\n setUncontrolledChecked(next);\n }\n onCheckedChange?.(next);\n }\n\n return (\n <Pressable\n className={cn(\n \"h-5 w-5 items-center justify-center rounded border border-border\",\n isChecked && \"border-primary bg-primary\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={handlePress}\n disabled={disabled}\n accessibilityRole=\"checkbox\"\n accessibilityState={{ checked: isChecked }}\n {...props}\n >\n {isChecked ? (\n <View className=\"h-2.5 w-2.5 rounded-sm bg-primary-foreground\" />\n ) : null}\n </Pressable>\n );\n}\n\nexport { NativeCheckbox };\n","/**\n * Label — form-control label, paired via htmlFor / nativeID.\n *\n * @stability Stable\n */\nimport { Text, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeLabelProps extends TextProps {\n children: React.ReactNode;\n disabled?: boolean;\n}\n\nfunction NativeLabel({\n className,\n children,\n disabled,\n ...props\n}: NativeLabelProps) {\n return (\n <Text\n className={cn(\n \"text-sm font-medium text-foreground\",\n disabled && \"opacity-70\",\n className\n )}\n accessibilityState={disabled ? { disabled } : undefined}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport { NativeLabel };\n","/**\n * Select — single-selection dropdown trigger + content.\n *\n * @stability Stable\n */\nimport { createContext, useContext, useState } from \"react\";\nimport { Modal, Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\ninterface SelectContextValue {\n value: string;\n onValueChange: (value: string) => void;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n\nfunction useSelect() {\n const context = useContext(SelectContext);\n if (!context)\n throw new Error(\"Select components must be used within <NativeSelect>\");\n return context;\n}\n\nexport interface NativeSelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n children: React.ReactNode;\n}\n\nfunction NativeSelect({\n value: controlledValue,\n defaultValue = \"\",\n onValueChange: controlledOnValueChange,\n children,\n}: NativeSelectProps) {\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n const [open, setOpen] = useState(false);\n const value = controlledValue ?? uncontrolledValue;\n const onValueChange = controlledOnValueChange ?? setUncontrolledValue;\n\n return (\n <SelectContext.Provider value={{ value, onValueChange, open, setOpen }}>\n {children}\n </SelectContext.Provider>\n );\n}\n\nexport interface NativeSelectTriggerProps {\n className?: string;\n children?: React.ReactNode;\n placeholder?: string;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeSelectTrigger({\n className,\n children,\n placeholder,\n disabled,\n ...props\n}: NativeSelectTriggerProps) {\n const { value, open, setOpen } = useSelect();\n\n return (\n <Pressable\n className={cn(\n \"h-10 flex-row items-center justify-between rounded-md border border-input bg-background px-3\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={() => setOpen(true)}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ expanded: open, disabled }}\n {...props}\n >\n {children ?? (\n <Text\n className={cn(\n \"text-sm\",\n value ? \"text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {value || placeholder || \"Select...\"}\n </Text>\n )}\n <Text className=\"text-sm text-muted-foreground\">{\"\\u25BE\"}</Text>\n </Pressable>\n );\n}\n\nexport interface NativeSelectContentProps {\n className?: string;\n children: React.ReactNode;\n}\n\nfunction NativeSelectContent({\n className,\n children,\n}: NativeSelectContentProps) {\n const { open, setOpen } = useSelect();\n\n if (!open) return null;\n\n return (\n <Modal transparent animationType=\"fade\" onRequestClose={() => setOpen(false)}>\n <Pressable className=\"flex-1 items-center justify-center bg-black/50\" onPress={() => setOpen(false)}>\n {/* Intentional no-op: prevents overlay press from closing the modal when touching content area */}\n <Pressable onPress={() => {}}>\n <View\n className={cn(\n \"min-w-[10rem] rounded-md border border-border bg-popover p-1 shadow-md\",\n className\n )}\n >\n {children}\n </View>\n </Pressable>\n </Pressable>\n </Modal>\n );\n}\n\nexport interface NativeSelectItemProps {\n className?: string;\n value: string;\n children: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeSelectItem({\n className,\n value,\n children,\n ...props\n}: NativeSelectItemProps) {\n const { value: selectedValue, onValueChange, setOpen } = useSelect();\n const isSelected = selectedValue === value;\n\n return (\n <Pressable\n className={cn(\n \"flex-row items-center rounded-sm px-2 py-1.5\",\n isSelected && \"bg-accent\",\n className\n )}\n onPress={() => {\n onValueChange(value);\n setOpen(false);\n }}\n {...props}\n >\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n \"text-sm\",\n isSelected ? \"text-accent-foreground\" : \"text-popover-foreground\"\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Pressable>\n );\n}\n\nexport {\n NativeSelect,\n NativeSelectTrigger,\n NativeSelectContent,\n NativeSelectItem,\n};\n","/**\n * Switch — boolean toggle (iOS-style).\n *\n * @stability Stable\n */\nimport { Switch, type SwitchProps, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSwitchProps extends SwitchProps {\n className?: string;\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nfunction NativeSwitch({\n className,\n checked,\n onCheckedChange,\n disabled,\n ...props\n}: NativeSwitchProps) {\n return (\n <View className={cn(disabled && \"opacity-50\", className)}>\n <Switch\n value={checked}\n onValueChange={onCheckedChange}\n disabled={disabled}\n accessibilityState={{ checked: checked, disabled }}\n {...props}\n />\n </View>\n );\n}\n\nexport { NativeSwitch };\n","/**\n * Textarea — multi-line text field.\n *\n * @stability Stable\n */\nimport type { ComponentRef, Ref } from \"react\";\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeTextareaProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n /** The underlying TextInput (React 19 passes `ref` as a prop). */\n ref?: Ref<ComponentRef<typeof TextInput>> | undefined;\n /** How many lines tall the field is, on both platforms (passed as `numberOfLines`). Default 4. */\n rows?: number;\n}\n\nfunction NativeTextarea({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n rows = 4,\n placeholderTextColor,\n ...props\n}: NativeTextareaProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">{label}</Text>\n ) : null}\n <TextInput\n className={cn(\n \"rounded-md border border-input bg-background px-3 py-2 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n multiline\n numberOfLines={rows}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeTextarea };\n","/**\n * NativeImage — a remote picture (thumbnail, cover, photo) with caching.\n *\n * Draws with expo-image when the app passes it (`modules.image` on\n * `GenesisModulesProvider`): cached in memory and on disk, an optional\n * blurhash/thumbhash `placeholder`, a cross-fade that Reduce Motion turns\n * off, and a `recyclingKey` (the URL by default) so a recycled FlashList row\n * never flashes the previous picture. A `cacheKey` caches the picture under a\n * stable key instead of its URL, for signed URLs that rotate (a new expiry or\n * signature would otherwise miss the disk cache and download it again).\n * Without it, React Native's `Image`.\n *\n * Give it a size (className or `width`/`height`). Decorative unless `alt` is\n * given.\n *\n * @stability Beta\n */\nimport { Image, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useReducedMotion } from \"../hooks/use-reduced-motion\";\nimport { useGenesisModules } from \"../native-modules\";\n\nexport interface NativeImageProps {\n src: string;\n /** Read by screen readers. Without it the picture is decorative. */\n alt?: string;\n className?: string;\n width?: number;\n height?: number;\n /** Default `\"cover\"`. */\n contentFit?: \"cover\" | \"contain\";\n /** expo-image only: `{ blurhash }` or `{ thumbhash }` shown while loading. */\n placeholder?: { blurhash: string } | { thumbhash: string };\n /**\n * expo-image only: caches the picture under this key instead of its URL, so a signed URL\n * that rotates (a new expiry or signature for the same file) still hits the memory and disk\n * cache. Use a key that names the file, such as its storage path or id.\n */\n cacheKey?: string;\n /** expo-image only: resets the view when it changes (recycled rows). Default `cacheKey`, then `src`. */\n recyclingKey?: string;\n /** expo-image only: load order among images. */\n priority?: \"low\" | \"normal\" | \"high\";\n /** The picture couldn't be loaded (draw a fallback). */\n onError?: () => void;\n testID?: string;\n}\n\nconst FILL = { position: \"absolute\" as const, top: 0, right: 0, bottom: 0, left: 0 };\n\nexport function NativeImage({\n src,\n alt,\n className,\n width,\n height,\n contentFit = \"cover\",\n placeholder,\n cacheKey,\n recyclingKey,\n priority,\n onError,\n testID,\n}: NativeImageProps) {\n const { image: ExpoImage } = useGenesisModules();\n const reducedMotion = useReducedMotion();\n const a11y = alt\n ? { accessible: true, accessibilityRole: \"image\" as const, accessibilityLabel: alt }\n : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: \"no-hide-descendants\" as const };\n return (\n <View\n {...a11y}\n testID={testID}\n className={cn(\"overflow-hidden bg-muted\", className)}\n style={width !== undefined || height !== undefined ? { width, height } : undefined}\n >\n {ExpoImage ? (\n <ExpoImage\n testID={testID ? `${testID}-image` : undefined}\n accessible={false}\n source={cacheKey ? { uri: src, cacheKey } : { uri: src }}\n style={FILL}\n contentFit={contentFit}\n cachePolicy=\"memory-disk\"\n placeholder={placeholder}\n placeholderContentFit={contentFit}\n transition={reducedMotion ? null : 150}\n // A rotated URL for the same picture keeps the view, so it doesn't flash.\n recyclingKey={recyclingKey ?? cacheKey ?? src}\n priority={priority}\n onError={onError}\n />\n ) : (\n <Image\n testID={testID ? `${testID}-image` : undefined}\n accessible={false}\n source={{ uri: src }}\n style={FILL}\n resizeMode={contentFit}\n onError={onError}\n />\n )}\n </View>\n );\n}\n","/**\n * NativeGalleryGrid — photos in rows: justified (each row scaled to fill the\n * width, as in a photo library) or a fixed-column grid (square tiles by\n * default, or each item's own shape with `aspectRatio=\"item\"`).\n *\n * Rows come from the pure `justifyRows`, so the same items pack the same way\n * as the web `GalleryGrid`, with the same defaults (`GALLERY_DEFAULTS`) and\n * the same props, `onItemPress` in place of the web's `onItemClick` (as\n * `NativeResourcePage` pairs with `ResourcePage`). The first paint lays out\n * at the window width, and `onLayout` corrects it to the container's. The rows are a\n * virtualized `FlatList` (the grid scrolls itself; `header` and `footer` go\n * above and below), so a long gallery mounts only what's near the screen and\n * `loadMore` fires when scrolling nears the end, for \"load more\". Don't put\n * it inside a ScrollView: it fills its parent (`flex-1`), and nested it would\n * draw every row and fire `loadMore` at once. Put what goes above or below\n * it in `header` and `footer`. Tiles are\n * `NativeImage` over a `bg-muted` placeholder sized from the item's ratio (so\n * rows don't reflow while the picture loads), tappable when `onItemPress` is\n * given (or when selecting); `renderItem` replaces the tile's content and\n * `renderBadges` overlays its top-left.\n *\n * Selection (`selected` + `onSelectionChange`) toggles an id per press, in\n * place of `onItemPress` (as on web), and rings the chosen tiles. `groupBy`\n * lays each group out separately under a header.\n *\n * @stability Beta\n */\nimport { useMemo, useState, type ReactNode } from \"react\";\nimport { Dimensions, FlatList, Pressable, Text, View, type FlatListProps, type LayoutChangeEvent } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { galleryItemRatio, justifyRows } from \"./gallery-layout\";\nimport { GALLERY_DEFAULTS, type GalleryItem, type GalleryTileAspect } from \"./gallery-types\";\nimport { NativeImage } from \"./image\";\n\nexport type NativeGalleryLayout = \"justified\" | \"grid\";\n\nexport interface NativeGalleryGridProps {\n items: GalleryItem[];\n /** Default \"justified\". */\n layout?: NativeGalleryLayout;\n /** Grid layout only: tiles per row. Default 3. */\n columns?: number;\n /** Grid layout only: each tile's shape, a ratio or `\"item\"` for the item's own. Default 1 (square), as on web. */\n aspectRatio?: GalleryTileAspect;\n /** Justified layout only: target row height in points. Default 180. */\n rowHeight?: number;\n /** Points between tiles. Default 4. */\n gap?: number;\n /** Called on a press. Not called when `onSelectionChange` is set: a press then only toggles the selection. */\n onItemPress?: (item: GalleryItem, index: number) => void;\n /** Replaces the tile's content (the image by default). */\n renderItem?: (item: GalleryItem, index: number) => ReactNode;\n /** Overlaid top-left of the default tile. */\n renderBadges?: (item: GalleryItem, index: number) => ReactNode;\n /** Ids of the selected items. With `onSelectionChange`, a press toggles the tile. */\n selected?: string[];\n onSelectionChange?: (ids: string[], detail: { item: GalleryItem; index: number }) => void;\n /** Called when scrolling nears the last rows (FlatList's `onEndReached`): the hook for \"load more\" (NativeResourceView's name). */\n loadMore?: () => void;\n /** @deprecated Use `loadMore`. */\n onNearEnd?: () => void;\n /** Above the first row, scrolling with it. */\n header?: ReactNode;\n /** Below the last row (a \"Loading more\" spinner). */\n footer?: ReactNode;\n /** Groups items (in order of first appearance), each under a header reading the key (a view's `groupBy`, for an array). */\n groupBy?: (item: GalleryItem) => string;\n /** @deprecated Use `groupBy`. */\n getGroup?: (item: GalleryItem) => string;\n /** iOS: how the list insets under a large-title or translucent header. Default `\"automatic\"`, so the first row starts below the header. */\n contentInsetAdjustmentBehavior?: FlatListProps<unknown>[\"contentInsetAdjustmentBehavior\"];\n className?: string;\n testID?: string;\n}\n\ninterface Group {\n key: string | null;\n entries: { item: GalleryItem; index: number }[];\n}\n\nfunction groupItems(items: GalleryItem[], groupBy?: (item: GalleryItem) => string): Group[] {\n if (!groupBy) return [{ key: null, entries: items.map((item, index) => ({ item, index })) }];\n const groups: Group[] = [];\n const byKey = new Map<string, Group>();\n items.forEach((item, index) => {\n const key = groupBy(item);\n let group = byKey.get(key);\n if (!group) {\n group = { key, entries: [] };\n byKey.set(key, group);\n groups.push(group);\n }\n group.entries.push({ item, index });\n });\n return groups;\n}\n\n/** One line of the list: a group's header, or a row of tiles with their sizes. */\ntype Line =\n | { kind: \"header\"; key: string; group: string }\n | { kind: \"row\"; key: string; group: string | null; first: boolean; tiles: { item: GalleryItem; index: number; width: number; height: number }[] };\n\nexport function NativeGalleryGrid({\n items,\n layout = \"justified\",\n columns = GALLERY_DEFAULTS.columns,\n aspectRatio = 1,\n rowHeight = GALLERY_DEFAULTS.rowHeight,\n gap = GALLERY_DEFAULTS.gap,\n onItemPress,\n renderItem,\n renderBadges,\n selected,\n onSelectionChange,\n loadMore: loadMoreProp,\n onNearEnd,\n header,\n footer,\n groupBy: groupByProp,\n getGroup,\n contentInsetAdjustmentBehavior = \"automatic\",\n className,\n testID = \"native-gallery-grid\",\n}: NativeGalleryGridProps) {\n const loadMore = loadMoreProp ?? onNearEnd;\n const groupBy = groupByProp ?? getGroup;\n // Start from the window width so the list mounts on the first paint (iOS applies the\n // large-title content inset only to a scroll view present at mount); onLayout corrects it.\n const [width, setWidth] = useState(() => Dimensions.get(\"window\").width);\n const onLayout = (e: LayoutChangeEvent) => {\n const next = e.nativeEvent.layout.width;\n if (next !== width) setWidth(next);\n };\n\n const selecting = Boolean(onSelectionChange);\n const selectedIds = selected ?? [];\n const isSelected = (item: GalleryItem) => selectedIds.includes(item.id);\n\n const lines = useMemo<Line[]>(() => {\n if (width <= 0) return [];\n const out: Line[] = [];\n groupItems(items, groupBy).forEach((group) => {\n if (group.key !== null) out.push({ kind: \"header\", key: `h:${group.key}`, group: group.key });\n const rows: Line[] = [];\n if (layout === \"grid\") {\n const cols = Math.max(1, Math.floor(columns));\n const side = (width - gap * (cols - 1)) / cols;\n for (let i = 0; i < group.entries.length; i += cols) {\n const slice = group.entries.slice(i, i + cols);\n // A row is as tall as its tallest tile (\"item\" shapes differ); squares by default.\n const heights = slice.map(({ item }) => side / (aspectRatio === \"item\" ? galleryItemRatio(item) : aspectRatio));\n rows.push({\n kind: \"row\",\n key: `r:${group.key ?? \"\"}:${i}`,\n group: group.key,\n first: i === 0,\n tiles: slice.map(({ item, index }, n) => ({ item, index, width: side, height: heights[n]! })),\n });\n }\n } else {\n justifyRows(group.entries.map((e) => e.item), width, rowHeight, gap).forEach((row, r) => {\n rows.push({\n kind: \"row\",\n key: `r:${group.key ?? \"\"}:${r}`,\n group: group.key,\n first: r === 0,\n tiles: row.tiles.map((t) => ({ item: t.item, index: group.entries[t.index]!.index, width: t.width, height: t.height })),\n });\n });\n }\n out.push(...rows);\n });\n return out;\n }, [width, items, groupBy, layout, columns, aspectRatio, rowHeight, gap]);\n\n const press = (item: GalleryItem, index: number) => {\n if (onSelectionChange) {\n const next = isSelected(item) ? selectedIds.filter((id) => id !== item.id) : [...selectedIds, item.id];\n onSelectionChange(next, { item, index });\n return;\n }\n onItemPress?.(item, index);\n };\n\n const tile = (item: GalleryItem, index: number, size: { width: number; height: number }) => {\n const chosen = isSelected(item);\n const content = renderItem ? (\n renderItem(item, index)\n ) : (\n <>\n <View className=\"absolute inset-0 bg-muted\" />\n {item.src ? (\n <NativeImage src={item.src} cacheKey={item.cacheKey} alt={item.alt} className=\"h-full w-full\" />\n ) : (\n // No image: a neutral tile with its words, so the count matches what's drawn. The tile's\n // own label (alt, then caption) names a pressable tile, so the words are hidden from\n // readers then; a plain tile isn't pressable, so the placeholder is the named image.\n <View\n testID={`${testID}-placeholder-${item.id}`}\n {...(onItemPress || selecting\n ? { importantForAccessibility: \"no-hide-descendants\" as const, accessibilityElementsHidden: true }\n : {\n accessible: true,\n accessibilityRole: \"image\" as const,\n accessibilityLabel: item.alt ?? item.caption ?? `Photo ${index + 1} of ${items.length}`,\n })}\n className=\"h-full w-full items-center justify-center gap-0.5 p-2\"\n >\n {item.alt ? (\n <Text numberOfLines={2} className=\"text-center text-sm font-medium text-foreground\">\n {item.alt}\n </Text>\n ) : null}\n {item.caption ? (\n <Text numberOfLines={2} className=\"text-center text-xs text-muted-foreground\">\n {item.caption}\n </Text>\n ) : null}\n </View>\n )}\n {renderBadges ? (\n <View testID={`${testID}-badges-${item.id}`} pointerEvents=\"box-none\" className=\"absolute left-1 top-1 flex-row items-center gap-1\">\n {renderBadges(item, index)}\n </View>\n ) : null}\n </>\n );\n const tileID = `${testID}-item-${item.id}`;\n const tileClass = cn(\"overflow-hidden rounded-md bg-muted\", chosen && \"border-2 border-ring\");\n if (onItemPress || selecting) {\n return (\n <Pressable\n key={item.id}\n testID={tileID}\n accessibilityRole=\"button\"\n accessibilityLabel={item.alt ?? item.caption ?? `Photo ${index + 1} of ${items.length}`}\n accessibilityState={selecting ? { selected: chosen } : undefined}\n onPress={() => press(item, index)}\n className={tileClass}\n style={size}\n >\n {content}\n </Pressable>\n );\n }\n return (\n <View key={item.id} testID={tileID} className={tileClass} style={size}>\n {content}\n </View>\n );\n };\n\n const renderLine = ({ item: line, index: n }: { item: Line; index: number }) => {\n if (line.kind === \"header\") {\n return (\n <Text accessibilityRole=\"header\" testID={`${testID}-group-${line.group}`} className=\"mb-2 text-sm font-medium text-muted-foreground\" style={{ marginTop: n === 0 ? 0 : gap * 3 }}>\n {line.group}\n </Text>\n );\n }\n return (\n <View\n className=\"flex-row\"\n testID={line.group === null ? undefined : `${testID}-row-${line.group}`}\n style={{ gap, marginTop: line.first ? 0 : gap }}\n >\n {line.tiles.map((t) => tile(t.item, t.index, { width: t.width, height: t.height }))}\n </View>\n );\n };\n\n return (\n <View testID={testID} onLayout={onLayout} className={cn(\"w-full flex-1\", className)}>\n {width > 0 ? (\n <FlatList\n testID={`${testID}-list`}\n contentInsetAdjustmentBehavior={contentInsetAdjustmentBehavior}\n data={lines}\n keyExtractor={(line) => line.key}\n renderItem={renderLine}\n ListHeaderComponent={header ? <>{header}</> : undefined}\n ListFooterComponent={footer ? <>{footer}</> : undefined}\n onEndReached={loadMore ? () => loadMore() : undefined}\n onEndReachedThreshold={0.5}\n initialNumToRender={8}\n windowSize={7}\n />\n ) : null}\n </View>\n );\n}\n"]}