@gem-sdk/pages 12.0.0-dev.64 → 12.0.0-dev.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
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.useI18nStore(),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)},
|
|
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.useI18nStore(),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)},g=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.jsxs("div",{className:"gp-my-6 gp-flex gp-items-center gp-gap-3 gp-w-full",children:[jsxRuntime.jsx("hr",{className:"gp-flex-1 gp-border-[#D6D6D6] w-full"}),jsxRuntime.jsx("span",{className:"gp-text-[14px] gp-text-[#676767]",children:e("Or")}),jsxRuntime.jsx("hr",{className:"gp-flex-1 gp-border-[#D6D6D6] w-full"})]}),jsxRuntime.jsx("div",{className:"gp-flex gp-items-center gp-gap-2 gp-text-xs",children:jsxRuntime.jsx("div",{onClick:g,"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,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useI18nStore as l,useShopStore as
|
|
2
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useI18nStore as l,useShopStore as p}from"@gem-sdk/core";import{useMemo as r}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:d}=l(),s=p(e=>e.pageType),n=SALE_FUNNEL_PAGE_TYPES.includes(s||""),a="POST_PURCHASE"===s,c=r(()=>n?d("Start building with Sections/Elements or"):a?d("Start with Templates from sidebar"):d("Start with Sections from sidebar"),[n,a,d]),o=r(()=>n?d("Use existing page designs"):a?d("Add templates"):d("Add sections"),[n,a,d]),m=()=>{if(n){x(g.EXISTING_PAGES);return}if(a){x(g.POST_PURCHASE_UPSELL);return}h(!0)},h=e=>{let t=new CustomEvent("editor:sidebar:build-with-section-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},x=e=>{let t=new CustomEvent("editor:sidebar:build-with-template-active-tab",{bubbles:!0,detail:{value:e}});window.dispatchEvent(t)},f=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:c}),e("div",{className:"gp-flex gp-gap-3 gp-justify-between",children:[t("button",{"data-button-add-section":!0,onClick:m,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:()=>{n?x(g.TEMPLATES):h(!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:n?d("Explore templates"):d("Add elements")})]}),!a&&e(i,{children:[e("div",{className:"gp-my-6 gp-flex gp-items-center gp-gap-3 gp-w-full",children:[t("hr",{className:"gp-flex-1 gp-border-[#D6D6D6] w-full"}),t("span",{className:"gp-text-[14px] gp-text-[#676767]",children:d("Or")}),t("hr",{className:"gp-flex-1 gp-border-[#D6D6D6] w-full"})]}),t("div",{className:"gp-flex gp-items-center gp-gap-2 gp-text-xs",children:t("div",{onClick:f,"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:d("Start with Generating from URL or image")})})]})]})]})};export{DropElement};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "12.0.0-dev.
|
|
3
|
+
"version": "12.0.0-dev.65",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"next": "14.2.35"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "12.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "12.0.0-dev.65",
|
|
31
31
|
"@gem-sdk/plugin-cookie-bar": "12.0.0-dev.53",
|
|
32
32
|
"@gem-sdk/plugin-quick-view": "12.0.0-dev.53",
|
|
33
33
|
"@gem-sdk/plugin-sticky-add-to-cart": "12.0.0-dev.53"
|