@gem-sdk/core 1.23.0-staging.29 → 1.23.0-staging.32
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/theme-section/CreateThemeSection.js +1 -1
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +1 -1
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +3 -3
- package/dist/cjs/helpers/background.js +64 -5
- package/dist/cjs/helpers/make-style.js +8 -0
- package/dist/cjs/helpers/size.js +42 -0
- package/dist/cjs/helpers/typography.js +10 -9
- package/dist/cjs/index.js +5 -0
- package/dist/esm/components/theme-section/CreateThemeSection.js +1 -1
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -1
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +3 -3
- package/dist/esm/helpers/background.js +64 -6
- package/dist/esm/helpers/make-style.js +8 -1
- package/dist/esm/helpers/size.js +40 -1
- package/dist/esm/helpers/typography.js +10 -9
- package/dist/esm/index.js +3 -3
- package/dist/types/index.d.ts +58 -5
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ const ThemeSectionStatus = ({ ...props })=>{
|
|
|
26
26
|
}),
|
|
27
27
|
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
28
28
|
"data-theme-section-status-text": true,
|
|
29
|
-
children: "Need to republish. Go to global edit
|
|
29
|
+
children: "Need to republish. Go to global edit and publish this section"
|
|
30
30
|
})
|
|
31
31
|
]
|
|
32
32
|
})
|
|
@@ -65,7 +65,7 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
65
65
|
children: [
|
|
66
66
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
67
67
|
className: "theme-section-tooltip__body-title",
|
|
68
|
-
children: "Create once, use everywhere with Theme
|
|
68
|
+
children: "Create once, use everywhere with Theme Section"
|
|
69
69
|
}),
|
|
70
70
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
71
71
|
className: "theme-section-tooltip__body-desc",
|
|
@@ -80,13 +80,13 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
80
80
|
children: [
|
|
81
81
|
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
82
82
|
onClick: (e)=>onActions(e),
|
|
83
|
-
children: isLimit ? 'Upgrade to create Theme
|
|
83
|
+
children: isLimit ? 'Upgrade to create Theme Section' : 'Create Theme Section'
|
|
84
84
|
}),
|
|
85
85
|
isLimit && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
86
86
|
onClick: openHelpCenter,
|
|
87
87
|
"aria-hidden": true,
|
|
88
88
|
className: "theme-section-tooltip__action-learn-more",
|
|
89
|
-
children: "Learn more about Theme
|
|
89
|
+
children: "Learn more about Theme Section"
|
|
90
90
|
})
|
|
91
91
|
]
|
|
92
92
|
})
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -18,20 +18,21 @@ const composeTypographyCss = (typography)=>{
|
|
|
18
18
|
${lineHeight ? `line-height: ${lineHeight};` : ''}
|
|
19
19
|
`;
|
|
20
20
|
};
|
|
21
|
-
const composeTypographyV2Css = (typography)=>{
|
|
21
|
+
const composeTypographyV2Css = (typography, isImportant)=>{
|
|
22
22
|
const typographyCustom = typography?.custom;
|
|
23
23
|
const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographyCustom ?? {};
|
|
24
24
|
const typographyAttrs = typography?.attrs;
|
|
25
25
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
26
|
+
const composeImportant = isImportant ? '!important' : '';
|
|
26
27
|
return `
|
|
27
|
-
${fontFamily ? `font-family: var(--g-font-${fontFamily}, ${fontFamily});` : ''}
|
|
28
|
-
${fontSize?.desktop ? `font-size: ${fontSize?.desktop};` : ''}
|
|
29
|
-
${bold ? `font-weight: bold;` : fontWeight ? `font-weight: ${fontWeight};` : ''}
|
|
30
|
-
${letterSpacing ? `letter-spacing: ${letterSpacing};` : ''}
|
|
31
|
-
${lineHeight ? `line-height: ${lineHeight};` : ''}
|
|
32
|
-
${italic ? `font-style: italic;` : ''}
|
|
33
|
-
${underline ? `text-decoration-line: underline;` : ''}
|
|
34
|
-
${transform ? `text-transform: ${transform};` : ''}
|
|
28
|
+
${fontFamily ? `font-family: var(--g-font-${fontFamily}, ${fontFamily})${composeImportant};` : ''}
|
|
29
|
+
${fontSize?.desktop ? `font-size: ${fontSize?.desktop}${composeImportant};` : ''}
|
|
30
|
+
${bold ? `font-weight: bold;` : fontWeight ? `font-weight: ${fontWeight}${composeImportant};` : ''}
|
|
31
|
+
${letterSpacing ? `letter-spacing: ${letterSpacing}${composeImportant};` : ''}
|
|
32
|
+
${lineHeight ? `line-height: ${lineHeight}${composeImportant};` : ''}
|
|
33
|
+
${italic ? `font-style: italic${composeImportant};` : ''}
|
|
34
|
+
${underline ? `text-decoration-line: underline${composeImportant};` : ''}
|
|
35
|
+
${transform ? `text-transform: ${transform}${composeImportant};` : ''}
|
|
35
36
|
`;
|
|
36
37
|
};
|
|
37
38
|
function getCustomCSSByDevice(typography, device) {
|
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;
|
|
@@ -24,7 +24,7 @@ const ThemeSectionStatus = ({ ...props })=>{
|
|
|
24
24
|
}),
|
|
25
25
|
/*#__PURE__*/ jsx("span", {
|
|
26
26
|
"data-theme-section-status-text": true,
|
|
27
|
-
children: "Need to republish. Go to global edit
|
|
27
|
+
children: "Need to republish. Go to global edit and publish this section"
|
|
28
28
|
})
|
|
29
29
|
]
|
|
30
30
|
})
|
|
@@ -63,7 +63,7 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
63
63
|
children: [
|
|
64
64
|
/*#__PURE__*/ jsx("div", {
|
|
65
65
|
className: "theme-section-tooltip__body-title",
|
|
66
|
-
children: "Create once, use everywhere with Theme
|
|
66
|
+
children: "Create once, use everywhere with Theme Section"
|
|
67
67
|
}),
|
|
68
68
|
/*#__PURE__*/ jsx("div", {
|
|
69
69
|
className: "theme-section-tooltip__body-desc",
|
|
@@ -78,13 +78,13 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
78
78
|
children: [
|
|
79
79
|
/*#__PURE__*/ jsx("button", {
|
|
80
80
|
onClick: (e)=>onActions(e),
|
|
81
|
-
children: isLimit ? 'Upgrade to create Theme
|
|
81
|
+
children: isLimit ? 'Upgrade to create Theme Section' : 'Create Theme Section'
|
|
82
82
|
}),
|
|
83
83
|
isLimit && /*#__PURE__*/ jsx("div", {
|
|
84
84
|
onClick: openHelpCenter,
|
|
85
85
|
"aria-hidden": true,
|
|
86
86
|
className: "theme-section-tooltip__action-learn-more",
|
|
87
|
-
children: "Learn more about Theme
|
|
87
|
+
children: "Learn more about Theme Section"
|
|
88
88
|
})
|
|
89
89
|
]
|
|
90
90
|
})
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -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) {
|
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>;
|
|
@@ -7911,7 +7948,7 @@ declare const composeTextColorCss: (color?: ColorValueType) => string;
|
|
|
7911
7948
|
type TypographyClass = `g-${TypographyType}`;
|
|
7912
7949
|
declare const genTypoClass: (name: TypographyType) => TypographyClass;
|
|
7913
7950
|
declare const composeTypographyCss: (typography: TypographySetting | undefined) => string;
|
|
7914
|
-
declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined) => string;
|
|
7951
|
+
declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
|
|
7915
7952
|
declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
|
|
7916
7953
|
declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
7917
7954
|
declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
@@ -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.32",
|
|
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.32"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.10",
|