@gem-sdk/core 1.22.12 → 1.22.19
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/Render.liquid.js +13 -5
- package/dist/cjs/components/constant.js +6 -5
- package/dist/cjs/helpers/make-style.js +16 -5
- package/dist/cjs/helpers/radius.js +8 -0
- package/dist/cjs/index.js +1 -0
- package/dist/esm/components/Render.liquid.js +13 -5
- package/dist/esm/components/constant.js +6 -5
- package/dist/esm/helpers/make-style.js +16 -5
- package/dist/esm/helpers/radius.js +8 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +61 -35
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ const componentTexts = [
|
|
|
16
16
|
'Text',
|
|
17
17
|
'Heading'
|
|
18
18
|
];
|
|
19
|
-
const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passProps })=>{
|
|
19
|
+
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
20
20
|
const item = builder[uid];
|
|
21
21
|
const Component = components[item?.tag];
|
|
22
22
|
if (!Component) {
|
|
@@ -55,6 +55,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
55
55
|
style,
|
|
56
56
|
advanced: item.advanced,
|
|
57
57
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
58
|
+
pageContext,
|
|
58
59
|
...passProps,
|
|
59
60
|
rawChildren: item.childrens.map((id)=>{
|
|
60
61
|
return {
|
|
@@ -62,7 +63,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
62
63
|
uid: id,
|
|
63
64
|
builder,
|
|
64
65
|
components,
|
|
65
|
-
customProps
|
|
66
|
+
customProps,
|
|
67
|
+
pageContext
|
|
66
68
|
};
|
|
67
69
|
}),
|
|
68
70
|
children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -73,7 +75,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
73
75
|
builder,
|
|
74
76
|
components,
|
|
75
77
|
customProps,
|
|
76
|
-
parentTag: item.tag
|
|
78
|
+
parentTag: item.tag,
|
|
79
|
+
pageContext
|
|
77
80
|
}))) : ''
|
|
78
81
|
});
|
|
79
82
|
}, ()=>{
|
|
@@ -88,6 +91,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
88
91
|
style,
|
|
89
92
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
90
93
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
94
|
+
pageContext,
|
|
91
95
|
...passProps
|
|
92
96
|
});
|
|
93
97
|
});
|
|
@@ -104,6 +108,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
104
108
|
advanced: {
|
|
105
109
|
cssClass: item?.advanced?.cssClass
|
|
106
110
|
},
|
|
111
|
+
pageContext,
|
|
107
112
|
...passProps,
|
|
108
113
|
rawChildren: item.childrens.map((id)=>{
|
|
109
114
|
return {
|
|
@@ -111,7 +116,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
111
116
|
uid: id,
|
|
112
117
|
builder,
|
|
113
118
|
components,
|
|
114
|
-
customProps
|
|
119
|
+
customProps,
|
|
120
|
+
pageContext
|
|
115
121
|
};
|
|
116
122
|
}),
|
|
117
123
|
children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -122,7 +128,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
122
128
|
builder,
|
|
123
129
|
components,
|
|
124
130
|
customProps,
|
|
125
|
-
parentTag: item.tag
|
|
131
|
+
parentTag: item.tag,
|
|
132
|
+
pageContext
|
|
126
133
|
}))) : ''
|
|
127
134
|
});
|
|
128
135
|
}, ()=>{
|
|
@@ -136,6 +143,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
136
143
|
advanced: {
|
|
137
144
|
cssClass: item?.advanced?.cssClass
|
|
138
145
|
},
|
|
146
|
+
pageContext,
|
|
139
147
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
140
148
|
...passProps
|
|
141
149
|
});
|
|
@@ -34,14 +34,15 @@ const disableWrap = [
|
|
|
34
34
|
'ProductPrice',
|
|
35
35
|
'Product',
|
|
36
36
|
'ProductImages',
|
|
37
|
+
'ProductImagesV2',
|
|
37
38
|
'Sticky'
|
|
38
39
|
];
|
|
39
40
|
const customRenderChildren = [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
'Accordion',
|
|
42
|
+
'AccordionItem',
|
|
43
|
+
'Row',
|
|
44
|
+
'IconList',
|
|
45
|
+
'Tabs'
|
|
45
46
|
];
|
|
46
47
|
|
|
47
48
|
exports.customRenderChildren = customRenderChildren;
|
|
@@ -94,11 +94,22 @@ const makeHeight = (heighValue, autoHeight)=>{
|
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
let result = {};
|
|
98
|
+
const DEVICES = [
|
|
99
|
+
'desktop',
|
|
100
|
+
'mobile',
|
|
101
|
+
'tablet'
|
|
102
|
+
];
|
|
103
|
+
DEVICES.forEach((device)=>{
|
|
104
|
+
const aspectRatioDevice = getResonsiveValue.getResponsiveValueByScreen(aspectRatio, device);
|
|
105
|
+
if (aspectRatioDevice !== 'none') {
|
|
106
|
+
result = {
|
|
107
|
+
...result,
|
|
108
|
+
[device]: aspectRatioDevice !== 'custom' ? aspectRatioDevice : `${getResonsiveValue.getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResonsiveValue.getResponsiveValueByScreen(aspectHeight, 'desktop')}`
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return result;
|
|
102
113
|
};
|
|
103
114
|
const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
|
|
104
115
|
const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
|
|
@@ -44,6 +44,13 @@ const composeRadius = (value)=>{
|
|
|
44
44
|
}
|
|
45
45
|
return composeRadiusState(value);
|
|
46
46
|
};
|
|
47
|
+
const composeRadiusResponsive = (radiusValue)=>{
|
|
48
|
+
const style = {};
|
|
49
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.desktop, 'desktop'));
|
|
50
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.tablet, 'tablet'));
|
|
51
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.mobile, 'mobile'));
|
|
52
|
+
return style;
|
|
53
|
+
};
|
|
47
54
|
const composeRadiusState = (radiusValue, device)=>{
|
|
48
55
|
const style = {};
|
|
49
56
|
switch(radiusValue?.normal?.radiusType){
|
|
@@ -126,6 +133,7 @@ const composeCornerCss = (value, important = false)=>{
|
|
|
126
133
|
|
|
127
134
|
exports.composeCornerCss = composeCornerCss;
|
|
128
135
|
exports.composeRadius = composeRadius;
|
|
136
|
+
exports.composeRadiusResponsive = composeRadiusResponsive;
|
|
129
137
|
exports.getCornerCSSFromGlobal = getCornerCSSFromGlobal;
|
|
130
138
|
exports.getCustomRadius = getCustomRadius;
|
|
131
139
|
exports.getRadiusCSSFromGlobal = getRadiusCSSFromGlobal;
|
package/dist/cjs/index.js
CHANGED
|
@@ -193,6 +193,7 @@ exports.composeTypographyV2Css = typography.composeTypographyV2Css;
|
|
|
193
193
|
exports.genTypoClass = typography.genTypoClass;
|
|
194
194
|
exports.composeCornerCss = radius.composeCornerCss;
|
|
195
195
|
exports.composeRadius = radius.composeRadius;
|
|
196
|
+
exports.composeRadiusResponsive = radius.composeRadiusResponsive;
|
|
196
197
|
exports.getCornerCSSFromGlobal = radius.getCornerCSSFromGlobal;
|
|
197
198
|
exports.getCustomRadius = radius.getCustomRadius;
|
|
198
199
|
exports.getRadiusCSSFromGlobal = radius.getRadiusCSSFromGlobal;
|
|
@@ -12,7 +12,7 @@ const componentTexts = [
|
|
|
12
12
|
'Text',
|
|
13
13
|
'Heading'
|
|
14
14
|
];
|
|
15
|
-
const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passProps })=>{
|
|
15
|
+
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
16
16
|
const item = builder[uid];
|
|
17
17
|
const Component = components[item?.tag];
|
|
18
18
|
if (!Component) {
|
|
@@ -51,6 +51,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
51
51
|
style,
|
|
52
52
|
advanced: item.advanced,
|
|
53
53
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
54
|
+
pageContext,
|
|
54
55
|
...passProps,
|
|
55
56
|
rawChildren: item.childrens.map((id)=>{
|
|
56
57
|
return {
|
|
@@ -58,7 +59,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
58
59
|
uid: id,
|
|
59
60
|
builder,
|
|
60
61
|
components,
|
|
61
|
-
customProps
|
|
62
|
+
customProps,
|
|
63
|
+
pageContext
|
|
62
64
|
};
|
|
63
65
|
}),
|
|
64
66
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -69,7 +71,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
69
71
|
builder,
|
|
70
72
|
components,
|
|
71
73
|
customProps,
|
|
72
|
-
parentTag: item.tag
|
|
74
|
+
parentTag: item.tag,
|
|
75
|
+
pageContext
|
|
73
76
|
}))) : ''
|
|
74
77
|
});
|
|
75
78
|
}, ()=>{
|
|
@@ -84,6 +87,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
84
87
|
style,
|
|
85
88
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
86
89
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
90
|
+
pageContext,
|
|
87
91
|
...passProps
|
|
88
92
|
});
|
|
89
93
|
});
|
|
@@ -100,6 +104,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
100
104
|
advanced: {
|
|
101
105
|
cssClass: item?.advanced?.cssClass
|
|
102
106
|
},
|
|
107
|
+
pageContext,
|
|
103
108
|
...passProps,
|
|
104
109
|
rawChildren: item.childrens.map((id)=>{
|
|
105
110
|
return {
|
|
@@ -107,7 +112,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
107
112
|
uid: id,
|
|
108
113
|
builder,
|
|
109
114
|
components,
|
|
110
|
-
customProps
|
|
115
|
+
customProps,
|
|
116
|
+
pageContext
|
|
111
117
|
};
|
|
112
118
|
}),
|
|
113
119
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -118,7 +124,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
118
124
|
builder,
|
|
119
125
|
components,
|
|
120
126
|
customProps,
|
|
121
|
-
parentTag: item.tag
|
|
127
|
+
parentTag: item.tag,
|
|
128
|
+
pageContext
|
|
122
129
|
}))) : ''
|
|
123
130
|
});
|
|
124
131
|
}, ()=>{
|
|
@@ -132,6 +139,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
|
|
|
132
139
|
advanced: {
|
|
133
140
|
cssClass: item?.advanced?.cssClass
|
|
134
141
|
},
|
|
142
|
+
pageContext,
|
|
135
143
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
136
144
|
...passProps
|
|
137
145
|
});
|
|
@@ -32,14 +32,15 @@ const disableWrap = [
|
|
|
32
32
|
'ProductPrice',
|
|
33
33
|
'Product',
|
|
34
34
|
'ProductImages',
|
|
35
|
+
'ProductImagesV2',
|
|
35
36
|
'Sticky'
|
|
36
37
|
];
|
|
37
38
|
const customRenderChildren = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
'Accordion',
|
|
40
|
+
'AccordionItem',
|
|
41
|
+
'Row',
|
|
42
|
+
'IconList',
|
|
43
|
+
'Tabs'
|
|
43
44
|
];
|
|
44
45
|
|
|
45
46
|
export { customRenderChildren, disableWrap };
|
|
@@ -92,11 +92,22 @@ const makeHeight = (heighValue, autoHeight)=>{
|
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
let result = {};
|
|
96
|
+
const DEVICES = [
|
|
97
|
+
'desktop',
|
|
98
|
+
'mobile',
|
|
99
|
+
'tablet'
|
|
100
|
+
];
|
|
101
|
+
DEVICES.forEach((device)=>{
|
|
102
|
+
const aspectRatioDevice = getResponsiveValueByScreen(aspectRatio, device);
|
|
103
|
+
if (aspectRatioDevice !== 'none') {
|
|
104
|
+
result = {
|
|
105
|
+
...result,
|
|
106
|
+
[device]: aspectRatioDevice !== 'custom' ? aspectRatioDevice : `${getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResponsiveValueByScreen(aspectHeight, 'desktop')}`
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return result;
|
|
100
111
|
};
|
|
101
112
|
const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
|
|
102
113
|
const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
|
|
@@ -42,6 +42,13 @@ const composeRadius = (value)=>{
|
|
|
42
42
|
}
|
|
43
43
|
return composeRadiusState(value);
|
|
44
44
|
};
|
|
45
|
+
const composeRadiusResponsive = (radiusValue)=>{
|
|
46
|
+
const style = {};
|
|
47
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.desktop, 'desktop'));
|
|
48
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.tablet, 'tablet'));
|
|
49
|
+
Object.assign(style, getCustomRadius('normal', radiusValue?.mobile, 'mobile'));
|
|
50
|
+
return style;
|
|
51
|
+
};
|
|
45
52
|
const composeRadiusState = (radiusValue, device)=>{
|
|
46
53
|
const style = {};
|
|
47
54
|
switch(radiusValue?.normal?.radiusType){
|
|
@@ -122,4 +129,4 @@ const composeCornerCss = (value, important = false)=>{
|
|
|
122
129
|
return radiusValue;
|
|
123
130
|
};
|
|
124
131
|
|
|
125
|
-
export { composeCornerCss, composeRadius, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState };
|
|
132
|
+
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState };
|
package/dist/esm/index.js
CHANGED
|
@@ -41,7 +41,7 @@ export { composeGridLayout, convertOldLayout, gridToArrayRegex, optionLayoutStyl
|
|
|
41
41
|
export { isDefined } from './helpers/is-defined.js';
|
|
42
42
|
export { composeTextColorCss, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getSingleColorVariable, isColor } from './helpers/colors.js';
|
|
43
43
|
export { composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
44
|
-
export { composeCornerCss, composeRadius, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
44
|
+
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
45
45
|
export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption } from './helpers/product.js';
|
|
46
46
|
import * as fpixel from './helpers/tracking/fpixel.js';
|
|
47
47
|
export { fpixel };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,39 +26,6 @@ type Props$1 = {
|
|
|
26
26
|
};
|
|
27
27
|
declare const RenderPreviewMemo: React.NamedExoticComponent<Props$1>;
|
|
28
28
|
|
|
29
|
-
type ExtraFiles = Record<string, string>;
|
|
30
|
-
type Props = {
|
|
31
|
-
uid: string;
|
|
32
|
-
builder: Record<string, any>;
|
|
33
|
-
components: Record<string, any>;
|
|
34
|
-
extraFiles?: ExtraFiles;
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
};
|
|
37
|
-
declare const Render: ({ uid, builder, components, parentId, extraFiles, ...passProps }: Props) => {
|
|
38
|
-
liquid: string;
|
|
39
|
-
extraFiles: ExtraFiles;
|
|
40
|
-
};
|
|
41
|
-
declare const RenderChildren: (props: Props) => string;
|
|
42
|
-
declare const WrapRenderChildren: ({ uid, customProps, }: {
|
|
43
|
-
uid: string;
|
|
44
|
-
customProps: {
|
|
45
|
-
extraFiles: ExtraFiles;
|
|
46
|
-
};
|
|
47
|
-
}, codes?: (string | undefined)[]) => string;
|
|
48
|
-
|
|
49
|
-
type AddonContextProps = {
|
|
50
|
-
components: Record<string, React.ComponentType<any>>;
|
|
51
|
-
};
|
|
52
|
-
type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
|
|
53
|
-
children: React.ReactNode;
|
|
54
|
-
key?: React.Key;
|
|
55
|
-
};
|
|
56
|
-
declare const AddonProvider: React.FC<AddonProviderProps>;
|
|
57
|
-
declare const useAddons: () => Record<string, React.ComponentType<any>>;
|
|
58
|
-
declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
|
|
59
|
-
children?: React.ReactNode;
|
|
60
|
-
}>;
|
|
61
|
-
|
|
62
29
|
type BlockEntity = {
|
|
63
30
|
uid: string;
|
|
64
31
|
tag: string;
|
|
@@ -105,6 +72,11 @@ type Ratio$1 = {
|
|
|
105
72
|
width?: string;
|
|
106
73
|
height?: string;
|
|
107
74
|
};
|
|
75
|
+
type ImageShape$1 = {
|
|
76
|
+
shape?: 'square' | 'vertical' | 'horizontal' | 'custom';
|
|
77
|
+
width?: string;
|
|
78
|
+
height?: string;
|
|
79
|
+
};
|
|
108
80
|
type FlexDirectionProp = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
109
81
|
type TransformProp = 'default' | 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
110
82
|
type BaseProps<Setting = unknown, Style = unknown, Advanced = Record<string, any>> = {
|
|
@@ -733,6 +705,7 @@ type Option<T> = {
|
|
|
733
705
|
label?: string | number;
|
|
734
706
|
type?: string;
|
|
735
707
|
icon?: string;
|
|
708
|
+
isTextIcon?: boolean;
|
|
736
709
|
};
|
|
737
710
|
type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
738
711
|
id: K;
|
|
@@ -756,6 +729,9 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
756
729
|
devices?: ResponsiveConfig<U>;
|
|
757
730
|
iconViewBox?: string;
|
|
758
731
|
enableItemBackground?: boolean;
|
|
732
|
+
itemPerRow?: number;
|
|
733
|
+
itemSpacing?: 'large' | 'small';
|
|
734
|
+
enableTooltip?: boolean;
|
|
759
735
|
} : {
|
|
760
736
|
id: K;
|
|
761
737
|
label: string;
|
|
@@ -896,7 +872,19 @@ type StepsGuide<T> = {
|
|
|
896
872
|
[K in keyof T]-?: Mapped<K, T[K]>;
|
|
897
873
|
}[keyof T];
|
|
898
874
|
|
|
899
|
-
type
|
|
875
|
+
type ImageShape<T> = SharedControlType<T> & {
|
|
876
|
+
type: 'image-shape';
|
|
877
|
+
placeholder?: string;
|
|
878
|
+
readonly?: boolean;
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
type GridArrange<T> = SharedControlType<T> & {
|
|
882
|
+
type: 'grid-arrange';
|
|
883
|
+
placeholder?: string;
|
|
884
|
+
readonly?: boolean;
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
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>;
|
|
900
888
|
type Setting<P extends BaseProps> = {
|
|
901
889
|
id: 'setting';
|
|
902
890
|
note?: string;
|
|
@@ -7063,6 +7051,9 @@ declare namespace shop {
|
|
|
7063
7051
|
};
|
|
7064
7052
|
}
|
|
7065
7053
|
|
|
7054
|
+
type PageContext = {
|
|
7055
|
+
numberOfProductOfProductList: number;
|
|
7056
|
+
};
|
|
7066
7057
|
type DeepPartial<T> = {
|
|
7067
7058
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
7068
7059
|
};
|
|
@@ -7251,6 +7242,40 @@ type ProductInputAnalytic = {
|
|
|
7251
7242
|
currency?: string;
|
|
7252
7243
|
};
|
|
7253
7244
|
|
|
7245
|
+
type ExtraFiles = Record<string, string>;
|
|
7246
|
+
type Props = {
|
|
7247
|
+
uid: string;
|
|
7248
|
+
builder: Record<string, any>;
|
|
7249
|
+
components: Record<string, any>;
|
|
7250
|
+
extraFiles?: ExtraFiles;
|
|
7251
|
+
pageContext?: PageContext;
|
|
7252
|
+
[key: string]: any;
|
|
7253
|
+
};
|
|
7254
|
+
declare const Render: ({ uid, builder, components, parentId, extraFiles, pageContext, ...passProps }: Props) => {
|
|
7255
|
+
liquid: string;
|
|
7256
|
+
extraFiles: ExtraFiles;
|
|
7257
|
+
};
|
|
7258
|
+
declare const RenderChildren: (props: Props) => string;
|
|
7259
|
+
declare const WrapRenderChildren: ({ uid, customProps, }: {
|
|
7260
|
+
uid: string;
|
|
7261
|
+
customProps: {
|
|
7262
|
+
extraFiles: ExtraFiles;
|
|
7263
|
+
};
|
|
7264
|
+
}, codes?: (string | undefined)[]) => string;
|
|
7265
|
+
|
|
7266
|
+
type AddonContextProps = {
|
|
7267
|
+
components: Record<string, React.ComponentType<any>>;
|
|
7268
|
+
};
|
|
7269
|
+
type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
|
|
7270
|
+
children: React.ReactNode;
|
|
7271
|
+
key?: React.Key;
|
|
7272
|
+
};
|
|
7273
|
+
declare const AddonProvider: React.FC<AddonProviderProps>;
|
|
7274
|
+
declare const useAddons: () => Record<string, React.ComponentType<any>>;
|
|
7275
|
+
declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
|
|
7276
|
+
children?: React.ReactNode;
|
|
7277
|
+
}>;
|
|
7278
|
+
|
|
7254
7279
|
type BuilderComponentProps = {
|
|
7255
7280
|
components: Record<string, React.ComponentType<any>>;
|
|
7256
7281
|
getItem: (id: string) => React.ComponentType<BaseProps> | undefined;
|
|
@@ -9351,6 +9376,7 @@ declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProper
|
|
|
9351
9376
|
declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices) => React.CSSProperties;
|
|
9352
9377
|
declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices) => React.CSSProperties;
|
|
9353
9378
|
declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
|
|
9379
|
+
declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
|
|
9354
9380
|
declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
|
|
9355
9381
|
declare const composeCornerCss: (value?: CornerRadius | undefined, important?: boolean) => string | undefined;
|
|
9356
9382
|
|
|
@@ -9718,4 +9744,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
9718
9744
|
|
|
9719
9745
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
9720
9746
|
|
|
9721
|
-
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, 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 };
|
|
9747
|
+
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageContext, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, 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 };
|