@gem-sdk/core 2.0.0-dev.896 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AddOn.js +18 -1
- package/dist/cjs/components/ComponentAnimation.js +17 -0
- package/dist/cjs/components/ComponentToolbarPreview.js +752 -1
- package/dist/cjs/components/ComponentWrapper.js +61 -1
- package/dist/cjs/components/ComponentWrapperPreview.js +213 -1
- package/dist/cjs/components/Empty.js +7 -1
- package/dist/cjs/components/InteractionSuffix.js +42 -0
- package/dist/cjs/components/Render.js +75 -1
- package/dist/cjs/components/Render.liquid.js +313 -17
- package/dist/cjs/components/RenderBlock.js +54 -1
- package/dist/cjs/components/RenderCustomCode.js +59 -3
- package/dist/cjs/components/RenderPreview.js +67 -1
- package/dist/cjs/components/RenderSection.js +23 -1
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +252 -1
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +85 -1
- package/dist/cjs/components/ai-generator/components/PickProduct.js +220 -1
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +77 -1
- package/dist/cjs/components/ai-generator/hooks/useCheckingProductInside.js +47 -0
- package/dist/cjs/components/ai-generator/hooks/useFlipPopup.js +110 -0
- package/dist/cjs/components/ai-generator/hooks/useGettingGenerateRequest.js +37 -1
- package/dist/cjs/components/ai-generator/hooks/useListenEventGenerate.js +70 -1
- package/dist/cjs/components/ai-generator/icons/AIIcon.js +67 -1
- package/dist/cjs/components/ai-generator/icons/CloseIcon.js +19 -1
- package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +37 -1
- package/dist/cjs/components/ai-generator/icons/SearchIcon.js +21 -1
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +21 -1
- package/dist/cjs/components/ai-generator/icons/UpgradeIcon.js +27 -0
- package/dist/cjs/components/ai-generator/icons/WarningIcon.js +31 -0
- package/dist/cjs/components/constant.js +83 -1
- package/dist/cjs/components/resize/Resize.js +16 -1
- package/dist/cjs/components/resize/Spacing.js +260 -1
- package/dist/cjs/components/src/product/helpers/variant-presets.js +56 -1
- package/dist/cjs/components/theme-section/CreateThemeSection.js +123 -1
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +45 -1
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +126 -1
- package/dist/cjs/components/toolbar/Tooltip.js +28 -1
- package/dist/cjs/contexts/AddonContext.js +36 -1
- package/dist/cjs/contexts/ArticleContext.js +39 -1
- package/dist/cjs/contexts/ArticleListContext.js +31 -1
- package/dist/cjs/contexts/BuilderComponent.js +34 -1
- package/dist/cjs/contexts/BuilderContext.js +39 -1
- package/dist/cjs/contexts/BuilderPreviewContext.js +486 -1
- package/dist/cjs/contexts/CartLineContext.js +29 -1
- package/dist/cjs/contexts/CollectionContext.js +38 -1
- package/dist/cjs/contexts/ModalContext.js +47 -1
- package/dist/cjs/contexts/PageContext.js +104 -1
- package/dist/cjs/contexts/ProductContext.js +177 -1
- package/dist/cjs/contexts/ProductListContext.js +32 -1
- package/dist/cjs/contexts/SectionContext.js +53 -1
- package/dist/cjs/contexts/ShopContext.js +107 -1
- package/dist/cjs/graphql/fragments/analytic.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection-detail.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection-product.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection.generated.js +6 -2
- package/dist/cjs/graphql/fragments/custom-code.generated.js +6 -2
- package/dist/cjs/graphql/fragments/custom-font.generated.js +6 -2
- package/dist/cjs/graphql/fragments/data-seo.generated.js +6 -2
- package/dist/cjs/graphql/fragments/media.generated.js +6 -2
- package/dist/cjs/graphql/fragments/preview-theme-page.generated.js +39 -0
- package/dist/cjs/graphql/fragments/product-little.generated.js +7 -2
- package/dist/cjs/graphql/fragments/product-option-value.generated.js +6 -2
- package/dist/cjs/graphql/fragments/product-option.generated.js +6 -2
- package/dist/cjs/graphql/fragments/product.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-custom-section.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-page-section.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +10 -28
- package/dist/cjs/graphql/fragments/published-theme-style.generated.js +6 -2
- package/dist/cjs/graphql/fragments/selected-option.generated.js +6 -2
- package/dist/cjs/graphql/fragments/variant.generated.js +6 -2
- package/dist/cjs/graphql/mutations/page-view-up.generated.js +8 -4
- package/dist/cjs/graphql/queries/articles.generated.js +61 -0
- package/dist/cjs/graphql/queries/blogs.generated.js +69 -0
- package/dist/cjs/graphql/queries/collection-detail-filter.generated.js +16 -2
- package/dist/cjs/graphql/queries/collection.generated.js +14 -2
- package/dist/cjs/graphql/queries/collections.generated.js +9 -2
- package/dist/cjs/graphql/queries/preview-page.generated.js +16 -8
- package/dist/cjs/graphql/queries/product-little-detail.generated.js +11 -2
- package/dist/cjs/graphql/queries/product-medias.generated.js +8 -2
- package/dist/cjs/graphql/queries/product-value-label.generated.js +6 -2
- package/dist/cjs/graphql/queries/product-variants.generated.js +10 -2
- package/dist/cjs/graphql/queries/products.generated.js +17 -3
- package/dist/cjs/graphql/queries/published-shop-metas.js +15 -0
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +15 -2
- package/dist/cjs/graphql/queries/store-property.generated.js +6 -2
- package/dist/cjs/graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js +6 -2
- package/dist/cjs/graphql-app-api/queries/LibraryTemplate.generated.js +6 -2
- package/dist/cjs/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +6 -2
- package/dist/cjs/graphql-app-api/queries/ShopLibraryPage.generated.js +17 -0
- package/dist/cjs/graphql-app-api/queries/ThemePage.generated.js +6 -2
- package/dist/cjs/helpers/GlobalEvent.js +19 -1
- package/dist/cjs/helpers/align.js +19 -0
- package/dist/cjs/helpers/animations.js +222 -1
- package/dist/cjs/helpers/background.js +235 -1
- package/dist/cjs/helpers/borders.js +198 -4
- package/dist/cjs/helpers/carousel.js +55 -1
- package/dist/cjs/helpers/clone-deep.js +5 -1
- package/dist/cjs/helpers/cls.js +16 -1
- package/dist/cjs/helpers/colors.js +184 -1
- package/dist/cjs/helpers/compose-advance-style.js +327 -1
- package/dist/cjs/helpers/constant.js +23 -1
- package/dist/cjs/helpers/convert.js +7 -1
- package/dist/cjs/helpers/covert-entities-html.js +19 -1
- package/dist/cjs/helpers/css-variable.js +7 -1
- package/dist/cjs/helpers/email.js +11 -1
- package/dist/cjs/helpers/filter-toolbar-preview.js +14 -1
- package/dist/cjs/helpers/flatten-connection.js +9 -1
- package/dist/cjs/helpers/get-resonsive-value.js +36 -1
- package/dist/cjs/helpers/get-shortname.js +92 -1
- package/dist/cjs/helpers/icon-list.js +61 -1
- package/dist/cjs/helpers/interaction/index.js +134 -0
- package/dist/cjs/helpers/is-browser.js +9 -1
- package/dist/cjs/helpers/is-defined.js +7 -1
- package/dist/cjs/helpers/is-empty-children.js +15 -1
- package/dist/cjs/helpers/is-safari.js +9 -1
- package/dist/cjs/helpers/layout.js +59 -1
- package/dist/cjs/helpers/load-script.js +31 -1
- package/dist/cjs/helpers/loop-component.js +16 -0
- package/dist/cjs/helpers/make-style.js +163 -1
- package/dist/cjs/helpers/normalize-builder-data.js +23 -1
- package/dist/cjs/helpers/pascal-to-kebab-case.js +7 -0
- package/dist/cjs/helpers/prefetch-queries.js +78 -1
- package/dist/cjs/helpers/product.js +48 -1
- package/dist/cjs/helpers/queries/get-collection.js +226 -1
- package/dist/cjs/helpers/queries/get-collections.js +21 -1
- package/dist/cjs/helpers/queries/get-product-by-slug.js +125 -1
- package/dist/cjs/helpers/queries/get-product.js +154 -1
- package/dist/cjs/helpers/queries/get-products.js +214 -1
- package/dist/cjs/helpers/query.js +29 -1
- package/dist/cjs/helpers/radius.js +140 -6
- package/dist/cjs/helpers/render.js +78 -1
- package/dist/cjs/helpers/shadow.js +69 -1
- package/dist/cjs/helpers/size.js +206 -4
- package/dist/cjs/helpers/spacing.js +43 -1
- package/dist/cjs/helpers/third-party/addAppBlockId.js +20 -0
- package/dist/cjs/helpers/third-party/appConfig.js +234 -0
- package/dist/cjs/helpers/third-party/appSetting.js +661 -0
- package/dist/cjs/helpers/third-party/composeAppBlockId.js +11 -0
- package/dist/cjs/helpers/third-party/constant.js +43 -0
- package/dist/cjs/helpers/third-party/generateAppBlockConfigs.js +34 -0
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +47 -0
- package/dist/cjs/helpers/third-party/getAppBlockType.js +12 -0
- package/dist/cjs/helpers/third-party/getAppBlocks.js +30 -0
- package/dist/cjs/helpers/third-party/mergeBlock.js +19 -0
- package/dist/cjs/helpers/third-party/mergeBlockOrder.js +47 -0
- package/dist/cjs/helpers/third-party/removeGPAppItems.js +18 -0
- package/dist/cjs/helpers/tracking/fpixel.js +28 -1
- package/dist/cjs/helpers/tracking/gtag.js +93 -1
- package/dist/cjs/helpers/tracking/tiktokpixel.js +17 -1
- package/dist/cjs/helpers/typography.js +160 -17
- package/dist/cjs/helpers/variant.js +11 -1
- package/dist/cjs/hooks/animation/useAnimationActions.js +39 -1
- package/dist/cjs/hooks/animation/useAnimationConfig.js +30 -1
- package/dist/cjs/hooks/animation/useAnimationPreview.js +31 -1
- package/dist/cjs/hooks/animation/useAnimationTarget.js +122 -1
- package/dist/cjs/hooks/animation/useApplyAnimation.js +89 -1
- package/dist/cjs/hooks/articles/useArticlesQuery.js +33 -1
- package/dist/cjs/hooks/cart/use-add-to-cart.js +20 -1
- package/dist/cjs/hooks/cart/use-cart-data.js +28 -1
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +20 -1
- package/dist/cjs/hooks/cart/use-cart-note-update.js +20 -1
- package/dist/cjs/hooks/cart/use-create-cart.js +22 -1
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +20 -1
- package/dist/cjs/hooks/cart/use-update-cart-item.js +20 -1
- package/dist/cjs/hooks/shop/use-collection-query.js +22 -1
- package/dist/cjs/hooks/shop/use-collections-query.js +17 -1
- package/dist/cjs/hooks/shop/use-product-query.js +22 -1
- package/dist/cjs/hooks/shop/use-products-query.js +63 -1
- package/dist/cjs/hooks/shop.js +126 -1
- package/dist/cjs/hooks/use-current-device.js +30 -1
- package/dist/cjs/hooks/use-lazy-video.js +15 -1
- package/dist/cjs/hooks/useAnimations.js +29 -1
- package/dist/cjs/hooks/useCartId.js +44 -1
- package/dist/cjs/hooks/useCartLine.js +11 -1
- package/dist/cjs/hooks/useCartUI.js +48 -1
- package/dist/cjs/hooks/useCollection.js +9 -1
- package/dist/cjs/hooks/useFetchHandle.js +13 -1
- package/dist/cjs/hooks/useFormatMoney.js +75 -1
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +128 -1
- package/dist/cjs/hooks/useInteraction.js +19 -0
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +10 -1
- package/dist/cjs/hooks/useLoadScript.js +32 -1
- package/dist/cjs/hooks/useMoney.js +84 -1
- package/dist/cjs/hooks/usePrevious.js +19 -1
- package/dist/cjs/hooks/useProduct.js +245 -1
- package/dist/cjs/hooks/useProductList.js +21 -1
- package/dist/cjs/hooks/useSuspenseFetch.js +27 -1
- package/dist/cjs/hooks/useSwatchesOptions.js +41 -1
- package/dist/cjs/hooks/useToolbarPostPurchase.js +89 -1
- package/dist/cjs/index.js +416 -1
- package/dist/cjs/types/animations.js +49 -1
- package/dist/cjs/types/appAPI.js +2 -1
- package/dist/cjs/types/custom.js +52 -0
- package/dist/cjs/types/global-style.js +15 -1
- package/dist/cjs/types/shop.js +2 -1
- package/dist/cjs/web-components/src/helpers/styles/constant.js +9 -1
- package/dist/esm/components/AddOn.js +14 -1
- package/dist/esm/components/ComponentAnimation.js +13 -0
- package/dist/esm/components/ComponentToolbarPreview.js +748 -1
- package/dist/esm/components/ComponentWrapper.js +57 -1
- package/dist/esm/components/ComponentWrapperPreview.js +209 -1
- package/dist/esm/components/Empty.js +3 -1
- package/dist/esm/components/InteractionSuffix.js +40 -0
- package/dist/esm/components/Render.js +71 -1
- package/dist/esm/components/Render.liquid.js +307 -17
- package/dist/esm/components/RenderBlock.js +50 -1
- package/dist/esm/components/RenderCustomCode.js +55 -3
- package/dist/esm/components/RenderPreview.js +63 -1
- package/dist/esm/components/RenderSection.js +19 -1
- package/dist/esm/components/ai-generator/AIContentGenerator.js +250 -1
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +83 -1
- package/dist/esm/components/ai-generator/components/PickProduct.js +218 -1
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +75 -1
- package/dist/esm/components/ai-generator/hooks/useCheckingProductInside.js +45 -0
- package/dist/esm/components/ai-generator/hooks/useFlipPopup.js +108 -0
- package/dist/esm/components/ai-generator/hooks/useGettingGenerateRequest.js +35 -1
- package/dist/esm/components/ai-generator/hooks/useListenEventGenerate.js +68 -1
- package/dist/esm/components/ai-generator/icons/AIIcon.js +65 -1
- package/dist/esm/components/ai-generator/icons/CloseIcon.js +17 -1
- package/dist/esm/components/ai-generator/icons/DropdownIcon.js +34 -1
- package/dist/esm/components/ai-generator/icons/SearchIcon.js +19 -1
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +19 -1
- package/dist/esm/components/ai-generator/icons/UpgradeIcon.js +25 -0
- package/dist/esm/components/ai-generator/icons/WarningIcon.js +29 -0
- package/dist/esm/components/constant.js +76 -1
- package/dist/esm/components/resize/Resize.js +12 -1
- package/dist/esm/components/resize/Spacing.js +256 -1
- package/dist/esm/components/src/product/helpers/variant-presets.js +54 -1
- package/dist/esm/components/theme-section/CreateThemeSection.js +121 -1
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +43 -1
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +124 -1
- package/dist/esm/components/toolbar/Tooltip.js +24 -1
- package/dist/esm/contexts/AddonContext.js +32 -1
- package/dist/esm/contexts/ArticleContext.js +36 -1
- package/dist/esm/contexts/ArticleListContext.js +27 -1
- package/dist/esm/contexts/BuilderComponent.js +31 -1
- package/dist/esm/contexts/BuilderContext.js +36 -1
- package/dist/esm/contexts/BuilderPreviewContext.js +483 -1
- package/dist/esm/contexts/CartLineContext.js +26 -1
- package/dist/esm/contexts/CollectionContext.js +35 -1
- package/dist/esm/contexts/ModalContext.js +44 -1
- package/dist/esm/contexts/PageContext.js +101 -1
- package/dist/esm/contexts/ProductContext.js +174 -1
- package/dist/esm/contexts/ProductListContext.js +28 -1
- package/dist/esm/contexts/SectionContext.js +49 -1
- package/dist/esm/contexts/ShopContext.js +104 -1
- package/dist/esm/graphql/fragments/analytic.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection-detail.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection-product.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection.generated.js +4 -2
- package/dist/esm/graphql/fragments/custom-code.generated.js +4 -2
- package/dist/esm/graphql/fragments/custom-font.generated.js +4 -2
- package/dist/esm/graphql/fragments/data-seo.generated.js +4 -2
- package/dist/esm/graphql/fragments/media.generated.js +4 -2
- package/dist/esm/graphql/fragments/preview-theme-page.generated.js +37 -0
- package/dist/esm/graphql/fragments/product-little.generated.js +5 -2
- package/dist/esm/graphql/fragments/product-option-value.generated.js +4 -2
- package/dist/esm/graphql/fragments/product-option.generated.js +4 -2
- package/dist/esm/graphql/fragments/product.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-custom-section.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-page-section.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +8 -28
- package/dist/esm/graphql/fragments/published-theme-style.generated.js +4 -2
- package/dist/esm/graphql/fragments/selected-option.generated.js +4 -2
- package/dist/esm/graphql/fragments/variant.generated.js +4 -2
- package/dist/esm/graphql/mutations/page-view-up.generated.js +6 -4
- package/dist/esm/graphql/queries/articles.generated.js +59 -0
- package/dist/esm/graphql/queries/blogs.generated.js +67 -0
- package/dist/esm/graphql/queries/collection-detail-filter.generated.js +22 -10
- package/dist/esm/graphql/queries/collection.generated.js +18 -8
- package/dist/esm/graphql/queries/collections.generated.js +8 -3
- package/dist/esm/graphql/queries/preview-page.generated.js +16 -10
- package/dist/esm/graphql/queries/product-little-detail.generated.js +12 -5
- package/dist/esm/graphql/queries/product-medias.generated.js +6 -2
- package/dist/esm/graphql/queries/product-value-label.generated.js +4 -2
- package/dist/esm/graphql/queries/product-variants.generated.js +10 -4
- package/dist/esm/graphql/queries/products.generated.js +20 -9
- package/dist/esm/graphql/queries/published-shop-metas.js +13 -0
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +20 -9
- package/dist/esm/graphql/queries/store-property.generated.js +4 -2
- package/dist/esm/graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js +4 -2
- package/dist/esm/graphql-app-api/queries/LibraryTemplate.generated.js +4 -2
- package/dist/esm/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +4 -2
- package/dist/esm/graphql-app-api/queries/ShopLibraryPage.generated.js +15 -0
- package/dist/esm/graphql-app-api/queries/ThemePage.generated.js +4 -2
- package/dist/esm/helpers/GlobalEvent.js +15 -1
- package/dist/esm/helpers/align.js +17 -0
- package/dist/esm/helpers/animations.js +220 -1
- package/dist/esm/helpers/background.js +226 -1
- package/dist/esm/helpers/borders.js +189 -4
- package/dist/esm/helpers/carousel.js +51 -1
- package/dist/esm/helpers/clone-deep.js +3 -1
- package/dist/esm/helpers/cls.js +14 -1
- package/dist/esm/helpers/colors.js +169 -1
- package/dist/esm/helpers/compose-advance-style.js +319 -1
- package/dist/esm/helpers/constant.js +19 -1
- package/dist/esm/helpers/convert.js +4 -1
- package/dist/esm/helpers/covert-entities-html.js +17 -1
- package/dist/esm/helpers/css-variable.js +5 -1
- package/dist/esm/helpers/email.js +6 -1
- package/dist/esm/helpers/filter-toolbar-preview.js +9 -1
- package/dist/esm/helpers/flatten-connection.js +7 -1
- package/dist/esm/helpers/get-resonsive-value.js +31 -1
- package/dist/esm/helpers/get-shortname.js +90 -1
- package/dist/esm/helpers/icon-list.js +58 -1
- package/dist/esm/helpers/interaction/index.js +132 -0
- package/dist/esm/helpers/is-browser.js +5 -1
- package/dist/esm/helpers/is-defined.js +5 -1
- package/dist/esm/helpers/is-empty-children.js +10 -1
- package/dist/esm/helpers/is-safari.js +5 -1
- package/dist/esm/helpers/layout.js +54 -1
- package/dist/esm/helpers/load-script.js +29 -1
- package/dist/esm/helpers/loop-component.js +14 -0
- package/dist/esm/helpers/make-style.js +149 -1
- package/dist/esm/helpers/normalize-builder-data.js +21 -1
- package/dist/esm/helpers/pascal-to-kebab-case.js +5 -0
- package/dist/esm/helpers/prefetch-queries.js +76 -1
- package/dist/esm/helpers/product.js +44 -1
- package/dist/esm/helpers/queries/get-collection.js +223 -1
- package/dist/esm/helpers/queries/get-collections.js +19 -1
- package/dist/esm/helpers/queries/get-product-by-slug.js +123 -1
- package/dist/esm/helpers/queries/get-product.js +150 -1
- package/dist/esm/helpers/queries/get-products.js +210 -1
- package/dist/esm/helpers/query.js +25 -1
- package/dist/esm/helpers/radius.js +132 -6
- package/dist/esm/helpers/render.js +70 -1
- package/dist/esm/helpers/shadow.js +63 -1
- package/dist/esm/helpers/size.js +192 -4
- package/dist/esm/helpers/spacing.js +40 -1
- package/dist/esm/helpers/third-party/addAppBlockId.js +18 -0
- package/dist/esm/helpers/third-party/appConfig.js +200 -0
- package/dist/esm/helpers/third-party/appSetting.js +658 -0
- package/dist/esm/helpers/third-party/composeAppBlockId.js +9 -0
- package/dist/esm/helpers/third-party/constant.js +40 -0
- package/dist/esm/helpers/third-party/generateAppBlockConfigs.js +32 -0
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +45 -0
- package/dist/esm/helpers/third-party/getAppBlockType.js +10 -0
- package/dist/esm/helpers/third-party/getAppBlocks.js +28 -0
- package/dist/esm/helpers/third-party/mergeBlock.js +17 -0
- package/dist/esm/helpers/third-party/mergeBlockOrder.js +45 -0
- package/dist/esm/helpers/third-party/removeGPAppItems.js +15 -0
- package/dist/esm/helpers/tracking/fpixel.js +24 -1
- package/dist/esm/helpers/tracking/gtag.js +87 -1
- package/dist/esm/helpers/tracking/tiktokpixel.js +15 -1
- package/dist/esm/helpers/typography.js +149 -17
- package/dist/esm/helpers/variant.js +9 -1
- package/dist/esm/hooks/animation/useAnimationActions.js +37 -1
- package/dist/esm/hooks/animation/useAnimationConfig.js +28 -1
- package/dist/esm/hooks/animation/useAnimationPreview.js +29 -1
- package/dist/esm/hooks/animation/useAnimationTarget.js +120 -1
- package/dist/esm/hooks/animation/useApplyAnimation.js +85 -1
- package/dist/esm/hooks/articles/useArticlesQuery.js +30 -1
- package/dist/esm/hooks/cart/use-add-to-cart.js +18 -1
- package/dist/esm/hooks/cart/use-cart-data.js +26 -1
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +18 -1
- package/dist/esm/hooks/cart/use-cart-note-update.js +18 -1
- package/dist/esm/hooks/cart/use-create-cart.js +20 -1
- package/dist/esm/hooks/cart/use-remove-cart-item.js +18 -1
- package/dist/esm/hooks/cart/use-update-cart-item.js +18 -1
- package/dist/esm/hooks/shop/use-collection-query.js +20 -1
- package/dist/esm/hooks/shop/use-collections-query.js +15 -1
- package/dist/esm/hooks/shop/use-product-query.js +20 -1
- package/dist/esm/hooks/shop/use-products-query.js +59 -1
- package/dist/esm/hooks/shop.js +111 -1
- package/dist/esm/hooks/use-current-device.js +28 -1
- package/dist/esm/hooks/use-lazy-video.js +13 -1
- package/dist/esm/hooks/useAnimations.js +27 -1
- package/dist/esm/hooks/useCartId.js +40 -1
- package/dist/esm/hooks/useCartLine.js +7 -1
- package/dist/esm/hooks/useCartUI.js +44 -1
- package/dist/esm/hooks/useCollection.js +7 -1
- package/dist/esm/hooks/useFetchHandle.js +11 -1
- package/dist/esm/hooks/useFormatMoney.js +71 -1
- package/dist/esm/hooks/useInitialSwatchesOptions.js +124 -1
- package/dist/esm/hooks/useInteraction.js +17 -0
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +6 -1
- package/dist/esm/hooks/useLoadScript.js +28 -1
- package/dist/esm/hooks/useMoney.js +80 -1
- package/dist/esm/hooks/usePrevious.js +17 -1
- package/dist/esm/hooks/useProduct.js +228 -1
- package/dist/esm/hooks/useProductList.js +16 -1
- package/dist/esm/hooks/useSuspenseFetch.js +23 -1
- package/dist/esm/hooks/useSwatchesOptions.js +37 -1
- package/dist/esm/hooks/useToolbarPostPurchase.js +87 -1
- package/dist/esm/index.js +117 -1
- package/dist/esm/types/animations.js +49 -1
- package/dist/esm/types/custom.js +52 -0
- package/dist/esm/types/global-style.js +12 -1
- package/dist/esm/web-components/src/helpers/styles/constant.js +7 -1
- package/dist/types/index.d.ts +23183 -17335
- package/package.json +5 -3
- package/dist/cjs/components/animation/AnimationWrapper.js +0 -1
- package/dist/cjs/hooks/animation/animations.js +0 -1
- package/dist/cjs/hooks/animation/useLivePageAnimation.js +0 -1
- package/dist/esm/components/animation/AnimationWrapper.js +0 -1
- package/dist/esm/hooks/animation/animations.js +0 -1
- package/dist/esm/hooks/animation/useLivePageAnimation.js +0 -1
|
@@ -1 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
|
|
7
|
+
const PageContext = /*#__PURE__*/ react.createContext(null);
|
|
8
|
+
const createPageStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
9
|
+
...data,
|
|
10
|
+
setDynamicProduct: (data)=>{
|
|
11
|
+
set({
|
|
12
|
+
dynamicProduct: data
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
setDynamicCollection: (data)=>{
|
|
16
|
+
set({
|
|
17
|
+
dynamicCollection: data
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
setPostPurchaseProductOffers: (productOffers)=>{
|
|
21
|
+
set({
|
|
22
|
+
productOffers: productOffers
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
setSalePageProductId: (id)=>{
|
|
26
|
+
set({
|
|
27
|
+
salePageProductId: id
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
setPublicStoreFrontData: (publicStoreFrontData)=>{
|
|
31
|
+
set({
|
|
32
|
+
publicStoreFrontData: publicStoreFrontData
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
setInteractionIsSelectOnPage: (value)=>{
|
|
36
|
+
set((state)=>({
|
|
37
|
+
interactionData: {
|
|
38
|
+
...state.interactionData,
|
|
39
|
+
isSelectOnPage: value
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
},
|
|
43
|
+
setInteractionItem: (item)=>{
|
|
44
|
+
set((state)=>({
|
|
45
|
+
interactionData: {
|
|
46
|
+
...state.interactionData,
|
|
47
|
+
item,
|
|
48
|
+
isSelectOnPage: state.interactionData?.isSelectOnPage || false
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
},
|
|
52
|
+
setInteractionSelectType: (selectType)=>{
|
|
53
|
+
set((state)=>({
|
|
54
|
+
interactionData: {
|
|
55
|
+
...state.interactionData,
|
|
56
|
+
selectType
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
},
|
|
60
|
+
setInteractionSettingType: (settingType)=>{
|
|
61
|
+
set((state)=>({
|
|
62
|
+
interactionData: {
|
|
63
|
+
...state.interactionData,
|
|
64
|
+
settingType
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
},
|
|
68
|
+
setSidebarMode: (mode)=>{
|
|
69
|
+
set(()=>({
|
|
70
|
+
sidebarMode: mode
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
|
|
75
|
+
const store = react.useMemo(()=>createPageStoreProvider({
|
|
76
|
+
dynamicProduct,
|
|
77
|
+
dynamicCollection,
|
|
78
|
+
productOffers,
|
|
79
|
+
publicStoreFrontData,
|
|
80
|
+
interactionData: {
|
|
81
|
+
selectType: 'ELEMENT'
|
|
82
|
+
}
|
|
83
|
+
}), [
|
|
84
|
+
dynamicProduct,
|
|
85
|
+
dynamicCollection,
|
|
86
|
+
productOffers,
|
|
87
|
+
publicStoreFrontData
|
|
88
|
+
]);
|
|
89
|
+
return /*#__PURE__*/ jsxRuntime.jsx(PageContext.Provider, {
|
|
90
|
+
...passProps,
|
|
91
|
+
value: store,
|
|
92
|
+
children: children
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const usePageStore = (selector, equalityFn)=>{
|
|
96
|
+
const store = react.useContext(PageContext);
|
|
97
|
+
if (!store) {
|
|
98
|
+
throw new Error('usePageStore must be used within a PageProvider');
|
|
99
|
+
}
|
|
100
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
exports.PageProvider = PageProvider;
|
|
104
|
+
exports.usePageStore = usePageStore;
|
|
@@ -1 +1,177 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
require('swr');
|
|
7
|
+
require('@gem-sdk/adapter-shopify');
|
|
8
|
+
require('swr/mutation');
|
|
9
|
+
require('swr/infinite');
|
|
10
|
+
require('vanilla-lazyload');
|
|
11
|
+
require('../hooks/useCartUI.js');
|
|
12
|
+
var variant = require('../helpers/variant.js');
|
|
13
|
+
require('react-transition-group');
|
|
14
|
+
require('@gem-sdk/core');
|
|
15
|
+
require('classnames');
|
|
16
|
+
require('dayjs');
|
|
17
|
+
var flattenConnection = require('../helpers/flatten-connection.js');
|
|
18
|
+
require('../helpers/convert.js');
|
|
19
|
+
|
|
20
|
+
// const { Provider, useStore } = createContext<StoreApi<ProductContextProps>>();
|
|
21
|
+
const ProductContext = /*#__PURE__*/ react.createContext(null);
|
|
22
|
+
const createProductStoreProvider = (data)=>zustand.createStore((set, get)=>({
|
|
23
|
+
...data,
|
|
24
|
+
updateProperty: (name, data)=>{
|
|
25
|
+
set((state)=>{
|
|
26
|
+
return {
|
|
27
|
+
properties: state.properties?.map((v)=>{
|
|
28
|
+
if (v.key === name) {
|
|
29
|
+
return {
|
|
30
|
+
...v,
|
|
31
|
+
...data
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return v;
|
|
35
|
+
})
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
setUseProductCompareAtPrice: (value)=>{
|
|
40
|
+
set({
|
|
41
|
+
useProductCompareAtPrice: value
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
addProperty: (data)=>{
|
|
45
|
+
const properties = get().properties;
|
|
46
|
+
if (!properties?.some((v)=>v.key === data.key)) {
|
|
47
|
+
set((state)=>({
|
|
48
|
+
properties: [
|
|
49
|
+
...state.properties ?? [],
|
|
50
|
+
data
|
|
51
|
+
]
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
removeProperty: (name)=>{
|
|
56
|
+
set((state)=>({
|
|
57
|
+
properties: state.properties?.filter((v)=>v.key !== name)
|
|
58
|
+
}));
|
|
59
|
+
},
|
|
60
|
+
setQuantity: (num)=>{
|
|
61
|
+
set({
|
|
62
|
+
quantity: num > 0 ? num : 1
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
setProductFeaturedImage: (image)=>{
|
|
66
|
+
set({
|
|
67
|
+
featuredImageGlobal: image
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
incrementQuantity: ()=>{
|
|
71
|
+
set((state)=>{
|
|
72
|
+
const quantity = state.quantity ?? 1;
|
|
73
|
+
return {
|
|
74
|
+
quantity: quantity + 1
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
decrementQuantity: ()=>{
|
|
79
|
+
set((state)=>{
|
|
80
|
+
const quantity = state.quantity ?? 1;
|
|
81
|
+
return {
|
|
82
|
+
quantity: quantity > 2 ? quantity - 1 : 1
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
setSelectedOption: (optionId, optionValue)=>{
|
|
87
|
+
set((state)=>{
|
|
88
|
+
if (optionId && optionValue) {
|
|
89
|
+
return {
|
|
90
|
+
selectedOptions: {
|
|
91
|
+
...state?.selectedOptions,
|
|
92
|
+
[optionId]: optionValue
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return state;
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
forceSelectedOption: (value)=>{
|
|
100
|
+
set((state)=>{
|
|
101
|
+
return {
|
|
102
|
+
selectedOptions: {
|
|
103
|
+
...state?.selectedOptions,
|
|
104
|
+
...value
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
updateIsSubmit: (value)=>{
|
|
110
|
+
set({
|
|
111
|
+
isSubmit: value
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
setHasUpdatePriceFollowQuantity: (updatePrice)=>{
|
|
115
|
+
set({
|
|
116
|
+
updatePrice
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
setHasPreSelected: (value)=>{
|
|
120
|
+
set({
|
|
121
|
+
hasPreSelected: value
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct })=>{
|
|
126
|
+
const uiqueId = react.useId();
|
|
127
|
+
const store = react.useMemo(()=>{
|
|
128
|
+
let selectedOptions = {};
|
|
129
|
+
let featuredImageGlobal = undefined;
|
|
130
|
+
if (product) {
|
|
131
|
+
const variants = flattenConnection.flattenConnection(product.variants);
|
|
132
|
+
const firstVariant = variants[0];
|
|
133
|
+
const firstVariantInStock = variants.find((item)=>variant.checkInStock(item));
|
|
134
|
+
const initialVariant = variants.find((v)=>v?.id === initialVariantId) ?? firstVariantInStock ?? firstVariant;
|
|
135
|
+
selectedOptions = initialVariant?.selectedOptions.reduce((acc, option)=>{
|
|
136
|
+
if (option.name) {
|
|
137
|
+
return {
|
|
138
|
+
...acc,
|
|
139
|
+
[option.name]: option.value
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return acc;
|
|
143
|
+
}, {});
|
|
144
|
+
featuredImageGlobal = product.medias?.edges.find((v)=>v.node?.id === initialVariant?.mediaId)?.node ?? product.featuredImage;
|
|
145
|
+
}
|
|
146
|
+
return createProductStoreProvider({
|
|
147
|
+
product,
|
|
148
|
+
quantity,
|
|
149
|
+
selectedOptions,
|
|
150
|
+
uiqueId,
|
|
151
|
+
featuredImageGlobal,
|
|
152
|
+
isSyncProduct
|
|
153
|
+
});
|
|
154
|
+
}, [
|
|
155
|
+
initialVariantId,
|
|
156
|
+
product,
|
|
157
|
+
quantity,
|
|
158
|
+
uiqueId,
|
|
159
|
+
isSyncProduct
|
|
160
|
+
]);
|
|
161
|
+
return /*#__PURE__*/ jsxRuntime.jsx(ProductContext.Provider, {
|
|
162
|
+
value: store,
|
|
163
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
164
|
+
children: children
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
const useProductStore = (selector, equalityFn)=>{
|
|
169
|
+
const store = react.useContext(ProductContext);
|
|
170
|
+
if (!store) {
|
|
171
|
+
throw new Error('Element of product must be used inside a Product');
|
|
172
|
+
}
|
|
173
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
exports.ProductProvider = ProductProvider;
|
|
177
|
+
exports.useProductStore = useProductStore;
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
|
|
7
|
+
const ProductListContext = /*#__PURE__*/ react.createContext(null);
|
|
8
|
+
const createProductListProvider = (data)=>zustand.createStore(()=>({
|
|
9
|
+
...data
|
|
10
|
+
}));
|
|
11
|
+
const ProductListProvider = ({ children, collection, products, settings, styles })=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx(ProductListContext.Provider, {
|
|
13
|
+
value: createProductListProvider({
|
|
14
|
+
products,
|
|
15
|
+
collection,
|
|
16
|
+
settings,
|
|
17
|
+
styles
|
|
18
|
+
}),
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const useProductListStore = (selector, equalityFn)=>{
|
|
23
|
+
const store = react.useContext(ProductListContext);
|
|
24
|
+
if (!store) {
|
|
25
|
+
throw new Error('useProductListStore must be used within a useProductListStore');
|
|
26
|
+
}
|
|
27
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.ProductListContext = ProductListContext;
|
|
31
|
+
exports.ProductListProvider = ProductListProvider;
|
|
32
|
+
exports.useProductListStore = useProductListStore;
|
|
@@ -1 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var zustand = require('zustand');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var cloneDeep = require('../helpers/clone-deep.js');
|
|
7
|
+
var normalizeBuilderData = require('../helpers/normalize-builder-data.js');
|
|
8
|
+
|
|
9
|
+
const SectionContext = /*#__PURE__*/ react.createContext(null);
|
|
10
|
+
const createSectionProvider = (data)=>zustand.createStore((set, get)=>({
|
|
11
|
+
data: data ?? {},
|
|
12
|
+
getSection: (id)=>{
|
|
13
|
+
const section = get().data[id];
|
|
14
|
+
return section ?? undefined;
|
|
15
|
+
},
|
|
16
|
+
addSection: (id, data)=>{
|
|
17
|
+
const item = normalizeBuilderData.normalizeBuilderData(data);
|
|
18
|
+
set((prev)=>({
|
|
19
|
+
data: {
|
|
20
|
+
...prev.data,
|
|
21
|
+
[id]: cloneDeep.cloneDeep(item)
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
},
|
|
25
|
+
removeSection: (id)=>{
|
|
26
|
+
set((prev)=>{
|
|
27
|
+
const { [id]: _, ...rest } = prev.data;
|
|
28
|
+
return {
|
|
29
|
+
data: rest
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
const SectionProvider = ({ children, data, ...passProps })=>{
|
|
35
|
+
return /*#__PURE__*/ jsxRuntime.jsx(SectionContext.Provider, {
|
|
36
|
+
...passProps,
|
|
37
|
+
value: createSectionProvider(data),
|
|
38
|
+
children: children
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
// export const useSectionStore = useStore;
|
|
42
|
+
const useSectionStore = (selector, equalityFn)=>{
|
|
43
|
+
const store = react.useContext(SectionContext);
|
|
44
|
+
if (!store) {
|
|
45
|
+
throw new Error('useSectionStore must be used within a SectionProvider');
|
|
46
|
+
}
|
|
47
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
48
|
+
};
|
|
49
|
+
const useSection = (id)=>useSectionStore((s)=>s.getSection(id));
|
|
50
|
+
|
|
51
|
+
exports.SectionProvider = SectionProvider;
|
|
52
|
+
exports.useSection = useSection;
|
|
53
|
+
exports.useSectionStore = useSectionStore;
|
|
@@ -1 +1,107 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var useSWR = require('swr');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var AddonContext = require('./AddonContext.js');
|
|
8
|
+
var ModalContext = require('./ModalContext.js');
|
|
9
|
+
|
|
10
|
+
const ShopContext = /*#__PURE__*/ react.createContext(null);
|
|
11
|
+
const createShopStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
12
|
+
mobileOnly: false,
|
|
13
|
+
isStorefront: true,
|
|
14
|
+
...data,
|
|
15
|
+
changeLocale: (locale)=>{
|
|
16
|
+
set({
|
|
17
|
+
locale
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
changeCurrency: (currency)=>{
|
|
21
|
+
set({
|
|
22
|
+
currency
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
changeSwatches: (swatches)=>{
|
|
26
|
+
set({
|
|
27
|
+
swatches
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
changeLayoutSettings: (layoutSettings)=>{
|
|
31
|
+
set({
|
|
32
|
+
layoutSettings
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
changeStorefrontInfo: ({ url, token })=>{
|
|
36
|
+
set({
|
|
37
|
+
storefrontUrl: url,
|
|
38
|
+
storefrontToken: token
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
changeCreateThemeSectionCount: (count)=>{
|
|
42
|
+
set({
|
|
43
|
+
createThemeSectionCount: count
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
changeShopPlan: (plan)=>{
|
|
47
|
+
set({
|
|
48
|
+
plan
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
changeLimitCreateThemeSection: (data)=>{
|
|
52
|
+
set({
|
|
53
|
+
limitCreateThemeSection: data
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
57
|
+
const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps })=>{
|
|
58
|
+
const store = react.useMemo(()=>createShopStoreProvider(storeOption), [
|
|
59
|
+
storeOption
|
|
60
|
+
]);
|
|
61
|
+
const onUpdateLimitation = react.useCallback((e)=>{
|
|
62
|
+
const isAllow = !!e.detail?.isAllow;
|
|
63
|
+
const maxGenerateCount = e.detail?.maxGenerateCount;
|
|
64
|
+
const nextQuota = e.detail?.nextQuota;
|
|
65
|
+
store.setState({
|
|
66
|
+
generateContentLimitation: {
|
|
67
|
+
isAllow,
|
|
68
|
+
maxGenerateCount,
|
|
69
|
+
nextQuota
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}, [
|
|
73
|
+
store
|
|
74
|
+
]);
|
|
75
|
+
react.useEffect(()=>{
|
|
76
|
+
window.addEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
|
|
77
|
+
return ()=>{
|
|
78
|
+
window.removeEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
|
|
79
|
+
};
|
|
80
|
+
}, [
|
|
81
|
+
onUpdateLimitation
|
|
82
|
+
]);
|
|
83
|
+
return /*#__PURE__*/ jsxRuntime.jsx(AddonContext.AddonProvider, {
|
|
84
|
+
components: addons,
|
|
85
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(useSWR.SWRConfig, {
|
|
86
|
+
value: queryOption,
|
|
87
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ShopContext.Provider, {
|
|
88
|
+
...passProps,
|
|
89
|
+
value: store,
|
|
90
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ModalContext.ModalProvider, {
|
|
91
|
+
children: children
|
|
92
|
+
})
|
|
93
|
+
}, JSON.stringify(storeOption))
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
// export const useShopStore = useStore;
|
|
98
|
+
const useShopStore = (selector, equalityFn)=>{
|
|
99
|
+
const store = react.useContext(ShopContext);
|
|
100
|
+
if (!store) {
|
|
101
|
+
throw new Error('useShopStore must be used within a ShopProvider');
|
|
102
|
+
}
|
|
103
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
exports.ShopProvider = ShopProvider;
|
|
107
|
+
exports.useShopStore = useShopStore;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const AnalyticSelect = `
|
|
2
4
|
fragment AnalyticSelect on Analytic {
|
|
3
5
|
fbPixelID
|
|
4
6
|
gaTrackingID
|
|
5
7
|
tiktokPixelID
|
|
6
8
|
}
|
|
7
|
-
`;
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
exports.AnalyticSelect = AnalyticSelect;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const CollectionDetailSelect = `
|
|
2
4
|
fragment CollectionDetailSelect on Collection {
|
|
3
5
|
id
|
|
4
6
|
createdAt
|
|
@@ -20,4 +22,6 @@
|
|
|
20
22
|
isStorefront
|
|
21
23
|
isSample
|
|
22
24
|
}
|
|
23
|
-
`;
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports.CollectionDetailSelect = CollectionDetailSelect;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const CollectionProductSelect = `
|
|
2
4
|
fragment CollectionProductSelect on Collection {
|
|
3
5
|
...CollectionDetailSelect
|
|
4
6
|
products(
|
|
@@ -19,4 +21,6 @@
|
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
|
-
`;
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports.CollectionProductSelect = CollectionProductSelect;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const CollectionSelect = `
|
|
2
4
|
fragment CollectionSelect on Collection {
|
|
3
5
|
...CollectionDetailSelect
|
|
4
6
|
products {
|
|
@@ -17,4 +19,6 @@
|
|
|
17
19
|
totalCount
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
|
-
`;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports.CollectionSelect = CollectionSelect;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const CustomCodeSelect = `
|
|
2
4
|
fragment CustomCodeSelect on CustomCode {
|
|
3
5
|
body
|
|
4
6
|
header
|
|
5
7
|
}
|
|
6
|
-
`;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
exports.CustomCodeSelect = CustomCodeSelect;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const CustomFontSelect = `
|
|
2
4
|
fragment CustomFontSelect on CustomFont {
|
|
3
5
|
backupFilePath
|
|
4
6
|
fontFamily
|
|
@@ -7,4 +9,6 @@
|
|
|
7
9
|
mimeType
|
|
8
10
|
filePath
|
|
9
11
|
}
|
|
10
|
-
`;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
exports.CustomFontSelect = CustomFontSelect;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const MediaSelect = `
|
|
2
4
|
fragment MediaSelect on Media {
|
|
3
5
|
id
|
|
4
6
|
contentType
|
|
@@ -8,4 +10,6 @@
|
|
|
8
10
|
height
|
|
9
11
|
alt
|
|
10
12
|
}
|
|
11
|
-
`;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports.MediaSelect = MediaSelect;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const PreviewThemePageSelect = `
|
|
4
|
+
fragment PreviewThemePageSelect on PreviewThemePage {
|
|
5
|
+
id
|
|
6
|
+
name
|
|
7
|
+
handle
|
|
8
|
+
isMobile
|
|
9
|
+
sectionPosition
|
|
10
|
+
pageSections {
|
|
11
|
+
cid
|
|
12
|
+
component
|
|
13
|
+
id
|
|
14
|
+
}
|
|
15
|
+
dataSEO {
|
|
16
|
+
...DataSEOSelect
|
|
17
|
+
}
|
|
18
|
+
themeStyle {
|
|
19
|
+
id
|
|
20
|
+
data
|
|
21
|
+
name
|
|
22
|
+
}
|
|
23
|
+
analytic {
|
|
24
|
+
...AnalyticSelect
|
|
25
|
+
}
|
|
26
|
+
customCode {
|
|
27
|
+
...CustomCodeSelect
|
|
28
|
+
}
|
|
29
|
+
customFonts {
|
|
30
|
+
...CustomFontSelect
|
|
31
|
+
}
|
|
32
|
+
interaction {
|
|
33
|
+
id
|
|
34
|
+
value
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports.PreviewThemePageSelect = PreviewThemePageSelect;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const ProductLittleSelect = `
|
|
2
4
|
fragment ProductLittleSelect on Product {
|
|
3
5
|
id
|
|
4
6
|
title
|
|
5
7
|
description
|
|
6
8
|
descriptionHtml
|
|
9
|
+
createdAt
|
|
7
10
|
handle
|
|
8
11
|
averageRating
|
|
9
12
|
isStorefront
|
|
@@ -27,4 +30,6 @@
|
|
|
27
30
|
}
|
|
28
31
|
tags
|
|
29
32
|
}
|
|
30
|
-
`;
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
exports.ProductLittleSelect = ProductLittleSelect;
|