@gem-sdk/core 3.0.0-pre-production.14 → 3.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/README.md +1 -1
- package/dist/cjs/components/AddOn.js +2 -18
- package/dist/cjs/components/ComponentAnimation.js +2 -17
- package/dist/cjs/components/ComponentToolbarPreview.js +2 -752
- package/dist/cjs/components/ComponentWrapper.js +2 -61
- package/dist/cjs/components/ComponentWrapperPreview.js +2 -213
- package/dist/cjs/components/Empty.js +2 -7
- package/dist/cjs/components/InteractionSuffix.js +2 -42
- package/dist/cjs/components/Render.js +2 -75
- package/dist/cjs/components/Render.liquid.js +16 -307
- package/dist/cjs/components/RenderBlock.js +2 -54
- package/dist/cjs/components/RenderCustomCode.js +4 -59
- package/dist/cjs/components/RenderPreview.js +2 -67
- package/dist/cjs/components/RenderSection.js +2 -23
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +2 -252
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +2 -85
- package/dist/cjs/components/ai-generator/components/PickProduct.js +2 -220
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +2 -77
- package/dist/cjs/components/ai-generator/hooks/useCheckingProductInside.js +1 -47
- package/dist/cjs/components/ai-generator/hooks/useFlipPopup.js +1 -110
- package/dist/cjs/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -37
- package/dist/cjs/components/ai-generator/hooks/useListenEventGenerate.js +1 -70
- package/dist/cjs/components/ai-generator/icons/AIIcon.js +2 -67
- package/dist/cjs/components/ai-generator/icons/CloseIcon.js +2 -19
- package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +2 -37
- package/dist/cjs/components/ai-generator/icons/SearchIcon.js +2 -21
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +2 -21
- package/dist/cjs/components/ai-generator/icons/UpgradeIcon.js +2 -27
- package/dist/cjs/components/ai-generator/icons/WarningIcon.js +2 -31
- package/dist/cjs/components/constant.js +1 -82
- package/dist/cjs/components/resize/Resize.js +2 -16
- package/dist/cjs/components/resize/Spacing.js +2 -260
- package/dist/cjs/components/src/product/helpers/variant-presets.js +1 -56
- package/dist/cjs/components/theme-section/CreateThemeSection.js +2 -123
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +2 -45
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +2 -126
- package/dist/cjs/components/toolbar/Tooltip.js +2 -28
- package/dist/cjs/constants/device.js +1 -0
- package/dist/cjs/contexts/AddonContext.js +2 -36
- package/dist/cjs/contexts/ArticleContext.js +2 -39
- package/dist/cjs/contexts/ArticleListContext.js +2 -31
- package/dist/cjs/contexts/BuilderComponent.js +2 -34
- package/dist/cjs/contexts/BuilderContext.js +2 -39
- package/dist/cjs/contexts/BuilderPreviewContext.js +2 -482
- package/dist/cjs/contexts/CartLineContext.js +2 -29
- package/dist/cjs/contexts/CollectionContext.js +2 -38
- package/dist/cjs/contexts/I18nContext.js +2 -0
- package/dist/cjs/contexts/ModalContext.js +2 -47
- package/dist/cjs/contexts/PageContext.js +2 -111
- package/dist/cjs/contexts/ProductContext.js +2 -182
- package/dist/cjs/contexts/ProductListContext.js +2 -32
- package/dist/cjs/contexts/SectionContext.js +2 -53
- package/dist/cjs/contexts/ShopContext.js +2 -107
- package/dist/cjs/graphql/fragments/analytic.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection-detail.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection-product.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection.generated.js +2 -6
- package/dist/cjs/graphql/fragments/custom-code.generated.js +2 -6
- package/dist/cjs/graphql/fragments/custom-font.generated.js +7 -7
- package/dist/cjs/graphql/fragments/data-seo.generated.js +2 -6
- package/dist/cjs/graphql/fragments/media.generated.js +2 -6
- package/dist/cjs/graphql/fragments/preview-theme-page.generated.js +6 -6
- package/dist/cjs/graphql/fragments/product-little.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product-option-value.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product-option.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-custom-section.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-page-section.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +4 -18
- package/dist/cjs/graphql/fragments/published-theme-style.generated.js +2 -6
- package/dist/cjs/graphql/fragments/selected-option.generated.js +2 -6
- package/dist/cjs/graphql/fragments/variant.generated.js +2 -6
- package/dist/cjs/graphql/mutations/page-view-up.generated.js +2 -6
- package/dist/cjs/graphql/queries/articles.generated.js +2 -6
- package/dist/cjs/graphql/queries/blogs.generated.js +3 -6
- package/dist/cjs/graphql/queries/collection-detail-filter.generated.js +2 -16
- package/dist/cjs/graphql/queries/collection.generated.js +2 -14
- package/dist/cjs/graphql/queries/collections.generated.js +2 -9
- package/dist/cjs/graphql/queries/preview-page.generated.js +2 -12
- package/dist/cjs/graphql/queries/product-little-detail.generated.js +2 -11
- package/dist/cjs/graphql/queries/product-medias.generated.js +2 -8
- package/dist/cjs/graphql/queries/product-value-label.generated.js +2 -6
- package/dist/cjs/graphql/queries/product-variants.generated.js +3 -11
- package/dist/cjs/graphql/queries/products.generated.js +3 -17
- package/dist/cjs/graphql/queries/{published-shop-metas.js → published-shop-metas.generated.js} +2 -6
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +3 -19
- package/dist/cjs/graphql/queries/shop-shopify.generated.js +2 -6
- package/dist/cjs/graphql/queries/store-property.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/LibraryTemplate.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/SaleFunnelOffer.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/ShopLibraryPage.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/ThemePage.generated.js +2 -6
- package/dist/cjs/helpers/GlobalEvent.js +1 -19
- package/dist/cjs/helpers/align.js +1 -37
- package/dist/cjs/helpers/animations.js +1 -222
- package/dist/cjs/helpers/background.js +1 -236
- package/dist/cjs/helpers/backgroundImage.js +1 -0
- package/dist/cjs/helpers/borders.js +4 -198
- package/dist/cjs/helpers/carousel.js +1 -55
- package/dist/cjs/helpers/clone-deep.js +1 -5
- package/dist/cjs/helpers/cls.js +1 -16
- package/dist/cjs/helpers/colors.js +1 -184
- package/dist/cjs/helpers/compose-advance-style.js +1 -323
- package/dist/cjs/helpers/composeClasses.js +1 -0
- package/dist/cjs/helpers/const.js +1 -0
- package/dist/cjs/helpers/constant.js +1 -23
- package/dist/cjs/helpers/convert.js +1 -7
- package/dist/cjs/helpers/covert-entities-html.js +1 -19
- package/dist/cjs/helpers/css-variable.js +1 -7
- package/dist/cjs/helpers/email.js +1 -11
- package/dist/cjs/helpers/filter-styles.js +1 -0
- package/dist/cjs/helpers/filter-toolbar-preview.js +2 -14
- package/dist/cjs/helpers/flatten-connection.js +1 -9
- package/dist/cjs/helpers/get-resonsive-value.js +1 -36
- package/dist/cjs/helpers/get-shortname.js +1 -92
- package/dist/cjs/helpers/icon-list.js +1 -61
- package/dist/cjs/helpers/interaction/index.js +2 -134
- package/dist/cjs/helpers/is-browser.js +1 -9
- package/dist/cjs/helpers/is-defined.js +1 -7
- package/dist/cjs/helpers/is-empty-children.js +2 -15
- package/dist/cjs/helpers/is-safari.js +1 -9
- package/dist/cjs/helpers/layout.js +1 -76
- package/dist/cjs/helpers/load-script.js +1 -31
- package/dist/cjs/helpers/loop-component.js +1 -16
- package/dist/cjs/helpers/make-style.js +1 -163
- package/dist/cjs/helpers/normalize-builder-data.js +1 -23
- package/dist/cjs/helpers/pascal-to-kebab-case.js +1 -7
- package/dist/cjs/helpers/prefetch-queries.js +1 -78
- package/dist/cjs/helpers/product.js +1 -48
- package/dist/cjs/helpers/queries/get-collection.js +1 -226
- package/dist/cjs/helpers/queries/get-collections.js +1 -21
- package/dist/cjs/helpers/queries/get-product-by-slug.js +1 -125
- package/dist/cjs/helpers/queries/get-product.js +1 -154
- package/dist/cjs/helpers/queries/get-products.js +1 -214
- package/dist/cjs/helpers/query.js +1 -29
- package/dist/cjs/helpers/radius.js +6 -140
- package/dist/cjs/helpers/render.js +1 -91
- package/dist/cjs/helpers/shadow.js +1 -69
- package/dist/cjs/helpers/size.js +4 -228
- package/dist/cjs/helpers/spacing.js +1 -43
- package/dist/cjs/helpers/third-party/addAppBlockId.js +1 -20
- package/dist/cjs/helpers/third-party/appConfig.js +1 -416
- package/dist/cjs/helpers/third-party/appSetting.js +1 -1324
- package/dist/cjs/helpers/third-party/composeAppBlockId.js +1 -11
- package/dist/cjs/helpers/third-party/constant.js +1 -69
- package/dist/cjs/helpers/third-party/generateAppBlockConfigs.js +1 -34
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +1 -55
- package/dist/cjs/helpers/third-party/getAppBlockType.js +1 -12
- package/dist/cjs/helpers/third-party/getAppBlocks.js +1 -30
- package/dist/cjs/helpers/third-party/mergeBlock.js +1 -19
- package/dist/cjs/helpers/third-party/mergeBlockOrder.js +1 -47
- package/dist/cjs/helpers/third-party/removeGPAppItems.js +1 -18
- package/dist/cjs/helpers/tracking/fpixel.js +1 -28
- package/dist/cjs/helpers/tracking/gtag.js +1 -93
- package/dist/cjs/helpers/tracking/tiktokpixel.js +1 -17
- package/dist/cjs/helpers/typography.js +19 -160
- package/dist/cjs/helpers/variant.js +1 -11
- package/dist/cjs/hooks/animation/useAnimationActions.js +2 -39
- package/dist/cjs/hooks/animation/useAnimationConfig.js +2 -30
- package/dist/cjs/hooks/animation/useAnimationPreview.js +2 -31
- package/dist/cjs/hooks/animation/useAnimationTarget.js +2 -122
- package/dist/cjs/hooks/animation/useApplyAnimation.js +2 -89
- package/dist/cjs/hooks/articles/useArticlesQuery.js +2 -33
- package/dist/cjs/hooks/cart/use-add-to-cart.js +2 -20
- package/dist/cjs/hooks/cart/use-cart-data.js +2 -28
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +2 -20
- package/dist/cjs/hooks/cart/use-cart-note-update.js +2 -20
- package/dist/cjs/hooks/cart/use-create-cart.js +2 -22
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +2 -20
- package/dist/cjs/hooks/cart/use-update-cart-item.js +2 -20
- package/dist/cjs/hooks/shop/use-collection-query.js +2 -22
- package/dist/cjs/hooks/shop/use-collections-query.js +2 -17
- package/dist/cjs/hooks/shop/use-product-query.js +2 -22
- package/dist/cjs/hooks/shop/use-products-query.js +2 -63
- package/dist/cjs/hooks/shop/useShopifyLink.js +2 -0
- package/dist/cjs/hooks/shop.js +2 -135
- package/dist/cjs/hooks/use-current-device.js +2 -30
- package/dist/cjs/hooks/use-lazy-video.js +2 -15
- package/dist/cjs/hooks/useAnimations.js +2 -29
- package/dist/cjs/hooks/useCartId.js +2 -44
- package/dist/cjs/hooks/useCartLine.js +2 -11
- package/dist/cjs/hooks/useCartUI.js +2 -48
- package/dist/cjs/hooks/useCollection.js +2 -9
- package/dist/cjs/hooks/useFetchHandle.js +2 -13
- package/dist/cjs/hooks/useFormatMoney.js +2 -75
- package/dist/cjs/hooks/useI18n.js +2 -0
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +2 -127
- package/dist/cjs/hooks/useInteraction.js +2 -19
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +2 -10
- package/dist/cjs/hooks/useLoadScript.js +2 -32
- package/dist/cjs/hooks/useMoney.js +2 -84
- package/dist/cjs/hooks/usePrevious.js +2 -19
- package/dist/cjs/hooks/useProduct.js +2 -250
- package/dist/cjs/hooks/useProductList.js +2 -21
- package/dist/cjs/hooks/useStickyStore.js +1 -0
- package/dist/cjs/hooks/useSuspenseFetch.js +2 -27
- package/dist/cjs/hooks/useSwatchesOptions.js +2 -41
- package/dist/cjs/hooks/useToolbarPostPurchase.js +2 -89
- package/dist/cjs/index.js +1 -425
- package/dist/cjs/types/animations.js +1 -49
- package/dist/cjs/types/appAPI.js +1 -2
- package/dist/cjs/types/custom.js +1 -52
- package/dist/cjs/types/global-style.js +1 -15
- package/dist/cjs/types/shop.js +1 -2
- package/dist/esm/components/AddOn.js +2 -14
- package/dist/esm/components/ComponentAnimation.js +2 -13
- package/dist/esm/components/ComponentToolbarPreview.js +2 -748
- package/dist/esm/components/ComponentWrapper.js +2 -57
- package/dist/esm/components/ComponentWrapperPreview.js +2 -209
- package/dist/esm/components/Empty.js +2 -3
- package/dist/esm/components/InteractionSuffix.js +2 -40
- package/dist/esm/components/Render.js +2 -71
- package/dist/esm/components/Render.liquid.js +16 -301
- package/dist/esm/components/RenderBlock.js +2 -50
- package/dist/esm/components/RenderCustomCode.js +4 -55
- package/dist/esm/components/RenderPreview.js +2 -63
- package/dist/esm/components/RenderSection.js +2 -19
- package/dist/esm/components/ai-generator/AIContentGenerator.js +2 -250
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +2 -83
- package/dist/esm/components/ai-generator/components/PickProduct.js +2 -218
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +2 -75
- package/dist/esm/components/ai-generator/hooks/useCheckingProductInside.js +1 -45
- package/dist/esm/components/ai-generator/hooks/useFlipPopup.js +1 -108
- package/dist/esm/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -35
- package/dist/esm/components/ai-generator/hooks/useListenEventGenerate.js +1 -68
- package/dist/esm/components/ai-generator/icons/AIIcon.js +2 -65
- package/dist/esm/components/ai-generator/icons/CloseIcon.js +2 -17
- package/dist/esm/components/ai-generator/icons/DropdownIcon.js +2 -34
- package/dist/esm/components/ai-generator/icons/SearchIcon.js +2 -19
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +2 -19
- package/dist/esm/components/ai-generator/icons/UpgradeIcon.js +2 -25
- package/dist/esm/components/ai-generator/icons/WarningIcon.js +2 -29
- package/dist/esm/components/constant.js +1 -75
- package/dist/esm/components/resize/Resize.js +2 -12
- package/dist/esm/components/resize/Spacing.js +2 -256
- package/dist/esm/components/src/product/helpers/variant-presets.js +1 -54
- package/dist/esm/components/theme-section/CreateThemeSection.js +2 -121
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +2 -43
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +2 -124
- package/dist/esm/components/toolbar/Tooltip.js +2 -24
- package/dist/esm/constants/device.js +1 -0
- package/dist/esm/contexts/AddonContext.js +2 -32
- package/dist/esm/contexts/ArticleContext.js +2 -36
- package/dist/esm/contexts/ArticleListContext.js +2 -27
- package/dist/esm/contexts/BuilderComponent.js +2 -31
- package/dist/esm/contexts/BuilderContext.js +2 -36
- package/dist/esm/contexts/BuilderPreviewContext.js +2 -479
- package/dist/esm/contexts/CartLineContext.js +2 -26
- package/dist/esm/contexts/CollectionContext.js +2 -35
- package/dist/esm/contexts/I18nContext.js +2 -0
- package/dist/esm/contexts/ModalContext.js +2 -44
- package/dist/esm/contexts/PageContext.js +2 -108
- package/dist/esm/contexts/ProductContext.js +2 -179
- package/dist/esm/contexts/ProductListContext.js +2 -28
- package/dist/esm/contexts/SectionContext.js +2 -49
- package/dist/esm/contexts/ShopContext.js +2 -104
- package/dist/esm/graphql/fragments/analytic.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection-detail.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection-product.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection.generated.js +2 -4
- package/dist/esm/graphql/fragments/custom-code.generated.js +2 -4
- package/dist/esm/graphql/fragments/custom-font.generated.js +7 -5
- package/dist/esm/graphql/fragments/data-seo.generated.js +2 -4
- package/dist/esm/graphql/fragments/media.generated.js +2 -4
- package/dist/esm/graphql/fragments/preview-theme-page.generated.js +6 -4
- package/dist/esm/graphql/fragments/product-little.generated.js +2 -4
- package/dist/esm/graphql/fragments/product-option-value.generated.js +2 -4
- package/dist/esm/graphql/fragments/product-option.generated.js +2 -4
- package/dist/esm/graphql/fragments/product.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-custom-section.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-page-section.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +4 -16
- package/dist/esm/graphql/fragments/published-theme-style.generated.js +2 -4
- package/dist/esm/graphql/fragments/selected-option.generated.js +2 -4
- package/dist/esm/graphql/fragments/variant.generated.js +2 -4
- package/dist/esm/graphql/mutations/page-view-up.generated.js +2 -4
- package/dist/esm/graphql/queries/articles.generated.js +2 -4
- package/dist/esm/graphql/queries/blogs.generated.js +3 -4
- package/dist/esm/graphql/queries/collection-detail-filter.generated.js +10 -22
- package/dist/esm/graphql/queries/collection.generated.js +8 -18
- package/dist/esm/graphql/queries/collections.generated.js +3 -8
- package/dist/esm/graphql/queries/preview-page.generated.js +6 -14
- package/dist/esm/graphql/queries/product-little-detail.generated.js +5 -12
- package/dist/esm/graphql/queries/product-medias.generated.js +2 -6
- package/dist/esm/graphql/queries/product-value-label.generated.js +2 -4
- package/dist/esm/graphql/queries/product-variants.generated.js +5 -11
- package/dist/esm/graphql/queries/products.generated.js +9 -20
- package/dist/esm/graphql/queries/{published-shop-metas.js → published-shop-metas.generated.js} +2 -4
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +6 -20
- package/dist/esm/graphql/queries/shop-shopify.generated.js +2 -4
- package/dist/esm/graphql/queries/store-property.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/LibraryTemplate.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/SaleFunnelOffer.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/ShopLibraryPage.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/ThemePage.generated.js +2 -4
- package/dist/esm/helpers/GlobalEvent.js +1 -15
- package/dist/esm/helpers/align.js +1 -34
- package/dist/esm/helpers/animations.js +1 -220
- package/dist/esm/helpers/background.js +1 -227
- package/dist/esm/helpers/backgroundImage.js +1 -0
- package/dist/esm/helpers/borders.js +4 -189
- package/dist/esm/helpers/carousel.js +1 -51
- package/dist/esm/helpers/clone-deep.js +1 -3
- package/dist/esm/helpers/cls.js +1 -14
- package/dist/esm/helpers/colors.js +1 -169
- package/dist/esm/helpers/compose-advance-style.js +1 -315
- package/dist/esm/helpers/composeClasses.js +1 -0
- package/dist/esm/helpers/const.js +1 -0
- package/dist/esm/helpers/constant.js +1 -19
- package/dist/esm/helpers/convert.js +1 -4
- package/dist/esm/helpers/covert-entities-html.js +1 -17
- package/dist/esm/helpers/css-variable.js +1 -5
- package/dist/esm/helpers/email.js +1 -6
- package/dist/esm/helpers/filter-styles.js +1 -0
- package/dist/esm/helpers/filter-toolbar-preview.js +2 -9
- package/dist/esm/helpers/flatten-connection.js +1 -7
- package/dist/esm/helpers/get-resonsive-value.js +1 -31
- package/dist/esm/helpers/get-shortname.js +1 -90
- package/dist/esm/helpers/icon-list.js +1 -58
- package/dist/esm/helpers/interaction/index.js +2 -132
- package/dist/esm/helpers/is-browser.js +1 -5
- package/dist/esm/helpers/is-defined.js +1 -5
- package/dist/esm/helpers/is-empty-children.js +2 -10
- package/dist/esm/helpers/is-safari.js +1 -5
- package/dist/esm/helpers/layout.js +1 -70
- package/dist/esm/helpers/load-script.js +1 -29
- package/dist/esm/helpers/loop-component.js +1 -14
- package/dist/esm/helpers/make-style.js +1 -149
- package/dist/esm/helpers/normalize-builder-data.js +1 -21
- package/dist/esm/helpers/pascal-to-kebab-case.js +1 -5
- package/dist/esm/helpers/prefetch-queries.js +1 -76
- package/dist/esm/helpers/product.js +1 -44
- package/dist/esm/helpers/queries/get-collection.js +1 -223
- package/dist/esm/helpers/queries/get-collections.js +1 -19
- package/dist/esm/helpers/queries/get-product-by-slug.js +1 -123
- package/dist/esm/helpers/queries/get-product.js +1 -150
- package/dist/esm/helpers/queries/get-products.js +1 -210
- package/dist/esm/helpers/query.js +1 -25
- package/dist/esm/helpers/radius.js +6 -132
- package/dist/esm/helpers/render.js +1 -82
- package/dist/esm/helpers/shadow.js +1 -63
- package/dist/esm/helpers/size.js +4 -213
- package/dist/esm/helpers/spacing.js +1 -40
- package/dist/esm/helpers/third-party/addAppBlockId.js +1 -18
- package/dist/esm/helpers/third-party/appConfig.js +1 -356
- package/dist/esm/helpers/third-party/appSetting.js +1 -1321
- package/dist/esm/helpers/third-party/composeAppBlockId.js +1 -9
- package/dist/esm/helpers/third-party/constant.js +1 -66
- package/dist/esm/helpers/third-party/generateAppBlockConfigs.js +1 -32
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +1 -53
- package/dist/esm/helpers/third-party/getAppBlockType.js +1 -10
- package/dist/esm/helpers/third-party/getAppBlocks.js +1 -28
- package/dist/esm/helpers/third-party/mergeBlock.js +1 -17
- package/dist/esm/helpers/third-party/mergeBlockOrder.js +1 -45
- package/dist/esm/helpers/third-party/removeGPAppItems.js +1 -15
- package/dist/esm/helpers/tracking/fpixel.js +1 -24
- package/dist/esm/helpers/tracking/gtag.js +1 -87
- package/dist/esm/helpers/tracking/tiktokpixel.js +1 -15
- package/dist/esm/helpers/typography.js +19 -149
- package/dist/esm/helpers/variant.js +1 -9
- package/dist/esm/hooks/animation/useAnimationActions.js +2 -37
- package/dist/esm/hooks/animation/useAnimationConfig.js +2 -28
- package/dist/esm/hooks/animation/useAnimationPreview.js +2 -29
- package/dist/esm/hooks/animation/useAnimationTarget.js +2 -120
- package/dist/esm/hooks/animation/useApplyAnimation.js +2 -85
- package/dist/esm/hooks/articles/useArticlesQuery.js +2 -30
- package/dist/esm/hooks/cart/use-add-to-cart.js +2 -18
- package/dist/esm/hooks/cart/use-cart-data.js +2 -26
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +2 -18
- package/dist/esm/hooks/cart/use-cart-note-update.js +2 -18
- package/dist/esm/hooks/cart/use-create-cart.js +2 -20
- package/dist/esm/hooks/cart/use-remove-cart-item.js +2 -18
- package/dist/esm/hooks/cart/use-update-cart-item.js +2 -18
- package/dist/esm/hooks/shop/use-collection-query.js +2 -20
- package/dist/esm/hooks/shop/use-collections-query.js +2 -15
- package/dist/esm/hooks/shop/use-product-query.js +2 -20
- package/dist/esm/hooks/shop/use-products-query.js +2 -59
- package/dist/esm/hooks/shop/useShopifyLink.js +2 -0
- package/dist/esm/hooks/shop.js +2 -119
- package/dist/esm/hooks/use-current-device.js +2 -28
- package/dist/esm/hooks/use-lazy-video.js +2 -13
- package/dist/esm/hooks/useAnimations.js +2 -27
- package/dist/esm/hooks/useCartId.js +2 -40
- package/dist/esm/hooks/useCartLine.js +2 -7
- package/dist/esm/hooks/useCartUI.js +2 -44
- package/dist/esm/hooks/useCollection.js +2 -7
- package/dist/esm/hooks/useFetchHandle.js +2 -11
- package/dist/esm/hooks/useFormatMoney.js +2 -71
- package/dist/esm/hooks/useI18n.js +2 -0
- package/dist/esm/hooks/useInitialSwatchesOptions.js +2 -123
- package/dist/esm/hooks/useInteraction.js +2 -17
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +2 -6
- package/dist/esm/hooks/useLoadScript.js +2 -28
- package/dist/esm/hooks/useMoney.js +2 -80
- package/dist/esm/hooks/usePrevious.js +2 -17
- package/dist/esm/hooks/useProduct.js +2 -233
- package/dist/esm/hooks/useProductList.js +2 -16
- package/dist/esm/hooks/useStickyStore.js +1 -0
- package/dist/esm/hooks/useSuspenseFetch.js +2 -23
- package/dist/esm/hooks/useSwatchesOptions.js +2 -37
- package/dist/esm/hooks/useToolbarPostPurchase.js +2 -87
- package/dist/esm/index.js +1 -119
- package/dist/esm/types/animations.js +1 -49
- package/dist/esm/types/custom.js +1 -52
- package/dist/esm/types/global-style.js +1 -12
- package/dist/types/index.d.ts +12025 -8969
- package/package.json +6 -6
- package/dist/cjs/web-components/src/helpers/styles/constant.js +0 -9
- package/dist/esm/web-components/src/helpers/styles/constant.js +0 -7
|
@@ -1,752 +1,2 @@
|
|
|
1
|
-
'use
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
require('zustand');
|
|
8
|
-
var BuilderPreviewContext = require('../contexts/BuilderPreviewContext.js');
|
|
9
|
-
var PageContext = require('../contexts/PageContext.js');
|
|
10
|
-
var CreateThemeSection = require('./theme-section/CreateThemeSection.js');
|
|
11
|
-
var Tooltip = require('./toolbar/Tooltip.js');
|
|
12
|
-
var ThemeSectionStatus = require('./theme-section/ThemeSectionStatus.js');
|
|
13
|
-
var Resize = require('./resize/Resize.js');
|
|
14
|
-
var useToolbarPostPurchase = require('../hooks/useToolbarPostPurchase.js');
|
|
15
|
-
var constant = require('./constant.js');
|
|
16
|
-
var AIContentGenerator = require('./ai-generator/AIContentGenerator.js');
|
|
17
|
-
var AIGenContentLoading = require('./ai-generator/AIGenContentLoading.js');
|
|
18
|
-
var InteractionSuffix = require('./InteractionSuffix.js');
|
|
19
|
-
require('swr');
|
|
20
|
-
require('../helpers/convert.js');
|
|
21
|
-
var ShopContext = require('../contexts/ShopContext.js');
|
|
22
|
-
require('@gem-sdk/adapter-shopify');
|
|
23
|
-
require('swr/mutation');
|
|
24
|
-
require('swr/infinite');
|
|
25
|
-
require('vanilla-lazyload');
|
|
26
|
-
require('../hooks/useCartUI.js');
|
|
27
|
-
|
|
28
|
-
const SECTION_LIMIT = 25;
|
|
29
|
-
const notVisible = (el)=>{
|
|
30
|
-
const overflow = getComputedStyle(el).overflow;
|
|
31
|
-
return overflow !== 'visible';
|
|
32
|
-
};
|
|
33
|
-
const isSection = (el)=>{
|
|
34
|
-
const tag = el.getAttribute('data-component-tag');
|
|
35
|
-
return tag === 'Section';
|
|
36
|
-
};
|
|
37
|
-
const ComponentToolbarPreview = (props)=>{
|
|
38
|
-
const isThemeSection = props.isThemeSection;
|
|
39
|
-
const isShopifySection = !!props.isShopifySection;
|
|
40
|
-
const storefrontUrl = ShopContext.useShopStore((s)=>s.storefrontUrl);
|
|
41
|
-
const editingPageType = ShopContext.useShopStore((s)=>s.pageType);
|
|
42
|
-
const getParents = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getParents);
|
|
43
|
-
const root = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getItem('ROOT'));
|
|
44
|
-
const isThemeSectionEditor = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.isThemeSectionEditor);
|
|
45
|
-
const [activeAddSection, setActiveAddSection] = react.useState(null);
|
|
46
|
-
const [isShowParent, setIsShowParent] = react.useState(false);
|
|
47
|
-
const [isShowParentRevert, setIsShowParentRevert] = react.useState(false);
|
|
48
|
-
const [parents, setParents] = react.useState([]);
|
|
49
|
-
const [deleteTooltipPosition, setDeleteTooltipPosition] = react.useState('top');
|
|
50
|
-
const [isDisableDeleteInSaleFunelPage, setIsDisableDeleteInSaleFunelPage] = react.useState(false);
|
|
51
|
-
const [isActiveToolbarComponent, setIsActiveToolbarComponent] = react.useState(false);
|
|
52
|
-
const [productId, setProductId] = react.useState('');
|
|
53
|
-
const [articleUid, setArticleUid] = react.useState('');
|
|
54
|
-
const [tooltipText, setTooltipText] = react.useState({
|
|
55
|
-
width: '',
|
|
56
|
-
text: ''
|
|
57
|
-
});
|
|
58
|
-
const [isDisableDuplicateInSaleFunnelPage, setIsDisableDuplicateInSaleFunnelPage] = react.useState(false);
|
|
59
|
-
const interactionData = PageContext.usePageStore((s)=>s.interactionData);
|
|
60
|
-
const isSaleFunnelPage = react.useMemo(()=>editingPageType === 'POST_PURCHASE', [
|
|
61
|
-
editingPageType
|
|
62
|
-
]);
|
|
63
|
-
const { checkDisableDelete, getTooltipText, checkDisableDuplicate } = useToolbarPostPurchase.usePostPurchase(props.uid, props.tag || '');
|
|
64
|
-
const editProductElementList = [
|
|
65
|
-
'ProductTitle',
|
|
66
|
-
'ProductDescription',
|
|
67
|
-
'ProductPrice'
|
|
68
|
-
];
|
|
69
|
-
const editArticleElementList = [
|
|
70
|
-
'ArticleTitle',
|
|
71
|
-
'ArticleContent',
|
|
72
|
-
'ArticleImage',
|
|
73
|
-
'ArticleAuthor',
|
|
74
|
-
'ArticleCategory',
|
|
75
|
-
'ArticleDate',
|
|
76
|
-
'ArticleExcerpt',
|
|
77
|
-
'ArticleTags'
|
|
78
|
-
];
|
|
79
|
-
const editAbleElementList = [
|
|
80
|
-
...editProductElementList,
|
|
81
|
-
...editArticleElementList
|
|
82
|
-
];
|
|
83
|
-
const isOverToolbarPosition = (el, parent)=>{
|
|
84
|
-
const parentLength = parents.length;
|
|
85
|
-
const rect = el.getBoundingClientRect();
|
|
86
|
-
const rectP = parent.getBoundingClientRect();
|
|
87
|
-
// 36px = toolbar active height + 4 spaces
|
|
88
|
-
return rect.top - rectP.top < parentLength * 36;
|
|
89
|
-
};
|
|
90
|
-
const findOverflowParent = (element, initEl)=>{
|
|
91
|
-
const thisEl = element;
|
|
92
|
-
const origEl = initEl || thisEl;
|
|
93
|
-
if (!thisEl) return;
|
|
94
|
-
if (isSection(thisEl)) return;
|
|
95
|
-
if (notVisible(thisEl) && isOverToolbarPosition(initEl, thisEl)) return thisEl;
|
|
96
|
-
if (thisEl.parentElement) {
|
|
97
|
-
return findOverflowParent(thisEl.parentElement, origEl);
|
|
98
|
-
} else {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const getSectionNumber = ()=>{
|
|
103
|
-
return root?.childrens?.length || 0;
|
|
104
|
-
};
|
|
105
|
-
const getDeleteTooltipPosition = react.useCallback(()=>{
|
|
106
|
-
if (props.tag == 'Section') return 'bottom';
|
|
107
|
-
const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
|
|
108
|
-
if ($toolbar) {
|
|
109
|
-
const rect = $toolbar.getBoundingClientRect();
|
|
110
|
-
if (rect.top < 60) setDeleteTooltipPosition('bottom');
|
|
111
|
-
else setDeleteTooltipPosition('top');
|
|
112
|
-
}
|
|
113
|
-
}, [
|
|
114
|
-
props.tag
|
|
115
|
-
]);
|
|
116
|
-
const shopName = react.useMemo(()=>{
|
|
117
|
-
const pattern = /^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;
|
|
118
|
-
if (storefrontUrl) {
|
|
119
|
-
return storefrontUrl.match(pattern)?.[1];
|
|
120
|
-
}
|
|
121
|
-
return '';
|
|
122
|
-
}, [
|
|
123
|
-
storefrontUrl
|
|
124
|
-
]);
|
|
125
|
-
const linkShopDefault = react.useMemo(()=>{
|
|
126
|
-
return `https://admin.shopify.com/store/${shopName}`;
|
|
127
|
-
}, [
|
|
128
|
-
shopName
|
|
129
|
-
]);
|
|
130
|
-
const linkEditProduct = react.useMemo(()=>{
|
|
131
|
-
return productId ? `${linkShopDefault}/products/${productId}` : '';
|
|
132
|
-
}, [
|
|
133
|
-
linkShopDefault,
|
|
134
|
-
productId
|
|
135
|
-
]);
|
|
136
|
-
const linkEditArticle = react.useMemo(()=>{
|
|
137
|
-
return articleUid ? `${linkShopDefault}/articles/${articleUid}` : '';
|
|
138
|
-
}, [
|
|
139
|
-
articleUid,
|
|
140
|
-
linkShopDefault
|
|
141
|
-
]);
|
|
142
|
-
const isSelectOnPage = react.useMemo(()=>interactionData?.isSelectOnPage, [
|
|
143
|
-
interactionData?.isSelectOnPage
|
|
144
|
-
]);
|
|
145
|
-
const settingType = react.useMemo(()=>interactionData?.settingType, [
|
|
146
|
-
interactionData?.settingType
|
|
147
|
-
]);
|
|
148
|
-
const isShowIconInteractionTarget = react.useMemo(()=>{
|
|
149
|
-
return interactionData?.item?.targets?.find((t)=>t.uid === props.uid && t?.type !== 'PAGE') && settingType === 'TARGET';
|
|
150
|
-
}, [
|
|
151
|
-
interactionData?.item?.targets,
|
|
152
|
-
props.uid,
|
|
153
|
-
settingType
|
|
154
|
-
]);
|
|
155
|
-
const isShowIconInteractionTrigger = react.useMemo(()=>{
|
|
156
|
-
return interactionData?.item?.self?.uid === props.uid && interactionData?.item?.self.type !== 'PAGE' && settingType === 'TRIGGER';
|
|
157
|
-
}, [
|
|
158
|
-
interactionData?.item?.self?.type,
|
|
159
|
-
interactionData?.item?.self?.uid,
|
|
160
|
-
props.uid,
|
|
161
|
-
settingType
|
|
162
|
-
]);
|
|
163
|
-
const isDisplayIconDrag = react.useMemo(()=>{
|
|
164
|
-
return !isShowIconInteractionTarget && !isShowIconInteractionTrigger;
|
|
165
|
-
}, [
|
|
166
|
-
isShowIconInteractionTarget,
|
|
167
|
-
isShowIconInteractionTrigger
|
|
168
|
-
]);
|
|
169
|
-
const isDisableDelete = react.useMemo(()=>{
|
|
170
|
-
return isDisableDeleteInSaleFunelPage || isShopifySection;
|
|
171
|
-
}, [
|
|
172
|
-
isDisableDeleteInSaleFunelPage,
|
|
173
|
-
isShopifySection
|
|
174
|
-
]);
|
|
175
|
-
const isDisableDuplicate = react.useMemo(()=>{
|
|
176
|
-
return isDisableDuplicateInSaleFunnelPage || isShopifySection || getSectionNumber() > SECTION_LIMIT && props.tag === 'Section';
|
|
177
|
-
}, [
|
|
178
|
-
getSectionNumber,
|
|
179
|
-
isDisableDuplicateInSaleFunnelPage,
|
|
180
|
-
isShopifySection,
|
|
181
|
-
props.tag
|
|
182
|
-
]);
|
|
183
|
-
// Get parents
|
|
184
|
-
const onActiveComponent = react.useCallback((e)=>{
|
|
185
|
-
const detail = e.detail;
|
|
186
|
-
if (detail?.articleId) {
|
|
187
|
-
setArticleUid(detail.articleId);
|
|
188
|
-
}
|
|
189
|
-
if (detail?.productId) {
|
|
190
|
-
setProductId(detail.productId);
|
|
191
|
-
}
|
|
192
|
-
if (detail?.componentUid == props.uid) {
|
|
193
|
-
setIsActiveToolbarComponent(true);
|
|
194
|
-
getDeleteTooltipPosition();
|
|
195
|
-
if (isSaleFunnelPage) {
|
|
196
|
-
setIsDisableDeleteInSaleFunelPage(checkDisableDelete());
|
|
197
|
-
setTooltipText(getTooltipText());
|
|
198
|
-
setIsDisableDuplicateInSaleFunnelPage(checkDisableDuplicate());
|
|
199
|
-
}
|
|
200
|
-
const currentParents = getParents(props.uid).filter((parent)=>{
|
|
201
|
-
if (parent.uid === 'ROOT') return false;
|
|
202
|
-
if (parent.tag === 'Section' && isThemeSectionEditor) return false;
|
|
203
|
-
if (parent.editorConfigs?.toolbar?.hide) return false;
|
|
204
|
-
if (parent.editorConfigs?.component?.noSetting) return false;
|
|
205
|
-
return true;
|
|
206
|
-
}).slice(0, 3);
|
|
207
|
-
setParents(currentParents);
|
|
208
|
-
} else {
|
|
209
|
-
setIsActiveToolbarComponent(false);
|
|
210
|
-
setParents([]);
|
|
211
|
-
setIsShowParent(false);
|
|
212
|
-
}
|
|
213
|
-
}, [
|
|
214
|
-
props.uid,
|
|
215
|
-
isSaleFunnelPage,
|
|
216
|
-
getParents,
|
|
217
|
-
checkDisableDelete,
|
|
218
|
-
getTooltipText,
|
|
219
|
-
checkDisableDuplicate,
|
|
220
|
-
isThemeSectionEditor,
|
|
221
|
-
getDeleteTooltipPosition
|
|
222
|
-
]);
|
|
223
|
-
react.useEffect(()=>{
|
|
224
|
-
window.addEventListener('editor:active-component', onActiveComponent);
|
|
225
|
-
return ()=>{
|
|
226
|
-
window.removeEventListener('editor:active-component', onActiveComponent);
|
|
227
|
-
};
|
|
228
|
-
}, [
|
|
229
|
-
onActiveComponent
|
|
230
|
-
]);
|
|
231
|
-
// End get parents
|
|
232
|
-
if (props.type === 'section') {
|
|
233
|
-
return null;
|
|
234
|
-
}
|
|
235
|
-
if (props.editorConfigs?.toolbar?.hide) {
|
|
236
|
-
return null;
|
|
237
|
-
}
|
|
238
|
-
const getIndexSection = ()=>{
|
|
239
|
-
if (props.tag !== 'Section') {
|
|
240
|
-
return -1;
|
|
241
|
-
}
|
|
242
|
-
if (root?.childrens?.length) {
|
|
243
|
-
return root.childrens.findIndex((sectionUid)=>sectionUid == props.uid);
|
|
244
|
-
}
|
|
245
|
-
return -1;
|
|
246
|
-
};
|
|
247
|
-
const onShowParent = (e)=>{
|
|
248
|
-
if (!parents.length) return;
|
|
249
|
-
const $target = (e?.target) || null;
|
|
250
|
-
const $toolbar = $target.closest('[data-toolbar-active]');
|
|
251
|
-
if (!$target || !$toolbar) return;
|
|
252
|
-
if (isShowParent) {
|
|
253
|
-
setIsShowParentRevert(false);
|
|
254
|
-
setIsShowParent(false);
|
|
255
|
-
} else {
|
|
256
|
-
const $parentOverflow = findOverflowParent($toolbar, $toolbar);
|
|
257
|
-
if ($parentOverflow) {
|
|
258
|
-
setIsShowParentRevert(true);
|
|
259
|
-
} else {
|
|
260
|
-
const rect = $toolbar.getBoundingClientRect();
|
|
261
|
-
if (rect.top < parents.length * 36) {
|
|
262
|
-
setIsShowParentRevert(true);
|
|
263
|
-
} else {
|
|
264
|
-
setIsShowParentRevert(false);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
setIsShowParent(true);
|
|
268
|
-
}
|
|
269
|
-
const event = new CustomEvent('editor:toolbar:show-parents', {
|
|
270
|
-
bubbles: true,
|
|
271
|
-
detail: {
|
|
272
|
-
value: !isShowParent
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
window.dispatchEvent(event);
|
|
276
|
-
};
|
|
277
|
-
const goToShopifyEditLink = ()=>{
|
|
278
|
-
if (editArticleElementList.includes(props.tag)) {
|
|
279
|
-
window.open(linkEditArticle, '_blank');
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
if (editProductElementList.includes(props.tag)) {
|
|
283
|
-
window.open(linkEditProduct, '_blank');
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
window.open(linkShopDefault, '_blank');
|
|
287
|
-
};
|
|
288
|
-
const onDelete = (e)=>{
|
|
289
|
-
e.preventDefault();
|
|
290
|
-
e.stopPropagation();
|
|
291
|
-
const event = new CustomEvent('editor:toolbar:delete-component', {
|
|
292
|
-
bubbles: true,
|
|
293
|
-
detail: {
|
|
294
|
-
componentUid: props.uid,
|
|
295
|
-
isThemeSection,
|
|
296
|
-
isShopifySection
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
window.dispatchEvent(event);
|
|
300
|
-
return false;
|
|
301
|
-
};
|
|
302
|
-
const onDuplicate = (e)=>{
|
|
303
|
-
e.preventDefault();
|
|
304
|
-
e.stopPropagation();
|
|
305
|
-
const event = new CustomEvent('editor:toolbar:duplicate-component', {
|
|
306
|
-
bubbles: true,
|
|
307
|
-
detail: {
|
|
308
|
-
componentUid: props.uid,
|
|
309
|
-
isThemeSection,
|
|
310
|
-
isShopifySection
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
window.dispatchEvent(event);
|
|
314
|
-
return false;
|
|
315
|
-
};
|
|
316
|
-
const toolbarName = ()=>{
|
|
317
|
-
return props.customLabel || props.label;
|
|
318
|
-
};
|
|
319
|
-
const onZoomOut = (e)=>{
|
|
320
|
-
e.preventDefault();
|
|
321
|
-
e.stopPropagation();
|
|
322
|
-
const event = new CustomEvent('editor:toolbar:zoom-out-component', {
|
|
323
|
-
bubbles: true,
|
|
324
|
-
detail: {
|
|
325
|
-
componentUid: props.uid
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
window.dispatchEvent(event);
|
|
329
|
-
return false;
|
|
330
|
-
};
|
|
331
|
-
const closeAddSection = ()=>{
|
|
332
|
-
setActiveAddSection(null);
|
|
333
|
-
window.removeEventListener('editor:close-add-section-popup', closeAddSection);
|
|
334
|
-
};
|
|
335
|
-
const onAddSection = (e, position)=>{
|
|
336
|
-
e.preventDefault();
|
|
337
|
-
e.stopPropagation();
|
|
338
|
-
if (getSectionNumber() >= SECTION_LIMIT) {
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
const $target = e.target;
|
|
342
|
-
if ($target) {
|
|
343
|
-
setActiveAddSection(position);
|
|
344
|
-
const rect = $target.getBoundingClientRect();
|
|
345
|
-
const event = new CustomEvent('editor:toolbar:add-section', {
|
|
346
|
-
bubbles: true,
|
|
347
|
-
detail: {
|
|
348
|
-
componentUid: props.uid,
|
|
349
|
-
position,
|
|
350
|
-
top: rect.top + rect.height / 2
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
window.dispatchEvent(event);
|
|
354
|
-
window.addEventListener('editor:close-add-section-popup', closeAddSection);
|
|
355
|
-
}
|
|
356
|
-
return false;
|
|
357
|
-
};
|
|
358
|
-
const getSectionName = ()=>{
|
|
359
|
-
if (isShopifySection) {
|
|
360
|
-
return props.name?.includes('Shopify section:') ? props.name : `Shopify section: ${props.name}`;
|
|
361
|
-
}
|
|
362
|
-
const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
|
|
363
|
-
if (getSectionNumber() >= SECTION_LIMIT - 5) {
|
|
364
|
-
return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
|
|
365
|
-
}
|
|
366
|
-
return checkRenamedSection ? `Section ${getIndexSection() + 1}` : props?.name;
|
|
367
|
-
};
|
|
368
|
-
const isEnableCreateThemeSection = ()=>{
|
|
369
|
-
return editingPageType !== 'STATIC' && editingPageType !== 'POST_PURCHASE';
|
|
370
|
-
};
|
|
371
|
-
const isEnableAIContent = ()=>{
|
|
372
|
-
const { isShopifySection, tag } = props;
|
|
373
|
-
if (isShopifySection || isThemeSection && !isThemeSectionEditor) return false;
|
|
374
|
-
return constant.ableGenerateContentElements.includes(tag);
|
|
375
|
-
};
|
|
376
|
-
// if (!isActive) return null;
|
|
377
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
378
|
-
children: [
|
|
379
|
-
!(props.tag == 'Section' && isThemeSectionEditor) && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
380
|
-
"data-toolbar": true,
|
|
381
|
-
"data-toolbar-section": props.tag == 'Section',
|
|
382
|
-
"data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
383
|
-
"data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
384
|
-
"data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
|
|
385
|
-
children: [
|
|
386
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
387
|
-
"data-toolbar-show-parent": true,
|
|
388
|
-
onClick: (e)=>onShowParent(e),
|
|
389
|
-
"aria-hidden": "true",
|
|
390
|
-
children: [
|
|
391
|
-
isShowIconInteractionTrigger && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
392
|
-
className: "gp-hidden gp-w-[12px] interaction-use-custom-element",
|
|
393
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
394
|
-
width: "12",
|
|
395
|
-
height: "13",
|
|
396
|
-
viewBox: "0 0 12 13",
|
|
397
|
-
fill: "none",
|
|
398
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
399
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
400
|
-
fillRule: "evenodd",
|
|
401
|
-
clipRule: "evenodd",
|
|
402
|
-
d: "M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",
|
|
403
|
-
fill: "#F9F9F9"
|
|
404
|
-
})
|
|
405
|
-
})
|
|
406
|
-
}),
|
|
407
|
-
isShowIconInteractionTarget && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
408
|
-
className: "gp-hidden gp-w-[14px] interaction-use-custom-element",
|
|
409
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
410
|
-
width: "16",
|
|
411
|
-
height: "16",
|
|
412
|
-
viewBox: "0 0 16 16",
|
|
413
|
-
fill: "none",
|
|
414
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
415
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
416
|
-
fillRule: "evenodd",
|
|
417
|
-
clipRule: "evenodd",
|
|
418
|
-
d: "M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",
|
|
419
|
-
fill: "#F9F9F9"
|
|
420
|
-
})
|
|
421
|
-
})
|
|
422
|
-
}),
|
|
423
|
-
isActiveToolbarComponent && isDisplayIconDrag && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
424
|
-
"data-toolbar-icon-drag": true,
|
|
425
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
426
|
-
width: "16",
|
|
427
|
-
height: "16",
|
|
428
|
-
viewBox: "0 0 16 16",
|
|
429
|
-
fill: "none",
|
|
430
|
-
children: [
|
|
431
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
432
|
-
d: "M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",
|
|
433
|
-
fill: "currentColor"
|
|
434
|
-
}),
|
|
435
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
436
|
-
d: "M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",
|
|
437
|
-
fill: "currentColor"
|
|
438
|
-
}),
|
|
439
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
440
|
-
d: "M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",
|
|
441
|
-
fill: "currentColor"
|
|
442
|
-
}),
|
|
443
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
444
|
-
d: "M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",
|
|
445
|
-
fill: "currentColor"
|
|
446
|
-
}),
|
|
447
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
448
|
-
d: "M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",
|
|
449
|
-
fill: "currentColor"
|
|
450
|
-
}),
|
|
451
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
452
|
-
d: "M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",
|
|
453
|
-
fill: "currentColor"
|
|
454
|
-
})
|
|
455
|
-
]
|
|
456
|
-
})
|
|
457
|
-
}),
|
|
458
|
-
props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
459
|
-
"data-toolbar-name": true,
|
|
460
|
-
children: [
|
|
461
|
-
getSectionName(),
|
|
462
|
-
isActiveToolbarComponent && isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
463
|
-
"data-toolbar-visibility": true,
|
|
464
|
-
width: "20",
|
|
465
|
-
height: "20",
|
|
466
|
-
viewBox: "0 0 20 20",
|
|
467
|
-
fill: "none",
|
|
468
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
469
|
-
children: [
|
|
470
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
471
|
-
fillRule: "evenodd",
|
|
472
|
-
clipRule: "evenodd",
|
|
473
|
-
d: "M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",
|
|
474
|
-
fill: "#F9F9F9"
|
|
475
|
-
}),
|
|
476
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
477
|
-
fillRule: "evenodd",
|
|
478
|
-
clipRule: "evenodd",
|
|
479
|
-
d: "M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",
|
|
480
|
-
fill: "#F9F9F9"
|
|
481
|
-
}),
|
|
482
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
483
|
-
fillRule: "evenodd",
|
|
484
|
-
clipRule: "evenodd",
|
|
485
|
-
d: "M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",
|
|
486
|
-
fill: "#F9F9F9"
|
|
487
|
-
})
|
|
488
|
-
]
|
|
489
|
-
})
|
|
490
|
-
]
|
|
491
|
-
}) : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
492
|
-
"data-toolbar-name": true,
|
|
493
|
-
children: toolbarName()
|
|
494
|
-
}),
|
|
495
|
-
isActiveToolbarComponent && props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
496
|
-
"data-toolbar-icon-parent": true,
|
|
497
|
-
"data-toolbar-icon-parent-open": isShowParent,
|
|
498
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
499
|
-
width: "16",
|
|
500
|
-
height: "16",
|
|
501
|
-
viewBox: "0 0 16 16",
|
|
502
|
-
fill: "none",
|
|
503
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
504
|
-
d: "M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",
|
|
505
|
-
fill: "currentColor"
|
|
506
|
-
})
|
|
507
|
-
})
|
|
508
|
-
})
|
|
509
|
-
]
|
|
510
|
-
}),
|
|
511
|
-
isActiveToolbarComponent && isShowParent && parents.map((parent, index)=>{
|
|
512
|
-
// Update count columns of Row
|
|
513
|
-
const parentLength = parent?.childrens?.length ?? 0;
|
|
514
|
-
let parent_label = parent.label;
|
|
515
|
-
if (parent.label === 'Row') {
|
|
516
|
-
parent_label = parentLength <= 1 ? parent.label + ' ' + parentLength + ' col' : parent.label + ' ' + parentLength + ' cols';
|
|
517
|
-
}
|
|
518
|
-
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
519
|
-
"data-toolbar-parent": true,
|
|
520
|
-
"data-component-tag": parent.tag,
|
|
521
|
-
"data-parent-uid": parent.uid,
|
|
522
|
-
"data-toolbar-theme-section": isThemeSectionEditor,
|
|
523
|
-
"data-toolbar-parent-revert": isShowParentRevert,
|
|
524
|
-
style: {
|
|
525
|
-
top: !isShowParentRevert ? `${-36 * (index + 1)}px` // 32 height + 4 spacing
|
|
526
|
-
: `${36 * (index + 1)}px`
|
|
527
|
-
},
|
|
528
|
-
children: [
|
|
529
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
530
|
-
"data-toolbar-icon-drag": true,
|
|
531
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
532
|
-
width: "16",
|
|
533
|
-
height: "16",
|
|
534
|
-
viewBox: "0 0 16 16",
|
|
535
|
-
fill: "none",
|
|
536
|
-
children: [
|
|
537
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
538
|
-
d: "M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",
|
|
539
|
-
fill: "currentColor"
|
|
540
|
-
}),
|
|
541
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
542
|
-
d: "M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",
|
|
543
|
-
fill: "currentColor"
|
|
544
|
-
}),
|
|
545
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
546
|
-
d: "M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",
|
|
547
|
-
fill: "currentColor"
|
|
548
|
-
}),
|
|
549
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
550
|
-
d: "M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",
|
|
551
|
-
fill: "currentColor"
|
|
552
|
-
}),
|
|
553
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
554
|
-
d: "M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",
|
|
555
|
-
fill: "currentColor"
|
|
556
|
-
}),
|
|
557
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
558
|
-
d: "M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",
|
|
559
|
-
fill: "currentColor"
|
|
560
|
-
})
|
|
561
|
-
]
|
|
562
|
-
})
|
|
563
|
-
}),
|
|
564
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
565
|
-
"data-toolbar-name": true,
|
|
566
|
-
children: parent_label
|
|
567
|
-
})
|
|
568
|
-
]
|
|
569
|
-
}, parent.uid);
|
|
570
|
-
}),
|
|
571
|
-
isActiveToolbarComponent && !isSelectOnPage && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
572
|
-
children: [
|
|
573
|
-
' ',
|
|
574
|
-
props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
|
|
575
|
-
...props
|
|
576
|
-
}),
|
|
577
|
-
isEnableAIContent() && /*#__PURE__*/ jsxRuntime.jsx(AIContentGenerator.AIContentGenerator, {
|
|
578
|
-
...props
|
|
579
|
-
}),
|
|
580
|
-
props.tag == 'Sticky' && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
581
|
-
"data-toolbar-zoom-out": true,
|
|
582
|
-
onClick: (e)=>onZoomOut(e),
|
|
583
|
-
"aria-hidden": "true",
|
|
584
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
585
|
-
width: "16",
|
|
586
|
-
height: "16",
|
|
587
|
-
viewBox: "0 0 16 16",
|
|
588
|
-
fill: "none",
|
|
589
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
590
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
591
|
-
fillRule: "evenodd",
|
|
592
|
-
clipRule: "evenodd",
|
|
593
|
-
d: "M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",
|
|
594
|
-
fill: "currentColor"
|
|
595
|
-
})
|
|
596
|
-
})
|
|
597
|
-
}),
|
|
598
|
-
editAbleElementList.includes(props.tag) && /*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
599
|
-
"data-toolbar-title": true,
|
|
600
|
-
enable: true,
|
|
601
|
-
"data-toolbar-disable": false,
|
|
602
|
-
text: "Edit content in Shopify",
|
|
603
|
-
position: "top",
|
|
604
|
-
onClick: goToShopifyEditLink,
|
|
605
|
-
"aria-hidden": "true",
|
|
606
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
607
|
-
width: "16",
|
|
608
|
-
height: "16",
|
|
609
|
-
viewBox: "0 0 16 16",
|
|
610
|
-
fill: "none",
|
|
611
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
612
|
-
children: [
|
|
613
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
614
|
-
fillRule: "evenodd",
|
|
615
|
-
clipRule: "evenodd",
|
|
616
|
-
d: "M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",
|
|
617
|
-
fill: "currentColor"
|
|
618
|
-
}),
|
|
619
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
620
|
-
d: "M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",
|
|
621
|
-
fill: "currentColor"
|
|
622
|
-
}),
|
|
623
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
624
|
-
d: "M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",
|
|
625
|
-
fill: "currentColor"
|
|
626
|
-
}),
|
|
627
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
628
|
-
d: "M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",
|
|
629
|
-
fill: "currentColor"
|
|
630
|
-
})
|
|
631
|
-
]
|
|
632
|
-
})
|
|
633
|
-
}),
|
|
634
|
-
/*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
635
|
-
enable: props.tag == 'Section' && getSectionNumber() >= SECTION_LIMIT || isShopifySection,
|
|
636
|
-
text: isShopifySection ? 'Disabled. Please edit in Shopify Editor' : 'Page has reached Shopify’s 25 section-limit',
|
|
637
|
-
position: "bottom",
|
|
638
|
-
width: "200px",
|
|
639
|
-
"data-toolbar-duplicate": true,
|
|
640
|
-
"data-toolbar-disable": isDisableDuplicate,
|
|
641
|
-
onClick: isDisableDuplicate ? undefined : (e)=>onDuplicate(e),
|
|
642
|
-
"aria-hidden": "true",
|
|
643
|
-
className: isDisableDuplicate ? '!gp-cursor-not-allowed' : '',
|
|
644
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
645
|
-
width: "16",
|
|
646
|
-
height: "16",
|
|
647
|
-
viewBox: "0 0 16 16",
|
|
648
|
-
fill: "none",
|
|
649
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
650
|
-
fillRule: "evenodd",
|
|
651
|
-
clipRule: "evenodd",
|
|
652
|
-
d: "M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",
|
|
653
|
-
fill: "currentColor"
|
|
654
|
-
})
|
|
655
|
-
})
|
|
656
|
-
}),
|
|
657
|
-
/*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
658
|
-
"data-toolbar-delete": true,
|
|
659
|
-
onClick: (e)=>isDisableDelete ? null : onDelete(e),
|
|
660
|
-
enable: isDisableDelete,
|
|
661
|
-
"data-toolbar-disable": isDisableDelete,
|
|
662
|
-
text: isShopifySection ? 'Disabled. Please edit in Shopify Editor' : tooltipText.text,
|
|
663
|
-
width: tooltipText.width,
|
|
664
|
-
position: isShopifySection ? 'bottom' : deleteTooltipPosition,
|
|
665
|
-
"aria-hidden": "true",
|
|
666
|
-
className: isDisableDelete ? '!gp-cursor-not-allowed' : '',
|
|
667
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
668
|
-
width: "16",
|
|
669
|
-
height: "16",
|
|
670
|
-
viewBox: "0 0 16 16",
|
|
671
|
-
fill: "none",
|
|
672
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
673
|
-
fillRule: "evenodd",
|
|
674
|
-
clipRule: "evenodd",
|
|
675
|
-
d: "M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",
|
|
676
|
-
fill: "currentColor"
|
|
677
|
-
})
|
|
678
|
-
})
|
|
679
|
-
})
|
|
680
|
-
]
|
|
681
|
-
}),
|
|
682
|
-
/*#__PURE__*/ jsxRuntime.jsx(InteractionSuffix.InteractionSuffix, {
|
|
683
|
-
uid: props.uid
|
|
684
|
-
})
|
|
685
|
-
]
|
|
686
|
-
}, props.uid),
|
|
687
|
-
isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper, {
|
|
688
|
-
...props
|
|
689
|
-
}),
|
|
690
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
691
|
-
"data-outline": true,
|
|
692
|
-
"data-outline-section": props.tag == 'Section',
|
|
693
|
-
"data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
694
|
-
"data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
695
|
-
"data-outline-limit": getIndexSection() >= SECTION_LIMIT
|
|
696
|
-
}, 'outline-' + props.uid),
|
|
697
|
-
props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
698
|
-
children: [
|
|
699
|
-
/*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
700
|
-
enable: getSectionNumber() >= SECTION_LIMIT,
|
|
701
|
-
text: "Page has reached Shopify’s 25 section-limit",
|
|
702
|
-
position: "top",
|
|
703
|
-
"data-toolbar-add-top": true,
|
|
704
|
-
"data-toolbar-disable": getSectionNumber() >= SECTION_LIMIT,
|
|
705
|
-
"data-toolbar-add-open": activeAddSection == 'above',
|
|
706
|
-
onClick: (e)=>onAddSection(e, 'above'),
|
|
707
|
-
"aria-hidden": "true",
|
|
708
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
709
|
-
width: "16",
|
|
710
|
-
height: "16",
|
|
711
|
-
viewBox: "0 0 16 16",
|
|
712
|
-
fill: "none",
|
|
713
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
714
|
-
d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
|
|
715
|
-
fill: "#212121"
|
|
716
|
-
})
|
|
717
|
-
})
|
|
718
|
-
}),
|
|
719
|
-
/*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
720
|
-
enable: getSectionNumber() >= SECTION_LIMIT,
|
|
721
|
-
text: "Page has reached Shopify’s 25 section-limit",
|
|
722
|
-
position: "top",
|
|
723
|
-
"data-toolbar-add-bottom": true,
|
|
724
|
-
"data-toolbar-disable": getSectionNumber() >= SECTION_LIMIT,
|
|
725
|
-
"data-toolbar-add-open": activeAddSection == 'below',
|
|
726
|
-
onClick: (e)=>onAddSection(e, 'below'),
|
|
727
|
-
"aria-hidden": "true",
|
|
728
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
729
|
-
width: "16",
|
|
730
|
-
height: "16",
|
|
731
|
-
viewBox: "0 0 16 16",
|
|
732
|
-
fill: "none",
|
|
733
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
734
|
-
d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
|
|
735
|
-
fill: "#212121"
|
|
736
|
-
})
|
|
737
|
-
})
|
|
738
|
-
})
|
|
739
|
-
]
|
|
740
|
-
}),
|
|
741
|
-
constant.ableGenerateContentElements.includes(props.tag) && isActiveToolbarComponent && /*#__PURE__*/ jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading, {
|
|
742
|
-
...props
|
|
743
|
-
}),
|
|
744
|
-
isActiveToolbarComponent && /*#__PURE__*/ jsxRuntime.jsx(Resize.default, {
|
|
745
|
-
...props
|
|
746
|
-
})
|
|
747
|
-
]
|
|
748
|
-
});
|
|
749
|
-
};
|
|
750
|
-
var ComponentToolbarPreview$1 = /*#__PURE__*/ react.memo(ComponentToolbarPreview); /* gem-lint/disallow-import-from-package-path */
|
|
751
|
-
|
|
752
|
-
exports.default = ComponentToolbarPreview$1;
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),PageContext=require("../contexts/PageContext.js"),CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js"),useToolbarPostPurchase=require("../hooks/useToolbarPostPurchase.js"),constant=require("./constant.js"),AIContentGenerator=require("./ai-generator/AIContentGenerator.js"),AIGenContentLoading=require("./ai-generator/AIGenContentLoading.js"),InteractionSuffix=require("./InteractionSuffix.js");require("swr"),require("../helpers/convert.js");var ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("swr/infinite"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("../hooks/useStickyStore.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=e=>{let t=e.isThemeSection,i=!!e.isShopifySection,o=ShopContext.useShopStore(e=>e.storefrontUrl),n=ShopContext.useShopStore(e=>e.pageType),r=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),l=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),a=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[s,d]=react.useState(null),[u,C]=react.useState(!1),[c,h]=react.useState(!1),[x,m]=react.useState([]),[p,j]=react.useState("top"),[g,f]=react.useState(!1),[v,R]=react.useState(!1),[b,w]=react.useState(""),[S,M]=react.useState(""),[L,P]=react.useState({width:"",text:""}),[T,Z]=react.useState(!1),y=PageContext.usePageStore(e=>e.interactionData),E=react.useMemo(()=>"POST_PURCHASE"===n,[n]),{checkDisableDelete:H,getTooltipText:V,checkDisableDuplicate:A}=useToolbarPostPurchase.usePostPurchase(e.uid,e.tag||""),I=["ProductTitle","ProductDescription","ProductPrice"],q=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],B=[...I,...q],k=(e,t)=>{let i=x.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},F=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&k(t,e)?e:e.parentElement?F(e.parentElement,i):void 0},$=react.useCallback(()=>l?.childrens?.length||0,[l?.childrens?.length]),G=react.useCallback(()=>{if("Section"==e.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?j("bottom"):j("top")}},[e.tag]),O=react.useMemo(()=>{let e=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return o?o.match(e)?.[1]:""},[o]),U=react.useMemo(()=>`https://admin.shopify.com/store/${O}`,[O]),D=react.useMemo(()=>b?`${U}/products/${b}`:"",[U,b]),_=react.useMemo(()=>S?`${U}/articles/${S.replace("gid://shopify/Article/","")}`:"",[S,U]),z=react.useMemo(()=>y?.isSelectOnPage,[y?.isSelectOnPage]),N=react.useMemo(()=>y?.settingType,[y?.settingType]),W=react.useMemo(()=>y?.item?.targets?.find(t=>t.uid===e.uid&&t?.type!=="PAGE")&&"TARGET"===N,[y?.item?.targets,e.uid,N]),J=react.useMemo(()=>y?.item?.self?.uid===e.uid&&y?.item?.self.type!=="PAGE"&&"TRIGGER"===N,[y?.item?.self?.type,y?.item?.self?.uid,e.uid,N]),K=react.useMemo(()=>!W&&!J,[W,J]),Q=react.useMemo(()=>g||i,[g,i]),X=react.useMemo(()=>T||i||$()>25&&"Section"===e.tag,[$,T,i,e.tag]),Y=react.useCallback(t=>{let i=t.detail;if(i?.articleId&&M(i.articleId),i?.productId&&w(i.productId),i?.componentUid==e.uid){R(!0),G(),E&&(f(H()),P(V()),Z(A()));let t=r(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&a||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);m(t)}else R(!1),m([]),C(!1)},[e.uid,E,r,H,V,A,a,G]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",Y),()=>{window.removeEventListener("editor:active-component",Y)}),[Y]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let ee=()=>"Section"!==e.tag?-1:l?.childrens?.length?l.childrens.findIndex(t=>t==e.uid):-1,et=e=>{let t=e?.childrens?.length??0;return"Row"===e.label?`Row ${t} col${1===t?"":"s"}`:e.label},ei=e=>{if(!x.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(u)h(!1),C(!1);else{let e=F(i,i);if(e)h(!0);else{let e=i.getBoundingClientRect();e.top<36*x.length?h(!0):h(!1)}C(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!u}});window.dispatchEvent(o)},eo=()=>{if(q.includes(e.tag)){window.open(_,"_blank");return}if(I.includes(e.tag)){window.open(D,"_blank");return}window.open(U,"_blank")},en=o=>{o.preventDefault(),o.stopPropagation();let n=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t,isShopifySection:i}});return window.dispatchEvent(n),!1},er=o=>{o.preventDefault(),o.stopPropagation();let n=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t,isShopifySection:i}});return window.dispatchEvent(n),!1},el=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},ea=()=>{d(null),window.removeEventListener("editor:close-add-section-popup",ea)},es=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),$()>=25)return!1;let o=t.target;if(o){d(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ea)}return!1},ed=()=>{if(i)return e.name?.includes("Shopify section:")?e.name:`Shopify section: ${e.name}`;let t=e.name&&e.name===`Section ${e.uid}`;return $()>=20?`${t?"Section":e?.name} ${ee()+1}/25`:t?`Section ${ee()+1}`:e?.name},eu=()=>{let{isShopifySection:i,tag:o}=e;return!i&&(!t||!!a)&&constant.ableGenerateContentElements.includes(o)};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&a)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!t||a,"data-toolbar-shopify-section":"Section"==e.tag&&!!i,"data-toolbar-limit":ee()>=25,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>ei(e),"aria-hidden":"true",children:[J&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),W&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),v&&K&&jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsxs("div",{"data-toolbar-name":!0,children:[ed(),v&&i&&!e.isShopifyVisibility&&jsxRuntime.jsxs("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:e.customLabel||e.label}),v&&"Section"!==e.tag&&x.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":u,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),v&&u&&x.map((e,t)=>jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":a,"data-toolbar-parent-revert":c,style:{top:c?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:et(e)})]},e.uid)),v&&!z&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ","Section"===e.tag&&!e.isThemeSection&&"STATIC"!==n&&"POST_PURCHASE"!==n&&!e.isShopifySection&&25>ee()&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),eu()&&jsxRuntime.jsx(AIContentGenerator.AIContentGenerator,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>el(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),B.includes(e.tag)&&jsxRuntime.jsx(Tooltip.default,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:"Edit content in Shopify",position:"top",onClick:eo,"aria-hidden":"true",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&$()>=25||i,text:i?"Disabled. Please edit in Shopify Editor":"Page has reached Shopify’s 25 section-limit",position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":X,onClick:X?void 0:e=>er(e),"aria-hidden":"true",className:X?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{"data-toolbar-delete":!0,onClick:e=>Q?null:en(e),enable:Q,"data-toolbar-disable":Q,text:i?"Disabled. Please edit in Shopify Editor":L.text,width:L.width,position:i?"bottom":p,"aria-hidden":"true",className:Q?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),jsxRuntime.jsx(InteractionSuffix.InteractionSuffix,{uid:e.uid})]},e.uid),"STATIC"!==n&&"POST_PURCHASE"!==n&&25>ee()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!t||a,"data-outline-shopify-section":"Section"==e.tag&&!!i,"data-outline-limit":ee()>=25},"outline-"+e.uid),"Section"==e.tag&&!a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:$()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":$()>=25,"data-toolbar-add-open":"above"==s,onClick:e=>es(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),jsxRuntime.jsx(Tooltip.default,{enable:$()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":$()>=25,"data-toolbar-add-open":"below"==s,onClick:e=>es(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),constant.ableGenerateContentElements.includes(e.tag)&&v&&jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading,{...e}),v&&jsxRuntime.jsx(Resize.default,{...e})]})};var ComponentToolbarPreview$1=react.memo(ComponentToolbarPreview);exports.default=ComponentToolbarPreview$1;
|