@gem-sdk/pages 17.0.0-dev.81 → 17.0.0-dev.83
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 +1 -1
- package/dist/cjs/libs/api/get-builder-props.js +1 -0
- package/dist/cjs/libs/api/get-collection-props.js +1 -0
- package/dist/cjs/libs/api/get-collection-share-page-props.js +1 -0
- package/dist/cjs/libs/api/get-home-page-props-v2.js +1 -0
- package/dist/cjs/libs/api/get-home-page-props.js +1 -0
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-preview-content-props.js +1 -0
- package/dist/cjs/libs/api/get-preview-props.js +1 -0
- package/dist/cjs/libs/api/get-product-props.js +1 -0
- package/dist/cjs/libs/api/get-share-page-props.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props-v2.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props.js +1 -0
- package/dist/cjs/libs/custom-fonts.js +8 -0
- package/dist/cjs/libs/data/fonts.js +1 -0
- package/dist/cjs/libs/getStaticPaths.js +1 -0
- package/dist/cjs/libs/google-fonts.js +7 -1
- package/dist/cjs/libs/helpers/gen-favicon.js +1 -0
- package/dist/cjs/libs/helpers/generate-seo-links.js +1 -0
- package/dist/cjs/libs/helpers/get-metafield.js +1 -0
- package/dist/cjs/libs/helpers/normalize.js +1 -1
- package/dist/cjs/libs/helpers/parse-json.js +1 -1
- package/dist/cjs/pages/static-v2.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/libs/api/get-builder-props.js +1 -0
- package/dist/esm/libs/api/get-collection-props.js +1 -0
- package/dist/esm/libs/api/get-collection-share-page-props.js +1 -0
- package/dist/esm/libs/api/get-home-page-props-v2.js +1 -0
- package/dist/esm/libs/api/get-home-page-props.js +1 -0
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/esm/libs/api/get-preview-content-props.js +1 -0
- package/dist/esm/libs/api/get-preview-props.js +1 -0
- package/dist/esm/libs/api/get-product-props.js +1 -0
- package/dist/esm/libs/api/get-share-page-props.js +1 -0
- package/dist/esm/libs/api/get-static-page-props-preview.js +1 -0
- package/dist/esm/libs/api/get-static-page-props-v2.js +1 -0
- package/dist/esm/libs/api/get-static-page-props.js +1 -0
- package/dist/esm/libs/custom-fonts.js +8 -0
- package/dist/esm/libs/data/fonts.js +1 -0
- package/dist/esm/libs/getStaticPaths.js +1 -0
- package/dist/esm/libs/google-fonts.js +7 -1
- package/dist/esm/libs/helpers/gen-favicon.js +1 -0
- package/dist/esm/libs/helpers/generate-seo-links.js +1 -0
- package/dist/esm/libs/helpers/get-metafield.js +1 -0
- package/dist/esm/libs/helpers/normalize.js +1 -1
- package/dist/esm/libs/helpers/parse-json.js +1 -1
- package/dist/esm/pages/static-v2.js +2 -2
- package/dist/types/index.d.ts +125 -90
- package/package.json +9 -21
- package/dist/cjs/server.js +0 -14
- package/dist/esm/server.js +0 -14
- package/dist/types/server.d.ts +0 -156
package/dist/types/server.d.ts
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { BuilderState, SectionData, ShopType, RenderMode, CollectionQueryResponse, ProductOffer, AppAPIType, PublicStoreFrontData, ProductSelectFragment, FetchFunc } from '@gem-sdk/core';
|
|
2
|
-
import { NextSeoProps } from 'next-seo';
|
|
3
|
-
import { SWRConfig } from 'swr';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { GetStaticPaths } from 'next';
|
|
6
|
-
|
|
7
|
-
type PageBuilderProps = {
|
|
8
|
-
seo?: NextSeoProps;
|
|
9
|
-
builderData?: BuilderState;
|
|
10
|
-
sectionData?: Record<string, SectionData>;
|
|
11
|
-
themeStyle?: string | null;
|
|
12
|
-
fontStyle?: string | null;
|
|
13
|
-
elementFontStyle?: string[] | null;
|
|
14
|
-
swr?: React.ComponentProps<typeof SWRConfig>['value'];
|
|
15
|
-
plugins?: string[];
|
|
16
|
-
pageType?: ShopType.PublishedThemePageType;
|
|
17
|
-
storefrontToken?: string | null;
|
|
18
|
-
storefrontHandle?: string | null;
|
|
19
|
-
shopToken?: string | null;
|
|
20
|
-
pageHandle?: string | null;
|
|
21
|
-
currency?: string | null;
|
|
22
|
-
moneyFormat?: string | null;
|
|
23
|
-
moneyWithCurrencyFormat?: string | null;
|
|
24
|
-
locale?: string | null;
|
|
25
|
-
languageIsoCode?: string | null;
|
|
26
|
-
countryIsoCode?: string | null;
|
|
27
|
-
favicon?: string | null;
|
|
28
|
-
mobileOnly?: boolean | null;
|
|
29
|
-
swatches?: any[] | null;
|
|
30
|
-
mode?: RenderMode;
|
|
31
|
-
gaTrackingId?: string | null;
|
|
32
|
-
tiktokPixelId?: string | null;
|
|
33
|
-
facebookPixelId?: string | null;
|
|
34
|
-
customCodeHeader?: string | null;
|
|
35
|
-
customCodeBody?: string | null;
|
|
36
|
-
isStorefront?: boolean;
|
|
37
|
-
customFonts?: string | null;
|
|
38
|
-
interaction?: ShopType.Maybe<Pick<ShopType.PublishedPageInteraction, 'id' | 'value'>>;
|
|
39
|
-
timezone?: string;
|
|
40
|
-
pageBackground?: {
|
|
41
|
-
isUsePageBackground?: boolean;
|
|
42
|
-
background?: string;
|
|
43
|
-
};
|
|
44
|
-
id?: string | null;
|
|
45
|
-
shopID?: string | null;
|
|
46
|
-
};
|
|
47
|
-
type PageBuilderPropsV2 = {
|
|
48
|
-
builderData?: {
|
|
49
|
-
uid: string;
|
|
50
|
-
lazy?: boolean;
|
|
51
|
-
priority?: boolean;
|
|
52
|
-
data: BuilderState;
|
|
53
|
-
}[];
|
|
54
|
-
} & Omit<PageBuilderProps, 'builderData'>;
|
|
55
|
-
type CollectionDetailPageProps = PageBuilderProps & {
|
|
56
|
-
collection?: CollectionQueryResponse['collection'];
|
|
57
|
-
};
|
|
58
|
-
type ProductPageProps = PageBuilderProps & {
|
|
59
|
-
product?: ProductSelectFragment;
|
|
60
|
-
};
|
|
61
|
-
type StaticPagePropsV2 = PageBuilderPropsV2 & {
|
|
62
|
-
id?: string | null;
|
|
63
|
-
shopID?: string | null;
|
|
64
|
-
domainTrackingIlp?: string;
|
|
65
|
-
disableGsFont?: boolean;
|
|
66
|
-
isPostPurchase?: boolean;
|
|
67
|
-
shopName?: string;
|
|
68
|
-
productOffers?: ProductOffer[];
|
|
69
|
-
dynamicDiscountOffer?: AppAPIType.OfferDynamicDiscount;
|
|
70
|
-
publicStoreFrontData?: PublicStoreFrontData | null;
|
|
71
|
-
isPreview?: boolean;
|
|
72
|
-
domain?: string;
|
|
73
|
-
sellingPlanSetting?: Record<string, any>;
|
|
74
|
-
buyerConsentPreCheck?: Record<string, boolean>;
|
|
75
|
-
};
|
|
76
|
-
type SharePageType = {
|
|
77
|
-
designerName?: string | null;
|
|
78
|
-
id: string;
|
|
79
|
-
thumbnails?: string[] | null;
|
|
80
|
-
title: string;
|
|
81
|
-
};
|
|
82
|
-
type SharePageProps = PageBuilderPropsV2 & {
|
|
83
|
-
publicStoreFrontData?: PublicStoreFrontData | null;
|
|
84
|
-
seo?: NextSeoProps;
|
|
85
|
-
builderData?: {
|
|
86
|
-
uid: string;
|
|
87
|
-
lazy?: boolean;
|
|
88
|
-
priority?: boolean;
|
|
89
|
-
data: BuilderState;
|
|
90
|
-
}[];
|
|
91
|
-
page?: {
|
|
92
|
-
id: string;
|
|
93
|
-
name?: string;
|
|
94
|
-
sectionPosition?: string[];
|
|
95
|
-
type?: string;
|
|
96
|
-
shopID?: string;
|
|
97
|
-
};
|
|
98
|
-
themeStyle?: any;
|
|
99
|
-
share?: SharePageType;
|
|
100
|
-
pageSections?: {
|
|
101
|
-
id: bigint;
|
|
102
|
-
themePageID: bigint;
|
|
103
|
-
shopID: bigint;
|
|
104
|
-
cid: string;
|
|
105
|
-
name: string;
|
|
106
|
-
component: any;
|
|
107
|
-
};
|
|
108
|
-
pageMeta?: {
|
|
109
|
-
id: string;
|
|
110
|
-
themePageID: string;
|
|
111
|
-
key: string;
|
|
112
|
-
value: string;
|
|
113
|
-
}[];
|
|
114
|
-
shopMeta?: any;
|
|
115
|
-
pageType?: ShopType.PublishedThemePageType;
|
|
116
|
-
moneyFormat?: string | null;
|
|
117
|
-
moneyWithCurrencyFormat?: string | null;
|
|
118
|
-
trackingId?: string | null;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<CollectionDetailPageProps>;
|
|
122
|
-
|
|
123
|
-
declare const getCollectionSharePageProps: (fetcher: FetchFunc) => (baseId?: string) => Promise<{
|
|
124
|
-
collection: any;
|
|
125
|
-
}>;
|
|
126
|
-
|
|
127
|
-
declare const getHomePageProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderProps>;
|
|
128
|
-
|
|
129
|
-
declare const getHomePagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderPropsV2>;
|
|
130
|
-
|
|
131
|
-
declare const getPreviewProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (pageType: ShopType.PublishedThemePageType, slug?: string) => Promise<PageBuilderProps>;
|
|
132
|
-
|
|
133
|
-
type Props = Pick<PageBuilderProps, 'swr' | 'themeStyle' | 'seo' | 'currency' | 'locale' | 'swatches'>;
|
|
134
|
-
declare const getBuilderProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => Promise<Props>;
|
|
135
|
-
|
|
136
|
-
declare const getProductProps: (fetcher: FetchFunc) => (handle?: string) => Promise<ProductPageProps>;
|
|
137
|
-
|
|
138
|
-
declare const getStaticPagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
139
|
-
|
|
140
|
-
declare const getSharePageProps: (fetcher: FetchFunc) => (slug: string) => Promise<SharePageProps | null>;
|
|
141
|
-
|
|
142
|
-
declare const getPostPurchasePropsPreview: (fetcher: FetchFunc, librarySaleFunnelID?: string, storeFrontFetcher?: FetchFunc) => (data: {
|
|
143
|
-
id: string;
|
|
144
|
-
currentOfferID: string;
|
|
145
|
-
isLibraryTemplate?: boolean;
|
|
146
|
-
isShopLibraryPage?: boolean;
|
|
147
|
-
sellingPlanSetting?: Record<string, any>;
|
|
148
|
-
}) => Promise<Omit<StaticPagePropsV2, "publicStoreFrontData">>;
|
|
149
|
-
|
|
150
|
-
declare const getStaticPagePropsPreview: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
151
|
-
|
|
152
|
-
declare const getSharePageContentProps: (fetcher: FetchFunc) => (slug: string) => Promise<SharePageProps | null>;
|
|
153
|
-
|
|
154
|
-
declare const getStaticPaths: GetStaticPaths;
|
|
155
|
-
|
|
156
|
-
export { getBuilderProps, getCollectionProps, getCollectionSharePageProps, getHomePageProps, getHomePagePropsV2, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getSharePageContentProps, getSharePageProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths };
|