@gem-sdk/pages 12.0.0-dev.77 → 12.0.0-dev.80

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.
@@ -1 +1 @@
1
- "use strict";exports.PublishedThemePageMetafields=void 0,function(e){e.CUSTOM_CODE_HEADER="custom_code_header",e.CUSTOM_CODE_BODY="custom_code_body",e.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",e.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",e.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",e.GLOBAL_META_DESCRIPTION="global-meta-description",e.GLOBAL_META_TITLE="global-meta-title",e.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",e.NOINDEX_KEY="noindex",e.NOFOLLOW_KEY="nofollow"}(exports.PublishedThemePageMetafields||(exports.PublishedThemePageMetafields={})),exports.LIBRARY_TYPE_ENUM=void 0,function(e){e.TEMPLATES="templates",e.SECTIONS="sections",e.POST_PURCHASE_UPSELL="post-purchase-upsell",e.THEME_SECTIONS="theme-sections",e.EXISTING_PAGES="existing-page",e.OFFER_PAGE_TEMPLATES="offer-page-templates"}(exports.LIBRARY_TYPE_ENUM||(exports.LIBRARY_TYPE_ENUM={}));
1
+ "use strict";exports.PublishedThemePageMetafields=void 0,function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format"}(exports.PublishedThemePageMetafields||(exports.PublishedThemePageMetafields={})),exports.LIBRARY_TYPE_ENUM=void 0,function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(exports.LIBRARY_TYPE_ENUM||(exports.LIBRARY_TYPE_ENUM={}));
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core"),adapterShopify=require("@gem-sdk/adapter-shopify"),googleFonts=require("../google-fonts.js"),genCss=require("../helpers/gen-css.js"),getFallback=require("../helpers/get-fallback.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),getMetafield=require("../helpers/get-metafield.js"),index=require("../../constants/index.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getStaticPagePropsV2=(e,t)=>async a=>{try{let i="STATIC",l={slug:a,slugType:i},[s,o,d,n]=await Promise.allSettled([e([core.PublishedThemePagesDocument,l]),e([core.StorePropertyDocument]),t([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:["source_font",index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===s.status)throw Error(s.reason?.[0]);let r="fulfilled"===n.status?n.value:void 0,u=r?.publishedShopMetas?.find(e=>e?.key==="source_font"),g=s.value.publishedThemePages?.[0],h=s.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!g)throw Error(`No data builder found for slug: /${a}`);let P=normalize.parseBuilderTemplateV2(g),[f,m,p,c]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(P,u?.value,g?.pageStyle?.data),googleFonts.getFontLinkFromGlobalStyle(g?.pageStyle?.data,u?.value),getFallback.getFallbackV2(e,P),customFonts.getCustomFonts(h)]),T=g.isMobile??!1,M=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,y=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_TITLE,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_TITLE)?.value,b=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),L=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOINDEX_KEY,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOINDEX_KEY)?.value,S=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOFOLLOW_KEY,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value,_="fulfilled"===d.status?d.value:void 0,x="fulfilled"===o.status?o.value:void 0,A=x?.storeProperty?.favicon??"/favicon/favicon-32x32.png",E={defaultTitle:_?.shop.name,title:y||g?.name,description:M??_?.shop.description,openGraph:{locale:_?.localization.country.isoCode,title:(y||g?.name)??_?.shop.name,description:M??_?.shop.description,images:b?[b]:[]},noindex:"true"===L,nofollow:"true"===S,canonical:`https://${x?.storeProperty?.primaryDomain}/${a}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:generateSeoLinks.generateSeoLinks({favicon:A,shopMeta:_})},B=_?.localization.language.isoCode??null,I=_?.localization.country.isoCode??null,k=B&&I?`${B}-${I}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(g?.pageStyle?.data,T),fontStyle:m,elementFontStyle:f,builderData:P,pageType:i,moneyFormat:_?.shop.moneyFormat??null,currency:_?.localization.country.currency.isoCode??null,languageIsoCode:B,countryIsoCode:I,locale:k,swr:{fallback:p},swatches:parseJson.parseJson(x?.storeProperty?.swatchesConfig),seo:E,mobileOnly:T,gaTrackingId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,g?.metafields)??null,facebookPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,g?.metafields)??null,tiktokPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,g?.metafields)??null,customCodeHeader:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,g?.metafields)??null,customCodeBody:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_BODY,g?.metafields)??null,pageHandle:g.handle??null,customFonts:c,interaction:g?.interaction,pageBackground:normalize.extractPageBackground(g)})}catch(e){throw nextjs.captureException(e),e}};exports.getStaticPagePropsV2=getStaticPagePropsV2;
1
+ "use strict";var core=require("@gem-sdk/core"),adapterShopify=require("@gem-sdk/adapter-shopify"),googleFonts=require("../google-fonts.js"),genCss=require("../helpers/gen-css.js"),getFallback=require("../helpers/get-fallback.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),getMetafield=require("../helpers/get-metafield.js"),index=require("../../constants/index.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getStaticPagePropsV2=(e,a)=>async t=>{try{let i="STATIC",l={slug:t,slugType:i},[s,d,o,n]=await Promise.allSettled([e([core.PublishedThemePagesDocument,l]),e([core.StorePropertyDocument]),a([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:["source_font",index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,index.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY,index.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===s.status)throw Error(s.reason?.[0]);let r="fulfilled"===n.status?n.value:void 0,u=r?.publishedShopMetas?.find(e=>e?.key==="source_font"),h=r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY),g=r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT),P=s.value.publishedThemePages?.[0],f=s.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!P)throw Error(`No data builder found for slug: /${t}`);let m=normalize.parseBuilderTemplateV2(P),[T,p,M,c]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(m,u?.value,P?.pageStyle?.data),googleFonts.getFontLinkFromGlobalStyle(P?.pageStyle?.data,u?.value),getFallback.getFallbackV2(e,m),customFonts.getCustomFonts(f)]),y=P.isMobile??!1,b=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,P?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,_=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_TITLE,P?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_TITLE)?.value,S=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,P?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),E=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOINDEX_KEY,P?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOINDEX_KEY)?.value,L=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOFOLLOW_KEY,P?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value,C="fulfilled"===o.status?o.value:void 0,x="fulfilled"===d.status?d.value:void 0,A=x?.storeProperty?.favicon??"/favicon/favicon-32x32.png",I={defaultTitle:C?.shop.name,title:_||P?.name,description:b??C?.shop.description,openGraph:{locale:C?.localization.country.isoCode,title:(_||P?.name)??C?.shop.name,description:b??C?.shop.description,images:S?[S]:[]},noindex:"true"===E,nofollow:"true"===L,canonical:`https://${x?.storeProperty?.primaryDomain}/${t}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:generateSeoLinks.generateSeoLinks({favicon:A,shopMeta:C})},O=C?.localization.language.isoCode??null,k=C?.localization.country.isoCode??null,B=O&&k?`${O}-${k}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(P?.pageStyle?.data,y),fontStyle:p,elementFontStyle:T,builderData:m,pageType:i,moneyFormat:h?.value==="true"?g?.value:C?.shop.moneyFormat??null,currency:C?.localization.country.currency.isoCode??null,languageIsoCode:O,countryIsoCode:k,locale:B,swr:{fallback:M},swatches:parseJson.parseJson(x?.storeProperty?.swatchesConfig),seo:I,mobileOnly:y,gaTrackingId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,P?.metafields)??null,facebookPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,P?.metafields)??null,tiktokPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,P?.metafields)??null,customCodeHeader:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,P?.metafields)??null,customCodeBody:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_BODY,P?.metafields)??null,pageHandle:P.handle??null,customFonts:c,interaction:P?.interaction,pageBackground:normalize.extractPageBackground(P)})}catch(e){throw nextjs.captureException(e),e}};exports.getStaticPagePropsV2=getStaticPagePropsV2;
@@ -1 +1 @@
1
- var PublishedThemePageMetafields,LIBRARY_TYPE_ENUM;!function(e){e.CUSTOM_CODE_HEADER="custom_code_header",e.CUSTOM_CODE_BODY="custom_code_body",e.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",e.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",e.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",e.GLOBAL_META_DESCRIPTION="global-meta-description",e.GLOBAL_META_TITLE="global-meta-title",e.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",e.NOINDEX_KEY="noindex",e.NOFOLLOW_KEY="nofollow"}(PublishedThemePageMetafields||(PublishedThemePageMetafields={})),function(e){e.TEMPLATES="templates",e.SECTIONS="sections",e.POST_PURCHASE_UPSELL="post-purchase-upsell",e.THEME_SECTIONS="theme-sections",e.EXISTING_PAGES="existing-page",e.OFFER_PAGE_TEMPLATES="offer-page-templates"}(LIBRARY_TYPE_ENUM||(LIBRARY_TYPE_ENUM={}));export{LIBRARY_TYPE_ENUM,PublishedThemePageMetafields};
1
+ var PublishedThemePageMetafields,LIBRARY_TYPE_ENUM;!function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format"}(PublishedThemePageMetafields||(PublishedThemePageMetafields={})),function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(LIBRARY_TYPE_ENUM||(LIBRARY_TYPE_ENUM={}));export{LIBRARY_TYPE_ENUM,PublishedThemePageMetafields};
@@ -1 +1 @@
1
- import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as t}from"@gem-sdk/core";import{ShopMetaDocument as a}from"@gem-sdk/adapter-shopify";import{getFontStyleFromPageTemplate as l,getFontLinkFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n,extractPageBackground as d}from"../helpers/normalize.js";import{parseJson as m,serializableJson as p}from"../helpers/parse-json.js";import{captureException as u}from"@sentry/nextjs";import{getCustomFonts as f}from"../custom-fonts.js";import{getPublishedThemePageMetafieldByKey as c}from"../helpers/get-metafield.js";import{PublishedThemePageMetafields as h}from"../../constants/index.js";import{generateSeoLinks as T}from"../helpers/generate-seo-links.js";let getStaticPagePropsV2=(_,g)=>async L=>{try{let u="STATIC",A={slug:L,slugType:u},[y,E,I,O]=await Promise.allSettled([_([e,A]),_([o]),g([a]),_([t,{keys:["source_font",h.GLOBAL_META_DESCRIPTION,h.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===y.status)throw Error(y.reason?.[0]);let S="fulfilled"===O.status?O.value:void 0,M=S?.publishedShopMetas?.find(e=>e?.key==="source_font"),C=y.value.publishedThemePages?.[0],P=y.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!C)throw Error(`No data builder found for slug: /${L}`);let v=n(C),[k,N,B,D]=await Promise.all([l(v,M?.value,C?.pageStyle?.data),s(C?.pageStyle?.data,M?.value),r(_,v),f(P)]),b=C.isMobile??!1,j=c(h.GLOBAL_META_DESCRIPTION,C?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_DESCRIPTION)?.value,G=c(h.GLOBAL_META_TITLE,C?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_TITLE)?.value,w=m(c(h.GLOBAL_META_THUMBNAIL,C?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_THUMBNAIL)?.value),Y=c(h.NOINDEX_KEY,C?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.NOINDEX_KEY)?.value,x=c(h.NOFOLLOW_KEY,C?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.NOFOLLOW_KEY)?.value,K="fulfilled"===I.status?I.value:void 0,F="fulfilled"===E.status?E.value:void 0,H=F?.storeProperty?.favicon??"/favicon/favicon-32x32.png",z={defaultTitle:K?.shop.name,title:G||C?.name,description:j??K?.shop.description,openGraph:{locale:K?.localization.country.isoCode,title:(G||C?.name)??K?.shop.name,description:j??K?.shop.description,images:w?[w]:[]},noindex:"true"===Y,nofollow:"true"===x,canonical:`https://${F?.storeProperty?.primaryDomain}/${L}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:T({favicon:H,shopMeta:K})},R=K?.localization.language.isoCode??null,U=K?.localization.country.isoCode??null,$=R&&U?`${R}-${U}`:null;return p({themeStyle:i(C?.pageStyle?.data,b),fontStyle:N,elementFontStyle:k,builderData:v,pageType:u,moneyFormat:K?.shop.moneyFormat??null,currency:K?.localization.country.currency.isoCode??null,languageIsoCode:R,countryIsoCode:U,locale:$,swr:{fallback:B},swatches:m(F?.storeProperty?.swatchesConfig),seo:z,mobileOnly:b,gaTrackingId:c(h.ANALYTICS_GA_TRACKING_ID,C?.metafields)??null,facebookPixelId:c(h.ANALYTICS_FB_PIXEL_ID,C?.metafields)??null,tiktokPixelId:c(h.ANALYTICS_TIKTOK_PIXEL_ID,C?.metafields)??null,customCodeHeader:c(h.CUSTOM_CODE_HEADER,C?.metafields)??null,customCodeBody:c(h.CUSTOM_CODE_BODY,C?.metafields)??null,pageHandle:C.handle??null,customFonts:D,interaction:C?.interaction,pageBackground:d(C)})}catch(e){throw u(e),e}};export{getStaticPagePropsV2};
1
+ import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as t}from"@gem-sdk/core";import{ShopMetaDocument as a}from"@gem-sdk/adapter-shopify";import{getFontStyleFromPageTemplate as l,getFontLinkFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n,extractPageBackground as d}from"../helpers/normalize.js";import{parseJson as p,serializableJson as u}from"../helpers/parse-json.js";import{captureException as m}from"@sentry/nextjs";import{getCustomFonts as f}from"../custom-fonts.js";import{getPublishedThemePageMetafieldByKey as c}from"../helpers/get-metafield.js";import{PublishedThemePageMetafields as _}from"../../constants/index.js";import{generateSeoLinks as h}from"../helpers/generate-seo-links.js";let getStaticPagePropsV2=(T,E)=>async g=>{try{let m="STATIC",A={slug:g,slugType:m},[I,L,O,y]=await Promise.allSettled([T([e,A]),T([o]),E([a]),T([t,{keys:["source_font",_.GLOBAL_META_DESCRIPTION,_.GLOBAL_META_THUMBNAIL,_.SHOW_PRICE_CURRENCY,_.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===I.status)throw Error(I.reason?.[0]);let C="fulfilled"===y.status?y.value:void 0,M=C?.publishedShopMetas?.find(e=>e?.key==="source_font"),S=C?.publishedShopMetas?.find(e=>e?.key===_.SHOW_PRICE_CURRENCY),N=C?.publishedShopMetas?.find(e=>e?.key===_.MONEY_WITH_CURRENCY_FORMAT),P=I.value.publishedThemePages?.[0],v=I.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!P)throw Error(`No data builder found for slug: /${g}`);let k=n(P),[R,b,B,D]=await Promise.all([l(k,M?.value,P?.pageStyle?.data),s(P?.pageStyle?.data,M?.value),r(T,k),f(v)]),Y=P.isMobile??!1,j=c(_.GLOBAL_META_DESCRIPTION,P?.metafields)||C?.publishedShopMetas?.find(e=>e?.key===_.GLOBAL_META_DESCRIPTION)?.value,G=c(_.GLOBAL_META_TITLE,P?.metafields)||C?.publishedShopMetas?.find(e=>e?.key===_.GLOBAL_META_TITLE)?.value,H=p(c(_.GLOBAL_META_THUMBNAIL,P?.metafields)||C?.publishedShopMetas?.find(e=>e?.key===_.GLOBAL_META_THUMBNAIL)?.value),w=c(_.NOINDEX_KEY,P?.metafields)||C?.publishedShopMetas?.find(e=>e?.key===_.NOINDEX_KEY)?.value,U=c(_.NOFOLLOW_KEY,P?.metafields)||C?.publishedShopMetas?.find(e=>e?.key===_.NOFOLLOW_KEY)?.value,F="fulfilled"===O.status?O.value:void 0,x="fulfilled"===L.status?L.value:void 0,K=x?.storeProperty?.favicon??"/favicon/favicon-32x32.png",W={defaultTitle:F?.shop.name,title:G||P?.name,description:j??F?.shop.description,openGraph:{locale:F?.localization.country.isoCode,title:(G||P?.name)??F?.shop.name,description:j??F?.shop.description,images:H?[H]:[]},noindex:"true"===w,nofollow:"true"===U,canonical:`https://${x?.storeProperty?.primaryDomain}/${g}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:h({favicon:K,shopMeta:F})},z=F?.localization.language.isoCode??null,$=F?.localization.country.isoCode??null,X=z&&$?`${z}-${$}`:null;return u({themeStyle:i(P?.pageStyle?.data,Y),fontStyle:b,elementFontStyle:R,builderData:k,pageType:m,moneyFormat:S?.value==="true"?N?.value:F?.shop.moneyFormat??null,currency:F?.localization.country.currency.isoCode??null,languageIsoCode:z,countryIsoCode:$,locale:X,swr:{fallback:B},swatches:p(x?.storeProperty?.swatchesConfig),seo:W,mobileOnly:Y,gaTrackingId:c(_.ANALYTICS_GA_TRACKING_ID,P?.metafields)??null,facebookPixelId:c(_.ANALYTICS_FB_PIXEL_ID,P?.metafields)??null,tiktokPixelId:c(_.ANALYTICS_TIKTOK_PIXEL_ID,P?.metafields)??null,customCodeHeader:c(_.CUSTOM_CODE_HEADER,P?.metafields)??null,customCodeBody:c(_.CUSTOM_CODE_BODY,P?.metafields)??null,pageHandle:P.handle??null,customFonts:D,interaction:P?.interaction,pageBackground:d(P)})}catch(e){throw m(e),e}};export{getStaticPagePropsV2};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "12.0.0-dev.77",
3
+ "version": "12.0.0-dev.80",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -27,7 +27,7 @@
27
27
  "next": "14.2.35"
28
28
  },
29
29
  "devDependencies": {
30
- "@gem-sdk/core": "12.0.0-dev.74",
30
+ "@gem-sdk/core": "12.0.0-dev.79",
31
31
  "@gem-sdk/plugin-cookie-bar": "12.0.0-dev.53",
32
32
  "@gem-sdk/plugin-quick-view": "12.0.0-dev.53",
33
33
  "@gem-sdk/plugin-sticky-add-to-cart": "12.0.0-dev.53"