@shopify/shop-minis-react 0.0.30 → 0.0.32

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 (36) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index2.js +4 -4
  3. package/dist/_virtual/index3.js +4 -4
  4. package/dist/_virtual/index5.js +2 -3
  5. package/dist/_virtual/index5.js.map +1 -1
  6. package/dist/_virtual/index6.js +3 -2
  7. package/dist/_virtual/index6.js.map +1 -1
  8. package/dist/_virtual/index7.js +2 -2
  9. package/dist/_virtual/index8.js +2 -2
  10. package/dist/_virtual/index9.js +2 -2
  11. package/dist/components/commerce/product-card.js +195 -199
  12. package/dist/components/commerce/product-card.js.map +1 -1
  13. package/dist/components/ui/badge.js +21 -19
  14. package/dist/components/ui/badge.js.map +1 -1
  15. package/dist/hooks/user/useGenerateUserToken.js +12 -0
  16. package/dist/hooks/user/useGenerateUserToken.js.map +1 -0
  17. package/dist/index.js +254 -241
  18. package/dist/index.js.map +1 -1
  19. package/dist/mocks.js +16 -8
  20. package/dist/mocks.js.map +1 -1
  21. package/dist/shop-minis-platform/src/types/user.js +6 -0
  22. package/dist/shop-minis-platform/src/types/user.js.map +1 -0
  23. 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
  24. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
  25. package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +1 -1
  26. package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +1 -1
  27. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
  28. 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
  29. package/dist/shop-minis-react/node_modules/.pnpm/video.js@8.23.3/node_modules/video.js/dist/video.es.js +1 -1
  30. package/dist/utils/colors.js +1 -1
  31. package/package.json +2 -2
  32. package/src/components/commerce/product-card.tsx +211 -182
  33. package/src/components/ui/badge.tsx +7 -9
  34. package/src/hooks/index.ts +1 -0
  35. package/src/hooks/user/useGenerateUserToken.ts +25 -0
  36. package/src/mocks.ts +11 -4
package/dist/index.js CHANGED
@@ -1,247 +1,260 @@
1
1
  import { DATA_NAVIGATION_TYPE_ATTRIBUTE as o, NAVIGATION_TYPES as t } from "./types/index.js";
2
- import { MinisContainer as p } from "./components/MinisContainer.js";
3
- import { ProductCard as l } from "./components/commerce/product-card.js";
4
- import { ProductLink as s } from "./components/commerce/product-link.js";
5
- import { MerchantCard as f, MerchantCardPrimitive as x } from "./components/commerce/merchant-card.js";
6
- import { ProductCardSkeleton as c } from "./components/commerce/product-card-skeleton.js";
7
- import { MerchantCardSkeleton as g } from "./components/commerce/merchant-card-skeleton.js";
8
- import { QuantitySelector as C } from "./components/commerce/quantity-selector.js";
9
- import { Search as A, SearchInput as P, SearchProvider as h, SearchResultsList as T } from "./components/commerce/search.js";
10
- import { ImageContentWrapper as v } from "./components/content/image-content-wrapper.js";
11
- import { MinisRouter as R } from "./components/navigation/minis-router.js";
12
- import { TransitionLink as E } from "./components/navigation/transition-link.js";
13
- import { Button as k } from "./components/atoms/button.js";
14
- import { FavoriteButton as L } from "./components/atoms/favorite-button.js";
15
- import { IconButton as N } from "./components/atoms/icon-button.js";
16
- import { ThumbhashImage as U } from "./components/atoms/thumbhash-image.js";
17
- import { Touchable as H } from "./components/atoms/touchable.js";
18
- import { LongPressDetector as V } from "./components/atoms/long-press-detector.js";
19
- import { AlertDialogAtom as _ } from "./components/atoms/alert-dialog.js";
20
- import { List as Y } from "./components/atoms/list.js";
21
- import { VideoPlayer as j } from "./components/atoms/video-player.js";
22
- import { Accordion as J, AccordionContent as K, AccordionItem as X, AccordionTrigger as Z } from "./components/ui/accordion.js";
23
- import { Alert as rr, AlertDescription as er, AlertTitle as or } from "./components/ui/alert.js";
24
- import { AlertDialog as ar, AlertDialogAction as pr, AlertDialogCancel as ir, AlertDialogContent as lr, AlertDialogDescription as mr, AlertDialogFooter as sr, AlertDialogHeader as nr, AlertDialogOverlay as fr, AlertDialogPortal as xr, AlertDialogTitle as ur, AlertDialogTrigger as cr } from "./components/ui/alert-dialog.js";
25
- import { Avatar as gr, AvatarFallback as Sr, AvatarImage as Cr } from "./components/ui/avatar.js";
26
- import { Badge as Ar, badgeVariants as Pr } from "./components/ui/badge.js";
27
- import { Card as Tr, CardAction as Ir, CardContent as vr, CardDescription as wr, CardFooter as Rr, CardHeader as br, CardTitle as Er } from "./components/ui/card.js";
28
- import { Carousel as kr, CarouselContent as Br, CarouselItem as Lr, CarouselNext as Mr, CarouselPrevious as Nr } from "./components/ui/carousel.js";
29
- import { Checkbox as Ur } from "./components/ui/checkbox.js";
30
- import { Dialog as Hr, DialogClose as Or, DialogContent as Vr, DialogDescription as zr, DialogFooter as _r, DialogHeader as Wr, DialogOverlay as Yr, DialogPortal as Qr, DialogTitle as jr, DialogTrigger as qr } from "./components/ui/dialog.js";
31
- import { Drawer as Kr, DrawerClose as Xr, DrawerContent as Zr, DrawerDescription as $r, DrawerFooter as re, DrawerHeader as ee, DrawerOverlay as oe, DrawerPortal as te, DrawerTitle as ae, DrawerTrigger as pe } from "./components/ui/drawer.js";
32
- import { Input as le } from "./components/ui/input.js";
33
- import { Label as se } from "./components/ui/label.js";
34
- import { Progress as fe } from "./components/ui/progress.js";
35
- import { RadioGroup as ue, RadioGroupItem as ce } from "./components/ui/radio-group.js";
36
- import { ResizableHandle as ge, ResizablePanel as Se, ResizablePanelGroup as Ce } from "./components/ui/resizable.js";
37
- import { ScrollArea as Ae, ScrollBar as Pe } from "./components/ui/scroll-area.js";
38
- import { Select as Te, SelectContent as Ie, SelectGroup as ve, SelectItem as we, SelectLabel as Re, SelectScrollDownButton as be, SelectScrollUpButton as Ee, SelectSeparator as Fe, SelectTrigger as ke, SelectValue as Be } from "./components/ui/select.js";
39
- import { Separator as Me } from "./components/ui/separator.js";
40
- import { Sheet as ye, SheetClose as Ue, SheetContent as Ge, SheetDescription as He, SheetFooter as Oe, SheetHeader as Ve, SheetTitle as ze, SheetTrigger as _e } from "./components/ui/sheet.js";
41
- import { Toaster as Ye } from "./components/ui/sonner.js";
42
- import { Skeleton as je } from "./components/ui/skeleton.js";
43
- import { useRecentProducts as Je } from "./hooks/user/useRecentProducts.js";
44
- import { useRecentShops as Xe } from "./hooks/user/useRecentShops.js";
45
- import { useSavedProducts as $e } from "./hooks/user/useSavedProducts.js";
46
- import { useSavedProductsActions as eo } from "./hooks/user/useSavedProductsActions.js";
47
- import { useFollowedShops as to } from "./hooks/user/useFollowedShops.js";
48
- import { useFollowedShopsActions as po } from "./hooks/user/useFollowedShopsActions.js";
49
- import { useCurrentUser as lo } from "./hooks/user/useCurrentUser.js";
50
- import { useOrders as so } from "./hooks/user/useOrders.js";
51
- import { useBuyerAttributes as fo } from "./hooks/user/useBuyerAttributes.js";
52
- import { useProductListActions as uo } from "./hooks/product/useProductListActions.js";
53
- import { useProductLists as go } from "./hooks/product/useProductLists.js";
54
- import { useProductList as Co } from "./hooks/product/useProductList.js";
55
- import { useProduct as Ao } from "./hooks/product/useProduct.js";
56
- import { useProducts as ho } from "./hooks/product/useProducts.js";
57
- import { useProductVariants as Io } from "./hooks/product/useProductVariants.js";
58
- import { useProductMedia as wo } from "./hooks/product/useProductMedia.js";
59
- import { useProductSearch as bo } from "./hooks/product/useProductSearch.js";
60
- import { useRecommendedProducts as Fo } from "./hooks/product/useRecommendedProducts.js";
61
- import { usePopularProducts as Bo } from "./hooks/product/usePopularProducts.js";
62
- import { useCuratedProducts as Mo } from "./hooks/product/useCuratedProducts.js";
63
- import { useAsyncStorage as yo } from "./hooks/storage/useAsyncStorage.js";
64
- import { useSecureStorage as Go } from "./hooks/storage/useSecureStorage.js";
65
- import { useImageUpload as Oo } from "./hooks/storage/useImageUpload.js";
66
- import { useShopNavigation as zo } from "./hooks/navigation/useShopNavigation.js";
67
- import { useCloseMini as Wo } from "./hooks/navigation/useCloseMini.js";
68
- import { useDeeplink as Qo } from "./hooks/navigation/useDeeplink.js";
69
- import { useNavigateWithTransition as qo } from "./hooks/navigation/useNavigateWithTransition.js";
70
- import { useShop as Ko } from "./hooks/shop/useShop.js";
71
- import { useShopCartActions as Zo } from "./hooks/shop/useShopCartActions.js";
72
- import { useRecommendedShops as rt } from "./hooks/shop/useRecommendedShops.js";
73
- import { useCreateImageContent as ot } from "./hooks/content/useCreateImageContent.js";
74
- import { useErrorToast as at } from "./hooks/util/useErrorToast.js";
75
- import { useErrorScreen as it } from "./hooks/util/useErrorScreen.js";
76
- import { useShare as mt } from "./hooks/util/useShare.js";
77
- import { useImagePicker as nt } from "./hooks/util/useImagePicker.js";
78
- import { MiniEntityNotFoundError as xt, MiniError as ut, MiniNetworkError as ct, formatError as dt } from "./utils/errors.js";
79
- import { extractBrandTheme as St, formatReviewCount as Ct, getFeaturedImages as Dt, normalizeRating as At } from "./utils/merchant-card.js";
80
- import { parseUrl as ht } from "./utils/parseUrl.js";
81
- import { fileToDataUri as It } from "./utils/imageToDataUri.js";
82
- import { ContentCreateUserErrorCode as wt } from "./shop-minis-platform/src/types/content.js";
83
- import { Consent as bt, ConsentStatus as Et } from "./shop-minis-platform/src/types/permissions.js";
2
+ import { MinisContainer as i } from "./components/MinisContainer.js";
3
+ import { ProductCard as m, ProductCardBadge as l, ProductCardContainer as s, ProductCardFavoriteButton as n, 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, MerchantCardPrimitive as P } from "./components/commerce/merchant-card.js";
6
+ import { ProductCardSkeleton as h } from "./components/commerce/product-card-skeleton.js";
7
+ import { MerchantCardSkeleton as I } from "./components/commerce/merchant-card-skeleton.js";
8
+ import { QuantitySelector as w } from "./components/commerce/quantity-selector.js";
9
+ import { Search as k, SearchInput as B, SearchProvider as E, SearchResultsList as F } from "./components/commerce/search.js";
10
+ import { ImageContentWrapper as U } from "./components/content/image-content-wrapper.js";
11
+ import { MinisRouter as M } from "./components/navigation/minis-router.js";
12
+ import { TransitionLink as y } from "./components/navigation/transition-link.js";
13
+ import { Button as H } from "./components/atoms/button.js";
14
+ import { FavoriteButton as V } from "./components/atoms/favorite-button.js";
15
+ import { IconButton as _ } from "./components/atoms/icon-button.js";
16
+ import { ThumbhashImage as Y } from "./components/atoms/thumbhash-image.js";
17
+ import { Touchable as j } from "./components/atoms/touchable.js";
18
+ import { LongPressDetector as J } from "./components/atoms/long-press-detector.js";
19
+ import { AlertDialogAtom as X } from "./components/atoms/alert-dialog.js";
20
+ import { List as $ } from "./components/atoms/list.js";
21
+ import { VideoPlayer as er } from "./components/atoms/video-player.js";
22
+ import { Accordion as tr, AccordionContent as ar, AccordionItem as ir, AccordionTrigger as pr } from "./components/ui/accordion.js";
23
+ import { Alert as lr, AlertDescription as sr, AlertTitle as nr } from "./components/ui/alert.js";
24
+ import { AlertDialog as fr, AlertDialogAction as xr, AlertDialogCancel as cr, AlertDialogContent as dr, AlertDialogDescription as Cr, AlertDialogFooter as gr, AlertDialogHeader as Sr, AlertDialogOverlay as Dr, AlertDialogPortal as Pr, AlertDialogTitle as Ar, AlertDialogTrigger as hr } from "./components/ui/alert-dialog.js";
25
+ import { Avatar as Ir, AvatarFallback as vr, AvatarImage as wr } from "./components/ui/avatar.js";
26
+ import { Badge as kr, badgeVariants as Br } from "./components/ui/badge.js";
27
+ import { Card as Fr, CardAction as br, CardContent as Ur, CardDescription as Lr, CardFooter as Mr, CardHeader as Nr, CardTitle as yr } from "./components/ui/card.js";
28
+ import { Carousel as Hr, CarouselContent as Or, CarouselItem as Vr, CarouselNext as zr, CarouselPrevious as _r } from "./components/ui/carousel.js";
29
+ import { Checkbox as Yr } from "./components/ui/checkbox.js";
30
+ import { Dialog as jr, DialogClose as qr, DialogContent as Jr, DialogDescription as Kr, DialogFooter as Xr, DialogHeader as Zr, DialogOverlay as $r, DialogPortal as re, DialogTitle as ee, DialogTrigger as oe } from "./components/ui/dialog.js";
31
+ import { Drawer as ae, DrawerClose as ie, DrawerContent as pe, DrawerDescription as me, DrawerFooter as le, DrawerHeader as se, DrawerOverlay as ne, DrawerPortal as ue, DrawerTitle as fe, DrawerTrigger as xe } from "./components/ui/drawer.js";
32
+ import { Input as de } from "./components/ui/input.js";
33
+ import { Label as ge } from "./components/ui/label.js";
34
+ import { Progress as De } from "./components/ui/progress.js";
35
+ import { RadioGroup as Ae, RadioGroupItem as he } from "./components/ui/radio-group.js";
36
+ import { ResizableHandle as Ie, ResizablePanel as ve, ResizablePanelGroup as we } from "./components/ui/resizable.js";
37
+ import { ScrollArea as ke, ScrollBar as Be } from "./components/ui/scroll-area.js";
38
+ import { Select as Fe, SelectContent as be, SelectGroup as Ue, SelectItem as Le, SelectLabel as Me, SelectScrollDownButton as Ne, SelectScrollUpButton as ye, SelectSeparator as Ge, SelectTrigger as He, SelectValue as Oe } from "./components/ui/select.js";
39
+ import { Separator as ze } from "./components/ui/separator.js";
40
+ import { Sheet as We, SheetClose as Ye, SheetContent as Qe, SheetDescription as je, SheetFooter as qe, SheetHeader as Je, SheetTitle as Ke, SheetTrigger as Xe } from "./components/ui/sheet.js";
41
+ import { Toaster as $e } from "./components/ui/sonner.js";
42
+ import { Skeleton as eo } from "./components/ui/skeleton.js";
43
+ import { useRecentProducts as to } from "./hooks/user/useRecentProducts.js";
44
+ import { useRecentShops as io } from "./hooks/user/useRecentShops.js";
45
+ import { useSavedProducts as mo } from "./hooks/user/useSavedProducts.js";
46
+ import { useSavedProductsActions as so } from "./hooks/user/useSavedProductsActions.js";
47
+ import { useFollowedShops as uo } from "./hooks/user/useFollowedShops.js";
48
+ import { useFollowedShopsActions as xo } from "./hooks/user/useFollowedShopsActions.js";
49
+ import { useCurrentUser as Co } from "./hooks/user/useCurrentUser.js";
50
+ import { useOrders as So } from "./hooks/user/useOrders.js";
51
+ import { useBuyerAttributes as Po } from "./hooks/user/useBuyerAttributes.js";
52
+ import { useGenerateUserToken as ho } from "./hooks/user/useGenerateUserToken.js";
53
+ import { useProductListActions as Io } from "./hooks/product/useProductListActions.js";
54
+ import { useProductLists as wo } from "./hooks/product/useProductLists.js";
55
+ import { useProductList as ko } from "./hooks/product/useProductList.js";
56
+ import { useProduct as Eo } from "./hooks/product/useProduct.js";
57
+ import { useProducts as bo } from "./hooks/product/useProducts.js";
58
+ import { useProductVariants as Lo } from "./hooks/product/useProductVariants.js";
59
+ import { useProductMedia as No } from "./hooks/product/useProductMedia.js";
60
+ import { useProductSearch as Go } from "./hooks/product/useProductSearch.js";
61
+ import { useRecommendedProducts as Oo } from "./hooks/product/useRecommendedProducts.js";
62
+ import { usePopularProducts as zo } from "./hooks/product/usePopularProducts.js";
63
+ import { useCuratedProducts as Wo } from "./hooks/product/useCuratedProducts.js";
64
+ import { useAsyncStorage as Qo } from "./hooks/storage/useAsyncStorage.js";
65
+ import { useSecureStorage as qo } from "./hooks/storage/useSecureStorage.js";
66
+ import { useImageUpload as Ko } from "./hooks/storage/useImageUpload.js";
67
+ import { useShopNavigation as Zo } from "./hooks/navigation/useShopNavigation.js";
68
+ import { useCloseMini as rt } from "./hooks/navigation/useCloseMini.js";
69
+ import { useDeeplink as ot } from "./hooks/navigation/useDeeplink.js";
70
+ import { useNavigateWithTransition as at } from "./hooks/navigation/useNavigateWithTransition.js";
71
+ import { useShop as pt } from "./hooks/shop/useShop.js";
72
+ import { useShopCartActions as lt } from "./hooks/shop/useShopCartActions.js";
73
+ import { useRecommendedShops as nt } from "./hooks/shop/useRecommendedShops.js";
74
+ import { useCreateImageContent as ft } from "./hooks/content/useCreateImageContent.js";
75
+ import { useErrorToast as ct } from "./hooks/util/useErrorToast.js";
76
+ import { useErrorScreen as Ct } from "./hooks/util/useErrorScreen.js";
77
+ import { useShare as St } from "./hooks/util/useShare.js";
78
+ import { useImagePicker as Pt } from "./hooks/util/useImagePicker.js";
79
+ import { MiniEntityNotFoundError as ht, MiniError as Tt, MiniNetworkError as It, formatError as vt } from "./utils/errors.js";
80
+ import { extractBrandTheme as Rt, formatReviewCount as kt, getFeaturedImages as Bt, normalizeRating as Et } from "./utils/merchant-card.js";
81
+ import { parseUrl as bt } from "./utils/parseUrl.js";
82
+ import { fileToDataUri as Lt } from "./utils/imageToDataUri.js";
83
+ import { UserState as Nt, UserTokenGenerateUserErrorCode as yt } from "./shop-minis-platform/src/types/user.js";
84
+ import { ContentCreateUserErrorCode as Ht } from "./shop-minis-platform/src/types/content.js";
85
+ import { Consent as Vt, ConsentStatus as zt } from "./shop-minis-platform/src/types/permissions.js";
84
86
  export {
85
- J as Accordion,
86
- K as AccordionContent,
87
- X as AccordionItem,
88
- Z as AccordionTrigger,
89
- rr as Alert,
90
- er as AlertDescription,
91
- ar as AlertDialog,
92
- pr as AlertDialogAction,
93
- _ as AlertDialogAtom,
94
- ir as AlertDialogCancel,
95
- lr as AlertDialogContent,
96
- mr as AlertDialogDescription,
97
- sr as AlertDialogFooter,
98
- nr as AlertDialogHeader,
99
- fr as AlertDialogOverlay,
100
- xr as AlertDialogPortal,
101
- ur as AlertDialogTitle,
102
- cr as AlertDialogTrigger,
103
- or as AlertTitle,
104
- gr as Avatar,
105
- Sr as AvatarFallback,
106
- Cr as AvatarImage,
107
- Ar as Badge,
108
- k as Button,
109
- Tr as Card,
110
- Ir as CardAction,
111
- vr as CardContent,
112
- wr as CardDescription,
113
- Rr as CardFooter,
114
- br as CardHeader,
115
- Er as CardTitle,
116
- kr as Carousel,
117
- Br as CarouselContent,
118
- Lr as CarouselItem,
119
- Mr as CarouselNext,
120
- Nr as CarouselPrevious,
121
- Ur as Checkbox,
122
- bt as Consent,
123
- Et as ConsentStatus,
124
- wt as ContentCreateUserErrorCode,
87
+ tr as Accordion,
88
+ ar as AccordionContent,
89
+ ir as AccordionItem,
90
+ pr as AccordionTrigger,
91
+ lr as Alert,
92
+ sr as AlertDescription,
93
+ fr as AlertDialog,
94
+ xr as AlertDialogAction,
95
+ X as AlertDialogAtom,
96
+ cr as AlertDialogCancel,
97
+ dr as AlertDialogContent,
98
+ Cr as AlertDialogDescription,
99
+ gr as AlertDialogFooter,
100
+ Sr as AlertDialogHeader,
101
+ Dr as AlertDialogOverlay,
102
+ Pr as AlertDialogPortal,
103
+ Ar as AlertDialogTitle,
104
+ hr as AlertDialogTrigger,
105
+ nr as AlertTitle,
106
+ Ir as Avatar,
107
+ vr as AvatarFallback,
108
+ wr as AvatarImage,
109
+ kr as Badge,
110
+ H as Button,
111
+ Fr as Card,
112
+ br as CardAction,
113
+ Ur as CardContent,
114
+ Lr as CardDescription,
115
+ Mr as CardFooter,
116
+ Nr as CardHeader,
117
+ yr as CardTitle,
118
+ Hr as Carousel,
119
+ Or as CarouselContent,
120
+ Vr as CarouselItem,
121
+ zr as CarouselNext,
122
+ _r as CarouselPrevious,
123
+ Yr as Checkbox,
124
+ Vt as Consent,
125
+ zt as ConsentStatus,
126
+ Ht as ContentCreateUserErrorCode,
125
127
  o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
126
- Hr as Dialog,
127
- Or as DialogClose,
128
- Vr as DialogContent,
129
- zr as DialogDescription,
130
- _r as DialogFooter,
131
- Wr as DialogHeader,
132
- Yr as DialogOverlay,
133
- Qr as DialogPortal,
134
- jr as DialogTitle,
135
- qr as DialogTrigger,
136
- Kr as Drawer,
137
- Xr as DrawerClose,
138
- Zr as DrawerContent,
139
- $r as DrawerDescription,
140
- re as DrawerFooter,
141
- ee as DrawerHeader,
142
- oe as DrawerOverlay,
143
- te as DrawerPortal,
144
- ae as DrawerTitle,
145
- pe as DrawerTrigger,
146
- L as FavoriteButton,
147
- N as IconButton,
148
- v as ImageContentWrapper,
149
- le as Input,
150
- se as Label,
151
- Y as List,
152
- V as LongPressDetector,
153
- f as MerchantCard,
154
- x as MerchantCardPrimitive,
155
- g as MerchantCardSkeleton,
156
- xt as MiniEntityNotFoundError,
157
- ut as MiniError,
158
- ct as MiniNetworkError,
159
- p as MinisContainer,
160
- R as MinisRouter,
128
+ jr as Dialog,
129
+ qr as DialogClose,
130
+ Jr as DialogContent,
131
+ Kr as DialogDescription,
132
+ Xr as DialogFooter,
133
+ Zr as DialogHeader,
134
+ $r as DialogOverlay,
135
+ re as DialogPortal,
136
+ ee as DialogTitle,
137
+ oe as DialogTrigger,
138
+ ae as Drawer,
139
+ ie as DrawerClose,
140
+ pe as DrawerContent,
141
+ me as DrawerDescription,
142
+ le as DrawerFooter,
143
+ se as DrawerHeader,
144
+ ne as DrawerOverlay,
145
+ ue as DrawerPortal,
146
+ fe as DrawerTitle,
147
+ xe as DrawerTrigger,
148
+ V as FavoriteButton,
149
+ _ as IconButton,
150
+ U as ImageContentWrapper,
151
+ de as Input,
152
+ ge as Label,
153
+ $ as List,
154
+ J as LongPressDetector,
155
+ D as MerchantCard,
156
+ P as MerchantCardPrimitive,
157
+ I as MerchantCardSkeleton,
158
+ ht as MiniEntityNotFoundError,
159
+ Tt as MiniError,
160
+ It as MiniNetworkError,
161
+ i as MinisContainer,
162
+ M as MinisRouter,
161
163
  t as NAVIGATION_TYPES,
162
- l as ProductCard,
163
- c as ProductCardSkeleton,
164
- s as ProductLink,
165
- fe as Progress,
166
- C as QuantitySelector,
167
- ue as RadioGroup,
168
- ce as RadioGroupItem,
169
- ge as ResizableHandle,
170
- Se as ResizablePanel,
171
- Ce as ResizablePanelGroup,
172
- Ae as ScrollArea,
173
- Pe as ScrollBar,
174
- A as Search,
175
- P as SearchInput,
176
- h as SearchProvider,
177
- T as SearchResultsList,
178
- Te as Select,
179
- Ie as SelectContent,
180
- ve as SelectGroup,
181
- we as SelectItem,
182
- Re as SelectLabel,
183
- be as SelectScrollDownButton,
184
- Ee as SelectScrollUpButton,
185
- Fe as SelectSeparator,
186
- ke as SelectTrigger,
187
- Be as SelectValue,
188
- Me as Separator,
189
- ye as Sheet,
190
- Ue as SheetClose,
191
- Ge as SheetContent,
192
- He as SheetDescription,
193
- Oe as SheetFooter,
194
- Ve as SheetHeader,
195
- ze as SheetTitle,
196
- _e as SheetTrigger,
197
- je as Skeleton,
198
- U as ThumbhashImage,
199
- Ye as Toaster,
200
- H as Touchable,
201
- E as TransitionLink,
202
- j as VideoPlayer,
203
- Pr as badgeVariants,
204
- St as extractBrandTheme,
205
- It as fileToDataUri,
206
- dt as formatError,
207
- Ct as formatReviewCount,
208
- Dt as getFeaturedImages,
209
- At as normalizeRating,
210
- ht as parseUrl,
211
- yo as useAsyncStorage,
212
- fo as useBuyerAttributes,
213
- Wo as useCloseMini,
214
- ot as useCreateImageContent,
215
- Mo as useCuratedProducts,
216
- lo as useCurrentUser,
217
- Qo as useDeeplink,
218
- it as useErrorScreen,
219
- at as useErrorToast,
220
- to as useFollowedShops,
221
- po as useFollowedShopsActions,
222
- nt as useImagePicker,
223
- Oo as useImageUpload,
224
- qo as useNavigateWithTransition,
225
- so as useOrders,
226
- Bo as usePopularProducts,
227
- Ao as useProduct,
228
- Co as useProductList,
229
- uo as useProductListActions,
230
- go as useProductLists,
231
- wo as useProductMedia,
232
- bo as useProductSearch,
233
- Io as useProductVariants,
234
- ho as useProducts,
235
- Je as useRecentProducts,
236
- Xe as useRecentShops,
237
- Fo as useRecommendedProducts,
238
- rt as useRecommendedShops,
239
- $e as useSavedProducts,
240
- eo as useSavedProductsActions,
241
- Go as useSecureStorage,
242
- mt as useShare,
243
- Ko as useShop,
244
- Zo as useShopCartActions,
245
- zo as useShopNavigation
164
+ m as ProductCard,
165
+ l as ProductCardBadge,
166
+ s as ProductCardContainer,
167
+ n as ProductCardFavoriteButton,
168
+ u as ProductCardImage,
169
+ f as ProductCardImageContainer,
170
+ x as ProductCardInfo,
171
+ c as ProductCardPrice,
172
+ h as ProductCardSkeleton,
173
+ d as ProductCardTitle,
174
+ g as ProductLink,
175
+ De as Progress,
176
+ w as QuantitySelector,
177
+ Ae as RadioGroup,
178
+ he as RadioGroupItem,
179
+ Ie as ResizableHandle,
180
+ ve as ResizablePanel,
181
+ we as ResizablePanelGroup,
182
+ ke as ScrollArea,
183
+ Be as ScrollBar,
184
+ k as Search,
185
+ B as SearchInput,
186
+ E as SearchProvider,
187
+ F as SearchResultsList,
188
+ Fe as Select,
189
+ be as SelectContent,
190
+ Ue as SelectGroup,
191
+ Le as SelectItem,
192
+ Me as SelectLabel,
193
+ Ne as SelectScrollDownButton,
194
+ ye as SelectScrollUpButton,
195
+ Ge as SelectSeparator,
196
+ He as SelectTrigger,
197
+ Oe as SelectValue,
198
+ ze as Separator,
199
+ We as Sheet,
200
+ Ye as SheetClose,
201
+ Qe as SheetContent,
202
+ je as SheetDescription,
203
+ qe as SheetFooter,
204
+ Je as SheetHeader,
205
+ Ke as SheetTitle,
206
+ Xe as SheetTrigger,
207
+ eo as Skeleton,
208
+ Y as ThumbhashImage,
209
+ $e as Toaster,
210
+ j as Touchable,
211
+ y as TransitionLink,
212
+ Nt as UserState,
213
+ yt as UserTokenGenerateUserErrorCode,
214
+ er as VideoPlayer,
215
+ Br as badgeVariants,
216
+ Rt as extractBrandTheme,
217
+ Lt as fileToDataUri,
218
+ vt as formatError,
219
+ kt as formatReviewCount,
220
+ Bt as getFeaturedImages,
221
+ Et as normalizeRating,
222
+ bt as parseUrl,
223
+ Qo as useAsyncStorage,
224
+ Po as useBuyerAttributes,
225
+ rt as useCloseMini,
226
+ ft as useCreateImageContent,
227
+ Wo as useCuratedProducts,
228
+ Co as useCurrentUser,
229
+ ot as useDeeplink,
230
+ Ct as useErrorScreen,
231
+ ct as useErrorToast,
232
+ uo as useFollowedShops,
233
+ xo as useFollowedShopsActions,
234
+ ho as useGenerateUserToken,
235
+ Pt as useImagePicker,
236
+ Ko as useImageUpload,
237
+ at as useNavigateWithTransition,
238
+ So as useOrders,
239
+ zo as usePopularProducts,
240
+ Eo as useProduct,
241
+ ko as useProductList,
242
+ Io as useProductListActions,
243
+ wo as useProductLists,
244
+ No as useProductMedia,
245
+ Go as useProductSearch,
246
+ Lo as useProductVariants,
247
+ bo as useProducts,
248
+ to as useRecentProducts,
249
+ io as useRecentShops,
250
+ Oo as useRecommendedProducts,
251
+ nt as useRecommendedShops,
252
+ mo as useSavedProducts,
253
+ so as useSavedProductsActions,
254
+ qo as useSecureStorage,
255
+ St as useShare,
256
+ pt as useShop,
257
+ lt as useShopCartActions,
258
+ Zo as useShopNavigation
246
259
  };
247
260
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/mocks.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { UserState as p } from "./shop-minis-platform/src/types/user.js";
1
2
  const e = (t, o, r = "99.99", s) => ({
2
3
  id: t,
3
4
  title: o,
@@ -14,7 +15,7 @@ const e = (t, o, r = "99.99", s) => ({
14
15
  altText: o
15
16
  }
16
17
  }), i = (t, o, r) => {
17
- const c = Array.from({ length: 3 }, (m, n) => ({
18
+ const c = Array.from({ length: 3 }, (g, n) => ({
18
19
  url: `https://picsum.photos/400/400?random=${t}-${n}`,
19
20
  sensitive: !1,
20
21
  altText: `${o} featured image ${n + 1}`
@@ -45,10 +46,10 @@ const e = (t, o, r = "99.99", s) => ({
45
46
  name: o,
46
47
  products: r
47
48
  });
48
- function p(t, o) {
49
+ function l(t, o) {
49
50
  return (r) => (console.log(`[Mock Action] ${String(t)}`, r), Promise.resolve({ ok: !0, data: o }));
50
51
  }
51
- function l() {
52
+ function u() {
52
53
  const t = {
53
54
  followShop: !0,
54
55
  unfollowShop: !1,
@@ -299,20 +300,27 @@ function l() {
299
300
  visibility: ["DISCOVERABLE"]
300
301
  }
301
302
  ]
303
+ },
304
+ generateUserToken: {
305
+ data: {
306
+ token: "user-token-123",
307
+ expiresAt: "2025-01-01",
308
+ userState: p.VERIFIED
309
+ }
302
310
  }
303
311
  }, o = {};
304
312
  for (const r in t)
305
- Object.prototype.hasOwnProperty.call(t, r) && (o[r] = p(
313
+ Object.prototype.hasOwnProperty.call(t, r) && (o[r] = l(
306
314
  r,
307
315
  t[r]
308
316
  ));
309
317
  return o;
310
318
  }
311
- const u = () => {
319
+ const m = () => {
312
320
  const t = navigator.userAgent.toLowerCase(), o = /iphone|ipad|ipod/.test(t), r = /android/.test(t);
313
321
  return o || r;
314
- }, g = () => {
315
- u() || window.minisSDK || (window.minisSDK = l(), window.minisParams = {
322
+ }, h = ({ force: t } = {}) => {
323
+ m() && !t || window.minisSDK || (window.minisSDK = u(), window.minisParams = {
316
324
  handle: "mock-handle",
317
325
  initialUrl: "/mock-initial-url",
318
326
  platform: "web"
@@ -321,6 +329,6 @@ const u = () => {
321
329
  export {
322
330
  e as createProduct,
323
331
  i as createShop,
324
- g as injectMocks
332
+ h as injectMocks
325
333
  };
326
334
  //# sourceMappingURL=mocks.js.map