@tmagic/editor 1.3.0-alpha.3 → 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 +35 -15
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +35 -15
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/Editor.vue +19 -1
- package/src/fields/CodeSelect.vue +2 -0
- package/src/fields/EventSelect.vue +1 -0
- 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
|
@@ -139,6 +139,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
type: "group-list",
|
|
140
140
|
name: "hookData",
|
|
141
141
|
enableToggleMode: false,
|
|
142
|
+
expandAll: true,
|
|
143
|
+
titleKey: "codeId",
|
|
142
144
|
items: [
|
|
143
145
|
{
|
|
144
146
|
type: "code-select-col",
|
|
@@ -922,6 +924,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
922
924
|
{
|
|
923
925
|
type: "group-list",
|
|
924
926
|
name: "actions",
|
|
927
|
+
expandAll: true,
|
|
925
928
|
enableToggleMode: false,
|
|
926
929
|
items: [actionTypeConfig.value, targetCompConfig.value, compActionConfig.value, codeActionConfig.value]
|
|
927
930
|
}
|
|
@@ -3424,10 +3427,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3424
3427
|
name: "MEditorFramework"
|
|
3425
3428
|
},
|
|
3426
3429
|
__name: "Framework",
|
|
3427
|
-
props: {
|
|
3428
|
-
codeOptions: { default: () => ({}) }
|
|
3429
|
-
},
|
|
3430
3430
|
setup(__props) {
|
|
3431
|
+
const codeOptions = inject("codeOptions", {});
|
|
3431
3432
|
const { editorService, uiService } = inject("services") || {};
|
|
3432
3433
|
const root = computed(() => editorService?.get("root"));
|
|
3433
3434
|
const nodes = computed(() => editorService?.get("nodes") || []);
|
|
@@ -3487,16 +3488,18 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3487
3488
|
}
|
|
3488
3489
|
};
|
|
3489
3490
|
return (_ctx, _cache) => {
|
|
3490
|
-
const _component_magic_code_editor = resolveComponent("magic-code-editor");
|
|
3491
3491
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
3492
|
-
renderSlot(_ctx.$slots, "
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
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, {
|
|
3500
3503
|
key: 1,
|
|
3501
3504
|
class: "m-editor-content",
|
|
3502
3505
|
"left-class": "m-editor-framework-left",
|
|
@@ -3532,7 +3535,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3532
3535
|
]),
|
|
3533
3536
|
key: "0"
|
|
3534
3537
|
} : void 0
|
|
3535
|
-
]), 1032, ["left", "right"]))
|
|
3538
|
+
]), 1032, ["left", "right"])),
|
|
3539
|
+
renderSlot(_ctx.$slots, "content-after"),
|
|
3540
|
+
renderSlot(_ctx.$slots, "footer")
|
|
3536
3541
|
]);
|
|
3537
3542
|
};
|
|
3538
3543
|
}
|
|
@@ -7895,12 +7900,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7895
7900
|
const _component_Workspace = resolveComponent("Workspace");
|
|
7896
7901
|
const _component_PropsPanel = resolveComponent("PropsPanel");
|
|
7897
7902
|
const _component_Framework = resolveComponent("Framework");
|
|
7898
|
-
return openBlock(), createBlock(_component_Framework,
|
|
7903
|
+
return openBlock(), createBlock(_component_Framework, null, {
|
|
7904
|
+
header: withCtx(() => [
|
|
7905
|
+
renderSlot(_ctx.$slots, "header")
|
|
7906
|
+
]),
|
|
7899
7907
|
nav: withCtx(() => [
|
|
7900
7908
|
renderSlot(_ctx.$slots, "nav", { editorService: _ctx.editorService }, () => [
|
|
7901
7909
|
createVNode(_component_TMagicNavMenu, { data: _ctx.menu }, null, 8, ["data"])
|
|
7902
7910
|
])
|
|
7903
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
|
+
]),
|
|
7904
7918
|
sidebar: withCtx(() => [
|
|
7905
7919
|
renderSlot(_ctx.$slots, "sidebar", { editorService: _ctx.editorService }, () => [
|
|
7906
7920
|
createVNode(_component_Sidebar, {
|
|
@@ -7972,8 +7986,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7972
7986
|
empty: withCtx(() => [
|
|
7973
7987
|
renderSlot(_ctx.$slots, "empty", { editorService: _ctx.editorService })
|
|
7974
7988
|
]),
|
|
7989
|
+
"content-after": withCtx(() => [
|
|
7990
|
+
renderSlot(_ctx.$slots, "content-after")
|
|
7991
|
+
]),
|
|
7992
|
+
footer: withCtx(() => [
|
|
7993
|
+
renderSlot(_ctx.$slots, "footer")
|
|
7994
|
+
]),
|
|
7975
7995
|
_: 3
|
|
7976
|
-
}
|
|
7996
|
+
});
|
|
7977
7997
|
}
|
|
7978
7998
|
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
7979
7999
|
|