@gem-sdk/core 1.23.0 → 1.23.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/ComponentToolbarPreview.js +443 -0
- package/dist/cjs/components/ComponentWrapper.js +25 -8
- package/dist/cjs/components/ComponentWrapperPreview.js +37 -4
- package/dist/cjs/components/Render.liquid.js +8 -0
- package/dist/cjs/components/RenderCustomCode.js +2 -0
- package/dist/cjs/components/resize/Resize.js +16 -0
- package/dist/cjs/components/resize/Spacing.js +132 -0
- package/dist/cjs/components/src/product/helpers/variant-presets.js +56 -0
- package/dist/cjs/components/theme-section/CreateThemeSection.js +117 -0
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +36 -0
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +102 -0
- package/dist/cjs/components/toolbar/Tooltip.js +22 -0
- package/dist/cjs/contexts/BuilderPreviewContext.js +36 -4
- package/dist/cjs/contexts/ShopContext.js +10 -0
- package/dist/cjs/graphql/queries/product-value-label.generated.js +11 -0
- package/dist/cjs/helpers/background.js +64 -5
- package/dist/cjs/helpers/filter-toolbar-preview.js +14 -0
- package/dist/cjs/helpers/is-empty-children.js +4 -1
- package/dist/cjs/helpers/make-style.js +8 -0
- package/dist/cjs/helpers/size.js +54 -0
- package/dist/cjs/helpers/typography.js +10 -9
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +113 -0
- package/dist/cjs/hooks/useProduct.js +10 -3
- package/dist/cjs/index.js +10 -0
- package/dist/esm/components/ComponentToolbarPreview.js +441 -0
- package/dist/esm/components/ComponentWrapper.js +26 -9
- package/dist/esm/components/ComponentWrapperPreview.js +38 -5
- package/dist/esm/components/Render.liquid.js +8 -0
- package/dist/esm/components/RenderCustomCode.js +2 -0
- package/dist/esm/components/resize/Resize.js +12 -0
- package/dist/esm/components/resize/Spacing.js +128 -0
- package/dist/esm/components/src/product/helpers/variant-presets.js +54 -0
- package/dist/esm/components/theme-section/CreateThemeSection.js +115 -0
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +34 -0
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +100 -0
- package/dist/esm/components/toolbar/Tooltip.js +18 -0
- package/dist/esm/contexts/BuilderPreviewContext.js +36 -4
- package/dist/esm/contexts/ShopContext.js +10 -0
- package/dist/esm/graphql/queries/product-value-label.generated.js +9 -0
- package/dist/esm/helpers/background.js +64 -6
- package/dist/esm/helpers/filter-toolbar-preview.js +9 -0
- package/dist/esm/helpers/is-empty-children.js +4 -1
- package/dist/esm/helpers/make-style.js +8 -1
- package/dist/esm/helpers/size.js +51 -1
- package/dist/esm/helpers/typography.js +10 -9
- package/dist/esm/hooks/useInitialSwatchesOptions.js +109 -0
- package/dist/esm/hooks/useProduct.js +10 -3
- package/dist/esm/index.js +5 -3
- package/dist/types/index.d.ts +96 -10
- package/package.json +2 -2
package/dist/esm/helpers/size.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { makeStyleResponsive } from './make-style.js';
|
|
1
2
|
import { devicesMapping } from './constant.js';
|
|
2
3
|
|
|
3
4
|
function getCustomSizeCSSByDevice(size, device) {
|
|
@@ -27,5 +28,54 @@ const composeSizeCss = (spacing)=>{
|
|
|
27
28
|
${sizeVerti ? `padding-top: ${sizeVerti}; padding-bottom: ${sizeVerti};` : undefined}
|
|
28
29
|
`;
|
|
29
30
|
};
|
|
31
|
+
const makeGlobalSize = (globalSize)=>{
|
|
32
|
+
return {
|
|
33
|
+
width: makeStyleWithDefault('w', getWidthHeightGlobalSize('width', globalSize), {
|
|
34
|
+
desktop: '--g-ct-w',
|
|
35
|
+
tablet: '--g-ct-w',
|
|
36
|
+
mobile: '--g-ct-w'
|
|
37
|
+
}),
|
|
38
|
+
height: makeStyleResponsive('h', getWidthHeightGlobalSize('height', globalSize)),
|
|
39
|
+
padding: getPaddingGlobalSize(globalSize)
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const makeStyleWithDefault = (name, value, defaultVal)=>{
|
|
43
|
+
return {
|
|
44
|
+
[`--${name}`]: value?.desktop === 'default' ? `var(${defaultVal?.desktop})` : value?.desktop,
|
|
45
|
+
[`--${name}-tablet`]: value?.tablet === 'default' ? `var(${defaultVal?.tablet})` : value?.tablet,
|
|
46
|
+
[`--${name}-mobile`]: value?.mobile === 'default' ? `var(${defaultVal?.mobile})` : value?.mobile
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const getWidthHeightGlobalSize = (type, globalSize)=>{
|
|
50
|
+
if (!globalSize) return {};
|
|
51
|
+
const data = {
|
|
52
|
+
desktop: globalSize?.desktop?.[type],
|
|
53
|
+
tablet: globalSize?.tablet?.[type],
|
|
54
|
+
mobile: globalSize?.mobile?.[type]
|
|
55
|
+
};
|
|
56
|
+
if (data.desktop === undefined) {
|
|
57
|
+
data.desktop = 'auto';
|
|
58
|
+
}
|
|
59
|
+
if (data.tablet === undefined) {
|
|
60
|
+
data.tablet = data.desktop;
|
|
61
|
+
}
|
|
62
|
+
if (data.mobile === undefined) {
|
|
63
|
+
data.mobile = data.tablet;
|
|
64
|
+
}
|
|
65
|
+
return data;
|
|
66
|
+
};
|
|
67
|
+
function getCustomPaddingSizeCSSByDevice(globalSize, device) {
|
|
68
|
+
if (!globalSize || !device) return {};
|
|
69
|
+
const suffix = devicesMapping[device] ?? '';
|
|
70
|
+
return {
|
|
71
|
+
[`--pl${suffix}`]: globalSize?.[device]?.padding?.left,
|
|
72
|
+
[`--pr${suffix}`]: globalSize?.[device]?.padding?.right,
|
|
73
|
+
[`--pt${suffix}`]: globalSize?.[device]?.padding?.top,
|
|
74
|
+
[`--pb${suffix}`]: globalSize?.[device]?.padding?.bottom
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const getPaddingGlobalSize = (globalSize)=>{
|
|
78
|
+
return Object.assign({}, getCustomPaddingSizeCSSByDevice(globalSize, 'desktop'), getCustomPaddingSizeCSSByDevice(globalSize, 'tablet'), getCustomPaddingSizeCSSByDevice(globalSize, 'mobile'));
|
|
79
|
+
};
|
|
30
80
|
|
|
31
|
-
export { composeSize, composeSizeCss, genSizeClass };
|
|
81
|
+
export { composeSize, composeSizeCss, genSizeClass, getPaddingGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault };
|
|
@@ -16,20 +16,21 @@ const composeTypographyCss = (typography)=>{
|
|
|
16
16
|
${lineHeight ? `line-height: ${lineHeight};` : ''}
|
|
17
17
|
`;
|
|
18
18
|
};
|
|
19
|
-
const composeTypographyV2Css = (typography)=>{
|
|
19
|
+
const composeTypographyV2Css = (typography, isImportant)=>{
|
|
20
20
|
const typographyCustom = typography?.custom;
|
|
21
21
|
const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographyCustom ?? {};
|
|
22
22
|
const typographyAttrs = typography?.attrs;
|
|
23
23
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
24
|
+
const composeImportant = isImportant ? '!important' : '';
|
|
24
25
|
return `
|
|
25
|
-
${fontFamily ? `font-family: var(--g-font-${fontFamily}, ${fontFamily});` : ''}
|
|
26
|
-
${fontSize?.desktop ? `font-size: ${fontSize?.desktop};` : ''}
|
|
27
|
-
${bold ? `font-weight: bold;` : fontWeight ? `font-weight: ${fontWeight};` : ''}
|
|
28
|
-
${letterSpacing ? `letter-spacing: ${letterSpacing};` : ''}
|
|
29
|
-
${lineHeight ? `line-height: ${lineHeight};` : ''}
|
|
30
|
-
${italic ? `font-style: italic;` : ''}
|
|
31
|
-
${underline ? `text-decoration-line: underline;` : ''}
|
|
32
|
-
${transform ? `text-transform: ${transform};` : ''}
|
|
26
|
+
${fontFamily ? `font-family: var(--g-font-${fontFamily}, ${fontFamily}) ${composeImportant};` : ''}
|
|
27
|
+
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant};` : ''}
|
|
28
|
+
${bold ? `font-weight: bold;` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant};` : ''}
|
|
29
|
+
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant};` : ''}
|
|
30
|
+
${lineHeight ? `line-height: ${lineHeight} ${composeImportant};` : ''}
|
|
31
|
+
${italic ? `font-style: italic${composeImportant};` : ''}
|
|
32
|
+
${underline ? `text-decoration-line: underline ${composeImportant};` : ''}
|
|
33
|
+
${transform ? `text-transform: ${transform} ${composeImportant};` : ''}
|
|
33
34
|
`;
|
|
34
35
|
};
|
|
35
36
|
function getCustomCSSByDevice(typography, device) {
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import useSWR from 'swr';
|
|
2
|
+
import { ProductOptionNameDocument } from '../graphql/queries/product-value-label.generated.js';
|
|
3
|
+
import { colorPreset } from '../components/src/product/helpers/variant-presets.js';
|
|
4
|
+
import { useSwatches } from './shop.js';
|
|
5
|
+
import { useFetchHandle } from './useFetchHandle.js';
|
|
6
|
+
import { useShopStore } from '../contexts/ShopContext.js';
|
|
7
|
+
|
|
8
|
+
let swatchChange = false;
|
|
9
|
+
let colorChange = false;
|
|
10
|
+
const useInitialSwatchesOptions = (options)=>{
|
|
11
|
+
const fetcher = useFetchHandle();
|
|
12
|
+
const changeSwatches = useShopStore((s)=>s.changeSwatches);
|
|
13
|
+
const { swatches } = useSwatches();
|
|
14
|
+
const { data: productOptionName } = useSWR([
|
|
15
|
+
'/query/productOptionName',
|
|
16
|
+
{}
|
|
17
|
+
], async ()=>fetchProductValueLabel(fetcher), {
|
|
18
|
+
revalidateOnMount: true
|
|
19
|
+
});
|
|
20
|
+
const swatchesTitleList = [];
|
|
21
|
+
swatches?.forEach((el)=>{
|
|
22
|
+
swatchesTitleList.push(el.optionTitle);
|
|
23
|
+
});
|
|
24
|
+
productOptionName?.productOptionName?.forEach((el)=>{
|
|
25
|
+
if (!swatchesTitleList.includes(el)) {
|
|
26
|
+
swatchChange = true;
|
|
27
|
+
swatches?.push({
|
|
28
|
+
optionTitle: el,
|
|
29
|
+
optionType: 'rectangle_list',
|
|
30
|
+
optionValues: []
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
if (!options) return [];
|
|
35
|
+
setDefaultSwatches(swatches, options);
|
|
36
|
+
if (swatches?.length && (swatchChange || colorChange)) {
|
|
37
|
+
window?.parent?.postMessage?.(JSON.stringify({
|
|
38
|
+
type: 'update-swatches',
|
|
39
|
+
swatches
|
|
40
|
+
}), '*');
|
|
41
|
+
changeSwatches(swatches);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getColorDefault = (label, color)=>{
|
|
45
|
+
const colorByLabel = label ? colorPreset[label.toLocaleLowerCase()] : undefined;
|
|
46
|
+
const colorArray = colorByLabel ? [
|
|
47
|
+
colorByLabel
|
|
48
|
+
] : [];
|
|
49
|
+
const firstColor = color?.[0];
|
|
50
|
+
if (!firstColor && colorArray.length) colorChange = true;
|
|
51
|
+
return firstColor ? [
|
|
52
|
+
firstColor
|
|
53
|
+
] : colorArray;
|
|
54
|
+
};
|
|
55
|
+
const getProductOptionsLabelByName = (options, name)=>{
|
|
56
|
+
const labels = [];
|
|
57
|
+
const optionByName = options.find((op)=>op.name === name);
|
|
58
|
+
optionByName?.values.forEach((val)=>{
|
|
59
|
+
labels.push(val.label ?? '');
|
|
60
|
+
});
|
|
61
|
+
return labels;
|
|
62
|
+
};
|
|
63
|
+
const getSwatchesOptionsLabel = (options)=>{
|
|
64
|
+
const labels = [];
|
|
65
|
+
options.forEach((op)=>{
|
|
66
|
+
labels.push(op.label ?? '');
|
|
67
|
+
return;
|
|
68
|
+
});
|
|
69
|
+
return labels;
|
|
70
|
+
};
|
|
71
|
+
const setDefaultSwatches = (swatches, options)=>{
|
|
72
|
+
if (swatches) {
|
|
73
|
+
swatches?.map((sw)=>{
|
|
74
|
+
const productLabels = getProductOptionsLabelByName(options, sw.optionTitle);
|
|
75
|
+
const swLabels = getSwatchesOptionsLabel(sw.optionValues);
|
|
76
|
+
productLabels.forEach((label)=>{
|
|
77
|
+
if (!swLabels.includes(label)) {
|
|
78
|
+
sw.optionValues.push({
|
|
79
|
+
label,
|
|
80
|
+
colors: getColorDefault(label),
|
|
81
|
+
imageUrl: ''
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
sw.optionValues = sw.optionValues.map((op)=>{
|
|
86
|
+
if (op.imageUrl === undefined) swatchChange = true;
|
|
87
|
+
return {
|
|
88
|
+
label: op.label ?? '',
|
|
89
|
+
colors: getColorDefault(op.label, op.colors),
|
|
90
|
+
imageUrl: op.imageUrl ?? ''
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return swatches;
|
|
96
|
+
};
|
|
97
|
+
const fetchProductValueLabel = async (fetcher)=>{
|
|
98
|
+
const initVariables = {};
|
|
99
|
+
const query = async (variables)=>{
|
|
100
|
+
const response = await fetcher([
|
|
101
|
+
ProductOptionNameDocument,
|
|
102
|
+
variables
|
|
103
|
+
]);
|
|
104
|
+
return response;
|
|
105
|
+
};
|
|
106
|
+
return query(initVariables);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export { useInitialSwatchesOptions as default };
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
2
2
|
import { useProductStore } from '../contexts/ProductContext.js';
|
|
3
3
|
import { flattenConnection } from '../helpers/flatten-connection.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'zustand';
|
|
4
6
|
import 'swr';
|
|
7
|
+
import '@gem-sdk/adapter-shopify';
|
|
8
|
+
import 'swr/mutation';
|
|
9
|
+
import 'vanilla-lazyload';
|
|
10
|
+
import './useCartUI.js';
|
|
11
|
+
import { checkInStock } from '../helpers/variant.js';
|
|
12
|
+
import 'react-transition-group';
|
|
13
|
+
import '@gem-sdk/core';
|
|
5
14
|
import { getSelectedVariant } from '../helpers/product.js';
|
|
6
15
|
import '../helpers/convert.js';
|
|
7
|
-
import { checkInStock } from '../helpers/variant.js';
|
|
8
16
|
|
|
9
17
|
const useUniqProductID = ()=>{
|
|
10
18
|
return useProductStore((s)=>s.uiqueId);
|
|
@@ -139,8 +147,7 @@ const useCurrentVariant = ()=>{
|
|
|
139
147
|
};
|
|
140
148
|
const useCurrentVariantInStock = ()=>{
|
|
141
149
|
const currentVariant = useCurrentVariant();
|
|
142
|
-
|
|
143
|
-
return isInStock;
|
|
150
|
+
return checkInStock(currentVariant);
|
|
144
151
|
};
|
|
145
152
|
const useVariantOutStock = (optionId, optionValue)=>{
|
|
146
153
|
const { selectedOptions } = useSelectedOption();
|
package/dist/esm/index.js
CHANGED
|
@@ -30,7 +30,8 @@ export { default as globalEvent } from './helpers/GlobalEvent.js';
|
|
|
30
30
|
export { default as isBrowser } from './helpers/is-browser.js';
|
|
31
31
|
export { default as isSafari } from './helpers/is-safari.js';
|
|
32
32
|
export { isEmptyChildren } from './helpers/is-empty-children.js';
|
|
33
|
-
export {
|
|
33
|
+
export { filterToolbarPreview } from './helpers/filter-toolbar-preview.js';
|
|
34
|
+
export { makeAspectRatio, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
|
|
34
35
|
export { normalizeBuilderData } from './helpers/normalize-builder-data.js';
|
|
35
36
|
export { prefetchQueries } from './helpers/prefetch-queries.js';
|
|
36
37
|
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
@@ -51,9 +52,9 @@ import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
|
51
52
|
export { tiktokpixel };
|
|
52
53
|
export { RenderIf, composeMemo, dataStringify, props, styles, template } from './helpers/render.js';
|
|
53
54
|
export { baseAssetURL, isLocalEnv } from './helpers/convert.js';
|
|
54
|
-
export { composeSize, composeSizeCss, genSizeClass } from './helpers/size.js';
|
|
55
|
+
export { composeSize, composeSizeCss, genSizeClass, getPaddingGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault } from './helpers/size.js';
|
|
55
56
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
56
|
-
export { composeBackgroundCss, getStyleBackgroundByDevice } from './helpers/background.js';
|
|
57
|
+
export { composeBackgroundCss, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
57
58
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
58
59
|
export { composeAdvanceStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
59
60
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
|
@@ -84,6 +85,7 @@ export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantIn
|
|
|
84
85
|
export { useProductList, useProductListProducts, useProductListSettings, useProductListStyles } from './hooks/useProductList.js';
|
|
85
86
|
export { default as useSuspenseFetch } from './hooks/useSuspenseFetch.js';
|
|
86
87
|
export { default as useSwatchesOptions } from './hooks/useSwatchesOptions.js';
|
|
88
|
+
export { default as useInitialSwatchesOptions } from './hooks/useInitialSwatchesOptions.js';
|
|
87
89
|
import * as shop from './types/shop.js';
|
|
88
90
|
export { shop as ShopType };
|
|
89
91
|
export { OptionNormalStyle, OptionSpecialStyle } from './types/global-style.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ type BlockEntity = {
|
|
|
30
30
|
uid: string;
|
|
31
31
|
tag: string;
|
|
32
32
|
label?: string;
|
|
33
|
+
customLabel?: string;
|
|
34
|
+
name?: string;
|
|
33
35
|
dateModified?: string | number;
|
|
34
36
|
childrens?: string[];
|
|
35
37
|
settings?: Record<string, any>;
|
|
@@ -37,12 +39,17 @@ type BlockEntity = {
|
|
|
37
39
|
styles?: Record<string, any>;
|
|
38
40
|
editorConfigs?: Record<string, any>;
|
|
39
41
|
type?: 'component';
|
|
42
|
+
isThemeSection?: boolean;
|
|
43
|
+
needPublishing?: boolean;
|
|
40
44
|
};
|
|
41
45
|
type SectionEntity = {
|
|
42
46
|
uid: string;
|
|
43
47
|
tag?: string;
|
|
44
48
|
label?: string;
|
|
45
49
|
type: 'section';
|
|
50
|
+
name?: string;
|
|
51
|
+
isThemeSection?: boolean;
|
|
52
|
+
needPublishing?: boolean;
|
|
46
53
|
};
|
|
47
54
|
type BuilderEntity = BlockEntity | SectionEntity;
|
|
48
55
|
type BuilderEntityNested = Omit<BlockEntity, 'childrens'> & {
|
|
@@ -53,6 +60,13 @@ type BuilderState = {
|
|
|
53
60
|
} & SectionData;
|
|
54
61
|
type SectionData = Record<string, BuilderEntity>;
|
|
55
62
|
type RenderMode = 'edit' | 'preview';
|
|
63
|
+
type DynamicProduct = {
|
|
64
|
+
productId?: string;
|
|
65
|
+
productHandle?: string;
|
|
66
|
+
} | null;
|
|
67
|
+
type DynamicCollection = {
|
|
68
|
+
collectionId?: string;
|
|
69
|
+
} | null;
|
|
56
70
|
|
|
57
71
|
type InitComponentType<T = any> = {
|
|
58
72
|
[K in keyof T]-?: {
|
|
@@ -77,6 +91,18 @@ type ImageShape$1 = {
|
|
|
77
91
|
width?: string;
|
|
78
92
|
height?: string;
|
|
79
93
|
};
|
|
94
|
+
type SizeSettingGlobal = {
|
|
95
|
+
shape?: 'square' | 'vertical' | 'horizontal' | 'custom';
|
|
96
|
+
padding?: {
|
|
97
|
+
type?: 'small' | 'medium' | 'large' | 'custom';
|
|
98
|
+
top?: string;
|
|
99
|
+
left?: string;
|
|
100
|
+
bottom?: string;
|
|
101
|
+
right?: string;
|
|
102
|
+
};
|
|
103
|
+
width?: string;
|
|
104
|
+
height?: string;
|
|
105
|
+
};
|
|
80
106
|
type FlexDirectionProp = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
81
107
|
type TransformProp = 'default' | 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
82
108
|
type BaseProps<Setting = unknown, Style = unknown, Advanced = Record<string, any>> = {
|
|
@@ -103,11 +129,13 @@ type StateType = 'normal' | 'hover' | 'focus' | 'active';
|
|
|
103
129
|
type StateProp<T> = Partial<Record<StateType, T>>;
|
|
104
130
|
type ResponsiveStateProp<T> = ObjectDevices<StateProp<T>>;
|
|
105
131
|
type AlignItemProp = 'left' | 'center' | 'right';
|
|
106
|
-
type JudgeMeReviewsWidgetType = 'single_product_preview_badge' | 'review_widget' | 'reviews_carousel' | '
|
|
132
|
+
type JudgeMeReviewsWidgetType = 'single_product_preview_badge' | 'review_widget' | 'reviews_carousel' | 'reviews_text' | 'section_for_medals' | 'ugc_media_grid' | 'verified_reviews_count_badge';
|
|
107
133
|
type LooxReviewsWidgetType = 'reviews_widget' | 'rating_widget' | 'carousel_widget';
|
|
108
134
|
type RyviuWidgetType = 'reviews' | 'badge' | 'badgeCollection' | 'carousel' | 'masonry';
|
|
109
135
|
type RivyoWidgetType = 'reviews' | 'badge' | 'testimonials' | 'allReviewsPage';
|
|
110
136
|
type VitalsWidgetType = 'addToWishlist' | 'goToWishlist' | 'paymentLogos' | 'recentlyViewed' | 'shoppableInstagramFeed' | 'trustSealsAndBadges' | 'productReviews' | 'productBundles' | 'volumeDiscounts' | 'stockScarcity';
|
|
137
|
+
type FeraReviewsWidgetType = 'productReviews' | 'testimonialCarousel' | 'allReviews' | 'averageStoreRatingBadge' | 'inStoreMedia' | 'averageRatingBadge' | 'productPageMedia';
|
|
138
|
+
type OmnisendWidgetType = 'landing-page' | 'embedded';
|
|
111
139
|
type BoldSubscriptionsWidgetType = 'v1' | 'v2';
|
|
112
140
|
type PickyStoryWidgetType = 'gem-picky-bundle' | 'gem-picky-kit' | 'gem-picky-buy-the-look' | 'gem-picky-gallery';
|
|
113
141
|
type KlaviyoWidgetType = 'popup_widget' | 'flyout_widget' | 'embed_widget' | 'full_page_widget';
|
|
@@ -117,6 +145,7 @@ type ObjectLayoutValue = {
|
|
|
117
145
|
keepCol?: boolean;
|
|
118
146
|
};
|
|
119
147
|
type ProductReviewsWidgetType = 'reviews' | 'badge';
|
|
148
|
+
type TrustooWidgetType = 'starRating' | 'reviews';
|
|
120
149
|
type WiserWidgetType = 'related' | 'recommended' | 'alsobought' | 'recentview' | 'newarrivals' | 'featured' | 'topselling' | 'trending' | 'recent_related';
|
|
121
150
|
type InstantJudgeMeReviewsWidgetType = 'single_product_preview_badge' | 'review_widget' | 'reviews_carousel' | 'floating_reviews_tab' | 'all_reviews_widget' | 'verified_reviews_count_badge' | 'medals' | 'media_grid' | 'all_reviews_text';
|
|
122
151
|
type InstantLooxReviewsWidgetType = 'product_reviews_widget' | 'reviews_widget_all_stores' | 'product_star_ratings_widget' | 'carousel_widget';
|
|
@@ -884,7 +913,27 @@ type GridArrange<T> = SharedControlType<T> & {
|
|
|
884
913
|
readonly?: boolean;
|
|
885
914
|
};
|
|
886
915
|
|
|
887
|
-
type
|
|
916
|
+
type SettingID = 'shape' | 'width' | 'height' | 'gap' | 'padding';
|
|
917
|
+
type OptionKeyword = 'default' | 'auto' | 'full' | 'equal' | 'small' | 'medium' | 'large';
|
|
918
|
+
type PaddingOptions = 'small' | 'medium' | 'large' | 'custom';
|
|
919
|
+
type PaddingConfig = Partial<Record<PaddingOptions, {
|
|
920
|
+
vertical: string;
|
|
921
|
+
horizontal: string;
|
|
922
|
+
}>>;
|
|
923
|
+
type SettingConfig = {
|
|
924
|
+
sizeConfig?: Partial<Record<'small' | 'medium' | 'large', string>>;
|
|
925
|
+
displayOptions?: OptionKeyword[];
|
|
926
|
+
paddingConfig?: PaddingConfig;
|
|
927
|
+
};
|
|
928
|
+
type SizeSetting$1<T> = SharedControlType<T> & {
|
|
929
|
+
type: 'size-setting';
|
|
930
|
+
placeholder?: string;
|
|
931
|
+
readonly?: boolean;
|
|
932
|
+
hiddenSettings?: SettingID[];
|
|
933
|
+
settingConfig?: Partial<Record<SettingID, SettingConfig>>;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T>;
|
|
888
937
|
type Setting<P extends BaseProps> = {
|
|
889
938
|
id: 'setting';
|
|
890
939
|
note?: string;
|
|
@@ -976,7 +1025,7 @@ type ControlUI = {
|
|
|
976
1025
|
};
|
|
977
1026
|
isMoreSetting?: boolean;
|
|
978
1027
|
};
|
|
979
|
-
type PageType = 'ARTICLE' | 'BLOG' | 'COLLECTION' | 'GP_ARTICLE' | 'GP_BLOG' | 'GP_COLLECTION' | 'GP_INDEX' | 'GP_PRODUCT' | 'GP_STATIC' | 'PRODUCT' | 'STATIC';
|
|
1028
|
+
type PageType = 'ARTICLE' | 'BLOG' | 'COLLECTION' | 'GP_ARTICLE' | 'GP_BLOG' | 'GP_COLLECTION' | 'GP_INDEX' | 'GP_PRODUCT' | 'GP_STATIC' | 'PRODUCT' | 'STATIC' | 'THEME_SECTION';
|
|
980
1029
|
type ComponentPreset = {
|
|
981
1030
|
id: string;
|
|
982
1031
|
name: {
|
|
@@ -7305,6 +7354,9 @@ declare const useBuilderStore: <U>(selector: (state: ExtractState<StoreApi<Build
|
|
|
7305
7354
|
type BuilderPreviewContextProps = {
|
|
7306
7355
|
state: BuilderState;
|
|
7307
7356
|
loaded?: boolean;
|
|
7357
|
+
isThemeSectionEditor?: boolean;
|
|
7358
|
+
dynamicProduct?: DynamicProduct;
|
|
7359
|
+
dynamicCollection?: DynamicCollection;
|
|
7308
7360
|
addItem: (args: {
|
|
7309
7361
|
data: BuilderEntityNested | BuilderEntityNested[];
|
|
7310
7362
|
type?: 'component' | 'section';
|
|
@@ -7325,11 +7377,15 @@ type BuilderPreviewContextProps = {
|
|
|
7325
7377
|
removeItem: (id: string) => void;
|
|
7326
7378
|
forceChangeState: (data: BuilderState) => void;
|
|
7327
7379
|
initState: (data: BuilderEntityNested | BuilderEntityNested[]) => void;
|
|
7380
|
+
getParents: (id: string, limit?: number) => BuilderEntity[];
|
|
7381
|
+
setDynamicProduct: (data: DynamicProduct) => void;
|
|
7382
|
+
setDynamicCollection: (data: DynamicCollection) => void;
|
|
7328
7383
|
};
|
|
7329
7384
|
type BuilderPreviewProviderProps = Pick<BuilderPreviewContextProps, 'state'> & {
|
|
7330
7385
|
children: React.ReactNode;
|
|
7331
7386
|
lazy?: boolean;
|
|
7332
7387
|
priority?: boolean;
|
|
7388
|
+
isThemeSectionEditor?: boolean;
|
|
7333
7389
|
};
|
|
7334
7390
|
declare const BuilderPreviewProvider: React.FC<BuilderPreviewProviderProps>;
|
|
7335
7391
|
declare const useBuilderPreviewStore: <U>(selector: (state: ExtractState<StoreApi<BuilderPreviewContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
@@ -7509,6 +7565,8 @@ type ShopContextProps = {
|
|
|
7509
7565
|
mobileOnly?: boolean;
|
|
7510
7566
|
swatches?: GlobalSwatchesData[];
|
|
7511
7567
|
isStorefront?: boolean;
|
|
7568
|
+
createThemeSectionCount?: number;
|
|
7569
|
+
plan?: string;
|
|
7512
7570
|
changeLocale: (locale: string) => void;
|
|
7513
7571
|
changeStorefrontInfo: (args: {
|
|
7514
7572
|
url?: string;
|
|
@@ -7517,12 +7575,14 @@ type ShopContextProps = {
|
|
|
7517
7575
|
changeCurrency: (currency: string) => void;
|
|
7518
7576
|
changeSwatches: (swatches: GlobalSwatchesData[]) => void;
|
|
7519
7577
|
changeLayoutSettings: (layoutSettings: LayoutSettings) => void;
|
|
7578
|
+
changeCreateThemeSectionCount: (count: number) => void;
|
|
7579
|
+
changeShopPlan: (plan: string) => void;
|
|
7520
7580
|
};
|
|
7521
7581
|
type ShopProviderProps = {
|
|
7522
7582
|
children: React.ReactNode;
|
|
7523
7583
|
key?: React.Key;
|
|
7524
7584
|
addons: AddonContextProps['components'];
|
|
7525
|
-
storeOption: Omit<ShopContextProps, 'changeLocale' | 'changeCurrency' | 'changeSwatches' | 'changeLayoutSettings' | '
|
|
7585
|
+
storeOption: Omit<ShopContextProps, 'changeLocale' | 'changeStorefrontInfo' | 'changeCurrency' | 'changeSwatches' | 'changeLayoutSettings' | 'changeCreateThemeSectionCount' | 'changeShopPlan'>;
|
|
7526
7586
|
queryOption?: React.ComponentProps<typeof SWRConfig>['value'];
|
|
7527
7587
|
};
|
|
7528
7588
|
declare const ShopProvider: React.FC<ShopProviderProps>;
|
|
@@ -7814,6 +7874,8 @@ declare function isSafari(): boolean;
|
|
|
7814
7874
|
|
|
7815
7875
|
declare const isEmptyChildren: (children: React.ReactNode) => boolean;
|
|
7816
7876
|
|
|
7877
|
+
declare const filterToolbarPreview: (children: React.ReactNode, keep?: boolean) => React.ReactNode;
|
|
7878
|
+
|
|
7817
7879
|
type ResponsiveKey<T extends ShortHandProperty> = `--${T}` | `--${T}-tablet` | `--${T}-mobile`;
|
|
7818
7880
|
declare const removeNullUndefined: <T extends Record<string, any>>(obj: T) => T;
|
|
7819
7881
|
declare const makeStyle: <T extends ShortHandProperty, K>(style: Record<T, K>) => {
|
|
@@ -7823,6 +7885,11 @@ declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?:
|
|
|
7823
7885
|
declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, Partial<Record<StateType, K>>>> | undefined) => {};
|
|
7824
7886
|
declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined) => Record<ResponsiveKey<T>, K>;
|
|
7825
7887
|
declare const makeWidth: (widthValue?: ObjectDevices<string | number>, fullWidthValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
7888
|
+
declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
7889
|
+
'--w': string | undefined;
|
|
7890
|
+
'--w-tablet': string | undefined;
|
|
7891
|
+
'--w-mobile': string | undefined;
|
|
7892
|
+
};
|
|
7826
7893
|
declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
7827
7894
|
declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
|
|
7828
7895
|
declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
@@ -7881,7 +7948,7 @@ declare const composeTextColorCss: (color?: ColorValueType) => string;
|
|
|
7881
7948
|
type TypographyClass = `g-${TypographyType}`;
|
|
7882
7949
|
declare const genTypoClass: (name: TypographyType) => TypographyClass;
|
|
7883
7950
|
declare const composeTypographyCss: (typography: TypographySetting | undefined) => string;
|
|
7884
|
-
declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined) => string;
|
|
7951
|
+
declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
|
|
7885
7952
|
declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
|
|
7886
7953
|
declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
7887
7954
|
declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
@@ -9453,6 +9520,14 @@ declare const baseAssetURL: string;
|
|
|
9453
9520
|
declare const composeSize: (size?: ObjectDevices<SizeProps>) => React.CSSProperties;
|
|
9454
9521
|
declare function genSizeClass(name: string): string;
|
|
9455
9522
|
declare const composeSizeCss: (spacing?: SizeSetting) => string | undefined;
|
|
9523
|
+
declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
9524
|
+
width: Record<ResponsiveKey<"w">, string | number>;
|
|
9525
|
+
height: Record<ResponsiveKey<"h">, string | number>;
|
|
9526
|
+
padding: React.CSSProperties;
|
|
9527
|
+
};
|
|
9528
|
+
declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, defaultVal?: Partial<Record<NameDevices, K>> | undefined) => Record<ResponsiveKey<T>, K>;
|
|
9529
|
+
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string | number>>;
|
|
9530
|
+
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
9456
9531
|
|
|
9457
9532
|
declare const parseValueWithUnit: (valueWithUnit: string) => any;
|
|
9458
9533
|
declare const getStyleShadow: (shadowStyle: ShadowStyle, isActiveState?: boolean) => {
|
|
@@ -9467,9 +9542,18 @@ declare const composeShadowCss: ({ hasBoxShadow, boxShadowValue, important, }: {
|
|
|
9467
9542
|
|
|
9468
9543
|
type Options = {
|
|
9469
9544
|
liquid?: boolean;
|
|
9545
|
+
ignoreBgAttachment?: boolean;
|
|
9470
9546
|
};
|
|
9471
9547
|
declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options) => {};
|
|
9472
9548
|
declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
|
|
9549
|
+
declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
|
|
9550
|
+
wrapper: {
|
|
9551
|
+
[x: string]: string;
|
|
9552
|
+
};
|
|
9553
|
+
content: {
|
|
9554
|
+
[x: string]: string | undefined;
|
|
9555
|
+
};
|
|
9556
|
+
} | undefined;
|
|
9473
9557
|
|
|
9474
9558
|
type OrderByType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'none' | 'CREATED_AT_DESC';
|
|
9475
9559
|
type FetchCollectionArgs = {
|
|
@@ -9691,12 +9775,12 @@ declare const useSelectedOption: () => {
|
|
|
9691
9775
|
setSelectedOption: (optionId?: Maybe<string>, optionValue?: Maybe<string>, productId?: Maybe<string>, noEmit?: boolean) => void;
|
|
9692
9776
|
forceSelectedOption: (selectedOption?: Record<string, string>, productId?: Maybe<string>, noEmit?: boolean) => void;
|
|
9693
9777
|
};
|
|
9694
|
-
declare const useVariants: () => Maybe<Pick<ProductVariant, "
|
|
9695
|
-
selectedOptions: Pick<SelectedOption, "
|
|
9778
|
+
declare const useVariants: () => Maybe<Pick<ProductVariant, "width" | "height" | "title" | "length" | "weight" | "id" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "price" | "salePrice" | "soldIndividually"> & {
|
|
9779
|
+
selectedOptions: Pick<SelectedOption, "name" | "value" | "optionType">[];
|
|
9696
9780
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
9697
9781
|
}>[];
|
|
9698
|
-
declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "
|
|
9699
|
-
selectedOptions: Pick<SelectedOption, "
|
|
9782
|
+
declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "width" | "height" | "title" | "length" | "weight" | "id" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "price" | "salePrice" | "soldIndividually"> & {
|
|
9783
|
+
selectedOptions: Pick<SelectedOption, "name" | "value" | "optionType">[];
|
|
9700
9784
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
9701
9785
|
}>;
|
|
9702
9786
|
declare const useCurrentVariant: () => Maybe<VariantSelectFragment>;
|
|
@@ -9732,6 +9816,8 @@ declare const useSuspenseFetch: <T>(key: string | any[], promise: () => Promise<
|
|
|
9732
9816
|
|
|
9733
9817
|
declare const useSwatchesOptions: (options?: ProductOption[]) => ProductOption[];
|
|
9734
9818
|
|
|
9819
|
+
declare const useInitialSwatchesOptions: (options?: ProductOption[]) => never[] | undefined;
|
|
9820
|
+
|
|
9735
9821
|
type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' | 'handle' | 'isMobile' | 'sectionPosition'> & {
|
|
9736
9822
|
pageSections?: Maybe<Array<Maybe<Pick<PublishedPageSection, 'cid' | 'component' | 'id'>>>>;
|
|
9737
9823
|
themePageCustomSections?: Maybe<Array<Maybe<Pick<PublishedCustomSection, 'cid' | 'component' | 'id' | 'type'>>>>;
|
|
@@ -9743,4 +9829,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9743
9829
|
|
|
9744
9830
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9745
9831
|
|
|
9746
|
-
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, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageContext, 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, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeRadiusResponsive, 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, useIsSyncProduct, 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 };
|
|
9832
|
+
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, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OptionNormalStyle, OptionSpecialStyle, PageContext, 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, 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, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, 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, 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@gem-sdk/adapter-shopify": "1.23.0",
|
|
28
|
-
"@gem-sdk/styles": "1.23.
|
|
28
|
+
"@gem-sdk/styles": "1.23.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.10",
|