@gem-sdk/core 1.11.1-staging-ff93eab1 → 1.12.0-next.11
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.
|
@@ -16,20 +16,35 @@ const componentTexts = [
|
|
|
16
16
|
'Text',
|
|
17
17
|
'Heading'
|
|
18
18
|
];
|
|
19
|
-
const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
19
|
+
const Render = ({ uid , builder , components , parentId , extraFiles ={} , ...passProps })=>{
|
|
20
20
|
const item = builder[uid];
|
|
21
21
|
const Component = components[item?.tag];
|
|
22
22
|
if (!Component) {
|
|
23
23
|
console.log('Miss component: ', item);
|
|
24
|
-
return
|
|
24
|
+
return {
|
|
25
|
+
liquid: '',
|
|
26
|
+
extraFiles
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (!item) {
|
|
30
|
+
return {
|
|
31
|
+
liquid: '',
|
|
32
|
+
extraFiles
|
|
33
|
+
};
|
|
25
34
|
}
|
|
26
|
-
if (!item) return null;
|
|
27
35
|
if (item?.type === 'section') {
|
|
28
|
-
return
|
|
36
|
+
return {
|
|
37
|
+
liquid: '',
|
|
38
|
+
extraFiles
|
|
39
|
+
};
|
|
29
40
|
} else {
|
|
41
|
+
const customProps = {
|
|
42
|
+
extraFiles: {}
|
|
43
|
+
};
|
|
30
44
|
const style = composeAdvanceStyle.composeAdvanceStyle(item.advanced, item.tag);
|
|
45
|
+
let liquid = '';
|
|
31
46
|
if (constant.disableWrap.includes(item.tag)) {
|
|
32
|
-
|
|
47
|
+
liquid = render.RenderIf(item?.childrens?.length, ()=>{
|
|
33
48
|
return Component({
|
|
34
49
|
builderProps: {
|
|
35
50
|
uid,
|
|
@@ -46,17 +61,19 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
46
61
|
...builder[id],
|
|
47
62
|
uid: id,
|
|
48
63
|
builder,
|
|
49
|
-
components
|
|
64
|
+
components,
|
|
65
|
+
customProps
|
|
50
66
|
};
|
|
51
67
|
}),
|
|
52
|
-
children: item.childrens.map((id)=>
|
|
68
|
+
children: item.childrens.map((id)=>RenderChildren({
|
|
53
69
|
uid: id,
|
|
54
70
|
builder,
|
|
55
71
|
components,
|
|
56
|
-
|
|
72
|
+
customProps
|
|
57
73
|
})).join('')
|
|
58
74
|
});
|
|
59
|
-
}, ()=>
|
|
75
|
+
}, ()=>{
|
|
76
|
+
return Component({
|
|
60
77
|
builderProps: {
|
|
61
78
|
uid,
|
|
62
79
|
builderData: item
|
|
@@ -68,10 +85,12 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
68
85
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
69
86
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
70
87
|
...passProps
|
|
71
|
-
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
72
90
|
}
|
|
73
|
-
|
|
74
|
-
${render.RenderIf(item?.childrens?.length, ()=>
|
|
91
|
+
liquid = render.template`<div style="${style}" class="${item.uid}">
|
|
92
|
+
${render.RenderIf(item?.childrens?.length, ()=>{
|
|
93
|
+
return Component({
|
|
75
94
|
builderProps: {
|
|
76
95
|
uid,
|
|
77
96
|
builderData: item
|
|
@@ -84,15 +103,19 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
84
103
|
...builder[id],
|
|
85
104
|
uid: id,
|
|
86
105
|
builder,
|
|
87
|
-
components
|
|
106
|
+
components,
|
|
107
|
+
customProps
|
|
88
108
|
};
|
|
89
109
|
}),
|
|
90
|
-
children: item.childrens.map((id)=>
|
|
110
|
+
children: item.childrens.map((id)=>RenderChildren({
|
|
91
111
|
uid: id,
|
|
92
112
|
builder,
|
|
93
|
-
components
|
|
113
|
+
components,
|
|
114
|
+
customProps
|
|
94
115
|
})).join('')
|
|
95
|
-
})
|
|
116
|
+
});
|
|
117
|
+
}, ()=>{
|
|
118
|
+
return Component({
|
|
96
119
|
builderProps: {
|
|
97
120
|
uid,
|
|
98
121
|
builderData: item
|
|
@@ -101,9 +124,34 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
101
124
|
setting: item.settings,
|
|
102
125
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
103
126
|
...passProps
|
|
104
|
-
})
|
|
127
|
+
});
|
|
128
|
+
})}
|
|
105
129
|
</div>`;
|
|
130
|
+
return {
|
|
131
|
+
liquid,
|
|
132
|
+
extraFiles: customProps.extraFiles
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const RenderChildren = (props)=>{
|
|
137
|
+
const data = Render(props);
|
|
138
|
+
// Append to prop parent
|
|
139
|
+
for(const key in data.extraFiles){
|
|
140
|
+
if (Object.prototype.hasOwnProperty.call(data.extraFiles, key)) {
|
|
141
|
+
const value = data.extraFiles[key];
|
|
142
|
+
props.customProps.extraFiles[key] = value;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Fix limit 256kb
|
|
146
|
+
const textEncoder = new TextEncoder();
|
|
147
|
+
const size = data?.liquid ? textEncoder.encode(data.liquid).length : 0;
|
|
148
|
+
if (Math.ceil(size / 1024) >= 180) {
|
|
149
|
+
const fileName = `gp-section-snippet-${props.uid}`;
|
|
150
|
+
props.customProps.extraFiles[fileName] = data.liquid;
|
|
151
|
+
return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
|
|
106
152
|
}
|
|
153
|
+
return data.liquid;
|
|
107
154
|
};
|
|
108
155
|
|
|
156
|
+
exports.RenderChildren = RenderChildren;
|
|
109
157
|
exports.default = Render;
|
package/dist/cjs/index.js
CHANGED
|
@@ -93,6 +93,7 @@ var getProductBySlug = require('./helpers/queries/get-product-by-slug.js');
|
|
|
93
93
|
exports.AddOn = AddOn.default;
|
|
94
94
|
exports.Render = Render.default;
|
|
95
95
|
exports.RenderPreview = RenderPreview.default;
|
|
96
|
+
exports.RenderChildren = Render_liquid.RenderChildren;
|
|
96
97
|
exports.RenderLiquid = Render_liquid.default;
|
|
97
98
|
exports.AddonProvider = AddonContext.AddonProvider;
|
|
98
99
|
exports.useAddon = AddonContext.useAddon;
|
|
@@ -12,20 +12,35 @@ const componentTexts = [
|
|
|
12
12
|
'Text',
|
|
13
13
|
'Heading'
|
|
14
14
|
];
|
|
15
|
-
const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
15
|
+
const Render = ({ uid , builder , components , parentId , extraFiles ={} , ...passProps })=>{
|
|
16
16
|
const item = builder[uid];
|
|
17
17
|
const Component = components[item?.tag];
|
|
18
18
|
if (!Component) {
|
|
19
19
|
console.log('Miss component: ', item);
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
liquid: '',
|
|
22
|
+
extraFiles
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (!item) {
|
|
26
|
+
return {
|
|
27
|
+
liquid: '',
|
|
28
|
+
extraFiles
|
|
29
|
+
};
|
|
21
30
|
}
|
|
22
|
-
if (!item) return null;
|
|
23
31
|
if (item?.type === 'section') {
|
|
24
|
-
return
|
|
32
|
+
return {
|
|
33
|
+
liquid: '',
|
|
34
|
+
extraFiles
|
|
35
|
+
};
|
|
25
36
|
} else {
|
|
37
|
+
const customProps = {
|
|
38
|
+
extraFiles: {}
|
|
39
|
+
};
|
|
26
40
|
const style = composeAdvanceStyle(item.advanced, item.tag);
|
|
41
|
+
let liquid = '';
|
|
27
42
|
if (disableWrap.includes(item.tag)) {
|
|
28
|
-
|
|
43
|
+
liquid = RenderIf(item?.childrens?.length, ()=>{
|
|
29
44
|
return Component({
|
|
30
45
|
builderProps: {
|
|
31
46
|
uid,
|
|
@@ -42,17 +57,19 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
42
57
|
...builder[id],
|
|
43
58
|
uid: id,
|
|
44
59
|
builder,
|
|
45
|
-
components
|
|
60
|
+
components,
|
|
61
|
+
customProps
|
|
46
62
|
};
|
|
47
63
|
}),
|
|
48
|
-
children: item.childrens.map((id)=>
|
|
64
|
+
children: item.childrens.map((id)=>RenderChildren({
|
|
49
65
|
uid: id,
|
|
50
66
|
builder,
|
|
51
67
|
components,
|
|
52
|
-
|
|
68
|
+
customProps
|
|
53
69
|
})).join('')
|
|
54
70
|
});
|
|
55
|
-
}, ()=>
|
|
71
|
+
}, ()=>{
|
|
72
|
+
return Component({
|
|
56
73
|
builderProps: {
|
|
57
74
|
uid,
|
|
58
75
|
builderData: item
|
|
@@ -64,10 +81,12 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
64
81
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
65
82
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
66
83
|
...passProps
|
|
67
|
-
})
|
|
84
|
+
});
|
|
85
|
+
});
|
|
68
86
|
}
|
|
69
|
-
|
|
70
|
-
${RenderIf(item?.childrens?.length, ()=>
|
|
87
|
+
liquid = template`<div style="${style}" class="${item.uid}">
|
|
88
|
+
${RenderIf(item?.childrens?.length, ()=>{
|
|
89
|
+
return Component({
|
|
71
90
|
builderProps: {
|
|
72
91
|
uid,
|
|
73
92
|
builderData: item
|
|
@@ -80,15 +99,19 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
80
99
|
...builder[id],
|
|
81
100
|
uid: id,
|
|
82
101
|
builder,
|
|
83
|
-
components
|
|
102
|
+
components,
|
|
103
|
+
customProps
|
|
84
104
|
};
|
|
85
105
|
}),
|
|
86
|
-
children: item.childrens.map((id)=>
|
|
106
|
+
children: item.childrens.map((id)=>RenderChildren({
|
|
87
107
|
uid: id,
|
|
88
108
|
builder,
|
|
89
|
-
components
|
|
109
|
+
components,
|
|
110
|
+
customProps
|
|
90
111
|
})).join('')
|
|
91
|
-
})
|
|
112
|
+
});
|
|
113
|
+
}, ()=>{
|
|
114
|
+
return Component({
|
|
92
115
|
builderProps: {
|
|
93
116
|
uid,
|
|
94
117
|
builderData: item
|
|
@@ -97,9 +120,33 @@ const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
|
97
120
|
setting: item.settings,
|
|
98
121
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
99
122
|
...passProps
|
|
100
|
-
})
|
|
123
|
+
});
|
|
124
|
+
})}
|
|
101
125
|
</div>`;
|
|
126
|
+
return {
|
|
127
|
+
liquid,
|
|
128
|
+
extraFiles: customProps.extraFiles
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const RenderChildren = (props)=>{
|
|
133
|
+
const data = Render(props);
|
|
134
|
+
// Append to prop parent
|
|
135
|
+
for(const key in data.extraFiles){
|
|
136
|
+
if (Object.prototype.hasOwnProperty.call(data.extraFiles, key)) {
|
|
137
|
+
const value = data.extraFiles[key];
|
|
138
|
+
props.customProps.extraFiles[key] = value;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Fix limit 256kb
|
|
142
|
+
const textEncoder = new TextEncoder();
|
|
143
|
+
const size = data?.liquid ? textEncoder.encode(data.liquid).length : 0;
|
|
144
|
+
if (Math.ceil(size / 1024) >= 180) {
|
|
145
|
+
const fileName = `gp-section-snippet-${props.uid}`;
|
|
146
|
+
props.customProps.extraFiles[fileName] = data.liquid;
|
|
147
|
+
return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
|
|
102
148
|
}
|
|
149
|
+
return data.liquid;
|
|
103
150
|
};
|
|
104
151
|
|
|
105
|
-
export { Render as default };
|
|
152
|
+
export { RenderChildren, Render as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as AddOn } from './components/AddOn.js';
|
|
2
2
|
export { default as Render } from './components/Render.js';
|
|
3
3
|
export { default as RenderPreview } from './components/RenderPreview.js';
|
|
4
|
-
export { default as RenderLiquid } from './components/Render.liquid.js';
|
|
4
|
+
export { RenderChildren, default as RenderLiquid } from './components/Render.liquid.js';
|
|
5
5
|
export { AddonProvider, useAddon, useAddons } from './contexts/AddonContext.js';
|
|
6
6
|
export { BuilderComponentProvider, useBuilderComponent } from './contexts/BuilderComponent.js';
|
|
7
7
|
export { BuilderProvider, useBuilderStore } from './contexts/BuilderContext.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -25,13 +25,21 @@ type Props$1 = {
|
|
|
25
25
|
};
|
|
26
26
|
declare const RenderPreviewMemo: React.NamedExoticComponent<Props$1>;
|
|
27
27
|
|
|
28
|
+
type ExtraFiles = {
|
|
29
|
+
[fileName: string]: string;
|
|
30
|
+
};
|
|
28
31
|
type Props = {
|
|
29
32
|
uid: string;
|
|
30
33
|
builder: Record<string, any>;
|
|
31
34
|
components: Record<string, any>;
|
|
35
|
+
extraFiles?: ExtraFiles;
|
|
32
36
|
[key: string]: any;
|
|
33
37
|
};
|
|
34
|
-
declare const Render: ({ uid, builder, components, parentId, ...passProps }: Props) =>
|
|
38
|
+
declare const Render: ({ uid, builder, components, parentId, extraFiles, ...passProps }: Props) => {
|
|
39
|
+
liquid: string;
|
|
40
|
+
extraFiles: ExtraFiles;
|
|
41
|
+
};
|
|
42
|
+
declare const RenderChildren: (props: Props) => string;
|
|
35
43
|
|
|
36
44
|
type AddonContextProps = {
|
|
37
45
|
components: Record<string, React.ComponentType<any>>;
|
|
@@ -375,13 +383,13 @@ type InputNumberControlType<T> = SharedControlType<T> & {
|
|
|
375
383
|
readonly?: boolean;
|
|
376
384
|
};
|
|
377
385
|
|
|
378
|
-
type SizeUnit = '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax';
|
|
386
|
+
type SizeUnit$2 = '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax';
|
|
379
387
|
type InputUnitControlType<T> = SharedControlType<T> & {
|
|
380
388
|
type: 'input:unit';
|
|
381
389
|
placeholder?: string;
|
|
382
390
|
min?: number;
|
|
383
391
|
max?: number;
|
|
384
|
-
units: SizeUnit[];
|
|
392
|
+
units: SizeUnit$2[];
|
|
385
393
|
readonly?: boolean;
|
|
386
394
|
useOnlyUnitInit?: boolean;
|
|
387
395
|
};
|
|
@@ -816,7 +824,29 @@ type ProductListControlType<T> = SharedControlType<T> & {
|
|
|
816
824
|
isMultiple?: boolean;
|
|
817
825
|
};
|
|
818
826
|
|
|
819
|
-
type
|
|
827
|
+
type SizeUnit$1 = '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax';
|
|
828
|
+
type InputUnitSpacingControlType<T> = SharedControlType<T> & {
|
|
829
|
+
type: 'input:unit-spacing';
|
|
830
|
+
placeholder?: string;
|
|
831
|
+
min?: number;
|
|
832
|
+
max?: number;
|
|
833
|
+
units: SizeUnit$1[];
|
|
834
|
+
readonly?: boolean;
|
|
835
|
+
useOnlyUnitInit?: boolean;
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
type SizeUnit = '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax';
|
|
839
|
+
type InputUnitWidthControlType<T> = SharedControlType<T> & {
|
|
840
|
+
type: 'input:unit-width';
|
|
841
|
+
placeholder?: string;
|
|
842
|
+
min?: number;
|
|
843
|
+
max?: number;
|
|
844
|
+
units: SizeUnit[];
|
|
845
|
+
readonly?: boolean;
|
|
846
|
+
useOnlyUnitInit?: boolean;
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
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> | 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> | CustomCodeEditor | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T>;
|
|
820
850
|
type Setting<P extends BaseProps> = {
|
|
821
851
|
id: 'setting';
|
|
822
852
|
note?: string;
|
|
@@ -881,6 +911,7 @@ type ComponentSetting<P extends BaseProps> = {
|
|
|
881
911
|
presets?: ComponentPreset[];
|
|
882
912
|
};
|
|
883
913
|
type ControlUI = {
|
|
914
|
+
layout?: 'vertical' | 'horizontal';
|
|
884
915
|
type: 'group' | 'tab' | 'advanced' | 'control';
|
|
885
916
|
label?: Record<string, string>;
|
|
886
917
|
info?: Record<string, string>;
|
|
@@ -891,6 +922,9 @@ type ControlUI = {
|
|
|
891
922
|
state?: StateType;
|
|
892
923
|
};
|
|
893
924
|
options?: {
|
|
925
|
+
styleControl?: Record<string, string>;
|
|
926
|
+
labelPosition?: 'start' | 'end';
|
|
927
|
+
justifyContent?: 'start' | 'end' | 'between' | 'around';
|
|
894
928
|
label?: 'medium' | 'large';
|
|
895
929
|
info?: 'near' | 'far';
|
|
896
930
|
removeSpacing?: boolean;
|
|
@@ -7995,4 +8029,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
7995
8029
|
|
|
7996
8030
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
7997
8031
|
|
|
7998
|
-
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, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, RenderMemo as Render, 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, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographyType, VariantSelectFragment, WiserWidgetType, baseAssetURL, calculateFirstProduct, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypographyCss, convertOldLayout, 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, isDefined, isEmptyChildren, isLocalEnv, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, 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 };
|
|
8032
|
+
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, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, 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, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographyType, VariantSelectFragment, WiserWidgetType, baseAssetURL, calculateFirstProduct, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypographyCss, convertOldLayout, 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, isDefined, isEmptyChildren, isLocalEnv, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0-next.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"type-check": "yarn tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@gem-sdk/adapter-shopify": "
|
|
28
|
-
"@gem-sdk/styles": "
|
|
27
|
+
"@gem-sdk/adapter-shopify": "*",
|
|
28
|
+
"@gem-sdk/styles": "*"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.3",
|