@tmagic/editor 1.0.4 → 1.0.5

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.
@@ -188,7 +188,7 @@ const _sfc_main$k = defineComponent({
188
188
  };
189
189
  }
190
190
  });
191
- const _hoisted_1$c = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
191
+ const _hoisted_1$d = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
192
192
  function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
193
193
  const _component_el_button = resolveComponent("el-button");
194
194
  const _component_el_tooltip = resolveComponent("el-tooltip");
@@ -204,7 +204,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
204
204
  style: { "padding": "0" }
205
205
  }, {
206
206
  default: withCtx(() => [
207
- _hoisted_1$c
207
+ _hoisted_1$d
208
208
  ]),
209
209
  _: 1
210
210
  }, 8, ["icon"])
@@ -369,12 +369,12 @@ const _sfc_main$j = defineComponent({
369
369
  };
370
370
  }
371
371
  });
372
- const _hoisted_1$b = {
372
+ const _hoisted_1$c = {
373
373
  ref: "codeEditor",
374
374
  class: "magic-code-editor"
375
375
  };
376
376
  function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
377
- return openBlock(), createElementBlock("div", _hoisted_1$b, null, 512);
377
+ return openBlock(), createElementBlock("div", _hoisted_1$c, null, 512);
378
378
  }
379
379
  var CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j]]);
380
380
 
@@ -1595,13 +1595,13 @@ const _sfc_main$i = defineComponent({
1595
1595
  };
1596
1596
  }
1597
1597
  });
1598
- const _hoisted_1$a = { class: "m-editor-empty-panel" };
1598
+ const _hoisted_1$b = { class: "m-editor-empty-panel" };
1599
1599
  const _hoisted_2$4 = { class: "m-editor-empty-content" };
1600
1600
  const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("p", null, "\u65B0\u589E\u9875\u9762", -1);
1601
1601
  function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
1602
1602
  const _component_plus = resolveComponent("plus");
1603
1603
  const _component_el_icon = resolveComponent("el-icon");
1604
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
1604
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
1605
1605
  createElementVNode("div", _hoisted_2$4, [
1606
1606
  createElementVNode("div", {
1607
1607
  class: "m-editor-empty-button",
@@ -1664,12 +1664,12 @@ const _sfc_main$h = defineComponent({
1664
1664
  };
1665
1665
  }
1666
1666
  });
1667
- const _hoisted_1$9 = {
1667
+ const _hoisted_1$a = {
1668
1668
  ref: "target",
1669
1669
  class: "m-editor-resizer"
1670
1670
  };
1671
1671
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
1672
- return openBlock(), createElementBlock("span", _hoisted_1$9, [
1672
+ return openBlock(), createElementBlock("span", _hoisted_1$a, [
1673
1673
  renderSlot(_ctx.$slots, "default")
1674
1674
  ], 512);
1675
1675
  }
@@ -1704,7 +1704,7 @@ const _sfc_main$g = defineComponent({
1704
1704
  };
1705
1705
  }
1706
1706
  });
1707
- const _hoisted_1$8 = { class: "m-editor" };
1707
+ const _hoisted_1$9 = { class: "m-editor" };
1708
1708
  const _hoisted_2$3 = {
1709
1709
  key: 1,
1710
1710
  class: "m-editor-content"
@@ -1714,7 +1714,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
1714
1714
  const _component_resizer = resolveComponent("resizer");
1715
1715
  const _component_el_scrollbar = resolveComponent("el-scrollbar");
1716
1716
  const _component_add_page_box = resolveComponent("add-page-box");
1717
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
1717
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
1718
1718
  renderSlot(_ctx.$slots, "nav", { class: "m-editor-nav-menu" }),
1719
1719
  _ctx.showSrc ? (openBlock(), createBlock(_component_magic_code_editor, {
1720
1720
  key: 0,
@@ -1771,7 +1771,7 @@ const _sfc_main$f = defineComponent({
1771
1771
  };
1772
1772
  }
1773
1773
  });
1774
- const _hoisted_1$7 = ["src"];
1774
+ const _hoisted_1$8 = ["src"];
1775
1775
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
1776
1776
  const _component_edit = resolveComponent("edit");
1777
1777
  const _component_el_icon = resolveComponent("el-icon");
@@ -1783,7 +1783,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
1783
1783
  })) : typeof _ctx.icon === "string" && _ctx.icon.startsWith("http") ? (openBlock(), createElementBlock("img", {
1784
1784
  key: 1,
1785
1785
  src: _ctx.icon
1786
- }, null, 8, _hoisted_1$7)) : typeof _ctx.icon === "string" ? (openBlock(), createElementBlock("i", {
1786
+ }, null, 8, _hoisted_1$8)) : typeof _ctx.icon === "string" ? (openBlock(), createElementBlock("i", {
1787
1787
  key: 2,
1788
1788
  class: normalizeClass(_ctx.icon)
1789
1789
  }, null, 2)) : (openBlock(), createBlock(_component_el_icon, { key: 3 }, {
@@ -1955,7 +1955,7 @@ const _sfc_main$e = defineComponent({
1955
1955
  };
1956
1956
  }
1957
1957
  });
1958
- const _hoisted_1$6 = {
1958
+ const _hoisted_1$7 = {
1959
1959
  key: 1,
1960
1960
  class: "menu-item-text"
1961
1961
  };
@@ -1985,7 +1985,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
1985
1985
  _ctx.item.type === "divider" ? (openBlock(), createBlock(_component_el_divider, {
1986
1986
  key: 0,
1987
1987
  direction: _ctx.item.direction || "vertical"
1988
- }, null, 8, ["direction"])) : _ctx.item.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$6, toDisplayString(_ctx.item.text), 1)) : _ctx.item.type === "zoom" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1988
+ }, null, 8, ["direction"])) : _ctx.item.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$7, toDisplayString(_ctx.item.text), 1)) : _ctx.item.type === "zoom" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1989
1989
  createVNode(_component_tool_button, {
1990
1990
  data: { type: "button", icon: _ctx.ZoomOut, handler: _ctx.zoomOutHandler, tooltip: "\u7F29\u5C0F" },
1991
1991
  "event-type": _ctx.eventType
@@ -2166,17 +2166,21 @@ const _sfc_main$c = defineComponent({
2166
2166
  };
2167
2167
  }
2168
2168
  });
2169
+ const _hoisted_1$6 = { class: "`m-editor-props-panel" };
2169
2170
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
2170
2171
  const _component_m_form = resolveComponent("m-form");
2171
- return openBlock(), createBlock(_component_m_form, {
2172
- class: normalizeClass(`m-editor-props-panel ${_ctx.propsPanelSize}`),
2173
- "popper-class": `m-editor-props-panel-popper ${_ctx.propsPanelSize}`,
2174
- ref: "configForm",
2175
- size: _ctx.propsPanelSize,
2176
- "init-values": _ctx.values,
2177
- config: _ctx.curFormConfig,
2178
- onChange: _ctx.submit
2179
- }, null, 8, ["class", "popper-class", "size", "init-values", "config", "onChange"]);
2172
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
2173
+ renderSlot(_ctx.$slots, "props-panel-header"),
2174
+ createVNode(_component_m_form, {
2175
+ class: normalizeClass(`m-editor-props-panel ${_ctx.propsPanelSize}`),
2176
+ "popper-class": `m-editor-props-panel-popper ${_ctx.propsPanelSize}`,
2177
+ ref: "configForm",
2178
+ size: _ctx.propsPanelSize,
2179
+ "init-values": _ctx.values,
2180
+ config: _ctx.curFormConfig,
2181
+ onChange: _ctx.submit
2182
+ }, null, 8, ["class", "popper-class", "size", "init-values", "config", "onChange"])
2183
+ ]);
2180
2184
  }
2181
2185
  var PropsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
2182
2186
 
@@ -2226,7 +2230,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
2226
2230
  const _component_el_scrollbar = resolveComponent("el-scrollbar");
2227
2231
  return openBlock(), createBlock(_component_el_scrollbar, null, {
2228
2232
  default: withCtx(() => [
2229
- renderSlot(_ctx.$slots, "component-list-panel"),
2233
+ renderSlot(_ctx.$slots, "component-list-panel-header"),
2230
2234
  createVNode(_component_el_collapse, {
2231
2235
  class: "ui-component-panel",
2232
2236
  "model-value": _ctx.collapseValue
@@ -2649,7 +2653,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
2649
2653
  const _component_el_scrollbar = resolveComponent("el-scrollbar");
2650
2654
  return openBlock(), createBlock(_component_el_scrollbar, { class: "magic-editor-layer-panel" }, {
2651
2655
  default: withCtx(() => [
2652
- renderSlot(_ctx.$slots, "layer-panel"),
2656
+ renderSlot(_ctx.$slots, "layer-panel-header"),
2653
2657
  createVNode(_component_el_input, {
2654
2658
  class: "filterInput",
2655
2659
  size: "small",
@@ -2767,16 +2771,16 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
2767
2771
  ]),
2768
2772
  default: withCtx(() => [
2769
2773
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.config.component), mergeProps(_ctx.config.props || {}, toHandlers(_ctx.config?.listeners || {})), createSlots({ _: 2 }, [
2770
- _ctx.data === "layer" ? {
2771
- name: "layer-panel",
2774
+ _ctx.data === "component-list" || _ctx.config.slots?.componentListPanelHeader ? {
2775
+ name: "component-list-panel-header",
2772
2776
  fn: withCtx(() => [
2773
- renderSlot(_ctx.$slots, "layer-panel")
2777
+ _ctx.data === "component-list" ? renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : _ctx.config.slots?.componentListPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.config.slots.componentListPanelHeader), { key: 1 })) : createCommentVNode("", true)
2774
2778
  ])
2775
2779
  } : void 0,
2776
- _ctx.data === "component-list" ? {
2777
- name: "component-list-panel",
2780
+ _ctx.data === "layer" || _ctx.config.slots?.layerPanelHeader ? {
2781
+ name: "layer-panel-header",
2778
2782
  fn: withCtx(() => [
2779
- renderSlot(_ctx.$slots, "component-list-panel")
2783
+ _ctx.data === "layer" ? renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : _ctx.config.slots?.layerPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.config.slots.layerPanelHeader), { key: 1 })) : createCommentVNode("", true)
2780
2784
  ])
2781
2785
  } : void 0,
2782
2786
  _ctx.config.slots?.layerNodeContent ? {
@@ -2832,15 +2836,15 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2832
2836
  data: item
2833
2837
  }, createSlots({ _: 2 }, [
2834
2838
  item === "layer" ? {
2835
- name: "layer-panel",
2839
+ name: "layer-panel-header",
2836
2840
  fn: withCtx(() => [
2837
- renderSlot(_ctx.$slots, "layer-panel")
2841
+ renderSlot(_ctx.$slots, "layer-panel-header")
2838
2842
  ])
2839
2843
  } : void 0,
2840
2844
  item === "component-list" ? {
2841
- name: "component-list-panel",
2845
+ name: "component-list-panel-header",
2842
2846
  fn: withCtx(() => [
2843
- renderSlot(_ctx.$slots, "component-list-panel")
2847
+ renderSlot(_ctx.$slots, "component-list-panel-header")
2844
2848
  ])
2845
2849
  } : void 0
2846
2850
  ]), 1032, ["data"]);
@@ -4022,11 +4026,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4022
4026
  sidebar: withCtx(() => [
4023
4027
  renderSlot(_ctx.$slots, "sidebar", { editorService: _ctx.editorService }, () => [
4024
4028
  createVNode(_component_sidebar, { data: _ctx.sidebar }, {
4025
- "layer-panel": withCtx(() => [
4026
- renderSlot(_ctx.$slots, "layer-panel")
4029
+ "layer-panel-header": withCtx(() => [
4030
+ renderSlot(_ctx.$slots, "layer-panel-header")
4027
4031
  ]),
4028
- "component-list-panel": withCtx(() => [
4029
- renderSlot(_ctx.$slots, "component-list-panel")
4032
+ "component-list-panel-header": withCtx(() => [
4033
+ renderSlot(_ctx.$slots, "component-list-panel-header")
4030
4034
  ]),
4031
4035
  _: 3
4032
4036
  }, 8, ["data"])
@@ -4053,7 +4057,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4053
4057
  createVNode(_component_props_panel, {
4054
4058
  ref: "propsPanel",
4055
4059
  onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance))
4056
- }, null, 512)
4060
+ }, {
4061
+ "props-panel-header": withCtx(() => [
4062
+ renderSlot(_ctx.$slots, "props-panel-header")
4063
+ ]),
4064
+ _: 3
4065
+ }, 512)
4057
4066
  ])
4058
4067
  ]),
4059
4068
  empty: withCtx(() => [