@shopify/shop-minis-react 0.1.1 → 0.1.3
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/dist/components/atoms/image.js +44 -32
- package/dist/components/atoms/image.js.map +1 -1
- package/dist/hooks/util/useRequestPermissions.js +12 -0
- package/dist/hooks/util/useRequestPermissions.js.map +1 -0
- package/dist/index.js +222 -220
- package/dist/index.js.map +1 -1
- package/dist/mocks.js +25 -20
- package/dist/mocks.js.map +1 -1
- package/dist/providers/ImagePickerProvider.js +59 -49
- package/dist/providers/ImagePickerProvider.js.map +1 -1
- package/dist/shop-minis-platform/src/types/content.js +3 -2
- package/dist/shop-minis-platform/src/types/content.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/image.tsx +33 -3
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/util/useRequestPermissions.ts +24 -0
- package/src/mocks.ts +10 -1
- package/src/providers/ImagePickerProvider.test.tsx +329 -4
- package/src/providers/ImagePickerProvider.tsx +42 -4
- package/dist/shop-minis-platform/src/types/permissions.js +0 -15
- package/dist/shop-minis-platform/src/types/permissions.js.map +0 -1
|
@@ -1,52 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { getThumbhashDataURL as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as v, useState as i, useEffect as k, useMemo as u, useCallback as I } from "react";
|
|
3
|
+
import { cn as m } from "../../lib/utils.js";
|
|
4
|
+
import { getThumbhashDataURL as j, getResizedImageUrl as y } from "../../utils/image.js";
|
|
5
|
+
const O = v(function(d) {
|
|
6
6
|
const {
|
|
7
|
-
src:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
7
|
+
src: r,
|
|
8
|
+
file: t,
|
|
9
|
+
thumbhash: a,
|
|
10
|
+
onLoad: s,
|
|
11
|
+
className: b,
|
|
12
|
+
style: f,
|
|
13
|
+
aspectRatio: g = "auto",
|
|
14
|
+
...h
|
|
15
|
+
} = d, [L, p] = i(!1), [o, c] = i(null);
|
|
16
|
+
k(() => {
|
|
17
|
+
if (!t) {
|
|
18
|
+
c(null);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const e = URL.createObjectURL(t);
|
|
22
|
+
return c(e), () => {
|
|
23
|
+
URL.revokeObjectURL(e);
|
|
24
|
+
};
|
|
25
|
+
}, [t]);
|
|
26
|
+
const l = u(
|
|
27
|
+
() => j(a ?? void 0),
|
|
21
28
|
[a]
|
|
22
|
-
),
|
|
23
|
-
|
|
29
|
+
), U = I(
|
|
30
|
+
(e) => {
|
|
31
|
+
p(!0), s?.(e);
|
|
32
|
+
},
|
|
33
|
+
[s]
|
|
34
|
+
), R = u(() => o || y(r), [o, r]);
|
|
35
|
+
return /* @__PURE__ */ n(
|
|
24
36
|
"div",
|
|
25
37
|
{
|
|
26
|
-
className:
|
|
38
|
+
className: m("relative w-full ", b),
|
|
27
39
|
style: {
|
|
28
|
-
...
|
|
29
|
-
aspectRatio:
|
|
30
|
-
backgroundImage:
|
|
40
|
+
...f,
|
|
41
|
+
aspectRatio: g,
|
|
42
|
+
backgroundImage: l ? `url(${l})` : void 0,
|
|
31
43
|
backgroundSize: "cover",
|
|
32
44
|
backgroundPosition: "center"
|
|
33
45
|
},
|
|
34
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ n(
|
|
35
47
|
"img",
|
|
36
48
|
{
|
|
37
|
-
className:
|
|
49
|
+
className: m(
|
|
38
50
|
"absolute inset-0 opacity-0 size-full object-cover",
|
|
39
|
-
|
|
51
|
+
L && "opacity-100"
|
|
40
52
|
),
|
|
41
|
-
src:
|
|
42
|
-
onLoad:
|
|
43
|
-
...
|
|
53
|
+
src: R,
|
|
54
|
+
onLoad: U,
|
|
55
|
+
...h
|
|
44
56
|
}
|
|
45
57
|
)
|
|
46
58
|
}
|
|
47
59
|
);
|
|
48
60
|
});
|
|
49
61
|
export {
|
|
50
|
-
|
|
62
|
+
O as Image
|
|
51
63
|
};
|
|
52
64
|
//# sourceMappingURL=image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../src/components/atoms/image.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/alt-text */\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport {ImgHTMLAttributes
|
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../src/components/atoms/image.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/alt-text */\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport {\n ImgHTMLAttributes,\n useCallback,\n useMemo,\n memo,\n useState,\n useEffect,\n} from 'react'\n\nimport {cn} from '../../lib/utils'\nimport {getThumbhashDataURL, getResizedImageUrl} from '../../utils'\n\ntype ImageProps = ImgHTMLAttributes<HTMLImageElement> & {\n src?: string\n file?: File\n thumbhash?: string | null\n aspectRatio?: number | string\n}\n\nexport const Image = memo(function Image(props: ImageProps) {\n const {\n src,\n file,\n thumbhash,\n onLoad,\n className,\n style,\n aspectRatio = 'auto',\n ...restProps\n } = props\n\n const [isLoaded, setIsLoaded] = useState(false)\n const [blobUrl, setBlobUrl] = useState<string | null>(null)\n\n // Create and manage blob URL for File objects\n useEffect(() => {\n if (!file) {\n setBlobUrl(null)\n return\n }\n\n const url = URL.createObjectURL(file)\n setBlobUrl(url)\n\n // Cleanup on unmount or when file changes\n return () => {\n URL.revokeObjectURL(url)\n }\n }, [file])\n\n const thumbhashDataURL = useMemo(\n () => getThumbhashDataURL(thumbhash ?? undefined),\n [thumbhash]\n )\n\n const handleLoad = useCallback(\n (event: React.SyntheticEvent<HTMLImageElement, Event>) => {\n setIsLoaded(true)\n onLoad?.(event)\n },\n [onLoad]\n )\n\n // Use blob URL if file is provided, otherwise use src\n const imageSrc = useMemo(() => {\n if (blobUrl) return blobUrl\n return getResizedImageUrl(src)\n }, [blobUrl, src])\n\n return (\n <div\n className={cn('relative w-full ', className)}\n style={{\n ...style,\n aspectRatio,\n backgroundImage: thumbhashDataURL\n ? `url(${thumbhashDataURL})`\n : undefined,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n }}\n >\n <img\n className={cn(\n 'absolute inset-0 opacity-0 size-full object-cover',\n isLoaded && 'opacity-100'\n )}\n src={imageSrc}\n onLoad={handleLoad}\n {...restProps}\n />\n </div>\n )\n})\n"],"names":["Image","memo","props","src","file","thumbhash","onLoad","className","style","aspectRatio","restProps","isLoaded","setIsLoaded","useState","blobUrl","setBlobUrl","useEffect","url","thumbhashDataURL","useMemo","getThumbhashDataURL","handleLoad","useCallback","event","imageSrc","getResizedImageUrl","jsx","cn"],"mappings":";;;;AAqBO,MAAMA,IAAQC,EAAK,SAAeC,GAAmB;AACpD,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,GAAGC;AAAA,EAAA,IACDR,GAEE,CAACS,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAASC,CAAU,IAAIF,EAAwB,IAAI;AAG1D,EAAAG,EAAU,MAAM;AACd,QAAI,CAACZ,GAAM;AACT,MAAAW,EAAW,IAAI;AACf;AAAA,IAAA;AAGI,UAAAE,IAAM,IAAI,gBAAgBb,CAAI;AACpC,WAAAW,EAAWE,CAAG,GAGP,MAAM;AACX,UAAI,gBAAgBA,CAAG;AAAA,IACzB;AAAA,EAAA,GACC,CAACb,CAAI,CAAC;AAET,QAAMc,IAAmBC;AAAA,IACvB,MAAMC,EAAoBf,KAAa,MAAS;AAAA,IAChD,CAACA,CAAS;AAAA,EACZ,GAEMgB,IAAaC;AAAA,IACjB,CAACC,MAAyD;AACxD,MAAAX,EAAY,EAAI,GAChBN,IAASiB,CAAK;AAAA,IAChB;AAAA,IACA,CAACjB,CAAM;AAAA,EACT,GAGMkB,IAAWL,EAAQ,MACnBL,KACGW,EAAmBtB,CAAG,GAC5B,CAACW,GAASX,CAAG,CAAC;AAGf,SAAA,gBAAAuB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAG,oBAAoBpB,CAAS;AAAA,MAC3C,OAAO;AAAA,QACL,GAAGC;AAAA,QACH,aAAAC;AAAA,QACA,iBAAiBS,IACb,OAAOA,CAAgB,MACvB;AAAA,QACJ,gBAAgB;AAAA,QAChB,oBAAoB;AAAA,MACtB;AAAA,MAEA,UAAA,gBAAAQ;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWC;AAAA,YACT;AAAA,YACAhB,KAAY;AAAA,UACd;AAAA,UACA,KAAKa;AAAA,UACL,QAAQH;AAAA,UACP,GAAGX;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAEJ,CAAC;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useHandleAction as e } from "../../internal/useHandleAction.js";
|
|
2
|
+
import { useShopActions as o } from "../../internal/useShopActions.js";
|
|
3
|
+
const i = () => {
|
|
4
|
+
const { requestPermission: s } = o();
|
|
5
|
+
return {
|
|
6
|
+
requestPermission: e(s)
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
i as useRequestPermissions
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useRequestPermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRequestPermissions.js","sources":["../../../src/hooks/util/useRequestPermissions.ts"],"sourcesContent":["import {\n RequestPermissionParams,\n RequestPermissionResponse,\n} from '@shopify/shop-minis-platform/actions'\n\nimport {useHandleAction} from '../../internal/useHandleAction'\nimport {useShopActions} from '../../internal/useShopActions'\n\ninterface UseRequestPermissionsReturns {\n /**\n * Request native permissions from the user\n */\n requestPermission: (\n params: RequestPermissionParams\n ) => Promise<RequestPermissionResponse>\n}\n\nexport const useRequestPermissions = (): UseRequestPermissionsReturns => {\n const {requestPermission} = useShopActions()\n\n return {\n requestPermission: useHandleAction(requestPermission),\n }\n}\n"],"names":["useRequestPermissions","requestPermission","useShopActions","useHandleAction"],"mappings":";;AAiBO,MAAMA,IAAwB,MAAoC;AACjE,QAAA,EAAC,mBAAAC,EAAiB,IAAIC,EAAe;AAEpC,SAAA;AAAA,IACL,mBAAmBC,EAAgBF,CAAiB;AAAA,EACtD;AACF;"}
|
package/dist/index.js
CHANGED
|
@@ -12,152 +12,152 @@ import { MinisRouter as G } from "./components/navigation/minis-router.js";
|
|
|
12
12
|
import { TransitionLink as V } from "./components/navigation/transition-link.js";
|
|
13
13
|
import { Button as _ } from "./components/atoms/button.js";
|
|
14
14
|
import { FavoriteButton as Y } from "./components/atoms/favorite-button.js";
|
|
15
|
-
import { IconButton as
|
|
16
|
-
import { Image as
|
|
15
|
+
import { IconButton as K } from "./components/atoms/icon-button.js";
|
|
16
|
+
import { Image as j } from "./components/atoms/image.js";
|
|
17
17
|
import { Touchable as X } from "./components/atoms/touchable.js";
|
|
18
18
|
import { LongPressDetector as $ } from "./components/atoms/long-press-detector.js";
|
|
19
19
|
import { AlertDialogAtom as er } from "./components/atoms/alert-dialog.js";
|
|
20
20
|
import { List as tr } from "./components/atoms/list.js";
|
|
21
21
|
import { VideoPlayer as ir } from "./components/atoms/video-player.js";
|
|
22
22
|
import { TextInput as nr } from "./components/atoms/text-input.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
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";
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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,
|
|
102
103
|
er as AlertDialogAtom,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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,
|
|
117
118
|
_ as Button,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
ta as ContentCreateUserErrorCode,
|
|
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,
|
|
134
134
|
o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
155
|
Y as FavoriteButton,
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
K as IconButton,
|
|
157
|
+
j as Image,
|
|
158
158
|
O as ImageContentWrapper,
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Te as Input,
|
|
160
|
+
Me as Label,
|
|
161
161
|
tr as List,
|
|
162
162
|
$ as LongPressDetector,
|
|
163
163
|
D as MerchantCard,
|
|
@@ -167,10 +167,11 @@ export {
|
|
|
167
167
|
T as MerchantCardName,
|
|
168
168
|
I as MerchantCardRating,
|
|
169
169
|
w as MerchantCardSkeleton,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
zt as MiniEntityNotFoundError,
|
|
171
|
+
_t as MiniError,
|
|
172
|
+
Wt as MiniNetworkError,
|
|
173
173
|
i as MinisContainer,
|
|
174
|
+
ma as MinisContentStatus,
|
|
174
175
|
G as MinisRouter,
|
|
175
176
|
t as NAVIGATION_TYPES,
|
|
176
177
|
n as ProductCard,
|
|
@@ -184,97 +185,98 @@ export {
|
|
|
184
185
|
R as ProductCardSkeleton,
|
|
185
186
|
d as ProductCardTitle,
|
|
186
187
|
g as ProductLink,
|
|
187
|
-
|
|
188
|
+
ve as Progress,
|
|
188
189
|
F as QuantitySelector,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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,
|
|
196
197
|
b as Search,
|
|
197
198
|
k as SearchInput,
|
|
198
199
|
E as SearchProvider,
|
|
199
200
|
L as SearchResultsList,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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,
|
|
221
222
|
nr as TextInput,
|
|
222
|
-
|
|
223
|
+
no as Toaster,
|
|
223
224
|
X as Touchable,
|
|
224
225
|
V as TransitionLink,
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
aa as UserState,
|
|
227
|
+
ia as UserTokenGenerateUserErrorCode,
|
|
227
228
|
ir as VideoPlayer,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
Co as
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
ct as
|
|
278
|
-
|
|
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
|
|
279
281
|
};
|
|
280
282
|
//# sourceMappingURL=index.js.map
|