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

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 (37) hide show
  1. package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +4 -0
  2. package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +5 -2
  3. package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +56 -13
  4. package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +7 -0
  5. package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -0
  6. package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +6 -3
  7. package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +4 -1
  8. package/dist/es/layouts/history-list/useHistoryRevert.js +7 -3
  9. package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
  10. package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +3 -0
  11. package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +4 -0
  12. package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +8 -2
  13. package/dist/es/services/ui.js +3 -0
  14. package/dist/es/style.css +9 -1
  15. package/dist/es/utils/const.js +1 -1
  16. package/dist/style.css +9 -1
  17. package/dist/themes/magic-admin.css +37 -13
  18. package/dist/tmagic-editor.umd.cjs +114 -25
  19. package/package.json +7 -7
  20. package/src/components/CodeBlockEditor.vue +3 -0
  21. package/src/components/CompareForm.vue +7 -0
  22. package/src/components/FloatingBox.vue +71 -7
  23. package/src/fields/DataSourceFields.vue +5 -0
  24. package/src/fields/DataSourceMocks.vue +3 -0
  25. package/src/layouts/Framework.vue +7 -6
  26. package/src/layouts/history-list/HistoryDiffDialog.vue +11 -1
  27. package/src/layouts/history-list/useHistoryRevert.ts +4 -0
  28. package/src/layouts/props-panel/use-style-panel.ts +4 -3
  29. package/src/layouts/sidebar/Sidebar.vue +2 -0
  30. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
  31. package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
  32. package/src/services/ui.ts +6 -0
  33. package/src/theme/floating-box.scss +9 -1
  34. package/src/theme/themes/magic-admin/index.scss +44 -18
  35. package/src/type.ts +12 -0
  36. package/src/utils/const.ts +2 -2
  37. package/types/index.d.ts +26 -4
@@ -8,10 +8,12 @@
8
8
  </div>
9
9
 
10
10
  <FloatingBox
11
+ :body-style="{ padding: '0 16px' }"
11
12
  v-model:visible="addDialogVisible"
12
13
  v-model:width="width"
13
14
  v-model:height="editorHeight"
14
15
  :title="fieldTitle"
16
+ :framework-width="frameworkWidth"
15
17
  :position="boxPosition"
16
18
  >
17
19
  <template #body>
@@ -28,10 +30,12 @@
28
30
  </FloatingBox>
29
31
 
30
32
  <FloatingBox
33
+ :body-style="{ padding: '0 16px' }"
31
34
  v-model:visible="addFromJsonDialogVisible"
32
35
  v-model:width="width"
33
36
  v-model:height="editorHeight"
34
37
  title="快速添加数据定义"
38
+ :framework-width="frameworkWidth"
35
39
  :position="boxPosition"
36
40
  >
37
41
  <template #body>
@@ -358,6 +362,7 @@ const { height: editorHeight } = useEditorContentHeight();
358
362
 
359
363
  const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
360
364
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
365
+ const frameworkWidth = computed(() => uiService.get('frameworkRect')?.width || 0);
361
366
 
362
367
  /**
363
368
  * 由 DataSourceConfigPanel 注入:打开数据源详情后需要直接打开的字段路径(字段名数组)。
@@ -7,10 +7,12 @@
7
7
  </div>
8
8
 
9
9
  <FloatingBox
10
+ :body-style="{ padding: '0 16px' }"
10
11
  v-model:visible="addDialogVisible"
11
12
  v-model:width="width"
12
13
  v-model:height="editorHeight"
13
14
  :title="drawerTitle"
15
+ :framework-width="frameworkWidth"
14
16
  :position="boxPosition"
15
17
  >
16
18
  <template #body>
@@ -254,4 +256,5 @@ const addDialogVisible = defineModel<boolean>('visible', { default: false });
254
256
  const { height: editorHeight } = useEditorContentHeight();
255
257
  const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
256
258
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
259
+ const frameworkWidth = computed(() => uiService.get('frameworkRect')?.width || 0);
257
260
  </script>
@@ -29,9 +29,9 @@
29
29
  right-class="m-editor-framework-right"
30
30
  :left="hideSidebar ? undefined : columnWidth.left"
31
31
  :right="columnWidth.right"
32
- :min-left="hideSidebar ? 0 : MIN_LEFT_COLUMN_WIDTH"
33
- :min-right="MIN_RIGHT_COLUMN_WIDTH"
34
- :min-center="MIN_CENTER_COLUMN_WIDTH"
32
+ :min-left="hideSidebar ? 0 : minLeftColumnWidth"
33
+ :min-right="minRightColumnWidth"
34
+ :min-center="minCenterColumnWidth"
35
35
  :width="frameworkRect.width"
36
36
  @change="columnWidthChange"
37
37
  >
@@ -82,9 +82,6 @@ import { getEditorConfig } from '@editor/utils/config';
82
82
  import {
83
83
  DEFAULT_LEFT_COLUMN_WIDTH,
84
84
  LEFT_COLUMN_WIDTH_STORAGE_KEY,
85
- MIN_CENTER_COLUMN_WIDTH,
86
- MIN_LEFT_COLUMN_WIDTH,
87
- MIN_RIGHT_COLUMN_WIDTH,
88
85
  RIGHT_COLUMN_WIDTH_STORAGE_KEY,
89
86
  } from '@editor/utils/const';
90
87
 
@@ -122,6 +119,10 @@ const showSrc = computed(() => uiService.get('showSrc'));
122
119
 
123
120
  const columnWidth = computed(() => uiService.get('columnWidth'));
124
121
 
122
+ const minLeftColumnWidth = computed(() => uiService.get('minLeftColumnWidth'));
123
+ const minCenterColumnWidth = computed(() => uiService.get('minCenterColumnWidth'));
124
+ const minRightColumnWidth = computed(() => uiService.get('minRightColumnWidth'));
125
+
125
126
  watch(pageLength, () => {
126
127
  splitViewRef.value?.updateWidth();
127
128
  });
@@ -48,6 +48,7 @@
48
48
  :load-config="loadConfig"
49
49
  :self-diff-field-types="selfDiffFieldTypes"
50
50
  :services="props.services"
51
+ :size="props.size"
51
52
  height="70vh"
52
53
  />
53
54
 
@@ -77,7 +78,14 @@
77
78
  import { computed, ref, watch } from 'vue';
78
79
  import { isEqual } from 'lodash-es';
79
80
 
80
- import { TMagicButton, TMagicDialog, TMagicRadioButton, TMagicRadioGroup, TMagicTag } from '@tmagic/design';
81
+ import {
82
+ type FieldSize,
83
+ TMagicButton,
84
+ TMagicDialog,
85
+ TMagicRadioButton,
86
+ TMagicRadioGroup,
87
+ TMagicTag,
88
+ } from '@tmagic/design';
81
89
  import type { FormState } from '@tmagic/form';
82
90
 
83
91
  import CompareForm from '@editor/components/CompareForm.vue';
@@ -104,6 +112,8 @@ const props = withDefaults(
104
112
  */
105
113
  loadConfig?: CompareFormLoadConfig;
106
114
  width?: string;
115
+ /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
116
+ size?: FieldSize;
107
117
  isConfirm?: boolean;
108
118
  onConfirm?: () => void;
109
119
  selfDiffFieldTypes?: string[];
@@ -95,6 +95,7 @@ const mountHistoryDiffDialog = async (
95
95
  selfDiffFieldTypes: options.selfDiffFieldTypes,
96
96
  compareFormState: options.compareFormState,
97
97
  width: options.width,
98
+ size: options.size ?? options.services?.uiService?.get('propsPanelSize'),
98
99
  onClose: options.onClose,
99
100
  });
100
101
  if (options.appContext) {
@@ -223,6 +224,7 @@ export const useHistoryRevert = (options: UseHistoryRevertOptions = {}, services
223
224
  services,
224
225
  ...extra,
225
226
  width: extra?.width ?? dialogWidth,
227
+ size: extra?.size,
226
228
  });
227
229
  }
228
230
  return confirmRevert();
@@ -382,6 +384,7 @@ export const useHistoryRevert = (options: UseHistoryRevertOptions = {}, services
382
384
  loadConfig: revertOptions.loadConfig,
383
385
  selfDiffFieldTypes: revertOptions.selfDiffFieldTypes,
384
386
  width: revertOptions.width,
387
+ size: revertOptions.size,
385
388
  });
386
389
  if (!confirmed) return null;
387
390
  return await revertOptions.revert();
@@ -399,6 +402,7 @@ export const useHistoryRevert = (options: UseHistoryRevertOptions = {}, services
399
402
  services,
400
403
  ...extra,
401
404
  width: extra?.width ?? dialogWidth,
405
+ size: extra?.size,
402
406
  });
403
407
  };
404
408
 
@@ -2,7 +2,7 @@ import { computed, type Ref, watch } from 'vue';
2
2
 
3
3
  import { Protocol } from '@editor/services/storage';
4
4
  import { Services } from '@editor/type';
5
- import { MIN_CENTER_COLUMN_WIDTH, RIGHT_COLUMN_WIDTH_STORAGE_KEY } from '@editor/utils/const';
5
+ import { RIGHT_COLUMN_WIDTH_STORAGE_KEY } from '@editor/utils/const';
6
6
 
7
7
  export const useStylePanel = (
8
8
  { uiService, storageService }: Pick<Services, 'uiService' | 'storageService'>,
@@ -47,8 +47,9 @@ export const useStylePanel = (
47
47
  }
48
48
 
49
49
  if (columnWidth.center < 0) {
50
- columnWidth.right = columnWidth.right + columnWidth.center - MIN_CENTER_COLUMN_WIDTH;
51
- columnWidth.center = MIN_CENTER_COLUMN_WIDTH;
50
+ const minCenterColumnWidth = uiService.get('minCenterColumnWidth');
51
+ columnWidth.right = columnWidth.right + columnWidth.center - minCenterColumnWidth;
52
+ columnWidth.center = minCenterColumnWidth;
52
53
 
53
54
  propsPanelWidth.value = columnWidth.right / 2;
54
55
  }
@@ -132,6 +132,7 @@
132
132
  v-model:height="columnLeftHeight"
133
133
  :width="columnLeftWidth"
134
134
  :title="config.text"
135
+ :framework-width="frameworkWidth"
135
136
  :position="{
136
137
  left: floatBoxStates[config.$key].left,
137
138
  top: floatBoxStates[config.$key].top,
@@ -221,6 +222,7 @@ const taskLength = computed(() => depService.get('taskLength'));
221
222
  const tipsBarVisible = ref(true);
222
223
 
223
224
  const columnLeftWidth = computed(() => uiService.get('columnWidth')[ColumnLayout.LEFT]);
225
+ const frameworkWidth = computed(() => uiService.get('frameworkRect')?.width || 0);
224
226
  const { height: editorContentHeight } = useEditorContentHeight();
225
227
  const columnLeftHeight = ref(0);
226
228
 
@@ -1,9 +1,11 @@
1
1
  <template>
2
2
  <FloatingBox
3
+ :body-style="{ padding: '0 16px' }"
3
4
  v-model:visible="boxVisible"
4
5
  v-model:width="width"
5
6
  v-model:height="editorHeight"
6
7
  :title="title"
8
+ :framework-width="frameworkWidth"
7
9
  :position="boxPosition"
8
10
  >
9
11
  <template #body>
@@ -65,6 +67,7 @@ const { height: editorHeight } = useEditorContentHeight();
65
67
 
66
68
  const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
67
69
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
70
+ const frameworkWidth = computed(() => uiService.get('frameworkRect')?.width || 0);
68
71
 
69
72
  /** 供「方法定义」tab 内的字段消费,用于打开数据源详情后自动打开指定方法 */
70
73
  provide(
@@ -8,6 +8,7 @@
8
8
  ref="box"
9
9
  v-model:visible="visible"
10
10
  title="当前位置下的组件"
11
+ :framework-width="frameworkWidth"
11
12
  :position="menuPosition"
12
13
  >
13
14
  <template #body>
@@ -36,7 +37,9 @@ import { useNodeStatus } from '@editor/layouts/sidebar/layer/use-node-status';
36
37
  import type { TreeNodeData } from '@editor/type';
37
38
 
38
39
  const services = useServices();
39
- const { editorService } = services;
40
+ const { editorService, uiService } = services;
41
+
42
+ const frameworkWidth = computed(() => uiService.get('frameworkRect')?.width || 0);
40
43
 
41
44
  const visible = ref(false);
42
45
  const buttonVisible = ref(false);
@@ -27,6 +27,9 @@ import {
27
27
  DEFAULT_LEFT_COLUMN_WIDTH,
28
28
  DEFAULT_RIGHT_COLUMN_WIDTH,
29
29
  LEFT_COLUMN_WIDTH_STORAGE_KEY,
30
+ MIN_CENTER_COLUMN_WIDTH,
31
+ MIN_LEFT_COLUMN_WIDTH,
32
+ MIN_RIGHT_COLUMN_WIDTH,
30
33
  RIGHT_COLUMN_WIDTH_STORAGE_KEY,
31
34
  } from '@editor/utils/const';
32
35
 
@@ -54,6 +57,9 @@ const state = shallowReactive<UiState>({
54
57
  storageService.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) ||
55
58
  DEFAULT_RIGHT_COLUMN_WIDTH,
56
59
  },
60
+ minLeftColumnWidth: MIN_LEFT_COLUMN_WIDTH,
61
+ minCenterColumnWidth: MIN_CENTER_COLUMN_WIDTH,
62
+ minRightColumnWidth: MIN_RIGHT_COLUMN_WIDTH,
57
63
  showGuides: true,
58
64
  hasGuides: false,
59
65
  showRule: true,
@@ -25,10 +25,18 @@
25
25
  .m-editor-float-box-body {
26
26
  overflow: auto;
27
27
  flex: 1;
28
- padding: 0 16px;
29
28
  }
30
29
  }
31
30
 
32
31
  .m-editor-floating-box-moveable {
33
32
  opacity: 0;
34
33
  }
34
+
35
+ .m-editor-float-box-drag-mask {
36
+ position: fixed;
37
+ top: 0;
38
+ left: 0;
39
+ width: 100%;
40
+ height: 100%;
41
+ background-color: transparent;
42
+ }
@@ -19,9 +19,18 @@
19
19
  .m-editor.m-editor--magic-admin {
20
20
  .m-editor-sidebar {
21
21
  .m-editor-sidebar-header {
22
- padding: 8px 0;
23
- width: 52px;
22
+ // padding: 8px 0;
23
+ width: 61px;
24
+ padding-top: 4px;
25
+ // sidebar 父容器是 `display: flex` (row),同级 `.m-editor-sidebar-content` 的 width
26
+ // 是 `calc(100% - 40px)`(sidebar.scss:52,40 是老 header 宽度)。当 header 改成 61px
27
+ // 后,两者之和会溢出 21px 左右,默认 `flex-shrink: 1` 会按权重压缩 header,最终渲染
28
+ // 出 56.3px 而非 61px。这里强制 `flex-shrink: 0` 让 header 守住宽度,多余的部分由
29
+ // content 侧承担(content 的 `100% - 40` 会自然让出)。
30
+ flex-shrink: 0;
31
+ border-right: 1px solid rgba(0, 84, 225, 0.1);
24
32
  display: flex;
33
+ background-color: #fff;
25
34
  box-sizing: border-box;
26
35
  flex-direction: column;
27
36
  align-items: center;
@@ -29,22 +38,28 @@
29
38
  display: flex;
30
39
  flex-direction: column;
31
40
  align-items: center;
32
- padding: 6px 0;
33
- width: 40px;
41
+ border-radius: 4px;
42
+ padding: 4px 2px;
43
+ width: 52px;
34
44
  margin-bottom: 4px;
45
+ box-sizing: border-box;
35
46
  background-color: transparent;
47
+ color: #84909d;
36
48
  &:hover {
37
- background-color: rgba(0, 0, 0, 0.1);
49
+ background-color: rgba(0, 0, 0, 0.05);
38
50
  }
39
51
  > i {
40
- color: #ffffff;
52
+ color: #84909d;
53
+ font-size: 20px;
41
54
  }
42
55
  &.is-active {
43
- background-color: #fff;
44
- border-radius: 4px;
56
+ background-color: var(--el-button-hover-bg-color, rgb(230, 238, 253));
45
57
  color: var(--el-color-primary);
46
58
  &:hover {
47
- background-color: #fff;
59
+ background-color: var(
60
+ --el-button-hover-bg-color,
61
+ rgb(230, 238, 253)
62
+ );
48
63
  }
49
64
  > i {
50
65
  color: var(--el-color-primary);
@@ -54,20 +69,19 @@
54
69
  }
55
70
  }
56
71
  .magic-editor-tab-panel-title {
57
- font-size: 10px;
72
+ font-size: 12px;
58
73
  line-height: 14px;
59
- font-weight: 600;
74
+ font-weight: 400;
75
+ margin: 0 4px;
76
+ width: 52px;
77
+ text-align: center;
60
78
  }
61
79
  }
62
80
  }
81
+ .m-editor-sidebar-content {
82
+ width: calc(100% - 61px);
83
+ }
63
84
  }
64
- .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item
65
-
66
- // 属性面板内的 input 圆角覆写:
67
- // - 原默认主题里 `.m-editor-props-panel .el-input__wrapper { border-radius: 0; }`
68
- // specificity 为 (0, 2, 0),已迁出(见 ../../props-panel.scss);
69
- // - 这里在前面再套一层 `.m-editor.m-editor--magic-admin`,specificity 升到 (0, 3, 0),
70
- // 保证主题启用时优先级一定能压过原规则及其它默认样式。
71
85
  .m-editor-props-panel .el-input__wrapper {
72
86
  border-radius: 4px;
73
87
  }
@@ -168,3 +182,15 @@
168
182
  }
169
183
  }
170
184
  }
185
+
186
+ .m-editor.m-theme--magic-admin {
187
+ .m-editor-nav-menu {
188
+ .menu-item {
189
+ > button {
190
+ > i {
191
+ font-size: 16px;
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
package/src/type.ts CHANGED
@@ -33,6 +33,7 @@ import type {
33
33
  MPage,
34
34
  MPageFragment,
35
35
  } from '@tmagic/core';
36
+ import type { FieldSize } from '@tmagic/design';
36
37
  import type { ChangeRecord, FormConfig, FormState, TableColumnConfig, TypeFunction } from '@tmagic/form';
37
38
  import type StageCore from '@tmagic/stage';
38
39
  import type {
@@ -297,6 +298,12 @@ export interface UiState {
297
298
  stageRect: StageRect;
298
299
  /** 编辑器列布局每一列的宽度,分为左中右三列 */
299
300
  columnWidth: GetColumnWidth;
301
+ /** 编辑器列布局左侧列最小宽度 */
302
+ minLeftColumnWidth: number;
303
+ /** 编辑器列布局中间列最小宽度 */
304
+ minCenterColumnWidth: number;
305
+ /** 编辑器列布局右侧列最小宽度 */
306
+ minRightColumnWidth: number;
300
307
  /** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
301
308
  showGuides: boolean;
302
309
  /** 画布上是否存在参考线 */
@@ -1448,6 +1455,11 @@ export interface CustomDiffFormOptions {
1448
1455
  * 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
1449
1456
  */
1450
1457
  width?: string;
1458
+ /**
1459
+ * 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
1460
+ * 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
1461
+ */
1462
+ size?: FieldSize;
1451
1463
  }
1452
1464
 
1453
1465
  /**
@@ -8,8 +8,8 @@ export const PROPS_PANEL_WIDTH_STORAGE_KEY = '$MagicEditorPropsPanelWidthData';
8
8
  export const DEFAULT_LEFT_COLUMN_WIDTH = 310;
9
9
  export const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
10
10
 
11
- // 2026-06-11 设计稿修改,固定左侧栏存在时最小宽度为252
12
- export const MIN_LEFT_COLUMN_WIDTH = 252;
11
+ // 2026-06-11 设计稿修改,固定左侧栏存在时最小宽度为260
12
+ export const MIN_LEFT_COLUMN_WIDTH = 260;
13
13
  export const MIN_CENTER_COLUMN_WIDTH = 400;
14
14
  export const MIN_RIGHT_COLUMN_WIDTH = 300;
15
15
 
package/types/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig, FormInstallOptions, FormState, FormValue, KeyValueConfig, MForm, PageFragmentSelectConfig, TabPaneConfig, TableColumnConfig, TypeFunction } from "@tmagic/form";
2
2
  import tablePlugin from "@tmagic/table";
3
3
  import StageCore, { CanDropIn, ContainerHighlightType, CustomizeMoveableOptions, GuidesOptions, RenderType, UpdateDragEl, default as StageCore$1 } from "@tmagic/stage";
4
- import designPlugin, { ButtonProps, DesignPluginOptions } from "@tmagic/design";
4
+ import designPlugin, { ButtonProps, DesignPluginOptions, FieldSize } from "@tmagic/design";
5
5
  import Gesto, { OnDrag, OnDrag as OnDrag$1 } from "gesto";
6
6
  import { CodeBlockContent, CodeBlockDSL, DataSchema, DataSourceFieldType, DataSourceSchema, DepData, DepExtendedData, DepTargetType, DepTargetType as DepTargetType$1, DisplayCond, EventOption, Id, MApp, MContainer, MNode, MPage, MPageFragment, NodeType, Target, TargetOptions } from "@tmagic/core";
7
- import { App, AppContext, Component, ComputedRef, Ref, ShallowRef } from "vue";
7
+ import { App, AppContext, CSSProperties, Component, ComputedRef, Ref, ShallowRef } from "vue";
8
8
  import EventEmitter$1, { EventEmitter } from "events";
9
9
  import * as Monaco from "monaco-editor";
10
10
  import Sortable, { Options, SortableEvent } from "sortablejs";
@@ -1742,6 +1742,12 @@ interface UiState {
1742
1742
  stageRect: StageRect;
1743
1743
  /** 编辑器列布局每一列的宽度,分为左中右三列 */
1744
1744
  columnWidth: GetColumnWidth;
1745
+ /** 编辑器列布局左侧列最小宽度 */
1746
+ minLeftColumnWidth: number;
1747
+ /** 编辑器列布局中间列最小宽度 */
1748
+ minCenterColumnWidth: number;
1749
+ /** 编辑器列布局右侧列最小宽度 */
1750
+ minRightColumnWidth: number;
1745
1751
  /** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
1746
1752
  showGuides: boolean;
1747
1753
  /** 画布上是否存在参考线 */
@@ -2680,6 +2686,11 @@ interface CustomDiffFormOptions {
2680
2686
  * 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
2681
2687
  */
2682
2688
  width?: string;
2689
+ /**
2690
+ * 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
2691
+ * 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
2692
+ */
2693
+ size?: FieldSize;
2683
2694
  }
2684
2695
  /**
2685
2696
  * 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
@@ -3279,7 +3290,7 @@ declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData
3279
3290
  declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
3280
3291
  declare const DEFAULT_LEFT_COLUMN_WIDTH = 310;
3281
3292
  declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
3282
- declare const MIN_LEFT_COLUMN_WIDTH = 252;
3293
+ declare const MIN_LEFT_COLUMN_WIDTH = 260;
3283
3294
  declare const MIN_CENTER_COLUMN_WIDTH = 400;
3284
3295
  declare const MIN_RIGHT_COLUMN_WIDTH = 300;
3285
3296
  declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
@@ -6117,6 +6128,11 @@ type __VLS_Props$8 = {
6117
6128
  */
6118
6129
  baseFormState?: FormState; /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
6119
6130
  selfDiffFieldTypes?: string[];
6131
+ /**
6132
+ * 表单内组件的尺寸(透传给 MForm 的 `size`),可选 'large' | 'default' | 'small'。
6133
+ * 缺省时使用 MForm 内置默认尺寸。
6134
+ */
6135
+ size?: FieldSize;
6120
6136
  /**
6121
6137
  * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
6122
6138
  * 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
@@ -6261,7 +6277,8 @@ type __VLS_Props$7 = {
6261
6277
  * 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
6262
6278
  */
6263
6279
  loadConfig?: CompareFormLoadConfig;
6264
- width?: string;
6280
+ width?: string; /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
6281
+ size?: FieldSize;
6265
6282
  isConfirm?: boolean;
6266
6283
  onConfirm?: () => void;
6267
6284
  selfDiffFieldTypes?: string[];
@@ -6334,6 +6351,9 @@ interface Position {
6334
6351
  type __VLS_Props$6 = {
6335
6352
  position?: Position;
6336
6353
  title?: string;
6354
+ bodyStyle?: CSSProperties; /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
6355
+ initialStyle?: CSSProperties; /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
6356
+ frameworkWidth?: number;
6337
6357
  beforeClose?: (_done: (_cancel?: boolean) => void) => void;
6338
6358
  };
6339
6359
  type __VLS_ModelProps = {
@@ -6363,6 +6383,8 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
6363
6383
  }>, {
6364
6384
  title: string;
6365
6385
  position: Position;
6386
+ initialStyle: CSSProperties;
6387
+ frameworkWidth: number;
6366
6388
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6367
6389
  declare const __VLS_export$6: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
6368
6390
  declare const _default$20: typeof __VLS_export$6;