@tmagic/editor 1.3.0-alpha.4 → 1.3.0-alpha.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.
@@ -3436,10 +3436,8 @@
3436
3436
  name: "MEditorFramework"
3437
3437
  },
3438
3438
  __name: "Framework",
3439
- props: {
3440
- codeOptions: { default: () => ({}) }
3441
- },
3442
3439
  setup(__props) {
3440
+ const codeOptions = vue.inject("codeOptions", {});
3443
3441
  const { editorService, uiService } = vue.inject("services") || {};
3444
3442
  const root = vue.computed(() => editorService?.get("root"));
3445
3443
  const nodes = vue.computed(() => editorService?.get("nodes") || []);
@@ -3499,16 +3497,18 @@
3499
3497
  }
3500
3498
  };
3501
3499
  return (_ctx, _cache) => {
3502
- const _component_magic_code_editor = vue.resolveComponent("magic-code-editor");
3503
3500
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
3504
- vue.renderSlot(_ctx.$slots, "nav", { class: "m-editor-nav-menu" }),
3505
- showSrc.value ? (vue.openBlock(), vue.createBlock(_component_magic_code_editor, {
3506
- key: 0,
3507
- class: "m-editor-content",
3508
- "init-values": root.value,
3509
- options: _ctx.codeOptions,
3510
- onSave: saveCode
3511
- }, null, 8, ["init-values", "options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$s, {
3501
+ vue.renderSlot(_ctx.$slots, "header"),
3502
+ vue.renderSlot(_ctx.$slots, "nav"),
3503
+ vue.renderSlot(_ctx.$slots, "content-before"),
3504
+ showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
3505
+ vue.createVNode(_sfc_main$u, {
3506
+ class: "m-editor-content",
3507
+ "init-values": root.value,
3508
+ options: vue.unref(codeOptions),
3509
+ onSave: saveCode
3510
+ }, null, 8, ["init-values", "options"])
3511
+ ]) : (vue.openBlock(), vue.createBlock(_sfc_main$s, {
3512
3512
  key: 1,
3513
3513
  class: "m-editor-content",
3514
3514
  "left-class": "m-editor-framework-left",
@@ -3544,7 +3544,9 @@
3544
3544
  ]),
3545
3545
  key: "0"
3546
3546
  } : void 0
3547
- ]), 1032, ["left", "right"]))
3547
+ ]), 1032, ["left", "right"])),
3548
+ vue.renderSlot(_ctx.$slots, "content-after"),
3549
+ vue.renderSlot(_ctx.$slots, "footer")
3548
3550
  ]);
3549
3551
  };
3550
3552
  }
@@ -7907,12 +7909,21 @@
7907
7909
  const _component_Workspace = vue.resolveComponent("Workspace");
7908
7910
  const _component_PropsPanel = vue.resolveComponent("PropsPanel");
7909
7911
  const _component_Framework = vue.resolveComponent("Framework");
7910
- return vue.openBlock(), vue.createBlock(_component_Framework, { "code-options": _ctx.codeOptions }, {
7912
+ return vue.openBlock(), vue.createBlock(_component_Framework, null, {
7913
+ header: vue.withCtx(() => [
7914
+ vue.renderSlot(_ctx.$slots, "header")
7915
+ ]),
7911
7916
  nav: vue.withCtx(() => [
7912
7917
  vue.renderSlot(_ctx.$slots, "nav", { editorService: _ctx.editorService }, () => [
7913
7918
  vue.createVNode(_component_TMagicNavMenu, { data: _ctx.menu }, null, 8, ["data"])
7914
7919
  ])
7915
7920
  ]),
7921
+ "content-before": vue.withCtx(() => [
7922
+ vue.renderSlot(_ctx.$slots, "content-before")
7923
+ ]),
7924
+ "src-code": vue.withCtx(() => [
7925
+ vue.renderSlot(_ctx.$slots, "src-code", { editorService: _ctx.editorService })
7926
+ ]),
7916
7927
  sidebar: vue.withCtx(() => [
7917
7928
  vue.renderSlot(_ctx.$slots, "sidebar", { editorService: _ctx.editorService }, () => [
7918
7929
  vue.createVNode(_component_Sidebar, {
@@ -7984,8 +7995,14 @@
7984
7995
  empty: vue.withCtx(() => [
7985
7996
  vue.renderSlot(_ctx.$slots, "empty", { editorService: _ctx.editorService })
7986
7997
  ]),
7998
+ "content-after": vue.withCtx(() => [
7999
+ vue.renderSlot(_ctx.$slots, "content-after")
8000
+ ]),
8001
+ footer: vue.withCtx(() => [
8002
+ vue.renderSlot(_ctx.$slots, "footer")
8003
+ ]),
7987
8004
  _: 3
7988
- }, 8, ["code-options"]);
8005
+ });
7989
8006
  }
7990
8007
  const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
7991
8008