@gem-sdk/pages 1.23.0 → 1.24.11
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.
|
@@ -38,7 +38,8 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
38
38
|
throw new Error(`No data builder found for slug: /preview/${slug}`);
|
|
39
39
|
}
|
|
40
40
|
const pageTemplate = normalize.parseBuilderTemplateV2(dataBuilder);
|
|
41
|
-
const [fontStyle, fallback] = await Promise.all([
|
|
41
|
+
const [elementFontStyle, fontStyle, fallback] = await Promise.all([
|
|
42
|
+
googleFonts.getFontStyleFromPageTemplate(pageTemplate),
|
|
42
43
|
googleFonts.getFontFromGlobalStyle(dataBuilder?.pageStyle?.data),
|
|
43
44
|
getFallback.getFallbackV2(fetcher, pageTemplate)
|
|
44
45
|
]);
|
|
@@ -120,6 +121,7 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
120
121
|
return parseJson.serializableJson({
|
|
121
122
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
122
123
|
fontStyle,
|
|
124
|
+
elementFontStyle,
|
|
123
125
|
builderData: pageTemplate,
|
|
124
126
|
pageType,
|
|
125
127
|
moneyFormat: shopMeta?.shop.moneyFormat ?? null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PreviewPageDocument, StorePropertyDocument } from '@gem-sdk/core';
|
|
2
2
|
import { ShopMetaDocument } from '@gem-sdk/adapter-shopify';
|
|
3
3
|
import { captureException } from '@sentry/nextjs';
|
|
4
|
-
import { getFontFromGlobalStyle } from '../google-fonts.js';
|
|
4
|
+
import { getFontStyleFromPageTemplate, getFontFromGlobalStyle } from '../google-fonts.js';
|
|
5
5
|
import { genCSS } from '../helpers/gen-css.js';
|
|
6
6
|
import { generateManifest } from '../helpers/generate-manifres.js';
|
|
7
7
|
import { getFallbackV2 } from '../helpers/get-fallback.js';
|
|
@@ -36,7 +36,8 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
36
36
|
throw new Error(`No data builder found for slug: /preview/${slug}`);
|
|
37
37
|
}
|
|
38
38
|
const pageTemplate = parseBuilderTemplateV2(dataBuilder);
|
|
39
|
-
const [fontStyle, fallback] = await Promise.all([
|
|
39
|
+
const [elementFontStyle, fontStyle, fallback] = await Promise.all([
|
|
40
|
+
getFontStyleFromPageTemplate(pageTemplate),
|
|
40
41
|
getFontFromGlobalStyle(dataBuilder?.pageStyle?.data),
|
|
41
42
|
getFallbackV2(fetcher, pageTemplate)
|
|
42
43
|
]);
|
|
@@ -118,6 +119,7 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
118
119
|
return serializableJson({
|
|
119
120
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
120
121
|
fontStyle,
|
|
122
|
+
elementFontStyle,
|
|
121
123
|
builderData: pageTemplate,
|
|
122
124
|
pageType,
|
|
123
125
|
moneyFormat: shopMeta?.shop.moneyFormat ?? null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"next-seo": "^6.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "1.
|
|
28
|
+
"@gem-sdk/core": "1.24.9",
|
|
29
29
|
"@gem-sdk/plugin-cookie-bar": "*",
|
|
30
30
|
"@gem-sdk/plugin-quick-view": "*",
|
|
31
31
|
"@gem-sdk/plugin-sticky-add-to-cart": "*"
|