@gem-sdk/pages 7.0.1-staging.4 → 8.0.0-dev.106
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/components/builder/PopupManager.js +1 -1
- package/dist/cjs/components/builder/Toolbox.js +1 -1
- package/dist/cjs/components/image-to-layout/DropElement.js +1 -1
- package/dist/cjs/constants/googleFontV1.js +1 -0
- package/dist/cjs/constants/index.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/libs/api/get-home-page-props-v2.js +1 -1
- package/dist/cjs/libs/api/get-home-page-props.js +1 -1
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -1
- package/dist/cjs/libs/api/get-preview-content-props.js +1 -1
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -1
- package/dist/cjs/libs/api/get-static-page-props-v2.js +1 -1
- package/dist/cjs/libs/api/get-static-page-props.js +1 -1
- package/dist/cjs/libs/google-fonts.js +1 -1
- package/dist/cjs/libs/helpers/gen-fonts.js +1 -1
- package/dist/cjs/pages/static-v2.js +1 -1
- package/dist/esm/components/builder/PopupManager.js +1 -1
- package/dist/esm/components/builder/Toolbox.js +1 -1
- package/dist/esm/components/image-to-layout/DropElement.js +1 -1
- package/dist/esm/constants/googleFontV1.js +1 -0
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/libs/api/get-home-page-props-v2.js +1 -1
- package/dist/esm/libs/api/get-home-page-props.js +1 -1
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -1
- package/dist/esm/libs/api/get-preview-content-props.js +1 -1
- package/dist/esm/libs/api/get-static-page-props-preview.js +1 -1
- package/dist/esm/libs/api/get-static-page-props-v2.js +1 -1
- package/dist/esm/libs/api/get-static-page-props.js +1 -1
- package/dist/esm/libs/google-fonts.js +1 -1
- package/dist/esm/libs/helpers/gen-fonts.js +1 -1
- package/dist/esm/pages/static-v2.js +1 -1
- package/dist/types/index.d.ts +10 -3
- package/package.json +7 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const isDialog=e=>!!e&&e?.tag==="Dialog"&&"component"===e.type,PopupManager=()=>{let e=core.useBuilderPreviewStore(e=>e.state),t=core.useModalStore(e=>e.setModalActive),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const isDialog=e=>!!e&&e?.tag==="Dialog"&&"component"===e.type,PopupManager=()=>{let e=core.useBuilderPreviewStore(e=>e.state),t=core.useModalStore(e=>e.setModalActive),i=core.useModalStore(e=>e.activeId),{isInteractionMode:n}=core.useInteraction(),r=react.useMemo(()=>e.ROOT.childrens?.map(t=>e?.[t]).filter(isDialog),[e]),a=e=>e.isThemeSection&&e?.name?`${e.name}`:e?.settings?.name||e?.settings?.name?.fallbackValue||"",o=react.useCallback(e=>{let i=e.detail;t(i?.modalId)},[t]);return react.useEffect(()=>(window.addEventListener("set-active-modal",o),()=>{window.removeEventListener("set-active-modal",o)}),[o]),jsxRuntime.jsx("div",{className:"gp-popup-trigger-button gp-pointer-events-none gp-fixed gp-inset-y-0 gp-right-0 gp-z-10 gp-flex gp-w-10 gp-flex-col gp-items-center gp-justify-center gp-gap-1 gp-overflow-y-auto gp-overflow-x-hidden gp-text-sm",children:r?.map(e=>{let r=e?.advanced?.d;return jsxRuntime.jsx("div",{className:core.cls("gp-w-full gp-shrink gp-cursor-pointer gp-select-none gp-items-center gp-justify-center gp-whitespace-nowrap gp-py-2 gp-text-white [writing-mode:vertical-lr]",{"gp-bg-blue-500":i===e.uid&&!e.isThemeSection,"gp-bg-blue-700":i!==e.uid&&!e.isThemeSection,"gp-bg-[#9144da]":e.isThemeSection},n?"gp-pointer-events-none":"gp-pointer-events-auto"),role:"button","aria-hidden":"true",onClick:()=>t(e?.uid,!0),style:{"--d":r?.desktop?"inline-flex":"none","--d-tablet":r?.tablet?"inline-flex":"none","--d-mobile":r?.mobile?"inline-flex":"none"},children:jsxRuntime.jsx("span",{className:"gp-text-ellipsis gp-whitespace-nowrap",children:a(e)})},e?.uid)})})};var PopupManager$1=react.memo(PopupManager);exports.default=PopupManager$1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),getStorefrontApi=require("../../libs/get-storefront-api.js"),googleFonts=require("../../libs/google-fonts.js"),genCss=require("../../libs/helpers/gen-css.js"),genFonts=require("../../libs/helpers/gen-fonts.js"),shopifyCdnWithGoogleFonts=require("../../libs/shopify-cdn-with-google-fonts.js"),libsStore=require("../../store/libs-store.js"),checkOptionFont=require("../../libs/helpers/check-option-font.js");const globalStyleId="global-style",ENABLE_THEME_FONT_EDITOR=!0,Toolbox=()=>{let e=core.useMatchMutate(),t=core.useShopStore(e=>e.provider),o=core.useShopStore(e=>e.changeStorefrontInfo),r=core.usePageStore(e=>e.setDynamicProduct),n=core.usePageStore(e=>e.setPostPurchaseProductOffers),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),getStorefrontApi=require("../../libs/get-storefront-api.js"),googleFonts=require("../../libs/google-fonts.js"),genCss=require("../../libs/helpers/gen-css.js"),genFonts=require("../../libs/helpers/gen-fonts.js"),shopifyCdnWithGoogleFonts=require("../../libs/shopify-cdn-with-google-fonts.js"),libsStore=require("../../store/libs-store.js"),checkOptionFont=require("../../libs/helpers/check-option-font.js");const globalStyleId="global-style",ENABLE_THEME_FONT_EDITOR=!0,Toolbox=()=>{let e=core.useMatchMutate(),t=core.useShopStore(e=>e.provider),o=core.useShopStore(e=>e.changeStorefrontInfo),r=core.usePageStore(e=>e.setDynamicProduct),a=core.usePageStore(e=>e.setAssignedProductIds),n=core.usePageStore(e=>e.setIsApplyAllProducts),i=core.usePageStore(e=>e.setPostPurchaseProductOffers),d=core.usePageStore(e=>e.setDynamicDiscountOffer),l=core.usePageStore(e=>e.setSalePageProductId),s=core.usePageStore(e=>e.setDynamicCollection),c=core.useBuilderPreviewStore(e=>e.initState),u=core.useBuilderPreviewStore(e=>e.state),p=core.useBuilderPreviewStore(e=>e.forceChangeState),w=core.useBuilderPreviewStore(e=>e.forceChangeItemProp),v=core.useBuilderPreviewStore(e=>e.changeItemPropByKey),m=core.useBuilderPreviewStore(e=>e.addItem),g=core.useBuilderPreviewStore(e=>e.moveItem),y=core.useBuilderPreviewStore(e=>e.removeItem),f=core.useSectionStore(e=>e.addSection),h=core.useShopStore(e=>e.changeSwatches),S=core.useBuilderPreviewStore(e=>e.updateItemName),b=core.useBuilderPreviewStore(e=>e.updateItemAttribute),E=core.useShopStore(e=>e.changeLayoutSettings),L=core.useShopStore(e=>e.changeCreateThemeSectionCount),C=core.useShopStore(e=>e.changeShopPlan),k=core.useShopStore(e=>e.updatePriceWithCurrency),P=libsStore.libsStore(e=>e.changeFontType),I=libsStore.libsStore(e=>e.fontType),T=core.useModalStore(e=>e.clearModal),q=core.useShopStore(e=>e.changeLimitCreateThemeSection),F=core.usePageStore(e=>e.setInteractionIsSelectOnPage),A=core.usePageStore(e=>e.setInteractionItem),B=core.usePageStore(e=>e.setInteractionSelectType),j=core.usePageStore(e=>e.setInteractionSettingType),x=core.usePageStore(e=>e.setSidebarMode),O=react.useMemo(()=>genFonts.getFontsFromDataBuilder(u),[u]),M=({currentFontTypeSetting:e,fontType:t,fontHref:o})=>{let r;return o.includes("bunny.net")?r="bunny":o.includes("googleapis.com")&&(r="google"),!r||t===r&&r===e},N=react.useCallback((e,t)=>{if(!I)return;if(!t?.length){let t=document.querySelectorAll(`.${e}`);t.forEach(e=>e.remove());return}let o=document.querySelectorAll(`.${e}`);for(let r of(o.forEach(e=>{let o=e.getAttribute("data-font"),r=e.getAttribute("data-font-variant"),a=e.getAttribute("href")||"";if(!o||!r){e.remove();return}let n=t.find(e=>{let t=e.family===o,n=e.variants.includes(r);return!!t&&!!n&&M({currentFontTypeSetting:e.type,fontType:I,fontHref:a})});n||e.remove()}),t))if(!(["bunny","google"].includes(r.type)&&checkOptionFont.checkNotInOptionFont(r.family,I))&&"custom"!==r.type&&r.variants?.length)for(let t of r.variants){let o={...r,variants:[t.toString(),`${t.toString()}i`]},a=googleFonts.createFontUrls([o],void 0,I,!0)||[];if(a?.length)for(let o of a){let a=e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/"/g,'\\"'),n=document.querySelector(`link.${e}[href="${a(o)}"]`);if(n)continue;let i=document.createElement("link");i.className=e,i.rel="stylesheet",i.href=o,i.dataset.font=r.family,i.dataset.fontVariant=t,document.head.appendChild(i)}}},[I]),$=react.useCallback(()=>{e(/query\//,{revalidate:!0})},[e]),D=react.useCallback(e=>{let r=e.detail;o({url:r.shopHandle?getStorefrontApi.getStorefrontApi(r.shopHandle,t):void 0,token:r.shopToken})},[o,t]),H=react.useCallback(e=>{let t=e.detail;try{if(t.data){let e=genCss.genCSS(t.data,t.mobileOnly),o=Object.entries(t.data?.font).map(([,e])=>e).map(e=>{if("custom"==e.type){let t=shopifyCdnWithGoogleFonts.shopifyCdnWithGoogleFonts.find(t=>t.family==e.family);if(t)return t}return e}),r=document.getElementById(globalStyleId);if(N("google-font-builder",o),r)r.innerHTML=e;else{let t=document.createElement("style");t.id=globalStyleId,t.innerHTML=e,document.head.appendChild(t)}}}catch{}},[N]),_=react.useCallback(e=>{T();try{let t=e.detail;t.data&&("flat"===t.type?p(t.data):c(t.data))}catch{}},[p,c,T]),W=react.useCallback(e=>{try{let t=e.detail;t.entity&&(m({data:t.entity,id:t.id,position:t.position,type:t.type??"component"}),t?.type!=="section"||Array.isArray(t.entity)||f(t.entity.uid,t.entity))}catch{}},[m,f]),G=react.useCallback(e=>{try{let t=e.detail;t.uid&&t.propName&&v({id:t.uid,key:t.propName,data:t.propValue,group:t.group})}catch{}},[v]),R=react.useCallback(e=>{try{let t=e.detail;t.uid&&w(t.uid,t.data,t.group)}catch{}},[w]),V=react.useCallback(e=>{try{let t=e.detail;t.to&&t.uid&&g(t.uid,t.to,Number(t.position)??0)}catch{}},[g]),K=react.useCallback(e=>{try{let t=e.detail;t.uid&&y(t.uid)}catch{}},[y]),U=react.useCallback(e=>{let t=e.detail;try{t.data&&h(t.data)}catch{}},[h]),z=react.useCallback(e=>{let t=e.detail;t&&E(t)},[E]),J=react.useCallback(e=>{let t=e.detail;t&&L(t)},[L]),Q=react.useCallback(e=>{let t=e.detail;t&&C(t)},[C]),X=react.useCallback(e=>{let t=e.detail;t&&k(t)},[k]),Y=react.useCallback(e=>{let t=e.detail;t&&P(t)},[P]),Z=react.useCallback(e=>{let t=e.detail;t&&r(t)},[r]),ee=react.useCallback(e=>{let{assignedIds:t,isApplyAllProducts:o}=e.detail;t&&a(t??[]),n(!!o)},[a,n]),et=react.useCallback(e=>{let t=e.detail;t&&s(t)},[s]);react.useEffect(()=>{O&&I&&N("google-font-element",O)},[O,I,N]);let eo=react.useCallback(e=>{let t=e.detail;t.uid&&S(t.uid,t.name||"")},[S]),er=react.useCallback(e=>{let t=e.detail;t.uid&&b(t.uid,t.value||"",t.attr||"")},[b]),ea=react.useCallback(e=>{let t=e.detail;t?.length&&i(t)},[i]),en=react.useCallback(e=>{let t=e.detail;t&&d(t)},[d]),ei=react.useCallback(e=>{let t=e.detail;t&&l(t)},[l]),ed=react.useCallback(e=>{let t=e.detail;t&&q(t)},[q]),el=react.useCallback(e=>{let t=e.detail.value,o=e.detail.mode,r=e.detail.settingType;F(t),B(o),j(r)},[F,B,j]),es=react.useCallback(e=>{let t=e.detail.settingType;j(t)},[j]),ec=react.useCallback(e=>{let t=e.detail.mode;console.log(t),x(t)},[x]),eu=react.useCallback(e=>{let t=e.detail;A(t)},[A]);return react.useEffect(()=>(window.addEventListener("update-shop-info",D),window.addEventListener("revalidate-query",$),window.addEventListener("init-builder",_),window.addEventListener("add-entity",W),window.addEventListener("remove-entity",K),window.addEventListener("move-entity",V),window.addEventListener("force-update-entity-props",R),window.addEventListener("update-entity-prop",G),window.addEventListener("set-global-style",H),window.addEventListener("update-global-swatches-data",U),window.addEventListener("on-off-header-footer",z),window.addEventListener("update-create-theme-section-count",J),window.addEventListener("update-shop-plan",Q),window.addEventListener("set-dynamic-product",Z),window.addEventListener("set-assigned-product-ids",ee),window.addEventListener("set-dynamic-collection",et),window.addEventListener("update-item-name",eo),window.addEventListener("update-item-attribute",er),window.addEventListener("set-product-offer",ea),window.addEventListener("set-dynamic-discount-offer",en),window.addEventListener("update-sale-page-product-id",ei),window.addEventListener("limit-create-theme-section",ed),window.addEventListener("update-interaction-is-select-on-page",el),window.addEventListener("update-interaction-item",eu),window.addEventListener("update-interaction-setting-type",es),window.addEventListener("change-sidebar-mode",ec),window.addEventListener("update-font-type",Y),window.addEventListener("update-price-with-currency",X),()=>{window.removeEventListener("update-shop-info",D),window.removeEventListener("revalidate-query",$),window.removeEventListener("init-builder",_),window.removeEventListener("add-entity",W),window.removeEventListener("remove-entity",K),window.removeEventListener("move-entity",V),window.removeEventListener("update-entity-prop",G),window.removeEventListener("set-global-style",H),window.removeEventListener("update-global-swatches-data",U),window.removeEventListener("on-off-header-footer",z),window.removeEventListener("update-create-theme-section-count",J),window.removeEventListener("update-shop-plan",Q),window.removeEventListener("update-price-with-currency",X),window.removeEventListener("set-dynamic-product",Z),window.removeEventListener("set-dynamic-collection",et),window.removeEventListener("update-item-name",eo),window.removeEventListener("update-item-attribute",er),window.removeEventListener("set-product-offer",ea),window.removeEventListener("update-sale-page-product-id",ei),window.removeEventListener("limit-create-theme-section",ed),window.removeEventListener("update-interaction-is-select-on-page",el),window.removeEventListener("update-interaction-item",eu),window.removeEventListener("update-interaction-setting-type",es),window.removeEventListener("update-font-type",Y)}),[W,Q,R,G,_,V,K,H,U,$,D,z,J,Z,et,eo,er,ea,ei,ed,eu,el,es,Y,ec,en,X]),jsxRuntime.jsx("div",{className:"toolbox"})};var Toolbox$1=react.memo(Toolbox);exports.default=Toolbox$1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const SALE_FUNNEL_PAGE_TYPES=["GP_FUNNEL_PAGE","GP_PRE_SALE_PAGE"],DropElement=()=>{let{t:e}=core.useI18n(),t=core.useShopStore(e=>e.pageType),i=SALE_FUNNEL_PAGE_TYPES.includes(t||""),s="POST_PURCHASE"===t,n=react.useMemo(()=>i?e("Start building with Sections/Elements or"):s?e("Start with Templates from sidebar"):e("Start with Sections from sidebar"),[i,s,e]),r=react.useMemo(()=>i?e("Use existing page designs"):s?e("Add templates"):e("Add sections"),[i,s,e]),
|
|
2
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),index=require("../../constants/index.js");const SALE_FUNNEL_PAGE_TYPES=["GP_FUNNEL_PAGE","GP_PRE_SALE_PAGE"],DropElement=()=>{let{t:e}=core.useI18n(),t=core.useShopStore(e=>e.pageType),i=SALE_FUNNEL_PAGE_TYPES.includes(t||""),s="POST_PURCHASE"===t,n=react.useMemo(()=>i?e("Start building with Sections/Elements or"):s?e("Start with Templates from sidebar"):e("Start with Sections from sidebar"),[i,s,e]),r=react.useMemo(()=>i?e("Use existing page designs"):s?e("Add templates"):e("Add sections"),[i,s,e]),x=()=>{if(i){p(index.LIBRARY_TYPE_ENUM.EXISTING_PAGES);return}if(s){p(index.LIBRARY_TYPE_ENUM.POST_PURCHASE_UPSELL);return}l(!0)},l=e=>{let t=new CustomEvent("editor:sidebar:build-with-section-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},p=e=>{let t=new CustomEvent("editor:sidebar:build-with-template-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},d=e=>{let t=new CustomEvent("editor:sidebar:click-img-to-layout-gallery-btn",e);window.dispatchEvent(t)};return jsxRuntime.jsxs("div",{className:"gp-flex gp-w-full gp-flex-col gp-items-center gp-justify-center",children:[jsxRuntime.jsxs("svg",{width:"290",height:"162",viewBox:"0 0 290 162",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"gp-mb-[24px]",children:[jsxRuntime.jsx("rect",{x:"0.570588",y:"0.570588",width:"288.859",height:"160.859",rx:"8.55882",fill:"white"}),jsxRuntime.jsx("rect",{x:"0.570588",y:"0.570588",width:"288.859",height:"160.859",rx:"8.55882",stroke:"#E2E2E2",strokeWidth:"1.14118"}),jsxRuntime.jsx("path",{d:"M22.2529 29.6708C22.2529 25.8893 25.3185 22.8237 29.1 22.8237H126.1C129.882 22.8237 132.947 25.8893 132.947 29.6708V132.377C132.947 136.158 129.882 139.224 126.1 139.224H29.1C25.3185 139.224 22.2529 136.158 22.2529 132.377V29.6708Z",fill:"#3C67FF",fillOpacity:"0.1"}),jsxRuntime.jsx("path",{d:"M76.0283 91.1587C77.3298 92.6353 76.2754 94.958 74.3066 94.9513L57.7218 94.8955C55.762 94.8889 54.7231 92.5777 56.0182 91.1058L64.2787 81.7175C65.1873 80.6849 66.7951 80.6836 67.7039 81.7146L76.0283 91.1587Z",fill:"#7190FF"}),jsxRuntime.jsx("path",{d:"M98.1352 91.1406C99.4315 92.62 98.3727 94.9382 96.4053 94.9282L67.9725 94.7838C66.0044 94.7738 64.9727 92.4437 66.2873 90.9779L80.6046 75.0135C81.5189 73.994 83.118 74.0026 84.0198 75.0318L98.1352 91.1406Z",fill:"#7190FF"}),jsxRuntime.jsx("path",{d:"M63.2783 74.2252C66.1589 73.8964 68.1647 71.3676 67.8369 68.478C67.5091 65.5883 64.9883 63.5762 62.1077 63.905C59.2272 64.2338 57.2214 66.7626 57.5492 69.6523C57.877 72.5419 60.3978 74.554 63.2783 74.2252Z",fill:"#7190FF"}),jsxRuntime.jsx("rect",{x:"157.482",y:"45.647",width:"83.3059",height:"11.4118",rx:"5.70588",fill:"#AAAAAA"}),jsxRuntime.jsx("rect",{x:"157.5",y:"98.9995",width:"48",height:"18",rx:"9",fill:"#3C67FF"}),jsxRuntime.jsx("rect",{x:"157.5",y:"66.9995",width:"68",height:"5",rx:"2.5",fill:"#E2E2E2"}),jsxRuntime.jsx("rect",{x:"157.5",y:"79.9995",width:"52",height:"5",rx:"2.5",fill:"#E2E2E2"})]}),jsxRuntime.jsxs("div",{className:"gp-flex gp-flex-col gp-items-center",children:[jsxRuntime.jsx("div",{className:"gp-text-16 gp-font-medium gp-mb-4 gp-text-[#212121]",children:n}),jsxRuntime.jsxs("div",{className:"gp-flex gp-gap-3 gp-justify-between",children:[jsxRuntime.jsx("button",{"data-button-add-section":!0,onClick:x,className:"gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",children:r}),jsxRuntime.jsx("button",{"data-button-add-elements":!0,onClick:()=>{i?p(index.LIBRARY_TYPE_ENUM.TEMPLATES):l(!1)},className:"gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",children:i?e("Explore templates"):e("Add elements")})]}),!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"gp-my-6",children:jsxRuntime.jsxs("svg",{width:"338",height:"24",viewBox:"0 0 338 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{width:"150",height:"1",transform:"translate(0 11.4999)",fill:"#D6D6D6"}),jsxRuntime.jsx("path",{d:"M166.395 17.159C165.705 17.159 165.101 16.995 164.58 16.6668C164.063 16.3387 163.659 15.8797 163.367 15.2897C163.079 14.6997 162.935 14.0104 162.935 13.2215C162.935 12.4261 163.079 11.7317 163.367 11.1384C163.659 10.5452 164.063 10.0845 164.58 9.75633C165.101 9.42821 165.705 9.26414 166.395 9.26414C167.084 9.26414 167.688 9.42821 168.205 9.75633C168.725 10.0845 169.129 10.5452 169.418 11.1384C169.709 11.7317 169.855 12.4261 169.855 13.2215C169.855 14.0104 169.709 14.6997 169.418 15.2897C169.129 15.8797 168.725 16.3387 168.205 16.6668C167.688 16.995 167.084 17.159 166.395 17.159ZM166.395 16.1051C166.919 16.1051 167.349 15.9708 167.688 15.7024C168.026 15.4339 168.276 15.0809 168.438 14.6434C168.601 14.2059 168.682 13.7319 168.682 13.2215C168.682 12.7111 168.601 12.2355 168.438 11.7947C168.276 11.3539 168.026 10.9976 167.688 10.7258C167.349 10.454 166.919 10.3181 166.395 10.3181C165.871 10.3181 165.44 10.454 165.102 10.7258C164.764 10.9976 164.514 11.3539 164.352 11.7947C164.189 12.2355 164.108 12.7111 164.108 13.2215C164.108 13.7319 164.189 14.2059 164.352 14.6434C164.514 15.0809 164.764 15.4339 165.102 15.7024C165.44 15.9708 165.871 16.1051 166.395 16.1051ZM171.646 16.9999V9.36358H172.78V10.517H172.859C172.998 10.1391 173.25 9.83256 173.615 9.59724C173.979 9.36192 174.39 9.24426 174.848 9.24426C174.934 9.24426 175.042 9.24591 175.171 9.24923C175.3 9.25254 175.398 9.25751 175.464 9.26414V10.4573C175.425 10.4474 175.333 10.4325 175.191 10.4126C175.052 10.3894 174.904 10.3778 174.748 10.3778C174.377 10.3778 174.046 10.4557 173.754 10.6114C173.466 10.7639 173.237 10.976 173.068 11.2478C172.902 11.5163 172.819 11.8229 172.819 12.1676V16.9999H171.646Z",fill:"#676767"}),jsxRuntime.jsx("rect",{width:"150",height:"1",transform:"translate(188 11.4999)",fill:"#D6D6D6"})]})}),jsxRuntime.jsx("div",{className:"gp-flex gp-items-center gp-gap-2 gp-text-xs",children:jsxRuntime.jsx("div",{onClick:d,"aria-hidden":"true",id:"gp-img-to-layout-gallery-btn",className:"gp-relative gp-cursor-pointer gp-text-[14px] gp-font-medium gp-text-[#3C67FF]",children:e("Start with Generating from URL or image")})})]})]})]})};exports.DropElement=DropElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const googleFontFamilies=["ABeeZee","ADLaM Display","AR One Sans","Abel","Abhaya Libre","Aboreto","Abril Fatface","Abyssinica SIL","Aclonica","Acme","Actor","Adamina","Advent Pro","Afacad","Afacad Flux","Agbalumo","Agdasima","Agu Display","Aguafina Script","Akatab","Akaya Kanadaka","Akaya Telivigala","Akronim","Akshar","Aladin","Alan Sans","Alata","Alatsi","Albert Sans","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Aleo","Alex Brush","Alexandria","Alfa Slab One","Alice","Alike","Alike Angular","Alkalami","Alkatra","Allan","Allerta","Allerta Stencil","Allison","Allura","Almarai","Almendra","Almendra Display","Almendra SC","Alumni Sans","Alumni Sans Collegiate One","Alumni Sans Inline One","Alumni Sans Pinstripe","Alumni Sans SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiko","Amiri","Amiri Quran","Amita","Anaheim","Ancizar Sans","Ancizar Serif","Andada Pro","Andika","Anek Bangla","Anek Devanagari","Anek Gujarati","Anek Gurmukhi","Anek Kannada","Anek Latin","Anek Malayalam","Anek Odia","Anek Tamil","Anek Telugu","Angkor","Annapurna SIL","Annie Use Your Telescope","Anonymous Pro","Anta","Antic","Antic Didone","Antic Slab","Anton","Anton SC","Antonio","Anuphan","Anybody","Aoboshi One","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo","Archivo Black","Archivo Narrow","Are You Serious","Aref Ruqaa","Aref Ruqaa Ink","Arima","Arimo","Arizonia","Armata","Arsenal","Arsenal SC","Artifika","Arvo","Arya","Asap","Asap Condensed","Asar","Asimovian","Asset","Assistant","Asta Sans","Astloch","Asul","Athiti","Atkinson Hyperlegible","Atkinson Hyperlegible Mono","Atkinson Hyperlegible Next","Atma","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Azeret Mono","B612","B612 Mono","BIZ UDGothic","BIZ UDMincho","BIZ UDPGothic","BIZ UDPMincho","Babylonica","Bacasime Antique","Bad Script","Badeen Display","Bagel Fat One","Bahiana","Bahianita","Bai Jamjuree","Bakbak One","Ballet","Baloo 2","Baloo Bhai 2","Baloo Bhaijaan 2","Baloo Bhaina 2","Baloo Chettan 2","Baloo Da 2","Baloo Paaji 2","Baloo Tamma 2","Baloo Tammudu 2","Baloo Thambi 2","Balsamiq Sans","Balthazar","Bangers","Barlow","Barlow Condensed","Barlow Semi Condensed","Barriecito","Barrio","Basic","Baskervville","Baskervville SC","Battambang","Baumans","Bayon","Be Vietnam Pro","Beau Rivage","Bebas Neue","Beiruti","Belanosima","Belgrano","Bellefair","Belleza","Bellota","Bellota Text","BenchNine","Benne","Bentham","Berkshire Swash","Besley","Beth Ellen","Bevan","BhuTuka Expanded One","Big Shoulders","Big Shoulders Inline","Big Shoulders Stencil","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","BioRhyme","BioRhyme Expanded","Birthstone","Birthstone Bounce","Biryani","Bitcount","Bitcount Grid Double","Bitcount Grid Double Ink","Bitcount Grid Single","Bitcount Grid Single Ink","Bitcount Ink","Bitcount Prop Double","Bitcount Prop Double Ink","Bitcount Prop Single","Bitcount Prop Single Ink","Bitcount Single","Bitcount Single Ink","Bitter","Black And White Picture","Black Han Sans","Black Ops One","Blaka","Blaka Hollow","Blaka Ink","Blinker","Bodoni Moda","Bodoni Moda SC","Bokor","Boldonse","Bona Nova","Bona Nova SC","Bonbon","Bonheur Royale","Boogaloo","Borel","Bowlby One","Bowlby One SC","Braah One","Brawler","Bree Serif","Bricolage Grotesque","Bruno Ace","Bruno Ace SC","Brygada 1918","Bubblegum Sans","Bubbler One","Buda","Buenard","Bungee","Bungee Hairline","Bungee Inline","Bungee Outline","Bungee Shade","Bungee Spice","Bungee Tint","Butcherman","Butterfly Kids","Bytesized","Cabin","Cabin Condensed","Cabin Sketch","Cactus Classical Serif","Caesar Dressing","Cagliostro","Cairo","Cairo Play","Cal Sans","Caladea","Calistoga","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Caprasimo","Capriola","Caramel","Carattere","Cardo","Carlito","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Cascadia Code","Cascadia Mono","Castoro","Castoro Titling","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Chakra Petch","Changa","Changa One","Chango","Charis SIL","Charm","Charmonman","Chathura","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherish","Cherry Bomb One","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chilanka","Chiron GoRound TC","Chiron Hei HK","Chiron Sung HK","Chivo","Chivo Mono","Chocolate Classical Sans","Chokokutai","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Climate Crisis","Coda","Codystar","Coiny","Combo","Comfortaa","Comforter","Comforter Brush","Comic Neue","Comic Relief","Coming Soon","Comme","Commissioner","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Coral Pixels","Corben","Corinthia","Cormorant","Cormorant Garamond","Cormorant Infant","Cormorant SC","Cormorant Unicase","Cormorant Upright","Cossette Texte","Cossette Titre","Courgette","Courier Prime","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Pro","Crimson Text","Croissant One","Crushed","Cuprum","Cute Font","Cutive","Cutive Mono","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dai Banna SIL","Damion","Dancing Script","Danfo","Dangrek","Darker Grotesque","Darumadrop One","David Libre","Dawning of a New Day","Days One","Dekko","Dela Gothic One","Delicious Handrawn","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diphylleia","Diplomata","Diplomata SC","Do Hyeon","Dokdo","Domine","Donegal One","Dongle","Doppio One","Dorsa","Dosis","DotGothic16","Doto","Dr Sugiyama","Duru Sans","DynaPuff","Dynalight","EB Garamond","Eagle Lake","East Sea Dokdo","Eater","Economica","Eczar","Edu AU VIC WA NT Arrows","Edu AU VIC WA NT Dots","Edu AU VIC WA NT Guides","Edu AU VIC WA NT Hand","Edu AU VIC WA NT Pre","Edu NSW ACT Cursive","Edu NSW ACT Foundation","Edu NSW ACT Hand Pre","Edu QLD Beginner","Edu QLD Hand","Edu SA Beginner","Edu SA Hand","Edu TAS Beginner","Edu VIC WA NT Beginner","Edu VIC WA NT Hand","Edu VIC WA NT Hand Pre","El Messiri","Electrolize","Elms Sans","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Encode Sans","Encode Sans Condensed","Encode Sans Expanded","Encode Sans SC","Encode Sans Semi Condensed","Encode Sans Semi Expanded","Engagement","Englebert","Enriqueta","Ephesis","Epilogue","Epunda Sans","Epunda Slab","Erica One","Esteban","Estonia","Euphoria Script","Ewert","Exile","Exo","Exo 2","Expletus Sans","Explora","Faculty Glyphic","Fahkwang","Familjen Grotesk","Fanwood Text","Farro","Farsan","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Faustina","Federant","Federo","Felipa","Fenix","Festive","Figtree","Finger Paint","Finlandica","Fira Code","Fira Mono","Fira Sans","Fira Sans Condensed","Fira Sans Extra Condensed","Fjalla One","Fjord One","Flamenco","Flavors","Fleur De Leah","Flow Block","Flow Circular","Flow Rounded","Foldit","Fondamento","Fontdiner Swanky","Forum","Fragment Mono","Francois One","Frank Ruhl Libre","Fraunces","Freckle Face","Fredericka the Great","Fredoka","Freehand","Freeman","Fresca","Frijole","Fruktur","Fugaz One","Fuggles","Funnel Display","Funnel Sans","Fustat","Fuzzy Bubbles","GFS Didot","GFS Neohellenic","Ga Maamli","Gabarito","Gabriela","Gaegu","Gafata","Gajraj One","Galada","Galdeano","Galindo","Gamja Flower","Gantari","Gasoek One","Gayathri","Geist","Geist Mono","Gelasio","Gemunu Libre","Genos","Gentium Book Plus","Gentium Plus","Geo","Geologica","Georama","Geostar","Geostar Fill","Germania One","Gideon Roman","Gidole","Gidugu","Gilda Display","Girassol","Give You Glory","Glass Antiqua","Glegoo","Gloock","Gloria Hallelujah","Glory","Gluten","Goblin One","Gochi Hand","Goldman","Golos Text","Google Sans Code","Google Sans Flex","Gorditas","Gothic A1","Gotu","Goudy Bookletter 1911","Gowun Batang","Gowun Dodum","Graduate","Grand Hotel","Grandiflora One","Grandstander","Grape Nuts","Gravitas One","Great Vibes","Grechen Fuemen","Grenze","Grenze Gotisch","Grey Qo","Griffy","Gruppo","Gudea","Gugi","Gulzar","Gupter","Gurajada","Gwendolyn","Habibi","Hachi Maru Pop","Hahmlet","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handjet","Handlee","Hanken Grotesk","Hanuman","Happy Monkey","Harmattan","Headland One","Hedvig Letters Sans","Hedvig Letters Serif","Heebo","Henny Penny","Hepta Slab","Herr Von Muellerhoff","Hi Melody","Hina Mincho","Hind","Hind Guntur","Hind Madurai","Hind Mysuru","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","Honk","Host Grotesk","Hubballi","Hubot Sans","Huninn","Hurricane","IBM Plex Mono","IBM Plex Sans","IBM Plex Sans Arabic","IBM Plex Sans Condensed","IBM Plex Sans Devanagari","IBM Plex Sans Hebrew","IBM Plex Sans JP","IBM Plex Sans KR","IBM Plex Sans Thai","IBM Plex Sans Thai Looped","IBM Plex Serif","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iansui","Ibarra Real Nova","Iceberg","Iceland","Imbue","Imperial Script","Imprima","Inclusive Sans","Inconsolata","Inder","Indie Flower","Ingrid Darling","Inika","Inknut Antiqua","Inria Sans","Inria Serif","Inspiration","Instrument Sans","Instrument Serif","Intel One Mono","Inter","Inter Tight","Irish Grover","Island Moments","Istok Web","Italiana","Italianno","Itim","Jacquard 12","Jacquard 12 Charted","Jacquard 24","Jacquard 24 Charted","Jacquarda Bastarda 9","Jacquarda Bastarda 9 Charted","Jacques Francois","Jacques Francois Shadow","Jaini","Jaini Purva","Jaldi","Jaro","Jersey 10","Jersey 10 Charted","Jersey 15","Jersey 15 Charted","Jersey 20","Jersey 20 Charted","Jersey 25","Jersey 25 Charted","JetBrains Mono","Jim Nightshade","Joan","Jockey One","Jolly Lodger","Jomhuria","Jomolhari","Josefin Sans","Josefin Slab","Jost","Joti One","Jua","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","K2D","Kablammo","Kadwa","Kaisei Decol","Kaisei HarunoUmi","Kaisei Opti","Kaisei Tokumin","Kalam","Kalnia","Kalnia Glaze","Kameron","Kanchenjunga","Kanit","Kantumruy Pro","Kapakana","Karantina","Karla","Karla Tamil Inclined","Karla Tamil Upright","Karma","Katibeh","Kaushan Script","Kavivanar","Kavoon","Kay Pho Du","Kdam Thmor Pro","Keania One","Kedebideri","Kelly Slab","Kenia","Khand","Khmer","Khula","Kings","Kirang Haerang","Kite One","Kiwi Maru","Klee One","Knewave","KoHo","Kodchasan","Kode Mono","Koh Santepheap","Kolker Brush","Konkhmer Sleokchher","Kosugi","Kosugi Maru","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Krub","Kufam","Kulim Park","Kumar One","Kumar One Outline","Kumbh Sans","Kurale","LXGW Marker Gothic","LXGW WenKai Mono TC","LXGW WenKai TC","La Belle Aurore","Labrada","Lacquer","Laila","Lakki Reddy","Lalezar","Lancelot","Langar","Lateef","Lato","Lavishly Yours","League Gothic","League Script","League Spartan","Leckerli One","Ledger","Lekton","Lemon","Lemonada","Lexend","Lexend Deca","Lexend Exa","Lexend Giga","Lexend Mega","Lexend Peta","Lexend Tera","Lexend Zetta","Libertinus Keyboard","Libertinus Math","Libertinus Mono","Libertinus Sans","Libertinus Serif","Libertinus Serif Display","Libre Barcode 128","Libre Barcode 128 Text","Libre Barcode 39","Libre Barcode 39 Extended","Libre Barcode 39 Extended Text","Libre Barcode 39 Text","Libre Barcode EAN13 Text","Libre Baskerville","Libre Bodoni","Libre Caslon Display","Libre Caslon Text","Libre Franklin","Licorice","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Linefont","Lisu Bosa","Liter","Literata","Liu Jian Mao Cao","Livvic","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Long Cang","Lora","Love Light","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lugrasimo","Lumanosimo","Lunasima","Lusitana","Lustria","Luxurious Roman","Luxurious Script","M PLUS 1","M PLUS 1 Code","M PLUS 1p","M PLUS 2","M PLUS Code Latin","M PLUS Rounded 1c","Ma Shan Zheng","Macondo","Macondo Swash Caps","Mada","Madimi One","Magra","Maiden Orange","Maitree","Major Mono Display","Mako","Mali","Mallanna","Maname","Mandali","Manjari","Manrope","Mansalva","Manuale","Manufacturing Consent","Marcellus","Marcellus SC","Marck Script","Margarine","Marhey","Markazi Text","Marko One","Marmelad","Martel","Martel Sans","Martian Mono","Marvel","Matangi","Mate","Mate SC","Matemasie","Material Icons","Material Icons Outlined","Material Icons Round","Material Icons Sharp","Material Icons Two Tone","Material Symbols","Material Symbols Outlined","Material Symbols Rounded","Material Symbols Sharp","Maven Pro","McLaren","Mea Culpa","Meddon","MedievalSharp","Medula One","Meera Inimai","Megrim","Meie Script","Menbere","Meow Script","Merienda","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Micro 5","Micro 5 Charted","Milonga","Miltonian","Miltonian Tattoo","Mina","Mingzat","Miniver","Miriam Libre","Mirza","Miss Fajardose","Mitr","Mochiy Pop One","Mochiy Pop P One","Modak","Modern Antiqua","Moderustic","Mogra","Mohave","Moirai One","Molengo","Molle","Momo Signature","Momo Trust Display","Momo Trust Sans","Mona Sans","Monda","Monofett","Monomakh","Monomaniac One","Monoton","Monsieur La Doulaise","Montaga","Montagu Slab","MonteCarlo","Montez","Montserrat","Montserrat Alternates","Montserrat Underline","Moo Lah Lah","Mooli","Moon Dance","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mozilla Headline","Mozilla Text","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Ms Madi","Mukta","Mukta Mahee","Mukta Malar","Mukta Vaani","Mulish","Murecho","MuseoModerno","My Soul","Mynerve","Mystery Quest","NTR","Nabla","Namdhinggo","Nanum Brush Script","Nanum Gothic","Nanum Gothic Coding","Nanum Myeongjo","Nanum Pen Script","Narnoor","Nata Sans","National Park","Neonderthaw","Nerko One","Neucha","Neuton","New Amsterdam","New Rocker","New Tegomin","News Cycle","Newsreader","Niconne","Niramit","Nixie One","Nobile","Nokora","Norican","Nosifer","Notable","Nothing You Could Do","Noticia Text","Noto Color Emoji","Noto Emoji","Noto Kufi Arabic","Noto Music","Noto Naskh Arabic","Noto Nastaliq Urdu","Noto Rashi Hebrew","Noto Sans","Noto Sans Adlam","Noto Sans Adlam Unjoined","Noto Sans Anatolian Hieroglyphs","Noto Sans Arabic","Noto Sans Armenian","Noto Sans Avestan","Noto Sans Balinese","Noto Sans Bamum","Noto Sans Bassa Vah","Noto Sans Batak","Noto Sans Bengali","Noto Sans Bhaiksuki","Noto Sans Brahmi","Noto Sans Buginese","Noto Sans Buhid","Noto Sans Canadian Aboriginal","Noto Sans Carian","Noto Sans Caucasian Albanian","Noto Sans Chakma","Noto Sans Cham","Noto Sans Cherokee","Noto Sans Chorasmian","Noto Sans Coptic","Noto Sans Cuneiform","Noto Sans Cypriot","Noto Sans Cypro Minoan","Noto Sans Deseret","Noto Sans Devanagari","Noto Sans Display","Noto Sans Duployan","Noto Sans Egyptian Hieroglyphs","Noto Sans Elbasan","Noto Sans Elymaic","Noto Sans Ethiopic","Noto Sans Georgian","Noto Sans Glagolitic","Noto Sans Gothic","Noto Sans Grantha","Noto Sans Gujarati","Noto Sans Gunjala Gondi","Noto Sans Gurmukhi","Noto Sans HK","Noto Sans Hanifi Rohingya","Noto Sans Hanunoo","Noto Sans Hatran","Noto Sans Hebrew","Noto Sans Imperial Aramaic","Noto Sans Indic Siyaq Numbers","Noto Sans Inscriptional Pahlavi","Noto Sans Inscriptional Parthian","Noto Sans JP","Noto Sans Javanese","Noto Sans KR","Noto Sans Kaithi","Noto Sans Kannada","Noto Sans Kawi","Noto Sans Kayah Li","Noto Sans Kharoshthi","Noto Sans Khmer","Noto Sans Khojki","Noto Sans Khudawadi","Noto Sans Lao","Noto Sans Lao Looped","Noto Sans Lepcha","Noto Sans Limbu","Noto Sans Linear A","Noto Sans Linear B","Noto Sans Lisu","Noto Sans Lycian","Noto Sans Lydian","Noto Sans Mahajani","Noto Sans Malayalam","Noto Sans Mandaic","Noto Sans Manichaean","Noto Sans Marchen","Noto Sans Masaram Gondi","Noto Sans Math","Noto Sans Mayan Numerals","Noto Sans Medefaidrin","Noto Sans Meetei Mayek","Noto Sans Mende Kikakui","Noto Sans Meroitic","Noto Sans Miao","Noto Sans Modi","Noto Sans Mongolian","Noto Sans Mono","Noto Sans Mro","Noto Sans Multani","Noto Sans Myanmar","Noto Sans NKo","Noto Sans NKo Unjoined","Noto Sans Nabataean","Noto Sans Nag Mundari","Noto Sans Nandinagari","Noto Sans New Tai Lue","Noto Sans Newa","Noto Sans Nushu","Noto Sans Ogham","Noto Sans Ol Chiki","Noto Sans Old Hungarian","Noto Sans Old Italic","Noto Sans Old North Arabian","Noto Sans Old Permic","Noto Sans Old Persian","Noto Sans Old Sogdian","Noto Sans Old South Arabian","Noto Sans Old Turkic","Noto Sans Oriya","Noto Sans Osage","Noto Sans Osmanya","Noto Sans Pahawh Hmong","Noto Sans Palmyrene","Noto Sans Pau Cin Hau","Noto Sans PhagsPa","Noto Sans Phoenician","Noto Sans Psalter Pahlavi","Noto Sans Rejang","Noto Sans Runic","Noto Sans SC","Noto Sans Samaritan","Noto Sans Saurashtra","Noto Sans Sharada","Noto Sans Shavian","Noto Sans Siddham","Noto Sans SignWriting","Noto Sans Sinhala","Noto Sans Sogdian","Noto Sans Sora Sompeng","Noto Sans Soyombo","Noto Sans Sundanese","Noto Sans Sunuwar","Noto Sans Syloti Nagri","Noto Sans Symbols","Noto Sans Symbols 2","Noto Sans Syriac","Noto Sans Syriac Eastern","Noto Sans Syriac Western","Noto Sans TC","Noto Sans Tagalog","Noto Sans Tagbanwa","Noto Sans Tai Le","Noto Sans Tai Tham","Noto Sans Tai Viet","Noto Sans Takri","Noto Sans Tamil","Noto Sans Tamil Supplement","Noto Sans Tangsa","Noto Sans Telugu","Noto Sans Thaana","Noto Sans Thai","Noto Sans Thai Looped","Noto Sans Tifinagh","Noto Sans Tirhuta","Noto Sans Ugaritic","Noto Sans Vai","Noto Sans Vithkuqi","Noto Sans Wancho","Noto Sans Warang Citi","Noto Sans Yi","Noto Sans Zanabazar Square","Noto Serif","Noto Serif Ahom","Noto Serif Armenian","Noto Serif Balinese","Noto Serif Bengali","Noto Serif Devanagari","Noto Serif Display","Noto Serif Dives Akuru","Noto Serif Dogra","Noto Serif Ethiopic","Noto Serif Georgian","Noto Serif Grantha","Noto Serif Gujarati","Noto Serif Gurmukhi","Noto Serif HK","Noto Serif Hebrew","Noto Serif Hentaigana","Noto Serif JP","Noto Serif KR","Noto Serif Kannada","Noto Serif Khitan Small Script","Noto Serif Khmer","Noto Serif Khojki","Noto Serif Lao","Noto Serif Makasar","Noto Serif Malayalam","Noto Serif Myanmar","Noto Serif NP Hmong","Noto Serif Old Uyghur","Noto Serif Oriya","Noto Serif Ottoman Siyaq","Noto Serif SC","Noto Serif Sinhala","Noto Serif TC","Noto Serif Tamil","Noto Serif Tangut","Noto Serif Telugu","Noto Serif Thai","Noto Serif Tibetan","Noto Serif Todhri","Noto Serif Toto","Noto Serif Vithkuqi","Noto Serif Yezidi","Noto Traditional Nushu","Noto Znamenny Musical Notation","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Nunito Sans","Nuosu SIL","Odibee Sans","Odor Mean Chey","Offside","Oi","Ojuju","Old Standard TT","Oldenburg","Ole","Oleo Script","Oleo Script Swash Caps","Onest","Oooh Baby","Open Sans","Oranienbaum","Orbit","Orbitron","Oregano","Orelega One","Orienta","Original Surfer","Oswald","Outfit","Over the Rainbow","Overlock","Overlock SC","Overpass","Overpass Mono","Ovo","Oxanium","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Padauk","Padyakke Expanded One","Palanquin","Palanquin Dark","Palette Mosaic","Pangolin","Paprika","Parastoo","Parisienne","Parkinsans","Passero One","Passion One","Passions Conflict","Pathway Extreme","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Pattaya","Patua One","Pavanam","Paytone One","Peddana","Peralta","Permanent Marker","Petemoss","Petit Formal Script","Petrona","Phetsarath","Philosopher","Phudu","Piazzolla","Piedra","Pinyon Script","Pirata One","Pixelify Sans","Plaster","Platypi","Play","Playball","Playfair","Playfair Display","Playfair Display SC","Playpen Sans","Playpen Sans Arabic","Playpen Sans Deva","Playpen Sans Hebrew","Playpen Sans Thai","Playwrite AR","Playwrite AR Guides","Playwrite AT","Playwrite AT Guides","Playwrite AU NSW","Playwrite AU NSW Guides","Playwrite AU QLD","Playwrite AU QLD Guides","Playwrite AU SA","Playwrite AU SA Guides","Playwrite AU TAS","Playwrite AU TAS Guides","Playwrite AU VIC","Playwrite AU VIC Guides","Playwrite BE VLG","Playwrite BE VLG Guides","Playwrite BE WAL","Playwrite BE WAL Guides","Playwrite BR","Playwrite BR Guides","Playwrite CA","Playwrite CA Guides","Playwrite CL","Playwrite CL Guides","Playwrite CO","Playwrite CO Guides","Playwrite CU","Playwrite CU Guides","Playwrite CZ","Playwrite CZ Guides","Playwrite DE Grund","Playwrite DE Grund Guides","Playwrite DE LA","Playwrite DE LA Guides","Playwrite DE SAS","Playwrite DE SAS Guides","Playwrite DE VA","Playwrite DE VA Guides","Playwrite DK Loopet","Playwrite DK Loopet Guides","Playwrite DK Uloopet","Playwrite DK Uloopet Guides","Playwrite ES","Playwrite ES Deco","Playwrite ES Deco Guides","Playwrite ES Guides","Playwrite FR Moderne","Playwrite FR Moderne Guides","Playwrite FR Trad","Playwrite FR Trad Guides","Playwrite GB J","Playwrite GB J Guides","Playwrite GB S","Playwrite GB S Guides","Playwrite HR","Playwrite HR Guides","Playwrite HR Lijeva","Playwrite HR Lijeva Guides","Playwrite HU","Playwrite HU Guides","Playwrite ID","Playwrite ID Guides","Playwrite IE","Playwrite IE Guides","Playwrite IN","Playwrite IN Guides","Playwrite IS","Playwrite IS Guides","Playwrite IT Moderna","Playwrite IT Moderna Guides","Playwrite IT Trad","Playwrite IT Trad Guides","Playwrite MX","Playwrite MX Guides","Playwrite NG Modern","Playwrite NG Modern Guides","Playwrite NL","Playwrite NL Guides","Playwrite NO","Playwrite NO Guides","Playwrite NZ","Playwrite NZ Guides","Playwrite PE","Playwrite PE Guides","Playwrite PL","Playwrite PL Guides","Playwrite PT","Playwrite PT Guides","Playwrite RO","Playwrite RO Guides","Playwrite SK","Playwrite SK Guides","Playwrite TZ","Playwrite TZ Guides","Playwrite US Modern","Playwrite US Modern Guides","Playwrite US Trad","Playwrite US Trad Guides","Playwrite VN","Playwrite VN Guides","Playwrite ZA","Playwrite ZA Guides","Plus Jakarta Sans","Pochaevsk","Podkova","Poetsen One","Poiret One","Poller One","Poltawski Nowy","Poly","Pompiere","Ponnala","Ponomar","Pontano Sans","Poor Story","Poppins","Port Lligat Sans","Port Lligat Slab","Potta One","Pragati Narrow","Praise","Prata","Preahvihear","Press Start 2P","Pridi","Princess Sofia","Prociono","Prompt","Prosto One","Protest Guerrilla","Protest Revolution","Protest Riot","Protest Strike","Proza Libre","Public Sans","Puppies Play","Puritan","Purple Purse","Qahiri","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Qwitcher Grypen","REM","Racing Sans One","Radio Canada","Radio Canada Big","Radley","Rajdhani","Rakkas","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Rampart One","Ranchers","Rancho","Ranga","Rasa","Rationale","Ravi Prakash","Readex Pro","Recursive","Red Hat Display","Red Hat Mono","Red Hat Text","Red Rose","Redacted","Redacted Script","Reddit Mono","Reddit Sans","Reddit Sans Condensed","Redressed","Reem Kufi","Reem Kufi Fun","Reem Kufi Ink","Reenie Beanie","Reggae One","Rethink Sans","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Road Rage","Roboto","Roboto Condensed","Roboto Flex","Roboto Mono","Roboto Serif","Roboto Slab","Rochester","Rock 3D","Rock Salt","RocknRoll One","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rowdies","Rozha One","Rubik","Rubik 80s Fade","Rubik Beastly","Rubik Broken Fax","Rubik Bubbles","Rubik Burned","Rubik Dirt","Rubik Distressed","Rubik Doodle Shadow","Rubik Doodle Triangles","Rubik Gemstones","Rubik Glitch","Rubik Glitch Pop","Rubik Iso","Rubik Lines","Rubik Maps","Rubik Marker Hatch","Rubik Maze","Rubik Microbe","Rubik Mono One","Rubik Moonrocks","Rubik Pixels","Rubik Puddles","Rubik Scribble","Rubik Spray Paint","Rubik Storm","Rubik Vinyl","Rubik Wet Paint","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Ruwudu","Rye","STIX Two Text","SUSE","SUSE Mono","Sacramento","Sahitya","Sail","Saira","Saira Condensed","Saira Extra Condensed","Saira Semi Condensed","Saira Stencil One","Salsa","Sanchez","Sancreek","Sankofa Display","Sansation","Sansita","Sansita Swashed","Sarabun","Sarala","Sarina","Sarpanch","Sassy Frass","Satisfy","Savate","Sawarabi Gothic","Sawarabi Mincho","Scada","Scheherazade New","Schibsted Grotesk","Schoolbell","Science Gothic","Scope One","Seaweed Script","Secular One","Sedan","Sedan SC","Sedgwick Ave","Sedgwick Ave Display","Sen","Send Flowers","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shafarik","Shalimar","Shantell Sans","Shanti","Share","Share Tech","Share Tech Mono","Shippori Antique","Shippori Antique B1","Shippori Mincho","Shippori Mincho B1","Shizuru","Shojumaru","Short Stack","Shrikhand","Siemreap","Sigmar","Sigmar One","Signika","Signika Negative","Silkscreen","Simonetta","Single Day","Sintony","Sirin Stencil","Sirivennela","Six Caps","Sixtyfour","Sixtyfour Convergence","Skranji","Slabo 13px","Slabo 27px","Slackey","Slackside One","Smokum","Smooch","Smooch Sans","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sofia Sans","Sofia Sans Condensed","Sofia Sans Extra Condensed","Sofia Sans Semi Condensed","Solitreo","Solway","Sometype Mono","Song Myung","Sono","Sonsie One","Sora","Sorts Mill Goudy","Sour Gummy","Source Code Pro","Source Sans 3","Source Serif 4","Space Grotesk","Space Mono","Special Elite","Special Gothic","Special Gothic Condensed One","Special Gothic Expanded One","Spectral","Spectral SC","Spicy Rice","Spinnaker","Spirax","Splash","Spline Sans","Spline Sans Mono","Squada One","Square Peg","Sree Krushnadevaraya","Sriracha","Srisakdi","Staatliches","Stack Sans Headline","Stack Sans Notch","Stack Sans Text","Stalemate","Stalinist One","Stardos Stencil","Stick","Stick No Bills","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Story Script","Strait","Style Script","Stylish","Sue Ellen Francisco","Suez One","Sulphur Point","Sumana","Sunflower","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Syne","Syne Mono","Syne Tactile","TASA Explorer","TASA Orbiter","Tac One","Tagesschrift","Tai Heritage Pro","Tajawal","Tangerine","Tapestry","Taprom","Tauri","Taviraj","Teachers","Teko","Tektur","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","Texturina","Thasadith","The Girl Next Door","The Nautigal","Tienne","TikTok Sans","Tillana","Tilt Neon","Tilt Prism","Tilt Warp","Timmana","Tinos","Tiny5","Tiro Bangla","Tiro Devanagari Hindi","Tiro Devanagari Marathi","Tiro Devanagari Sanskrit","Tiro Gurmukhi","Tiro Kannada","Tiro Tamil","Tiro Telugu","Tirra","Titan One","Titillium Web","Tomorrow","Tourney","Trade Winds","Train One","Triodion","Trirong","Trispace","Trocchi","Trochut","Truculenta","Trykker","Tsukimi Rounded","Tuffy","Tulpen One","Turret Road","Twinkle Star","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ubuntu Sans","Ubuntu Sans Mono","Uchen","Ultra","Unbounded","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","UoqMunThenKhung","Updock","Urbanist","VT323","Vampiro One","Varela","Varela Round","Varta","Vast Shadow","Vazirmatn","Vend Sans","Vesper Libre","Viaoda Libre","Vibes","Vibur","Victor Mono","Vidaloka","Viga","Vina Sans","Voces","Volkhov","Vollkorn","Vollkorn SC","Voltaire","Vujahday Script","WDXL Lubrifont JP N","WDXL Lubrifont SC","WDXL Lubrifont TC","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Water Brush","Waterfall","Wavefont","Wellfleet","Wendy One","Whisper","WindSong","Winky Rough","Winky Sans","Wire One","Wittgenstein","Wix Madefor Display","Wix Madefor Text","Work Sans","Workbench","Xanh Mono","Yaldevi","Yanone Kaffeesatz","Yantramanav","Yarndings 12","Yarndings 12 Charted","Yarndings 20","Yarndings 20 Charted","Yatra One","Yellowtail","Yeon Sung","Yeseva One","Yesteryear","Yomogi","Young Serif","Yrsa","Ysabeau","Ysabeau Infant","Ysabeau Office","Ysabeau SC","Yuji Boku","Yuji Hentaigana Akari","Yuji Hentaigana Akebono","Yuji Mai","Yuji Syuku","Yusei Magic","ZCOOL KuaiLe","ZCOOL QingKe HuangYou","ZCOOL XiaoWei","Zain","Zalando Sans","Zalando Sans Expanded","Zalando Sans SemiExpanded","Zen Antique","Zen Antique Soft","Zen Dots","Zen Kaku Gothic Antique","Zen Kaku Gothic New","Zen Kurenaido","Zen Loop","Zen Maru Gothic","Zen Old Mincho","Zen Tokyo Zoo","Zeyada","Zhi Mang Xing","Zilla Slab","Zilla Slab Highlight"];exports.default=googleFontFamilies,exports.googleFontFamilies=googleFontFamilies;
|
|
@@ -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={}));
|
|
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={}));
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var getCollectionProps=require("./libs/api/get-collection-props.js"),getCollectionSharePageProps=require("./libs/api/get-collection-share-page-props.js"),getHomePageProps=require("./libs/api/get-home-page-props.js"),getHomePagePropsV2=require("./libs/api/get-home-page-props-v2.js"),getPreviewProps=require("./libs/api/get-preview-props.js"),getBuilderProps=require("./libs/api/get-builder-props.js"),getProductProps=require("./libs/api/get-product-props.js"),getStaticPagePropsV2=require("./libs/api/get-static-page-props-v2.js"),getSharePageProps=require("./libs/api/get-share-page-props.js"),getPostPurchasePropsPreview=require("./libs/api/get-post-purchase-props-preview.js"),getStaticPagePropsPreview=require("./libs/api/get-static-page-props-preview.js"),getPreviewContentProps=require("./libs/api/get-preview-content-props.js"),fetcher=require("./libs/fetcher.js"),getLayout=require("./libs/get-layout.js"),genCss=require("./libs/helpers/gen-css.js"),useTrackingView=require("./libs/hooks/use-tracking-view.js"),usePagePreview=require("./libs/hooks/usePagePreview.js"),userAgent=require("./libs/helpers/user-agent.js"),normalize=require("./libs/helpers/normalize.js"),getFallback=require("./libs/helpers/get-fallback.js"),common=require("./libs/helpers/common.js"),SharePageTracking=require("./components/SharePageTracking.js"),getStaticPaths=require("./libs/getStaticPaths.js"),genFonts=require("./libs/helpers/gen-fonts.js"),googleFonts=require("./libs/google-fonts.js"),getStorefrontApi=require("./libs/get-storefront-api.js"),ErrorBoundary=require("./components/ErrorBoundary.js"),ErrorFallback=require("./components/ErrorFallback.js"),_404=require("./pages/404.js"),_500=require("./pages/500.js"),GoogleAnalytic=require("./components/GoogleAnalytic.js"),FacebookPixel=require("./components/FacebookPixel.js"),TikTokPixel=require("./components/TikTokPixel.js"),collectionDetail=require("./pages/collection-detail.js"),preview=require("./pages/preview.js"),productDetail=require("./pages/product-detail.js"),_static=require("./pages/static.js"),builder=require("./pages/builder.js"),staticV2=require("./pages/static-v2.js"),previewTemplate=require("./pages/preview-template.js");exports.getCollectionProps=getCollectionProps.getCollectionProps,exports.getCollectionSharePageProps=getCollectionSharePageProps.getCollectionSharePageProps,exports.getHomePageProps=getHomePageProps.getHomePageProps,exports.getHomePagePropsV2=getHomePagePropsV2.getHomePagePropsV2,exports.getPreviewProps=getPreviewProps.getPreviewProps,exports.getBuilderProps=getBuilderProps.getBuilderProps,exports.getProductProps=getProductProps.getProductProps,exports.getStaticPagePropsV2=getStaticPagePropsV2.getStaticPagePropsV2,exports.getSharePageProps=getSharePageProps.getSharePageProps,exports.getPostPurchasePropsPreview=getPostPurchasePropsPreview.getPostPurchasePropsPreview,exports.getStaticPagePropsPreview=getStaticPagePropsPreview.getStaticPagePropsPreview,exports.getSharePageContentProps=getPreviewContentProps.getSharePageContentProps,exports.createAppAPIFetcher=fetcher.createAppAPIFetcher,exports.createFetcher=fetcher.createFetcher,exports.createShopifyFetcher=fetcher.createShopifyFetcher,exports.createTemplateFetcher=fetcher.createTemplateFetcher,exports.getLayout=getLayout.getLayout,exports.genCSS=genCss.genCSS,exports.useTrackingView=useTrackingView.useTrackingView,exports.usePagePreview=usePagePreview.usePagePreview,exports.isBot=userAgent.isBot,exports.normalizePageSectionResponseV2=normalize.normalizePageSectionResponseV2,exports.parseBuilderTemplateV2=normalize.parseBuilderTemplateV2,exports.getFallbackV2=getFallback.getFallbackV2,exports.retryWithDelay=common.retryWithDelay,exports.SharePageTracking=SharePageTracking.SharePageTracking,exports.getStaticPaths=getStaticPaths.getStaticPaths,exports.getFontFromGroupSetting=genFonts.getFontFromGroupSetting,exports.getFontsFromDataBuilder=genFonts.getFontsFromDataBuilder,exports.getFontFromGlobalStyle=googleFonts.getFontFromGlobalStyle,exports.getFonts=googleFonts.getFonts,exports.getStorefrontApi=getStorefrontApi.getStorefrontApi,exports.ErrorBoundary=ErrorBoundary.ErrorBoundary,exports.ErrorFallback=ErrorFallback.ErrorFallback,exports.Page404=_404.Page404,exports.Page500=_500.Page500,exports.GoogleAnalytic=GoogleAnalytic.GoogleAnalytic,exports.FacebookPixel=FacebookPixel.FacebookPixel,exports.TikTokPixel=TikTokPixel.TikTokPixel,exports.CollectionDetailPage=collectionDetail.default,exports.PreviewPage=preview.PreviewPage,exports.ProductDetailPage=productDetail.default,exports.StaticPage=_static.default,exports.BuilderPage=builder.BuilderPage,exports.StaticPageV2=staticV2.StaticPageV2,exports.PreviewTemplate=previewTemplate.PreviewTemplate;
|
|
1
|
+
"use strict";var getCollectionProps=require("./libs/api/get-collection-props.js"),getCollectionSharePageProps=require("./libs/api/get-collection-share-page-props.js"),getHomePageProps=require("./libs/api/get-home-page-props.js"),getHomePagePropsV2=require("./libs/api/get-home-page-props-v2.js"),getPreviewProps=require("./libs/api/get-preview-props.js"),getBuilderProps=require("./libs/api/get-builder-props.js"),getProductProps=require("./libs/api/get-product-props.js"),getStaticPagePropsV2=require("./libs/api/get-static-page-props-v2.js"),getSharePageProps=require("./libs/api/get-share-page-props.js"),getPostPurchasePropsPreview=require("./libs/api/get-post-purchase-props-preview.js"),getStaticPagePropsPreview=require("./libs/api/get-static-page-props-preview.js"),getPreviewContentProps=require("./libs/api/get-preview-content-props.js"),fetcher=require("./libs/fetcher.js"),getLayout=require("./libs/get-layout.js"),genCss=require("./libs/helpers/gen-css.js"),useTrackingView=require("./libs/hooks/use-tracking-view.js"),usePagePreview=require("./libs/hooks/usePagePreview.js"),userAgent=require("./libs/helpers/user-agent.js"),normalize=require("./libs/helpers/normalize.js"),getFallback=require("./libs/helpers/get-fallback.js"),common=require("./libs/helpers/common.js"),SharePageTracking=require("./components/SharePageTracking.js"),getStaticPaths=require("./libs/getStaticPaths.js"),genFonts=require("./libs/helpers/gen-fonts.js"),googleFonts=require("./libs/google-fonts.js"),getStorefrontApi=require("./libs/get-storefront-api.js"),ErrorBoundary=require("./components/ErrorBoundary.js"),ErrorFallback=require("./components/ErrorFallback.js"),_404=require("./pages/404.js"),_500=require("./pages/500.js"),GoogleAnalytic=require("./components/GoogleAnalytic.js"),FacebookPixel=require("./components/FacebookPixel.js"),TikTokPixel=require("./components/TikTokPixel.js"),collectionDetail=require("./pages/collection-detail.js"),preview=require("./pages/preview.js"),productDetail=require("./pages/product-detail.js"),_static=require("./pages/static.js"),builder=require("./pages/builder.js"),staticV2=require("./pages/static-v2.js"),previewTemplate=require("./pages/preview-template.js");exports.getCollectionProps=getCollectionProps.getCollectionProps,exports.getCollectionSharePageProps=getCollectionSharePageProps.getCollectionSharePageProps,exports.getHomePageProps=getHomePageProps.getHomePageProps,exports.getHomePagePropsV2=getHomePagePropsV2.getHomePagePropsV2,exports.getPreviewProps=getPreviewProps.getPreviewProps,exports.getBuilderProps=getBuilderProps.getBuilderProps,exports.getProductProps=getProductProps.getProductProps,exports.getStaticPagePropsV2=getStaticPagePropsV2.getStaticPagePropsV2,exports.getSharePageProps=getSharePageProps.getSharePageProps,exports.getPostPurchasePropsPreview=getPostPurchasePropsPreview.getPostPurchasePropsPreview,exports.getStaticPagePropsPreview=getStaticPagePropsPreview.getStaticPagePropsPreview,exports.getSharePageContentProps=getPreviewContentProps.getSharePageContentProps,exports.createAppAPIFetcher=fetcher.createAppAPIFetcher,exports.createFetcher=fetcher.createFetcher,exports.createShopifyFetcher=fetcher.createShopifyFetcher,exports.createTemplateFetcher=fetcher.createTemplateFetcher,exports.getLayout=getLayout.getLayout,exports.genCSS=genCss.genCSS,exports.useTrackingView=useTrackingView.useTrackingView,exports.usePagePreview=usePagePreview.usePagePreview,exports.isBot=userAgent.isBot,exports.normalizePageSectionResponseV2=normalize.normalizePageSectionResponseV2,exports.parseBuilderTemplateV2=normalize.parseBuilderTemplateV2,exports.getFallbackV2=getFallback.getFallbackV2,exports.retryWithDelay=common.retryWithDelay,exports.SharePageTracking=SharePageTracking.SharePageTracking,exports.getStaticPaths=getStaticPaths.getStaticPaths,exports.getFontFromGroupSetting=genFonts.getFontFromGroupSetting,exports.getFontsFromDataBuilder=genFonts.getFontsFromDataBuilder,exports.getFontFromGlobalStyle=googleFonts.getFontFromGlobalStyle,exports.getFontLinkFromGlobalStyle=googleFonts.getFontLinkFromGlobalStyle,exports.getFonts=googleFonts.getFonts,exports.getStorefrontApi=getStorefrontApi.getStorefrontApi,exports.ErrorBoundary=ErrorBoundary.ErrorBoundary,exports.ErrorFallback=ErrorFallback.ErrorFallback,exports.Page404=_404.Page404,exports.Page500=_500.Page500,exports.GoogleAnalytic=GoogleAnalytic.GoogleAnalytic,exports.FacebookPixel=FacebookPixel.FacebookPixel,exports.TikTokPixel=TikTokPixel.TikTokPixel,exports.CollectionDetailPage=collectionDetail.default,exports.PreviewPage=preview.PreviewPage,exports.ProductDetailPage=productDetail.default,exports.StaticPage=_static.default,exports.BuilderPage=builder.BuilderPage,exports.StaticPageV2=staticV2.StaticPageV2,exports.PreviewTemplate=previewTemplate.PreviewTemplate;
|
|
@@ -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"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js"),customFonts=require("../custom-fonts.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getHomePagePropsV2=(e,t)=>async()=>{try{let a={slugType:"STATIC"},[s,l,i,o]=await Promise.allSettled([e([core.PublishedThemePagesDocument,a]),e([core.StorePropertyDocument]),t([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:[index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===s.status)throw Error(s.reason?.[0]);let
|
|
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"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js"),customFonts=require("../custom-fonts.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getHomePagePropsV2=(e,t)=>async()=>{try{let a={slugType:"STATIC"},[s,l,i,o]=await Promise.allSettled([e([core.PublishedThemePagesDocument,a]),e([core.StorePropertyDocument]),t([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:[index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===s.status)throw Error(s.reason?.[0]);let d="fulfilled"===o.status?o.value:void 0,n=s.value?.publishedThemePages?.[0],r=s.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!n)throw Error("No data builder found for Home page");let u=normalize.parseBuilderTemplateV2(n),[g,h,m,P]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(u,void 0,n?.pageStyle?.data),googleFonts.getFontLinkFromGlobalStyle(n?.pageStyle?.data,void 0),getFallback.getFallbackV2(e,u),customFonts.getCustomFonts(r)]),p=n.isMobile??!1,f=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,n?.metafields)||d?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,c=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,n?.metafields)||d?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),T="fulfilled"===i.status?i.value:void 0,y="fulfilled"===l.status?l.value:void 0,M=y?.storeProperty?.favicon??"/favicon/favicon-32x32.png",b={defaultTitle:T?.shop.name,title:n?.name??"Home",description:f??T?.shop.description,openGraph:{site_name:T?.shop.name,locale:T?.localization.country.isoCode,title:n?.name??T?.shop.name,description:f??T?.shop.description,images:c?[c]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${y?.storeProperty?.primaryDomain}/`,additionalLinkTags:generateSeoLinks.generateSeoLinks({favicon:M,shopMeta:T})},S=T?.localization.language.isoCode??null,_=T?.localization.country.isoCode??null,A=S&&_?`${S}-${_}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(n?.pageStyle?.data,p),fontStyle:h,elementFontStyle:g,builderData:u,swr:{fallback:m},moneyFormat:T?.shop.moneyFormat??null,currency:T?.localization.country.currency.isoCode??null,languageIsoCode:S,countryIsoCode:_,locale:A,swatches:parseJson.parseJson(y?.storeProperty?.swatchesConfig),seo:b,mobileOnly:p,gaTrackingId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,n?.metafields)??null,facebookPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,n?.metafields)??null,tiktokPixelId:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,n?.metafields)??null,customCodeHeader:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,n?.metafields)??null,customCodeBody:getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_BODY,n?.metafields)??null,pageHandle:n.handle??null,customFonts:P})}catch(e){throw nextjs.captureException(e),e}};exports.getHomePagePropsV2=getHomePagePropsV2;
|
|
@@ -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"),generateManifres=require("../helpers/generate-manifres.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js");const getHomePageProps=(e,s)=>async()=>{let a="STATIC",t={slugType:a},[r,i,o,l]=await Promise.allSettled([e([core.PublishedThemePagesDocument,t]),e([core.StorePropertyDocument]),s([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:[index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===r.status)return{pageType:a};let n="fulfilled"===l.status?l.value:void 0,d=r.value.publishedThemePages?.[0],p=normalize.parseBuilderTemplate(d),u=await googleFonts.getFontFromGlobalStyle(d?.pageStyle?.data),c=core.prefetchQueries(p),m=await Promise.allSettled(c.map(({query:s,variables:a,func:t})=>t?t(e,a):s?e([s,a]):{})),h=c.reduce((e,{key:s},a)=>{let t=m[a];return t?.status==="fulfilled"?{...e,[s]:t.value}:e},{}),g=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,d?.metafields)||n?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,f=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,d?.metafields)||n?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),P="fulfilled"===o.status?o.value:void 0,y="fulfilled"===i.status?i.value:void 0,T=y?.storeProperty?.favicon??"/favicon/favicon-32x32.png",M={defaultTitle:P?.shop.name,title:d?.name??"Home",description:g??P?.shop.description,openGraph:{site_name:P?.shop.name,locale:P?.localization.country.isoCode,title:d?.name??P?.shop.name,description:g??P?.shop.description,images:f?[f]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:"/",additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${T}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${T}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${T}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:generateManifres.generateManifest({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:P?.shop.name,short_name:P?.shop.name,description:P?.shop.description,icons:[{src:`${T}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${T}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},_=P?.localization.language.isoCode??null,x=P?.localization.country.isoCode??null,S=_&&x?`${_}-${x}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(d?.pageStyle?.data),fontStyle:u,builderData:p,pageType:a,swr:{fallback:h},moneyFormat:P?.shop.moneyFormat??null,currency:P?.localization.country.currency.isoCode??null,locale:S,languageIsoCode:_,countryIsoCode:x,swatches:parseJson.parseJson(y?.storeProperty?.swatchesConfig),seo:M})};exports.getHomePageProps=getHomePageProps;
|
|
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"),generateManifres=require("../helpers/generate-manifres.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js");const getHomePageProps=(e,s)=>async()=>{let a="STATIC",t={slugType:a},[r,i,o,l]=await Promise.allSettled([e([core.PublishedThemePagesDocument,t]),e([core.StorePropertyDocument]),s([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:[index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===r.status)return{pageType:a};let n="fulfilled"===l.status?l.value:void 0,d=r.value.publishedThemePages?.[0],p=normalize.parseBuilderTemplate(d),u=await googleFonts.getFontFromGlobalStyle(d?.pageStyle?.data,void 0),c=core.prefetchQueries(p),m=await Promise.allSettled(c.map(({query:s,variables:a,func:t})=>t?t(e,a):s?e([s,a]):{})),h=c.reduce((e,{key:s},a)=>{let t=m[a];return t?.status==="fulfilled"?{...e,[s]:t.value}:e},{}),g=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,d?.metafields)||n?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,f=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,d?.metafields)||n?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),P="fulfilled"===o.status?o.value:void 0,y="fulfilled"===i.status?i.value:void 0,T=y?.storeProperty?.favicon??"/favicon/favicon-32x32.png",M={defaultTitle:P?.shop.name,title:d?.name??"Home",description:g??P?.shop.description,openGraph:{site_name:P?.shop.name,locale:P?.localization.country.isoCode,title:d?.name??P?.shop.name,description:g??P?.shop.description,images:f?[f]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:"/",additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${T}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${T}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${T}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:generateManifres.generateManifest({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:P?.shop.name,short_name:P?.shop.name,description:P?.shop.description,icons:[{src:`${T}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${T}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},_=P?.localization.language.isoCode??null,x=P?.localization.country.isoCode??null,S=_&&x?`${_}-${x}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(d?.pageStyle?.data),fontStyle:u,builderData:p,pageType:a,swr:{fallback:h},moneyFormat:P?.shop.moneyFormat??null,currency:P?.localization.country.currency.isoCode??null,locale:S,languageIsoCode:_,countryIsoCode:x,swatches:parseJson.parseJson(y?.storeProperty?.swatchesConfig),seo:M})};exports.getHomePageProps=getHomePageProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),nextjs=require("@sentry/nextjs"),googleFonts=require("../google-fonts.js"),getFallback=require("../helpers/get-fallback.js"),normalize=require("../helpers/normalize.js"),usePagePreview=require("../hooks/usePagePreview.js"),parseJson=require("../helpers/parse-json.js"),genCss=require("../helpers/gen-css.js");const fetchSalePageDataByID=async(e,r)=>{let a={themePageId:e.themePageId,first:1,where:{default:!0}},[t,o]=await Promise.allSettled([r([core.ThemePageDocument,a]),r([core.StorePropertyDocument])]);if("rejected"===t.status)throw Error(t.reason?.[0]);return{dataBuilder:t.value.themePage,pageStyle:t.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:o,dynamicDiscountOffer:void 0,productOffers:[]}},fetchPostPurchasePageDataByID=async(e,r)=>{let a={themePageId:e.themePageId,first:1,where:{default:!0}},[t,o,l,s]=await Promise.allSettled([r([core.ThemePageDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.themePage,pageStyle:t.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchThemePageDataByTemplateID=async(e,r)=>{let a={libraryTemplateId:e.libraryTemplateId},t=[],[o,l]=await Promise.allSettled([r([core.LibraryTemplateDocument,a]),r([core.StorePropertyDocument])]);if(e.currentOfferID){let[a]=await Promise.allSettled([r([core.LibrarySaleFunnelDocument,{librarySaleFunnelId:e.librarySaleFunnelID}])]);if("rejected"===a.status)throw Error(a.reason?.[0]);let o=a.value.librarySaleFunnel?.offers?.find(r=>r?.id===e.currentOfferID);o&&(t=o.discounts?.filter(e=>e?.objectType==="PRODUCT"&&"ORDER_VALUE"===e.type).map(e=>({node:{...e}}))||[])}if("rejected"===o.status)throw Error(o.reason?.[0]);return{dataBuilder:o.value.libraryTemplate,pageStyle:void 0,storeProperty:l,dynamicDiscountOffer:void 0,productOffers:t}},fetchShopLibraryPageDataByID=async(e,r)=>{let a={shopLibraryPageId:e.shopLibraryPageId},[t,o,l,s]=await Promise.allSettled([r([core.ShopLibraryPageDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.shopLibraryPage,pageStyle:void 0,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchLibraryTemplateDataByID=async(e,r)=>{let a={libraryTemplateId:e.libraryTemplateId},[t,o,l,s]=await Promise.allSettled([r([core.LibraryTemplateDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.libraryTemplate,pageStyle:void 0,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},getRelevantPageData=async e=>{let{id:r,currentOfferID:a,fetcher:t,isLibraryTemplate:o,librarySaleFunnelID:l,isShopLibraryPage:s}=e;return l?await fetchThemePageDataByTemplateID({libraryTemplateId:r,currentOfferID:a,librarySaleFunnelID:l},t):s&&a?await fetchShopLibraryPageDataByID({shopLibraryPageId:r,currentOfferID:a},t):o&&a?await fetchLibraryTemplateDataByID({libraryTemplateId:r,currentOfferID:a},t):a?await fetchPostPurchasePageDataByID({themePageId:r,currentOfferID:a},t):await fetchSalePageDataByID({themePageId:r},t)},getPostPurchasePropsPreview=(e,r,a)=>async t=>{try{let{id:o,currentOfferID:l,isLibraryTemplate:s,isShopLibraryPage:n}=t,{dataBuilder:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),nextjs=require("@sentry/nextjs"),googleFonts=require("../google-fonts.js"),getFallback=require("../helpers/get-fallback.js"),normalize=require("../helpers/normalize.js"),usePagePreview=require("../hooks/usePagePreview.js"),parseJson=require("../helpers/parse-json.js"),genCss=require("../helpers/gen-css.js");const fetchSalePageDataByID=async(e,r)=>{let a={themePageId:e.themePageId,first:1,where:{default:!0}},[t,o]=await Promise.allSettled([r([core.ThemePageDocument,a]),r([core.StorePropertyDocument])]);if("rejected"===t.status)throw Error(t.reason?.[0]);return{dataBuilder:t.value.themePage,pageStyle:t.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:o,dynamicDiscountOffer:void 0,productOffers:[]}},fetchPostPurchasePageDataByID=async(e,r)=>{let a={themePageId:e.themePageId,first:1,where:{default:!0}},[t,o,l,s]=await Promise.allSettled([r([core.ThemePageDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.themePage,pageStyle:t.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchThemePageDataByTemplateID=async(e,r)=>{let a={libraryTemplateId:e.libraryTemplateId},t=[],[o,l]=await Promise.allSettled([r([core.LibraryTemplateDocument,a]),r([core.StorePropertyDocument])]);if(e.currentOfferID){let[a]=await Promise.allSettled([r([core.LibrarySaleFunnelDocument,{librarySaleFunnelId:e.librarySaleFunnelID}])]);if("rejected"===a.status)throw Error(a.reason?.[0]);let o=a.value.librarySaleFunnel?.offers?.find(r=>r?.id===e.currentOfferID);o&&(t=o.discounts?.filter(e=>e?.objectType==="PRODUCT"&&"ORDER_VALUE"===e.type).map(e=>({node:{...e}}))||[])}if("rejected"===o.status)throw Error(o.reason?.[0]);return{dataBuilder:o.value.libraryTemplate,pageStyle:void 0,storeProperty:l,dynamicDiscountOffer:void 0,productOffers:t}},fetchShopLibraryPageDataByID=async(e,r)=>{let a={shopLibraryPageId:e.shopLibraryPageId},[t,o,l,s]=await Promise.allSettled([r([core.ShopLibraryPageDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.shopLibraryPage,pageStyle:void 0,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchLibraryTemplateDataByID=async(e,r)=>{let a={libraryTemplateId:e.libraryTemplateId},[t,o,l,s]=await Promise.allSettled([r([core.LibraryTemplateDocument,a]),r([core.StorePropertyDocument]),r([core.SaleFunnelDiscountsDocument,{where:{saleFunnelOfferID:e.currentOfferID}}]),r([core.SaleFunnelOfferDocument,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===t.status)throw Error(t.reason?.[0]);if("rejected"===l.status)throw Error(l.reason?.[0]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:t.value.libraryTemplate,pageStyle:void 0,storeProperty:o,dynamicDiscountOffer:s.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:l.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},getRelevantPageData=async e=>{let{id:r,currentOfferID:a,fetcher:t,isLibraryTemplate:o,librarySaleFunnelID:l,isShopLibraryPage:s}=e;return l?await fetchThemePageDataByTemplateID({libraryTemplateId:r,currentOfferID:a,librarySaleFunnelID:l},t):s&&a?await fetchShopLibraryPageDataByID({shopLibraryPageId:r,currentOfferID:a},t):o&&a?await fetchLibraryTemplateDataByID({libraryTemplateId:r,currentOfferID:a},t):a?await fetchPostPurchasePageDataByID({themePageId:r,currentOfferID:a},t):await fetchSalePageDataByID({themePageId:r},t)},getPostPurchasePropsPreview=(e,r,a)=>async t=>{try{let{id:o,currentOfferID:l,isLibraryTemplate:s,isShopLibraryPage:n}=t,{dataBuilder:i,storeProperty:c,productOffers:u,pageStyle:f,dynamicDiscountOffer:D}=await getRelevantPageData({id:o,currentOfferID:l,fetcher:e,isLibraryTemplate:s,isShopLibraryPage:n,librarySaleFunnelID:r});if(!i)throw Error(`No data builder found for slug: /preview/${o}`);let d=r||s&&l?normalize.parseBuilderLibraryTemplate(i):n?normalize.parseShopLibraryPageTemplate(i):normalize.parseBuilderTemplateV2(i),y=a||e,[m,h,P]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(d,void 0,f),googleFonts.getFontLinkFromGlobalStyle(f,void 0),getFallback.getFallbackV2(y,d,!1)]),{seo:g,pageConfig:p}=usePagePreview.usePagePreview(i,c);return parseJson.serializableJson({themeStyle:genCss.genCSS(f),seo:g,...p,elementFontStyle:m,fontStyle:h,builderData:d,swr:{fallback:P},productOffers:u,dynamicDiscountOffer:D})}catch(e){throw console.log("error",e),nextjs.captureException(e),e}};exports.fetchLibraryTemplateDataByID=fetchLibraryTemplateDataByID,exports.fetchPostPurchasePageDataByID=fetchPostPurchasePageDataByID,exports.fetchSalePageDataByID=fetchSalePageDataByID,exports.fetchShopLibraryPageDataByID=fetchShopLibraryPageDataByID,exports.fetchThemePageDataByTemplateID=fetchThemePageDataByTemplateID,exports.getPostPurchasePropsPreview=getPostPurchasePropsPreview,exports.getRelevantPageData=getRelevantPageData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),googleFonts=require("../google-fonts.js"),genCss=require("../helpers/gen-css.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),fetcher=require("../fetcher.js"),getCollectionSharePageProps=require("./get-collection-share-page-props.js");const getSharePageContentProps=e=>async t=>{try{let{sharedPage:l,customFonts:o,publicToken:r}=await e([t]);if(!l||!r)return null;let{page:s,themeStyle:n,pageMeta:a,shopMeta:u,moneyFormat:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),nextjs=require("@sentry/nextjs"),customFonts=require("../custom-fonts.js"),googleFonts=require("../google-fonts.js"),genCss=require("../helpers/gen-css.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),fetcher=require("../fetcher.js"),getCollectionSharePageProps=require("./get-collection-share-page-props.js");const getSharePageContentProps=e=>async t=>{try{let{sharedPage:l,customFonts:o,publicToken:r}=await e([t]);if(!l||!r)return null;let{page:s,themeStyle:n,pageMeta:a,shopMeta:u,moneyFormat:i,moneyWithCurrencyFormat:c}=l,{sectionPosition:p}=s??{},g=normalize.parseBuilderTemplateV2({...l,sectionPosition:p}),d=null,P=null,f=null;if(s?.type==="GP_COLLECTION"){let e=(a??[]).find(e=>"selected_preview_collection"===e.key)?.value,t=e?JSON.parse(e??{}):null;P=t?.collectionId,f=t?.collectionTitle}let C=null;if(s?.type==="GP_PRODUCT"){let e=(a??[]).find(e=>"selected_preview_product"===e.key)?.value;C=e?JSON.parse(e??{}):null}let[h,m,y,S,F]=await Promise.allSettled([googleFonts.getFontStyleFromPageTemplate(g,void 0,n?.data),googleFonts.getFontLinkFromGlobalStyle(n?.data),customFonts.getCustomFonts(o),fetcher.createFetcher(r)([core.StorePropertyDocument]),s?.type==="GP_COLLECTION"?getCollectionSharePageProps.getCollectionSharePageProps(fetcher.createFetcher(r))(P??void 0):null]);d="fulfilled"===F.status?F.value?.collection:null;let v="fulfilled"===h.status?h.value:null,_="fulfilled"===m.status?m.value:null,j="fulfilled"===y.status?y.value:null,O="fulfilled"===S.status?S.value:void 0;return parseJson.serializableJson({builderData:g,page:s,themeStyle:genCss.genCSS(n?.data,!1),pageMeta:a,shopMeta:u,elementFontStyle:v,fontStyle:_,customFonts:j,publicStoreFrontData:r?{token:r,endpoint:process.env.NEXT_PUBLIC_API_URL??""}:null,pageType:s?.type,moneyFormat:i,moneyWithCurrencyFormat:c,swatches:parseJson.parseJson(O?.storeProperty?.swatchesConfig),collection:d,dynamicCollection:s?.type==="GP_COLLECTION"?{collectionId:d?.baseID,collectionTitle:f}:null,dynamicProduct:s?.type==="GP_PRODUCT"?C:null})}catch(e){return nextjs.captureException(e),null}};exports.getSharePageContentProps=getSharePageContentProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),adapterShopify=require("@gem-sdk/adapter-shopify"),nextjs=require("@sentry/nextjs"),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"),customFonts=require("../custom-fonts.js"),sentry=require("../helpers/sentry.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getStaticPagePropsPreview=(e,o)=>async t=>{try{let a="STATIC",r={handleURL:t,pageType:a},[n,s,l]=await Promise.allSettled([e([core.PreviewThemePageDocument,r]),e([core.StorePropertyDocument]),o([adapterShopify.ShopMetaDocument])]);if("rejected"===n.status)throw sentry.sentryCaptureException("PreviewThemePageDocument",n.reason,{variables:r,theme:n}),Error(n.reason?.[0]);let i=n.value.previewThemePage;if(!i)throw Error(`No data builder found for slug: /preview/${t}`);let c=i.customFonts,u=normalize.parseBuilderTemplateV2(i),[g,p,
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),adapterShopify=require("@gem-sdk/adapter-shopify"),nextjs=require("@sentry/nextjs"),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"),customFonts=require("../custom-fonts.js"),sentry=require("../helpers/sentry.js"),generateSeoLinks=require("../helpers/generate-seo-links.js");const getStaticPagePropsPreview=(e,o)=>async t=>{try{let a="STATIC",r={handleURL:t,pageType:a},[n,s,l]=await Promise.allSettled([e([core.PreviewThemePageDocument,r]),e([core.StorePropertyDocument]),o([adapterShopify.ShopMetaDocument])]);if("rejected"===n.status)throw sentry.sentryCaptureException("PreviewThemePageDocument",n.reason,{variables:r,theme:n}),Error(n.reason?.[0]);let i=n.value.previewThemePage;if(!i)throw Error(`No data builder found for slug: /preview/${t}`);let c=i.customFonts,u=normalize.parseBuilderTemplateV2(i),[d,g,p,m]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(u,void 0,i?.themeStyle?.data),googleFonts.getFontLinkFromGlobalStyle(i?.themeStyle?.data),getFallback.getFallbackV2(e,u),customFonts.getCustomFonts(c)]),h=!!i.isMobile,y=i?.dataSEO?.find(e=>e?.key==="global-meta-description")?.value,P=parseJson.parseJson(i?.dataSEO?.find(e=>e?.key==="global-meta-thumbnail")?.value),f="fulfilled"===l.status?l.value:void 0,k="fulfilled"===s.status?s.value:void 0,S=k?.storeProperty?.favicon??"/favicon/favicon-32x32.png",v={defaultTitle:f?.shop.name,title:i?.name,description:y??f?.shop.description,openGraph:{site_name:f?.shop.name,locale:f?.localization.country.isoCode,title:i?.name??f?.shop.name,description:y??f?.shop.description,images:P?[P]:[]},nofollow:!0,noindex:!0,canonical:`/preview/${t}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:generateSeoLinks.generateSeoLinks({favicon:S,shopMeta:f})},w=f?.localization.language.isoCode??null,F=f?.localization.country.isoCode??null,b=w&&F?`${w}-${F}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(i?.themeStyle?.data,h),fontStyle:g,elementFontStyle:d,builderData:u,pageType:a,moneyFormat:f?.shop?.moneyFormat??null,currency:f?.localization?.country?.currency?.isoCode??null,languageIsoCode:w,countryIsoCode:F,locale:b,swr:{fallback:p},swatches:parseJson.parseJson(k?.storeProperty?.swatchesConfig),seo:v,mobileOnly:h,gaTrackingId:i.analytic?.gaTrackingID??null,facebookPixelId:i.analytic?.fbPixelID??null,tiktokPixelId:i.analytic?.tiktokPixelID??null,customCodeHeader:i.customCode?.header??null,customCodeBody:i.customCode?.body??null,customFonts:m,pageBackground:normalize.extractPageBackground(i),interaction:i?.interaction})}catch(e){throw nextjs.captureException(e),e}};exports.getStaticPagePropsPreview=getStaticPagePropsPreview;
|
|
@@ -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 m=normalize.parseBuilderTemplateV2(g),[P,f,p,c]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(m,u?.value),googleFonts.
|
|
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 m=normalize.parseBuilderTemplateV2(g),[P,f,p,c]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(m,u?.value,g?.pageStyle?.data),googleFonts.getFontLinkFromGlobalStyle(g?.pageStyle?.data,u?.value),getFallback.getFallbackV2(e,m),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),_=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOINDEX_KEY,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOINDEX_KEY)?.value,L=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOFOLLOW_KEY,g?.metafields)||r?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value,S="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:S?.shop.name,title:y||g?.name,description:M??S?.shop.description,openGraph:{site_name:S?.shop.name,locale:S?.localization.country.isoCode,title:(y||g?.name)??S?.shop.name,description:M??S?.shop.description,images:b?[b]:[]},noindex:"true"===_,nofollow:"true"===L,canonical:`https://${x?.storeProperty?.primaryDomain}/${a}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:generateSeoLinks.generateSeoLinks({favicon:A,shopMeta:S})},B=S?.localization.language.isoCode??null,I=S?.localization.country.isoCode??null,k=B&&I?`${B}-${I}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(g?.pageStyle?.data,T),fontStyle:f,elementFontStyle:P,builderData:m,pageType:i,moneyFormat:S?.shop.moneyFormat??null,currency:S?.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 +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"),generateManifres=require("../helpers/generate-manifres.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js");const getStaticPageProps=(e,s)=>async a=>{let t="STATIC",r={slug:a,slugType:t},[i,o,l,n]=await Promise.allSettled([e([core.PublishedThemePagesDocument,r]),e([core.StorePropertyDocument]),s([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:["source_font",index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===i.status)return{pageType:t};let d="fulfilled"===n.status?n.value:void 0,p=i.value.publishedThemePages?.[0],c=normalize.parseBuilderTemplate(p),u=await googleFonts.
|
|
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"),generateManifres=require("../helpers/generate-manifres.js"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),index=require("../../constants/index.js"),getMetafield=require("../helpers/get-metafield.js");const getStaticPageProps=(e,s)=>async a=>{let t="STATIC",r={slug:a,slugType:t},[i,o,l,n]=await Promise.allSettled([e([core.PublishedThemePagesDocument,r]),e([core.StorePropertyDocument]),s([adapterShopify.ShopMetaDocument]),e([core.PublishedShopMetasDocument,{keys:["source_font",index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===i.status)return{pageType:t};let d="fulfilled"===n.status?n.value:void 0,p=i.value.publishedThemePages?.[0],c=normalize.parseBuilderTemplate(p),u=await googleFonts.getFontLinkFromGlobalStyle(p?.pageStyle?.data),h=core.prefetchQueries(c),m=await Promise.allSettled(h.map(({query:s,variables:a,func:t})=>t?t(e,a):s?e([s,a]):{})),g=h.reduce((e,{key:s},a)=>{let t=m[a];return t?.status==="fulfilled"?{...e,[s]:t.value}:e},{}),f=getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,p?.metafields)||d?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,P=parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,p?.metafields)||d?.publishedShopMetas?.find(e=>e?.key===index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),y="fulfilled"===l.status?l.value:void 0,T="fulfilled"===o.status?o.value:void 0,M=T?.storeProperty?.favicon??"/favicon/favicon-32x32.png",_={defaultTitle:y?.shop.name??"",title:p?.name??"",description:f??y?.shop.description??"",openGraph:{site_name:y?.shop.name??"",locale:y?.localization.country.isoCode??"",title:p?.name??y?.shop.name??"",description:f??y?.shop.description??"",images:P?[P]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`/${a}`,additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${M}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${M}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${M}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:generateManifres.generateManifest({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:y?.shop.name,short_name:y?.shop.name,description:y?.shop.description,icons:[{src:`${M}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${M}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},S=y?.localization.language.isoCode??null,x=y?.localization.country.isoCode??null,b=S&&x?`${S}-${x}`:null;return parseJson.serializableJson({themeStyle:genCss.genCSS(p?.pageStyle?.data),fontStyle:u,builderData:c,pageType:t,moneyFormat:y?.shop.moneyFormat??null,currency:y?.localization.country.currency.isoCode??null,languageIsoCode:S,countryIsoCode:x,locale:b,swr:{fallback:g},swatches:parseJson.parseJson(T?.storeProperty?.swatchesConfig),seo:_})};exports.getStaticPageProps=getStaticPageProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var checkOptionFont=require("./helpers/check-option-font.js"),genFonts=require("./helpers/gen-fonts.js"),sentry=require("./helpers/sentry.js");const CHROME_UA="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",IE_UA="Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko";async function getFontForUA(e
|
|
1
|
+
"use strict";var checkOptionFont=require("./helpers/check-option-font.js"),genFonts=require("./helpers/gen-fonts.js"),sentry=require("./helpers/sentry.js"),googleFontV1=require("../constants/googleFontV1.js");const CHROME_UA="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",IE_UA="Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko";async function getFontForUA(t,e){try{return fetch(t,{headers:{"User-Agent":e}}).then(r=>200===r.status?r.text():(sentry.sentryCaptureException("getFontForUA",`Unexpected status ${r.status}`,{url:t,UA:e}),""))}catch(r){return sentry.sentryCaptureException("getFontForUA","Error fetching font",{url:t,UA:e,error:r}),""}}const composeFonts=t=>{let e=t.filter((t,e,r)=>e===r.findIndex(e=>e.family===t.family));return e.map(e=>{let r=t.filter(t=>t.family===e.family).reduce((t,e)=>[...t,...e.variants],[]).filter((t,e,r)=>e===r.findIndex(e=>e===t));return{...e,variants:r}})},GOOGLE_CSS2_OVERRIDES={"Roboto Flex":"https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap"},normalizeFamily=t=>t?.trim().replace(/\s+/g,"+")??"",getOverrideUrlForFamily=t=>{let e=normalizeFamily(t);return GOOGLE_CSS2_OVERRIDES[t]??GOOGLE_CSS2_OVERRIDES[e]},VARIANT_WEIGHT_MAP={regular:"400",normal:"400",bold:"700",italic:"400italic"},googleFontFamiliesSet=new Set(googleFontV1.googleFontFamilies),isValidFont=(t,e,r)=>{let o="google"===t.type||"bunny"===t.type,n="theme"===t.type&&r,a=checkOptionFont.checkNotInOptionFont(t.family,e);return!!("google"!==e&&"google"!==t.type||googleFontFamiliesSet.has(t.family))&&!(o&&a)&&(o||!t.type||n)},normalizeVariant=t=>{let e=String(t).toLowerCase().trim();return VARIANT_WEIGHT_MAP[e]??t},sortFontVariants=t=>{let e=t=>{let e=String(t).toLowerCase().trim(),r=e.includes("italic"),o=e.replace("italic","").trim(),n=VARIANT_WEIGHT_MAP[o]??o,a=parseInt(n,10)||400;return{weight:a,isItalic:r}};return[...t].sort((t,r)=>{let o=e(t),n=e(r);return o.weight!==n.weight?o.weight-n.weight:o.isItalic!==n.isItalic?o.isItalic?1:-1:0})},makeUrlBySourceFont=(t,e,r)=>{let o=composeFonts(t).map(t=>{let e=t.variants.map(t=>normalizeVariant(t)),r=sortFontVariants(e);return`${t.family.replace(/ /g,"+")}:${r.join(",")}`}).join("|");if("sans-serif"===o)return;let n=r?.display||"swap",a=new URLSearchParams;return(a.append("family",o),a.append("display",n),"bunny"===e)?`https://fonts.bunny.net/css?${a.toString()}`:(r?.subset&&a.append("subset",r.subset),r?.effect&&a.append("effect",r.effect),`https://fonts.googleapis.com/css?${decodeURIComponent(a.toString())}`)},createFontUrls=(t,e,r,o)=>{let n=t.filter(t=>isValidFont(t,r||"google",o));if(!n.length)return;let a=n.filter((t,e,r)=>e===r.findIndex(e=>e.family===t.family)),i=[],l=[];for(let t of a){let e=getOverrideUrlForFamily(t.family);e&&"bunny"!==r?i.push(e):l.push(t)}let s=l.length?makeUrlBySourceFont(l,r||"google",e):void 0;return i.length&&s?[...i,s]:s?[s,...i]:i};async function getFonts(t,e,r=!0,o){let n=createFontUrls(t,e,o),a=Array.isArray(n)?n:n?[n]:[];if(!a.length)return"";if(r)return a.map(t=>`@import url('${t}');`).join("");let i="",l="";for(let t of a)try{let[e,r]=await Promise.all([getFontForUA(t,"Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"),getFontForUA(t,"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")]),o=`${e}${r}`;i+=o,l+=`@import url('${t}');`}catch(e){sentry.sentryCaptureException("getFonts","Error fetching font",{url:t,fontType:o,error:String(e)}),l+="",i+=""}let s=new TextEncoder().encode(i).length;return s<51200?i:l}const extractFontsFromPageTemplate=(t,e)=>{let r=[];return t.forEach(t=>{r.push(...genFonts.getFontsFromDataBuilder(t.data,e))}),composeFonts(r)},extractVariantFromTypography=(t,e)=>{let r="400";if(null!=t){let e=String(t).toLowerCase().trim();r=normalizeVariant(e)}let o=r,n=e&&"italic"===e.toLowerCase();return n&&!r.includes("italic")&&(o=r.includes("i")?r:`${r}italic`),o},HEADING_FONT_PREFIX="heading-",SUBHEADING_FONT_PREFIX="subheading-",PARAGRAPH_FONT_PREFIX="paragraph-",extractTypographyVariants=t=>{let e=t?.typography??{},r=t?.font??{},o=new Map;Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let n=t.startsWith(HEADING_FONT_PREFIX)||t.startsWith(SUBHEADING_FONT_PREFIX)?r.heading?"heading":void 0:t.startsWith(PARAGRAPH_FONT_PREFIX)&&r.body?"body":void 0,a=e.desktop,i=a?.fontFamily,l=i||n;["desktop","mobile","tablet"].forEach(t=>{let n=e[t];if(!n||"object"!=typeof n)return;let i=n.fontFamily||l;if(!i||"string"!=typeof i||!r[i])return;let s=n.fontWeight??a?.fontWeight,p=n.fontStyle??a?.fontStyle;if(null==s)return;let y=extractVariantFromTypography(s,p);o.has(i)||o.set(i,new Set),o.get(i).add(y)})});let n={};return o.forEach((t,e)=>{let o=r[e];o&&(n[e]={variants:Array.from(t).sort(),family:o.family})}),n},mapTypographyToFontFamily=t=>{let e=t?.typography??{},r=t?.font??{},o=t?.font??{},n={};return Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let a=e.desktop,i=e.mobile,l=e.tablet,s=t.startsWith(HEADING_FONT_PREFIX)||t.startsWith(SUBHEADING_FONT_PREFIX)?o.heading?"heading":void 0:t.startsWith(PARAGRAPH_FONT_PREFIX)&&o.body?"body":void 0,p=a?.fontFamily||i?.fontFamily||l?.fontFamily||s;if(!p||"string"!=typeof p)return;let y=r[p],g=o[p],F=y?.family||g?.family||p,c=y?.type||g?.type||"google";F&&(n[t]={family:F,type:c})}),n},getFontLinkFromGlobalStyle=async(t,e)=>{if(!t)return"";try{let r=JSON.parse(t),o=r?.font??{},n=Object.values(o),a=extractTypographyVariants(r);Object.keys(a).length>0&&(n=Object.entries(o).filter(([t])=>a[t]).map(([t,e])=>({...e,variants:a[t].variants})));let i=composeFonts(n);return getFonts(i,void 0,void 0,e)}catch{return""}},getFontFromGlobalStyle=(t,e)=>{if(!t)return"";try{let r=JSON.parse(t),o=r?.font??{},n=Object.entries(o).map(([,t])=>t);return getFonts(n,void 0,void 0,e)}catch{return""}};async function getFontStyleFromPageTemplate(t,e,r){let o,n=null;if(r)try{n=JSON.parse(r),o=mapTypographyToFontFamily(n)}catch{}let a=extractFontsFromPageTemplate(t,o);if(!n){if(0===a.length)return[];let t=await getFonts(a,void 0,void 0,e);return t?[t]:[]}let i=extractTypographyVariants(n),l=new Map;for(let t of Object.values(i)){let e=l.get(t.family);if(!e){l.set(t.family,new Set(t.variants));continue}t.variants.forEach(t=>e.add(t))}if(0===(a=a.map(t=>{let e=l.get(t.family);if(!e)return t;let r=t.variants.filter(t=>!e.has(t));return 0===r.length?null:{...t,variants:r}}).filter(t=>null!==t)).length)return[];let s=await getFonts(a,void 0,void 0,e);return s?[s]:[]}exports.composeFonts=composeFonts,exports.createFontUrls=createFontUrls,exports.extractTypographyVariants=extractTypographyVariants,exports.getFontFromGlobalStyle=getFontFromGlobalStyle,exports.getFontLinkFromGlobalStyle=getFontLinkFromGlobalStyle,exports.getFontStyleFromPageTemplate=getFontStyleFromPageTemplate,exports.getFonts=getFonts,exports.mapTypographyToFontFamily=mapTypographyToFontFamily;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const EXCLUDED_FONT_FAMILIES=["sans-serif"],
|
|
1
|
+
"use strict";const EXCLUDED_FONT_FAMILIES=["sans-serif"],getFallbackFontFamilyFromGlobalStyle=(t,e)=>{if(e&&t?.type&&!t?.custom?.fontFamily){let l=e[t.type];if(l){let e=JSON.parse(JSON.stringify(t));return e.custom||(e.custom={}),e.custom.fontFamily={value:l.family,type:l.type},e}}return t},getFontsFromDataBuilder=(t,e)=>{let l=[];for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let i=t[o],n=i.styles,r=i.settings;getFontFromGroupSetting(l,n,e),getFontFromGroupSetting(l,r,e)}return l},getFontFromGroupSetting=(t,e,l)=>{let o=["normal","hover","focus","active","disabled","price","compareAtPrice"];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let n=e[i];if(!n)continue;let r=l?getFallbackFontFamilyFromGlobalStyle(n,l):n;for(let e of(getFontValue(t,r),o)){if(!n[e])continue;let o=l?getFallbackFontFamilyFromGlobalStyle(n[e],l):n[e];getFontValue(t,o)}}},uniqueArray=t=>Array.from(new Set(t)),getFontValue=(t,e)=>{let l=e.custom?.fontFamily;"string"==typeof l&&(l={value:e.custom?.fontFamily||"",type:"google"});let o=l?.value;if(EXCLUDED_FONT_FAMILIES.includes(o))return;let i=e.custom?.fontVariants;if(i?.length||(i=[e.custom?.fontWeight]),l&&i?.length){let n=i.map(t=>"regular"===t?"400":t),r=e.custom?.fontWeight&&n.includes(e.custom?.fontWeight)?e.custom?.fontWeight:n[0];if(r){let i=uniqueArray([r,...e?.attrs?.isAlwaysLoadBold?["700"]:[],...e?.attrs?.loadFontStyles?.includes("bold")?["700"]:[]]);if(e?.attrs?.loadFontStyles?.includes("italic")){let t=i.map(t=>"string"==typeof t&&/^\d+$/.test(t)?`${t}i`:null).filter(t=>null!==t);i.push(...t)}let a=t.find(t=>t.family==o&&i.every(e=>t.variants.includes(e)));if(!a){let e=t.find(t=>t.family==o);e?i.forEach(t=>{e.variants.includes(t)||e.variants.push(t)}):("700"!==r&&n.includes("700")&&i.push("700"),t.push({family:o||"",variants:uniqueArray(i),subsets:[],type:l.type}))}}}};exports.getFontFromGroupSetting=getFontFromGroupSetting,exports.getFontsFromDataBuilder=getFontsFromDataBuilder;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
body {
|
|
3
3
|
background: ${f.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${f?.background}`)]}),jsxRuntime.jsx(core.PageProvider,{productOffers:g,publicStoreFrontData:x,dynamicDiscountOffer:p,children:jsxRuntime.jsx(core.BuilderComponentProvider,{components:e,children:jsxRuntime.jsxs("div",{className:`${d?"gp-bg-white post-purchase-page":""} `,children:[d&&jsxRuntime.jsx(Header.default,{pageType:"POST_PURCHASE"}),S&&jsxRuntime.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(h?.value||[])}</div>`}}),jsxRuntime.jsx(core.SectionProvider,{data:t,children:jsxRuntime.jsx(core.I18nProvider,{t:y,children:s?.map(e=>jsxRuntime.jsxs(core.BuilderProvider,{state:e.data,lazy:e.lazy,priority:e.priority,isPostPurchase:d,isPreview:j,children:[jsxRuntime.jsx(core.Render,{uid:e.uid}),S&&jsxRuntime.jsx(Script,{defer:!0,src:`${_}/assets-v2/gp-flow-action-lip-v7-5.js`})]},e.uid))})}),d&&jsxRuntime.jsx(FooterForPostPurchase.default,{shopName:m||""})]})})})]})};exports.StaticPageV2=StaticPageV2;
|
|
5
|
+
`},`page_background_${f?.background}`)]}),jsxRuntime.jsx(core.PageProvider,{productOffers:g,publicStoreFrontData:x,dynamicDiscountOffer:p,children:jsxRuntime.jsx(core.BuilderComponentProvider,{components:e,children:jsxRuntime.jsxs("div",{className:`${d?"gp-bg-white post-purchase-page":""} `,role:"main",children:[d&&jsxRuntime.jsx(Header.default,{pageType:"POST_PURCHASE"}),S&&jsxRuntime.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(h?.value||[])}</div>`}}),jsxRuntime.jsx(core.SectionProvider,{data:t,children:jsxRuntime.jsx(core.I18nProvider,{t:y,children:s?.map(e=>jsxRuntime.jsxs(core.BuilderProvider,{state:e.data,lazy:e.lazy,priority:e.priority,isPostPurchase:d,isPreview:j,children:[jsxRuntime.jsx(core.Render,{uid:e.uid}),S&&jsxRuntime.jsx(Script,{defer:!0,src:`${_}/assets-v2/gp-flow-action-lip-v7-5.js`})]},e.uid))})}),d&&jsxRuntime.jsx(FooterForPostPurchase.default,{shopName:m||""})]})})})]})};exports.StaticPageV2=StaticPageV2;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{useBuilderPreviewStore as t,useModalStore as i,useInteraction as n,cls as p}from"@gem-sdk/core";import{memo as a,useMemo as o,useCallback as r,useEffect as l}from"react";let isDialog=e=>!!e&&e?.tag==="Dialog"&&"component"===e.type,PopupManager=()=>{let a=t(e=>e.state),g=i(e=>e.setModalActive),s=i(e=>e.activeId),{isInteractionMode:d}=n(),c=o(()=>a.ROOT.childrens?.map(e=>a?.[e]).filter(isDialog),[a]),m=r(e=>{let t=e.detail;g(t?.modalId)},[g]);return l(()=>(window.addEventListener("set-active-modal",
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{useBuilderPreviewStore as t,useModalStore as i,useInteraction as n,cls as p}from"@gem-sdk/core";import{memo as a,useMemo as o,useCallback as r,useEffect as l}from"react";let isDialog=e=>!!e&&e?.tag==="Dialog"&&"component"===e.type,PopupManager=()=>{let a=t(e=>e.state),g=i(e=>e.setModalActive),s=i(e=>e.activeId),{isInteractionMode:d}=n(),c=o(()=>a.ROOT.childrens?.map(e=>a?.[e]).filter(isDialog),[a]),m=e=>e.isThemeSection&&e?.name?`${e.name}`:e?.settings?.name||e?.settings?.name?.fallbackValue||"",u=r(e=>{let t=e.detail;g(t?.modalId)},[g]);return l(()=>(window.addEventListener("set-active-modal",u),()=>{window.removeEventListener("set-active-modal",u)}),[u]),e("div",{className:"gp-popup-trigger-button gp-pointer-events-none gp-fixed gp-inset-y-0 gp-right-0 gp-z-10 gp-flex gp-w-10 gp-flex-col gp-items-center gp-justify-center gp-gap-1 gp-overflow-y-auto gp-overflow-x-hidden gp-text-sm",children:c?.map(t=>{let i=t?.advanced?.d;return e("div",{className:p("gp-w-full gp-shrink gp-cursor-pointer gp-select-none gp-items-center gp-justify-center gp-whitespace-nowrap gp-py-2 gp-text-white [writing-mode:vertical-lr]",{"gp-bg-blue-500":s===t.uid&&!t.isThemeSection,"gp-bg-blue-700":s!==t.uid&&!t.isThemeSection,"gp-bg-[#9144da]":t.isThemeSection},d?"gp-pointer-events-none":"gp-pointer-events-auto"),role:"button","aria-hidden":"true",onClick:()=>g(t?.uid,!0),style:{"--d":i?.desktop?"inline-flex":"none","--d-tablet":i?.tablet?"inline-flex":"none","--d-mobile":i?.mobile?"inline-flex":"none"},children:e("span",{className:"gp-text-ellipsis gp-whitespace-nowrap",children:m(t)})},t?.uid)})})};var PopupManager$1=a(PopupManager);export{PopupManager$1 as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{useMatchMutate as t,useShopStore as n,usePageStore as i,useBuilderPreviewStore as o,useSectionStore as d,useModalStore as a}from"@gem-sdk/core";import{memo as r,useMemo as l,useCallback as s,useEffect as c}from"react";import{getStorefrontApi as
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{useMatchMutate as t,useShopStore as n,usePageStore as i,useBuilderPreviewStore as o,useSectionStore as d,useModalStore as a}from"@gem-sdk/core";import{memo as r,useMemo as l,useCallback as s,useEffect as c}from"react";import{getStorefrontApi as p}from"../../libs/get-storefront-api.js";import{createFontUrls as m}from"../../libs/google-fonts.js";import{genCSS as u}from"../../libs/helpers/gen-css.js";import{getFontsFromDataBuilder as w}from"../../libs/helpers/gen-fonts.js";import{shopifyCdnWithGoogleFonts as v}from"../../libs/shopify-cdn-with-google-fonts.js";import{libsStore as y}from"../../store/libs-store.js";import{checkNotInOptionFont as f}from"../../libs/helpers/check-option-font.js";let globalStyleId="global-style",ENABLE_THEME_FONT_EDITOR=!0,Toolbox=()=>{let r=t(),g=n(e=>e.provider),h=n(e=>e.changeStorefrontInfo),E=i(e=>e.setDynamicProduct),L=i(e=>e.setAssignedProductIds),b=i(e=>e.setIsApplyAllProducts),S=i(e=>e.setPostPurchaseProductOffers),I=i(e=>e.setDynamicDiscountOffer),T=i(e=>e.setSalePageProductId),P=i(e=>e.setDynamicCollection),A=o(e=>e.initState),C=o(e=>e.state),j=o(e=>e.forceChangeState),N=o(e=>e.forceChangeItemProp),k=o(e=>e.changeItemPropByKey),x=o(e=>e.addItem),O=o(e=>e.moveItem),$=o(e=>e.removeItem),q=d(e=>e.addSection),D=n(e=>e.changeSwatches),H=o(e=>e.updateItemName),M=o(e=>e.updateItemAttribute),B=n(e=>e.changeLayoutSettings),F=n(e=>e.changeCreateThemeSectionCount),_=n(e=>e.changeShopPlan),V=n(e=>e.updatePriceWithCurrency),K=y(e=>e.changeFontType),R=y(e=>e.fontType),W=a(e=>e.clearModal),z=n(e=>e.changeLimitCreateThemeSection),G=i(e=>e.setInteractionIsSelectOnPage),J=i(e=>e.setInteractionItem),Q=i(e=>e.setInteractionSelectType),U=i(e=>e.setInteractionSettingType),X=i(e=>e.setSidebarMode),Y=l(()=>w(C),[C]),Z=({currentFontTypeSetting:e,fontType:t,fontHref:n})=>{let i;return n.includes("bunny.net")?i="bunny":n.includes("googleapis.com")&&(i="google"),!i||t===i&&i===e},ee=s((e,t)=>{if(!R)return;if(!t?.length){let t=document.querySelectorAll(`.${e}`);t.forEach(e=>e.remove());return}let n=document.querySelectorAll(`.${e}`);for(let i of(n.forEach(e=>{let n=e.getAttribute("data-font"),i=e.getAttribute("data-font-variant"),o=e.getAttribute("href")||"";if(!n||!i){e.remove();return}let d=t.find(e=>{let t=e.family===n,d=e.variants.includes(i);return!!t&&!!d&&Z({currentFontTypeSetting:e.type,fontType:R,fontHref:o})});d||e.remove()}),t))if(!(["bunny","google"].includes(i.type)&&f(i.family,R))&&"custom"!==i.type&&i.variants?.length)for(let t of i.variants){let n={...i,variants:[t.toString(),`${t.toString()}i`]},o=m([n],void 0,R,!0)||[];if(o?.length)for(let n of o){let o=e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/"/g,'\\"'),d=document.querySelector(`link.${e}[href="${o(n)}"]`);if(d)continue;let a=document.createElement("link");a.className=e,a.rel="stylesheet",a.href=n,a.dataset.font=i.family,a.dataset.fontVariant=t,document.head.appendChild(a)}}},[R]),et=s(()=>{r(/query\//,{revalidate:!0})},[r]),en=s(e=>{let t=e.detail;h({url:t.shopHandle?p(t.shopHandle,g):void 0,token:t.shopToken})},[h,g]),ei=s(e=>{let t=e.detail;try{if(t.data){let e=u(t.data,t.mobileOnly),n=Object.entries(t.data?.font).map(([,e])=>e).map(e=>{if("custom"==e.type){let t=v.find(t=>t.family==e.family);if(t)return t}return e}),i=document.getElementById(globalStyleId);if(ee("google-font-builder",n),i)i.innerHTML=e;else{let t=document.createElement("style");t.id=globalStyleId,t.innerHTML=e,document.head.appendChild(t)}}}catch{}},[ee]),eo=s(e=>{W();try{let t=e.detail;t.data&&("flat"===t.type?j(t.data):A(t.data))}catch{}},[j,A,W]),ed=s(e=>{try{let t=e.detail;t.entity&&(x({data:t.entity,id:t.id,position:t.position,type:t.type??"component"}),t?.type!=="section"||Array.isArray(t.entity)||q(t.entity.uid,t.entity))}catch{}},[x,q]),ea=s(e=>{try{let t=e.detail;t.uid&&t.propName&&k({id:t.uid,key:t.propName,data:t.propValue,group:t.group})}catch{}},[k]),er=s(e=>{try{let t=e.detail;t.uid&&N(t.uid,t.data,t.group)}catch{}},[N]),el=s(e=>{try{let t=e.detail;t.to&&t.uid&&O(t.uid,t.to,Number(t.position)??0)}catch{}},[O]),es=s(e=>{try{let t=e.detail;t.uid&&$(t.uid)}catch{}},[$]),ec=s(e=>{let t=e.detail;try{t.data&&D(t.data)}catch{}},[D]),ep=s(e=>{let t=e.detail;t&&B(t)},[B]),em=s(e=>{let t=e.detail;t&&F(t)},[F]),eu=s(e=>{let t=e.detail;t&&_(t)},[_]),ew=s(e=>{let t=e.detail;t&&V(t)},[V]),ev=s(e=>{let t=e.detail;t&&K(t)},[K]),ey=s(e=>{let t=e.detail;t&&E(t)},[E]),ef=s(e=>{let{assignedIds:t,isApplyAllProducts:n}=e.detail;t&&L(t??[]),b(!!n)},[L,b]),eg=s(e=>{let t=e.detail;t&&P(t)},[P]);c(()=>{Y&&R&&ee("google-font-element",Y)},[Y,R,ee]);let eh=s(e=>{let t=e.detail;t.uid&&H(t.uid,t.name||"")},[H]),eE=s(e=>{let t=e.detail;t.uid&&M(t.uid,t.value||"",t.attr||"")},[M]),eL=s(e=>{let t=e.detail;t?.length&&S(t)},[S]),eb=s(e=>{let t=e.detail;t&&I(t)},[I]),eS=s(e=>{let t=e.detail;t&&T(t)},[T]),eI=s(e=>{let t=e.detail;t&&z(t)},[z]),eT=s(e=>{let t=e.detail.value,n=e.detail.mode,i=e.detail.settingType;G(t),Q(n),U(i)},[G,Q,U]),eP=s(e=>{let t=e.detail.settingType;U(t)},[U]),eA=s(e=>{let t=e.detail.mode;console.log(t),X(t)},[X]),eC=s(e=>{let t=e.detail;J(t)},[J]);return c(()=>(window.addEventListener("update-shop-info",en),window.addEventListener("revalidate-query",et),window.addEventListener("init-builder",eo),window.addEventListener("add-entity",ed),window.addEventListener("remove-entity",es),window.addEventListener("move-entity",el),window.addEventListener("force-update-entity-props",er),window.addEventListener("update-entity-prop",ea),window.addEventListener("set-global-style",ei),window.addEventListener("update-global-swatches-data",ec),window.addEventListener("on-off-header-footer",ep),window.addEventListener("update-create-theme-section-count",em),window.addEventListener("update-shop-plan",eu),window.addEventListener("set-dynamic-product",ey),window.addEventListener("set-assigned-product-ids",ef),window.addEventListener("set-dynamic-collection",eg),window.addEventListener("update-item-name",eh),window.addEventListener("update-item-attribute",eE),window.addEventListener("set-product-offer",eL),window.addEventListener("set-dynamic-discount-offer",eb),window.addEventListener("update-sale-page-product-id",eS),window.addEventListener("limit-create-theme-section",eI),window.addEventListener("update-interaction-is-select-on-page",eT),window.addEventListener("update-interaction-item",eC),window.addEventListener("update-interaction-setting-type",eP),window.addEventListener("change-sidebar-mode",eA),window.addEventListener("update-font-type",ev),window.addEventListener("update-price-with-currency",ew),()=>{window.removeEventListener("update-shop-info",en),window.removeEventListener("revalidate-query",et),window.removeEventListener("init-builder",eo),window.removeEventListener("add-entity",ed),window.removeEventListener("remove-entity",es),window.removeEventListener("move-entity",el),window.removeEventListener("update-entity-prop",ea),window.removeEventListener("set-global-style",ei),window.removeEventListener("update-global-swatches-data",ec),window.removeEventListener("on-off-header-footer",ep),window.removeEventListener("update-create-theme-section-count",em),window.removeEventListener("update-shop-plan",eu),window.removeEventListener("update-price-with-currency",ew),window.removeEventListener("set-dynamic-product",ey),window.removeEventListener("set-dynamic-collection",eg),window.removeEventListener("update-item-name",eh),window.removeEventListener("update-item-attribute",eE),window.removeEventListener("set-product-offer",eL),window.removeEventListener("update-sale-page-product-id",eS),window.removeEventListener("limit-create-theme-section",eI),window.removeEventListener("update-interaction-is-select-on-page",eT),window.removeEventListener("update-interaction-item",eC),window.removeEventListener("update-interaction-setting-type",eP),window.removeEventListener("update-font-type",ev)}),[ed,eu,er,ea,eo,el,es,ei,ec,et,en,ep,em,ey,eg,eh,eE,eL,eS,eI,eC,eT,eP,ev,eA,eb,ew]),e("div",{className:"toolbox"})};var Toolbox$1=r(Toolbox);export{Toolbox$1 as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useI18n as l,useShopStore as r}from"@gem-sdk/core";import{useMemo as p}from"react";let SALE_FUNNEL_PAGE_TYPES=["GP_FUNNEL_PAGE","GP_PRE_SALE_PAGE"],DropElement=()=>{let{t:
|
|
2
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useI18n as l,useShopStore as r}from"@gem-sdk/core";import{useMemo as p}from"react";import{LIBRARY_TYPE_ENUM as g}from"../../constants/index.js";let SALE_FUNNEL_PAGE_TYPES=["GP_FUNNEL_PAGE","GP_PRE_SALE_PAGE"],DropElement=()=>{let{t:n}=l(),d=r(e=>e.pageType),s=SALE_FUNNEL_PAGE_TYPES.includes(d||""),a="POST_PURCHASE"===d,h=p(()=>s?n("Start building with Sections/Elements or"):a?n("Start with Templates from sidebar"):n("Start with Sections from sidebar"),[s,a,n]),o=p(()=>s?n("Use existing page designs"):a?n("Add templates"):n("Add sections"),[s,a,n]),c=()=>{if(s){m(g.EXISTING_PAGES);return}if(a){m(g.POST_PURCHASE_UPSELL);return}C(!0)},C=e=>{let t=new CustomEvent("editor:sidebar:build-with-section-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},m=e=>{let t=new CustomEvent("editor:sidebar:build-with-template-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},x=e=>{let t=new CustomEvent("editor:sidebar:click-img-to-layout-gallery-btn",e);window.dispatchEvent(t)};return e("div",{className:"gp-flex gp-w-full gp-flex-col gp-items-center gp-justify-center",children:[e("svg",{width:"290",height:"162",viewBox:"0 0 290 162",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"gp-mb-[24px]",children:[t("rect",{x:"0.570588",y:"0.570588",width:"288.859",height:"160.859",rx:"8.55882",fill:"white"}),t("rect",{x:"0.570588",y:"0.570588",width:"288.859",height:"160.859",rx:"8.55882",stroke:"#E2E2E2",strokeWidth:"1.14118"}),t("path",{d:"M22.2529 29.6708C22.2529 25.8893 25.3185 22.8237 29.1 22.8237H126.1C129.882 22.8237 132.947 25.8893 132.947 29.6708V132.377C132.947 136.158 129.882 139.224 126.1 139.224H29.1C25.3185 139.224 22.2529 136.158 22.2529 132.377V29.6708Z",fill:"#3C67FF",fillOpacity:"0.1"}),t("path",{d:"M76.0283 91.1587C77.3298 92.6353 76.2754 94.958 74.3066 94.9513L57.7218 94.8955C55.762 94.8889 54.7231 92.5777 56.0182 91.1058L64.2787 81.7175C65.1873 80.6849 66.7951 80.6836 67.7039 81.7146L76.0283 91.1587Z",fill:"#7190FF"}),t("path",{d:"M98.1352 91.1406C99.4315 92.62 98.3727 94.9382 96.4053 94.9282L67.9725 94.7838C66.0044 94.7738 64.9727 92.4437 66.2873 90.9779L80.6046 75.0135C81.5189 73.994 83.118 74.0026 84.0198 75.0318L98.1352 91.1406Z",fill:"#7190FF"}),t("path",{d:"M63.2783 74.2252C66.1589 73.8964 68.1647 71.3676 67.8369 68.478C67.5091 65.5883 64.9883 63.5762 62.1077 63.905C59.2272 64.2338 57.2214 66.7626 57.5492 69.6523C57.877 72.5419 60.3978 74.554 63.2783 74.2252Z",fill:"#7190FF"}),t("rect",{x:"157.482",y:"45.647",width:"83.3059",height:"11.4118",rx:"5.70588",fill:"#AAAAAA"}),t("rect",{x:"157.5",y:"98.9995",width:"48",height:"18",rx:"9",fill:"#3C67FF"}),t("rect",{x:"157.5",y:"66.9995",width:"68",height:"5",rx:"2.5",fill:"#E2E2E2"}),t("rect",{x:"157.5",y:"79.9995",width:"52",height:"5",rx:"2.5",fill:"#E2E2E2"})]}),e("div",{className:"gp-flex gp-flex-col gp-items-center",children:[t("div",{className:"gp-text-16 gp-font-medium gp-mb-4 gp-text-[#212121]",children:h}),e("div",{className:"gp-flex gp-gap-3 gp-justify-between",children:[t("button",{"data-button-add-section":!0,onClick:c,className:"gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",children:o}),t("button",{"data-button-add-elements":!0,onClick:()=>{s?m(g.TEMPLATES):C(!1)},className:"gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",children:s?n("Explore templates"):n("Add elements")})]}),!a&&e(i,{children:[t("div",{className:"gp-my-6",children:e("svg",{width:"338",height:"24",viewBox:"0 0 338 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("rect",{width:"150",height:"1",transform:"translate(0 11.4999)",fill:"#D6D6D6"}),t("path",{d:"M166.395 17.159C165.705 17.159 165.101 16.995 164.58 16.6668C164.063 16.3387 163.659 15.8797 163.367 15.2897C163.079 14.6997 162.935 14.0104 162.935 13.2215C162.935 12.4261 163.079 11.7317 163.367 11.1384C163.659 10.5452 164.063 10.0845 164.58 9.75633C165.101 9.42821 165.705 9.26414 166.395 9.26414C167.084 9.26414 167.688 9.42821 168.205 9.75633C168.725 10.0845 169.129 10.5452 169.418 11.1384C169.709 11.7317 169.855 12.4261 169.855 13.2215C169.855 14.0104 169.709 14.6997 169.418 15.2897C169.129 15.8797 168.725 16.3387 168.205 16.6668C167.688 16.995 167.084 17.159 166.395 17.159ZM166.395 16.1051C166.919 16.1051 167.349 15.9708 167.688 15.7024C168.026 15.4339 168.276 15.0809 168.438 14.6434C168.601 14.2059 168.682 13.7319 168.682 13.2215C168.682 12.7111 168.601 12.2355 168.438 11.7947C168.276 11.3539 168.026 10.9976 167.688 10.7258C167.349 10.454 166.919 10.3181 166.395 10.3181C165.871 10.3181 165.44 10.454 165.102 10.7258C164.764 10.9976 164.514 11.3539 164.352 11.7947C164.189 12.2355 164.108 12.7111 164.108 13.2215C164.108 13.7319 164.189 14.2059 164.352 14.6434C164.514 15.0809 164.764 15.4339 165.102 15.7024C165.44 15.9708 165.871 16.1051 166.395 16.1051ZM171.646 16.9999V9.36358H172.78V10.517H172.859C172.998 10.1391 173.25 9.83256 173.615 9.59724C173.979 9.36192 174.39 9.24426 174.848 9.24426C174.934 9.24426 175.042 9.24591 175.171 9.24923C175.3 9.25254 175.398 9.25751 175.464 9.26414V10.4573C175.425 10.4474 175.333 10.4325 175.191 10.4126C175.052 10.3894 174.904 10.3778 174.748 10.3778C174.377 10.3778 174.046 10.4557 173.754 10.6114C173.466 10.7639 173.237 10.976 173.068 11.2478C172.902 11.5163 172.819 11.8229 172.819 12.1676V16.9999H171.646Z",fill:"#676767"}),t("rect",{width:"150",height:"1",transform:"translate(188 11.4999)",fill:"#D6D6D6"})]})}),t("div",{className:"gp-flex gp-items-center gp-gap-2 gp-text-xs",children:t("div",{onClick:x,"aria-hidden":"true",id:"gp-img-to-layout-gallery-btn",className:"gp-relative gp-cursor-pointer gp-text-[14px] gp-font-medium gp-text-[#3C67FF]",children:n("Start with Generating from URL or image")})})]})]})]})};export{DropElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let googleFontFamilies=["ABeeZee","ADLaM Display","AR One Sans","Abel","Abhaya Libre","Aboreto","Abril Fatface","Abyssinica SIL","Aclonica","Acme","Actor","Adamina","Advent Pro","Afacad","Afacad Flux","Agbalumo","Agdasima","Agu Display","Aguafina Script","Akatab","Akaya Kanadaka","Akaya Telivigala","Akronim","Akshar","Aladin","Alan Sans","Alata","Alatsi","Albert Sans","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Aleo","Alex Brush","Alexandria","Alfa Slab One","Alice","Alike","Alike Angular","Alkalami","Alkatra","Allan","Allerta","Allerta Stencil","Allison","Allura","Almarai","Almendra","Almendra Display","Almendra SC","Alumni Sans","Alumni Sans Collegiate One","Alumni Sans Inline One","Alumni Sans Pinstripe","Alumni Sans SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiko","Amiri","Amiri Quran","Amita","Anaheim","Ancizar Sans","Ancizar Serif","Andada Pro","Andika","Anek Bangla","Anek Devanagari","Anek Gujarati","Anek Gurmukhi","Anek Kannada","Anek Latin","Anek Malayalam","Anek Odia","Anek Tamil","Anek Telugu","Angkor","Annapurna SIL","Annie Use Your Telescope","Anonymous Pro","Anta","Antic","Antic Didone","Antic Slab","Anton","Anton SC","Antonio","Anuphan","Anybody","Aoboshi One","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo","Archivo Black","Archivo Narrow","Are You Serious","Aref Ruqaa","Aref Ruqaa Ink","Arima","Arimo","Arizonia","Armata","Arsenal","Arsenal SC","Artifika","Arvo","Arya","Asap","Asap Condensed","Asar","Asimovian","Asset","Assistant","Asta Sans","Astloch","Asul","Athiti","Atkinson Hyperlegible","Atkinson Hyperlegible Mono","Atkinson Hyperlegible Next","Atma","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Azeret Mono","B612","B612 Mono","BIZ UDGothic","BIZ UDMincho","BIZ UDPGothic","BIZ UDPMincho","Babylonica","Bacasime Antique","Bad Script","Badeen Display","Bagel Fat One","Bahiana","Bahianita","Bai Jamjuree","Bakbak One","Ballet","Baloo 2","Baloo Bhai 2","Baloo Bhaijaan 2","Baloo Bhaina 2","Baloo Chettan 2","Baloo Da 2","Baloo Paaji 2","Baloo Tamma 2","Baloo Tammudu 2","Baloo Thambi 2","Balsamiq Sans","Balthazar","Bangers","Barlow","Barlow Condensed","Barlow Semi Condensed","Barriecito","Barrio","Basic","Baskervville","Baskervville SC","Battambang","Baumans","Bayon","Be Vietnam Pro","Beau Rivage","Bebas Neue","Beiruti","Belanosima","Belgrano","Bellefair","Belleza","Bellota","Bellota Text","BenchNine","Benne","Bentham","Berkshire Swash","Besley","Beth Ellen","Bevan","BhuTuka Expanded One","Big Shoulders","Big Shoulders Inline","Big Shoulders Stencil","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","BioRhyme","BioRhyme Expanded","Birthstone","Birthstone Bounce","Biryani","Bitcount","Bitcount Grid Double","Bitcount Grid Double Ink","Bitcount Grid Single","Bitcount Grid Single Ink","Bitcount Ink","Bitcount Prop Double","Bitcount Prop Double Ink","Bitcount Prop Single","Bitcount Prop Single Ink","Bitcount Single","Bitcount Single Ink","Bitter","Black And White Picture","Black Han Sans","Black Ops One","Blaka","Blaka Hollow","Blaka Ink","Blinker","Bodoni Moda","Bodoni Moda SC","Bokor","Boldonse","Bona Nova","Bona Nova SC","Bonbon","Bonheur Royale","Boogaloo","Borel","Bowlby One","Bowlby One SC","Braah One","Brawler","Bree Serif","Bricolage Grotesque","Bruno Ace","Bruno Ace SC","Brygada 1918","Bubblegum Sans","Bubbler One","Buda","Buenard","Bungee","Bungee Hairline","Bungee Inline","Bungee Outline","Bungee Shade","Bungee Spice","Bungee Tint","Butcherman","Butterfly Kids","Bytesized","Cabin","Cabin Condensed","Cabin Sketch","Cactus Classical Serif","Caesar Dressing","Cagliostro","Cairo","Cairo Play","Cal Sans","Caladea","Calistoga","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Caprasimo","Capriola","Caramel","Carattere","Cardo","Carlito","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Cascadia Code","Cascadia Mono","Castoro","Castoro Titling","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Chakra Petch","Changa","Changa One","Chango","Charis SIL","Charm","Charmonman","Chathura","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherish","Cherry Bomb One","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chilanka","Chiron GoRound TC","Chiron Hei HK","Chiron Sung HK","Chivo","Chivo Mono","Chocolate Classical Sans","Chokokutai","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Climate Crisis","Coda","Codystar","Coiny","Combo","Comfortaa","Comforter","Comforter Brush","Comic Neue","Comic Relief","Coming Soon","Comme","Commissioner","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Coral Pixels","Corben","Corinthia","Cormorant","Cormorant Garamond","Cormorant Infant","Cormorant SC","Cormorant Unicase","Cormorant Upright","Cossette Texte","Cossette Titre","Courgette","Courier Prime","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Pro","Crimson Text","Croissant One","Crushed","Cuprum","Cute Font","Cutive","Cutive Mono","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dai Banna SIL","Damion","Dancing Script","Danfo","Dangrek","Darker Grotesque","Darumadrop One","David Libre","Dawning of a New Day","Days One","Dekko","Dela Gothic One","Delicious Handrawn","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diphylleia","Diplomata","Diplomata SC","Do Hyeon","Dokdo","Domine","Donegal One","Dongle","Doppio One","Dorsa","Dosis","DotGothic16","Doto","Dr Sugiyama","Duru Sans","DynaPuff","Dynalight","EB Garamond","Eagle Lake","East Sea Dokdo","Eater","Economica","Eczar","Edu AU VIC WA NT Arrows","Edu AU VIC WA NT Dots","Edu AU VIC WA NT Guides","Edu AU VIC WA NT Hand","Edu AU VIC WA NT Pre","Edu NSW ACT Cursive","Edu NSW ACT Foundation","Edu NSW ACT Hand Pre","Edu QLD Beginner","Edu QLD Hand","Edu SA Beginner","Edu SA Hand","Edu TAS Beginner","Edu VIC WA NT Beginner","Edu VIC WA NT Hand","Edu VIC WA NT Hand Pre","El Messiri","Electrolize","Elms Sans","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Encode Sans","Encode Sans Condensed","Encode Sans Expanded","Encode Sans SC","Encode Sans Semi Condensed","Encode Sans Semi Expanded","Engagement","Englebert","Enriqueta","Ephesis","Epilogue","Epunda Sans","Epunda Slab","Erica One","Esteban","Estonia","Euphoria Script","Ewert","Exile","Exo","Exo 2","Expletus Sans","Explora","Faculty Glyphic","Fahkwang","Familjen Grotesk","Fanwood Text","Farro","Farsan","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Faustina","Federant","Federo","Felipa","Fenix","Festive","Figtree","Finger Paint","Finlandica","Fira Code","Fira Mono","Fira Sans","Fira Sans Condensed","Fira Sans Extra Condensed","Fjalla One","Fjord One","Flamenco","Flavors","Fleur De Leah","Flow Block","Flow Circular","Flow Rounded","Foldit","Fondamento","Fontdiner Swanky","Forum","Fragment Mono","Francois One","Frank Ruhl Libre","Fraunces","Freckle Face","Fredericka the Great","Fredoka","Freehand","Freeman","Fresca","Frijole","Fruktur","Fugaz One","Fuggles","Funnel Display","Funnel Sans","Fustat","Fuzzy Bubbles","GFS Didot","GFS Neohellenic","Ga Maamli","Gabarito","Gabriela","Gaegu","Gafata","Gajraj One","Galada","Galdeano","Galindo","Gamja Flower","Gantari","Gasoek One","Gayathri","Geist","Geist Mono","Gelasio","Gemunu Libre","Genos","Gentium Book Plus","Gentium Plus","Geo","Geologica","Georama","Geostar","Geostar Fill","Germania One","Gideon Roman","Gidole","Gidugu","Gilda Display","Girassol","Give You Glory","Glass Antiqua","Glegoo","Gloock","Gloria Hallelujah","Glory","Gluten","Goblin One","Gochi Hand","Goldman","Golos Text","Google Sans Code","Google Sans Flex","Gorditas","Gothic A1","Gotu","Goudy Bookletter 1911","Gowun Batang","Gowun Dodum","Graduate","Grand Hotel","Grandiflora One","Grandstander","Grape Nuts","Gravitas One","Great Vibes","Grechen Fuemen","Grenze","Grenze Gotisch","Grey Qo","Griffy","Gruppo","Gudea","Gugi","Gulzar","Gupter","Gurajada","Gwendolyn","Habibi","Hachi Maru Pop","Hahmlet","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handjet","Handlee","Hanken Grotesk","Hanuman","Happy Monkey","Harmattan","Headland One","Hedvig Letters Sans","Hedvig Letters Serif","Heebo","Henny Penny","Hepta Slab","Herr Von Muellerhoff","Hi Melody","Hina Mincho","Hind","Hind Guntur","Hind Madurai","Hind Mysuru","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","Honk","Host Grotesk","Hubballi","Hubot Sans","Huninn","Hurricane","IBM Plex Mono","IBM Plex Sans","IBM Plex Sans Arabic","IBM Plex Sans Condensed","IBM Plex Sans Devanagari","IBM Plex Sans Hebrew","IBM Plex Sans JP","IBM Plex Sans KR","IBM Plex Sans Thai","IBM Plex Sans Thai Looped","IBM Plex Serif","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iansui","Ibarra Real Nova","Iceberg","Iceland","Imbue","Imperial Script","Imprima","Inclusive Sans","Inconsolata","Inder","Indie Flower","Ingrid Darling","Inika","Inknut Antiqua","Inria Sans","Inria Serif","Inspiration","Instrument Sans","Instrument Serif","Intel One Mono","Inter","Inter Tight","Irish Grover","Island Moments","Istok Web","Italiana","Italianno","Itim","Jacquard 12","Jacquard 12 Charted","Jacquard 24","Jacquard 24 Charted","Jacquarda Bastarda 9","Jacquarda Bastarda 9 Charted","Jacques Francois","Jacques Francois Shadow","Jaini","Jaini Purva","Jaldi","Jaro","Jersey 10","Jersey 10 Charted","Jersey 15","Jersey 15 Charted","Jersey 20","Jersey 20 Charted","Jersey 25","Jersey 25 Charted","JetBrains Mono","Jim Nightshade","Joan","Jockey One","Jolly Lodger","Jomhuria","Jomolhari","Josefin Sans","Josefin Slab","Jost","Joti One","Jua","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","K2D","Kablammo","Kadwa","Kaisei Decol","Kaisei HarunoUmi","Kaisei Opti","Kaisei Tokumin","Kalam","Kalnia","Kalnia Glaze","Kameron","Kanchenjunga","Kanit","Kantumruy Pro","Kapakana","Karantina","Karla","Karla Tamil Inclined","Karla Tamil Upright","Karma","Katibeh","Kaushan Script","Kavivanar","Kavoon","Kay Pho Du","Kdam Thmor Pro","Keania One","Kedebideri","Kelly Slab","Kenia","Khand","Khmer","Khula","Kings","Kirang Haerang","Kite One","Kiwi Maru","Klee One","Knewave","KoHo","Kodchasan","Kode Mono","Koh Santepheap","Kolker Brush","Konkhmer Sleokchher","Kosugi","Kosugi Maru","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Krub","Kufam","Kulim Park","Kumar One","Kumar One Outline","Kumbh Sans","Kurale","LXGW Marker Gothic","LXGW WenKai Mono TC","LXGW WenKai TC","La Belle Aurore","Labrada","Lacquer","Laila","Lakki Reddy","Lalezar","Lancelot","Langar","Lateef","Lato","Lavishly Yours","League Gothic","League Script","League Spartan","Leckerli One","Ledger","Lekton","Lemon","Lemonada","Lexend","Lexend Deca","Lexend Exa","Lexend Giga","Lexend Mega","Lexend Peta","Lexend Tera","Lexend Zetta","Libertinus Keyboard","Libertinus Math","Libertinus Mono","Libertinus Sans","Libertinus Serif","Libertinus Serif Display","Libre Barcode 128","Libre Barcode 128 Text","Libre Barcode 39","Libre Barcode 39 Extended","Libre Barcode 39 Extended Text","Libre Barcode 39 Text","Libre Barcode EAN13 Text","Libre Baskerville","Libre Bodoni","Libre Caslon Display","Libre Caslon Text","Libre Franklin","Licorice","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Linefont","Lisu Bosa","Liter","Literata","Liu Jian Mao Cao","Livvic","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Long Cang","Lora","Love Light","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lugrasimo","Lumanosimo","Lunasima","Lusitana","Lustria","Luxurious Roman","Luxurious Script","M PLUS 1","M PLUS 1 Code","M PLUS 1p","M PLUS 2","M PLUS Code Latin","M PLUS Rounded 1c","Ma Shan Zheng","Macondo","Macondo Swash Caps","Mada","Madimi One","Magra","Maiden Orange","Maitree","Major Mono Display","Mako","Mali","Mallanna","Maname","Mandali","Manjari","Manrope","Mansalva","Manuale","Manufacturing Consent","Marcellus","Marcellus SC","Marck Script","Margarine","Marhey","Markazi Text","Marko One","Marmelad","Martel","Martel Sans","Martian Mono","Marvel","Matangi","Mate","Mate SC","Matemasie","Material Icons","Material Icons Outlined","Material Icons Round","Material Icons Sharp","Material Icons Two Tone","Material Symbols","Material Symbols Outlined","Material Symbols Rounded","Material Symbols Sharp","Maven Pro","McLaren","Mea Culpa","Meddon","MedievalSharp","Medula One","Meera Inimai","Megrim","Meie Script","Menbere","Meow Script","Merienda","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Micro 5","Micro 5 Charted","Milonga","Miltonian","Miltonian Tattoo","Mina","Mingzat","Miniver","Miriam Libre","Mirza","Miss Fajardose","Mitr","Mochiy Pop One","Mochiy Pop P One","Modak","Modern Antiqua","Moderustic","Mogra","Mohave","Moirai One","Molengo","Molle","Momo Signature","Momo Trust Display","Momo Trust Sans","Mona Sans","Monda","Monofett","Monomakh","Monomaniac One","Monoton","Monsieur La Doulaise","Montaga","Montagu Slab","MonteCarlo","Montez","Montserrat","Montserrat Alternates","Montserrat Underline","Moo Lah Lah","Mooli","Moon Dance","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mozilla Headline","Mozilla Text","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Ms Madi","Mukta","Mukta Mahee","Mukta Malar","Mukta Vaani","Mulish","Murecho","MuseoModerno","My Soul","Mynerve","Mystery Quest","NTR","Nabla","Namdhinggo","Nanum Brush Script","Nanum Gothic","Nanum Gothic Coding","Nanum Myeongjo","Nanum Pen Script","Narnoor","Nata Sans","National Park","Neonderthaw","Nerko One","Neucha","Neuton","New Amsterdam","New Rocker","New Tegomin","News Cycle","Newsreader","Niconne","Niramit","Nixie One","Nobile","Nokora","Norican","Nosifer","Notable","Nothing You Could Do","Noticia Text","Noto Color Emoji","Noto Emoji","Noto Kufi Arabic","Noto Music","Noto Naskh Arabic","Noto Nastaliq Urdu","Noto Rashi Hebrew","Noto Sans","Noto Sans Adlam","Noto Sans Adlam Unjoined","Noto Sans Anatolian Hieroglyphs","Noto Sans Arabic","Noto Sans Armenian","Noto Sans Avestan","Noto Sans Balinese","Noto Sans Bamum","Noto Sans Bassa Vah","Noto Sans Batak","Noto Sans Bengali","Noto Sans Bhaiksuki","Noto Sans Brahmi","Noto Sans Buginese","Noto Sans Buhid","Noto Sans Canadian Aboriginal","Noto Sans Carian","Noto Sans Caucasian Albanian","Noto Sans Chakma","Noto Sans Cham","Noto Sans Cherokee","Noto Sans Chorasmian","Noto Sans Coptic","Noto Sans Cuneiform","Noto Sans Cypriot","Noto Sans Cypro Minoan","Noto Sans Deseret","Noto Sans Devanagari","Noto Sans Display","Noto Sans Duployan","Noto Sans Egyptian Hieroglyphs","Noto Sans Elbasan","Noto Sans Elymaic","Noto Sans Ethiopic","Noto Sans Georgian","Noto Sans Glagolitic","Noto Sans Gothic","Noto Sans Grantha","Noto Sans Gujarati","Noto Sans Gunjala Gondi","Noto Sans Gurmukhi","Noto Sans HK","Noto Sans Hanifi Rohingya","Noto Sans Hanunoo","Noto Sans Hatran","Noto Sans Hebrew","Noto Sans Imperial Aramaic","Noto Sans Indic Siyaq Numbers","Noto Sans Inscriptional Pahlavi","Noto Sans Inscriptional Parthian","Noto Sans JP","Noto Sans Javanese","Noto Sans KR","Noto Sans Kaithi","Noto Sans Kannada","Noto Sans Kawi","Noto Sans Kayah Li","Noto Sans Kharoshthi","Noto Sans Khmer","Noto Sans Khojki","Noto Sans Khudawadi","Noto Sans Lao","Noto Sans Lao Looped","Noto Sans Lepcha","Noto Sans Limbu","Noto Sans Linear A","Noto Sans Linear B","Noto Sans Lisu","Noto Sans Lycian","Noto Sans Lydian","Noto Sans Mahajani","Noto Sans Malayalam","Noto Sans Mandaic","Noto Sans Manichaean","Noto Sans Marchen","Noto Sans Masaram Gondi","Noto Sans Math","Noto Sans Mayan Numerals","Noto Sans Medefaidrin","Noto Sans Meetei Mayek","Noto Sans Mende Kikakui","Noto Sans Meroitic","Noto Sans Miao","Noto Sans Modi","Noto Sans Mongolian","Noto Sans Mono","Noto Sans Mro","Noto Sans Multani","Noto Sans Myanmar","Noto Sans NKo","Noto Sans NKo Unjoined","Noto Sans Nabataean","Noto Sans Nag Mundari","Noto Sans Nandinagari","Noto Sans New Tai Lue","Noto Sans Newa","Noto Sans Nushu","Noto Sans Ogham","Noto Sans Ol Chiki","Noto Sans Old Hungarian","Noto Sans Old Italic","Noto Sans Old North Arabian","Noto Sans Old Permic","Noto Sans Old Persian","Noto Sans Old Sogdian","Noto Sans Old South Arabian","Noto Sans Old Turkic","Noto Sans Oriya","Noto Sans Osage","Noto Sans Osmanya","Noto Sans Pahawh Hmong","Noto Sans Palmyrene","Noto Sans Pau Cin Hau","Noto Sans PhagsPa","Noto Sans Phoenician","Noto Sans Psalter Pahlavi","Noto Sans Rejang","Noto Sans Runic","Noto Sans SC","Noto Sans Samaritan","Noto Sans Saurashtra","Noto Sans Sharada","Noto Sans Shavian","Noto Sans Siddham","Noto Sans SignWriting","Noto Sans Sinhala","Noto Sans Sogdian","Noto Sans Sora Sompeng","Noto Sans Soyombo","Noto Sans Sundanese","Noto Sans Sunuwar","Noto Sans Syloti Nagri","Noto Sans Symbols","Noto Sans Symbols 2","Noto Sans Syriac","Noto Sans Syriac Eastern","Noto Sans Syriac Western","Noto Sans TC","Noto Sans Tagalog","Noto Sans Tagbanwa","Noto Sans Tai Le","Noto Sans Tai Tham","Noto Sans Tai Viet","Noto Sans Takri","Noto Sans Tamil","Noto Sans Tamil Supplement","Noto Sans Tangsa","Noto Sans Telugu","Noto Sans Thaana","Noto Sans Thai","Noto Sans Thai Looped","Noto Sans Tifinagh","Noto Sans Tirhuta","Noto Sans Ugaritic","Noto Sans Vai","Noto Sans Vithkuqi","Noto Sans Wancho","Noto Sans Warang Citi","Noto Sans Yi","Noto Sans Zanabazar Square","Noto Serif","Noto Serif Ahom","Noto Serif Armenian","Noto Serif Balinese","Noto Serif Bengali","Noto Serif Devanagari","Noto Serif Display","Noto Serif Dives Akuru","Noto Serif Dogra","Noto Serif Ethiopic","Noto Serif Georgian","Noto Serif Grantha","Noto Serif Gujarati","Noto Serif Gurmukhi","Noto Serif HK","Noto Serif Hebrew","Noto Serif Hentaigana","Noto Serif JP","Noto Serif KR","Noto Serif Kannada","Noto Serif Khitan Small Script","Noto Serif Khmer","Noto Serif Khojki","Noto Serif Lao","Noto Serif Makasar","Noto Serif Malayalam","Noto Serif Myanmar","Noto Serif NP Hmong","Noto Serif Old Uyghur","Noto Serif Oriya","Noto Serif Ottoman Siyaq","Noto Serif SC","Noto Serif Sinhala","Noto Serif TC","Noto Serif Tamil","Noto Serif Tangut","Noto Serif Telugu","Noto Serif Thai","Noto Serif Tibetan","Noto Serif Todhri","Noto Serif Toto","Noto Serif Vithkuqi","Noto Serif Yezidi","Noto Traditional Nushu","Noto Znamenny Musical Notation","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Nunito Sans","Nuosu SIL","Odibee Sans","Odor Mean Chey","Offside","Oi","Ojuju","Old Standard TT","Oldenburg","Ole","Oleo Script","Oleo Script Swash Caps","Onest","Oooh Baby","Open Sans","Oranienbaum","Orbit","Orbitron","Oregano","Orelega One","Orienta","Original Surfer","Oswald","Outfit","Over the Rainbow","Overlock","Overlock SC","Overpass","Overpass Mono","Ovo","Oxanium","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Padauk","Padyakke Expanded One","Palanquin","Palanquin Dark","Palette Mosaic","Pangolin","Paprika","Parastoo","Parisienne","Parkinsans","Passero One","Passion One","Passions Conflict","Pathway Extreme","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Pattaya","Patua One","Pavanam","Paytone One","Peddana","Peralta","Permanent Marker","Petemoss","Petit Formal Script","Petrona","Phetsarath","Philosopher","Phudu","Piazzolla","Piedra","Pinyon Script","Pirata One","Pixelify Sans","Plaster","Platypi","Play","Playball","Playfair","Playfair Display","Playfair Display SC","Playpen Sans","Playpen Sans Arabic","Playpen Sans Deva","Playpen Sans Hebrew","Playpen Sans Thai","Playwrite AR","Playwrite AR Guides","Playwrite AT","Playwrite AT Guides","Playwrite AU NSW","Playwrite AU NSW Guides","Playwrite AU QLD","Playwrite AU QLD Guides","Playwrite AU SA","Playwrite AU SA Guides","Playwrite AU TAS","Playwrite AU TAS Guides","Playwrite AU VIC","Playwrite AU VIC Guides","Playwrite BE VLG","Playwrite BE VLG Guides","Playwrite BE WAL","Playwrite BE WAL Guides","Playwrite BR","Playwrite BR Guides","Playwrite CA","Playwrite CA Guides","Playwrite CL","Playwrite CL Guides","Playwrite CO","Playwrite CO Guides","Playwrite CU","Playwrite CU Guides","Playwrite CZ","Playwrite CZ Guides","Playwrite DE Grund","Playwrite DE Grund Guides","Playwrite DE LA","Playwrite DE LA Guides","Playwrite DE SAS","Playwrite DE SAS Guides","Playwrite DE VA","Playwrite DE VA Guides","Playwrite DK Loopet","Playwrite DK Loopet Guides","Playwrite DK Uloopet","Playwrite DK Uloopet Guides","Playwrite ES","Playwrite ES Deco","Playwrite ES Deco Guides","Playwrite ES Guides","Playwrite FR Moderne","Playwrite FR Moderne Guides","Playwrite FR Trad","Playwrite FR Trad Guides","Playwrite GB J","Playwrite GB J Guides","Playwrite GB S","Playwrite GB S Guides","Playwrite HR","Playwrite HR Guides","Playwrite HR Lijeva","Playwrite HR Lijeva Guides","Playwrite HU","Playwrite HU Guides","Playwrite ID","Playwrite ID Guides","Playwrite IE","Playwrite IE Guides","Playwrite IN","Playwrite IN Guides","Playwrite IS","Playwrite IS Guides","Playwrite IT Moderna","Playwrite IT Moderna Guides","Playwrite IT Trad","Playwrite IT Trad Guides","Playwrite MX","Playwrite MX Guides","Playwrite NG Modern","Playwrite NG Modern Guides","Playwrite NL","Playwrite NL Guides","Playwrite NO","Playwrite NO Guides","Playwrite NZ","Playwrite NZ Guides","Playwrite PE","Playwrite PE Guides","Playwrite PL","Playwrite PL Guides","Playwrite PT","Playwrite PT Guides","Playwrite RO","Playwrite RO Guides","Playwrite SK","Playwrite SK Guides","Playwrite TZ","Playwrite TZ Guides","Playwrite US Modern","Playwrite US Modern Guides","Playwrite US Trad","Playwrite US Trad Guides","Playwrite VN","Playwrite VN Guides","Playwrite ZA","Playwrite ZA Guides","Plus Jakarta Sans","Pochaevsk","Podkova","Poetsen One","Poiret One","Poller One","Poltawski Nowy","Poly","Pompiere","Ponnala","Ponomar","Pontano Sans","Poor Story","Poppins","Port Lligat Sans","Port Lligat Slab","Potta One","Pragati Narrow","Praise","Prata","Preahvihear","Press Start 2P","Pridi","Princess Sofia","Prociono","Prompt","Prosto One","Protest Guerrilla","Protest Revolution","Protest Riot","Protest Strike","Proza Libre","Public Sans","Puppies Play","Puritan","Purple Purse","Qahiri","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Qwitcher Grypen","REM","Racing Sans One","Radio Canada","Radio Canada Big","Radley","Rajdhani","Rakkas","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Rampart One","Ranchers","Rancho","Ranga","Rasa","Rationale","Ravi Prakash","Readex Pro","Recursive","Red Hat Display","Red Hat Mono","Red Hat Text","Red Rose","Redacted","Redacted Script","Reddit Mono","Reddit Sans","Reddit Sans Condensed","Redressed","Reem Kufi","Reem Kufi Fun","Reem Kufi Ink","Reenie Beanie","Reggae One","Rethink Sans","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Road Rage","Roboto","Roboto Condensed","Roboto Flex","Roboto Mono","Roboto Serif","Roboto Slab","Rochester","Rock 3D","Rock Salt","RocknRoll One","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rowdies","Rozha One","Rubik","Rubik 80s Fade","Rubik Beastly","Rubik Broken Fax","Rubik Bubbles","Rubik Burned","Rubik Dirt","Rubik Distressed","Rubik Doodle Shadow","Rubik Doodle Triangles","Rubik Gemstones","Rubik Glitch","Rubik Glitch Pop","Rubik Iso","Rubik Lines","Rubik Maps","Rubik Marker Hatch","Rubik Maze","Rubik Microbe","Rubik Mono One","Rubik Moonrocks","Rubik Pixels","Rubik Puddles","Rubik Scribble","Rubik Spray Paint","Rubik Storm","Rubik Vinyl","Rubik Wet Paint","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Ruwudu","Rye","STIX Two Text","SUSE","SUSE Mono","Sacramento","Sahitya","Sail","Saira","Saira Condensed","Saira Extra Condensed","Saira Semi Condensed","Saira Stencil One","Salsa","Sanchez","Sancreek","Sankofa Display","Sansation","Sansita","Sansita Swashed","Sarabun","Sarala","Sarina","Sarpanch","Sassy Frass","Satisfy","Savate","Sawarabi Gothic","Sawarabi Mincho","Scada","Scheherazade New","Schibsted Grotesk","Schoolbell","Science Gothic","Scope One","Seaweed Script","Secular One","Sedan","Sedan SC","Sedgwick Ave","Sedgwick Ave Display","Sen","Send Flowers","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shafarik","Shalimar","Shantell Sans","Shanti","Share","Share Tech","Share Tech Mono","Shippori Antique","Shippori Antique B1","Shippori Mincho","Shippori Mincho B1","Shizuru","Shojumaru","Short Stack","Shrikhand","Siemreap","Sigmar","Sigmar One","Signika","Signika Negative","Silkscreen","Simonetta","Single Day","Sintony","Sirin Stencil","Sirivennela","Six Caps","Sixtyfour","Sixtyfour Convergence","Skranji","Slabo 13px","Slabo 27px","Slackey","Slackside One","Smokum","Smooch","Smooch Sans","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sofia Sans","Sofia Sans Condensed","Sofia Sans Extra Condensed","Sofia Sans Semi Condensed","Solitreo","Solway","Sometype Mono","Song Myung","Sono","Sonsie One","Sora","Sorts Mill Goudy","Sour Gummy","Source Code Pro","Source Sans 3","Source Serif 4","Space Grotesk","Space Mono","Special Elite","Special Gothic","Special Gothic Condensed One","Special Gothic Expanded One","Spectral","Spectral SC","Spicy Rice","Spinnaker","Spirax","Splash","Spline Sans","Spline Sans Mono","Squada One","Square Peg","Sree Krushnadevaraya","Sriracha","Srisakdi","Staatliches","Stack Sans Headline","Stack Sans Notch","Stack Sans Text","Stalemate","Stalinist One","Stardos Stencil","Stick","Stick No Bills","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Story Script","Strait","Style Script","Stylish","Sue Ellen Francisco","Suez One","Sulphur Point","Sumana","Sunflower","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Syne","Syne Mono","Syne Tactile","TASA Explorer","TASA Orbiter","Tac One","Tagesschrift","Tai Heritage Pro","Tajawal","Tangerine","Tapestry","Taprom","Tauri","Taviraj","Teachers","Teko","Tektur","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","Texturina","Thasadith","The Girl Next Door","The Nautigal","Tienne","TikTok Sans","Tillana","Tilt Neon","Tilt Prism","Tilt Warp","Timmana","Tinos","Tiny5","Tiro Bangla","Tiro Devanagari Hindi","Tiro Devanagari Marathi","Tiro Devanagari Sanskrit","Tiro Gurmukhi","Tiro Kannada","Tiro Tamil","Tiro Telugu","Tirra","Titan One","Titillium Web","Tomorrow","Tourney","Trade Winds","Train One","Triodion","Trirong","Trispace","Trocchi","Trochut","Truculenta","Trykker","Tsukimi Rounded","Tuffy","Tulpen One","Turret Road","Twinkle Star","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ubuntu Sans","Ubuntu Sans Mono","Uchen","Ultra","Unbounded","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","UoqMunThenKhung","Updock","Urbanist","VT323","Vampiro One","Varela","Varela Round","Varta","Vast Shadow","Vazirmatn","Vend Sans","Vesper Libre","Viaoda Libre","Vibes","Vibur","Victor Mono","Vidaloka","Viga","Vina Sans","Voces","Volkhov","Vollkorn","Vollkorn SC","Voltaire","Vujahday Script","WDXL Lubrifont JP N","WDXL Lubrifont SC","WDXL Lubrifont TC","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Water Brush","Waterfall","Wavefont","Wellfleet","Wendy One","Whisper","WindSong","Winky Rough","Winky Sans","Wire One","Wittgenstein","Wix Madefor Display","Wix Madefor Text","Work Sans","Workbench","Xanh Mono","Yaldevi","Yanone Kaffeesatz","Yantramanav","Yarndings 12","Yarndings 12 Charted","Yarndings 20","Yarndings 20 Charted","Yatra One","Yellowtail","Yeon Sung","Yeseva One","Yesteryear","Yomogi","Young Serif","Yrsa","Ysabeau","Ysabeau Infant","Ysabeau Office","Ysabeau SC","Yuji Boku","Yuji Hentaigana Akari","Yuji Hentaigana Akebono","Yuji Mai","Yuji Syuku","Yusei Magic","ZCOOL KuaiLe","ZCOOL QingKe HuangYou","ZCOOL XiaoWei","Zain","Zalando Sans","Zalando Sans Expanded","Zalando Sans SemiExpanded","Zen Antique","Zen Antique Soft","Zen Dots","Zen Kaku Gothic Antique","Zen Kaku Gothic New","Zen Kurenaido","Zen Loop","Zen Maru Gothic","Zen Old Mincho","Zen Tokyo Zoo","Zeyada","Zhi Mang Xing","Zilla Slab","Zilla Slab Highlight"];export{googleFontFamilies as default,googleFontFamilies};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var PublishedThemePageMetafields;!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={}));export{PublishedThemePageMetafields};
|
|
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};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getCollectionProps}from"./libs/api/get-collection-props.js";export{getCollectionSharePageProps}from"./libs/api/get-collection-share-page-props.js";export{getHomePageProps}from"./libs/api/get-home-page-props.js";export{getHomePagePropsV2}from"./libs/api/get-home-page-props-v2.js";export{getPreviewProps}from"./libs/api/get-preview-props.js";export{getBuilderProps}from"./libs/api/get-builder-props.js";export{getProductProps}from"./libs/api/get-product-props.js";export{getStaticPagePropsV2}from"./libs/api/get-static-page-props-v2.js";export{getSharePageProps}from"./libs/api/get-share-page-props.js";export{getPostPurchasePropsPreview}from"./libs/api/get-post-purchase-props-preview.js";export{getStaticPagePropsPreview}from"./libs/api/get-static-page-props-preview.js";export{getSharePageContentProps}from"./libs/api/get-preview-content-props.js";export{createAppAPIFetcher,createFetcher,createShopifyFetcher,createTemplateFetcher}from"./libs/fetcher.js";export{getLayout}from"./libs/get-layout.js";export{genCSS}from"./libs/helpers/gen-css.js";export{useTrackingView}from"./libs/hooks/use-tracking-view.js";export{usePagePreview}from"./libs/hooks/usePagePreview.js";export{isBot}from"./libs/helpers/user-agent.js";export{normalizePageSectionResponseV2,parseBuilderTemplateV2}from"./libs/helpers/normalize.js";export{getFallbackV2}from"./libs/helpers/get-fallback.js";export{retryWithDelay}from"./libs/helpers/common.js";export{SharePageTracking}from"./components/SharePageTracking.js";export{getStaticPaths}from"./libs/getStaticPaths.js";export{getFontFromGroupSetting,getFontsFromDataBuilder}from"./libs/helpers/gen-fonts.js";export{getFontFromGlobalStyle,getFonts}from"./libs/google-fonts.js";export{getStorefrontApi}from"./libs/get-storefront-api.js";export{ErrorBoundary}from"./components/ErrorBoundary.js";export{ErrorFallback}from"./components/ErrorFallback.js";export{Page404}from"./pages/404.js";export{Page500}from"./pages/500.js";export{GoogleAnalytic}from"./components/GoogleAnalytic.js";export{FacebookPixel}from"./components/FacebookPixel.js";export{TikTokPixel}from"./components/TikTokPixel.js";export{default as CollectionDetailPage}from"./pages/collection-detail.js";export{PreviewPage}from"./pages/preview.js";export{default as ProductDetailPage}from"./pages/product-detail.js";export{default as StaticPage}from"./pages/static.js";export{BuilderPage}from"./pages/builder.js";export{StaticPageV2}from"./pages/static-v2.js";export{PreviewTemplate}from"./pages/preview-template.js";
|
|
1
|
+
export{getCollectionProps}from"./libs/api/get-collection-props.js";export{getCollectionSharePageProps}from"./libs/api/get-collection-share-page-props.js";export{getHomePageProps}from"./libs/api/get-home-page-props.js";export{getHomePagePropsV2}from"./libs/api/get-home-page-props-v2.js";export{getPreviewProps}from"./libs/api/get-preview-props.js";export{getBuilderProps}from"./libs/api/get-builder-props.js";export{getProductProps}from"./libs/api/get-product-props.js";export{getStaticPagePropsV2}from"./libs/api/get-static-page-props-v2.js";export{getSharePageProps}from"./libs/api/get-share-page-props.js";export{getPostPurchasePropsPreview}from"./libs/api/get-post-purchase-props-preview.js";export{getStaticPagePropsPreview}from"./libs/api/get-static-page-props-preview.js";export{getSharePageContentProps}from"./libs/api/get-preview-content-props.js";export{createAppAPIFetcher,createFetcher,createShopifyFetcher,createTemplateFetcher}from"./libs/fetcher.js";export{getLayout}from"./libs/get-layout.js";export{genCSS}from"./libs/helpers/gen-css.js";export{useTrackingView}from"./libs/hooks/use-tracking-view.js";export{usePagePreview}from"./libs/hooks/usePagePreview.js";export{isBot}from"./libs/helpers/user-agent.js";export{normalizePageSectionResponseV2,parseBuilderTemplateV2}from"./libs/helpers/normalize.js";export{getFallbackV2}from"./libs/helpers/get-fallback.js";export{retryWithDelay}from"./libs/helpers/common.js";export{SharePageTracking}from"./components/SharePageTracking.js";export{getStaticPaths}from"./libs/getStaticPaths.js";export{getFontFromGroupSetting,getFontsFromDataBuilder}from"./libs/helpers/gen-fonts.js";export{getFontFromGlobalStyle,getFontLinkFromGlobalStyle,getFonts}from"./libs/google-fonts.js";export{getStorefrontApi}from"./libs/get-storefront-api.js";export{ErrorBoundary}from"./components/ErrorBoundary.js";export{ErrorFallback}from"./components/ErrorFallback.js";export{Page404}from"./pages/404.js";export{Page500}from"./pages/500.js";export{GoogleAnalytic}from"./components/GoogleAnalytic.js";export{FacebookPixel}from"./components/FacebookPixel.js";export{TikTokPixel}from"./components/TikTokPixel.js";export{default as CollectionDetailPage}from"./pages/collection-detail.js";export{PreviewPage}from"./pages/preview.js";export{default as ProductDetailPage}from"./pages/product-detail.js";export{default as StaticPage}from"./pages/static.js";export{BuilderPage}from"./pages/builder.js";export{StaticPageV2}from"./pages/static-v2.js";export{PreviewTemplate}from"./pages/preview-template.js";
|
|
@@ -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,
|
|
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}from"../helpers/normalize.js";import{parseJson as m,serializableJson as d}from"../helpers/parse-json.js";import{captureException as p}from"@sentry/nextjs";import{PublishedThemePageMetafields as u}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as f}from"../helpers/get-metafield.js";import{getCustomFonts as c}from"../custom-fonts.js";import{generateSeoLinks as h}from"../helpers/generate-seo-links.js";let getHomePagePropsV2=(g,T)=>async()=>{try{let p={slugType:"STATIC"},[_,A,y,I]=await Promise.allSettled([g([e,p]),g([o]),T([a]),g([t,{keys:[u.GLOBAL_META_DESCRIPTION,u.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===_.status)throw Error(_.reason?.[0]);let L="fulfilled"===I.status?I.value:void 0,C=_.value?.publishedThemePages?.[0],P=_.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!C)throw Error("No data builder found for Home page");let E=n(C),[S,v,M,O]=await Promise.all([l(E,void 0,C?.pageStyle?.data),s(C?.pageStyle?.data,void 0),r(g,E),c(P)]),j=C.isMobile??!1,k=f(u.GLOBAL_META_DESCRIPTION,C?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_DESCRIPTION)?.value,B=m(f(u.GLOBAL_META_THUMBNAIL,C?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_THUMBNAIL)?.value),D="fulfilled"===y.status?y.value:void 0,N="fulfilled"===A.status?A.value:void 0,H=N?.storeProperty?.favicon??"/favicon/favicon-32x32.png",b={defaultTitle:D?.shop.name,title:C?.name??"Home",description:k??D?.shop.description,openGraph:{site_name:D?.shop.name,locale:D?.localization.country.isoCode,title:C?.name??D?.shop.name,description:k??D?.shop.description,images:B?[B]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${N?.storeProperty?.primaryDomain}/`,additionalLinkTags:h({favicon:H,shopMeta:D})},G=D?.localization.language.isoCode??null,w=D?.localization.country.isoCode??null,x=G&&w?`${G}-${w}`:null;return d({themeStyle:i(C?.pageStyle?.data,j),fontStyle:v,elementFontStyle:S,builderData:E,swr:{fallback:M},moneyFormat:D?.shop.moneyFormat??null,currency:D?.localization.country.currency.isoCode??null,languageIsoCode:G,countryIsoCode:w,locale:x,swatches:m(N?.storeProperty?.swatchesConfig),seo:b,mobileOnly:j,gaTrackingId:f(u.ANALYTICS_GA_TRACKING_ID,C?.metafields)??null,facebookPixelId:f(u.ANALYTICS_FB_PIXEL_ID,C?.metafields)??null,tiktokPixelId:f(u.ANALYTICS_TIKTOK_PIXEL_ID,C?.metafields)??null,customCodeHeader:f(u.CUSTOM_CODE_HEADER,C?.metafields)??null,customCodeBody:f(u.CUSTOM_CODE_BODY,C?.metafields)??null,pageHandle:C.handle??null,customFonts:O})}catch(e){throw p(e),e}};export{getHomePagePropsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as s,prefetchQueries as t}from"@gem-sdk/core";import{ShopMetaDocument as r}from"@gem-sdk/adapter-shopify";import{getFontFromGlobalStyle as a}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{generateManifest as l}from"../helpers/generate-manifres.js";import{parseBuilderTemplate as n}from"../helpers/normalize.js";import{parseJson as p,serializableJson as m}from"../helpers/parse-json.js";import{PublishedThemePageMetafields as c}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as d}from"../helpers/get-metafield.js";let getHomePageProps=(f,u)=>async()=>{let h="STATIC",g={slugType:h},[y,_,T,A]=await Promise.allSettled([f([e,g]),f([o]),u([r]),f([s,{keys:[c.GLOBAL_META_DESCRIPTION,c.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===y.status)return{pageType:h};let L="fulfilled"===A.status?A.value:void 0,z=y.value.publishedThemePages?.[0],v=n(z),x=await a(z?.pageStyle?.data),M=t(v),P=await Promise.allSettled(M.map(({query:e,variables:o,func:s})=>s?s(f,o):e?f([e,o]):{})),S=M.reduce((e,{key:o},s)=>{let t=P[s];return t?.status==="fulfilled"?{...e,[o]:t.value}:e},{}),I=d(c.GLOBAL_META_DESCRIPTION,z?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_DESCRIPTION)?.value,j=p(d(c.GLOBAL_META_THUMBNAIL,z?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_THUMBNAIL)?.value),B="fulfilled"===T.status?T.value:void 0,C="fulfilled"===_.status?_.value:void 0,E=C?.storeProperty?.favicon??"/favicon/favicon-32x32.png",O={defaultTitle:B?.shop.name,title:z?.name??"Home",description:I??B?.shop.description,openGraph:{site_name:B?.shop.name,locale:B?.localization.country.isoCode,title:z?.name??B?.shop.name,description:I??B?.shop.description,images:j?[j]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:"/",additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${E}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${E}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${E}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:l({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:B?.shop.name,short_name:B?.shop.name,description:B?.shop.description,icons:[{src:`${E}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${E}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},k=B?.localization.language.isoCode??null,G=B?.localization.country.isoCode??null,$=k&&G?`${k}-${G}`:null;return m({themeStyle:i(z?.pageStyle?.data),fontStyle:x,builderData:v,pageType:h,swr:{fallback:S},moneyFormat:B?.shop.moneyFormat??null,currency:B?.localization.country.currency.isoCode??null,locale:$,languageIsoCode:k,countryIsoCode:G,swatches:p(C?.storeProperty?.swatchesConfig),seo:O})};export{getHomePageProps};
|
|
1
|
+
import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as s,prefetchQueries as t}from"@gem-sdk/core";import{ShopMetaDocument as r}from"@gem-sdk/adapter-shopify";import{getFontFromGlobalStyle as a}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{generateManifest as l}from"../helpers/generate-manifres.js";import{parseBuilderTemplate as n}from"../helpers/normalize.js";import{parseJson as p,serializableJson as m}from"../helpers/parse-json.js";import{PublishedThemePageMetafields as c}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as d}from"../helpers/get-metafield.js";let getHomePageProps=(f,u)=>async()=>{let h="STATIC",g={slugType:h},[y,_,T,A]=await Promise.allSettled([f([e,g]),f([o]),u([r]),f([s,{keys:[c.GLOBAL_META_DESCRIPTION,c.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===y.status)return{pageType:h};let L="fulfilled"===A.status?A.value:void 0,z=y.value.publishedThemePages?.[0],v=n(z),x=await a(z?.pageStyle?.data,void 0),M=t(v),P=await Promise.allSettled(M.map(({query:e,variables:o,func:s})=>s?s(f,o):e?f([e,o]):{})),S=M.reduce((e,{key:o},s)=>{let t=P[s];return t?.status==="fulfilled"?{...e,[o]:t.value}:e},{}),I=d(c.GLOBAL_META_DESCRIPTION,z?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_DESCRIPTION)?.value,j=p(d(c.GLOBAL_META_THUMBNAIL,z?.metafields)||L?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_THUMBNAIL)?.value),B="fulfilled"===T.status?T.value:void 0,C="fulfilled"===_.status?_.value:void 0,E=C?.storeProperty?.favicon??"/favicon/favicon-32x32.png",O={defaultTitle:B?.shop.name,title:z?.name??"Home",description:I??B?.shop.description,openGraph:{site_name:B?.shop.name,locale:B?.localization.country.isoCode,title:z?.name??B?.shop.name,description:I??B?.shop.description,images:j?[j]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:"/",additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${E}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${E}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${E}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:l({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:B?.shop.name,short_name:B?.shop.name,description:B?.shop.description,icons:[{src:`${E}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${E}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},k=B?.localization.language.isoCode??null,G=B?.localization.country.isoCode??null,$=k&&G?`${k}-${G}`:null;return m({themeStyle:i(z?.pageStyle?.data),fontStyle:x,builderData:v,pageType:h,swr:{fallback:S},moneyFormat:B?.shop.moneyFormat??null,currency:B?.localization.country.currency.isoCode??null,locale:$,languageIsoCode:k,countryIsoCode:G,swatches:p(C?.storeProperty?.swatchesConfig),seo:O})};export{getHomePageProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ThemePageDocument as e,StorePropertyDocument as r,SaleFunnelDiscountsDocument as a,SaleFunnelOfferDocument as t,LibraryTemplateDocument as l,LibrarySaleFunnelDocument as s,ShopLibraryPageDocument as o}from"@gem-sdk/core";import{captureException as i}from"@sentry/nextjs";import{getFontStyleFromPageTemplate as f,
|
|
1
|
+
import{ThemePageDocument as e,StorePropertyDocument as r,SaleFunnelDiscountsDocument as a,SaleFunnelOfferDocument as t,LibraryTemplateDocument as l,LibrarySaleFunnelDocument as s,ShopLibraryPageDocument as o}from"@gem-sdk/core";import{captureException as i}from"@sentry/nextjs";import{getFontStyleFromPageTemplate as f,getFontLinkFromGlobalStyle as n}from"../google-fonts.js";import{getFallbackV2 as d}from"../helpers/get-fallback.js";import{parseBuilderLibraryTemplate as u,parseShopLibraryPageTemplate as c,parseBuilderTemplateV2 as h}from"../helpers/normalize.js";import{usePagePreview as y}from"../hooks/usePagePreview.js";import{serializableJson as m}from"../helpers/parse-json.js";import{genCSS as D}from"../helpers/gen-css.js";let fetchSalePageDataByID=async(a,t)=>{let l={themePageId:a.themePageId,first:1,where:{default:!0}},[s,o]=await Promise.allSettled([t([e,l]),t([r])]);if("rejected"===s.status)throw Error(s.reason?.[0]);return{dataBuilder:s.value.themePage,pageStyle:s.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:o,dynamicDiscountOffer:void 0,productOffers:[]}},fetchPostPurchasePageDataByID=async(l,s)=>{let o={themePageId:l.themePageId,first:1,where:{default:!0}},[i,f,n,d]=await Promise.allSettled([s([e,o]),s([r]),s([a,{where:{saleFunnelOfferID:l.currentOfferID}}]),s([t,{saleFunnelOfferId:l.currentOfferID}])]);if("rejected"===i.status)throw Error(i.reason?.[0]);if("rejected"===n.status)throw Error(n.reason?.[0]);if("rejected"===d.status)throw Error(d.reason?.[0]);return{dataBuilder:i.value.themePage,pageStyle:i.value.themePage?.theme?.themeStyles?.edges?.[0]?.node?.data,storeProperty:f,dynamicDiscountOffer:d.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:n.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchThemePageDataByTemplateID=async(e,a)=>{let t={libraryTemplateId:e.libraryTemplateId},o=[],[i,f]=await Promise.allSettled([a([l,t]),a([r])]);if(e.currentOfferID){let[r]=await Promise.allSettled([a([s,{librarySaleFunnelId:e.librarySaleFunnelID}])]);if("rejected"===r.status)throw Error(r.reason?.[0]);let t=r.value.librarySaleFunnel?.offers?.find(r=>r?.id===e.currentOfferID);t&&(o=t.discounts?.filter(e=>e?.objectType==="PRODUCT"&&"ORDER_VALUE"===e.type).map(e=>({node:{...e}}))||[])}if("rejected"===i.status)throw Error(i.reason?.[0]);return{dataBuilder:i.value.libraryTemplate,pageStyle:void 0,storeProperty:f,dynamicDiscountOffer:void 0,productOffers:o}},fetchShopLibraryPageDataByID=async(e,l)=>{let s={shopLibraryPageId:e.shopLibraryPageId},[i,f,n,d]=await Promise.allSettled([l([o,s]),l([r]),l([a,{where:{saleFunnelOfferID:e.currentOfferID}}]),l([t,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===i.status)throw Error(i.reason?.[0]);if("rejected"===n.status)throw Error(n.reason?.[0]);if("rejected"===d.status)throw Error(d.reason?.[0]);return{dataBuilder:i.value.shopLibraryPage,pageStyle:void 0,storeProperty:f,dynamicDiscountOffer:d.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:n.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},fetchLibraryTemplateDataByID=async(e,s)=>{let o={libraryTemplateId:e.libraryTemplateId},[i,f,n,d]=await Promise.allSettled([s([l,o]),s([r]),s([a,{where:{saleFunnelOfferID:e.currentOfferID}}]),s([t,{saleFunnelOfferId:e.currentOfferID}])]);if("rejected"===i.status)throw Error(i.reason?.[0]);if("rejected"===n.status)throw Error(n.reason?.[0]);if("rejected"===d.status)throw Error(d.reason?.[0]);return{dataBuilder:i.value.libraryTemplate,pageStyle:void 0,storeProperty:f,dynamicDiscountOffer:d.value.saleFunnelOffer?.dynamicDiscounts?.[0],productOffers:n.value.saleFunnelDiscounts?.edges?.filter(e=>e?.node?.objectType==="PRODUCT"&&e?.node?.type==="ORDER_VALUE")||[]}},getRelevantPageData=async e=>{let{id:r,currentOfferID:a,fetcher:t,isLibraryTemplate:l,librarySaleFunnelID:s,isShopLibraryPage:o}=e;return s?await fetchThemePageDataByTemplateID({libraryTemplateId:r,currentOfferID:a,librarySaleFunnelID:s},t):o&&a?await fetchShopLibraryPageDataByID({shopLibraryPageId:r,currentOfferID:a},t):l&&a?await fetchLibraryTemplateDataByID({libraryTemplateId:r,currentOfferID:a},t):a?await fetchPostPurchasePageDataByID({themePageId:r,currentOfferID:a},t):await fetchSalePageDataByID({themePageId:r},t)},getPostPurchasePropsPreview=(e,r,a)=>async t=>{try{let{id:l,currentOfferID:s,isLibraryTemplate:o,isShopLibraryPage:i}=t,{dataBuilder:p,storeProperty:P,productOffers:g,pageStyle:I,dynamicDiscountOffer:w}=await getRelevantPageData({id:l,currentOfferID:s,fetcher:e,isLibraryTemplate:o,isShopLibraryPage:i,librarySaleFunnelID:r});if(!p)throw Error(`No data builder found for slug: /preview/${l}`);let O=r||o&&s?u(p):i?c(p):h(p),b=a||e,[v,T,j]=await Promise.all([f(O,void 0,I),n(I,void 0),d(b,O,!1)]),{seo:S,pageConfig:E}=y(p,P);return m({themeStyle:D(I),seo:S,...E,elementFontStyle:v,fontStyle:T,builderData:O,swr:{fallback:j},productOffers:g,dynamicDiscountOffer:w})}catch(e){throw console.log("error",e),i(e),e}};export{fetchLibraryTemplateDataByID,fetchPostPurchasePageDataByID,fetchSalePageDataByID,fetchShopLibraryPageDataByID,fetchThemePageDataByTemplateID,getPostPurchasePropsPreview,getRelevantPageData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{StorePropertyDocument as e}from"@gem-sdk/core";import{captureException as l}from"@sentry/nextjs";import{getCustomFonts as t}from"../custom-fonts.js";import{getFontStyleFromPageTemplate as o,
|
|
1
|
+
import{StorePropertyDocument as e}from"@gem-sdk/core";import{captureException as l}from"@sentry/nextjs";import{getCustomFonts as t}from"../custom-fonts.js";import{getFontStyleFromPageTemplate as o,getFontLinkFromGlobalStyle as r}from"../google-fonts.js";import{genCSS as s}from"../helpers/gen-css.js";import{parseBuilderTemplateV2 as n}from"../helpers/normalize.js";import{serializableJson as a,parseJson as i}from"../helpers/parse-json.js";import{createFetcher as u}from"../fetcher.js";import{getCollectionSharePageProps as p}from"./get-collection-share-page-props.js";let getSharePageContentProps=c=>async f=>{try{let{sharedPage:l,customFonts:m,publicToken:d}=await c([f]);if(!l||!d)return null;let{page:y,themeStyle:P,pageMeta:v,shopMeta:C,moneyFormat:g,moneyWithCurrencyFormat:_}=l,{sectionPosition:h}=y??{},O=n({...l,sectionPosition:h}),j=null,I=null,L=null;if(y?.type==="GP_COLLECTION"){let e=(v??[]).find(e=>"selected_preview_collection"===e.key)?.value,l=e?JSON.parse(e??{}):null;I=l?.collectionId,L=l?.collectionTitle}let T=null;if(y?.type==="GP_PRODUCT"){let e=(v??[]).find(e=>"selected_preview_product"===e.key)?.value;T=e?JSON.parse(e??{}):null}let[S,w,N,D,G]=await Promise.allSettled([o(O,void 0,P?.data),r(P?.data),t(m),u(d)([e]),y?.type==="GP_COLLECTION"?p(u(d))(I??void 0):null]);j="fulfilled"===G.status?G.value?.collection:null;let k="fulfilled"===S.status?S.value:null,E="fulfilled"===w.status?w.value:null,U="fulfilled"===N.status?N.value:null,b="fulfilled"===D.status?D.value:void 0;return a({builderData:O,page:y,themeStyle:s(P?.data,!1),pageMeta:v,shopMeta:C,elementFontStyle:k,fontStyle:E,customFonts:U,publicStoreFrontData:d?{token:d,endpoint:process.env.NEXT_PUBLIC_API_URL??""}:null,pageType:y?.type,moneyFormat:g,moneyWithCurrencyFormat:_,swatches:i(b?.storeProperty?.swatchesConfig),collection:j,dynamicCollection:y?.type==="GP_COLLECTION"?{collectionId:j?.baseID,collectionTitle:L}:null,dynamicProduct:y?.type==="GP_PRODUCT"?T:null})}catch(e){return l(e),null}};export{getSharePageContentProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PreviewThemePageDocument as e,StorePropertyDocument as o}from"@gem-sdk/core";import{ShopMetaDocument as t}from"@gem-sdk/adapter-shopify";import{captureException as a}from"@sentry/nextjs";import{getFontStyleFromPageTemplate as r,
|
|
1
|
+
import{PreviewThemePageDocument as e,StorePropertyDocument as o}from"@gem-sdk/core";import{ShopMetaDocument as t}from"@gem-sdk/adapter-shopify";import{captureException as a}from"@sentry/nextjs";import{getFontStyleFromPageTemplate as r,getFontLinkFromGlobalStyle as i}from"../google-fonts.js";import{genCSS as l}from"../helpers/gen-css.js";import{getFallbackV2 as n}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as s,extractPageBackground as m}from"../helpers/normalize.js";import{parseJson as c,serializableJson as d}from"../helpers/parse-json.js";import{getCustomFonts as p}from"../custom-fonts.js";import{sentryCaptureException as u}from"../helpers/sentry.js";import{generateSeoLinks as f}from"../helpers/generate-seo-links.js";let getStaticPagePropsPreview=(h,g)=>async y=>{try{let a="STATIC",v={handleURL:y,pageType:a},[P,k,w]=await Promise.allSettled([h([e,v]),h([o]),g([t])]);if("rejected"===P.status)throw u("PreviewThemePageDocument",P.reason,{variables:v,theme:P}),Error(P.reason?.[0]);let j=P.value.previewThemePage;if(!j)throw Error(`No data builder found for slug: /preview/${y}`);let b=j.customFonts,C=s(j),[S,T,x,I]=await Promise.all([r(C,void 0,j?.themeStyle?.data),i(j?.themeStyle?.data),n(h,C),p(b)]),z=!!j.isMobile,D=j?.dataSEO?.find(e=>e?.key==="global-meta-description")?.value,E=c(j?.dataSEO?.find(e=>e?.key==="global-meta-thumbnail")?.value),$="fulfilled"===w.status?w.value:void 0,F="fulfilled"===k.status?k.value:void 0,B=F?.storeProperty?.favicon??"/favicon/favicon-32x32.png",L={defaultTitle:$?.shop.name,title:j?.name,description:D??$?.shop.description,openGraph:{site_name:$?.shop.name,locale:$?.localization.country.isoCode,title:j?.name??$?.shop.name,description:D??$?.shop.description,images:E?[E]:[]},nofollow:!0,noindex:!0,canonical:`/preview/${y}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:f({favicon:B,shopMeta:$})},M=$?.localization.language.isoCode??null,O=$?.localization.country.isoCode??null,A=M&&O?`${M}-${O}`:null;return d({themeStyle:l(j?.themeStyle?.data,z),fontStyle:T,elementFontStyle:S,builderData:C,pageType:a,moneyFormat:$?.shop?.moneyFormat??null,currency:$?.localization?.country?.currency?.isoCode??null,languageIsoCode:M,countryIsoCode:O,locale:A,swr:{fallback:x},swatches:c(F?.storeProperty?.swatchesConfig),seo:L,mobileOnly:z,gaTrackingId:j.analytic?.gaTrackingID??null,facebookPixelId:j.analytic?.fbPixelID??null,tiktokPixelId:j.analytic?.tiktokPixelID??null,customCodeHeader:j.customCode?.header??null,customCodeBody:j.customCode?.body??null,customFonts:I,pageBackground:m(j),interaction:j?.interaction})}catch(e){throw a(e),e}};export{getStaticPagePropsPreview};
|
|
@@ -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,
|
|
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 _}from"../helpers/generate-seo-links.js";let getStaticPagePropsV2=(T,g)=>async L=>{try{let u="STATIC",A={slug:L,slugType:u},[y,E,I,O]=await Promise.allSettled([T([e,A]),T([o]),g([a]),T([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(T,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:{site_name:K?.shop.name,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:_({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 +1 @@
|
|
|
1
|
-
import{PublishedThemePagesDocument as e,StorePropertyDocument as t,PublishedShopMetasDocument as o,prefetchQueries as s}from"@gem-sdk/core";import{ShopMetaDocument as a}from"@gem-sdk/adapter-shopify";import{
|
|
1
|
+
import{PublishedThemePagesDocument as e,StorePropertyDocument as t,PublishedShopMetasDocument as o,prefetchQueries as s}from"@gem-sdk/core";import{ShopMetaDocument as a}from"@gem-sdk/adapter-shopify";import{getFontLinkFromGlobalStyle as r}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{generateManifest as l}from"../helpers/generate-manifres.js";import{parseBuilderTemplate as n}from"../helpers/normalize.js";import{parseJson as p,serializableJson as c}from"../helpers/parse-json.js";import{PublishedThemePageMetafields as m}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as d}from"../helpers/get-metafield.js";let getStaticPageProps=(f,u)=>async h=>{let g="STATIC",_={slug:h,slugType:g},[y,T,A,L]=await Promise.allSettled([f([e,_]),f([t]),u([a]),f([o,{keys:["source_font",m.GLOBAL_META_DESCRIPTION,m.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===y.status)return{pageType:g};let z="fulfilled"===L.status?L.value:void 0,v=y.value.publishedThemePages?.[0],x=n(v),S=await r(v?.pageStyle?.data),M=s(x),P=await Promise.allSettled(M.map(({query:e,variables:t,func:o})=>o?o(f,t):e?f([e,t]):{})),I=M.reduce((e,{key:t},o)=>{let s=P[o];return s?.status==="fulfilled"?{...e,[t]:s.value}:e},{}),j=d(m.GLOBAL_META_DESCRIPTION,v?.metafields)||z?.publishedShopMetas?.find(e=>e?.key===m.GLOBAL_META_DESCRIPTION)?.value,B=p(d(m.GLOBAL_META_THUMBNAIL,v?.metafields)||z?.publishedShopMetas?.find(e=>e?.key===m.GLOBAL_META_THUMBNAIL)?.value),C="fulfilled"===A.status?A.value:void 0,E="fulfilled"===T.status?T.value:void 0,O=E?.storeProperty?.favicon??"/favicon/favicon-32x32.png",k={defaultTitle:C?.shop.name??"",title:v?.name??"",description:j??C?.shop.description??"",openGraph:{site_name:C?.shop.name??"",locale:C?.localization.country.isoCode??"",title:v?.name??C?.shop.name??"",description:j??C?.shop.description??"",images:B?[B]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`/${h}`,additionalLinkTags:[{rel:"icon",sizes:"32x32",href:`${O}-/crop/1:1/center/-/smart_resize/32x32/`},{rel:"icon",sizes:"16x16",href:`${O}-/crop/1:1/center/-/smart_resize/16x16/`},{rel:"apple-touch-icon",sizes:"180x180",href:`${O}-/crop/1:1/center/-/smart_resize/180x180/`},{rel:"manifest",href:l({theme_color:"#000000",background_color:"#ffffff",display:"standalone",scope:"/",start_url:"/",name:C?.shop.name,short_name:C?.shop.name,description:C?.shop.description,icons:[{src:`${O}-/crop/1:1/center/-/smart_resize/192x192/`,sizes:"192x192",type:"image/png",purpose:"any maskable"},{src:`${O}-/crop/1:1/center/-/smart_resize/512x512/`,sizes:"512x512",type:"image/png"}]})}]},$=C?.localization.language.isoCode??null,G=C?.localization.country.isoCode??null,b=$&&G?`${$}-${G}`:null;return c({themeStyle:i(v?.pageStyle?.data),fontStyle:S,builderData:x,pageType:g,moneyFormat:C?.shop.moneyFormat??null,currency:C?.localization.country.currency.isoCode??null,languageIsoCode:$,countryIsoCode:G,locale:b,swr:{fallback:I},swatches:p(E?.storeProperty?.swatchesConfig),seo:k})};export{getStaticPageProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkNotInOptionFont as
|
|
1
|
+
import{checkNotInOptionFont as t}from"./helpers/check-option-font.js";import{getFontsFromDataBuilder as e}from"./helpers/gen-fonts.js";import{sentryCaptureException as r}from"./helpers/sentry.js";import{googleFontFamilies as o}from"../constants/googleFontV1.js";let CHROME_UA="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",IE_UA="Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko";async function getFontForUA(t,e){try{return fetch(t,{headers:{"User-Agent":e}}).then(o=>200===o.status?o.text():(r("getFontForUA",`Unexpected status ${o.status}`,{url:t,UA:e}),""))}catch(o){return r("getFontForUA","Error fetching font",{url:t,UA:e,error:o}),""}}let composeFonts=t=>{let e=t.filter((t,e,r)=>e===r.findIndex(e=>e.family===t.family));return e.map(e=>{let r=t.filter(t=>t.family===e.family).reduce((t,e)=>[...t,...e.variants],[]).filter((t,e,r)=>e===r.findIndex(e=>e===t));return{...e,variants:r}})},GOOGLE_CSS2_OVERRIDES={"Roboto Flex":"https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap"},normalizeFamily=t=>t?.trim().replace(/\s+/g,"+")??"",getOverrideUrlForFamily=t=>{let e=normalizeFamily(t);return GOOGLE_CSS2_OVERRIDES[t]??GOOGLE_CSS2_OVERRIDES[e]},VARIANT_WEIGHT_MAP={regular:"400",normal:"400",bold:"700",italic:"400italic"},googleFontFamiliesSet=new Set(o),isValidFont=(e,r,o)=>{let a="google"===e.type||"bunny"===e.type,n="theme"===e.type&&o,i=t(e.family,r);return!!("google"!==r&&"google"!==e.type||googleFontFamiliesSet.has(e.family))&&!(a&&i)&&(a||!e.type||n)},normalizeVariant=t=>{let e=String(t).toLowerCase().trim();return VARIANT_WEIGHT_MAP[e]??t},sortFontVariants=t=>{let e=t=>{let e=String(t).toLowerCase().trim(),r=e.includes("italic"),o=e.replace("italic","").trim(),a=VARIANT_WEIGHT_MAP[o]??o,n=parseInt(a,10)||400;return{weight:n,isItalic:r}};return[...t].sort((t,r)=>{let o=e(t),a=e(r);return o.weight!==a.weight?o.weight-a.weight:o.isItalic!==a.isItalic?o.isItalic?1:-1:0})},makeUrlBySourceFont=(t,e,r)=>{let o=composeFonts(t).map(t=>{let e=t.variants.map(t=>normalizeVariant(t)),r=sortFontVariants(e);return`${t.family.replace(/ /g,"+")}:${r.join(",")}`}).join("|");if("sans-serif"===o)return;let a=r?.display||"swap",n=new URLSearchParams;return(n.append("family",o),n.append("display",a),"bunny"===e)?`https://fonts.bunny.net/css?${n.toString()}`:(r?.subset&&n.append("subset",r.subset),r?.effect&&n.append("effect",r.effect),`https://fonts.googleapis.com/css?${decodeURIComponent(n.toString())}`)},createFontUrls=(t,e,r,o)=>{let a=t.filter(t=>isValidFont(t,r||"google",o));if(!a.length)return;let n=a.filter((t,e,r)=>e===r.findIndex(e=>e.family===t.family)),i=[],l=[];for(let t of n){let e=getOverrideUrlForFamily(t.family);e&&"bunny"!==r?i.push(e):l.push(t)}let s=l.length?makeUrlBySourceFont(l,r||"google",e):void 0;return i.length&&s?[...i,s]:s?[s,...i]:i};async function getFonts(t,e,o=!0,a){let n=createFontUrls(t,e,a),i=Array.isArray(n)?n:n?[n]:[];if(!i.length)return"";if(o)return i.map(t=>`@import url('${t}');`).join("");let l="",s="";for(let t of i)try{let[e,r]=await Promise.all([getFontForUA(t,"Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"),getFontForUA(t,"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")]),o=`${e}${r}`;l+=o,s+=`@import url('${t}');`}catch(e){r("getFonts","Error fetching font",{url:t,fontType:a,error:String(e)}),s+="",l+=""}let f=new TextEncoder().encode(l).length;return f<51200?l:s}let extractFontsFromPageTemplate=(t,r)=>{let o=[];return t.forEach(t=>{o.push(...e(t.data,r))}),composeFonts(o)},extractVariantFromTypography=(t,e)=>{let r="400";if(null!=t){let e=String(t).toLowerCase().trim();r=normalizeVariant(e)}let o=r,a=e&&"italic"===e.toLowerCase();return a&&!r.includes("italic")&&(o=r.includes("i")?r:`${r}italic`),o},HEADING_FONT_PREFIX="heading-",SUBHEADING_FONT_PREFIX="subheading-",PARAGRAPH_FONT_PREFIX="paragraph-",extractTypographyVariants=t=>{let e=t?.typography??{},r=t?.font??{},o=new Map;Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let a=t.startsWith(HEADING_FONT_PREFIX)||t.startsWith(SUBHEADING_FONT_PREFIX)?r.heading?"heading":void 0:t.startsWith(PARAGRAPH_FONT_PREFIX)&&r.body?"body":void 0,n=e.desktop,i=n?.fontFamily,l=i||a;["desktop","mobile","tablet"].forEach(t=>{let a=e[t];if(!a||"object"!=typeof a)return;let i=a.fontFamily||l;if(!i||"string"!=typeof i||!r[i])return;let s=a.fontWeight??n?.fontWeight,f=a.fontStyle??n?.fontStyle;if(null==s)return;let p=extractVariantFromTypography(s,f);o.has(i)||o.set(i,new Set),o.get(i).add(p)})});let a={};return o.forEach((t,e)=>{let o=r[e];o&&(a[e]={variants:Array.from(t).sort(),family:o.family})}),a},mapTypographyToFontFamily=t=>{let e=t?.typography??{},r=t?.font??{},o=t?.font??{},a={};return Object.entries(e).forEach(([t,e])=>{if(!e||"object"!=typeof e)return;let n=e.desktop,i=e.mobile,l=e.tablet,s=t.startsWith(HEADING_FONT_PREFIX)||t.startsWith(SUBHEADING_FONT_PREFIX)?o.heading?"heading":void 0:t.startsWith(PARAGRAPH_FONT_PREFIX)&&o.body?"body":void 0,f=n?.fontFamily||i?.fontFamily||l?.fontFamily||s;if(!f||"string"!=typeof f)return;let p=r[f],y=o[f],g=p?.family||y?.family||f,m=p?.type||y?.type||"google";g&&(a[t]={family:g,type:m})}),a},getFontLinkFromGlobalStyle=async(t,e)=>{if(!t)return"";try{let r=JSON.parse(t),o=r?.font??{},a=Object.values(o),n=extractTypographyVariants(r);Object.keys(n).length>0&&(a=Object.entries(o).filter(([t])=>n[t]).map(([t,e])=>({...e,variants:n[t].variants})));let i=composeFonts(a);return getFonts(i,void 0,void 0,e)}catch{return""}},getFontFromGlobalStyle=(t,e)=>{if(!t)return"";try{let r=JSON.parse(t),o=r?.font??{},a=Object.entries(o).map(([,t])=>t);return getFonts(a,void 0,void 0,e)}catch{return""}};async function getFontStyleFromPageTemplate(t,e,r){let o,a=null;if(r)try{a=JSON.parse(r),o=mapTypographyToFontFamily(a)}catch{}let n=extractFontsFromPageTemplate(t,o);if(!a){if(0===n.length)return[];let t=await getFonts(n,void 0,void 0,e);return t?[t]:[]}let i=extractTypographyVariants(a),l=new Map;for(let t of Object.values(i)){let e=l.get(t.family);if(!e){l.set(t.family,new Set(t.variants));continue}t.variants.forEach(t=>e.add(t))}if(0===(n=n.map(t=>{let e=l.get(t.family);if(!e)return t;let r=t.variants.filter(t=>!e.has(t));return 0===r.length?null:{...t,variants:r}}).filter(t=>null!==t)).length)return[];let s=await getFonts(n,void 0,void 0,e);return s?[s]:[]}export{composeFonts,createFontUrls,extractTypographyVariants,getFontFromGlobalStyle,getFontLinkFromGlobalStyle,getFontStyleFromPageTemplate,getFonts,mapTypographyToFontFamily};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let EXCLUDED_FONT_FAMILIES=["sans-serif"],
|
|
1
|
+
let EXCLUDED_FONT_FAMILIES=["sans-serif"],getFallbackFontFamilyFromGlobalStyle=(t,e)=>{if(e&&t?.type&&!t?.custom?.fontFamily){let l=e[t.type];if(l){let e=JSON.parse(JSON.stringify(t));return e.custom||(e.custom={}),e.custom.fontFamily={value:l.family,type:l.type},e}}return t},getFontsFromDataBuilder=(t,e)=>{let l=[];for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let i=t[o],n=i.styles,a=i.settings;getFontFromGroupSetting(l,n,e),getFontFromGroupSetting(l,a,e)}return l},getFontFromGroupSetting=(t,e,l)=>{let o=["normal","hover","focus","active","disabled","price","compareAtPrice"];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let n=e[i];if(!n)continue;let a=l?getFallbackFontFamilyFromGlobalStyle(n,l):n;for(let e of(getFontValue(t,a),o)){if(!n[e])continue;let o=l?getFallbackFontFamilyFromGlobalStyle(n[e],l):n[e];getFontValue(t,o)}}},uniqueArray=t=>Array.from(new Set(t)),getFontValue=(t,e)=>{let l=e.custom?.fontFamily;"string"==typeof l&&(l={value:e.custom?.fontFamily||"",type:"google"});let o=l?.value;if(EXCLUDED_FONT_FAMILIES.includes(o))return;let i=e.custom?.fontVariants;if(i?.length||(i=[e.custom?.fontWeight]),l&&i?.length){let n=i.map(t=>"regular"===t?"400":t),a=e.custom?.fontWeight&&n.includes(e.custom?.fontWeight)?e.custom?.fontWeight:n[0];if(a){let i=uniqueArray([a,...e?.attrs?.isAlwaysLoadBold?["700"]:[],...e?.attrs?.loadFontStyles?.includes("bold")?["700"]:[]]);if(e?.attrs?.loadFontStyles?.includes("italic")){let t=i.map(t=>"string"==typeof t&&/^\d+$/.test(t)?`${t}i`:null).filter(t=>null!==t);i.push(...t)}let r=t.find(t=>t.family==o&&i.every(e=>t.variants.includes(e)));if(!r){let e=t.find(t=>t.family==o);e?i.forEach(t=>{e.variants.includes(t)||e.variants.push(t)}):("700"!==a&&n.includes("700")&&i.push("700"),t.push({family:o||"",variants:uniqueArray(i),subsets:[],type:l.type}))}}}};export{getFontFromGroupSetting,getFontsFromDataBuilder};
|
|
@@ -2,4 +2,4 @@ import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n a
|
|
|
2
2
|
body {
|
|
3
3
|
background: ${A.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${A?.background}`)]}),e(r,{productOffers:F,publicStoreFrontData:I,dynamicDiscountOffer:M,children:e(l,{components:b,children:t("div",{className:`${$?"gp-bg-white post-purchase-page":""} `,children:[$&&e(h,{pageType:"POST_PURCHASE"}),D&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(w?.value||[])}</div>`}}),e(n,{data:S,children:e(i,{t:z,children:v?.map(s=>t(o,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:$,isPreview:q,children:[e(p,{uid:s.uid}),D&&e(y,{defer:!0,src:`${U}/assets-v2/gp-flow-action-lip-v7-5.js`})]},s.uid))})}),$&&e(f,{shopName:E||""})]})})})]})};export{StaticPageV2};
|
|
5
|
+
`},`page_background_${A?.background}`)]}),e(r,{productOffers:F,publicStoreFrontData:I,dynamicDiscountOffer:M,children:e(l,{components:b,children:t("div",{className:`${$?"gp-bg-white post-purchase-page":""} `,role:"main",children:[$&&e(h,{pageType:"POST_PURCHASE"}),D&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(w?.value||[])}</div>`}}),e(n,{data:S,children:e(i,{t:z,children:v?.map(s=>t(o,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:$,isPreview:q,children:[e(p,{uid:s.uid}),D&&e(y,{defer:!0,src:`${U}/assets-v2/gp-flow-action-lip-v7-5.js`})]},s.uid))})}),$&&e(f,{shopName:E||""})]})})})]})};export{StaticPageV2};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -280,10 +280,17 @@ type FontOption = {
|
|
|
280
280
|
effect?: string;
|
|
281
281
|
};
|
|
282
282
|
declare function getFonts(fonts: FontItem[], option?: FontOption, isImportFontByUrl?: boolean, fontType?: FontType): Promise<string>;
|
|
283
|
+
declare const getFontLinkFromGlobalStyle: (data?: string, sourceFont?: FontType) => Promise<string>;
|
|
283
284
|
declare const getFontFromGlobalStyle: (data?: string, sourceFont?: FontType) => "" | Promise<string>;
|
|
284
285
|
|
|
285
|
-
declare const getFontsFromDataBuilder: (dataBuilder: Record<string, any
|
|
286
|
-
|
|
286
|
+
declare const getFontsFromDataBuilder: (dataBuilder: Record<string, any>, typographyFontMap?: Record<string, {
|
|
287
|
+
family: string;
|
|
288
|
+
type: TypographyV2FontFamilyType;
|
|
289
|
+
}>) => FontItem[];
|
|
290
|
+
declare const getFontFromGroupSetting: (fonts: FontItem[], groupSetting: Record<string, any>, typographyFontMap?: Record<string, {
|
|
291
|
+
family: string;
|
|
292
|
+
type: TypographyV2FontFamilyType;
|
|
293
|
+
}>) => void;
|
|
287
294
|
|
|
288
295
|
declare const getStorefrontApi: (handle: string, provider?: 'BIGCOMMERCE' | 'SHOPIFY') => string;
|
|
289
296
|
|
|
@@ -346,4 +353,4 @@ declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderPr
|
|
|
346
353
|
|
|
347
354
|
declare const PreviewTemplate: React.FC<SharePageProps & AdditionalPageBuilderProps>;
|
|
348
355
|
|
|
349
|
-
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, PreviewTemplate, ProductDetailPage, SharePageAPIResponse, SharePageProps, SharePageTracking, StaticPage, StaticPagePropsV2, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, createTemplateFetcher, genCSS, getBuilderProps, getCollectionProps, getCollectionSharePageProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getSharePageContentProps, getSharePageProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, usePagePreview, useTrackingView };
|
|
356
|
+
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, PreviewTemplate, ProductDetailPage, SharePageAPIResponse, SharePageProps, SharePageTracking, StaticPage, StaticPagePropsV2, 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, usePagePreview, useTrackingView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-dev.106",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"build": "rollup -c ./../../helpers/rollup.config.mjs --environment NODE_ENV:production",
|
|
17
17
|
"lint": "eslint ./src --ext .tsx,.ts",
|
|
18
18
|
"type-check": "yarn tsc --noEmit",
|
|
19
|
-
"test": "jest -c ./../../helpers/jest.config.ts"
|
|
19
|
+
"test": "jest -c ./../../helpers/jest.config.ts",
|
|
20
|
+
"gen-google-fonts": "node ./scripts/genFontGoogle.js"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"@sentry/nextjs": "7.77.0",
|
|
@@ -26,10 +27,10 @@
|
|
|
26
27
|
"next": "14.2.20"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "
|
|
30
|
+
"@gem-sdk/core": "8.0.0-dev.107",
|
|
31
|
+
"@gem-sdk/plugin-cookie-bar": "8.0.0-dev.106",
|
|
32
|
+
"@gem-sdk/plugin-quick-view": "8.0.0-dev.106",
|
|
33
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "8.0.0-dev.106"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
36
|
"next": ">=14"
|