@marktiderman/genesis-ui-native 3.9.0 → 3.10.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.
- package/README.md +1 -1
- package/dist/{chunk-T7FEVT62.js → chunk-EAHK7D7N.js} +9 -9
- package/dist/chunk-EAHK7D7N.js.map +1 -0
- package/dist/{chunk-PWYMRUAK.js → chunk-GGH3ZQNO.js} +6 -6
- package/dist/chunk-GGH3ZQNO.js.map +1 -0
- package/dist/{chunk-UZCJDMGE.js → chunk-IWWXERKQ.js} +17 -16
- package/dist/chunk-IWWXERKQ.js.map +1 -0
- package/dist/{chunk-PWS2HLDE.js → chunk-PMS2V46D.js} +2 -2
- package/dist/{chunk-PWS2HLDE.js.map → chunk-PMS2V46D.js.map} +1 -1
- package/dist/{chunk-JZ7RAGDQ.js → chunk-SG7LYX7Z.js} +4 -4
- package/dist/{chunk-JZ7RAGDQ.js.map → chunk-SG7LYX7Z.js.map} +1 -1
- package/dist/{chunk-FGIIBON3.js → chunk-VEWSY4TZ.js} +3 -3
- package/dist/{chunk-FGIIBON3.js.map → chunk-VEWSY4TZ.js.map} +1 -1
- package/dist/{chunk-DHONOH6K.js → chunk-ZUR4PK77.js} +9 -8
- package/dist/chunk-ZUR4PK77.js.map +1 -0
- package/dist/components/index.d.ts +12 -4
- package/dist/components/index.js +5 -5
- package/dist/data/index.js +8 -8
- package/dist/data/index.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/icons/lucide.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/layouts/index.js +5 -5
- package/dist/{native-modules-CeAaO2Dh.d.ts → native-modules-Bkm1jHO-.d.ts} +2 -0
- package/package.json +3 -3
- package/src/__tests__/fake-modules.tsx +1 -0
- package/src/__tests__/native-modules.test.tsx +39 -0
- package/src/components/__tests__/gallery-grid.test.tsx +20 -0
- package/src/components/__tests__/lightbox.test.tsx +16 -0
- package/src/components/chip-group.tsx +1 -1
- package/src/components/gallery-grid.tsx +1 -1
- package/src/components/image.tsx +15 -4
- package/src/components/inline-alert.tsx +1 -1
- package/src/components/lightbox-zoom.tsx +8 -6
- package/src/components/lightbox.tsx +2 -1
- package/src/components/search-bar.tsx +1 -1
- package/src/components/stepper.tsx +1 -1
- package/src/components/tab-bar.tsx +2 -2
- package/src/data/resource-view/NativeLinkPicker.tsx +1 -1
- package/src/data/resource-view/NativeRecordView.tsx +1 -1
- package/src/data/resource-view/NativeResourceFormSheet.tsx +1 -1
- package/src/data/resource-view/display.tsx +1 -1
- package/src/layouts/__tests__/settings-page-native-look.test.tsx +1 -1
- package/src/layouts/auth.tsx +1 -1
- package/src/layouts/inbox-page.tsx +1 -1
- package/src/layouts/nav-bar.tsx +1 -1
- package/src/layouts/notifications-page.tsx +1 -1
- package/src/layouts/settings-page.tsx +2 -2
- package/src/native-modules.tsx +2 -1
- package/dist/chunk-DHONOH6K.js.map +0 -1
- package/dist/chunk-PWYMRUAK.js.map +0 -1
- package/dist/chunk-T7FEVT62.js.map +0 -1
- package/dist/chunk-UZCJDMGE.js.map +0 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { JUMP_SETTLE_MS, UseThreadJumpOptions, useThreadJump } from '@marktiderman/genesis-core/conversation';
|
|
2
|
-
import { o as GenesisReanimatedModule, H as HapticKind } from '../native-modules-
|
|
3
|
-
export { c as GenesisHapticsModule, s as playHaptic, t as useHaptics } from '../native-modules-
|
|
2
|
+
import { o as GenesisReanimatedModule, H as HapticKind } from '../native-modules-Bkm1jHO-.js';
|
|
3
|
+
export { c as GenesisHapticsModule, s as playHaptic, t as useHaptics } from '../native-modules-Bkm1jHO-.js';
|
|
4
4
|
import { Animated, ColorValue } from 'react-native';
|
|
5
5
|
import { MotionSprings, MotionDurations, MotionEasings, MotionLevel, MotionTokens } from '@marktiderman/genesis-design-system/tokens/motion';
|
|
6
6
|
import { ThemeRole, BrandExtensions } from '@marktiderman/genesis-design-system';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
export { animateMotion, motionSpring, motionTiming, playHaptic, sentBubbleColor, useHaptics, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from '../chunk-PMS2V46D.js';
|
|
3
3
|
import '../chunk-DGUM43GV.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/icons/lucide.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
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-Bkm1jHO-.js';
|
|
3
3
|
export { DEFAULT_GALLERY_RATIO, GALLERY_DEFAULTS, GalleryItem, GalleryTileAspect, JustifiedRow, JustifiedTile, galleryItemRatio, justifyRows } from '@marktiderman/genesis-core/gallery';
|
|
4
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';
|
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, 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-
|
|
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-
|
|
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-IWWXERKQ.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-ZUR4PK77.js';
|
|
3
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-
|
|
5
|
-
export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from './chunk-
|
|
6
|
-
export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from './chunk-
|
|
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-
|
|
8
|
-
export { GenesisModulesProvider, animateMotion, motionSpring, motionTiming, playHaptic, sentBubbleColor, useGenesisModules, useHaptics, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from './chunk-
|
|
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-EAHK7D7N.js';
|
|
5
|
+
export { NativeComposerBar, NativeThreadList, THREAD_AT_BOTTOM_POINTS, threadListMode, threadNearBottom } from './chunk-SG7LYX7Z.js';
|
|
6
|
+
export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from './chunk-GGH3ZQNO.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-VEWSY4TZ.js';
|
|
8
|
+
export { GenesisModulesProvider, animateMotion, motionSpring, motionTiming, playHaptic, sentBubbleColor, useGenesisModules, useHaptics, useMotion, usePressFeedback, useReducedMotion, useThemeMode, useThemeRoles } from './chunk-PMS2V46D.js';
|
|
9
9
|
export { cn } from './chunk-OHZD7KRO.js';
|
|
10
10
|
import './chunk-DGUM43GV.js';
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/layouts/index.js
CHANGED
|
@@ -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-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
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-EAHK7D7N.js';
|
|
2
|
+
import '../chunk-SG7LYX7Z.js';
|
|
3
|
+
export { InboxPage, NavBarSaveButton, NavBarSearchBar, NavBarTitle, ScreenContainer, composeHeaderOptions, formatInboxTime, getInboxPageStackOptions, showInboxActions } from '../chunk-GGH3ZQNO.js';
|
|
4
|
+
import '../chunk-VEWSY4TZ.js';
|
|
5
|
+
import '../chunk-PMS2V46D.js';
|
|
6
6
|
import '../chunk-OHZD7KRO.js';
|
|
7
7
|
import '../chunk-DGUM43GV.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -139,8 +139,10 @@ interface GenesisListProps<T> {
|
|
|
139
139
|
type GenesisListComponent = ComponentType<GenesisListProps<any>>;
|
|
140
140
|
/** The expo-image `Image` props Genesis passes. */
|
|
141
141
|
interface GenesisImageProps {
|
|
142
|
+
/** `cacheKey` keys the cache in place of the URL. */
|
|
142
143
|
source: {
|
|
143
144
|
uri: string;
|
|
145
|
+
cacheKey?: string;
|
|
144
146
|
} | number | null;
|
|
145
147
|
style?: unknown;
|
|
146
148
|
contentFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-ui-native",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -83,8 +83,8 @@
|
|
|
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.
|
|
87
|
-
"@marktiderman/genesis-design-system": "^1.
|
|
86
|
+
"@marktiderman/genesis-core": "^2.14.0",
|
|
87
|
+
"@marktiderman/genesis-design-system": "^1.10.0",
|
|
88
88
|
"@react-native-community/datetimepicker": ">=8.0.0",
|
|
89
89
|
"@shopify/flash-list": ">=2.0.0",
|
|
90
90
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -73,6 +73,7 @@ export function fakeImage() {
|
|
|
73
73
|
data-testid={props.testID}
|
|
74
74
|
data-expo-image="true"
|
|
75
75
|
data-recycling-key={props.recyclingKey ?? ""}
|
|
76
|
+
data-cache-key={typeof props.source === "object" && props.source ? props.source.cacheKey : undefined}
|
|
76
77
|
data-cache-policy={props.cachePolicy}
|
|
77
78
|
data-transition={String(props.transition)}
|
|
78
79
|
src={typeof props.source === "object" && props.source ? props.source.uri : undefined}
|
|
@@ -407,6 +407,45 @@ describe("NativeAvatar and NativeImage", () => {
|
|
|
407
407
|
expect(screen.getByTestId("img").getAttribute("aria-hidden")).toBe("true");
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
+
it("cache a rotating signed URL under its cacheKey, which is also the recycling key", () => {
|
|
411
|
+
const Image = fakeImage();
|
|
412
|
+
const ui = (src: string) => (
|
|
413
|
+
<GenesisModulesProvider modules={{ image: Image }}>
|
|
414
|
+
<NativeImage testID="img" src={src} cacheKey="photos/42.jpg" />
|
|
415
|
+
</GenesisModulesProvider>
|
|
416
|
+
);
|
|
417
|
+
const { rerender } = render(ui("https://example.com/photos/42.jpg?expires=1&sig=a"));
|
|
418
|
+
const img = () => screen.getByTestId("img-image");
|
|
419
|
+
expect(img().dataset.cacheKey).toBe("photos/42.jpg");
|
|
420
|
+
expect(img().dataset.recyclingKey).toBe("photos/42.jpg");
|
|
421
|
+
// A new signature for the same picture keeps both keys, so it's neither fetched again nor reset.
|
|
422
|
+
rerender(ui("https://example.com/photos/42.jpg?expires=2&sig=b"));
|
|
423
|
+
expect(img().getAttribute("src")).toBe("https://example.com/photos/42.jpg?expires=2&sig=b");
|
|
424
|
+
expect(img().dataset.cacheKey).toBe("photos/42.jpg");
|
|
425
|
+
expect(img().dataset.recyclingKey).toBe("photos/42.jpg");
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
it("let an explicit recycling key win over the cacheKey, and pass no cacheKey when none is given", () => {
|
|
429
|
+
const Image = fakeImage();
|
|
430
|
+
const { rerender } = withModules({ image: Image }, <NativeImage testID="img" src="https://example.com/c.png" cacheKey="c" recyclingKey="row-3" />);
|
|
431
|
+
expect(screen.getByTestId("img-image").dataset.recyclingKey).toBe("row-3");
|
|
432
|
+
expect(screen.getByTestId("img-image").dataset.cacheKey).toBe("c");
|
|
433
|
+
rerender(
|
|
434
|
+
<GenesisModulesProvider modules={{ image: Image }}>
|
|
435
|
+
<NativeImage testID="img" src="https://example.com/c.png" />
|
|
436
|
+
</GenesisModulesProvider>,
|
|
437
|
+
);
|
|
438
|
+
expect(screen.getByTestId("img-image").dataset.cacheKey).toBeUndefined();
|
|
439
|
+
expect(Image.mock.lastCall?.[0].source).toEqual({ uri: "https://example.com/c.png" });
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
it("ignore cacheKey on React Native's Image", () => {
|
|
443
|
+
render(<NativeImage testID="img" src="https://example.com/d.png?sig=a" cacheKey="d" />);
|
|
444
|
+
const img = screen.getByTestId("img-image");
|
|
445
|
+
expect(img.dataset.expoImage).toBeUndefined();
|
|
446
|
+
expect(img.dataset.cacheKey).toBeUndefined();
|
|
447
|
+
});
|
|
448
|
+
|
|
410
449
|
it("fall back to React Native's Image", () => {
|
|
411
450
|
render(<NativeAvatar testID="av" src="https://example.com/a.png" fallback="AB" />);
|
|
412
451
|
expect(screen.getByTestId("av-image").dataset.expoImage).toBeUndefined();
|
|
@@ -3,6 +3,8 @@ import { act, fireEvent, render, screen } from "@testing-library/react";
|
|
|
3
3
|
import { describe, expect, it, vi } from "vitest";
|
|
4
4
|
import { GALLERY_DEFAULTS, type GalleryItem } from "../gallery-types";
|
|
5
5
|
import { NativeGalleryGrid } from "../gallery-grid";
|
|
6
|
+
import { GenesisModulesProvider } from "../../native-modules";
|
|
7
|
+
import { fakeImage } from "../../__tests__/fake-modules";
|
|
6
8
|
|
|
7
9
|
const items: GalleryItem[] = Array.from({ length: 5 }, (_, i) => ({
|
|
8
10
|
id: `p${i}`,
|
|
@@ -141,6 +143,24 @@ describe("NativeGalleryGrid additions", () => {
|
|
|
141
143
|
expect(placeholder.getAttribute("aria-label")).toBe("Untitled");
|
|
142
144
|
});
|
|
143
145
|
|
|
146
|
+
it("passes each item's cacheKey to its image, and keys by the URL without one", () => {
|
|
147
|
+
const keyed: GalleryItem[] = [
|
|
148
|
+
{ id: "k", src: "https://example.test/k.jpg?sig=a", cacheKey: "photos/k.jpg", width: 400, height: 300 },
|
|
149
|
+
{ id: "u", src: "https://example.test/u.jpg", width: 400, height: 300 },
|
|
150
|
+
];
|
|
151
|
+
const { container } = render(
|
|
152
|
+
<GenesisModulesProvider modules={{ image: fakeImage() }}>
|
|
153
|
+
<NativeGalleryGrid items={keyed} testID="g" />
|
|
154
|
+
</GenesisModulesProvider>,
|
|
155
|
+
);
|
|
156
|
+
measure(screen.getByTestId("g"), 600);
|
|
157
|
+
const [k, u] = Array.from(container.querySelectorAll<HTMLElement>("img[data-expo-image]"));
|
|
158
|
+
expect(k!.dataset.cacheKey).toBe("photos/k.jpg");
|
|
159
|
+
expect(k!.dataset.recyclingKey).toBe("photos/k.jpg");
|
|
160
|
+
expect(u!.dataset.cacheKey).toBeUndefined();
|
|
161
|
+
expect(u!.dataset.recyclingKey).toBe("https://example.test/u.jpg");
|
|
162
|
+
});
|
|
163
|
+
|
|
144
164
|
it("shares the web's defaults", () => {
|
|
145
165
|
expect(GALLERY_DEFAULTS).toEqual({ rowHeight: 180, gap: 4, columns: 3 });
|
|
146
166
|
});
|
|
@@ -3,6 +3,8 @@ import { fireEvent, render, screen } from "@testing-library/react";
|
|
|
3
3
|
import { describe, expect, it, vi } from "vitest";
|
|
4
4
|
import type { GalleryItem } from "../gallery-types";
|
|
5
5
|
import { NativeLightbox } from "../lightbox";
|
|
6
|
+
import { GenesisModulesProvider } from "../../native-modules";
|
|
7
|
+
import { fakeImage } from "../../__tests__/fake-modules";
|
|
6
8
|
|
|
7
9
|
const items: GalleryItem[] = [
|
|
8
10
|
{ id: "a", src: "https://example.test/a.jpg", alt: "First", caption: "Warm-up" },
|
|
@@ -55,6 +57,20 @@ describe("NativeLightbox", () => {
|
|
|
55
57
|
expect(screen.getByTestId("lb-counter").textContent).toBe("3 / 3");
|
|
56
58
|
});
|
|
57
59
|
|
|
60
|
+
it("caches each page under its item's cacheKey, on the zooming page and the plain one", () => {
|
|
61
|
+
const keyed: GalleryItem[] = [{ id: "k", src: "https://example.test/k.jpg?sig=a", cacheKey: "photos/k.jpg" }];
|
|
62
|
+
for (const zoomable of [true, false]) {
|
|
63
|
+
const { container, unmount } = render(
|
|
64
|
+
<GenesisModulesProvider modules={{ image: fakeImage() }}>
|
|
65
|
+
<NativeLightbox open onOpenChange={() => undefined} items={keyed} index={0} onIndexChange={() => undefined} zoomable={zoomable} swipeToDismiss={zoomable} testID="lb" />
|
|
66
|
+
</GenesisModulesProvider>,
|
|
67
|
+
);
|
|
68
|
+
const img = container.ownerDocument.querySelector<HTMLElement>("img[data-expo-image]");
|
|
69
|
+
expect(img?.dataset.cacheKey).toBe("photos/k.jpg");
|
|
70
|
+
unmount();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
58
74
|
it("shows no counter for a single picture", () => {
|
|
59
75
|
render(<NativeLightbox open onOpenChange={() => undefined} items={items.slice(0, 1)} index={0} onIndexChange={() => undefined} testID="lb" />);
|
|
60
76
|
expect(screen.queryByTestId("lb-counter")).toBeNull();
|
|
@@ -190,7 +190,7 @@ export function NativeGalleryGrid({
|
|
|
190
190
|
<>
|
|
191
191
|
<View className="absolute inset-0 bg-muted" />
|
|
192
192
|
{item.src ? (
|
|
193
|
-
<NativeImage src={item.src} alt={item.alt} className="h-full w-full" />
|
|
193
|
+
<NativeImage src={item.src} cacheKey={item.cacheKey} alt={item.alt} className="h-full w-full" />
|
|
194
194
|
) : (
|
|
195
195
|
// No image: a neutral tile with its words, so the count matches what's drawn. The tile's
|
|
196
196
|
// own label (alt, then caption) names a pressable tile, so the words are hidden from
|
package/src/components/image.tsx
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* `GenesisModulesProvider`): cached in memory and on disk, an optional
|
|
6
6
|
* blurhash/thumbhash `placeholder`, a cross-fade that Reduce Motion turns
|
|
7
7
|
* off, and a `recyclingKey` (the URL by default) so a recycled FlashList row
|
|
8
|
-
* never flashes the previous picture.
|
|
8
|
+
* never flashes the previous picture. A `cacheKey` caches the picture under a
|
|
9
|
+
* stable key instead of its URL, for signed URLs that rotate (a new expiry or
|
|
10
|
+
* signature would otherwise miss the disk cache and download it again).
|
|
11
|
+
* Without it, React Native's `Image`.
|
|
9
12
|
*
|
|
10
13
|
* Give it a size (className or `width`/`height`). Decorative unless `alt` is
|
|
11
14
|
* given.
|
|
@@ -28,7 +31,13 @@ export interface NativeImageProps {
|
|
|
28
31
|
contentFit?: "cover" | "contain";
|
|
29
32
|
/** expo-image only: `{ blurhash }` or `{ thumbhash }` shown while loading. */
|
|
30
33
|
placeholder?: { blurhash: string } | { thumbhash: string };
|
|
31
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* expo-image only: caches the picture under this key instead of its URL, so a signed URL
|
|
36
|
+
* that rotates (a new expiry or signature for the same file) still hits the memory and disk
|
|
37
|
+
* cache. Use a key that names the file, such as its storage path or id.
|
|
38
|
+
*/
|
|
39
|
+
cacheKey?: string;
|
|
40
|
+
/** expo-image only: resets the view when it changes (recycled rows). Default `cacheKey`, then `src`. */
|
|
32
41
|
recyclingKey?: string;
|
|
33
42
|
/** expo-image only: load order among images. */
|
|
34
43
|
priority?: "low" | "normal" | "high";
|
|
@@ -47,6 +56,7 @@ export function NativeImage({
|
|
|
47
56
|
height,
|
|
48
57
|
contentFit = "cover",
|
|
49
58
|
placeholder,
|
|
59
|
+
cacheKey,
|
|
50
60
|
recyclingKey,
|
|
51
61
|
priority,
|
|
52
62
|
onError,
|
|
@@ -68,14 +78,15 @@ export function NativeImage({
|
|
|
68
78
|
<ExpoImage
|
|
69
79
|
testID={testID ? `${testID}-image` : undefined}
|
|
70
80
|
accessible={false}
|
|
71
|
-
source={{ uri: src }}
|
|
81
|
+
source={cacheKey ? { uri: src, cacheKey } : { uri: src }}
|
|
72
82
|
style={FILL}
|
|
73
83
|
contentFit={contentFit}
|
|
74
84
|
cachePolicy="memory-disk"
|
|
75
85
|
placeholder={placeholder}
|
|
76
86
|
placeholderContentFit={contentFit}
|
|
77
87
|
transition={reducedMotion ? null : 150}
|
|
78
|
-
|
|
88
|
+
// A rotated URL for the same picture keeps the view, so it doesn't flash.
|
|
89
|
+
recyclingKey={recyclingKey ?? cacheKey ?? src}
|
|
79
90
|
priority={priority}
|
|
80
91
|
onError={onError}
|
|
81
92
|
/>
|
|
@@ -50,7 +50,7 @@ const variantClasses: Record<NativeInlineAlertVariant, string> = {
|
|
|
50
50
|
|
|
51
51
|
const titleClasses: Record<NativeInlineAlertVariant, string> = {
|
|
52
52
|
info: "text-foreground",
|
|
53
|
-
success: "text-primary",
|
|
53
|
+
success: "text-primary-text",
|
|
54
54
|
warning: "text-warning",
|
|
55
55
|
destructive: "text-destructive",
|
|
56
56
|
};
|
|
@@ -51,6 +51,8 @@ const clamp = (v: number, limit: number) => Math.max(-limit, Math.min(limit, v))
|
|
|
51
51
|
|
|
52
52
|
export interface NativeZoomablePhotoProps {
|
|
53
53
|
src: string;
|
|
54
|
+
/** Caches the photo under this key instead of its URL (`NativeImage`'s `cacheKey`). */
|
|
55
|
+
cacheKey?: string;
|
|
54
56
|
alt?: string;
|
|
55
57
|
width: number;
|
|
56
58
|
height: number;
|
|
@@ -72,8 +74,8 @@ export function NativeZoomablePhoto(props: NativeZoomablePhotoProps) {
|
|
|
72
74
|
return Platform.OS === "ios" ? <ZoomableIos {...props} /> : <ZoomablePan {...props} />;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
function Photo({ src, alt, width, height, testID }: { src: string; alt?: string; width: number; height: number; testID: string }) {
|
|
76
|
-
return <NativeImage src={src} alt={alt} width={width} height={height} contentFit="contain" className="bg-transparent" testID={testID} />;
|
|
77
|
+
function Photo({ src, cacheKey, alt, width, height, testID }: { src: string; cacheKey?: string; alt?: string; width: number; height: number; testID: string }) {
|
|
78
|
+
return <NativeImage src={src} cacheKey={cacheKey} alt={alt} width={width} height={height} contentFit="contain" className="bg-transparent" testID={testID} />;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
/** A tap that waits to see whether it's the first half of a double tap. */
|
|
@@ -113,7 +115,7 @@ function zoomTo(view: ZoomScrollView | null, rect: ZoomRect, animated: boolean)
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
/** iOS: the system's zooming scroll view; at full size, a pull down past the top closes. */
|
|
116
|
-
function ZoomableIos({ src, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }: NativeZoomablePhotoProps) {
|
|
118
|
+
function ZoomableIos({ src, cacheKey, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }: NativeZoomablePhotoProps) {
|
|
117
119
|
const ref = useRef<ZoomScrollView | null>(null);
|
|
118
120
|
const scale = useRef(1);
|
|
119
121
|
const reducedMotion = useReducedMotion();
|
|
@@ -158,14 +160,14 @@ function ZoomableIos({ src, alt, width, height, active, onZoomChange, zoomable =
|
|
|
158
160
|
}}
|
|
159
161
|
>
|
|
160
162
|
<Pressable accessible={false} onPress={tap} style={{ width, height }}>
|
|
161
|
-
<Photo src={src} alt={alt} width={width} height={height} testID={`${testID}-image`} />
|
|
163
|
+
<Photo src={src} cacheKey={cacheKey} alt={alt} width={width} height={height} testID={`${testID}-image`} />
|
|
162
164
|
</Pressable>
|
|
163
165
|
</ScrollView>
|
|
164
166
|
);
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
/** Android (no zooming ScrollView): two fingers pinch, one pans a zoomed photo or drags it down to close. */
|
|
168
|
-
function ZoomablePan({ src, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }: NativeZoomablePhotoProps) {
|
|
170
|
+
function ZoomablePan({ src, cacheKey, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }: NativeZoomablePhotoProps) {
|
|
169
171
|
const reducedMotion = useReducedMotion();
|
|
170
172
|
const scale = useRef(new Animated.Value(1)).current;
|
|
171
173
|
const tx = useRef(new Animated.Value(0)).current;
|
|
@@ -274,7 +276,7 @@ function ZoomablePan({ src, alt, width, height, active, onZoomChange, zoomable =
|
|
|
274
276
|
<View testID={testID} style={{ width, height, overflow: "hidden" }} {...responder.panHandlers}>
|
|
275
277
|
<Animated.View style={{ width, height, transform: [{ translateX: tx }, { translateY: ty }, { scale }] }}>
|
|
276
278
|
<Pressable accessible={false} onPress={tap} style={{ width, height }}>
|
|
277
|
-
<Photo src={src} alt={alt} width={width} height={height} testID={`${testID}-image`} />
|
|
279
|
+
<Photo src={src} cacheKey={cacheKey} alt={alt} width={width} height={height} testID={`${testID}-image`} />
|
|
278
280
|
</Pressable>
|
|
279
281
|
</Animated.View>
|
|
280
282
|
</View>
|
|
@@ -253,6 +253,7 @@ function LightboxBody({
|
|
|
253
253
|
) : zoomable || swipeToDismiss ? (
|
|
254
254
|
<NativeZoomablePhoto
|
|
255
255
|
src={it.src}
|
|
256
|
+
cacheKey={it.cacheKey}
|
|
256
257
|
alt={it.alt ?? labels.photo(i + 1, items.length)}
|
|
257
258
|
width={width}
|
|
258
259
|
height={size.height}
|
|
@@ -266,7 +267,7 @@ function LightboxBody({
|
|
|
266
267
|
/>
|
|
267
268
|
) : (
|
|
268
269
|
<Pressable accessible={false} onPress={toggleChrome} style={{ width, flex: 1 }}>
|
|
269
|
-
<NativeImage src={it.src} alt={it.alt ?? labels.photo(i + 1, items.length)} className="h-full w-full" contentFit="contain" />
|
|
270
|
+
<NativeImage src={it.src} cacheKey={it.cacheKey} alt={it.alt ?? labels.photo(i + 1, items.length)} className="h-full w-full" contentFit="contain" />
|
|
270
271
|
</Pressable>
|
|
271
272
|
)}
|
|
272
273
|
</View>
|
|
@@ -120,7 +120,7 @@ export function NativeSearchBar({
|
|
|
120
120
|
}}
|
|
121
121
|
className="min-h-[44px] items-center justify-center px-2"
|
|
122
122
|
>
|
|
123
|
-
<Text className="text-base text-primary">{cancelLabel}</Text>
|
|
123
|
+
<Text className="text-base text-primary-text">{cancelLabel}</Text>
|
|
124
124
|
</Pressable>
|
|
125
125
|
) : null}
|
|
126
126
|
</View>
|
|
@@ -53,7 +53,7 @@ function Slot({ item, active }: { item: Pick<NativeTabBarItem, "label" | "icon"
|
|
|
53
53
|
</View>
|
|
54
54
|
) : null}
|
|
55
55
|
</View>
|
|
56
|
-
<Text numberOfLines={1} className={cn("text-xs font-medium", active ? "text-primary" : "text-muted-foreground")}>
|
|
56
|
+
<Text numberOfLines={1} className={cn("text-xs font-medium", active ? "text-primary-text" : "text-muted-foreground")}>
|
|
57
57
|
{item.label}
|
|
58
58
|
</Text>
|
|
59
59
|
</View>
|
|
@@ -120,7 +120,7 @@ export function NativeTabBar({
|
|
|
120
120
|
className={cn("min-h-[44px] flex-row items-center gap-3 rounded-lg px-3", active && "bg-accent")}
|
|
121
121
|
>
|
|
122
122
|
{item.icon}
|
|
123
|
-
<Text className={cn("flex-1 text-base font-medium", active ? "text-
|
|
123
|
+
<Text className={cn("flex-1 text-base font-medium", active ? "text-accent-foreground" : "text-foreground")}>{item.label}</Text>
|
|
124
124
|
{item.badge != null ? <NativeBadge variant="secondary">{item.badge}</NativeBadge> : null}
|
|
125
125
|
</Pressable>
|
|
126
126
|
);
|
|
@@ -182,7 +182,7 @@ function Option({
|
|
|
182
182
|
>
|
|
183
183
|
<Text className={muted ? "text-base text-muted-foreground" : "text-base text-foreground"}>{label}</Text>
|
|
184
184
|
{selected ? (
|
|
185
|
-
<Text className="text-base text-primary" accessible={false}>
|
|
185
|
+
<Text className="text-base text-primary-text" accessible={false}>
|
|
186
186
|
✓
|
|
187
187
|
</Text>
|
|
188
188
|
) : null}
|
|
@@ -795,7 +795,7 @@ function Group({ title, children, testID }: { title?: string | undefined; childr
|
|
|
795
795
|
return (
|
|
796
796
|
<View testID={testID} style={{ gap: 6 }}>
|
|
797
797
|
{title ? (
|
|
798
|
-
<NativeText preset="caption" accessibilityRole="header" className={ios ? "uppercase text-muted-foreground px-4" : "text-primary px-4"}>
|
|
798
|
+
<NativeText preset="caption" accessibilityRole="header" className={ios ? "uppercase text-muted-foreground px-4" : "text-primary-text px-4"}>
|
|
799
799
|
{title}
|
|
800
800
|
</NativeText>
|
|
801
801
|
) : null}
|
|
@@ -149,7 +149,7 @@ export function NativeResourceFormSheet({
|
|
|
149
149
|
hitSlop={8}
|
|
150
150
|
className="min-h-[44px] justify-center px-3"
|
|
151
151
|
>
|
|
152
|
-
<Text className="text-base text-primary">{messages.common.cancel}</Text>
|
|
152
|
+
<Text className="text-base text-primary-text">{messages.common.cancel}</Text>
|
|
153
153
|
</Pressable>
|
|
154
154
|
<NativeText preset="body" accessibilityRole="header" className="font-semibold" numberOfLines={1}>
|
|
155
155
|
{title}
|
|
@@ -166,7 +166,7 @@ function LinkText({ url, label }: { url: string; label: string }) {
|
|
|
166
166
|
return (
|
|
167
167
|
<Text
|
|
168
168
|
accessibilityRole="link"
|
|
169
|
-
className="text-base text-primary underline"
|
|
169
|
+
className="text-base text-primary-text underline"
|
|
170
170
|
onPress={() => void Linking.openURL(url)}
|
|
171
171
|
>
|
|
172
172
|
{label}
|
|
@@ -124,7 +124,7 @@ describe("SettingsPage on Android (Material)", () => {
|
|
|
124
124
|
render(<SettingsPage testID="s" sections={sections} />);
|
|
125
125
|
const header = screen.getByTestId("s-section-account-header");
|
|
126
126
|
expect(header.getAttribute("role")).toBe("header");
|
|
127
|
-
expect(header.className).toContain("text-primary");
|
|
127
|
+
expect(header.className).toContain("text-primary-text");
|
|
128
128
|
expect(header.className).not.toMatch(/\bbg-|\bborder/);
|
|
129
129
|
const style = styleOf(header);
|
|
130
130
|
expect(style.textTransform).toBeUndefined();
|
package/src/layouts/auth.tsx
CHANGED
|
@@ -363,7 +363,7 @@ export function ForgotPasswordLink({
|
|
|
363
363
|
hitSlop={8}
|
|
364
364
|
className="self-end"
|
|
365
365
|
>
|
|
366
|
-
<Text className="text-sm font-medium text-primary">{label}</Text>
|
|
366
|
+
<Text className="text-sm font-medium text-primary-text">{label}</Text>
|
|
367
367
|
</Pressable>
|
|
368
368
|
);
|
|
369
369
|
}
|
|
@@ -259,7 +259,7 @@ function SectionTitle({ title, testID }: { title: string; testID: string }) {
|
|
|
259
259
|
<NativeText
|
|
260
260
|
testID={testID}
|
|
261
261
|
accessibilityRole="header"
|
|
262
|
-
className={ios ? "px-4 pb-1.5 pt-2" : "px-4 pb-2 pt-4 text-primary"}
|
|
262
|
+
className={ios ? "px-4 pb-1.5 pt-2" : "px-4 pb-2 pt-4 text-primary-text"}
|
|
263
263
|
style={
|
|
264
264
|
ios
|
|
265
265
|
? { marginHorizontal: IOS_GROUP_MARGIN, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textTransform: "uppercase" }
|
package/src/layouts/nav-bar.tsx
CHANGED
|
@@ -139,7 +139,7 @@ export function getNotificationsPageStackOptions(props: {
|
|
|
139
139
|
hitSlop={8}
|
|
140
140
|
className="min-h-[44px] justify-center px-3"
|
|
141
141
|
>
|
|
142
|
-
<Text className="text-base text-primary">Mark all read</Text>
|
|
142
|
+
<Text className="text-base text-primary-text">Mark all read</Text>
|
|
143
143
|
</Pressable>
|
|
144
144
|
)
|
|
145
145
|
: undefined);
|
|
@@ -239,7 +239,7 @@ function iosTrailingSeparatorInset(): boolean {
|
|
|
239
239
|
* `secondaryLabel` on the page background. It sits over the group (same
|
|
240
240
|
* margin) and is padded like a cell (`px-4`), so it lines up with the cell
|
|
241
241
|
* text. Android: a Material list subheader in the brand's primary color
|
|
242
|
-
* (`text-primary`, which follows the app's theme). Neither draws a band or a
|
|
242
|
+
* (`text-primary-text`, which follows the app's theme). Neither draws a band or a
|
|
243
243
|
* rule. iOS reads uppercased text as written in capitals, so the label is the
|
|
244
244
|
* title as written, and VoiceOver doesn't spell short words out.
|
|
245
245
|
*/
|
|
@@ -269,7 +269,7 @@ function DefaultSectionHeader({ title, testID }: SettingsPageSlotMap["sectionHea
|
|
|
269
269
|
<NativeText
|
|
270
270
|
testID={testID}
|
|
271
271
|
accessibilityRole="header"
|
|
272
|
-
className="px-4 pb-2 pt-4 text-primary"
|
|
272
|
+
className="px-4 pb-2 pt-4 text-primary-text"
|
|
273
273
|
style={{ fontSize: 14, lineHeight: 20, fontWeight: "500" }}
|
|
274
274
|
>
|
|
275
275
|
{title}
|
package/src/native-modules.tsx
CHANGED
|
@@ -69,7 +69,8 @@ export type GenesisListComponent = ComponentType<GenesisListProps<any>>;
|
|
|
69
69
|
|
|
70
70
|
/** The expo-image `Image` props Genesis passes. */
|
|
71
71
|
export interface GenesisImageProps {
|
|
72
|
-
|
|
72
|
+
/** `cacheKey` keys the cache in place of the URL. */
|
|
73
|
+
source: { uri: string; cacheKey?: string } | number | null;
|
|
73
74
|
style?: unknown;
|
|
74
75
|
contentFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
75
76
|
cachePolicy?: "none" | "disk" | "memory" | "memory-disk";
|