@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
@@ -1,7 +1,8 @@
1
1
  export { JUMP_SETTLE_MS, UseThreadJumpOptions, useThreadJump } from '@marktiderman/genesis-core/conversation';
2
+ import { o as GenesisReanimatedModule, H as HapticKind } from '../native-modules-CeAaO2Dh.js';
3
+ export { c as GenesisHapticsModule, s as playHaptic, t as useHaptics } from '../native-modules-CeAaO2Dh.js';
4
+ import { Animated, ColorValue } from 'react-native';
2
5
  import { MotionSprings, MotionDurations, MotionEasings, MotionLevel, MotionTokens } from '@marktiderman/genesis-design-system/tokens/motion';
3
- import { n as GenesisReanimatedModule } from '../native-modules-Cl3zw3kh.js';
4
- import { ColorValue } from 'react-native';
5
6
  import { ThemeRole, BrandExtensions } from '@marktiderman/genesis-design-system';
6
7
  import * as react from 'react';
7
8
  import { ReactNode } from 'react';
@@ -64,6 +65,34 @@ declare function motionTiming(motion: MotionTokens, duration: keyof MotionDurati
64
65
  */
65
66
  declare function animateMotion(R: GenesisReanimatedModule, motion: MotionTokens, toValue: number, how: MotionHow): number;
66
67
 
68
+ type AnimatedValue = InstanceType<typeof Animated.Value>;
69
+ interface PressFeedbackOptions {
70
+ /** A haptic when the press counts (`confirm()`), or `select` as a tick on press-in. Default none. */
71
+ haptic?: HapticKind | false;
72
+ /** How far it shrinks while held. Default 0.97. */
73
+ scale?: number;
74
+ /** Under Reduce Motion: how far it dims while held. Default 0.6. */
75
+ dimTo?: number;
76
+ /** No feedback (a disabled button). */
77
+ disabled?: boolean;
78
+ /** The brand's motion level, as `useMotion` takes it. */
79
+ level?: UseMotionOptions["level"];
80
+ }
81
+ interface PressFeedback {
82
+ onPressIn: () => void;
83
+ onPressOut: () => void;
84
+ /** Call from `onPress`: plays the haptic for a press that counted. */
85
+ confirm: () => void;
86
+ /** For an `Animated.View` around the pressable's content. */
87
+ style: {
88
+ transform?: {
89
+ scale: AnimatedValue;
90
+ }[];
91
+ opacity?: AnimatedValue;
92
+ };
93
+ }
94
+ declare function usePressFeedback({ haptic, scale, dimTo, disabled, level }?: PressFeedbackOptions): PressFeedback;
95
+
67
96
  type ThemeMode = "light" | "dark";
68
97
  declare function useThemeMode(): ThemeMode;
69
98
 
@@ -75,6 +104,10 @@ interface UseThemeRolesOptions {
75
104
  materialYou?: boolean;
76
105
  }
77
106
  declare function useThemeRoles(options?: UseThemeRolesOptions): ThemeRoleColors;
107
+ /** The colour of a message you sent, on every thread on the phone. Its text is `text-primary-foreground`. */
108
+ declare const sentBubbleColor: <C>(roles: {
109
+ tint: C;
110
+ }) => C;
78
111
 
79
112
  /**
80
113
  * Runtime shape passed to `<BrandExtensionsProvider>`. Consumers augment
@@ -97,4 +130,4 @@ declare function BrandExtensionsProvider({ value, children, }: BrandExtensionsPr
97
130
  */
98
131
  declare function useGenesisExtension<K extends keyof BrandExtensions>(key: K): BrandExtensions[K] | undefined;
99
132
 
100
- export { BrandExtensionsProvider, type BrandExtensionsProviderProps, type BrandExtensionsValue, type MotionHow, type MotionSpringConfig, type MotionTimingConfig, type ThemeMode, type ThemeRoleColors, type UseMotionOptions, type UseThemeRolesOptions, animateMotion, motionSpring, motionTiming, useGenesisExtension, useMotion, useReducedMotion, useThemeMode, useThemeRoles };
133
+ export { BrandExtensionsProvider, type BrandExtensionsProviderProps, type BrandExtensionsValue, HapticKind, type MotionHow, type MotionSpringConfig, type MotionTimingConfig, type PressFeedback, type PressFeedbackOptions, type ThemeMode, type ThemeRoleColors, type UseMotionOptions, type UseThemeRolesOptions, animateMotion, motionSpring, motionTiming, sentBubbleColor, useGenesisExtension, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles };
@@ -1,5 +1,5 @@
1
- export { BrandExtensionsProvider, JUMP_SETTLE_MS, useGenesisExtension, useThreadJump } from '../chunk-ZRQAFFTN.js';
2
- export { animateMotion, motionSpring, motionTiming, useMotion, useReducedMotion, useThemeMode, useThemeRoles } from '../chunk-4OQOJ2OC.js';
1
+ export { BrandExtensionsProvider, JUMP_SETTLE_MS, useGenesisExtension, useThreadJump } from '../chunk-FOJJB6AB.js';
2
+ export { animateMotion, motionSpring, motionTiming, playHaptic, sentBubbleColor, useHaptics, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from '../chunk-PWS2HLDE.js';
3
3
  import '../chunk-DGUM43GV.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { q as NativeIconName, c as GenesisIconComponent } from '../native-modules-Cl3zw3kh.js';
1
+ import { r as NativeIconName, d as GenesisIconComponent } from '../native-modules-CeAaO2Dh.js';
2
2
  import 'react';
3
3
  import 'react-native';
4
4
 
@@ -1,20 +1,20 @@
1
1
  import '../chunk-DGUM43GV.js';
2
- import { TriangleAlert, VolumeX, Volume2, Video, User, Trash2, CircleCheck, Square, Star, Smile, Share, Settings2, Settings, Search, Reply, RefreshCw, Radio, Plus, Play, Pin, Pause, Paperclip, Ellipsis, Minus, Mic, MessageCircle, Menu, Maximize, Mail, LogOut, Lock, Info, Image, House, Heart, FolderPlus, Funnel, File, ExternalLink, Maximize2, CircleX, Pencil, Download, Copy, SquarePen, X, Clock, ChevronUp, ChevronRight, ChevronLeft, ChevronDown, Clapperboard, Check, SwitchCamera, Camera, Calendar, Bell, Aperture, ArrowUp, ArrowLeft } from 'lucide-react-native';
2
+ import { TriangleAlert, VolumeX, Volume2, Video, User, Upload, Undo2, Trash2, Table, CircleCheck, Square, Star, ArrowUpDown, Smile, Share, Settings2, Settings, Search, Reply, RefreshCw, Redo2, Radio, Plus, Play, Pin, Pause, Paperclip, Ellipsis, Minus, Mic, MessageCircle, Menu, Maximize, Mail, LogOut, Lock, List, Link, Info, Image, House, Heart, GripVertical, LayoutGrid, FolderPlus, Funnel, File, Eye, ExternalLink, Maximize2, CircleX, Pencil, Download, Copy, SquarePen, X, Clock, Clapperboard, ChevronUp, ChevronRight, ChevronLeft, ChevronDown, Check, SwitchCamera, Camera, Calendar, Bell, ArrowUp, ArrowLeft, Aperture } from 'lucide-react-native';
3
3
 
4
4
  var lucideIcons = {
5
+ aperture: Aperture,
5
6
  "arrow-left": ArrowLeft,
6
7
  "arrow-up": ArrowUp,
7
- aperture: Aperture,
8
8
  bell: Bell,
9
9
  calendar: Calendar,
10
10
  camera: Camera,
11
11
  "camera-flip": SwitchCamera,
12
12
  check: Check,
13
- clapperboard: Clapperboard,
14
13
  "chevron-down": ChevronDown,
15
14
  "chevron-left": ChevronLeft,
16
15
  "chevron-right": ChevronRight,
17
16
  "chevron-up": ChevronUp,
17
+ clapperboard: Clapperboard,
18
18
  clock: Clock,
19
19
  close: X,
20
20
  compose: SquarePen,
@@ -24,13 +24,18 @@ var lucideIcons = {
24
24
  error: CircleX,
25
25
  expand: Maximize2,
26
26
  "external-link": ExternalLink,
27
+ eye: Eye,
27
28
  file: File,
28
29
  filter: Funnel,
29
30
  "folder-plus": FolderPlus,
31
+ grid: LayoutGrid,
32
+ grip: GripVertical,
30
33
  heart: Heart,
31
34
  home: House,
32
35
  image: Image,
33
36
  info: Info,
37
+ link: Link,
38
+ list: List,
34
39
  lock: Lock,
35
40
  "log-out": LogOut,
36
41
  mail: Mail,
@@ -46,6 +51,7 @@ var lucideIcons = {
46
51
  play: Play,
47
52
  plus: Plus,
48
53
  radio: Radio,
54
+ redo: Redo2,
49
55
  refresh: RefreshCw,
50
56
  reply: Reply,
51
57
  search: Search,
@@ -53,10 +59,14 @@ var lucideIcons = {
53
59
  "settings-2": Settings2,
54
60
  share: Share,
55
61
  smile: Smile,
62
+ sort: ArrowUpDown,
56
63
  star: Star,
57
64
  stop: Square,
58
65
  success: CircleCheck,
66
+ table: Table,
59
67
  trash: Trash2,
68
+ undo: Undo2,
69
+ upload: Upload,
60
70
  user: User,
61
71
  video: Video,
62
72
  volume: Volume2,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/icons/lucide.ts"],"names":[],"mappings":";;;AA2EO,IAAM,WAAA,GAA4D;AAAA,EACvE,YAAA,EAAc,SAAA;AAAA,EACd,UAAA,EAAY,OAAA;AAAA,EACZ,QAAA,EAAU,QAAA;AAAA,EACV,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,aAAA,EAAe,YAAA;AAAA,EACf,KAAA,EAAO,KAAA;AAAA,EACP,YAAA,EAAc,YAAA;AAAA,EACd,cAAA,EAAgB,WAAA;AAAA,EAChB,cAAA,EAAgB,WAAA;AAAA,EAChB,eAAA,EAAiB,YAAA;AAAA,EACjB,YAAA,EAAc,SAAA;AAAA,EACd,KAAA,EAAO,KAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,OAAA,EAAS,SAAA;AAAA,EACT,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,SAAA;AAAA,EACR,eAAA,EAAiB,YAAA;AAAA,EACjB,IAAA,EAAM,IAAA;AAAA,EACN,MAAA,EAAQ,MAAA;AAAA,EACR,aAAA,EAAe,UAAA;AAAA,EACf,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,KAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,SAAA,EAAW,MAAA;AAAA,EACX,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,EAAS,aAAA;AAAA,EACT,GAAA,EAAK,GAAA;AAAA,EACL,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,QAAA;AAAA,EACN,SAAA,EAAW,SAAA;AAAA,EACX,KAAA,EAAO,KAAA;AAAA,EACP,GAAA,EAAK,GAAA;AAAA,EACL,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,OAAA,EAAS,SAAA;AAAA,EACT,KAAA,EAAO,KAAA;AAAA,EACP,MAAA,EAAQ,MAAA;AAAA,EACR,QAAA,EAAU,QAAA;AAAA,EACV,YAAA,EAAc,SAAA;AAAA,EACd,KAAA,EAAO,KAAA;AAAA,EACP,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,WAAA;AAAA,EACT,KAAA,EAAO,MAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,MAAA,EAAQ,OAAA;AAAA,EACR,YAAA,EAAc,OAAA;AAAA,EACd,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAMX","file":"lucide.js","sourcesContent":["/**\n * `lucideIcons` — the lucide-react-native icon for every semantic name, the\n * icon set `NativeIcon` draws on Android and web (and on iOS when an SF\n * Symbol can't be drawn). Opt in by importing this subpath and passing it as\n * `modules.icons`; the rest of the package never imports lucide.\n *\n * Needs lucide-react-native 0.475 or later (the names below).\n *\n * @stability Beta\n */\nimport {\n Aperture,\n ArrowLeft,\n ArrowUp,\n Bell,\n Calendar,\n Camera,\n Check,\n Clapperboard,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n CircleCheck,\n CircleX,\n Clock,\n Copy,\n Download,\n Ellipsis,\n ExternalLink,\n File,\n FolderPlus,\n Funnel,\n Heart,\n House,\n Image,\n Info,\n Maximize,\n Maximize2,\n Lock,\n LogOut,\n Mail,\n Menu,\n MessageCircle,\n Mic,\n Minus,\n Paperclip,\n Pause,\n Pencil,\n Pin,\n Play,\n Plus,\n Radio,\n RefreshCw,\n Reply,\n Search,\n Square,\n SwitchCamera,\n Settings,\n Settings2,\n Share,\n Smile,\n SquarePen,\n Star,\n Trash2,\n TriangleAlert,\n User,\n Video,\n Volume2,\n VolumeX,\n X,\n} from \"lucide-react-native\";\nimport type { NativeIconName } from \"../icon-names\";\nimport type { GenesisIconComponent } from \"../native-modules\";\n\nexport const lucideIcons: Record<NativeIconName, GenesisIconComponent> = {\n \"arrow-left\": ArrowLeft,\n \"arrow-up\": ArrowUp,\n aperture: Aperture,\n bell: Bell,\n calendar: Calendar,\n camera: Camera,\n \"camera-flip\": SwitchCamera,\n check: Check,\n clapperboard: Clapperboard,\n \"chevron-down\": ChevronDown,\n \"chevron-left\": ChevronLeft,\n \"chevron-right\": ChevronRight,\n \"chevron-up\": ChevronUp,\n clock: Clock,\n close: X,\n compose: SquarePen,\n copy: Copy,\n download: Download,\n edit: Pencil,\n error: CircleX,\n expand: Maximize2,\n \"external-link\": ExternalLink,\n file: File,\n filter: Funnel,\n \"folder-plus\": FolderPlus,\n heart: Heart,\n home: House,\n image: Image,\n info: Info,\n lock: Lock,\n \"log-out\": LogOut,\n mail: Mail,\n maximize: Maximize,\n menu: Menu,\n message: MessageCircle,\n mic: Mic,\n minus: Minus,\n more: Ellipsis,\n paperclip: Paperclip,\n pause: Pause,\n pin: Pin,\n play: Play,\n plus: Plus,\n radio: Radio,\n refresh: RefreshCw,\n reply: Reply,\n search: Search,\n settings: Settings,\n \"settings-2\": Settings2,\n share: Share,\n smile: Smile,\n star: Star,\n stop: Square,\n success: CircleCheck,\n trash: Trash2,\n user: User,\n video: Video,\n volume: Volume2,\n \"volume-off\": VolumeX,\n warning: TriangleAlert,\n // The cast widens lucide's declared `color: string` to `ColorValue`. On iOS\n // NativeIcon passes theme roles as `PlatformColor` objects; lucide hands\n // `color` to react-native-svg's stroke, whose extractBrush resolves\n // PlatformColor and DynamicColorIOS objects (react-native-svg 15,\n // src/lib/extract/extractBrush.ts).\n} as Record<NativeIconName, GenesisIconComponent>;\n"]}
1
+ {"version":3,"sources":["../../src/icons/lucide.ts"],"names":[],"mappings":";;;AAqFO,IAAM,WAAA,GAA4D;AAAA,EACvE,QAAA,EAAU,QAAA;AAAA,EACV,YAAA,EAAc,SAAA;AAAA,EACd,UAAA,EAAY,OAAA;AAAA,EACZ,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,aAAA,EAAe,YAAA;AAAA,EACf,KAAA,EAAO,KAAA;AAAA,EACP,cAAA,EAAgB,WAAA;AAAA,EAChB,cAAA,EAAgB,WAAA;AAAA,EAChB,eAAA,EAAiB,YAAA;AAAA,EACjB,YAAA,EAAc,SAAA;AAAA,EACd,YAAA,EAAc,YAAA;AAAA,EACd,KAAA,EAAO,KAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,OAAA,EAAS,SAAA;AAAA,EACT,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,SAAA;AAAA,EACR,eAAA,EAAiB,YAAA;AAAA,EACjB,GAAA,EAAK,GAAA;AAAA,EACL,IAAA,EAAM,IAAA;AAAA,EACN,MAAA,EAAQ,MAAA;AAAA,EACR,aAAA,EAAe,UAAA;AAAA,EACf,IAAA,EAAM,UAAA;AAAA,EACN,IAAA,EAAM,YAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,KAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,SAAA,EAAW,MAAA;AAAA,EACX,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,QAAA;AAAA,EACV,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,EAAS,aAAA;AAAA,EACT,GAAA,EAAK,GAAA;AAAA,EACL,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,QAAA;AAAA,EACN,SAAA,EAAW,SAAA;AAAA,EACX,KAAA,EAAO,KAAA;AAAA,EACP,GAAA,EAAK,GAAA;AAAA,EACL,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,KAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,KAAA,EAAO,KAAA;AAAA,EACP,MAAA,EAAQ,MAAA;AAAA,EACR,QAAA,EAAU,QAAA;AAAA,EACV,YAAA,EAAc,SAAA;AAAA,EACd,KAAA,EAAO,KAAA;AAAA,EACP,KAAA,EAAO,KAAA;AAAA,EACP,IAAA,EAAM,WAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,WAAA;AAAA,EACT,KAAA,EAAO,KAAA;AAAA,EACP,KAAA,EAAO,MAAA;AAAA,EACP,IAAA,EAAM,KAAA;AAAA,EACN,MAAA,EAAQ,MAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,KAAA,EAAO,KAAA;AAAA,EACP,MAAA,EAAQ,OAAA;AAAA,EACR,YAAA,EAAc,OAAA;AAAA,EACd,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAMX","file":"lucide.js","sourcesContent":["/**\n * `lucideIcons` — the lucide-react-native icon for every semantic name, the\n * icon set `NativeIcon` draws on Android and web (and on iOS when an SF\n * Symbol can't be drawn). Opt in by importing this subpath and passing it as\n * `modules.icons`; the rest of the package never imports lucide.\n *\n * Needs lucide-react-native 0.475 or later (the names below).\n *\n * @stability Beta\n */\nimport {\n Aperture,\n ArrowLeft,\n ArrowUp,\n ArrowUpDown,\n Bell,\n Calendar,\n Camera,\n Check,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n CircleCheck,\n CircleX,\n Clapperboard,\n Clock,\n Copy,\n Download,\n Ellipsis,\n ExternalLink,\n Eye,\n File,\n FolderPlus,\n Funnel,\n GripVertical,\n Heart,\n House,\n Image,\n Info,\n LayoutGrid,\n Link,\n List,\n Lock,\n LogOut,\n Mail,\n Maximize,\n Maximize2,\n Menu,\n MessageCircle,\n Mic,\n Minus,\n Paperclip,\n Pause,\n Pencil,\n Pin,\n Play,\n Plus,\n Radio,\n Redo2,\n RefreshCw,\n Reply,\n Search,\n Settings,\n Settings2,\n Share,\n Smile,\n Square,\n SquarePen,\n Star,\n SwitchCamera,\n Table,\n Trash2,\n TriangleAlert,\n Undo2,\n Upload,\n User,\n Video,\n Volume2,\n VolumeX,\n X,\n} from \"lucide-react-native\";\nimport type { NativeIconName } from \"../icon-names\";\nimport type { GenesisIconComponent } from \"../native-modules\";\n\nexport const lucideIcons: Record<NativeIconName, GenesisIconComponent> = {\n aperture: Aperture,\n \"arrow-left\": ArrowLeft,\n \"arrow-up\": ArrowUp,\n bell: Bell,\n calendar: Calendar,\n camera: Camera,\n \"camera-flip\": SwitchCamera,\n check: Check,\n \"chevron-down\": ChevronDown,\n \"chevron-left\": ChevronLeft,\n \"chevron-right\": ChevronRight,\n \"chevron-up\": ChevronUp,\n clapperboard: Clapperboard,\n clock: Clock,\n close: X,\n compose: SquarePen,\n copy: Copy,\n download: Download,\n edit: Pencil,\n error: CircleX,\n expand: Maximize2,\n \"external-link\": ExternalLink,\n eye: Eye,\n file: File,\n filter: Funnel,\n \"folder-plus\": FolderPlus,\n grid: LayoutGrid,\n grip: GripVertical,\n heart: Heart,\n home: House,\n image: Image,\n info: Info,\n link: Link,\n list: List,\n lock: Lock,\n \"log-out\": LogOut,\n mail: Mail,\n maximize: Maximize,\n menu: Menu,\n message: MessageCircle,\n mic: Mic,\n minus: Minus,\n more: Ellipsis,\n paperclip: Paperclip,\n pause: Pause,\n pin: Pin,\n play: Play,\n plus: Plus,\n radio: Radio,\n redo: Redo2,\n refresh: RefreshCw,\n reply: Reply,\n search: Search,\n settings: Settings,\n \"settings-2\": Settings2,\n share: Share,\n smile: Smile,\n sort: ArrowUpDown,\n star: Star,\n stop: Square,\n success: CircleCheck,\n table: Table,\n trash: Trash2,\n undo: Undo2,\n upload: Upload,\n user: User,\n video: Video,\n volume: Volume2,\n \"volume-off\": VolumeX,\n warning: TriangleAlert,\n // The cast widens lucide's declared `color: string` to `ColorValue`. On iOS\n // NativeIcon passes theme roles as `PlatformColor` objects; lucide hands\n // `color` to react-native-svg's stroke, whose extractBrush resolves\n // PlatformColor and DynamicColorIOS objects (react-native-svg 15,\n // src/lib/extract/extractBrush.ts).\n} as Record<NativeIconName, GenesisIconComponent>;\n"]}
@@ -161,7 +161,10 @@ declare function getInboxPageStackOptions(props: ScreenHeaderProps & {
161
161
  headerTitle?: string;
162
162
  }): Record<string, unknown>;
163
163
  declare function InboxPage({ items, refreshing, onRefresh, onEndReached, loadingMore, header, sectionTitle, emptyTitle, emptyBody, emptyActionLabel, onEmptyAction, loading, error, errorTitle, errorBody, formatTime, now, slots, slotProps, testID, }: InboxPageProps): react.JSX.Element;
164
- /** Opens a row's actions as a menu (long press). */
164
+ /**
165
+ * Opens a row's actions as the system alert. `InboxPage` now opens `NativeContextMenu`; `NativeResourceView`
166
+ * still uses this.
167
+ */
165
168
  declare function showInboxActions(title: string, actions: InboxSwipeAction[], cancelLabel?: string): void;
166
169
 
167
170
  export { InboxPage as I, type SafeAreaEdge as S, type InboxPageProps as a, type InboxPageSlotMap as b, ScreenContainer as c, type ScreenContainerProps as d, type ScreenHeaderProps as e, type ScrollEdgeBehavior as f, composeHeaderOptions as g, getInboxPageStackOptions as h, showInboxActions as s };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { Box, BoxBackground, BoxProps, FULL_SCREEN_DARK, FlexAlign, FlexJustify, Grid, GridProps, Inline, InlineProps, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionContentProps, NativeAccordionItem, NativeAccordionItemProps, NativeAccordionProps, NativeAccordionTrigger, NativeAccordionTriggerProps, NativeAccordionType, NativeAlert, NativeAlertDescription, NativeAlertDescriptionProps, NativeAlertProps, NativeAlertTitle, NativeAlertTitleProps, NativeAvatar, NativeAvatarProps, NativeBadge, NativeBadgeProps, NativeBanner, NativeBannerProps, NativeButton, NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardProps, NativeCardTitle, NativeCardTitleProps, NativeCheckbox, NativeCheckboxProps, NativeChip, NativeChipGroup, NativeChipGroupMode, NativeChipGroupProps, NativeChipProps, NativeCombobox, NativeComboboxOption, NativeComboboxProps, NativeComposerBar, NativeComposerBarProps, NativeDatePicker, NativeDatePickerProps, NativeDialog, NativeDialogContent, NativeDialogContentProps, NativeDialogDescription, NativeDialogDescriptionProps, NativeDialogFooter, NativeDialogFooterProps, NativeDialogHeader, NativeDialogHeaderProps, NativeDialogProps, NativeDialogTitle, NativeDialogTitleProps, NativeDrawer, NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuContentProps, NativeDropdownMenuItem, NativeDropdownMenuItemProps, NativeDropdownMenuProps, NativeDropdownMenuTrigger, NativeDropdownMenuTriggerProps, NativeEmptyState, NativeEmptyStateProps, NativeEmptyStateVariant, NativeFullScreenModal, NativeFullScreenModalProps, NativeGalleryCard, NativeGalleryCardProps, NativeGalleryGrid, NativeGalleryGridProps, NativeGalleryLayout, NativeGlassSurface, NativeGlassSurfaceProps, NativeHeaderCard, NativeHeaderCardProps, NativeIcon, NativeIconProps, NativeImage, NativeImageProps, NativeInlineAlert, NativeInlineAlertProps, NativeInlineAlertVariant, NativeInput, NativeInputProps, NativeLabel, NativeLabelProps, NativeLightbox, NativeLightboxLabels, NativeLightboxProps, NativeListItem, NativeListItemDivider, NativeListItemProps, NativeLiveIndicator, NativeLiveIndicatorProps, NativeLiveIndicatorState, NativeLiveIndicatorVariant, NativeLoadingState, NativeLoadingStateEdge, NativeLoadingStateProps, NativeNumberInput, NativeNumberInputProps, NativePagination, NativePaginationProps, NativePopover, NativePopoverContent, NativePopoverContentProps, NativePopoverProps, NativePopoverTrigger, NativePopoverTriggerProps, NativeProgress, NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, NativeRadioGroupItemProps, NativeRadioGroupProps, NativeRangeSlider, NativeRangeSliderProps, NativeRating, NativeRatingProps, NativeRatingSize, NativeRefreshControl, NativeRefreshControlProps, NativeSearchBar, NativeSearchBarProps, NativeSectionListHeader, NativeSectionListHeaderProps, NativeSegmentedControl, NativeSegmentedControlOption, NativeSegmentedControlProps, NativeSelect, NativeSelectContent, NativeSelectContentProps, NativeSelectItem, NativeSelectItemProps, NativeSelectProps, NativeSelectTrigger, NativeSelectTriggerProps, NativeSeparator, NativeSeparatorProps, NativeSheet, NativeSheetLibrary, NativeSheetProps, NativeSheetProvider, NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, NativeSkeletonProps, NativeSlider, NativeSliderProps, NativeStepper, NativeStepperProps, NativeStepperStep, NativeSwitch, NativeSwitchProps, NativeTabs, NativeTabsContent, NativeTabsContentProps, NativeTabsList, NativeTabsListProps, NativeTabsProps, NativeTabsTrigger, NativeTabsTriggerProps, NativeText, NativeTextProps, NativeTextarea, NativeTextareaProps, NativeThreadList, NativeThreadListHandle, NativeThreadListProps, NativeTimePicker, NativeTimePickerProps, NativeToastOptions, NativeToastProvider, NativeToastProviderProps, NativeToastVariant, NativeToggle, NativeToggleProps, NativeTooltip, NativeTooltipContent, NativeTooltipContentProps, NativeTooltipProps, NativeTooltipTrigger, NativeTooltipTriggerProps, NativeZoomablePhoto, NativeZoomablePhotoProps, SpaceToken, SpacingPrefix, Stack, StackProps, THREAD_AT_BOTTOM_POINTS, TextPreset, ThreadRowInfo, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, textVariants, threadListMode, threadNearBottom, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from './components/index.js';
2
- export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, b as GenesisGlassModule, c as GenesisIconComponent, d as GenesisIconSet, e as GenesisImageComponent, f as GenesisImageProps, g as GenesisListComponent, h as GenesisListProps, i as GenesisModules, j as GenesisModulesProvider, k as GenesisModulesProviderProps, l as GenesisNavigationModule, m as GenesisNavigationTheme, n as GenesisReanimatedModule, o as GenesisSymbolComponent, p as GenesisSymbolProps, K as KeyboardAvoidingLike, N as NATIVE_ICON_NAMES, q as NativeIconName, S as SF_SYMBOLS, u as useGenesisModules } from './native-modules-Cl3zw3kh.js';
1
+ export { Box, BoxBackground, BoxProps, ComposerSendAction, FULL_SCREEN_DARK, FlexAlign, FlexJustify, Grid, GridProps, Inline, InlineProps, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionContentProps, NativeAccordionItem, NativeAccordionItemProps, NativeAccordionProps, NativeAccordionTrigger, NativeAccordionTriggerProps, NativeAccordionType, NativeAlert, NativeAlertDescription, NativeAlertDescriptionProps, NativeAlertProps, NativeAlertTitle, NativeAlertTitleProps, NativeAvatar, NativeAvatarProps, NativeBadge, NativeBadgeProps, NativeBanner, NativeBannerProps, NativeBulkAction, NativeBulkBar, NativeBulkBarProps, NativeButton, NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardProps, NativeCardTitle, NativeCardTitleProps, NativeCheckbox, NativeCheckboxProps, NativeChip, NativeChipGroup, NativeChipGroupMode, NativeChipGroupProps, NativeChipProps, NativeChoiceCard, NativeChoiceCardProps, NativeCombobox, NativeComboboxOption, NativeComboboxProps, NativeComposerBar, NativeComposerBarProps, NativeContextMenu, NativeContextMenuAction, NativeContextMenuProps, NativeDatePicker, NativeDatePickerProps, NativeDialog, NativeDialogContent, NativeDialogContentProps, NativeDialogDescription, NativeDialogDescriptionProps, NativeDialogFooter, NativeDialogFooterProps, NativeDialogHeader, NativeDialogHeaderProps, NativeDialogProps, NativeDialogTitle, NativeDialogTitleProps, NativeDrawer, NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuContentProps, NativeDropdownMenuItem, NativeDropdownMenuItemProps, NativeDropdownMenuProps, NativeDropdownMenuTrigger, NativeDropdownMenuTriggerProps, NativeEmptyState, NativeEmptyStateProps, NativeEmptyStateVariant, NativeFullScreenModal, NativeFullScreenModalProps, NativeGalleryCard, NativeGalleryCardProps, NativeGalleryGrid, NativeGalleryGridProps, NativeGalleryLayout, NativeGlassSurface, NativeGlassSurfaceProps, NativeHeaderCard, NativeHeaderCardProps, NativeIcon, NativeIconProps, NativeImage, NativeImageProps, NativeInlineAlert, NativeInlineAlertProps, NativeInlineAlertVariant, NativeInput, NativeInputProps, NativeLabel, NativeLabelProps, NativeLightbox, NativeLightboxLabels, NativeLightboxProps, NativeListItem, NativeListItemDivider, NativeListItemProps, NativeLiveIndicator, NativeLiveIndicatorProps, NativeLiveIndicatorState, NativeLiveIndicatorVariant, NativeLoadingState, NativeLoadingStateEdge, NativeLoadingStateProps, NativeNumberInput, NativeNumberInputProps, NativePagination, NativePaginationProps, NativePopover, NativePopoverContent, NativePopoverContentProps, NativePopoverProps, NativePopoverTrigger, NativePopoverTriggerProps, NativeProgress, NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, NativeRadioGroupItemProps, NativeRadioGroupProps, NativeRangeSlider, NativeRangeSliderProps, NativeRating, NativeRatingProps, NativeRatingSize, NativeRatingTone, NativeRefreshControl, NativeRefreshControlProps, NativeSearchBar, NativeSearchBarProps, NativeSectionListHeader, NativeSectionListHeaderProps, NativeSegmentedControl, NativeSegmentedControlOption, NativeSegmentedControlProps, NativeSelect, NativeSelectContent, NativeSelectContentProps, NativeSelectItem, NativeSelectItemProps, NativeSelectProps, NativeSelectTrigger, NativeSelectTriggerProps, NativeSeparator, NativeSeparatorProps, NativeShareSheet, NativeShareSheetProps, NativeSheet, NativeSheetLibrary, NativeSheetProps, NativeSheetProvider, NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, NativeSkeletonProps, NativeSlider, NativeSliderProps, NativeStepper, NativeStepperProps, NativeStepperStep, NativeSwipeRow, NativeSwipeRowProps, NativeSwitch, NativeSwitchProps, NativeTabBar, NativeTabBarItem, NativeTabBarProps, NativeTabs, NativeTabsContent, NativeTabsContentProps, NativeTabsList, NativeTabsListProps, NativeTabsProps, NativeTabsTrigger, NativeTabsTriggerProps, NativeText, NativeTextProps, NativeTextarea, NativeTextareaProps, NativeThreadList, NativeThreadListHandle, NativeThreadListProps, NativeTierBadge, NativeTierBadgeProps, NativeTimePicker, NativeTimePickerProps, NativeToastOptions, NativeToastProvider, NativeToastProviderProps, NativeToastVariant, NativeToggle, NativeToggleProps, NativeTooltip, NativeTooltipContent, NativeTooltipContentProps, NativeTooltipProps, NativeTooltipTrigger, NativeTooltipTriggerProps, NativeWhatsNewNote, NativeWhatsNewSheet, NativeWhatsNewSheetProps, NativeZoomablePhoto, NativeZoomablePhotoProps, SpaceToken, SpacingPrefix, Stack, StackProps, THREAD_AT_BOTTOM_POINTS, TextPreset, ThreadRowInfo, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, textVariants, threadListMode, threadNearBottom, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from './components/index.js';
2
+ export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, b as GenesisGlassModule, c as GenesisHapticsModule, d as GenesisIconComponent, e as GenesisIconSet, f as GenesisImageComponent, g as GenesisImageProps, h as GenesisListComponent, i as GenesisListProps, j as GenesisModules, k as GenesisModulesProvider, l as GenesisModulesProviderProps, m as GenesisNavigationModule, n as GenesisNavigationTheme, o as GenesisReanimatedModule, p as GenesisSymbolComponent, q as GenesisSymbolProps, H as HapticKind, K as KeyboardAvoidingLike, N as NATIVE_ICON_NAMES, r as NativeIconName, S as SF_SYMBOLS, s as playHaptic, u as useGenesisModules, t as useHaptics } from './native-modules-CeAaO2Dh.js';
3
3
  export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, GalleryItem, GalleryTileAspect, JustifiedRow, JustifiedTile, galleryItemRatio, justifyRows } from '@marktiderman/genesis-core/gallery';
4
- export { BrandExtensionsProvider, BrandExtensionsProviderProps, BrandExtensionsValue, MotionHow, MotionSpringConfig, MotionTimingConfig, ThemeMode, ThemeRoleColors, UseMotionOptions, UseThemeRolesOptions, animateMotion, motionSpring, motionTiming, useGenesisExtension, useMotion, useReducedMotion, useThemeMode, useThemeRoles } from './hooks/index.js';
4
+ export { BrandExtensionsProvider, BrandExtensionsProviderProps, BrandExtensionsValue, MotionHow, MotionSpringConfig, MotionTimingConfig, PressFeedback, PressFeedbackOptions, ThemeMode, ThemeRoleColors, UseMotionOptions, UseThemeRolesOptions, animateMotion, motionSpring, motionTiming, sentBubbleColor, useGenesisExtension, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from './hooks/index.js';
5
5
  export { ComposerMode, ComposerTone, InboxItem, InboxSwipeAction, JUMP_SETTLE_MS, MessageTone, ThreadAttachment, ThreadComposer, ThreadLabels, ThreadMessage, ThreadMessageStatus, UseThreadJumpOptions, formatInboxTime, readReceiptFor, useThreadJump } from '@marktiderman/genesis-core/conversation';
6
- export { I as InboxPage, a as InboxPageProps, b as InboxPageSlotMap, S as SafeAreaEdge, c as ScreenContainer, d as ScreenContainerProps, e as ScreenHeaderProps, f as ScrollEdgeBehavior, g as composeHeaderOptions, h as getInboxPageStackOptions, s as showInboxActions } from './inbox-page-B7_Oi2fS.js';
6
+ export { I as InboxPage, a as InboxPageProps, b as InboxPageSlotMap, S as SafeAreaEdge, c as ScreenContainer, d as ScreenContainerProps, e as ScreenHeaderProps, f as ScrollEdgeBehavior, g as composeHeaderOptions, h as getInboxPageStackOptions, s as showInboxActions } from './inbox-page-BGqR_cBs.js';
7
7
  export { AppleButtonModuleLike, AppleProviderOptions, AppleSignInButton, AppleSignInButtonProps, AuthBranding, AuthBrandingProps, AuthForm, AuthFormProps, AuthFormValues, AuthScreen, AuthScreenProps, AuthScreenSlotMap, ForgotPasswordLink, GoogleProviderOptions, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProps, KeyboardScrollProvider, KeyboardToolbarProps, NavBarSaveButton, NavBarSaveButtonProps, NavBarSearchBar, NavBarSearchBarProps, NavBarTitle, NavBarTitleProps, NotificationItem, NotificationsPage, NotificationsPageProps, NotificationsPageSlotMap, SettingsPage, SettingsPageDangerousAction, SettingsPageProps, SettingsPageRow, SettingsPageSection, SettingsPageSlotMap, SettingsSubPage, SettingsSubPageProps, SocialAuthProvider, SocialAuthRow, SocialAuthRowProps, ThreadPage, ThreadPageProps, ThreadPageSlotMap, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, useKeyboardScroll, useKeyboardToolbar } from './layouts/index.js';
8
8
  export { cn } from './utils.js';
9
9
  import 'react';
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- export { Box, FULL_SCREEN_DARK, Grid, Inline, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeChip, NativeChipGroup, NativeCombobox, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeFullScreenModal, NativeGalleryCard, NativeGlassSurface, NativeHeaderCard, NativeLightbox, NativeLiveIndicator, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRating, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, NativeZoomablePhoto, Stack, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from './chunk-2Z72MYHB.js';
2
- export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeAvatar, NativeBanner, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeDatePicker, NativeGalleryGrid, NativeImage, NativeInlineAlert, NativeLabel, NativeSearchBar, NativeSegmentedControl, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSwitch, NativeTextarea, NativeTimePicker, alertVariants, galleryItemRatio, justifyRows } from './chunk-NDXNSSM6.js';
3
- export { BrandExtensionsProvider, JUMP_SETTLE_MS, useGenesisExtension, useThreadJump } from './chunk-ZRQAFFTN.js';
4
- export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NotificationsPage, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, useKeyboardScroll, useKeyboardToolbar } from './chunk-FUMSL7VZ.js';
5
- export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from './chunk-SEJ6RBP7.js';
6
- export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from './chunk-AGTBABAH.js';
7
- export { GenesisModulesProvider, NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSkeleton, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants, useGenesisModules } from './chunk-6PGLX6ET.js';
8
- export { animateMotion, motionSpring, motionTiming, useMotion, useReducedMotion, useThemeMode, useThemeRoles } from './chunk-4OQOJ2OC.js';
1
+ export { Box, FULL_SCREEN_DARK, Grid, Inline, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeBulkBar, NativeChip, NativeChipGroup, NativeChoiceCard, NativeCombobox, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeFullScreenModal, NativeGalleryCard, NativeGlassSurface, NativeHeaderCard, NativeLightbox, NativeLiveIndicator, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRating, NativeShareSheet, NativeSlider, NativeStepper, NativeTabBar, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTierBadge, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, NativeWhatsNewSheet, NativeZoomablePhoto, Stack, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast } from './chunk-UZCJDMGE.js';
2
+ export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeAvatar, NativeBanner, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeDatePicker, NativeGalleryGrid, NativeImage, NativeInlineAlert, NativeLabel, NativeSearchBar, NativeSegmentedControl, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSwitch, NativeTextarea, NativeTimePicker, alertVariants, galleryItemRatio, justifyRows } from './chunk-DHONOH6K.js';
3
+ export { BrandExtensionsProvider, JUMP_SETTLE_MS, useGenesisExtension, useThreadJump } from './chunk-FOJJB6AB.js';
4
+ export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NotificationsPage, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, useKeyboardScroll, useKeyboardToolbar } from './chunk-T7FEVT62.js';
5
+ export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from './chunk-JZ7RAGDQ.js';
6
+ export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from './chunk-PWYMRUAK.js';
7
+ export { NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeContextMenu, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSkeleton, NativeSwipeRow, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants } from './chunk-FGIIBON3.js';
8
+ export { GenesisModulesProvider, animateMotion, motionSpring, motionTiming, playHaptic, sentBubbleColor, useGenesisModules, useHaptics, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from './chunk-PWS2HLDE.js';
9
9
  export { cn } from './chunk-OHZD7KRO.js';
10
10
  import './chunk-DGUM43GV.js';
11
11
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { e as ScreenHeaderProps } from '../inbox-page-B7_Oi2fS.js';
2
- export { I as InboxPage, a as InboxPageProps, b as InboxPageSlotMap, S as SafeAreaEdge, c as ScreenContainer, d as ScreenContainerProps, f as ScrollEdgeBehavior, g as composeHeaderOptions, h as getInboxPageStackOptions, s as showInboxActions } from '../inbox-page-B7_Oi2fS.js';
1
+ import { e as ScreenHeaderProps } from '../inbox-page-BGqR_cBs.js';
2
+ export { I as InboxPage, a as InboxPageProps, b as InboxPageSlotMap, S as SafeAreaEdge, c as ScreenContainer, d as ScreenContainerProps, f as ScrollEdgeBehavior, g as composeHeaderOptions, h as getInboxPageStackOptions, s as showInboxActions } from '../inbox-page-BGqR_cBs.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode, ComponentType } from 'react';
5
5
  import { Slots, SlotPropsFor } from '@marktiderman/genesis-core/slots';
@@ -335,6 +335,8 @@ type ThreadPageSlotMap = {
335
335
  empty: {
336
336
  title: string;
337
337
  body: string;
338
+ actionLabel?: string | undefined;
339
+ onAction?: (() => void) | undefined;
338
340
  testID: string;
339
341
  };
340
342
  };
@@ -368,6 +370,13 @@ interface ThreadPageProps extends ScreenHeaderProps {
368
370
  onJumpFailed?: (id: string) => void;
369
371
  /** The first page is loading: a skeleton instead of the empty state, and a jump waits for it. */
370
372
  loading?: boolean;
373
+ /** The read failed and there are no messages: the empty slot shows `errorTitle` / `errorBody` instead. */
374
+ error?: boolean;
375
+ errorTitle?: string;
376
+ errorBody?: string;
377
+ /** A "Try again" button with `error`. */
378
+ onRetry?: () => void;
379
+ retryLabel?: string;
371
380
  /** Fresher rows are on their way (the cache showed first): a quiet "Updating…" line under the header region, announced once. */
372
381
  updating?: boolean;
373
382
  /**
@@ -390,7 +399,7 @@ interface ThreadPageProps extends ScreenHeaderProps {
390
399
  declare function getThreadPageStackOptions(props: ScreenHeaderProps & {
391
400
  headerTitle?: string;
392
401
  }): Record<string, unknown>;
393
- declare function ThreadPage({ messages, composer, closedNotice, header, readAt, readLabel, hasEarlier, onLoadEarlier, loadingEarlier, earlierLabel, firstUnreadId, jumpTo, onLoadUntil, onJumpFailed, loading, updating, keyboardVerticalOffset, emptyTitle, emptyBody, formatTime, labels: labelOverrides, slots, slotProps, testID, }: ThreadPageProps): react.JSX.Element;
402
+ declare function ThreadPage({ messages, composer, closedNotice, header, readAt, readLabel, hasEarlier, onLoadEarlier, loadingEarlier, earlierLabel, firstUnreadId, jumpTo, onLoadUntil, onJumpFailed, loading, error, errorTitle, errorBody, onRetry, retryLabel, updating, keyboardVerticalOffset, emptyTitle, emptyBody, formatTime, labels: labelOverrides, slots, slotProps, testID, }: ThreadPageProps): react.JSX.Element;
394
403
 
395
404
  interface AuthBrandingProps {
396
405
  /** Brand mark (logo node). */
@@ -1,8 +1,8 @@
1
- export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NotificationsPage, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, useKeyboardScroll, useKeyboardToolbar } from '../chunk-FUMSL7VZ.js';
2
- import '../chunk-SEJ6RBP7.js';
3
- export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from '../chunk-AGTBABAH.js';
4
- import '../chunk-6PGLX6ET.js';
5
- import '../chunk-4OQOJ2OC.js';
1
+ export { AppleSignInButton, AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KEYBOARD_TOOLBAR_HEIGHT, KeyboardScrollProvider, NotificationsPage, SettingsPage, SettingsSubPage, SocialAuthRow, ThreadPage, appleProvider, confirmDiscardChanges, defaultStickyHeaderOffset, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, getThreadPageStackOptions, googleProvider, iosCompactNavigationBarHeight, readReceiptFor, useKeyboardScroll, useKeyboardToolbar } from '../chunk-T7FEVT62.js';
2
+ import '../chunk-JZ7RAGDQ.js';
3
+ export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from '../chunk-PWYMRUAK.js';
4
+ import '../chunk-FGIIBON3.js';
5
+ import '../chunk-PWS2HLDE.js';
6
6
  import '../chunk-OHZD7KRO.js';
7
7
  import '../chunk-DGUM43GV.js';
8
8
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,32 @@ import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
3
  import { ColorValue } from 'react-native';
4
4
 
5
+ /** What a haptic says. */
6
+ type HapticKind = "light" | "medium" | "heavy" | "select" | "success" | "warning" | "error";
7
+ /**
8
+ * `import * as Haptics from "expo-haptics"`: the parts Genesis calls, written structurally (the
9
+ * same shape as genesis-chat's `HapticsLike`, so one module serves both).
10
+ */
11
+ interface GenesisHapticsModule {
12
+ impactAsync(style?: never): Promise<void>;
13
+ selectionAsync(): Promise<void>;
14
+ notificationAsync(type?: never): Promise<void>;
15
+ ImpactFeedbackStyle: {
16
+ Light: unknown;
17
+ Medium: unknown;
18
+ Heavy?: unknown;
19
+ };
20
+ NotificationFeedbackType: {
21
+ Success: unknown;
22
+ Warning: unknown;
23
+ Error: unknown;
24
+ };
25
+ }
26
+ /** Plays a haptic on the module given; never throws and never rejects. No module, no haptic. */
27
+ declare function playHaptic(haptics: GenesisHapticsModule | undefined, kind: HapticKind): void;
28
+ /** A function that plays a haptic through the app's `GenesisModules.haptics`. Stable across renders. */
29
+ declare function useHaptics(): (kind: HapticKind) => void;
30
+
5
31
  /**
6
32
  * The semantic icon names Genesis components ask for, and the SF Symbol each
7
33
  * one draws on iOS. Components say "settings" or "bell", never a library's
@@ -11,19 +37,19 @@ import { ColorValue } from 'react-native';
11
37
  * @stability Beta
12
38
  */
13
39
  declare const SF_SYMBOLS: {
40
+ readonly aperture: "camera.aperture";
14
41
  readonly "arrow-left": "arrow.left";
15
42
  readonly "arrow-up": "arrow.up";
16
- readonly aperture: "camera.aperture";
17
43
  readonly bell: "bell";
18
44
  readonly calendar: "calendar";
19
45
  readonly camera: "camera";
20
46
  readonly "camera-flip": "arrow.triangle.2.circlepath.camera";
21
47
  readonly check: "checkmark";
22
- readonly clapperboard: "movieclapper";
23
48
  readonly "chevron-down": "chevron.down";
24
49
  readonly "chevron-left": "chevron.left";
25
50
  readonly "chevron-right": "chevron.right";
26
51
  readonly "chevron-up": "chevron.up";
52
+ readonly clapperboard: "movieclapper";
27
53
  readonly clock: "clock";
28
54
  readonly close: "xmark";
29
55
  readonly compose: "square.and.pencil";
@@ -33,13 +59,18 @@ declare const SF_SYMBOLS: {
33
59
  readonly error: "xmark.circle";
34
60
  readonly expand: "arrow.up.left.and.arrow.down.right";
35
61
  readonly "external-link": "arrow.up.right.square";
62
+ readonly eye: "eye";
36
63
  readonly file: "doc";
37
64
  readonly filter: "line.3.horizontal.decrease";
38
65
  readonly "folder-plus": "folder.badge.plus";
66
+ readonly grid: "square.grid.2x2";
67
+ readonly grip: "line.3.horizontal";
39
68
  readonly heart: "heart";
40
69
  readonly home: "house";
41
70
  readonly image: "photo";
42
71
  readonly info: "info.circle";
72
+ readonly link: "link";
73
+ readonly list: "list.bullet";
43
74
  readonly lock: "lock";
44
75
  readonly "log-out": "rectangle.portrait.and.arrow.right";
45
76
  readonly mail: "envelope";
@@ -55,6 +86,7 @@ declare const SF_SYMBOLS: {
55
86
  readonly play: "play.fill";
56
87
  readonly plus: "plus";
57
88
  readonly radio: "dot.radiowaves.left.and.right";
89
+ readonly redo: "arrow.uturn.forward";
58
90
  readonly refresh: "arrow.clockwise";
59
91
  readonly reply: "arrowshape.turn.up.left";
60
92
  readonly search: "magnifyingglass";
@@ -62,10 +94,14 @@ declare const SF_SYMBOLS: {
62
94
  readonly "settings-2": "slider.horizontal.3";
63
95
  readonly share: "square.and.arrow.up";
64
96
  readonly smile: "face.smiling";
97
+ readonly sort: "arrow.up.arrow.down";
65
98
  readonly star: "star";
66
99
  readonly stop: "stop.fill";
67
100
  readonly success: "checkmark.circle";
101
+ readonly table: "tablecells";
68
102
  readonly trash: "trash";
103
+ readonly undo: "arrow.uturn.backward";
104
+ readonly upload: "tray.and.arrow.up";
69
105
  readonly user: "person";
70
106
  readonly video: "video";
71
107
  readonly volume: "speaker.wave.2.fill";
@@ -260,7 +296,23 @@ interface GenesisModules {
260
296
  navigation?: GenesisNavigationModule;
261
297
  /** react-native-keyboard-controller's `KeyboardAvoidingView` (it takes `behavior: "translate-with-padding"`). */
262
298
  keyboardAvoidingView?: KeyboardAvoidingLike;
299
+ /** expo-haptics (`import * as Haptics from "expo-haptics"`): `useHaptics`, `usePressFeedback`, and the primitives that answer a touch. Without it, no haptics. */
300
+ haptics?: GenesisHapticsModule;
301
+ /** react-native-gesture-handler's `ReanimatedSwipeable`: NativeSwipeRow and InboxPage's rows. Without it, no swipe; the actions stay on long press. */
302
+ swipeable?: GenesisSwipeableComponent;
263
303
  }
304
+ /** The props NativeSwipeRow passes; `ReanimatedSwipeable` takes them, and its ref has `close()`. */
305
+ type GenesisSwipeableComponent = ComponentType<{
306
+ ref?: unknown;
307
+ testID?: string;
308
+ friction?: number;
309
+ overshootLeft?: boolean;
310
+ overshootRight?: boolean;
311
+ onSwipeableWillOpen?: () => void;
312
+ renderLeftActions?: () => ReactNode;
313
+ renderRightActions?: () => ReactNode;
314
+ children?: ReactNode;
315
+ }>;
264
316
  interface GenesisModulesProviderProps {
265
317
  modules: GenesisModules;
266
318
  children: ReactNode;
@@ -276,4 +328,4 @@ declare function GenesisModulesProvider({ modules, children }: GenesisModulesPro
276
328
  /** The modules given to the nearest `GenesisModulesProvider`; `{}` without one. */
277
329
  declare function useGenesisModules(): GenesisModules;
278
330
 
279
- export { type GenesisDatePickerComponent as G, type KeyboardAvoidingLike as K, NATIVE_ICON_NAMES as N, SF_SYMBOLS as S, type GenesisDatePickerProps as a, type GenesisGlassModule as b, type GenesisIconComponent as c, type GenesisIconSet as d, type GenesisImageComponent as e, type GenesisImageProps as f, type GenesisListComponent as g, type GenesisListProps as h, type GenesisModules as i, GenesisModulesProvider as j, type GenesisModulesProviderProps as k, type GenesisNavigationModule as l, type GenesisNavigationTheme as m, type GenesisReanimatedModule as n, type GenesisSymbolComponent as o, type GenesisSymbolProps as p, type NativeIconName as q, useGenesisModules as u };
331
+ export { type GenesisDatePickerComponent as G, type HapticKind as H, type KeyboardAvoidingLike as K, NATIVE_ICON_NAMES as N, SF_SYMBOLS as S, type GenesisDatePickerProps as a, type GenesisGlassModule as b, type GenesisHapticsModule as c, type GenesisIconComponent as d, type GenesisIconSet as e, type GenesisImageComponent as f, type GenesisImageProps as g, type GenesisListComponent as h, type GenesisListProps as i, type GenesisModules as j, GenesisModulesProvider as k, type GenesisModulesProviderProps as l, type GenesisNavigationModule as m, type GenesisNavigationTheme as n, type GenesisReanimatedModule as o, type GenesisSymbolComponent as p, type GenesisSymbolProps as q, type NativeIconName as r, playHaptic as s, useHaptics as t, useGenesisModules as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marktiderman/genesis-ui-native",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -83,7 +83,7 @@
83
83
  "@expo/ui": ">=58.0.0",
84
84
  "@gorhom/bottom-sheet": ">=5.0.0",
85
85
  "@hookform/resolvers": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
86
- "@marktiderman/genesis-core": "^2.11.0",
86
+ "@marktiderman/genesis-core": "^2.12.0",
87
87
  "@marktiderman/genesis-design-system": "^1.8.0",
88
88
  "@react-native-community/datetimepicker": ">=8.0.0",
89
89
  "@shopify/flash-list": ">=2.0.0",
@@ -215,6 +215,29 @@
215
215
  "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md#motion",
216
216
  "why": "Motion is defined once, and Reduce Motion is honoured in one place; a duration or spring written as a number drifts from the rest of the app."
217
217
  },
218
+ {
219
+ "id": "haptics-use-genesis",
220
+ "need": "a haptic on the phone",
221
+ "level": "warn",
222
+ "platform": "native",
223
+ "newOnly": true,
224
+ "files": [
225
+ "**/*.tsx",
226
+ "**/*.ts"
227
+ ],
228
+ "exclude": [
229
+ "**/__tests__/**",
230
+ "**/*.test.ts",
231
+ "**/*.test.tsx"
232
+ ],
233
+ "forbid": {
234
+ "pattern": "(?:\\bimport\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*[\"']expo-haptics[\"'][\\s\\S]*?\\b\\1\\??\\.(?:impactAsync|selectionAsync|notificationAsync)\\(|\\bHaptics\\??\\.(?:impactAsync|selectionAsync|notificationAsync)\\(|\\bimport\\s*\\{[^}]*\\b(?:impactAsync|selectionAsync|notificationAsync)\\b[^}]*\\}\\s*from\\s*[\"']expo-haptics[\"'])"
235
+ },
236
+ "use": "useHaptics() (or a NativeButton's `haptic`, usePressFeedback for a pressable of your own), with expo-haptics passed once as GenesisModules.haptics",
237
+ "import": "@marktiderman/genesis-ui-native",
238
+ "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md#haptics-and-press-feedback",
239
+ "why": "Haptics are named once (light, select, success…) and go through one module that never throws; a direct expo-haptics call picks its own styles and breaks where the module isn't installed."
240
+ },
218
241
  {
219
242
  "id": "threads-use-thread-list",
220
243
  "need": "a conversation's message list on the phone",
@@ -272,6 +295,24 @@
272
295
  "import": "@marktiderman/genesis-ui-native/components",
273
296
  "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md"
274
297
  },
298
+ {
299
+ "need": "a row's actions behind a swipe on the phone",
300
+ "use": "NativeSwipeRow, on GenesisModules.swipeable",
301
+ "import": "@marktiderman/genesis-ui-native/components",
302
+ "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md"
303
+ },
304
+ {
305
+ "need": "what a long press opens on the phone: a short list of actions",
306
+ "use": "NativeContextMenu",
307
+ "import": "@marktiderman/genesis-ui-native/components",
308
+ "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md"
309
+ },
310
+ {
311
+ "need": "a selectable option card on the phone (radio or checkbox, with a picture or a description)",
312
+ "use": "NativeChoiceCard",
313
+ "import": "@marktiderman/genesis-ui-native/components",
314
+ "docs": "https://github.com/marktiderman/genesis/blob/main/packages/ui-native/README.md"
315
+ },
275
316
  {
276
317
  "need": "a star rating on the phone",
277
318
  "use": "NativeRating",
@@ -283,6 +324,36 @@
283
324
  "use": "the view's gallery block (defineView) rendered by <NativeResourceView mode=\"grid\">; NativeGalleryGrid for photos that aren't records (attachments, uploads)",
284
325
  "import": "@marktiderman/genesis-ui-native",
285
326
  "docs": "https://github.com/marktiderman/genesis/blob/main/docs/RESOURCE-VIEW.md#gallery"
327
+ },
328
+ {
329
+ "need": "a bottom tab bar with any number of tabs",
330
+ "use": "NativeTabBar (past max, the last slot is More, which opens a NativeSheet)",
331
+ "import": "@marktiderman/genesis-ui-native",
332
+ "docs": "https://github.com/marktiderman/genesis/blob/main/docs/DESIGN-LIBRARY.md"
333
+ },
334
+ {
335
+ "need": "actions on the rows a list has selected",
336
+ "use": "NativeBulkBar",
337
+ "import": "@marktiderman/genesis-ui-native",
338
+ "docs": "https://github.com/marktiderman/genesis/blob/main/docs/DESIGN-LIBRARY.md"
339
+ },
340
+ {
341
+ "need": "sharing a published page's link, with a QR code",
342
+ "use": "NativeShareSheet with url, renderQr and onCopy",
343
+ "import": "@marktiderman/genesis-ui-native",
344
+ "docs": "https://github.com/marktiderman/genesis/blob/main/docs/DESIGN-LIBRARY.md"
345
+ },
346
+ {
347
+ "need": "a what's new sheet after an update",
348
+ "use": "NativeWhatsNewSheet",
349
+ "import": "@marktiderman/genesis-ui-native",
350
+ "docs": "https://github.com/marktiderman/genesis/blob/main/docs/DESIGN-LIBRARY.md"
351
+ },
352
+ {
353
+ "need": "a rank or tier label (Gold, Level 3) in a brand accent",
354
+ "use": "NativeTierBadge with tone set to a key of the brand's accents",
355
+ "import": "@marktiderman/genesis-ui-native",
356
+ "docs": "https://github.com/marktiderman/genesis/blob/main/docs/DESIGN-LIBRARY.md"
286
357
  }
287
358
  ]
288
359
  }
@@ -58,3 +58,30 @@ describe("threads-use-thread-list", () => {
58
58
  (code) => expect(re.test(code)).toBe(false),
59
59
  );
60
60
  });
61
+
62
+ describe("haptics-use-genesis", () => {
63
+ const { re, exclude } = rule("haptics-use-genesis") as ReturnType<typeof rule> & { exclude?: string[] };
64
+
65
+ it("leaves tests alone (a mock of expo-haptics calls it)", () => {
66
+ expect(exclude).toEqual(expect.arrayContaining(["**/__tests__/**"]));
67
+ });
68
+
69
+ it.each([
70
+ ["Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)"],
71
+ ["void Haptics.selectionAsync()"],
72
+ ["await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success)"],
73
+ ['import { impactAsync, ImpactFeedbackStyle } from "expo-haptics";'],
74
+ ["import {\n selectionAsync,\n} from 'expo-haptics'"],
75
+ ['import * as H from "expo-haptics";\nfunction tap() {\n void H.impactAsync(H.ImpactFeedbackStyle.Light);\n}'],
76
+ ["Haptics?.selectionAsync()"],
77
+ ])("flags %s", (code) => expect(re.test(code)).toBe(true));
78
+
79
+ it.each([
80
+ ['import * as Haptics from "expo-haptics";\nconst modules = { haptics: Haptics };'],
81
+ ["haptics.impactAsync(as(styles.Light))"],
82
+ ['const play = useHaptics(); play("light")'],
83
+ ['<NativeButton haptic="success" onPress={save}>Save</NativeButton>'],
84
+ ['import { impactAsync } from "./my-haptics";'],
85
+ ['import * as H from "expo-haptics";\nconst modules = { haptics: H };\nvideo.impactAsync()'],
86
+ ])("leaves %s alone", (code) => expect(re.test(code)).toBe(false));
87
+ });
@@ -32,6 +32,7 @@ vi.mock("lucide-react-native", () => {
32
32
  "ArrowUp", "Camera", "Copy", "File", "Image", "MessageCircle", "Mic", "Paperclip", "Pause", "Pin", "Play", "Reply", "SquarePen",
33
33
  "Download", "Smile", "Maximize2", "Square", "SwitchCamera", "Video", "Volume2", "VolumeX",
34
34
  "Aperture", "Clapperboard", "FolderPlus", "Maximize", "Radio", "Settings2",
35
+ "ArrowUpDown", "Eye", "GripVertical", "LayoutGrid", "Link", "List", "Redo2", "Table", "Undo2", "Upload",
35
36
  ];
36
37
  return Object.fromEntries(names.map((n) => [n, icon(n)]));
37
38
  });