@shopify/shop-minis-react 0.0.0-snapshot.20251224113248 → 0.0.0-snapshot.20260109162751
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/navigation/minis-router.js +15 -8
- package/dist/components/navigation/minis-router.js.map +1 -1
- package/dist/hooks/events/useOnNavigateBack.js +14 -0
- package/dist/hooks/events/useOnNavigateBack.js.map +1 -0
- package/dist/hooks/navigation/useNavigateWithTransition.js +6 -6
- package/dist/hooks/navigation/useNavigateWithTransition.js.map +1 -1
- package/dist/index.js +132 -139
- package/dist/index.js.map +1 -1
- package/dist/internal/navigation-manager.js +12 -0
- package/dist/internal/navigation-manager.js.map +1 -0
- package/dist/mocks.js +15 -49
- package/dist/mocks.js.map +1 -1
- package/eslint/config.cjs +1 -0
- package/eslint/index.cjs +2 -0
- package/eslint/rules/no-javascript-files.cjs +44 -0
- package/package.json +2 -2
- package/src/components/navigation/minis-router.tsx +9 -1
- package/src/hooks/events/useOnNavigateBack.ts +16 -0
- package/src/hooks/index.ts +1 -3
- package/src/hooks/navigation/useNavigateWithTransition.test.ts +17 -3
- package/src/hooks/navigation/useNavigateWithTransition.ts +9 -4
- package/src/internal/navigation-manager.tsx +13 -0
- package/src/mocks.ts +1 -35
- package/dist/hooks/intents/useInvokeIntentAction.js +0 -10
- package/dist/hooks/intents/useInvokeIntentAction.js.map +0 -1
- package/dist/hooks/intents/useQueryIntents.js +0 -10
- package/dist/hooks/intents/useQueryIntents.js.map +0 -1
- package/dist/hooks/intents/useSelectProduct.js +0 -21
- package/dist/hooks/intents/useSelectProduct.js.map +0 -1
- package/dist/shop-minis-platform/src/actions/scopes.js +0 -36
- package/dist/shop-minis-platform/src/actions/scopes.js.map +0 -1
- package/src/hooks/intents/index.ts +0 -38
- package/src/hooks/intents/useInvokeIntentAction.ts +0 -12
- package/src/hooks/intents/useQueryIntents.ts +0 -25
- package/src/hooks/intents/useSelectProduct.ts +0 -48
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { BrowserRouter as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { BrowserRouter as n } from "../../shop-minis-react/node_modules/.pnpm/react-router@7.7.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-router/dist/development/chunk-EF7DTUVF.js";
|
|
3
|
+
import { NavigationManager as e } from "../../internal/navigation-manager.js";
|
|
4
|
+
import { TransitionContainer as a } from "./transition-container.js";
|
|
5
|
+
function x({
|
|
5
6
|
children: o,
|
|
6
|
-
viewTransitions:
|
|
7
|
-
...
|
|
7
|
+
viewTransitions: m = !1,
|
|
8
|
+
...i
|
|
8
9
|
}) {
|
|
9
|
-
return
|
|
10
|
+
return m ? /* @__PURE__ */ t(n, { ...i, children: [
|
|
11
|
+
/* @__PURE__ */ r(e, {}),
|
|
12
|
+
/* @__PURE__ */ r(a, { children: o })
|
|
13
|
+
] }) : /* @__PURE__ */ t(n, { ...i, children: [
|
|
14
|
+
/* @__PURE__ */ r(e, {}),
|
|
15
|
+
o
|
|
16
|
+
] });
|
|
10
17
|
}
|
|
11
18
|
export {
|
|
12
|
-
|
|
19
|
+
x as MinisRouter
|
|
13
20
|
};
|
|
14
21
|
//# sourceMappingURL=minis-router.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minis-router.js","sources":["../../../src/components/navigation/minis-router.tsx"],"sourcesContent":["import {BrowserRouter, BrowserRouterProps} from 'react-router'\n\nimport {TransitionContainer} from './transition-container'\n\nexport interface MinisRouterProps extends BrowserRouterProps {\n viewTransitions?: boolean\n}\n\nexport function MinisRouter({\n children,\n viewTransitions = false,\n ...props\n}: MinisRouterProps) {\n if (viewTransitions) {\n return (\n <BrowserRouter {...props}>\n <TransitionContainer>{children}</TransitionContainer>\n </BrowserRouter>\n )\n }\n\n return <BrowserRouter {...props}
|
|
1
|
+
{"version":3,"file":"minis-router.js","sources":["../../../src/components/navigation/minis-router.tsx"],"sourcesContent":["import {BrowserRouter, BrowserRouterProps} from 'react-router'\n\nimport {NavigationManager} from '../../internal/navigation-manager'\n\nimport {TransitionContainer} from './transition-container'\n\nexport interface MinisRouterProps extends BrowserRouterProps {\n viewTransitions?: boolean\n}\n\nexport function MinisRouter({\n children,\n viewTransitions = false,\n ...props\n}: MinisRouterProps) {\n if (viewTransitions) {\n return (\n <BrowserRouter {...props}>\n <NavigationManager />\n <TransitionContainer>{children}</TransitionContainer>\n </BrowserRouter>\n )\n }\n\n return (\n <BrowserRouter {...props}>\n <NavigationManager />\n {children}\n </BrowserRouter>\n )\n}\n"],"names":["MinisRouter","children","viewTransitions","props","jsxs","BrowserRouter","jsx","NavigationManager","TransitionContainer"],"mappings":";;;;AAUO,SAASA,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGC;AACL,GAAqB;AACnB,SAAID,IAEA,gBAAAE,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAkB,EAAA;AAAA,IACnB,gBAAAD,EAACE,KAAqB,UAAAP,EAAS,CAAA;AAAA,EAAA,GACjC,IAKF,gBAAAG,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAkB,EAAA;AAAA,IAClBN;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRef as i, useEffect as o } from "react";
|
|
2
|
+
function s(n) {
|
|
3
|
+
const e = i(n);
|
|
4
|
+
e.current = n, o(() => {
|
|
5
|
+
const t = window.minisEvents.on("NAVIGATE_BACK", () => {
|
|
6
|
+
e.current();
|
|
7
|
+
});
|
|
8
|
+
return () => window.minisEvents.off(t);
|
|
9
|
+
}, []);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
s as useOnNavigateBack
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useOnNavigateBack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnNavigateBack.js","sources":["../../../src/hooks/events/useOnNavigateBack.ts"],"sourcesContent":["import {useEffect, useRef} from 'react'\n\nexport function useOnNavigateBack(callback: () => void) {\n // Using a ref allows the callback to be updated without triggering a re-render\n // This makes the hook nicer to use because developers don't need useCallback\n const callbackRef = useRef(callback)\n callbackRef.current = callback\n\n useEffect(() => {\n const listenerId = window.minisEvents.on('NAVIGATE_BACK', () => {\n callbackRef.current()\n })\n\n return () => window.minisEvents.off(listenerId)\n }, [])\n}\n"],"names":["useOnNavigateBack","callback","callbackRef","useRef","useEffect","listenerId"],"mappings":";AAEO,SAASA,EAAkBC,GAAsB;AAGhD,QAAAC,IAAcC,EAAOF,CAAQ;AACnC,EAAAC,EAAY,UAAUD,GAEtBG,EAAU,MAAM;AACd,UAAMC,IAAa,OAAO,YAAY,GAAG,iBAAiB,MAAM;AAC9D,MAAAH,EAAY,QAAQ;AAAA,IAAA,CACrB;AAED,WAAO,MAAM,OAAO,YAAY,IAAIG,CAAU;AAAA,EAChD,GAAG,EAAE;AACP;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useNavigate as
|
|
1
|
+
import { useNavigate as u, useLocation as m } from "../../shop-minis-react/node_modules/.pnpm/react-router@7.7.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-router/dist/development/chunk-EF7DTUVF.js";
|
|
2
2
|
import { DATA_NAVIGATION_TYPE_ATTRIBUTE as r } from "../../types/index.js";
|
|
3
|
-
function
|
|
4
|
-
const e =
|
|
3
|
+
function f() {
|
|
4
|
+
const e = u(), o = m();
|
|
5
5
|
return (t, n) => {
|
|
6
6
|
if (typeof t == "number") {
|
|
7
7
|
if (document.startViewTransition)
|
|
@@ -18,10 +18,10 @@ function d() {
|
|
|
18
18
|
return e(t);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const a = t === o.pathname;
|
|
21
|
+
const a = t === o.pathname, s = t === "/";
|
|
22
22
|
if (document.startViewTransition)
|
|
23
23
|
document.startViewTransition(() => {
|
|
24
|
-
e(t, {
|
|
24
|
+
s ? e(-window.history.state.idx) : e(t, {
|
|
25
25
|
replace: a,
|
|
26
26
|
...n
|
|
27
27
|
}), n?.preventScrollReset !== !0 && window.scrollTo(0, 0);
|
|
@@ -37,6 +37,6 @@ function d() {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
f as useNavigateWithTransition
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=useNavigateWithTransition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavigateWithTransition.js","sources":["../../../src/hooks/navigation/useNavigateWithTransition.ts"],"sourcesContent":["import {useLocation, useNavigate, NavigateOptions} from 'react-router'\n\nimport {DATA_NAVIGATION_TYPE_ATTRIBUTE} from '../../types'\n\ntype UseNavigateWithTransitionReturns = (\n to: string | number,\n options?: NavigateOptions\n) => void | Promise<void>\n\nexport function useNavigateWithTransition(): UseNavigateWithTransitionReturns {\n const navigate = useNavigate()\n const location = useLocation()\n\n const transitionNavigate = (\n to: string | number,\n options?: NavigateOptions\n ) => {\n if (typeof to === 'number') {\n // Delta navigation - no options parameter\n if (document.startViewTransition) {\n const transition = document.startViewTransition(() => {\n navigate(to)\n })\n\n transition.finished\n .then(() => {\n document.documentElement.removeAttribute(\n DATA_NAVIGATION_TYPE_ATTRIBUTE\n )\n })\n .catch(error => {\n console.error('View transition error:', error)\n })\n } else {\n return navigate(to)\n }\n return\n }\n\n const isSameRoute = to === location.pathname\n\n // Path navigation - with options\n if (document.startViewTransition) {\n const transition = document.startViewTransition(() => {\n navigate(to, {\n
|
|
1
|
+
{"version":3,"file":"useNavigateWithTransition.js","sources":["../../../src/hooks/navigation/useNavigateWithTransition.ts"],"sourcesContent":["import {useLocation, useNavigate, NavigateOptions} from 'react-router'\n\nimport {DATA_NAVIGATION_TYPE_ATTRIBUTE} from '../../types'\n\ntype UseNavigateWithTransitionReturns = (\n to: string | number,\n options?: NavigateOptions\n) => void | Promise<void>\n\nexport function useNavigateWithTransition(): UseNavigateWithTransitionReturns {\n const navigate = useNavigate()\n const location = useLocation()\n\n const transitionNavigate = (\n to: string | number,\n options?: NavigateOptions\n ) => {\n if (typeof to === 'number') {\n // Delta navigation - no options parameter\n if (document.startViewTransition) {\n const transition = document.startViewTransition(() => {\n navigate(to)\n })\n\n transition.finished\n .then(() => {\n document.documentElement.removeAttribute(\n DATA_NAVIGATION_TYPE_ATTRIBUTE\n )\n })\n .catch(error => {\n console.error('View transition error:', error)\n })\n } else {\n return navigate(to)\n }\n return\n }\n\n const isSameRoute = to === location.pathname\n const isNavigatingToHomeRoute = to === '/'\n\n // Path navigation - with options\n if (document.startViewTransition) {\n const transition = document.startViewTransition(() => {\n if (isNavigatingToHomeRoute) {\n navigate(-window.history.state.idx)\n } else {\n navigate(to, {\n replace: isSameRoute,\n ...options,\n })\n }\n\n if (options?.preventScrollReset !== true) {\n window.scrollTo(0, 0)\n }\n })\n\n transition.finished\n .then(() => {\n document.documentElement.removeAttribute(\n DATA_NAVIGATION_TYPE_ATTRIBUTE\n )\n })\n .catch(error => {\n console.error('View transition error:', error)\n })\n } else {\n return navigate(to, options)\n }\n }\n\n return transitionNavigate\n}\n"],"names":["useNavigateWithTransition","navigate","useNavigate","location","useLocation","to","options","DATA_NAVIGATION_TYPE_ATTRIBUTE","error","isSameRoute","isNavigatingToHomeRoute"],"mappings":";;AASO,SAASA,IAA8D;AAC5E,QAAMC,IAAWC,EAAY,GACvBC,IAAWC,EAAY;AA8DtB,SA5DoB,CACzBC,GACAC,MACG;AACC,QAAA,OAAOD,KAAO,UAAU;AAE1B,UAAI,SAAS;AAKA,QAJQ,SAAS,oBAAoB,MAAM;AACpD,UAAAJ,EAASI,CAAE;AAAA,QAAA,CACZ,EAEU,SACR,KAAK,MAAM;AACV,mBAAS,gBAAgB;AAAA,YACvBE;AAAA,UACF;AAAA,QAAA,CACD,EACA,MAAM,CAASC,MAAA;AACN,kBAAA,MAAM,0BAA0BA,CAAK;AAAA,QAAA,CAC9C;AAAA;AAEH,eAAOP,EAASI,CAAE;AAEpB;AAAA,IAAA;AAGI,UAAAI,IAAcJ,MAAOF,EAAS,UAC9BO,IAA0BL,MAAO;AAGvC,QAAI,SAAS;AAgBA,MAfQ,SAAS,oBAAoB,MAAM;AACpD,QAAIK,IACFT,EAAS,CAAC,OAAO,QAAQ,MAAM,GAAG,IAElCA,EAASI,GAAI;AAAA,UACX,SAASI;AAAA,UACT,GAAGH;AAAA,QAAA,CACJ,GAGCA,GAAS,uBAAuB,MAC3B,OAAA,SAAS,GAAG,CAAC;AAAA,MACtB,CACD,EAEU,SACR,KAAK,MAAM;AACV,iBAAS,gBAAgB;AAAA,UACvBC;AAAA,QACF;AAAA,MAAA,CACD,EACA,MAAM,CAASC,MAAA;AACN,gBAAA,MAAM,0BAA0BA,CAAK;AAAA,MAAA,CAC9C;AAAA;AAEI,aAAAP,EAASI,GAAIC,CAAO;AAAA,EAE/B;AAGF;"}
|
package/dist/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { DATA_NAVIGATION_TYPE_ATTRIBUTE as o, NAVIGATION_TYPES as t } from "./types/index.js";
|
|
2
|
-
import { MinisContainer as
|
|
3
|
-
import { AddToCartButton as
|
|
2
|
+
import { MinisContainer as i } from "./components/MinisContainer.js";
|
|
3
|
+
import { AddToCartButton as n } from "./components/commerce/add-to-cart.js";
|
|
4
4
|
import { BuyNowButton as s } from "./components/commerce/buy-now.js";
|
|
5
|
-
import { ProductCard as
|
|
5
|
+
import { ProductCard as u, ProductCardBadge as f, ProductCardContainer as x, ProductCardFavoriteButton as c, ProductCardImage as d, ProductCardImageContainer as C, ProductCardInfo as g, ProductCardPrice as S, ProductCardReviewStars as A, ProductCardTitle as D } from "./components/commerce/product-card.js";
|
|
6
6
|
import { ProductLink as T } from "./components/commerce/product-link.js";
|
|
7
|
-
import { MerchantCard as I, MerchantCardContainer as R, MerchantCardHeader as
|
|
7
|
+
import { MerchantCard as I, MerchantCardContainer as R, MerchantCardHeader as B, MerchantCardInfo as E, MerchantCardName as M, MerchantCardRating as v } from "./components/commerce/merchant-card.js";
|
|
8
8
|
import { ProductCardSkeleton as F } from "./components/commerce/product-card-skeleton.js";
|
|
9
9
|
import { MerchantCardSkeleton as L } from "./components/commerce/merchant-card-skeleton.js";
|
|
10
|
-
import { QuantitySelector as
|
|
11
|
-
import { Search as
|
|
10
|
+
import { QuantitySelector as N } from "./components/commerce/quantity-selector.js";
|
|
11
|
+
import { Search as O, SearchInput as _, SearchProvider as y, SearchResultsList as G } from "./components/commerce/search.js";
|
|
12
12
|
import { FavoriteButton as V } from "./components/commerce/favorite-button.js";
|
|
13
13
|
import { ImageContentWrapper as W } from "./components/content/image-content-wrapper.js";
|
|
14
|
-
import { MinisRouter as
|
|
15
|
-
import { TransitionLink as
|
|
14
|
+
import { MinisRouter as q } from "./components/navigation/minis-router.js";
|
|
15
|
+
import { TransitionLink as Q } from "./components/navigation/transition-link.js";
|
|
16
16
|
import { Button as j } from "./components/atoms/button.js";
|
|
17
17
|
import { IconButton as X } from "./components/atoms/icon-button.js";
|
|
18
18
|
import { Image as rr } from "./components/atoms/image.js";
|
|
19
19
|
import { Touchable as or } from "./components/atoms/touchable.js";
|
|
20
20
|
import { LongPressDetector as ar } from "./components/atoms/long-press-detector.js";
|
|
21
|
-
import { AlertDialogAtom as
|
|
21
|
+
import { AlertDialogAtom as pr } from "./components/atoms/alert-dialog.js";
|
|
22
22
|
import { List as mr } from "./components/atoms/list.js";
|
|
23
|
-
import { VideoPlayer as
|
|
23
|
+
import { VideoPlayer as lr } from "./components/atoms/video-player.js";
|
|
24
24
|
import { TextInput as fr } from "./components/atoms/text-input.js";
|
|
25
25
|
import { ContentWrapper as cr } from "./components/atoms/content-wrapper.js";
|
|
26
26
|
import { ProductVariantPrice as Cr } from "./components/atoms/product-variant-price.js";
|
|
27
27
|
import { Accordion as Sr, AccordionContent as Ar, AccordionItem as Dr, AccordionTrigger as Pr } from "./components/ui/accordion.js";
|
|
28
28
|
import { Alert as hr, AlertDescription as Ir, AlertTitle as Rr } from "./components/ui/alert.js";
|
|
29
|
-
import { AlertDialog as Er, AlertDialogAction as
|
|
30
|
-
import { Avatar as
|
|
29
|
+
import { AlertDialog as Er, AlertDialogAction as Mr, AlertDialogCancel as vr, AlertDialogContent as wr, AlertDialogDescription as Fr, AlertDialogFooter as Ur, AlertDialogHeader as Lr, AlertDialogOverlay as br, AlertDialogPortal as Nr, AlertDialogTitle as kr, AlertDialogTrigger as Or } from "./components/ui/alert-dialog.js";
|
|
30
|
+
import { Avatar as yr, AvatarFallback as Gr, AvatarImage as Hr } from "./components/ui/avatar.js";
|
|
31
31
|
import { Badge as zr, badgeVariants as Wr } from "./components/ui/badge.js";
|
|
32
|
-
import { Card as
|
|
32
|
+
import { Card as qr, CardAction as Kr, CardContent as Qr, CardDescription as Zr, CardFooter as jr, CardHeader as Jr, CardTitle as Xr } from "./components/ui/card.js";
|
|
33
33
|
import { Carousel as re, CarouselContent as ee, CarouselItem as oe, CarouselNext as te, CarouselPrevious as ae } from "./components/ui/carousel.js";
|
|
34
|
-
import { Checkbox as
|
|
35
|
-
import { Dialog as me, DialogClose as se, DialogContent as
|
|
36
|
-
import { Drawer as Ae, DrawerClose as De, DrawerContent as Pe, DrawerDescription as Te, DrawerFooter as he, DrawerHeader as Ie, DrawerOverlay as Re, DrawerPortal as
|
|
37
|
-
import { Input as
|
|
34
|
+
import { Checkbox as pe } from "./components/ui/checkbox.js";
|
|
35
|
+
import { Dialog as me, DialogClose as se, DialogContent as le, DialogDescription as ue, DialogFooter as fe, DialogHeader as xe, DialogOverlay as ce, DialogPortal as de, DialogTitle as Ce, DialogTrigger as ge } from "./components/ui/dialog.js";
|
|
36
|
+
import { Drawer as Ae, DrawerClose as De, DrawerContent as Pe, DrawerDescription as Te, DrawerFooter as he, DrawerHeader as Ie, DrawerOverlay as Re, DrawerPortal as Be, DrawerTitle as Ee, DrawerTrigger as Me } from "./components/ui/drawer.js";
|
|
37
|
+
import { Input as we } from "./components/ui/input.js";
|
|
38
38
|
import { Label as Ue } from "./components/ui/label.js";
|
|
39
39
|
import { Progress as be } from "./components/ui/progress.js";
|
|
40
|
-
import { RadioGroup as
|
|
41
|
-
import { ResizableHandle as
|
|
40
|
+
import { RadioGroup as ke, RadioGroupItem as Oe } from "./components/ui/radio-group.js";
|
|
41
|
+
import { ResizableHandle as ye, ResizablePanel as Ge, ResizablePanelGroup as He } from "./components/ui/resizable.js";
|
|
42
42
|
import { ScrollArea as ze, ScrollBar as We } from "./components/ui/scroll-area.js";
|
|
43
|
-
import { Select as
|
|
43
|
+
import { Select as qe, SelectContent as Ke, SelectGroup as Qe, SelectItem as Ze, SelectLabel as je, SelectScrollDownButton as Je, SelectScrollUpButton as Xe, SelectSeparator as $e, SelectTrigger as ro, SelectValue as eo } from "./components/ui/select.js";
|
|
44
44
|
import { Separator as to } from "./components/ui/separator.js";
|
|
45
|
-
import { Sheet as
|
|
45
|
+
import { Sheet as io, SheetClose as po, SheetContent as no, SheetDescription as mo, SheetFooter as so, SheetHeader as lo, SheetTitle as uo, SheetTrigger as fo } from "./components/ui/sheet.js";
|
|
46
46
|
import { Toaster as co } from "./components/ui/sonner.js";
|
|
47
47
|
import { toast as go } from "./shop-minis-react/node_modules/.pnpm/sonner@2.0.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/sonner/dist/index.js";
|
|
48
48
|
import { Skeleton as Ao } from "./components/ui/skeleton.js";
|
|
@@ -50,25 +50,25 @@ import { useRecentProducts as Po } from "./hooks/user/useRecentProducts.js";
|
|
|
50
50
|
import { useRecentShops as ho } from "./hooks/user/useRecentShops.js";
|
|
51
51
|
import { useSavedProducts as Ro } from "./hooks/user/useSavedProducts.js";
|
|
52
52
|
import { useSavedProductsActions as Eo } from "./hooks/user/useSavedProductsActions.js";
|
|
53
|
-
import { useFollowedShops as
|
|
53
|
+
import { useFollowedShops as vo } from "./hooks/user/useFollowedShops.js";
|
|
54
54
|
import { useFollowedShopsActions as Fo } from "./hooks/user/useFollowedShopsActions.js";
|
|
55
55
|
import { useCurrentUser as Lo } from "./hooks/user/useCurrentUser.js";
|
|
56
|
-
import { useOrders as
|
|
57
|
-
import { useBuyerAttributes as
|
|
58
|
-
import { useGenerateUserToken as
|
|
56
|
+
import { useOrders as No } from "./hooks/user/useOrders.js";
|
|
57
|
+
import { useBuyerAttributes as Oo } from "./hooks/user/useBuyerAttributes.js";
|
|
58
|
+
import { useGenerateUserToken as yo } from "./hooks/user/useGenerateUserToken.js";
|
|
59
59
|
import { useProductListActions as Ho } from "./hooks/product/useProductListActions.js";
|
|
60
60
|
import { useProductLists as zo } from "./hooks/product/useProductLists.js";
|
|
61
61
|
import { useProductList as Yo } from "./hooks/product/useProductList.js";
|
|
62
|
-
import { useProduct as
|
|
62
|
+
import { useProduct as Ko } from "./hooks/product/useProduct.js";
|
|
63
63
|
import { useProducts as Zo } from "./hooks/product/useProducts.js";
|
|
64
64
|
import { useProductVariants as Jo } from "./hooks/product/useProductVariants.js";
|
|
65
65
|
import { useProductMedia as $o } from "./hooks/product/useProductMedia.js";
|
|
66
66
|
import { useProductSearch as et } from "./hooks/product/useProductSearch.js";
|
|
67
67
|
import { useRecommendedProducts as tt } from "./hooks/product/useRecommendedProducts.js";
|
|
68
|
-
import { usePopularProducts as
|
|
69
|
-
import { useCuratedProducts as
|
|
68
|
+
import { usePopularProducts as it } from "./hooks/product/usePopularProducts.js";
|
|
69
|
+
import { useCuratedProducts as nt } from "./hooks/product/useCuratedProducts.js";
|
|
70
70
|
import { useAsyncStorage as st } from "./hooks/storage/useAsyncStorage.js";
|
|
71
|
-
import { useSecureStorage as
|
|
71
|
+
import { useSecureStorage as ut } from "./hooks/storage/useSecureStorage.js";
|
|
72
72
|
import { useImageUpload as xt } from "./hooks/storage/useImageUpload.js";
|
|
73
73
|
import { useShopNavigation as dt } from "./hooks/navigation/useShopNavigation.js";
|
|
74
74
|
import { useCloseMini as gt } from "./hooks/navigation/useCloseMini.js";
|
|
@@ -77,60 +77,56 @@ import { useNavigateWithTransition as Pt } from "./hooks/navigation/useNavigateW
|
|
|
77
77
|
import { useShop as ht } from "./hooks/shop/useShop.js";
|
|
78
78
|
import { useRecommendedShops as Rt } from "./hooks/shop/useRecommendedShops.js";
|
|
79
79
|
import { useCreateImageContent as Et } from "./hooks/content/useCreateImageContent.js";
|
|
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 {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import { Social as Ea } from "./shop-minis-platform/src/types/share.js";
|
|
101
|
-
import { DATA_FETCHING_DEFAULT_FETCH_POLICY as wa, DATA_FETCHING_DEFAULT_PAGE_SIZE as Ba } from "./shop-minis-platform/src/constants.js";
|
|
102
|
-
import { ActionToScopesMapping as Ua, Scope as La } from "./shop-minis-platform/src/actions/scopes.js";
|
|
80
|
+
import { useErrorToast as vt } from "./hooks/util/useErrorToast.js";
|
|
81
|
+
import { useErrorScreen as Ft } from "./hooks/util/useErrorScreen.js";
|
|
82
|
+
import { useShare as Lt } from "./hooks/util/useShare.js";
|
|
83
|
+
import { useImagePicker as Nt } from "./hooks/util/useImagePicker.js";
|
|
84
|
+
import { useKeyboardAvoidingView as Ot } from "./hooks/util/useKeyboardAvoidingView.js";
|
|
85
|
+
import { useRequestPermissions as yt } from "./hooks/util/useRequestPermissions.js";
|
|
86
|
+
import { useOnMiniFocus as Ht } from "./hooks/events/useOnMiniFocus.js";
|
|
87
|
+
import { useOnMiniBlur as zt } from "./hooks/events/useOnMiniBlur.js";
|
|
88
|
+
import { useOnMiniClose as Yt } from "./hooks/events/useOnMiniClose.js";
|
|
89
|
+
import { useOnAppStateChange as Kt } from "./hooks/events/useOnAppStateChange.js";
|
|
90
|
+
import { useOnNavigateBack as Zt } from "./hooks/events/useOnNavigateBack.js";
|
|
91
|
+
import { MiniEntityNotFoundError as Jt, MiniError as Xt, MiniNetworkError as $t, formatError as ra } from "./utils/errors.js";
|
|
92
|
+
import { extractBrandTheme as oa, formatReviewCount as ta, getFeaturedImages as aa, normalizeRating as ia } from "./utils/merchant-card.js";
|
|
93
|
+
import { parseUrl as na } from "./utils/parseUrl.js";
|
|
94
|
+
import { dataURLToBlob as sa, fileToDataUri as la, getResizedImageUrl as ua, getThumbhashBlobURL as fa, getThumbhashDataURL as xa } from "./utils/image.js";
|
|
95
|
+
import { formatMoney as da } from "./utils/formatMoney.js";
|
|
96
|
+
import { UserState as ga, UserTokenGenerateUserErrorCode as Sa } from "./shop-minis-platform/src/types/user.js";
|
|
97
|
+
import { ContentCreateUserErrorCode as Da, MinisContentStatus as Pa } from "./shop-minis-platform/src/types/content.js";
|
|
98
|
+
import { Social as ha } from "./shop-minis-platform/src/types/share.js";
|
|
99
|
+
import { DATA_FETCHING_DEFAULT_FETCH_POLICY as Ra, DATA_FETCHING_DEFAULT_PAGE_SIZE as Ba } from "./shop-minis-platform/src/constants.js";
|
|
103
100
|
export {
|
|
104
101
|
Sr as Accordion,
|
|
105
102
|
Ar as AccordionContent,
|
|
106
103
|
Dr as AccordionItem,
|
|
107
104
|
Pr as AccordionTrigger,
|
|
108
|
-
|
|
109
|
-
i as AddToCartButton,
|
|
105
|
+
n as AddToCartButton,
|
|
110
106
|
hr as Alert,
|
|
111
107
|
Ir as AlertDescription,
|
|
112
108
|
Er as AlertDialog,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
Mr as AlertDialogAction,
|
|
110
|
+
pr as AlertDialogAtom,
|
|
111
|
+
vr as AlertDialogCancel,
|
|
112
|
+
wr as AlertDialogContent,
|
|
117
113
|
Fr as AlertDialogDescription,
|
|
118
114
|
Ur as AlertDialogFooter,
|
|
119
115
|
Lr as AlertDialogHeader,
|
|
120
116
|
br as AlertDialogOverlay,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
Nr as AlertDialogPortal,
|
|
118
|
+
kr as AlertDialogTitle,
|
|
119
|
+
Or as AlertDialogTrigger,
|
|
124
120
|
Rr as AlertTitle,
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
yr as Avatar,
|
|
122
|
+
Gr as AvatarFallback,
|
|
127
123
|
Hr as AvatarImage,
|
|
128
124
|
zr as Badge,
|
|
129
125
|
j as Button,
|
|
130
126
|
s as BuyNowButton,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
qr as Card,
|
|
128
|
+
Kr as CardAction,
|
|
129
|
+
Qr as CardContent,
|
|
134
130
|
Zr as CardDescription,
|
|
135
131
|
jr as CardFooter,
|
|
136
132
|
Jr as CardHeader,
|
|
@@ -140,16 +136,16 @@ export {
|
|
|
140
136
|
oe as CarouselItem,
|
|
141
137
|
te as CarouselNext,
|
|
142
138
|
ae as CarouselPrevious,
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
pe as Checkbox,
|
|
140
|
+
Da as ContentCreateUserErrorCode,
|
|
145
141
|
cr as ContentWrapper,
|
|
146
|
-
|
|
142
|
+
Ra as DATA_FETCHING_DEFAULT_FETCH_POLICY,
|
|
147
143
|
Ba as DATA_FETCHING_DEFAULT_PAGE_SIZE,
|
|
148
144
|
o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
|
|
149
145
|
me as Dialog,
|
|
150
146
|
se as DialogClose,
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
le as DialogContent,
|
|
148
|
+
ue as DialogDescription,
|
|
153
149
|
fe as DialogFooter,
|
|
154
150
|
xe as DialogHeader,
|
|
155
151
|
ce as DialogOverlay,
|
|
@@ -163,32 +159,32 @@ export {
|
|
|
163
159
|
he as DrawerFooter,
|
|
164
160
|
Ie as DrawerHeader,
|
|
165
161
|
Re as DrawerOverlay,
|
|
166
|
-
|
|
162
|
+
Be as DrawerPortal,
|
|
167
163
|
Ee as DrawerTitle,
|
|
168
|
-
|
|
164
|
+
Me as DrawerTrigger,
|
|
169
165
|
V as FavoriteButton,
|
|
170
166
|
X as IconButton,
|
|
171
167
|
rr as Image,
|
|
172
168
|
W as ImageContentWrapper,
|
|
173
|
-
|
|
169
|
+
we as Input,
|
|
174
170
|
Ue as Label,
|
|
175
171
|
mr as List,
|
|
176
172
|
ar as LongPressDetector,
|
|
177
173
|
I as MerchantCard,
|
|
178
174
|
R as MerchantCardContainer,
|
|
179
|
-
|
|
175
|
+
B as MerchantCardHeader,
|
|
180
176
|
E as MerchantCardInfo,
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
M as MerchantCardName,
|
|
178
|
+
v as MerchantCardRating,
|
|
183
179
|
L as MerchantCardSkeleton,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
180
|
+
Jt as MiniEntityNotFoundError,
|
|
181
|
+
Xt as MiniError,
|
|
182
|
+
$t as MiniNetworkError,
|
|
183
|
+
i as MinisContainer,
|
|
184
|
+
Pa as MinisContentStatus,
|
|
185
|
+
q as MinisRouter,
|
|
190
186
|
t as NAVIGATION_TYPES,
|
|
191
|
-
|
|
187
|
+
u as ProductCard,
|
|
192
188
|
f as ProductCardBadge,
|
|
193
189
|
x as ProductCardContainer,
|
|
194
190
|
c as ProductCardFavoriteButton,
|
|
@@ -202,22 +198,21 @@ export {
|
|
|
202
198
|
T as ProductLink,
|
|
203
199
|
Cr as ProductVariantPrice,
|
|
204
200
|
be as Progress,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
N as QuantitySelector,
|
|
202
|
+
ke as RadioGroup,
|
|
203
|
+
Oe as RadioGroupItem,
|
|
204
|
+
ye as ResizableHandle,
|
|
205
|
+
Ge as ResizablePanel,
|
|
210
206
|
He as ResizablePanelGroup,
|
|
211
|
-
La as Scope,
|
|
212
207
|
ze as ScrollArea,
|
|
213
208
|
We as ScrollBar,
|
|
214
|
-
|
|
209
|
+
O as Search,
|
|
215
210
|
_ as SearchInput,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
211
|
+
y as SearchProvider,
|
|
212
|
+
G as SearchResultsList,
|
|
213
|
+
qe as Select,
|
|
214
|
+
Ke as SelectContent,
|
|
215
|
+
Qe as SelectGroup,
|
|
221
216
|
Ze as SelectItem,
|
|
222
217
|
je as SelectLabel,
|
|
223
218
|
Je as SelectScrollDownButton,
|
|
@@ -226,61 +221,61 @@ export {
|
|
|
226
221
|
ro as SelectTrigger,
|
|
227
222
|
eo as SelectValue,
|
|
228
223
|
to as Separator,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
224
|
+
io as Sheet,
|
|
225
|
+
po as SheetClose,
|
|
226
|
+
no as SheetContent,
|
|
232
227
|
mo as SheetDescription,
|
|
233
228
|
so as SheetFooter,
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
lo as SheetHeader,
|
|
230
|
+
uo as SheetTitle,
|
|
236
231
|
fo as SheetTrigger,
|
|
237
232
|
Ao as Skeleton,
|
|
238
|
-
|
|
233
|
+
ha as Social,
|
|
239
234
|
fr as TextInput,
|
|
240
235
|
co as Toaster,
|
|
241
236
|
or as Touchable,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
237
|
+
Q as TransitionLink,
|
|
238
|
+
ga as UserState,
|
|
239
|
+
Sa as UserTokenGenerateUserErrorCode,
|
|
240
|
+
lr as VideoPlayer,
|
|
246
241
|
Wr as badgeVariants,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
242
|
+
sa as dataURLToBlob,
|
|
243
|
+
oa as extractBrandTheme,
|
|
244
|
+
la as fileToDataUri,
|
|
245
|
+
ra as formatError,
|
|
246
|
+
da as formatMoney,
|
|
247
|
+
ta as formatReviewCount,
|
|
248
|
+
aa as getFeaturedImages,
|
|
249
|
+
ua as getResizedImageUrl,
|
|
250
|
+
fa as getThumbhashBlobURL,
|
|
251
|
+
xa as getThumbhashDataURL,
|
|
252
|
+
ia as normalizeRating,
|
|
253
|
+
na as parseUrl,
|
|
259
254
|
go as toast,
|
|
260
255
|
st as useAsyncStorage,
|
|
261
|
-
|
|
256
|
+
Oo as useBuyerAttributes,
|
|
262
257
|
gt as useCloseMini,
|
|
263
258
|
Et as useCreateImageContent,
|
|
264
|
-
|
|
259
|
+
nt as useCuratedProducts,
|
|
265
260
|
Lo as useCurrentUser,
|
|
266
261
|
At as useDeeplink,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
262
|
+
Ft as useErrorScreen,
|
|
263
|
+
vt as useErrorToast,
|
|
264
|
+
vo as useFollowedShops,
|
|
270
265
|
Fo as useFollowedShopsActions,
|
|
271
|
-
|
|
272
|
-
|
|
266
|
+
yo as useGenerateUserToken,
|
|
267
|
+
Nt as useImagePicker,
|
|
273
268
|
xt as useImageUpload,
|
|
274
|
-
|
|
275
|
-
zt as useKeyboardAvoidingView,
|
|
269
|
+
Ot as useKeyboardAvoidingView,
|
|
276
270
|
Pt as useNavigateWithTransition,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
271
|
+
Kt as useOnAppStateChange,
|
|
272
|
+
zt as useOnMiniBlur,
|
|
273
|
+
Yt as useOnMiniClose,
|
|
274
|
+
Ht as useOnMiniFocus,
|
|
275
|
+
Zt as useOnNavigateBack,
|
|
276
|
+
No as useOrders,
|
|
277
|
+
it as usePopularProducts,
|
|
278
|
+
Ko as useProduct,
|
|
284
279
|
Yo as useProductList,
|
|
285
280
|
Ho as useProductListActions,
|
|
286
281
|
zo as useProductLists,
|
|
@@ -288,17 +283,15 @@ export {
|
|
|
288
283
|
et as useProductSearch,
|
|
289
284
|
Jo as useProductVariants,
|
|
290
285
|
Zo as useProducts,
|
|
291
|
-
wt as useQueryIntents,
|
|
292
286
|
Po as useRecentProducts,
|
|
293
287
|
ho as useRecentShops,
|
|
294
288
|
tt as useRecommendedProducts,
|
|
295
289
|
Rt as useRecommendedShops,
|
|
296
|
-
|
|
290
|
+
yt as useRequestPermissions,
|
|
297
291
|
Ro as useSavedProducts,
|
|
298
292
|
Eo as useSavedProductsActions,
|
|
299
|
-
|
|
300
|
-
Lt as
|
|
301
|
-
Gt as useShare,
|
|
293
|
+
ut as useSecureStorage,
|
|
294
|
+
Lt as useShare,
|
|
302
295
|
ht as useShop,
|
|
303
296
|
dt as useShopNavigation
|
|
304
297
|
};
|
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,12 @@
|
|
|
1
|
+
import { useOnNavigateBack as t } from "../hooks/events/useOnNavigateBack.js";
|
|
2
|
+
import { useNavigateWithTransition as i } from "../hooks/navigation/useNavigateWithTransition.js";
|
|
3
|
+
function r() {
|
|
4
|
+
const a = i();
|
|
5
|
+
return t(() => {
|
|
6
|
+
a(-1);
|
|
7
|
+
}), null;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
r as NavigationManager
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=navigation-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-manager.js","sources":["../../src/internal/navigation-manager.tsx"],"sourcesContent":["import {useOnNavigateBack} from '../hooks/events/useOnNavigateBack'\nimport {useNavigateWithTransition} from '../hooks/navigation/useNavigateWithTransition'\n\nexport function NavigationManager() {\n const navigate = useNavigateWithTransition()\n\n // Handle native back button press\n useOnNavigateBack(() => {\n navigate(-1)\n })\n\n return null\n}\n"],"names":["NavigationManager","navigate","useNavigateWithTransition","useOnNavigateBack"],"mappings":";;AAGO,SAASA,IAAoB;AAClC,QAAMC,IAAWC,EAA0B;AAG3C,SAAAC,EAAkB,MAAM;AACtB,IAAAF,EAAS,EAAE;AAAA,EAAA,CACZ,GAEM;AACT;"}
|