@gem-sdk/core 1.6.1 → 1.7.1
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/constant.js +2 -1
- package/dist/cjs/contexts/ModalContext.js +34 -0
- package/dist/cjs/contexts/ShopContext.js +4 -1
- package/dist/cjs/helpers/queries/get-collection.js +6 -2
- package/dist/cjs/helpers/queries/get-product-by-slug.js +9 -3
- package/dist/cjs/helpers/queries/get-product.js +9 -3
- package/dist/cjs/helpers/queries/get-products.js +3 -1
- package/dist/cjs/index.js +4 -0
- package/dist/esm/components/constant.js +2 -1
- package/dist/esm/contexts/ModalContext.js +31 -0
- package/dist/esm/contexts/ShopContext.js +4 -1
- package/dist/esm/helpers/borders.js +1 -1
- package/dist/esm/helpers/queries/get-collection.js +6 -2
- package/dist/esm/helpers/queries/get-product-by-slug.js +9 -3
- package/dist/esm/helpers/queries/get-product.js +9 -3
- package/dist/esm/helpers/queries/get-products.js +3 -1
- package/dist/esm/index.js +2 -1
- package/dist/types/index.d.ts +35 -8
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
|
|
7
|
+
const ModalContext = /*#__PURE__*/ react.createContext(null);
|
|
8
|
+
const createModalProvider = (data)=>zustand.createStore((set)=>({
|
|
9
|
+
activeId: data,
|
|
10
|
+
setModalActive: (id)=>{
|
|
11
|
+
set({
|
|
12
|
+
activeId: id
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
|
+
const ModalProvider = ({ children , activeId , ...passProps })=>{
|
|
17
|
+
const store = createModalProvider(activeId);
|
|
18
|
+
return /*#__PURE__*/ jsxRuntime.jsx(ModalContext.Provider, {
|
|
19
|
+
...passProps,
|
|
20
|
+
value: store,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
// export const useBuilderStore = useStore;
|
|
25
|
+
const useModalStore = (selector, equalityFn)=>{
|
|
26
|
+
const store = react.useContext(ModalContext);
|
|
27
|
+
if (!store) {
|
|
28
|
+
throw new Error('useModalStore must be used within a ModalProvider');
|
|
29
|
+
}
|
|
30
|
+
return zustand.useStore(store, selector, equalityFn);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.ModalProvider = ModalProvider;
|
|
34
|
+
exports.useModalStore = useModalStore;
|
|
@@ -5,6 +5,7 @@ var useSWR = require('swr');
|
|
|
5
5
|
var zustand = require('zustand');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var AddonContext = require('./AddonContext.js');
|
|
8
|
+
var ModalContext = require('./ModalContext.js');
|
|
8
9
|
|
|
9
10
|
const ShopContext = /*#__PURE__*/ react.createContext(null);
|
|
10
11
|
const createShopStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
@@ -49,7 +50,9 @@ const ShopProvider = ({ children , addons , storeOption , queryOption , ...passP
|
|
|
49
50
|
children: /*#__PURE__*/ jsxRuntime.jsx(ShopContext.Provider, {
|
|
50
51
|
...passProps,
|
|
51
52
|
value: store,
|
|
52
|
-
children:
|
|
53
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ModalContext.ModalProvider, {
|
|
54
|
+
children: children
|
|
55
|
+
})
|
|
53
56
|
}, JSON.stringify(storeOption))
|
|
54
57
|
})
|
|
55
58
|
});
|
|
@@ -87,7 +87,9 @@ const loopFetchCollection = async (fetcher, arg)=>{
|
|
|
87
87
|
},
|
|
88
88
|
orderByProduct: productSortedByOrder(arg.orderBy),
|
|
89
89
|
whereProduct: {
|
|
90
|
-
|
|
90
|
+
...arg.isStorefront && {
|
|
91
|
+
isStorefront: arg.isStorefront
|
|
92
|
+
},
|
|
91
93
|
isSample: arg.isSample
|
|
92
94
|
},
|
|
93
95
|
productsAfter: productAfterFetcher
|
|
@@ -164,8 +166,10 @@ const fetchVariantsByBaseIds = async (fetcher, { ids , isSample , isStorefront
|
|
|
164
166
|
direction: 'DESC'
|
|
165
167
|
},
|
|
166
168
|
where: {
|
|
167
|
-
isStorefront,
|
|
168
169
|
isSample,
|
|
170
|
+
...isStorefront && {
|
|
171
|
+
isStorefront
|
|
172
|
+
},
|
|
169
173
|
...ids?.length && {
|
|
170
174
|
baseIDIn: ids.sort()
|
|
171
175
|
}
|
|
@@ -32,7 +32,9 @@ const fetchProduct = async (fetcher, handle, isStorefront)=>{
|
|
|
32
32
|
orderBy,
|
|
33
33
|
where: {
|
|
34
34
|
handle,
|
|
35
|
-
isStorefront
|
|
35
|
+
...isStorefront && {
|
|
36
|
+
isStorefront
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
};
|
|
38
40
|
const response = await fetcher([
|
|
@@ -46,7 +48,9 @@ const fetchVariants = async (fetcher, handle, isStorefront)=>{
|
|
|
46
48
|
orderBy,
|
|
47
49
|
where: {
|
|
48
50
|
handle,
|
|
49
|
-
isStorefront
|
|
51
|
+
...isStorefront && {
|
|
52
|
+
isStorefront
|
|
53
|
+
}
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
const query = async (variables, olds)=>{
|
|
@@ -75,7 +79,9 @@ const fetchMedias = async (fetcher, handle, isStorefront)=>{
|
|
|
75
79
|
orderBy,
|
|
76
80
|
where: {
|
|
77
81
|
handle,
|
|
78
|
-
isStorefront
|
|
82
|
+
...isStorefront && {
|
|
83
|
+
isStorefront
|
|
84
|
+
}
|
|
79
85
|
},
|
|
80
86
|
orderByMedia: {
|
|
81
87
|
field: 'POSITION',
|
|
@@ -43,8 +43,10 @@ const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
43
43
|
const variables = {
|
|
44
44
|
orderBy,
|
|
45
45
|
where: {
|
|
46
|
-
isStorefront,
|
|
47
46
|
isSample,
|
|
47
|
+
...isStorefront && {
|
|
48
|
+
isStorefront
|
|
49
|
+
},
|
|
48
50
|
...id && id.toLowerCase() !== 'latest' && {
|
|
49
51
|
baseID: id
|
|
50
52
|
}
|
|
@@ -60,8 +62,10 @@ const fetchVariants = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
60
62
|
const initVariables = {
|
|
61
63
|
orderBy,
|
|
62
64
|
where: {
|
|
63
|
-
isStorefront,
|
|
64
65
|
isSample,
|
|
66
|
+
...isStorefront && {
|
|
67
|
+
isStorefront
|
|
68
|
+
},
|
|
65
69
|
...id && id.toLowerCase() !== 'latest' && {
|
|
66
70
|
baseID: id
|
|
67
71
|
}
|
|
@@ -92,8 +96,10 @@ const fetchMedias = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
92
96
|
const initVariables = {
|
|
93
97
|
orderBy,
|
|
94
98
|
where: {
|
|
95
|
-
isStorefront,
|
|
96
99
|
isSample,
|
|
100
|
+
...isStorefront && {
|
|
101
|
+
isStorefront
|
|
102
|
+
},
|
|
97
103
|
...id && id.toLowerCase() !== 'latest' && {
|
|
98
104
|
baseID: id
|
|
99
105
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var ProductContext = require('./contexts/ProductContext.js');
|
|
|
14
14
|
var SectionContext = require('./contexts/SectionContext.js');
|
|
15
15
|
var ShopContext = require('./contexts/ShopContext.js');
|
|
16
16
|
var CollectionContext = require('./contexts/CollectionContext.js');
|
|
17
|
+
var ModalContext = require('./contexts/ModalContext.js');
|
|
17
18
|
var pageViewUp_generated = require('./graphql/mutations/page-view-up.generated.js');
|
|
18
19
|
var collectionDetailFilter_generated = require('./graphql/queries/collection-detail-filter.generated.js');
|
|
19
20
|
var collection_generated = require('./graphql/queries/collection.generated.js');
|
|
@@ -112,6 +113,8 @@ exports.ShopProvider = ShopContext.ShopProvider;
|
|
|
112
113
|
exports.useShopStore = ShopContext.useShopStore;
|
|
113
114
|
exports.CollectionProvider = CollectionContext.CollectionProvider;
|
|
114
115
|
exports.useCollectionStore = CollectionContext.useCollectionStore;
|
|
116
|
+
exports.ModalProvider = ModalContext.ModalProvider;
|
|
117
|
+
exports.useModalStore = ModalContext.useModalStore;
|
|
115
118
|
exports.PageViewUpDocument = pageViewUp_generated.PageViewUpDocument;
|
|
116
119
|
exports.CollectionDetailFilterDocument = collectionDetailFilter_generated.CollectionDetailFilterDocument;
|
|
117
120
|
exports.CollectionDocument = collection_generated.CollectionDocument;
|
|
@@ -119,6 +122,7 @@ exports.PublishedThemePagesDocument = publishedThemePages_generated.PublishedThe
|
|
|
119
122
|
exports.ProductsDocument = products_generated.ProductsDocument;
|
|
120
123
|
exports.StorePropertyDocument = storeProperty_generated.StorePropertyDocument;
|
|
121
124
|
exports.PreviewPageDocument = previewPage_generated.PreviewPageDocument;
|
|
125
|
+
exports.getBorderStyle = borders.getBorderStyle;
|
|
122
126
|
exports.handleConvertBorderColor = borders.handleConvertBorderColor;
|
|
123
127
|
exports.handleConvertBorderStyle = borders.handleConvertBorderStyle;
|
|
124
128
|
exports.handleConvertBorderWidth = borders.handleConvertBorderWidth;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useContext, createContext } from 'react';
|
|
3
|
+
import { useStore, createStore } from 'zustand';
|
|
4
|
+
|
|
5
|
+
const ModalContext = /*#__PURE__*/ createContext(null);
|
|
6
|
+
const createModalProvider = (data)=>createStore((set)=>({
|
|
7
|
+
activeId: data,
|
|
8
|
+
setModalActive: (id)=>{
|
|
9
|
+
set({
|
|
10
|
+
activeId: id
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
const ModalProvider = ({ children , activeId , ...passProps })=>{
|
|
15
|
+
const store = createModalProvider(activeId);
|
|
16
|
+
return /*#__PURE__*/ jsx(ModalContext.Provider, {
|
|
17
|
+
...passProps,
|
|
18
|
+
value: store,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
// export const useBuilderStore = useStore;
|
|
23
|
+
const useModalStore = (selector, equalityFn)=>{
|
|
24
|
+
const store = useContext(ModalContext);
|
|
25
|
+
if (!store) {
|
|
26
|
+
throw new Error('useModalStore must be used within a ModalProvider');
|
|
27
|
+
}
|
|
28
|
+
return useStore(store, selector, equalityFn);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { ModalProvider, useModalStore };
|
|
@@ -3,6 +3,7 @@ import { SWRConfig } from 'swr';
|
|
|
3
3
|
import { useStore, createStore } from 'zustand';
|
|
4
4
|
import { useMemo, useContext, createContext } from 'react';
|
|
5
5
|
import { AddonProvider } from './AddonContext.js';
|
|
6
|
+
import { ModalProvider } from './ModalContext.js';
|
|
6
7
|
|
|
7
8
|
const ShopContext = /*#__PURE__*/ createContext(null);
|
|
8
9
|
const createShopStoreProvider = (data)=>createStore((set)=>({
|
|
@@ -47,7 +48,9 @@ const ShopProvider = ({ children , addons , storeOption , queryOption , ...passP
|
|
|
47
48
|
children: /*#__PURE__*/ jsx(ShopContext.Provider, {
|
|
48
49
|
...passProps,
|
|
49
50
|
value: store,
|
|
50
|
-
children:
|
|
51
|
+
children: /*#__PURE__*/ jsx(ModalProvider, {
|
|
52
|
+
children: children
|
|
53
|
+
})
|
|
51
54
|
}, JSON.stringify(storeOption))
|
|
52
55
|
})
|
|
53
56
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStateResponsiveClass, getGlobalColorStateClass } from './colors.js';
|
|
2
|
-
import { makeStyleResponsiveState, makeStyleState
|
|
2
|
+
import { makeStyle, makeStyleResponsiveState, makeStyleState } from './make-style.js';
|
|
3
3
|
|
|
4
4
|
const getBorderStyle = (value)=>{
|
|
5
5
|
return makeStyle({
|
|
@@ -85,7 +85,9 @@ const loopFetchCollection = async (fetcher, arg)=>{
|
|
|
85
85
|
},
|
|
86
86
|
orderByProduct: productSortedByOrder(arg.orderBy),
|
|
87
87
|
whereProduct: {
|
|
88
|
-
|
|
88
|
+
...arg.isStorefront && {
|
|
89
|
+
isStorefront: arg.isStorefront
|
|
90
|
+
},
|
|
89
91
|
isSample: arg.isSample
|
|
90
92
|
},
|
|
91
93
|
productsAfter: productAfterFetcher
|
|
@@ -162,8 +164,10 @@ const fetchVariantsByBaseIds = async (fetcher, { ids , isSample , isStorefront
|
|
|
162
164
|
direction: 'DESC'
|
|
163
165
|
},
|
|
164
166
|
where: {
|
|
165
|
-
isStorefront,
|
|
166
167
|
isSample,
|
|
168
|
+
...isStorefront && {
|
|
169
|
+
isStorefront
|
|
170
|
+
},
|
|
167
171
|
...ids?.length && {
|
|
168
172
|
baseIDIn: ids.sort()
|
|
169
173
|
}
|
|
@@ -30,7 +30,9 @@ const fetchProduct = async (fetcher, handle, isStorefront)=>{
|
|
|
30
30
|
orderBy,
|
|
31
31
|
where: {
|
|
32
32
|
handle,
|
|
33
|
-
isStorefront
|
|
33
|
+
...isStorefront && {
|
|
34
|
+
isStorefront
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
};
|
|
36
38
|
const response = await fetcher([
|
|
@@ -44,7 +46,9 @@ const fetchVariants = async (fetcher, handle, isStorefront)=>{
|
|
|
44
46
|
orderBy,
|
|
45
47
|
where: {
|
|
46
48
|
handle,
|
|
47
|
-
isStorefront
|
|
49
|
+
...isStorefront && {
|
|
50
|
+
isStorefront
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
54
|
const query = async (variables, olds)=>{
|
|
@@ -73,7 +77,9 @@ const fetchMedias = async (fetcher, handle, isStorefront)=>{
|
|
|
73
77
|
orderBy,
|
|
74
78
|
where: {
|
|
75
79
|
handle,
|
|
76
|
-
isStorefront
|
|
80
|
+
...isStorefront && {
|
|
81
|
+
isStorefront
|
|
82
|
+
}
|
|
77
83
|
},
|
|
78
84
|
orderByMedia: {
|
|
79
85
|
field: 'POSITION',
|
|
@@ -41,8 +41,10 @@ const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
41
41
|
const variables = {
|
|
42
42
|
orderBy,
|
|
43
43
|
where: {
|
|
44
|
-
isStorefront,
|
|
45
44
|
isSample,
|
|
45
|
+
...isStorefront && {
|
|
46
|
+
isStorefront
|
|
47
|
+
},
|
|
46
48
|
...id && id.toLowerCase() !== 'latest' && {
|
|
47
49
|
baseID: id
|
|
48
50
|
}
|
|
@@ -58,8 +60,10 @@ const fetchVariants = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
58
60
|
const initVariables = {
|
|
59
61
|
orderBy,
|
|
60
62
|
where: {
|
|
61
|
-
isStorefront,
|
|
62
63
|
isSample,
|
|
64
|
+
...isStorefront && {
|
|
65
|
+
isStorefront
|
|
66
|
+
},
|
|
63
67
|
...id && id.toLowerCase() !== 'latest' && {
|
|
64
68
|
baseID: id
|
|
65
69
|
}
|
|
@@ -90,8 +94,10 @@ const fetchMedias = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
90
94
|
const initVariables = {
|
|
91
95
|
orderBy,
|
|
92
96
|
where: {
|
|
93
|
-
isStorefront,
|
|
94
97
|
isSample,
|
|
98
|
+
...isStorefront && {
|
|
99
|
+
isStorefront
|
|
100
|
+
},
|
|
95
101
|
...id && id.toLowerCase() !== 'latest' && {
|
|
96
102
|
baseID: id
|
|
97
103
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { ProductProvider, useProductStore } from './contexts/ProductContext.js';
|
|
|
12
12
|
export { SectionProvider, useSection, useSectionStore } from './contexts/SectionContext.js';
|
|
13
13
|
export { ShopProvider, useShopStore } from './contexts/ShopContext.js';
|
|
14
14
|
export { CollectionProvider, useCollectionStore } from './contexts/CollectionContext.js';
|
|
15
|
+
export { ModalProvider, useModalStore } from './contexts/ModalContext.js';
|
|
15
16
|
export { PageViewUpDocument } from './graphql/mutations/page-view-up.generated.js';
|
|
16
17
|
export { CollectionDetailFilterDocument } from './graphql/queries/collection-detail-filter.generated.js';
|
|
17
18
|
export { CollectionDocument } from './graphql/queries/collection.generated.js';
|
|
@@ -19,7 +20,7 @@ export { PublishedThemePagesDocument } from './graphql/queries/published-theme-p
|
|
|
19
20
|
export { ProductsDocument } from './graphql/queries/products.generated.js';
|
|
20
21
|
export { StorePropertyDocument } from './graphql/queries/store-property.generated.js';
|
|
21
22
|
export { PreviewPageDocument } from './graphql/queries/preview-page.generated.js';
|
|
22
|
-
export { handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor } from './helpers/borders.js';
|
|
23
|
+
export { getBorderStyle, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor } from './helpers/borders.js';
|
|
23
24
|
export { cls } from './helpers/cls.js';
|
|
24
25
|
export { composeAdvanceStyle } from './helpers/compose-advance-style.js';
|
|
25
26
|
export { flattenConnection } from './helpers/flatten-connection.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ type LinkData = {
|
|
|
156
156
|
};
|
|
157
157
|
type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
158
158
|
id: K;
|
|
159
|
-
label
|
|
159
|
+
label?: string;
|
|
160
160
|
info?: string;
|
|
161
161
|
hiddenWithGemPages?: boolean;
|
|
162
162
|
hyperlinkInfo?: HyperlinkInfo;
|
|
@@ -188,7 +188,7 @@ type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
188
188
|
devices?: ResponsiveConfig<U>;
|
|
189
189
|
} : {
|
|
190
190
|
id: K;
|
|
191
|
-
label
|
|
191
|
+
label?: string;
|
|
192
192
|
info?: string;
|
|
193
193
|
hiddenWithGemPages?: boolean;
|
|
194
194
|
hyperlinkInfo?: HyperlinkInfo;
|
|
@@ -383,6 +383,10 @@ type PositionControlType<T> = SharedControlType<T> & {
|
|
|
383
383
|
type: 'position';
|
|
384
384
|
};
|
|
385
385
|
|
|
386
|
+
type PositionSquareControlType<T> = SharedControlType<T> & {
|
|
387
|
+
type: 'position:square';
|
|
388
|
+
};
|
|
389
|
+
|
|
386
390
|
type RadioGroupControlType = {
|
|
387
391
|
id: string;
|
|
388
392
|
type: 'radioGroup';
|
|
@@ -410,7 +414,7 @@ type Option$2<T> = {
|
|
|
410
414
|
};
|
|
411
415
|
type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
412
416
|
id: K;
|
|
413
|
-
label
|
|
417
|
+
label?: string;
|
|
414
418
|
info?: string;
|
|
415
419
|
hide?: boolean;
|
|
416
420
|
hideOnMode?: {
|
|
@@ -433,7 +437,7 @@ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
433
437
|
devices?: ResponsiveConfig<U>;
|
|
434
438
|
} : {
|
|
435
439
|
id: K;
|
|
436
|
-
label
|
|
440
|
+
label?: string;
|
|
437
441
|
info?: string;
|
|
438
442
|
hide?: boolean;
|
|
439
443
|
hideOnMode?: {
|
|
@@ -465,7 +469,7 @@ type Option$1<T> = {
|
|
|
465
469
|
};
|
|
466
470
|
type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
467
471
|
id: K;
|
|
468
|
-
label
|
|
472
|
+
label?: string;
|
|
469
473
|
info?: string;
|
|
470
474
|
hyperlinkInfo?: HyperlinkInfo;
|
|
471
475
|
hideOnMode?: {
|
|
@@ -487,7 +491,7 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
487
491
|
devices?: ResponsiveConfig<U>;
|
|
488
492
|
} : {
|
|
489
493
|
id: K;
|
|
490
|
-
label
|
|
494
|
+
label?: string;
|
|
491
495
|
info?: string;
|
|
492
496
|
hyperlinkInfo?: HyperlinkInfo;
|
|
493
497
|
hideOnMode?: {
|
|
@@ -768,7 +772,17 @@ type InputSpacing<T> = SharedControlType<T> & {
|
|
|
768
772
|
readonly?: boolean;
|
|
769
773
|
};
|
|
770
774
|
|
|
771
|
-
type
|
|
775
|
+
type UniqueIdControlType<T> = SharedControlType<T> & {
|
|
776
|
+
type: 'unique-id:button';
|
|
777
|
+
placeholder?: string;
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
type SwatchesLinkControlType<T> = SharedControlType<T> & {
|
|
781
|
+
id?: string;
|
|
782
|
+
type: 'swatchesLink';
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<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 | SwatchesLinkControlType<T>;
|
|
772
786
|
type Setting<P extends BaseProps> = {
|
|
773
787
|
id: 'setting';
|
|
774
788
|
note?: string;
|
|
@@ -7033,6 +7047,16 @@ type CollectionProviderProps = CollectionContextProps & {
|
|
|
7033
7047
|
declare const CollectionProvider: React.FC<CollectionProviderProps>;
|
|
7034
7048
|
declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<CollectionContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
7035
7049
|
|
|
7050
|
+
type ModalContextProps = {
|
|
7051
|
+
activeId?: string;
|
|
7052
|
+
setModalActive: (id?: string) => void;
|
|
7053
|
+
};
|
|
7054
|
+
type ModalProviderProps = Pick<ModalContextProps, 'activeId'> & {
|
|
7055
|
+
children: React.ReactNode;
|
|
7056
|
+
};
|
|
7057
|
+
declare const ModalProvider: React.FC<ModalProviderProps>;
|
|
7058
|
+
declare const useModalStore: <U>(selector: (state: ExtractState<StoreApi<ModalContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
7059
|
+
|
|
7036
7060
|
type PageViewUpMutationVariables = Exact<{
|
|
7037
7061
|
pageHandle: Scalars['String'];
|
|
7038
7062
|
userAgent: Scalars['String'];
|
|
@@ -7218,6 +7242,9 @@ type VariantSelectFragment = Pick<ProductVariant, 'id' | 'title' | 'barcode' | '
|
|
|
7218
7242
|
};
|
|
7219
7243
|
|
|
7220
7244
|
type BorderStyle = StateProp<Border> | ResponsiveStateProp<Border>;
|
|
7245
|
+
declare const getBorderStyle: (value?: Border) => {
|
|
7246
|
+
[k: string]: Record<"--b" | "--bc" | "--bw", string | undefined>;
|
|
7247
|
+
};
|
|
7221
7248
|
declare const handleConvertBorderStyle: (value?: BorderStyle) => {} | undefined;
|
|
7222
7249
|
declare const handleConvertBorderWidth: (value?: BorderStyle) => {} | undefined;
|
|
7223
7250
|
declare const handleConvertBorderColor: (value?: BorderStyle) => React.CSSProperties | undefined;
|
|
@@ -7617,4 +7644,4 @@ declare const fetchMedias: (fetcher: FetchFunc, { id, isSample, isStorefront }:
|
|
|
7617
7644
|
|
|
7618
7645
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
7619
7646
|
|
|
7620
|
-
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, Border, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchFunc, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, OptionNormalStyle, OptionSpecialStyle, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, RenderMemo as Render, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RoundedSize, 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, calculateFirstProduct, cls, composeAdvanceStyle, composeRadius, composeSize, composeSpacing, fetchMedias, fetchVariants, flattenConnection, fpixel, genTypoClass, genVariable, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, isBrowser, isColor, isDefined, isEmptyChildren, isLocalEnv, loadScript, makeAspectRatio, makeHeight, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, prefetchQueries, props, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, 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 };
|
|
7647
|
+
export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchFunc, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, OptionNormalStyle, OptionSpecialStyle, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, RenderMemo as Render, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RoundedSize, 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, calculateFirstProduct, cls, composeAdvanceStyle, composeRadius, composeSize, composeSpacing, fetchMedias, fetchVariants, flattenConnection, fpixel, genTypoClass, genVariable, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, isBrowser, isColor, isDefined, isEmptyChildren, isLocalEnv, loadScript, makeAspectRatio, makeHeight, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, prefetchQueries, props, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, 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 };
|