@gem-sdk/pages 17.0.0-dev.82 → 17.0.0-dev.83
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.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/libs/api/get-builder-props.js +1 -0
- package/dist/cjs/libs/api/get-collection-props.js +1 -0
- package/dist/cjs/libs/api/get-collection-share-page-props.js +1 -0
- package/dist/cjs/libs/api/get-home-page-props-v2.js +1 -0
- package/dist/cjs/libs/api/get-home-page-props.js +1 -0
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-preview-content-props.js +1 -0
- package/dist/cjs/libs/api/get-preview-props.js +1 -0
- package/dist/cjs/libs/api/get-product-props.js +1 -0
- package/dist/cjs/libs/api/get-share-page-props.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props-v2.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props.js +1 -0
- package/dist/cjs/libs/custom-fonts.js +8 -0
- package/dist/cjs/libs/data/fonts.js +1 -0
- package/dist/cjs/libs/getStaticPaths.js +1 -0
- package/dist/cjs/libs/google-fonts.js +7 -1
- package/dist/cjs/libs/helpers/gen-favicon.js +1 -0
- package/dist/cjs/libs/helpers/generate-seo-links.js +1 -0
- package/dist/cjs/libs/helpers/get-metafield.js +1 -0
- package/dist/cjs/libs/helpers/normalize.js +1 -1
- package/dist/cjs/libs/helpers/parse-json.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/libs/api/get-builder-props.js +1 -0
- package/dist/esm/libs/api/get-collection-props.js +1 -0
- package/dist/esm/libs/api/get-collection-share-page-props.js +1 -0
- package/dist/esm/libs/api/get-home-page-props-v2.js +1 -0
- package/dist/esm/libs/api/get-home-page-props.js +1 -0
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/esm/libs/api/get-preview-content-props.js +1 -0
- package/dist/esm/libs/api/get-preview-props.js +1 -0
- package/dist/esm/libs/api/get-product-props.js +1 -0
- package/dist/esm/libs/api/get-share-page-props.js +1 -0
- package/dist/esm/libs/api/get-static-page-props-preview.js +1 -0
- package/dist/esm/libs/api/get-static-page-props-v2.js +1 -0
- package/dist/esm/libs/api/get-static-page-props.js +1 -0
- package/dist/esm/libs/custom-fonts.js +8 -0
- package/dist/esm/libs/data/fonts.js +1 -0
- package/dist/esm/libs/getStaticPaths.js +1 -0
- package/dist/esm/libs/google-fonts.js +7 -1
- package/dist/esm/libs/helpers/gen-favicon.js +1 -0
- package/dist/esm/libs/helpers/generate-seo-links.js +1 -0
- package/dist/esm/libs/helpers/get-metafield.js +1 -0
- package/dist/esm/libs/helpers/normalize.js +1 -1
- package/dist/esm/libs/helpers/parse-json.js +1 -1
- package/dist/types/index.d.ts +125 -90
- package/package.json +9 -21
- package/dist/cjs/server.js +0 -14
- package/dist/esm/server.js +0 -14
- package/dist/types/server.d.ts +0 -156
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=async()=>({paths:[],fallback:!0});export{t as getStaticPaths};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
import{checkNotInOptionFont as t}from"./helpers/check-option-font.js";import{
|
|
1
|
+
import{checkNotInOptionFont as t}from"./helpers/check-option-font.js";import{getFontsFromDataBuilder as e}from"./helpers/gen-fonts.js";import{sentryCaptureException as n}from"./helpers/sentry.js";import{THEME_FONT_CSS_KEYS as r}from"./constants/theme-font-keys.js";import{googleFontFamilies as i}from"../constants/googleFontV1.js";import a from"./data/fonts.js";let l="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36";async function o(t,e){try{return fetch(t,{headers:{"User-Agent":e}}).then(r=>200===r.status?r.text():(n("getFontForUA",`Unexpected status ${r.status}`,{url:t,UA:e}),""))}catch(r){return n("getFontForUA","Error fetching font",{url:t,UA:e,error:r}),""}}let s=t=>{let e=t.filter((t,e,n)=>e===n.findIndex(e=>e.family===t.family));return e.map(e=>{let n=t.filter(t=>t.family===e.family).reduce((t,e)=>[...t,...e.variants],[]).filter((t,e,n)=>e===n.findIndex(e=>e===t));return{...e,variants:n}})},f={"Roboto Flex":"https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap"},c=t=>t?.trim().replace(/\s+/g,"+")??"",y=t=>t.includes("fonts.googleapis.com/css2")?"css2":t.includes("fonts.bunny.net")?"bunny":"css1",u=t=>{let e=c(t);return f[t]??f[e]},p={regular:"400",normal:"400",bold:"700",italic:"400italic"},g=new Set(i),m=[...r,...r.map(t=>`--g-${t}`)],h=(e,n,r)=>{if(("google"===n||"google"===e.type)&&!g.has(e.family))return!1;let i="google"===e.type||"bunny"===e.type,a="theme"===e.type&&r,l=t(e.family,n);return!(i&&l)&&(i||!e.type||a)},d=t=>{let e=String(t).toLowerCase().trim();return p[e]??t},b=t=>{let e=t=>{let e=String(t).toLowerCase().trim(),n=e.includes("italic"),r=e.replace("italic","").trim(),i=p[r]??r,a=parseInt(i,10)||400;return{weight:a,isItalic:n}};return[...t].sort((t,n)=>{let r=e(t),i=e(n);return r.weight!==i.weight?r.weight-i.weight:r.isItalic!==i.isItalic?r.isItalic?1:-1:0})},v=(t,e,n)=>{let r=s(t).map(t=>{let e=t.variants.map(t=>d(t)),n=b(e);return`${t.family.replace(/ /g,"+")}:${n.join(",")}`}).join("|");if("sans-serif"===r)return;let i=new URLSearchParams;return(i.append("family",r),i.append("display",n?.display||"swap"),"bunny"===e)?`https://fonts.bunny.net/css?${decodeURIComponent(i.toString())}`:(n?.subset&&i.append("subset",n.subset),n?.effect&&i.append("effect",n.effect),`https://fonts.googleapis.com/css?${decodeURIComponent(i.toString())}`)},S=(t,e,n,r)=>{let i=t.filter(t=>h(t,n||"google",r));if(!i.length)return;let a=i.filter((t,e,n)=>e===n.findIndex(e=>e.family===t.family)),l=[],o=[];for(let t of a){let e=u(t.family);e&&"bunny"!==n?l.push(e):o.push(t)}let s=o.length?v(o,n||"google",e):void 0;return l.length&&s?[...l,s]:s?[s,...l]:l};async function w(t,e,r=!0,i){let a=t.filter(t=>!m.includes(t.family)),s=S(a,e,i),f=Array.isArray(s)?s:s?[s]:[];if(!f.length)return"";if(r)return f.map(t=>`@import url('${t}');`).join("");let c="",u="";for(let t of f)try{let[e,n]=await Promise.all([o(t,"Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"),o(t,l)]),r=`${e}${n}`;c+=r,u+=`@import url('${t}');`}catch(r){let e=y(t);n("getFonts",`Error fetching font ${e}`,{url:t,fontType:i,fontApiVersion:e,error:String(r)}),u+="",c+=""}let p=new TextEncoder().encode(c).length;return p<51200?c:u}let F=(t,n)=>{let r=[];return t.forEach(t=>{r.push(...e(t.data,n))}),s(r)},$=(t,e)=>{let n="400";if(null!=t){let e=String(t).toLowerCase().trim();n=d(e)}let r=n,i=e&&"italic"===e.toLowerCase();return i&&!n.includes("italic")&&(r=n.includes("i")?n:`${n}italic`),r},j="heading-",O="subheading-",W="paragraph-",k=t=>{let e=t?.typography??{},n=t?.font??{},r=new Map;Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let i=t.startsWith(j)||t.startsWith(O)?n.heading?"heading":void 0:t.startsWith(W)&&n.body?"body":void 0,a=e.desktop,l=a?.fontFamily,o=l||i;["desktop","mobile","tablet"].forEach(t=>{let i=e[t];if(!i||"object"!=typeof i)return;let l=i.fontFamily||o;if(!l||"string"!=typeof l||!n[l])return;let s=i.fontWeight??a?.fontWeight,f=i.fontStyle??a?.fontStyle;if(null==s)return;let c=$(s,f);r.has(l)||r.set(l,new Set),r.get(l).add(c)})});let i={};return r.forEach((t,e)=>{let r=n[e];r&&(i[e]={variants:Array.from(t).sort(),family:r.family,type:r.type})}),i},E=t=>{let e=t?.typography??{},n=t?.font??{},r=t?.font??{},i={};return Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let a=e.desktop,l=e.mobile,o=e.tablet,s=t.startsWith(j)||t.startsWith(O)?r.heading?"heading":void 0:t.startsWith(W)&&r.body?"body":void 0,f=a?.fontFamily||l?.fontFamily||o?.fontFamily||s;if(!f||"string"!=typeof f)return;let c=n[f],y=r[f],u=c?.family||y?.family||f,p=c?.type||y?.type||"google";u&&(i[t]={family:u,type:p})}),i},I=async(t,e)=>{if(!t)return"";try{let n=JSON.parse(t),r=n?.font??{},i=Object.values(r),a=k(n);Object.keys(a).length>0&&(i=Object.entries(r).filter(([t])=>a[t]).map(([t,e])=>({...e,variants:a[t].variants})));let l=s(i);return w(l,void 0,void 0,e)}catch{return""}},x=(t,e)=>{if(!t)return"";try{let n=JSON.parse(t),r=n?.font??{},i=Object.entries(r).map(([,t])=>t);return w(i,void 0,void 0,e)}catch{return""}};async function A(t,e,n){let r,i=null;if(n)try{i=JSON.parse(n),r=E(i)}catch{}let a=F(t,r);if(!i){if(0===a.length)return[];let t=await w(a,void 0,void 0,e);return t?[t]:[]}let l=k(i),o=new Map,s=new Map,f=(t,e)=>`${t}::${e}`;for(let t of Object.values(l)){if(t.type){let e=f(t.family,t.type),n=o.get(e);if(!n){o.set(e,new Set(t.variants));continue}t.variants.forEach(t=>n.add(t));continue}let e=s.get(t.family);if(!e){s.set(t.family,new Set(t.variants));continue}t.variants.forEach(t=>e.add(t))}if(0===(a=a.map(t=>{let e=o.get(f(t.family,t.type))||s.get(t.family);if(!e)return t;let n=t.variants.filter(t=>!e.has(t));return 0===n.length?null:{...t,variants:n}}).filter(t=>null!==t)).length)return[];let c=await w(a,void 0,void 0,e);return c?[c]:[]}let C=null;function M({fontFamily:t,fontStyle:e,fontWeight:n,src:r,fontDisplay:i}){let a=r.replace(/^"|"$/g,""),l=`@font-face {
|
|
2
|
+
`;return l+=` font-family: '${t}';
|
|
3
|
+
font-style: ${e};
|
|
4
|
+
font-weight: ${n};
|
|
5
|
+
`,i&&(l+=` font-display: ${i};
|
|
6
|
+
`),l+=` src: ${a};
|
|
7
|
+
}`}function T({variant:t}){let e=t.trim().toLowerCase();if("regular"===e||"400"===e)return{fontStyle:"normal",fontWeight:"400"};if("italic"===e)return{fontStyle:"italic",fontWeight:"400"};if("bold"===e||"700"===e)return{fontStyle:"normal",fontWeight:"700"};let n=e.endsWith("i")||e.endsWith("italic"),r=e.replace(/i(talic)?$/,"").trim()||"400";return{fontStyle:n?"italic":"normal",fontWeight:r}}async function L({fonts:t,sourceFont:e}){let r=t.filter(t=>!m.includes(t.family));if(!r.length)return"";let i="bunny"===e,s=i?null:function(){if(C)return C;for(let t of(C={},a.fonts)){let e=`${t.fontFamily}_${t.fontStyle}_${t.fontWeight}`.replace(/\s+/g,"");C[e]=t}return C}(),f=await Promise.all(r.map(async t=>{let r=[],i=[];for(let e of t.variants){if(s){let{fontStyle:n,fontWeight:i}=T({variant:e}),a=`${t.family}_${n}_${i}`.replace(/\s+/g,""),l=s[a];if(l){r.push(M(l));continue}}i.push(e)}if(i.length){let a=S([{...t,variants:i}],void 0,e),s=Array.isArray(a)?a:a?[a]:[],f=await Promise.all(s.map(t=>o(t,l)));for(let e=0;e<f.length;e++){let a=f[e];a?r.push(a):n("resolveFontFaces","API fallback returned empty CSS",{family:t.family,variants:i,url:s[e]})}}return r.length?r.join("\n"):""}));return f.filter(Boolean).join("\n")}async function U({data:t,sourceFont:e}){if(!t)return"";try{let n="string"==typeof t?JSON.parse(t):t,r=n?.font??{},i=Object.values(r),a=k(n);return Object.keys(a).length>0&&(i=Object.entries(r).filter(([t])=>a[t]).map(([t,e])=>Object.assign({},e,{variants:a[t].variants}))),L({fonts:s(i),sourceFont:e})}catch{return""}}async function P({pageTemplate:t,sourceFont:e,data:n}){let r,i=null;if(n)try{i="string"==typeof n?JSON.parse(n):n,r=E(i)}catch{}let a=F(t,r);if(!i){if(!a.length)return[];let t=await L({fonts:a,sourceFont:e});return t?[t]:[]}let l=k(i),o=new Map,s=new Map,f=(t,e)=>`${t}::${e}`;for(let t of Object.values(l))if(t.type){let e=f(t.family,t.type),n=o.get(e);n?t.variants.forEach(t=>n.add(t)):o.set(e,new Set(t.variants))}else{let e=s.get(t.family);e?t.variants.forEach(t=>e.add(t)):s.set(t.family,new Set(t.variants))}if(!(a=a.map(t=>{let e=o.get(f(t.family,t.type))||s.get(t.family);if(!e)return t;let n=t.variants.filter(t=>!e.has(t));return n.length?Object.assign({},t,{variants:n}):null}).filter(t=>null!==t)).length)return[];let c=await L({fonts:a,sourceFont:e});return c?[c]:[]}export{s as composeFonts,S as createFontUrls,k as extractTypographyVariants,x as getFontFromGlobalStyle,I as getFontLinkFromGlobalStyle,A as getFontStyleFromPageTemplate,w as getFonts,U as getStaticFontFacesFromGlobalStyle,P as getStaticFontFacesFromPageTemplate,E as mapTypographyToFontFamily,T as parseVariant,M as staticFontToCSS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=(e,i)=>{if(!e)return"/favicon/favicon-32x32.png";let n=e.split("."),o=n.pop();return["jpg","jpeg","png","gif","webp","ico"].includes(o?.toLocaleLowerCase())?`${n.join(".")}_x${i}.${o}`:e};export{e as genResizeFaviconUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{genResizeFaviconUrl as e}from"./gen-favicon.js";let i=i=>[{rel:"icon",sizes:"32x32",href:e(i,32)},{rel:"icon",sizes:"16x16",href:e(i,16)},{rel:"apple-touch-icon",sizes:"180x180",href:e(i,180)}],r=({favicon:e})=>[...i(e)];export{i as generateFaviconLinks,r as generateSeoLinks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=(e,l)=>l?.find(l=>l?.key===e)?.value;export{e as getPublishedThemePageMetafieldByKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=e=>{let t={};return!function e(t,i={}){if(t){let{childrens:
|
|
1
|
+
let e=e=>{let t={};return!function e(t,i={}){if(t){let{childrens:r,dateModified:n,editorConfigs:o,...a}=t;if("section"===a.type)i[a.uid]=a;else{let t=r?.map(e=>e?.uid)??[];i[a.uid]={...a,childrens:t},r&&r.map(t=>e(t,i))}}}(e,t),{...t}},t=(e,t)=>{let i=t?.filter(t=>e?.some(e=>e?.id===t)),r=i?.map(t=>e?.find(e=>e?.id===t))??[],n=e?.filter(e=>(!e?.id||!i?.includes(e.id))&&!e?.deletedAt)??[];return r.concat(n)};function i(i,r){let n=t(i,r),o=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return o.map(t=>({uid:t.uid,lazy:!!t.settings?.lazy,priority:!!t.settings?.priority,data:e(t)}))}let r=e=>i([...e?.pageSections??[],...e?.themePageCustomSections??[],...e?.themeSections??[]],e?.sectionPosition),n=i=>(function(i,r){let n=t(i,r),o=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return e({uid:"ROOT",tag:"Root",childrens:o})})([...i?.pageSections??[],...i?.themePageCustomSections??[]],i?.sectionPosition),o=e=>{try{let t=e?.metafields?.find(e=>e?.key==="page_background")?.value;return JSON.parse(t??"{}")}catch{return{}}},a=e=>i([...e?.sections??[]],e?.sectionPosition),s=e=>i([...e?.shopLibrarySections??[]],e?.sectionPosition);export{o as extractPageBackground,e as normalizeBuilderData,i as normalizePageSectionResponseV2,a as parseBuilderLibraryTemplate,n as parseBuilderTemplate,r as parseBuilderTemplateV2,s as parseShopLibraryPageTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let r=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}};export{r as parseJson};
|
|
1
|
+
let r=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}},e=r=>JSON.parse(JSON.stringify(r));export{r as parseJson,e as serializableJson};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,97 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { BuilderState, SectionData as SectionData$1, ShopType, RenderMode, CollectionQueryResponse, PublicStoreFrontData, ProductSelectFragment, ProductOffer, AppAPIType, FetchFunc, ThemePageQueryResponse, StorePropertyQueryResponse, PublishedThemePageSelectFragment, TypographyV2FontFamilyType } from '@gem-sdk/core';
|
|
2
|
+
import { NextPage, GetStaticPaths } from 'next';
|
|
3
3
|
import * as next_seo from 'next-seo';
|
|
4
4
|
import { NextSeoProps } from 'next-seo';
|
|
5
|
-
import { ShopMetaQueryResponse } from '@gem-sdk/adapter-shopify';
|
|
6
|
-
import { NextPage } from 'next';
|
|
7
5
|
import { AppProps } from 'next/app';
|
|
8
6
|
import { SWRConfig } from 'swr';
|
|
9
7
|
import * as React$1 from 'react';
|
|
10
8
|
import React__default, { Component } from 'react';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
declare const createAppAPIFetcher: (token?: string | null, shopID?: string) => FetchFunc;
|
|
14
|
-
declare const createShopifyFetcher: (storefrontToken?: string, handle?: string) => FetchFunc;
|
|
15
|
-
declare const createTemplateFetcher: (handle: string) => FetchFunc;
|
|
16
|
-
|
|
17
|
-
declare const getLayout: (page: React.ReactElement, pageProps?: any) => react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
declare const genCSS: (input?: string | Record<string, any>, mobileOnly?: boolean) => string;
|
|
20
|
-
|
|
21
|
-
type SendPageViewedTrackingParams = {
|
|
22
|
-
id: string | number | null | undefined;
|
|
23
|
-
shopID: string | number | null | undefined;
|
|
24
|
-
domain?: string;
|
|
25
|
-
};
|
|
26
|
-
declare const sendPageViewedTracking: (params: SendPageViewedTrackingParams) => void;
|
|
27
|
-
|
|
28
|
-
declare const usePagePreview: (dataBuilder: ThemePageQueryResponse["themePage"], storeProperty: PromiseSettledResult<StorePropertyQueryResponse>, shopifyMeta?: PromiseSettledResult<ShopMetaQueryResponse>) => {
|
|
29
|
-
seo: next_seo.NextSeoProps;
|
|
30
|
-
pageConfig: {
|
|
31
|
-
mobileOnly: boolean;
|
|
32
|
-
locale: string | null;
|
|
33
|
-
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LA" | "LB" | "LT" | "LU" | "LV" | "MG" | "MK" | "ML" | "MN" | "MO" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NO" | "OM" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "RW" | "SA" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SK" | "SL" | "SN" | "SO" | "SR" | "SV" | "TA" | "TG" | "TH" | "TK" | "TO" | "TR" | "TT" | "UG" | "UZ" | "AK" | "AS" | "CE" | "CKB" | "CS" | "DA" | "EL" | "EN" | "EO" | "EU" | "FA" | "FF" | "FIL" | "FY" | "GU" | "GV" | "HA" | "HE" | "HI" | "HY" | "IA" | "IG" | "II" | "JA" | "JV" | "KA" | "KK" | "KL" | "KO" | "KS" | "KU" | "LG" | "LN" | "LO" | "MI" | "NB" | "ND" | "NN" | "OR" | "OS" | "PT_BR" | "PT_PT" | "QU" | "RM" | "RN" | "SQ" | "SU" | "SW" | "TE" | "TI" | "UK" | "UR" | "VI" | "VO" | "WO" | "XH" | "YI" | "YO" | "ZH" | "ZH_CN" | "ZH_TW" | "ZU") | null;
|
|
34
|
-
countryIsoCode: ("ID" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ") | null;
|
|
35
|
-
moneyFormat: string | null;
|
|
36
|
-
currency: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BYR" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KID" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "XXX" | "YER" | "ZAR" | "ZMW") | null;
|
|
37
|
-
swatches: any;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
type IUsePageViewedTrackingParams = {
|
|
42
|
-
id?: string | number | null;
|
|
43
|
-
shopID?: string | number | null;
|
|
44
|
-
enabled?: boolean;
|
|
45
|
-
domain?: string;
|
|
46
|
-
};
|
|
47
|
-
declare const usePageViewedTracking: ({ id, shopID, enabled, domain, }: IUsePageViewedTrackingParams) => void;
|
|
48
|
-
|
|
49
|
-
declare function isBot(input: string): boolean;
|
|
50
|
-
|
|
51
|
-
type SectionData = {
|
|
52
|
-
id: string;
|
|
53
|
-
component?: string;
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
};
|
|
56
|
-
declare function normalizePageSectionResponseV2(sections?: ShopType.Maybe<SectionData>[], orders?: string[]): {
|
|
57
|
-
uid: string;
|
|
58
|
-
lazy: boolean;
|
|
59
|
-
priority: boolean;
|
|
60
|
-
data: any;
|
|
61
|
-
}[];
|
|
62
|
-
type ParseBuilderTemplateV2Props = PublishedThemePageSelectFragment & {
|
|
63
|
-
themeSections?: {
|
|
64
|
-
id: string;
|
|
65
|
-
name: string;
|
|
66
|
-
content: string;
|
|
67
|
-
}[];
|
|
68
|
-
};
|
|
69
|
-
declare const parseBuilderTemplateV2: (data?: ParseBuilderTemplateV2Props) => {
|
|
70
|
-
uid: string;
|
|
71
|
-
lazy: boolean;
|
|
72
|
-
priority: boolean;
|
|
73
|
-
data: any;
|
|
74
|
-
}[];
|
|
75
|
-
|
|
76
|
-
declare const getFallbackV2: (fetcher: FetchFunc, data: {
|
|
77
|
-
data: any;
|
|
78
|
-
}[], isStorefront?: boolean, disableIsSample?: boolean) => Promise<{}>;
|
|
79
|
-
|
|
80
|
-
type RetryConfig = {
|
|
81
|
-
retries?: number;
|
|
82
|
-
delay?: number;
|
|
83
|
-
retryIf?: (error: any) => boolean;
|
|
84
|
-
};
|
|
85
|
-
declare const retryWithDelay: <T = unknown>(fn: () => T, config?: RetryConfig) => Promise<T>;
|
|
86
|
-
|
|
87
|
-
type Props$4 = {
|
|
88
|
-
trackingId?: string | null;
|
|
89
|
-
params?: {
|
|
90
|
-
page_id?: string;
|
|
91
|
-
source_shop_id?: string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
declare const SharePageTracking: ({ trackingId, params }: Props$4) => react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
+
import { ShopMetaQueryResponse } from '@gem-sdk/adapter-shopify';
|
|
95
11
|
|
|
96
12
|
type PageBuilderProps = {
|
|
97
13
|
seo?: NextSeoProps;
|
|
@@ -260,6 +176,125 @@ type SharePageProps = PageBuilderPropsV2 & {
|
|
|
260
176
|
trackingId?: string | null;
|
|
261
177
|
};
|
|
262
178
|
|
|
179
|
+
declare const getCollectionProps: (fetcher: FetchFunc) => (handle?: string) => Promise<CollectionDetailPageProps>;
|
|
180
|
+
|
|
181
|
+
declare const getCollectionSharePageProps: (fetcher: FetchFunc) => (baseId?: string) => Promise<{
|
|
182
|
+
collection: any;
|
|
183
|
+
}>;
|
|
184
|
+
|
|
185
|
+
declare const getHomePageProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderProps>;
|
|
186
|
+
|
|
187
|
+
declare const getHomePagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => () => Promise<PageBuilderPropsV2>;
|
|
188
|
+
|
|
189
|
+
declare const getPreviewProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (pageType: ShopType.PublishedThemePageType, slug?: string) => Promise<PageBuilderProps>;
|
|
190
|
+
|
|
191
|
+
type Props$5 = Pick<PageBuilderProps, 'swr' | 'themeStyle' | 'seo' | 'currency' | 'locale' | 'swatches'>;
|
|
192
|
+
declare const getBuilderProps: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => Promise<Props$5>;
|
|
193
|
+
|
|
194
|
+
declare const getProductProps: (fetcher: FetchFunc) => (handle?: string) => Promise<ProductPageProps>;
|
|
195
|
+
|
|
196
|
+
declare const getStaticPagePropsV2: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
197
|
+
|
|
198
|
+
declare const getSharePageProps: (fetcher: FetchFunc) => (slug: string) => Promise<SharePageProps | null>;
|
|
199
|
+
|
|
200
|
+
declare const getPostPurchasePropsPreview: (fetcher: FetchFunc, librarySaleFunnelID?: string, storeFrontFetcher?: FetchFunc) => (data: {
|
|
201
|
+
id: string;
|
|
202
|
+
currentOfferID: string;
|
|
203
|
+
isLibraryTemplate?: boolean;
|
|
204
|
+
isShopLibraryPage?: boolean;
|
|
205
|
+
sellingPlanSetting?: Record<string, any>;
|
|
206
|
+
}) => Promise<Omit<StaticPagePropsV2, "publicStoreFrontData">>;
|
|
207
|
+
|
|
208
|
+
declare const getStaticPagePropsPreview: (fetcher: FetchFunc, shopifyFetcher: FetchFunc) => (slug: string) => Promise<PageBuilderPropsV2>;
|
|
209
|
+
|
|
210
|
+
declare const getSharePageContentProps: (fetcher: FetchFunc) => (slug: string) => Promise<SharePageProps | null>;
|
|
211
|
+
|
|
212
|
+
declare const createFetcher: (token?: string | null) => FetchFunc;
|
|
213
|
+
declare const createAppAPIFetcher: (token?: string | null, shopID?: string) => FetchFunc;
|
|
214
|
+
declare const createShopifyFetcher: (storefrontToken?: string, handle?: string) => FetchFunc;
|
|
215
|
+
declare const createTemplateFetcher: (handle: string) => FetchFunc;
|
|
216
|
+
|
|
217
|
+
declare const getLayout: (page: React.ReactElement, pageProps?: any) => react_jsx_runtime.JSX.Element;
|
|
218
|
+
|
|
219
|
+
declare const genCSS: (input?: string | Record<string, any>, mobileOnly?: boolean) => string;
|
|
220
|
+
|
|
221
|
+
type SendPageViewedTrackingParams = {
|
|
222
|
+
id: string | number | null | undefined;
|
|
223
|
+
shopID: string | number | null | undefined;
|
|
224
|
+
domain?: string;
|
|
225
|
+
};
|
|
226
|
+
declare const sendPageViewedTracking: (params: SendPageViewedTrackingParams) => void;
|
|
227
|
+
|
|
228
|
+
declare const usePagePreview: (dataBuilder: ThemePageQueryResponse["themePage"], storeProperty: PromiseSettledResult<StorePropertyQueryResponse>, shopifyMeta?: PromiseSettledResult<ShopMetaQueryResponse>) => {
|
|
229
|
+
seo: next_seo.NextSeoProps;
|
|
230
|
+
pageConfig: {
|
|
231
|
+
mobileOnly: boolean;
|
|
232
|
+
locale: string | null;
|
|
233
|
+
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LA" | "LB" | "LT" | "LU" | "LV" | "MG" | "MK" | "ML" | "MN" | "MO" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NO" | "OM" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "RW" | "SA" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SK" | "SL" | "SN" | "SO" | "SR" | "SV" | "TA" | "TG" | "TH" | "TK" | "TO" | "TR" | "TT" | "UG" | "UZ" | "AK" | "AS" | "CE" | "CKB" | "CS" | "DA" | "EL" | "EN" | "EO" | "EU" | "FA" | "FF" | "FIL" | "FY" | "GU" | "GV" | "HA" | "HE" | "HI" | "HY" | "IA" | "IG" | "II" | "JA" | "JV" | "KA" | "KK" | "KL" | "KO" | "KS" | "KU" | "LG" | "LN" | "LO" | "MI" | "NB" | "ND" | "NN" | "OR" | "OS" | "PT_BR" | "PT_PT" | "QU" | "RM" | "RN" | "SQ" | "SU" | "SW" | "TE" | "TI" | "UK" | "UR" | "VI" | "VO" | "WO" | "XH" | "YI" | "YO" | "ZH" | "ZH_CN" | "ZH_TW" | "ZU") | null;
|
|
234
|
+
countryIsoCode: ("ID" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ") | null;
|
|
235
|
+
moneyFormat: string | null;
|
|
236
|
+
currency: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BYR" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KID" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "XXX" | "YER" | "ZAR" | "ZMW") | null;
|
|
237
|
+
swatches: any;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
type IUsePageViewedTrackingParams = {
|
|
242
|
+
id?: string | number | null;
|
|
243
|
+
shopID?: string | number | null;
|
|
244
|
+
enabled?: boolean;
|
|
245
|
+
domain?: string;
|
|
246
|
+
};
|
|
247
|
+
declare const usePageViewedTracking: ({ id, shopID, enabled, domain, }: IUsePageViewedTrackingParams) => void;
|
|
248
|
+
|
|
249
|
+
declare function isBot(input: string): boolean;
|
|
250
|
+
|
|
251
|
+
type SectionData = {
|
|
252
|
+
id: string;
|
|
253
|
+
component?: string;
|
|
254
|
+
[key: string]: any;
|
|
255
|
+
};
|
|
256
|
+
declare function normalizePageSectionResponseV2(sections?: ShopType.Maybe<SectionData>[], orders?: string[]): {
|
|
257
|
+
uid: string;
|
|
258
|
+
lazy: boolean;
|
|
259
|
+
priority: boolean;
|
|
260
|
+
data: any;
|
|
261
|
+
}[];
|
|
262
|
+
type ParseBuilderTemplateV2Props = PublishedThemePageSelectFragment & {
|
|
263
|
+
themeSections?: {
|
|
264
|
+
id: string;
|
|
265
|
+
name: string;
|
|
266
|
+
content: string;
|
|
267
|
+
}[];
|
|
268
|
+
};
|
|
269
|
+
declare const parseBuilderTemplateV2: (data?: ParseBuilderTemplateV2Props) => {
|
|
270
|
+
uid: string;
|
|
271
|
+
lazy: boolean;
|
|
272
|
+
priority: boolean;
|
|
273
|
+
data: any;
|
|
274
|
+
}[];
|
|
275
|
+
|
|
276
|
+
declare const getFallbackV2: (fetcher: FetchFunc, data: {
|
|
277
|
+
data: any;
|
|
278
|
+
}[], isStorefront?: boolean, disableIsSample?: boolean) => Promise<{}>;
|
|
279
|
+
|
|
280
|
+
type RetryConfig = {
|
|
281
|
+
retries?: number;
|
|
282
|
+
delay?: number;
|
|
283
|
+
retryIf?: (error: any) => boolean;
|
|
284
|
+
};
|
|
285
|
+
declare const retryWithDelay: <T = unknown>(fn: () => T, config?: RetryConfig) => Promise<T>;
|
|
286
|
+
|
|
287
|
+
type Props$4 = {
|
|
288
|
+
trackingId?: string | null;
|
|
289
|
+
params?: {
|
|
290
|
+
page_id?: string;
|
|
291
|
+
source_shop_id?: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
declare const SharePageTracking: ({ trackingId, params }: Props$4) => react_jsx_runtime.JSX.Element | null;
|
|
295
|
+
|
|
296
|
+
declare const getStaticPaths: GetStaticPaths;
|
|
297
|
+
|
|
263
298
|
type FontType = 'bunny' | 'google';
|
|
264
299
|
|
|
265
300
|
type FontItem = {
|
|
@@ -305,7 +340,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
305
340
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
306
341
|
reset: () => void;
|
|
307
342
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
308
|
-
render(): string | number | bigint | boolean |
|
|
343
|
+
render(): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<React$1.AwaitedReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
309
344
|
}
|
|
310
345
|
|
|
311
346
|
type Props$3 = {
|
|
@@ -349,5 +384,5 @@ declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderPr
|
|
|
349
384
|
|
|
350
385
|
declare const PreviewTemplate: React.FC<SharePageProps & AdditionalPageBuilderProps>;
|
|
351
386
|
|
|
352
|
-
export { BuilderPage, BuilderUpsellPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, Page404, Page500, PreviewPage, PreviewTemplate, ProductDetailPage, SharePageTracking, StaticPage, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, createTemplateFetcher, genCSS, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFontLinkFromGlobalStyle, getFonts, getFontsFromDataBuilder, getLayout, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, sendPageViewedTracking, usePagePreview, usePageViewedTracking };
|
|
387
|
+
export { BuilderPage, BuilderUpsellPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, Page404, Page500, PreviewPage, PreviewTemplate, ProductDetailPage, SharePageTracking, StaticPage, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, createTemplateFetcher, genCSS, getBuilderProps, getCollectionProps, getCollectionSharePageProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFontLinkFromGlobalStyle, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getSharePageContentProps, getSharePageProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, sendPageViewedTracking, usePagePreview, usePageViewedTracking };
|
|
353
388
|
export type { AppPropsWithLayout, NextPageWithLayout, PageBuilderProps, PageBuilderPropsV2, SharePageAPIResponse, SharePageProps, StaticPagePropsV2 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "17.0.0-dev.
|
|
3
|
+
"version": "17.0.0-dev.83",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"cleanup": "rimraf es dist lib",
|
|
12
12
|
"prebuild": "yarn cleanup",
|
|
13
|
-
"pre:publish": "node
|
|
14
|
-
"post:publish": "node
|
|
15
|
-
"watch": "rollup -c
|
|
16
|
-
"build": "rollup -c
|
|
13
|
+
"pre:publish": "node ./../../helpers/convert-publish.js -p",
|
|
14
|
+
"post:publish": "node ./../../helpers/convert-publish.js",
|
|
15
|
+
"watch": "rollup -c ./../../helpers/rollup.config.mjs -w",
|
|
16
|
+
"build": "rollup -c ./../../helpers/rollup.config.mjs --environment NODE_ENV:production",
|
|
17
17
|
"lint": "oxlint --format=stylish ./src",
|
|
18
18
|
"type-check": "yarn tsc --noEmit",
|
|
19
19
|
"test": "jest -c ./../../helpers/jest.config.ts",
|
|
@@ -27,21 +27,14 @@
|
|
|
27
27
|
"next": "14.2.35"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "17.0.0-dev.
|
|
31
|
-
"@gem-sdk/plugin-cookie-bar": "17.0.0-dev.
|
|
32
|
-
"@gem-sdk/plugin-quick-view": "17.0.0-dev.
|
|
33
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "17.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "17.0.0-dev.83",
|
|
31
|
+
"@gem-sdk/plugin-cookie-bar": "17.0.0-dev.83",
|
|
32
|
+
"@gem-sdk/plugin-quick-view": "17.0.0-dev.83",
|
|
33
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "17.0.0-dev.83"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"next": "14.2.35"
|
|
37
37
|
},
|
|
38
|
-
"typesVersions": {
|
|
39
|
-
"*": {
|
|
40
|
-
"server": [
|
|
41
|
-
"./dist/types/server.d.ts"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
38
|
"module": "dist/esm/index.js",
|
|
46
39
|
"types": "dist/types/index.d.ts",
|
|
47
40
|
"exports": {
|
|
@@ -50,11 +43,6 @@
|
|
|
50
43
|
"import": "./dist/esm/index.js",
|
|
51
44
|
"require": "./dist/cjs/index.js",
|
|
52
45
|
"types": "./dist/types/index.d.ts"
|
|
53
|
-
},
|
|
54
|
-
"./server": {
|
|
55
|
-
"import": "./dist/esm/server.js",
|
|
56
|
-
"require": "./dist/cjs/server.js",
|
|
57
|
-
"types": "./dist/types/server.d.ts"
|
|
58
46
|
}
|
|
59
47
|
}
|
|
60
48
|
}
|