@gem-sdk/core 1.14.3 → 1.15.1
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/Render.liquid.js +3 -2
- package/dist/cjs/helpers/get-resonsive-value.js +5 -0
- package/dist/cjs/helpers/radius.js +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/esm/components/Render.liquid.js +3 -2
- package/dist/esm/helpers/get-resonsive-value.js +5 -1
- package/dist/esm/helpers/radius.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -69,7 +69,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
69
69
|
uid: id,
|
|
70
70
|
builder,
|
|
71
71
|
components,
|
|
72
|
-
customProps
|
|
72
|
+
customProps,
|
|
73
|
+
parentTag: item.tag
|
|
73
74
|
})).join('')
|
|
74
75
|
});
|
|
75
76
|
}, ()=>{
|
|
@@ -88,7 +89,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
88
89
|
});
|
|
89
90
|
});
|
|
90
91
|
} else {
|
|
91
|
-
liquid = render.template`<div style="${style}" class="${item.uid}">
|
|
92
|
+
liquid = render.template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
92
93
|
${render.RenderIf(item?.childrens?.length, ()=>{
|
|
93
94
|
return Component({
|
|
94
95
|
builderProps: {
|
|
@@ -25,7 +25,12 @@ const getResponsiveValueByScreen = (value, breakpoint, defaultValue)=>{
|
|
|
25
25
|
return value?.desktop ?? defaultValue;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
const isColumnDirectionExist = (layout, breakpoint)=>{
|
|
29
|
+
if (breakpoint === 'desktop' || breakpoint === 'tablet') return false;
|
|
30
|
+
return layout?.[breakpoint]?.cols?.length !== layout?.desktop?.cols?.length;
|
|
31
|
+
};
|
|
28
32
|
|
|
29
33
|
exports.getResponsiveStateValue = getResponsiveStateValue;
|
|
30
34
|
exports.getResponsiveValue = getResponsiveValue;
|
|
31
35
|
exports.getResponsiveValueByScreen = getResponsiveValueByScreen;
|
|
36
|
+
exports.isColumnDirectionExist = isColumnDirectionExist;
|
|
@@ -15,7 +15,7 @@ const getCornerCSSFromGlobal = (corner)=>{
|
|
|
15
15
|
btrr: corner.btrr
|
|
16
16
|
});
|
|
17
17
|
return makeStyle.makeStyle({
|
|
18
|
-
radius: `var(--g-radius-${corner
|
|
18
|
+
radius: `var(--g-radius-${corner?.radiusType})`
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
const getRadiusCSSFromGlobal = (state, key, device)=>{
|
|
@@ -27,7 +27,7 @@ const getRadiusCSSFromGlobal = (state, key, device)=>{
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
const getCustomRadius = (state, radius, device)=>{
|
|
30
|
-
if (!radius || !state || radius
|
|
30
|
+
if (!radius || !state || radius?.radiusType !== 'custom') return {};
|
|
31
31
|
const suffix = device && device !== 'desktop' ? constant.devicesMapping?.[device] : '';
|
|
32
32
|
const mState = constant.stateMapping?.[state];
|
|
33
33
|
return {
|
package/dist/cjs/index.js
CHANGED
|
@@ -140,6 +140,7 @@ exports.flattenConnection = flattenConnection.flattenConnection;
|
|
|
140
140
|
exports.getResponsiveStateValue = getResonsiveValue.getResponsiveStateValue;
|
|
141
141
|
exports.getResponsiveValue = getResonsiveValue.getResponsiveValue;
|
|
142
142
|
exports.getResponsiveValueByScreen = getResonsiveValue.getResponsiveValueByScreen;
|
|
143
|
+
exports.isColumnDirectionExist = getResonsiveValue.isColumnDirectionExist;
|
|
143
144
|
exports.getShortName = getShortname.getShortName;
|
|
144
145
|
exports.globalEvent = GlobalEvent.default;
|
|
145
146
|
exports.isBrowser = isBrowser.default;
|
|
@@ -65,7 +65,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
65
65
|
uid: id,
|
|
66
66
|
builder,
|
|
67
67
|
components,
|
|
68
|
-
customProps
|
|
68
|
+
customProps,
|
|
69
|
+
parentTag: item.tag
|
|
69
70
|
})).join('')
|
|
70
71
|
});
|
|
71
72
|
}, ()=>{
|
|
@@ -84,7 +85,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
84
85
|
});
|
|
85
86
|
});
|
|
86
87
|
} else {
|
|
87
|
-
liquid = template`<div style="${style}" class="${item.uid}">
|
|
88
|
+
liquid = template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
88
89
|
${RenderIf(item?.childrens?.length, ()=>{
|
|
89
90
|
return Component({
|
|
90
91
|
builderProps: {
|
|
@@ -23,5 +23,9 @@ const getResponsiveValueByScreen = (value, breakpoint, defaultValue)=>{
|
|
|
23
23
|
return value?.desktop ?? defaultValue;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
const isColumnDirectionExist = (layout, breakpoint)=>{
|
|
27
|
+
if (breakpoint === 'desktop' || breakpoint === 'tablet') return false;
|
|
28
|
+
return layout?.[breakpoint]?.cols?.length !== layout?.desktop?.cols?.length;
|
|
29
|
+
};
|
|
26
30
|
|
|
27
|
-
export { getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen };
|
|
31
|
+
export { getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, isColumnDirectionExist };
|
|
@@ -13,7 +13,7 @@ const getCornerCSSFromGlobal = (corner)=>{
|
|
|
13
13
|
btrr: corner.btrr
|
|
14
14
|
});
|
|
15
15
|
return makeStyle({
|
|
16
|
-
radius: `var(--g-radius-${corner
|
|
16
|
+
radius: `var(--g-radius-${corner?.radiusType})`
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
const getRadiusCSSFromGlobal = (state, key, device)=>{
|
|
@@ -25,7 +25,7 @@ const getRadiusCSSFromGlobal = (state, key, device)=>{
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
const getCustomRadius = (state, radius, device)=>{
|
|
28
|
-
if (!radius || !state || radius
|
|
28
|
+
if (!radius || !state || radius?.radiusType !== 'custom') return {};
|
|
29
29
|
const suffix = device && device !== 'desktop' ? devicesMapping?.[device] : '';
|
|
30
30
|
const mState = stateMapping?.[state];
|
|
31
31
|
return {
|
package/dist/esm/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export { PreviewPageDocument } from './graphql/queries/preview-page.generated.js
|
|
|
24
24
|
export { composeBorderCss, getBorderStyle, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn } from './helpers/borders.js';
|
|
25
25
|
export { cls } from './helpers/cls.js';
|
|
26
26
|
export { flattenConnection } from './helpers/flatten-connection.js';
|
|
27
|
-
export { getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen } from './helpers/get-resonsive-value.js';
|
|
27
|
+
export { getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, isColumnDirectionExist } from './helpers/get-resonsive-value.js';
|
|
28
28
|
export { getShortName } from './helpers/get-shortname.js';
|
|
29
29
|
export { default as globalEvent } from './helpers/GlobalEvent.js';
|
|
30
30
|
export { default as isBrowser } from './helpers/is-browser.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7710,6 +7710,7 @@ declare const flattenConnection: <T>(connection?: Maybe<GraphQLConnection<T>>) =
|
|
|
7710
7710
|
declare const getResponsiveValue: <I, K extends keyof I>(input?: Partial<Record<NameDevices, I>> | undefined, k?: K | undefined) => Partial<Record<NameDevices, I[K]>>;
|
|
7711
7711
|
declare const getResponsiveStateValue: <I>(k: StateType, input?: Partial<Record<NameDevices, Partial<Record<StateType, I>>>> | undefined) => Partial<Record<NameDevices, I>>;
|
|
7712
7712
|
declare const getResponsiveValueByScreen: <T>(value?: Partial<Record<NameDevices, T>> | undefined, breakpoint?: NameDevices | undefined, defaultValue?: T | undefined) => T | undefined;
|
|
7713
|
+
declare const isColumnDirectionExist: (layout: ObjectDevices<ObjectLayoutValue>, breakpoint: keyof ObjectDevices<ObjectLayoutValue>) => boolean;
|
|
7713
7714
|
|
|
7714
7715
|
declare function getShortName(name: string): string;
|
|
7715
7716
|
|
|
@@ -9641,4 +9642,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9641
9642
|
|
|
9642
9643
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9643
9644
|
|
|
9644
|
-
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, WiserWidgetType, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
9645
|
+
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, WiserWidgetType, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|