@shopify/shop-minis-react 0.0.1 → 0.0.2
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/README.md +110 -90
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/components/ui/alert-dialog.js +141 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/button.js +50 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.js +91 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/sonner.js +23 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/hooks/navigation/useCloseMini.js +12 -0
- package/dist/hooks/navigation/useCloseMini.js.map +1 -0
- package/dist/hooks/navigation/useShopNavigation.js +20 -0
- package/dist/hooks/navigation/useShopNavigation.js.map +1 -0
- package/dist/hooks/product/usePopularProducts.js +20 -0
- package/dist/hooks/product/usePopularProducts.js.map +1 -0
- package/dist/hooks/product/useProductList.js +29 -0
- package/dist/hooks/product/useProductList.js.map +1 -0
- package/dist/hooks/product/useProductListActions.js +22 -0
- package/dist/hooks/product/useProductListActions.js.map +1 -0
- package/dist/hooks/product/useProductLists.js +20 -0
- package/dist/hooks/product/useProductLists.js.map +1 -0
- package/dist/hooks/product/useRecommendedProducts.js +20 -0
- package/dist/hooks/product/useRecommendedProducts.js.map +1 -0
- package/dist/hooks/shop/useRecommendedShops.js +21 -0
- package/dist/hooks/shop/useRecommendedShops.js.map +1 -0
- package/dist/hooks/shop/useShopCartActions.js +13 -0
- package/dist/hooks/shop/useShopCartActions.js.map +1 -0
- package/dist/hooks/storage/useAsyncStorage.js +22 -0
- package/dist/hooks/storage/useAsyncStorage.js.map +1 -0
- package/dist/hooks/storage/useImageUpload.js +62 -0
- package/dist/hooks/storage/useImageUpload.js.map +1 -0
- package/dist/hooks/storage/useSecureStorage.js +14 -0
- package/dist/hooks/storage/useSecureStorage.js.map +1 -0
- package/dist/hooks/user/useBuyerAttributes.js +20 -0
- package/dist/hooks/user/useBuyerAttributes.js.map +1 -0
- package/dist/hooks/user/useCurrentUser.js +20 -0
- package/dist/hooks/user/useCurrentUser.js.map +1 -0
- package/dist/hooks/user/useFollowedShopsActions.js +13 -0
- package/dist/hooks/user/useFollowedShopsActions.js.map +1 -0
- package/dist/hooks/user/useOrders.js +20 -0
- package/dist/hooks/user/useOrders.js.map +1 -0
- package/dist/hooks/user/useSavedProductsActions.js +13 -0
- package/dist/hooks/user/useSavedProductsActions.js.map +1 -0
- package/dist/hooks/util/useErrorScreen.js +9 -0
- package/dist/hooks/util/useErrorScreen.js.map +1 -0
- package/dist/hooks/util/useErrorToast.js +9 -0
- package/dist/hooks/util/useErrorToast.js.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/useHandleAction.js +13 -0
- package/dist/internal/useHandleAction.js.map +1 -0
- package/dist/internal/useShopActions.js +7 -0
- package/dist/internal/useShopActions.js.map +1 -0
- package/dist/internal/useShopActionsDataFetching.js +79 -0
- package/dist/internal/useShopActionsDataFetching.js.map +1 -0
- package/dist/internal/useShopActionsPaginatedDataFetching.js +96 -0
- package/dist/internal/useShopActionsPaginatedDataFetching.js.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey/node_modules/@radix-ui/react-alert-dialog/dist/index.js +127 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js +69 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa/node_modules/@radix-ui/react-dialog/dist/index.js +259 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu/node_modules/@radix-ui/react-presence/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js +59 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +53 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +53 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +36 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/.pnpm/next-themes@0.4.6_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next-themes/dist/index.js +34 -0
- package/dist/node_modules/.pnpm/next-themes@0.4.6_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next-themes/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +44 -0
- package/dist/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +113 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +69 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.6_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js +25 -0
- package/dist/node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js.map +1 -0
- package/dist/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 +743 -0
- package/dist/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.map +1 -0
- package/dist/node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2265 -0
- package/dist/node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js +133 -0
- package/dist/node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js.map +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.6_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.1.6_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.1.6_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.1.6_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.1.6_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/types/minisSDK.generated.d.js +18 -0
- package/dist/types/minisSDK.generated.d.js.map +1 -0
- package/dist/utils/errors.js +39 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/parseUrl.js +8 -0
- package/dist/utils/parseUrl.js.map +1 -0
- package/package.json +29 -14
- package/src/components/index.ts +4 -7
- package/src/components/ui/alert-dialog.tsx +151 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/dev.tsx +116 -38
- package/src/hooks/index.ts +31 -5
- package/src/hooks/navigation/useCloseMini.doc.ts +32 -0
- package/src/hooks/navigation/useCloseMini.example.tsx +7 -0
- package/src/hooks/navigation/useCloseMini.ts +17 -0
- package/src/hooks/navigation/useShopNavigation.doc.ts +32 -0
- package/src/hooks/navigation/useShopNavigation.example.tsx +29 -0
- package/src/hooks/navigation/useShopNavigation.ts +41 -0
- package/src/hooks/product/usePopularProducts.ts +37 -0
- package/src/hooks/product/useProductList.doc.ts +32 -0
- package/src/hooks/product/useProductList.example.tsx +9 -0
- package/src/hooks/product/useProductList.ts +56 -0
- package/src/hooks/product/useProductListActions.doc.ts +32 -0
- package/src/hooks/product/useProductListActions.example.tsx +57 -0
- package/src/hooks/product/useProductListActions.ts +51 -0
- package/src/hooks/product/useProductLists.doc.ts +32 -0
- package/src/hooks/product/useProductLists.example.tsx +9 -0
- package/src/hooks/product/useProductLists.ts +39 -0
- package/src/hooks/product/useRecommendedProducts.doc.ts +32 -0
- package/src/hooks/product/useRecommendedProducts.example.tsx +7 -0
- package/src/hooks/product/useRecommendedProducts.ts +37 -0
- package/src/hooks/shop/useRecommendedShops.doc.ts +32 -0
- package/src/hooks/shop/useRecommendedShops.example.tsx +7 -0
- package/src/hooks/shop/useRecommendedShops.ts +43 -0
- package/src/hooks/shop/useShopCartActions.doc.ts +32 -0
- package/src/hooks/shop/useShopCartActions.example.tsx +28 -0
- package/src/hooks/shop/useShopCartActions.ts +23 -0
- package/src/hooks/storage/useAsyncStorage.doc.ts +32 -0
- package/src/hooks/storage/useAsyncStorage.example.tsx +30 -0
- package/src/hooks/storage/useAsyncStorage.ts +48 -0
- package/src/hooks/storage/useImageUpload.doc.ts +32 -0
- package/src/hooks/storage/useImageUpload.example.tsx +20 -0
- package/src/hooks/storage/useImageUpload.ts +135 -0
- package/src/hooks/storage/useSecureStorage.doc.ts +32 -0
- package/src/hooks/storage/useSecureStorage.example.tsx +23 -0
- package/src/hooks/storage/useSecureStorage.ts +28 -0
- package/src/hooks/user/useBuyerAttributes.doc.ts +32 -0
- package/src/hooks/user/useBuyerAttributes.example.tsx +14 -0
- package/src/hooks/user/useBuyerAttributes.ts +34 -0
- package/src/hooks/user/useCurrentUser.doc.ts +31 -0
- package/src/hooks/user/useCurrentUser.example.tsx +7 -0
- package/src/hooks/user/useCurrentUser.ts +37 -0
- package/src/hooks/user/useFollowedShopsActions.doc.ts +32 -0
- package/src/hooks/user/useFollowedShopsActions.example.tsx +18 -0
- package/src/hooks/user/useFollowedShopsActions.ts +23 -0
- package/src/hooks/user/useOrders.doc.ts +32 -0
- package/src/hooks/user/useOrders.example.tsx +7 -0
- package/src/hooks/user/useOrders.ts +32 -0
- package/src/hooks/user/useSavedProductsActions.doc.ts +32 -0
- package/src/hooks/user/useSavedProductsActions.example.tsx +30 -0
- package/src/hooks/user/useSavedProductsActions.ts +23 -0
- package/src/hooks/util/useErrorScreen.doc.ts +32 -0
- package/src/hooks/util/useErrorScreen.example.tsx +16 -0
- package/src/hooks/util/useErrorScreen.ts +15 -0
- package/src/hooks/util/useErrorToast.doc.ts +32 -0
- package/src/hooks/util/useErrorToast.example.tsx +15 -0
- package/src/hooks/util/useErrorToast.ts +15 -0
- package/src/index.css +120 -2
- package/src/internal/useHandleAction.ts +24 -0
- package/src/internal/useShopActions.ts +5 -0
- package/src/internal/useShopActionsDataFetching.ts +153 -0
- package/src/internal/useShopActionsPaginatedDataFetching.ts +193 -0
- package/src/lib/utils.ts +9 -0
- package/src/types/index.ts +2 -0
- package/src/types/minisSDK.generated.d.ts +2 -74
- package/src/utils/errors.ts +86 -0
- package/src/utils/index.ts +2 -11
- package/src/utils/parseUrl.ts +5 -0
- package/tailwind.config.js +3 -0
- package/src/components/HelloWorld/HelloWorld.tsx +0 -43
- package/src/components/HelloWorld/index.ts +0 -2
- package/src/tailwind-theme.css +0 -39
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { stylesheetSingleton as r } from "./singleton.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var t = r();
|
|
5
|
+
return function(e, n) {
|
|
6
|
+
o.useEffect(function() {
|
|
7
|
+
return t.add(e), function() {
|
|
8
|
+
t.remove();
|
|
9
|
+
};
|
|
10
|
+
}, [e && n]);
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as styleHookSingleton
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.js","sources":["../../../../../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js"],"sourcesContent":["import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n"],"names":["styleHookSingleton","sheet","stylesheetSingleton","styles","isDynamic","React"],"mappings":";;AAWU,IAACA,IAAqB,WAAY;AACxC,MAAIC,IAAQC,EAAqB;AACjC,SAAO,SAAUC,GAAQC,GAAW;AAChC,IAAAC,EAAM,UAAU,WAAY;AACxB,aAAAJ,EAAM,IAAIE,CAAM,GACT,WAAY;AACf,QAAAF,EAAM,OAAQ;AAAA,MACjB;AAAA,IACb,GAAW,CAACE,KAAUC,CAAS,CAAC;AAAA,EAC3B;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getNonce as o } from "../../../../../get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js";
|
|
2
|
+
function r() {
|
|
3
|
+
if (!document)
|
|
4
|
+
return null;
|
|
5
|
+
var t = document.createElement("style");
|
|
6
|
+
t.type = "text/css";
|
|
7
|
+
var e = o();
|
|
8
|
+
return e && t.setAttribute("nonce", e), t;
|
|
9
|
+
}
|
|
10
|
+
function l(t, e) {
|
|
11
|
+
t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
|
|
12
|
+
}
|
|
13
|
+
function a(t) {
|
|
14
|
+
var e = document.head || document.getElementsByTagName("head")[0];
|
|
15
|
+
e.appendChild(t);
|
|
16
|
+
}
|
|
17
|
+
var c = function() {
|
|
18
|
+
var t = 0, e = null;
|
|
19
|
+
return {
|
|
20
|
+
add: function(n) {
|
|
21
|
+
t == 0 && (e = r()) && (l(e, n), a(e)), t++;
|
|
22
|
+
},
|
|
23
|
+
remove: function() {
|
|
24
|
+
t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
c as stylesheetSingleton
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=singleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleton.js","sources":["../../../../../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.6_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js"],"sourcesContent":["import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n"],"names":["makeStyleTag","tag","nonce","getNonce","injectStyles","css","insertStyleTag","head","stylesheetSingleton","counter","stylesheet","style"],"mappings":";AACA,SAASA,IAAe;AACpB,MAAI,CAAC;AACD,WAAO;AACX,MAAIC,IAAM,SAAS,cAAc,OAAO;AACxC,EAAAA,EAAI,OAAO;AACX,MAAIC,IAAQC,EAAU;AACtB,SAAID,KACAD,EAAI,aAAa,SAASC,CAAK,GAE5BD;AACX;AACA,SAASG,EAAaH,GAAKI,GAAK;AAE5B,EAAIJ,EAAI,aAEJA,EAAI,WAAW,UAAUI,IAGzBJ,EAAI,YAAY,SAAS,eAAeI,CAAG,CAAC;AAEpD;AACA,SAASC,EAAeL,GAAK;AACzB,MAAIM,IAAO,SAAS,QAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC;AACnE,EAAAA,EAAK,YAAYN,CAAG;AACxB;AACU,IAACO,IAAsB,WAAY;AACzC,MAAIC,IAAU,GACVC,IAAa;AACjB,SAAO;AAAA,IACH,KAAK,SAAUC,GAAO;AAClB,MAAIF,KAAW,MACNC,IAAaV,SACdI,EAAaM,GAAYC,CAAK,GAC9BL,EAAeI,CAAU,IAGjCD;AAAA,IACH;AAAA,IACD,QAAQ,WAAY;AAChB,MAAAA,KACI,CAACA,KAAWC,MACZA,EAAW,cAAcA,EAAW,WAAW,YAAYA,CAAU,GACrEA,IAAa;AAAA,IAEpB;AAAA,EACJ;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var s, u;
|
|
2
|
+
function a() {
|
|
3
|
+
return u || (u = 1, s = function(e, r) {
|
|
4
|
+
if (r = r.split(":")[0], e = +e, !e) return !1;
|
|
5
|
+
switch (r) {
|
|
6
|
+
case "http":
|
|
7
|
+
case "ws":
|
|
8
|
+
return e !== 80;
|
|
9
|
+
case "https":
|
|
10
|
+
case "wss":
|
|
11
|
+
return e !== 443;
|
|
12
|
+
case "ftp":
|
|
13
|
+
return e !== 21;
|
|
14
|
+
case "gopher":
|
|
15
|
+
return e !== 70;
|
|
16
|
+
case "file":
|
|
17
|
+
return !1;
|
|
18
|
+
}
|
|
19
|
+
return e !== 0;
|
|
20
|
+
}), s;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
a as __require
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js"],"sourcesContent":["'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n"],"names":["requiresPort","port","protocol"],"mappings":";;sBAWAA,IAAiB,SAAkBC,GAAMC,GAAU;AAIjD,QAHAA,IAAWA,EAAS,MAAM,GAAG,EAAE,CAAC,GAChCD,IAAO,CAACA,GAEJ,CAACA,EAAM,QAAO;AAElB,YAAQC,GAAQ;AAAA,MACd,KAAK;AAAA,MACL,KAAK;AACL,eAAOD,MAAS;AAAA,MAEhB,KAAK;AAAA,MACL,KAAK;AACL,eAAOA,MAAS;AAAA,MAEhB,KAAK;AACL,eAAOA,MAAS;AAAA,MAEhB,KAAK;AACL,eAAOA,MAAS;AAAA,MAEhB,KAAK;AACL,eAAO;AAAA,IACX;AAEE,WAAOA,MAAS;AAAA,EACjB;;","x_google_ignoreList":[0]}
|