@gem-sdk/core 1.37.5 → 2.0.0-dev.832
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 +1 -18
- package/dist/cjs/components/ComponentToolbarPreview.js +1 -465
- package/dist/cjs/components/ComponentWrapper.js +1 -46
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -136
- package/dist/cjs/components/Empty.js +1 -7
- package/dist/cjs/components/Render.js +1 -65
- package/dist/cjs/components/Render.liquid.js +14 -288
- package/dist/cjs/components/RenderBlock.js +1 -54
- package/dist/cjs/components/RenderCustomCode.js +3 -56
- package/dist/cjs/components/RenderPreview.js +1 -66
- package/dist/cjs/components/RenderSection.js +1 -23
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +1 -0
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/cjs/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/cjs/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -0
- package/dist/cjs/components/ai-generator/hooks/useListenEventGenerate.js +1 -0
- package/dist/cjs/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/cjs/components/animation/AnimationWrapper.js +1 -0
- package/dist/cjs/components/constant.js +1 -54
- package/dist/cjs/components/resize/Resize.js +1 -16
- package/dist/cjs/components/resize/Spacing.js +1 -248
- package/dist/cjs/components/src/product/helpers/variant-presets.js +1 -56
- package/dist/cjs/components/theme-section/CreateThemeSection.js +1 -117
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +1 -36
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +1 -102
- package/dist/cjs/components/toolbar/Tooltip.js +1 -22
- package/dist/cjs/contexts/AddonContext.js +1 -36
- package/dist/cjs/contexts/BuilderComponent.js +1 -34
- package/dist/cjs/contexts/BuilderContext.js +1 -35
- package/dist/cjs/contexts/BuilderPreviewContext.js +1 -479
- package/dist/cjs/contexts/CartLineContext.js +1 -29
- package/dist/cjs/contexts/CollectionContext.js +1 -38
- package/dist/cjs/contexts/ModalContext.js +1 -47
- package/dist/cjs/contexts/PageContext.js +1 -44
- package/dist/cjs/contexts/ProductContext.js +1 -156
- package/dist/cjs/contexts/ProductListContext.js +1 -32
- package/dist/cjs/contexts/SectionContext.js +1 -53
- package/dist/cjs/contexts/ShopContext.js +1 -80
- 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 +2 -6
- 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/product-little.generated.js +11 -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 +11 -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 +3 -9
- 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 +3 -7
- 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 -14
- 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 +2 -10
- package/dist/cjs/graphql/queries/products.generated.js +12 -17
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +2 -15
- package/dist/cjs/graphql/queries/store-property.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/LibraryTemplate.generated.js +13 -0
- package/dist/cjs/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +34 -0
- package/dist/cjs/graphql-app-api/queries/ThemePage.generated.js +22 -0
- package/dist/cjs/helpers/GlobalEvent.js +1 -19
- package/dist/cjs/helpers/animations.js +1 -213
- package/dist/cjs/helpers/background.js +1 -230
- package/dist/cjs/helpers/borders.js +4 -183
- package/dist/cjs/helpers/carousel.js +1 -58
- 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 -268
- 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-toolbar-preview.js +1 -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/is-browser.js +1 -9
- package/dist/cjs/helpers/is-defined.js +1 -7
- package/dist/cjs/helpers/is-empty-children.js +1 -15
- package/dist/cjs/helpers/is-safari.js +1 -9
- package/dist/cjs/helpers/layout.js +1 -59
- package/dist/cjs/helpers/load-script.js +1 -31
- package/dist/cjs/helpers/make-style.js +1 -163
- package/dist/cjs/helpers/normalize-builder-data.js +1 -23
- 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 -163
- package/dist/cjs/helpers/query.js +1 -29
- package/dist/cjs/helpers/radius.js +6 -140
- package/dist/cjs/helpers/render.js +1 -76
- package/dist/cjs/helpers/shadow.js +1 -57
- package/dist/cjs/helpers/size.js +4 -183
- package/dist/cjs/helpers/spacing.js +1 -43
- 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 +17 -126
- package/dist/cjs/helpers/variant.js +1 -11
- package/dist/cjs/hooks/animation/animations.js +1 -0
- package/dist/cjs/hooks/animation/useAnimationActions.js +1 -39
- package/dist/cjs/hooks/animation/useAnimationConfig.js +1 -29
- package/dist/cjs/hooks/animation/useAnimationPreview.js +1 -31
- package/dist/cjs/hooks/animation/useAnimationTarget.js +1 -120
- package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -87
- package/dist/cjs/hooks/animation/useLivePageAnimation.js +1 -0
- package/dist/cjs/hooks/cart/use-add-to-cart.js +1 -20
- package/dist/cjs/hooks/cart/use-cart-data.js +1 -28
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +1 -20
- package/dist/cjs/hooks/cart/use-cart-note-update.js +1 -20
- package/dist/cjs/hooks/cart/use-create-cart.js +1 -22
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +1 -20
- package/dist/cjs/hooks/cart/use-update-cart-item.js +1 -20
- package/dist/cjs/hooks/shop/use-collection-query.js +1 -22
- package/dist/cjs/hooks/shop/use-collections-query.js +1 -17
- package/dist/cjs/hooks/shop/use-product-query.js +1 -22
- package/dist/cjs/hooks/shop/use-products-query.js +1 -23
- package/dist/cjs/hooks/shop.js +1 -126
- package/dist/cjs/hooks/use-current-device.js +1 -21
- package/dist/cjs/hooks/use-lazy-video.js +1 -15
- package/dist/cjs/hooks/useAnimations.js +1 -26
- package/dist/cjs/hooks/useCartId.js +1 -44
- package/dist/cjs/hooks/useCartLine.js +1 -11
- package/dist/cjs/hooks/useCartUI.js +1 -48
- package/dist/cjs/hooks/useCollection.js +1 -9
- package/dist/cjs/hooks/useFetchHandle.js +1 -13
- package/dist/cjs/hooks/useFormatMoney.js +1 -58
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -113
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +1 -10
- package/dist/cjs/hooks/useLoadScript.js +1 -32
- package/dist/cjs/hooks/useMoney.js +1 -84
- package/dist/cjs/hooks/usePrevious.js +1 -19
- package/dist/cjs/hooks/useProduct.js +1 -206
- package/dist/cjs/hooks/useProductList.js +1 -21
- package/dist/cjs/hooks/useSuspenseFetch.js +1 -27
- package/dist/cjs/hooks/useSwatchesOptions.js +1 -41
- package/dist/cjs/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/cjs/index.js +1 -361
- package/dist/cjs/types/animations.js +1 -47
- package/dist/cjs/types/appAPI.js +1 -0
- package/dist/cjs/types/global-style.js +1 -15
- package/dist/cjs/types/shop.js +1 -2
- package/dist/cjs/web-components/src/helpers/styles/constant.js +1 -9
- package/dist/esm/components/AddOn.js +1 -14
- package/dist/esm/components/ComponentToolbarPreview.js +1 -463
- package/dist/esm/components/ComponentWrapper.js +1 -42
- package/dist/esm/components/ComponentWrapperPreview.js +1 -132
- package/dist/esm/components/Empty.js +1 -3
- package/dist/esm/components/Render.js +1 -61
- package/dist/esm/components/Render.liquid.js +14 -282
- package/dist/esm/components/RenderBlock.js +1 -50
- package/dist/esm/components/RenderCustomCode.js +3 -52
- package/dist/esm/components/RenderPreview.js +1 -62
- package/dist/esm/components/RenderSection.js +1 -19
- package/dist/esm/components/ai-generator/AIContentGenerator.js +1 -0
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/esm/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/esm/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -0
- package/dist/esm/components/ai-generator/hooks/useListenEventGenerate.js +1 -0
- package/dist/esm/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/esm/components/animation/AnimationWrapper.js +1 -0
- package/dist/esm/components/constant.js +1 -50
- package/dist/esm/components/resize/Resize.js +1 -12
- package/dist/esm/components/resize/Spacing.js +1 -244
- package/dist/esm/components/src/product/helpers/variant-presets.js +1 -54
- package/dist/esm/components/theme-section/CreateThemeSection.js +1 -115
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -34
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +1 -100
- package/dist/esm/components/toolbar/Tooltip.js +1 -18
- package/dist/esm/contexts/AddonContext.js +1 -32
- package/dist/esm/contexts/BuilderComponent.js +1 -31
- package/dist/esm/contexts/BuilderContext.js +1 -32
- package/dist/esm/contexts/BuilderPreviewContext.js +1 -476
- package/dist/esm/contexts/CartLineContext.js +1 -26
- package/dist/esm/contexts/CollectionContext.js +1 -35
- package/dist/esm/contexts/ModalContext.js +1 -44
- package/dist/esm/contexts/PageContext.js +1 -41
- package/dist/esm/contexts/ProductContext.js +1 -153
- package/dist/esm/contexts/ProductListContext.js +1 -28
- package/dist/esm/contexts/SectionContext.js +1 -49
- package/dist/esm/contexts/ShopContext.js +1 -77
- 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 +2 -4
- 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/product-little.generated.js +11 -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 +11 -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 +3 -6
- 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 +3 -5
- 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 +8 -18
- 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 +4 -10
- package/dist/esm/graphql/queries/products.generated.js +18 -20
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +9 -20
- package/dist/esm/graphql/queries/store-property.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/LibraryTemplate.generated.js +13 -0
- package/dist/esm/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +34 -0
- package/dist/esm/graphql-app-api/queries/ThemePage.generated.js +22 -0
- package/dist/esm/helpers/GlobalEvent.js +1 -15
- package/dist/esm/helpers/animations.js +1 -211
- package/dist/esm/helpers/background.js +1 -222
- package/dist/esm/helpers/borders.js +4 -175
- package/dist/esm/helpers/carousel.js +1 -54
- 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 -261
- 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-toolbar-preview.js +1 -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/is-browser.js +1 -5
- package/dist/esm/helpers/is-defined.js +1 -5
- package/dist/esm/helpers/is-empty-children.js +1 -10
- package/dist/esm/helpers/is-safari.js +1 -5
- package/dist/esm/helpers/layout.js +1 -54
- package/dist/esm/helpers/load-script.js +1 -29
- package/dist/esm/helpers/make-style.js +1 -149
- package/dist/esm/helpers/normalize-builder-data.js +1 -21
- 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 -161
- package/dist/esm/helpers/query.js +1 -25
- package/dist/esm/helpers/radius.js +6 -132
- package/dist/esm/helpers/render.js +1 -68
- package/dist/esm/helpers/shadow.js +1 -52
- package/dist/esm/helpers/size.js +4 -171
- package/dist/esm/helpers/spacing.js +1 -40
- 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 +17 -116
- package/dist/esm/helpers/variant.js +1 -9
- package/dist/esm/hooks/animation/animations.js +1 -0
- package/dist/esm/hooks/animation/useAnimationActions.js +1 -37
- package/dist/esm/hooks/animation/useAnimationConfig.js +1 -27
- package/dist/esm/hooks/animation/useAnimationPreview.js +1 -29
- package/dist/esm/hooks/animation/useAnimationTarget.js +1 -118
- package/dist/esm/hooks/animation/useApplyAnimation.js +1 -83
- package/dist/esm/hooks/animation/useLivePageAnimation.js +1 -0
- package/dist/esm/hooks/cart/use-add-to-cart.js +1 -18
- package/dist/esm/hooks/cart/use-cart-data.js +1 -26
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +1 -18
- package/dist/esm/hooks/cart/use-cart-note-update.js +1 -18
- package/dist/esm/hooks/cart/use-create-cart.js +1 -20
- package/dist/esm/hooks/cart/use-remove-cart-item.js +1 -18
- package/dist/esm/hooks/cart/use-update-cart-item.js +1 -18
- package/dist/esm/hooks/shop/use-collection-query.js +1 -20
- package/dist/esm/hooks/shop/use-collections-query.js +1 -15
- package/dist/esm/hooks/shop/use-product-query.js +1 -20
- package/dist/esm/hooks/shop/use-products-query.js +1 -21
- package/dist/esm/hooks/shop.js +1 -111
- package/dist/esm/hooks/use-current-device.js +1 -19
- package/dist/esm/hooks/use-lazy-video.js +1 -13
- package/dist/esm/hooks/useAnimations.js +1 -24
- package/dist/esm/hooks/useCartId.js +1 -40
- package/dist/esm/hooks/useCartLine.js +1 -7
- package/dist/esm/hooks/useCartUI.js +1 -44
- package/dist/esm/hooks/useCollection.js +1 -7
- package/dist/esm/hooks/useFetchHandle.js +1 -11
- package/dist/esm/hooks/useFormatMoney.js +1 -56
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -109
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +1 -6
- package/dist/esm/hooks/useLoadScript.js +1 -28
- package/dist/esm/hooks/useMoney.js +1 -80
- package/dist/esm/hooks/usePrevious.js +1 -17
- package/dist/esm/hooks/useProduct.js +1 -192
- package/dist/esm/hooks/useProductList.js +1 -16
- package/dist/esm/hooks/useSuspenseFetch.js +1 -23
- package/dist/esm/hooks/useSwatchesOptions.js +1 -37
- package/dist/esm/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/esm/index.js +1 -100
- package/dist/esm/types/animations.js +1 -47
- package/dist/esm/types/appAPI.js +1 -0
- package/dist/esm/types/global-style.js +1 -12
- package/dist/esm/web-components/src/helpers/styles/constant.js +1 -7
- package/dist/types/index.d.ts +24802 -6237
- package/package.json +8 -3
|
@@ -1,34 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const ThemeSectionStatus = ({ ...props })=>{
|
|
4
|
-
const isRenderThemeSectionStatus = props.tag === 'Section' && props?.isThemeSection && props?.needPublishing;
|
|
5
|
-
return /*#__PURE__*/ jsx(Fragment, {
|
|
6
|
-
children: isRenderThemeSectionStatus && /*#__PURE__*/ jsxs("div", {
|
|
7
|
-
"data-theme-section-status": true,
|
|
8
|
-
children: [
|
|
9
|
-
/*#__PURE__*/ jsx("div", {
|
|
10
|
-
"data-theme-section-status-icon": true,
|
|
11
|
-
children: /*#__PURE__*/ jsx("svg", {
|
|
12
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
-
width: "16",
|
|
14
|
-
height: "16",
|
|
15
|
-
viewBox: "0 0 16 16",
|
|
16
|
-
fill: "none",
|
|
17
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
18
|
-
fillRule: "evenodd",
|
|
19
|
-
clipRule: "evenodd",
|
|
20
|
-
d: "M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.4668 4.61597C8.4668 4.89211 8.24294 5.11597 7.9668 5.11597C7.69065 5.11597 7.4668 4.89211 7.4668 4.61597C7.4668 4.33982 7.69065 4.11597 7.9668 4.11597C8.24294 4.11597 8.4668 4.33982 8.4668 4.61597ZM6.91309 5.48633C6.63694 5.48633 6.41309 5.71019 6.41309 5.98633C6.41309 6.26247 6.63694 6.48633 6.91309 6.48633H7.56006V10.3839C7.56006 10.9362 8.00777 11.3839 8.56006 11.3839H9.57144C9.84758 11.3839 10.0714 11.1601 10.0714 10.8839C10.0714 10.6078 9.84758 10.3839 9.57144 10.3839H8.56006V6.48633C8.56006 5.93404 8.11234 5.48633 7.56006 5.48633H6.91309Z",
|
|
21
|
-
fill: "#9144DA"
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
}),
|
|
25
|
-
/*#__PURE__*/ jsx("span", {
|
|
26
|
-
"data-theme-section-status-text": true,
|
|
27
|
-
children: "Need to republish. Go to global edit and publish this section"
|
|
28
|
-
})
|
|
29
|
-
]
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export { ThemeSectionStatus };
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";let getStatusMessage=e=>{switch(e){case"DRAFT":return"This Theme Section is Draft. Publish page will also publish Theme Section.";case"NEED_PUBLISHING":return"Need to republish. Go to global edit and publish this section"}},ThemeSectionStatusWrapper=({tag:s,status:a,isThemeSection:l})=>{let n="Section"===s&&l&&("DRAFT"===a||"NEED_PUBLISHING"===a),h=getStatusMessage(a);return e(t,{children:n&&i("div",{"data-theme-section-status":!0,children:[e("div",{"data-theme-section-status-icon":!0,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.4668 4.61597C8.4668 4.89211 8.24294 5.11597 7.9668 5.11597C7.69065 5.11597 7.4668 4.89211 7.4668 4.61597C7.4668 4.33982 7.69065 4.11597 7.9668 4.11597C8.24294 4.11597 8.4668 4.33982 8.4668 4.61597ZM6.91309 5.48633C6.63694 5.48633 6.41309 5.71019 6.41309 5.98633C6.41309 6.26247 6.63694 6.48633 6.91309 6.48633H7.56006V10.3839C7.56006 10.9362 8.00777 11.3839 8.56006 11.3839H9.57144C9.84758 11.3839 10.0714 11.1601 10.0714 10.8839C10.0714 10.6078 9.84758 10.3839 9.57144 10.3839H8.56006V6.48633C8.56006 5.93404 8.11234 5.48633 7.56006 5.48633H6.91309Z",fill:"#9144DA"})})}),h&&e("span",{"data-theme-section-status-text":!0,children:h})]})})};export{ThemeSectionStatusWrapper};
|
|
@@ -1,100 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import { Transition } from 'react-transition-group';
|
|
4
|
-
import { cls } from '@gem-sdk/core';
|
|
5
|
-
|
|
6
|
-
const TRANSITION_DURATION = 350;
|
|
7
|
-
const defaultStyles = {
|
|
8
|
-
transition: `opacity ${TRANSITION_DURATION}ms ease-out`,
|
|
9
|
-
opacity: 0
|
|
10
|
-
};
|
|
11
|
-
const transitions = {
|
|
12
|
-
entering: {
|
|
13
|
-
opacity: 1
|
|
14
|
-
},
|
|
15
|
-
entered: {
|
|
16
|
-
opacity: 1
|
|
17
|
-
},
|
|
18
|
-
exiting: {
|
|
19
|
-
opacity: 0
|
|
20
|
-
},
|
|
21
|
-
exited: {
|
|
22
|
-
opacity: 0
|
|
23
|
-
},
|
|
24
|
-
unmounted: {
|
|
25
|
-
opacity: 0
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter, onMouseLeave, onActions })=>{
|
|
29
|
-
const nodeRef = useRef(null);
|
|
30
|
-
const actionBtnLabel = isLimit ? 'Upgrade to create Theme Section' : 'Create Theme Section';
|
|
31
|
-
const openHelpCenter = ()=>{
|
|
32
|
-
const url = 'https://help.gempages.net/articles/theme-section';
|
|
33
|
-
window.open(url, '_blank');
|
|
34
|
-
};
|
|
35
|
-
return /*#__PURE__*/ jsx(Fragment, {
|
|
36
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
37
|
-
className: "theme-section-tooltip-wrapper",
|
|
38
|
-
onMouseEnter: onMouseEnter,
|
|
39
|
-
onMouseLeave: onMouseLeave,
|
|
40
|
-
children: [
|
|
41
|
-
children,
|
|
42
|
-
isRender && /*#__PURE__*/ jsx(Transition, {
|
|
43
|
-
in: isShow,
|
|
44
|
-
timeout: TRANSITION_DURATION,
|
|
45
|
-
nodeRef: nodeRef,
|
|
46
|
-
unmountOnExit: true,
|
|
47
|
-
children: (state)=>/*#__PURE__*/ jsxs("div", {
|
|
48
|
-
className: "theme-section-tooltip",
|
|
49
|
-
ref: nodeRef,
|
|
50
|
-
style: {
|
|
51
|
-
...defaultStyles,
|
|
52
|
-
...transitions[state]
|
|
53
|
-
},
|
|
54
|
-
children: [
|
|
55
|
-
/*#__PURE__*/ jsx("div", {
|
|
56
|
-
className: "theme-section-tooltip__image",
|
|
57
|
-
children: /*#__PURE__*/ jsx("img", {
|
|
58
|
-
src: "https://ucarecdn.com/6a9f408a-aa8c-434a-890b-81067a14aceb/-/format/auto/-/preview/1920x1920/-/quality/lighter/theme-section-illustration.png",
|
|
59
|
-
alt: ""
|
|
60
|
-
})
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ jsxs("div", {
|
|
63
|
-
className: "theme-section-tooltip__body",
|
|
64
|
-
children: [
|
|
65
|
-
/*#__PURE__*/ jsx("div", {
|
|
66
|
-
className: "theme-section-tooltip__body-title",
|
|
67
|
-
children: "Create once, use everywhere with Theme Section"
|
|
68
|
-
}),
|
|
69
|
-
/*#__PURE__*/ jsx("div", {
|
|
70
|
-
className: "theme-section-tooltip__body-desc",
|
|
71
|
-
children: "A global section that can be used on all your GemPages & Shopify pages."
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
}),
|
|
75
|
-
/*#__PURE__*/ jsxs("div", {
|
|
76
|
-
className: cls('theme-section-tooltip__action', {
|
|
77
|
-
'theme-section-tooltip__action-limit': isLimit
|
|
78
|
-
}),
|
|
79
|
-
children: [
|
|
80
|
-
/*#__PURE__*/ jsx("button", {
|
|
81
|
-
onClick: (e)=>onActions(e),
|
|
82
|
-
children: actionBtnLabel
|
|
83
|
-
}),
|
|
84
|
-
isLimit && /*#__PURE__*/ jsx("div", {
|
|
85
|
-
onClick: openHelpCenter,
|
|
86
|
-
"aria-hidden": true,
|
|
87
|
-
className: "theme-section-tooltip__action-learn-more",
|
|
88
|
-
children: "Learn more about Theme Section"
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
})
|
|
94
|
-
})
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { ThemeSectionTooltip };
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{useRef as o}from"react";import{Transition as n}from"react-transition-group";import{cls as a}from"@gem-sdk/core";let TRANSITION_DURATION=350,defaultStyles={transition:"opacity 350ms ease-out",opacity:0},transitions={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0},unmounted:{opacity:0}},ThemeSectionTooltip=({isShow:c,isLimit:r,isRender:l,children:s,onMouseEnter:m,onMouseLeave:h,onActions:d})=>{let p=o(null),u=r?"Upgrade to create Theme Section":"Create Theme Section",y=()=>{window.open("https://help.gempages.net/articles/theme-section","_blank")};return e(t,{children:i("div",{className:"theme-section-tooltip-wrapper",onMouseEnter:m,onMouseLeave:h,children:[s,l&&e(n,{in:c,timeout:350,nodeRef:p,unmountOnExit:!0,children:t=>i("div",{className:"theme-section-tooltip",ref:p,style:{...defaultStyles,...transitions[t]},children:[e("div",{className:"theme-section-tooltip__image",children:e("img",{src:"https://ucarecdn.com/6a9f408a-aa8c-434a-890b-81067a14aceb/-/format/auto/-/preview/1920x1920/-/quality/lighter/theme-section-illustration.png",alt:""})}),i("div",{className:"theme-section-tooltip__body",children:[e("div",{className:"theme-section-tooltip__body-title",children:"Create once, use everywhere with Theme Section"}),e("div",{className:"theme-section-tooltip__body-desc",children:"A global section that can be used on all your GemPages & Shopify pages."})]}),i("div",{className:a("theme-section-tooltip__action",{"theme-section-tooltip__action-limit":r}),children:[e("button",{onClick:e=>d(e),children:u}),r&&e("div",{onClick:y,"aria-hidden":!0,className:"theme-section-tooltip__action-learn-more",children:"Learn more about Theme Section"})]})]})})]})})};export{ThemeSectionTooltip};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function Tooltip({ children, enable, text = 'Tooltip Text', position = 'right', ...props }) {
|
|
4
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
5
|
-
...props,
|
|
6
|
-
"data-toolbar-tooltip-trigger": true,
|
|
7
|
-
children: [
|
|
8
|
-
children,
|
|
9
|
-
enable && /*#__PURE__*/ jsx("div", {
|
|
10
|
-
"data-toolbar-tooltip": true,
|
|
11
|
-
"data-toolbar-tooltip-position": position,
|
|
12
|
-
children: text
|
|
13
|
-
})
|
|
14
|
-
]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Tooltip as default };
|
|
1
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";function Tooltip({children:i,enable:r,text:l="Tooltip Text",position:a="right",width:e,...d}){return t("div",{...d,"data-toolbar-tooltip-trigger":!0,children:[i,r&&o("div",{style:{width:e,zIndex:50},"data-toolbar-tooltip":!0,"data-toolbar-tooltip-position":a,dangerouslySetInnerHTML:{__html:l}})]})}export{Tooltip as default};
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useContext, useMemo, createContext } from 'react';
|
|
3
|
-
import Empty from '../components/Empty.js';
|
|
4
|
-
|
|
5
|
-
const AddonContext = /*#__PURE__*/ createContext(null);
|
|
6
|
-
const AddonProvider = ({ children, components, ...passProps })=>{
|
|
7
|
-
return /*#__PURE__*/ jsx(AddonContext.Provider, {
|
|
8
|
-
...passProps,
|
|
9
|
-
value: {
|
|
10
|
-
components
|
|
11
|
-
},
|
|
12
|
-
children: children
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
const useAddons = ()=>{
|
|
16
|
-
const context = useContext(AddonContext);
|
|
17
|
-
if (!context) {
|
|
18
|
-
throw new Error('useAddons must be used within an AddonProvider');
|
|
19
|
-
}
|
|
20
|
-
return useMemo(()=>context.components, [
|
|
21
|
-
context.components
|
|
22
|
-
]);
|
|
23
|
-
};
|
|
24
|
-
const useAddon = (id)=>{
|
|
25
|
-
const addons = useAddons();
|
|
26
|
-
return useMemo(()=>id ? addons[id] ?? Empty : Empty, [
|
|
27
|
-
id,
|
|
28
|
-
addons
|
|
29
|
-
]);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { AddonProvider, useAddon, useAddons };
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useContext as d,useMemo as e,createContext as n}from"react";import r from"../components/Empty.js";let AddonContext=n(null),AddonProvider=({children:d,components:e,...n})=>o(AddonContext.Provider,{...n,value:{components:e},children:d}),useAddons=()=>{let o=d(AddonContext);if(!o)throw Error("useAddons must be used within an AddonProvider");return e(()=>o.components,[o.components])},useAddon=o=>{let d=useAddons();return e(()=>o?d[o]??r:r,[o,d])};export{AddonProvider,useAddon,useAddons};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useStore, createStore } from 'zustand';
|
|
3
|
-
import { useContext, createContext } from 'react';
|
|
4
|
-
import Empty from '../components/Empty.js';
|
|
5
|
-
|
|
6
|
-
const BuilderComponentContext = /*#__PURE__*/ createContext(null);
|
|
7
|
-
const createBuilderComponentStore = (components)=>createStore((_, get)=>({
|
|
8
|
-
components,
|
|
9
|
-
getItem: (id)=>{
|
|
10
|
-
return get().components[id];
|
|
11
|
-
}
|
|
12
|
-
}));
|
|
13
|
-
const BuilderComponentProvider = ({ children, components, ...passProps })=>{
|
|
14
|
-
return /*#__PURE__*/ jsx(BuilderComponentContext.Provider, {
|
|
15
|
-
...passProps,
|
|
16
|
-
value: createBuilderComponentStore(components),
|
|
17
|
-
children: children
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
// export const useBuilderComponent = (id?: string) => {
|
|
21
|
-
// return useStore((s) => (id ? s.getItem(id) ?? Empty : Empty));
|
|
22
|
-
// };
|
|
23
|
-
const useBuilderComponent = (id)=>{
|
|
24
|
-
const store = useContext(BuilderComponentContext);
|
|
25
|
-
if (!store) {
|
|
26
|
-
throw new Error('useBuilderComponent must be used within a BuilderComponentProvider');
|
|
27
|
-
}
|
|
28
|
-
return useStore(store, (s)=>id ? s.getItem(id) ?? Empty : Empty);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { BuilderComponentProvider, useBuilderComponent };
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useStore as o,createStore as t}from"zustand";import{useContext as r,createContext as n}from"react";import m from"../components/Empty.js";let BuilderComponentContext=n(null),createBuilderComponentStore=e=>t((o,t)=>({components:e,getItem:e=>t().components[e]})),BuilderComponentProvider=({children:o,components:t,...r})=>e(BuilderComponentContext.Provider,{...r,value:createBuilderComponentStore(t),children:o}),useBuilderComponent=e=>{let t=r(BuilderComponentContext);if(!t)throw Error("useBuilderComponent must be used within a BuilderComponentProvider");return o(t,o=>e?o.getItem(e)??m:m)};export{BuilderComponentProvider,useBuilderComponent};
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useContext, createContext, Suspense, Fragment } from 'react';
|
|
3
|
-
import { useStore, createStore } from 'zustand';
|
|
4
|
-
|
|
5
|
-
const BuilderContext = /*#__PURE__*/ createContext(null);
|
|
6
|
-
const createBuilderProvider = (data)=>createStore((_, get)=>({
|
|
7
|
-
state: data,
|
|
8
|
-
getItem: (id)=>{
|
|
9
|
-
return get().state[id];
|
|
10
|
-
}
|
|
11
|
-
}));
|
|
12
|
-
const BuilderProvider = ({ children, state, lazy, priority, ...passProps })=>{
|
|
13
|
-
const Component = lazy ? Suspense : Fragment;
|
|
14
|
-
const store = createBuilderProvider(state);
|
|
15
|
-
return /*#__PURE__*/ jsx(Component, {
|
|
16
|
-
children: /*#__PURE__*/ jsx(BuilderContext.Provider, {
|
|
17
|
-
...passProps,
|
|
18
|
-
value: store,
|
|
19
|
-
children: children
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
// export const useBuilderStore = useStore;
|
|
24
|
-
const useBuilderStore = (selector, equalityFn)=>{
|
|
25
|
-
const store = useContext(BuilderContext);
|
|
26
|
-
if (!store) {
|
|
27
|
-
throw new Error('useBuilderStore must be used within a BuilderProvider');
|
|
28
|
-
}
|
|
29
|
-
return useStore(store, selector, equalityFn);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { BuilderProvider, useBuilderStore };
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useContext as r,createContext as t,Suspense as i,Fragment as u}from"react";import{useStore as o,createStore as d}from"zustand";let BuilderContext=t(null),createBuilderProvider=(e,r)=>d((t,i)=>({state:e,isPostPurchase:r,getItem:e=>i().state[e],getIsPostPurchase:()=>i().isPostPurchase})),BuilderProvider=({children:r,state:t,isPostPurchase:o,lazy:d,priority:l,...s})=>{let a=d?i:u,P=createBuilderProvider(t,o);return e(a,{children:e(BuilderContext.Provider,{...s,value:P,children:r})})},useBuilderStore=(e,t)=>{let i=r(BuilderContext);if(!i)throw Error("useBuilderStore must be used within a BuilderProvider");return o(i,e,t)};export{BuilderProvider,useBuilderStore};
|