@tmagic/editor 1.3.10 → 1.3.11

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,5 +1,5 @@
1
1
  import { defineComponent, ref, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref, computed, reactive, resolveComponent, inject, withCtx, Fragment, resolveDynamicComponent, createTextVNode, createCommentVNode, toRaw, nextTick, mergeProps, toDisplayString, renderList, createStaticVNode, watchEffect, withModifiers, renderSlot, normalizeProps, resolveDirective, withDirectives, createSlots, markRaw, getCurrentInstance, vShow, provide, Transition, toHandlers, mergeDefaults } from 'vue';
2
- import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, ArrowLeftBold, ArrowRightBold, CaretBottom, DocumentCopy, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, ArrowRight, CopyDocument, Files, Hide, Goods, List, EditPen, Top, Bottom } from '@element-plus/icons-vue';
2
+ import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, ArrowLeftBold, ArrowRightBold, CaretBottom, DocumentCopy, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, ArrowRight, CopyDocument, Files, Hide, Goods, List, EditPen, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
3
3
  import { throttle, isEmpty, cloneDeep, mergeWith, isObject, uniq, get, map, has, pick, keys } from 'lodash-es';
4
4
  import serialize from 'serialize-javascript';
5
5
  import { TMagicButton, TMagicCard, tMagicMessage, TMagicDialog, TMagicTag, tMagicMessageBox, TMagicIcon, getConfig as getConfig$1, TMagicSwitch, TMagicInput, TMagicTooltip, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar, TMagicCollapse, TMagicCollapseItem } from '@tmagic/design';
@@ -30,7 +30,7 @@ emmetCSS(monaco, ["css", "scss"]);
30
30
  const _hoisted_1$t = {
31
31
  class: /* @__PURE__ */ normalizeClass(`magic-code-editor`)
32
32
  };
33
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
33
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
34
34
  ...{
35
35
  name: "MEditorCodeEditor"
36
36
  },
@@ -216,7 +216,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
216
216
  }
217
217
  });
218
218
 
219
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
219
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
220
220
  ...{
221
221
  name: "MEditorCode"
222
222
  },
@@ -241,7 +241,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
241
241
  emit("change", v);
242
242
  };
243
243
  return (_ctx, _cache) => {
244
- return openBlock(), createBlock(_sfc_main$T, {
244
+ return openBlock(), createBlock(_sfc_main$U, {
245
245
  height: _ctx.config.height,
246
246
  "init-values": _ctx.model[_ctx.name],
247
247
  language: _ctx.config.language,
@@ -256,7 +256,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
256
256
  }
257
257
  });
258
258
 
259
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
259
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
260
260
  ...{
261
261
  name: "MEditorCodeLink"
262
262
  },
@@ -336,7 +336,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
336
336
  }
337
337
  });
338
338
 
339
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
339
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
340
340
  ...{
341
341
  name: "MEditorCodeSelect"
342
342
  },
@@ -413,7 +413,7 @@ const _hoisted_1$s = { style: { "display": "flex", "margin-bottom": "10px" } };
413
413
  const _hoisted_2$k = { style: { "flex": "1" } };
414
414
  const _hoisted_3$8 = { style: { "flex": "1" } };
415
415
  const _hoisted_4$7 = { class: "dialog-footer" };
416
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
416
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
417
417
  ...{
418
418
  name: "MEditorCodeBlockEditor"
419
419
  },
@@ -681,7 +681,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
681
681
  })
682
682
  ])
683
683
  ]),
684
- difVisible.value ? (openBlock(), createBlock(_sfc_main$T, {
684
+ difVisible.value ? (openBlock(), createBlock(_sfc_main$U, {
685
685
  key: 0,
686
686
  ref_key: "magicVsEditor",
687
687
  ref: magicVsEditor,
@@ -3213,7 +3213,7 @@ const getDefaultConfig = async (addNode, parentNode) => {
3213
3213
  return newNode;
3214
3214
  };
3215
3215
 
3216
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
3216
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
3217
3217
  ...{
3218
3218
  name: "MEditorCodeParams"
3219
3219
  },
@@ -3264,7 +3264,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3264
3264
  });
3265
3265
 
3266
3266
  const _hoisted_1$r = ["src"];
3267
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
3267
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3268
3268
  ...{
3269
3269
  name: "MEditorIcon"
3270
3270
  },
@@ -3368,7 +3368,7 @@ const useCodeBlockEdit = (codeBlockService) => {
3368
3368
 
3369
3369
  const _hoisted_1$q = { class: "m-fields-code-select-col" };
3370
3370
  const _hoisted_2$j = { class: "code-select-container" };
3371
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
3371
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
3372
3372
  ...{
3373
3373
  name: "MEditorCodeSelectCol"
3374
3374
  },
@@ -3450,14 +3450,14 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
3450
3450
  size: _ctx.size,
3451
3451
  onChange: onParamsChangeHandler
3452
3452
  }, null, 8, ["model", "size"]),
3453
- _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$N, {
3453
+ _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$O, {
3454
3454
  key: 0,
3455
3455
  class: "icon",
3456
3456
  icon: !_ctx.disabled ? unref(Edit) : unref(View),
3457
3457
  onClick: _cache[0] || (_cache[0] = ($event) => unref(editCode)(_ctx.model[_ctx.name]))
3458
3458
  }, null, 8, ["icon"])) : createCommentVNode("", true)
3459
3459
  ]),
3460
- paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$O, {
3460
+ paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$P, {
3461
3461
  key: 0,
3462
3462
  name: "params",
3463
3463
  model: _ctx.model,
@@ -3465,7 +3465,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
3465
3465
  "params-config": paramsConfig.value,
3466
3466
  onChange: onParamsChangeHandler
3467
3467
  }, null, 8, ["model", "size", "params-config"])) : createCommentVNode("", true),
3468
- unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$P, {
3468
+ unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$Q, {
3469
3469
  key: 1,
3470
3470
  ref_key: "codeBlockEditor",
3471
3471
  ref: codeBlockEditor,
@@ -3480,7 +3480,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
3480
3480
 
3481
3481
  const _hoisted_1$p = { class: "m-editor-data-source-fields" };
3482
3482
  const _hoisted_2$i = { class: "m-editor-data-source-fields-footer" };
3483
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
3483
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
3484
3484
  ...{
3485
3485
  name: "MEditorDataSourceFields"
3486
3486
  },
@@ -3772,7 +3772,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
3772
3772
  }
3773
3773
  });
3774
3774
 
3775
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
3775
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
3776
3776
  __name: "DataSourceFieldSelect",
3777
3777
  props: {
3778
3778
  config: {},
@@ -3830,7 +3830,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
3830
3830
  const _hoisted_1$o = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
3831
3831
  const _hoisted_2$h = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
3832
3832
  const _hoisted_3$7 = { class: "el-input__inner" };
3833
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
3833
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
3834
3834
  ...{
3835
3835
  name: "MEditorDataSourceInput"
3836
3836
  },
@@ -4020,7 +4020,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
4020
4020
  }
4021
4021
  ), {
4022
4022
  suffix: withCtx(() => [
4023
- createVNode(_sfc_main$N, { icon: unref(Coin) }, null, 8, ["icon"])
4023
+ createVNode(_sfc_main$O, { icon: unref(Coin) }, null, 8, ["icon"])
4024
4024
  ]),
4025
4025
  default: withCtx(({ item }) => [
4026
4026
  createElementVNode("div", _hoisted_1$o, [
@@ -4055,7 +4055,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
4055
4055
  }, 1032, ["size"])) : createCommentVNode("", true)
4056
4056
  ], 64);
4057
4057
  }), 256)),
4058
- createVNode(_sfc_main$N, {
4058
+ createVNode(_sfc_main$O, {
4059
4059
  class: "tmagic-data-source-input-icon",
4060
4060
  icon: unref(Coin)
4061
4061
  }, null, 8, ["icon"])
@@ -4140,7 +4140,7 @@ const useDataSourceMethod = () => {
4140
4140
 
4141
4141
  const _hoisted_1$n = { class: "m-editor-data-source-methods" };
4142
4142
  const _hoisted_2$g = { class: "m-editor-data-source-methods-footer" };
4143
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
4143
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
4144
4144
  ...{
4145
4145
  name: "MEditorDataSourceMethods"
4146
4146
  },
@@ -4229,7 +4229,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
4229
4229
  _: 1
4230
4230
  }, 8, ["disabled"])
4231
4231
  ]),
4232
- unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$P, {
4232
+ unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$Q, {
4233
4233
  key: 0,
4234
4234
  ref_key: "codeBlockEditor",
4235
4235
  ref: codeBlockEditor,
@@ -4246,7 +4246,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
4246
4246
 
4247
4247
  const _hoisted_1$m = { class: "m-fields-data-source-method-select" };
4248
4248
  const _hoisted_2$f = { class: "data-source-method-select-container" };
4249
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
4249
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
4250
4250
  ...{
4251
4251
  name: "MEditorDataSourceMethodSelect"
4252
4252
  },
@@ -4337,14 +4337,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
4337
4337
  model: _ctx.model,
4338
4338
  onChange: onChangeHandler
4339
4339
  }, null, 8, ["config", "model"]),
4340
- _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$N, {
4340
+ _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$O, {
4341
4341
  key: 0,
4342
4342
  class: "icon",
4343
4343
  icon: !_ctx.disabled ? unref(Edit) : unref(View),
4344
4344
  onClick: editCodeHandler
4345
4345
  }, null, 8, ["icon"])) : createCommentVNode("", true)
4346
4346
  ]),
4347
- paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$O, {
4347
+ paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$P, {
4348
4348
  key: 0,
4349
4349
  name: "params",
4350
4350
  model: _ctx.model,
@@ -4353,7 +4353,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
4353
4353
  "params-config": paramsConfig.value,
4354
4354
  onChange: onChangeHandler
4355
4355
  }, null, 8, ["model", "size", "disabled", "params-config"])) : createCommentVNode("", true),
4356
- unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$P, {
4356
+ unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$Q, {
4357
4357
  key: 1,
4358
4358
  ref_key: "codeBlockEditor",
4359
4359
  ref: codeBlockEditor,
@@ -4368,7 +4368,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
4368
4368
 
4369
4369
  const _hoisted_1$l = { class: "m-editor-data-source-fields" };
4370
4370
  const _hoisted_2$e = { class: "m-editor-data-source-fields-footer" };
4371
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
4371
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
4372
4372
  ...{
4373
4373
  name: "MEditorDataSourceMocks"
4374
4374
  },
@@ -4455,7 +4455,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4455
4455
  const columns = [
4456
4456
  {
4457
4457
  type: "expand",
4458
- component: _sfc_main$T,
4458
+ component: _sfc_main$U,
4459
4459
  props: (row) => ({
4460
4460
  initValues: row.data,
4461
4461
  language: "json",
@@ -4600,7 +4600,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4600
4600
  }
4601
4601
  });
4602
4602
 
4603
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
4603
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
4604
4604
  ...{
4605
4605
  name: "MEditorDataSourceSelect"
4606
4606
  },
@@ -4662,7 +4662,7 @@ const _hoisted_2$d = {
4662
4662
  key: 1,
4663
4663
  class: "fullWidth"
4664
4664
  };
4665
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
4665
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
4666
4666
  ...{
4667
4667
  name: "MEditorEventSelect"
4668
4668
  },
@@ -4935,7 +4935,7 @@ const _hoisted_2$c = /* @__PURE__ */ createStaticVNode('<defs><rect id="path-1"
4935
4935
  const _hoisted_4$6 = [
4936
4936
  _hoisted_2$c
4937
4937
  ];
4938
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
4938
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
4939
4939
  ...{
4940
4940
  name: "MEditorCodeIcon"
4941
4941
  },
@@ -4950,7 +4950,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
4950
4950
  const _hoisted_1$i = { class: "m-fields-key-value" };
4951
4951
  const _hoisted_2$b = { key: 0 };
4952
4952
  const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
4953
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
4953
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
4954
4954
  ...{
4955
4955
  name: "MEditorKeyValue"
4956
4956
  },
@@ -5058,7 +5058,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5058
5058
  _: 1
5059
5059
  }, 8, ["size", "disabled", "icon"])
5060
5060
  ])) : createCommentVNode("", true),
5061
- _ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$T, {
5061
+ _ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$U, {
5062
5062
  key: 1,
5063
5063
  height: "200px",
5064
5064
  "init-values": _ctx.model[_ctx.name],
@@ -5074,7 +5074,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5074
5074
  size: "default",
5075
5075
  disabled: _ctx.disabled,
5076
5076
  link: "",
5077
- icon: _sfc_main$D,
5077
+ icon: _sfc_main$E,
5078
5078
  onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
5079
5079
  }, null, 8, ["disabled"])) : createCommentVNode("", true)
5080
5080
  ]);
@@ -5084,7 +5084,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5084
5084
 
5085
5085
  const _hoisted_1$h = { class: "m-fields-page-fragment-select" };
5086
5086
  const _hoisted_2$a = { class: "page-fragment-select-container" };
5087
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
5087
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5088
5088
  ...{
5089
5089
  name: "MEditorPageFragmentSelect"
5090
5090
  },
@@ -5139,7 +5139,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5139
5139
  size: _ctx.size,
5140
5140
  onChange: changeHandler
5141
5141
  }, null, 8, ["model", "size"]),
5142
- _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$N, {
5142
+ _ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$O, {
5143
5143
  key: 0,
5144
5144
  class: "icon",
5145
5145
  icon: unref(Edit),
@@ -5156,7 +5156,7 @@ const _hoisted_1$g = {
5156
5156
  class: "m-fields-ui-select",
5157
5157
  style: { "display": "flex" }
5158
5158
  };
5159
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
5159
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5160
5160
  ...{
5161
5161
  name: "MEditorUISelect"
5162
5162
  },
@@ -5341,7 +5341,7 @@ const useGetSo = (target, emit) => {
5341
5341
  };
5342
5342
  };
5343
5343
 
5344
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
5344
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5345
5345
  ...{
5346
5346
  name: "MEditorResizer"
5347
5347
  },
@@ -5363,7 +5363,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5363
5363
  }
5364
5364
  });
5365
5365
 
5366
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
5366
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5367
5367
  ...{
5368
5368
  name: "MEditorLayout"
5369
5369
  },
@@ -5490,7 +5490,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5490
5490
  }, [
5491
5491
  renderSlot(_ctx.$slots, "left")
5492
5492
  ], 6),
5493
- createVNode(_sfc_main$z, { onChange: changeLeft })
5493
+ createVNode(_sfc_main$A, { onChange: changeLeft })
5494
5494
  ], 64)) : createCommentVNode("", true),
5495
5495
  createElementVNode("div", {
5496
5496
  class: normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
@@ -5499,7 +5499,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5499
5499
  renderSlot(_ctx.$slots, "center")
5500
5500
  ], 6),
5501
5501
  hasRight.value && _ctx.$slots.right ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
5502
- createVNode(_sfc_main$z, { onChange: changeRight }),
5502
+ createVNode(_sfc_main$A, { onChange: changeRight }),
5503
5503
  createElementVNode("div", {
5504
5504
  class: normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
5505
5505
  style: normalizeStyle(`width: ${_ctx.right}px`)
@@ -5517,7 +5517,7 @@ const _hoisted_1$f = {
5517
5517
  class: "menu-item-text"
5518
5518
  };
5519
5519
  const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
5520
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
5520
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5521
5521
  ...{
5522
5522
  name: "MEditorToolButton"
5523
5523
  },
@@ -5610,7 +5610,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
5610
5610
  disabled: disabled.value
5611
5611
  }, {
5612
5612
  default: withCtx(() => [
5613
- _ctx.data.icon ? (openBlock(), createBlock(_sfc_main$N, {
5613
+ _ctx.data.icon ? (openBlock(), createBlock(_sfc_main$O, {
5614
5614
  key: 0,
5615
5615
  icon: _ctx.data.icon
5616
5616
  }, null, 8, ["icon"])) : createCommentVNode("", true),
@@ -5628,7 +5628,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
5628
5628
  title: _ctx.data.text
5629
5629
  }, {
5630
5630
  default: withCtx(() => [
5631
- _ctx.data.icon ? (openBlock(), createBlock(_sfc_main$N, {
5631
+ _ctx.data.icon ? (openBlock(), createBlock(_sfc_main$O, {
5632
5632
  key: 0,
5633
5633
  icon: _ctx.data.icon
5634
5634
  }, null, 8, ["icon"])) : createCommentVNode("", true),
@@ -5682,7 +5682,7 @@ const _hoisted_1$e = {
5682
5682
  key: 1,
5683
5683
  style: { "width": "21px" }
5684
5684
  };
5685
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
5685
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
5686
5686
  ...{
5687
5687
  name: "MEditorPageBarAddButton"
5688
5688
  },
@@ -5716,13 +5716,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
5716
5716
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5717
5717
  onClick: addPage
5718
5718
  }, [
5719
- createVNode(_sfc_main$N, { icon: unref(Plus) }, null, 8, ["icon"])
5719
+ createVNode(_sfc_main$O, { icon: unref(Plus) }, null, 8, ["icon"])
5720
5720
  ])) : (openBlock(), createElementBlock("div", _hoisted_1$e));
5721
5721
  };
5722
5722
  }
5723
5723
  });
5724
5724
 
5725
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
5725
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
5726
5726
  ...{
5727
5727
  name: "MEditorPageBarScrollContainer"
5728
5728
  },
@@ -5828,7 +5828,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5828
5828
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5829
5829
  onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
5830
5830
  }, [
5831
- createVNode(_sfc_main$N, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
5831
+ createVNode(_sfc_main$O, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
5832
5832
  ])) : createCommentVNode("", true),
5833
5833
  _ctx.type === unref(NodeType).PAGE && pageLength.value || _ctx.type === unref(NodeType).PAGE_FRAGMENT && pageFragmentLength.value ? (openBlock(), createElementBlock("div", {
5834
5834
  key: 1,
@@ -5844,14 +5844,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5844
5844
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5845
5845
  onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
5846
5846
  }, [
5847
- createVNode(_sfc_main$N, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
5847
+ createVNode(_sfc_main$O, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
5848
5848
  ])) : createCommentVNode("", true)
5849
5849
  ], 512);
5850
5850
  };
5851
5851
  }
5852
5852
  });
5853
5853
 
5854
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
5854
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5855
5855
  ...{
5856
5856
  name: "MEditorPageBarSwitchTypeButton"
5857
5857
  },
@@ -5899,7 +5899,7 @@ const _hoisted_1$d = { class: "m-editor-page-bar-tabs" };
5899
5899
  const _hoisted_2$8 = ["onClick"];
5900
5900
  const _hoisted_3$5 = { class: "m-editor-page-bar-title" };
5901
5901
  const _hoisted_4$5 = ["title"];
5902
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
5902
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
5903
5903
  ...{
5904
5904
  name: "MEditorPageBar"
5905
5905
  },
@@ -5978,14 +5978,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
5978
5978
  };
5979
5979
  return (_ctx, _cache) => {
5980
5980
  return openBlock(), createElementBlock("div", _hoisted_1$d, [
5981
- !_ctx.disabledPageFragment ? (openBlock(), createBlock(_sfc_main$u, {
5981
+ !_ctx.disabledPageFragment ? (openBlock(), createBlock(_sfc_main$v, {
5982
5982
  key: 0,
5983
5983
  modelValue: active.value,
5984
5984
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => active.value = $event)
5985
5985
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
5986
- createVNode(_sfc_main$v, { type: active.value }, {
5986
+ createVNode(_sfc_main$w, { type: active.value }, {
5987
5987
  prepend: withCtx(() => [
5988
- createVNode(_sfc_main$w, { type: active.value }, null, 8, ["type"])
5988
+ createVNode(_sfc_main$x, { type: active.value }, null, 8, ["type"])
5989
5989
  ]),
5990
5990
  default: withCtx(() => [
5991
5991
  (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item) => {
@@ -6018,7 +6018,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6018
6018
  default: withCtx(() => [
6019
6019
  createElementVNode("div", null, [
6020
6020
  renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
6021
- createVNode(_sfc_main$x, {
6021
+ createVNode(_sfc_main$y, {
6022
6022
  data: {
6023
6023
  type: "button",
6024
6024
  text: "复制",
@@ -6026,7 +6026,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6026
6026
  handler: () => copy(item)
6027
6027
  }
6028
6028
  }, null, 8, ["data"]),
6029
- createVNode(_sfc_main$x, {
6029
+ createVNode(_sfc_main$y, {
6030
6030
  data: {
6031
6031
  type: "button",
6032
6032
  text: "删除",
@@ -6053,7 +6053,7 @@ const _hoisted_1$c = { class: "m-editor-empty-panel" };
6053
6053
  const _hoisted_2$7 = { class: "m-editor-empty-content" };
6054
6054
  const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("p", null, "新增页面", -1);
6055
6055
  const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("p", null, "新增页面片", -1);
6056
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
6056
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6057
6057
  ...{
6058
6058
  name: "MEditorAddPageBox"
6059
6059
  },
@@ -6084,7 +6084,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6084
6084
  onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(unref(NodeType).PAGE))
6085
6085
  }, [
6086
6086
  createElementVNode("div", null, [
6087
- createVNode(_sfc_main$N, { icon: unref(Plus) }, null, 8, ["icon"])
6087
+ createVNode(_sfc_main$O, { icon: unref(Plus) }, null, 8, ["icon"])
6088
6088
  ]),
6089
6089
  _hoisted_3$4
6090
6090
  ]),
@@ -6094,7 +6094,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6094
6094
  onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(unref(NodeType).PAGE_FRAGMENT))
6095
6095
  }, [
6096
6096
  createElementVNode("div", null, [
6097
- createVNode(_sfc_main$N, { icon: unref(Plus) }, null, 8, ["icon"])
6097
+ createVNode(_sfc_main$O, { icon: unref(Plus) }, null, 8, ["icon"])
6098
6098
  ]),
6099
6099
  _hoisted_4$4
6100
6100
  ])) : createCommentVNode("", true)
@@ -6108,7 +6108,7 @@ const DEFAULT_LEFT_COLUMN_WIDTH = 310;
6108
6108
  const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
6109
6109
  const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
6110
6110
  const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
6111
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
6111
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6112
6112
  ...{
6113
6113
  name: "MEditorFramework"
6114
6114
  },
@@ -6189,13 +6189,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
6189
6189
  renderSlot(_ctx.$slots, "nav"),
6190
6190
  renderSlot(_ctx.$slots, "content-before"),
6191
6191
  showSrc.value ? renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
6192
- createVNode(_sfc_main$T, {
6192
+ createVNode(_sfc_main$U, {
6193
6193
  class: "m-editor-content",
6194
6194
  "init-values": root.value,
6195
6195
  options: unref(codeOptions),
6196
6196
  onSave: saveCode
6197
6197
  }, null, 8, ["init-values", "options"])
6198
- ]) : withDirectives((openBlock(), createBlock(_sfc_main$y, {
6198
+ ]) : withDirectives((openBlock(), createBlock(_sfc_main$z, {
6199
6199
  key: 1,
6200
6200
  "element-loading-text": "Runtime 加载中...",
6201
6201
  ref_key: "splitView",
@@ -6218,10 +6218,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
6218
6218
  ]),
6219
6219
  center: withCtx(() => [
6220
6220
  page.value ? renderSlot(_ctx.$slots, "workspace", { key: 0 }) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
6221
- createVNode(_sfc_main$s, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
6221
+ createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
6222
6222
  ]),
6223
6223
  renderSlot(_ctx.$slots, "page-bar", {}, () => [
6224
- createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
6224
+ createVNode(_sfc_main$u, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
6225
6225
  "page-bar-title": withCtx(({ page: page2 }) => [
6226
6226
  renderSlot(_ctx.$slots, "page-bar-title", { page: page2 })
6227
6227
  ]),
@@ -6256,7 +6256,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
6256
6256
  }
6257
6257
  });
6258
6258
 
6259
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
6259
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
6260
6260
  ...{
6261
6261
  name: "MEditorNavMenu"
6262
6262
  },
@@ -6418,7 +6418,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
6418
6418
  style: normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
6419
6419
  }, [
6420
6420
  (openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value[key], (item, index) => {
6421
- return openBlock(), createBlock(_sfc_main$x, {
6421
+ return openBlock(), createBlock(_sfc_main$y, {
6422
6422
  data: item,
6423
6423
  key: index
6424
6424
  }, null, 8, ["data"]);
@@ -6431,7 +6431,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
6431
6431
  });
6432
6432
 
6433
6433
  const _hoisted_1$b = { class: "m-editor-props-panel" };
6434
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
6434
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
6435
6435
  ...{
6436
6436
  name: "MEditorPropsPanel"
6437
6437
  },
@@ -6638,7 +6638,7 @@ const useFloatBox = (slideKeys) => {
6638
6638
  };
6639
6639
  };
6640
6640
 
6641
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
6641
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
6642
6642
  ...{
6643
6643
  name: "MEditorSearchInput"
6644
6644
  },
@@ -6696,7 +6696,7 @@ const _hoisted_4$3 = {
6696
6696
  key: 0,
6697
6697
  class: "m-editor-tree-node-children"
6698
6698
  };
6699
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
6699
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
6700
6700
  ...{
6701
6701
  name: "MEditorTreeNode"
6702
6702
  },
@@ -6763,7 +6763,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
6763
6763
  onContextmenu: nodeContentmenuHandler,
6764
6764
  onMouseenter: mouseenterHandler
6765
6765
  }, [
6766
- createVNode(_sfc_main$N, {
6766
+ createVNode(_sfc_main$O, {
6767
6767
  class: "expand-icon",
6768
6768
  style: normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
6769
6769
  icon: expanded.value ? unref(ArrowDown) : unref(ArrowRight),
@@ -6817,7 +6817,7 @@ const _hoisted_1$9 = {
6817
6817
  key: 1,
6818
6818
  class: "m-editor-tree-empty"
6819
6819
  };
6820
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
6820
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
6821
6821
  ...{
6822
6822
  name: "MEditorTree"
6823
6823
  },
@@ -6841,7 +6841,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6841
6841
  onDragover: handleDragOver
6842
6842
  }, [
6843
6843
  _ctx.data?.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.data, (item) => {
6844
- return openBlock(), createBlock(_sfc_main$n, {
6844
+ return openBlock(), createBlock(_sfc_main$o, {
6845
6845
  key: item.id,
6846
6846
  data: item,
6847
6847
  indent: _ctx.indent,
@@ -6904,13 +6904,13 @@ const useFilter = (nodeData, nodeStatusMap, filterNodeMethod) => {
6904
6904
  };
6905
6905
  };
6906
6906
 
6907
- const createPageNodeStatus$1 = (nodeData, initalLayerNodeStatus) => {
6907
+ const createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
6908
6908
  const map = /* @__PURE__ */ new Map();
6909
6909
  nodeData.forEach(
6910
6910
  (node) => traverseNode(node, (node2) => {
6911
6911
  map.set(
6912
6912
  node2.id,
6913
- initalLayerNodeStatus?.get(node2.id) || {
6913
+ initialLayerNodeStatus?.get(node2.id) || {
6914
6914
  visible: true,
6915
6915
  expand: false,
6916
6916
  selected: false,
@@ -6938,7 +6938,7 @@ const useNodeStatus$1 = (nodeData) => {
6938
6938
  };
6939
6939
  };
6940
6940
 
6941
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
6941
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6942
6942
  ...{
6943
6943
  name: "MEditorCodeBlockList"
6944
6944
  },
@@ -7020,7 +7020,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
7020
7020
  filter: filterTextChangeHandler
7021
7021
  });
7022
7022
  return (_ctx, _cache) => {
7023
- return openBlock(), createBlock(_sfc_main$m, {
7023
+ return openBlock(), createBlock(_sfc_main$n, {
7024
7024
  data: codeList.value,
7025
7025
  "node-status-map": unref(nodeStatusMap),
7026
7026
  onNodeClick: clickHandler
@@ -7042,7 +7042,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
7042
7042
  placement: "bottom"
7043
7043
  }, {
7044
7044
  default: withCtx(() => [
7045
- createVNode(_sfc_main$N, {
7045
+ createVNode(_sfc_main$O, {
7046
7046
  icon: editable.value ? unref(Edit) : unref(View),
7047
7047
  class: "edit-icon",
7048
7048
  onClick: withModifiers(($event) => editCode(`${data.key}`), ["stop"])
@@ -7057,7 +7057,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
7057
7057
  placement: "bottom"
7058
7058
  }, {
7059
7059
  default: withCtx(() => [
7060
- createVNode(_sfc_main$N, {
7060
+ createVNode(_sfc_main$O, {
7061
7061
  icon: unref(Close),
7062
7062
  class: "edit-icon",
7063
7063
  onClick: withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
@@ -7077,7 +7077,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
7077
7077
  });
7078
7078
 
7079
7079
  const _hoisted_1$8 = { class: "search-wrapper" };
7080
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
7080
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
7081
7081
  ...{
7082
7082
  name: "MEditorCodeBlockListPanel"
7083
7083
  },
@@ -7100,7 +7100,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
7100
7100
  default: withCtx(() => [
7101
7101
  renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
7102
7102
  createElementVNode("div", _hoisted_1$8, [
7103
- createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
7103
+ createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
7104
7104
  editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
7105
7105
  key: 0,
7106
7106
  class: "create-code-button",
@@ -7116,7 +7116,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
7116
7116
  renderSlot(_ctx.$slots, "code-block-panel-search")
7117
7117
  ])
7118
7118
  ]),
7119
- createVNode(_sfc_main$l, {
7119
+ createVNode(_sfc_main$m, {
7120
7120
  ref_key: "codeBlockList",
7121
7121
  ref: codeBlockList,
7122
7122
  "custom-error": _ctx.customError,
@@ -7134,7 +7134,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
7134
7134
  ]),
7135
7135
  _: 3
7136
7136
  }),
7137
- unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$P, {
7137
+ unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$Q, {
7138
7138
  key: 0,
7139
7139
  ref_key: "codeBlockEditor",
7140
7140
  ref: codeBlockEditor,
@@ -7148,7 +7148,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
7148
7148
  }
7149
7149
  });
7150
7150
 
7151
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
7151
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
7152
7152
  ...{
7153
7153
  name: "MEditorDataSourceConfigPanel"
7154
7154
  },
@@ -7204,7 +7204,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
7204
7204
  }
7205
7205
  });
7206
7206
 
7207
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
7207
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
7208
7208
  ...{
7209
7209
  name: "MEditorDataSourceList"
7210
7210
  },
@@ -7293,7 +7293,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7293
7293
  filter: filterTextChangeHandler
7294
7294
  });
7295
7295
  return (_ctx, _cache) => {
7296
- return openBlock(), createBlock(_sfc_main$m, {
7296
+ return openBlock(), createBlock(_sfc_main$n, {
7297
7297
  data: list.value,
7298
7298
  "node-status-map": unref(nodeStatusMap),
7299
7299
  onNodeClick: clickHandler
@@ -7315,7 +7315,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7315
7315
  placement: "bottom"
7316
7316
  }, {
7317
7317
  default: withCtx(() => [
7318
- createVNode(_sfc_main$N, {
7318
+ createVNode(_sfc_main$O, {
7319
7319
  icon: editable.value ? unref(Edit) : unref(View),
7320
7320
  class: "edit-icon",
7321
7321
  onClick: withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
@@ -7330,7 +7330,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7330
7330
  placement: "bottom"
7331
7331
  }, {
7332
7332
  default: withCtx(() => [
7333
- createVNode(_sfc_main$N, {
7333
+ createVNode(_sfc_main$O, {
7334
7334
  icon: unref(Close),
7335
7335
  class: "edit-icon",
7336
7336
  onClick: withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
@@ -7348,7 +7348,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7348
7348
 
7349
7349
  const _hoisted_1$7 = { class: "search-wrapper" };
7350
7350
  const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
7351
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
7351
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7352
7352
  ...{
7353
7353
  name: "MEditorDataSourceListPanel"
7354
7354
  },
@@ -7413,7 +7413,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7413
7413
  createVNode(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
7414
7414
  default: withCtx(() => [
7415
7415
  createElementVNode("div", _hoisted_1$7, [
7416
- createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
7416
+ createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
7417
7417
  editable.value ? (openBlock(), createBlock(unref(TMagicPopover), {
7418
7418
  key: 0,
7419
7419
  placement: "right"
@@ -7432,7 +7432,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7432
7432
  default: withCtx(() => [
7433
7433
  createElementVNode("div", _hoisted_2$5, [
7434
7434
  (openBlock(true), createElementBlock(Fragment, null, renderList(datasourceTypeList.value, (item, index) => {
7435
- return openBlock(), createBlock(_sfc_main$x, {
7435
+ return openBlock(), createBlock(_sfc_main$y, {
7436
7436
  data: {
7437
7437
  type: "button",
7438
7438
  text: item.text,
@@ -7448,14 +7448,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7448
7448
  _: 1
7449
7449
  })) : createCommentVNode("", true)
7450
7450
  ]),
7451
- createVNode(_sfc_main$i, {
7451
+ createVNode(_sfc_main$j, {
7452
7452
  onEdit: editHandler,
7453
7453
  onRemove: removeHandler
7454
7454
  })
7455
7455
  ]),
7456
7456
  _: 1
7457
7457
  }),
7458
- createVNode(_sfc_main$j, {
7458
+ createVNode(_sfc_main$k, {
7459
7459
  ref_key: "editDialog",
7460
7460
  ref: editDialog,
7461
7461
  disabled: !editable.value,
@@ -7469,7 +7469,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7469
7469
  }
7470
7470
  });
7471
7471
 
7472
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
7472
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7473
7473
  ...{
7474
7474
  name: "MEditorContentMenu"
7475
7475
  },
@@ -7600,7 +7600,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
7600
7600
  renderSlot(_ctx.$slots, "title"),
7601
7601
  createElementVNode("div", null, [
7602
7602
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuData, (item, index) => {
7603
- return openBlock(), createBlock(_sfc_main$x, {
7603
+ return openBlock(), createBlock(_sfc_main$y, {
7604
7604
  "event-type": "mouseup",
7605
7605
  ref_for: true,
7606
7606
  ref_key: "buttons",
@@ -7655,7 +7655,7 @@ const _hoisted_4$2 = [
7655
7655
  _hoisted_2$4,
7656
7656
  _hoisted_3$2
7657
7657
  ];
7658
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
7658
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
7659
7659
  ...{
7660
7660
  name: "MEditorFolderMinusIcon"
7661
7661
  },
@@ -7740,7 +7740,7 @@ const useMoveToMenu = (services) => {
7740
7740
  };
7741
7741
  };
7742
7742
 
7743
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
7743
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
7744
7744
  ...{
7745
7745
  name: "MEditorLayerMenu"
7746
7746
  },
@@ -7807,7 +7807,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
7807
7807
  {
7808
7808
  type: "button",
7809
7809
  text: "全部折叠",
7810
- icon: _sfc_main$f,
7810
+ icon: _sfc_main$g,
7811
7811
  display: () => isPage(node.value) || isPageFragment(node.value),
7812
7812
  handler: () => {
7813
7813
  emit("collapse-all");
@@ -7836,7 +7836,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
7836
7836
  show
7837
7837
  });
7838
7838
  return (_ctx, _cache) => {
7839
- return openBlock(), createBlock(_sfc_main$g, {
7839
+ return openBlock(), createBlock(_sfc_main$h, {
7840
7840
  "menu-data": menuData.value,
7841
7841
  ref_key: "menu",
7842
7842
  ref: menu,
@@ -7846,7 +7846,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
7846
7846
  }
7847
7847
  });
7848
7848
 
7849
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
7849
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
7850
7850
  __name: "LayerNodeTool",
7851
7851
  props: {
7852
7852
  data: {}
@@ -7865,12 +7865,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
7865
7865
  };
7866
7866
  return (_ctx, _cache) => {
7867
7867
  return _ctx.data.type !== "page" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
7868
- _ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$N, {
7868
+ _ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$O, {
7869
7869
  key: 0,
7870
7870
  icon: unref(Hide),
7871
7871
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => setNodeVisible(true), ["stop"])),
7872
7872
  title: "点击显示"
7873
- }, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$N, {
7873
+ }, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$O, {
7874
7874
  key: 1,
7875
7875
  icon: unref(View),
7876
7876
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => setNodeVisible(false), ["stop"])),
@@ -8322,7 +8322,7 @@ const useNodeStatus = (services) => {
8322
8322
  };
8323
8323
  };
8324
8324
 
8325
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
8325
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
8326
8326
  ...{
8327
8327
  name: "MEditorLayerPanel"
8328
8328
  },
@@ -8371,8 +8371,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
8371
8371
  return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-layer-panel" }, {
8372
8372
  default: withCtx(() => [
8373
8373
  renderSlot(_ctx.$slots, "layer-panel-header"),
8374
- createVNode(_sfc_main$o, { onSearch: unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
8375
- page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$m, {
8374
+ createVNode(_sfc_main$p, { onSearch: unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
8375
+ page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$n, {
8376
8376
  key: 0,
8377
8377
  tabindex: "-1",
8378
8378
  ref_key: "tree",
@@ -8392,7 +8392,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
8392
8392
  ]),
8393
8393
  "tree-node-tool": withCtx(({ data: nodeData2 }) => [
8394
8394
  renderSlot(_ctx.$slots, "layer-node-tool", { data: nodeData2 }, () => [
8395
- createVNode(_sfc_main$d, { data: nodeData2 }, null, 8, ["data"])
8395
+ createVNode(_sfc_main$e, { data: nodeData2 }, null, 8, ["data"])
8396
8396
  ])
8397
8397
  ]),
8398
8398
  "tree-node-label": withCtx(({ data: nodeData2 }) => [
@@ -8401,7 +8401,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
8401
8401
  _: 3
8402
8402
  }, 8, ["data", "node-status-map", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : createCommentVNode("", true),
8403
8403
  (openBlock(), createBlock(Teleport, { to: "body" }, [
8404
- createVNode(_sfc_main$e, {
8404
+ createVNode(_sfc_main$f, {
8405
8405
  ref_key: "menu",
8406
8406
  ref: menu,
8407
8407
  "layer-content-menu": _ctx.layerContentMenu,
@@ -8418,7 +8418,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
8418
8418
 
8419
8419
  const _hoisted_1$5 = ["onClick", "onDragstart"];
8420
8420
  const _hoisted_2$3 = ["title"];
8421
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
8421
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
8422
8422
  ...{
8423
8423
  name: "MEditorComponentListPanel"
8424
8424
  },
@@ -8498,7 +8498,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
8498
8498
  "model-value": collapseValue.value
8499
8499
  }, {
8500
8500
  default: withCtx(() => [
8501
- createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
8501
+ createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
8502
8502
  (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (group, index) => {
8503
8503
  return openBlock(), createElementBlock(Fragment, null, [
8504
8504
  group.items && group.items.length ? (openBlock(), createBlock(unref(TMagicCollapseItem), {
@@ -8506,7 +8506,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
8506
8506
  name: `${index}`
8507
8507
  }, {
8508
8508
  title: withCtx(() => [
8509
- createVNode(_sfc_main$N, { icon: unref(Grid) }, null, 8, ["icon"]),
8509
+ createVNode(_sfc_main$O, { icon: unref(Grid) }, null, 8, ["icon"]),
8510
8510
  createTextVNode(toDisplayString(group.title), 1)
8511
8511
  ]),
8512
8512
  default: withCtx(() => [
@@ -8527,7 +8527,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
8527
8527
  content: item.desc
8528
8528
  }, {
8529
8529
  default: withCtx(() => [
8530
- createVNode(_sfc_main$N, {
8530
+ createVNode(_sfc_main$O, {
8531
8531
  icon: item.icon
8532
8532
  }, null, 8, ["icon"])
8533
8533
  ]),
@@ -8567,7 +8567,7 @@ const _hoisted_4$1 = {
8567
8567
  const _hoisted_5$1 = { class: "m-editor-float-box-list" };
8568
8568
  const _hoisted_6 = ["onClick"];
8569
8569
  const _hoisted_7 = { class: "m-editor-float-box-body" };
8570
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
8570
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
8571
8571
  ...{
8572
8572
  name: "MEditorSidebar"
8573
8573
  },
@@ -8588,7 +8588,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8588
8588
  type: "component",
8589
8589
  icon: Goods,
8590
8590
  text: "组件",
8591
- component: _sfc_main$b,
8591
+ component: _sfc_main$c,
8592
8592
  slots: {}
8593
8593
  },
8594
8594
  layer: {
@@ -8600,7 +8600,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8600
8600
  layerContentMenu: props.layerContentMenu,
8601
8601
  customContentMenu: props.customContentMenu
8602
8602
  },
8603
- component: _sfc_main$c,
8603
+ component: _sfc_main$d,
8604
8604
  slots: {}
8605
8605
  },
8606
8606
  "code-block": {
@@ -8608,7 +8608,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8608
8608
  type: "component",
8609
8609
  icon: EditPen,
8610
8610
  text: "代码编辑",
8611
- component: _sfc_main$k,
8611
+ component: _sfc_main$l,
8612
8612
  slots: {},
8613
8613
  boxComponentConfig: {
8614
8614
  props: {
@@ -8621,7 +8621,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8621
8621
  type: "component",
8622
8622
  icon: Coin,
8623
8623
  text: "数据源",
8624
- component: _sfc_main$h,
8624
+ component: _sfc_main$i,
8625
8625
  slots: {},
8626
8626
  boxComponentConfig: {
8627
8627
  props: {
@@ -8676,7 +8676,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8676
8676
  (...args) => unref(dragstartHandler) && unref(dragstartHandler)(...args)),
8677
8677
  onDragend: ($event) => unref(dragendHandler)(config.$key, $event)
8678
8678
  }, [
8679
- config.icon ? (openBlock(), createBlock(_sfc_main$N, {
8679
+ config.icon ? (openBlock(), createBlock(_sfc_main$O, {
8680
8680
  key: 0,
8681
8681
  icon: config.icon
8682
8682
  }, null, 8, ["icon"])) : createCommentVNode("", true),
@@ -8812,7 +8812,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8812
8812
  onClick: ($event) => unref(showFloatBox)(config.$key)
8813
8813
  }, [
8814
8814
  createElementVNode("div", null, toDisplayString(config.text), 1),
8815
- createVNode(_sfc_main$N, {
8815
+ createVNode(_sfc_main$O, {
8816
8816
  class: "m-editor-float-box-close",
8817
8817
  icon: unref(Close),
8818
8818
  onClick: withModifiers(($event) => unref(closeFloatBox)(config.$key), ["stop"])
@@ -8960,7 +8960,7 @@ class ScrollViewer extends EventEmitter {
8960
8960
  };
8961
8961
  }
8962
8962
 
8963
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8963
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8964
8964
  ...{
8965
8965
  name: "MEditorScrollBar"
8966
8966
  },
@@ -9048,7 +9048,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9048
9048
  }
9049
9049
  });
9050
9050
 
9051
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9051
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9052
9052
  ...{
9053
9053
  name: "MEditorScrollViewer"
9054
9054
  },
@@ -9134,14 +9134,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9134
9134
  }, [
9135
9135
  renderSlot(_ctx.$slots, "default")
9136
9136
  ], 4),
9137
- scrollHeight.value > _ctx.wrapHeight ? (openBlock(), createBlock(_sfc_main$9, {
9137
+ renderSlot(_ctx.$slots, "content"),
9138
+ scrollHeight.value > _ctx.wrapHeight ? (openBlock(), createBlock(_sfc_main$a, {
9138
9139
  key: 0,
9139
9140
  "scroll-size": scrollHeight.value,
9140
- size: _ctx.wrapHeight,
9141
9141
  pos: vOffset.value,
9142
+ size: _ctx.wrapHeight,
9142
9143
  onScroll: vScrollHandler
9143
- }, null, 8, ["scroll-size", "size", "pos"])) : createCommentVNode("", true),
9144
- scrollWidth.value > _ctx.wrapWidth ? (openBlock(), createBlock(_sfc_main$9, {
9144
+ }, null, 8, ["scroll-size", "pos", "size"])) : createCommentVNode("", true),
9145
+ scrollWidth.value > _ctx.wrapWidth ? (openBlock(), createBlock(_sfc_main$a, {
9145
9146
  key: 1,
9146
9147
  "is-horizontal": true,
9147
9148
  "scroll-size": scrollWidth.value,
@@ -9356,7 +9357,7 @@ const useStage = (stageOptions) => {
9356
9357
  };
9357
9358
 
9358
9359
  const _hoisted_1$3 = { class: "m-editor-float-box-body" };
9359
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9360
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9360
9361
  __name: "FloatingBox",
9361
9362
  props: {
9362
9363
  visible: { type: Boolean, default: false },
@@ -9465,7 +9466,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9465
9466
  }
9466
9467
  });
9467
9468
 
9468
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9469
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9469
9470
  __name: "NodeListMenu",
9470
9471
  setup(__props) {
9471
9472
  const services = inject("services");
@@ -9547,7 +9548,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9547
9548
  ]),
9548
9549
  _: 1
9549
9550
  })) : createCommentVNode("", true),
9550
- page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$7, {
9551
+ page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$8, {
9551
9552
  key: 1,
9552
9553
  ref_key: "box",
9553
9554
  ref: box,
@@ -9557,7 +9558,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9557
9558
  position: menuPosition.value
9558
9559
  }, {
9559
9560
  body: withCtx(() => [
9560
- createVNode(_sfc_main$m, {
9561
+ createVNode(_sfc_main$n, {
9561
9562
  class: "m-editor-node-list-menu magic-editor-layer-tree",
9562
9563
  data: nodeData.value,
9563
9564
  "node-status-map": unref(nodeStatusMap),
@@ -9571,6 +9572,157 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9571
9572
  }
9572
9573
  });
9573
9574
 
9575
+ const useStageOverlay = () => {
9576
+ const services = inject("services");
9577
+ const stageOptions = inject("stageOptions");
9578
+ const wrapWidth = ref(0);
9579
+ const wrapHeight = ref(0);
9580
+ const stageOverlayVisible = ref(false);
9581
+ const stageOverlay = ref();
9582
+ const stage = computed(() => services?.editorService.get("stage"));
9583
+ let subStage = null;
9584
+ const div = document.createElement("div");
9585
+ let selectEl = null;
9586
+ const render = () => {
9587
+ if (!selectEl)
9588
+ return;
9589
+ const content = selectEl.cloneNode(true);
9590
+ content.style.position = "static";
9591
+ Array.from(div.children).forEach((element) => {
9592
+ element.remove();
9593
+ });
9594
+ div.appendChild(content);
9595
+ subStage?.renderer.contentWindow?.magic.onPageElUpdate(div);
9596
+ subStage?.select(content);
9597
+ };
9598
+ const copyDocumentElement = () => {
9599
+ const doc = subStage?.renderer.getDocument();
9600
+ const documentElement = stage.value?.renderer.getDocument()?.documentElement;
9601
+ if (doc && documentElement) {
9602
+ doc.replaceChild(documentElement.cloneNode(true), doc.documentElement);
9603
+ }
9604
+ };
9605
+ const updateOverlay = () => {
9606
+ if (!selectEl)
9607
+ return;
9608
+ const { scrollWidth, scrollHeight } = selectEl;
9609
+ stageOverlay.value.style.width = `${scrollWidth}px`;
9610
+ stageOverlay.value.style.height = `${scrollHeight}px`;
9611
+ wrapWidth.value = scrollWidth;
9612
+ wrapHeight.value = scrollHeight;
9613
+ };
9614
+ const updateHandler = () => {
9615
+ render();
9616
+ updateOverlay();
9617
+ };
9618
+ const addHandler = () => {
9619
+ render();
9620
+ updateOverlay();
9621
+ };
9622
+ const removeHandler = () => {
9623
+ render();
9624
+ updateOverlay();
9625
+ };
9626
+ const openOverlay = async (el) => {
9627
+ selectEl = el;
9628
+ stageOverlayVisible.value = true;
9629
+ if (!stageOverlay.value) {
9630
+ await nextTick();
9631
+ }
9632
+ if (!stageOptions) {
9633
+ return;
9634
+ }
9635
+ subStage = useStage({
9636
+ ...stageOptions,
9637
+ runtimeUrl: "",
9638
+ autoScrollIntoView: false,
9639
+ render(stage2) {
9640
+ copyDocumentElement();
9641
+ const rootEl = stage2.renderer.getDocument()?.getElementById("app");
9642
+ if (rootEl) {
9643
+ rootEl.remove();
9644
+ }
9645
+ div.style.cssText = `
9646
+ width: ${el.scrollWidth}px;
9647
+ height: ${el.scrollHeight}px;
9648
+ background-color: #fff;
9649
+ `;
9650
+ render();
9651
+ return div;
9652
+ }
9653
+ });
9654
+ subStage.mount(stageOverlay.value);
9655
+ const { mask, renderer } = subStage;
9656
+ const { contentWindow } = renderer;
9657
+ mask.showRule(false);
9658
+ updateOverlay();
9659
+ contentWindow?.magic.onRuntimeReady({});
9660
+ services?.editorService.on("update", updateHandler);
9661
+ services?.editorService.on("add", addHandler);
9662
+ services?.editorService.on("remove", removeHandler);
9663
+ };
9664
+ const closeOverlay = () => {
9665
+ stageOverlayVisible.value = false;
9666
+ subStage?.destroy();
9667
+ subStage = null;
9668
+ services?.editorService.off("update", updateHandler);
9669
+ services?.editorService.off("add", addHandler);
9670
+ services?.editorService.off("remove", removeHandler);
9671
+ };
9672
+ watch(stage, (stage2) => {
9673
+ if (stage2) {
9674
+ stage2.on("dblclick", async (event) => {
9675
+ const el = await stage2.actionManager.getElementFromPoint(event);
9676
+ if (el) {
9677
+ openOverlay(el);
9678
+ }
9679
+ });
9680
+ } else if (subStage) {
9681
+ closeOverlay();
9682
+ }
9683
+ });
9684
+ return {
9685
+ wrapWidth,
9686
+ wrapHeight,
9687
+ stageOverlayVisible,
9688
+ stageOverlay,
9689
+ closeOverlay
9690
+ };
9691
+ };
9692
+
9693
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9694
+ __name: "StageOverlay",
9695
+ setup(__props) {
9696
+ const { stageOverlayVisible, stageOverlay, closeOverlay } = useStageOverlay();
9697
+ return (_ctx, _cache) => {
9698
+ return unref(stageOverlayVisible) ? (openBlock(), createElementBlock("div", {
9699
+ key: 0,
9700
+ class: "m-editor-stage-overlay",
9701
+ onClick: _cache[1] || (_cache[1] = //@ts-ignore
9702
+ (...args) => unref(closeOverlay) && unref(closeOverlay)(...args))
9703
+ }, [
9704
+ createVNode(unref(TMagicIcon), {
9705
+ class: "m-editor-stage-overlay-close",
9706
+ size: 20,
9707
+ onClick: unref(closeOverlay)
9708
+ }, {
9709
+ default: withCtx(() => [
9710
+ createVNode(unref(CloseBold))
9711
+ ]),
9712
+ _: 1
9713
+ }, 8, ["onClick"]),
9714
+ createElementVNode("div", {
9715
+ ref_key: "stageOverlay",
9716
+ ref: stageOverlay,
9717
+ class: "m-editor-stage-overlay-container",
9718
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
9719
+ }, ["stop"]))
9720
+ }, null, 512)
9721
+ ])) : createCommentVNode("", true);
9722
+ };
9723
+ }
9724
+ });
9725
+
9574
9726
  const _hoisted_1$2 = {
9575
9727
  viewBox: "0 0 24 24",
9576
9728
  fill: "none",
@@ -9736,7 +9888,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9736
9888
  };
9737
9889
  __expose({ show });
9738
9890
  return (_ctx, _cache) => {
9739
- return openBlock(), createBlock(_sfc_main$g, {
9891
+ return openBlock(), createBlock(_sfc_main$h, {
9740
9892
  "menu-data": menuData.value,
9741
9893
  ref_key: "menu",
9742
9894
  ref: menu
@@ -9782,10 +9934,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9782
9934
  stageWrap.value?.container?.focus();
9783
9935
  });
9784
9936
  services?.editorService.set("stage", markRaw(stage));
9785
- stage?.mount(stageContainer.value);
9786
- if (!node.value?.id)
9937
+ stage.mount(stageContainer.value);
9938
+ if (!node.value?.id) {
9787
9939
  return;
9788
- stage?.on("runtime-ready", (rt) => {
9940
+ }
9941
+ stage.on("runtime-ready", (rt) => {
9789
9942
  runtime = rt;
9790
9943
  root.value && runtime?.updateRootConfig?.(cloneDeep(toRaw(root.value)));
9791
9944
  page.value?.id && runtime?.updatePageId?.(page.value.id);
@@ -9880,8 +10033,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9880
10033
  left = e.clientX - containerRect.left + scrollLeft;
9881
10034
  if (parentEl && doc) {
9882
10035
  const { left: parentLeft, top: parentTop } = getOffset(parentEl);
9883
- left = left - calcValueByFontsize(doc, parentLeft);
9884
- top = top - calcValueByFontsize(doc, parentTop);
10036
+ left = left - calcValueByFontsize(doc, parentLeft) * zoom.value;
10037
+ top = top - calcValueByFontsize(doc, parentTop) * zoom.value;
9885
10038
  }
9886
10039
  }
9887
10040
  config.data.style = {
@@ -9895,7 +10048,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9895
10048
  }
9896
10049
  };
9897
10050
  return (_ctx, _cache) => {
9898
- return openBlock(), createBlock(_sfc_main$8, {
10051
+ return openBlock(), createBlock(_sfc_main$9, {
9899
10052
  class: "m-editor-stage",
9900
10053
  ref_key: "stageWrap",
9901
10054
  ref: stageWrap,
@@ -9911,16 +10064,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9911
10064
  },
9912
10065
  onClick: _cache[0] || (_cache[0] = ($event) => stageWrap.value?.container?.focus())
9913
10066
  }, {
9914
- default: withCtx(() => [
9915
- createElementVNode("div", {
9916
- class: "m-editor-stage-container",
9917
- ref_key: "stageContainer",
9918
- ref: stageContainer,
9919
- style: normalizeStyle(`transform: scale(${zoom.value});`),
9920
- onContextmenu: contextmenuHandler,
9921
- onDrop: dropHandler,
9922
- onDragover: dragoverHandler
9923
- }, null, 36),
10067
+ content: withCtx(() => [
9924
10068
  createVNode(_sfc_main$6),
9925
10069
  (openBlock(), createBlock(Teleport, { to: "body" }, [
9926
10070
  createVNode(_sfc_main$4, {
@@ -9932,6 +10076,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9932
10076
  }, null, 8, ["is-multi-select", "stage-content-menu", "custom-content-menu"])
9933
10077
  ]))
9934
10078
  ]),
10079
+ default: withCtx(() => [
10080
+ createElementVNode("div", {
10081
+ class: "m-editor-stage-container",
10082
+ ref_key: "stageContainer",
10083
+ ref: stageContainer,
10084
+ style: normalizeStyle(`transform: scale(${zoom.value});`),
10085
+ onContextmenu: contextmenuHandler,
10086
+ onDrop: dropHandler,
10087
+ onDragover: dragoverHandler
10088
+ }, null, 36),
10089
+ createVNode(_sfc_main$7)
10090
+ ]),
9935
10091
  _: 1
9936
10092
  }, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"]);
9937
10093
  };
@@ -10901,13 +11057,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10901
11057
  );
10902
11058
  __expose(services);
10903
11059
  return (_ctx, _cache) => {
10904
- return openBlock(), createBlock(_sfc_main$r, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
11060
+ return openBlock(), createBlock(_sfc_main$s, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
10905
11061
  header: withCtx(() => [
10906
11062
  renderSlot(_ctx.$slots, "header")
10907
11063
  ]),
10908
11064
  nav: withCtx(() => [
10909
11065
  renderSlot(_ctx.$slots, "nav", { editorService: unref(editorService) }, () => [
10910
- createVNode(_sfc_main$q, { data: _ctx.menu }, null, 8, ["data"])
11066
+ createVNode(_sfc_main$r, { data: _ctx.menu }, null, 8, ["data"])
10911
11067
  ])
10912
11068
  ]),
10913
11069
  "content-before": withCtx(() => [
@@ -10918,7 +11074,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10918
11074
  ]),
10919
11075
  sidebar: withCtx(() => [
10920
11076
  renderSlot(_ctx.$slots, "sidebar", { editorService: unref(editorService) }, () => [
10921
- createVNode(_sfc_main$a, {
11077
+ createVNode(_sfc_main$b, {
10922
11078
  data: _ctx.sidebar,
10923
11079
  "layer-content-menu": _ctx.layerContentMenu,
10924
11080
  "custom-content-menu": _ctx.customContentMenu
@@ -10975,7 +11131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10975
11131
  ]),
10976
11132
  "props-panel": withCtx(() => [
10977
11133
  renderSlot(_ctx.$slots, "props-panel", {}, () => [
10978
- createVNode(_sfc_main$p, {
11134
+ createVNode(_sfc_main$q, {
10979
11135
  "extend-state": _ctx.extendFormState,
10980
11136
  onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance)),
10981
11137
  onFormError: _cache[1] || (_cache[1] = (e) => _ctx.$emit("props-form-error", e)),
@@ -11022,24 +11178,23 @@ const index = {
11022
11178
  app.config.globalProperties.$TMAGIC_EDITOR = option;
11023
11179
  setConfig(option);
11024
11180
  app.component(_sfc_main.name, _sfc_main);
11025
- app.component("m-fields-ui-select", _sfc_main$A);
11026
- app.component("m-fields-code-link", _sfc_main$R);
11027
- app.component("m-fields-vs-code", _sfc_main$S);
11028
- app.component("magic-code-editor", _sfc_main$T);
11029
- app.component("m-fields-code-select", _sfc_main$Q);
11030
- app.component("m-fields-code-select-col", _sfc_main$M);
11031
- app.component("m-fields-event-select", _sfc_main$E);
11032
- app.component("m-fields-data-source-fields", _sfc_main$L);
11033
- app.component("m-fields-data-source-mocks", _sfc_main$G);
11034
- app.component("m-fields-key-value", _sfc_main$C);
11035
- app.component("m-fields-data-source-input", _sfc_main$J);
11036
- app.component("m-fields-data-source-select", _sfc_main$F);
11037
- app.component("m-fields-data-source-methods", _sfc_main$I);
11038
- app.component("m-fields-data-source-method-select", _sfc_main$H);
11039
- app.component("m-fields-data-source-field-select", _sfc_main$K);
11040
- app.component("m-fields-page-fragment-select", _sfc_main$B);
11181
+ app.component("m-fields-ui-select", _sfc_main$B);
11182
+ app.component("m-fields-code-link", _sfc_main$S);
11183
+ app.component("m-fields-vs-code", _sfc_main$T);
11184
+ app.component("magic-code-editor", _sfc_main$U);
11185
+ app.component("m-fields-code-select", _sfc_main$R);
11186
+ app.component("m-fields-code-select-col", _sfc_main$N);
11187
+ app.component("m-fields-event-select", _sfc_main$F);
11188
+ app.component("m-fields-data-source-fields", _sfc_main$M);
11189
+ app.component("m-fields-data-source-mocks", _sfc_main$H);
11190
+ app.component("m-fields-key-value", _sfc_main$D);
11191
+ app.component("m-fields-data-source-input", _sfc_main$K);
11192
+ app.component("m-fields-data-source-select", _sfc_main$G);
11193
+ app.component("m-fields-data-source-methods", _sfc_main$J);
11194
+ app.component("m-fields-data-source-method-select", _sfc_main$I);
11195
+ app.component("m-fields-data-source-field-select", _sfc_main$L);
11196
+ app.component("m-fields-page-fragment-select", _sfc_main$C);
11041
11197
  }
11042
11198
  };
11043
11199
 
11044
- export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$P as CodeBlockEditor, _sfc_main$l as CodeBlockList, _sfc_main$k as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$Q as CodeSelect, _sfc_main$M as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$g as ContentMenu, _sfc_main$K as DataSourceFieldSelect, _sfc_main$L as DataSourceFields, _sfc_main$J as DataSourceInput, _sfc_main$H as DataSourceMethodSelect, _sfc_main$I as DataSourceMethods, _sfc_main$G as DataSourceMocks, _sfc_main$F as DataSourceSelect, DragType, _sfc_main$E as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$N as Icon, KeyBindingCommand, _sfc_main$C as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$y as LayoutContainer, _sfc_main$B as PageFragmentSelect, _sfc_main$p as PropsPanel, _sfc_main$z as Resizer, _sfc_main$y as SplitView, _sfc_main$T as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$x as ToolButton, UI_SELECT_MODE_EVENT_NAME, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setChildrenLayout, setConfig, setLayout, storageService, styleTabConfig, traverseNode, uiService, useCodeBlockEdit, useDataSourceMethod, useFloatBox, useStage, warn };
11045
- //# sourceMappingURL=tmagic-editor.js.map
11200
+ export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$Q as CodeBlockEditor, _sfc_main$m as CodeBlockList, _sfc_main$l as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$R as CodeSelect, _sfc_main$N as CodeSelectCol, ColumnLayout, _sfc_main$c as ComponentListPanel, _sfc_main$h as ContentMenu, _sfc_main$L as DataSourceFieldSelect, _sfc_main$M as DataSourceFields, _sfc_main$K as DataSourceInput, _sfc_main$I as DataSourceMethodSelect, _sfc_main$J as DataSourceMethods, _sfc_main$H as DataSourceMocks, _sfc_main$G as DataSourceSelect, DragType, _sfc_main$F as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$O as Icon, KeyBindingCommand, _sfc_main$D as KeyValue, Keys, LayerOffset, _sfc_main$d as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$C as PageFragmentSelect, _sfc_main$q as PropsPanel, _sfc_main$A as Resizer, _sfc_main$z as SplitView, _sfc_main$U as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$y as ToolButton, UI_SELECT_MODE_EVENT_NAME, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setChildrenLayout, setConfig, setLayout, storageService, styleTabConfig, traverseNode, uiService, useCodeBlockEdit, useDataSourceMethod, useFloatBox, useStage, warn };