@gem-sdk/pages 17.0.0-dev.88 → 17.0.0-dev.92
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/libs/hooks/useFirstSectionIndex.js +1 -0
- package/dist/cjs/pages/headless.js +3 -3
- package/dist/cjs/pages/preview-template.js +3 -3
- package/dist/cjs/pages/static-v2.js +3 -3
- package/dist/esm/libs/hooks/useFirstSectionIndex.js +1 -0
- package/dist/esm/pages/headless.js +3 -3
- package/dist/esm/pages/preview-template.js +3 -3
- package/dist/esm/pages/static-v2.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=t=>e.useMemo(()=>t?.findIndex(e=>e.data[e.uid]?.tag==="Section")??0,[t]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),i=require("../libs/parse-html.js"),n=require("next/script"),l=require("react"),d=require("../libs/hooks/usePageViewedTracking.js");exports.Headless=({components:
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),i=require("../libs/parse-html.js"),n=require("next/script"),l=require("react"),d=require("../libs/hooks/usePageViewedTracking.js"),o=require("../libs/hooks/useFirstSectionIndex.js");exports.Headless=({components:c,builderData:g,sectionData:u,seo:p,themeStyle:m,fontStyle:h,elementFontStyle:x,customCodeHeader:y,customFonts:f,isPostPurchase:j,productOffers:_,publicStoreFrontData:v,dynamicDiscountOffer:b,isPreview:P,interaction:q,pageBackground:S,sellingPlanSetting:k,buyerConsentPreCheck:N,id:T,shopID:H,domainTrackingIlp:I,disableGsFont:L})=>{let M=a.useRouter(),E=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";d.usePageViewedTracking({id:T,shopID:H,domain:I});let $="custom-code-header",w=o.default(g);if(l.useEffect(()=>{let e=document.querySelectorAll(`[class*="${$}-"]`),s=[];e.length>1&&e.forEach(e=>{let r=e.className;if(s.includes(r)){e.remove();return}s.push(r)})},[]),M.isFallback)return e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let z=(q?.value||[]).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(r.NextSeo,{...p}),e.jsxs(t,{children:[i.parseHtml($,y,!0),m&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:m}},"global-style"),h&&!L&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:h}},"google-fonts"),x&&x.map(s=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:s}},s)),f&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:f}},h),S?.isUsePageBackground&&S?.background&&e.jsx("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${S.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${S?.background}`)]}),e.jsx(s.PageProvider,{productOffers:_,publicStoreFrontData:v,dynamicDiscountOffer:b,sellingPlanMeta:k,buyerConsentChecked:N,children:e.jsx(s.BuilderComponentProvider,{components:c,children:e.jsxs("div",{role:"main",children:[z&&e.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(q?.value||[])}</div>`}}),e.jsx(s.SectionProvider,{data:u,children:g?.map((r,t)=>e.jsx(s.LazyPriorityProvider,{priority:!!r.priority||t===w,children:e.jsxs(s.BuilderProvider,{state:r.data,lazy:r.lazy,priority:r.priority,isPostPurchase:j,isPreview:P,children:[e.jsx(s.Render,{uid:r.uid}),z&&e.jsx(n,{defer:!0,src:`${E}/assets-v2/gp-flow-action-lip-v7-5.js`})]})},r.uid))})]})})})]})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("next/head"),s=require("next/router"),a=require("../libs/parse-html.js"),i=require("react"),l=require("next/dynamic");exports.PreviewTemplate=({components:
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("next/head"),s=require("next/router"),a=require("../libs/parse-html.js"),i=require("react"),l=require("../libs/hooks/useFirstSectionIndex.js"),n=require("next/dynamic");exports.PreviewTemplate=({components:d,builderData:o,sectionData:c,themeStyle:g,fontStyle:u,elementFontStyle:p,customCodeHeader:m,customFonts:h,pageBackground:x,publicStoreFrontData:y,page:j,collection:f,dynamicCollection:_,dynamicProduct:v})=>{let{disableExternalLinks:P}=t.usePreviewSharePage(),b=s.useRouter(),{t:q}=t.useI18n(),k="custom-code-header",S=l.default(o),I=n(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),T=j?.type==="GP_COLLECTION"?I:i.Fragment;return(i.useEffect(()=>{let e=document.querySelectorAll(`[class*="${k}-"]`),t=[];e.length>1&&e.forEach(e=>{let r=e.className;if(t.includes(r)){e.remove();return}t.push(r)})},[]),i.useEffect(()=>{P()},[P]),b.isFallback)?e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(r,{children:[a.parseHtml(k,m,!0),g&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:g}},"global-style"),u&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}},"google-fonts"),p&&p.map(t=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),h&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:h}},u),x?.isUsePageBackground&&x?.background&&e.jsx("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${x.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${x?.background}`)]}),e.jsx(t.PageProvider,{publicStoreFrontData:y,dynamicCollection:_,dynamicProduct:v,children:e.jsx(T,{collection:f,children:e.jsx(t.BuilderComponentProvider,{components:d,children:e.jsx("div",{id:"storefront","data-page-name":j?.name,"data-assigned-product-title":v?.productTitle,"data-assigned-collection-title":_?.collectionTitle,children:e.jsx(t.SectionProvider,{data:c,children:e.jsx(t.I18nProvider,{t:q,children:o?.map((r,s)=>e.jsx(t.LazyPriorityProvider,{priority:!!r.priority||s===S,children:e.jsx(t.BuilderProvider,{state:r.data,lazy:r.lazy,priority:r.priority,isPreview:!0,children:e.jsx(t.Render,{uid:r.uid})})},r.uid))})})})})})})]})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),i=require("../libs/parse-html.js"),n=require("../components/builder/Header.js"),l=require("../components/FooterForPostPurchase.js"),o=require("next/script"),d=require("react"),c=require("../libs/hooks/usePageViewedTracking.js");exports.StaticPageV2=({components:g,builderData:
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),i=require("../libs/parse-html.js"),n=require("../components/builder/Header.js"),l=require("../components/FooterForPostPurchase.js"),o=require("next/script"),d=require("react"),c=require("../libs/hooks/usePageViewedTracking.js"),u=require("../libs/hooks/useFirstSectionIndex.js");exports.StaticPageV2=({components:g,builderData:p,sectionData:m,seo:h,themeStyle:x,fontStyle:y,elementFontStyle:j,customCodeHeader:f,customFonts:_,isPostPurchase:v,shopName:P,productOffers:b,publicStoreFrontData:S,dynamicDiscountOffer:q,isPreview:k,interaction:N,pageBackground:T,sellingPlanSetting:I,buyerConsentPreCheck:H,id:L,shopID:E,domainTrackingIlp:F,disableGsFont:M})=>{let $=a.useRouter(),{t:w}=s.useI18n(),z=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";c.usePageViewedTracking({id:L,shopID:E,domain:F});let A="custom-code-header",B=u.default(p);if(d.useEffect(()=>{let e=document.querySelectorAll(`[class*="${A}-"]`),s=[];e.length>1&&e.forEach(e=>{let r=e.className;if(s.includes(r)){e.remove();return}s.push(r)})},[]),$.isFallback)return e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let C=(N?.value||[]).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(r.NextSeo,{...h}),e.jsxs(t,{children:[i.parseHtml(A,f,!0),x&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"global-style"),y&&!M&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:y}},"google-fonts"),j&&j.map(s=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:s}},s)),_&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:_}},y),T?.isUsePageBackground&&T?.background&&e.jsx("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${T.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${T?.background}`)]}),e.jsx(s.PageProvider,{productOffers:b,publicStoreFrontData:S,dynamicDiscountOffer:q,sellingPlanMeta:I,buyerConsentChecked:H,children:e.jsx(s.BuilderComponentProvider,{components:g,children:e.jsx(s.I18nProvider,{t:w,children:e.jsxs("div",{className:`${v?"gp-bg-white post-purchase-page":""} `,role:"main",children:[v&&e.jsx(n.default,{pageType:"POST_PURCHASE"}),C&&e.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(N?.value||[])}</div>`}}),e.jsx(s.SectionProvider,{data:m,children:p?.map((r,t)=>e.jsx(s.LazyPriorityProvider,{priority:!!r.priority||t===B,children:e.jsxs(s.BuilderProvider,{state:r.data,lazy:r.lazy,priority:r.priority,isPostPurchase:v,isPreview:k,children:[e.jsx(s.Render,{uid:r.uid}),C&&e.jsx(o,{defer:!0,src:`${z}/assets-v2/gp-flow-action-lip-v7-5.js`})]})},r.uid))}),v&&e.jsx(l.default,{shopName:P||""})]})})})})]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as t}from"react";let e=e=>t(()=>e?.findIndex(t=>t.data[t.uid]?.tag==="Section")??0,[e]);export{e as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{PageProvider as r,BuilderComponentProvider as a,SectionProvider as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{PageProvider as r,BuilderComponentProvider as a,SectionProvider as n,LazyPriorityProvider as l,BuilderProvider as i,Render as o}from"@gem-sdk/core";import{NextSeo as d}from"next-seo";import p from"next/head";import{useRouter as c}from"next/router";import{parseHtml as g}from"../libs/parse-html.js";import m from"next/script";import{useEffect as u}from"react";import{usePageViewedTracking as h}from"../libs/hooks/usePageViewedTracking.js";import f from"../libs/hooks/useFirstSectionIndex.js";let y=({components:y,builderData:_,sectionData:b,seo:v,themeStyle:x,fontStyle:k,elementFontStyle:S,customCodeHeader:N,customFonts:T,isPostPurchase:I,productOffers:P,publicStoreFrontData:j,dynamicDiscountOffer:H,isPreview:L,interaction:M,pageBackground:$,sellingPlanSetting:q,buyerConsentPreCheck:E,id:w,shopID:z,domainTrackingIlp:A,disableGsFont:D})=>{let F=c(),O=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";h({id:w,shopID:z,domain:A});let B="custom-code-header",C=f(_);if(u(()=>{let e=document.querySelectorAll(`[class*="${B}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),F.isFallback)return e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let U=(M?.value||[]).length>0;return t(s,{children:[e(d,{...v}),t(p,{children:[g(B,N,!0),x&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"global-style"),k&&!D&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:k}},"google-fonts"),S&&S.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),T&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:T}},k),$?.isUsePageBackground&&$?.background&&e("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${$.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${$?.background}`)]}),e(r,{productOffers:P,publicStoreFrontData:j,dynamicDiscountOffer:H,sellingPlanMeta:q,buyerConsentChecked:E,children:e(a,{components:y,children:t("div",{role:"main",children:[U&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(M?.value||[])}</div>`}}),e(n,{data:b,children:_?.map((s,r)=>e(l,{priority:!!s.priority||r===C,children:t(i,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:I,isPreview:L,children:[e(o,{uid:s.uid}),U&&e(m,{defer:!0,src:`${O}/assets-v2/gp-flow-action-lip-v7-5.js`})]})},s.uid))})]})})})]})};export{y as Headless};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{usePreviewSharePage as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{usePreviewSharePage as r,useI18n as l,PageProvider as n,BuilderComponentProvider as i,SectionProvider as s,I18nProvider as o,LazyPriorityProvider as d,BuilderProvider as c,Render as p}from"@gem-sdk/core";import m from"next/head";import{useRouter as g}from"next/router";import{parseHtml as u}from"../libs/parse-html.js";import{useEffect as h,Fragment as y}from"react";import f from"../libs/hooks/useFirstSectionIndex.js";import _ from"next/dynamic";let b=({components:b,builderData:x,sectionData:k,themeStyle:v,fontStyle:T,elementFontStyle:N,customCodeHeader:S,customFonts:I,pageBackground:L,publicStoreFrontData:P,page:j,collection:q,dynamicCollection:C,dynamicProduct:F})=>{let{disableExternalLinks:H}=r(),M=g(),{t:$}=l(),w="custom-code-header",z=f(x),E=_(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),O=j?.type==="GP_COLLECTION"?E:y;return(h(()=>{let e=document.querySelectorAll(`[class*="${w}-"]`),t=[];e.length>1&&e.forEach(e=>{let a=e.className;if(t.includes(a)){e.remove();return}t.push(a)})},[]),h(()=>{H()},[H]),M.isFallback)?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[t(m,{children:[u(w,S,!0),v&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:v}},"global-style"),T&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:T}},"google-fonts"),N&&N.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),I&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:I}},T),L?.isUsePageBackground&&L?.background&&e("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${L.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${L?.background}`)]}),e(n,{publicStoreFrontData:P,dynamicCollection:C,dynamicProduct:F,children:e(O,{collection:q,children:e(i,{components:b,children:e("div",{id:"storefront","data-page-name":j?.name,"data-assigned-product-title":F?.productTitle,"data-assigned-collection-title":C?.collectionTitle,children:e(s,{data:k,children:e(o,{t:$,children:x?.map((t,a)=>e(d,{priority:!!t.priority||a===z,children:e(c,{state:t.data,lazy:t.lazy,priority:t.priority,isPreview:!0,children:e(p,{uid:t.uid})})},t.uid))})})})})})})]})};export{b as PreviewTemplate};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n as r,PageProvider as a,BuilderComponentProvider as n,I18nProvider as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n as r,PageProvider as a,BuilderComponentProvider as n,I18nProvider as i,SectionProvider as o,LazyPriorityProvider as l,BuilderProvider as p,Render as c}from"@gem-sdk/core";import{NextSeo as d}from"next-seo";import m from"next/head";import{useRouter as g}from"next/router";import{parseHtml as u}from"../libs/parse-html.js";import h from"../components/builder/Header.js";import f from"../components/FooterForPostPurchase.js";import y from"next/script";import{useEffect as _}from"react";import{usePageViewedTracking as b}from"../libs/hooks/usePageViewedTracking.js";import S from"../libs/hooks/useFirstSectionIndex.js";let v=({components:v,builderData:x,sectionData:k,seo:P,themeStyle:N,fontStyle:T,elementFontStyle:j,customCodeHeader:H,customFonts:I,isPostPurchase:L,shopName:M,productOffers:$,publicStoreFrontData:E,dynamicDiscountOffer:F,isPreview:q,interaction:w,pageBackground:A,sellingPlanSetting:O,buyerConsentPreCheck:z,id:C,shopID:D,domainTrackingIlp:U,disableGsFont:B})=>{let R=g(),{t:V}=r(),G=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";b({id:C,shopID:D,domain:U});let J="custom-code-header",X=S(x);if(_(()=>{let e=document.querySelectorAll(`[class*="${J}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),R.isFallback)return e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let K=(w?.value||[]).length>0;return t(s,{children:[e(d,{...P}),t(m,{children:[u(J,H,!0),N&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:N}},"global-style"),T&&!B&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:T}},"google-fonts"),j&&j.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),I&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:I}},T),A?.isUsePageBackground&&A?.background&&e("style",{children:`
|
|
2
2
|
body {
|
|
3
3
|
background: ${A.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${A?.background}`)]}),e(a,{productOffers:
|
|
5
|
+
`},`page_background_${A?.background}`)]}),e(a,{productOffers:$,publicStoreFrontData:E,dynamicDiscountOffer:F,sellingPlanMeta:O,buyerConsentChecked:z,children:e(n,{components:v,children:e(i,{t:V,children:t("div",{className:`${L?"gp-bg-white post-purchase-page":""} `,role:"main",children:[L&&e(h,{pageType:"POST_PURCHASE"}),K&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(w?.value||[])}</div>`}}),e(o,{data:k,children:x?.map((s,r)=>e(l,{priority:!!s.priority||r===X,children:t(p,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:L,isPreview:q,children:[e(c,{uid:s.uid}),K&&e(y,{defer:!0,src:`${G}/assets-v2/gp-flow-action-lip-v7-5.js`})]})},s.uid))}),L&&e(f,{shopName:M||""})]})})})})]})};export{v as StaticPageV2};
|
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.92",
|
|
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": "17.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "17.0.0-dev.90",
|
|
31
31
|
"@gem-sdk/plugin-cookie-bar": "17.0.0-dev.84",
|
|
32
32
|
"@gem-sdk/plugin-quick-view": "17.0.0-dev.84",
|
|
33
33
|
"@gem-sdk/plugin-sticky-add-to-cart": "17.0.0-dev.84"
|