@gem-sdk/core 1.14.0-dev.587 → 1.14.0-dev.589

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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),composeAdvanceStyle=require("../helpers/compose-advance-style.js"),constant=require("./constant.js"),RenderCustomCode=require("./RenderCustomCode.js"),ComponentToolbarPreview=require("./ComponentToolbarPreview.js"),useApplyAnimation=require("../hooks/animation/useApplyAnimation.js");const ComponentWrapperPreview=({children:e,...t})=>{if(react.useEffect(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:t.uid}});window.dispatchEvent(e)},[t.uid]),useApplyAnimation.default({props:t}),"section"===t.type)return null;let o={};if("Section"===t.tag&&t.isThemeSection&&(o["data-theme-section"]=!0),t.editorConfigs){let e=t.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(o["data-placeholder-not-append-before-after"]=!0),e.toolbar?.parent&&(o["data-toolbar-parent"]=!0),e.component?.noDelete&&(o["data-component-no-delete"]=!0),e.component?.noDuplicate&&(o["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(o["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(o["data-component-no-setting"]=!0),e.component?.isThirdParty&&(o["data-component-is-third-party"]=!0),e.toolbar?.hide&&(o["data-toolbar-hide"]=!0),e.slots?.children&&(o["data-slots-children"]=!0),e.toolbar?.hide||(o["data-toolbar-wrap"]=!0)}t?.editorConfigs?.toolbar?.hide||(o["data-toolbar-wrap"]=!0);let n=composeAdvanceStyle.composeAdvanceStyle(t.advanced,t.tag),a=t.advanced,s={...o,"data-uid":t.uid,"data-component-type":"component","data-component-tag":t.tag,"data-component-label":t.label};return constant.disableWrap.includes(t.tag)&&react.isValidElement(e)?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RenderCustomCode.default,{uid:t.uid,advanced:a}),jsxRuntime.jsxs(e.type,{className:a?.cssClass,...e.props,style:n,builderAttrs:s,advanced:a,children:[e.props.children,jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview,{...t})]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RenderCustomCode.default,{uid:t.uid,advanced:a}),jsxRuntime.jsxs("div",{style:constant.excludeApplyStyle.includes(t.tag)?{"--mb":n?.["--mb"],"--mb-tablet":n?.["--mb-tablet"],"--mb-mobile":n?.["--mb-mobile"]}:n,className:`${t.uid} ${t.advanced?.cssClass?t.advanced?.cssClass:""}`,...s,children:[!constant.excludeApplyStyle.includes(t.tag)&&e,react.isValidElement(e)&&constant.excludeApplyStyle.includes(t.tag)&&jsxRuntime.jsx(e.type,{...e.props,style:n,advanced:a}),jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview,{...t})]})]})};exports.default=ComponentWrapperPreview;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),composeAdvanceStyle=require("../helpers/compose-advance-style.js"),constant=require("./constant.js"),RenderCustomCode=require("./RenderCustomCode.js"),ComponentToolbarPreview=require("./ComponentToolbarPreview.js"),useApplyAnimation=require("../hooks/animation/useApplyAnimation.js");const ComponentWrapperPreview=({children:e,...t})=>{if(react.useEffect(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:t.uid}});window.dispatchEvent(e)},[t.uid]),useApplyAnimation.default({props:t}),"section"===t.type)return null;let o={};if("Section"===t.tag&&t.isThemeSection&&(o["data-theme-section"]=!0),t.editorConfigs){let e=t.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(o["data-placeholder-not-append-before-after"]=!0),e.placeholder?.notAppendLeftRight&&(o["data-placeholder-not-append-left-right"]=!0),e.toolbar?.parent&&(o["data-toolbar-parent"]=!0),e.component?.noDelete&&(o["data-component-no-delete"]=!0),e.component?.noDuplicate&&(o["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(o["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(o["data-component-no-setting"]=!0),e.component?.isThirdParty&&(o["data-component-is-third-party"]=!0),e.toolbar?.hide&&(o["data-toolbar-hide"]=!0),e.slots?.children&&(o["data-slots-children"]=!0),e.toolbar?.hide||(o["data-toolbar-wrap"]=!0)}t?.editorConfigs?.toolbar?.hide||(o["data-toolbar-wrap"]=!0);let n=composeAdvanceStyle.composeAdvanceStyle(t.advanced,t.tag),a=t.advanced,r={...o,"data-uid":t.uid,"data-component-type":"component","data-component-tag":t.tag,"data-component-label":t.label};return constant.disableWrap.includes(t.tag)&&react.isValidElement(e)?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RenderCustomCode.default,{uid:t.uid,advanced:a}),jsxRuntime.jsxs(e.type,{className:a?.cssClass,...e.props,style:n,builderAttrs:r,advanced:a,children:[e.props.children,jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview,{...t})]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RenderCustomCode.default,{uid:t.uid,advanced:a}),jsxRuntime.jsxs("div",{style:constant.excludeApplyStyle.includes(t.tag)?{"--mb":n?.["--mb"],"--mb-tablet":n?.["--mb-tablet"],"--mb-mobile":n?.["--mb-mobile"]}:n,className:`${t.uid} ${t.advanced?.cssClass?t.advanced?.cssClass:""}`,...r,children:[!constant.excludeApplyStyle.includes(t.tag)&&e,react.isValidElement(e)&&constant.excludeApplyStyle.includes(t.tag)&&jsxRuntime.jsx(e.type,{...e.props,style:n,advanced:a}),jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview,{...t})]})]})};exports.default=ComponentWrapperPreview;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useEffect as a,isValidElement as n}from"react";import{composeAdvanceStyle as d}from"../helpers/compose-advance-style.js";import{disableWrap as r,excludeApplyStyle as i}from"./constant.js";import p from"./RenderCustomCode.js";import{ComponentToolbarPreview as l}from"./ComponentToolbarPreview.js";import s from"../hooks/animation/useApplyAnimation.js";let ComponentWrapperPreview=({children:c,...m})=>{if(a(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:m.uid}});window.dispatchEvent(e)},[m.uid]),s({props:m}),"section"===m.type)return null;let b={};if("Section"===m.tag&&m.isThemeSection&&(b["data-theme-section"]=!0),m.editorConfigs){let e=m.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(b["data-placeholder-not-append-before-after"]=!0),e.toolbar?.parent&&(b["data-toolbar-parent"]=!0),e.component?.noDelete&&(b["data-component-no-delete"]=!0),e.component?.noDuplicate&&(b["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(b["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(b["data-component-no-setting"]=!0),e.component?.isThirdParty&&(b["data-component-is-third-party"]=!0),e.toolbar?.hide&&(b["data-toolbar-hide"]=!0),e.slots?.children&&(b["data-slots-children"]=!0),e.toolbar?.hide||(b["data-toolbar-wrap"]=!0)}m?.editorConfigs?.toolbar?.hide||(b["data-toolbar-wrap"]=!0);let u=d(m.advanced,m.tag),h=m.advanced,f={...b,"data-uid":m.uid,"data-component-type":"component","data-component-tag":m.tag,"data-component-label":m.label};return r.includes(m.tag)&&n(c)?e(t,{children:[o(p,{uid:m.uid,advanced:h}),e(c.type,{className:h?.cssClass,...c.props,style:u,builderAttrs:f,advanced:h,children:[c.props.children,o(l,{...m})]})]}):e(t,{children:[o(p,{uid:m.uid,advanced:h}),e("div",{style:i.includes(m.tag)?{"--mb":u?.["--mb"],"--mb-tablet":u?.["--mb-tablet"],"--mb-mobile":u?.["--mb-mobile"]}:u,className:`${m.uid} ${m.advanced?.cssClass?m.advanced?.cssClass:""}`,...f,children:[!i.includes(m.tag)&&c,n(c)&&i.includes(m.tag)&&o(c.type,{...c.props,style:u,advanced:h}),o(l,{...m})]})]})};export{ComponentWrapperPreview as default};
1
+ import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useEffect as a,isValidElement as n}from"react";import{composeAdvanceStyle as d}from"../helpers/compose-advance-style.js";import{disableWrap as r,excludeApplyStyle as i}from"./constant.js";import p from"./RenderCustomCode.js";import{ComponentToolbarPreview as l}from"./ComponentToolbarPreview.js";import c from"../hooks/animation/useApplyAnimation.js";let ComponentWrapperPreview=({children:s,...m})=>{if(a(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:m.uid}});window.dispatchEvent(e)},[m.uid]),c({props:m}),"section"===m.type)return null;let b={};if("Section"===m.tag&&m.isThemeSection&&(b["data-theme-section"]=!0),m.editorConfigs){let e=m.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(b["data-placeholder-not-append-before-after"]=!0),e.placeholder?.notAppendLeftRight&&(b["data-placeholder-not-append-left-right"]=!0),e.toolbar?.parent&&(b["data-toolbar-parent"]=!0),e.component?.noDelete&&(b["data-component-no-delete"]=!0),e.component?.noDuplicate&&(b["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(b["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(b["data-component-no-setting"]=!0),e.component?.isThirdParty&&(b["data-component-is-third-party"]=!0),e.toolbar?.hide&&(b["data-toolbar-hide"]=!0),e.slots?.children&&(b["data-slots-children"]=!0),e.toolbar?.hide||(b["data-toolbar-wrap"]=!0)}m?.editorConfigs?.toolbar?.hide||(b["data-toolbar-wrap"]=!0);let h=d(m.advanced,m.tag),u=m.advanced,f={...b,"data-uid":m.uid,"data-component-type":"component","data-component-tag":m.tag,"data-component-label":m.label};return r.includes(m.tag)&&n(s)?e(t,{children:[o(p,{uid:m.uid,advanced:u}),e(s.type,{className:u?.cssClass,...s.props,style:h,builderAttrs:f,advanced:u,children:[s.props.children,o(l,{...m})]})]}):e(t,{children:[o(p,{uid:m.uid,advanced:u}),e("div",{style:i.includes(m.tag)?{"--mb":h?.["--mb"],"--mb-tablet":h?.["--mb-tablet"],"--mb-mobile":h?.["--mb-mobile"]}:h,className:`${m.uid} ${m.advanced?.cssClass?m.advanced?.cssClass:""}`,...f,children:[!i.includes(m.tag)&&s,n(s)&&i.includes(m.tag)&&o(s.type,{...s.props,style:h,advanced:u}),o(l,{...m})]})]})};export{ComponentWrapperPreview as default};
@@ -1202,6 +1202,7 @@ type ComponentSetting<P extends BaseProps> = {
1202
1202
  };
1203
1203
  placeholder?: {
1204
1204
  notAppendBeforeAfter?: boolean;
1205
+ notAppendLeftRight?: boolean;
1205
1206
  flowTag?: string[];
1206
1207
  flowPage?: string;
1207
1208
  notAppendTags?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.14.0-dev.587",
3
+ "version": "1.14.0-dev.589",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",