@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.
- package/dist/tmagic-editor.js +32 -15
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +32 -15
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/Editor.vue +19 -1
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +13 -17
- package/types/components/FunctionEditor.vue.d.ts +7 -7
- package/types/layouts/CodeEditor.vue.d.ts +6 -6
- package/types/layouts/Framework.vue.d.ts +7 -31
package/dist/tmagic-editor.js
CHANGED
|
@@ -3427,10 +3427,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3427
3427
|
name: "MEditorFramework"
|
|
3428
3428
|
},
|
|
3429
3429
|
__name: "Framework",
|
|
3430
|
-
props: {
|
|
3431
|
-
codeOptions: { default: () => ({}) }
|
|
3432
|
-
},
|
|
3433
3430
|
setup(__props) {
|
|
3431
|
+
const codeOptions = inject("codeOptions", {});
|
|
3434
3432
|
const { editorService, uiService } = inject("services") || {};
|
|
3435
3433
|
const root = computed(() => editorService?.get("root"));
|
|
3436
3434
|
const nodes = computed(() => editorService?.get("nodes") || []);
|
|
@@ -3490,16 +3488,18 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3490
3488
|
}
|
|
3491
3489
|
};
|
|
3492
3490
|
return (_ctx, _cache) => {
|
|
3493
|
-
const _component_magic_code_editor = resolveComponent("magic-code-editor");
|
|
3494
3491
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
3495
|
-
renderSlot(_ctx.$slots, "
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3492
|
+
renderSlot(_ctx.$slots, "header"),
|
|
3493
|
+
renderSlot(_ctx.$slots, "nav"),
|
|
3494
|
+
renderSlot(_ctx.$slots, "content-before"),
|
|
3495
|
+
showSrc.value ? renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
3496
|
+
createVNode(_sfc_main$u, {
|
|
3497
|
+
class: "m-editor-content",
|
|
3498
|
+
"init-values": root.value,
|
|
3499
|
+
options: unref(codeOptions),
|
|
3500
|
+
onSave: saveCode
|
|
3501
|
+
}, null, 8, ["init-values", "options"])
|
|
3502
|
+
]) : (openBlock(), createBlock(_sfc_main$s, {
|
|
3503
3503
|
key: 1,
|
|
3504
3504
|
class: "m-editor-content",
|
|
3505
3505
|
"left-class": "m-editor-framework-left",
|
|
@@ -3535,7 +3535,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3535
3535
|
]),
|
|
3536
3536
|
key: "0"
|
|
3537
3537
|
} : void 0
|
|
3538
|
-
]), 1032, ["left", "right"]))
|
|
3538
|
+
]), 1032, ["left", "right"])),
|
|
3539
|
+
renderSlot(_ctx.$slots, "content-after"),
|
|
3540
|
+
renderSlot(_ctx.$slots, "footer")
|
|
3539
3541
|
]);
|
|
3540
3542
|
};
|
|
3541
3543
|
}
|
|
@@ -7898,12 +7900,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7898
7900
|
const _component_Workspace = resolveComponent("Workspace");
|
|
7899
7901
|
const _component_PropsPanel = resolveComponent("PropsPanel");
|
|
7900
7902
|
const _component_Framework = resolveComponent("Framework");
|
|
7901
|
-
return openBlock(), createBlock(_component_Framework,
|
|
7903
|
+
return openBlock(), createBlock(_component_Framework, null, {
|
|
7904
|
+
header: withCtx(() => [
|
|
7905
|
+
renderSlot(_ctx.$slots, "header")
|
|
7906
|
+
]),
|
|
7902
7907
|
nav: withCtx(() => [
|
|
7903
7908
|
renderSlot(_ctx.$slots, "nav", { editorService: _ctx.editorService }, () => [
|
|
7904
7909
|
createVNode(_component_TMagicNavMenu, { data: _ctx.menu }, null, 8, ["data"])
|
|
7905
7910
|
])
|
|
7906
7911
|
]),
|
|
7912
|
+
"content-before": withCtx(() => [
|
|
7913
|
+
renderSlot(_ctx.$slots, "content-before")
|
|
7914
|
+
]),
|
|
7915
|
+
"src-code": withCtx(() => [
|
|
7916
|
+
renderSlot(_ctx.$slots, "src-code", { editorService: _ctx.editorService })
|
|
7917
|
+
]),
|
|
7907
7918
|
sidebar: withCtx(() => [
|
|
7908
7919
|
renderSlot(_ctx.$slots, "sidebar", { editorService: _ctx.editorService }, () => [
|
|
7909
7920
|
createVNode(_component_Sidebar, {
|
|
@@ -7975,8 +7986,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7975
7986
|
empty: withCtx(() => [
|
|
7976
7987
|
renderSlot(_ctx.$slots, "empty", { editorService: _ctx.editorService })
|
|
7977
7988
|
]),
|
|
7989
|
+
"content-after": withCtx(() => [
|
|
7990
|
+
renderSlot(_ctx.$slots, "content-after")
|
|
7991
|
+
]),
|
|
7992
|
+
footer: withCtx(() => [
|
|
7993
|
+
renderSlot(_ctx.$slots, "footer")
|
|
7994
|
+
]),
|
|
7978
7995
|
_: 3
|
|
7979
|
-
}
|
|
7996
|
+
});
|
|
7980
7997
|
}
|
|
7981
7998
|
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
7982
7999
|
|