@gem-sdk/pages 19.0.0-staging.14 → 19.0.0-staging.28

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