@tmagic/editor 1.0.0-rc.7 → 1.0.0
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/style.css +4 -0
- package/dist/tmagic-editor.es.js +122 -104
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +123 -104
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/Editor.vue.d.ts +10 -1
- package/dist/types/src/layouts/workspace/Workspace.vue.d.ts +3 -31
- package/dist/types/src/services/editor.d.ts +6 -3
- package/dist/types/src/services/props.d.ts +8 -2
- package/dist/types/src/type.d.ts +11 -0
- package/dist/types/src/utils/editor.d.ts +1 -6
- package/dist/types/src/utils/props.d.ts +10 -1
- package/package.json +7 -7
- package/src/Editor.vue +18 -8
- package/src/layouts/workspace/Stage.vue +40 -35
- package/src/layouts/workspace/Workspace.vue +2 -28
- package/src/services/editor.ts +15 -9
- package/src/services/ui.ts +4 -2
- package/src/theme/page-bar.scss +1 -0
- package/src/theme/workspace.scss +4 -0
- package/src/type.ts +13 -0
- package/src/utils/editor.ts +15 -0
- package/src/utils/props.ts +16 -6
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
|
|
646
646
|
class Props extends BaseService {
|
|
647
647
|
constructor() {
|
|
648
|
-
super(["setPropsConfig", "getPropsConfig", "setPropsValue", "getPropsValue"]);
|
|
648
|
+
super(["setPropsConfig", "getPropsConfig", "setPropsValue", "getPropsValue", "createId", "setNewItemId"]);
|
|
649
649
|
this.state = vue.reactive({
|
|
650
650
|
propsConfigMap: {},
|
|
651
651
|
propsValueMap: {}
|
|
@@ -684,12 +684,44 @@
|
|
|
684
684
|
}
|
|
685
685
|
return value;
|
|
686
686
|
}
|
|
687
|
+
const data = lodashEs.cloneDeep(defaultValue);
|
|
688
|
+
await this.setNewItemId(data);
|
|
687
689
|
return {
|
|
688
|
-
...getDefaultPropsValue(type),
|
|
689
|
-
...lodashEs.mergeWith(lodashEs.cloneDeep(this.state.propsValueMap[type] || {}),
|
|
690
|
+
...getDefaultPropsValue(type, await this.createId(type)),
|
|
691
|
+
...lodashEs.mergeWith(lodashEs.cloneDeep(this.state.propsValueMap[type] || {}), data)
|
|
690
692
|
};
|
|
691
693
|
}
|
|
694
|
+
async createId(type) {
|
|
695
|
+
return `${type}_${lodashEs.random(1e4, false)}`;
|
|
696
|
+
}
|
|
697
|
+
async setNewItemId(config, parent) {
|
|
698
|
+
const oldId = config.id;
|
|
699
|
+
config.id = await this.createId(config.type || "component");
|
|
700
|
+
if (utils.isPop(config) && parent?.type === schema.NodeType.PAGE) {
|
|
701
|
+
updatePopId(oldId, config.id, parent);
|
|
702
|
+
}
|
|
703
|
+
if (config.items && Array.isArray(config.items)) {
|
|
704
|
+
for (const item of config.items) {
|
|
705
|
+
await this.setNewItemId(item, config);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
692
709
|
}
|
|
710
|
+
const updatePopId = (oldId, popId, pageConfig) => {
|
|
711
|
+
pageConfig.items?.forEach((config) => {
|
|
712
|
+
if (config.pop === oldId) {
|
|
713
|
+
config.pop = popId;
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
if (config.popId === oldId) {
|
|
717
|
+
config.popId = popId;
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
if (Array.isArray(config.items)) {
|
|
721
|
+
updatePopId(oldId, popId, config);
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
};
|
|
693
725
|
var propsService = new Props();
|
|
694
726
|
|
|
695
727
|
var LayerOffset = /* @__PURE__ */ ((LayerOffset2) => {
|
|
@@ -708,9 +740,10 @@
|
|
|
708
740
|
Keys2["ESCAPE"] = "Space";
|
|
709
741
|
return Keys2;
|
|
710
742
|
})(Keys || {});
|
|
743
|
+
const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
744
|
+
const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
711
745
|
|
|
712
746
|
const COPY_STORAGE_KEY = "$MagicEditorCopyData";
|
|
713
|
-
const generateId = (type) => `${type}_${lodashEs.random(1e4, false)}`;
|
|
714
747
|
const getPageList = (app) => {
|
|
715
748
|
if (app.items && Array.isArray(app.items)) {
|
|
716
749
|
return app.items.filter((item) => item.type === schema.NodeType.PAGE);
|
|
@@ -730,32 +763,6 @@
|
|
|
730
763
|
return pageName;
|
|
731
764
|
};
|
|
732
765
|
const generatePageNameByApp = (app) => generatePageName(getPageNameList(getPageList(app)));
|
|
733
|
-
const updatePopId = (oldId, popId, pageConfig) => {
|
|
734
|
-
pageConfig.items?.forEach((config) => {
|
|
735
|
-
if (config.pop === oldId) {
|
|
736
|
-
config.pop = popId;
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
if (config.popId === oldId) {
|
|
740
|
-
config.popId = popId;
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
if (Array.isArray(config.items)) {
|
|
744
|
-
updatePopId(oldId, popId, config);
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
};
|
|
748
|
-
const setNewItemId = (config, parent) => {
|
|
749
|
-
const oldId = config.id;
|
|
750
|
-
config.id = generateId(config.type || "component");
|
|
751
|
-
config.name = `${config.name?.replace(/_(\d+)$/, "")}_${config.id}`;
|
|
752
|
-
if (utils.isPop(config) && parent?.type === schema.NodeType.PAGE) {
|
|
753
|
-
updatePopId(oldId, config.id, parent);
|
|
754
|
-
}
|
|
755
|
-
if (config.items && Array.isArray(config.items)) {
|
|
756
|
-
config.items.forEach((item) => setNewItemId(item, config));
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
766
|
const isFixed = (node) => node.style?.position === "fixed";
|
|
760
767
|
const getNodeIndex = (node, parent) => {
|
|
761
768
|
const items = parent?.items || [];
|
|
@@ -861,6 +868,19 @@
|
|
|
861
868
|
}
|
|
862
869
|
return toRelative(node);
|
|
863
870
|
};
|
|
871
|
+
const getGuideLineFromCache = (key) => {
|
|
872
|
+
if (!key)
|
|
873
|
+
return [];
|
|
874
|
+
const guideLineCacheData = globalThis.localStorage.getItem(key);
|
|
875
|
+
if (guideLineCacheData) {
|
|
876
|
+
try {
|
|
877
|
+
return JSON.parse(guideLineCacheData) || [];
|
|
878
|
+
} catch (e) {
|
|
879
|
+
console.error(e);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return [];
|
|
883
|
+
};
|
|
864
884
|
|
|
865
885
|
const log = (...args) => {
|
|
866
886
|
};
|
|
@@ -913,8 +933,11 @@
|
|
|
913
933
|
get(name) {
|
|
914
934
|
return this.state[name];
|
|
915
935
|
}
|
|
916
|
-
getNodeInfo(id) {
|
|
917
|
-
|
|
936
|
+
getNodeInfo(id, raw = true) {
|
|
937
|
+
let root = this.get("root");
|
|
938
|
+
if (raw) {
|
|
939
|
+
root = vue.toRaw(root);
|
|
940
|
+
}
|
|
918
941
|
if (!root)
|
|
919
942
|
return {};
|
|
920
943
|
if (id === root.id) {
|
|
@@ -935,14 +958,14 @@
|
|
|
935
958
|
});
|
|
936
959
|
return info;
|
|
937
960
|
}
|
|
938
|
-
getNodeById(id) {
|
|
939
|
-
const { node } = this.getNodeInfo(id);
|
|
961
|
+
getNodeById(id, raw = true) {
|
|
962
|
+
const { node } = this.getNodeInfo(id, raw);
|
|
940
963
|
return node;
|
|
941
964
|
}
|
|
942
|
-
getParentById(id) {
|
|
965
|
+
getParentById(id, raw = true) {
|
|
943
966
|
if (!this.get("root"))
|
|
944
967
|
return;
|
|
945
|
-
const { parent } = this.getNodeInfo(id);
|
|
968
|
+
const { parent } = this.getNodeInfo(id, raw);
|
|
946
969
|
return parent;
|
|
947
970
|
}
|
|
948
971
|
async getLayout(parent, node) {
|
|
@@ -1017,7 +1040,7 @@
|
|
|
1017
1040
|
} else if (curNode.items) {
|
|
1018
1041
|
parentNode = curNode;
|
|
1019
1042
|
} else {
|
|
1020
|
-
parentNode = this.getParentById(curNode.id);
|
|
1043
|
+
parentNode = this.getParentById(curNode.id, false);
|
|
1021
1044
|
}
|
|
1022
1045
|
if (!parentNode)
|
|
1023
1046
|
throw new Error("\u672A\u627E\u5230\u7236\u5143\u7D20");
|
|
@@ -1047,7 +1070,7 @@
|
|
|
1047
1070
|
const root = this.get("root");
|
|
1048
1071
|
if (!root)
|
|
1049
1072
|
throw new Error("\u6CA1\u6709root");
|
|
1050
|
-
const { parent, node: curNode } = this.getNodeInfo(node.id);
|
|
1073
|
+
const { parent, node: curNode } = this.getNodeInfo(node.id, false);
|
|
1051
1074
|
if (!parent || !curNode)
|
|
1052
1075
|
throw new Error("\u627E\u4E0D\u8981\u5220\u9664\u7684\u8282\u70B9");
|
|
1053
1076
|
const index = getNodeIndex(curNode, parent);
|
|
@@ -1084,7 +1107,7 @@
|
|
|
1084
1107
|
async update(config2) {
|
|
1085
1108
|
if (!config2?.id)
|
|
1086
1109
|
throw new Error("\u6CA1\u6709\u914D\u7F6E\u6216\u8005\u914D\u7F6E\u7F3A\u5C11id\u503C");
|
|
1087
|
-
const info = this.getNodeInfo(config2.id);
|
|
1110
|
+
const info = this.getNodeInfo(config2.id, false);
|
|
1088
1111
|
if (!info.node)
|
|
1089
1112
|
throw new Error(`\u83B7\u53D6\u4E0D\u5230id\u4E3A${config2.id}\u7684\u8282\u70B9`);
|
|
1090
1113
|
const node = lodashEs.cloneDeep(vue.toRaw(info.node));
|
|
@@ -1154,7 +1177,7 @@
|
|
|
1154
1177
|
console.error(e);
|
|
1155
1178
|
return;
|
|
1156
1179
|
}
|
|
1157
|
-
setNewItemId(config, this.get("root"));
|
|
1180
|
+
await propsService.setNewItemId(config, this.get("root"));
|
|
1158
1181
|
if (config.style) {
|
|
1159
1182
|
config.style = {
|
|
1160
1183
|
...config.style,
|
|
@@ -1559,12 +1582,19 @@
|
|
|
1559
1582
|
}
|
|
1560
1583
|
];
|
|
1561
1584
|
const DEFAULT_CONFIG = fillConfig([]);
|
|
1562
|
-
const getDefaultPropsValue = (type) => ({
|
|
1585
|
+
const getDefaultPropsValue = (type, id) => ["page", "container"].includes(type) ? {
|
|
1586
|
+
type,
|
|
1587
|
+
id,
|
|
1588
|
+
layout: "absolute",
|
|
1589
|
+
style: {},
|
|
1590
|
+
name: type,
|
|
1591
|
+
items: []
|
|
1592
|
+
} : {
|
|
1563
1593
|
type,
|
|
1564
|
-
id
|
|
1594
|
+
id,
|
|
1565
1595
|
style: {},
|
|
1566
1596
|
name: type
|
|
1567
|
-
}
|
|
1597
|
+
};
|
|
1568
1598
|
|
|
1569
1599
|
const _sfc_main$i = vue.defineComponent({
|
|
1570
1600
|
components: { Plus: icons.Plus },
|
|
@@ -3401,25 +3431,9 @@
|
|
|
3401
3431
|
ViewerMenu,
|
|
3402
3432
|
ScrollViewer
|
|
3403
3433
|
},
|
|
3404
|
-
|
|
3405
|
-
render: {
|
|
3406
|
-
type: Function
|
|
3407
|
-
},
|
|
3408
|
-
runtimeUrl: String,
|
|
3409
|
-
autoScrollIntoView: Boolean,
|
|
3410
|
-
canSelect: {
|
|
3411
|
-
type: Function,
|
|
3412
|
-
default: (el) => Boolean(el.id)
|
|
3413
|
-
},
|
|
3414
|
-
moveableOptions: {
|
|
3415
|
-
type: [Object, Function],
|
|
3416
|
-
default: () => (core) => ({
|
|
3417
|
-
container: core?.renderer?.contentWindow?.document.getElementById("app")
|
|
3418
|
-
})
|
|
3419
|
-
}
|
|
3420
|
-
},
|
|
3421
|
-
setup(props) {
|
|
3434
|
+
setup() {
|
|
3422
3435
|
const services = vue.inject("services");
|
|
3436
|
+
const stageOptions = vue.inject("stageOptions");
|
|
3423
3437
|
const stageWrap = vue.ref();
|
|
3424
3438
|
const stageContainer = vue.ref();
|
|
3425
3439
|
const menu = vue.ref();
|
|
@@ -3431,30 +3445,36 @@
|
|
|
3431
3445
|
const node = vue.computed(() => services?.editorService.get("node"));
|
|
3432
3446
|
let stage = null;
|
|
3433
3447
|
let runtime = null;
|
|
3448
|
+
const getGuideLineKey = (key) => `${key}_${root.value?.id}_${page.value?.id}`;
|
|
3434
3449
|
vue.watchEffect(() => {
|
|
3435
3450
|
if (stage)
|
|
3436
3451
|
return;
|
|
3437
3452
|
if (!stageContainer.value)
|
|
3438
3453
|
return;
|
|
3439
|
-
if (!(
|
|
3454
|
+
if (!(stageOptions?.runtimeUrl || stageOptions?.render) || !root.value)
|
|
3440
3455
|
return;
|
|
3441
3456
|
stage = new StageCore__default["default"]({
|
|
3442
|
-
render:
|
|
3443
|
-
runtimeUrl:
|
|
3457
|
+
render: stageOptions.render,
|
|
3458
|
+
runtimeUrl: stageOptions.runtimeUrl,
|
|
3444
3459
|
zoom: zoom.value,
|
|
3445
|
-
autoScrollIntoView:
|
|
3460
|
+
autoScrollIntoView: stageOptions.autoScrollIntoView,
|
|
3446
3461
|
canSelect: (el, event, stop) => {
|
|
3447
|
-
const elCanSelect =
|
|
3462
|
+
const elCanSelect = stageOptions.canSelect(el);
|
|
3448
3463
|
if (uiSelectMode.value && elCanSelect && event.type === "mousedown") {
|
|
3449
3464
|
document.dispatchEvent(new CustomEvent("ui-select", { detail: el }));
|
|
3450
3465
|
return stop();
|
|
3451
3466
|
}
|
|
3452
3467
|
return elCanSelect;
|
|
3453
3468
|
},
|
|
3454
|
-
moveableOptions:
|
|
3469
|
+
moveableOptions: stageOptions.moveableOptions,
|
|
3470
|
+
updateDragEl: stageOptions.updateDragEl
|
|
3455
3471
|
});
|
|
3456
3472
|
services?.editorService.set("stage", vue.markRaw(stage));
|
|
3457
3473
|
stage?.mount(stageContainer.value);
|
|
3474
|
+
stage.mask.setGuides([
|
|
3475
|
+
getGuideLineFromCache(getGuideLineKey(H_GUIDE_LINE_STORAGE_KEY)),
|
|
3476
|
+
getGuideLineFromCache(getGuideLineKey(V_GUIDE_LINE_STORAGE_KEY))
|
|
3477
|
+
]);
|
|
3458
3478
|
stage?.on("select", (el) => {
|
|
3459
3479
|
services?.editorService.select(el.id);
|
|
3460
3480
|
});
|
|
@@ -3467,14 +3487,22 @@
|
|
|
3467
3487
|
stage?.on("sort", (ev) => {
|
|
3468
3488
|
services?.editorService.sort(ev.src, ev.dist);
|
|
3469
3489
|
});
|
|
3470
|
-
stage?.on("changeGuides", () => {
|
|
3490
|
+
stage?.on("changeGuides", (e2) => {
|
|
3471
3491
|
services?.uiService.set("showGuides", true);
|
|
3492
|
+
if (!root.value || !page.value)
|
|
3493
|
+
return;
|
|
3494
|
+
const storageKey = getGuideLineKey(e2.type === StageCore.GuidesType.HORIZONTAL ? H_GUIDE_LINE_STORAGE_KEY : V_GUIDE_LINE_STORAGE_KEY);
|
|
3495
|
+
if (e2.guides.length) {
|
|
3496
|
+
globalThis.localStorage.setItem(storageKey, JSON.stringify(e2.guides));
|
|
3497
|
+
} else {
|
|
3498
|
+
globalThis.localStorage.removeItem(storageKey);
|
|
3499
|
+
}
|
|
3472
3500
|
});
|
|
3473
3501
|
if (!node.value?.id)
|
|
3474
3502
|
return;
|
|
3475
3503
|
stage?.on("runtime-ready", (rt) => {
|
|
3476
3504
|
runtime = rt;
|
|
3477
|
-
root.value && runtime?.updateRootConfig(lodashEs.cloneDeep(vue.toRaw(root.value)));
|
|
3505
|
+
root.value && runtime?.updateRootConfig?.(lodashEs.cloneDeep(vue.toRaw(root.value)));
|
|
3478
3506
|
page.value?.id && runtime?.updatePageId?.(page.value.id);
|
|
3479
3507
|
setTimeout(() => {
|
|
3480
3508
|
node.value && stage?.select(vue.toRaw(node.value.id));
|
|
@@ -3488,7 +3516,7 @@
|
|
|
3488
3516
|
});
|
|
3489
3517
|
vue.watch(root, (root2) => {
|
|
3490
3518
|
if (runtime && root2) {
|
|
3491
|
-
runtime.updateRootConfig(lodashEs.cloneDeep(vue.toRaw(root2)));
|
|
3519
|
+
runtime.updateRootConfig?.(lodashEs.cloneDeep(vue.toRaw(root2)));
|
|
3492
3520
|
}
|
|
3493
3521
|
});
|
|
3494
3522
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -3578,19 +3606,6 @@
|
|
|
3578
3606
|
PageBar,
|
|
3579
3607
|
MagicStage
|
|
3580
3608
|
},
|
|
3581
|
-
props: {
|
|
3582
|
-
runtimeUrl: String,
|
|
3583
|
-
autoScrollIntoView: Boolean,
|
|
3584
|
-
render: {
|
|
3585
|
-
type: Function
|
|
3586
|
-
},
|
|
3587
|
-
moveableOptions: {
|
|
3588
|
-
type: [Object, Function]
|
|
3589
|
-
},
|
|
3590
|
-
canSelect: {
|
|
3591
|
-
type: Function
|
|
3592
|
-
}
|
|
3593
|
-
},
|
|
3594
3609
|
setup() {
|
|
3595
3610
|
const services = vue.inject("services");
|
|
3596
3611
|
const workspace = vue.ref();
|
|
@@ -3701,13 +3716,8 @@
|
|
|
3701
3716
|
const _component_page_bar = vue.resolveComponent("page-bar");
|
|
3702
3717
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
3703
3718
|
(vue.openBlock(), vue.createBlock(_component_magic_stage, {
|
|
3704
|
-
key: _ctx.page?.id
|
|
3705
|
-
|
|
3706
|
-
"auto-scroll-into-view": _ctx.autoScrollIntoView,
|
|
3707
|
-
render: _ctx.render,
|
|
3708
|
-
"moveable-options": _ctx.moveableOptions,
|
|
3709
|
-
"can-select": _ctx.canSelect
|
|
3710
|
-
}, null, 8, ["runtime-url", "auto-scroll-into-view", "render", "moveable-options", "can-select"])),
|
|
3719
|
+
key: _ctx.page?.id
|
|
3720
|
+
})),
|
|
3711
3721
|
vue.renderSlot(_ctx.$slots, "workspace-content"),
|
|
3712
3722
|
vue.createVNode(_component_page_bar, null, {
|
|
3713
3723
|
"page-bar-title": vue.withCtx(({ page }) => [
|
|
@@ -3739,7 +3749,9 @@
|
|
|
3739
3749
|
var componentListService = new ComponentList();
|
|
3740
3750
|
|
|
3741
3751
|
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
3752
|
+
const MIN_LEFT_COLUMN_WIDTH = 45;
|
|
3742
3753
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
3754
|
+
const MIN_RIGHT_COLUMN_WIDTH = 1;
|
|
3743
3755
|
const COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorColumnWidthData";
|
|
3744
3756
|
const defaultColumnWidth = {
|
|
3745
3757
|
left: DEFAULT_LEFT_COLUMN_WIDTH,
|
|
@@ -3815,10 +3827,10 @@
|
|
|
3815
3827
|
...vue.toRaw(this.get("columnWidth"))
|
|
3816
3828
|
};
|
|
3817
3829
|
if (left) {
|
|
3818
|
-
columnWidth.left = left;
|
|
3830
|
+
columnWidth.left = Math.max(left, MIN_LEFT_COLUMN_WIDTH);
|
|
3819
3831
|
}
|
|
3820
3832
|
if (right) {
|
|
3821
|
-
columnWidth.right = right;
|
|
3833
|
+
columnWidth.right = Math.max(right, MIN_RIGHT_COLUMN_WIDTH);
|
|
3822
3834
|
}
|
|
3823
3835
|
if (!center || center === "auto") {
|
|
3824
3836
|
const bodyWidth = globalThis.document.body.clientWidth;
|
|
@@ -3912,7 +3924,8 @@
|
|
|
3912
3924
|
type: [Number, String]
|
|
3913
3925
|
},
|
|
3914
3926
|
canSelect: {
|
|
3915
|
-
type: Function
|
|
3927
|
+
type: Function,
|
|
3928
|
+
default: (el) => Boolean(el.id)
|
|
3916
3929
|
},
|
|
3917
3930
|
stageRect: {
|
|
3918
3931
|
type: [String, Object]
|
|
@@ -3920,6 +3933,9 @@
|
|
|
3920
3933
|
codeOptions: {
|
|
3921
3934
|
type: Object,
|
|
3922
3935
|
default: () => ({})
|
|
3936
|
+
},
|
|
3937
|
+
updateDragEl: {
|
|
3938
|
+
type: Function
|
|
3923
3939
|
}
|
|
3924
3940
|
},
|
|
3925
3941
|
emits: ["props-panel-mounted", "update:modelValue"],
|
|
@@ -3971,6 +3987,14 @@
|
|
|
3971
3987
|
vue.provide("services", services);
|
|
3972
3988
|
vue.provide("layerContentMenu", props.layerContentMenu);
|
|
3973
3989
|
vue.provide("stageContentMenu", props.stageContentMenu);
|
|
3990
|
+
vue.provide("stageOptions", vue.reactive({
|
|
3991
|
+
runtimeUrl: props.runtimeUrl,
|
|
3992
|
+
autoScrollIntoView: props.autoScrollIntoView,
|
|
3993
|
+
render: props.render,
|
|
3994
|
+
moveableOptions: props.moveableOptions,
|
|
3995
|
+
canSelect: props.canSelect,
|
|
3996
|
+
updateDragEl: props.updateDragEl
|
|
3997
|
+
}));
|
|
3974
3998
|
return services;
|
|
3975
3999
|
}
|
|
3976
4000
|
});
|
|
@@ -3993,13 +4017,7 @@
|
|
|
3993
4017
|
]),
|
|
3994
4018
|
workspace: vue.withCtx(() => [
|
|
3995
4019
|
vue.renderSlot(_ctx.$slots, "workspace", {}, () => [
|
|
3996
|
-
vue.createVNode(_component_workspace, {
|
|
3997
|
-
"runtime-url": _ctx.runtimeUrl,
|
|
3998
|
-
"auto-scroll-into-view": _ctx.autoScrollIntoView,
|
|
3999
|
-
render: _ctx.render,
|
|
4000
|
-
"moveable-options": _ctx.moveableOptions,
|
|
4001
|
-
"can-select": _ctx.canSelect
|
|
4002
|
-
}, {
|
|
4020
|
+
vue.createVNode(_component_workspace, null, {
|
|
4003
4021
|
"workspace-content": vue.withCtx(() => [
|
|
4004
4022
|
vue.renderSlot(_ctx.$slots, "workspace-content", { editorService: _ctx.editorService })
|
|
4005
4023
|
]),
|
|
@@ -4010,7 +4028,7 @@
|
|
|
4010
4028
|
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page })
|
|
4011
4029
|
]),
|
|
4012
4030
|
_: 3
|
|
4013
|
-
}
|
|
4031
|
+
})
|
|
4014
4032
|
])
|
|
4015
4033
|
]),
|
|
4016
4034
|
propsPanel: vue.withCtx(() => [
|
|
@@ -4029,7 +4047,7 @@
|
|
|
4029
4047
|
}
|
|
4030
4048
|
var Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
4031
4049
|
|
|
4032
|
-
var index$1 = /* #__PURE__ */ (() => ".m-editor-nav-menu {\n display: flex;\n z-index: 5;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n background-color: #ffffff;\n font-size: 19.2px;\n color: #070303;\n font-weight: 400;\n box-sizing: border-box;\n margin: 0px;\n flex: 0 0 35px;\n border-bottom: 1px solid #d8dee8;\n}\n.m-editor-nav-menu > div {\n display: flex;\n height: 100%;\n z-index: 1;\n align-items: center;\n}\n.m-editor-nav-menu .menu-center {\n justify-content: center;\n}\n.m-editor-nav-menu .menu-right {\n justify-content: flex-end;\n}\n.m-editor-nav-menu .menu-item {\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n vertical-align: middle;\n font-size: 14px;\n line-height: 1;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n box-sizing: inherit;\n z-index: 1;\n display: flex !important;\n transition: all 0.3s ease 0s;\n border-bottom: 2px solid transparent;\n margin: 0;\n}\n.m-editor-nav-menu .menu-item .is-disabled {\n opacity: 0.5;\n}\n.m-editor-nav-menu .menu-item .is-text {\n padding: 5px;\n}\n.m-editor-nav-menu .menu-item .is-text,\n.m-editor-nav-menu .menu-item i {\n color: #070303;\n}\n.m-editor-nav-menu .menu-item .icon {\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n height: 100%;\n padding: 0px 8px;\n}\n.m-editor-nav-menu .menu-item .menu-item-text {\n color: #070303;\n}\n.m-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.m-editor-content {\n width: 100%;\n height: calc(100% - 35px);\n display: flex;\n justify-self: space-between;\n}\n.m-editor-framework-center {\n position: relative;\n transform: translateZ(0);\n flex: 1;\n}\n.m-editor-framework-left {\n background-color: #ffffff;\n}\n.m-editor-framework-center .el-scrollbar__view {\n height: 100%;\n min-height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-empty-panel {\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n height: calc(100% - 32px);\n}\n.m-editor-empty-content {\n display: flex;\n justify-content: space-evenly;\n flex-direction: row;\n width: 100%;\n}\n.m-editor-empty-button {\n border: 3px solid rgba(0, 0, 0, 0.2);\n padding: 10px 40px;\n color: rgba(0, 0, 0, 0.6);\n cursor: pointer;\n}\n.m-editor-empty-button i {\n height: 180px;\n line-height: 180px;\n font-size: 100px;\n}\n.m-editor-empty-button p {\n text-align: center;\n font-size: 20px;\n margin-top: 5px;\n}\n.m-editor-empty-button:hover {\n border-color: #2882e0;\n color: #2882e0;\n}\n.m-editor-sidebar {\n height: 100%;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header {\n background: #2882e0;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header.is-left {\n width: 40px;\n margin-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav-wrap {\n margin: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav {\n border: 0;\n border-radius: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .tab-label {\n margin-left: 2px;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left {\n line-height: 15px;\n border: 0;\n height: auto;\n padding: 8px;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {\n background: #ffffff;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active i {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left:first-child {\n border-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i {\n font-size: 25px;\n color: rgba(255, 255, 255, 0.6);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {\n color: rgb(255, 255, 255);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {\n font-size: 12px;\n white-space: normal;\n}\n.m-editor-sidebar .el-scrollbar {\n height: 100%;\n}\n.m-editor-sidebar .el-tree {\n min-height: 100%;\n}\n.m-editor-sidebar .fold-icon {\n position: absolute;\n bottom: 8px;\n left: 0px;\n width: 45px;\n padding-left: 8px;\n color: #fff;\n font-size: 32px;\n opacity: 0.8;\n cursor: pointer;\n}\n.m-editor-sidebar .fold-icon:hover {\n background: rgba(0, 0, 0, 0.2);\n}\n.m-editor-sidebar .el-tabs__content,\n.m-editor-sidebar .el-tab-pane {\n height: 100%;\n}\n.magic-editor-layer-panel {\n background: #ffffff;\n}\n.magic-editor-layer-panel .search-input {\n background: #ffffff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.magic-editor-layer-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.magic-editor-layer-panel .node-content {\n flex: 1;\n display: flex;\n width: 100%;\n}\n.magic-editor-layer-panel .node-content > div {\n width: 8px;\n}\n.magic-editor-layer-panel .node-content > span {\n width: calc(100% - 68px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.magic-editor-layer-panel .node-content > i {\n margin-right: 10px;\n font-size: 20px;\n}\n.magic-editor-layer-panel .node-content > i.lock {\n color: #bbb;\n}\n.magic-editor-layer-panel,\n.magic-editor-layer-panel .el-tree {\n background-color: #ffffff;\n color: #313a40;\n}\n.magic-editor-layer-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.magic-editor-layer-panel .cus-tree-node {\n width: 100%;\n overflow: hidden;\n}\n.magic-editor-layer-panel .cus-tree-node-hover {\n background-color: #f3f5f9;\n width: 100%;\n}\n.magic-editor-layer-panel .el-tree-node:focus > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.ui-tree-tip {\n width: 100%;\n height: 25px;\n margin-left: 10px;\n background: #ffffff;\n font-style: italic;\n color: #555554;\n position: absolute;\n top: 40px;\n left: 0;\n z-index: 1;\n}\n.ui-component-panel {\n height: 100%;\n border-top: 0 !important;\n margin-top: 50px;\n background-color: #ffffff;\n}\n.ui-component-panel .search-input {\n background: #f8fbff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n z-index: 1;\n}\n.ui-component-panel .search-input .el-input__prefix {\n padding: 10px;\n}\n.ui-component-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.ui-component-panel .el-collapse-item > div:first-of-type {\n border-bottom: 1px solid #d9dbdd;\n margin-bottom: 10px;\n}\n.ui-component-panel .el-collapse-item__header {\n background: #ffffff;\n color: #070303;\n height: 25px;\n line-height: 25px;\n padding-left: 10px;\n font-size: 12px;\n}\n.ui-component-panel .el-collapse-item__header i {\n margin-right: 5px;\n font-size: 14px;\n}\n.ui-component-panel .el-collapse-item__wrap {\n background: #ffffff;\n border-bottom: 0;\n}\n.ui-component-panel .el-collapse-item__wrap .el-collapse-item__content {\n padding: 10px;\n display: flex;\n flex-wrap: wrap;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 5px 10px;\n box-sizing: border-box;\n color: #070303;\n flex-direction: column;\n width: 42px;\n cursor: pointer;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i {\n font-size: 20px;\n background: #fff;\n height: 40px;\n width: 40px;\n line-height: 40px;\n border-radius: 5px;\n color: #909090;\n border: 1px solid #d9dbdd;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n margin-bottom: 5px;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i:hover {\n background: #2882e0;\n color: #fff;\n border-color: #4e8be1;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item span {\n font-size: 12px;\n text-align: center;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item .el-tooltip {\n width: 50px;\n height: 30px;\n line-height: 15px;\n display: block;\n white-space: normal;\n margin: 0;\n}\n.m-editor-resizer {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n width: 8px;\n margin: 0 -5px;\n height: 100%;\n opacity: 0.9;\n background: padding-box #d8dee8;\n box-sizing: border-box;\n cursor: col-resize;\n z-index: 1;\n}\n.m-editor-resizer:hover {\n border-color: #d8dee8;\n}\n.m-editor-resizer .icon-container {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.4s;\n width: 20px;\n height: 120px;\n line-height: 120px;\n text-align: center;\n background: #d8dee8;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n}\n.m-editor-resizer .icon-container.position-left {\n transform: translate(calc(-100% - 4px), -50%);\n}\n.m-editor-resizer .icon-container.position-right {\n transform: translate(calc(100% + 4px), -50%);\n}\n.m-editor-resizer .icon {\n color: #fff;\n font-size: 18px;\n}\n.magic-editor-resizer:hover .icon-container {\n visibility: visible;\n opacity: 1;\n}\n.m-editor-workspace {\n height: 100%;\n width: 100%;\n user-select: none;\n}\n.m-editor-page-bar {\n position: fixed;\n bottom: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 32px;\n line-height: 32px;\n color: #070303;\n background-color: #f3f3f3;\n border-top: 1px solid #d9dbdd;\n z-index: 2;\n overflow: hidden;\n}\n.m-editor-page-bar-items {\n display: flex;\n transition: transform 0.3s;\n}\n.m-editor-page-bar-item {\n padding: 0 10px;\n cursor: pointer;\n border-right: 1px solid #d9dbdd;\n display: flex;\n justify-items: center;\n align-items: center;\n background-color: #f3f3f3;\n}\n.m-editor-page-bar-item.active {\n background-color: #fff;\n cursor: text;\n}\n.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {\n cursor: pointer;\n}\n.m-editor-page-bar-item-icon {\n position: relative;\n z-index: 1;\n}\n.m-editor-page-bar-item-title {\n max-width: 150px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.page-bar-popover.el-popper.el-popover {\n padding: 10px 0;\n}\n.page-bar-popover .menu-item {\n cursor: pointer;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n}\n.page-bar-popover .menu-item .el-button--text,\n.page-bar-popover .menu-item i {\n color: #070303;\n}\n.page-bar-popover .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-props-panel {\n padding: 0 10px;\n}\n.m-editor-props-panel.small .el-form-item__label {\n font-size: 12px;\n}\n.m-editor-props-panel.small .m-fieldset legend {\n font-size: 12px;\n}\n.m-editor-props-panel.small .el-tabs__item {\n font-size: 12px;\n}\n.m-editor-props-panel .el-input__wrapper {\n border-radius: 0;\n}\n.m-editor-props-panel-popper.small span,\n.m-editor-props-panel-popper.small a,\n.m-editor-props-panel-popper.small p {\n font-size: 12px;\n}\n.magic-editor-content-menu {\n position: fixed;\n font-size: 12px;\n background: #fff;\n box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);\n z-index: 9999;\n transform-origin: 0% 0%;\n font-weight: 600;\n padding: 4px 0px;\n overflow: auto;\n max-height: 100%;\n}\n.magic-editor-content-menu .menu-item {\n color: #333;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n min-width: 140px;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n border-left: 2px solid transparent;\n}\n.magic-editor-content-menu .menu-item .el-button {\n width: 100%;\n justify-content: flex-start;\n}\n.magic-editor-content-menu .menu-item .el-button--text,\n.magic-editor-content-menu .menu-item i {\n color: #070303;\n}\n.magic-editor-content-menu .menu-item.divider {\n padding: 0 14px;\n}\n.magic-editor-content-menu .menu-item.divider .el-divider {\n margin: 0;\n}\n.magic-editor-content-menu .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-stage {\n position: relative;\n width: 100%;\n height: calc(100% - 32px);\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-stage-container {\n width: 100%;\n height: 100%;\n z-index: 0;\n position: relative;\n border: 1px solid #d9dbdd;\n transition: transform 0.3s;\n box-sizing: content-box;\n}\n.m-editor-stage-container::-webkit-scrollbar {\n width: 0 !important;\n}\n.magic-code-editor {\n width: 100%;\n}\n.magic-code-editor .margin {\n margin: 0;\n}")();
|
|
4050
|
+
var index$1 = /* #__PURE__ */ (() => ".m-editor-nav-menu {\n display: flex;\n z-index: 5;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n background-color: #ffffff;\n font-size: 19.2px;\n color: #070303;\n font-weight: 400;\n box-sizing: border-box;\n margin: 0px;\n flex: 0 0 35px;\n border-bottom: 1px solid #d8dee8;\n}\n.m-editor-nav-menu > div {\n display: flex;\n height: 100%;\n z-index: 1;\n align-items: center;\n}\n.m-editor-nav-menu .menu-center {\n justify-content: center;\n}\n.m-editor-nav-menu .menu-right {\n justify-content: flex-end;\n}\n.m-editor-nav-menu .menu-item {\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n vertical-align: middle;\n font-size: 14px;\n line-height: 1;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n box-sizing: inherit;\n z-index: 1;\n display: flex !important;\n transition: all 0.3s ease 0s;\n border-bottom: 2px solid transparent;\n margin: 0;\n}\n.m-editor-nav-menu .menu-item .is-disabled {\n opacity: 0.5;\n}\n.m-editor-nav-menu .menu-item .is-text {\n padding: 5px;\n}\n.m-editor-nav-menu .menu-item .is-text,\n.m-editor-nav-menu .menu-item i {\n color: #070303;\n}\n.m-editor-nav-menu .menu-item .icon {\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n height: 100%;\n padding: 0px 8px;\n}\n.m-editor-nav-menu .menu-item .menu-item-text {\n color: #070303;\n}\n.m-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.m-editor-content {\n width: 100%;\n height: calc(100% - 35px);\n display: flex;\n justify-self: space-between;\n}\n.m-editor-framework-center {\n position: relative;\n transform: translateZ(0);\n flex: 1;\n}\n.m-editor-framework-left {\n background-color: #ffffff;\n}\n.m-editor-framework-center .el-scrollbar__view {\n height: 100%;\n min-height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-empty-panel {\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n height: calc(100% - 32px);\n}\n.m-editor-empty-content {\n display: flex;\n justify-content: space-evenly;\n flex-direction: row;\n width: 100%;\n}\n.m-editor-empty-button {\n border: 3px solid rgba(0, 0, 0, 0.2);\n padding: 10px 40px;\n color: rgba(0, 0, 0, 0.6);\n cursor: pointer;\n}\n.m-editor-empty-button i {\n height: 180px;\n line-height: 180px;\n font-size: 100px;\n}\n.m-editor-empty-button p {\n text-align: center;\n font-size: 20px;\n margin-top: 5px;\n}\n.m-editor-empty-button:hover {\n border-color: #2882e0;\n color: #2882e0;\n}\n.m-editor-sidebar {\n height: 100%;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header {\n background: #2882e0;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header.is-left {\n width: 40px;\n margin-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav-wrap {\n margin: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav {\n border: 0;\n border-radius: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .tab-label {\n margin-left: 2px;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left {\n line-height: 15px;\n border: 0;\n height: auto;\n padding: 8px;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {\n background: #ffffff;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active i {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left:first-child {\n border-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i {\n font-size: 25px;\n color: rgba(255, 255, 255, 0.6);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {\n color: rgb(255, 255, 255);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {\n font-size: 12px;\n white-space: normal;\n}\n.m-editor-sidebar .el-scrollbar {\n height: 100%;\n}\n.m-editor-sidebar .el-tree {\n min-height: 100%;\n}\n.m-editor-sidebar .fold-icon {\n position: absolute;\n bottom: 8px;\n left: 0px;\n width: 45px;\n padding-left: 8px;\n color: #fff;\n font-size: 32px;\n opacity: 0.8;\n cursor: pointer;\n}\n.m-editor-sidebar .fold-icon:hover {\n background: rgba(0, 0, 0, 0.2);\n}\n.m-editor-sidebar .el-tabs__content,\n.m-editor-sidebar .el-tab-pane {\n height: 100%;\n}\n.magic-editor-layer-panel {\n background: #ffffff;\n}\n.magic-editor-layer-panel .search-input {\n background: #ffffff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.magic-editor-layer-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.magic-editor-layer-panel .node-content {\n flex: 1;\n display: flex;\n width: 100%;\n}\n.magic-editor-layer-panel .node-content > div {\n width: 8px;\n}\n.magic-editor-layer-panel .node-content > span {\n width: calc(100% - 68px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.magic-editor-layer-panel .node-content > i {\n margin-right: 10px;\n font-size: 20px;\n}\n.magic-editor-layer-panel .node-content > i.lock {\n color: #bbb;\n}\n.magic-editor-layer-panel,\n.magic-editor-layer-panel .el-tree {\n background-color: #ffffff;\n color: #313a40;\n}\n.magic-editor-layer-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.magic-editor-layer-panel .cus-tree-node {\n width: 100%;\n overflow: hidden;\n}\n.magic-editor-layer-panel .cus-tree-node-hover {\n background-color: #f3f5f9;\n width: 100%;\n}\n.magic-editor-layer-panel .el-tree-node:focus > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.ui-tree-tip {\n width: 100%;\n height: 25px;\n margin-left: 10px;\n background: #ffffff;\n font-style: italic;\n color: #555554;\n position: absolute;\n top: 40px;\n left: 0;\n z-index: 1;\n}\n.ui-component-panel {\n height: 100%;\n border-top: 0 !important;\n margin-top: 50px;\n background-color: #ffffff;\n}\n.ui-component-panel .search-input {\n background: #f8fbff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n z-index: 1;\n}\n.ui-component-panel .search-input .el-input__prefix {\n padding: 10px;\n}\n.ui-component-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.ui-component-panel .el-collapse-item > div:first-of-type {\n border-bottom: 1px solid #d9dbdd;\n margin-bottom: 10px;\n}\n.ui-component-panel .el-collapse-item__header {\n background: #ffffff;\n color: #070303;\n height: 25px;\n line-height: 25px;\n padding-left: 10px;\n font-size: 12px;\n}\n.ui-component-panel .el-collapse-item__header i {\n margin-right: 5px;\n font-size: 14px;\n}\n.ui-component-panel .el-collapse-item__wrap {\n background: #ffffff;\n border-bottom: 0;\n}\n.ui-component-panel .el-collapse-item__wrap .el-collapse-item__content {\n padding: 10px;\n display: flex;\n flex-wrap: wrap;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 5px 10px;\n box-sizing: border-box;\n color: #070303;\n flex-direction: column;\n width: 42px;\n cursor: pointer;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i {\n font-size: 20px;\n background: #fff;\n height: 40px;\n width: 40px;\n line-height: 40px;\n border-radius: 5px;\n color: #909090;\n border: 1px solid #d9dbdd;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n margin-bottom: 5px;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i:hover {\n background: #2882e0;\n color: #fff;\n border-color: #4e8be1;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item span {\n font-size: 12px;\n text-align: center;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item .el-tooltip {\n width: 50px;\n height: 30px;\n line-height: 15px;\n display: block;\n white-space: normal;\n margin: 0;\n}\n.m-editor-resizer {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n width: 8px;\n margin: 0 -5px;\n height: 100%;\n opacity: 0.9;\n background: padding-box #d8dee8;\n box-sizing: border-box;\n cursor: col-resize;\n z-index: 1;\n}\n.m-editor-resizer:hover {\n border-color: #d8dee8;\n}\n.m-editor-resizer .icon-container {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.4s;\n width: 20px;\n height: 120px;\n line-height: 120px;\n text-align: center;\n background: #d8dee8;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n}\n.m-editor-resizer .icon-container.position-left {\n transform: translate(calc(-100% - 4px), -50%);\n}\n.m-editor-resizer .icon-container.position-right {\n transform: translate(calc(100% + 4px), -50%);\n}\n.m-editor-resizer .icon {\n color: #fff;\n font-size: 18px;\n}\n.magic-editor-resizer:hover .icon-container {\n visibility: visible;\n opacity: 1;\n}\n.m-editor-workspace {\n height: 100%;\n width: 100%;\n user-select: none;\n}\n.m-editor-workspace:focus-visible {\n outline: 0;\n}\n.m-editor-page-bar {\n position: fixed;\n bottom: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 32px;\n line-height: 32px;\n color: #070303;\n background-color: #f3f3f3;\n border-top: 1px solid #d9dbdd;\n z-index: 2;\n overflow: hidden;\n}\n.m-editor-page-bar-items {\n display: flex;\n transition: transform 0.3s;\n}\n.m-editor-page-bar-item {\n padding: 0 10px;\n cursor: pointer;\n border-right: 1px solid #d9dbdd;\n display: flex;\n justify-items: center;\n align-items: center;\n background-color: #f3f3f3;\n white-space: nowrap;\n}\n.m-editor-page-bar-item.active {\n background-color: #fff;\n cursor: text;\n}\n.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {\n cursor: pointer;\n}\n.m-editor-page-bar-item-icon {\n position: relative;\n z-index: 1;\n}\n.m-editor-page-bar-item-title {\n max-width: 150px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.page-bar-popover.el-popper.el-popover {\n padding: 10px 0;\n}\n.page-bar-popover .menu-item {\n cursor: pointer;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n}\n.page-bar-popover .menu-item .el-button--text,\n.page-bar-popover .menu-item i {\n color: #070303;\n}\n.page-bar-popover .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-props-panel {\n padding: 0 10px;\n}\n.m-editor-props-panel.small .el-form-item__label {\n font-size: 12px;\n}\n.m-editor-props-panel.small .m-fieldset legend {\n font-size: 12px;\n}\n.m-editor-props-panel.small .el-tabs__item {\n font-size: 12px;\n}\n.m-editor-props-panel .el-input__wrapper {\n border-radius: 0;\n}\n.m-editor-props-panel-popper.small span,\n.m-editor-props-panel-popper.small a,\n.m-editor-props-panel-popper.small p {\n font-size: 12px;\n}\n.magic-editor-content-menu {\n position: fixed;\n font-size: 12px;\n background: #fff;\n box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);\n z-index: 9999;\n transform-origin: 0% 0%;\n font-weight: 600;\n padding: 4px 0px;\n overflow: auto;\n max-height: 100%;\n}\n.magic-editor-content-menu .menu-item {\n color: #333;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n min-width: 140px;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n border-left: 2px solid transparent;\n}\n.magic-editor-content-menu .menu-item .el-button {\n width: 100%;\n justify-content: flex-start;\n}\n.magic-editor-content-menu .menu-item .el-button--text,\n.magic-editor-content-menu .menu-item i {\n color: #070303;\n}\n.magic-editor-content-menu .menu-item.divider {\n padding: 0 14px;\n}\n.magic-editor-content-menu .menu-item.divider .el-divider {\n margin: 0;\n}\n.magic-editor-content-menu .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-stage {\n position: relative;\n width: 100%;\n height: calc(100% - 32px);\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-stage-container {\n width: 100%;\n height: 100%;\n z-index: 0;\n position: relative;\n border: 1px solid #d9dbdd;\n transition: transform 0.3s;\n box-sizing: content-box;\n}\n.m-editor-stage-container::-webkit-scrollbar {\n width: 0 !important;\n}\n.magic-code-editor {\n width: 100%;\n}\n.magic-code-editor .margin {\n margin: 0;\n}")();
|
|
4033
4051
|
|
|
4034
4052
|
const defaultInstallOpt = {};
|
|
4035
4053
|
var index = {
|
|
@@ -4049,6 +4067,7 @@
|
|
|
4049
4067
|
exports.ComponentListPanel = ComponentListPanel;
|
|
4050
4068
|
exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
|
|
4051
4069
|
exports.Fixed2Other = Fixed2Other;
|
|
4070
|
+
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
4052
4071
|
exports.Keys = Keys;
|
|
4053
4072
|
exports.LayerOffset = LayerOffset;
|
|
4054
4073
|
exports.LayerPanel = LayerPanel;
|
|
@@ -4057,6 +4076,7 @@
|
|
|
4057
4076
|
exports.TMagicCodeEditor = CodeEditor;
|
|
4058
4077
|
exports.TMagicEditor = Editor;
|
|
4059
4078
|
exports.ToolButton = ToolButton;
|
|
4079
|
+
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
4060
4080
|
exports.change2Fixed = change2Fixed;
|
|
4061
4081
|
exports.debug = debug;
|
|
4062
4082
|
exports["default"] = index;
|
|
@@ -4064,11 +4084,11 @@
|
|
|
4064
4084
|
exports.error = error;
|
|
4065
4085
|
exports.eventsService = eventsService;
|
|
4066
4086
|
exports.fillConfig = fillConfig;
|
|
4067
|
-
exports.generateId = generateId;
|
|
4068
4087
|
exports.generatePageName = generatePageName;
|
|
4069
4088
|
exports.generatePageNameByApp = generatePageNameByApp;
|
|
4070
4089
|
exports.getConfig = getConfig;
|
|
4071
4090
|
exports.getDefaultPropsValue = getDefaultPropsValue;
|
|
4091
|
+
exports.getGuideLineFromCache = getGuideLineFromCache;
|
|
4072
4092
|
exports.getNodeIndex = getNodeIndex;
|
|
4073
4093
|
exports.getPageList = getPageList;
|
|
4074
4094
|
exports.getPageNameList = getPageNameList;
|
|
@@ -4080,7 +4100,6 @@
|
|
|
4080
4100
|
exports.propsService = propsService;
|
|
4081
4101
|
exports.setConfig = setConfig;
|
|
4082
4102
|
exports.setLayout = setLayout;
|
|
4083
|
-
exports.setNewItemId = setNewItemId;
|
|
4084
4103
|
exports.toRelative = toRelative;
|
|
4085
4104
|
exports.uiService = uiService;
|
|
4086
4105
|
exports.warn = warn;
|