@tmagic/editor 1.8.0-manmanyu.14 → 1.8.0-manmanyu.16

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.
@@ -66,28 +66,28 @@ var Background_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
66
66
  labelWidth: "68px",
67
67
  options: [
68
68
  {
69
- value: "repeat",
70
- icon: markRaw(Repeat_default),
71
- tooltip: "垂直和水平方向重复 repeat",
72
- text: "垂直与水平重复"
69
+ value: "no-repeat",
70
+ icon: markRaw(NoRepeat_default),
71
+ tooltip: "不重复 no-repeat",
72
+ text: "不重复"
73
73
  },
74
74
  {
75
75
  value: "repeat-x",
76
76
  icon: markRaw(RepeatX_default),
77
77
  tooltip: "水平方向重复 repeat-x",
78
- text: "水平方向重复"
78
+ text: "水平重复"
79
79
  },
80
80
  {
81
81
  value: "repeat-y",
82
82
  icon: markRaw(RepeatY_default),
83
83
  tooltip: "垂直方向重复 repeat-y",
84
- text: "垂直方向重复"
84
+ text: "垂直重复"
85
85
  },
86
86
  {
87
- value: "no-repeat",
88
- icon: markRaw(NoRepeat_default),
89
- tooltip: "不重复 no-repeat",
90
- text: "不重复"
87
+ value: "repeat",
88
+ icon: markRaw(Repeat_default),
89
+ tooltip: "垂直和水平方向重复 repeat",
90
+ text: "垂直与水平重复"
91
91
  }
92
92
  ]
93
93
  },
package/dist/es/index.js CHANGED
@@ -2,7 +2,7 @@ import { CODE_DRAFT_STORAGE_KEY, CodeDeleteErrorType, ColumnLayout, DragType, Ke
2
2
  import { useCodeBlockEdit } from "./hooks/use-code-block-edit.js";
3
3
  import { advancedTabConfig, arrayOptions, displayTabConfig, eqOptions, eventTabConfig, fillConfig, numberOptions, styleTabConfig } from "./utils/props.js";
4
4
  import props_default from "./services/props.js";
5
- import { getEditorConfig, setEditorConfig } from "./utils/config.js";
5
+ import { getEditorConfig, isGlobalFlat, setEditorConfig } from "./utils/config.js";
6
6
  import { UndoRedo } from "./utils/undo-redo.js";
7
7
  import { createStackStep, describeRevertStep, deserializeStacks, detectStackOpType, detectTargetId, detectTargetName, getLastPushedHistoryIds, getOrCreateStack, markStackSaved, mergeSteps, serializeStacks, undoFloor } from "./utils/history.js";
8
8
  import { idbDelete, idbGet, idbSet, isIndexedDBSupported, openIndexedDB } from "./utils/indexed-db.js";
@@ -87,4 +87,4 @@ export * from "@tmagic/table";
87
87
  export * from "@tmagic/stage";
88
88
  export * from "@tmagic/design";
89
89
  export * from "@tmagic/utils";
90
- export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CodeBlockEditor_default as CodeBlockEditor, CodeBlockList_default as CodeBlockList, CodeBlockListPanel_default as CodeBlockListPanel, CodeDeleteErrorType, CodeSelect_default as CodeSelect, CodeSelectCol_default as CodeSelectCol, ColumnLayout, CompareForm_default as CompareForm, ComponentListPanel_default as ComponentListPanel, CondOpSelect_default as CondOpSelect, ContentMenu_default as ContentMenu, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, DataSourceAddButton_default as DataSourceAddButton, DataSourceConfigPanel_default as DataSourceConfigPanel, Index_default as DataSourceFieldSelect, DataSourceFields_default as DataSourceFields, DataSourceInput_default as DataSourceInput, DataSourceMethodSelect_default as DataSourceMethodSelect, DataSourceMethods_default as DataSourceMethods, DataSourceMocks_default as DataSourceMocks, DataSourceSelect_default as DataSourceSelect, DepTargetType, DisplayConds_default as DisplayConds, DragType, EventSelect_default as EventSelect, Fixed2Other, FloatingBox_default as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, HistoryDiffDialog_default as HistoryDiffDialog, Bucket_default as HistoryListBucket, BucketTab_default as HistoryListBucketTab, Icon_default as Icon, IdleTask, KeyBindingCommand, KeyValue_default as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerOffset, LayerPanel_default as LayerPanel, Layout, SplitView_default as LayoutContainer, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, PROPS_PANEL_WIDTH_STORAGE_KEY, PageFragmentSelect_default as PageFragmentSelect, FormPanel_default as PropsFormPanel, PropsPanel_default as PropsPanel, RIGHT_COLUMN_WIDTH_STORAGE_KEY, Resizer_default as Resizer, ScrollViewer, SideItemKey, SplitView_default as SplitView, StageCore, Index_default$1 as StyleSetter, CodeEditor_default as TMagicCodeEditor, Editor_default as TMagicEditor, ToolButton_default as ToolButton, Tree_default as Tree, TreeNode_default as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, codeBlock_default as codeBlockService, collectRelatedNodes, componentList_default as componentListService, confirmHistoryAction, createStackStep, dataSource_default as dataSourceService, debug, plugin_default as default, defaultIsExpandable, dep_default as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, editor_default as editorService, eqOptions, error, eventTabConfig, events_default as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, history_default as historyService, idbDelete, idbGet, idbSet, info, isIncludeDataSource, isIndexedDBSupported, keybinding_default as keybindingService, monaco_editor_default as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, props_default as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, stageOverlay_default as stageOverlayService, storage_default as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, ui_default as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
90
+ export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CodeBlockEditor_default as CodeBlockEditor, CodeBlockList_default as CodeBlockList, CodeBlockListPanel_default as CodeBlockListPanel, CodeDeleteErrorType, CodeSelect_default as CodeSelect, CodeSelectCol_default as CodeSelectCol, ColumnLayout, CompareForm_default as CompareForm, ComponentListPanel_default as ComponentListPanel, CondOpSelect_default as CondOpSelect, ContentMenu_default as ContentMenu, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, DataSourceAddButton_default as DataSourceAddButton, DataSourceConfigPanel_default as DataSourceConfigPanel, Index_default as DataSourceFieldSelect, DataSourceFields_default as DataSourceFields, DataSourceInput_default as DataSourceInput, DataSourceMethodSelect_default as DataSourceMethodSelect, DataSourceMethods_default as DataSourceMethods, DataSourceMocks_default as DataSourceMocks, DataSourceSelect_default as DataSourceSelect, DepTargetType, DisplayConds_default as DisplayConds, DragType, EventSelect_default as EventSelect, Fixed2Other, FloatingBox_default as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, HistoryDiffDialog_default as HistoryDiffDialog, Bucket_default as HistoryListBucket, BucketTab_default as HistoryListBucketTab, Icon_default as Icon, IdleTask, KeyBindingCommand, KeyValue_default as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerOffset, LayerPanel_default as LayerPanel, Layout, SplitView_default as LayoutContainer, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, PROPS_PANEL_WIDTH_STORAGE_KEY, PageFragmentSelect_default as PageFragmentSelect, FormPanel_default as PropsFormPanel, PropsPanel_default as PropsPanel, RIGHT_COLUMN_WIDTH_STORAGE_KEY, Resizer_default as Resizer, ScrollViewer, SideItemKey, SplitView_default as SplitView, StageCore, Index_default$1 as StyleSetter, CodeEditor_default as TMagicCodeEditor, Editor_default as TMagicEditor, ToolButton_default as ToolButton, Tree_default as Tree, TreeNode_default as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, codeBlock_default as codeBlockService, collectRelatedNodes, componentList_default as componentListService, confirmHistoryAction, createStackStep, dataSource_default as dataSourceService, debug, plugin_default as default, defaultIsExpandable, dep_default as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, editor_default as editorService, eqOptions, error, eventTabConfig, events_default as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, history_default as historyService, idbDelete, idbGet, idbSet, info, isGlobalFlat, isIncludeDataSource, isIndexedDBSupported, keybinding_default as keybindingService, monaco_editor_default as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, props_default as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, stageOverlay_default as stageOverlayService, storage_default as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, ui_default as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
package/dist/es/plugin.js CHANGED
@@ -27,7 +27,8 @@ import designPlugin from "@tmagic/design";
27
27
  var defaultInstallOpt = {
28
28
  parseDSL: (dsl) => eval(dsl),
29
29
  customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
30
- customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options)
30
+ customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options),
31
+ flat: false
31
32
  };
32
33
  var plugin_default = { install: (app, opt) => {
33
34
  const option = Object.assign(defaultInstallOpt, opt || {});
@@ -1,8 +1,11 @@
1
+ import { ref } from "vue";
1
2
  //#region packages/editor/src/utils/config.ts
2
3
  var $TMAGIC_EDITOR = {};
4
+ var isGlobalFlat = ref(false);
3
5
  var setEditorConfig = (option) => {
4
6
  $TMAGIC_EDITOR = option;
7
+ isGlobalFlat.value = option.flat ?? false;
5
8
  };
6
9
  var getEditorConfig = (key) => $TMAGIC_EDITOR[key];
7
10
  //#endregion
8
- export { getEditorConfig, setEditorConfig };
11
+ export { getEditorConfig, isGlobalFlat, setEditorConfig };
@@ -134,8 +134,7 @@ var advancedTabConfig = {
134
134
  type: "switch",
135
135
  labelPosition: "left",
136
136
  defaultValue: false,
137
- extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效",
138
- style: { padding: "0 22px" }
137
+ extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
139
138
  },
140
139
  {
141
140
  name: "created",
@@ -602,6 +602,9 @@ fieldset.m-fieldset .m-form-tip {
602
602
  white-space: pre-line;
603
603
  line-height: 20px;
604
604
  }
605
+ .m-form.m-form--magic-admin .el-form-item__content .tmagic-design-radio-group {
606
+ row-gap: 10px;
607
+ }
605
608
  .m-form.m-form--magic-admin .el-form-item__content .tmagic-design-radio-group .tmagic-design-radio-button {
606
609
  margin-right: 8px;
607
610
  height: 32px;
@@ -5095,8 +5095,7 @@
5095
5095
  type: "switch",
5096
5096
  labelPosition: "left",
5097
5097
  defaultValue: false,
5098
- extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效",
5099
- style: { padding: "0 22px" }
5098
+ extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
5100
5099
  },
5101
5100
  {
5102
5101
  name: "created",
@@ -5437,11 +5436,13 @@
5437
5436
  var props_default = new Props();
5438
5437
  //#endregion
5439
5438
  //#region packages/editor/src/utils/config.ts
5440
- var $TMAGIC_EDITOR, setEditorConfig, getEditorConfig;
5439
+ var $TMAGIC_EDITOR, isGlobalFlat, setEditorConfig, getEditorConfig;
5441
5440
  var init_config = __esmMin((() => {
5442
5441
  $TMAGIC_EDITOR = {};
5442
+ isGlobalFlat = (0, vue.ref)(false);
5443
5443
  setEditorConfig = (option) => {
5444
5444
  $TMAGIC_EDITOR = option;
5445
+ isGlobalFlat.value = option.flat ?? false;
5445
5446
  };
5446
5447
  getEditorConfig = (key) => $TMAGIC_EDITOR[key];
5447
5448
  }));
@@ -22572,28 +22573,28 @@
22572
22573
  labelWidth: "68px",
22573
22574
  options: [
22574
22575
  {
22575
- value: "repeat",
22576
- icon: (0, vue.markRaw)(Repeat_default),
22577
- tooltip: "垂直和水平方向重复 repeat",
22578
- text: "垂直与水平重复"
22576
+ value: "no-repeat",
22577
+ icon: (0, vue.markRaw)(NoRepeat_default),
22578
+ tooltip: "不重复 no-repeat",
22579
+ text: "不重复"
22579
22580
  },
22580
22581
  {
22581
22582
  value: "repeat-x",
22582
22583
  icon: (0, vue.markRaw)(RepeatX_default),
22583
22584
  tooltip: "水平方向重复 repeat-x",
22584
- text: "水平方向重复"
22585
+ text: "水平重复"
22585
22586
  },
22586
22587
  {
22587
22588
  value: "repeat-y",
22588
22589
  icon: (0, vue.markRaw)(RepeatY_default),
22589
22590
  tooltip: "垂直方向重复 repeat-y",
22590
- text: "垂直方向重复"
22591
+ text: "垂直重复"
22591
22592
  },
22592
22593
  {
22593
- value: "no-repeat",
22594
- icon: (0, vue.markRaw)(NoRepeat_default),
22595
- tooltip: "不重复 no-repeat",
22596
- text: "不重复"
22594
+ value: "repeat",
22595
+ icon: (0, vue.markRaw)(Repeat_default),
22596
+ tooltip: "垂直和水平方向重复 repeat",
22597
+ text: "垂直与水平重复"
22597
22598
  }
22598
22599
  ]
22599
22600
  },
@@ -24418,7 +24419,8 @@
24418
24419
  var defaultInstallOpt = {
24419
24420
  parseDSL: (dsl) => eval(dsl),
24420
24421
  customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
24421
- customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options)
24422
+ customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options),
24423
+ flat: false
24422
24424
  };
24423
24425
  var plugin_default = { install: (app, opt) => {
24424
24426
  const option = Object.assign(defaultInstallOpt, opt || {});
@@ -24451,6 +24453,7 @@
24451
24453
  //#endregion
24452
24454
  //#region packages/editor/src/index.ts
24453
24455
  init_type();
24456
+ init_config();
24454
24457
  init_CodeEditor();
24455
24458
  init_Icon();
24456
24459
  init_CompareForm();
@@ -24607,6 +24610,7 @@
24607
24610
  exports.idbGet = idbGet;
24608
24611
  exports.idbSet = idbSet;
24609
24612
  exports.info = info;
24613
+ exports.isGlobalFlat = isGlobalFlat;
24610
24614
  exports.isIncludeDataSource = isIncludeDataSource;
24611
24615
  exports.isIndexedDBSupported = isIndexedDBSupported;
24612
24616
  exports.keybindingService = keybinding_default;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.0-manmanyu.14",
2
+ "version": "1.8.0-manmanyu.16",
3
3
  "name": "@tmagic/editor",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -58,11 +58,11 @@
58
58
  "moveable": "^0.53.0",
59
59
  "serialize-javascript": "^7.0.0",
60
60
  "sortablejs": "^1.15.6",
61
- "@tmagic/design": "1.8.0-manmanyu.14",
62
- "@tmagic/form": "1.8.0-manmanyu.14",
63
- "@tmagic/table": "1.8.0-manmanyu.14",
64
- "@tmagic/utils": "1.8.0-manmanyu.14",
65
- "@tmagic/stage": "1.8.0-manmanyu.14"
61
+ "@tmagic/form": "1.8.0-manmanyu.16",
62
+ "@tmagic/stage": "1.8.0-manmanyu.16",
63
+ "@tmagic/design": "1.8.0-manmanyu.16",
64
+ "@tmagic/table": "1.8.0-manmanyu.16",
65
+ "@tmagic/utils": "1.8.0-manmanyu.16"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/events": "^3.0.3",
@@ -76,7 +76,7 @@
76
76
  "type-fest": "^5.2.0",
77
77
  "typescript": "^6.0.3",
78
78
  "vue": "^3.5.38",
79
- "@tmagic/core": "1.8.0-manmanyu.14"
79
+ "@tmagic/core": "1.8.0-manmanyu.16"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "typescript": {
@@ -73,15 +73,15 @@ const config = defineFormItem({
73
73
  childType: 'button',
74
74
  labelWidth: '68px',
75
75
  options: [
76
+ { value: 'no-repeat', icon: markRaw(BackgroundNoRepeat), tooltip: '不重复 no-repeat', text: '不重复' },
77
+ { value: 'repeat-x', icon: markRaw(BackgroundRepeatX), tooltip: '水平方向重复 repeat-x', text: '水平重复' },
78
+ { value: 'repeat-y', icon: markRaw(BackgroundRepeatY), tooltip: '垂直方向重复 repeat-y', text: '垂直重复' },
76
79
  {
77
80
  value: 'repeat',
78
81
  icon: markRaw(BackgroundRepeat),
79
82
  tooltip: '垂直和水平方向重复 repeat',
80
83
  text: '垂直与水平重复',
81
84
  },
82
- { value: 'repeat-x', icon: markRaw(BackgroundRepeatX), tooltip: '水平方向重复 repeat-x', text: '水平方向重复' },
83
- { value: 'repeat-y', icon: markRaw(BackgroundRepeatY), tooltip: '垂直方向重复 repeat-y', text: '垂直方向重复' },
84
- { value: 'no-repeat', icon: markRaw(BackgroundNoRepeat), tooltip: '不重复 no-repeat', text: '不重复' },
85
85
  ],
86
86
  },
87
87
  {
package/src/index.ts CHANGED
@@ -32,6 +32,9 @@ export { DepTargetType } from '@tmagic/core';
32
32
  export * from './type';
33
33
  export * from './hooks';
34
34
  export * from './utils';
35
+ // `isGlobalFlat` 同时在 `@tmagic/design` 和 `./utils/config` 中存在,
36
+ // 通过显式重导一次消除 `export *` 带来的歧义,并固定使用 editor 自己那份。
37
+ export { isGlobalFlat } from './utils/config';
35
38
  export { default as TMagicEditor } from './Editor.vue';
36
39
  export { default as TMagicCodeEditor } from './layouts/CodeEditor.vue';
37
40
  export { default as editorService } from './services/editor';
package/src/plugin.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import type { App } from 'vue';
19
+ import { type App } from 'vue';
20
20
 
21
21
  import type { DesignPluginOptions } from '@tmagic/design';
22
22
  import designPlugin from '@tmagic/design';
@@ -55,6 +55,8 @@ const defaultInstallOpt: EditorInstallOptions = {
55
55
  customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
56
56
  customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) =>
57
57
  monaco.editor.createDiffEditor(codeEditorEl, options),
58
+
59
+ flat: false,
58
60
  };
59
61
 
60
62
  export default {
@@ -67,7 +69,6 @@ export default {
67
69
 
68
70
  app.config.globalProperties.$TMAGIC_EDITOR = option;
69
71
  setEditorConfig(option);
70
-
71
72
  app.component(`${Editor.name || 'MEditor'}`, Editor);
72
73
  app.component('magic-code-editor', CodeEditor);
73
74
  app.component('m-fields-ui-select', uiSelect);
package/src/type.ts CHANGED
@@ -139,6 +139,7 @@ export type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> |
139
139
  export type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
140
140
 
141
141
  export interface EditorInstallOptions {
142
+ flat?: boolean;
142
143
  parseDSL: <T = any>(dsl: string) => T;
143
144
  customCreateMonacoEditor: (
144
145
  monaco: typeof import('monaco-editor'),
@@ -16,14 +16,22 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
+ import { ref } from 'vue';
20
+
19
21
  import { EditorInstallOptions } from '@editor/type';
20
22
 
21
23
  let $TMAGIC_EDITOR: EditorInstallOptions = {} as any;
22
24
 
25
+ // 用 ref 持有 flat 全局开关:const 引用本身不可变,符合 `import/no-mutable-exports`;
26
+ // 通过 `.value` 改值仍保持模块级响应式语义,与 editor/plugin.ts、design/index.ts 里
27
+ // 的同名变量写法对齐。
28
+ const isGlobalFlat = ref(false);
29
+
23
30
  const setEditorConfig = (option: EditorInstallOptions): void => {
24
31
  $TMAGIC_EDITOR = option;
32
+ isGlobalFlat.value = option.flat ?? false;
25
33
  };
26
34
 
27
35
  const getEditorConfig = <K extends keyof EditorInstallOptions>(key: K): EditorInstallOptions[K] => $TMAGIC_EDITOR[key];
28
36
 
29
- export { getEditorConfig, setEditorConfig };
37
+ export { getEditorConfig, isGlobalFlat, setEditorConfig };
@@ -150,9 +150,6 @@ export const advancedTabConfig: TabPaneConfig = {
150
150
  labelPosition: 'left',
151
151
  defaultValue: false,
152
152
  extra: '开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效',
153
- style: {
154
- padding: '0 22px',
155
- },
156
153
  },
157
154
  {
158
155
  name: 'created',
package/types/index.d.ts CHANGED
@@ -1604,6 +1604,7 @@ type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPan
1604
1604
  type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
1605
1605
  type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
1606
1606
  interface EditorInstallOptions {
1607
+ flat?: boolean;
1607
1608
  parseDSL: <T = any>(dsl: string) => T;
1608
1609
  customCreateMonacoEditor: (monaco: typeof import('monaco-editor'), codeEditorEl: HTMLElement, options: Monaco.editor.IStandaloneEditorConstructionOptions & {
1609
1610
  editorCustomType?: string;
@@ -2845,6 +2846,7 @@ declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
2845
2846
  declare const useServices: () => Services;
2846
2847
  //#endregion
2847
2848
  //#region temp/packages/editor/src/utils/config.d.ts
2849
+ declare const isGlobalFlat: import("@vue/reactivity").Ref<boolean, boolean>;
2848
2850
  declare const setEditorConfig: (option: EditorInstallOptions) => void;
2849
2851
  declare const getEditorConfig: <K extends keyof EditorInstallOptions>(key: K) => EditorInstallOptions[K];
2850
2852
  //#endregion
@@ -6518,4 +6520,4 @@ declare const _default$41: {
6518
6520
  install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
6519
6521
  };
6520
6522
  //#endregion
6521
- export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, CustomContentMenuFunction, CustomDiffFormOptions, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EditorChangeEvent, EditorChangeItem, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EditorUpdateChangeItem, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, HistoryEvents, HistoryGroup, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, HistoryStepEntry, HistoryStepType, HistorySteps, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$26 as LayerPanel, LayerPanelSlots, Layout, _default$27 as LayoutContainer, _default$27 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$28 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$29 as PropsFormPanel, PropsFormValueFunction, _default$30 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$31 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$32 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$33 as TMagicCodeEditor, _default$34 as TMagicEditor, _default$35 as ToolButton, _default$36 as Tree, _default$37 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$38 as codeBlockService, collectRelatedNodes, _default$39 as componentListService, confirmHistoryAction, createStackStep, _default$40 as dataSourceService, debug, _default$41 as default, defaultIsExpandable, _default$42 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$43 as editorService, eqOptions, error, eventTabConfig, _default$44 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$45 as historyService, idbDelete, idbGet, idbSet, info, isIncludeDataSource, isIndexedDBSupported, _default$46 as keybindingService, _default$47 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, _default$48 as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$49 as stageOverlayService, _default$50 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$51 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
6523
+ export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, CustomContentMenuFunction, CustomDiffFormOptions, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EditorChangeEvent, EditorChangeItem, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EditorUpdateChangeItem, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, HistoryEvents, HistoryGroup, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, HistoryStepEntry, HistoryStepType, HistorySteps, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$26 as LayerPanel, LayerPanelSlots, Layout, _default$27 as LayoutContainer, _default$27 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$28 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$29 as PropsFormPanel, PropsFormValueFunction, _default$30 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$31 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$32 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$33 as TMagicCodeEditor, _default$34 as TMagicEditor, _default$35 as ToolButton, _default$36 as Tree, _default$37 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$38 as codeBlockService, collectRelatedNodes, _default$39 as componentListService, confirmHistoryAction, createStackStep, _default$40 as dataSourceService, debug, _default$41 as default, defaultIsExpandable, _default$42 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$43 as editorService, eqOptions, error, eventTabConfig, _default$44 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$45 as historyService, idbDelete, idbGet, idbSet, info, isGlobalFlat, isIncludeDataSource, isIndexedDBSupported, _default$46 as keybindingService, _default$47 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, _default$48 as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$49 as stageOverlayService, _default$50 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$51 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };