@gem-sdk/pages 2.0.0-dev.479 → 2.0.0-dev.504
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/types/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { BuilderState, SectionData as SectionData$1, ShopType, RenderMode, CollectionQueryResponse,
|
|
1
|
+
import { BuilderState, SectionData as SectionData$1, ShopType, RenderMode, CollectionQueryResponse, ProductSelectFragment, ProductOffer, AppAPIType, PublicStoreFrontData, 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 * as React$1 from 'react';
|
|
8
|
+
import React__default, { Component } from 'react';
|
|
7
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
10
|
import { ShopMetaQueryResponse } from '@gem-sdk/adapter-shopify';
|
|
9
|
-
import * as react from 'react';
|
|
10
|
-
import { Component } from 'react';
|
|
11
11
|
|
|
12
12
|
type PageBuilderProps = {
|
|
13
13
|
seo?: NextSeoProps;
|
|
@@ -16,7 +16,7 @@ type PageBuilderProps = {
|
|
|
16
16
|
themeStyle?: string | null;
|
|
17
17
|
fontStyle?: string | null;
|
|
18
18
|
elementFontStyle?: string[] | null;
|
|
19
|
-
swr?:
|
|
19
|
+
swr?: React__default.ComponentProps<typeof SWRConfig>['value'];
|
|
20
20
|
plugins?: string[];
|
|
21
21
|
pageType?: ShopType.PublishedThemePageType;
|
|
22
22
|
storefrontToken?: string | null;
|
|
@@ -56,21 +56,53 @@ type PageBuilderPropsV2 = {
|
|
|
56
56
|
}[];
|
|
57
57
|
} & Omit<PageBuilderProps, 'builderData'>;
|
|
58
58
|
type AdditionalPageBuilderProps = {
|
|
59
|
-
components: Record<string,
|
|
59
|
+
components: Record<string, React__default.ComponentType<any>>;
|
|
60
60
|
};
|
|
61
61
|
type NextPageWithLayout<P = PageBuilderProps, IP = P> = NextPage<P, IP> & {
|
|
62
|
-
getLayout?: (page:
|
|
62
|
+
getLayout?: (page: React__default.ReactElement, pageProps?: any) => React__default.ReactNode;
|
|
63
63
|
};
|
|
64
64
|
type AppPropsWithLayout<P = PageBuilderProps> = AppProps<P> & {
|
|
65
65
|
Component: NextPageWithLayout;
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
|
|
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 & {
|
|
69
87
|
collection?: CollectionQueryResponse['collection'];
|
|
70
88
|
};
|
|
71
|
-
|
|
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
|
+
};
|
|
72
104
|
|
|
73
|
-
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<
|
|
105
|
+
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<CollectionDetailPageProps>;
|
|
74
106
|
|
|
75
107
|
declare const getHomePageProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderProps>;
|
|
76
108
|
|
|
@@ -81,25 +113,10 @@ declare const getPreviewProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) =
|
|
|
81
113
|
type Props$4 = Pick<PageBuilderProps, 'swr' | 'themeStyle' | 'seo' | 'currency' | 'locale' | 'swatches'>;
|
|
82
114
|
declare const getBuilderProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => Promise<Props$4>;
|
|
83
115
|
|
|
84
|
-
type ProductPageProps = PageBuilderProps & {
|
|
85
|
-
product?: ProductSelectFragment;
|
|
86
|
-
};
|
|
87
|
-
declare const ProductDetailPage: React.FC<ProductPageProps & AdditionalPageBuilderProps>;
|
|
88
|
-
|
|
89
116
|
declare const getProductProps: (fetcher: FetchFunc) => (handle?: string) => Promise<ProductPageProps>;
|
|
90
117
|
|
|
91
118
|
declare const getStaticPagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
92
119
|
|
|
93
|
-
type StaticPagePropsV2 = PageBuilderPropsV2 & {
|
|
94
|
-
isPostPurchase?: boolean;
|
|
95
|
-
shopName?: string;
|
|
96
|
-
productOffers?: ProductOffer[];
|
|
97
|
-
dynamicDiscountOffer?: AppAPIType.OfferDynamicDiscount;
|
|
98
|
-
publicStoreFrontData?: PublicStoreFrontData | null;
|
|
99
|
-
isPreview?: boolean;
|
|
100
|
-
};
|
|
101
|
-
declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
|
|
102
|
-
|
|
103
120
|
declare const getPostPurchasePropsPreview: (fetcher: FetchFunc, librarySaleFunnelID?: string, storeFrontFetcher?: FetchFunc) => (data: {
|
|
104
121
|
id: string;
|
|
105
122
|
currentOfferID: string;
|
|
@@ -205,7 +222,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
205
222
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
206
223
|
reset: () => void;
|
|
207
224
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
208
|
-
render(): string | number | boolean | Iterable<
|
|
225
|
+
render(): string | number | boolean | Iterable<React$1.ReactNode> | React$1.PromiseLikeOfReactNode | react_jsx_runtime.JSX.Element | null | undefined;
|
|
209
226
|
}
|
|
210
227
|
|
|
211
228
|
type Props$3 = {
|
|
@@ -233,34 +250,16 @@ type Props = {
|
|
|
233
250
|
};
|
|
234
251
|
declare const TikTokPixel: ({ pixelId }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
235
252
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
pageType: ShopType.PublishedThemePageType;
|
|
239
|
-
};
|
|
253
|
+
declare const CollectionDetailPage: React.FC<CollectionDetailPageProps & AdditionalPageBuilderProps>;
|
|
254
|
+
|
|
240
255
|
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
241
256
|
|
|
242
|
-
|
|
243
|
-
|
|
257
|
+
declare const ProductDetailPage: React.FC<ProductPageProps & AdditionalPageBuilderProps>;
|
|
258
|
+
|
|
259
|
+
declare const StaticPage: React.FC<PageBuilderProps & AdditionalPageBuilderProps>;
|
|
244
260
|
|
|
245
|
-
type BuilderPageProps = {
|
|
246
|
-
components: Record<string, React.ComponentType<any>>;
|
|
247
|
-
seo?: NextSeoProps;
|
|
248
|
-
themeStyle?: string | null;
|
|
249
|
-
fontStyle?: string | null;
|
|
250
|
-
header?: BuilderState;
|
|
251
|
-
footer?: BuilderState;
|
|
252
|
-
sectionData?: Record<string, SectionData$1>;
|
|
253
|
-
storefrontToken?: string | null;
|
|
254
|
-
storefrontHandle?: string | null;
|
|
255
|
-
shopToken?: string | null;
|
|
256
|
-
mode?: RenderMode;
|
|
257
|
-
pageType: ShopType.PublishedThemePageType;
|
|
258
|
-
editorImageToLayout?: boolean;
|
|
259
|
-
isThemeSectionEditor?: boolean;
|
|
260
|
-
hiddenToolbar?: boolean;
|
|
261
|
-
pageName: string;
|
|
262
|
-
isOriginTemplate?: boolean;
|
|
263
|
-
};
|
|
264
261
|
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
265
262
|
|
|
266
|
-
|
|
263
|
+
declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
|
|
264
|
+
|
|
265
|
+
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, ProductDetailPage, StaticPage, 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-dev.
|
|
3
|
+
"version": "2.0.0-dev.504",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "2.0.0-dev.504",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "2.0.0-dev.348",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "2.0.0-dev.348",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.348"
|