@gem-sdk/pages 1.60.9 → 1.60.10
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
CHANGED
|
@@ -35,6 +35,7 @@ var _500 = require('./pages/500.js');
|
|
|
35
35
|
var GoogleAnalytic = require('./components/GoogleAnalytic.js');
|
|
36
36
|
var FacebookPixel = require('./components/FacebookPixel.js');
|
|
37
37
|
var TikTokPixel = require('./components/TikTokPixel.js');
|
|
38
|
+
var parseHtml = require('./libs/parse-html.js');
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
|
@@ -78,3 +79,4 @@ exports.Page500 = _500.Page500;
|
|
|
78
79
|
exports.GoogleAnalytic = GoogleAnalytic.GoogleAnalytic;
|
|
79
80
|
exports.FacebookPixel = FacebookPixel.FacebookPixel;
|
|
80
81
|
exports.TikTokPixel = TikTokPixel.TikTokPixel;
|
|
82
|
+
exports.parseHtml = parseHtml.parseHtml;
|
|
@@ -16,7 +16,7 @@ const parseHtml = (html, isHead)=>{
|
|
|
16
16
|
...node.attribs
|
|
17
17
|
});
|
|
18
18
|
if (child instanceof parse.Text && isHead) {
|
|
19
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
19
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
20
20
|
...node.attribs,
|
|
21
21
|
dangerouslySetInnerHTML: {
|
|
22
22
|
__html: child.data
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
5
|
var nextSeo = require('next-seo');
|
|
6
|
-
var Head = require('next/head');
|
|
7
6
|
var router = require('next/router');
|
|
8
7
|
var useTrackingView = require('../libs/hooks/use-tracking-view.js');
|
|
9
|
-
var parseHtml = require('../libs/parse-html.js');
|
|
10
8
|
var Header = require('../components/builder/Header.js');
|
|
11
9
|
var FooterForPostPurchase = require('../components/FooterForPostPurchase.js');
|
|
12
10
|
var Script = require('next/script');
|
|
13
11
|
|
|
14
|
-
const StaticPageV2 = ({ components, builderData, sectionData, seo,
|
|
12
|
+
const StaticPageV2 = ({ components, builderData, sectionData, seo, shopToken, pageHandle, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
15
13
|
const router$1 = router.useRouter();
|
|
16
14
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
17
15
|
useTrackingView.useTrackingView(shopToken, pageHandle, router$1.isFallback);
|
|
@@ -39,39 +37,6 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
|
|
|
39
37
|
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
40
38
|
...seo
|
|
41
39
|
}),
|
|
42
|
-
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
43
|
-
children: [
|
|
44
|
-
parseHtml.parseHtml(customCodeHeader, true),
|
|
45
|
-
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
46
|
-
"data-id": "global-style",
|
|
47
|
-
type: "text/css",
|
|
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
|
-
]
|
|
74
|
-
}),
|
|
75
40
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
76
41
|
productOffers: productOffers,
|
|
77
42
|
publicStoreFrontData: publicStoreFrontData,
|
package/dist/esm/index.js
CHANGED
|
@@ -33,3 +33,4 @@ export { Page500 } from './pages/500.js';
|
|
|
33
33
|
export { GoogleAnalytic } from './components/GoogleAnalytic.js';
|
|
34
34
|
export { FacebookPixel } from './components/FacebookPixel.js';
|
|
35
35
|
export { TikTokPixel } from './components/TikTokPixel.js';
|
|
36
|
+
export { parseHtml } from './libs/parse-html.js';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
3
|
import { NextSeo } from 'next-seo';
|
|
4
|
-
import Head from 'next/head';
|
|
5
4
|
import { useRouter } from 'next/router';
|
|
6
5
|
import { useTrackingView } from '../libs/hooks/use-tracking-view.js';
|
|
7
|
-
import { parseHtml } from '../libs/parse-html.js';
|
|
8
6
|
import Header from '../components/builder/Header.js';
|
|
9
7
|
import FooterForPostPurchase from '../components/FooterForPostPurchase.js';
|
|
10
8
|
import Script from 'next/script';
|
|
11
9
|
|
|
12
|
-
const StaticPageV2 = ({ components, builderData, sectionData, seo,
|
|
10
|
+
const StaticPageV2 = ({ components, builderData, sectionData, seo, shopToken, pageHandle, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
13
11
|
const router = useRouter();
|
|
14
12
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
15
13
|
useTrackingView(shopToken, pageHandle, router.isFallback);
|
|
@@ -37,39 +35,6 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
|
|
|
37
35
|
/*#__PURE__*/ jsx(NextSeo, {
|
|
38
36
|
...seo
|
|
39
37
|
}),
|
|
40
|
-
/*#__PURE__*/ jsxs(Head, {
|
|
41
|
-
children: [
|
|
42
|
-
parseHtml(customCodeHeader, true),
|
|
43
|
-
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
44
|
-
"data-id": "global-style",
|
|
45
|
-
type: "text/css",
|
|
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
|
-
]
|
|
72
|
-
}),
|
|
73
38
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
74
39
|
productOffers: productOffers,
|
|
75
40
|
publicStoreFrontData: publicStoreFrontData,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -257,4 +257,6 @@ type Props = {
|
|
|
257
257
|
};
|
|
258
258
|
declare const TikTokPixel: ({ pixelId }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
declare const parseHtml: (html?: string | null, isHead?: boolean) => string | JSX.Element | JSX.Element[] | undefined;
|
|
261
|
+
|
|
262
|
+
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, parseHtml, retryWithDelay, usePagePreview, useTrackingView };
|