@gem-sdk/core 1.23.0-staging.106 → 1.23.0-staging.113
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/helpers/radius.js +12 -15
- package/dist/esm/helpers/radius.js +12 -15
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -9,10 +9,10 @@ const getCornerCSSFromGlobal = (corner)=>{
|
|
|
9
9
|
'custom',
|
|
10
10
|
'circle'
|
|
11
11
|
].includes(corner?.radiusType)) return makeStyle.makeStyle({
|
|
12
|
-
bblr:
|
|
13
|
-
bbrr:
|
|
14
|
-
btlr:
|
|
15
|
-
btrr:
|
|
12
|
+
bblr: corner.bblr,
|
|
13
|
+
bbrr: corner.bbrr,
|
|
14
|
+
btlr: corner.btlr,
|
|
15
|
+
btrr: corner.btrr
|
|
16
16
|
});
|
|
17
17
|
return makeStyle.makeStyle({
|
|
18
18
|
radius: `var(--g-radius-${corner?.radiusType})`
|
|
@@ -31,10 +31,10 @@ const getCustomRadius = (state, radius, device)=>{
|
|
|
31
31
|
const suffix = device && device !== 'desktop' ? constant.devicesMapping?.[device] : '';
|
|
32
32
|
const mState = constant.stateMapping?.[state];
|
|
33
33
|
return {
|
|
34
|
-
[`-${mState}-bblr${suffix}`]:
|
|
35
|
-
[`-${mState}-bbrr${suffix}`]:
|
|
36
|
-
[`-${mState}-btlr${suffix}`]:
|
|
37
|
-
[`-${mState}-btrr${suffix}`]:
|
|
34
|
+
[`-${mState}-bblr${suffix}`]: radius.bblr,
|
|
35
|
+
[`-${mState}-bbrr${suffix}`]: radius.bbrr,
|
|
36
|
+
[`-${mState}-btlr${suffix}`]: radius.btlr,
|
|
37
|
+
[`-${mState}-btrr${suffix}`]: radius.btrr
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
const composeRadius = (value)=>{
|
|
@@ -121,18 +121,15 @@ const composeCornerCss = (value, important = false)=>{
|
|
|
121
121
|
case 'none':
|
|
122
122
|
case 'custom':
|
|
123
123
|
radiusValue = `
|
|
124
|
-
${bblr ? `border-bottom-left-radius: ${
|
|
125
|
-
${bbrr ? `border-bottom-right-radius: ${
|
|
126
|
-
${btlr ? `border-top-left-radius: ${
|
|
127
|
-
${btrr ? `border-top-right-radius: ${
|
|
124
|
+
${bblr ? `border-bottom-left-radius: ${bblr}${sub};` : ''}
|
|
125
|
+
${bbrr ? `border-bottom-right-radius: ${bbrr}${sub};` : ''}
|
|
126
|
+
${btlr ? `border-top-left-radius: ${btlr}${sub};` : ''}
|
|
127
|
+
${btrr ? `border-top-right-radius: ${btrr}${sub};` : ''}
|
|
128
128
|
`;
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
131
|
return radiusValue;
|
|
132
132
|
};
|
|
133
|
-
const convertCornerPercentToCircle = (value)=>{
|
|
134
|
-
return value && value.includes('%') && parseInt(value) >= 50 ? '999999px' : value;
|
|
135
|
-
};
|
|
136
133
|
|
|
137
134
|
exports.composeCornerCss = composeCornerCss;
|
|
138
135
|
exports.composeRadius = composeRadius;
|
|
@@ -7,10 +7,10 @@ const getCornerCSSFromGlobal = (corner)=>{
|
|
|
7
7
|
'custom',
|
|
8
8
|
'circle'
|
|
9
9
|
].includes(corner?.radiusType)) return makeStyle({
|
|
10
|
-
bblr:
|
|
11
|
-
bbrr:
|
|
12
|
-
btlr:
|
|
13
|
-
btrr:
|
|
10
|
+
bblr: corner.bblr,
|
|
11
|
+
bbrr: corner.bbrr,
|
|
12
|
+
btlr: corner.btlr,
|
|
13
|
+
btrr: corner.btrr
|
|
14
14
|
});
|
|
15
15
|
return makeStyle({
|
|
16
16
|
radius: `var(--g-radius-${corner?.radiusType})`
|
|
@@ -29,10 +29,10 @@ const getCustomRadius = (state, radius, device)=>{
|
|
|
29
29
|
const suffix = device && device !== 'desktop' ? devicesMapping?.[device] : '';
|
|
30
30
|
const mState = stateMapping?.[state];
|
|
31
31
|
return {
|
|
32
|
-
[`-${mState}-bblr${suffix}`]:
|
|
33
|
-
[`-${mState}-bbrr${suffix}`]:
|
|
34
|
-
[`-${mState}-btlr${suffix}`]:
|
|
35
|
-
[`-${mState}-btrr${suffix}`]:
|
|
32
|
+
[`-${mState}-bblr${suffix}`]: radius.bblr,
|
|
33
|
+
[`-${mState}-bbrr${suffix}`]: radius.bbrr,
|
|
34
|
+
[`-${mState}-btlr${suffix}`]: radius.btlr,
|
|
35
|
+
[`-${mState}-btrr${suffix}`]: radius.btrr
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
const composeRadius = (value)=>{
|
|
@@ -119,17 +119,14 @@ const composeCornerCss = (value, important = false)=>{
|
|
|
119
119
|
case 'none':
|
|
120
120
|
case 'custom':
|
|
121
121
|
radiusValue = `
|
|
122
|
-
${bblr ? `border-bottom-left-radius: ${
|
|
123
|
-
${bbrr ? `border-bottom-right-radius: ${
|
|
124
|
-
${btlr ? `border-top-left-radius: ${
|
|
125
|
-
${btrr ? `border-top-right-radius: ${
|
|
122
|
+
${bblr ? `border-bottom-left-radius: ${bblr}${sub};` : ''}
|
|
123
|
+
${bbrr ? `border-bottom-right-radius: ${bbrr}${sub};` : ''}
|
|
124
|
+
${btlr ? `border-top-left-radius: ${btlr}${sub};` : ''}
|
|
125
|
+
${btrr ? `border-top-right-radius: ${btrr}${sub};` : ''}
|
|
126
126
|
`;
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
return radiusValue;
|
|
130
130
|
};
|
|
131
|
-
const convertCornerPercentToCircle = (value)=>{
|
|
132
|
-
return value && value.includes('%') && parseInt(value) >= 50 ? '999999px' : value;
|
|
133
|
-
};
|
|
134
131
|
|
|
135
132
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -139,6 +139,7 @@ type RyviuWidgetType = 'reviews' | 'badge' | 'badgeCollection' | 'carousel' | 'm
|
|
|
139
139
|
type RivyoWidgetType = 'reviews' | 'badge' | 'testimonials' | 'allReviewsPage';
|
|
140
140
|
type VitalsWidgetType = 'addToWishlist' | 'goToWishlist' | 'paymentLogos' | 'recentlyViewed' | 'shoppableInstagramFeed' | 'trustSealsAndBadges' | 'productReviews' | 'productBundles' | 'volumeDiscounts' | 'stockScarcity';
|
|
141
141
|
type FeraReviewsWidgetType = 'productReviews' | 'testimonialCarousel' | 'allReviews' | 'averageStoreRatingBadge' | 'inStoreMedia' | 'averageRatingBadge' | 'productPageMedia';
|
|
142
|
+
type GrowaveWidgetType = 'reviews' | 'badge' | 'productListBadge' | 'wishList' | 'socialShare' | 'favorite';
|
|
142
143
|
type OmnisendWidgetType = 'landing-page' | 'embedded';
|
|
143
144
|
type BoldSubscriptionsWidgetType = 'v1' | 'v2';
|
|
144
145
|
type PickyStoryWidgetType = 'gem-picky-bundle' | 'gem-picky-kit' | 'gem-picky-buy-the-look' | 'gem-picky-gallery';
|
|
@@ -9910,4 +9911,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9910
9911
|
|
|
9911
9912
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9912
9913
|
|
|
9913
|
-
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, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OptionNormalStyle, OptionSpecialStyle, PageContext, PageProvider, PageProviderProps, 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, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, 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, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, 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 };
|
|
9914
|
+
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, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OptionNormalStyle, OptionSpecialStyle, PageContext, PageProvider, PageProviderProps, 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, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, 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, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, 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 };
|