@gem-sdk/core 1.10.18 → 1.10.23
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 +1 -1
- package/dist/cjs/graphql/fragments/collection-detail.generated.js +1 -0
- package/dist/cjs/helpers/compose-advance-style.js +26 -0
- package/dist/cjs/helpers/make-style.js +14 -0
- package/dist/cjs/hooks/useProduct.js +16 -0
- package/dist/cjs/index.js +4 -2
- package/dist/esm/components/Render.liquid.js +1 -1
- package/dist/esm/graphql/fragments/collection-detail.generated.js +1 -0
- package/dist/esm/helpers/compose-advance-style.js +26 -1
- package/dist/esm/helpers/make-style.js +14 -1
- package/dist/esm/hooks/useProduct.js +16 -1
- package/dist/esm/index.js +2 -2
- package/dist/types/index.d.ts +13 -8
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var composeAdvanceStyle = require('../helpers/compose-advance-style.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('swr');
|
|
8
7
|
var render = require('../helpers/render.js');
|
|
9
8
|
require('../helpers/convert.js');
|
|
9
|
+
var composeAdvanceStyle = require('../helpers/compose-advance-style.js');
|
|
10
10
|
var constant = require('./constant.js');
|
|
11
11
|
|
|
12
12
|
const componentsRenderWithParentId = [
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var borders = require('./borders.js');
|
|
4
4
|
var colors = require('./colors.js');
|
|
5
5
|
var constant = require('./constant.js');
|
|
6
|
+
var makeStyle = require('./make-style.js');
|
|
6
7
|
var radius = require('./radius.js');
|
|
7
8
|
var shadow = require('./shadow.js');
|
|
8
9
|
|
|
@@ -150,5 +151,30 @@ function composeAdvanceStyle(data, tag) {
|
|
|
150
151
|
});
|
|
151
152
|
return styles;
|
|
152
153
|
}
|
|
154
|
+
const splitStyle = (keys, style = {})=>{
|
|
155
|
+
const fullKeys = keys.map((key)=>makeStyle.makeStyleKey(key)).flat();
|
|
156
|
+
const splitKeys = Object.keys(style).filter((key)=>{
|
|
157
|
+
return fullKeys.includes(key);
|
|
158
|
+
});
|
|
159
|
+
const splitStyle = splitKeys.reduce((curr, key)=>{
|
|
160
|
+
return {
|
|
161
|
+
...curr,
|
|
162
|
+
[key]: style[key]
|
|
163
|
+
};
|
|
164
|
+
}, {});
|
|
165
|
+
const restStyle = Object.keys(style).filter((key)=>{
|
|
166
|
+
return !splitKeys.includes(key);
|
|
167
|
+
}).reduce((curr, key)=>{
|
|
168
|
+
return {
|
|
169
|
+
...curr,
|
|
170
|
+
[key]: style[key]
|
|
171
|
+
};
|
|
172
|
+
}, {});
|
|
173
|
+
return [
|
|
174
|
+
splitStyle,
|
|
175
|
+
restStyle
|
|
176
|
+
];
|
|
177
|
+
};
|
|
153
178
|
|
|
154
179
|
exports.composeAdvanceStyle = composeAdvanceStyle;
|
|
180
|
+
exports.splitStyle = splitStyle;
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
var getResonsiveValue = require('./get-resonsive-value.js');
|
|
4
4
|
|
|
5
|
+
const makeStyleKey = (name)=>{
|
|
6
|
+
return [
|
|
7
|
+
name,
|
|
8
|
+
`hvr-${name}`,
|
|
9
|
+
`focus-${name}`,
|
|
10
|
+
`${name}-tablet`,
|
|
11
|
+
`hvr-${name}-tablet`,
|
|
12
|
+
`focus-${name}-tablet`,
|
|
13
|
+
`${name}-mobile`,
|
|
14
|
+
`hvr-${name}-mobile`,
|
|
15
|
+
`focus-${name}-mobile`
|
|
16
|
+
].map((key)=>`--${key}`);
|
|
17
|
+
};
|
|
5
18
|
const makeStyle = (style)=>{
|
|
6
19
|
return Object.fromEntries(Object.entries(style).map(([key, value])=>[
|
|
7
20
|
`--${key}`,
|
|
@@ -100,6 +113,7 @@ exports.makeAspectRatio = makeAspectRatio;
|
|
|
100
113
|
exports.makeHeight = makeHeight;
|
|
101
114
|
exports.makeLineClamp = makeLineClamp;
|
|
102
115
|
exports.makeStyle = makeStyle;
|
|
116
|
+
exports.makeStyleKey = makeStyleKey;
|
|
103
117
|
exports.makeStyleResponsive = makeStyleResponsive;
|
|
104
118
|
exports.makeStyleResponsiveState = makeStyleResponsiveState;
|
|
105
119
|
exports.makeStyleState = makeStyleState;
|
|
@@ -100,8 +100,24 @@ const useVariantOutStock = (optionId, optionValue)=>{
|
|
|
100
100
|
const isInStock = checkInStock(matchedVariant);
|
|
101
101
|
return !isInStock;
|
|
102
102
|
};
|
|
103
|
+
const useCheckAvailableVariantInStock = (optionId, optionValue)=>{
|
|
104
|
+
const variants = useVariants();
|
|
105
|
+
let available = false;
|
|
106
|
+
variants.forEach((item)=>{
|
|
107
|
+
if (item) {
|
|
108
|
+
const { selectedOptions } = item;
|
|
109
|
+
const opt = selectedOptions?.find((option)=>option?.name === optionId && option.value === optionValue);
|
|
110
|
+
const isInStock = checkInStock(item);
|
|
111
|
+
if (opt && isInStock) {
|
|
112
|
+
available = true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return available;
|
|
117
|
+
};
|
|
103
118
|
|
|
104
119
|
exports.checkInStock = checkInStock;
|
|
120
|
+
exports.useCheckAvailableVariantInStock = useCheckAvailableVariantInStock;
|
|
105
121
|
exports.useCurrentVariant = useCurrentVariant;
|
|
106
122
|
exports.useCurrentVariantInStock = useCurrentVariantInStock;
|
|
107
123
|
exports.useFeaturedImageGlobal = useFeaturedImageGlobal;
|
package/dist/cjs/index.js
CHANGED
|
@@ -25,7 +25,6 @@ var storeProperty_generated = require('./graphql/queries/store-property.generate
|
|
|
25
25
|
var previewPage_generated = require('./graphql/queries/preview-page.generated.js');
|
|
26
26
|
var borders = require('./helpers/borders.js');
|
|
27
27
|
var cls = require('./helpers/cls.js');
|
|
28
|
-
var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
|
|
29
28
|
var flattenConnection = require('./helpers/flatten-connection.js');
|
|
30
29
|
var getResonsiveValue = require('./helpers/get-resonsive-value.js');
|
|
31
30
|
var getShortname = require('./helpers/get-shortname.js');
|
|
@@ -54,6 +53,7 @@ var size = require('./helpers/size.js');
|
|
|
54
53
|
var shadow = require('./helpers/shadow.js');
|
|
55
54
|
var background = require('./helpers/background.js');
|
|
56
55
|
var query = require('./helpers/query.js');
|
|
56
|
+
var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
|
|
57
57
|
var useAddToCart = require('./hooks/cart/use-add-to-cart.js');
|
|
58
58
|
var useCartData = require('./hooks/cart/use-cart-data.js');
|
|
59
59
|
var useCartDiscountCodesUpdate = require('./hooks/cart/use-cart-discount-codes-update.js');
|
|
@@ -134,7 +134,6 @@ exports.handleConvertBorderWidth = borders.handleConvertBorderWidth;
|
|
|
134
134
|
exports.handleConvertClassColor = borders.handleConvertClassColor;
|
|
135
135
|
exports.handleConvertClassColorDynamicBtn = borders.handleConvertClassColorDynamicBtn;
|
|
136
136
|
exports.cls = cls.cls;
|
|
137
|
-
exports.composeAdvanceStyle = composeAdvanceStyle.composeAdvanceStyle;
|
|
138
137
|
exports.flattenConnection = flattenConnection.flattenConnection;
|
|
139
138
|
exports.getResponsiveStateValue = getResonsiveValue.getResponsiveStateValue;
|
|
140
139
|
exports.getResponsiveValue = getResonsiveValue.getResponsiveValue;
|
|
@@ -208,6 +207,8 @@ exports.getStyleBackgroundByDevice = background.getStyleBackgroundByDevice;
|
|
|
208
207
|
exports.generateCollectionQueryKey = query.generateCollectionQueryKey;
|
|
209
208
|
exports.generateProductQueryKey = query.generateProductQueryKey;
|
|
210
209
|
exports.generateProductsQueryKey = query.generateProductsQueryKey;
|
|
210
|
+
exports.composeAdvanceStyle = composeAdvanceStyle.composeAdvanceStyle;
|
|
211
|
+
exports.splitStyle = composeAdvanceStyle.splitStyle;
|
|
211
212
|
exports.useAddToCart = useAddToCart.useAddToCart;
|
|
212
213
|
exports.useCartData = useCartData.useCartData;
|
|
213
214
|
exports.useCartDiscountCodesUpdate = useCartDiscountCodesUpdate.useCartDiscountCodesUpdate;
|
|
@@ -247,6 +248,7 @@ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect.default;
|
|
|
247
248
|
exports.useLoadScript = useLoadScript.default;
|
|
248
249
|
exports.useMoney = useMoney.default;
|
|
249
250
|
exports.usePrevious = usePrevious.usePrevious;
|
|
251
|
+
exports.useCheckAvailableVariantInStock = useProduct.useCheckAvailableVariantInStock;
|
|
250
252
|
exports.useCurrentVariant = useProduct.useCurrentVariant;
|
|
251
253
|
exports.useCurrentVariantInStock = useProduct.useCurrentVariantInStock;
|
|
252
254
|
exports.useFeaturedImageGlobal = useProduct.useFeaturedImageGlobal;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { composeAdvanceStyle } from '../helpers/compose-advance-style.js';
|
|
2
1
|
import 'react';
|
|
3
2
|
import 'swr';
|
|
4
3
|
import { RenderIf, template } from '../helpers/render.js';
|
|
5
4
|
import '../helpers/convert.js';
|
|
5
|
+
import { composeAdvanceStyle } from '../helpers/compose-advance-style.js';
|
|
6
6
|
import { disableWrap } from './constant.js';
|
|
7
7
|
|
|
8
8
|
const componentsRenderWithParentId = [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, getBorderStyle } from './borders.js';
|
|
2
2
|
import { isColor } from './colors.js';
|
|
3
3
|
import { layoutComponent } from './constant.js';
|
|
4
|
+
import { makeStyleKey } from './make-style.js';
|
|
4
5
|
import { composeRadius, getCornerCSSFromGlobal } from './radius.js';
|
|
5
6
|
import { getStyleShadowState, getStyleShadow } from './shadow.js';
|
|
6
7
|
|
|
@@ -148,5 +149,29 @@ function composeAdvanceStyle(data, tag) {
|
|
|
148
149
|
});
|
|
149
150
|
return styles;
|
|
150
151
|
}
|
|
152
|
+
const splitStyle = (keys, style = {})=>{
|
|
153
|
+
const fullKeys = keys.map((key)=>makeStyleKey(key)).flat();
|
|
154
|
+
const splitKeys = Object.keys(style).filter((key)=>{
|
|
155
|
+
return fullKeys.includes(key);
|
|
156
|
+
});
|
|
157
|
+
const splitStyle = splitKeys.reduce((curr, key)=>{
|
|
158
|
+
return {
|
|
159
|
+
...curr,
|
|
160
|
+
[key]: style[key]
|
|
161
|
+
};
|
|
162
|
+
}, {});
|
|
163
|
+
const restStyle = Object.keys(style).filter((key)=>{
|
|
164
|
+
return !splitKeys.includes(key);
|
|
165
|
+
}).reduce((curr, key)=>{
|
|
166
|
+
return {
|
|
167
|
+
...curr,
|
|
168
|
+
[key]: style[key]
|
|
169
|
+
};
|
|
170
|
+
}, {});
|
|
171
|
+
return [
|
|
172
|
+
splitStyle,
|
|
173
|
+
restStyle
|
|
174
|
+
];
|
|
175
|
+
};
|
|
151
176
|
|
|
152
|
-
export { composeAdvanceStyle };
|
|
177
|
+
export { composeAdvanceStyle, splitStyle };
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { getResponsiveValueByScreen } from './get-resonsive-value.js';
|
|
2
2
|
|
|
3
|
+
const makeStyleKey = (name)=>{
|
|
4
|
+
return [
|
|
5
|
+
name,
|
|
6
|
+
`hvr-${name}`,
|
|
7
|
+
`focus-${name}`,
|
|
8
|
+
`${name}-tablet`,
|
|
9
|
+
`hvr-${name}-tablet`,
|
|
10
|
+
`focus-${name}-tablet`,
|
|
11
|
+
`${name}-mobile`,
|
|
12
|
+
`hvr-${name}-mobile`,
|
|
13
|
+
`focus-${name}-mobile`
|
|
14
|
+
].map((key)=>`--${key}`);
|
|
15
|
+
};
|
|
3
16
|
const makeStyle = (style)=>{
|
|
4
17
|
return Object.fromEntries(Object.entries(style).map(([key, value])=>[
|
|
5
18
|
`--${key}`,
|
|
@@ -94,4 +107,4 @@ const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
|
|
|
94
107
|
};
|
|
95
108
|
};
|
|
96
109
|
|
|
97
|
-
export { makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth };
|
|
110
|
+
export { makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth };
|
|
@@ -98,5 +98,20 @@ const useVariantOutStock = (optionId, optionValue)=>{
|
|
|
98
98
|
const isInStock = checkInStock(matchedVariant);
|
|
99
99
|
return !isInStock;
|
|
100
100
|
};
|
|
101
|
+
const useCheckAvailableVariantInStock = (optionId, optionValue)=>{
|
|
102
|
+
const variants = useVariants();
|
|
103
|
+
let available = false;
|
|
104
|
+
variants.forEach((item)=>{
|
|
105
|
+
if (item) {
|
|
106
|
+
const { selectedOptions } = item;
|
|
107
|
+
const opt = selectedOptions?.find((option)=>option?.name === optionId && option.value === optionValue);
|
|
108
|
+
const isInStock = checkInStock(item);
|
|
109
|
+
if (opt && isInStock) {
|
|
110
|
+
available = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return available;
|
|
115
|
+
};
|
|
101
116
|
|
|
102
|
-
export { checkInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useProduct, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
|
|
117
|
+
export { checkInStock, useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useProduct, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
|
package/dist/esm/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export { StorePropertyDocument } from './graphql/queries/store-property.generate
|
|
|
23
23
|
export { PreviewPageDocument } from './graphql/queries/preview-page.generated.js';
|
|
24
24
|
export { composeBorderCss, getBorderStyle, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn } from './helpers/borders.js';
|
|
25
25
|
export { cls } from './helpers/cls.js';
|
|
26
|
-
export { composeAdvanceStyle } from './helpers/compose-advance-style.js';
|
|
27
26
|
export { flattenConnection } from './helpers/flatten-connection.js';
|
|
28
27
|
export { getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen } from './helpers/get-resonsive-value.js';
|
|
29
28
|
export { getShortName } from './helpers/get-shortname.js';
|
|
@@ -55,6 +54,7 @@ export { composeSize, composeSizeCss, genSizeClass } from './helpers/size.js';
|
|
|
55
54
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
56
55
|
export { composeBackgroundCss, getStyleBackgroundByDevice } from './helpers/background.js';
|
|
57
56
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
57
|
+
export { composeAdvanceStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
58
58
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
|
59
59
|
export { useCartData } from './hooks/cart/use-cart-data.js';
|
|
60
60
|
export { useCartDiscountCodesUpdate } from './hooks/cart/use-cart-discount-codes-update.js';
|
|
@@ -79,7 +79,7 @@ export { default as useIsomorphicLayoutEffect } from './hooks/useIsomorphicLayou
|
|
|
79
79
|
export { default as useLoadScript } from './hooks/useLoadScript.js';
|
|
80
80
|
export { default as useMoney } from './hooks/useMoney.js';
|
|
81
81
|
export { usePrevious } from './hooks/usePrevious.js';
|
|
82
|
-
export { useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useProduct, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants } from './hooks/useProduct.js';
|
|
82
|
+
export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useProduct, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants } from './hooks/useProduct.js';
|
|
83
83
|
export { useProductList, useProductListProducts, useProductListSettings, useProductListStyles } from './hooks/useProductList.js';
|
|
84
84
|
export { default as useSuspenseFetch } from './hooks/useSuspenseFetch.js';
|
|
85
85
|
export { default as useSwatchesOptions } from './hooks/useSwatchesOptions.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -137,6 +137,9 @@ type ObjectLayoutValue = {
|
|
|
137
137
|
};
|
|
138
138
|
type ProductReviewsWidgetType = 'reviews' | 'badge';
|
|
139
139
|
type WiserWidgetType = 'related' | 'recommended' | 'alsobought' | 'recentview' | 'newarrivals' | 'featured' | 'topselling' | 'trending' | 'recent_related';
|
|
140
|
+
type InstantJudgeMeReviewsWidgetType = 'single_product_preview_badge' | 'review_widget' | 'reviews_carousel' | 'floating_reviews_tab' | 'all_reviews_widget' | 'verified_reviews_count_badge' | 'medals' | 'media_grid' | 'all_reviews_text';
|
|
141
|
+
type InstantLooxReviewsWidgetType = 'product_reviews_widget' | 'reviews_widget_all_stores' | 'product_star_ratings_widget' | 'carousel_widget';
|
|
142
|
+
type InstantKlaviyoWidgetType = 'popup_widget' | 'flyout_widget' | 'embed_widget' | 'full_page_widget';
|
|
140
143
|
|
|
141
144
|
type ResponsiveConfig<T> = {
|
|
142
145
|
desktop: {
|
|
@@ -7054,7 +7057,7 @@ type CartLineProviderProps = Pick<CartLineContextProps, 'line'> & {
|
|
|
7054
7057
|
declare const CartLineProvider: React.FC<CartLineProviderProps>;
|
|
7055
7058
|
declare const useCartLineStore: <U>(selector: (state: ExtractState<StoreApi<CartLineContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
7056
7059
|
|
|
7057
|
-
type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7060
|
+
type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7058
7061
|
products?: Maybe<{
|
|
7059
7062
|
edges: Array<Pick<ProductEdge, 'cursor'> & {
|
|
7060
7063
|
node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
@@ -7240,7 +7243,7 @@ type ShopProviderProps = {
|
|
|
7240
7243
|
declare const ShopProvider: React.FC<ShopProviderProps>;
|
|
7241
7244
|
declare const useShopStore: <U>(selector: (state: ExtractState<StoreApi<ShopContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
7242
7245
|
|
|
7243
|
-
type CollectionSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7246
|
+
type CollectionSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7244
7247
|
products?: Maybe<{
|
|
7245
7248
|
edges: Array<{
|
|
7246
7249
|
node?: Maybe<Pick<Product, 'id' | 'title' | 'handle' | 'description' | 'status'> & {
|
|
@@ -7299,7 +7302,7 @@ type CollectionDetailFilterQueryVariables = Exact<{
|
|
|
7299
7302
|
type CollectionDetailFilterQueryResponse = {
|
|
7300
7303
|
collections?: Maybe<{
|
|
7301
7304
|
edges: Array<Pick<CollectionEdge, 'cursor'> & {
|
|
7302
|
-
node?: Maybe<Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7305
|
+
node?: Maybe<Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7303
7306
|
products?: Maybe<{
|
|
7304
7307
|
edges: Array<Pick<ProductEdge, 'cursor'> & {
|
|
7305
7308
|
node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
@@ -7386,7 +7389,7 @@ type CollectionsQueryVariables = Exact<{
|
|
|
7386
7389
|
type CollectionsQueryResponse = {
|
|
7387
7390
|
collections?: Maybe<{
|
|
7388
7391
|
edges: Array<{
|
|
7389
|
-
node?: Maybe<Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7392
|
+
node?: Maybe<Pick<Collection, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
7390
7393
|
products?: Maybe<{
|
|
7391
7394
|
edges: Array<{
|
|
7392
7395
|
node?: Maybe<Pick<Product, 'id' | 'title' | 'handle' | 'description' | 'status'> & {
|
|
@@ -7504,9 +7507,6 @@ interface ClassDictionary {
|
|
|
7504
7507
|
}
|
|
7505
7508
|
declare function cls(...classes: ClassValue[]): string;
|
|
7506
7509
|
|
|
7507
|
-
type AdvanceValue = Primitive | ObjectDevices<Primitive>;
|
|
7508
|
-
declare function composeAdvanceStyle(data?: Record<string, AdvanceValue>, tag?: string): React.CSSProperties;
|
|
7509
|
-
|
|
7510
7510
|
/**
|
|
7511
7511
|
* The `flattenConnection` utility transforms a connection object from the Storefront API (for example, [Product-related connections](api/storefront/reference/products/product#connections)) into a flat array of nodes.
|
|
7512
7512
|
*/
|
|
@@ -7726,6 +7726,10 @@ declare const generateProductQueryKey: (args: FetchProductParams) => ['query/pro
|
|
|
7726
7726
|
declare const generateCollectionQueryKey: (args: FetchCollectionArgs) => ['query/collection', FetchCollectionArgs];
|
|
7727
7727
|
declare const generateProductsQueryKey: (args: FetchProductsParams) => ['query/products', FetchProductsParams];
|
|
7728
7728
|
|
|
7729
|
+
type AdvanceValue = Primitive | ObjectDevices<Primitive>;
|
|
7730
|
+
declare function composeAdvanceStyle(data?: Record<string, AdvanceValue>, tag?: string): React.CSSProperties;
|
|
7731
|
+
declare const splitStyle: (keys: ShortHandProperty[], style?: React.CSSProperties) => React.CSSProperties[];
|
|
7732
|
+
|
|
7729
7733
|
type Func$6 = ReturnType<typeof addToCartOperation>;
|
|
7730
7734
|
type Response$6 = Awaited<ReturnType<Func$6>>;
|
|
7731
7735
|
type Args$5 = Parameters<Func$6>[0];
|
|
@@ -7881,6 +7885,7 @@ declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "title" | "
|
|
|
7881
7885
|
declare const useCurrentVariant: () => Maybe<VariantSelectFragment>;
|
|
7882
7886
|
declare const useCurrentVariantInStock: () => boolean;
|
|
7883
7887
|
declare const useVariantOutStock: (optionId: string, optionValue: string) => boolean;
|
|
7888
|
+
declare const useCheckAvailableVariantInStock: (optionId: string, optionValue: string) => boolean;
|
|
7884
7889
|
|
|
7885
7890
|
declare const useProductList: () => CollectionProductSelectFragment | undefined;
|
|
7886
7891
|
declare const useProductListProducts: () => (ProductQuickSelectFragment | undefined)[] | undefined;
|
|
@@ -7921,4 +7926,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
7921
7926
|
|
|
7922
7927
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
7923
7928
|
|
|
7924
|
-
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, 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, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, 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 };
|
|
7929
|
+
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 };
|