@gem-sdk/core 1.42.3-staging.0 → 1.42.7
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/index.js +15 -15
- package/dist/esm/index.js +10 -10
- package/dist/types/index.d.ts +66 -66
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -42,6 +42,13 @@ var isEmptyChildren = require('./helpers/is-empty-children.js');
|
|
|
42
42
|
var isSafari = require('./helpers/is-safari.js');
|
|
43
43
|
var normalizeBuilderData = require('./helpers/normalize-builder-data.js');
|
|
44
44
|
var prefetchQueries = require('./helpers/prefetch-queries.js');
|
|
45
|
+
var email = require('./helpers/email.js');
|
|
46
|
+
var loadScript = require('./helpers/load-script.js');
|
|
47
|
+
var spacing = require('./helpers/spacing.js');
|
|
48
|
+
var cssVariable = require('./helpers/css-variable.js');
|
|
49
|
+
var fpixel = require('./helpers/tracking/fpixel.js');
|
|
50
|
+
var gtag = require('./helpers/tracking/gtag.js');
|
|
51
|
+
var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
|
|
45
52
|
var background = require('./helpers/background.js');
|
|
46
53
|
var colors = require('./helpers/colors.js');
|
|
47
54
|
var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
|
|
@@ -58,13 +65,6 @@ var render = require('./helpers/render.js');
|
|
|
58
65
|
var shadow = require('./helpers/shadow.js');
|
|
59
66
|
var size = require('./helpers/size.js');
|
|
60
67
|
var typography = require('./helpers/typography.js');
|
|
61
|
-
var email = require('./helpers/email.js');
|
|
62
|
-
var loadScript = require('./helpers/load-script.js');
|
|
63
|
-
var spacing = require('./helpers/spacing.js');
|
|
64
|
-
var cssVariable = require('./helpers/css-variable.js');
|
|
65
|
-
var fpixel = require('./helpers/tracking/fpixel.js');
|
|
66
|
-
var gtag = require('./helpers/tracking/gtag.js');
|
|
67
|
-
var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
|
|
68
68
|
var useAddToCart = require('./hooks/cart/use-add-to-cart.js');
|
|
69
69
|
var useCartData = require('./hooks/cart/use-cart-data.js');
|
|
70
70
|
var useCartDiscountCodesUpdate = require('./hooks/cart/use-cart-discount-codes-update.js');
|
|
@@ -173,6 +173,14 @@ exports.isEmptyChildren = isEmptyChildren.isEmptyChildren;
|
|
|
173
173
|
exports.isSafari = isSafari.default;
|
|
174
174
|
exports.normalizeBuilderData = normalizeBuilderData.normalizeBuilderData;
|
|
175
175
|
exports.prefetchQueries = prefetchQueries.prefetchQueries;
|
|
176
|
+
exports.validateEmail = email.validateEmail;
|
|
177
|
+
exports.loadScript = loadScript.loadScript;
|
|
178
|
+
exports.composeSpacing = spacing.composeSpacing;
|
|
179
|
+
exports.getSpacingVariable = spacing.getSpacingVariable;
|
|
180
|
+
exports.genVariable = cssVariable.genVariable;
|
|
181
|
+
exports.fpixel = fpixel;
|
|
182
|
+
exports.gtag = gtag;
|
|
183
|
+
exports.tiktokpixel = tiktokpixel;
|
|
176
184
|
exports.GRADIENT_BGR_KEY = background.GRADIENT_BGR_KEY;
|
|
177
185
|
exports.composeBackgroundCss = background.composeBackgroundCss;
|
|
178
186
|
exports.getBgImageByDevice = background.getBgImageByDevice;
|
|
@@ -269,14 +277,6 @@ exports.composeTypographyStyle = typography.composeTypographyStyle;
|
|
|
269
277
|
exports.composeTypographyV2 = typography.composeTypographyV2;
|
|
270
278
|
exports.composeTypographyV2Css = typography.composeTypographyV2Css;
|
|
271
279
|
exports.genTypoClass = typography.genTypoClass;
|
|
272
|
-
exports.validateEmail = email.validateEmail;
|
|
273
|
-
exports.loadScript = loadScript.loadScript;
|
|
274
|
-
exports.composeSpacing = spacing.composeSpacing;
|
|
275
|
-
exports.getSpacingVariable = spacing.getSpacingVariable;
|
|
276
|
-
exports.genVariable = cssVariable.genVariable;
|
|
277
|
-
exports.fpixel = fpixel;
|
|
278
|
-
exports.gtag = gtag;
|
|
279
|
-
exports.tiktokpixel = tiktokpixel;
|
|
280
280
|
exports.useAddToCart = useAddToCart.useAddToCart;
|
|
281
281
|
exports.useCartData = useCartData.useCartData;
|
|
282
282
|
exports.useCartDiscountCodesUpdate = useCartDiscountCodesUpdate.useCartDiscountCodesUpdate;
|
package/dist/esm/index.js
CHANGED
|
@@ -40,6 +40,16 @@ export { isEmptyChildren } from './helpers/is-empty-children.js';
|
|
|
40
40
|
export { default as isSafari } from './helpers/is-safari.js';
|
|
41
41
|
export { normalizeBuilderData } from './helpers/normalize-builder-data.js';
|
|
42
42
|
export { prefetchQueries } from './helpers/prefetch-queries.js';
|
|
43
|
+
export { validateEmail } from './helpers/email.js';
|
|
44
|
+
export { loadScript } from './helpers/load-script.js';
|
|
45
|
+
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
46
|
+
export { genVariable } from './helpers/css-variable.js';
|
|
47
|
+
import * as fpixel from './helpers/tracking/fpixel.js';
|
|
48
|
+
export { fpixel };
|
|
49
|
+
import * as gtag from './helpers/tracking/gtag.js';
|
|
50
|
+
export { gtag };
|
|
51
|
+
import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
52
|
+
export { tiktokpixel };
|
|
43
53
|
export { GRADIENT_BGR_KEY, composeBackgroundCss, getBgImageByDevice, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getStyleBackgroundByDevice, makeFixedBgAttachment } from './helpers/background.js';
|
|
44
54
|
export { composeTextColorCss, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getSingleColorVariable, isColor } from './helpers/colors.js';
|
|
45
55
|
export { composeAdvanceStyle, composeAdvanceStyleForPostPurchase, filterAttrInStyle, filterCornerInStyle, removeAttrInStyle, removePaddingYInStyle, splitStyle } from './helpers/compose-advance-style.js';
|
|
@@ -56,16 +66,6 @@ export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromO
|
|
|
56
66
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
57
67
|
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
|
|
58
68
|
export { composeFallbackTypographyStyle, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
59
|
-
export { validateEmail } from './helpers/email.js';
|
|
60
|
-
export { loadScript } from './helpers/load-script.js';
|
|
61
|
-
export { composeSpacing, getSpacingVariable } from './helpers/spacing.js';
|
|
62
|
-
export { genVariable } from './helpers/css-variable.js';
|
|
63
|
-
import * as fpixel from './helpers/tracking/fpixel.js';
|
|
64
|
-
export { fpixel };
|
|
65
|
-
import * as gtag from './helpers/tracking/gtag.js';
|
|
66
|
-
export { gtag };
|
|
67
|
-
import * as tiktokpixel from './helpers/tracking/tiktokpixel.js';
|
|
68
|
-
export { tiktokpixel };
|
|
69
69
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
|
70
70
|
export { useCartData } from './hooks/cart/use-cart-data.js';
|
|
71
71
|
export { useCartDiscountCodesUpdate } from './hooks/cart/use-cart-discount-codes-update.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -27956,6 +27956,72 @@ declare const prefetchQueries: (input: BuilderState, options?: {
|
|
|
27956
27956
|
isStorefront?: boolean;
|
|
27957
27957
|
}) => Result[];
|
|
27958
27958
|
|
|
27959
|
+
declare const validateEmail: (email: string) => boolean;
|
|
27960
|
+
|
|
27961
|
+
declare function loadScript(src: string, options?: {
|
|
27962
|
+
module?: boolean;
|
|
27963
|
+
in?: 'head' | 'body';
|
|
27964
|
+
}): Promise<boolean>;
|
|
27965
|
+
|
|
27966
|
+
declare function getSpacingVariable(key?: SpacingType): string;
|
|
27967
|
+
declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
|
|
27968
|
+
|
|
27969
|
+
declare const genVariable: (variableName: string) => string;
|
|
27970
|
+
|
|
27971
|
+
declare const pageview$1: () => void;
|
|
27972
|
+
declare const event: (name: string, options?: {}) => void;
|
|
27973
|
+
declare const addToCart$2: (product: ProductInputAnalytic) => void;
|
|
27974
|
+
|
|
27975
|
+
declare const fpixel_event: typeof event;
|
|
27976
|
+
declare namespace fpixel {
|
|
27977
|
+
export {
|
|
27978
|
+
addToCart$2 as addToCart,
|
|
27979
|
+
fpixel_event as event,
|
|
27980
|
+
pageview$1 as pageview,
|
|
27981
|
+
};
|
|
27982
|
+
}
|
|
27983
|
+
|
|
27984
|
+
declare const pageview: (url: string, trackingId?: string | null) => void;
|
|
27985
|
+
/** Addition to cart events
|
|
27986
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
27987
|
+
*/
|
|
27988
|
+
declare const addToCart$1: (product: ProductInputAnalytic) => void;
|
|
27989
|
+
/** Product clicked event
|
|
27990
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
|
|
27991
|
+
*/
|
|
27992
|
+
declare const productClick: (product: ProductInputAnalytic) => void;
|
|
27993
|
+
/** Product viewed event
|
|
27994
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
|
|
27995
|
+
*/
|
|
27996
|
+
declare const productDetail: (product: ProductInputAnalytic) => void;
|
|
27997
|
+
/** Removal from cart events
|
|
27998
|
+
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
27999
|
+
*/
|
|
28000
|
+
declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
|
|
28001
|
+
|
|
28002
|
+
declare const gtag_pageview: typeof pageview;
|
|
28003
|
+
declare const gtag_productClick: typeof productClick;
|
|
28004
|
+
declare const gtag_productDetail: typeof productDetail;
|
|
28005
|
+
declare const gtag_removeFromCart: typeof removeFromCart;
|
|
28006
|
+
declare namespace gtag {
|
|
28007
|
+
export {
|
|
28008
|
+
addToCart$1 as addToCart,
|
|
28009
|
+
gtag_pageview as pageview,
|
|
28010
|
+
gtag_productClick as productClick,
|
|
28011
|
+
gtag_productDetail as productDetail,
|
|
28012
|
+
gtag_removeFromCart as removeFromCart,
|
|
28013
|
+
};
|
|
28014
|
+
}
|
|
28015
|
+
|
|
28016
|
+
declare const addToCart: (product: ProductInputAnalytic) => void;
|
|
28017
|
+
|
|
28018
|
+
declare const tiktokpixel_addToCart: typeof addToCart;
|
|
28019
|
+
declare namespace tiktokpixel {
|
|
28020
|
+
export {
|
|
28021
|
+
tiktokpixel_addToCart as addToCart,
|
|
28022
|
+
};
|
|
28023
|
+
}
|
|
28024
|
+
|
|
27959
28025
|
type Devices = 'desktop' | 'tablet' | 'mobile';
|
|
27960
28026
|
type Options = {
|
|
27961
28027
|
liquid?: boolean;
|
|
@@ -35637,72 +35703,6 @@ declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?:
|
|
|
35637
35703
|
vectorEffect?: csstype.Property.VectorEffect | undefined;
|
|
35638
35704
|
};
|
|
35639
35705
|
|
|
35640
|
-
declare const validateEmail: (email: string) => boolean;
|
|
35641
|
-
|
|
35642
|
-
declare function loadScript(src: string, options?: {
|
|
35643
|
-
module?: boolean;
|
|
35644
|
-
in?: 'head' | 'body';
|
|
35645
|
-
}): Promise<boolean>;
|
|
35646
|
-
|
|
35647
|
-
declare function getSpacingVariable(key?: SpacingType): string;
|
|
35648
|
-
declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
|
|
35649
|
-
|
|
35650
|
-
declare const genVariable: (variableName: string) => string;
|
|
35651
|
-
|
|
35652
|
-
declare const pageview$1: () => void;
|
|
35653
|
-
declare const event: (name: string, options?: {}) => void;
|
|
35654
|
-
declare const addToCart$2: (product: ProductInputAnalytic) => void;
|
|
35655
|
-
|
|
35656
|
-
declare const fpixel_event: typeof event;
|
|
35657
|
-
declare namespace fpixel {
|
|
35658
|
-
export {
|
|
35659
|
-
addToCart$2 as addToCart,
|
|
35660
|
-
fpixel_event as event,
|
|
35661
|
-
pageview$1 as pageview,
|
|
35662
|
-
};
|
|
35663
|
-
}
|
|
35664
|
-
|
|
35665
|
-
declare const pageview: (url: string, trackingId?: string | null) => void;
|
|
35666
|
-
/** Addition to cart events
|
|
35667
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
35668
|
-
*/
|
|
35669
|
-
declare const addToCart$1: (product: ProductInputAnalytic) => void;
|
|
35670
|
-
/** Product clicked event
|
|
35671
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
|
|
35672
|
-
*/
|
|
35673
|
-
declare const productClick: (product: ProductInputAnalytic) => void;
|
|
35674
|
-
/** Product viewed event
|
|
35675
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
|
|
35676
|
-
*/
|
|
35677
|
-
declare const productDetail: (product: ProductInputAnalytic) => void;
|
|
35678
|
-
/** Removal from cart events
|
|
35679
|
-
* https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
|
|
35680
|
-
*/
|
|
35681
|
-
declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
|
|
35682
|
-
|
|
35683
|
-
declare const gtag_pageview: typeof pageview;
|
|
35684
|
-
declare const gtag_productClick: typeof productClick;
|
|
35685
|
-
declare const gtag_productDetail: typeof productDetail;
|
|
35686
|
-
declare const gtag_removeFromCart: typeof removeFromCart;
|
|
35687
|
-
declare namespace gtag {
|
|
35688
|
-
export {
|
|
35689
|
-
addToCart$1 as addToCart,
|
|
35690
|
-
gtag_pageview as pageview,
|
|
35691
|
-
gtag_productClick as productClick,
|
|
35692
|
-
gtag_productDetail as productDetail,
|
|
35693
|
-
gtag_removeFromCart as removeFromCart,
|
|
35694
|
-
};
|
|
35695
|
-
}
|
|
35696
|
-
|
|
35697
|
-
declare const addToCart: (product: ProductInputAnalytic) => void;
|
|
35698
|
-
|
|
35699
|
-
declare const tiktokpixel_addToCart: typeof addToCart;
|
|
35700
|
-
declare namespace tiktokpixel {
|
|
35701
|
-
export {
|
|
35702
|
-
tiktokpixel_addToCart as addToCart,
|
|
35703
|
-
};
|
|
35704
|
-
}
|
|
35705
|
-
|
|
35706
35706
|
type Func$6 = ReturnType<typeof addToCartOperation>;
|
|
35707
35707
|
type Response$6 = Awaited<ReturnType<Func$6>>;
|
|
35708
35708
|
type Args$5 = Parameters<Func$6>[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.7",
|
|
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.
|
|
31
|
-
"@gem-sdk/styles": "1.
|
|
30
|
+
"@gem-sdk/adapter-shopify": "1.40.0",
|
|
31
|
+
"@gem-sdk/styles": "1.41.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"react-error-boundary": "4.0.10",
|