@tmagic/editor 1.8.0-manmanyu.21 → 1.8.0-manmanyu.22

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.
Files changed (31) hide show
  1. package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +4 -0
  2. package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +56 -13
  3. package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +7 -0
  4. package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -0
  5. package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +6 -3
  6. package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
  7. package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +3 -0
  8. package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +4 -0
  9. package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +8 -2
  10. package/dist/es/services/ui.js +3 -0
  11. package/dist/es/style.css +9 -1
  12. package/dist/es/utils/const.js +1 -1
  13. package/dist/style.css +9 -1
  14. package/dist/themes/magic-admin.css +32 -13
  15. package/dist/tmagic-editor.umd.cjs +98 -19
  16. package/package.json +7 -7
  17. package/src/components/CodeBlockEditor.vue +3 -0
  18. package/src/components/FloatingBox.vue +71 -7
  19. package/src/fields/DataSourceFields.vue +5 -0
  20. package/src/fields/DataSourceMocks.vue +3 -0
  21. package/src/layouts/Framework.vue +7 -6
  22. package/src/layouts/props-panel/use-style-panel.ts +4 -3
  23. package/src/layouts/sidebar/Sidebar.vue +2 -0
  24. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
  25. package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
  26. package/src/services/ui.ts +6 -0
  27. package/src/theme/floating-box.scss +9 -1
  28. package/src/theme/themes/magic-admin/index.scss +31 -18
  29. package/src/type.ts +6 -0
  30. package/src/utils/const.ts +2 -2
  31. package/types/index.d.ts +13 -2
@@ -120,6 +120,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
120
120
  changedValue.value = void 0;
121
121
  };
122
122
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
123
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
123
124
  watch(boxVisible, (visible) => {
124
125
  nextTick(() => {
125
126
  if (!visible) emit("close");
@@ -145,7 +146,9 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
145
146
  "onUpdate:width": _cache[2] || (_cache[2] = ($event) => width.value = $event),
146
147
  height: unref(codeBlockEditorHeight),
147
148
  "onUpdate:height": _cache[3] || (_cache[3] = ($event) => isRef(codeBlockEditorHeight) ? codeBlockEditorHeight.value = $event : null),
149
+ "body-style": { padding: "0 16px" },
148
150
  title: __props.content.name ? `${__props.disabled ? "查看" : "编辑"}${__props.content.name}` : "新增代码",
151
+ "framework-width": frameworkWidth.value,
149
152
  position: unref(boxPosition),
150
153
  "before-close": beforeClose
151
154
  }, {
@@ -187,6 +190,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
187
190
  "width",
188
191
  "height",
189
192
  "title",
193
+ "framework-width",
190
194
  "position"
191
195
  ]),
192
196
  (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(unref(TMagicDialog), {
@@ -1,7 +1,6 @@
1
- import { useServices } from "../hooks/use-services.js";
2
1
  import Icon_default from "./Icon.js";
3
2
  import { TMagicButton, useThemeClass, useZIndex } from "@tmagic/design";
4
- import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, openBlock, provide, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
3
+ import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeStyle, onBeforeUnmount, openBlock, provide, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
5
4
  import { Close } from "@element-plus/icons-vue";
6
5
  import VanillaMoveable from "moveable";
7
6
  //#region packages/editor/src/components/FloatingBox.vue?vue&type=script&setup=true&lang.ts
@@ -17,6 +16,9 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
17
16
  top: 0
18
17
  }) },
19
18
  title: { default: "" },
19
+ bodyStyle: {},
20
+ initialStyle: { default: () => ({}) },
21
+ frameworkWidth: { default: 0 },
20
22
  beforeClose: {}
21
23
  }, {
22
24
  "width": { default: 0 },
@@ -54,19 +56,51 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
54
56
  if (targetEl.value) return targetEl.value.clientHeight - titleHeight.value;
55
57
  return "auto";
56
58
  });
57
- const { uiService } = useServices();
58
- const frameworkWidth = computed(() => uiService.get("frameworkRect").width || 0);
59
59
  const style = computed(() => {
60
60
  let { left } = props.position;
61
- if (width.value) left = left + width.value > frameworkWidth.value ? frameworkWidth.value - width.value : left;
61
+ const frameworkWidth = props.frameworkWidth || globalThis.window?.innerWidth || 0;
62
+ if (width.value && frameworkWidth) left = left + width.value > frameworkWidth ? frameworkWidth - width.value : left;
62
63
  return {
63
64
  left: `${left}px`,
64
65
  top: `${props.position.top}px`,
65
66
  width: width.value ? `${width.value}px` : "auto",
66
- height: height.value ? `${height.value}px` : "auto"
67
+ height: height.value ? `${height.value}px` : "auto",
68
+ ...props.initialStyle
67
69
  };
68
70
  });
69
71
  let moveable = null;
72
+ let dragMask = null;
73
+ let dragMaskVisible = false;
74
+ const bindDragMaskSafety = () => {
75
+ globalThis.window?.addEventListener("pointerup", hideDragMask, true);
76
+ globalThis.window?.addEventListener("blur", hideDragMask);
77
+ globalThis.document?.addEventListener("visibilitychange", hideDragMask);
78
+ };
79
+ const unbindDragMaskSafety = () => {
80
+ globalThis.window?.removeEventListener("pointerup", hideDragMask, true);
81
+ globalThis.window?.removeEventListener("blur", hideDragMask);
82
+ globalThis.document?.removeEventListener("visibilitychange", hideDragMask);
83
+ };
84
+ const showDragMask = () => {
85
+ if (dragMaskVisible) return;
86
+ if (!dragMask) {
87
+ dragMask = globalThis.document.createElement("div");
88
+ dragMask.className = "m-editor-float-box-drag-mask";
89
+ }
90
+ globalThis.document.body.appendChild(dragMask);
91
+ dragMaskVisible = true;
92
+ bindDragMaskSafety();
93
+ const setMaskZIndex = () => {
94
+ if (dragMask) dragMask.style.zIndex = `${curZIndex.value + 1}`;
95
+ };
96
+ setMaskZIndex();
97
+ nextTick(setMaskZIndex);
98
+ };
99
+ const hideDragMask = () => {
100
+ unbindDragMaskSafety();
101
+ dragMask?.parentNode?.removeChild(dragMask);
102
+ dragMaskVisible = false;
103
+ };
70
104
  const initMoveable = () => {
71
105
  moveable = new VanillaMoveable(globalThis.document.body, {
72
106
  className: "m-editor-floating-box-moveable",
@@ -89,6 +123,10 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
89
123
  position: "css"
90
124
  }
91
125
  });
126
+ moveable.on("drag", showDragMask);
127
+ moveable.on("resize", showDragMask);
128
+ moveable.on("dragEnd", hideDragMask);
129
+ moveable.on("resizeEnd", hideDragMask);
92
130
  moveable.on("drag", (e) => {
93
131
  e.target.style.transform = e.transform;
94
132
  });
@@ -101,6 +139,7 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
101
139
  });
102
140
  };
103
141
  const destroyMoveable = () => {
142
+ hideDragMask();
104
143
  moveable?.destroy();
105
144
  moveable = null;
106
145
  };
@@ -140,15 +179,16 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
140
179
  return visible.value ? (openBlock(), createBlock(Teleport, {
141
180
  key: 0,
142
181
  to: "body"
143
- }, [createElementVNode("div", {
182
+ }, [createElementVNode("div", mergeProps({
144
183
  ref: "target",
145
- class: normalizeClass(["m-editor-float-box", unref(themeClass)]),
146
- style: normalizeStyle({
184
+ class: ["m-editor-float-box", unref(themeClass)]
185
+ }, _ctx.$attrs, {
186
+ style: {
147
187
  ...style.value,
148
188
  zIndex: curZIndex.value
149
- }),
189
+ },
150
190
  onMousedown: nextZIndex
151
- }, [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
191
+ }), [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
152
192
  link: "",
153
193
  size: "small",
154
194
  onClick: closeHandler
@@ -157,8 +197,11 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
157
197
  _: 1
158
198
  })])], 512), createElementVNode("div", {
159
199
  class: "m-editor-float-box-body",
160
- style: normalizeStyle({ height: `${bodyHeight.value}px` })
161
- }, [renderSlot(_ctx.$slots, "body")], 4)], 38)])) : createCommentVNode("v-if", true);
200
+ style: normalizeStyle({
201
+ height: `${bodyHeight.value}px`,
202
+ ...__props.bodyStyle
203
+ })
204
+ }, [renderSlot(_ctx.$slots, "body")], 4)], 16)])) : createCommentVNode("v-if", true);
162
205
  };
163
206
  }
164
207
  });
@@ -316,6 +316,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
316
316
  const addFromJsonDialogVisible = useModel(__props, "visible1");
317
317
  const { height: editorHeight } = useEditorContentHeight();
318
318
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
319
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
319
320
  /**
320
321
  * 由 DataSourceConfigPanel 注入:打开数据源详情后需要直接打开的字段路径(字段名数组)。
321
322
  * 当前层消费 path[0],并把剩余路径下发给嵌套字段,实现逐层打开。
@@ -356,6 +357,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
356
357
  _: 1
357
358
  }, 8, ["disabled"])])) : createCommentVNode("v-if", true),
358
359
  createVNode(FloatingBox_default, {
360
+ "body-style": { padding: "0 16px" },
359
361
  visible: addDialogVisible.value,
360
362
  "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
361
363
  width: width.value,
@@ -363,6 +365,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
363
365
  height: unref(editorHeight),
364
366
  "onUpdate:height": _cache[4] || (_cache[4] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
365
367
  title: fieldTitle.value,
368
+ "framework-width": frameworkWidth.value,
366
369
  position: unref(boxPosition)
367
370
  }, {
368
371
  body: withCtx(() => [createVNode(unref(MFormBox), {
@@ -385,9 +388,11 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
385
388
  "width",
386
389
  "height",
387
390
  "title",
391
+ "framework-width",
388
392
  "position"
389
393
  ]),
390
394
  createVNode(FloatingBox_default, {
395
+ "body-style": { padding: "0 16px" },
391
396
  visible: addFromJsonDialogVisible.value,
392
397
  "onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
393
398
  width: width.value,
@@ -395,6 +400,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
395
400
  height: unref(editorHeight),
396
401
  "onUpdate:height": _cache[7] || (_cache[7] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
397
402
  title: "快速添加数据定义",
403
+ "framework-width": frameworkWidth.value,
398
404
  position: unref(boxPosition)
399
405
  }, {
400
406
  body: withCtx(() => [createVNode(unref(MFormBox), {
@@ -408,6 +414,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
408
414
  "visible",
409
415
  "width",
410
416
  "height",
417
+ "framework-width",
411
418
  "position"
412
419
  ])
413
420
  ]);
@@ -216,6 +216,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
216
216
  const addDialogVisible = useModel(__props, "visible");
217
217
  const { height: editorHeight } = useEditorContentHeight();
218
218
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
219
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
219
220
  return (_ctx, _cache) => {
220
221
  return openBlock(), createElementBlock("div", _hoisted_1, [
221
222
  createVNode(unref(MagicTable), {
@@ -233,6 +234,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
233
234
  _: 1
234
235
  }, 8, ["disabled"])])) : createCommentVNode("v-if", true),
235
236
  createVNode(FloatingBox_default, {
237
+ "body-style": { padding: "0 16px" },
236
238
  visible: addDialogVisible.value,
237
239
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
238
240
  width: width.value,
@@ -240,6 +242,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
240
242
  height: unref(editorHeight),
241
243
  "onUpdate:height": _cache[3] || (_cache[3] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
242
244
  title: drawerTitle.value,
245
+ "framework-width": frameworkWidth.value,
243
246
  position: unref(boxPosition)
244
247
  }, {
245
248
  body: withCtx(() => [createVNode(unref(MFormBox), {
@@ -260,6 +263,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
260
263
  "width",
261
264
  "height",
262
265
  "title",
266
+ "framework-width",
263
267
  "position"
264
268
  ])
265
269
  ]);
@@ -29,6 +29,9 @@ var Framework_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
29
29
  const pageLength = computed(() => editorService.get("pageLength") || 0);
30
30
  const showSrc = computed(() => uiService.get("showSrc"));
31
31
  const columnWidth = computed(() => uiService.get("columnWidth"));
32
+ const minLeftColumnWidth = computed(() => uiService.get("minLeftColumnWidth"));
33
+ const minCenterColumnWidth = computed(() => uiService.get("minCenterColumnWidth"));
34
+ const minRightColumnWidth = computed(() => uiService.get("minRightColumnWidth"));
32
35
  watch(pageLength, () => {
33
36
  splitViewRef.value?.updateWidth();
34
37
  });
@@ -95,9 +98,9 @@ var Framework_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
95
98
  "right-class": "m-editor-framework-right",
96
99
  left: __props.hideSidebar ? void 0 : columnWidth.value.left,
97
100
  right: columnWidth.value.right,
98
- "min-left": __props.hideSidebar ? 0 : unref(252),
99
- "min-right": unref(300),
100
- "min-center": unref(400),
101
+ "min-left": __props.hideSidebar ? 0 : minLeftColumnWidth.value,
102
+ "min-right": minRightColumnWidth.value,
103
+ "min-center": minCenterColumnWidth.value,
101
104
  width: frameworkRect.value.width,
102
105
  onChange: columnWidthChange
103
106
  }, createSlots({
@@ -23,8 +23,9 @@ var useStylePanel = ({ uiService, storageService }, propsPanelWidth) => {
23
23
  columnWidth.center += propsPanelWidth.value;
24
24
  }
25
25
  if (columnWidth.center < 0) {
26
- columnWidth.right = columnWidth.right + columnWidth.center - 400;
27
- columnWidth.center = 400;
26
+ const minCenterColumnWidth = uiService.get("minCenterColumnWidth");
27
+ columnWidth.right = columnWidth.right + columnWidth.center - minCenterColumnWidth;
28
+ columnWidth.center = minCenterColumnWidth;
28
29
  propsPanelWidth.value = columnWidth.right / 2;
29
30
  }
30
31
  storageService.setItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY, columnWidth.right, { protocol: Protocol.NUMBER });
@@ -61,6 +61,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
61
61
  const taskLength = computed(() => depService.get("taskLength"));
62
62
  const tipsBarVisible = ref(true);
63
63
  const columnLeftWidth = computed(() => uiService.get("columnWidth")[ColumnLayout.LEFT]);
64
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
64
65
  const { height: editorContentHeight } = useEditorContentHeight();
65
66
  const columnLeftHeight = ref(0);
66
67
  const unWatchEditorContentHeight = watch(editorContentHeight, (height) => {
@@ -301,6 +302,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
301
302
  "onUpdate:height": _cache[2] || (_cache[2] = ($event) => columnLeftHeight.value = $event),
302
303
  width: columnLeftWidth.value,
303
304
  title: config.text,
305
+ "framework-width": frameworkWidth.value,
304
306
  position: {
305
307
  left: unref(floatBoxStates)[config.$key].left,
306
308
  top: unref(floatBoxStates)[config.$key].top
@@ -317,6 +319,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
317
319
  "height",
318
320
  "width",
319
321
  "title",
322
+ "framework-width",
320
323
  "position"
321
324
  ])) : createCommentVNode("v-if", true)], 64);
322
325
  }), 256))]))], 64);
@@ -39,6 +39,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
39
39
  const dataSourceConfig = ref([]);
40
40
  const { height: editorHeight } = useEditorContentHeight();
41
41
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
42
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
42
43
  /** 供「方法定义」tab 内的字段消费,用于打开数据源详情后自动打开指定方法 */
43
44
  provide("editingDataSourceMethodName", computed(() => props.editMethodName));
44
45
  /** 供「数据定义」tab 内的字段消费,用于打开数据源详情后自动打开指定字段 */
@@ -77,6 +78,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
77
78
  });
78
79
  return (_ctx, _cache) => {
79
80
  return openBlock(), createBlock(FloatingBox_default, {
81
+ "body-style": { padding: "0 16px" },
80
82
  visible: boxVisible.value,
81
83
  "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
82
84
  width: width.value,
@@ -84,6 +86,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
84
86
  height: unref(editorHeight),
85
87
  "onUpdate:height": _cache[2] || (_cache[2] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
86
88
  title: __props.title,
89
+ "framework-width": frameworkWidth.value,
87
90
  position: unref(boxPosition)
88
91
  }, {
89
92
  body: withCtx(() => [createVNode(unref(MFormBox), {
@@ -107,6 +110,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
107
110
  "width",
108
111
  "height",
109
112
  "title",
113
+ "framework-width",
110
114
  "position"
111
115
  ]);
112
116
  };
@@ -11,7 +11,8 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
11
11
  __name: "NodeListMenu",
12
12
  setup(__props) {
13
13
  const services = useServices();
14
- const { editorService } = services;
14
+ const { editorService, uiService } = services;
15
+ const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
15
16
  const visible = ref(false);
16
17
  const buttonVisible = ref(false);
17
18
  const buttonEl = useTemplateRef("button");
@@ -71,6 +72,7 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
71
72
  visible: visible.value,
72
73
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
73
74
  title: "当前位置下的组件",
75
+ "framework-width": frameworkWidth.value,
74
76
  position: menuPosition.value
75
77
  }, {
76
78
  body: withCtx(() => [createVNode(Tree_default, {
@@ -80,7 +82,11 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
80
82
  onNodeClick: clickHandler
81
83
  }, null, 8, ["data", "node-status-map"])]),
82
84
  _: 1
83
- }, 8, ["visible", "position"])) : createCommentVNode("v-if", true)], 64);
85
+ }, 8, [
86
+ "visible",
87
+ "framework-width",
88
+ "position"
89
+ ])) : createCommentVNode("v-if", true)], 64);
84
90
  };
85
91
  }
86
92
  });
@@ -23,6 +23,9 @@ var state = shallowReactive({
23
23
  center: 0,
24
24
  right: storage_default.getItem("$MagicEditorRightColumnWidthData", { protocol: Protocol.NUMBER }) || 480
25
25
  },
26
+ minLeftColumnWidth: 260,
27
+ minCenterColumnWidth: 400,
28
+ minRightColumnWidth: 300,
26
29
  showGuides: true,
27
30
  hasGuides: false,
28
31
  showRule: true,
package/dist/es/style.css CHANGED
@@ -2260,13 +2260,21 @@ fieldset.m-fieldset .m-form-tip {
2260
2260
  .m-editor-float-box .m-editor-float-box-body {
2261
2261
  overflow: auto;
2262
2262
  flex: 1;
2263
- padding: 0 16px;
2264
2263
  }
2265
2264
 
2266
2265
  .m-editor-floating-box-moveable {
2267
2266
  opacity: 0;
2268
2267
  }
2269
2268
 
2269
+ .m-editor-float-box-drag-mask {
2270
+ position: fixed;
2271
+ top: 0;
2272
+ left: 0;
2273
+ width: 100%;
2274
+ height: 100%;
2275
+ background-color: transparent;
2276
+ }
2277
+
2270
2278
  .m-fields-page-fragment-select {
2271
2279
  width: 100%;
2272
2280
  }
@@ -6,7 +6,7 @@ var RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
6
6
  var PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
7
7
  var DEFAULT_LEFT_COLUMN_WIDTH = 310;
8
8
  var DEFAULT_RIGHT_COLUMN_WIDTH = 480;
9
- var MIN_LEFT_COLUMN_WIDTH = 252;
9
+ var MIN_LEFT_COLUMN_WIDTH = 260;
10
10
  var MIN_CENTER_COLUMN_WIDTH = 400;
11
11
  var MIN_RIGHT_COLUMN_WIDTH = 300;
12
12
  var H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
package/dist/style.css CHANGED
@@ -2260,13 +2260,21 @@ fieldset.m-fieldset .m-form-tip {
2260
2260
  .m-editor-float-box .m-editor-float-box-body {
2261
2261
  overflow: auto;
2262
2262
  flex: 1;
2263
- padding: 0 16px;
2264
2263
  }
2265
2264
 
2266
2265
  .m-editor-floating-box-moveable {
2267
2266
  opacity: 0;
2268
2267
  }
2269
2268
 
2269
+ .m-editor-float-box-drag-mask {
2270
+ position: fixed;
2271
+ top: 0;
2272
+ left: 0;
2273
+ width: 100%;
2274
+ height: 100%;
2275
+ background-color: transparent;
2276
+ }
2277
+
2270
2278
  .m-fields-page-fragment-select {
2271
2279
  width: 100%;
2272
2280
  }
@@ -2293,13 +2293,21 @@ fieldset.m-fieldset .m-form-tip {
2293
2293
  .m-editor-float-box .m-editor-float-box-body {
2294
2294
  overflow: auto;
2295
2295
  flex: 1;
2296
- padding: 0 16px;
2297
2296
  }
2298
2297
 
2299
2298
  .m-editor-floating-box-moveable {
2300
2299
  opacity: 0;
2301
2300
  }
2302
2301
 
2302
+ .m-editor-float-box-drag-mask {
2303
+ position: fixed;
2304
+ top: 0;
2305
+ left: 0;
2306
+ width: 100%;
2307
+ height: 100%;
2308
+ background-color: transparent;
2309
+ }
2310
+
2303
2311
  .m-fields-page-fragment-select {
2304
2312
  width: 100%;
2305
2313
  }
@@ -2753,9 +2761,12 @@ fieldset.m-fieldset .m-form-tip {
2753
2761
  }
2754
2762
 
2755
2763
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header {
2756
- padding: 8px 0;
2757
- width: 52px;
2764
+ width: 61px;
2765
+ padding-top: 4px;
2766
+ flex-shrink: 0;
2767
+ border-right: 1px solid rgba(0, 84, 225, 0.1);
2758
2768
  display: flex;
2769
+ background-color: #fff;
2759
2770
  box-sizing: border-box;
2760
2771
  flex-direction: column;
2761
2772
  align-items: center;
@@ -2764,24 +2775,26 @@ fieldset.m-fieldset .m-form-tip {
2764
2775
  display: flex;
2765
2776
  flex-direction: column;
2766
2777
  align-items: center;
2767
- padding: 6px 0;
2768
- width: 40px;
2778
+ border-radius: 4px;
2779
+ padding: 4px 2px;
2780
+ width: 52px;
2769
2781
  margin-bottom: 4px;
2782
+ box-sizing: border-box;
2770
2783
  background-color: transparent;
2784
+ color: #84909d;
2771
2785
  }
2772
2786
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item:hover {
2773
- background-color: rgba(0, 0, 0, 0.1);
2787
+ background-color: rgba(0, 0, 0, 0.05);
2774
2788
  }
2775
2789
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item > i {
2776
- color: #ffffff;
2790
+ color: #84909d;
2777
2791
  }
2778
2792
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active {
2779
- background-color: #fff;
2780
- border-radius: 4px;
2793
+ background-color: var(--el-button-hover-bg-color, rgb(230, 238, 253));
2781
2794
  color: var(--el-color-primary);
2782
2795
  }
2783
2796
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active:hover {
2784
- background-color: #fff;
2797
+ background-color: var(--el-button-hover-bg-color, rgb(230, 238, 253));
2785
2798
  }
2786
2799
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active > i {
2787
2800
  color: var(--el-color-primary);
@@ -2790,11 +2803,17 @@ fieldset.m-fieldset .m-form-tip {
2790
2803
  color: var(--el-color-primary);
2791
2804
  }
2792
2805
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item .magic-editor-tab-panel-title {
2793
- font-size: 10px;
2806
+ font-size: 12px;
2794
2807
  line-height: 14px;
2795
- font-weight: 600;
2808
+ font-weight: 400;
2809
+ margin: 0 4px;
2810
+ width: 52px;
2811
+ text-align: center;
2812
+ }
2813
+ .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-content {
2814
+ width: calc(100% - 61px);
2796
2815
  }
2797
- .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item .m-editor-props-panel .el-input__wrapper {
2816
+ .m-editor.m-editor--magic-admin .m-editor-props-panel .el-input__wrapper {
2798
2817
  border-radius: 4px;
2799
2818
  }
2800
2819
  .m-editor.m-editor--magic-admin .border-box-container .border-icon-container .border-icon {