@gem-sdk/pages 2.0.0-staging.159 → 2.0.0-staging.711
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/FooterForPostPurchase.js +1 -1
- package/dist/cjs/components/builder/Footer.js +2 -2
- package/dist/cjs/components/builder/Header.js +0 -1
- package/dist/cjs/components/builder/Toolbar.js +6 -0
- package/dist/cjs/components/builder/Toolbox.js +17 -14
- package/dist/cjs/components/composable/getListFontWeightTypos.js +14 -0
- package/dist/cjs/components/image-to-layout/AddSectionImageToLayout.js +5 -4
- package/dist/cjs/components/image-to-layout/DropElement.js +34 -9
- package/dist/cjs/constants/index.js +3 -0
- package/dist/cjs/libs/api/get-static-page-props-preview.js +5 -0
- package/dist/cjs/libs/api/get-static-page-props-v2.js +7 -2
- package/dist/cjs/libs/google-fonts.js +25 -5
- package/dist/cjs/libs/helpers/gen-fonts.js +9 -3
- package/dist/cjs/libs/helpers/normalize.js +2 -1
- package/dist/cjs/libs/helpers/parse-json.js +1 -1
- package/dist/cjs/libs/helpers/sentry.js +17 -0
- package/dist/cjs/pages/404.js +1 -0
- package/dist/cjs/pages/500.js +1 -0
- package/dist/cjs/pages/CollectionGlobalProvider.js +1 -0
- package/dist/cjs/pages/builder.js +46 -41
- package/dist/cjs/pages/collection-detail.js +1 -0
- package/dist/cjs/pages/preview.js +1 -0
- package/dist/cjs/pages/product-detail.js +1 -0
- package/dist/cjs/pages/static-v2.js +20 -16
- package/dist/cjs/pages/static.js +1 -0
- package/dist/esm/components/FooterForPostPurchase.js +1 -1
- package/dist/esm/components/builder/Footer.js +2 -2
- package/dist/esm/components/builder/Header.js +1 -2
- package/dist/esm/components/builder/Toolbar.js +6 -0
- package/dist/esm/components/builder/Toolbox.js +17 -14
- package/dist/esm/components/composable/getListFontWeightTypos.js +12 -0
- package/dist/esm/components/image-to-layout/AddSectionImageToLayout.js +6 -5
- package/dist/esm/components/image-to-layout/DropElement.js +34 -9
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/libs/api/get-static-page-props-preview.js +5 -0
- package/dist/esm/libs/api/get-static-page-props-v2.js +7 -2
- package/dist/esm/libs/google-fonts.js +25 -5
- package/dist/esm/libs/helpers/gen-fonts.js +9 -3
- package/dist/esm/libs/helpers/normalize.js +2 -1
- package/dist/esm/libs/helpers/parse-json.js +1 -1
- package/dist/esm/libs/helpers/sentry.js +15 -0
- package/dist/esm/pages/404.js +1 -0
- package/dist/esm/pages/500.js +1 -0
- package/dist/esm/pages/CollectionGlobalProvider.js +1 -0
- package/dist/esm/pages/builder.js +47 -42
- package/dist/esm/pages/collection-detail.js +1 -0
- package/dist/esm/pages/preview.js +1 -0
- package/dist/esm/pages/product-detail.js +1 -0
- package/dist/esm/pages/static-v2.js +21 -17
- package/dist/esm/pages/static.js +1 -0
- package/dist/types/index.d.ts +63 -57
- package/package.json +6 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderPreviewProvider } from '@gem-sdk/core';
|
|
3
|
+
import { useI18n, PageProvider, BuilderComponentProvider, SectionProvider, I18nProvider, BuilderPreviewProvider } from '@gem-sdk/core';
|
|
3
4
|
import { NextSeo } from 'next-seo';
|
|
4
5
|
import Head from 'next/head';
|
|
5
6
|
import { useState, useMemo, useEffect } from 'react';
|
|
@@ -15,6 +16,7 @@ import Body from '../components/builder/Body.js';
|
|
|
15
16
|
|
|
16
17
|
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
17
18
|
const [loadSuccess, setLoadSuccess] = useState(false);
|
|
19
|
+
const { t } = useI18n();
|
|
18
20
|
const isDisableHeaderFooter = ()=>{
|
|
19
21
|
return isThemeSectionEditor;
|
|
20
22
|
};
|
|
@@ -62,47 +64,50 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
62
64
|
components: components,
|
|
63
65
|
children: /*#__PURE__*/ jsx(SectionProvider, {
|
|
64
66
|
data: sectionData,
|
|
65
|
-
children: /*#__PURE__*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
67
|
+
children: /*#__PURE__*/ jsx(I18nProvider, {
|
|
68
|
+
t: t,
|
|
69
|
+
children: /*#__PURE__*/ jsxs(BuilderPreviewProvider, {
|
|
70
|
+
pageName: pageName,
|
|
71
|
+
state: initState,
|
|
72
|
+
isThemeSectionEditor: isThemeSectionEditor,
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ jsx(Toolbox, {}),
|
|
75
|
+
!hiddenToolbar && /*#__PURE__*/ jsx(Toolbar, {}),
|
|
76
|
+
/*#__PURE__*/ jsx(PopupManager, {}),
|
|
77
|
+
loadSuccess && /*#__PURE__*/ jsxs("div", {
|
|
78
|
+
className: "builder gp-z-1 gp-relative",
|
|
79
|
+
children: [
|
|
80
|
+
!hiddenToolbar && (isDisableHeaderFooter() ? /*#__PURE__*/ jsx("div", {
|
|
81
|
+
className: "gp-h-[40px] gp-bg-[#ffffff] gp-border-b-[1px] gp-border-[#eeeeee]",
|
|
82
|
+
children: /*#__PURE__*/ jsx(Devices, {})
|
|
83
|
+
}) : /*#__PURE__*/ jsx(Header, {
|
|
84
|
+
pageType: pageType,
|
|
85
|
+
isOriginTemplate: isOriginTemplate,
|
|
86
|
+
openPageSetting: openPageSetting
|
|
87
|
+
})),
|
|
88
|
+
/*#__PURE__*/ jsx(Body, {
|
|
89
|
+
pageType: pageType,
|
|
90
|
+
isThemeSectionEditor: isThemeSectionEditor
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ jsx(ImageToLayout, {
|
|
93
|
+
editorImageToLayout: editorImageToLayout || false
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ jsx(AddSectionImageToLayout, {
|
|
96
|
+
editorImageToLayout: editorImageToLayout || false
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ jsx("div", {
|
|
99
|
+
id: "visual-content"
|
|
100
|
+
}),
|
|
101
|
+
!isDisableHeaderFooter() && !hiddenToolbar && /*#__PURE__*/ jsx(Footer, {
|
|
102
|
+
pageType: pageType,
|
|
103
|
+
isOriginTemplate: isOriginTemplate,
|
|
104
|
+
openPageSetting: openPageSetting
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}, "preview")
|
|
110
|
+
})
|
|
106
111
|
})
|
|
107
112
|
})
|
|
108
113
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
2
|
+
import { useI18n, PageProvider, BuilderComponentProvider, SectionProvider, I18nProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
3
|
import { NextSeo } from 'next-seo';
|
|
4
4
|
import Head from 'next/head';
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
@@ -12,6 +12,7 @@ import { useEffect } from 'react';
|
|
|
12
12
|
|
|
13
13
|
const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, dynamicDiscountOffer, isPreview, interaction, pageBackground })=>{
|
|
14
14
|
const router = useRouter();
|
|
15
|
+
const { t } = useI18n();
|
|
15
16
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
16
17
|
useTrackingView(shopToken, pageHandle, router.isFallback);
|
|
17
18
|
const customCodeHeaderID = 'custom-code-header';
|
|
@@ -107,22 +108,25 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
|
|
|
107
108
|
}),
|
|
108
109
|
/*#__PURE__*/ jsx(SectionProvider, {
|
|
109
110
|
data: sectionData,
|
|
110
|
-
children:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
children: /*#__PURE__*/ jsx(I18nProvider, {
|
|
112
|
+
t: t,
|
|
113
|
+
children: builderData?.map((builder)=>/*#__PURE__*/ jsxs(BuilderProvider, {
|
|
114
|
+
state: builder.data,
|
|
115
|
+
lazy: builder.lazy,
|
|
116
|
+
priority: builder.priority,
|
|
117
|
+
isPostPurchase: isPostPurchase,
|
|
118
|
+
isPreview: isPreview,
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ jsx(Render, {
|
|
121
|
+
uid: builder.uid
|
|
122
|
+
}),
|
|
123
|
+
hasInteraction && /*#__PURE__*/ jsx(Script, {
|
|
124
|
+
defer: true,
|
|
125
|
+
src: `${baseAssetURL}/assets-v2/gp-flow-action-lip.js`
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
}, builder.uid))
|
|
129
|
+
})
|
|
126
130
|
}),
|
|
127
131
|
isPostPurchase && /*#__PURE__*/ jsx(FooterForPostPurchase, {
|
|
128
132
|
shopName: shopName || ''
|
package/dist/esm/pages/static.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { BuilderState, SectionData as SectionData$1, ShopType, RenderMode,
|
|
1
|
+
import { BuilderState, SectionData as SectionData$1, ShopType, RenderMode, ProductOffer, AppAPIType, PublicStoreFrontData, CollectionQueryResponse, ProductSelectFragment, FetchFunc, ThemePageQueryResponse, StorePropertyQueryResponse, PublishedThemePageSelectFragment } from '@gem-sdk/core';
|
|
2
2
|
import { NextPage, GetStaticPaths } from 'next';
|
|
3
3
|
import * as next_seo from 'next-seo';
|
|
4
4
|
import { NextSeoProps } from 'next-seo';
|
|
5
5
|
import { AppProps } from 'next/app';
|
|
6
6
|
import { SWRConfig } from 'swr';
|
|
7
|
-
import
|
|
7
|
+
import * as React$1 from 'react';
|
|
8
|
+
import React__default, { Component } from 'react';
|
|
8
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
10
|
import { ShopMetaQueryResponse } from '@gem-sdk/adapter-shopify';
|
|
10
|
-
import * as react from 'react';
|
|
11
|
-
import { Component } from 'react';
|
|
12
11
|
|
|
13
12
|
type PageBuilderProps = {
|
|
14
13
|
seo?: NextSeoProps;
|
|
@@ -17,7 +16,7 @@ type PageBuilderProps = {
|
|
|
17
16
|
themeStyle?: string | null;
|
|
18
17
|
fontStyle?: string | null;
|
|
19
18
|
elementFontStyle?: string[] | null;
|
|
20
|
-
swr?:
|
|
19
|
+
swr?: React__default.ComponentProps<typeof SWRConfig>['value'];
|
|
21
20
|
plugins?: string[];
|
|
22
21
|
pageType?: ShopType.PublishedThemePageType;
|
|
23
22
|
storefrontToken?: string | null;
|
|
@@ -41,7 +40,7 @@ type PageBuilderProps = {
|
|
|
41
40
|
customCodeBody?: string | null;
|
|
42
41
|
isStorefront?: boolean;
|
|
43
42
|
customFonts?: string | null;
|
|
44
|
-
interaction?: ShopType.Maybe<Pick<ShopType.PublishedPageInteraction,
|
|
43
|
+
interaction?: ShopType.Maybe<Pick<ShopType.PublishedPageInteraction, 'id' | 'value'>>;
|
|
45
44
|
timezone?: string;
|
|
46
45
|
pageBackground?: {
|
|
47
46
|
isUsePageBackground?: boolean;
|
|
@@ -57,21 +56,54 @@ type PageBuilderPropsV2 = {
|
|
|
57
56
|
}[];
|
|
58
57
|
} & Omit<PageBuilderProps, 'builderData'>;
|
|
59
58
|
type AdditionalPageBuilderProps = {
|
|
60
|
-
components: Record<string,
|
|
59
|
+
components: Record<string, React__default.ComponentType<any>>;
|
|
61
60
|
};
|
|
62
61
|
type NextPageWithLayout<P = PageBuilderProps, IP = P> = NextPage<P, IP> & {
|
|
63
|
-
getLayout?: (page:
|
|
62
|
+
getLayout?: (page: React__default.ReactElement, pageProps?: any) => React__default.ReactNode;
|
|
64
63
|
};
|
|
65
64
|
type AppPropsWithLayout<P = PageBuilderProps> = AppProps<P> & {
|
|
66
65
|
Component: NextPageWithLayout;
|
|
67
66
|
};
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
type BuilderPageProps = {
|
|
68
|
+
components: Record<string, React__default.ComponentType<any>>;
|
|
69
|
+
seo?: NextSeoProps;
|
|
70
|
+
themeStyle?: string | null;
|
|
71
|
+
fontStyle?: string | null;
|
|
72
|
+
header?: BuilderState;
|
|
73
|
+
footer?: BuilderState;
|
|
74
|
+
sectionData?: Record<string, SectionData$1>;
|
|
75
|
+
storefrontToken?: string | null;
|
|
76
|
+
storefrontHandle?: string | null;
|
|
77
|
+
shopToken?: string | null;
|
|
78
|
+
mode?: RenderMode;
|
|
79
|
+
pageType: ShopType.PublishedThemePageType;
|
|
80
|
+
editorImageToLayout?: boolean;
|
|
81
|
+
isThemeSectionEditor?: boolean;
|
|
82
|
+
hiddenToolbar?: boolean;
|
|
83
|
+
pageName: string;
|
|
84
|
+
isOriginTemplate?: boolean;
|
|
85
|
+
};
|
|
86
|
+
type CollectionDetailPageProps = PageBuilderProps & {
|
|
70
87
|
collection?: CollectionQueryResponse['collection'];
|
|
71
88
|
};
|
|
72
|
-
|
|
89
|
+
type PreviewPageProps = {
|
|
90
|
+
components: Record<string, React__default.ComponentType<any>>;
|
|
91
|
+
pageType: ShopType.PublishedThemePageType;
|
|
92
|
+
};
|
|
93
|
+
type ProductPageProps = PageBuilderProps & {
|
|
94
|
+
product?: ProductSelectFragment;
|
|
95
|
+
};
|
|
96
|
+
type StaticPagePropsV2 = PageBuilderPropsV2 & {
|
|
97
|
+
isPostPurchase?: boolean;
|
|
98
|
+
shopName?: string;
|
|
99
|
+
productOffers?: ProductOffer[];
|
|
100
|
+
dynamicDiscountOffer?: AppAPIType.OfferDynamicDiscount;
|
|
101
|
+
publicStoreFrontData?: PublicStoreFrontData | null;
|
|
102
|
+
isPreview?: boolean;
|
|
103
|
+
domain?: string;
|
|
104
|
+
};
|
|
73
105
|
|
|
74
|
-
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<
|
|
106
|
+
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<CollectionDetailPageProps>;
|
|
75
107
|
|
|
76
108
|
declare const getHomePageProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderProps>;
|
|
77
109
|
|
|
@@ -82,25 +114,10 @@ declare const getPreviewProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) =
|
|
|
82
114
|
type Props$4 = Pick<PageBuilderProps, 'swr' | 'themeStyle' | 'seo' | 'currency' | 'locale' | 'swatches'>;
|
|
83
115
|
declare const getBuilderProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => Promise<Props$4>;
|
|
84
116
|
|
|
85
|
-
type ProductPageProps = PageBuilderProps & {
|
|
86
|
-
product?: ProductSelectFragment;
|
|
87
|
-
};
|
|
88
|
-
declare const ProductDetailPage: React.FC<ProductPageProps & AdditionalPageBuilderProps>;
|
|
89
|
-
|
|
90
117
|
declare const getProductProps: (fetcher: FetchFunc) => (handle?: string) => Promise<ProductPageProps>;
|
|
91
118
|
|
|
92
119
|
declare const getStaticPagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
93
120
|
|
|
94
|
-
type StaticPagePropsV2 = PageBuilderPropsV2 & {
|
|
95
|
-
isPostPurchase?: boolean;
|
|
96
|
-
shopName?: string;
|
|
97
|
-
productOffers?: ProductOffer[];
|
|
98
|
-
dynamicDiscountOffer?: OfferDynamicDiscount;
|
|
99
|
-
publicStoreFrontData?: PublicStoreFrontData | null;
|
|
100
|
-
isPreview?: boolean;
|
|
101
|
-
};
|
|
102
|
-
declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
|
|
103
|
-
|
|
104
121
|
declare const getPostPurchasePropsPreview: (fetcher: FetchFunc, librarySaleFunnelID?: string, storeFrontFetcher?: FetchFunc) => (data: {
|
|
105
122
|
id: string;
|
|
106
123
|
currentOfferID: string;
|
|
@@ -125,8 +142,8 @@ declare const usePagePreview: (dataBuilder: ThemePageQueryResponse['themePage'],
|
|
|
125
142
|
pageConfig: {
|
|
126
143
|
mobileOnly: boolean;
|
|
127
144
|
locale: string | null;
|
|
128
|
-
languageIsoCode: ("ID" | "
|
|
129
|
-
countryIsoCode: ("ID" | "
|
|
145
|
+
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LA" | "LB" | "LT" | "LU" | "LV" | "MG" | "MK" | "ML" | "MN" | "MO" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NO" | "OM" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "RW" | "SA" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SK" | "SL" | "SN" | "SO" | "SR" | "SV" | "TA" | "TG" | "TH" | "TK" | "TO" | "TR" | "TT" | "UG" | "UZ" | "AK" | "AS" | "CE" | "CKB" | "CS" | "DA" | "EL" | "EN" | "EO" | "EU" | "FA" | "FF" | "FIL" | "FY" | "GU" | "GV" | "HA" | "HE" | "HI" | "HY" | "IA" | "IG" | "II" | "JA" | "JV" | "KA" | "KK" | "KL" | "KO" | "KS" | "KU" | "LG" | "LN" | "LO" | "MI" | "NB" | "ND" | "NN" | "OR" | "OS" | "PT_BR" | "PT_PT" | "QU" | "RM" | "RN" | "SQ" | "SU" | "SW" | "TE" | "TI" | "UK" | "UR" | "VI" | "VO" | "WO" | "XH" | "YI" | "YO" | "ZH" | "ZH_CN" | "ZH_TW" | "ZU") | null;
|
|
146
|
+
countryIsoCode: ("ID" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ") | null;
|
|
130
147
|
moneyFormat: string | null;
|
|
131
148
|
currency: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BYR" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KID" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "XXX" | "YER" | "ZAR" | "ZMW") | null;
|
|
132
149
|
swatches: any;
|
|
@@ -146,7 +163,14 @@ declare function normalizePageSectionResponseV2(sections?: ShopType.Maybe<Sectio
|
|
|
146
163
|
priority: boolean;
|
|
147
164
|
data: any;
|
|
148
165
|
}[];
|
|
149
|
-
|
|
166
|
+
type ParseBuilderTemplateV2Props = PublishedThemePageSelectFragment & {
|
|
167
|
+
themeSections?: {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
content: string;
|
|
171
|
+
}[];
|
|
172
|
+
};
|
|
173
|
+
declare const parseBuilderTemplateV2: (data?: ParseBuilderTemplateV2Props) => {
|
|
150
174
|
uid: string;
|
|
151
175
|
lazy: boolean;
|
|
152
176
|
priority: boolean;
|
|
@@ -206,7 +230,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
206
230
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
207
231
|
reset: () => void;
|
|
208
232
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
209
|
-
render(): string | number | boolean | Iterable<
|
|
233
|
+
render(): string | number | boolean | Iterable<React$1.ReactNode> | React$1.PromiseLikeOfReactNode | react_jsx_runtime.JSX.Element | null | undefined;
|
|
210
234
|
}
|
|
211
235
|
|
|
212
236
|
type Props$3 = {
|
|
@@ -234,34 +258,16 @@ type Props = {
|
|
|
234
258
|
};
|
|
235
259
|
declare const TikTokPixel: ({ pixelId }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
236
260
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
pageType: ShopType.PublishedThemePageType;
|
|
240
|
-
};
|
|
261
|
+
declare const CollectionDetailPage: React.FC<CollectionDetailPageProps & AdditionalPageBuilderProps>;
|
|
262
|
+
|
|
241
263
|
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
242
264
|
|
|
243
|
-
|
|
244
|
-
|
|
265
|
+
declare const ProductDetailPage: React.FC<ProductPageProps & AdditionalPageBuilderProps>;
|
|
266
|
+
|
|
267
|
+
declare const StaticPage: React.FC<PageBuilderProps & AdditionalPageBuilderProps>;
|
|
245
268
|
|
|
246
|
-
type BuilderPageProps = {
|
|
247
|
-
components: Record<string, React.ComponentType<any>>;
|
|
248
|
-
seo?: NextSeoProps;
|
|
249
|
-
themeStyle?: string | null;
|
|
250
|
-
fontStyle?: string | null;
|
|
251
|
-
header?: BuilderState;
|
|
252
|
-
footer?: BuilderState;
|
|
253
|
-
sectionData?: Record<string, SectionData$1>;
|
|
254
|
-
storefrontToken?: string | null;
|
|
255
|
-
storefrontHandle?: string | null;
|
|
256
|
-
shopToken?: string | null;
|
|
257
|
-
mode?: RenderMode;
|
|
258
|
-
pageType: ShopType.PublishedThemePageType;
|
|
259
|
-
editorImageToLayout?: boolean;
|
|
260
|
-
isThemeSectionEditor?: boolean;
|
|
261
|
-
hiddenToolbar?: boolean;
|
|
262
|
-
pageName: string;
|
|
263
|
-
isOriginTemplate?: boolean;
|
|
264
|
-
};
|
|
265
269
|
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
266
270
|
|
|
267
|
-
|
|
271
|
+
declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
|
|
272
|
+
|
|
273
|
+
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, ProductDetailPage, StaticPage, 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": "2.0.0-staging.
|
|
3
|
+
"version": "2.0.0-staging.711",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"deepmerge": "4.3.1",
|
|
24
24
|
"html-react-parser": "3.0.15",
|
|
25
25
|
"next-seo": "^6.0.0",
|
|
26
|
-
"next": "
|
|
26
|
+
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "
|
|
29
|
+
"@gem-sdk/core": "2.0.0-staging.711",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "2.0.0-staging.711",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "2.0.0-staging.711",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-staging.711"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|