@marktiderman/genesis-ui-native 3.6.0 → 3.8.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 (90) hide show
  1. package/README.md +48 -1
  2. package/dist/{chunk-NDXNSSM6.js → chunk-DHONOH6K.js} +24 -211
  3. package/dist/chunk-DHONOH6K.js.map +1 -0
  4. package/dist/{chunk-6PGLX6ET.js → chunk-FGIIBON3.js} +334 -24
  5. package/dist/chunk-FGIIBON3.js.map +1 -0
  6. package/dist/{chunk-ZRQAFFTN.js → chunk-FOJJB6AB.js} +2 -2
  7. package/dist/{chunk-ZRQAFFTN.js.map → chunk-FOJJB6AB.js.map} +1 -1
  8. package/dist/{chunk-SEJ6RBP7.js → chunk-JZ7RAGDQ.js} +117 -60
  9. package/dist/chunk-JZ7RAGDQ.js.map +1 -0
  10. package/dist/chunk-PWS2HLDE.js +137 -0
  11. package/dist/chunk-PWS2HLDE.js.map +1 -0
  12. package/dist/{chunk-AGTBABAH.js → chunk-PWYMRUAK.js} +43 -30
  13. package/dist/chunk-PWYMRUAK.js.map +1 -0
  14. package/dist/{chunk-FUMSL7VZ.js → chunk-T7FEVT62.js} +53 -12
  15. package/dist/chunk-T7FEVT62.js.map +1 -0
  16. package/dist/{chunk-2Z72MYHB.js → chunk-UZCJDMGE.js} +353 -19
  17. package/dist/chunk-UZCJDMGE.js.map +1 -0
  18. package/dist/components/index.d.ts +275 -24
  19. package/dist/components/index.js +5 -5
  20. package/dist/data/index.d.ts +2 -1
  21. package/dist/data/index.js +7 -12
  22. package/dist/data/index.js.map +1 -1
  23. package/dist/hooks/index.d.ts +36 -3
  24. package/dist/hooks/index.js +2 -2
  25. package/dist/icons/lucide.d.ts +1 -1
  26. package/dist/icons/lucide.js +13 -3
  27. package/dist/icons/lucide.js.map +1 -1
  28. package/dist/{inbox-page-B7_Oi2fS.d.ts → inbox-page-BGqR_cBs.d.ts} +4 -1
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.js +8 -8
  31. package/dist/layouts/index.d.ts +12 -3
  32. package/dist/layouts/index.js +5 -5
  33. package/dist/{native-modules-Cl3zw3kh.d.ts → native-modules-CeAaO2Dh.d.ts} +55 -3
  34. package/package.json +73 -2
  35. package/src/__tests__/doctor-rules.test.ts +27 -0
  36. package/src/__tests__/native-modules-lists.test.tsx +1 -0
  37. package/src/components/__tests__/bulk-bar.test.tsx +36 -0
  38. package/src/components/__tests__/button-haptic.test.tsx +74 -0
  39. package/src/components/__tests__/composer-bar.test.tsx +140 -1
  40. package/src/components/__tests__/gallery-grid.test.tsx +2 -2
  41. package/src/components/__tests__/library-round-5.test.tsx +121 -0
  42. package/src/components/__tests__/share-sheet.test.tsx +47 -0
  43. package/src/components/__tests__/swipe-row-context-menu.test.tsx +215 -0
  44. package/src/components/__tests__/tab-bar.test.tsx +43 -0
  45. package/src/components/__tests__/thread-list.test.tsx +200 -0
  46. package/src/components/__tests__/tier-badge.test.tsx +57 -0
  47. package/src/components/__tests__/whats-new-sheet.test.tsx +29 -0
  48. package/src/components/bulk-bar.tsx +91 -0
  49. package/src/components/button.tsx +81 -25
  50. package/src/components/choice-card.tsx +104 -0
  51. package/src/components/composer-bar.tsx +104 -25
  52. package/src/components/context-menu.tsx +101 -0
  53. package/src/components/gallery-grid.tsx +10 -4
  54. package/src/components/index.ts +19 -2
  55. package/src/components/inline-alert.tsx +36 -1
  56. package/src/components/input.tsx +3 -0
  57. package/src/components/progress.tsx +24 -2
  58. package/src/components/rating.tsx +35 -16
  59. package/src/components/share-sheet.tsx +127 -0
  60. package/src/components/sheet.tsx +9 -1
  61. package/src/components/swipe-row.tsx +74 -0
  62. package/src/components/tab-bar.tsx +133 -0
  63. package/src/components/tabs.tsx +2 -0
  64. package/src/components/text.tsx +3 -0
  65. package/src/components/textarea.tsx +3 -0
  66. package/src/components/thread-list.tsx +78 -23
  67. package/src/components/tier-badge.tsx +74 -0
  68. package/src/components/whats-new-sheet.tsx +89 -0
  69. package/src/data/resource-view/NativeRecordView.tsx +3 -8
  70. package/src/data/resource-view/use-native-resource-view.ts +2 -2
  71. package/src/hooks/__tests__/use-haptics.test.tsx +146 -0
  72. package/src/hooks/index.ts +3 -1
  73. package/src/hooks/use-haptics.ts +64 -0
  74. package/src/hooks/use-press-feedback.ts +87 -0
  75. package/src/hooks/use-theme-roles.ts +3 -0
  76. package/src/icon-names.ts +12 -2
  77. package/src/icons/lucide.ts +27 -7
  78. package/src/layouts/__tests__/inbox-page.test.tsx +26 -7
  79. package/src/layouts/__tests__/thread-page.test.tsx +89 -2
  80. package/src/layouts/inbox-page.tsx +28 -12
  81. package/src/layouts/thread-page.tsx +69 -8
  82. package/src/native-modules.tsx +20 -0
  83. package/dist/chunk-2Z72MYHB.js.map +0 -1
  84. package/dist/chunk-4OQOJ2OC.js +0 -80
  85. package/dist/chunk-4OQOJ2OC.js.map +0 -1
  86. package/dist/chunk-6PGLX6ET.js.map +0 -1
  87. package/dist/chunk-AGTBABAH.js.map +0 -1
  88. package/dist/chunk-FUMSL7VZ.js.map +0 -1
  89. package/dist/chunk-NDXNSSM6.js.map +0 -1
  90. package/dist/chunk-SEJ6RBP7.js.map +0 -1
@@ -0,0 +1 @@
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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xC,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-FGIIBON3.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"]}
@@ -21,5 +21,5 @@ function useGenesisExtension(key) {
21
21
  }
22
22
 
23
23
  export { BrandExtensionsProvider, useGenesisExtension };
24
- //# sourceMappingURL=chunk-ZRQAFFTN.js.map
25
- //# sourceMappingURL=chunk-ZRQAFFTN.js.map
24
+ //# sourceMappingURL=chunk-FOJJB6AB.js.map
25
+ //# sourceMappingURL=chunk-FOJJB6AB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/use-genesis-extension.ts"],"names":[],"mappings":";;;;AAkDA,IAAM,sBAAA,GAAyB,aAAA;AAAA,EAC7B;AACF,CAAA;AAOO,SAAS,uBAAA,CAAwB;AAAA,EACtC,KAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAC/B,EAAA,OAAO,aAAA;AAAA,IACL,sBAAA,CAAuB,QAAA;AAAA,IACvB,EAAE,KAAA,EAAM;AAAA,IACR;AAAA,GACF;AACF;AAOO,SAAS,oBACd,GAAA,EACgC;AAChC,EAAA,MAAM,GAAA,GAAM,WAAW,sBAAsB,CAAA;AAC7C,EAAA,OAAO,MAAM,GAAG,CAAA;AAClB","file":"chunk-ZRQAFFTN.js","sourcesContent":["/**\n * useGenesisExtension — read a brand-package `extensions[<key>]` token scale.\n *\n * Brand packages declare domain-specific token categories under the\n * `extensions` slot of the canonical schema (PRD-07 D8 design decision).\n * Genesis primitives don't read these — only consumer composites do — so\n * this hook is the canonical accessor.\n *\n * Resolution order:\n * 1. `BrandExtensionsContext` value (set via <BrandExtensionsProvider>)\n * 2. `undefined` — the extension key isn't declared\n *\n * Consumers wire the provider once at app root; calls anywhere downstream\n * read by key.\n *\n * <BrandExtensionsProvider value={brand.extensions}>\n * <App />\n * </BrandExtensionsProvider>\n *\n * const moodTokens = useGenesisExtension(\"mood\");\n * // moodTokens?.[500] etc. — shape is consumer-defined\n *\n * Type contract: the canonical `BrandExtensions` interface lives in\n * `@marktiderman/genesis-design-system` (declaration-merging surface). At\n * runtime, consumers may pass a partially-populated object whose keys\n * match their own augmented `BrandExtensions`. We intentionally accept\n * `Partial<BrandExtensions>` here so the provider works with brand\n * packages that haven't declared extensions yet (a common case in newly\n * scaffolded apps).\n *\n * @stability Beta\n */\nimport {\n createContext,\n createElement,\n useContext,\n type ReactNode,\n} from \"react\";\nimport type { BrandExtensions } from \"@marktiderman/genesis-design-system\";\n\n/**\n * Runtime shape passed to `<BrandExtensionsProvider>`. Consumers augment\n * the canonical `BrandExtensions` interface (in design-system) via TS\n * declaration merging; the provider accepts the resulting record.\n *\n * `Partial<>` so brand packages that have no extensions can still wrap\n * their app in the provider without TS errors.\n */\nexport type BrandExtensionsValue = Partial<BrandExtensions>;\n\nconst BrandExtensionsContext = createContext<BrandExtensionsValue | undefined>(\n undefined,\n);\n\nexport interface BrandExtensionsProviderProps {\n value?: BrandExtensionsValue;\n children: ReactNode;\n}\n\nexport function BrandExtensionsProvider({\n value,\n children,\n}: BrandExtensionsProviderProps) {\n return createElement(\n BrandExtensionsContext.Provider,\n { value },\n children,\n );\n}\n\n/**\n * Read an extension scale by key. Returns `undefined` when the provider\n * isn't mounted OR when the key isn't declared on the brand. The return\n * type follows the consumer's augmented `BrandExtensions[K]`.\n */\nexport function useGenesisExtension<K extends keyof BrandExtensions>(\n key: K,\n): BrandExtensions[K] | undefined {\n const ctx = useContext(BrandExtensionsContext);\n return ctx?.[key];\n}\n"]}
1
+ {"version":3,"sources":["../src/hooks/use-genesis-extension.ts"],"names":[],"mappings":";;;;AAkDA,IAAM,sBAAA,GAAyB,aAAA;AAAA,EAC7B;AACF,CAAA;AAOO,SAAS,uBAAA,CAAwB;AAAA,EACtC,KAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAC/B,EAAA,OAAO,aAAA;AAAA,IACL,sBAAA,CAAuB,QAAA;AAAA,IACvB,EAAE,KAAA,EAAM;AAAA,IACR;AAAA,GACF;AACF;AAOO,SAAS,oBACd,GAAA,EACgC;AAChC,EAAA,MAAM,GAAA,GAAM,WAAW,sBAAsB,CAAA;AAC7C,EAAA,OAAO,MAAM,GAAG,CAAA;AAClB","file":"chunk-FOJJB6AB.js","sourcesContent":["/**\n * useGenesisExtension — read a brand-package `extensions[<key>]` token scale.\n *\n * Brand packages declare domain-specific token categories under the\n * `extensions` slot of the canonical schema (PRD-07 D8 design decision).\n * Genesis primitives don't read these — only consumer composites do — so\n * this hook is the canonical accessor.\n *\n * Resolution order:\n * 1. `BrandExtensionsContext` value (set via <BrandExtensionsProvider>)\n * 2. `undefined` — the extension key isn't declared\n *\n * Consumers wire the provider once at app root; calls anywhere downstream\n * read by key.\n *\n * <BrandExtensionsProvider value={brand.extensions}>\n * <App />\n * </BrandExtensionsProvider>\n *\n * const moodTokens = useGenesisExtension(\"mood\");\n * // moodTokens?.[500] etc. — shape is consumer-defined\n *\n * Type contract: the canonical `BrandExtensions` interface lives in\n * `@marktiderman/genesis-design-system` (declaration-merging surface). At\n * runtime, consumers may pass a partially-populated object whose keys\n * match their own augmented `BrandExtensions`. We intentionally accept\n * `Partial<BrandExtensions>` here so the provider works with brand\n * packages that haven't declared extensions yet (a common case in newly\n * scaffolded apps).\n *\n * @stability Beta\n */\nimport {\n createContext,\n createElement,\n useContext,\n type ReactNode,\n} from \"react\";\nimport type { BrandExtensions } from \"@marktiderman/genesis-design-system\";\n\n/**\n * Runtime shape passed to `<BrandExtensionsProvider>`. Consumers augment\n * the canonical `BrandExtensions` interface (in design-system) via TS\n * declaration merging; the provider accepts the resulting record.\n *\n * `Partial<>` so brand packages that have no extensions can still wrap\n * their app in the provider without TS errors.\n */\nexport type BrandExtensionsValue = Partial<BrandExtensions>;\n\nconst BrandExtensionsContext = createContext<BrandExtensionsValue | undefined>(\n undefined,\n);\n\nexport interface BrandExtensionsProviderProps {\n value?: BrandExtensionsValue;\n children: ReactNode;\n}\n\nexport function BrandExtensionsProvider({\n value,\n children,\n}: BrandExtensionsProviderProps) {\n return createElement(\n BrandExtensionsContext.Provider,\n { value },\n children,\n );\n}\n\n/**\n * Read an extension scale by key. Returns `undefined` when the provider\n * isn't mounted OR when the key isn't declared on the brand. The return\n * type follows the consumer's augmented `BrandExtensions[K]`.\n */\nexport function useGenesisExtension<K extends keyof BrandExtensions>(\n key: K,\n): BrandExtensions[K] | undefined {\n const ctx = useContext(BrandExtensionsContext);\n return ctx?.[key];\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { useGenesisModules, NativeSkeleton, NativeText, NativeIcon } from './chunk-6PGLX6ET.js';
2
- import { useReducedMotion, useThemeRoles } from './chunk-4OQOJ2OC.js';
1
+ import { NativeSkeleton, NativeText, NativeIcon, NativeContextMenu } from './chunk-FGIIBON3.js';
2
+ import { useGenesisModules, useReducedMotion, useThemeRoles, usePressFeedback } from './chunk-PWS2HLDE.js';
3
3
  import { forwardRef, useState, useRef, useEffect, useCallback, useImperativeHandle, useMemo } from 'react';
4
- import { FlatList, View, Platform, AccessibilityInfo, Pressable, Dimensions, TextInput, ActivityIndicator } from 'react-native';
4
+ import { FlatList, View, Platform, AccessibilityInfo, Pressable, Dimensions, TextInput, ActivityIndicator, Animated } from 'react-native';
5
5
  import { useThreadJump } from '@marktiderman/genesis-core/conversation';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
 
@@ -35,6 +35,7 @@ function NativeThreadListInner(props, ref) {
35
35
  earlierLabel = "Load earlier messages",
36
36
  renderEarlier,
37
37
  jumpTo,
38
+ jumpId,
38
39
  onLoadUntil,
39
40
  jumpAnnouncement,
40
41
  onJumpFailed,
@@ -58,6 +59,7 @@ function NativeThreadListInner(props, ref) {
58
59
  const atBottom = useRef(true);
59
60
  const placed = useRef(!mode.followsByHand);
60
61
  const settlingUntil = useRef(0);
62
+ const moveId = useRef(0);
61
63
  const timers = useRef(/* @__PURE__ */ new Set());
62
64
  const later = useCallback((fn, ms) => {
63
65
  const t = setTimeout(() => {
@@ -70,9 +72,10 @@ function NativeThreadListInner(props, ref) {
70
72
  const pending = timers.current;
71
73
  return () => pending.forEach(clearTimeout);
72
74
  }, []);
73
- const latest = useRef({ data, keyExtractor, jumpAnnouncement, onJumpFailed, onAtBottomChange });
74
- latest.current = { data, keyExtractor, jumpAnnouncement, onJumpFailed, onAtBottomChange };
75
- const indexOf = useCallback((id) => latest.current.data.findIndex((row) => latest.current.keyExtractor(row) === id), []);
75
+ const idOf = jumpId ?? keyExtractor;
76
+ const latest = useRef({ data, idOf, jumpAnnouncement, onJumpFailed, onAtBottomChange });
77
+ latest.current = { data, idOf, jumpAnnouncement, onJumpFailed, onAtBottomChange };
78
+ const indexOf = useCallback((id) => latest.current.data.findIndex((row) => latest.current.idOf(row) === id), []);
76
79
  const setAtBottom = useCallback((v) => {
77
80
  if (atBottom.current === v) return;
78
81
  atBottom.current = v;
@@ -81,12 +84,13 @@ function NativeThreadListInner(props, ref) {
81
84
  const toBottom = useCallback(
82
85
  (animated) => {
83
86
  settlingUntil.current = Date.now() + SETTLING_MS;
87
+ const move = ++moveId.current;
84
88
  const go = (a) => listRef.current?.scrollToEnd?.({ animated: a && !reducedMotion });
85
89
  requestAnimationFrame(() => {
86
90
  go(animated);
87
91
  placed.current = true;
88
92
  });
89
- if (animated) later(() => go(true), 180);
93
+ if (animated) later(() => move === moveId.current && go(true), 180);
90
94
  },
91
95
  [later, reducedMotion]
92
96
  );
@@ -103,9 +107,13 @@ function NativeThreadListInner(props, ref) {
103
107
  const jumpTries = useRef(null);
104
108
  const scrollToRow = useCallback(
105
109
  (id) => {
110
+ const move = ++moveId.current;
106
111
  const scroll = () => {
112
+ if (move !== moveId.current) return;
107
113
  const at = indexOf(id);
108
- if (at >= 0) listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });
114
+ if (at < 0) return;
115
+ settlingUntil.current = Date.now() + SETTLING_MS;
116
+ listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });
109
117
  };
110
118
  jumpTries.current = { id, tries: 0 };
111
119
  settlingUntil.current = Date.now() + SETTLING_MS;
@@ -114,9 +122,21 @@ function NativeThreadListInner(props, ref) {
114
122
  },
115
123
  [indexOf, later, reducedMotion]
116
124
  );
125
+ const lookForBottom = useCallback(() => {
126
+ if (recheck.current) clearTimeout(recheck.current);
127
+ const look = () => {
128
+ const wait = settlingUntil.current - Date.now();
129
+ if (wait > 0) {
130
+ recheck.current = setTimeout(look, wait + 50);
131
+ return;
132
+ }
133
+ if (!metrics.current || threadNearBottom(metrics.current)) setAtBottom(true);
134
+ };
135
+ recheck.current = setTimeout(look, SETTLING_MS + 50);
136
+ }, [setAtBottom]);
117
137
  const has = useCallback((id) => indexOf(id) >= 0, [indexOf]);
118
138
  const hasNow = useMemo(() => (id) => has(id), [has, data]);
119
- const { highlightedId, jumping } = useThreadJump({
139
+ const { highlightedId, jumping, cancel: cancelJump } = useThreadJump({
120
140
  target: jumpTo,
121
141
  has: hasNow,
122
142
  loading,
@@ -127,10 +147,7 @@ function NativeThreadListInner(props, ref) {
127
147
  placed.current = true;
128
148
  },
129
149
  onLanded: (id) => {
130
- if (recheck.current) clearTimeout(recheck.current);
131
- recheck.current = setTimeout(() => {
132
- if (metrics.current && threadNearBottom(metrics.current)) setAtBottom(true);
133
- }, SETTLING_MS + 50);
150
+ lookForBottom();
134
151
  const at = indexOf(id);
135
152
  const said = at >= 0 ? latest.current.jumpAnnouncement?.(latest.current.data[at]) : void 0;
136
153
  if (said) announce(said);
@@ -150,8 +167,8 @@ function NativeThreadListInner(props, ref) {
150
167
  hasEarlier && onLoadEarlier ? renderEarlier ? renderEarlier(earlierProps) : /* @__PURE__ */ jsx(DefaultEarlier, { ...earlierProps }) : null
151
168
  ] });
152
169
  const renderListItem = useCallback(
153
- ({ item, index }) => renderItem(item, { index, highlighted: highlightedId !== null && keyExtractor(item) === highlightedId }),
154
- [highlightedId, keyExtractor, renderItem]
170
+ ({ item, index }) => renderItem(item, { index, highlighted: highlightedId !== null && idOf(item) === highlightedId }),
171
+ [highlightedId, idOf, renderItem]
155
172
  );
156
173
  const listKey = useCallback((row) => keyExtractor(row), [keyExtractor]);
157
174
  const listItemType = useMemo(() => getItemType ? (row) => getItemType(row) : void 0, [getItemType]);
@@ -160,24 +177,34 @@ function NativeThreadListInner(props, ref) {
160
177
  metrics.current = { contentOffset: { y: e.nativeEvent.contentOffset.y }, contentSize: { height: e.nativeEvent.contentSize.height }, layoutMeasurement: { height: e.nativeEvent.layoutMeasurement.height } };
161
178
  const height = e.nativeEvent.layoutMeasurement.height;
162
179
  setViewport((v) => Math.abs(v - height) < 1 ? v : height);
163
- const near = threadNearBottom(e.nativeEvent);
164
- if (!near && Date.now() < settlingUntil.current) return;
165
- setAtBottom(near);
180
+ if (Date.now() < settlingUntil.current) return;
181
+ setAtBottom(threadNearBottom(e.nativeEvent));
166
182
  },
167
183
  [setAtBottom]
168
184
  );
185
+ const readerTookOver = useCallback(() => {
186
+ settlingUntil.current = 0;
187
+ moveId.current += 1;
188
+ jumpTries.current = null;
189
+ cancelJump();
190
+ }, [cancelJump]);
169
191
  const onScrollToIndexFailed = useCallback(
170
192
  ({ index, averageItemLength }) => {
171
- listRef.current?.scrollToOffset?.({ offset: Math.max(0, index * averageItemLength - 200), animated: false });
172
193
  const target = jumpTries.current;
173
- if (!target || target.tries >= 3) return;
194
+ if (!target) return;
195
+ listRef.current?.scrollToOffset?.({ offset: Math.max(0, index * averageItemLength - 200), animated: false });
196
+ if (target.tries >= 3) return;
174
197
  target.tries += 1;
175
198
  later(() => {
199
+ if (jumpTries.current !== target) return;
176
200
  const at = indexOf(target.id);
177
- if (at >= 0) listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });
201
+ if (at < 0) return;
202
+ settlingUntil.current = Date.now() + SETTLING_MS;
203
+ listRef.current?.scrollToIndex?.({ index: at, animated: !reducedMotion, viewPosition: 0.5 });
204
+ lookForBottom();
178
205
  }, 250);
179
206
  },
180
- [indexOf, later, reducedMotion]
207
+ [indexOf, later, lookForBottom, reducedMotion]
181
208
  );
182
209
  const follow = useCallback(() => {
183
210
  if (atBottom.current && !jumping) toBottom(false);
@@ -211,6 +238,7 @@ function NativeThreadListInner(props, ref) {
211
238
  maintainVisibleContentPosition: mode.maintainVisibleContentPosition,
212
239
  scrollEventThrottle: 32,
213
240
  onScroll,
241
+ onScrollBeginDrag: readerTookOver,
214
242
  onScrollToIndexFailed,
215
243
  ...mode.followsByHand ? { onContentSizeChange: follow, onLayout: follow } : {},
216
244
  ListHeaderComponent: listHeader,
@@ -247,11 +275,20 @@ function NativeComposerBar({
247
275
  maxLength,
248
276
  maxLines = 6,
249
277
  modes,
278
+ modesLabel = "Send as",
250
279
  mode,
251
280
  onModeChange,
252
281
  leading,
253
282
  trailing,
254
283
  above,
284
+ hasContent,
285
+ idleAction,
286
+ replaceInput,
287
+ sendActions,
288
+ sendActionsTitle,
289
+ sendActionsHint = "Touch and hold for more options",
290
+ onSelectionChange,
291
+ editable = true,
255
292
  testID = "composer"
256
293
  }) {
257
294
  const colors = useThemeRoles();
@@ -259,8 +296,12 @@ function NativeComposerBar({
259
296
  const hasIcon = Boolean(symbol || icons?.["arrow-up"]);
260
297
  const current = modes?.find((m) => m.id === mode) ?? modes?.[0];
261
298
  const internal = current?.tone === "internal";
262
- const blank = !value.trim();
263
- const canSend = !blank && !disabled && !sending;
299
+ const blank = !(hasContent ?? value.trim().length > 0);
300
+ const canSend = !blank && !disabled && !sending && editable;
301
+ const actions = sendActions?.length ? sendActions : null;
302
+ const [menuOpen, setMenuOpen] = useState(false);
303
+ const idle = idleAction != null && blank && !sending;
304
+ const sendPress = usePressFeedback({ haptic: "light", scale: 0.9, disabled: !canSend });
264
305
  const fontScale = Dimensions.get("window").fontScale || 1;
265
306
  const maxHeight = Math.ceil(LINE * fontScale) * maxLines + PAD_Y * 2;
266
307
  useEffect(() => {
@@ -280,7 +321,7 @@ function NativeComposerBar({
280
321
  borderTopColor: colors.warning
281
322
  },
282
323
  children: [
283
- modes && modes.length > 1 ? /* @__PURE__ */ jsx(View, { testID: `${testID}-modes`, accessibilityRole: "tablist", style: { flexDirection: "row", gap: 4 }, children: modes.map((m) => {
324
+ modes && modes.length > 1 ? /* @__PURE__ */ jsx(View, { testID: `${testID}-modes`, accessibilityRole: "tablist", accessibilityLabel: modesLabel, style: { flexDirection: "row", gap: 4 }, children: modes.map((m) => {
284
325
  const on = m.id === current?.id;
285
326
  return /* @__PURE__ */ jsx(
286
327
  Pressable,
@@ -306,56 +347,72 @@ function NativeComposerBar({
306
347
  }) }) : null,
307
348
  above,
308
349
  /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "flex-end", gap: 8 }, children: [
309
- leading,
310
- /* @__PURE__ */ jsx(
311
- TextInput,
312
- {
313
- testID: `${testID}-input`,
314
- value,
315
- onChangeText,
316
- placeholder: internal ? current.label : placeholder,
317
- placeholderTextColor: colors.tertiaryLabel,
318
- accessibilityLabel: internal ? current.label : placeholder,
319
- multiline: true,
320
- maxLength,
321
- style: {
322
- flex: 1,
323
- minHeight: 44,
324
- maxHeight,
325
- textAlignVertical: "center",
326
- paddingHorizontal: 14,
327
- paddingTop: PAD_Y,
328
- paddingBottom: PAD_Y,
329
- borderRadius: 22,
330
- fontSize: 17,
331
- lineHeight: LINE,
332
- color: colors.label,
333
- backgroundColor: colors.surface,
334
- borderWidth: internal ? 1 : 0,
335
- borderColor: colors.warning
350
+ replaceInput != null ? /* @__PURE__ */ jsx(View, { style: { flex: 1, minHeight: 44, justifyContent: "center" }, children: replaceInput }) : /* @__PURE__ */ jsxs(Fragment, { children: [
351
+ leading,
352
+ /* @__PURE__ */ jsx(
353
+ TextInput,
354
+ {
355
+ testID: `${testID}-input`,
356
+ value,
357
+ onChangeText,
358
+ placeholder: internal ? current.label : placeholder,
359
+ placeholderTextColor: colors.tertiaryLabel,
360
+ accessibilityLabel: internal ? current.label : placeholder,
361
+ accessibilityState: editable ? void 0 : { disabled: true },
362
+ editable,
363
+ onSelectionChange,
364
+ multiline: true,
365
+ maxLength,
366
+ style: {
367
+ flex: 1,
368
+ minHeight: 44,
369
+ maxHeight,
370
+ textAlignVertical: "center",
371
+ paddingHorizontal: 14,
372
+ paddingTop: PAD_Y,
373
+ paddingBottom: PAD_Y,
374
+ borderRadius: 22,
375
+ fontSize: 17,
376
+ lineHeight: LINE,
377
+ color: colors.label,
378
+ backgroundColor: colors.surface,
379
+ borderWidth: internal ? 1 : 0,
380
+ borderColor: colors.warning,
381
+ opacity: editable ? 1 : 0.6
382
+ }
336
383
  }
337
- }
338
- ),
384
+ )
385
+ ] }),
339
386
  trailing,
340
- sending ? /* @__PURE__ */ jsx(View, { testID: `${testID}-sending`, accessible: true, accessibilityLabel: sendingLabel, accessibilityLiveRegion: "polite", style: { width: 44, height: 44, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(ActivityIndicator, {}) }) : /* @__PURE__ */ jsx(
387
+ idle ? /* @__PURE__ */ jsx(View, { testID: `${testID}-idle`, style: { minWidth: 44, height: 44, alignItems: "center", justifyContent: "center" }, children: idleAction }) : sending ? /* @__PURE__ */ jsx(View, { testID: `${testID}-sending`, accessible: true, accessibilityLabel: sendingLabel, accessibilityLiveRegion: "polite", style: { width: 44, height: 44, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(ActivityIndicator, {}) }) : /* @__PURE__ */ jsx(Animated.View, { style: sendPress.style, children: /* @__PURE__ */ jsx(
341
388
  Pressable,
342
389
  {
343
390
  testID: `${testID}-send`,
344
391
  accessibilityRole: "button",
345
392
  accessibilityLabel: sendLabel,
346
393
  accessibilityState: { disabled: !canSend },
394
+ accessibilityHint: actions ? sendActionsHint : void 0,
395
+ accessibilityActions: actions && canSend ? actions.map((a) => ({ name: a.id, label: a.label })) : void 0,
396
+ onAccessibilityAction: actions ? (e) => actions.find((a) => a.id === e.nativeEvent.actionName)?.onPress() : void 0,
397
+ onLongPress: actions ? () => actions.length === 1 ? actions[0].onPress() : setMenuOpen(true) : void 0,
347
398
  disabled: !canSend,
348
- onPress: onSend,
399
+ onPressIn: sendPress.onPressIn,
400
+ onPressOut: sendPress.onPressOut,
401
+ onPress: () => {
402
+ sendPress.confirm();
403
+ onSend();
404
+ },
349
405
  style: { minWidth: 44, height: 44, paddingHorizontal: hasIcon ? 0 : 14, borderRadius: 22, alignItems: "center", justifyContent: "center", backgroundColor: canSend ? colors.tint : colors.fill },
350
406
  children: hasIcon ? /* @__PURE__ */ jsx(NativeIcon, { name: "arrow-up", size: 20, color: canSend ? colors.background : colors.tertiaryLabel }) : /* @__PURE__ */ jsx(NativeText, { preset: "label", className: canSend ? "text-primary-foreground" : void 0, style: canSend ? void 0 : { color: colors.tertiaryLabel }, children: sendLabel })
351
407
  }
352
- )
353
- ] })
408
+ ) })
409
+ ] }),
410
+ actions && actions.length > 1 ? /* @__PURE__ */ jsx(NativeContextMenu, { open: menuOpen, onOpenChange: setMenuOpen, actions, ...sendActionsTitle ? { title: sendActionsTitle } : {}, testID: `${testID}-send-menu` }) : null
354
411
  ]
355
412
  }
356
413
  );
357
414
  }
358
415
 
359
416
  export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom };
360
- //# sourceMappingURL=chunk-SEJ6RBP7.js.map
361
- //# sourceMappingURL=chunk-SEJ6RBP7.js.map
417
+ //# sourceMappingURL=chunk-JZ7RAGDQ.js.map
418
+ //# sourceMappingURL=chunk-JZ7RAGDQ.js.map