@gem-sdk/pages 10.0.2 → 11.2.0
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/image-to-layout/DropElement.js +1 -1
- package/dist/cjs/constants/index.js +1 -1
- package/dist/cjs/libs/helpers/gen-fonts.js +1 -1
- package/dist/esm/components/image-to-layout/DropElement.js +1 -1
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/libs/helpers/gen-fonts.js +1 -1
- package/package.json +5 -5
|
@@ -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;
|
|
@@ -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={}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const EXCLUDED_FONT_FAMILIES=["sans-serif"],getFallbackFontFamilyFromGlobalStyle=(t,e)=>{if(e&&t?.type&&!t?.custom?.fontFamily){let
|
|
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;
|
|
@@ -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};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let EXCLUDED_FONT_FAMILIES=["sans-serif"],getFallbackFontFamilyFromGlobalStyle=(t,e)=>{if(e&&t?.type&&!t?.custom?.fontFamily){let
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"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": "
|
|
29
|
+
"@gem-sdk/core": "11.2.0",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "11.2.0",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "11.2.0",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "11.2.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=14"
|