@shopify/shop-minis-react 0.0.0-snapshot.20251219164319 → 0.0.0-snapshot.20251224113248
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 +8 -15
- package/dist/components/navigation/minis-router.js.map +1 -1
- package/dist/hooks/intents/useInvokeIntentAction.js +10 -0
- package/dist/hooks/intents/useInvokeIntentAction.js.map +1 -0
- package/dist/hooks/intents/useQueryIntents.js +10 -0
- package/dist/hooks/intents/useQueryIntents.js.map +1 -0
- package/dist/hooks/intents/useSelectProduct.js +21 -0
- package/dist/hooks/intents/useSelectProduct.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 +139 -132
- package/dist/index.js.map +1 -1
- package/dist/mocks.js +49 -15
- package/dist/mocks.js.map +1 -1
- package/dist/shop-minis-platform/src/actions/scopes.js +36 -0
- package/dist/shop-minis-platform/src/actions/scopes.js.map +1 -0
- package/package.json +2 -2
- package/src/components/navigation/minis-router.tsx +1 -9
- package/src/hooks/index.ts +3 -1
- package/src/hooks/intents/index.ts +38 -0
- package/src/hooks/intents/useInvokeIntentAction.ts +12 -0
- package/src/hooks/intents/useQueryIntents.ts +25 -0
- package/src/hooks/intents/useSelectProduct.ts +48 -0
- package/src/hooks/navigation/useNavigateWithTransition.test.ts +3 -17
- package/src/hooks/navigation/useNavigateWithTransition.ts +4 -9
- package/src/mocks.ts +35 -1
- package/dist/hooks/events/useOnNavigateBack.js +0 -14
- package/dist/hooks/events/useOnNavigateBack.js.map +0 -1
- package/dist/internal/navigation-manager.js +0 -28
- package/dist/internal/navigation-manager.js.map +0 -1
- package/src/hooks/events/useOnNavigateBack.ts +0 -16
- package/src/internal/navigation-manager.tsx +0 -41
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BrowserRouter as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
function x({
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { BrowserRouter as i } 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 { TransitionContainer as e } from "./transition-container.js";
|
|
4
|
+
function s({
|
|
6
5
|
children: o,
|
|
7
|
-
viewTransitions:
|
|
8
|
-
...
|
|
6
|
+
viewTransitions: n = !1,
|
|
7
|
+
...t
|
|
9
8
|
}) {
|
|
10
|
-
return
|
|
11
|
-
/* @__PURE__ */ r(e, {}),
|
|
12
|
-
/* @__PURE__ */ r(a, { children: o })
|
|
13
|
-
] }) : /* @__PURE__ */ t(n, { ...i, children: [
|
|
14
|
-
/* @__PURE__ */ r(e, {}),
|
|
15
|
-
o
|
|
16
|
-
] });
|
|
9
|
+
return n ? /* @__PURE__ */ r(i, { ...t, children: /* @__PURE__ */ r(e, { children: o }) }) : /* @__PURE__ */ r(i, { ...t, children: o });
|
|
17
10
|
}
|
|
18
11
|
export {
|
|
19
|
-
|
|
12
|
+
s as MinisRouter
|
|
20
13
|
};
|
|
21
14
|
//# 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 {
|
|
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}>{children}</BrowserRouter>\n}\n"],"names":["MinisRouter","children","viewTransitions","props","BrowserRouter","jsx","TransitionContainer"],"mappings":";;;AAQO,SAASA,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGC;AACL,GAAqB;AACnB,SAAID,sBAECE,GAAe,EAAA,GAAGD,GACjB,UAAC,gBAAAE,EAAAC,GAAA,EAAqB,UAAAL,EAAS,CAAA,GACjC,IAII,gBAAAI,EAAAD,GAAA,EAAe,GAAGD,GAAQ,UAAAF,EAAS,CAAA;AAC7C;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useHandleAction as o } from "../../internal/useHandleAction.js";
|
|
2
|
+
import { useShopActions as t } from "../../internal/useShopActions.js";
|
|
3
|
+
const r = () => {
|
|
4
|
+
const n = t();
|
|
5
|
+
return o(n.invokeIntent);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
r as useInvokeIntentAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useInvokeIntentAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInvokeIntentAction.js","sources":["../../../src/hooks/intents/useInvokeIntentAction.ts"],"sourcesContent":["import {useHandleAction} from '../../internal/useHandleAction'\nimport {useShopActions} from '../../internal/useShopActions'\n\n/**\n * Hook to invoke an intent\n *\n * Unified API for invoking intents.\n */\nexport const useInvokeIntentAction = () => {\n const actions = useShopActions()\n return useHandleAction(actions.invokeIntent)\n}\n"],"names":["useInvokeIntentAction","actions","useShopActions","useHandleAction"],"mappings":";;AAQO,MAAMA,IAAwB,MAAM;AACzC,QAAMC,IAAUC,EAAe;AACxB,SAAAC,EAAgBF,EAAQ,YAAY;AAC7C;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useHandleAction as n } from "../../internal/useHandleAction.js";
|
|
2
|
+
import { useShopActions as o } from "../../internal/useShopActions.js";
|
|
3
|
+
const s = () => {
|
|
4
|
+
const t = o();
|
|
5
|
+
return n(t.queryIntents);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
s as useQueryIntents
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useQueryIntents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueryIntents.js","sources":["../../../src/hooks/intents/useQueryIntents.ts"],"sourcesContent":["import {useHandleAction} from '../../internal/useHandleAction'\nimport {useShopActions} from '../../internal/useShopActions'\n\n/**\n * Hook to query available intents\n *\n * Returns intents that match the query criteria.\n * Works for both first-party Shop intents and third-party Mini intents.\n *\n * @example\n * const queryIntents = useQueryIntents()\n *\n * // Get all intents\n * const allIntents = await queryIntents()\n *\n * // Filter by category\n * const mediaIntents = await queryIntents({category: 'media'})\n *\n * // Search\n * const results = await queryIntents({search: 'product'})\n */\nexport const useQueryIntents = () => {\n const actions = useShopActions()\n return useHandleAction(actions.queryIntents)\n}\n"],"names":["useQueryIntents","actions","useShopActions","useHandleAction"],"mappings":";;AAqBO,MAAMA,IAAkB,MAAM;AACnC,QAAMC,IAAUC,EAAe;AACxB,SAAAC,EAAgBF,EAAQ,YAAY;AAC7C;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useCallback as r } from "react";
|
|
2
|
+
import { useInvokeIntentAction as n } from "./useInvokeIntentAction.js";
|
|
3
|
+
const c = () => {
|
|
4
|
+
const t = n();
|
|
5
|
+
return r(
|
|
6
|
+
async (o) => {
|
|
7
|
+
const e = await t({
|
|
8
|
+
provider: "shop",
|
|
9
|
+
intentType: "select:shopify/Product",
|
|
10
|
+
input: o
|
|
11
|
+
});
|
|
12
|
+
if (e.resultCode === "SUCCESS")
|
|
13
|
+
return e.output;
|
|
14
|
+
},
|
|
15
|
+
[t]
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
c as useSelectProduct
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useSelectProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectProduct.js","sources":["../../../src/hooks/intents/useSelectProduct.ts"],"sourcesContent":["import {useCallback} from 'react'\n\nimport {useInvokeIntentAction} from './useInvokeIntentAction'\n\n/**\n * Convenience hook for selecting products\n *\n * Wraps the unified invokeIntent action with product-specific defaults.\n *\n * @example\n * const selectProduct = useSelectProduct()\n *\n * const result = await selectProduct({\n * multiSelect: true,\n * maxSelections: 5\n * })\n *\n * if (result) {\n * console.log('Selected IDs:', result.ids)\n * }\n */\nexport const useSelectProduct = () => {\n const invokeIntent = useInvokeIntentAction()\n\n return useCallback(\n async (input: {\n multiSelect?: boolean\n maxSelections?: number\n title?: string\n subtitle?: string\n shopId?: string\n categories?: string[]\n }) => {\n const result = await invokeIntent({\n provider: 'shop',\n intentType: 'select:shopify/Product',\n input,\n })\n\n if (result.resultCode === 'SUCCESS') {\n return result.output as {type: 'product'; ids: string[]}\n }\n\n return undefined\n },\n [invokeIntent]\n )\n}\n"],"names":["useSelectProduct","invokeIntent","useInvokeIntentAction","useCallback","input","result"],"mappings":";;AAqBO,MAAMA,IAAmB,MAAM;AACpC,QAAMC,IAAeC,EAAsB;AAEpC,SAAAC;AAAA,IACL,OAAOC,MAOD;AACE,YAAAC,IAAS,MAAMJ,EAAa;AAAA,QAChC,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,OAAAG;AAAA,MAAA,CACD;AAEG,UAAAC,EAAO,eAAe;AACxB,eAAOA,EAAO;AAAA,IAIlB;AAAA,IACA,CAACJ,CAAY;AAAA,EACf;AACF;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useNavigate as
|
|
1
|
+
import { useNavigate as c, useLocation as u } 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 d() {
|
|
4
|
+
const e = c(), o = u();
|
|
5
5
|
return (t, n) => {
|
|
6
6
|
if (typeof t == "number") {
|
|
7
7
|
if (document.startViewTransition)
|
|
@@ -18,10 +18,10 @@ function f() {
|
|
|
18
18
|
return e(t);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const a = t === o.pathname
|
|
21
|
+
const a = t === o.pathname;
|
|
22
22
|
if (document.startViewTransition)
|
|
23
23
|
document.startViewTransition(() => {
|
|
24
|
-
|
|
24
|
+
e(t, {
|
|
25
25
|
replace: a,
|
|
26
26
|
...n
|
|
27
27
|
}), n?.preventScrollReset !== !0 && window.scrollTo(0, 0);
|
|
@@ -37,6 +37,6 @@ function f() {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
d 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
|
|
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 replace: isSameRoute,\n ...options,\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"],"mappings":";;AASO,SAASA,IAA8D;AAC5E,QAAMC,IAAWC,EAAY,GACvBC,IAAWC,EAAY;AAyDtB,SAvDoB,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;AAGpC,QAAI,SAAS;AAYA,MAXQ,SAAS,oBAAoB,MAAM;AACpD,QAAAF,EAASI,GAAI;AAAA,UACX,SAASI;AAAA,UACT,GAAGH;AAAA,QAAA,CACJ,GAEGA,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 p } from "./components/MinisContainer.js";
|
|
3
|
+
import { AddToCartButton as i } 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 l, 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 M, MerchantCardInfo as E, MerchantCardName as v, MerchantCardRating as w } 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 k } from "./components/commerce/quantity-selector.js";
|
|
11
|
+
import { Search as y, SearchInput as _, SearchProvider as G, SearchResultsList as O } 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 K } 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 nr } 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 ur } 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 vr, AlertDialogCancel as wr, AlertDialogContent as Br, AlertDialogDescription as Fr, AlertDialogFooter as Ur, AlertDialogHeader as Lr, AlertDialogOverlay as br, AlertDialogPortal as kr, AlertDialogTitle as Nr, AlertDialogTrigger as yr } from "./components/ui/alert-dialog.js";
|
|
30
|
+
import { Avatar as Gr, AvatarFallback as Or, 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 qr, CardContent as Kr, 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 ne } from "./components/ui/checkbox.js";
|
|
35
|
+
import { Dialog as me, DialogClose as se, DialogContent as ue, DialogDescription as le, 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 Me, DrawerTitle as Ee, DrawerTrigger as ve } from "./components/ui/drawer.js";
|
|
37
|
+
import { Input as Be } 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 Ne, RadioGroupItem as ye } from "./components/ui/radio-group.js";
|
|
41
|
+
import { ResizableHandle as Ge, ResizablePanel as Oe, 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 qe, SelectGroup as Ke, 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 po, SheetClose as no, SheetContent as io, SheetDescription as mo, SheetFooter as so, SheetHeader as uo, SheetTitle as lo, 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 wo } 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 ko } from "./hooks/user/useOrders.js";
|
|
57
|
+
import { useBuyerAttributes as yo } from "./hooks/user/useBuyerAttributes.js";
|
|
58
|
+
import { useGenerateUserToken as Go } 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 qo } 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 pt } from "./hooks/product/usePopularProducts.js";
|
|
69
|
+
import { useCuratedProducts as it } from "./hooks/product/useCuratedProducts.js";
|
|
70
70
|
import { useAsyncStorage as st } from "./hooks/storage/useAsyncStorage.js";
|
|
71
|
-
import { useSecureStorage as
|
|
71
|
+
import { useSecureStorage as lt } 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,56 +77,60 @@ 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 {
|
|
80
|
+
import { useQueryIntents as wt } from "./hooks/intents/useQueryIntents.js";
|
|
81
|
+
import { useInvokeIntentAction as Ft } from "./hooks/intents/useInvokeIntentAction.js";
|
|
82
|
+
import { useSelectProduct as Lt } from "./hooks/intents/useSelectProduct.js";
|
|
83
|
+
import { useErrorToast as kt } from "./hooks/util/useErrorToast.js";
|
|
84
|
+
import { useErrorScreen as yt } from "./hooks/util/useErrorScreen.js";
|
|
85
|
+
import { useShare as Gt } from "./hooks/util/useShare.js";
|
|
86
|
+
import { useImagePicker as Ht } from "./hooks/util/useImagePicker.js";
|
|
87
|
+
import { useKeyboardAvoidingView as zt } from "./hooks/util/useKeyboardAvoidingView.js";
|
|
88
|
+
import { useRequestPermissions as Yt } from "./hooks/util/useRequestPermissions.js";
|
|
89
|
+
import { useOnMiniFocus as qt } from "./hooks/events/useOnMiniFocus.js";
|
|
90
|
+
import { useOnMiniBlur as Zt } from "./hooks/events/useOnMiniBlur.js";
|
|
91
|
+
import { useOnMiniClose as Jt } from "./hooks/events/useOnMiniClose.js";
|
|
92
|
+
import { useOnAppStateChange as $t } from "./hooks/events/useOnAppStateChange.js";
|
|
93
|
+
import { MiniEntityNotFoundError as ea, MiniError as oa, MiniNetworkError as ta, formatError as aa } from "./utils/errors.js";
|
|
94
|
+
import { extractBrandTheme as na, formatReviewCount as ia, getFeaturedImages as ma, normalizeRating as sa } from "./utils/merchant-card.js";
|
|
95
|
+
import { parseUrl as la } from "./utils/parseUrl.js";
|
|
96
|
+
import { dataURLToBlob as xa, fileToDataUri as ca, getResizedImageUrl as da, getThumbhashBlobURL as Ca, getThumbhashDataURL as ga } from "./utils/image.js";
|
|
97
|
+
import { formatMoney as Aa } from "./utils/formatMoney.js";
|
|
98
|
+
import { UserState as Pa, UserTokenGenerateUserErrorCode as Ta } from "./shop-minis-platform/src/types/user.js";
|
|
99
|
+
import { ContentCreateUserErrorCode as Ia, MinisContentStatus as Ra } from "./shop-minis-platform/src/types/content.js";
|
|
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";
|
|
100
103
|
export {
|
|
101
104
|
Sr as Accordion,
|
|
102
105
|
Ar as AccordionContent,
|
|
103
106
|
Dr as AccordionItem,
|
|
104
107
|
Pr as AccordionTrigger,
|
|
105
|
-
|
|
108
|
+
Ua as ActionToScopesMapping,
|
|
109
|
+
i as AddToCartButton,
|
|
106
110
|
hr as Alert,
|
|
107
111
|
Ir as AlertDescription,
|
|
108
112
|
Er as AlertDialog,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
vr as AlertDialogAction,
|
|
114
|
+
nr as AlertDialogAtom,
|
|
115
|
+
wr as AlertDialogCancel,
|
|
116
|
+
Br as AlertDialogContent,
|
|
113
117
|
Fr as AlertDialogDescription,
|
|
114
118
|
Ur as AlertDialogFooter,
|
|
115
119
|
Lr as AlertDialogHeader,
|
|
116
120
|
br as AlertDialogOverlay,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
kr as AlertDialogPortal,
|
|
122
|
+
Nr as AlertDialogTitle,
|
|
123
|
+
yr as AlertDialogTrigger,
|
|
120
124
|
Rr as AlertTitle,
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
Gr as Avatar,
|
|
126
|
+
Or as AvatarFallback,
|
|
123
127
|
Hr as AvatarImage,
|
|
124
128
|
zr as Badge,
|
|
125
129
|
j as Button,
|
|
126
130
|
s as BuyNowButton,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
Qr as Card,
|
|
132
|
+
qr as CardAction,
|
|
133
|
+
Kr as CardContent,
|
|
130
134
|
Zr as CardDescription,
|
|
131
135
|
jr as CardFooter,
|
|
132
136
|
Jr as CardHeader,
|
|
@@ -136,16 +140,16 @@ export {
|
|
|
136
140
|
oe as CarouselItem,
|
|
137
141
|
te as CarouselNext,
|
|
138
142
|
ae as CarouselPrevious,
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
ne as Checkbox,
|
|
144
|
+
Ia as ContentCreateUserErrorCode,
|
|
141
145
|
cr as ContentWrapper,
|
|
142
|
-
|
|
146
|
+
wa as DATA_FETCHING_DEFAULT_FETCH_POLICY,
|
|
143
147
|
Ba as DATA_FETCHING_DEFAULT_PAGE_SIZE,
|
|
144
148
|
o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
|
|
145
149
|
me as Dialog,
|
|
146
150
|
se as DialogClose,
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
ue as DialogContent,
|
|
152
|
+
le as DialogDescription,
|
|
149
153
|
fe as DialogFooter,
|
|
150
154
|
xe as DialogHeader,
|
|
151
155
|
ce as DialogOverlay,
|
|
@@ -159,32 +163,32 @@ export {
|
|
|
159
163
|
he as DrawerFooter,
|
|
160
164
|
Ie as DrawerHeader,
|
|
161
165
|
Re as DrawerOverlay,
|
|
162
|
-
|
|
166
|
+
Me as DrawerPortal,
|
|
163
167
|
Ee as DrawerTitle,
|
|
164
|
-
|
|
168
|
+
ve as DrawerTrigger,
|
|
165
169
|
V as FavoriteButton,
|
|
166
170
|
X as IconButton,
|
|
167
171
|
rr as Image,
|
|
168
172
|
W as ImageContentWrapper,
|
|
169
|
-
|
|
173
|
+
Be as Input,
|
|
170
174
|
Ue as Label,
|
|
171
175
|
mr as List,
|
|
172
176
|
ar as LongPressDetector,
|
|
173
177
|
I as MerchantCard,
|
|
174
178
|
R as MerchantCardContainer,
|
|
175
|
-
|
|
179
|
+
M as MerchantCardHeader,
|
|
176
180
|
E as MerchantCardInfo,
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
v as MerchantCardName,
|
|
182
|
+
w as MerchantCardRating,
|
|
179
183
|
L as MerchantCardSkeleton,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
ea as MiniEntityNotFoundError,
|
|
185
|
+
oa as MiniError,
|
|
186
|
+
ta as MiniNetworkError,
|
|
187
|
+
p as MinisContainer,
|
|
188
|
+
Ra as MinisContentStatus,
|
|
189
|
+
Q as MinisRouter,
|
|
186
190
|
t as NAVIGATION_TYPES,
|
|
187
|
-
|
|
191
|
+
l as ProductCard,
|
|
188
192
|
f as ProductCardBadge,
|
|
189
193
|
x as ProductCardContainer,
|
|
190
194
|
c as ProductCardFavoriteButton,
|
|
@@ -198,21 +202,22 @@ export {
|
|
|
198
202
|
T as ProductLink,
|
|
199
203
|
Cr as ProductVariantPrice,
|
|
200
204
|
be as Progress,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
k as QuantitySelector,
|
|
206
|
+
Ne as RadioGroup,
|
|
207
|
+
ye as RadioGroupItem,
|
|
208
|
+
Ge as ResizableHandle,
|
|
209
|
+
Oe as ResizablePanel,
|
|
206
210
|
He as ResizablePanelGroup,
|
|
211
|
+
La as Scope,
|
|
207
212
|
ze as ScrollArea,
|
|
208
213
|
We as ScrollBar,
|
|
209
|
-
|
|
214
|
+
y as Search,
|
|
210
215
|
_ as SearchInput,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
+
G as SearchProvider,
|
|
217
|
+
O as SearchResultsList,
|
|
218
|
+
Qe as Select,
|
|
219
|
+
qe as SelectContent,
|
|
220
|
+
Ke as SelectGroup,
|
|
216
221
|
Ze as SelectItem,
|
|
217
222
|
je as SelectLabel,
|
|
218
223
|
Je as SelectScrollDownButton,
|
|
@@ -221,61 +226,61 @@ export {
|
|
|
221
226
|
ro as SelectTrigger,
|
|
222
227
|
eo as SelectValue,
|
|
223
228
|
to as Separator,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
po as Sheet,
|
|
230
|
+
no as SheetClose,
|
|
231
|
+
io as SheetContent,
|
|
227
232
|
mo as SheetDescription,
|
|
228
233
|
so as SheetFooter,
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
uo as SheetHeader,
|
|
235
|
+
lo as SheetTitle,
|
|
231
236
|
fo as SheetTrigger,
|
|
232
237
|
Ao as Skeleton,
|
|
233
|
-
|
|
238
|
+
Ea as Social,
|
|
234
239
|
fr as TextInput,
|
|
235
240
|
co as Toaster,
|
|
236
241
|
or as Touchable,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
K as TransitionLink,
|
|
243
|
+
Pa as UserState,
|
|
244
|
+
Ta as UserTokenGenerateUserErrorCode,
|
|
245
|
+
ur as VideoPlayer,
|
|
241
246
|
Wr as badgeVariants,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
xa as dataURLToBlob,
|
|
248
|
+
na as extractBrandTheme,
|
|
249
|
+
ca as fileToDataUri,
|
|
250
|
+
aa as formatError,
|
|
251
|
+
Aa as formatMoney,
|
|
252
|
+
ia as formatReviewCount,
|
|
253
|
+
ma as getFeaturedImages,
|
|
254
|
+
da as getResizedImageUrl,
|
|
255
|
+
Ca as getThumbhashBlobURL,
|
|
256
|
+
ga as getThumbhashDataURL,
|
|
257
|
+
sa as normalizeRating,
|
|
258
|
+
la as parseUrl,
|
|
254
259
|
go as toast,
|
|
255
260
|
st as useAsyncStorage,
|
|
256
|
-
|
|
261
|
+
yo as useBuyerAttributes,
|
|
257
262
|
gt as useCloseMini,
|
|
258
263
|
Et as useCreateImageContent,
|
|
259
|
-
|
|
264
|
+
it as useCuratedProducts,
|
|
260
265
|
Lo as useCurrentUser,
|
|
261
266
|
At as useDeeplink,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
267
|
+
yt as useErrorScreen,
|
|
268
|
+
kt as useErrorToast,
|
|
269
|
+
wo as useFollowedShops,
|
|
265
270
|
Fo as useFollowedShopsActions,
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
Go as useGenerateUserToken,
|
|
272
|
+
Ht as useImagePicker,
|
|
268
273
|
xt as useImageUpload,
|
|
269
|
-
|
|
274
|
+
Ft as useInvokeIntentAction,
|
|
275
|
+
zt as useKeyboardAvoidingView,
|
|
270
276
|
Pt as useNavigateWithTransition,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
Ko as useProduct,
|
|
277
|
+
$t as useOnAppStateChange,
|
|
278
|
+
Zt as useOnMiniBlur,
|
|
279
|
+
Jt as useOnMiniClose,
|
|
280
|
+
qt as useOnMiniFocus,
|
|
281
|
+
ko as useOrders,
|
|
282
|
+
pt as usePopularProducts,
|
|
283
|
+
qo as useProduct,
|
|
279
284
|
Yo as useProductList,
|
|
280
285
|
Ho as useProductListActions,
|
|
281
286
|
zo as useProductLists,
|
|
@@ -283,15 +288,17 @@ export {
|
|
|
283
288
|
et as useProductSearch,
|
|
284
289
|
Jo as useProductVariants,
|
|
285
290
|
Zo as useProducts,
|
|
291
|
+
wt as useQueryIntents,
|
|
286
292
|
Po as useRecentProducts,
|
|
287
293
|
ho as useRecentShops,
|
|
288
294
|
tt as useRecommendedProducts,
|
|
289
295
|
Rt as useRecommendedShops,
|
|
290
|
-
|
|
296
|
+
Yt as useRequestPermissions,
|
|
291
297
|
Ro as useSavedProducts,
|
|
292
298
|
Eo as useSavedProductsActions,
|
|
293
|
-
|
|
294
|
-
Lt as
|
|
299
|
+
lt as useSecureStorage,
|
|
300
|
+
Lt as useSelectProduct,
|
|
301
|
+
Gt as useShare,
|
|
295
302
|
ht as useShop,
|
|
296
303
|
dt as useShopNavigation
|
|
297
304
|
};
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|