@gem-sdk/core 1.23.0-staging.26 → 1.23.0-staging.30
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 +34 -3
- package/dist/cjs/helpers/background.js +64 -5
- package/dist/cjs/helpers/is-empty-children.js +1 -1
- package/dist/cjs/helpers/make-style.js +8 -0
- package/dist/cjs/helpers/size.js +42 -0
- package/dist/cjs/index.js +5 -0
- package/dist/esm/components/ComponentToolbarPreview.js +34 -3
- package/dist/esm/helpers/background.js +64 -6
- package/dist/esm/helpers/is-empty-children.js +2 -2
- package/dist/esm/helpers/make-style.js +8 -1
- package/dist/esm/helpers/size.js +40 -1
- package/dist/esm/index.js +3 -3
- package/dist/types/index.d.ts +57 -4
- package/package.json +2 -2
|
@@ -17,6 +17,32 @@ var Resize = require('./resize/Resize.js');
|
|
|
17
17
|
require('../helpers/convert.js');
|
|
18
18
|
|
|
19
19
|
const SECTION_LIMIT = 25;
|
|
20
|
+
const notVisible = (el)=>{
|
|
21
|
+
const overflow = getComputedStyle(el).overflow;
|
|
22
|
+
return overflow !== 'visible';
|
|
23
|
+
};
|
|
24
|
+
const isSection = (el)=>{
|
|
25
|
+
const tag = el.getAttribute('data-component-tag');
|
|
26
|
+
return tag === 'Section';
|
|
27
|
+
};
|
|
28
|
+
const isOverToolbarPosition = (el, parent)=>{
|
|
29
|
+
const rect = el.getBoundingClientRect();
|
|
30
|
+
const rectP = parent.getBoundingClientRect();
|
|
31
|
+
// 32px = toolbar active height
|
|
32
|
+
return rect.top - rectP.top < 32 + 1;
|
|
33
|
+
};
|
|
34
|
+
const findOverflowParent = (element, initEl)=>{
|
|
35
|
+
const thisEl = element;
|
|
36
|
+
const origEl = initEl || thisEl;
|
|
37
|
+
if (!thisEl) return;
|
|
38
|
+
if (isSection(thisEl)) return;
|
|
39
|
+
if (notVisible(thisEl) && isOverToolbarPosition(initEl, thisEl)) return thisEl;
|
|
40
|
+
if (thisEl.parentElement) {
|
|
41
|
+
return findOverflowParent(thisEl.parentElement, origEl);
|
|
42
|
+
} else {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
20
46
|
const ComponentToolbarPreview = ({ ...props })=>{
|
|
21
47
|
const isThemeSection = props.isThemeSection;
|
|
22
48
|
const editingPageType = ShopContext.useShopStore((s)=>s.pageType);
|
|
@@ -84,11 +110,16 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
84
110
|
setIsShowParentRevert(false);
|
|
85
111
|
setIsShowParent(false);
|
|
86
112
|
} else {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
113
|
+
const $parentOverflow = findOverflowParent($toolbar, $toolbar);
|
|
114
|
+
if ($parentOverflow) {
|
|
89
115
|
setIsShowParentRevert(true);
|
|
90
116
|
} else {
|
|
91
|
-
|
|
117
|
+
const rect = $toolbar.getBoundingClientRect();
|
|
118
|
+
if (rect.top < parents.length * 24) {
|
|
119
|
+
setIsShowParentRevert(true);
|
|
120
|
+
} else {
|
|
121
|
+
setIsShowParentRevert(false);
|
|
122
|
+
}
|
|
92
123
|
}
|
|
93
124
|
setIsShowParent(true);
|
|
94
125
|
}
|
|
@@ -13,7 +13,7 @@ const getStyleBackgroundByDevice = (background, options)=>{
|
|
|
13
13
|
...getStyleBgPosition(background),
|
|
14
14
|
...getStyleBgSize(background),
|
|
15
15
|
...getStyleBgRepeat(background),
|
|
16
|
-
|
|
16
|
+
...!options?.ignoreBgAttachment ? getStyleBgAttachment(background) : {}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
const getStyleBgColor = (background)=>{
|
|
@@ -38,10 +38,6 @@ const getColor = (color)=>{
|
|
|
38
38
|
};
|
|
39
39
|
const getStyleBgImage = (background, options)=>{
|
|
40
40
|
const bgImage = {
|
|
41
|
-
// desktop:
|
|
42
|
-
// background.desktop?.type === 'color' ? 'none' : getBgImageByDevice(background, 'desktop'),
|
|
43
|
-
// tablet: background.tablet?.type === 'color' ? 'none' : getBgImageByDevice(background, 'tablet'),
|
|
44
|
-
// mobile: background.mobile?.type === 'color' ? 'none' : getBgImageByDevice(background, 'mobile'),
|
|
45
41
|
desktop: getBgImageByDevice(background, 'desktop', options),
|
|
46
42
|
tablet: getBgImageByDevice(background, 'tablet', options),
|
|
47
43
|
mobile: getBgImageByDevice(background, 'mobile', options)
|
|
@@ -104,6 +100,69 @@ const getBgAttachmentByDevice = (background, device)=>{
|
|
|
104
100
|
const composeBackgroundCss = (backgroundColor)=>{
|
|
105
101
|
return `${backgroundColor ? `background-color: ${colors.getSingleColorVariable(backgroundColor)} !important;` : undefined}`;
|
|
106
102
|
};
|
|
103
|
+
const makeFixedBgAttachment = (background)=>{
|
|
104
|
+
if (!background) return;
|
|
105
|
+
background.tablet = background.tablet ? background.tablet : background.desktop;
|
|
106
|
+
background.mobile = background.mobile ? background.mobile : background.tablet;
|
|
107
|
+
const bgAttachment = {
|
|
108
|
+
desktop: getBgAttachmentByDevice(background, 'desktop'),
|
|
109
|
+
tablet: getBgAttachmentByDevice(background, 'tablet'),
|
|
110
|
+
mobile: getBgAttachmentByDevice(background, 'mobile')
|
|
111
|
+
};
|
|
112
|
+
const composeFixed = {
|
|
113
|
+
desktop: {
|
|
114
|
+
...makeFixedBgAttachmentByDevice('desktop', bgAttachment.desktop)
|
|
115
|
+
},
|
|
116
|
+
tablet: {
|
|
117
|
+
...makeFixedBgAttachmentByDevice('tablet', bgAttachment.tablet)
|
|
118
|
+
},
|
|
119
|
+
mobile: {
|
|
120
|
+
...makeFixedBgAttachmentByDevice('mobile', bgAttachment.mobile)
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
wrapper: {
|
|
125
|
+
...composeFixed.desktop?.wrapper,
|
|
126
|
+
...composeFixed.tablet?.wrapper,
|
|
127
|
+
...composeFixed.mobile?.wrapper
|
|
128
|
+
},
|
|
129
|
+
content: {
|
|
130
|
+
...composeFixed.desktop?.content,
|
|
131
|
+
...composeFixed.tablet?.content,
|
|
132
|
+
...composeFixed.mobile?.content
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
const makeFixedBgAttachmentByDevice = (device, bgAttachment)=>{
|
|
137
|
+
const subfix = device === 'desktop' ? '' : `-${device}`;
|
|
138
|
+
if (bgAttachment === 'fixed') {
|
|
139
|
+
return {
|
|
140
|
+
wrapper: {
|
|
141
|
+
[`--pos${subfix}`]: 'absolute',
|
|
142
|
+
[`--top${subfix}`]: '0',
|
|
143
|
+
[`--left${subfix}`]: '0',
|
|
144
|
+
[`--w${subfix}`]: '100%',
|
|
145
|
+
[`--h${subfix}`]: '100%'
|
|
146
|
+
},
|
|
147
|
+
content: {
|
|
148
|
+
[`--pos${subfix}`]: 'fixed',
|
|
149
|
+
[`--w${subfix}`]: '100vw',
|
|
150
|
+
[`--h${subfix}`]: '100vh',
|
|
151
|
+
[`--bga${subfix}`]: 'unset'
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
wrapper: {
|
|
157
|
+
[`--pos${subfix}`]: 'absolute'
|
|
158
|
+
},
|
|
159
|
+
content: {
|
|
160
|
+
[`--pos${subfix}`]: 'absolute',
|
|
161
|
+
[`--bga${subfix}`]: bgAttachment
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
};
|
|
107
165
|
|
|
108
166
|
exports.composeBackgroundCss = composeBackgroundCss;
|
|
109
167
|
exports.getStyleBackgroundByDevice = getStyleBackgroundByDevice;
|
|
168
|
+
exports.makeFixedBgAttachment = makeFixedBgAttachment;
|
|
@@ -7,7 +7,7 @@ var ComponentToolbarPreview = require('../components/ComponentToolbarPreview.js'
|
|
|
7
7
|
|
|
8
8
|
const isEmptyChildren = (children)=>{
|
|
9
9
|
let arrChild = react.Children.toArray(children);
|
|
10
|
-
arrChild = arrChild.filter((child)=>child?.type != ComponentToolbarPreview.ComponentToolbarPreview
|
|
10
|
+
arrChild = arrChild.filter((child)=>child?.type != ComponentToolbarPreview.ComponentToolbarPreview);
|
|
11
11
|
return react.Children.count(arrChild) < 1 || !children;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -75,6 +75,13 @@ const makeWidth = (widthValue, fullWidthValue)=>{
|
|
|
75
75
|
mobile: getVal('mobile', widthValue, fullWidthValue)
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
+
const makeGlobalSizeWidthResponsive = (globalSize)=>{
|
|
79
|
+
return {
|
|
80
|
+
'--w': globalSize?.desktop?.width,
|
|
81
|
+
'--w-tablet': globalSize?.tablet?.width,
|
|
82
|
+
'--w-mobile': globalSize?.mobile?.width
|
|
83
|
+
};
|
|
84
|
+
};
|
|
78
85
|
const makeHeight = (heighValue, autoHeight)=>{
|
|
79
86
|
const getVal = (deviceValue, heighValue, autoHeight)=>{
|
|
80
87
|
const heightVal = heighValue?.[deviceValue];
|
|
@@ -128,6 +135,7 @@ const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
|
|
|
128
135
|
};
|
|
129
136
|
|
|
130
137
|
exports.makeAspectRatio = makeAspectRatio;
|
|
138
|
+
exports.makeGlobalSizeWidthResponsive = makeGlobalSizeWidthResponsive;
|
|
131
139
|
exports.makeHeight = makeHeight;
|
|
132
140
|
exports.makeLineClamp = makeLineClamp;
|
|
133
141
|
exports.makeStyle = makeStyle;
|
package/dist/cjs/helpers/size.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var makeStyle = require('./make-style.js');
|
|
3
4
|
var constant = require('./constant.js');
|
|
4
5
|
|
|
5
6
|
function getCustomSizeCSSByDevice(size, device) {
|
|
@@ -29,7 +30,48 @@ const composeSizeCss = (spacing)=>{
|
|
|
29
30
|
${sizeVerti ? `padding-top: ${sizeVerti}; padding-bottom: ${sizeVerti};` : undefined}
|
|
30
31
|
`;
|
|
31
32
|
};
|
|
33
|
+
const makeGlobalSize = (globalSize)=>{
|
|
34
|
+
return {
|
|
35
|
+
width: makeStyle.makeStyleResponsive('w', getWidthHeightGlobalSize('width', globalSize)),
|
|
36
|
+
height: makeStyle.makeStyleResponsive('h', getWidthHeightGlobalSize('height', globalSize)),
|
|
37
|
+
padding: getPaddingGlobalSize(globalSize)
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const getWidthHeightGlobalSize = (type, globalSize)=>{
|
|
41
|
+
if (!globalSize) return {};
|
|
42
|
+
const data = {
|
|
43
|
+
desktop: globalSize?.desktop?.[type],
|
|
44
|
+
tablet: globalSize?.tablet?.[type],
|
|
45
|
+
mobile: globalSize?.mobile?.[type]
|
|
46
|
+
};
|
|
47
|
+
if (data.desktop === undefined) {
|
|
48
|
+
data.desktop = 'auto';
|
|
49
|
+
}
|
|
50
|
+
if (data.tablet === undefined) {
|
|
51
|
+
data.tablet = data.desktop;
|
|
52
|
+
}
|
|
53
|
+
if (data.mobile === undefined) {
|
|
54
|
+
data.mobile = data.tablet;
|
|
55
|
+
}
|
|
56
|
+
return data;
|
|
57
|
+
};
|
|
58
|
+
function getCustomPaddingSizeCSSByDevice(globalSize, device) {
|
|
59
|
+
if (!globalSize || !device) return {};
|
|
60
|
+
const suffix = constant.devicesMapping[device] ?? '';
|
|
61
|
+
return {
|
|
62
|
+
[`--pl${suffix}`]: globalSize?.[device]?.padding?.left,
|
|
63
|
+
[`--pr${suffix}`]: globalSize?.[device]?.padding?.right,
|
|
64
|
+
[`--pt${suffix}`]: globalSize?.[device]?.padding?.top,
|
|
65
|
+
[`--pb${suffix}`]: globalSize?.[device]?.padding?.bottom
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const getPaddingGlobalSize = (globalSize)=>{
|
|
69
|
+
return Object.assign({}, getCustomPaddingSizeCSSByDevice(globalSize, 'desktop'), getCustomPaddingSizeCSSByDevice(globalSize, 'tablet'), getCustomPaddingSizeCSSByDevice(globalSize, 'mobile'));
|
|
70
|
+
};
|
|
32
71
|
|
|
33
72
|
exports.composeSize = composeSize;
|
|
34
73
|
exports.composeSizeCss = composeSizeCss;
|
|
35
74
|
exports.genSizeClass = genSizeClass;
|
|
75
|
+
exports.getPaddingGlobalSize = getPaddingGlobalSize;
|
|
76
|
+
exports.getWidthHeightGlobalSize = getWidthHeightGlobalSize;
|
|
77
|
+
exports.makeGlobalSize = makeGlobalSize;
|
package/dist/cjs/index.js
CHANGED
|
@@ -151,6 +151,7 @@ exports.isSafari = isSafari.default;
|
|
|
151
151
|
exports.isEmptyChildren = isEmptyChildren.isEmptyChildren;
|
|
152
152
|
exports.filterToolbarPreview = filterToolbarPreview.filterToolbarPreview;
|
|
153
153
|
exports.makeAspectRatio = makeStyle.makeAspectRatio;
|
|
154
|
+
exports.makeGlobalSizeWidthResponsive = makeStyle.makeGlobalSizeWidthResponsive;
|
|
154
155
|
exports.makeHeight = makeStyle.makeHeight;
|
|
155
156
|
exports.makeLineClamp = makeStyle.makeLineClamp;
|
|
156
157
|
exports.makeStyle = makeStyle.makeStyle;
|
|
@@ -217,12 +218,16 @@ exports.isLocalEnv = convert.isLocalEnv;
|
|
|
217
218
|
exports.composeSize = size.composeSize;
|
|
218
219
|
exports.composeSizeCss = size.composeSizeCss;
|
|
219
220
|
exports.genSizeClass = size.genSizeClass;
|
|
221
|
+
exports.getPaddingGlobalSize = size.getPaddingGlobalSize;
|
|
222
|
+
exports.getWidthHeightGlobalSize = size.getWidthHeightGlobalSize;
|
|
223
|
+
exports.makeGlobalSize = size.makeGlobalSize;
|
|
220
224
|
exports.composeShadowCss = shadow.composeShadowCss;
|
|
221
225
|
exports.getStyleShadow = shadow.getStyleShadow;
|
|
222
226
|
exports.getStyleShadowState = shadow.getStyleShadowState;
|
|
223
227
|
exports.parseValueWithUnit = shadow.parseValueWithUnit;
|
|
224
228
|
exports.composeBackgroundCss = background.composeBackgroundCss;
|
|
225
229
|
exports.getStyleBackgroundByDevice = background.getStyleBackgroundByDevice;
|
|
230
|
+
exports.makeFixedBgAttachment = background.makeFixedBgAttachment;
|
|
226
231
|
exports.generateCollectionQueryKey = query.generateCollectionQueryKey;
|
|
227
232
|
exports.generateProductQueryKey = query.generateProductQueryKey;
|
|
228
233
|
exports.generateProductsQueryKey = query.generateProductsQueryKey;
|
|
@@ -15,6 +15,32 @@ import Resize from './resize/Resize.js';
|
|
|
15
15
|
import '../helpers/convert.js';
|
|
16
16
|
|
|
17
17
|
const SECTION_LIMIT = 25;
|
|
18
|
+
const notVisible = (el)=>{
|
|
19
|
+
const overflow = getComputedStyle(el).overflow;
|
|
20
|
+
return overflow !== 'visible';
|
|
21
|
+
};
|
|
22
|
+
const isSection = (el)=>{
|
|
23
|
+
const tag = el.getAttribute('data-component-tag');
|
|
24
|
+
return tag === 'Section';
|
|
25
|
+
};
|
|
26
|
+
const isOverToolbarPosition = (el, parent)=>{
|
|
27
|
+
const rect = el.getBoundingClientRect();
|
|
28
|
+
const rectP = parent.getBoundingClientRect();
|
|
29
|
+
// 32px = toolbar active height
|
|
30
|
+
return rect.top - rectP.top < 32 + 1;
|
|
31
|
+
};
|
|
32
|
+
const findOverflowParent = (element, initEl)=>{
|
|
33
|
+
const thisEl = element;
|
|
34
|
+
const origEl = initEl || thisEl;
|
|
35
|
+
if (!thisEl) return;
|
|
36
|
+
if (isSection(thisEl)) return;
|
|
37
|
+
if (notVisible(thisEl) && isOverToolbarPosition(initEl, thisEl)) return thisEl;
|
|
38
|
+
if (thisEl.parentElement) {
|
|
39
|
+
return findOverflowParent(thisEl.parentElement, origEl);
|
|
40
|
+
} else {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
18
44
|
const ComponentToolbarPreview = ({ ...props })=>{
|
|
19
45
|
const isThemeSection = props.isThemeSection;
|
|
20
46
|
const editingPageType = useShopStore((s)=>s.pageType);
|
|
@@ -82,11 +108,16 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
82
108
|
setIsShowParentRevert(false);
|
|
83
109
|
setIsShowParent(false);
|
|
84
110
|
} else {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
111
|
+
const $parentOverflow = findOverflowParent($toolbar, $toolbar);
|
|
112
|
+
if ($parentOverflow) {
|
|
87
113
|
setIsShowParentRevert(true);
|
|
88
114
|
} else {
|
|
89
|
-
|
|
115
|
+
const rect = $toolbar.getBoundingClientRect();
|
|
116
|
+
if (rect.top < parents.length * 24) {
|
|
117
|
+
setIsShowParentRevert(true);
|
|
118
|
+
} else {
|
|
119
|
+
setIsShowParentRevert(false);
|
|
120
|
+
}
|
|
90
121
|
}
|
|
91
122
|
setIsShowParent(true);
|
|
92
123
|
}
|
|
@@ -11,7 +11,7 @@ const getStyleBackgroundByDevice = (background, options)=>{
|
|
|
11
11
|
...getStyleBgPosition(background),
|
|
12
12
|
...getStyleBgSize(background),
|
|
13
13
|
...getStyleBgRepeat(background),
|
|
14
|
-
|
|
14
|
+
...!options?.ignoreBgAttachment ? getStyleBgAttachment(background) : {}
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const getStyleBgColor = (background)=>{
|
|
@@ -36,10 +36,6 @@ const getColor = (color)=>{
|
|
|
36
36
|
};
|
|
37
37
|
const getStyleBgImage = (background, options)=>{
|
|
38
38
|
const bgImage = {
|
|
39
|
-
// desktop:
|
|
40
|
-
// background.desktop?.type === 'color' ? 'none' : getBgImageByDevice(background, 'desktop'),
|
|
41
|
-
// tablet: background.tablet?.type === 'color' ? 'none' : getBgImageByDevice(background, 'tablet'),
|
|
42
|
-
// mobile: background.mobile?.type === 'color' ? 'none' : getBgImageByDevice(background, 'mobile'),
|
|
43
39
|
desktop: getBgImageByDevice(background, 'desktop', options),
|
|
44
40
|
tablet: getBgImageByDevice(background, 'tablet', options),
|
|
45
41
|
mobile: getBgImageByDevice(background, 'mobile', options)
|
|
@@ -102,5 +98,67 @@ const getBgAttachmentByDevice = (background, device)=>{
|
|
|
102
98
|
const composeBackgroundCss = (backgroundColor)=>{
|
|
103
99
|
return `${backgroundColor ? `background-color: ${getSingleColorVariable(backgroundColor)} !important;` : undefined}`;
|
|
104
100
|
};
|
|
101
|
+
const makeFixedBgAttachment = (background)=>{
|
|
102
|
+
if (!background) return;
|
|
103
|
+
background.tablet = background.tablet ? background.tablet : background.desktop;
|
|
104
|
+
background.mobile = background.mobile ? background.mobile : background.tablet;
|
|
105
|
+
const bgAttachment = {
|
|
106
|
+
desktop: getBgAttachmentByDevice(background, 'desktop'),
|
|
107
|
+
tablet: getBgAttachmentByDevice(background, 'tablet'),
|
|
108
|
+
mobile: getBgAttachmentByDevice(background, 'mobile')
|
|
109
|
+
};
|
|
110
|
+
const composeFixed = {
|
|
111
|
+
desktop: {
|
|
112
|
+
...makeFixedBgAttachmentByDevice('desktop', bgAttachment.desktop)
|
|
113
|
+
},
|
|
114
|
+
tablet: {
|
|
115
|
+
...makeFixedBgAttachmentByDevice('tablet', bgAttachment.tablet)
|
|
116
|
+
},
|
|
117
|
+
mobile: {
|
|
118
|
+
...makeFixedBgAttachmentByDevice('mobile', bgAttachment.mobile)
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
return {
|
|
122
|
+
wrapper: {
|
|
123
|
+
...composeFixed.desktop?.wrapper,
|
|
124
|
+
...composeFixed.tablet?.wrapper,
|
|
125
|
+
...composeFixed.mobile?.wrapper
|
|
126
|
+
},
|
|
127
|
+
content: {
|
|
128
|
+
...composeFixed.desktop?.content,
|
|
129
|
+
...composeFixed.tablet?.content,
|
|
130
|
+
...composeFixed.mobile?.content
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
const makeFixedBgAttachmentByDevice = (device, bgAttachment)=>{
|
|
135
|
+
const subfix = device === 'desktop' ? '' : `-${device}`;
|
|
136
|
+
if (bgAttachment === 'fixed') {
|
|
137
|
+
return {
|
|
138
|
+
wrapper: {
|
|
139
|
+
[`--pos${subfix}`]: 'absolute',
|
|
140
|
+
[`--top${subfix}`]: '0',
|
|
141
|
+
[`--left${subfix}`]: '0',
|
|
142
|
+
[`--w${subfix}`]: '100%',
|
|
143
|
+
[`--h${subfix}`]: '100%'
|
|
144
|
+
},
|
|
145
|
+
content: {
|
|
146
|
+
[`--pos${subfix}`]: 'fixed',
|
|
147
|
+
[`--w${subfix}`]: '100vw',
|
|
148
|
+
[`--h${subfix}`]: '100vh',
|
|
149
|
+
[`--bga${subfix}`]: 'unset'
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
wrapper: {
|
|
155
|
+
[`--pos${subfix}`]: 'absolute'
|
|
156
|
+
},
|
|
157
|
+
content: {
|
|
158
|
+
[`--pos${subfix}`]: 'absolute',
|
|
159
|
+
[`--bga${subfix}`]: bgAttachment
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
};
|
|
105
163
|
|
|
106
|
-
export { composeBackgroundCss, getStyleBackgroundByDevice };
|
|
164
|
+
export { composeBackgroundCss, getStyleBackgroundByDevice, makeFixedBgAttachment };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Children
|
|
1
|
+
import { Children } from 'react';
|
|
2
2
|
import { ComponentToolbarPreview } from '../components/ComponentToolbarPreview.js';
|
|
3
3
|
|
|
4
4
|
const isEmptyChildren = (children)=>{
|
|
5
5
|
let arrChild = Children.toArray(children);
|
|
6
|
-
arrChild = arrChild.filter((child)=>child?.type != ComponentToolbarPreview
|
|
6
|
+
arrChild = arrChild.filter((child)=>child?.type != ComponentToolbarPreview);
|
|
7
7
|
return Children.count(arrChild) < 1 || !children;
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -73,6 +73,13 @@ const makeWidth = (widthValue, fullWidthValue)=>{
|
|
|
73
73
|
mobile: getVal('mobile', widthValue, fullWidthValue)
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
+
const makeGlobalSizeWidthResponsive = (globalSize)=>{
|
|
77
|
+
return {
|
|
78
|
+
'--w': globalSize?.desktop?.width,
|
|
79
|
+
'--w-tablet': globalSize?.tablet?.width,
|
|
80
|
+
'--w-mobile': globalSize?.mobile?.width
|
|
81
|
+
};
|
|
82
|
+
};
|
|
76
83
|
const makeHeight = (heighValue, autoHeight)=>{
|
|
77
84
|
const getVal = (deviceValue, heighValue, autoHeight)=>{
|
|
78
85
|
const heightVal = heighValue?.[deviceValue];
|
|
@@ -125,4 +132,4 @@ const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
|
|
|
125
132
|
};
|
|
126
133
|
};
|
|
127
134
|
|
|
128
|
-
export { makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined };
|
|
135
|
+
export { makeAspectRatio, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined };
|
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,43 @@ 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: makeStyleResponsive('w', getWidthHeightGlobalSize('width', globalSize)),
|
|
34
|
+
height: makeStyleResponsive('h', getWidthHeightGlobalSize('height', globalSize)),
|
|
35
|
+
padding: getPaddingGlobalSize(globalSize)
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const getWidthHeightGlobalSize = (type, globalSize)=>{
|
|
39
|
+
if (!globalSize) return {};
|
|
40
|
+
const data = {
|
|
41
|
+
desktop: globalSize?.desktop?.[type],
|
|
42
|
+
tablet: globalSize?.tablet?.[type],
|
|
43
|
+
mobile: globalSize?.mobile?.[type]
|
|
44
|
+
};
|
|
45
|
+
if (data.desktop === undefined) {
|
|
46
|
+
data.desktop = 'auto';
|
|
47
|
+
}
|
|
48
|
+
if (data.tablet === undefined) {
|
|
49
|
+
data.tablet = data.desktop;
|
|
50
|
+
}
|
|
51
|
+
if (data.mobile === undefined) {
|
|
52
|
+
data.mobile = data.tablet;
|
|
53
|
+
}
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
function getCustomPaddingSizeCSSByDevice(globalSize, device) {
|
|
57
|
+
if (!globalSize || !device) return {};
|
|
58
|
+
const suffix = devicesMapping[device] ?? '';
|
|
59
|
+
return {
|
|
60
|
+
[`--pl${suffix}`]: globalSize?.[device]?.padding?.left,
|
|
61
|
+
[`--pr${suffix}`]: globalSize?.[device]?.padding?.right,
|
|
62
|
+
[`--pt${suffix}`]: globalSize?.[device]?.padding?.top,
|
|
63
|
+
[`--pb${suffix}`]: globalSize?.[device]?.padding?.bottom
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const getPaddingGlobalSize = (globalSize)=>{
|
|
67
|
+
return Object.assign({}, getCustomPaddingSizeCSSByDevice(globalSize, 'desktop'), getCustomPaddingSizeCSSByDevice(globalSize, 'tablet'), getCustomPaddingSizeCSSByDevice(globalSize, 'mobile'));
|
|
68
|
+
};
|
|
30
69
|
|
|
31
|
-
export { composeSize, composeSizeCss, genSizeClass };
|
|
70
|
+
export { composeSize, composeSizeCss, genSizeClass, getPaddingGlobalSize, getWidthHeightGlobalSize, makeGlobalSize };
|
package/dist/esm/index.js
CHANGED
|
@@ -31,7 +31,7 @@ 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
33
|
export { filterToolbarPreview } from './helpers/filter-toolbar-preview.js';
|
|
34
|
-
export { makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
|
|
34
|
+
export { makeAspectRatio, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
|
|
35
35
|
export { normalizeBuilderData } from './helpers/normalize-builder-data.js';
|
|
36
36
|
export { prefetchQueries } from './helpers/prefetch-queries.js';
|
|
37
37
|
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
@@ -52,9 +52,9 @@ import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
|
52
52
|
export { tiktokpixel };
|
|
53
53
|
export { RenderIf, composeMemo, dataStringify, props, styles, template } from './helpers/render.js';
|
|
54
54
|
export { baseAssetURL, isLocalEnv } from './helpers/convert.js';
|
|
55
|
-
export { composeSize, composeSizeCss, genSizeClass } from './helpers/size.js';
|
|
55
|
+
export { composeSize, composeSizeCss, genSizeClass, getPaddingGlobalSize, getWidthHeightGlobalSize, makeGlobalSize } from './helpers/size.js';
|
|
56
56
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
57
|
-
export { composeBackgroundCss, getStyleBackgroundByDevice } from './helpers/background.js';
|
|
57
|
+
export { composeBackgroundCss, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
58
58
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
59
59
|
export { composeAdvanceStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
60
60
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,6 +91,18 @@ type ImageShape$1 = {
|
|
|
91
91
|
width?: string;
|
|
92
92
|
height?: string;
|
|
93
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
|
+
};
|
|
94
106
|
type FlexDirectionProp = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
95
107
|
type TransformProp = 'default' | 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
96
108
|
type BaseProps<Setting = unknown, Style = unknown, Advanced = Record<string, any>> = {
|
|
@@ -901,7 +913,27 @@ type GridArrange<T> = SharedControlType<T> & {
|
|
|
901
913
|
readonly?: boolean;
|
|
902
914
|
};
|
|
903
915
|
|
|
904
|
-
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>;
|
|
905
937
|
type Setting<P extends BaseProps> = {
|
|
906
938
|
id: 'setting';
|
|
907
939
|
note?: string;
|
|
@@ -7853,6 +7885,11 @@ declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?:
|
|
|
7853
7885
|
declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, Partial<Record<StateType, K>>>> | undefined) => {};
|
|
7854
7886
|
declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined) => Record<ResponsiveKey<T>, K>;
|
|
7855
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
|
+
};
|
|
7856
7893
|
declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
7857
7894
|
declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
|
|
7858
7895
|
declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
@@ -9483,6 +9520,13 @@ declare const baseAssetURL: string;
|
|
|
9483
9520
|
declare const composeSize: (size?: ObjectDevices<SizeProps>) => React.CSSProperties;
|
|
9484
9521
|
declare function genSizeClass(name: string): string;
|
|
9485
9522
|
declare const composeSizeCss: (spacing?: SizeSetting) => string | undefined;
|
|
9523
|
+
declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
9524
|
+
width: Record<"--w" | "--w-tablet" | "--w-mobile", string | number>;
|
|
9525
|
+
height: Record<"--h" | "--h-tablet" | "--h-mobile", string | number>;
|
|
9526
|
+
padding: React.CSSProperties;
|
|
9527
|
+
};
|
|
9528
|
+
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string | number>>;
|
|
9529
|
+
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
9486
9530
|
|
|
9487
9531
|
declare const parseValueWithUnit: (valueWithUnit: string) => any;
|
|
9488
9532
|
declare const getStyleShadow: (shadowStyle: ShadowStyle, isActiveState?: boolean) => {
|
|
@@ -9497,9 +9541,18 @@ declare const composeShadowCss: ({ hasBoxShadow, boxShadowValue, important, }: {
|
|
|
9497
9541
|
|
|
9498
9542
|
type Options = {
|
|
9499
9543
|
liquid?: boolean;
|
|
9544
|
+
ignoreBgAttachment?: boolean;
|
|
9500
9545
|
};
|
|
9501
9546
|
declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options) => {};
|
|
9502
9547
|
declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
|
|
9548
|
+
declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
|
|
9549
|
+
wrapper: {
|
|
9550
|
+
[x: string]: string;
|
|
9551
|
+
};
|
|
9552
|
+
content: {
|
|
9553
|
+
[x: string]: string | undefined;
|
|
9554
|
+
};
|
|
9555
|
+
} | undefined;
|
|
9503
9556
|
|
|
9504
9557
|
type OrderByType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'none' | 'CREATED_AT_DESC';
|
|
9505
9558
|
type FetchCollectionArgs = {
|
|
@@ -9721,11 +9774,11 @@ declare const useSelectedOption: () => {
|
|
|
9721
9774
|
setSelectedOption: (optionId?: Maybe<string>, optionValue?: Maybe<string>, productId?: Maybe<string>, noEmit?: boolean) => void;
|
|
9722
9775
|
forceSelectedOption: (selectedOption?: Record<string, string>, productId?: Maybe<string>, noEmit?: boolean) => void;
|
|
9723
9776
|
};
|
|
9724
|
-
declare const useVariants: () => Maybe<Pick<ProductVariant, "
|
|
9777
|
+
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"> & {
|
|
9725
9778
|
selectedOptions: Pick<SelectedOption, "name" | "value" | "optionType">[];
|
|
9726
9779
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
9727
9780
|
}>[];
|
|
9728
|
-
declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "
|
|
9781
|
+
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"> & {
|
|
9729
9782
|
selectedOptions: Pick<SelectedOption, "name" | "value" | "optionType">[];
|
|
9730
9783
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
9731
9784
|
}>;
|
|
@@ -9775,4 +9828,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9775
9828
|
|
|
9776
9829
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9777
9830
|
|
|
9778
|
-
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, 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, 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, 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 };
|
|
9831
|
+
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, 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.0-staging.
|
|
3
|
+
"version": "1.23.0-staging.30",
|
|
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-staging.26",
|
|
28
|
-
"@gem-sdk/styles": "1.23.0-staging.
|
|
28
|
+
"@gem-sdk/styles": "1.23.0-staging.29"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.10",
|