@gem-sdk/pages 1.25.0 → 1.25.3
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.
|
@@ -35,7 +35,8 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
35
35
|
throw new Error(`No data builder found for Home page`);
|
|
36
36
|
}
|
|
37
37
|
const homeTemplate = normalize.parseBuilderTemplateV2(dataBuilder);
|
|
38
|
-
const [fontStyle, fallback] = await Promise.all([
|
|
38
|
+
const [elementFontStyle, fontStyle, fallback] = await Promise.all([
|
|
39
|
+
googleFonts.getFontStyleFromPageTemplate(homeTemplate),
|
|
39
40
|
googleFonts.getFontFromGlobalStyle(dataBuilder?.pageStyle?.data),
|
|
40
41
|
getFallback.getFallbackV2(fetcher, homeTemplate)
|
|
41
42
|
]);
|
|
@@ -115,6 +116,7 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
115
116
|
return parseJson.serializableJson({
|
|
116
117
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
117
118
|
fontStyle,
|
|
119
|
+
elementFontStyle,
|
|
118
120
|
builderData: homeTemplate,
|
|
119
121
|
swr: {
|
|
120
122
|
fallback
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PublishedThemePagesDocument, StorePropertyDocument } from '@gem-sdk/core';
|
|
2
2
|
import { ShopMetaDocument } from '@gem-sdk/adapter-shopify';
|
|
3
|
-
import { getFontFromGlobalStyle } from '../google-fonts.js';
|
|
3
|
+
import { getFontStyleFromPageTemplate, getFontFromGlobalStyle } from '../google-fonts.js';
|
|
4
4
|
import { genCSS } from '../helpers/gen-css.js';
|
|
5
5
|
import { generateManifest } from '../helpers/generate-manifres.js';
|
|
6
6
|
import { getFallbackV2 } from '../helpers/get-fallback.js';
|
|
@@ -33,7 +33,8 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
33
33
|
throw new Error(`No data builder found for Home page`);
|
|
34
34
|
}
|
|
35
35
|
const homeTemplate = parseBuilderTemplateV2(dataBuilder);
|
|
36
|
-
const [fontStyle, fallback] = await Promise.all([
|
|
36
|
+
const [elementFontStyle, fontStyle, fallback] = await Promise.all([
|
|
37
|
+
getFontStyleFromPageTemplate(homeTemplate),
|
|
37
38
|
getFontFromGlobalStyle(dataBuilder?.pageStyle?.data),
|
|
38
39
|
getFallbackV2(fetcher, homeTemplate)
|
|
39
40
|
]);
|
|
@@ -113,6 +114,7 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
113
114
|
return serializableJson({
|
|
114
115
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
115
116
|
fontStyle,
|
|
117
|
+
elementFontStyle,
|
|
116
118
|
builderData: homeTemplate,
|
|
117
119
|
swr: {
|
|
118
120
|
fallback
|