@marktiderman/genesis-ui-native 3.6.0 → 3.7.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 (47) hide show
  1. package/README.md +44 -0
  2. package/dist/{chunk-AGTBABAH.js → chunk-3KFUS7O6.js} +4 -4
  3. package/dist/{chunk-AGTBABAH.js.map → chunk-3KFUS7O6.js.map} +1 -1
  4. package/dist/{chunk-2Z72MYHB.js → chunk-7NDKIIOT.js} +5 -5
  5. package/dist/{chunk-2Z72MYHB.js.map → chunk-7NDKIIOT.js.map} +1 -1
  6. package/dist/chunk-CAI7LGN6.js +39 -0
  7. package/dist/chunk-CAI7LGN6.js.map +1 -0
  8. package/dist/{chunk-FUMSL7VZ.js → chunk-GBNIBHSU.js} +6 -6
  9. package/dist/{chunk-FUMSL7VZ.js.map → chunk-GBNIBHSU.js.map} +1 -1
  10. package/dist/{chunk-SEJ6RBP7.js → chunk-IXC3LO2K.js} +100 -51
  11. package/dist/chunk-IXC3LO2K.js.map +1 -0
  12. package/dist/{chunk-NDXNSSM6.js → chunk-KH2RVAI5.js} +3 -4
  13. package/dist/chunk-KH2RVAI5.js.map +1 -0
  14. package/dist/{chunk-6PGLX6ET.js → chunk-O4BMDV7I.js} +14 -16
  15. package/dist/chunk-O4BMDV7I.js.map +1 -0
  16. package/dist/{chunk-4OQOJ2OC.js → chunk-RTYO24SC.js} +30 -5
  17. package/dist/chunk-RTYO24SC.js.map +1 -0
  18. package/dist/{chunk-ZRQAFFTN.js → chunk-YWDDDYDI.js} +2 -2
  19. package/dist/{chunk-ZRQAFFTN.js.map → chunk-YWDDDYDI.js.map} +1 -1
  20. package/dist/components/index.d.ts +55 -10
  21. package/dist/components/index.js +6 -5
  22. package/dist/data/index.js +4 -4
  23. package/dist/hooks/index.d.ts +32 -3
  24. package/dist/hooks/index.js +3 -2
  25. package/dist/icons/lucide.d.ts +1 -1
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +9 -8
  28. package/dist/layouts/index.js +6 -5
  29. package/dist/{native-modules-Cl3zw3kh.d.ts → native-modules-DEJJQhDx.d.ts} +29 -1
  30. package/package.json +25 -2
  31. package/src/__tests__/doctor-rules.test.ts +27 -0
  32. package/src/components/__tests__/button-haptic.test.tsx +52 -0
  33. package/src/components/__tests__/composer-bar.test.tsx +24 -0
  34. package/src/components/__tests__/thread-list.test.tsx +63 -0
  35. package/src/components/button.tsx +18 -1
  36. package/src/components/composer-bar.tsx +101 -23
  37. package/src/components/index.ts +1 -1
  38. package/src/components/thread-list.tsx +43 -13
  39. package/src/hooks/__tests__/use-haptics.test.tsx +146 -0
  40. package/src/hooks/index.ts +2 -0
  41. package/src/hooks/use-haptics.ts +64 -0
  42. package/src/hooks/use-press-feedback.ts +87 -0
  43. package/src/native-modules.tsx +4 -0
  44. package/dist/chunk-4OQOJ2OC.js.map +0 -1
  45. package/dist/chunk-6PGLX6ET.js.map +0 -1
  46. package/dist/chunk-NDXNSSM6.js.map +0 -1
  47. package/dist/chunk-SEJ6RBP7.js.map +0 -1
@@ -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-YWDDDYDI.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"]}
@@ -3,8 +3,8 @@ import react__default, { ReactNode, ReactElement } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import { TextProps, AccessibilityState, ScrollViewProps, TextInputProps, ViewProps, ColorValue, SwitchProps } from 'react-native';
6
- import { q as NativeIconName, b as GenesisGlassModule } from '../native-modules-Cl3zw3kh.js';
7
- export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, c as GenesisIconComponent, d as GenesisIconSet, e as GenesisImageComponent, f as GenesisImageProps, g as GenesisListComponent, h as GenesisListProps, i as GenesisModules, j as GenesisModulesProvider, k as GenesisModulesProviderProps, l as GenesisNavigationModule, m as GenesisNavigationTheme, n as GenesisReanimatedModule, o as GenesisSymbolComponent, p as GenesisSymbolProps, K as KeyboardAvoidingLike, N as NATIVE_ICON_NAMES, S as SF_SYMBOLS, u as useGenesisModules } from '../native-modules-Cl3zw3kh.js';
6
+ import { H as HapticKind, r as NativeIconName, b as GenesisGlassModule } from '../native-modules-DEJJQhDx.js';
7
+ export { G as GenesisDatePickerComponent, a as GenesisDatePickerProps, 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, K as KeyboardAvoidingLike, N as NATIVE_ICON_NAMES, S as SF_SYMBOLS, u as useGenesisModules } from '../native-modules-DEJJQhDx.js';
8
8
  import { ComposerMode } from '@marktiderman/genesis-core/conversation';
9
9
  export { ComposerMode, ComposerTone } from '@marktiderman/genesis-core/conversation';
10
10
  import { GalleryItem, GalleryTileAspect } from '@marktiderman/genesis-core/gallery';
@@ -52,8 +52,13 @@ interface NativeButtonProps extends VariantProps<typeof buttonVariants> {
52
52
  accessibilityHint?: string;
53
53
  /** Merged with the button's own `disabled` and `busy`: `{ selected: true }` for a vote cast, a filter on. */
54
54
  accessibilityState?: AccessibilityState;
55
+ /**
56
+ * A haptic through `GenesisModules.haptics` (`light` for a vote, `success` for a save): it plays
57
+ * when the press counts, except `select`, which ticks on press-in as `usePressFeedback` does. Default none.
58
+ */
59
+ haptic?: HapticKind | undefined;
55
60
  }
56
- declare function NativeButton({ className, textClassName, variant, size, children, onPress, disabled, loading, accessibilityState, ...props }: NativeButtonProps): react.JSX.Element;
61
+ declare function NativeButton({ className, textClassName, variant, size, children, onPress, disabled, loading, accessibilityState, haptic, ...props }: NativeButtonProps): react.JSX.Element;
57
62
 
58
63
  interface NativeCardProps {
59
64
  className?: string;
@@ -564,10 +569,10 @@ interface NativeRefreshControlProps {
564
569
  declare function NativeRefreshControl({ tintColor, colors, testID, ...rest }: NativeRefreshControlProps): react.JSX.Element;
565
570
 
566
571
  declare const badgeVariants: (props?: ({
567
- variant?: "default" | "secondary" | "outline" | "destructive" | "info" | "success" | "warning" | "muted" | null | undefined;
572
+ variant?: "info" | "success" | "warning" | "default" | "secondary" | "outline" | "destructive" | "muted" | null | undefined;
568
573
  } & class_variance_authority_types.ClassProp) | undefined) => string;
569
574
  declare const badgeTextVariants: (props?: ({
570
- variant?: "default" | "secondary" | "outline" | "destructive" | "info" | "success" | "warning" | "muted" | null | undefined;
575
+ variant?: "info" | "success" | "warning" | "default" | "secondary" | "outline" | "destructive" | "muted" | null | undefined;
571
576
  } & class_variance_authority_types.ClassProp) | undefined) => string;
572
577
  interface NativeBadgeProps extends VariantProps<typeof badgeVariants> {
573
578
  className?: string;
@@ -631,13 +636,13 @@ interface NativeLoadingStateProps {
631
636
  declare function NativeLoadingState({ label, accessibilityLabel, size, fullScreen, safeAreaEdges, color, className, testID, }: NativeLoadingStateProps): react.JSX.Element;
632
637
 
633
638
  declare const alertVariants: (props?: ({
634
- variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
639
+ variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
635
640
  } & class_variance_authority_types.ClassProp) | undefined) => string;
636
641
  declare const alertTitleTextVariants: (props?: ({
637
- variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
642
+ variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
638
643
  } & class_variance_authority_types.ClassProp) | undefined) => string;
639
644
  declare const alertDescriptionTextVariants: (props?: ({
640
- variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
645
+ variant?: "info" | "success" | "warning" | "default" | "destructive" | null | undefined;
641
646
  } & class_variance_authority_types.ClassProp) | undefined) => string;
642
647
  interface NativeAlertProps extends VariantProps<typeof alertVariants> {
643
648
  className?: string;
@@ -1195,6 +1200,13 @@ interface NativeThreadListProps<T> {
1195
1200
  }) => ReactNode;
1196
1201
  /** Go to this row, loading earlier pages with `onLoadUntil` until it's here. A new id, or the same one after `null`, goes again. */
1197
1202
  jumpTo?: string | null;
1203
+ /**
1204
+ * The id `jumpTo` names a row by, when it isn't the row's key: a message keyed by the id the
1205
+ * phone gave it (so it keeps its row when the server's copy lands) and gone to by the server's
1206
+ * id. `null` for a row that can't be gone to (a day heading). `keyExtractor` by default.
1207
+ * Pass a stable function (module scope, or `useCallback`): a new one each render re-renders every row.
1208
+ */
1209
+ jumpId?: (row: T) => string | null | undefined;
1198
1210
  /** Load earlier pages until the row is held; resolve false when it can't be found. */
1199
1211
  onLoadUntil?: (id: string) => Promise<boolean>;
1200
1212
  /** What VoiceOver says on arriving at `jumpTo`. */
@@ -1239,9 +1251,42 @@ interface NativeComposerBarProps {
1239
1251
  leading?: ReactNode;
1240
1252
  trailing?: ReactNode;
1241
1253
  above?: ReactNode;
1254
+ /**
1255
+ * Whether there's nothing to send. By default, a blank `value`; pass `false` when attachments
1256
+ * are waiting and no text is needed.
1257
+ */
1258
+ empty?: boolean;
1259
+ /** Takes Send's place (the same 44pt spot) while there's nothing to send and nothing sending: a hold-to-record mic. */
1260
+ idleAction?: ReactNode;
1261
+ /** Shown instead of `leading` and the input (a recording in progress). Label it yourself: it's one region to VoiceOver. */
1262
+ replaceInput?: ReactNode;
1263
+ /** Touch and hold Send for these (one runs straight away; several open a menu). Each is also an accessibility action on Send. */
1264
+ sendActions?: readonly ComposerSendAction[];
1265
+ /** Title of the menu when there are several `sendActions`. */
1266
+ sendActionsTitle?: string;
1267
+ /** The hint on Send when it has `sendActions`. Default "Touch and hold for more options". */
1268
+ sendActionsHint?: string;
1269
+ /** Passed to the input (to insert at the cursor, say). */
1270
+ onSelectionChange?: (e: {
1271
+ nativeEvent: {
1272
+ selection: {
1273
+ start: number;
1274
+ end: number;
1275
+ };
1276
+ };
1277
+ }) => void;
1278
+ /** The input takes text (default). When false, nothing sends and the input reads as disabled. */
1279
+ editable?: boolean;
1242
1280
  testID?: string;
1243
1281
  }
1244
- declare function NativeComposerBar({ value, onChangeText, onSend, sending, disabled, placeholder, sendLabel, sendingLabel, maxLength, maxLines, modes, mode, onModeChange, leading, trailing, above, testID, }: NativeComposerBarProps): react.JSX.Element;
1282
+ /** Another way to send (touch and hold Send). */
1283
+ interface ComposerSendAction {
1284
+ id: string;
1285
+ label: string;
1286
+ onPress: () => void;
1287
+ destructive?: boolean;
1288
+ }
1289
+ declare function NativeComposerBar({ value, onChangeText, onSend, sending, disabled, placeholder, sendLabel, sendingLabel, maxLength, maxLines, modes, mode, onModeChange, leading, trailing, above, empty, idleAction, replaceInput, sendActions, sendActionsTitle, sendActionsHint, onSelectionChange, editable, testID, }: NativeComposerBarProps): react.JSX.Element;
1245
1290
 
1246
1291
  type NativeRatingSize = "sm" | "md" | "lg";
1247
1292
  interface NativeRatingProps {
@@ -1422,4 +1467,4 @@ interface NativeLiveIndicatorProps {
1422
1467
  }
1423
1468
  declare function NativeLiveIndicator({ live, state, label, detail, variant, className, testID, }: NativeLiveIndicatorProps): react.JSX.Element;
1424
1469
 
1425
- export { Box, type BoxBackground, type BoxProps, FULL_SCREEN_DARK, type FlexAlign, type FlexJustify, GenesisGlassModule, Grid, type GridProps, Inline, type InlineProps, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, type NativeAccordionContentProps, NativeAccordionItem, type NativeAccordionItemProps, type NativeAccordionProps, NativeAccordionTrigger, type NativeAccordionTriggerProps, type NativeAccordionType, NativeAlert, NativeAlertDescription, type NativeAlertDescriptionProps, type NativeAlertProps, NativeAlertTitle, type NativeAlertTitleProps, NativeAvatar, type NativeAvatarProps, NativeBadge, type NativeBadgeProps, NativeBanner, type NativeBannerProps, NativeButton, type NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, type NativeCardProps, NativeCardTitle, type NativeCardTitleProps, NativeCheckbox, type NativeCheckboxProps, NativeChip, NativeChipGroup, type NativeChipGroupMode, type NativeChipGroupProps, type NativeChipProps, NativeCombobox, type NativeComboboxOption, type NativeComboboxProps, NativeComposerBar, type NativeComposerBarProps, NativeDatePicker, type NativeDatePickerProps, NativeDialog, NativeDialogContent, type NativeDialogContentProps, NativeDialogDescription, type NativeDialogDescriptionProps, NativeDialogFooter, type NativeDialogFooterProps, NativeDialogHeader, type NativeDialogHeaderProps, type NativeDialogProps, NativeDialogTitle, type NativeDialogTitleProps, NativeDrawer, type NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, type NativeDropdownMenuContentProps, NativeDropdownMenuItem, type NativeDropdownMenuItemProps, type NativeDropdownMenuProps, NativeDropdownMenuTrigger, type NativeDropdownMenuTriggerProps, NativeEmptyState, type NativeEmptyStateProps, type NativeEmptyStateVariant, NativeFullScreenModal, type NativeFullScreenModalProps, NativeGalleryCard, type NativeGalleryCardProps, NativeGalleryGrid, type NativeGalleryGridProps, type NativeGalleryLayout, NativeGlassSurface, type NativeGlassSurfaceProps, NativeHeaderCard, type NativeHeaderCardProps, NativeIcon, NativeIconName, type NativeIconProps, NativeImage, type NativeImageProps, NativeInlineAlert, type NativeInlineAlertProps, type NativeInlineAlertVariant, NativeInput, type NativeInputProps, NativeLabel, type NativeLabelProps, NativeLightbox, type NativeLightboxLabels, type NativeLightboxProps, NativeListItem, NativeListItemDivider, type NativeListItemProps, NativeLiveIndicator, type NativeLiveIndicatorProps, type NativeLiveIndicatorState, type NativeLiveIndicatorVariant, NativeLoadingState, type NativeLoadingStateEdge, type NativeLoadingStateProps, NativeNumberInput, type NativeNumberInputProps, NativePagination, type NativePaginationProps, NativePopover, NativePopoverContent, type NativePopoverContentProps, type NativePopoverProps, NativePopoverTrigger, type NativePopoverTriggerProps, NativeProgress, type NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, type NativeRadioGroupItemProps, type NativeRadioGroupProps, NativeRangeSlider, type NativeRangeSliderProps, NativeRating, type NativeRatingProps, type NativeRatingSize, NativeRefreshControl, type NativeRefreshControlProps, NativeSearchBar, type NativeSearchBarProps, NativeSectionListHeader, type NativeSectionListHeaderProps, NativeSegmentedControl, type NativeSegmentedControlOption, type NativeSegmentedControlProps, NativeSelect, NativeSelectContent, type NativeSelectContentProps, NativeSelectItem, type NativeSelectItemProps, type NativeSelectProps, NativeSelectTrigger, type NativeSelectTriggerProps, NativeSeparator, type NativeSeparatorProps, NativeSheet, type NativeSheetLibrary, type NativeSheetProps, NativeSheetProvider, type NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, type NativeSkeletonProps, NativeSlider, type NativeSliderProps, NativeStepper, type NativeStepperProps, type NativeStepperStep, NativeSwitch, type NativeSwitchProps, NativeTabs, NativeTabsContent, type NativeTabsContentProps, NativeTabsList, type NativeTabsListProps, type NativeTabsProps, NativeTabsTrigger, type NativeTabsTriggerProps, NativeText, type NativeTextProps, NativeTextarea, type NativeTextareaProps, NativeThreadList, type NativeThreadListHandle, type NativeThreadListProps, NativeTimePicker, type NativeTimePickerProps, type NativeToastOptions, NativeToastProvider, type NativeToastProviderProps, type NativeToastVariant, NativeToggle, type NativeToggleProps, NativeTooltip, NativeTooltipContent, type NativeTooltipContentProps, type NativeTooltipProps, NativeTooltipTrigger, type NativeTooltipTriggerProps, NativeZoomablePhoto, type NativeZoomablePhotoProps, type SpaceToken, type SpacingPrefix, Stack, type StackProps, THREAD_AT_BOTTOM_POINTS, type TextPreset, type ThreadRowInfo, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, textVariants, threadListMode, threadNearBottom, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
1470
+ export { Box, type BoxBackground, type BoxProps, type ComposerSendAction, FULL_SCREEN_DARK, type FlexAlign, type FlexJustify, GenesisGlassModule, Grid, type GridProps, Inline, type InlineProps, LIGHTBOX_DISMISS_DISTANCE, LIGHTBOX_DISMISS_VELOCITY, LIGHTBOX_DOUBLE_TAP_MS, LIGHTBOX_MAX_ZOOM, NativeAccordion, NativeAccordionContent, type NativeAccordionContentProps, NativeAccordionItem, type NativeAccordionItemProps, type NativeAccordionProps, NativeAccordionTrigger, type NativeAccordionTriggerProps, type NativeAccordionType, NativeAlert, NativeAlertDescription, type NativeAlertDescriptionProps, type NativeAlertProps, NativeAlertTitle, type NativeAlertTitleProps, NativeAvatar, type NativeAvatarProps, NativeBadge, type NativeBadgeProps, NativeBanner, type NativeBannerProps, NativeButton, type NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, type NativeCardProps, NativeCardTitle, type NativeCardTitleProps, NativeCheckbox, type NativeCheckboxProps, NativeChip, NativeChipGroup, type NativeChipGroupMode, type NativeChipGroupProps, type NativeChipProps, NativeCombobox, type NativeComboboxOption, type NativeComboboxProps, NativeComposerBar, type NativeComposerBarProps, NativeDatePicker, type NativeDatePickerProps, NativeDialog, NativeDialogContent, type NativeDialogContentProps, NativeDialogDescription, type NativeDialogDescriptionProps, NativeDialogFooter, type NativeDialogFooterProps, NativeDialogHeader, type NativeDialogHeaderProps, type NativeDialogProps, NativeDialogTitle, type NativeDialogTitleProps, NativeDrawer, type NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, type NativeDropdownMenuContentProps, NativeDropdownMenuItem, type NativeDropdownMenuItemProps, type NativeDropdownMenuProps, NativeDropdownMenuTrigger, type NativeDropdownMenuTriggerProps, NativeEmptyState, type NativeEmptyStateProps, type NativeEmptyStateVariant, NativeFullScreenModal, type NativeFullScreenModalProps, NativeGalleryCard, type NativeGalleryCardProps, NativeGalleryGrid, type NativeGalleryGridProps, type NativeGalleryLayout, NativeGlassSurface, type NativeGlassSurfaceProps, NativeHeaderCard, type NativeHeaderCardProps, NativeIcon, NativeIconName, type NativeIconProps, NativeImage, type NativeImageProps, NativeInlineAlert, type NativeInlineAlertProps, type NativeInlineAlertVariant, NativeInput, type NativeInputProps, NativeLabel, type NativeLabelProps, NativeLightbox, type NativeLightboxLabels, type NativeLightboxProps, NativeListItem, NativeListItemDivider, type NativeListItemProps, NativeLiveIndicator, type NativeLiveIndicatorProps, type NativeLiveIndicatorState, type NativeLiveIndicatorVariant, NativeLoadingState, type NativeLoadingStateEdge, type NativeLoadingStateProps, NativeNumberInput, type NativeNumberInputProps, NativePagination, type NativePaginationProps, NativePopover, NativePopoverContent, type NativePopoverContentProps, type NativePopoverProps, NativePopoverTrigger, type NativePopoverTriggerProps, NativeProgress, type NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, type NativeRadioGroupItemProps, type NativeRadioGroupProps, NativeRangeSlider, type NativeRangeSliderProps, NativeRating, type NativeRatingProps, type NativeRatingSize, NativeRefreshControl, type NativeRefreshControlProps, NativeSearchBar, type NativeSearchBarProps, NativeSectionListHeader, type NativeSectionListHeaderProps, NativeSegmentedControl, type NativeSegmentedControlOption, type NativeSegmentedControlProps, NativeSelect, NativeSelectContent, type NativeSelectContentProps, NativeSelectItem, type NativeSelectItemProps, type NativeSelectProps, NativeSelectTrigger, type NativeSelectTriggerProps, NativeSeparator, type NativeSeparatorProps, NativeSheet, type NativeSheetLibrary, type NativeSheetProps, NativeSheetProvider, type NativeSheetProviderProps, NativeSheetScrollView, NativeSkeleton, type NativeSkeletonProps, NativeSlider, type NativeSliderProps, NativeStepper, type NativeStepperProps, type NativeStepperStep, NativeSwitch, type NativeSwitchProps, NativeTabs, NativeTabsContent, type NativeTabsContentProps, NativeTabsList, type NativeTabsListProps, type NativeTabsProps, NativeTabsTrigger, type NativeTabsTriggerProps, NativeText, type NativeTextProps, NativeTextarea, type NativeTextareaProps, NativeThreadList, type NativeThreadListHandle, type NativeThreadListProps, NativeTimePicker, type NativeTimePickerProps, type NativeToastOptions, NativeToastProvider, type NativeToastProviderProps, type NativeToastVariant, NativeToggle, type NativeToggleProps, NativeTooltip, NativeTooltipContent, type NativeTooltipContentProps, type NativeTooltipProps, NativeTooltipTrigger, type NativeTooltipTriggerProps, NativeZoomablePhoto, type NativeZoomablePhotoProps, type SpaceToken, type SpacingPrefix, Stack, type StackProps, THREAD_AT_BOTTOM_POINTS, type TextPreset, type ThreadRowInfo, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, defaultNativeLightboxLabels, lightboxPanLimit, lightboxPinchScale, lightboxShouldDismiss, lightboxTouchDistance, nextRating, spaceScale, spacingClass, textVariants, threadListMode, threadNearBottom, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
@@ -1,8 +1,9 @@
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 { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from '../chunk-SEJ6RBP7.js';
4
- 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';
5
- import '../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, 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-7NDKIIOT.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-KH2RVAI5.js';
3
+ export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from '../chunk-IXC3LO2K.js';
4
+ export { NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSkeleton, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants } from '../chunk-O4BMDV7I.js';
5
+ import '../chunk-CAI7LGN6.js';
6
+ export { GenesisModulesProvider, useGenesisModules } from '../chunk-RTYO24SC.js';
6
7
  import '../chunk-OHZD7KRO.js';
7
8
  import '../chunk-DGUM43GV.js';
8
9
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeSheet, NativeSheetScrollView, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeInlineAlert, NativeSegmentedControl, NativeDatePicker, NativeTimePicker, NativeSearchBar, NativeGalleryGrid, NativeCardHeader, NativeCardTitle } from '../chunk-NDXNSSM6.js';
2
- import { showInboxActions, NavBarSaveButton, composeHeaderOptions } from '../chunk-AGTBABAH.js';
3
- import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput, useGenesisModules, NativeLoadingState, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl, NativeIcon, NativeSkeleton } from '../chunk-6PGLX6ET.js';
4
- import { useThemeRoles } from '../chunk-4OQOJ2OC.js';
1
+ import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeSheet, NativeSheetScrollView, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeInlineAlert, NativeSegmentedControl, NativeDatePicker, NativeTimePicker, NativeSearchBar, NativeGalleryGrid, NativeCardHeader, NativeCardTitle } from '../chunk-KH2RVAI5.js';
2
+ import { showInboxActions, NavBarSaveButton, composeHeaderOptions } from '../chunk-3KFUS7O6.js';
3
+ import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput, NativeLoadingState, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl, NativeIcon, NativeSkeleton } from '../chunk-O4BMDV7I.js';
4
+ import { useGenesisModules, useThemeRoles } from '../chunk-RTYO24SC.js';
5
5
  import '../chunk-OHZD7KRO.js';
6
6
  import '../chunk-DGUM43GV.js';
7
7
  import { Platform, View, Pressable, Text, Linking, ScrollView, AccessibilityInfo, Alert, SectionList, ActionSheetIOS, FlatList } from 'react-native';
@@ -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-DEJJQhDx.js';
3
+ export { c as GenesisHapticsModule, s as playHaptic, t as useHaptics } from '../native-modules-DEJJQhDx.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
 
@@ -97,4 +126,4 @@ declare function BrandExtensionsProvider({ value, children, }: BrandExtensionsPr
97
126
  */
98
127
  declare function useGenesisExtension<K extends keyof BrandExtensions>(key: K): BrandExtensions[K] | undefined;
99
128
 
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 };
129
+ 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, useGenesisExtension, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles };
@@ -1,5 +1,6 @@
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-YWDDDYDI.js';
2
+ export { usePressFeedback } from '../chunk-CAI7LGN6.js';
3
+ export { animateMotion, motionSpring, motionTiming, playHaptic, useHaptics, useMotion, useReducedMotion, useThemeMode, useThemeRoles } from '../chunk-RTYO24SC.js';
3
4
  import '../chunk-DGUM43GV.js';
4
5
  //# sourceMappingURL=index.js.map
5
6
  //# 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-DEJJQhDx.js';
2
2
  import 'react';
3
3
  import 'react-native';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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, 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 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-DEJJQhDx.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, 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
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';
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';
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
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, 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-7NDKIIOT.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-KH2RVAI5.js';
3
+ export { BrandExtensionsProvider, JUMP_SETTLE_MS, useGenesisExtension, useThreadJump } from './chunk-YWDDDYDI.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-GBNIBHSU.js';
5
+ export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from './chunk-IXC3LO2K.js';
6
+ export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from './chunk-3KFUS7O6.js';
7
+ export { NATIVE_ICON_NAMES, NativeBadge, NativeButton, NativeEmptyState, NativeIcon, NativeInput, NativeListItem, NativeListItemDivider, NativeLoadingState, NativeRefreshControl, NativeSectionListHeader, NativeSkeleton, NativeText, SF_SYMBOLS, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, textVariants } from './chunk-O4BMDV7I.js';
8
+ export { usePressFeedback } from './chunk-CAI7LGN6.js';
9
+ export { GenesisModulesProvider, animateMotion, motionSpring, motionTiming, playHaptic, useGenesisModules, useHaptics, useMotion, useReducedMotion, useThemeMode, useThemeRoles } from './chunk-RTYO24SC.js';
9
10
  export { cn } from './chunk-OHZD7KRO.js';
10
11
  import './chunk-DGUM43GV.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,9 @@
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-GBNIBHSU.js';
2
+ import '../chunk-IXC3LO2K.js';
3
+ export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from '../chunk-3KFUS7O6.js';
4
+ import '../chunk-O4BMDV7I.js';
5
+ import '../chunk-CAI7LGN6.js';
6
+ import '../chunk-RTYO24SC.js';
6
7
  import '../chunk-OHZD7KRO.js';
7
8
  import '../chunk-DGUM43GV.js';
8
9
  //# 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
@@ -260,6 +286,8 @@ interface GenesisModules {
260
286
  navigation?: GenesisNavigationModule;
261
287
  /** react-native-keyboard-controller's `KeyboardAvoidingView` (it takes `behavior: "translate-with-padding"`). */
262
288
  keyboardAvoidingView?: KeyboardAvoidingLike;
289
+ /** expo-haptics (`import * as Haptics from "expo-haptics"`): `useHaptics`, `usePressFeedback`, and the primitives that answer a touch. Without it, no haptics. */
290
+ haptics?: GenesisHapticsModule;
263
291
  }
264
292
  interface GenesisModulesProviderProps {
265
293
  modules: GenesisModules;
@@ -276,4 +304,4 @@ declare function GenesisModulesProvider({ modules, children }: GenesisModulesPro
276
304
  /** The modules given to the nearest `GenesisModulesProvider`; `{}` without one. */
277
305
  declare function useGenesisModules(): GenesisModules;
278
306
 
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 };
307
+ 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.7.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",
@@ -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
+ });
@@ -0,0 +1,52 @@
1
+ import { fireEvent, render, screen } from "@testing-library/react";
2
+ import { describe, expect, it, vi } from "vitest";
3
+ import { GenesisModulesProvider } from "../../native-modules";
4
+ import { NativeButton } from "../button";
5
+
6
+ const fake = () => ({
7
+ impactAsync: vi.fn(() => Promise.resolve()),
8
+ selectionAsync: vi.fn(() => Promise.resolve()),
9
+ notificationAsync: vi.fn(() => Promise.resolve()),
10
+ ImpactFeedbackStyle: { Light: "light", Medium: "medium" },
11
+ NotificationFeedbackType: { Success: "success", Warning: "warning", Error: "error" },
12
+ });
13
+
14
+ describe("NativeButton haptic", () => {
15
+ it("plays its haptic, then presses", () => {
16
+ const haptics = fake();
17
+ const onPress = vi.fn();
18
+ render(
19
+ <GenesisModulesProvider modules={{ haptics }}>
20
+ <NativeButton testID="b" haptic="success" onPress={onPress}>Save</NativeButton>
21
+ </GenesisModulesProvider>,
22
+ );
23
+ fireEvent.click(screen.getByTestId("b"));
24
+ expect(haptics.notificationAsync).toHaveBeenCalledWith("success");
25
+ expect(onPress).toHaveBeenCalledTimes(1);
26
+ });
27
+
28
+ it("ticks select on press-in, as usePressFeedback does", () => {
29
+ const haptics = fake();
30
+ render(
31
+ <GenesisModulesProvider modules={{ haptics }}>
32
+ <NativeButton testID="b" haptic="select" onPress={() => {}}>Week</NativeButton>
33
+ </GenesisModulesProvider>,
34
+ );
35
+ fireEvent.pointerDown(screen.getByTestId("b"));
36
+ expect(haptics.selectionAsync).toHaveBeenCalledTimes(1);
37
+ fireEvent.click(screen.getByTestId("b"));
38
+ expect(haptics.selectionAsync).toHaveBeenCalledTimes(1);
39
+ });
40
+
41
+ it("plays none without the prop", () => {
42
+ const haptics = fake();
43
+ render(
44
+ <GenesisModulesProvider modules={{ haptics }}>
45
+ <NativeButton testID="b" onPress={() => {}}>Save</NativeButton>
46
+ </GenesisModulesProvider>,
47
+ );
48
+ fireEvent.click(screen.getByTestId("b"));
49
+ expect(haptics.impactAsync).not.toHaveBeenCalled();
50
+ expect(haptics.notificationAsync).not.toHaveBeenCalled();
51
+ });
52
+ });
@@ -17,6 +17,30 @@ describe("NativeComposerBar", () => {
17
17
  expect(onSend).toHaveBeenCalledTimes(1);
18
18
  });
19
19
 
20
+ it("taps a light haptic when a message sends, and none when it can't", () => {
21
+ const haptics = {
22
+ impactAsync: vi.fn(() => Promise.resolve()),
23
+ selectionAsync: vi.fn(() => Promise.resolve()),
24
+ notificationAsync: vi.fn(() => Promise.resolve()),
25
+ ImpactFeedbackStyle: { Light: "light", Medium: "medium" },
26
+ NotificationFeedbackType: { Success: "s", Warning: "w", Error: "e" },
27
+ };
28
+ const { rerender } = render(
29
+ <GenesisModulesProvider modules={{ haptics }}>
30
+ <NativeComposerBar {...base} value=" " testID="c" />
31
+ </GenesisModulesProvider>,
32
+ );
33
+ fireEvent.click(screen.getByTestId("c-send"));
34
+ expect(haptics.impactAsync).not.toHaveBeenCalled();
35
+ rerender(
36
+ <GenesisModulesProvider modules={{ haptics }}>
37
+ <NativeComposerBar {...base} value="Hi" testID="c" />
38
+ </GenesisModulesProvider>,
39
+ );
40
+ fireEvent.click(screen.getByTestId("c-send"));
41
+ expect(haptics.impactAsync).toHaveBeenCalledWith("light");
42
+ });
43
+
20
44
  it("spins instead of sending twice", () => {
21
45
  render(<NativeComposerBar {...base} value="Hi" sending testID="c" />);
22
46
  expect(screen.getByTestId("c-sending").getAttribute("aria-label")).toBe("Sending");