@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.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-T7FEVT62.js → chunk-EAHK7D7N.js} +9 -9
  3. package/dist/chunk-EAHK7D7N.js.map +1 -0
  4. package/dist/{chunk-PWYMRUAK.js → chunk-GGH3ZQNO.js} +6 -6
  5. package/dist/chunk-GGH3ZQNO.js.map +1 -0
  6. package/dist/{chunk-UZCJDMGE.js → chunk-IWWXERKQ.js} +17 -16
  7. package/dist/chunk-IWWXERKQ.js.map +1 -0
  8. package/dist/{chunk-PWS2HLDE.js → chunk-PMS2V46D.js} +2 -2
  9. package/dist/{chunk-PWS2HLDE.js.map → chunk-PMS2V46D.js.map} +1 -1
  10. package/dist/{chunk-JZ7RAGDQ.js → chunk-SG7LYX7Z.js} +4 -4
  11. package/dist/{chunk-JZ7RAGDQ.js.map → chunk-SG7LYX7Z.js.map} +1 -1
  12. package/dist/{chunk-FGIIBON3.js → chunk-VEWSY4TZ.js} +3 -3
  13. package/dist/{chunk-FGIIBON3.js.map → chunk-VEWSY4TZ.js.map} +1 -1
  14. package/dist/{chunk-DHONOH6K.js → chunk-ZUR4PK77.js} +9 -8
  15. package/dist/chunk-ZUR4PK77.js.map +1 -0
  16. package/dist/components/index.d.ts +12 -4
  17. package/dist/components/index.js +5 -5
  18. package/dist/data/index.js +8 -8
  19. package/dist/data/index.js.map +1 -1
  20. package/dist/hooks/index.d.ts +2 -2
  21. package/dist/hooks/index.js +1 -1
  22. package/dist/icons/lucide.d.ts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +7 -7
  25. package/dist/layouts/index.js +5 -5
  26. package/dist/{native-modules-CeAaO2Dh.d.ts → native-modules-Bkm1jHO-.d.ts} +2 -0
  27. package/package.json +3 -3
  28. package/src/__tests__/fake-modules.tsx +1 -0
  29. package/src/__tests__/native-modules.test.tsx +39 -0
  30. package/src/components/__tests__/gallery-grid.test.tsx +20 -0
  31. package/src/components/__tests__/lightbox.test.tsx +16 -0
  32. package/src/components/chip-group.tsx +1 -1
  33. package/src/components/gallery-grid.tsx +1 -1
  34. package/src/components/image.tsx +15 -4
  35. package/src/components/inline-alert.tsx +1 -1
  36. package/src/components/lightbox-zoom.tsx +8 -6
  37. package/src/components/lightbox.tsx +2 -1
  38. package/src/components/search-bar.tsx +1 -1
  39. package/src/components/stepper.tsx +1 -1
  40. package/src/components/tab-bar.tsx +2 -2
  41. package/src/data/resource-view/NativeLinkPicker.tsx +1 -1
  42. package/src/data/resource-view/NativeRecordView.tsx +1 -1
  43. package/src/data/resource-view/NativeResourceFormSheet.tsx +1 -1
  44. package/src/data/resource-view/display.tsx +1 -1
  45. package/src/layouts/__tests__/settings-page-native-look.test.tsx +1 -1
  46. package/src/layouts/auth.tsx +1 -1
  47. package/src/layouts/inbox-page.tsx +1 -1
  48. package/src/layouts/nav-bar.tsx +1 -1
  49. package/src/layouts/notifications-page.tsx +1 -1
  50. package/src/layouts/settings-page.tsx +2 -2
  51. package/src/native-modules.tsx +2 -1
  52. package/dist/chunk-DHONOH6K.js.map +0 -1
  53. package/dist/chunk-PWYMRUAK.js.map +0 -1
  54. package/dist/chunk-T7FEVT62.js.map +0 -1
  55. package/dist/chunk-UZCJDMGE.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { NativeImage, NativeCheckbox } from './chunk-DHONOH6K.js';
2
- import { NativeIcon, NativeSheet, NativeText, NativeBadge, NativeButton, buttonTextVariants, NativeSheetScrollView, NativeSkeleton } from './chunk-FGIIBON3.js';
3
- import { useGenesisModules, useThemeMode, useMotion, useReducedMotion, useThemeRoles } from './chunk-PWS2HLDE.js';
1
+ import { NativeImage, NativeCheckbox } from './chunk-ZUR4PK77.js';
2
+ import { NativeIcon, NativeSheet, NativeText, NativeBadge, NativeButton, buttonTextVariants, NativeSheetScrollView, NativeSkeleton } from './chunk-VEWSY4TZ.js';
3
+ import { useGenesisModules, useThemeMode, useMotion, useReducedMotion, useThemeRoles } from './chunk-PMS2V46D.js';
4
4
  import { cn } from './chunk-OHZD7KRO.js';
5
5
  import { View, Text, Platform, AccessibilityInfo, Animated, Pressable, Modal, StatusBar, Dimensions, TextInput, ScrollView, PanResponder, FlatList, Easing, Share } from 'react-native';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -951,7 +951,7 @@ function NativeStepper({
951
951
  className: cn(
952
952
  "text-xs font-semibold",
953
953
  isCompleted && "text-primary-foreground",
954
- isCurrent && "text-primary",
954
+ isCurrent && "text-primary-text",
955
955
  !isCompleted && !isCurrent && "text-muted-foreground"
956
956
  ),
957
957
  children: i + 1
@@ -1231,7 +1231,7 @@ function NativeChip({
1231
1231
  {
1232
1232
  className: cn(
1233
1233
  "text-sm",
1234
- isSelected ? "font-semibold text-primary" : "text-foreground"
1234
+ isSelected ? "font-semibold text-primary-text" : "text-foreground"
1235
1235
  ),
1236
1236
  children
1237
1237
  }
@@ -2123,8 +2123,8 @@ var clamp2 = (v, limit) => Math.max(-limit, Math.min(limit, v));
2123
2123
  function NativeZoomablePhoto(props) {
2124
2124
  return Platform.OS === "ios" ? /* @__PURE__ */ jsx(ZoomableIos, { ...props }) : /* @__PURE__ */ jsx(ZoomablePan, { ...props });
2125
2125
  }
2126
- function Photo({ src, alt, width, height, testID }) {
2127
- return /* @__PURE__ */ jsx(NativeImage, { src, alt, width, height, contentFit: "contain", className: "bg-transparent", testID });
2126
+ function Photo({ src, cacheKey, alt, width, height, testID }) {
2127
+ return /* @__PURE__ */ jsx(NativeImage, { src, cacheKey, alt, width, height, contentFit: "contain", className: "bg-transparent", testID });
2128
2128
  }
2129
2129
  function useTaps(onSingle, onDouble) {
2130
2130
  const last = useRef(0);
@@ -2151,7 +2151,7 @@ function useTaps(onSingle, onDouble) {
2151
2151
  function zoomTo(view, rect, animated) {
2152
2152
  view?.scrollResponderZoomTo?.({ ...rect, animated }, animated);
2153
2153
  }
2154
- function ZoomableIos({ src, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }) {
2154
+ function ZoomableIos({ src, cacheKey, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }) {
2155
2155
  const ref = useRef(null);
2156
2156
  const scale = useRef(1);
2157
2157
  const reducedMotion = useReducedMotion();
@@ -2194,11 +2194,11 @@ function ZoomableIos({ src, alt, width, height, active, onZoomChange, zoomable =
2194
2194
  if (lightboxShouldDismiss(-e.nativeEvent.contentOffset.y, -(e.nativeEvent.velocity?.y ?? 0))) onDismiss();
2195
2195
  else onPull(0);
2196
2196
  },
2197
- children: /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: tap, style: { width, height }, children: /* @__PURE__ */ jsx(Photo, { src, alt, width, height, testID: `${testID}-image` }) })
2197
+ children: /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: tap, style: { width, height }, children: /* @__PURE__ */ jsx(Photo, { src, cacheKey, alt, width, height, testID: `${testID}-image` }) })
2198
2198
  }
2199
2199
  );
2200
2200
  }
2201
- function ZoomablePan({ src, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }) {
2201
+ function ZoomablePan({ src, cacheKey, alt, width, height, active, onZoomChange, zoomable = true, onPull, onDismiss, onTap, testID }) {
2202
2202
  const reducedMotion = useReducedMotion();
2203
2203
  const scale = useRef(new Animated.Value(1)).current;
2204
2204
  const tx = useRef(new Animated.Value(0)).current;
@@ -2297,7 +2297,7 @@ function ZoomablePan({ src, alt, width, height, active, onZoomChange, zoomable =
2297
2297
  }),
2298
2298
  [width, height, zoomable, onPull, onDismiss, settle, scale, tx, ty]
2299
2299
  );
2300
- return /* @__PURE__ */ jsx(View, { testID, style: { width, height, overflow: "hidden" }, ...responder.panHandlers, children: /* @__PURE__ */ jsx(Animated.View, { style: { width, height, transform: [{ translateX: tx }, { translateY: ty }, { scale }] }, children: /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: tap, style: { width, height }, children: /* @__PURE__ */ jsx(Photo, { src, alt, width, height, testID: `${testID}-image` }) }) }) });
2300
+ return /* @__PURE__ */ jsx(View, { testID, style: { width, height, overflow: "hidden" }, ...responder.panHandlers, children: /* @__PURE__ */ jsx(Animated.View, { style: { width, height, transform: [{ translateX: tx }, { translateY: ty }, { scale }] }, children: /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: tap, style: { width, height }, children: /* @__PURE__ */ jsx(Photo, { src, cacheKey, alt, width, height, testID: `${testID}-image` }) }) }) });
2301
2301
  }
2302
2302
  var defaultNativeLightboxLabels = {
2303
2303
  close: "Close",
@@ -2434,6 +2434,7 @@ function LightboxBody({
2434
2434
  NativeZoomablePhoto,
2435
2435
  {
2436
2436
  src: it.src,
2437
+ cacheKey: it.cacheKey,
2437
2438
  alt: it.alt ?? labels.photo(i + 1, items.length),
2438
2439
  width,
2439
2440
  height: size.height,
@@ -2445,7 +2446,7 @@ function LightboxBody({
2445
2446
  onTap: toggleChrome,
2446
2447
  testID: `${testID}-photo-${it.id}`
2447
2448
  }
2448
- ) : /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: toggleChrome, style: { width, flex: 1 }, children: /* @__PURE__ */ jsx(NativeImage, { src: it.src, alt: it.alt ?? labels.photo(i + 1, items.length), className: "h-full w-full", contentFit: "contain" }) }) }),
2449
+ ) : /* @__PURE__ */ jsx(Pressable, { accessible: false, onPress: toggleChrome, style: { width, flex: 1 }, children: /* @__PURE__ */ jsx(NativeImage, { src: it.src, cacheKey: it.cacheKey, alt: it.alt ?? labels.photo(i + 1, items.length), className: "h-full w-full", contentFit: "contain" }) }) }),
2449
2450
  style: { flex: 1 }
2450
2451
  }
2451
2452
  ) }),
@@ -2635,7 +2636,7 @@ function Slot({ item, active }) {
2635
2636
  item.icon,
2636
2637
  item.badge != null ? /* @__PURE__ */ jsx(View, { className: "absolute -right-3 -top-1.5 min-w-4 items-center rounded-full bg-primary px-1", children: /* @__PURE__ */ jsx(Text, { className: "text-[10px] font-semibold text-primary-foreground", children: item.badge }) }) : null
2637
2638
  ] }),
2638
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, className: cn("text-xs font-medium", active ? "text-primary" : "text-muted-foreground"), children: item.label })
2639
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, className: cn("text-xs font-medium", active ? "text-primary-text" : "text-muted-foreground"), children: item.label })
2639
2640
  ] });
2640
2641
  }
2641
2642
  function NativeTabBar({
@@ -2693,7 +2694,7 @@ function NativeTabBar({
2693
2694
  className: cn("min-h-[44px] flex-row items-center gap-3 rounded-lg px-3", active && "bg-accent"),
2694
2695
  children: [
2695
2696
  item.icon,
2696
- /* @__PURE__ */ jsx(Text, { className: cn("flex-1 text-base font-medium", active ? "text-primary" : "text-foreground"), children: item.label }),
2697
+ /* @__PURE__ */ jsx(Text, { className: cn("flex-1 text-base font-medium", active ? "text-accent-foreground" : "text-foreground"), children: item.label }),
2697
2698
  item.badge != null ? /* @__PURE__ */ jsx(NativeBadge, { variant: "secondary", children: item.badge }) : null
2698
2699
  ]
2699
2700
  },
@@ -2848,5 +2849,5 @@ function NativeWhatsNewSheet({
2848
2849
  }
2849
2850
 
2850
2851
  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 };
2851
- //# sourceMappingURL=chunk-UZCJDMGE.js.map
2852
- //# sourceMappingURL=chunk-UZCJDMGE.js.map
2852
+ //# sourceMappingURL=chunk-IWWXERKQ.js.map
2853
+ //# sourceMappingURL=chunk-IWWXERKQ.js.map