@gem-sdk/pages 1.57.15-staging.0 → 1.58.0-dev.13
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/FacebookPixel.js +6 -9
- package/dist/cjs/components/GoogleAnalytic.js +8 -10
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/cjs/pages/builder.js +13 -22
- package/dist/cjs/pages/collection-detail.js +30 -40
- package/dist/cjs/pages/product-detail.js +17 -29
- package/dist/cjs/pages/static-v2.js +29 -59
- package/dist/cjs/pages/static.js +33 -44
- package/dist/esm/components/FacebookPixel.js +6 -9
- package/dist/esm/components/GoogleAnalytic.js +8 -10
- package/dist/esm/index.js +6 -6
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/esm/pages/builder.js +13 -22
- package/dist/esm/pages/collection-detail.js +31 -41
- package/dist/esm/pages/product-detail.js +18 -30
- package/dist/esm/pages/static-v2.js +30 -60
- package/dist/esm/pages/static.js +34 -45
- package/dist/types/index.d.ts +30 -30
- package/package.json +5 -5
|
@@ -2,24 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
|
-
var
|
|
5
|
+
var navigation = require('next/navigation');
|
|
6
6
|
var Script = require('next/script');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
|
|
9
9
|
const FacebookPixel = ({ pixelId })=>{
|
|
10
|
-
const
|
|
10
|
+
const pathName = navigation.usePathname();
|
|
11
|
+
const searchParams = navigation.useSearchParams();
|
|
11
12
|
react.useEffect(()=>{
|
|
12
13
|
const handleRouteChange = ()=>{
|
|
13
14
|
core.fpixel.pageview();
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
router$1.events.on('hashChangeComplete', handleRouteChange);
|
|
17
|
-
return ()=>{
|
|
18
|
-
router$1.events.off('routeChangeComplete', handleRouteChange);
|
|
19
|
-
router$1.events.off('hashChangeComplete', handleRouteChange);
|
|
20
|
-
};
|
|
16
|
+
handleRouteChange();
|
|
21
17
|
}, [
|
|
22
|
-
|
|
18
|
+
pathName,
|
|
19
|
+
searchParams
|
|
23
20
|
]);
|
|
24
21
|
if (!pixelId) return null;
|
|
25
22
|
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
@@ -2,28 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
|
-
var
|
|
5
|
+
var navigation = require('next/navigation');
|
|
6
6
|
var Script = require('next/script');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
|
|
9
9
|
const GoogleAnalytic = ({ trackingId })=>{
|
|
10
|
-
const
|
|
10
|
+
const searchParams = navigation.useSearchParams();
|
|
11
|
+
const pathName = navigation.usePathname();
|
|
11
12
|
react.useEffect(()=>{
|
|
13
|
+
const url = pathName + searchParams.toString();
|
|
12
14
|
const handleRouteChange = (url)=>{
|
|
13
15
|
core.gtag.pageview(url, trackingId);
|
|
14
16
|
};
|
|
15
|
-
|
|
16
|
-
router$1.events.on('hashChangeComplete', handleRouteChange);
|
|
17
|
-
return ()=>{
|
|
18
|
-
router$1.events.off('routeChangeComplete', handleRouteChange);
|
|
19
|
-
router$1.events.off('hashChangeComplete', handleRouteChange);
|
|
20
|
-
};
|
|
17
|
+
handleRouteChange(url);
|
|
21
18
|
}, [
|
|
22
19
|
trackingId,
|
|
23
|
-
|
|
20
|
+
pathName,
|
|
21
|
+
searchParams
|
|
24
22
|
]);
|
|
25
23
|
const handleOnReady = ()=>{
|
|
26
|
-
core.gtag.pageview(
|
|
24
|
+
core.gtag.pageview(pathName, trackingId);
|
|
27
25
|
};
|
|
28
26
|
if (!trackingId) return null;
|
|
29
27
|
if (trackingId.startsWith('UA-')) return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,12 +18,6 @@ var userAgent = require('./libs/helpers/user-agent.js');
|
|
|
18
18
|
var normalize = require('./libs/helpers/normalize.js');
|
|
19
19
|
var getFallback = require('./libs/helpers/get-fallback.js');
|
|
20
20
|
var common = require('./libs/helpers/common.js');
|
|
21
|
-
var collectionDetail = require('./pages/collection-detail.js');
|
|
22
|
-
var preview = require('./pages/preview.js');
|
|
23
|
-
var productDetail = require('./pages/product-detail.js');
|
|
24
|
-
var _static = require('./pages/static.js');
|
|
25
|
-
var builder = require('./pages/builder.js');
|
|
26
|
-
var staticV2 = require('./pages/static-v2.js');
|
|
27
21
|
var getStaticPaths = require('./libs/getStaticPaths.js');
|
|
28
22
|
var genFonts = require('./libs/helpers/gen-fonts.js');
|
|
29
23
|
var googleFonts = require('./libs/google-fonts.js');
|
|
@@ -35,6 +29,12 @@ var _500 = require('./pages/500.js');
|
|
|
35
29
|
var GoogleAnalytic = require('./components/GoogleAnalytic.js');
|
|
36
30
|
var FacebookPixel = require('./components/FacebookPixel.js');
|
|
37
31
|
var TikTokPixel = require('./components/TikTokPixel.js');
|
|
32
|
+
var collectionDetail = require('./pages/collection-detail.js');
|
|
33
|
+
var preview = require('./pages/preview.js');
|
|
34
|
+
var productDetail = require('./pages/product-detail.js');
|
|
35
|
+
var _static = require('./pages/static.js');
|
|
36
|
+
var builder = require('./pages/builder.js');
|
|
37
|
+
var staticV2 = require('./pages/static-v2.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -59,12 +59,6 @@ exports.normalizePageSectionResponseV2 = normalize.normalizePageSectionResponseV
|
|
|
59
59
|
exports.parseBuilderTemplateV2 = normalize.parseBuilderTemplateV2;
|
|
60
60
|
exports.getFallbackV2 = getFallback.getFallbackV2;
|
|
61
61
|
exports.retryWithDelay = common.retryWithDelay;
|
|
62
|
-
exports.CollectionDetailPage = collectionDetail.default;
|
|
63
|
-
exports.PreviewPage = preview.PreviewPage;
|
|
64
|
-
exports.ProductDetailPage = productDetail.default;
|
|
65
|
-
exports.StaticPage = _static.default;
|
|
66
|
-
exports.BuilderPage = builder.BuilderPage;
|
|
67
|
-
exports.StaticPageV2 = staticV2.StaticPageV2;
|
|
68
62
|
exports.getStaticPaths = getStaticPaths.getStaticPaths;
|
|
69
63
|
exports.getFontFromGroupSetting = genFonts.getFontFromGroupSetting;
|
|
70
64
|
exports.getFontsFromDataBuilder = genFonts.getFontsFromDataBuilder;
|
|
@@ -78,3 +72,9 @@ exports.Page500 = _500.Page500;
|
|
|
78
72
|
exports.GoogleAnalytic = GoogleAnalytic.GoogleAnalytic;
|
|
79
73
|
exports.FacebookPixel = FacebookPixel.FacebookPixel;
|
|
80
74
|
exports.TikTokPixel = TikTokPixel.TikTokPixel;
|
|
75
|
+
exports.CollectionDetailPage = collectionDetail.default;
|
|
76
|
+
exports.PreviewPage = preview.PreviewPage;
|
|
77
|
+
exports.ProductDetailPage = productDetail.default;
|
|
78
|
+
exports.StaticPage = _static.default;
|
|
79
|
+
exports.BuilderPage = builder.BuilderPage;
|
|
80
|
+
exports.StaticPageV2 = staticV2.StaticPageV2;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
|
-
var nextSeo = require('next-seo');
|
|
6
|
-
var Head = require('next/head');
|
|
7
5
|
var react = require('react');
|
|
8
6
|
var Toolbox = require('../components/builder/Toolbox.js');
|
|
9
7
|
var Header = require('../components/builder/Header.js');
|
|
@@ -15,7 +13,7 @@ var Toolbar = require('../components/builder/Toolbar.js');
|
|
|
15
13
|
var SwitchView = require('../components/builder/SwitchView.js');
|
|
16
14
|
var Body = require('../components/builder/Body.js');
|
|
17
15
|
|
|
18
|
-
const BuilderPage = ({ components,
|
|
16
|
+
const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
19
17
|
const [loadSuccess, setLoadSuccess] = react.useState(false);
|
|
20
18
|
const isDisableHeaderFooter = ()=>{
|
|
21
19
|
return isThemeSectionEditor;
|
|
@@ -38,26 +36,19 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
38
36
|
};
|
|
39
37
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
40
38
|
children: [
|
|
41
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
42
|
-
|
|
39
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
40
|
+
type: "text/css",
|
|
41
|
+
id: "global-style",
|
|
42
|
+
dangerouslySetInnerHTML: {
|
|
43
|
+
__html: themeStyle
|
|
44
|
+
}
|
|
43
45
|
}),
|
|
44
|
-
/*#__PURE__*/ jsxRuntime.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
__html: themeStyle
|
|
51
|
-
}
|
|
52
|
-
}),
|
|
53
|
-
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
54
|
-
"data-id": "google-fonts",
|
|
55
|
-
type: "text/css",
|
|
56
|
-
dangerouslySetInnerHTML: {
|
|
57
|
-
__html: fontStyle
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
]
|
|
46
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
47
|
+
"data-id": "google-fonts",
|
|
48
|
+
type: "text/css",
|
|
49
|
+
dangerouslySetInnerHTML: {
|
|
50
|
+
__html: fontStyle
|
|
51
|
+
}
|
|
61
52
|
}),
|
|
62
53
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
63
54
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -4,53 +4,43 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
|
-
var nextSeo = require('next-seo');
|
|
8
7
|
var dynamic = require('next/dynamic');
|
|
9
|
-
var
|
|
10
|
-
var router = require('next/router');
|
|
8
|
+
var react = require('react');
|
|
11
9
|
|
|
12
10
|
const CollectionProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.CollectionProvider));
|
|
13
|
-
const CollectionDetailPage = ({
|
|
14
|
-
const router$1 = router.useRouter();
|
|
15
|
-
if (router$1.isFallback) {
|
|
16
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17
|
-
children: "Loading..."
|
|
18
|
-
});
|
|
19
|
-
}
|
|
11
|
+
const CollectionDetailPage = ({ components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
20
12
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
21
13
|
children: [
|
|
22
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
23
|
-
|
|
14
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
15
|
+
"data-id": "global-style",
|
|
16
|
+
type: "text/css",
|
|
17
|
+
dangerouslySetInnerHTML: {
|
|
18
|
+
__html: themeStyle
|
|
19
|
+
}
|
|
24
20
|
}),
|
|
25
|
-
/*#__PURE__*/ jsxRuntime.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__html: themeStyle
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
35
|
-
"data-id": "google-fonts",
|
|
36
|
-
type: "text/css",
|
|
37
|
-
dangerouslySetInnerHTML: {
|
|
38
|
-
__html: fontStyle
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
]
|
|
21
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
22
|
+
"data-id": "google-fonts",
|
|
23
|
+
type: "text/css",
|
|
24
|
+
dangerouslySetInnerHTML: {
|
|
25
|
+
__html: fontStyle
|
|
26
|
+
}
|
|
42
27
|
}),
|
|
43
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
28
|
+
/*#__PURE__*/ jsxRuntime.jsx(react.Suspense, {
|
|
29
|
+
fallback: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
30
|
+
children: "Loading..."
|
|
31
|
+
}),
|
|
32
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
33
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
34
|
+
components: components,
|
|
35
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.SectionProvider, {
|
|
36
|
+
data: sectionData,
|
|
37
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(CollectionProvider, {
|
|
38
|
+
collection: collection,
|
|
39
|
+
children: builderData && /*#__PURE__*/ jsxRuntime.jsx(core.BuilderProvider, {
|
|
40
|
+
state: builderData,
|
|
41
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.Render, {
|
|
42
|
+
uid: "ROOT"
|
|
43
|
+
})
|
|
54
44
|
})
|
|
55
45
|
})
|
|
56
46
|
})
|
|
@@ -4,41 +4,29 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
|
-
var nextSeo = require('next-seo');
|
|
8
7
|
var dynamic = require('next/dynamic');
|
|
9
|
-
var
|
|
10
|
-
var router = require('next/router');
|
|
8
|
+
var react = require('react');
|
|
11
9
|
|
|
12
10
|
const ProductProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.ProductProvider));
|
|
13
|
-
const ProductDetailPage = ({ themeStyle, fontStyle,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
11
|
+
const ProductDetailPage = ({ themeStyle, fontStyle, product, components, builderData, sectionData })=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(react.Suspense, {
|
|
13
|
+
fallback: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17
14
|
children: "Loading..."
|
|
18
|
-
})
|
|
19
|
-
}
|
|
20
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
15
|
+
}),
|
|
21
16
|
children: [
|
|
22
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
23
|
-
|
|
17
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
18
|
+
"data-id": "global-style",
|
|
19
|
+
type: "text/css",
|
|
20
|
+
dangerouslySetInnerHTML: {
|
|
21
|
+
__html: themeStyle
|
|
22
|
+
}
|
|
24
23
|
}),
|
|
25
|
-
/*#__PURE__*/ jsxRuntime.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__html: themeStyle
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
35
|
-
"data-id": "google-fonts",
|
|
36
|
-
type: "text/css",
|
|
37
|
-
dangerouslySetInnerHTML: {
|
|
38
|
-
__html: fontStyle
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
]
|
|
24
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
25
|
+
"data-id": "google-fonts",
|
|
26
|
+
type: "text/css",
|
|
27
|
+
dangerouslySetInnerHTML: {
|
|
28
|
+
__html: fontStyle
|
|
29
|
+
}
|
|
42
30
|
}),
|
|
43
31
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
44
32
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -2,76 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
|
-
var nextSeo = require('next-seo');
|
|
6
|
-
var Head = require('next/head');
|
|
7
|
-
var router = require('next/router');
|
|
8
5
|
var useTrackingView = require('../libs/hooks/use-tracking-view.js');
|
|
9
6
|
var parseHtml = require('../libs/parse-html.js');
|
|
10
7
|
var Header = require('../components/builder/Header.js');
|
|
11
8
|
var FooterForPostPurchase = require('../components/FooterForPostPurchase.js');
|
|
12
9
|
var Script = require('next/script');
|
|
13
10
|
|
|
14
|
-
const StaticPageV2 = ({ components, builderData, sectionData,
|
|
15
|
-
const router$1 = router.useRouter();
|
|
11
|
+
const StaticPageV2 = ({ components, builderData, sectionData, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
16
12
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
17
|
-
useTrackingView.useTrackingView(shopToken, pageHandle
|
|
18
|
-
if (router$1.isFallback) {
|
|
19
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
20
|
-
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
21
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
22
|
-
className: "gp-flex gp-gap-2",
|
|
23
|
-
children: [
|
|
24
|
-
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
25
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
26
|
-
}),
|
|
27
|
-
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
28
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
29
|
-
}),
|
|
30
|
-
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
31
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
32
|
-
})
|
|
33
|
-
]
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
}
|
|
13
|
+
useTrackingView.useTrackingView(shopToken, pageHandle);
|
|
37
14
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
38
15
|
children: [
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
parseHtml.parseHtml(customCodeHeader, true),
|
|
17
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
18
|
+
"data-id": "global-style",
|
|
19
|
+
type: "text/css",
|
|
20
|
+
dangerouslySetInnerHTML: {
|
|
21
|
+
__html: themeStyle
|
|
22
|
+
}
|
|
41
23
|
}),
|
|
42
|
-
/*#__PURE__*/ jsxRuntime.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
dangerouslySetInnerHTML: {
|
|
49
|
-
__html: themeStyle
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
53
|
-
"data-id": "google-fonts",
|
|
54
|
-
type: "text/css",
|
|
55
|
-
dangerouslySetInnerHTML: {
|
|
56
|
-
__html: fontStyle
|
|
57
|
-
}
|
|
58
|
-
}),
|
|
59
|
-
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
60
|
-
"data-id": "google-element-fonts",
|
|
61
|
-
type: "text/css",
|
|
62
|
-
dangerouslySetInnerHTML: {
|
|
63
|
-
__html: fontStyle
|
|
64
|
-
}
|
|
65
|
-
}, fontStyle)),
|
|
66
|
-
customFonts && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
67
|
-
"data-id": "custom-element-fonts",
|
|
68
|
-
type: "text/css",
|
|
69
|
-
dangerouslySetInnerHTML: {
|
|
70
|
-
__html: customFonts
|
|
71
|
-
}
|
|
72
|
-
}, fontStyle)
|
|
73
|
-
]
|
|
24
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
25
|
+
"data-id": "google-fonts",
|
|
26
|
+
type: "text/css",
|
|
27
|
+
dangerouslySetInnerHTML: {
|
|
28
|
+
__html: fontStyle
|
|
29
|
+
}
|
|
74
30
|
}),
|
|
31
|
+
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
32
|
+
"data-id": "google-element-fonts",
|
|
33
|
+
type: "text/css",
|
|
34
|
+
dangerouslySetInnerHTML: {
|
|
35
|
+
__html: fontStyle
|
|
36
|
+
}
|
|
37
|
+
}, fontStyle)),
|
|
38
|
+
customFonts && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
39
|
+
"data-id": "custom-element-fonts",
|
|
40
|
+
type: "text/css",
|
|
41
|
+
dangerouslySetInnerHTML: {
|
|
42
|
+
__html: customFonts
|
|
43
|
+
}
|
|
44
|
+
}, fontStyle),
|
|
75
45
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
76
46
|
productOffers: productOffers,
|
|
77
47
|
publicStoreFrontData: publicStoreFrontData,
|
package/dist/cjs/pages/static.js
CHANGED
|
@@ -4,53 +4,42 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
|
-
var
|
|
8
|
-
var Head = require('next/head');
|
|
9
|
-
var router = require('next/router');
|
|
7
|
+
var react = require('react');
|
|
10
8
|
|
|
11
|
-
const StaticPage = ({ components, builderData, sectionData,
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className: "gp-flex gp-
|
|
16
|
-
children:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9
|
+
const StaticPage = ({ components, builderData, sectionData, themeStyle, fontStyle })=>{
|
|
10
|
+
const fallbackContent = /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
11
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
12
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
13
|
+
className: "gp-flex gp-gap-2",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
16
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
19
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
22
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(react.Suspense, {
|
|
28
|
+
fallback: fallbackContent,
|
|
33
29
|
children: [
|
|
34
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
35
|
-
|
|
30
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
31
|
+
"data-id": "global-style",
|
|
32
|
+
type: "text/css",
|
|
33
|
+
dangerouslySetInnerHTML: {
|
|
34
|
+
__html: themeStyle
|
|
35
|
+
}
|
|
36
36
|
}),
|
|
37
|
-
/*#__PURE__*/ jsxRuntime.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
__html: themeStyle
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
47
|
-
"data-id": "google-fonts",
|
|
48
|
-
type: "text/css",
|
|
49
|
-
dangerouslySetInnerHTML: {
|
|
50
|
-
__html: fontStyle
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
]
|
|
37
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
38
|
+
"data-id": "google-fonts",
|
|
39
|
+
type: "text/css",
|
|
40
|
+
dangerouslySetInnerHTML: {
|
|
41
|
+
__html: fontStyle
|
|
42
|
+
}
|
|
54
43
|
}),
|
|
55
44
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
56
45
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { fpixel } from '@gem-sdk/core';
|
|
3
|
-
import {
|
|
3
|
+
import { usePathname, useSearchParams } from 'next/navigation';
|
|
4
4
|
import Script from 'next/script';
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
const FacebookPixel = ({ pixelId })=>{
|
|
8
|
-
const
|
|
8
|
+
const pathName = usePathname();
|
|
9
|
+
const searchParams = useSearchParams();
|
|
9
10
|
useEffect(()=>{
|
|
10
11
|
const handleRouteChange = ()=>{
|
|
11
12
|
fpixel.pageview();
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
router.events.on('hashChangeComplete', handleRouteChange);
|
|
15
|
-
return ()=>{
|
|
16
|
-
router.events.off('routeChangeComplete', handleRouteChange);
|
|
17
|
-
router.events.off('hashChangeComplete', handleRouteChange);
|
|
18
|
-
};
|
|
14
|
+
handleRouteChange();
|
|
19
15
|
}, [
|
|
20
|
-
|
|
16
|
+
pathName,
|
|
17
|
+
searchParams
|
|
21
18
|
]);
|
|
22
19
|
if (!pixelId) return null;
|
|
23
20
|
return /*#__PURE__*/ jsx(Script, {
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { gtag } from '@gem-sdk/core';
|
|
3
|
-
import {
|
|
3
|
+
import { useSearchParams, usePathname } from 'next/navigation';
|
|
4
4
|
import Script from 'next/script';
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
const GoogleAnalytic = ({ trackingId })=>{
|
|
8
|
-
const
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const pathName = usePathname();
|
|
9
10
|
useEffect(()=>{
|
|
11
|
+
const url = pathName + searchParams.toString();
|
|
10
12
|
const handleRouteChange = (url)=>{
|
|
11
13
|
gtag.pageview(url, trackingId);
|
|
12
14
|
};
|
|
13
|
-
|
|
14
|
-
router.events.on('hashChangeComplete', handleRouteChange);
|
|
15
|
-
return ()=>{
|
|
16
|
-
router.events.off('routeChangeComplete', handleRouteChange);
|
|
17
|
-
router.events.off('hashChangeComplete', handleRouteChange);
|
|
18
|
-
};
|
|
15
|
+
handleRouteChange(url);
|
|
19
16
|
}, [
|
|
20
17
|
trackingId,
|
|
21
|
-
|
|
18
|
+
pathName,
|
|
19
|
+
searchParams
|
|
22
20
|
]);
|
|
23
21
|
const handleOnReady = ()=>{
|
|
24
|
-
gtag.pageview(
|
|
22
|
+
gtag.pageview(pathName, trackingId);
|
|
25
23
|
};
|
|
26
24
|
if (!trackingId) return null;
|
|
27
25
|
if (trackingId.startsWith('UA-')) return /*#__PURE__*/ jsxs(Fragment, {
|
package/dist/esm/index.js
CHANGED
|
@@ -16,12 +16,6 @@ export { isBot } from './libs/helpers/user-agent.js';
|
|
|
16
16
|
export { normalizePageSectionResponseV2, parseBuilderTemplateV2 } from './libs/helpers/normalize.js';
|
|
17
17
|
export { getFallbackV2 } from './libs/helpers/get-fallback.js';
|
|
18
18
|
export { retryWithDelay } from './libs/helpers/common.js';
|
|
19
|
-
export { default as CollectionDetailPage } from './pages/collection-detail.js';
|
|
20
|
-
export { PreviewPage } from './pages/preview.js';
|
|
21
|
-
export { default as ProductDetailPage } from './pages/product-detail.js';
|
|
22
|
-
export { default as StaticPage } from './pages/static.js';
|
|
23
|
-
export { BuilderPage } from './pages/builder.js';
|
|
24
|
-
export { StaticPageV2 } from './pages/static-v2.js';
|
|
25
19
|
export { getStaticPaths } from './libs/getStaticPaths.js';
|
|
26
20
|
export { getFontFromGroupSetting, getFontsFromDataBuilder } from './libs/helpers/gen-fonts.js';
|
|
27
21
|
export { getFontFromGlobalStyle, getFonts } from './libs/google-fonts.js';
|
|
@@ -33,3 +27,9 @@ export { Page500 } from './pages/500.js';
|
|
|
33
27
|
export { GoogleAnalytic } from './components/GoogleAnalytic.js';
|
|
34
28
|
export { FacebookPixel } from './components/FacebookPixel.js';
|
|
35
29
|
export { TikTokPixel } from './components/TikTokPixel.js';
|
|
30
|
+
export { default as CollectionDetailPage } from './pages/collection-detail.js';
|
|
31
|
+
export { PreviewPage } from './pages/preview.js';
|
|
32
|
+
export { default as ProductDetailPage } from './pages/product-detail.js';
|
|
33
|
+
export { default as StaticPage } from './pages/static.js';
|
|
34
|
+
export { BuilderPage } from './pages/builder.js';
|
|
35
|
+
export { StaticPageV2 } from './pages/static-v2.js';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderPreviewProvider } from '@gem-sdk/core';
|
|
3
|
-
import { NextSeo } from 'next-seo';
|
|
4
|
-
import Head from 'next/head';
|
|
5
3
|
import { useState, useMemo, useEffect } from 'react';
|
|
6
4
|
import Toolbox from '../components/builder/Toolbox.js';
|
|
7
5
|
import Header from '../components/builder/Header.js';
|
|
@@ -13,7 +11,7 @@ import Toolbar from '../components/builder/Toolbar.js';
|
|
|
13
11
|
import Devices from '../components/builder/SwitchView.js';
|
|
14
12
|
import Body from '../components/builder/Body.js';
|
|
15
13
|
|
|
16
|
-
const BuilderPage = ({ components,
|
|
14
|
+
const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
17
15
|
const [loadSuccess, setLoadSuccess] = useState(false);
|
|
18
16
|
const isDisableHeaderFooter = ()=>{
|
|
19
17
|
return isThemeSectionEditor;
|
|
@@ -36,26 +34,19 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
36
34
|
};
|
|
37
35
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
38
36
|
children: [
|
|
39
|
-
/*#__PURE__*/ jsx(
|
|
40
|
-
|
|
37
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
38
|
+
type: "text/css",
|
|
39
|
+
id: "global-style",
|
|
40
|
+
dangerouslySetInnerHTML: {
|
|
41
|
+
__html: themeStyle
|
|
42
|
+
}
|
|
41
43
|
}),
|
|
42
|
-
/*#__PURE__*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
__html: themeStyle
|
|
49
|
-
}
|
|
50
|
-
}),
|
|
51
|
-
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
52
|
-
"data-id": "google-fonts",
|
|
53
|
-
type: "text/css",
|
|
54
|
-
dangerouslySetInnerHTML: {
|
|
55
|
-
__html: fontStyle
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
]
|
|
44
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
45
|
+
"data-id": "google-fonts",
|
|
46
|
+
type: "text/css",
|
|
47
|
+
dangerouslySetInnerHTML: {
|
|
48
|
+
__html: fontStyle
|
|
49
|
+
}
|
|
59
50
|
}),
|
|
60
51
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
61
52
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
@@ -1,52 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
|
-
import { NextSeo } from 'next-seo';
|
|
4
3
|
import dynamic from 'next/dynamic';
|
|
5
|
-
import
|
|
6
|
-
import { useRouter } from 'next/router';
|
|
4
|
+
import { Suspense } from 'react';
|
|
7
5
|
|
|
8
6
|
const CollectionProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.CollectionProvider));
|
|
9
|
-
const CollectionDetailPage = ({
|
|
10
|
-
const router = useRouter();
|
|
11
|
-
if (router.isFallback) {
|
|
12
|
-
return /*#__PURE__*/ jsx("div", {
|
|
13
|
-
children: "Loading..."
|
|
14
|
-
});
|
|
15
|
-
}
|
|
7
|
+
const CollectionDetailPage = ({ components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
16
8
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
17
9
|
children: [
|
|
18
|
-
/*#__PURE__*/ jsx(
|
|
19
|
-
|
|
10
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
11
|
+
"data-id": "global-style",
|
|
12
|
+
type: "text/css",
|
|
13
|
+
dangerouslySetInnerHTML: {
|
|
14
|
+
__html: themeStyle
|
|
15
|
+
}
|
|
20
16
|
}),
|
|
21
|
-
/*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
__html: themeStyle
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
31
|
-
"data-id": "google-fonts",
|
|
32
|
-
type: "text/css",
|
|
33
|
-
dangerouslySetInnerHTML: {
|
|
34
|
-
__html: fontStyle
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
]
|
|
17
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
18
|
+
"data-id": "google-fonts",
|
|
19
|
+
type: "text/css",
|
|
20
|
+
dangerouslySetInnerHTML: {
|
|
21
|
+
__html: fontStyle
|
|
22
|
+
}
|
|
38
23
|
}),
|
|
39
|
-
/*#__PURE__*/ jsx(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
24
|
+
/*#__PURE__*/ jsx(Suspense, {
|
|
25
|
+
fallback: /*#__PURE__*/ jsx("div", {
|
|
26
|
+
children: "Loading..."
|
|
27
|
+
}),
|
|
28
|
+
children: /*#__PURE__*/ jsx(PageProvider, {
|
|
29
|
+
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
30
|
+
components: components,
|
|
31
|
+
children: /*#__PURE__*/ jsx(SectionProvider, {
|
|
32
|
+
data: sectionData,
|
|
33
|
+
children: /*#__PURE__*/ jsx(CollectionProvider, {
|
|
34
|
+
collection: collection,
|
|
35
|
+
children: builderData && /*#__PURE__*/ jsx(BuilderProvider, {
|
|
36
|
+
state: builderData,
|
|
37
|
+
children: /*#__PURE__*/ jsx(Render, {
|
|
38
|
+
uid: "ROOT"
|
|
39
|
+
})
|
|
50
40
|
})
|
|
51
41
|
})
|
|
52
42
|
})
|
|
@@ -1,40 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render, AddOn } from '@gem-sdk/core';
|
|
3
|
-
import { NextSeo } from 'next-seo';
|
|
4
3
|
import dynamic from 'next/dynamic';
|
|
5
|
-
import
|
|
6
|
-
import { useRouter } from 'next/router';
|
|
4
|
+
import { Suspense } from 'react';
|
|
7
5
|
|
|
8
6
|
const ProductProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.ProductProvider));
|
|
9
|
-
const ProductDetailPage = ({ themeStyle, fontStyle,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return /*#__PURE__*/ jsx("div", {
|
|
7
|
+
const ProductDetailPage = ({ themeStyle, fontStyle, product, components, builderData, sectionData })=>{
|
|
8
|
+
return /*#__PURE__*/ jsxs(Suspense, {
|
|
9
|
+
fallback: /*#__PURE__*/ jsx("div", {
|
|
13
10
|
children: "Loading..."
|
|
14
|
-
})
|
|
15
|
-
}
|
|
16
|
-
return /*#__PURE__*/ jsxs(Fragment, {
|
|
11
|
+
}),
|
|
17
12
|
children: [
|
|
18
|
-
/*#__PURE__*/ jsx(
|
|
19
|
-
|
|
13
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
14
|
+
"data-id": "global-style",
|
|
15
|
+
type: "text/css",
|
|
16
|
+
dangerouslySetInnerHTML: {
|
|
17
|
+
__html: themeStyle
|
|
18
|
+
}
|
|
20
19
|
}),
|
|
21
|
-
/*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
__html: themeStyle
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
31
|
-
"data-id": "google-fonts",
|
|
32
|
-
type: "text/css",
|
|
33
|
-
dangerouslySetInnerHTML: {
|
|
34
|
-
__html: fontStyle
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
]
|
|
20
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
21
|
+
"data-id": "google-fonts",
|
|
22
|
+
type: "text/css",
|
|
23
|
+
dangerouslySetInnerHTML: {
|
|
24
|
+
__html: fontStyle
|
|
25
|
+
}
|
|
38
26
|
}),
|
|
39
27
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
40
28
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
@@ -1,75 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
|
-
import { NextSeo } from 'next-seo';
|
|
4
|
-
import Head from 'next/head';
|
|
5
|
-
import { useRouter } from 'next/router';
|
|
6
3
|
import { useTrackingView } from '../libs/hooks/use-tracking-view.js';
|
|
7
4
|
import { parseHtml } from '../libs/parse-html.js';
|
|
8
5
|
import Header from '../components/builder/Header.js';
|
|
9
6
|
import FooterForPostPurchase from '../components/FooterForPostPurchase.js';
|
|
10
7
|
import Script from 'next/script';
|
|
11
8
|
|
|
12
|
-
const StaticPageV2 = ({ components, builderData, sectionData,
|
|
13
|
-
const router = useRouter();
|
|
9
|
+
const StaticPageV2 = ({ components, builderData, sectionData, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
14
10
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
15
|
-
useTrackingView(shopToken, pageHandle
|
|
16
|
-
if (router.isFallback) {
|
|
17
|
-
return /*#__PURE__*/ jsx("div", {
|
|
18
|
-
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
19
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
20
|
-
className: "gp-flex gp-gap-2",
|
|
21
|
-
children: [
|
|
22
|
-
/*#__PURE__*/ jsx("span", {
|
|
23
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
24
|
-
}),
|
|
25
|
-
/*#__PURE__*/ jsx("span", {
|
|
26
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
27
|
-
}),
|
|
28
|
-
/*#__PURE__*/ jsx("span", {
|
|
29
|
-
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
30
|
-
})
|
|
31
|
-
]
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
}
|
|
11
|
+
useTrackingView(shopToken, pageHandle);
|
|
35
12
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
36
13
|
children: [
|
|
37
|
-
|
|
38
|
-
|
|
14
|
+
parseHtml(customCodeHeader, true),
|
|
15
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
16
|
+
"data-id": "global-style",
|
|
17
|
+
type: "text/css",
|
|
18
|
+
dangerouslySetInnerHTML: {
|
|
19
|
+
__html: themeStyle
|
|
20
|
+
}
|
|
39
21
|
}),
|
|
40
|
-
/*#__PURE__*/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dangerouslySetInnerHTML: {
|
|
47
|
-
__html: themeStyle
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
51
|
-
"data-id": "google-fonts",
|
|
52
|
-
type: "text/css",
|
|
53
|
-
dangerouslySetInnerHTML: {
|
|
54
|
-
__html: fontStyle
|
|
55
|
-
}
|
|
56
|
-
}),
|
|
57
|
-
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsx("style", {
|
|
58
|
-
"data-id": "google-element-fonts",
|
|
59
|
-
type: "text/css",
|
|
60
|
-
dangerouslySetInnerHTML: {
|
|
61
|
-
__html: fontStyle
|
|
62
|
-
}
|
|
63
|
-
}, fontStyle)),
|
|
64
|
-
customFonts && /*#__PURE__*/ jsx("style", {
|
|
65
|
-
"data-id": "custom-element-fonts",
|
|
66
|
-
type: "text/css",
|
|
67
|
-
dangerouslySetInnerHTML: {
|
|
68
|
-
__html: customFonts
|
|
69
|
-
}
|
|
70
|
-
}, fontStyle)
|
|
71
|
-
]
|
|
22
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
23
|
+
"data-id": "google-fonts",
|
|
24
|
+
type: "text/css",
|
|
25
|
+
dangerouslySetInnerHTML: {
|
|
26
|
+
__html: fontStyle
|
|
27
|
+
}
|
|
72
28
|
}),
|
|
29
|
+
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsx("style", {
|
|
30
|
+
"data-id": "google-element-fonts",
|
|
31
|
+
type: "text/css",
|
|
32
|
+
dangerouslySetInnerHTML: {
|
|
33
|
+
__html: fontStyle
|
|
34
|
+
}
|
|
35
|
+
}, fontStyle)),
|
|
36
|
+
customFonts && /*#__PURE__*/ jsx("style", {
|
|
37
|
+
"data-id": "custom-element-fonts",
|
|
38
|
+
type: "text/css",
|
|
39
|
+
dangerouslySetInnerHTML: {
|
|
40
|
+
__html: customFonts
|
|
41
|
+
}
|
|
42
|
+
}, fontStyle),
|
|
73
43
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
74
44
|
productOffers: productOffers,
|
|
75
45
|
publicStoreFrontData: publicStoreFrontData,
|
package/dist/esm/pages/static.js
CHANGED
|
@@ -1,52 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
|
-
import {
|
|
4
|
-
import Head from 'next/head';
|
|
5
|
-
import { useRouter } from 'next/router';
|
|
3
|
+
import { Suspense } from 'react';
|
|
6
4
|
|
|
7
|
-
const StaticPage = ({ components, builderData, sectionData,
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: "gp-flex gp-
|
|
12
|
-
children:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/ jsxs(Fragment, {
|
|
5
|
+
const StaticPage = ({ components, builderData, sectionData, themeStyle, fontStyle })=>{
|
|
6
|
+
const fallbackContent = /*#__PURE__*/ jsx("div", {
|
|
7
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
8
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
9
|
+
className: "gp-flex gp-gap-2",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx("span", {
|
|
12
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
13
|
+
}),
|
|
14
|
+
/*#__PURE__*/ jsx("span", {
|
|
15
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ jsx("span", {
|
|
18
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
19
|
+
})
|
|
20
|
+
]
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
return /*#__PURE__*/ jsxs(Suspense, {
|
|
24
|
+
fallback: fallbackContent,
|
|
29
25
|
children: [
|
|
30
|
-
/*#__PURE__*/ jsx(
|
|
31
|
-
|
|
26
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
27
|
+
"data-id": "global-style",
|
|
28
|
+
type: "text/css",
|
|
29
|
+
dangerouslySetInnerHTML: {
|
|
30
|
+
__html: themeStyle
|
|
31
|
+
}
|
|
32
32
|
}),
|
|
33
|
-
/*#__PURE__*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
__html: themeStyle
|
|
40
|
-
}
|
|
41
|
-
}),
|
|
42
|
-
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
43
|
-
"data-id": "google-fonts",
|
|
44
|
-
type: "text/css",
|
|
45
|
-
dangerouslySetInnerHTML: {
|
|
46
|
-
__html: fontStyle
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
]
|
|
33
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
34
|
+
"data-id": "google-fonts",
|
|
35
|
+
type: "text/css",
|
|
36
|
+
dangerouslySetInnerHTML: {
|
|
37
|
+
__html: fontStyle
|
|
38
|
+
}
|
|
50
39
|
}),
|
|
51
40
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
52
41
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -157,36 +157,6 @@ type RetryConfig = {
|
|
|
157
157
|
};
|
|
158
158
|
declare const retryWithDelay: <T = unknown>(fn: () => T, config?: RetryConfig) => Promise<T>;
|
|
159
159
|
|
|
160
|
-
type PreviewPageProps = {
|
|
161
|
-
components: Record<string, React.ComponentType<any>>;
|
|
162
|
-
pageType: ShopType.PublishedThemePageType;
|
|
163
|
-
};
|
|
164
|
-
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
165
|
-
|
|
166
|
-
type StaticPageProps = PageBuilderProps;
|
|
167
|
-
declare const StaticPage: React.FC<StaticPageProps & AdditionalPageBuilderProps>;
|
|
168
|
-
|
|
169
|
-
type BuilderPageProps = {
|
|
170
|
-
components: Record<string, React.ComponentType<any>>;
|
|
171
|
-
seo?: NextSeoProps;
|
|
172
|
-
themeStyle?: string | null;
|
|
173
|
-
fontStyle?: string | null;
|
|
174
|
-
header?: BuilderState;
|
|
175
|
-
footer?: BuilderState;
|
|
176
|
-
sectionData?: Record<string, SectionData$1>;
|
|
177
|
-
storefrontToken?: string | null;
|
|
178
|
-
storefrontHandle?: string | null;
|
|
179
|
-
shopToken?: string | null;
|
|
180
|
-
mode?: RenderMode;
|
|
181
|
-
pageType: ShopType.PublishedThemePageType;
|
|
182
|
-
editorImageToLayout?: boolean;
|
|
183
|
-
isThemeSectionEditor?: boolean;
|
|
184
|
-
hiddenToolbar?: boolean;
|
|
185
|
-
pageName: string;
|
|
186
|
-
isOriginTemplate?: boolean;
|
|
187
|
-
};
|
|
188
|
-
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
189
|
-
|
|
190
160
|
declare const getStaticPaths: GetStaticPaths;
|
|
191
161
|
|
|
192
162
|
type TypographyV2FontFamilyType = 'google' | 'custom' | 'theme' | 'bunny';
|
|
@@ -257,4 +227,34 @@ type Props = {
|
|
|
257
227
|
};
|
|
258
228
|
declare const TikTokPixel: ({ pixelId }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
259
229
|
|
|
230
|
+
type PreviewPageProps = {
|
|
231
|
+
components: Record<string, React.ComponentType<any>>;
|
|
232
|
+
pageType: ShopType.PublishedThemePageType;
|
|
233
|
+
};
|
|
234
|
+
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
235
|
+
|
|
236
|
+
type StaticPageProps = PageBuilderProps;
|
|
237
|
+
declare const StaticPage: React.FC<StaticPageProps & AdditionalPageBuilderProps>;
|
|
238
|
+
|
|
239
|
+
type BuilderPageProps = {
|
|
240
|
+
components: Record<string, React.ComponentType<any>>;
|
|
241
|
+
seo?: NextSeoProps;
|
|
242
|
+
themeStyle?: string | null;
|
|
243
|
+
fontStyle?: string | null;
|
|
244
|
+
header?: BuilderState;
|
|
245
|
+
footer?: BuilderState;
|
|
246
|
+
sectionData?: Record<string, SectionData$1>;
|
|
247
|
+
storefrontToken?: string | null;
|
|
248
|
+
storefrontHandle?: string | null;
|
|
249
|
+
shopToken?: string | null;
|
|
250
|
+
mode?: RenderMode;
|
|
251
|
+
pageType: ShopType.PublishedThemePageType;
|
|
252
|
+
editorImageToLayout?: boolean;
|
|
253
|
+
isThemeSectionEditor?: boolean;
|
|
254
|
+
hiddenToolbar?: boolean;
|
|
255
|
+
pageName: string;
|
|
256
|
+
isOriginTemplate?: boolean;
|
|
257
|
+
};
|
|
258
|
+
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
259
|
+
|
|
260
260
|
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, CollectionPageProps, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PreviewPage, ProductDetailPage, ProductPageProps, StaticPage, StaticPageProps, StaticPagePropsV2, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, genCSS, getBuilderProps, getCollectionProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, usePagePreview, useTrackingView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0-dev.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "1.
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "1.
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "1.
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "1.
|
|
29
|
+
"@gem-sdk/core": "1.58.0-dev.13",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "1.58.0-dev.13",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "1.58.0-dev.13",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "1.58.0-dev.13"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|