@gem-sdk/core 1.28.10 → 1.29.4
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 +8 -1
- package/dist/cjs/components/resize/Spacing.js +10 -3
- package/dist/cjs/contexts/BuilderPreviewContext.js +13 -0
- package/dist/cjs/helpers/background.js +38 -0
- package/dist/cjs/helpers/compose-advance-style.js +7 -5
- package/dist/cjs/index.js +3 -0
- package/dist/esm/components/ComponentToolbarPreview.js +8 -1
- package/dist/esm/components/resize/Spacing.js +10 -3
- package/dist/esm/contexts/BuilderPreviewContext.js +13 -0
- package/dist/esm/helpers/background.js +36 -1
- package/dist/esm/helpers/compose-advance-style.js +7 -5
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +12 -2
- package/package.json +2 -2
|
@@ -212,6 +212,13 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
212
212
|
}
|
|
213
213
|
return false;
|
|
214
214
|
};
|
|
215
|
+
const getSectionName = ()=>{
|
|
216
|
+
const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
|
|
217
|
+
if (getSectionNumber() >= SECTION_LIMIT - 5) {
|
|
218
|
+
return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
|
|
219
|
+
}
|
|
220
|
+
return checkRenamedSection ? `Section ${getIndexSection() + 1}` : props?.name;
|
|
221
|
+
};
|
|
215
222
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
216
223
|
children: [
|
|
217
224
|
!(props.tag == 'Section' && isThemeSectionEditor) && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -262,7 +269,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
262
269
|
}),
|
|
263
270
|
props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
264
271
|
"data-toolbar-name": true,
|
|
265
|
-
children:
|
|
272
|
+
children: getSectionName()
|
|
266
273
|
}) : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
267
274
|
"data-toolbar-name": true,
|
|
268
275
|
children: toolbarName()
|
|
@@ -123,11 +123,18 @@ function Spacing(props) {
|
|
|
123
123
|
const toolbar = $component && getChildrenByAttrSelector($component, 'data-toolbar');
|
|
124
124
|
const isActive = toolbar && toolbar.getAttribute('data-toolbar-active');
|
|
125
125
|
if (isActive && detail?.marginBottom) {
|
|
126
|
-
const currentValue =
|
|
126
|
+
const currentValue = parseInt(detail?.marginBottom);
|
|
127
127
|
const newValue = `${currentValue}px`;
|
|
128
128
|
if ($bottomDrag.current && $bottomBg.current) {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
if (currentValue < 0) {
|
|
130
|
+
$bottomBg.current.style.display = 'none';
|
|
131
|
+
$bottomDrag.current.style.display = 'none';
|
|
132
|
+
} else {
|
|
133
|
+
$bottomBg.current.style.display = 'block';
|
|
134
|
+
$bottomDrag.current.style.display = 'block';
|
|
135
|
+
$bottomBg.current.style.height = newValue;
|
|
136
|
+
$bottomDrag.current.style.top = newValue;
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
}, []);
|
|
@@ -411,6 +411,19 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.creat
|
|
|
411
411
|
index++;
|
|
412
412
|
}
|
|
413
413
|
return parents;
|
|
414
|
+
},
|
|
415
|
+
updateItemName: (id, name)=>{
|
|
416
|
+
const state = get().state;
|
|
417
|
+
const item = state[id];
|
|
418
|
+
if (item) {
|
|
419
|
+
item.name = name;
|
|
420
|
+
set({
|
|
421
|
+
state: {
|
|
422
|
+
...state,
|
|
423
|
+
[id]: cloneDeep.cloneDeep(item)
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}
|
|
414
427
|
}
|
|
415
428
|
}));
|
|
416
429
|
const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, lazy, ...passProps })=>{
|
|
@@ -167,8 +167,46 @@ const makeFixedBgAttachmentByDevice = (device, bgAttachment)=>{
|
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
|
+
const GRADIENT_BGR_KEY = 'linear-gradient';
|
|
171
|
+
const getGradientBgrStyleForButton = (backgroundStyle)=>{
|
|
172
|
+
if (!backgroundStyle) return;
|
|
173
|
+
const bgrStyle = {};
|
|
174
|
+
Object.keys(backgroundStyle).forEach((state)=>{
|
|
175
|
+
if (!backgroundStyle[state]?.startsWith(GRADIENT_BGR_KEY)) return;
|
|
176
|
+
if (state === 'normal') {
|
|
177
|
+
Object.assign(bgrStyle, {
|
|
178
|
+
'--bg': backgroundStyle[state]
|
|
179
|
+
});
|
|
180
|
+
} else {
|
|
181
|
+
Object.assign(bgrStyle, {
|
|
182
|
+
'--hvr-bg': backgroundStyle[state]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
return bgrStyle;
|
|
187
|
+
};
|
|
188
|
+
const getGradientBgrStyleByDevice = (backgroundStyle)=>{
|
|
189
|
+
if (!backgroundStyle) return;
|
|
190
|
+
const bgrStyle = {};
|
|
191
|
+
[
|
|
192
|
+
'desktop',
|
|
193
|
+
'tablet',
|
|
194
|
+
'mobile'
|
|
195
|
+
].forEach((device)=>{
|
|
196
|
+
if (backgroundStyle[device]?.color?.includes(GRADIENT_BGR_KEY)) {
|
|
197
|
+
Object.assign(bgrStyle, {
|
|
198
|
+
[`--bgc${device !== 'desktop' ? '-' + device : ''}`]: 'transparent',
|
|
199
|
+
[`--bgi${device !== 'desktop' ? '-' + device : ''}`]: `${getBgImageByDevice(backgroundStyle, device) || 'url()'}, ${backgroundStyle[device]?.color}`
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return bgrStyle;
|
|
204
|
+
};
|
|
170
205
|
|
|
206
|
+
exports.GRADIENT_BGR_KEY = GRADIENT_BGR_KEY;
|
|
171
207
|
exports.composeBackgroundCss = composeBackgroundCss;
|
|
172
208
|
exports.getBgImageByDevice = getBgImageByDevice;
|
|
209
|
+
exports.getGradientBgrStyleByDevice = getGradientBgrStyleByDevice;
|
|
210
|
+
exports.getGradientBgrStyleForButton = getGradientBgrStyleForButton;
|
|
173
211
|
exports.getStyleBackgroundByDevice = getStyleBackgroundByDevice;
|
|
174
212
|
exports.makeFixedBgAttachment = makeFixedBgAttachment;
|
|
@@ -14,13 +14,13 @@ const composeSpacing = ({ source, spacing, type, suffix = '' })=>{
|
|
|
14
14
|
if (bottom) source[`--${type}b${suffix}`] = bottom;
|
|
15
15
|
if (right) source[`--${type}r${suffix}`] = right;
|
|
16
16
|
};
|
|
17
|
-
const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
|
|
17
|
+
const composeSpacingV2 = ({ source, spacing, suffix = '', tag = '' })=>{
|
|
18
18
|
if (spacing && spacing.margin) {
|
|
19
19
|
const { top, left, bottom, right } = spacing.margin;
|
|
20
20
|
if (top) source[`--mt${suffix}`] = top;
|
|
21
|
-
if (left) source[`--ml${suffix}`] = left;
|
|
21
|
+
if (left) source[`--ml${suffix}`] = constant.layoutComponent.includes(tag) && left === '0px' ? 'auto' : left;
|
|
22
22
|
if (bottom) source[`--mb${suffix}`] = bottom;
|
|
23
|
-
if (right) source[`--mr${suffix}`] = right;
|
|
23
|
+
if (right) source[`--mr${suffix}`] = constant.layoutComponent.includes(tag) && right === '0px' ? 'auto' : right;
|
|
24
24
|
}
|
|
25
25
|
if (spacing && spacing.padding) {
|
|
26
26
|
const { top, left, bottom, right } = spacing.padding;
|
|
@@ -93,7 +93,8 @@ function composeAdvanceStyle(data, tag) {
|
|
|
93
93
|
case 'spacing-setting':
|
|
94
94
|
composeSpacingV2({
|
|
95
95
|
source: styles,
|
|
96
|
-
spacing: deviceValue
|
|
96
|
+
spacing: deviceValue,
|
|
97
|
+
tag
|
|
97
98
|
});
|
|
98
99
|
break;
|
|
99
100
|
case 'm':
|
|
@@ -125,7 +126,8 @@ function composeAdvanceStyle(data, tag) {
|
|
|
125
126
|
composeSpacingV2({
|
|
126
127
|
source: styles,
|
|
127
128
|
spacing: deviceValue,
|
|
128
|
-
suffix: `-${composeAttr}
|
|
129
|
+
suffix: `-${composeAttr}`,
|
|
130
|
+
tag
|
|
129
131
|
});
|
|
130
132
|
break;
|
|
131
133
|
case 'm':
|
package/dist/cjs/index.js
CHANGED
|
@@ -235,8 +235,11 @@ exports.composeShadowCss = shadow.composeShadowCss;
|
|
|
235
235
|
exports.getStyleShadow = shadow.getStyleShadow;
|
|
236
236
|
exports.getStyleShadowState = shadow.getStyleShadowState;
|
|
237
237
|
exports.parseValueWithUnit = shadow.parseValueWithUnit;
|
|
238
|
+
exports.GRADIENT_BGR_KEY = background.GRADIENT_BGR_KEY;
|
|
238
239
|
exports.composeBackgroundCss = background.composeBackgroundCss;
|
|
239
240
|
exports.getBgImageByDevice = background.getBgImageByDevice;
|
|
241
|
+
exports.getGradientBgrStyleByDevice = background.getGradientBgrStyleByDevice;
|
|
242
|
+
exports.getGradientBgrStyleForButton = background.getGradientBgrStyleForButton;
|
|
240
243
|
exports.getStyleBackgroundByDevice = background.getStyleBackgroundByDevice;
|
|
241
244
|
exports.makeFixedBgAttachment = background.makeFixedBgAttachment;
|
|
242
245
|
exports.generateCollectionQueryKey = query.generateCollectionQueryKey;
|
|
@@ -210,6 +210,13 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
210
210
|
}
|
|
211
211
|
return false;
|
|
212
212
|
};
|
|
213
|
+
const getSectionName = ()=>{
|
|
214
|
+
const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
|
|
215
|
+
if (getSectionNumber() >= SECTION_LIMIT - 5) {
|
|
216
|
+
return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
|
|
217
|
+
}
|
|
218
|
+
return checkRenamedSection ? `Section ${getIndexSection() + 1}` : props?.name;
|
|
219
|
+
};
|
|
213
220
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
214
221
|
children: [
|
|
215
222
|
!(props.tag == 'Section' && isThemeSectionEditor) && /*#__PURE__*/ jsxs("div", {
|
|
@@ -260,7 +267,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
260
267
|
}),
|
|
261
268
|
props.tag == 'Section' ? /*#__PURE__*/ jsx("div", {
|
|
262
269
|
"data-toolbar-name": true,
|
|
263
|
-
children:
|
|
270
|
+
children: getSectionName()
|
|
264
271
|
}) : /*#__PURE__*/ jsx("div", {
|
|
265
272
|
"data-toolbar-name": true,
|
|
266
273
|
children: toolbarName()
|
|
@@ -119,11 +119,18 @@ function Spacing(props) {
|
|
|
119
119
|
const toolbar = $component && getChildrenByAttrSelector($component, 'data-toolbar');
|
|
120
120
|
const isActive = toolbar && toolbar.getAttribute('data-toolbar-active');
|
|
121
121
|
if (isActive && detail?.marginBottom) {
|
|
122
|
-
const currentValue =
|
|
122
|
+
const currentValue = parseInt(detail?.marginBottom);
|
|
123
123
|
const newValue = `${currentValue}px`;
|
|
124
124
|
if ($bottomDrag.current && $bottomBg.current) {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
if (currentValue < 0) {
|
|
126
|
+
$bottomBg.current.style.display = 'none';
|
|
127
|
+
$bottomDrag.current.style.display = 'none';
|
|
128
|
+
} else {
|
|
129
|
+
$bottomBg.current.style.display = 'block';
|
|
130
|
+
$bottomDrag.current.style.display = 'block';
|
|
131
|
+
$bottomBg.current.style.height = newValue;
|
|
132
|
+
$bottomDrag.current.style.top = newValue;
|
|
133
|
+
}
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
}, []);
|
|
@@ -409,6 +409,19 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
|
|
|
409
409
|
index++;
|
|
410
410
|
}
|
|
411
411
|
return parents;
|
|
412
|
+
},
|
|
413
|
+
updateItemName: (id, name)=>{
|
|
414
|
+
const state = get().state;
|
|
415
|
+
const item = state[id];
|
|
416
|
+
if (item) {
|
|
417
|
+
item.name = name;
|
|
418
|
+
set({
|
|
419
|
+
state: {
|
|
420
|
+
...state,
|
|
421
|
+
[id]: cloneDeep(item)
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}
|
|
412
425
|
}
|
|
413
426
|
}));
|
|
414
427
|
const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, lazy, ...passProps })=>{
|
|
@@ -165,5 +165,40 @@ const makeFixedBgAttachmentByDevice = (device, bgAttachment)=>{
|
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
|
+
const GRADIENT_BGR_KEY = 'linear-gradient';
|
|
169
|
+
const getGradientBgrStyleForButton = (backgroundStyle)=>{
|
|
170
|
+
if (!backgroundStyle) return;
|
|
171
|
+
const bgrStyle = {};
|
|
172
|
+
Object.keys(backgroundStyle).forEach((state)=>{
|
|
173
|
+
if (!backgroundStyle[state]?.startsWith(GRADIENT_BGR_KEY)) return;
|
|
174
|
+
if (state === 'normal') {
|
|
175
|
+
Object.assign(bgrStyle, {
|
|
176
|
+
'--bg': backgroundStyle[state]
|
|
177
|
+
});
|
|
178
|
+
} else {
|
|
179
|
+
Object.assign(bgrStyle, {
|
|
180
|
+
'--hvr-bg': backgroundStyle[state]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return bgrStyle;
|
|
185
|
+
};
|
|
186
|
+
const getGradientBgrStyleByDevice = (backgroundStyle)=>{
|
|
187
|
+
if (!backgroundStyle) return;
|
|
188
|
+
const bgrStyle = {};
|
|
189
|
+
[
|
|
190
|
+
'desktop',
|
|
191
|
+
'tablet',
|
|
192
|
+
'mobile'
|
|
193
|
+
].forEach((device)=>{
|
|
194
|
+
if (backgroundStyle[device]?.color?.includes(GRADIENT_BGR_KEY)) {
|
|
195
|
+
Object.assign(bgrStyle, {
|
|
196
|
+
[`--bgc${device !== 'desktop' ? '-' + device : ''}`]: 'transparent',
|
|
197
|
+
[`--bgi${device !== 'desktop' ? '-' + device : ''}`]: `${getBgImageByDevice(backgroundStyle, device) || 'url()'}, ${backgroundStyle[device]?.color}`
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
return bgrStyle;
|
|
202
|
+
};
|
|
168
203
|
|
|
169
|
-
export { composeBackgroundCss, getBgImageByDevice, getStyleBackgroundByDevice, makeFixedBgAttachment };
|
|
204
|
+
export { GRADIENT_BGR_KEY, composeBackgroundCss, getBgImageByDevice, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getStyleBackgroundByDevice, makeFixedBgAttachment };
|
|
@@ -12,13 +12,13 @@ const composeSpacing = ({ source, spacing, type, suffix = '' })=>{
|
|
|
12
12
|
if (bottom) source[`--${type}b${suffix}`] = bottom;
|
|
13
13
|
if (right) source[`--${type}r${suffix}`] = right;
|
|
14
14
|
};
|
|
15
|
-
const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
|
|
15
|
+
const composeSpacingV2 = ({ source, spacing, suffix = '', tag = '' })=>{
|
|
16
16
|
if (spacing && spacing.margin) {
|
|
17
17
|
const { top, left, bottom, right } = spacing.margin;
|
|
18
18
|
if (top) source[`--mt${suffix}`] = top;
|
|
19
|
-
if (left) source[`--ml${suffix}`] = left;
|
|
19
|
+
if (left) source[`--ml${suffix}`] = layoutComponent.includes(tag) && left === '0px' ? 'auto' : left;
|
|
20
20
|
if (bottom) source[`--mb${suffix}`] = bottom;
|
|
21
|
-
if (right) source[`--mr${suffix}`] = right;
|
|
21
|
+
if (right) source[`--mr${suffix}`] = layoutComponent.includes(tag) && right === '0px' ? 'auto' : right;
|
|
22
22
|
}
|
|
23
23
|
if (spacing && spacing.padding) {
|
|
24
24
|
const { top, left, bottom, right } = spacing.padding;
|
|
@@ -91,7 +91,8 @@ function composeAdvanceStyle(data, tag) {
|
|
|
91
91
|
case 'spacing-setting':
|
|
92
92
|
composeSpacingV2({
|
|
93
93
|
source: styles,
|
|
94
|
-
spacing: deviceValue
|
|
94
|
+
spacing: deviceValue,
|
|
95
|
+
tag
|
|
95
96
|
});
|
|
96
97
|
break;
|
|
97
98
|
case 'm':
|
|
@@ -123,7 +124,8 @@ function composeAdvanceStyle(data, tag) {
|
|
|
123
124
|
composeSpacingV2({
|
|
124
125
|
source: styles,
|
|
125
126
|
spacing: deviceValue,
|
|
126
|
-
suffix: `-${composeAttr}
|
|
127
|
+
suffix: `-${composeAttr}`,
|
|
128
|
+
tag
|
|
127
129
|
});
|
|
128
130
|
break;
|
|
129
131
|
case 'm':
|
package/dist/esm/index.js
CHANGED
|
@@ -55,7 +55,7 @@ export { RenderIf, composeMemo, dataStringify, props, styles, template } from '.
|
|
|
55
55
|
export { baseAssetURL, isLocalEnv } from './helpers/convert.js';
|
|
56
56
|
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault } from './helpers/size.js';
|
|
57
57
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
58
|
-
export { composeBackgroundCss, getBgImageByDevice, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
58
|
+
export { GRADIENT_BGR_KEY, composeBackgroundCss, getBgImageByDevice, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
59
59
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
60
60
|
export { composeAdvanceStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
61
61
|
export { composePositionLineHeight, composePostionIconList } from './helpers/icon-list.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1002,7 +1002,13 @@ type ParallaxScrollingType<T> = SharedControlType<T> & {
|
|
|
1002
1002
|
type: 'parallax-scrolling';
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
|
-
type
|
|
1005
|
+
type BackgroundColorPickerType<T> = SharedControlType<T> & {
|
|
1006
|
+
type: 'background-color-picker';
|
|
1007
|
+
popup?: boolean;
|
|
1008
|
+
readonly?: boolean;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
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> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T>;
|
|
1006
1012
|
type ControlTriggerAction = {
|
|
1007
1013
|
controlId: string;
|
|
1008
1014
|
newValue?: any;
|
|
@@ -7469,6 +7475,7 @@ type BuilderPreviewContextProps = {
|
|
|
7469
7475
|
forceChangeState: (data: BuilderState) => void;
|
|
7470
7476
|
initState: (data: BuilderEntityNested | BuilderEntityNested[]) => void;
|
|
7471
7477
|
getParents: (id: string, limit?: number) => BuilderEntity[];
|
|
7478
|
+
updateItemName: (id: string, name: string) => void;
|
|
7472
7479
|
};
|
|
7473
7480
|
type BuilderPreviewProviderProps = Pick<BuilderPreviewContextProps, 'state'> & {
|
|
7474
7481
|
children: React.ReactNode;
|
|
@@ -9672,6 +9679,9 @@ declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) =>
|
|
|
9672
9679
|
[x: string]: string | undefined;
|
|
9673
9680
|
};
|
|
9674
9681
|
} | undefined;
|
|
9682
|
+
declare const GRADIENT_BGR_KEY = "linear-gradient";
|
|
9683
|
+
declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => {} | undefined;
|
|
9684
|
+
declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devices, Background>> | undefined) => {} | undefined;
|
|
9675
9685
|
|
|
9676
9686
|
type OrderByType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'none' | 'CREATED_AT_DESC';
|
|
9677
9687
|
type FetchCollectionArgs = {
|
|
@@ -9965,4 +9975,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9965
9975
|
|
|
9966
9976
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9967
9977
|
|
|
9968
|
-
export { AddOn, AddonProvider, AddonProviderProps, AliReviewsWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, 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, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, 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, ResponsiveKey, 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, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, 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, getBgImageByDevice, 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, makeStyleKey, 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 };
|
|
9978
|
+
export { AddOn, AddonProvider, AddonProviderProps, AliReviewsWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, 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, ResponsiveKey, 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, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, 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, getBgImageByDevice, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, 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, makeStyleKey, 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.4",
|
|
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.25.0",
|
|
28
|
-
"@gem-sdk/styles": "1.
|
|
28
|
+
"@gem-sdk/styles": "1.29.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.10",
|