@gem-sdk/core 1.43.0-dev.67 → 1.43.0-dev.80
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/helpers/colors.js +1 -1
- package/dist/cjs/helpers/shadow.js +1 -1
- package/dist/cjs/helpers/typography.js +39 -4
- package/dist/cjs/hooks/useFormatMoney.js +61 -60
- package/dist/cjs/index.js +17 -15
- package/dist/esm/helpers/colors.js +1 -1
- package/dist/esm/helpers/shadow.js +1 -1
- package/dist/esm/helpers/typography.js +39 -5
- package/dist/esm/hooks/useFormatMoney.js +61 -61
- package/dist/esm/index.js +12 -12
- package/dist/types/index.d.ts +86 -70
- package/package.json +3 -3
|
@@ -119,7 +119,7 @@ const getGlobalColorStateStyle = (type, data)=>{
|
|
|
119
119
|
return Object.fromEntries(Object.entries(data).map(([state, value])=>{
|
|
120
120
|
if (state === 'active') return [];
|
|
121
121
|
return [
|
|
122
|
-
`-${constant.stateMapping?.[state]}-${type}`,
|
|
122
|
+
`-${constant.stateMapping?.[state] || ''}-${type}`,
|
|
123
123
|
getSingleColorVariable(value)
|
|
124
124
|
];
|
|
125
125
|
}).filter(isDefined.isDefined));
|
|
@@ -27,7 +27,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
27
27
|
if (typeof value.distance == 'undefined') return {};
|
|
28
28
|
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
29
29
|
return {
|
|
30
|
-
[`-${!isActiveState ? constant.stateMapping?.[state] : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
30
|
+
[`-${!isActiveState ? constant.stateMapping?.[state] || '' : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
|
|
@@ -10,7 +10,9 @@ const composeTypographyCss = (typography)=>{
|
|
|
10
10
|
const typographyCustom = typography?.custom;
|
|
11
11
|
const { fontFamily, fontSize, fontStyle, fontWeight, lineHeight, letterSpacing } = typographyCustom?.desktop ?? {};
|
|
12
12
|
return `
|
|
13
|
-
${fontFamily ? `
|
|
13
|
+
${fontFamily ? `fontFamily: ${composeFontFamilyTypographyV2({
|
|
14
|
+
fontFamily
|
|
15
|
+
})};` : ''}
|
|
14
16
|
${fontSize ? `font-size: ${fontSize};` : ''}
|
|
15
17
|
${fontStyle ? `font-style: ${fontStyle};` : ''}
|
|
16
18
|
${fontWeight ? `font-weight: ${fontWeight};` : ''}
|
|
@@ -25,7 +27,9 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
25
27
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
26
28
|
const composeImportant = isImportant ? '!important' : '';
|
|
27
29
|
return `
|
|
28
|
-
${fontFamily ?
|
|
30
|
+
${fontFamily ? composeFontFamilyTypographyV2({
|
|
31
|
+
fontFamily
|
|
32
|
+
}) : ''}
|
|
29
33
|
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant};` : ''}
|
|
30
34
|
${bold ? `font-weight: bold ${composeImportant};` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant};` : ''}
|
|
31
35
|
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant};` : ''}
|
|
@@ -43,7 +47,9 @@ function getCustomCSSByDevice(typography, device) {
|
|
|
43
47
|
[`--size${suffix}`]: typography?.[device]?.fontSize,
|
|
44
48
|
[`--lh${suffix}`]: typography?.[device]?.lineHeight,
|
|
45
49
|
[`--fs${suffix}`]: typography?.[device]?.fontStyle,
|
|
46
|
-
[`--ff${suffix}`]:
|
|
50
|
+
[`--ff${suffix}`]: composeFontFamilyTypographyV2({
|
|
51
|
+
fontFamily
|
|
52
|
+
}),
|
|
47
53
|
[`--weight${suffix}`]: typography?.[device]?.fontWeight,
|
|
48
54
|
[`--ls${suffix}`]: typography?.[device]?.letterSpacing
|
|
49
55
|
};
|
|
@@ -61,7 +67,7 @@ const composeTypographyV2 = (value, attrs)=>{
|
|
|
61
67
|
return makeStyle.removeNullUndefined({
|
|
62
68
|
...makeStyle.makeStyle({
|
|
63
69
|
fs: !attrs?.italic ? value?.fontStyle : undefined,
|
|
64
|
-
ff:
|
|
70
|
+
ff: composeFontFamilyTypographyV2(value),
|
|
65
71
|
weight: !attrs?.bold ? value?.fontWeight : undefined,
|
|
66
72
|
ls: value?.letterSpacing
|
|
67
73
|
}),
|
|
@@ -69,6 +75,34 @@ const composeTypographyV2 = (value, attrs)=>{
|
|
|
69
75
|
...makeStyle.makeStyleResponsive('lh', value?.lineHeight)
|
|
70
76
|
});
|
|
71
77
|
};
|
|
78
|
+
const composeFontFamilyTypographyV2 = (value)=>{
|
|
79
|
+
const fontFamily = value?.fontFamily;
|
|
80
|
+
if (!fontFamily) return;
|
|
81
|
+
if (typeof fontFamily === 'string') {
|
|
82
|
+
return getFontUsedByTypographyV2({
|
|
83
|
+
fontFamily,
|
|
84
|
+
fallbackFontFamily: value?.fallbackFontFamily
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (typeof fontFamily === 'object' && typeof fontFamily?.value === 'string') {
|
|
88
|
+
switch(fontFamily.type){
|
|
89
|
+
case 'theme':
|
|
90
|
+
return `var(${fontFamily?.value}), var(--g-font-body)`;
|
|
91
|
+
default:
|
|
92
|
+
return getFontUsedByTypographyV2({
|
|
93
|
+
fontFamily: fontFamily.value,
|
|
94
|
+
fallbackFontFamily: value?.fallbackFontFamily
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return;
|
|
99
|
+
};
|
|
100
|
+
const getFontUsedByTypographyV2 = ({ fontFamily, fallbackFontFamily })=>{
|
|
101
|
+
if (fontFamily) {
|
|
102
|
+
return `var(--g-font-${fontFamily?.replace(/ /g, '-')}, '${fontFamily}'), ${fallbackFontFamily}`;
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
};
|
|
72
106
|
const composeTypographyAttr = (attrs)=>{
|
|
73
107
|
if (!attrs) return {};
|
|
74
108
|
return makeStyle.removeNullUndefined({
|
|
@@ -116,6 +150,7 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
116
150
|
};
|
|
117
151
|
|
|
118
152
|
exports.composeFallbackTypographyStyle = composeFallbackTypographyStyle;
|
|
153
|
+
exports.composeFontFamilyTypographyV2 = composeFontFamilyTypographyV2;
|
|
119
154
|
exports.composeTypography = composeTypography;
|
|
120
155
|
exports.composeTypographyAttr = composeTypographyAttr;
|
|
121
156
|
exports.composeTypographyClassName = composeTypographyClassName;
|
|
@@ -5,70 +5,71 @@ var shop = require('./shop.js');
|
|
|
5
5
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
6
6
|
return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
|
|
7
7
|
};
|
|
8
|
+
const formatMoney = function(cents, format) {
|
|
9
|
+
let value = '';
|
|
10
|
+
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
11
|
+
const formatString = format || '${{amount}}';
|
|
12
|
+
/**
|
|
13
|
+
* check default
|
|
14
|
+
* @param opt opt
|
|
15
|
+
* @param def def
|
|
16
|
+
* @returns any
|
|
17
|
+
*/ function defaultOption(opt, def) {
|
|
18
|
+
return typeof opt == 'undefined' ? def : opt;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* formatWithDelimiters
|
|
22
|
+
* @param number number
|
|
23
|
+
* @param precision precision
|
|
24
|
+
* @param thousands thousands
|
|
25
|
+
* @param decimal decimal
|
|
26
|
+
* @returns any
|
|
27
|
+
*/ // eslint-disable-next-line max-params
|
|
28
|
+
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
29
|
+
precision = defaultOption(precision, 2);
|
|
30
|
+
thousands = defaultOption(thousands, ',');
|
|
31
|
+
decimal = defaultOption(decimal, '.');
|
|
32
|
+
if (isNaN(number) || number == null) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
36
|
+
number = shopifyPriceRounding(number, Number(precision));
|
|
37
|
+
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
38
|
+
return dollars + cents;
|
|
39
|
+
}
|
|
40
|
+
switch(formatString.match(placeholderRegex)[1]){
|
|
41
|
+
case 'amount':
|
|
42
|
+
value = formatWithDelimiters(cents, 2);
|
|
43
|
+
break;
|
|
44
|
+
case 'amount_no_decimals':
|
|
45
|
+
value = formatWithDelimiters(cents, 0);
|
|
46
|
+
break;
|
|
47
|
+
case 'amount_with_comma_separator':
|
|
48
|
+
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
49
|
+
break;
|
|
50
|
+
case 'amount_no_decimals_with_comma_separator':
|
|
51
|
+
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
52
|
+
break;
|
|
53
|
+
case 'amount_with_apostrophe_separator':
|
|
54
|
+
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
55
|
+
break;
|
|
56
|
+
case 'amount_no_decimals_with_space_separator':
|
|
57
|
+
value = formatWithDelimiters(cents, 0, ' ');
|
|
58
|
+
break;
|
|
59
|
+
case 'amount_with_space_separator':
|
|
60
|
+
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
61
|
+
break;
|
|
62
|
+
case 'amount_with_period_and_space_separator':
|
|
63
|
+
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return formatString.replace(placeholderRegex, value);
|
|
67
|
+
};
|
|
8
68
|
const useFormatMoney = (amount, withCurrency)=>{
|
|
9
69
|
const { moneyFormat, moneyWithCurrencyFormat } = shop.useMoneyFormat();
|
|
10
|
-
const formatMoney = function(cents, format) {
|
|
11
|
-
let value = '';
|
|
12
|
-
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
13
|
-
const formatString = format || '${{amount}}';
|
|
14
|
-
/**
|
|
15
|
-
* check default
|
|
16
|
-
* @param opt opt
|
|
17
|
-
* @param def def
|
|
18
|
-
* @returns any
|
|
19
|
-
*/ function defaultOption(opt, def) {
|
|
20
|
-
return typeof opt == 'undefined' ? def : opt;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* formatWithDelimiters
|
|
24
|
-
* @param number number
|
|
25
|
-
* @param precision precision
|
|
26
|
-
* @param thousands thousands
|
|
27
|
-
* @param decimal decimal
|
|
28
|
-
* @returns any
|
|
29
|
-
*/ // eslint-disable-next-line max-params
|
|
30
|
-
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
31
|
-
precision = defaultOption(precision, 2);
|
|
32
|
-
thousands = defaultOption(thousands, ',');
|
|
33
|
-
decimal = defaultOption(decimal, '.');
|
|
34
|
-
if (isNaN(number) || number == null) {
|
|
35
|
-
return 0;
|
|
36
|
-
}
|
|
37
|
-
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
38
|
-
number = shopifyPriceRounding(number, Number(precision));
|
|
39
|
-
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
40
|
-
return dollars + cents;
|
|
41
|
-
}
|
|
42
|
-
switch(formatString.match(placeholderRegex)[1]){
|
|
43
|
-
case 'amount':
|
|
44
|
-
value = formatWithDelimiters(cents, 2);
|
|
45
|
-
break;
|
|
46
|
-
case 'amount_no_decimals':
|
|
47
|
-
value = formatWithDelimiters(cents, 0);
|
|
48
|
-
break;
|
|
49
|
-
case 'amount_with_comma_separator':
|
|
50
|
-
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
51
|
-
break;
|
|
52
|
-
case 'amount_no_decimals_with_comma_separator':
|
|
53
|
-
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
54
|
-
break;
|
|
55
|
-
case 'amount_with_apostrophe_separator':
|
|
56
|
-
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
57
|
-
break;
|
|
58
|
-
case 'amount_no_decimals_with_space_separator':
|
|
59
|
-
value = formatWithDelimiters(cents, 0, ' ');
|
|
60
|
-
break;
|
|
61
|
-
case 'amount_with_space_separator':
|
|
62
|
-
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
63
|
-
break;
|
|
64
|
-
case 'amount_with_period_and_space_separator':
|
|
65
|
-
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
return formatString.replace(placeholderRegex, value);
|
|
69
|
-
};
|
|
70
70
|
return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
exports.formatMoney = formatMoney;
|
|
73
74
|
exports.shopifyPriceRounding = shopifyPriceRounding;
|
|
74
75
|
exports.useFormatMoney = useFormatMoney;
|
package/dist/cjs/index.js
CHANGED
|
@@ -44,6 +44,13 @@ var isEmptyChildren = require('./helpers/is-empty-children.js');
|
|
|
44
44
|
var isSafari = require('./helpers/is-safari.js');
|
|
45
45
|
var normalizeBuilderData = require('./helpers/normalize-builder-data.js');
|
|
46
46
|
var prefetchQueries = require('./helpers/prefetch-queries.js');
|
|
47
|
+
var email = require('./helpers/email.js');
|
|
48
|
+
var loadScript = require('./helpers/load-script.js');
|
|
49
|
+
var spacing = require('./helpers/spacing.js');
|
|
50
|
+
var cssVariable = require('./helpers/css-variable.js');
|
|
51
|
+
var fpixel = require('./helpers/tracking/fpixel.js');
|
|
52
|
+
var gtag = require('./helpers/tracking/gtag.js');
|
|
53
|
+
var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
|
|
47
54
|
var background = require('./helpers/background.js');
|
|
48
55
|
var colors = require('./helpers/colors.js');
|
|
49
56
|
var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
|
|
@@ -61,13 +68,6 @@ var render = require('./helpers/render.js');
|
|
|
61
68
|
var shadow = require('./helpers/shadow.js');
|
|
62
69
|
var size = require('./helpers/size.js');
|
|
63
70
|
var typography = require('./helpers/typography.js');
|
|
64
|
-
var email = require('./helpers/email.js');
|
|
65
|
-
var loadScript = require('./helpers/load-script.js');
|
|
66
|
-
var spacing = require('./helpers/spacing.js');
|
|
67
|
-
var cssVariable = require('./helpers/css-variable.js');
|
|
68
|
-
var fpixel = require('./helpers/tracking/fpixel.js');
|
|
69
|
-
var gtag = require('./helpers/tracking/gtag.js');
|
|
70
|
-
var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
|
|
71
71
|
var useAddToCart = require('./hooks/cart/use-add-to-cart.js');
|
|
72
72
|
var useCartData = require('./hooks/cart/use-cart-data.js');
|
|
73
73
|
var useCartDiscountCodesUpdate = require('./hooks/cart/use-cart-discount-codes-update.js');
|
|
@@ -181,6 +181,14 @@ exports.isEmptyChildren = isEmptyChildren.isEmptyChildren;
|
|
|
181
181
|
exports.isSafari = isSafari.default;
|
|
182
182
|
exports.normalizeBuilderData = normalizeBuilderData.normalizeBuilderData;
|
|
183
183
|
exports.prefetchQueries = prefetchQueries.prefetchQueries;
|
|
184
|
+
exports.validateEmail = email.validateEmail;
|
|
185
|
+
exports.loadScript = loadScript.loadScript;
|
|
186
|
+
exports.composeSpacing = spacing.composeSpacing;
|
|
187
|
+
exports.getSpacingVariable = spacing.getSpacingVariable;
|
|
188
|
+
exports.genVariable = cssVariable.genVariable;
|
|
189
|
+
exports.fpixel = fpixel;
|
|
190
|
+
exports.gtag = gtag;
|
|
191
|
+
exports.tiktokpixel = tiktokpixel;
|
|
184
192
|
exports.GRADIENT_BGR_KEY = background.GRADIENT_BGR_KEY;
|
|
185
193
|
exports.composeBackgroundCss = background.composeBackgroundCss;
|
|
186
194
|
exports.getBgImageByDevice = background.getBgImageByDevice;
|
|
@@ -270,6 +278,7 @@ exports.makeGlobalSize = size.makeGlobalSize;
|
|
|
270
278
|
exports.makeGlobalSizeIcon = size.makeGlobalSizeIcon;
|
|
271
279
|
exports.makeStyleWithDefault = size.makeStyleWithDefault;
|
|
272
280
|
exports.composeFallbackTypographyStyle = typography.composeFallbackTypographyStyle;
|
|
281
|
+
exports.composeFontFamilyTypographyV2 = typography.composeFontFamilyTypographyV2;
|
|
273
282
|
exports.composeTypography = typography.composeTypography;
|
|
274
283
|
exports.composeTypographyAttr = typography.composeTypographyAttr;
|
|
275
284
|
exports.composeTypographyClassName = typography.composeTypographyClassName;
|
|
@@ -278,14 +287,6 @@ exports.composeTypographyStyle = typography.composeTypographyStyle;
|
|
|
278
287
|
exports.composeTypographyV2 = typography.composeTypographyV2;
|
|
279
288
|
exports.composeTypographyV2Css = typography.composeTypographyV2Css;
|
|
280
289
|
exports.genTypoClass = typography.genTypoClass;
|
|
281
|
-
exports.validateEmail = email.validateEmail;
|
|
282
|
-
exports.loadScript = loadScript.loadScript;
|
|
283
|
-
exports.composeSpacing = spacing.composeSpacing;
|
|
284
|
-
exports.getSpacingVariable = spacing.getSpacingVariable;
|
|
285
|
-
exports.genVariable = cssVariable.genVariable;
|
|
286
|
-
exports.fpixel = fpixel;
|
|
287
|
-
exports.gtag = gtag;
|
|
288
|
-
exports.tiktokpixel = tiktokpixel;
|
|
289
290
|
exports.useAddToCart = useAddToCart.useAddToCart;
|
|
290
291
|
exports.useCartData = useCartData.useCartData;
|
|
291
292
|
exports.useCartDiscountCodesUpdate = useCartDiscountCodesUpdate.useCartDiscountCodesUpdate;
|
|
@@ -313,6 +314,7 @@ exports.useProductQuery = useProductQuery.useProductQuery;
|
|
|
313
314
|
exports.useProductsQuery = useProductsQuery.useProductsQuery;
|
|
314
315
|
exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
|
|
315
316
|
exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
|
|
317
|
+
exports.formatMoney = useFormatMoney.formatMoney;
|
|
316
318
|
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
317
319
|
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
318
320
|
exports.useLazyVideo = useLazyVideo.useLazyVideo;
|
|
@@ -117,7 +117,7 @@ const getGlobalColorStateStyle = (type, data)=>{
|
|
|
117
117
|
return Object.fromEntries(Object.entries(data).map(([state, value])=>{
|
|
118
118
|
if (state === 'active') return [];
|
|
119
119
|
return [
|
|
120
|
-
`-${stateMapping?.[state]}-${type}`,
|
|
120
|
+
`-${stateMapping?.[state] || ''}-${type}`,
|
|
121
121
|
getSingleColorVariable(value)
|
|
122
122
|
];
|
|
123
123
|
}).filter(isDefined));
|
|
@@ -25,7 +25,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
25
25
|
if (typeof value.distance == 'undefined') return {};
|
|
26
26
|
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
27
27
|
return {
|
|
28
|
-
[`-${!isActiveState ? stateMapping?.[state] : ''}-${getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
|
|
28
|
+
[`-${!isActiveState ? stateMapping?.[state] || '' : ''}-${getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
|
|
@@ -8,7 +8,9 @@ const composeTypographyCss = (typography)=>{
|
|
|
8
8
|
const typographyCustom = typography?.custom;
|
|
9
9
|
const { fontFamily, fontSize, fontStyle, fontWeight, lineHeight, letterSpacing } = typographyCustom?.desktop ?? {};
|
|
10
10
|
return `
|
|
11
|
-
${fontFamily ? `
|
|
11
|
+
${fontFamily ? `fontFamily: ${composeFontFamilyTypographyV2({
|
|
12
|
+
fontFamily
|
|
13
|
+
})};` : ''}
|
|
12
14
|
${fontSize ? `font-size: ${fontSize};` : ''}
|
|
13
15
|
${fontStyle ? `font-style: ${fontStyle};` : ''}
|
|
14
16
|
${fontWeight ? `font-weight: ${fontWeight};` : ''}
|
|
@@ -23,7 +25,9 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
23
25
|
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
24
26
|
const composeImportant = isImportant ? '!important' : '';
|
|
25
27
|
return `
|
|
26
|
-
${fontFamily ?
|
|
28
|
+
${fontFamily ? composeFontFamilyTypographyV2({
|
|
29
|
+
fontFamily
|
|
30
|
+
}) : ''}
|
|
27
31
|
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant};` : ''}
|
|
28
32
|
${bold ? `font-weight: bold ${composeImportant};` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant};` : ''}
|
|
29
33
|
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant};` : ''}
|
|
@@ -41,7 +45,9 @@ function getCustomCSSByDevice(typography, device) {
|
|
|
41
45
|
[`--size${suffix}`]: typography?.[device]?.fontSize,
|
|
42
46
|
[`--lh${suffix}`]: typography?.[device]?.lineHeight,
|
|
43
47
|
[`--fs${suffix}`]: typography?.[device]?.fontStyle,
|
|
44
|
-
[`--ff${suffix}`]:
|
|
48
|
+
[`--ff${suffix}`]: composeFontFamilyTypographyV2({
|
|
49
|
+
fontFamily
|
|
50
|
+
}),
|
|
45
51
|
[`--weight${suffix}`]: typography?.[device]?.fontWeight,
|
|
46
52
|
[`--ls${suffix}`]: typography?.[device]?.letterSpacing
|
|
47
53
|
};
|
|
@@ -59,7 +65,7 @@ const composeTypographyV2 = (value, attrs)=>{
|
|
|
59
65
|
return removeNullUndefined({
|
|
60
66
|
...makeStyle({
|
|
61
67
|
fs: !attrs?.italic ? value?.fontStyle : undefined,
|
|
62
|
-
ff:
|
|
68
|
+
ff: composeFontFamilyTypographyV2(value),
|
|
63
69
|
weight: !attrs?.bold ? value?.fontWeight : undefined,
|
|
64
70
|
ls: value?.letterSpacing
|
|
65
71
|
}),
|
|
@@ -67,6 +73,34 @@ const composeTypographyV2 = (value, attrs)=>{
|
|
|
67
73
|
...makeStyleResponsive('lh', value?.lineHeight)
|
|
68
74
|
});
|
|
69
75
|
};
|
|
76
|
+
const composeFontFamilyTypographyV2 = (value)=>{
|
|
77
|
+
const fontFamily = value?.fontFamily;
|
|
78
|
+
if (!fontFamily) return;
|
|
79
|
+
if (typeof fontFamily === 'string') {
|
|
80
|
+
return getFontUsedByTypographyV2({
|
|
81
|
+
fontFamily,
|
|
82
|
+
fallbackFontFamily: value?.fallbackFontFamily
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (typeof fontFamily === 'object' && typeof fontFamily?.value === 'string') {
|
|
86
|
+
switch(fontFamily.type){
|
|
87
|
+
case 'theme':
|
|
88
|
+
return `var(${fontFamily?.value}), var(--g-font-body)`;
|
|
89
|
+
default:
|
|
90
|
+
return getFontUsedByTypographyV2({
|
|
91
|
+
fontFamily: fontFamily.value,
|
|
92
|
+
fallbackFontFamily: value?.fallbackFontFamily
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return;
|
|
97
|
+
};
|
|
98
|
+
const getFontUsedByTypographyV2 = ({ fontFamily, fallbackFontFamily })=>{
|
|
99
|
+
if (fontFamily) {
|
|
100
|
+
return `var(--g-font-${fontFamily?.replace(/ /g, '-')}, '${fontFamily}'), ${fallbackFontFamily}`;
|
|
101
|
+
}
|
|
102
|
+
return;
|
|
103
|
+
};
|
|
70
104
|
const composeTypographyAttr = (attrs)=>{
|
|
71
105
|
if (!attrs) return {};
|
|
72
106
|
return removeNullUndefined({
|
|
@@ -113,4 +147,4 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
113
147
|
};
|
|
114
148
|
};
|
|
115
149
|
|
|
116
|
-
export { composeFallbackTypographyStyle, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
|
150
|
+
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
|
@@ -3,69 +3,69 @@ import { useMoneyFormat } from './shop.js';
|
|
|
3
3
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
4
4
|
return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
|
|
5
5
|
};
|
|
6
|
+
const formatMoney = function(cents, format) {
|
|
7
|
+
let value = '';
|
|
8
|
+
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
9
|
+
const formatString = format || '${{amount}}';
|
|
10
|
+
/**
|
|
11
|
+
* check default
|
|
12
|
+
* @param opt opt
|
|
13
|
+
* @param def def
|
|
14
|
+
* @returns any
|
|
15
|
+
*/ function defaultOption(opt, def) {
|
|
16
|
+
return typeof opt == 'undefined' ? def : opt;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* formatWithDelimiters
|
|
20
|
+
* @param number number
|
|
21
|
+
* @param precision precision
|
|
22
|
+
* @param thousands thousands
|
|
23
|
+
* @param decimal decimal
|
|
24
|
+
* @returns any
|
|
25
|
+
*/ // eslint-disable-next-line max-params
|
|
26
|
+
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
27
|
+
precision = defaultOption(precision, 2);
|
|
28
|
+
thousands = defaultOption(thousands, ',');
|
|
29
|
+
decimal = defaultOption(decimal, '.');
|
|
30
|
+
if (isNaN(number) || number == null) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
34
|
+
number = shopifyPriceRounding(number, Number(precision));
|
|
35
|
+
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
36
|
+
return dollars + cents;
|
|
37
|
+
}
|
|
38
|
+
switch(formatString.match(placeholderRegex)[1]){
|
|
39
|
+
case 'amount':
|
|
40
|
+
value = formatWithDelimiters(cents, 2);
|
|
41
|
+
break;
|
|
42
|
+
case 'amount_no_decimals':
|
|
43
|
+
value = formatWithDelimiters(cents, 0);
|
|
44
|
+
break;
|
|
45
|
+
case 'amount_with_comma_separator':
|
|
46
|
+
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
47
|
+
break;
|
|
48
|
+
case 'amount_no_decimals_with_comma_separator':
|
|
49
|
+
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
50
|
+
break;
|
|
51
|
+
case 'amount_with_apostrophe_separator':
|
|
52
|
+
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
53
|
+
break;
|
|
54
|
+
case 'amount_no_decimals_with_space_separator':
|
|
55
|
+
value = formatWithDelimiters(cents, 0, ' ');
|
|
56
|
+
break;
|
|
57
|
+
case 'amount_with_space_separator':
|
|
58
|
+
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
59
|
+
break;
|
|
60
|
+
case 'amount_with_period_and_space_separator':
|
|
61
|
+
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
return formatString.replace(placeholderRegex, value);
|
|
65
|
+
};
|
|
6
66
|
const useFormatMoney = (amount, withCurrency)=>{
|
|
7
67
|
const { moneyFormat, moneyWithCurrencyFormat } = useMoneyFormat();
|
|
8
|
-
const formatMoney = function(cents, format) {
|
|
9
|
-
let value = '';
|
|
10
|
-
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
11
|
-
const formatString = format || '${{amount}}';
|
|
12
|
-
/**
|
|
13
|
-
* check default
|
|
14
|
-
* @param opt opt
|
|
15
|
-
* @param def def
|
|
16
|
-
* @returns any
|
|
17
|
-
*/ function defaultOption(opt, def) {
|
|
18
|
-
return typeof opt == 'undefined' ? def : opt;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* formatWithDelimiters
|
|
22
|
-
* @param number number
|
|
23
|
-
* @param precision precision
|
|
24
|
-
* @param thousands thousands
|
|
25
|
-
* @param decimal decimal
|
|
26
|
-
* @returns any
|
|
27
|
-
*/ // eslint-disable-next-line max-params
|
|
28
|
-
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
29
|
-
precision = defaultOption(precision, 2);
|
|
30
|
-
thousands = defaultOption(thousands, ',');
|
|
31
|
-
decimal = defaultOption(decimal, '.');
|
|
32
|
-
if (isNaN(number) || number == null) {
|
|
33
|
-
return 0;
|
|
34
|
-
}
|
|
35
|
-
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
36
|
-
number = shopifyPriceRounding(number, Number(precision));
|
|
37
|
-
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
38
|
-
return dollars + cents;
|
|
39
|
-
}
|
|
40
|
-
switch(formatString.match(placeholderRegex)[1]){
|
|
41
|
-
case 'amount':
|
|
42
|
-
value = formatWithDelimiters(cents, 2);
|
|
43
|
-
break;
|
|
44
|
-
case 'amount_no_decimals':
|
|
45
|
-
value = formatWithDelimiters(cents, 0);
|
|
46
|
-
break;
|
|
47
|
-
case 'amount_with_comma_separator':
|
|
48
|
-
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
49
|
-
break;
|
|
50
|
-
case 'amount_no_decimals_with_comma_separator':
|
|
51
|
-
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
52
|
-
break;
|
|
53
|
-
case 'amount_with_apostrophe_separator':
|
|
54
|
-
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
55
|
-
break;
|
|
56
|
-
case 'amount_no_decimals_with_space_separator':
|
|
57
|
-
value = formatWithDelimiters(cents, 0, ' ');
|
|
58
|
-
break;
|
|
59
|
-
case 'amount_with_space_separator':
|
|
60
|
-
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
61
|
-
break;
|
|
62
|
-
case 'amount_with_period_and_space_separator':
|
|
63
|
-
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
return formatString.replace(placeholderRegex, value);
|
|
67
|
-
};
|
|
68
68
|
return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
export { shopifyPriceRounding, useFormatMoney };
|
|
71
|
+
export { formatMoney, shopifyPriceRounding, useFormatMoney };
|
package/dist/esm/index.js
CHANGED
|
@@ -42,6 +42,16 @@ export { isEmptyChildren } from './helpers/is-empty-children.js';
|
|
|
42
42
|
export { default as isSafari } from './helpers/is-safari.js';
|
|
43
43
|
export { normalizeBuilderData } from './helpers/normalize-builder-data.js';
|
|
44
44
|
export { prefetchQueries } from './helpers/prefetch-queries.js';
|
|
45
|
+
export { validateEmail } from './helpers/email.js';
|
|
46
|
+
export { loadScript } from './helpers/load-script.js';
|
|
47
|
+
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
48
|
+
export { genVariable } from './helpers/css-variable.js';
|
|
49
|
+
import * as fpixel from './helpers/tracking/fpixel.js';
|
|
50
|
+
export { fpixel };
|
|
51
|
+
import * as gtag from './helpers/tracking/gtag.js';
|
|
52
|
+
export { gtag };
|
|
53
|
+
import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
54
|
+
export { tiktokpixel };
|
|
45
55
|
export { GRADIENT_BGR_KEY, composeBackgroundCss, getBgImageByDevice, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
46
56
|
export { composeTextColorCss, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getSingleColorVariable, isColor } from './helpers/colors.js';
|
|
47
57
|
export { composeAdvanceStyle, composeAdvanceStyleForPostPurchase, filterAttrInStyle, filterCornerInStyle, removeAttrInStyle, removePaddingYInStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
@@ -58,17 +68,7 @@ export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSF
|
|
|
58
68
|
export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromObject, styles, template } from './helpers/render.js';
|
|
59
69
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
60
70
|
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
|
|
61
|
-
export { composeFallbackTypographyStyle, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
62
|
-
export { validateEmail } from './helpers/email.js';
|
|
63
|
-
export { loadScript } from './helpers/load-script.js';
|
|
64
|
-
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
65
|
-
export { genVariable } from './helpers/css-variable.js';
|
|
66
|
-
import * as fpixel from './helpers/tracking/fpixel.js';
|
|
67
|
-
export { fpixel };
|
|
68
|
-
import * as gtag from './helpers/tracking/gtag.js';
|
|
69
|
-
export { gtag };
|
|
70
|
-
import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
71
|
-
export { tiktokpixel };
|
|
71
|
+
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
72
72
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
|
73
73
|
export { useCartData } from './hooks/cart/use-cart-data.js';
|
|
74
74
|
export { useCartDiscountCodesUpdate } from './hooks/cart/use-cart-discount-codes-update.js';
|
|
@@ -82,7 +82,7 @@ export { useCollectionsQuery } from './hooks/shop/use-collections-query.js';
|
|
|
82
82
|
export { useProductQuery } from './hooks/shop/use-product-query.js';
|
|
83
83
|
export { useProductsQuery, useProductsQueryAll } from './hooks/shop/use-products-query.js';
|
|
84
84
|
export { useCurrentDevice } from './hooks/use-current-device.js';
|
|
85
|
-
export { shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
|
|
85
|
+
export { formatMoney, shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
|
|
86
86
|
export { useLazyVideo } from './hooks/use-lazy-video.js';
|
|
87
87
|
export { default as useCartId } from './hooks/useCartId.js';
|
|
88
88
|
export { default as useCartLine } from './hooks/useCartLine.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7121,6 +7121,8 @@ type TextareaControlType<T> = SharedControlType<T> & {
|
|
|
7121
7121
|
minHeight?: number;
|
|
7122
7122
|
maxWidth?: number;
|
|
7123
7123
|
autoHeight?: boolean;
|
|
7124
|
+
defaultRows?: number;
|
|
7125
|
+
showPlusBtn?: boolean;
|
|
7124
7126
|
suggestContents?: {
|
|
7125
7127
|
message: string;
|
|
7126
7128
|
eg?: string;
|
|
@@ -7172,6 +7174,7 @@ type BehaviorStateControlType<T> = {
|
|
|
7172
7174
|
type BoxShadowControlType<T> = SharedControlType<T> & {
|
|
7173
7175
|
id?: string;
|
|
7174
7176
|
type: 'boxShadow';
|
|
7177
|
+
hideOptions?: string[];
|
|
7175
7178
|
popup?: boolean;
|
|
7176
7179
|
};
|
|
7177
7180
|
|
|
@@ -27031,6 +27034,13 @@ declare namespace appAPI {
|
|
|
27031
27034
|
};
|
|
27032
27035
|
}
|
|
27033
27036
|
|
|
27037
|
+
type NameDevices = 'desktop' | 'tablet' | 'mobile';
|
|
27038
|
+
type TypographyV2Family = string | {
|
|
27039
|
+
value: string;
|
|
27040
|
+
type: TypographyV2FontFamilyType;
|
|
27041
|
+
};
|
|
27042
|
+
type TypographyV2FontFamilyType = 'google' | 'custom' | 'theme';
|
|
27043
|
+
|
|
27034
27044
|
/**
|
|
27035
27045
|
* @deprecated Please use `TypographySettingV2`
|
|
27036
27046
|
*/
|
|
@@ -27056,7 +27066,7 @@ type TypographyProps = {
|
|
|
27056
27066
|
fontSize?: string;
|
|
27057
27067
|
fontWeight?: string | number;
|
|
27058
27068
|
fontStyle?: string;
|
|
27059
|
-
fontFamily?:
|
|
27069
|
+
fontFamily?: TypographyV2Family;
|
|
27060
27070
|
lineHeight?: string;
|
|
27061
27071
|
letterSpacing?: string;
|
|
27062
27072
|
fallbackFontFamily?: string;
|
|
@@ -27130,6 +27140,9 @@ type GlobalStyleResponsiveConfig = {
|
|
|
27130
27140
|
spacing?: Partial<Record<SpacingType, ObjectDeviceGlobalType<string>>>;
|
|
27131
27141
|
container?: Partial<Record<ContainerProp, ObjectDeviceGlobalType<string>>>;
|
|
27132
27142
|
radius?: Partial<Record<RoundedSize, string>>;
|
|
27143
|
+
theme?: {
|
|
27144
|
+
font?: Partial<Record<FontName, any>>;
|
|
27145
|
+
};
|
|
27133
27146
|
};
|
|
27134
27147
|
type GlobalStyleConfig = {
|
|
27135
27148
|
color?: Partial<Record<ColorType$1, string>>;
|
|
@@ -27138,6 +27151,9 @@ type GlobalStyleConfig = {
|
|
|
27138
27151
|
spacing?: Partial<Record<SpacingType, string>>;
|
|
27139
27152
|
container?: Partial<Record<ContainerProp, string>>;
|
|
27140
27153
|
radius?: Partial<Record<RoundedSize, string>>;
|
|
27154
|
+
theme?: {
|
|
27155
|
+
font?: Partial<Record<FontName, any>>;
|
|
27156
|
+
};
|
|
27141
27157
|
};
|
|
27142
27158
|
type ShadowStyleApplied = 'text-shadow' | 'box-shadow';
|
|
27143
27159
|
type ShadowType = 'shadow-1' | 'shadow-2' | 'shadow-3';
|
|
@@ -28037,6 +28053,72 @@ declare const prefetchQueries: (input: BuilderState, options?: {
|
|
|
28037
28053
|
isStorefront?: boolean;
|
|
28038
28054
|
}) => Result[];
|
|
28039
28055
|
|
|
28056
|
+
declare const validateEmail: (email: string) => boolean;
|
|
28057
|
+
|
|
28058
|
+
declare function loadScript(src: string, options?: {
|
|
28059
|
+
module?: boolean;
|
|
28060
|
+
in?: 'head' | 'body';
|
|
28061
|
+
}): Promise<boolean>;
|
|
28062
|
+
|
|
28063
|
+
declare function getSpacingVariable(key?: SpacingType): string;
|
|
28064
|
+
declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
|
|
28065
|
+
|
|
28066
|
+
declare const genVariable: (variableName: string) => string;
|
|
28067
|
+
|
|
28068
|
+
declare const pageview$1: () => void;
|
|
28069
|
+
declare const event: (name: string, options?: {}) => void;
|
|
28070
|
+
declare const addToCart$2: (product: ProductInputAnalytic) => void;
|
|
28071
|
+
|
|
28072
|
+
declare const fpixel_event: typeof event;
|
|
28073
|
+
declare namespace fpixel {
|
|
28074
|
+
export {
|
|
28075
|
+
addToCart$2 as addToCart,
|
|
28076
|
+
fpixel_event as event,
|
|
28077
|
+
pageview$1 as pageview,
|
|
28078
|
+
};
|
|
28079
|
+
}
|
|
28080
|
+
|
|
28081
|
+
declare const pageview: (url: string, trackingId?: string | null) => void;
|
|
28082
|
+
/** Addition to cart events
|
|
28083
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
28084
|
+
*/
|
|
28085
|
+
declare const addToCart$1: (product: ProductInputAnalytic) => void;
|
|
28086
|
+
/** Product clicked event
|
|
28087
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
|
|
28088
|
+
*/
|
|
28089
|
+
declare const productClick: (product: ProductInputAnalytic) => void;
|
|
28090
|
+
/** Product viewed event
|
|
28091
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
|
|
28092
|
+
*/
|
|
28093
|
+
declare const productDetail: (product: ProductInputAnalytic) => void;
|
|
28094
|
+
/** Removal from cart events
|
|
28095
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
28096
|
+
*/
|
|
28097
|
+
declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
|
|
28098
|
+
|
|
28099
|
+
declare const gtag_pageview: typeof pageview;
|
|
28100
|
+
declare const gtag_productClick: typeof productClick;
|
|
28101
|
+
declare const gtag_productDetail: typeof productDetail;
|
|
28102
|
+
declare const gtag_removeFromCart: typeof removeFromCart;
|
|
28103
|
+
declare namespace gtag {
|
|
28104
|
+
export {
|
|
28105
|
+
addToCart$1 as addToCart,
|
|
28106
|
+
gtag_pageview as pageview,
|
|
28107
|
+
gtag_productClick as productClick,
|
|
28108
|
+
gtag_productDetail as productDetail,
|
|
28109
|
+
gtag_removeFromCart as removeFromCart,
|
|
28110
|
+
};
|
|
28111
|
+
}
|
|
28112
|
+
|
|
28113
|
+
declare const addToCart: (product: ProductInputAnalytic) => void;
|
|
28114
|
+
|
|
28115
|
+
declare const tiktokpixel_addToCart: typeof addToCart;
|
|
28116
|
+
declare namespace tiktokpixel {
|
|
28117
|
+
export {
|
|
28118
|
+
tiktokpixel_addToCart as addToCart,
|
|
28119
|
+
};
|
|
28120
|
+
}
|
|
28121
|
+
|
|
28040
28122
|
type Devices = 'desktop' | 'tablet' | 'mobile';
|
|
28041
28123
|
type Options = {
|
|
28042
28124
|
liquid?: boolean;
|
|
@@ -34065,8 +34147,6 @@ declare const baseAssetURL: string;
|
|
|
34065
34147
|
|
|
34066
34148
|
declare const convertHTML: (str: string) => string;
|
|
34067
34149
|
|
|
34068
|
-
type NameDevices = 'desktop' | 'tablet' | 'mobile';
|
|
34069
|
-
|
|
34070
34150
|
type PostionType = {
|
|
34071
34151
|
wrapper?: Record<string, string | number>;
|
|
34072
34152
|
content?: Record<string, string | number>;
|
|
@@ -34221,6 +34301,7 @@ declare const composeTypographyCss: (typography: TypographySetting | undefined)
|
|
|
34221
34301
|
declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
|
|
34222
34302
|
declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
|
|
34223
34303
|
declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
34304
|
+
declare const composeFontFamilyTypographyV2: (value?: TypographyV2Props) => string | undefined;
|
|
34224
34305
|
declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
|
|
34225
34306
|
declare const composeTypographyClassName: (typo?: TypographySettingV2, typography?: TypographySetting) => "" | "gp-g-heading-1" | "gp-g-heading-2" | "gp-g-heading-3" | "gp-g-subheading-1" | "gp-g-subheading-2" | "gp-g-subheading-3" | "gp-g-paragraph-1" | "gp-g-paragraph-2" | "gp-g-paragraph-3" | undefined;
|
|
34226
34307
|
declare const composeFallbackTypographyStyle: (tag: string) => "var(--g-font-heading, heading)" | "var(--g-font-body, body)";
|
|
@@ -35720,72 +35801,6 @@ declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?:
|
|
|
35720
35801
|
vectorEffect?: csstype.Property.VectorEffect | undefined;
|
|
35721
35802
|
};
|
|
35722
35803
|
|
|
35723
|
-
declare const validateEmail: (email: string) => boolean;
|
|
35724
|
-
|
|
35725
|
-
declare function loadScript(src: string, options?: {
|
|
35726
|
-
module?: boolean;
|
|
35727
|
-
in?: 'head' | 'body';
|
|
35728
|
-
}): Promise<boolean>;
|
|
35729
|
-
|
|
35730
|
-
declare function getSpacingVariable(key?: SpacingType): string;
|
|
35731
|
-
declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
|
|
35732
|
-
|
|
35733
|
-
declare const genVariable: (variableName: string) => string;
|
|
35734
|
-
|
|
35735
|
-
declare const pageview$1: () => void;
|
|
35736
|
-
declare const event: (name: string, options?: {}) => void;
|
|
35737
|
-
declare const addToCart$2: (product: ProductInputAnalytic) => void;
|
|
35738
|
-
|
|
35739
|
-
declare const fpixel_event: typeof event;
|
|
35740
|
-
declare namespace fpixel {
|
|
35741
|
-
export {
|
|
35742
|
-
addToCart$2 as addToCart,
|
|
35743
|
-
fpixel_event as event,
|
|
35744
|
-
pageview$1 as pageview,
|
|
35745
|
-
};
|
|
35746
|
-
}
|
|
35747
|
-
|
|
35748
|
-
declare const pageview: (url: string, trackingId?: string | null) => void;
|
|
35749
|
-
/** Addition to cart events
|
|
35750
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
35751
|
-
*/
|
|
35752
|
-
declare const addToCart$1: (product: ProductInputAnalytic) => void;
|
|
35753
|
-
/** Product clicked event
|
|
35754
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
|
|
35755
|
-
*/
|
|
35756
|
-
declare const productClick: (product: ProductInputAnalytic) => void;
|
|
35757
|
-
/** Product viewed event
|
|
35758
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
|
|
35759
|
-
*/
|
|
35760
|
-
declare const productDetail: (product: ProductInputAnalytic) => void;
|
|
35761
|
-
/** Removal from cart events
|
|
35762
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
35763
|
-
*/
|
|
35764
|
-
declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
|
|
35765
|
-
|
|
35766
|
-
declare const gtag_pageview: typeof pageview;
|
|
35767
|
-
declare const gtag_productClick: typeof productClick;
|
|
35768
|
-
declare const gtag_productDetail: typeof productDetail;
|
|
35769
|
-
declare const gtag_removeFromCart: typeof removeFromCart;
|
|
35770
|
-
declare namespace gtag {
|
|
35771
|
-
export {
|
|
35772
|
-
addToCart$1 as addToCart,
|
|
35773
|
-
gtag_pageview as pageview,
|
|
35774
|
-
gtag_productClick as productClick,
|
|
35775
|
-
gtag_productDetail as productDetail,
|
|
35776
|
-
gtag_removeFromCart as removeFromCart,
|
|
35777
|
-
};
|
|
35778
|
-
}
|
|
35779
|
-
|
|
35780
|
-
declare const addToCart: (product: ProductInputAnalytic) => void;
|
|
35781
|
-
|
|
35782
|
-
declare const tiktokpixel_addToCart: typeof addToCart;
|
|
35783
|
-
declare namespace tiktokpixel {
|
|
35784
|
-
export {
|
|
35785
|
-
tiktokpixel_addToCart as addToCart,
|
|
35786
|
-
};
|
|
35787
|
-
}
|
|
35788
|
-
|
|
35789
35804
|
type Func$6 = ReturnType<typeof addToCartOperation>;
|
|
35790
35805
|
type Response$6 = Awaited<ReturnType<Func$6>>;
|
|
35791
35806
|
type Args$5 = Parameters<Func$6>[0];
|
|
@@ -35874,6 +35889,7 @@ declare const useProductsQueryAll: (variable?: VariableRelatedStyles | undefined
|
|
|
35874
35889
|
declare const useCurrentDevice: () => NameDevices$1;
|
|
35875
35890
|
|
|
35876
35891
|
declare const shopifyPriceRounding: (amount: number | string, precision?: number) => string;
|
|
35892
|
+
declare const formatMoney: (cents: string, format: any) => string;
|
|
35877
35893
|
declare const useFormatMoney: (amount: number, withCurrency: boolean) => string;
|
|
35878
35894
|
|
|
35879
35895
|
declare const useLazyVideo: () => void;
|
|
@@ -36090,4 +36106,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage$1, 'id' | 'name'
|
|
|
36090
36106
|
|
|
36091
36107
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
36092
36108
|
|
|
36093
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
36109
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, 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.43.0-dev.
|
|
3
|
+
"version": "1.43.0-dev.80",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type-check": "yarn tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/adapter-shopify": "1.43.0-dev.
|
|
31
|
-
"@gem-sdk/styles": "1.43.0-dev.
|
|
30
|
+
"@gem-sdk/adapter-shopify": "1.43.0-dev.80",
|
|
31
|
+
"@gem-sdk/styles": "1.43.0-dev.80",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|