@shopify/shop-minis-react 0.0.26 → 0.0.27

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.
@@ -1,41 +1,42 @@
1
- import { useState as S, useCallback as h, useEffect as y, useMemo as b } from "react";
2
- import P from "../../_virtual/debounce.js";
3
- import { useShopActions as g } from "../../internal/useShopActions.js";
1
+ import { useState as h, useCallback as S, useEffect as y, useMemo as b } from "react";
2
+ import g from "../../_virtual/debounce.js";
3
+ import { useShopActions as P } from "../../internal/useShopActions.js";
4
4
  import { useShopActionsPaginatedDataFetching as k } from "../../internal/useShopActionsPaginatedDataFetching.js";
5
- const v = (r) => {
6
- const { getProductSearch: s } = g(), {
5
+ const v = (s) => {
6
+ const { getProductSearch: u } = P(), {
7
7
  query: e,
8
8
  filters: c,
9
- sortBy: u,
10
- includeSensitive: n = !1,
11
- skip: a = !1,
9
+ sortBy: n,
10
+ includeSensitive: a = !1,
11
+ skip: i = !1,
12
12
  ...d
13
- } = r ?? {}, [i, m] = S(e), t = h(
14
- P((p) => {
15
- m(p);
13
+ } = s ?? {}, [t, l] = h(e), r = S(
14
+ g((p) => {
15
+ l(p);
16
16
  }, 300),
17
17
  []
18
18
  );
19
- y(() => (t(e), () => {
20
- t.cancel();
21
- }), [e, t]);
22
- const { data: o, ...f } = k(
23
- s,
19
+ y(() => (r(e), () => {
20
+ r.cancel();
21
+ }), [e, r]);
22
+ const { data: o, ...m } = k(
23
+ u,
24
24
  {
25
- query: i,
25
+ query: t,
26
26
  filters: c,
27
- sortBy: u,
28
- includeSensitive: n,
27
+ sortBy: n,
28
+ includeSensitive: a,
29
29
  ...d
30
30
  },
31
31
  {
32
- skip: a,
32
+ skip: i,
33
33
  hook: "useProductSearch"
34
34
  }
35
- ), l = b(() => o ?? null, [o]);
35
+ ), f = b(() => t.trim().length === 0 ? null : o ?? null, [o, t]);
36
36
  return {
37
- ...f,
38
- products: l
37
+ ...m,
38
+ products: f,
39
+ isTyping: t !== e
39
40
  };
40
41
  };
41
42
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"useProductSearch.js","sources":["../../../src/hooks/product/useProductSearch.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport debounce from 'lodash/debounce'\n\nimport {useShopActions} from '../../internal/useShopActions'\nimport {useShopActionsPaginatedDataFetching} from '../../internal/useShopActionsPaginatedDataFetching'\nimport {\n PaginatedDataHookOptionsBase,\n PaginatedDataHookReturnsBase,\n Product,\n ProductFilters,\n ProductSearchSortBy,\n} from '../../types'\n\nexport interface UseProductSearchParams extends PaginatedDataHookOptionsBase {\n /**\n * The search query.\n */\n query: string\n /**\n * The filters to apply to the search.\n */\n filters?: ProductFilters\n /**\n * The sort order of the results.\n */\n sortBy?: ProductSearchSortBy\n /**\n * Whether to include sensitive products.\n */\n includeSensitive?: boolean\n}\n\ninterface UseProductSearchReturns extends PaginatedDataHookReturnsBase {\n /**\n * The products returned from the query.\n */\n products: Product[] | null\n}\n\nexport const useProductSearch = (\n params: UseProductSearchParams\n): UseProductSearchReturns => {\n const {getProductSearch} = useShopActions()\n const {\n query,\n filters,\n sortBy,\n includeSensitive = false,\n skip = false,\n ...restParams\n } = params ?? {}\n\n const [debouncedQuery, setDebouncedQuery] = useState<string>(query)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetQuery = useCallback(\n debounce((newQuery: string) => {\n setDebouncedQuery(newQuery)\n }, 300),\n []\n )\n\n useEffect(() => {\n debouncedSetQuery(query)\n\n return () => {\n debouncedSetQuery.cancel()\n }\n }, [query, debouncedSetQuery])\n\n const {data, ...rest} = useShopActionsPaginatedDataFetching(\n getProductSearch,\n {\n query: debouncedQuery,\n filters,\n sortBy,\n includeSensitive,\n ...restParams,\n },\n {\n skip,\n hook: 'useProductSearch',\n }\n )\n\n const products = useMemo(() => {\n return data ?? null\n }, [data])\n\n return {\n ...rest,\n products,\n }\n}\n"],"names":["useProductSearch","params","getProductSearch","useShopActions","query","filters","sortBy","includeSensitive","skip","restParams","debouncedQuery","setDebouncedQuery","useState","debouncedSetQuery","useCallback","debounce","newQuery","useEffect","data","rest","useShopActionsPaginatedDataFetching","products","useMemo"],"mappings":";;;;AAwCa,MAAAA,IAAmB,CAC9BC,MAC4B;AACtB,QAAA,EAAC,kBAAAC,EAAgB,IAAIC,EAAe,GACpC;AAAA,IACJ,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,MAAAC,IAAO;AAAA,IACP,GAAGC;AAAA,EACL,IAAIR,KAAU,CAAC,GAET,CAACS,GAAgBC,CAAiB,IAAIC,EAAiBR,CAAK,GAG5DS,IAAoBC;AAAA,IACxBC,EAAS,CAACC,MAAqB;AAC7B,MAAAL,EAAkBK,CAAQ;AAAA,OACzB,GAAG;AAAA,IACN,CAAA;AAAA,EACF;AAEA,EAAAC,EAAU,OACRJ,EAAkBT,CAAK,GAEhB,MAAM;AACX,IAAAS,EAAkB,OAAO;AAAA,EAC3B,IACC,CAACT,GAAOS,CAAiB,CAAC;AAE7B,QAAM,EAAC,MAAAK,GAAM,GAAGC,EAAA,IAAQC;AAAA,IACtBlB;AAAA,IACA;AAAA,MACE,OAAOQ;AAAA,MACP,SAAAL;AAAA,MACA,QAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,GAAGE;AAAA,IACL;AAAA,IACA;AAAA,MACE,MAAAD;AAAA,MACA,MAAM;AAAA,IAAA;AAAA,EAEV,GAEMa,IAAWC,EAAQ,MAChBJ,KAAQ,MACd,CAACA,CAAI,CAAC;AAEF,SAAA;AAAA,IACL,GAAGC;AAAA,IACH,UAAAE;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"useProductSearch.js","sources":["../../../src/hooks/product/useProductSearch.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport debounce from 'lodash/debounce'\n\nimport {useShopActions} from '../../internal/useShopActions'\nimport {useShopActionsPaginatedDataFetching} from '../../internal/useShopActionsPaginatedDataFetching'\nimport {\n PaginatedDataHookOptionsBase,\n PaginatedDataHookReturnsBase,\n Product,\n ProductFilters,\n ProductSearchSortBy,\n} from '../../types'\n\nexport interface UseProductSearchParams extends PaginatedDataHookOptionsBase {\n /**\n * The search query.\n */\n query: string\n /**\n * The filters to apply to the search.\n */\n filters?: ProductFilters\n /**\n * The sort order of the results.\n */\n sortBy?: ProductSearchSortBy\n /**\n * Whether to include sensitive products.\n */\n includeSensitive?: boolean\n}\n\ninterface UseProductSearchReturns extends PaginatedDataHookReturnsBase {\n /**\n * The products returned from the query.\n */\n products: Product[] | null\n /**\n * Whether the user is typing.\n */\n isTyping: boolean\n}\n\nexport const useProductSearch = (\n params: UseProductSearchParams\n): UseProductSearchReturns => {\n const {getProductSearch} = useShopActions()\n const {\n query,\n filters,\n sortBy,\n includeSensitive = false,\n skip = false,\n ...restParams\n } = params ?? {}\n\n const [debouncedQuery, setDebouncedQuery] = useState<string>(query)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedSetQuery = useCallback(\n debounce((newQuery: string) => {\n setDebouncedQuery(newQuery)\n }, 300),\n []\n )\n\n useEffect(() => {\n debouncedSetQuery(query)\n\n return () => {\n debouncedSetQuery.cancel()\n }\n }, [query, debouncedSetQuery])\n\n const {data, ...rest} = useShopActionsPaginatedDataFetching(\n getProductSearch,\n {\n query: debouncedQuery,\n filters,\n sortBy,\n includeSensitive,\n ...restParams,\n },\n {\n skip,\n hook: 'useProductSearch',\n }\n )\n\n const products = useMemo(() => {\n if (debouncedQuery.trim().length === 0) {\n return null\n }\n\n return data ?? null\n }, [data, debouncedQuery])\n\n return {\n ...rest,\n products,\n isTyping: debouncedQuery !== query,\n }\n}\n"],"names":["useProductSearch","params","getProductSearch","useShopActions","query","filters","sortBy","includeSensitive","skip","restParams","debouncedQuery","setDebouncedQuery","useState","debouncedSetQuery","useCallback","debounce","newQuery","useEffect","data","rest","useShopActionsPaginatedDataFetching","products","useMemo"],"mappings":";;;;AA4Ca,MAAAA,IAAmB,CAC9BC,MAC4B;AACtB,QAAA,EAAC,kBAAAC,EAAgB,IAAIC,EAAe,GACpC;AAAA,IACJ,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,MAAAC,IAAO;AAAA,IACP,GAAGC;AAAA,EACL,IAAIR,KAAU,CAAC,GAET,CAACS,GAAgBC,CAAiB,IAAIC,EAAiBR,CAAK,GAG5DS,IAAoBC;AAAA,IACxBC,EAAS,CAACC,MAAqB;AAC7B,MAAAL,EAAkBK,CAAQ;AAAA,OACzB,GAAG;AAAA,IACN,CAAA;AAAA,EACF;AAEA,EAAAC,EAAU,OACRJ,EAAkBT,CAAK,GAEhB,MAAM;AACX,IAAAS,EAAkB,OAAO;AAAA,EAC3B,IACC,CAACT,GAAOS,CAAiB,CAAC;AAE7B,QAAM,EAAC,MAAAK,GAAM,GAAGC,EAAA,IAAQC;AAAA,IACtBlB;AAAA,IACA;AAAA,MACE,OAAOQ;AAAA,MACP,SAAAL;AAAA,MACA,QAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,GAAGE;AAAA,IACL;AAAA,IACA;AAAA,MACE,MAAAD;AAAA,MACA,MAAM;AAAA,IAAA;AAAA,EAEV,GAEMa,IAAWC,EAAQ,MACnBZ,EAAe,OAAO,WAAW,IAC5B,OAGFQ,KAAQ,MACd,CAACA,GAAMR,CAAc,CAAC;AAElB,SAAA;AAAA,IACL,GAAGS;AAAA,IACH,UAAAE;AAAA,IACA,UAAUX,MAAmBN;AAAA,EAC/B;AACF;"}
package/dist/index.js CHANGED
@@ -1,240 +1,245 @@
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
3
  import { ProductCard as l } from "./components/commerce/product-card.js";
4
- import { ProductLink as n } from "./components/commerce/product-link.js";
4
+ import { ProductLink as s } from "./components/commerce/product-link.js";
5
5
  import { MerchantCard as f, MerchantCardPrimitive as x } from "./components/commerce/merchant-card.js";
6
6
  import { ProductCardSkeleton as c } from "./components/commerce/product-card-skeleton.js";
7
7
  import { MerchantCardSkeleton as g } from "./components/commerce/merchant-card-skeleton.js";
8
- import { QuantitySelector as S } from "./components/commerce/quantity-selector.js";
9
- import { ContentWrapper as A } from "./components/content/content-wrapper.js";
10
- import { TransitionContainer as T } from "./components/navigation/transition-container.js";
11
- import { TransitionLink as I } from "./components/navigation/transition-link.js";
12
- import { Button as v } from "./components/atoms/button.js";
13
- import { FavoriteButton as b } from "./components/atoms/favorite-button.js";
14
- import { IconButton as F } from "./components/atoms/icon-button.js";
15
- import { ThumbhashImage as B } from "./components/atoms/thumbhash-image.js";
16
- import { Touchable as N } from "./components/atoms/touchable.js";
17
- import { AlertDialogAtom as L } from "./components/atoms/alert-dialog.js";
18
- import { List as G } from "./components/atoms/list.js";
19
- import { VideoPlayer as O } from "./components/atoms/video-player.js";
20
- import { Accordion as z, AccordionContent as _, AccordionItem as W, AccordionTrigger as Y } from "./components/ui/accordion.js";
21
- import { Alert as j, AlertDescription as q, AlertTitle as J } from "./components/ui/alert.js";
22
- import { AlertDialog as X, AlertDialogAction as Z, AlertDialogCancel as $, AlertDialogContent as rr, AlertDialogDescription as er, AlertDialogFooter as or, AlertDialogHeader as tr, AlertDialogOverlay as ar, AlertDialogPortal as ir, AlertDialogTitle as pr, AlertDialogTrigger as lr } from "./components/ui/alert-dialog.js";
23
- import { Avatar as nr, AvatarFallback as sr, AvatarImage as fr } from "./components/ui/avatar.js";
24
- import { Badge as ur, badgeVariants as cr } from "./components/ui/badge.js";
25
- import { Card as gr, CardAction as Cr, CardContent as Sr, CardDescription as Dr, CardFooter as Ar, CardHeader as Pr, CardTitle as Tr } from "./components/ui/card.js";
26
- import { Carousel as Ir, CarouselContent as wr, CarouselItem as vr, CarouselNext as Rr, CarouselPrevious as br } from "./components/ui/carousel.js";
27
- import { Checkbox as Fr } from "./components/ui/checkbox.js";
28
- import { Dialog as Br, DialogClose as Mr, DialogContent as Nr, DialogDescription as yr, DialogFooter as Lr, DialogHeader as Ur, DialogOverlay as Gr, DialogPortal as Hr, DialogTitle as Or, DialogTrigger as Vr } from "./components/ui/dialog.js";
29
- import { Drawer as _r, DrawerClose as Wr, DrawerContent as Yr, DrawerDescription as Qr, DrawerFooter as jr, DrawerHeader as qr, DrawerOverlay as Jr, DrawerPortal as Kr, DrawerTitle as Xr, DrawerTrigger as Zr } from "./components/ui/drawer.js";
30
- import { Input as re } from "./components/ui/input.js";
31
- import { Label as oe } from "./components/ui/label.js";
32
- import { Progress as ae } from "./components/ui/progress.js";
33
- import { RadioGroup as pe, RadioGroupItem as le } from "./components/ui/radio-group.js";
34
- import { ResizableHandle as ne, ResizablePanel as se, ResizablePanelGroup as fe } from "./components/ui/resizable.js";
35
- import { ScrollArea as ue, ScrollBar as ce } from "./components/ui/scroll-area.js";
36
- import { Select as ge, SelectContent as Ce, SelectGroup as Se, SelectItem as De, SelectLabel as Ae, SelectScrollDownButton as Pe, SelectScrollUpButton as Te, SelectSeparator as he, SelectTrigger as Ie, SelectValue as we } from "./components/ui/select.js";
37
- import { Separator as Re } from "./components/ui/separator.js";
38
- import { Sheet as Ee, SheetClose as Fe, SheetContent as ke, SheetDescription as Be, SheetFooter as Me, SheetHeader as Ne, SheetTitle as ye, SheetTrigger as Le } from "./components/ui/sheet.js";
39
- import { Toaster as Ge } from "./components/ui/sonner.js";
40
- import { Skeleton as Oe } from "./components/ui/skeleton.js";
41
- import { useRecentProducts as ze } from "./hooks/user/useRecentProducts.js";
42
- import { useRecentShops as We } from "./hooks/user/useRecentShops.js";
43
- import { useSavedProducts as Qe } from "./hooks/user/useSavedProducts.js";
44
- import { useSavedProductsActions as qe } from "./hooks/user/useSavedProductsActions.js";
45
- import { useFollowedShops as Ke } from "./hooks/user/useFollowedShops.js";
46
- import { useFollowedShopsActions as Ze } from "./hooks/user/useFollowedShopsActions.js";
47
- import { useCurrentUser as ro } from "./hooks/user/useCurrentUser.js";
48
- import { useOrders as oo } from "./hooks/user/useOrders.js";
49
- import { useBuyerAttributes as ao } from "./hooks/user/useBuyerAttributes.js";
50
- import { useProductListActions as po } from "./hooks/product/useProductListActions.js";
51
- import { useProductLists as mo } from "./hooks/product/useProductLists.js";
52
- import { useProductList as so } from "./hooks/product/useProductList.js";
53
- import { useProduct as xo } from "./hooks/product/useProduct.js";
54
- import { useProducts as co } from "./hooks/product/useProducts.js";
55
- import { useProductVariants as Co } from "./hooks/product/useProductVariants.js";
56
- import { useProductMedia as Do } from "./hooks/product/useProductMedia.js";
57
- import { useProductSearch as Po } from "./hooks/product/useProductSearch.js";
58
- import { useRecommendedProducts as ho } from "./hooks/product/useRecommendedProducts.js";
59
- import { usePopularProducts as wo } from "./hooks/product/usePopularProducts.js";
60
- import { useCuratedProducts as Ro } from "./hooks/product/useCuratedProducts.js";
61
- import { useAsyncStorage as Eo } from "./hooks/storage/useAsyncStorage.js";
62
- import { useSecureStorage as ko } from "./hooks/storage/useSecureStorage.js";
63
- import { useImageUpload as Mo } from "./hooks/storage/useImageUpload.js";
64
- import { useShopNavigation as yo } from "./hooks/navigation/useShopNavigation.js";
65
- import { useCloseMini as Uo } from "./hooks/navigation/useCloseMini.js";
66
- import { useDeeplink as Ho } from "./hooks/navigation/useDeeplink.js";
67
- import { useNavigateWithTransition as Vo } from "./hooks/navigation/useNavigateWithTransition.js";
68
- import { useShop as _o } from "./hooks/shop/useShop.js";
69
- import { useShopCartActions as Yo } from "./hooks/shop/useShopCartActions.js";
70
- import { useRecommendedShops as jo } from "./hooks/shop/useRecommendedShops.js";
71
- import { useCreateImageContent as Jo } from "./hooks/content/useCreateImageContent.js";
72
- import { useErrorToast as Xo } from "./hooks/util/useErrorToast.js";
73
- import { useErrorScreen as $o } from "./hooks/util/useErrorScreen.js";
74
- import { useShare as et } from "./hooks/util/useShare.js";
75
- import { useImagePicker as tt } from "./hooks/util/useImagePicker.js";
76
- import { MiniEntityNotFoundError as it, MiniError as pt, MiniNetworkError as lt, formatError as mt } from "./utils/errors.js";
77
- import { extractBrandTheme as st, formatReviewCount as ft, getFeaturedImages as xt, normalizeRating as ut } from "./utils/merchant-card.js";
78
- import { parseUrl as dt } from "./utils/parseUrl.js";
79
- import { fileToDataUri as Ct } from "./utils/imageToDataUri.js";
80
- import { ContentCreateUserErrorCode as Dt } from "./shop-minis-platform/src/types/content.js";
81
- import { Consent as Pt, ConsentStatus as Tt } from "./shop-minis-platform/src/types/permissions.js";
8
+ import { QuantitySelector as C } from "./components/commerce/quantity-selector.js";
9
+ import { Search as A, SearchInput as h, SearchProvider as P, SearchResultsList as T } from "./components/commerce/search.js";
10
+ import { ContentWrapper as v } from "./components/content/content-wrapper.js";
11
+ import { TransitionContainer as R } from "./components/navigation/transition-container.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 { AlertDialogAtom as V } from "./components/atoms/alert-dialog.js";
19
+ import { List as _ } from "./components/atoms/list.js";
20
+ import { VideoPlayer as Y } from "./components/atoms/video-player.js";
21
+ import { Accordion as j, AccordionContent as q, AccordionItem as J, AccordionTrigger as K } from "./components/ui/accordion.js";
22
+ import { Alert as Z, AlertDescription as $, AlertTitle as rr } from "./components/ui/alert.js";
23
+ import { AlertDialog as or, AlertDialogAction as tr, AlertDialogCancel as ar, AlertDialogContent as ir, AlertDialogDescription as pr, AlertDialogFooter as lr, AlertDialogHeader as mr, AlertDialogOverlay as sr, AlertDialogPortal as nr, AlertDialogTitle as fr, AlertDialogTrigger as xr } from "./components/ui/alert-dialog.js";
24
+ import { Avatar as cr, AvatarFallback as dr, AvatarImage as gr } from "./components/ui/avatar.js";
25
+ import { Badge as Cr, badgeVariants as Dr } from "./components/ui/badge.js";
26
+ import { Card as hr, CardAction as Pr, CardContent as Tr, CardDescription as Ir, CardFooter as vr, CardHeader as wr, CardTitle as Rr } from "./components/ui/card.js";
27
+ import { Carousel as Er, CarouselContent as Fr, CarouselItem as kr, CarouselNext as Br, CarouselPrevious as Lr } from "./components/ui/carousel.js";
28
+ import { Checkbox as Nr } from "./components/ui/checkbox.js";
29
+ import { Dialog as Ur, DialogClose as Gr, DialogContent as Hr, DialogDescription as Or, DialogFooter as Vr, DialogHeader as zr, DialogOverlay as _r, DialogPortal as Wr, DialogTitle as Yr, DialogTrigger as Qr } from "./components/ui/dialog.js";
30
+ import { Drawer as qr, DrawerClose as Jr, DrawerContent as Kr, DrawerDescription as Xr, DrawerFooter as Zr, DrawerHeader as $r, DrawerOverlay as re, DrawerPortal as ee, DrawerTitle as oe, DrawerTrigger as te } from "./components/ui/drawer.js";
31
+ import { Input as ie } from "./components/ui/input.js";
32
+ import { Label as le } from "./components/ui/label.js";
33
+ import { Progress as se } from "./components/ui/progress.js";
34
+ import { RadioGroup as fe, RadioGroupItem as xe } from "./components/ui/radio-group.js";
35
+ import { ResizableHandle as ce, ResizablePanel as de, ResizablePanelGroup as ge } from "./components/ui/resizable.js";
36
+ import { ScrollArea as Ce, ScrollBar as De } from "./components/ui/scroll-area.js";
37
+ import { Select as he, SelectContent as Pe, SelectGroup as Te, SelectItem as Ie, SelectLabel as ve, SelectScrollDownButton as we, SelectScrollUpButton as Re, SelectSeparator as be, SelectTrigger as Ee, SelectValue as Fe } from "./components/ui/select.js";
38
+ import { Separator as Be } from "./components/ui/separator.js";
39
+ import { Sheet as Me, SheetClose as Ne, SheetContent as ye, SheetDescription as Ue, SheetFooter as Ge, SheetHeader as He, SheetTitle as Oe, SheetTrigger as Ve } from "./components/ui/sheet.js";
40
+ import { Toaster as _e } from "./components/ui/sonner.js";
41
+ import { Skeleton as Ye } from "./components/ui/skeleton.js";
42
+ import { useRecentProducts as je } from "./hooks/user/useRecentProducts.js";
43
+ import { useRecentShops as Je } from "./hooks/user/useRecentShops.js";
44
+ import { useSavedProducts as Xe } from "./hooks/user/useSavedProducts.js";
45
+ import { useSavedProductsActions as $e } from "./hooks/user/useSavedProductsActions.js";
46
+ import { useFollowedShops as eo } from "./hooks/user/useFollowedShops.js";
47
+ import { useFollowedShopsActions as to } from "./hooks/user/useFollowedShopsActions.js";
48
+ import { useCurrentUser as io } from "./hooks/user/useCurrentUser.js";
49
+ import { useOrders as lo } from "./hooks/user/useOrders.js";
50
+ import { useBuyerAttributes as so } from "./hooks/user/useBuyerAttributes.js";
51
+ import { useProductListActions as fo } from "./hooks/product/useProductListActions.js";
52
+ import { useProductLists as uo } from "./hooks/product/useProductLists.js";
53
+ import { useProductList as go } from "./hooks/product/useProductList.js";
54
+ import { useProduct as Co } from "./hooks/product/useProduct.js";
55
+ import { useProducts as Ao } from "./hooks/product/useProducts.js";
56
+ import { useProductVariants as Po } from "./hooks/product/useProductVariants.js";
57
+ import { useProductMedia as Io } from "./hooks/product/useProductMedia.js";
58
+ import { useProductSearch as wo } from "./hooks/product/useProductSearch.js";
59
+ import { useRecommendedProducts as bo } from "./hooks/product/useRecommendedProducts.js";
60
+ import { usePopularProducts as Fo } from "./hooks/product/usePopularProducts.js";
61
+ import { useCuratedProducts as Bo } from "./hooks/product/useCuratedProducts.js";
62
+ import { useAsyncStorage as Mo } from "./hooks/storage/useAsyncStorage.js";
63
+ import { useSecureStorage as yo } from "./hooks/storage/useSecureStorage.js";
64
+ import { useImageUpload as Go } from "./hooks/storage/useImageUpload.js";
65
+ import { useShopNavigation as Oo } from "./hooks/navigation/useShopNavigation.js";
66
+ import { useCloseMini as zo } from "./hooks/navigation/useCloseMini.js";
67
+ import { useDeeplink as Wo } from "./hooks/navigation/useDeeplink.js";
68
+ import { useNavigateWithTransition as Qo } from "./hooks/navigation/useNavigateWithTransition.js";
69
+ import { useShop as qo } from "./hooks/shop/useShop.js";
70
+ import { useShopCartActions as Ko } from "./hooks/shop/useShopCartActions.js";
71
+ import { useRecommendedShops as Zo } from "./hooks/shop/useRecommendedShops.js";
72
+ import { useCreateImageContent as rt } from "./hooks/content/useCreateImageContent.js";
73
+ import { useErrorToast as ot } from "./hooks/util/useErrorToast.js";
74
+ import { useErrorScreen as at } from "./hooks/util/useErrorScreen.js";
75
+ import { useShare as pt } from "./hooks/util/useShare.js";
76
+ import { useImagePicker as mt } from "./hooks/util/useImagePicker.js";
77
+ import { MiniEntityNotFoundError as nt, MiniError as ft, MiniNetworkError as xt, formatError as ut } from "./utils/errors.js";
78
+ import { extractBrandTheme as dt, formatReviewCount as gt, getFeaturedImages as St, normalizeRating as Ct } from "./utils/merchant-card.js";
79
+ import { parseUrl as At } from "./utils/parseUrl.js";
80
+ import { fileToDataUri as Pt } from "./utils/imageToDataUri.js";
81
+ import { ContentCreateUserErrorCode as It } from "./shop-minis-platform/src/types/content.js";
82
+ import { Consent as wt, ConsentStatus as Rt } from "./shop-minis-platform/src/types/permissions.js";
82
83
  export {
83
- z as Accordion,
84
- _ as AccordionContent,
85
- W as AccordionItem,
86
- Y as AccordionTrigger,
87
- j as Alert,
88
- q as AlertDescription,
89
- X as AlertDialog,
90
- Z as AlertDialogAction,
91
- L as AlertDialogAtom,
92
- $ as AlertDialogCancel,
93
- rr as AlertDialogContent,
94
- er as AlertDialogDescription,
95
- or as AlertDialogFooter,
96
- tr as AlertDialogHeader,
97
- ar as AlertDialogOverlay,
98
- ir as AlertDialogPortal,
99
- pr as AlertDialogTitle,
100
- lr as AlertDialogTrigger,
101
- J as AlertTitle,
102
- nr as Avatar,
103
- sr as AvatarFallback,
104
- fr as AvatarImage,
105
- ur as Badge,
106
- v as Button,
107
- gr as Card,
108
- Cr as CardAction,
109
- Sr as CardContent,
110
- Dr as CardDescription,
111
- Ar as CardFooter,
112
- Pr as CardHeader,
113
- Tr as CardTitle,
114
- Ir as Carousel,
115
- wr as CarouselContent,
116
- vr as CarouselItem,
117
- Rr as CarouselNext,
118
- br as CarouselPrevious,
119
- Fr as Checkbox,
120
- Pt as Consent,
121
- Tt as ConsentStatus,
122
- Dt as ContentCreateUserErrorCode,
123
- A as ContentWrapper,
84
+ j as Accordion,
85
+ q as AccordionContent,
86
+ J as AccordionItem,
87
+ K as AccordionTrigger,
88
+ Z as Alert,
89
+ $ as AlertDescription,
90
+ or as AlertDialog,
91
+ tr as AlertDialogAction,
92
+ V as AlertDialogAtom,
93
+ ar as AlertDialogCancel,
94
+ ir as AlertDialogContent,
95
+ pr as AlertDialogDescription,
96
+ lr as AlertDialogFooter,
97
+ mr as AlertDialogHeader,
98
+ sr as AlertDialogOverlay,
99
+ nr as AlertDialogPortal,
100
+ fr as AlertDialogTitle,
101
+ xr as AlertDialogTrigger,
102
+ rr as AlertTitle,
103
+ cr as Avatar,
104
+ dr as AvatarFallback,
105
+ gr as AvatarImage,
106
+ Cr as Badge,
107
+ k as Button,
108
+ hr as Card,
109
+ Pr as CardAction,
110
+ Tr as CardContent,
111
+ Ir as CardDescription,
112
+ vr as CardFooter,
113
+ wr as CardHeader,
114
+ Rr as CardTitle,
115
+ Er as Carousel,
116
+ Fr as CarouselContent,
117
+ kr as CarouselItem,
118
+ Br as CarouselNext,
119
+ Lr as CarouselPrevious,
120
+ Nr as Checkbox,
121
+ wt as Consent,
122
+ Rt as ConsentStatus,
123
+ It as ContentCreateUserErrorCode,
124
+ v as ContentWrapper,
124
125
  o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
125
- Br as Dialog,
126
- Mr as DialogClose,
127
- Nr as DialogContent,
128
- yr as DialogDescription,
129
- Lr as DialogFooter,
130
- Ur as DialogHeader,
131
- Gr as DialogOverlay,
132
- Hr as DialogPortal,
133
- Or as DialogTitle,
134
- Vr as DialogTrigger,
135
- _r as Drawer,
136
- Wr as DrawerClose,
137
- Yr as DrawerContent,
138
- Qr as DrawerDescription,
139
- jr as DrawerFooter,
140
- qr as DrawerHeader,
141
- Jr as DrawerOverlay,
142
- Kr as DrawerPortal,
143
- Xr as DrawerTitle,
144
- Zr as DrawerTrigger,
145
- b as FavoriteButton,
146
- F as IconButton,
147
- re as Input,
148
- oe as Label,
149
- G as List,
126
+ Ur as Dialog,
127
+ Gr as DialogClose,
128
+ Hr as DialogContent,
129
+ Or as DialogDescription,
130
+ Vr as DialogFooter,
131
+ zr as DialogHeader,
132
+ _r as DialogOverlay,
133
+ Wr as DialogPortal,
134
+ Yr as DialogTitle,
135
+ Qr as DialogTrigger,
136
+ qr as Drawer,
137
+ Jr as DrawerClose,
138
+ Kr as DrawerContent,
139
+ Xr as DrawerDescription,
140
+ Zr as DrawerFooter,
141
+ $r as DrawerHeader,
142
+ re as DrawerOverlay,
143
+ ee as DrawerPortal,
144
+ oe as DrawerTitle,
145
+ te as DrawerTrigger,
146
+ L as FavoriteButton,
147
+ N as IconButton,
148
+ ie as Input,
149
+ le as Label,
150
+ _ as List,
150
151
  f as MerchantCard,
151
152
  x as MerchantCardPrimitive,
152
153
  g as MerchantCardSkeleton,
153
- it as MiniEntityNotFoundError,
154
- pt as MiniError,
155
- lt as MiniNetworkError,
154
+ nt as MiniEntityNotFoundError,
155
+ ft as MiniError,
156
+ xt as MiniNetworkError,
156
157
  i as MinisContainer,
157
158
  t as NAVIGATION_TYPES,
158
159
  l as ProductCard,
159
160
  c as ProductCardSkeleton,
160
- n as ProductLink,
161
- ae as Progress,
162
- S as QuantitySelector,
163
- pe as RadioGroup,
164
- le as RadioGroupItem,
165
- ne as ResizableHandle,
166
- se as ResizablePanel,
167
- fe as ResizablePanelGroup,
168
- ue as ScrollArea,
169
- ce as ScrollBar,
170
- ge as Select,
171
- Ce as SelectContent,
172
- Se as SelectGroup,
173
- De as SelectItem,
174
- Ae as SelectLabel,
175
- Pe as SelectScrollDownButton,
176
- Te as SelectScrollUpButton,
177
- he as SelectSeparator,
178
- Ie as SelectTrigger,
179
- we as SelectValue,
180
- Re as Separator,
181
- Ee as Sheet,
182
- Fe as SheetClose,
183
- ke as SheetContent,
184
- Be as SheetDescription,
185
- Me as SheetFooter,
186
- Ne as SheetHeader,
187
- ye as SheetTitle,
188
- Le as SheetTrigger,
189
- Oe as Skeleton,
190
- B as ThumbhashImage,
191
- Ge as Toaster,
192
- N as Touchable,
193
- T as TransitionContainer,
194
- I as TransitionLink,
195
- O as VideoPlayer,
196
- cr as badgeVariants,
197
- st as extractBrandTheme,
198
- Ct as fileToDataUri,
199
- mt as formatError,
200
- ft as formatReviewCount,
201
- xt as getFeaturedImages,
202
- ut as normalizeRating,
203
- dt as parseUrl,
204
- Eo as useAsyncStorage,
205
- ao as useBuyerAttributes,
206
- Uo as useCloseMini,
207
- Jo as useCreateImageContent,
208
- Ro as useCuratedProducts,
209
- ro as useCurrentUser,
210
- Ho as useDeeplink,
211
- $o as useErrorScreen,
212
- Xo as useErrorToast,
213
- Ke as useFollowedShops,
214
- Ze as useFollowedShopsActions,
215
- tt as useImagePicker,
216
- Mo as useImageUpload,
217
- Vo as useNavigateWithTransition,
218
- oo as useOrders,
219
- wo as usePopularProducts,
220
- xo as useProduct,
221
- so as useProductList,
222
- po as useProductListActions,
223
- mo as useProductLists,
224
- Do as useProductMedia,
225
- Po as useProductSearch,
226
- Co as useProductVariants,
227
- co as useProducts,
228
- ze as useRecentProducts,
229
- We as useRecentShops,
230
- ho as useRecommendedProducts,
231
- jo as useRecommendedShops,
232
- Qe as useSavedProducts,
233
- qe as useSavedProductsActions,
234
- ko as useSecureStorage,
235
- et as useShare,
236
- _o as useShop,
237
- Yo as useShopCartActions,
238
- yo as useShopNavigation
161
+ s as ProductLink,
162
+ se as Progress,
163
+ C as QuantitySelector,
164
+ fe as RadioGroup,
165
+ xe as RadioGroupItem,
166
+ ce as ResizableHandle,
167
+ de as ResizablePanel,
168
+ ge as ResizablePanelGroup,
169
+ Ce as ScrollArea,
170
+ De as ScrollBar,
171
+ A as Search,
172
+ h as SearchInput,
173
+ P as SearchProvider,
174
+ T as SearchResultsList,
175
+ he as Select,
176
+ Pe as SelectContent,
177
+ Te as SelectGroup,
178
+ Ie as SelectItem,
179
+ ve as SelectLabel,
180
+ we as SelectScrollDownButton,
181
+ Re as SelectScrollUpButton,
182
+ be as SelectSeparator,
183
+ Ee as SelectTrigger,
184
+ Fe as SelectValue,
185
+ Be as Separator,
186
+ Me as Sheet,
187
+ Ne as SheetClose,
188
+ ye as SheetContent,
189
+ Ue as SheetDescription,
190
+ Ge as SheetFooter,
191
+ He as SheetHeader,
192
+ Oe as SheetTitle,
193
+ Ve as SheetTrigger,
194
+ Ye as Skeleton,
195
+ U as ThumbhashImage,
196
+ _e as Toaster,
197
+ H as Touchable,
198
+ R as TransitionContainer,
199
+ E as TransitionLink,
200
+ Y as VideoPlayer,
201
+ Dr as badgeVariants,
202
+ dt as extractBrandTheme,
203
+ Pt as fileToDataUri,
204
+ ut as formatError,
205
+ gt as formatReviewCount,
206
+ St as getFeaturedImages,
207
+ Ct as normalizeRating,
208
+ At as parseUrl,
209
+ Mo as useAsyncStorage,
210
+ so as useBuyerAttributes,
211
+ zo as useCloseMini,
212
+ rt as useCreateImageContent,
213
+ Bo as useCuratedProducts,
214
+ io as useCurrentUser,
215
+ Wo as useDeeplink,
216
+ at as useErrorScreen,
217
+ ot as useErrorToast,
218
+ eo as useFollowedShops,
219
+ to as useFollowedShopsActions,
220
+ mt as useImagePicker,
221
+ Go as useImageUpload,
222
+ Qo as useNavigateWithTransition,
223
+ lo as useOrders,
224
+ Fo as usePopularProducts,
225
+ Co as useProduct,
226
+ go as useProductList,
227
+ fo as useProductListActions,
228
+ uo as useProductLists,
229
+ Io as useProductMedia,
230
+ wo as useProductSearch,
231
+ Po as useProductVariants,
232
+ Ao as useProducts,
233
+ je as useRecentProducts,
234
+ Je as useRecentShops,
235
+ bo as useRecommendedProducts,
236
+ Zo as useRecommendedShops,
237
+ Xe as useSavedProducts,
238
+ $e as useSavedProductsActions,
239
+ yo as useSecureStorage,
240
+ pt as useShare,
241
+ qo as useShop,
242
+ Ko as useShopCartActions,
243
+ Oo as useShopNavigation
239
244
  };
240
245
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,16 @@
1
+ import c from "../createLucideIcon.js";
2
+ /**
3
+ * @license lucide-react v0.513.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const e = [
9
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
10
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
11
+ ], o = c("search", e);
12
+ export {
13
+ e as __iconNode,
14
+ o as default
15
+ };
16
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sources":["../../../../../../../../../../node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/search.js"],"sourcesContent":["/**\n * @license lucide-react v0.513.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }]\n];\nconst Search = createLucideIcon(\"search\", __iconNode);\n\nexport { __iconNode, Search as default };\n//# sourceMappingURL=search.js.map\n"],"names":["__iconNode","Search","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASK,MAACA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,oBAAoB,KAAK,SAAQ,CAAE;AAAA,EACjD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,SAAU,CAAA;AAC1D,GACMC,IAASC,EAAiB,UAAUF,CAAU;","x_google_ignoreList":[0]}