@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,79 @@
|
|
|
1
|
+
import { useState as b, useCallback as u, useMemo as v, useEffect as M } from "react";
|
|
2
|
+
import { MiniError as P, formatError as V } from "../utils/errors.js";
|
|
3
|
+
const A = (d, c, f) => {
|
|
4
|
+
const [o, n] = b({
|
|
5
|
+
data: null,
|
|
6
|
+
loading: !0,
|
|
7
|
+
error: null
|
|
8
|
+
}), h = f?.skip === !0, { validator: g, hook: t } = f, w = u(
|
|
9
|
+
(l) => {
|
|
10
|
+
try {
|
|
11
|
+
return g?.(l), null;
|
|
12
|
+
} catch (s) {
|
|
13
|
+
return s ?? new P({
|
|
14
|
+
hook: t,
|
|
15
|
+
message: "Validation failed"
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
[g, t]
|
|
20
|
+
), y = v(() => c, [JSON.stringify(c)]), a = u(
|
|
21
|
+
async (l, {
|
|
22
|
+
setLoading: s = !0,
|
|
23
|
+
setError: p = !0,
|
|
24
|
+
resetOnError: m = !0,
|
|
25
|
+
throwOnError: O = !0
|
|
26
|
+
} = {}) => {
|
|
27
|
+
let E = null, i = null;
|
|
28
|
+
n((r) => ({
|
|
29
|
+
...r,
|
|
30
|
+
loading: s ? !0 : r.loading
|
|
31
|
+
}));
|
|
32
|
+
try {
|
|
33
|
+
const r = await d({ ...y, ...l });
|
|
34
|
+
if (r.ok)
|
|
35
|
+
i = w(r.data.data), n((S) => ({
|
|
36
|
+
...S,
|
|
37
|
+
data: r.data.data,
|
|
38
|
+
loading: !1,
|
|
39
|
+
error: i ?? null
|
|
40
|
+
}));
|
|
41
|
+
else
|
|
42
|
+
throw r.error;
|
|
43
|
+
} catch (r) {
|
|
44
|
+
E = V({ hook: t }, r);
|
|
45
|
+
}
|
|
46
|
+
const e = i || E;
|
|
47
|
+
if (e && (p || m) && n((r) => ({
|
|
48
|
+
data: m ? null : r.data,
|
|
49
|
+
loading: !1,
|
|
50
|
+
error: e
|
|
51
|
+
})), e && O)
|
|
52
|
+
throw e;
|
|
53
|
+
},
|
|
54
|
+
[d, y, t, w]
|
|
55
|
+
), k = u(async () => {
|
|
56
|
+
await a({ fetchPolicy: "network-only" }, {
|
|
57
|
+
setLoading: !1,
|
|
58
|
+
resetOnError: !1,
|
|
59
|
+
throwOnError: !0
|
|
60
|
+
});
|
|
61
|
+
}, [a]);
|
|
62
|
+
return M(() => {
|
|
63
|
+
h || a(
|
|
64
|
+
{},
|
|
65
|
+
{
|
|
66
|
+
throwOnError: !1
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}, [a, h]), {
|
|
70
|
+
data: o.data,
|
|
71
|
+
loading: o.loading,
|
|
72
|
+
error: o.error,
|
|
73
|
+
refetch: k
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
A as useShopActionsDataFetching
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=useShopActionsDataFetching.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShopActionsDataFetching.js","sources":["../../src/internal/useShopActionsDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {\n DataHookFetchPolicy,\n DataHookReturnsBase,\n ShopActionResult,\n} from '../types'\nimport {formatError, MiniError} from '../utils/errors'\n\nexport interface ShopActionsDataFetchingResult<R> extends DataHookReturnsBase {\n data: R | null\n}\n\nexport const useShopActionsDataFetching = <\n S = unknown,\n P extends {fetchPolicy?: DataHookFetchPolicy} = {\n fetchPolicy?: DataHookFetchPolicy\n },\n>(\n action: (params: P) => Promise<ShopActionResult<{data: S}>>,\n params: P,\n options: {\n skip?: boolean\n hook?: string\n validator?: (data: S) => void\n }\n): ShopActionsDataFetchingResult<S> => {\n const [state, setState] = useState<{\n data: S | null\n loading: boolean\n error: Error | null\n }>({\n data: null,\n loading: true,\n error: null,\n })\n\n const skip = options?.skip === true\n const {validator, hook} = options\n const runValidator = useCallback(\n (dataToValidate: S) => {\n try {\n validator?.(dataToValidate)\n return null\n } catch (err) {\n return (\n err ??\n new MiniError({\n hook,\n message: 'Validation failed',\n })\n )\n }\n },\n [validator, hook]\n )\n\n // Params object is recreated on every render, so we need to memoize it.\n // We don't know what's inside the params object, but we can stringify it.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableParams = useMemo(() => params, [JSON.stringify(params)])\n\n // There's a lot of complexity here because each type of fetch has different side effects if we are trying to\n // stay close to how Apollo client works. eg:\n // - Initial fetch: set loading, set error, set data, reset on error (don't throw)\n // - change params fetch: set loading, set error, set data, reset on error (don't throw)\n // - refetch fetch: don't set loading, set error, update data, leave data as is was on error (also throw)\n // - fetchMore fetch: don't set loading, don't set error, update data, leave data as is was on error (also throw)\n const fetch = useCallback(\n async (\n extraParams?: Partial<P>,\n {\n setLoading = true,\n setError = true,\n resetOnError = true,\n throwOnError = true,\n }: {\n setLoading?: boolean\n setError?: boolean\n resetOnError?: boolean\n throwOnError?: boolean\n } = {}\n ) => {\n let queryError: Error | null = null\n let validationError: Error | null = null\n\n setState(curState => ({\n ...curState,\n loading: setLoading ? true : curState.loading,\n }))\n\n try {\n const result = await action({...stableParams, ...extraParams})\n\n if (result.ok) {\n validationError = runValidator(result.data.data)\n\n setState(curState => ({\n ...curState,\n data: result.data.data,\n loading: false,\n error: validationError ?? null,\n }))\n } else {\n throw result.error\n }\n } catch (err) {\n queryError = formatError({hook}, err)\n }\n\n const error = validationError || queryError\n\n if (error && (setError || resetOnError)) {\n setState(curState => ({\n data: resetOnError ? null : curState.data,\n loading: false,\n error,\n }))\n }\n\n if (error && throwOnError) {\n throw error\n }\n },\n [action, stableParams, hook, runValidator]\n )\n\n const refetch = useCallback(async () => {\n await fetch({fetchPolicy: 'network-only'} as Partial<P>, {\n setLoading: false,\n resetOnError: false,\n throwOnError: true,\n })\n }, [fetch])\n\n useEffect(() => {\n if (skip) return\n\n fetch(\n {},\n {\n throwOnError: false,\n }\n )\n }, [fetch, skip])\n\n return {\n data: state.data,\n loading: state.loading,\n error: state.error,\n refetch,\n }\n}\n"],"names":["useShopActionsDataFetching","action","params","options","state","setState","useState","skip","validator","hook","runValidator","useCallback","dataToValidate","err","MiniError","stableParams","useMemo","fetch","extraParams","setLoading","setError","resetOnError","throwOnError","queryError","validationError","curState","result","formatError","error","refetch","useEffect"],"mappings":";;AAaO,MAAMA,IAA6B,CAMxCC,GACAC,GACAC,MAKqC;AACrC,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAIvB;AAAA,IACD,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,CACR,GAEKC,IAAOJ,GAAS,SAAS,IACzB,EAAC,WAAAK,GAAW,MAAAC,EAAA,IAAQN,GACpBO,IAAeC;AAAA,IACnB,CAACC,MAAsB;AACjB,UAAA;AACF,eAAAJ,IAAYI,CAAc,GACnB;AAAA,eACAC,GAAK;AAEV,eAAAA,KACA,IAAIC,EA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AAa,kBAA+B;AAAA,MACvD,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,cAAc;AAAA,IAAA,CACf;AAAA,EAAA,GACA,CAACA,CAAK,CAAC;AAEV,SAAAa,EAAU,MAAM;AACd,IAAIvB,KAEJU;AAAA,MACE,CAAC;AAAA,MACD;AAAA,QACE,cAAc;AAAA,MAAA;AAAA,IAElB;AAAA,EAAA,GACC,CAACA,GAAOV,CAAI,CAAC,GAET;AAAA,IACL,MAAMH,EAAM;AAAA,IACZ,SAASA,EAAM;AAAA,IACf,OAAOA,EAAM;AAAA,IACb,SAAAyB;AAAA,EACF;AACF;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useState as A, useCallback as s, useMemo as O, useEffect as D } from "react";
|
|
2
|
+
import { MiniError as M, formatError as b } from "../utils/errors.js";
|
|
3
|
+
const V = (g, c, h) => {
|
|
4
|
+
const [r, l] = A({
|
|
5
|
+
data: null,
|
|
6
|
+
pageInfo: { hasNextPage: !1, endCursor: null },
|
|
7
|
+
loading: !1,
|
|
8
|
+
error: null
|
|
9
|
+
}), p = h?.skip === !0, { validator: y, hook: t } = h, w = s(
|
|
10
|
+
(f) => {
|
|
11
|
+
try {
|
|
12
|
+
return y?.(f), null;
|
|
13
|
+
} catch (d) {
|
|
14
|
+
return d ?? new M({
|
|
15
|
+
hook: t,
|
|
16
|
+
message: "Validation failed"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
[y, t]
|
|
21
|
+
), I = O(() => c, [JSON.stringify(c)]), e = s(
|
|
22
|
+
async (f, {
|
|
23
|
+
setLoading: d = !0,
|
|
24
|
+
setError: N = !0,
|
|
25
|
+
resetOnError: i = !0,
|
|
26
|
+
throwOnError: k = !0,
|
|
27
|
+
appendData: C = !1
|
|
28
|
+
} = {}) => {
|
|
29
|
+
let E = null, u = null;
|
|
30
|
+
l((a) => ({
|
|
31
|
+
...a,
|
|
32
|
+
loading: d ? !0 : a.loading
|
|
33
|
+
}));
|
|
34
|
+
try {
|
|
35
|
+
const a = await g({ ...I, ...f });
|
|
36
|
+
if (a.ok)
|
|
37
|
+
u = w(a.data.data), l((n) => {
|
|
38
|
+
let P = a.data.data;
|
|
39
|
+
return C && n.data && Array.isArray(n.data) && Array.isArray(a.data.data) && (P = [...n.data, ...a.data.data]), {
|
|
40
|
+
...n,
|
|
41
|
+
data: P,
|
|
42
|
+
pageInfo: a.data.pageInfo,
|
|
43
|
+
loading: !1,
|
|
44
|
+
error: u ?? null
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
else
|
|
48
|
+
throw a.error;
|
|
49
|
+
} catch (a) {
|
|
50
|
+
E = b({ hook: t }, a);
|
|
51
|
+
}
|
|
52
|
+
const o = u || E;
|
|
53
|
+
if (o && (N || i) && l((a) => ({
|
|
54
|
+
data: i ? null : a.data,
|
|
55
|
+
pageInfo: i ? { hasNextPage: !1, endCursor: null } : a.pageInfo,
|
|
56
|
+
loading: !1,
|
|
57
|
+
error: o
|
|
58
|
+
})), o && k)
|
|
59
|
+
throw o;
|
|
60
|
+
},
|
|
61
|
+
[g, I, t, w]
|
|
62
|
+
), m = s(async () => {
|
|
63
|
+
await e({ fetchPolicy: "network-only" }, {
|
|
64
|
+
setLoading: !1,
|
|
65
|
+
resetOnError: !1,
|
|
66
|
+
throwOnError: !0
|
|
67
|
+
});
|
|
68
|
+
}, [e]), x = s(async () => {
|
|
69
|
+
!r.pageInfo.hasNextPage || !r.pageInfo.endCursor || await e({ after: r.pageInfo.endCursor }, {
|
|
70
|
+
setLoading: !1,
|
|
71
|
+
setError: !1,
|
|
72
|
+
resetOnError: !1,
|
|
73
|
+
throwOnError: !0,
|
|
74
|
+
appendData: !0
|
|
75
|
+
});
|
|
76
|
+
}, [r.pageInfo.hasNextPage, r.pageInfo.endCursor, e]);
|
|
77
|
+
return D(() => {
|
|
78
|
+
p || e(
|
|
79
|
+
{},
|
|
80
|
+
{
|
|
81
|
+
throwOnError: !1
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}, [e, p]), {
|
|
85
|
+
data: r.data,
|
|
86
|
+
loading: r.loading,
|
|
87
|
+
error: r.error,
|
|
88
|
+
hasNextPage: r.pageInfo.hasNextPage,
|
|
89
|
+
refetch: m,
|
|
90
|
+
fetchMore: x
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
V as useShopActionsPaginatedDataFetching
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=useShopActionsPaginatedDataFetching.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShopActionsPaginatedDataFetching.js","sources":["../../src/internal/useShopActionsPaginatedDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {\n DataHookFetchPolicy,\n PaginatedDataHookReturnsBase,\n PaginationInfo,\n ShopActionResult,\n} from '../types'\nimport {formatError, MiniError} from '../utils/errors'\n\nexport interface ShopActionsDataFetchingResult<S>\n extends PaginatedDataHookReturnsBase {\n data: S | null\n}\n\nexport const useShopActionsPaginatedDataFetching = <\n S = unknown,\n P extends {after?: string; fetchPolicy?: DataHookFetchPolicy} = {\n after?: undefined\n fetchPolicy?: DataHookFetchPolicy\n },\n>(\n action: (\n params: P\n ) => Promise<ShopActionResult<{data: S; pageInfo: PaginationInfo}>>,\n params: P,\n options: {\n skip?: boolean\n hook?: string\n validator?: (data: S) => void\n }\n): ShopActionsDataFetchingResult<S> => {\n const [state, setState] = useState<{\n data: S | null\n pageInfo: PaginationInfo\n loading: boolean\n error: Error | null\n }>({\n data: null,\n pageInfo: {hasNextPage: false, endCursor: null},\n loading: false,\n error: null,\n })\n\n const skip = options?.skip === true\n const {validator, hook} = options\n const runValidator = useCallback(\n (dataToValidate: S) => {\n try {\n validator?.(dataToValidate)\n return null\n } catch (err) {\n return (\n err ??\n new MiniError({\n hook,\n message: 'Validation failed',\n })\n )\n }\n },\n [validator, hook]\n )\n\n // Params object is recreated on every render, so we need to memoize it.\n // We don't know what's inside the params object, but we can stringify it.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableParams = useMemo(() => params, [JSON.stringify(params)])\n\n // There's a lot of complexity here because each type of fetch has different side effects if we are trying to\n // stay close to how Apollo client works. eg:\n // - Initial fetch: set loading, set error, set data, reset on error (don't throw)\n // - change params fetch: set loading, set error, set data, reset on error (don't throw)\n // - refetch fetch: don't set loading, set error, update data, leave data as is was on error (also throw)\n // - fetchMore fetch: don't set loading, don't set error, update data, leave data as is was on error (also throw)\n const fetch = useCallback(\n async (\n extraParams?: Partial<P>,\n {\n setLoading = true,\n setError = true,\n resetOnError = true,\n throwOnError = true,\n appendData = false,\n }: {\n setLoading?: boolean\n setError?: boolean\n resetOnError?: boolean\n throwOnError?: boolean\n appendData?: boolean\n } = {}\n ) => {\n let queryError: Error | null = null\n let validationError: Error | null = null\n\n setState(curState => ({\n ...curState,\n loading: setLoading ? true : curState.loading,\n }))\n\n try {\n const result = await action({...stableParams, ...extraParams})\n\n if (result.ok) {\n validationError = runValidator(result.data.data)\n\n setState(curState => {\n let newData = result.data.data\n\n if (\n appendData &&\n curState.data &&\n Array.isArray(curState.data) &&\n Array.isArray(result.data.data)\n ) {\n newData = [...curState.data, ...result.data.data] as S\n }\n\n return {\n ...curState,\n data: newData,\n pageInfo: result.data.pageInfo,\n loading: false,\n error: validationError ?? null,\n }\n })\n } else {\n throw result.error\n }\n } catch (err) {\n queryError = formatError({hook}, err)\n }\n\n const error = validationError || queryError\n\n if (error && (setError || resetOnError)) {\n setState(curState => ({\n data: resetOnError ? null : curState.data,\n pageInfo: resetOnError\n ? {hasNextPage: false, endCursor: null}\n : curState.pageInfo,\n loading: false,\n error,\n }))\n }\n\n if (error && throwOnError) {\n throw error\n }\n },\n [action, stableParams, hook, runValidator]\n )\n\n const refetch = useCallback(async () => {\n await fetch({fetchPolicy: 'network-only'} as Partial<P>, {\n setLoading: false,\n resetOnError: false,\n throwOnError: true,\n })\n }, [fetch])\n\n const fetchMore = useCallback(async () => {\n if (!state.pageInfo.hasNextPage || !state.pageInfo.endCursor) return\n\n await fetch({after: state.pageInfo.endCursor} as Partial<P>, {\n setLoading: false,\n setError: false,\n resetOnError: false,\n throwOnError: true,\n appendData: true,\n })\n }, [state.pageInfo.hasNextPage, state.pageInfo.endCursor, fetch])\n\n useEffect(() => {\n if (skip) return\n\n fetch(\n {},\n {\n throwOnError: false,\n }\n )\n }, [fetch, skip])\n\n return {\n data: state.data,\n loading: state.loading,\n error: state.error,\n hasNextPage: state.pageInfo.hasNextPage,\n refetch,\n fetchMore,\n }\n}\n"],"names":["useShopActionsPaginatedDataFetching","action","params","options","state","setState","useState","skip","validator","hook","runValidator","useCallback","dataToValidate","err","MiniError","stableParams","useMemo","fetch","extraParams","setLoading","setError","resetOnError","throwOnError","appendData","queryError","validationError","curState","result","newData","formatError","error","refetch","fetchMore","useEffect"],"mappings":";;AAeO,MAAMA,IAAsC,CAOjDC,GAGAC,GACAC,MAKqC;AACrC,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAKvB;AAAA,IACD,MAAM;AAAA,IACN,UAAU,EAAC,aAAa,IAAO,WAAW,KAAI;AAAA,IAC9C,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,CACR,GAEKC,IAAOJ,GAAS,SAAS,IACzB,EAAC,WAAAK,GAAW,MAAAC,EAAA,IAAQN,GACpBO,IAAeC;AAAA,IACnB,CAACC,MAAsB;AACjB,UAAA;AACF,eAAAJ,IAAYI,CAAc,GACnB;AAAA,eACAC,GAAK;AAEV,eAAAA,KACA,IAAIC,EAAU;AAAA,UACZ,MAAAL;AAAA,UACA,SAAS;AAAA,QAAA,CACV;AAAA,MAAA;AAAA,IAGP;AAAA,IACA,CAACD,GAAWC,CAAI;AAAA,EAClB,GAKMM,IAAeC,EAAQ,MAAMd,GAAQ,CAAC,KAAK,UAAUA,CAAM,CAAC,CAAC,GAQ7De,IAAQN;AAAA,IACZ,OACEO,GACA;AAAA,MACE,YA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,EAC3C,GAEMqB,IAAUpB,EAAY,YAAY;AACtC,UAAMM,EAAM,EAAC,aAAa,kBAA+B;AAAA,MACvD,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,cAAc;AAAA,IAAA,CACf;AAAA,EAAA,GACA,CAACA,CAAK,CAAC,GAEJe,IAAYrB,EAAY,YAAY;AACxC,IAAI,CAACP,EAAM,SAAS,eAAe,CAACA,EAAM,SAAS,aAEnD,MAAMa,EAAM,EAAC,OAAOb,EAAM,SAAS,aAA0B;AAAA,MAC3D,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,cAAc;AAAA,MACd,cAAc;AAAA,MACd,YAAY;AAAA,IAAA,CACb;AAAA,EAAA,GACA,CAACA,EAAM,SAAS,aAAaA,EAAM,SAAS,WAAWa,CAAK,CAAC;AAEhE,SAAAgB,EAAU,MAAM;AACd,IAAI1B,KAEJU;AAAA,MACE,CAAC;AAAA,MACD;AAAA,QACE,cAAc;AAAA,MAAA;AAAA,IAElB;AAAA,EAAA,GACC,CAACA,GAAOV,CAAI,CAAC,GAET;AAAA,IACL,MAAMH,EAAM;AAAA,IACZ,SAASA,EAAM;AAAA,IACf,OAAOA,EAAM;AAAA,IACb,aAAaA,EAAM,SAAS;AAAA,IAC5B,SAAA2B;AAAA,IACA,WAAAC;AAAA,EACF;AACF;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx as o } from "../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { twMerge as t } from "../node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
|
|
3
|
+
function n(...r) {
|
|
4
|
+
return t(o(r));
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
n as cn
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/lib/utils.ts"],"sourcesContent":["import {type ClassValue, clsx} from 'clsx'\nimport {twMerge} from 'tailwind-merge'\n\n/**\n * Utility function to merge Tailwind CSS classes with proper conflict resolution\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAMO,SAASA,KAAMC,GAAsB;AACnC,SAAAC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event"],"mappings":"AACA,SAASA,EAAqBC,GAAsBC,GAAiB,EAAE,0BAAAC,IAA2B,GAAM,IAAG,IAAI;AAC7G,SAAO,SAAqBC,GAAO;AAEjC,QADAH,IAAuBG,CAAK,GACxBD,MAA6B,MAAS,CAACC,EAAM;AAC/C,aAAOF,IAAkBE,CAAK;AAAA,EAEjC;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { createContextScope as b } from "../../../../../@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";
|
|
3
|
+
import { useComposedRefs as u } from "../../../../../@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";
|
|
4
|
+
import { createDialogScope as A, Root as w, Portal as M, Overlay as x, Trigger as I, WarningProvider as L, Content as $, Title as F, Description as G, Close as v } from "../../../../../@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";
|
|
5
|
+
import { composeEventHandlers as j } from "../../../../../@radix-ui_primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js";
|
|
6
|
+
import { createSlottable as W } from "../../../../../@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";
|
|
7
|
+
import { jsx as i, jsxs as Y } from "react/jsx-runtime";
|
|
8
|
+
var f = "AlertDialog", [q, te] = b(f, [
|
|
9
|
+
A
|
|
10
|
+
]), n = A(), D = (e) => {
|
|
11
|
+
const { __scopeAlertDialog: o, ...r } = e, t = n(o);
|
|
12
|
+
return /* @__PURE__ */ i(w, { ...t, ...r, modal: !0 });
|
|
13
|
+
};
|
|
14
|
+
D.displayName = f;
|
|
15
|
+
var B = "AlertDialogTrigger", m = l.forwardRef(
|
|
16
|
+
(e, o) => {
|
|
17
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
18
|
+
return /* @__PURE__ */ i(I, { ...a, ...t, ref: o });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
m.displayName = B;
|
|
22
|
+
var H = "AlertDialogPortal", y = (e) => {
|
|
23
|
+
const { __scopeAlertDialog: o, ...r } = e, t = n(o);
|
|
24
|
+
return /* @__PURE__ */ i(M, { ...t, ...r });
|
|
25
|
+
};
|
|
26
|
+
y.displayName = H;
|
|
27
|
+
var V = "AlertDialogOverlay", _ = l.forwardRef(
|
|
28
|
+
(e, o) => {
|
|
29
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
30
|
+
return /* @__PURE__ */ i(x, { ...a, ...t, ref: o });
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
_.displayName = V;
|
|
34
|
+
var s = "AlertDialogContent", [k, z] = q(s), J = W("AlertDialogContent"), N = l.forwardRef(
|
|
35
|
+
(e, o) => {
|
|
36
|
+
const { __scopeAlertDialog: r, children: t, ...a } = e, g = n(r), p = l.useRef(null), O = u(o, p), d = l.useRef(null);
|
|
37
|
+
return /* @__PURE__ */ i(
|
|
38
|
+
L,
|
|
39
|
+
{
|
|
40
|
+
contentName: s,
|
|
41
|
+
titleName: R,
|
|
42
|
+
docsSlug: "alert-dialog",
|
|
43
|
+
children: /* @__PURE__ */ i(k, { scope: r, cancelRef: d, children: /* @__PURE__ */ Y(
|
|
44
|
+
$,
|
|
45
|
+
{
|
|
46
|
+
role: "alertdialog",
|
|
47
|
+
...g,
|
|
48
|
+
...a,
|
|
49
|
+
ref: O,
|
|
50
|
+
onOpenAutoFocus: j(a.onOpenAutoFocus, (c) => {
|
|
51
|
+
c.preventDefault(), d.current?.focus({ preventScroll: !0 });
|
|
52
|
+
}),
|
|
53
|
+
onPointerDownOutside: (c) => c.preventDefault(),
|
|
54
|
+
onInteractOutside: (c) => c.preventDefault(),
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ i(J, { children: t }),
|
|
57
|
+
/* @__PURE__ */ i(Q, { contentRef: p })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
) })
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
N.displayName = s;
|
|
66
|
+
var R = "AlertDialogTitle", C = l.forwardRef(
|
|
67
|
+
(e, o) => {
|
|
68
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
69
|
+
return /* @__PURE__ */ i(F, { ...a, ...t, ref: o });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
C.displayName = R;
|
|
73
|
+
var h = "AlertDialogDescription", E = l.forwardRef((e, o) => {
|
|
74
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
75
|
+
return /* @__PURE__ */ i(G, { ...a, ...t, ref: o });
|
|
76
|
+
});
|
|
77
|
+
E.displayName = h;
|
|
78
|
+
var K = "AlertDialogAction", S = l.forwardRef(
|
|
79
|
+
(e, o) => {
|
|
80
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
81
|
+
return /* @__PURE__ */ i(v, { ...a, ...t, ref: o });
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
S.displayName = K;
|
|
85
|
+
var P = "AlertDialogCancel", T = l.forwardRef(
|
|
86
|
+
(e, o) => {
|
|
87
|
+
const { __scopeAlertDialog: r, ...t } = e, { cancelRef: a } = z(P, r), g = n(r), p = u(o, a);
|
|
88
|
+
return /* @__PURE__ */ i(v, { ...g, ...t, ref: p });
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
T.displayName = P;
|
|
92
|
+
var Q = ({ contentRef: e }) => {
|
|
93
|
+
const o = `\`${s}\` requires a description for the component to be accessible for screen reader users.
|
|
94
|
+
|
|
95
|
+
You can add a description to the \`${s}\` by passing a \`${h}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
96
|
+
|
|
97
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${s}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
98
|
+
|
|
99
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
100
|
+
return l.useEffect(() => {
|
|
101
|
+
document.getElementById(
|
|
102
|
+
e.current?.getAttribute("aria-describedby")
|
|
103
|
+
) || console.warn(o);
|
|
104
|
+
}, [o, e]), null;
|
|
105
|
+
}, ae = D, ie = m, le = y, ne = _, se = N, ce = S, pe = T, ge = C, de = E;
|
|
106
|
+
export {
|
|
107
|
+
ce as Action,
|
|
108
|
+
D as AlertDialog,
|
|
109
|
+
S as AlertDialogAction,
|
|
110
|
+
T as AlertDialogCancel,
|
|
111
|
+
N as AlertDialogContent,
|
|
112
|
+
E as AlertDialogDescription,
|
|
113
|
+
_ as AlertDialogOverlay,
|
|
114
|
+
y as AlertDialogPortal,
|
|
115
|
+
C as AlertDialogTitle,
|
|
116
|
+
m as AlertDialogTrigger,
|
|
117
|
+
pe as Cancel,
|
|
118
|
+
se as Content,
|
|
119
|
+
de as Description,
|
|
120
|
+
ne as Overlay,
|
|
121
|
+
le as Portal,
|
|
122
|
+
ae as Root,
|
|
123
|
+
ge as Title,
|
|
124
|
+
ie as Trigger,
|
|
125
|
+
te as createAlertDialogScope
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../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.mjs"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ROOT_NAME","createAlertDialogContext","createAlertDialogScope","createContextScope","createDialogScope","useDialogScope","AlertDialog","props","__scopeAlertDialog","alertDialogProps","dialogScope","jsx","DialogPrimitive.Root","TRIGGER_NAME","AlertDialogTrigger","React","forwardedRef","triggerProps","DialogPrimitive.Trigger","PORTAL_NAME","AlertDialogPortal","portalProps","DialogPrimitive.Portal","OVERLAY_NAME","AlertDialogOverlay","overlayProps","DialogPrimitive.Overlay","CONTENT_NAME","AlertDialogContentProvider","useAlertDialogContentContext","Slottable","createSlottable","AlertDialogContent","children","contentProps","contentRef","composedRefs","useComposedRefs","cancelRef","DialogPrimitive.WarningProvider","TITLE_NAME","jsxs","DialogPrimitive.Content","composeEventHandlers","event","DescriptionWarning","AlertDialogTitle","titleProps","DialogPrimitive.Title","DESCRIPTION_NAME","AlertDialogDescription","descriptionProps","DialogPrimitive.Description","ACTION_NAME","AlertDialogAction","actionProps","DialogPrimitive.Close","CANCEL_NAME","AlertDialogCancel","cancelProps","ref","MESSAGE","Root2","Trigger2","Portal2","Overlay2","Content2","Action","Cancel","Title2","Description2"],"mappings":";;;;;;;AAWA,IAAIA,IAAY,eACZ,CAACC,GAA0BC,EAAsB,IAAIC,EAAmBH,GAAW;AAAA,EACrFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpCE,IAAc,CAACC,MAAU;AAC3B,QAAM,EAAE,oBAAAC,GAAoB,GAAGC,EAAgB,IAAKF,GAC9CG,IAAcL,EAAeG,CAAkB;AACrD,SAAuB,gBAAAG,EAAIC,GAAsB,EAAE,GAAGF,GAAa,GAAGD,GAAkB,OAAO,IAAM;AACvG;AACAH,EAAY,cAAcN;AAC1B,IAAIa,IAAe,sBACfC,IAAqBC,EAAM;AAAA,EAC7B,CAACR,GAAOS,MAAiB;AACvB,UAAM,EAAE,oBAAAR,GAAoB,GAAGS,EAAY,IAAKV,GAC1CG,IAAcL,EAAeG,CAAkB;AACrD,WAAuB,gBAAAG,EAAIO,GAAyB,EAAE,GAAGR,GAAa,GAAGO,GAAc,KAAKD,GAAc;AAAA,EAC9G;AACA;AACAF,EAAmB,cAAcD;AACjC,IAAIM,IAAc,qBAC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G;AACA;AACAsC,EAAkB,cAAcD;AAChC,IAAII,IAAc,qBACdC,IAAoB3C,EAAM;AAAA,EAC5B,CAACR,GAAOS,MAAiB;AACvB,UAAM,EAAE,oBAAAR,GAAoB,GAAGmD,EAAW,IAAKpD,GACzC,EAAE,WAAA+B,EAAW,IAAGT,EAA6B4B,GAAajD,CAAkB,GAC5EE,IAAcL,EAAeG,CAAkB,GAC/CoD,IAAMvB,EAAgBrB,GAAcsB,CAAS;AACnD,WAAuB,gBAAA3B,EAAI6C,GAAuB,EAAE,GAAG9C,GAAa,GAAGiD,GAAa,KAAAC,GAAK;AAAA,EAC7F;AACA;AACAF,EAAkB,cAAcD;AAChC,IAAIZ,IAAqB,CAAC,EAAE,YAAAV,QAAiB;AAC3C,QAAM0B,IAAU,KAAKlC,CAAY;AAAA;AAAA,qCAEEA,CAAY,qBAAqBsB,CAAgB;AAAA;AAAA,4JAEsEtB,CAAY;AAAA;AAAA;AAGtK,SAAAZ,EAAM,UAAU,MAAM;AAIpB,IAHuB,SAAS;AAAA,MAC9BoB,EAAW,SAAS,aAAa,kBAAkB;AAAA,IACpD,KACoB,QAAQ,KAAK0B,CAAO;AAAA,EAC7C,GAAK,CAACA,GAAS1B,CAAU,CAAC,GACjB;AACT,GACI2B,KAAQxD,GACRyD,KAAWjD,GACXkD,KAAU5C,GACV6C,KAAWzC,GACX0C,KAAWlC,GACXmC,KAASb,GACTc,KAASV,GACTW,KAASvB,GACTwB,KAAepB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
function l(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
6
|
+
}
|
|
7
|
+
function i(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = l(t, o);
|
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
+
});
|
|
14
|
+
if (u)
|
|
15
|
+
return () => {
|
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
|
17
|
+
const e = c[t];
|
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../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.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AACA,SAASC,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
+
function $(t, c) {
|
|
4
|
+
const n = u.createContext(c), p = (r) => {
|
|
5
|
+
const { children: e, ...o } = r, s = u.useMemo(() => o, Object.values(o));
|
|
6
|
+
return /* @__PURE__ */ f(n.Provider, { value: s, children: e });
|
|
7
|
+
};
|
|
8
|
+
p.displayName = t + "Provider";
|
|
9
|
+
function i(r) {
|
|
10
|
+
const e = u.useContext(n);
|
|
11
|
+
if (e) return e;
|
|
12
|
+
if (c !== void 0) return c;
|
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${t}\``);
|
|
14
|
+
}
|
|
15
|
+
return [p, i];
|
|
16
|
+
}
|
|
17
|
+
function w(t, c = []) {
|
|
18
|
+
let n = [];
|
|
19
|
+
function p(r, e) {
|
|
20
|
+
const o = u.createContext(e), s = n.length;
|
|
21
|
+
n = [...n, e];
|
|
22
|
+
const d = (x) => {
|
|
23
|
+
const { scope: m, children: v, ...a } = x, S = m?.[t]?.[s] || o, h = u.useMemo(() => a, Object.values(a));
|
|
24
|
+
return /* @__PURE__ */ f(S.Provider, { value: h, children: v });
|
|
25
|
+
};
|
|
26
|
+
d.displayName = r + "Provider";
|
|
27
|
+
function C(x, m) {
|
|
28
|
+
const v = m?.[t]?.[s] || o, a = u.useContext(v);
|
|
29
|
+
if (a) return a;
|
|
30
|
+
if (e !== void 0) return e;
|
|
31
|
+
throw new Error(`\`${x}\` must be used within \`${r}\``);
|
|
32
|
+
}
|
|
33
|
+
return [d, C];
|
|
34
|
+
}
|
|
35
|
+
const i = () => {
|
|
36
|
+
const r = n.map((e) => u.createContext(e));
|
|
37
|
+
return function(o) {
|
|
38
|
+
const s = o?.[t] || r;
|
|
39
|
+
return u.useMemo(
|
|
40
|
+
() => ({ [`__scope${t}`]: { ...o, [t]: s } }),
|
|
41
|
+
[o, s]
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return i.scopeName = t, [p, P(i, ...c)];
|
|
46
|
+
}
|
|
47
|
+
function P(...t) {
|
|
48
|
+
const c = t[0];
|
|
49
|
+
if (t.length === 1) return c;
|
|
50
|
+
const n = () => {
|
|
51
|
+
const p = t.map((i) => ({
|
|
52
|
+
useScope: i(),
|
|
53
|
+
scopeName: i.scopeName
|
|
54
|
+
}));
|
|
55
|
+
return function(r) {
|
|
56
|
+
const e = p.reduce((o, { useScope: s, scopeName: d }) => {
|
|
57
|
+
const x = s(r)[`__scope${d}`];
|
|
58
|
+
return { ...o, ...x };
|
|
59
|
+
}, {});
|
|
60
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
return n.scopeName = c.scopeName, n;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
$ as createContext,
|
|
67
|
+
w as createContextScope
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../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.mjs"],"sourcesContent":["// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope"],"mappings":";;AAGA,SAASA,EAAeC,GAAmBC,GAAgB;AACzD,QAAMC,IAAUC,EAAM,cAAcF,CAAc,GAC5CG,IAAW,CAACC,MAAU;AAC1B,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAO,IAAKF,GAC3BG,IAAQL,EAAM,QAAQ,MAAMI,GAAS,OAAO,OAAOA,CAAO,CAAC;AACjE,WAAuB,gBAAAE,EAAIP,EAAQ,UAAU,EAAE,OAAAM,GAAO,UAAAF,EAAQ,CAAE;AAAA,EACjE;AACD,EAAAF,EAAS,cAAcJ,IAAoB;AAC3C,WAASU,EAAYC,GAAc;AACjC,UAAMJ,IAAUJ,EAAM,WAAWD,CAAO;AACxC,QAAIK,EAAS,QAAOA;AACpB,Q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