@shopify/shop-minis-react 0.1.5 → 0.1.6

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 (60) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index5.js +2 -3
  3. package/dist/_virtual/index5.js.map +1 -1
  4. package/dist/_virtual/index6.js +3 -2
  5. package/dist/_virtual/index6.js.map +1 -1
  6. package/dist/_virtual/index7.js +2 -3
  7. package/dist/_virtual/index7.js.map +1 -1
  8. package/dist/_virtual/index8.js +3 -2
  9. package/dist/_virtual/index8.js.map +1 -1
  10. package/dist/_virtual/index9.js +2 -2
  11. package/dist/components/atoms/list.js +106 -41
  12. package/dist/components/atoms/list.js.map +1 -1
  13. package/dist/components/commerce/add-to-cart.js +82 -0
  14. package/dist/components/commerce/add-to-cart.js.map +1 -0
  15. package/dist/components/{atoms → commerce}/favorite-button.js +1 -1
  16. package/dist/components/commerce/favorite-button.js.map +1 -0
  17. package/dist/components/commerce/product-card.js +10 -10
  18. package/dist/components/commerce/product-card.js.map +1 -1
  19. package/dist/components/commerce/product-link.js +6 -6
  20. package/dist/components/commerce/product-link.js.map +1 -1
  21. package/dist/index.js +276 -274
  22. package/dist/index.js.map +1 -1
  23. package/dist/internal/components/refresh-indicator.js +83 -0
  24. package/dist/internal/components/refresh-indicator.js.map +1 -0
  25. package/dist/internal/usePullToRefresh.js +149 -0
  26. package/dist/internal/usePullToRefresh.js.map +1 -0
  27. package/dist/internal/utils/virtuoso-dom.js +20 -0
  28. package/dist/internal/utils/virtuoso-dom.js.map +1 -0
  29. package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  30. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
  31. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +1 -1
  32. package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +1 -1
  33. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PopChild.js +55 -0
  34. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -0
  35. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +35 -0
  36. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -0
  37. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js +46 -0
  38. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -0
  39. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/utils.js +13 -0
  40. package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -0
  41. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
  42. package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js +1 -1
  43. package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
  44. package/package.json +1 -1
  45. package/src/components/atoms/list.tsx +97 -12
  46. package/src/components/commerce/add-to-cart.test.tsx +73 -0
  47. package/src/components/commerce/add-to-cart.tsx +132 -0
  48. package/src/components/{atoms → commerce}/favorite-button.tsx +1 -1
  49. package/src/components/commerce/product-card.tsx +2 -1
  50. package/src/components/commerce/product-link.tsx +2 -1
  51. package/src/components/index.ts +2 -1
  52. package/src/internal/components/refresh-indicator.tsx +103 -0
  53. package/src/internal/usePullToRefresh.ts +286 -0
  54. package/src/internal/utils/virtuoso-dom.ts +26 -0
  55. package/src/stories/AddToCart.stories.tsx +186 -0
  56. package/src/stories/FavoriteButton.stories.tsx +2 -2
  57. package/src/stories/PullToRefreshList.stories.tsx +122 -0
  58. package/src/styles/animations.css +54 -0
  59. package/dist/components/atoms/favorite-button.js.map +0 -1
  60. /package/src/components/{atoms → commerce}/favorite-button.test.tsx +0 -0
package/dist/index.js CHANGED
@@ -1,282 +1,284 @@
1
1
  import { DATA_NAVIGATION_TYPE_ATTRIBUTE as o, NAVIGATION_TYPES as t } from "./types/index.js";
2
2
  import { MinisContainer as i } from "./components/MinisContainer.js";
3
- import { ProductCard as n, ProductCardBadge as m, ProductCardContainer as s, ProductCardFavoriteButton as l, ProductCardImage as u, ProductCardImageContainer as f, ProductCardInfo as x, ProductCardPrice as c, ProductCardTitle as d } from "./components/commerce/product-card.js";
4
- import { ProductLink as g } from "./components/commerce/product-link.js";
5
- import { MerchantCard as D, MerchantCardContainer as A, MerchantCardHeader as P, MerchantCardInfo as h, MerchantCardName as T, MerchantCardRating as I } from "./components/commerce/merchant-card.js";
6
- import { ProductCardSkeleton as R } from "./components/commerce/product-card-skeleton.js";
7
- import { MerchantCardSkeleton as w } from "./components/commerce/merchant-card-skeleton.js";
8
- import { QuantitySelector as F } from "./components/commerce/quantity-selector.js";
9
- import { Search as b, SearchInput as k, SearchProvider as E, SearchResultsList as L } from "./components/commerce/search.js";
10
- import { ImageContentWrapper as O } from "./components/content/image-content-wrapper.js";
11
- import { MinisRouter as G } from "./components/navigation/minis-router.js";
12
- import { TransitionLink as V } from "./components/navigation/transition-link.js";
13
- import { Button as _ } from "./components/atoms/button.js";
14
- import { FavoriteButton as Y } from "./components/atoms/favorite-button.js";
15
- import { IconButton as K } from "./components/atoms/icon-button.js";
16
- import { Image as j } from "./components/atoms/image.js";
17
- import { Touchable as X } from "./components/atoms/touchable.js";
18
- import { LongPressDetector as $ } from "./components/atoms/long-press-detector.js";
19
- import { AlertDialogAtom as er } from "./components/atoms/alert-dialog.js";
20
- import { List as tr } from "./components/atoms/list.js";
21
- import { VideoPlayer as ir } from "./components/atoms/video-player.js";
22
- import { TextInput as nr } from "./components/atoms/text-input.js";
23
- import { ContentWrapper as sr } from "./components/atoms/content-wrapper.js";
24
- import { Accordion as ur, AccordionContent as fr, AccordionItem as xr, AccordionTrigger as cr } from "./components/ui/accordion.js";
25
- import { Alert as Cr, AlertDescription as gr, AlertTitle as Sr } from "./components/ui/alert.js";
26
- import { AlertDialog as Ar, AlertDialogAction as Pr, AlertDialogCancel as hr, AlertDialogContent as Tr, AlertDialogDescription as Ir, AlertDialogFooter as Mr, AlertDialogHeader as Rr, AlertDialogOverlay as vr, AlertDialogPortal as wr, AlertDialogTitle as Br, AlertDialogTrigger as Fr } from "./components/ui/alert-dialog.js";
27
- import { Avatar as br, AvatarFallback as kr, AvatarImage as Er } from "./components/ui/avatar.js";
28
- import { Badge as Nr, badgeVariants as Or } from "./components/ui/badge.js";
29
- import { Card as Gr, CardAction as Hr, CardContent as Vr, CardDescription as zr, CardFooter as _r, CardHeader as Wr, CardTitle as Yr } from "./components/ui/card.js";
30
- import { Carousel as Kr, CarouselContent as Qr, CarouselItem as jr, CarouselNext as Jr, CarouselPrevious as Xr } from "./components/ui/carousel.js";
31
- import { Checkbox as $r } from "./components/ui/checkbox.js";
32
- import { Dialog as ee, DialogClose as oe, DialogContent as te, DialogDescription as ae, DialogFooter as ie, DialogHeader as pe, DialogOverlay as ne, DialogPortal as me, DialogTitle as se, DialogTrigger as le } from "./components/ui/dialog.js";
33
- import { Drawer as fe, DrawerClose as xe, DrawerContent as ce, DrawerDescription as de, DrawerFooter as Ce, DrawerHeader as ge, DrawerOverlay as Se, DrawerPortal as De, DrawerTitle as Ae, DrawerTrigger as Pe } from "./components/ui/drawer.js";
34
- import { Input as Te } from "./components/ui/input.js";
35
- import { Label as Me } from "./components/ui/label.js";
36
- import { Progress as ve } from "./components/ui/progress.js";
37
- import { RadioGroup as Be, RadioGroupItem as Fe } from "./components/ui/radio-group.js";
38
- import { ResizableHandle as be, ResizablePanel as ke, ResizablePanelGroup as Ee } from "./components/ui/resizable.js";
39
- import { ScrollArea as Ne, ScrollBar as Oe } from "./components/ui/scroll-area.js";
40
- import { Select as Ge, SelectContent as He, SelectGroup as Ve, SelectItem as ze, SelectLabel as _e, SelectScrollDownButton as We, SelectScrollUpButton as Ye, SelectSeparator as qe, SelectTrigger as Ke, SelectValue as Qe } from "./components/ui/select.js";
41
- import { Separator as Je } from "./components/ui/separator.js";
42
- import { Sheet as Ze, SheetClose as $e, SheetContent as ro, SheetDescription as eo, SheetFooter as oo, SheetHeader as to, SheetTitle as ao, SheetTrigger as io } from "./components/ui/sheet.js";
43
- import { Toaster as no } from "./components/ui/sonner.js";
44
- import { Skeleton as so } from "./components/ui/skeleton.js";
45
- import { useRecentProducts as uo } from "./hooks/user/useRecentProducts.js";
46
- import { useRecentShops as xo } from "./hooks/user/useRecentShops.js";
47
- import { useSavedProducts as Co } from "./hooks/user/useSavedProducts.js";
48
- import { useSavedProductsActions as So } from "./hooks/user/useSavedProductsActions.js";
49
- import { useFollowedShops as Ao } from "./hooks/user/useFollowedShops.js";
50
- import { useFollowedShopsActions as ho } from "./hooks/user/useFollowedShopsActions.js";
51
- import { useCurrentUser as Io } from "./hooks/user/useCurrentUser.js";
52
- import { useOrders as Ro } from "./hooks/user/useOrders.js";
53
- import { useBuyerAttributes as wo } from "./hooks/user/useBuyerAttributes.js";
54
- import { useGenerateUserToken as Fo } from "./hooks/user/useGenerateUserToken.js";
55
- import { useProductListActions as bo } from "./hooks/product/useProductListActions.js";
56
- import { useProductLists as Eo } from "./hooks/product/useProductLists.js";
57
- import { useProductList as No } from "./hooks/product/useProductList.js";
58
- import { useProduct as yo } from "./hooks/product/useProduct.js";
59
- import { useProducts as Ho } from "./hooks/product/useProducts.js";
60
- import { useProductVariants as zo } from "./hooks/product/useProductVariants.js";
61
- import { useProductMedia as Wo } from "./hooks/product/useProductMedia.js";
62
- import { useProductSearch as qo } from "./hooks/product/useProductSearch.js";
63
- import { useRecommendedProducts as Qo } from "./hooks/product/useRecommendedProducts.js";
64
- import { usePopularProducts as Jo } from "./hooks/product/usePopularProducts.js";
65
- import { useCuratedProducts as Zo } from "./hooks/product/useCuratedProducts.js";
66
- import { useAsyncStorage as rt } from "./hooks/storage/useAsyncStorage.js";
67
- import { useSecureStorage as ot } from "./hooks/storage/useSecureStorage.js";
68
- import { useImageUpload as at } from "./hooks/storage/useImageUpload.js";
69
- import { useShopNavigation as pt } from "./hooks/navigation/useShopNavigation.js";
70
- import { useCloseMini as mt } from "./hooks/navigation/useCloseMini.js";
71
- import { useDeeplink as lt } from "./hooks/navigation/useDeeplink.js";
72
- import { useNavigateWithTransition as ft } from "./hooks/navigation/useNavigateWithTransition.js";
73
- import { useShop as ct } from "./hooks/shop/useShop.js";
74
- import { useShopCartActions as Ct } from "./hooks/shop/useShopCartActions.js";
75
- import { useRecommendedShops as St } from "./hooks/shop/useRecommendedShops.js";
76
- import { useCreateImageContent as At } from "./hooks/content/useCreateImageContent.js";
77
- import { useErrorToast as ht } from "./hooks/util/useErrorToast.js";
78
- import { useErrorScreen as It } from "./hooks/util/useErrorScreen.js";
79
- import { useShare as Rt } from "./hooks/util/useShare.js";
80
- import { useImagePicker as wt } from "./hooks/util/useImagePicker.js";
81
- import { useKeyboardAvoidingView as Ft } from "./hooks/util/useKeyboardAvoidingView.js";
82
- import { useRequestPermissions as bt } from "./hooks/util/useRequestPermissions.js";
83
- import { useOnMiniFocus as Et } from "./hooks/events/useOnMiniFocus.js";
84
- import { useOnMiniBlur as Nt } from "./hooks/events/useOnMiniBlur.js";
85
- import { useOnMiniClose as yt } from "./hooks/events/useOnMiniClose.js";
86
- import { useOnAppStateChange as Ht } from "./hooks/events/useOnAppStateChange.js";
87
- import { MiniEntityNotFoundError as zt, MiniError as _t, MiniNetworkError as Wt, formatError as Yt } from "./utils/errors.js";
88
- import { extractBrandTheme as Kt, formatReviewCount as Qt, getFeaturedImages as jt, normalizeRating as Jt } from "./utils/merchant-card.js";
89
- import { parseUrl as Zt } from "./utils/parseUrl.js";
90
- import { fileToDataUri as ra, getResizedImageUrl as ea, getThumbhashDataURL as oa } from "./utils/image.js";
91
- import { UserState as aa, UserTokenGenerateUserErrorCode as ia } from "./shop-minis-platform/src/types/user.js";
92
- import { ContentCreateUserErrorCode as na, MinisContentStatus as ma } from "./shop-minis-platform/src/types/content.js";
93
- import { Social as la } from "./shop-minis-platform/src/types/share.js";
3
+ import { AddToCartButton as n } from "./components/commerce/add-to-cart.js";
4
+ import { ProductCard as s, ProductCardBadge as l, ProductCardContainer as u, ProductCardFavoriteButton as f, ProductCardImage as x, ProductCardImageContainer as c, ProductCardInfo as d, ProductCardPrice as C, ProductCardTitle as g } from "./components/commerce/product-card.js";
5
+ import { ProductLink as D } from "./components/commerce/product-link.js";
6
+ import { MerchantCard as P, MerchantCardContainer as h, MerchantCardHeader as T, MerchantCardInfo as I, MerchantCardName as M, MerchantCardRating as R } from "./components/commerce/merchant-card.js";
7
+ import { ProductCardSkeleton as w } from "./components/commerce/product-card-skeleton.js";
8
+ import { MerchantCardSkeleton as F } from "./components/commerce/merchant-card-skeleton.js";
9
+ import { QuantitySelector as b } from "./components/commerce/quantity-selector.js";
10
+ import { Search as E, SearchInput as L, SearchProvider as N, SearchResultsList as O } from "./components/commerce/search.js";
11
+ import { FavoriteButton as G } from "./components/commerce/favorite-button.js";
12
+ import { ImageContentWrapper as V } from "./components/content/image-content-wrapper.js";
13
+ import { MinisRouter as _ } from "./components/navigation/minis-router.js";
14
+ import { TransitionLink as Y } from "./components/navigation/transition-link.js";
15
+ import { Button as K } from "./components/atoms/button.js";
16
+ import { IconButton as j } from "./components/atoms/icon-button.js";
17
+ import { Image as X } from "./components/atoms/image.js";
18
+ import { Touchable as $ } from "./components/atoms/touchable.js";
19
+ import { LongPressDetector as er } from "./components/atoms/long-press-detector.js";
20
+ import { AlertDialogAtom as tr } from "./components/atoms/alert-dialog.js";
21
+ import { List as ir } from "./components/atoms/list.js";
22
+ import { VideoPlayer as nr } from "./components/atoms/video-player.js";
23
+ import { TextInput as sr } from "./components/atoms/text-input.js";
24
+ import { ContentWrapper as ur } from "./components/atoms/content-wrapper.js";
25
+ import { Accordion as xr, AccordionContent as cr, AccordionItem as dr, AccordionTrigger as Cr } from "./components/ui/accordion.js";
26
+ import { Alert as Sr, AlertDescription as Dr, AlertTitle as Ar } from "./components/ui/alert.js";
27
+ import { AlertDialog as hr, AlertDialogAction as Tr, AlertDialogCancel as Ir, AlertDialogContent as Mr, AlertDialogDescription as Rr, AlertDialogFooter as vr, AlertDialogHeader as wr, AlertDialogOverlay as Br, AlertDialogPortal as Fr, AlertDialogTitle as Ur, AlertDialogTrigger as br } from "./components/ui/alert-dialog.js";
28
+ import { Avatar as Er, AvatarFallback as Lr, AvatarImage as Nr } from "./components/ui/avatar.js";
29
+ import { Badge as yr, badgeVariants as Gr } from "./components/ui/badge.js";
30
+ import { Card as Vr, CardAction as zr, CardContent as _r, CardDescription as Wr, CardFooter as Yr, CardHeader as qr, CardTitle as Kr } from "./components/ui/card.js";
31
+ import { Carousel as jr, CarouselContent as Jr, CarouselItem as Xr, CarouselNext as Zr, CarouselPrevious as $r } from "./components/ui/carousel.js";
32
+ import { Checkbox as ee } from "./components/ui/checkbox.js";
33
+ import { Dialog as te, DialogClose as ae, DialogContent as ie, DialogDescription as pe, DialogFooter as ne, DialogHeader as me, DialogOverlay as se, DialogPortal as le, DialogTitle as ue, DialogTrigger as fe } from "./components/ui/dialog.js";
34
+ import { Drawer as ce, DrawerClose as de, DrawerContent as Ce, DrawerDescription as ge, DrawerFooter as Se, DrawerHeader as De, DrawerOverlay as Ae, DrawerPortal as Pe, DrawerTitle as he, DrawerTrigger as Te } from "./components/ui/drawer.js";
35
+ import { Input as Me } from "./components/ui/input.js";
36
+ import { Label as ve } from "./components/ui/label.js";
37
+ import { Progress as Be } from "./components/ui/progress.js";
38
+ import { RadioGroup as Ue, RadioGroupItem as be } from "./components/ui/radio-group.js";
39
+ import { ResizableHandle as Ee, ResizablePanel as Le, ResizablePanelGroup as Ne } from "./components/ui/resizable.js";
40
+ import { ScrollArea as ye, ScrollBar as Ge } from "./components/ui/scroll-area.js";
41
+ import { Select as Ve, SelectContent as ze, SelectGroup as _e, SelectItem as We, SelectLabel as Ye, SelectScrollDownButton as qe, SelectScrollUpButton as Ke, SelectSeparator as Qe, SelectTrigger as je, SelectValue as Je } from "./components/ui/select.js";
42
+ import { Separator as Ze } from "./components/ui/separator.js";
43
+ import { Sheet as ro, SheetClose as eo, SheetContent as oo, SheetDescription as to, SheetFooter as ao, SheetHeader as io, SheetTitle as po, SheetTrigger as no } from "./components/ui/sheet.js";
44
+ import { Toaster as so } from "./components/ui/sonner.js";
45
+ import { Skeleton as uo } from "./components/ui/skeleton.js";
46
+ import { useRecentProducts as xo } from "./hooks/user/useRecentProducts.js";
47
+ import { useRecentShops as Co } from "./hooks/user/useRecentShops.js";
48
+ import { useSavedProducts as So } from "./hooks/user/useSavedProducts.js";
49
+ import { useSavedProductsActions as Ao } from "./hooks/user/useSavedProductsActions.js";
50
+ import { useFollowedShops as ho } from "./hooks/user/useFollowedShops.js";
51
+ import { useFollowedShopsActions as Io } from "./hooks/user/useFollowedShopsActions.js";
52
+ import { useCurrentUser as Ro } from "./hooks/user/useCurrentUser.js";
53
+ import { useOrders as wo } from "./hooks/user/useOrders.js";
54
+ import { useBuyerAttributes as Fo } from "./hooks/user/useBuyerAttributes.js";
55
+ import { useGenerateUserToken as bo } from "./hooks/user/useGenerateUserToken.js";
56
+ import { useProductListActions as Eo } from "./hooks/product/useProductListActions.js";
57
+ import { useProductLists as No } from "./hooks/product/useProductLists.js";
58
+ import { useProductList as yo } from "./hooks/product/useProductList.js";
59
+ import { useProduct as Ho } from "./hooks/product/useProduct.js";
60
+ import { useProducts as zo } from "./hooks/product/useProducts.js";
61
+ import { useProductVariants as Wo } from "./hooks/product/useProductVariants.js";
62
+ import { useProductMedia as qo } from "./hooks/product/useProductMedia.js";
63
+ import { useProductSearch as Qo } from "./hooks/product/useProductSearch.js";
64
+ import { useRecommendedProducts as Jo } from "./hooks/product/useRecommendedProducts.js";
65
+ import { usePopularProducts as Zo } from "./hooks/product/usePopularProducts.js";
66
+ import { useCuratedProducts as rt } from "./hooks/product/useCuratedProducts.js";
67
+ import { useAsyncStorage as ot } from "./hooks/storage/useAsyncStorage.js";
68
+ import { useSecureStorage as at } from "./hooks/storage/useSecureStorage.js";
69
+ import { useImageUpload as pt } from "./hooks/storage/useImageUpload.js";
70
+ import { useShopNavigation as mt } from "./hooks/navigation/useShopNavigation.js";
71
+ import { useCloseMini as lt } from "./hooks/navigation/useCloseMini.js";
72
+ import { useDeeplink as ft } from "./hooks/navigation/useDeeplink.js";
73
+ import { useNavigateWithTransition as ct } from "./hooks/navigation/useNavigateWithTransition.js";
74
+ import { useShop as Ct } from "./hooks/shop/useShop.js";
75
+ import { useShopCartActions as St } from "./hooks/shop/useShopCartActions.js";
76
+ import { useRecommendedShops as At } from "./hooks/shop/useRecommendedShops.js";
77
+ import { useCreateImageContent as ht } from "./hooks/content/useCreateImageContent.js";
78
+ import { useErrorToast as It } from "./hooks/util/useErrorToast.js";
79
+ import { useErrorScreen as Rt } from "./hooks/util/useErrorScreen.js";
80
+ import { useShare as wt } from "./hooks/util/useShare.js";
81
+ import { useImagePicker as Ft } from "./hooks/util/useImagePicker.js";
82
+ import { useKeyboardAvoidingView as bt } from "./hooks/util/useKeyboardAvoidingView.js";
83
+ import { useRequestPermissions as Et } from "./hooks/util/useRequestPermissions.js";
84
+ import { useOnMiniFocus as Nt } from "./hooks/events/useOnMiniFocus.js";
85
+ import { useOnMiniBlur as yt } from "./hooks/events/useOnMiniBlur.js";
86
+ import { useOnMiniClose as Ht } from "./hooks/events/useOnMiniClose.js";
87
+ import { useOnAppStateChange as zt } from "./hooks/events/useOnAppStateChange.js";
88
+ import { MiniEntityNotFoundError as Wt, MiniError as Yt, MiniNetworkError as qt, formatError as Kt } from "./utils/errors.js";
89
+ import { extractBrandTheme as jt, formatReviewCount as Jt, getFeaturedImages as Xt, normalizeRating as Zt } from "./utils/merchant-card.js";
90
+ import { parseUrl as ra } from "./utils/parseUrl.js";
91
+ import { fileToDataUri as oa, getResizedImageUrl as ta, getThumbhashDataURL as aa } from "./utils/image.js";
92
+ import { UserState as pa, UserTokenGenerateUserErrorCode as na } from "./shop-minis-platform/src/types/user.js";
93
+ import { ContentCreateUserErrorCode as sa, MinisContentStatus as la } from "./shop-minis-platform/src/types/content.js";
94
+ import { Social as fa } from "./shop-minis-platform/src/types/share.js";
94
95
  export {
95
- ur as Accordion,
96
- fr as AccordionContent,
97
- xr as AccordionItem,
98
- cr as AccordionTrigger,
99
- Cr as Alert,
100
- gr as AlertDescription,
101
- Ar as AlertDialog,
102
- Pr as AlertDialogAction,
103
- er as AlertDialogAtom,
104
- hr as AlertDialogCancel,
105
- Tr as AlertDialogContent,
106
- Ir as AlertDialogDescription,
107
- Mr as AlertDialogFooter,
108
- Rr as AlertDialogHeader,
109
- vr as AlertDialogOverlay,
110
- wr as AlertDialogPortal,
111
- Br as AlertDialogTitle,
112
- Fr as AlertDialogTrigger,
113
- Sr as AlertTitle,
114
- br as Avatar,
115
- kr as AvatarFallback,
116
- Er as AvatarImage,
117
- Nr as Badge,
118
- _ as Button,
119
- Gr as Card,
120
- Hr as CardAction,
121
- Vr as CardContent,
122
- zr as CardDescription,
123
- _r as CardFooter,
124
- Wr as CardHeader,
125
- Yr as CardTitle,
126
- Kr as Carousel,
127
- Qr as CarouselContent,
128
- jr as CarouselItem,
129
- Jr as CarouselNext,
130
- Xr as CarouselPrevious,
131
- $r as Checkbox,
132
- na as ContentCreateUserErrorCode,
133
- sr as ContentWrapper,
96
+ xr as Accordion,
97
+ cr as AccordionContent,
98
+ dr as AccordionItem,
99
+ Cr as AccordionTrigger,
100
+ n as AddToCartButton,
101
+ Sr as Alert,
102
+ Dr as AlertDescription,
103
+ hr as AlertDialog,
104
+ Tr as AlertDialogAction,
105
+ tr as AlertDialogAtom,
106
+ Ir as AlertDialogCancel,
107
+ Mr as AlertDialogContent,
108
+ Rr as AlertDialogDescription,
109
+ vr as AlertDialogFooter,
110
+ wr as AlertDialogHeader,
111
+ Br as AlertDialogOverlay,
112
+ Fr as AlertDialogPortal,
113
+ Ur as AlertDialogTitle,
114
+ br as AlertDialogTrigger,
115
+ Ar as AlertTitle,
116
+ Er as Avatar,
117
+ Lr as AvatarFallback,
118
+ Nr as AvatarImage,
119
+ yr as Badge,
120
+ K as Button,
121
+ Vr as Card,
122
+ zr as CardAction,
123
+ _r as CardContent,
124
+ Wr as CardDescription,
125
+ Yr as CardFooter,
126
+ qr as CardHeader,
127
+ Kr as CardTitle,
128
+ jr as Carousel,
129
+ Jr as CarouselContent,
130
+ Xr as CarouselItem,
131
+ Zr as CarouselNext,
132
+ $r as CarouselPrevious,
133
+ ee as Checkbox,
134
+ sa as ContentCreateUserErrorCode,
135
+ ur as ContentWrapper,
134
136
  o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
135
- ee as Dialog,
136
- oe as DialogClose,
137
- te as DialogContent,
138
- ae as DialogDescription,
139
- ie as DialogFooter,
140
- pe as DialogHeader,
141
- ne as DialogOverlay,
142
- me as DialogPortal,
143
- se as DialogTitle,
144
- le as DialogTrigger,
145
- fe as Drawer,
146
- xe as DrawerClose,
147
- ce as DrawerContent,
148
- de as DrawerDescription,
149
- Ce as DrawerFooter,
150
- ge as DrawerHeader,
151
- Se as DrawerOverlay,
152
- De as DrawerPortal,
153
- Ae as DrawerTitle,
154
- Pe as DrawerTrigger,
155
- Y as FavoriteButton,
156
- K as IconButton,
157
- j as Image,
158
- O as ImageContentWrapper,
159
- Te as Input,
160
- Me as Label,
161
- tr as List,
162
- $ as LongPressDetector,
163
- D as MerchantCard,
164
- A as MerchantCardContainer,
165
- P as MerchantCardHeader,
166
- h as MerchantCardInfo,
167
- T as MerchantCardName,
168
- I as MerchantCardRating,
169
- w as MerchantCardSkeleton,
170
- zt as MiniEntityNotFoundError,
171
- _t as MiniError,
172
- Wt as MiniNetworkError,
137
+ te as Dialog,
138
+ ae as DialogClose,
139
+ ie as DialogContent,
140
+ pe as DialogDescription,
141
+ ne as DialogFooter,
142
+ me as DialogHeader,
143
+ se as DialogOverlay,
144
+ le as DialogPortal,
145
+ ue as DialogTitle,
146
+ fe as DialogTrigger,
147
+ ce as Drawer,
148
+ de as DrawerClose,
149
+ Ce as DrawerContent,
150
+ ge as DrawerDescription,
151
+ Se as DrawerFooter,
152
+ De as DrawerHeader,
153
+ Ae as DrawerOverlay,
154
+ Pe as DrawerPortal,
155
+ he as DrawerTitle,
156
+ Te as DrawerTrigger,
157
+ G as FavoriteButton,
158
+ j as IconButton,
159
+ X as Image,
160
+ V as ImageContentWrapper,
161
+ Me as Input,
162
+ ve as Label,
163
+ ir as List,
164
+ er as LongPressDetector,
165
+ P as MerchantCard,
166
+ h as MerchantCardContainer,
167
+ T as MerchantCardHeader,
168
+ I as MerchantCardInfo,
169
+ M as MerchantCardName,
170
+ R as MerchantCardRating,
171
+ F as MerchantCardSkeleton,
172
+ Wt as MiniEntityNotFoundError,
173
+ Yt as MiniError,
174
+ qt as MiniNetworkError,
173
175
  i as MinisContainer,
174
- ma as MinisContentStatus,
175
- G as MinisRouter,
176
+ la as MinisContentStatus,
177
+ _ as MinisRouter,
176
178
  t as NAVIGATION_TYPES,
177
- n as ProductCard,
178
- m as ProductCardBadge,
179
- s as ProductCardContainer,
180
- l as ProductCardFavoriteButton,
181
- u as ProductCardImage,
182
- f as ProductCardImageContainer,
183
- x as ProductCardInfo,
184
- c as ProductCardPrice,
185
- R as ProductCardSkeleton,
186
- d as ProductCardTitle,
187
- g as ProductLink,
188
- ve as Progress,
189
- F as QuantitySelector,
190
- Be as RadioGroup,
191
- Fe as RadioGroupItem,
192
- be as ResizableHandle,
193
- ke as ResizablePanel,
194
- Ee as ResizablePanelGroup,
195
- Ne as ScrollArea,
196
- Oe as ScrollBar,
197
- b as Search,
198
- k as SearchInput,
199
- E as SearchProvider,
200
- L as SearchResultsList,
201
- Ge as Select,
202
- He as SelectContent,
203
- Ve as SelectGroup,
204
- ze as SelectItem,
205
- _e as SelectLabel,
206
- We as SelectScrollDownButton,
207
- Ye as SelectScrollUpButton,
208
- qe as SelectSeparator,
209
- Ke as SelectTrigger,
210
- Qe as SelectValue,
211
- Je as Separator,
212
- Ze as Sheet,
213
- $e as SheetClose,
214
- ro as SheetContent,
215
- eo as SheetDescription,
216
- oo as SheetFooter,
217
- to as SheetHeader,
218
- ao as SheetTitle,
219
- io as SheetTrigger,
220
- so as Skeleton,
221
- la as Social,
222
- nr as TextInput,
223
- no as Toaster,
224
- X as Touchable,
225
- V as TransitionLink,
226
- aa as UserState,
227
- ia as UserTokenGenerateUserErrorCode,
228
- ir as VideoPlayer,
229
- Or as badgeVariants,
230
- Kt as extractBrandTheme,
231
- ra as fileToDataUri,
232
- Yt as formatError,
233
- Qt as formatReviewCount,
234
- jt as getFeaturedImages,
235
- ea as getResizedImageUrl,
236
- oa as getThumbhashDataURL,
237
- Jt as normalizeRating,
238
- Zt as parseUrl,
239
- rt as useAsyncStorage,
240
- wo as useBuyerAttributes,
241
- mt as useCloseMini,
242
- At as useCreateImageContent,
243
- Zo as useCuratedProducts,
244
- Io as useCurrentUser,
245
- lt as useDeeplink,
246
- It as useErrorScreen,
247
- ht as useErrorToast,
248
- Ao as useFollowedShops,
249
- ho as useFollowedShopsActions,
250
- Fo as useGenerateUserToken,
251
- wt as useImagePicker,
252
- at as useImageUpload,
253
- Ft as useKeyboardAvoidingView,
254
- ft as useNavigateWithTransition,
255
- Ht as useOnAppStateChange,
256
- Nt as useOnMiniBlur,
257
- yt as useOnMiniClose,
258
- Et as useOnMiniFocus,
259
- Ro as useOrders,
260
- Jo as usePopularProducts,
261
- yo as useProduct,
262
- No as useProductList,
263
- bo as useProductListActions,
264
- Eo as useProductLists,
265
- Wo as useProductMedia,
266
- qo as useProductSearch,
267
- zo as useProductVariants,
268
- Ho as useProducts,
269
- uo as useRecentProducts,
270
- xo as useRecentShops,
271
- Qo as useRecommendedProducts,
272
- St as useRecommendedShops,
273
- bt as useRequestPermissions,
274
- Co as useSavedProducts,
275
- So as useSavedProductsActions,
276
- ot as useSecureStorage,
277
- Rt as useShare,
278
- ct as useShop,
279
- Ct as useShopCartActions,
280
- pt as useShopNavigation
179
+ s as ProductCard,
180
+ l as ProductCardBadge,
181
+ u as ProductCardContainer,
182
+ f as ProductCardFavoriteButton,
183
+ x as ProductCardImage,
184
+ c as ProductCardImageContainer,
185
+ d as ProductCardInfo,
186
+ C as ProductCardPrice,
187
+ w as ProductCardSkeleton,
188
+ g as ProductCardTitle,
189
+ D as ProductLink,
190
+ Be as Progress,
191
+ b as QuantitySelector,
192
+ Ue as RadioGroup,
193
+ be as RadioGroupItem,
194
+ Ee as ResizableHandle,
195
+ Le as ResizablePanel,
196
+ Ne as ResizablePanelGroup,
197
+ ye as ScrollArea,
198
+ Ge as ScrollBar,
199
+ E as Search,
200
+ L as SearchInput,
201
+ N as SearchProvider,
202
+ O as SearchResultsList,
203
+ Ve as Select,
204
+ ze as SelectContent,
205
+ _e as SelectGroup,
206
+ We as SelectItem,
207
+ Ye as SelectLabel,
208
+ qe as SelectScrollDownButton,
209
+ Ke as SelectScrollUpButton,
210
+ Qe as SelectSeparator,
211
+ je as SelectTrigger,
212
+ Je as SelectValue,
213
+ Ze as Separator,
214
+ ro as Sheet,
215
+ eo as SheetClose,
216
+ oo as SheetContent,
217
+ to as SheetDescription,
218
+ ao as SheetFooter,
219
+ io as SheetHeader,
220
+ po as SheetTitle,
221
+ no as SheetTrigger,
222
+ uo as Skeleton,
223
+ fa as Social,
224
+ sr as TextInput,
225
+ so as Toaster,
226
+ $ as Touchable,
227
+ Y as TransitionLink,
228
+ pa as UserState,
229
+ na as UserTokenGenerateUserErrorCode,
230
+ nr as VideoPlayer,
231
+ Gr as badgeVariants,
232
+ jt as extractBrandTheme,
233
+ oa as fileToDataUri,
234
+ Kt as formatError,
235
+ Jt as formatReviewCount,
236
+ Xt as getFeaturedImages,
237
+ ta as getResizedImageUrl,
238
+ aa as getThumbhashDataURL,
239
+ Zt as normalizeRating,
240
+ ra as parseUrl,
241
+ ot as useAsyncStorage,
242
+ Fo as useBuyerAttributes,
243
+ lt as useCloseMini,
244
+ ht as useCreateImageContent,
245
+ rt as useCuratedProducts,
246
+ Ro as useCurrentUser,
247
+ ft as useDeeplink,
248
+ Rt as useErrorScreen,
249
+ It as useErrorToast,
250
+ ho as useFollowedShops,
251
+ Io as useFollowedShopsActions,
252
+ bo as useGenerateUserToken,
253
+ Ft as useImagePicker,
254
+ pt as useImageUpload,
255
+ bt as useKeyboardAvoidingView,
256
+ ct as useNavigateWithTransition,
257
+ zt as useOnAppStateChange,
258
+ yt as useOnMiniBlur,
259
+ Ht as useOnMiniClose,
260
+ Nt as useOnMiniFocus,
261
+ wo as useOrders,
262
+ Zo as usePopularProducts,
263
+ Ho as useProduct,
264
+ yo as useProductList,
265
+ Eo as useProductListActions,
266
+ No as useProductLists,
267
+ qo as useProductMedia,
268
+ Qo as useProductSearch,
269
+ Wo as useProductVariants,
270
+ zo as useProducts,
271
+ xo as useRecentProducts,
272
+ Co as useRecentShops,
273
+ Jo as useRecommendedProducts,
274
+ At as useRecommendedShops,
275
+ Et as useRequestPermissions,
276
+ So as useSavedProducts,
277
+ Ao as useSavedProductsActions,
278
+ at as useSecureStorage,
279
+ wt as useShare,
280
+ Ct as useShop,
281
+ St as useShopCartActions,
282
+ mt as useShopNavigation
281
283
  };
282
284
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}