@gem-sdk/pages 2.0.0-dev.1216 → 2.0.0-dev.1220
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";var nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),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");const getSharePageContentProps=(e,t)=>async l=>{try{let{sharedPage:s,customFonts:a,publicToken:r}=await e([l]);if(!s||!r)return null;let{page:o,themeStyle:n,pageMeta:u,shopMeta:i}=s,{sectionPosition:
|
|
1
|
+
"use strict";var nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),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");const getSharePageContentProps=(e,t)=>async l=>{try{let{sharedPage:s,customFonts:a,publicToken:r}=await e([l]);if(!s||!r)return null;let{page:o,themeStyle:n,pageMeta:u,shopMeta:g,moneyFormat:i,moneyWithCurrencyFormat:p}=s,{sectionPosition:c}=o??{},F=normalize.parseBuilderTemplateV2({...s,sectionPosition:c}),[m,f,d,j]=await Promise.allSettled([googleFonts.getFontStyleFromPageTemplate(F),googleFonts.getFontFromGlobalStyle(n?.data),getFallback.getFallbackV2(()=>t([r]),F,!1,!0),customFonts.getCustomFonts(a)]),P="fulfilled"===m.status?m.value:null,S="fulfilled"===f.status?f.value:null,b="fulfilled"===d.status?d.value:null,h="fulfilled"===j.status?j.value:null;return parseJson.serializableJson({builderData:F,page:o,themeStyle:genCss.genCSS(n?.data,!1),pageMeta:u,shopMeta:g,elementFontStyle:P,fontStyle:S,swr:{fallback:b||void 0},customFonts:h,publicStoreFrontData:r?{token:r,endpoint:process.env.NEXT_PUBLIC_API_URL??""}:null,pageType:o?.type,moneyFormat:i,moneyWithCurrencyFormat:p})}catch(e){return nextjs.captureException(e),null}};exports.getSharePageContentProps=getSharePageContentProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{captureException as
|
|
1
|
+
import{captureException as e}from"@sentry/nextjs";import{getCustomFonts as t}from"../custom-fonts.js";import{getFontStyleFromPageTemplate as l,getFontFromGlobalStyle as r}from"../google-fonts.js";import{genCSS as s}from"../helpers/gen-css.js";import{getFallbackV2 as o}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as a}from"../helpers/normalize.js";import{serializableJson as n}from"../helpers/parse-json.js";let getSharePageContentProps=(u,p)=>async f=>{try{let{sharedPage:e,customFonts:i,publicToken:m}=await u([f]);if(!e||!m)return null;let{page:c,themeStyle:d,pageMeta:g,shopMeta:h,moneyFormat:j,moneyWithCurrencyFormat:P}=e,{sectionPosition:v}=c??{},y=a({...e,sectionPosition:v}),[S,b,k,w]=await Promise.allSettled([l(y),r(d?.data),o(()=>p([m]),y,!1,!0),t(i)]),C="fulfilled"===S.status?S.value:null,_="fulfilled"===b.status?b.value:null,x="fulfilled"===k.status?k.value:null,D="fulfilled"===w.status?w.value:null;return n({builderData:y,page:c,themeStyle:s(d?.data,!1),pageMeta:g,shopMeta:h,elementFontStyle:C,fontStyle:_,swr:{fallback:x||void 0},customFonts:D,publicStoreFrontData:m?{token:m,endpoint:process.env.NEXT_PUBLIC_API_URL??""}:null,pageType:c?.type,moneyFormat:j,moneyWithCurrencyFormat:P})}catch(t){return e(t),null}};export{getSharePageContentProps};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -146,6 +146,9 @@ type SharePageProps = PageBuilderPropsV2 & {
|
|
|
146
146
|
value: string;
|
|
147
147
|
}[];
|
|
148
148
|
shopMeta?: any;
|
|
149
|
+
pageType?: ShopType.PublishedThemePageType;
|
|
150
|
+
moneyFormat?: string | null;
|
|
151
|
+
moneyWithCurrencyFormat?: string | null;
|
|
149
152
|
};
|
|
150
153
|
|
|
151
154
|
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<CollectionDetailPageProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.1220",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "2.0.0-dev.1218",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "2.0.0-dev.1206",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "2.0.0-dev.1206",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.1206"
|