@tmagic/editor 1.8.0-manmanyu.9 → 1.8.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.
Files changed (279) hide show
  1. package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +22 -13
  2. package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +10 -5
  3. package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +7 -6
  4. package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +21 -122
  5. package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +21 -5
  6. package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +62 -16
  7. package/dist/es/components/Icon.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/dist/es/components/Resizer.vue_vue_type_script_setup_true_lang.js +3 -2
  9. package/dist/es/components/ScrollBar.js +0 -1
  10. package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +5 -4
  11. package/dist/es/components/ScrollViewer.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/es/components/SearchInput.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/es/components/SplitView.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/es/components/Tree.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/es/components/TreeNode.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/es/components/ViewForm.js +5 -0
  18. package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +56 -0
  19. package/dist/es/editorProps.js +7 -1
  20. package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +1 -1
  21. package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +1 -1
  22. package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +30 -113
  23. package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +2 -2
  24. package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +7 -19
  25. package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +7 -6
  26. package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +4 -2
  27. package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +12 -4
  28. package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +9 -20
  29. package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +2 -2
  30. package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +5 -3
  31. package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +9 -4
  32. package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +2 -2
  33. package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +10 -110
  34. package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +52 -363
  35. package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +3 -6
  38. package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +4 -35
  40. package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +3 -3
  41. package/dist/es/fields/StyleSetter/configs.js +663 -0
  42. package/dist/es/fields/StyleSetter/icons/align-items/Center.js +1 -1
  43. package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +1 -1
  44. package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +1 -1
  45. package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +1 -1
  46. package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +1 -1
  47. package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +1 -1
  48. package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +1 -1
  49. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +1 -1
  50. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +1 -1
  51. package/dist/es/fields/StyleSetter/icons/display/Block.js +1 -1
  52. package/dist/es/fields/StyleSetter/icons/display/Flex.js +1 -1
  53. package/dist/es/fields/StyleSetter/icons/display/Inline.js +1 -1
  54. package/dist/es/fields/StyleSetter/icons/display/InlineBlock.js +1 -1
  55. package/dist/es/fields/StyleSetter/icons/display/None.js +1 -1
  56. package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +1 -1
  57. package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +1 -1
  58. package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +1 -1
  59. package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +1 -1
  60. package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +1 -1
  61. package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +1 -1
  62. package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +1 -1
  63. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +1 -1
  64. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +1 -1
  65. package/dist/es/fields/StyleSetter/icons/text-align/Center.js +1 -1
  66. package/dist/es/fields/StyleSetter/icons/text-align/Left.js +1 -1
  67. package/dist/es/fields/StyleSetter/icons/text-align/Right.js +1 -1
  68. package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +29 -106
  69. package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +8 -11
  70. package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +30 -89
  71. package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +29 -297
  72. package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -82
  73. package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +8 -24
  74. package/dist/es/fields/UISelect.js +0 -1
  75. package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/es/fields/configs/codeSelect.js +98 -0
  77. package/dist/es/fields/configs/displayConds.js +158 -0
  78. package/dist/es/fields/configs/eventSelect.js +225 -0
  79. package/dist/es/fields/configs/stickyAddButton.js +21 -0
  80. package/dist/es/fields/headless-validation.js +139 -0
  81. package/dist/es/headless.js +2 -0
  82. package/dist/es/hooks/use-code-block-edit.js +4 -2
  83. package/dist/es/hooks/use-compare-form.js +101 -0
  84. package/dist/es/hooks/use-form-context.js +29 -0
  85. package/dist/es/hooks/use-stage.js +1 -0
  86. package/dist/es/icons/CenterIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/dist/es/icons/CodeIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  88. package/dist/es/icons/DatasourceIcon.js +1 -1
  89. package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  90. package/dist/es/index.js +16 -8
  91. package/dist/es/initService.js +52 -16
  92. package/dist/es/layouts/AddPageBox.vue_vue_type_script_setup_true_lang.js +1 -1
  93. package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +26 -10
  94. package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +11 -8
  95. package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  96. package/dist/es/layouts/NavMenuColumn.vue_vue_type_script_setup_true_lang.js +1 -1
  97. package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +1 -1
  98. package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +8 -5
  99. package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +1 -1
  100. package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +26 -10
  101. package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +11 -13
  102. package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +1 -1
  103. package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +1 -1
  104. package/dist/es/layouts/history-list/composables.js +1 -1
  105. package/dist/es/layouts/history-list/useHistoryRevert.js +38 -33
  106. package/dist/es/layouts/page-bar/AddButton.vue_vue_type_script_setup_true_lang.js +1 -1
  107. package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +1 -1
  108. package/dist/es/layouts/page-bar/PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js +1 -1
  109. package/dist/es/layouts/page-bar/PageList.vue_vue_type_script_setup_true_lang.js +1 -1
  110. package/dist/es/layouts/page-bar/Search.vue_vue_type_script_setup_true_lang.js +2 -2
  111. package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +50 -20
  112. package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +53 -35
  113. package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
  114. package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +3 -3
  115. package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +21 -36
  116. package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  118. package/dist/es/layouts/sidebar/code-block/useContentMenu.js +19 -4
  119. package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.vue_vue_type_script_setup_true_lang.js +1 -1
  120. package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +9 -4
  121. package/dist/es/layouts/sidebar/data-source/DataSourceList.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  123. package/dist/es/layouts/sidebar/data-source/useContentMenu.js +19 -4
  124. package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +3 -3
  125. package/dist/es/layouts/sidebar/layer/LayerNodeContent.js +5 -0
  126. package/dist/es/layouts/sidebar/layer/LayerNodeContent.vue_vue_type_script_setup_true_lang.js +46 -0
  127. package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +1 -1
  128. package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +6 -4
  129. package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
  130. package/dist/es/layouts/sidebar/layer/use-drag.js +11 -10
  131. package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
  132. package/dist/es/layouts/workspace/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
  133. package/dist/es/layouts/workspace/Workspace.vue_vue_type_script_setup_true_lang.js +1 -1
  134. package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +9 -3
  135. package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +55 -9
  136. package/dist/es/layouts/workspace/viewer/StageOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  137. package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +8 -8
  138. package/dist/es/plugin.js +35 -23
  139. package/dist/es/services/codeBlock.js +8 -3
  140. package/dist/es/services/dataSource.js +3 -0
  141. package/dist/es/services/dep.js +162 -41
  142. package/dist/es/services/editor.js +344 -113
  143. package/dist/es/services/events.js +4 -4
  144. package/dist/es/services/history.js +17 -1
  145. package/dist/es/services/keybinding.js +3 -3
  146. package/dist/es/services/props.js +2 -1
  147. package/dist/es/services/storage.js +2 -2
  148. package/dist/es/services/ui.js +7 -2
  149. package/dist/es/style.css +277 -114
  150. package/dist/es/utils/code-block.js +14 -7
  151. package/dist/es/utils/config.js +4 -1
  152. package/dist/es/utils/const.js +2 -2
  153. package/dist/es/utils/content-menu.js +2 -2
  154. package/dist/es/utils/data-source/index.js +34 -12
  155. package/dist/es/utils/dep/collect-worker-client.js +154 -0
  156. package/dist/es/utils/dep/idle-task.js +70 -22
  157. package/dist/es/utils/dep/worker.js +1 -1
  158. package/dist/es/utils/editor.js +4 -2
  159. package/dist/es/utils/event.js +135 -0
  160. package/dist/es/utils/monaco-editor.js +22 -6
  161. package/dist/es/utils/operator.js +2 -2
  162. package/dist/es/utils/props.js +50 -106
  163. package/dist/es/utils/type-match-rules.js +356 -0
  164. package/dist/style.css +277 -114
  165. package/dist/themes/magic-admin.css +978 -175
  166. package/dist/tmagic-editor-headless.umd.cjs +10880 -0
  167. package/dist/tmagic-editor.umd.cjs +12695 -10896
  168. package/package.json +18 -13
  169. package/src/Editor.vue +23 -6
  170. package/src/components/CodeBlockEditor.vue +3 -0
  171. package/src/components/CodeParams.vue +10 -4
  172. package/src/components/CompareForm.vue +20 -190
  173. package/src/components/ContentMenu.vue +34 -6
  174. package/src/components/FloatingBox.vue +71 -7
  175. package/src/components/ScrollBar.vue +0 -67
  176. package/src/components/ViewForm.vue +54 -0
  177. package/src/editorProps.ts +23 -10
  178. package/src/fields/Code.vue +1 -1
  179. package/src/fields/CodeSelect.vue +20 -113
  180. package/src/fields/CodeSelectCol.vue +1 -1
  181. package/src/fields/CondOpSelect.vue +5 -26
  182. package/src/fields/DataSourceFieldSelect/FieldSelect.vue +2 -2
  183. package/src/fields/DataSourceFieldSelect/Index.vue +4 -1
  184. package/src/fields/DataSourceFields.vue +5 -1
  185. package/src/fields/DataSourceInput.vue +10 -28
  186. package/src/fields/DataSourceMethodSelect.vue +1 -1
  187. package/src/fields/DataSourceMethods.vue +6 -2
  188. package/src/fields/DataSourceMocks.vue +3 -0
  189. package/src/fields/DataSourceSelect.vue +1 -1
  190. package/src/fields/DisplayConds.vue +17 -139
  191. package/src/fields/EventSelect.vue +29 -416
  192. package/src/fields/KeyValue.vue +1 -1
  193. package/src/fields/StyleSetter/Index.vue +2 -8
  194. package/src/fields/StyleSetter/components/Border.vue +4 -38
  195. package/src/fields/StyleSetter/components/Box.vue +1 -1
  196. package/src/fields/StyleSetter/components/Position.vue +1 -1
  197. package/src/fields/StyleSetter/configs.ts +690 -0
  198. package/src/fields/StyleSetter/pro/Background.vue +9 -64
  199. package/src/fields/StyleSetter/pro/Border.vue +5 -16
  200. package/src/fields/StyleSetter/pro/Font.vue +11 -71
  201. package/src/fields/StyleSetter/pro/Layout.vue +10 -230
  202. package/src/fields/StyleSetter/pro/Position.vue +11 -82
  203. package/src/fields/StyleSetter/pro/Transform.vue +6 -34
  204. package/src/fields/UISelect.vue +0 -12
  205. package/src/fields/configs/codeSelect.ts +127 -0
  206. package/src/fields/configs/displayConds.ts +184 -0
  207. package/src/fields/configs/eventSelect.ts +309 -0
  208. package/src/fields/configs/stickyAddButton.ts +32 -0
  209. package/src/fields/headless-validation.ts +177 -0
  210. package/src/headless.ts +33 -0
  211. package/src/hooks/index.ts +1 -0
  212. package/src/hooks/use-compare-form.ts +166 -0
  213. package/src/hooks/use-form-context.ts +56 -0
  214. package/src/hooks/use-stage.ts +1 -0
  215. package/src/index.ts +9 -0
  216. package/src/initService.ts +73 -18
  217. package/src/layouts/CodeEditor.vue +32 -6
  218. package/src/layouts/Framework.vue +7 -6
  219. package/src/layouts/history-list/BucketTab.vue +2 -2
  220. package/src/layouts/history-list/HistoryDiffDialog.vue +33 -15
  221. package/src/layouts/history-list/HistoryListPanel.vue +16 -18
  222. package/src/layouts/history-list/useHistoryRevert.ts +57 -41
  223. package/src/layouts/props-panel/FormPanel.vue +75 -20
  224. package/src/layouts/props-panel/PropsPanel.vue +81 -30
  225. package/src/layouts/props-panel/use-style-panel.ts +4 -3
  226. package/src/layouts/sidebar/ComponentListPanel.vue +6 -2
  227. package/src/layouts/sidebar/Sidebar.vue +5 -3
  228. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +5 -2
  229. package/src/layouts/sidebar/code-block/useContentMenu.ts +14 -2
  230. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
  231. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +3 -3
  232. package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
  233. package/src/layouts/sidebar/layer/LayerMenu.vue +2 -2
  234. package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
  235. package/src/layouts/sidebar/layer/LayerPanel.vue +5 -2
  236. package/src/layouts/sidebar/layer/use-click.ts +3 -3
  237. package/src/layouts/sidebar/layer/use-node-status.ts +2 -2
  238. package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
  239. package/src/layouts/workspace/viewer/Stage.vue +80 -10
  240. package/src/layouts/workspace/viewer/ViewerMenu.vue +7 -7
  241. package/src/plugin.ts +35 -25
  242. package/src/services/codeBlock.ts +4 -0
  243. package/src/services/dataSource.ts +3 -0
  244. package/src/services/dep.ts +292 -47
  245. package/src/services/editor.ts +383 -120
  246. package/src/services/events.ts +8 -7
  247. package/src/services/history.ts +22 -1
  248. package/src/services/keybinding.ts +3 -3
  249. package/src/services/ui.ts +26 -5
  250. package/src/theme/code-block.scss +0 -37
  251. package/src/theme/display-conds.scss +4 -0
  252. package/src/theme/event.scss +25 -33
  253. package/src/theme/floating-box.scss +9 -1
  254. package/src/theme/framework.scss +4 -1
  255. package/src/theme/layer-node-content.scss +14 -0
  256. package/src/theme/nav-menu.scss +5 -1
  257. package/src/theme/props-panel.scss +17 -3
  258. package/src/theme/scroll-bar.scss +64 -0
  259. package/src/theme/theme.scss +3 -0
  260. package/src/theme/themes/magic-admin/index.scss +109 -9
  261. package/src/theme/ui-select.scss +9 -0
  262. package/src/type.ts +216 -6
  263. package/src/utils/code-block.ts +1 -0
  264. package/src/utils/config.ts +9 -1
  265. package/src/utils/const.ts +3 -3
  266. package/src/utils/content-menu.ts +2 -2
  267. package/src/utils/data-source/index.ts +31 -12
  268. package/src/utils/dep/collect-worker-client.ts +215 -0
  269. package/src/utils/dep/idle-task.ts +104 -35
  270. package/src/utils/dep/worker.ts +113 -9
  271. package/src/utils/event.ts +237 -0
  272. package/src/utils/index.ts +2 -0
  273. package/src/utils/monaco-editor.ts +27 -0
  274. package/src/utils/operator.ts +2 -2
  275. package/src/utils/props.ts +61 -122
  276. package/src/utils/type-match-rules.ts +697 -0
  277. package/types/headless.d.ts +17 -0
  278. package/types/index.d.ts +1199 -724
  279. package/src/fields/StyleSetter/icons/align-items/index copy.ts +0 -5
package/types/index.d.ts CHANGED
@@ -1,14 +1,15 @@
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";
1
+ import formPlugin, { CascaderOption, ChangeRecord, CodeSelectColConfig, CodeSelectConfig, CondOpSelectConfig, ContainerChangeEventData, DataSourceFieldSelectConfig, DataSourceFieldsConfig, DataSourceInputConfig, DataSourceMethodSelectConfig, DataSourceMethodsConfig, DataSourceMocksConfig, DataSourceSelect, DisplayCondsConfig, EventSelectConfig, FieldProps, FormConfig, FormContext, FormInstallOptions, 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";
8
- import EventEmitter, { EventEmitter as EventEmitter$1 } from "events";
7
+ import { App, AppContext, CSSProperties, Component, ComputedRef, Ref, ShallowRef } from "vue";
8
+ import EventEmitter$1, { EventEmitter } from "events";
9
9
  import * as Monaco from "monaco-editor";
10
10
  import Sortable, { Options, SortableEvent } from "sortablejs";
11
11
  import { PascalCasedProperties, Writable } from "type-fest";
12
+ import { HeadlessFieldOptions, TypeMatchValidateContext, TypeMatchValidator } from "@tmagic/form/headless";
12
13
  import { FormItemConfig } from "@tmagic/form-schema";
13
14
  import { StyleSchema } from "@tmagic/schema";
14
15
  export * from "@tmagic/form";
@@ -16,7 +17,6 @@ export * from "@tmagic/table";
16
17
  export * from "@tmagic/stage";
17
18
  export * from "@tmagic/design";
18
19
  export * from "@tmagic/utils";
19
-
20
20
  //#region temp/packages/editor/src/services/BaseService.d.ts
21
21
  /**
22
22
  * 对Class进行扩展
@@ -47,7 +47,7 @@ export * from "@tmagic/utils";
47
47
  * 调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数,after第一个参数则是原方法的return值;
48
48
  * 如需终止后续方法调用可以return new Error();
49
49
  */
50
- declare class BaseService extends EventEmitter$1 {
50
+ declare class BaseService extends EventEmitter {
51
51
  private pluginOptionsList;
52
52
  private taskList;
53
53
  private doingTask;
@@ -108,12 +108,7 @@ declare class CodeBlock extends BaseService {
108
108
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
109
109
  * @returns {void}
110
110
  */
111
- setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, {
112
- changeRecords,
113
- doNotPushHistory,
114
- historyDescription,
115
- historySource
116
- }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
111
+ setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
117
112
  /**
118
113
  * 为了兼容历史原因
119
114
  * 设置代码块ID和代码内容到源dsl
@@ -126,12 +121,7 @@ declare class CodeBlock extends BaseService {
126
121
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
127
122
  * @returns {void}
128
123
  */
129
- setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, {
130
- changeRecords,
131
- doNotPushHistory,
132
- historyDescription,
133
- historySource
134
- }?: HistoryOpOptionsWithChangeRecords): void;
124
+ setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): void;
135
125
  /**
136
126
  * 根据代码块id数组获取代码dsl
137
127
  * @param {string[]} ids 代码块id数组
@@ -189,11 +179,7 @@ declare class CodeBlock extends BaseService {
189
179
  * @param options 可选配置
190
180
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
191
181
  */
192
- deleteCodeDslByIds(codeIds: Id[], {
193
- doNotPushHistory,
194
- historyDescription,
195
- historySource
196
- }?: HistoryOpOptions): Promise<void>;
182
+ deleteCodeDslByIds(codeIds: Id[], { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): Promise<void>;
197
183
  /**
198
184
  * 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
199
185
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
@@ -302,7 +288,7 @@ declare class CodeBlock extends BaseService {
302
288
  private applyHistoryStep;
303
289
  }
304
290
  type CodeBlockService = CodeBlock;
305
- declare const _default$38: CodeBlock;
291
+ declare const _default$40: CodeBlock;
306
292
  //#endregion
307
293
  //#region temp/packages/editor/src/services/componentList.d.ts
308
294
  declare class ComponentList extends BaseService {
@@ -317,6 +303,7 @@ declare class ComponentList extends BaseService {
317
303
  destroy(): void;
318
304
  }
319
305
  type ComponentListService = ComponentList;
306
+ declare const _default$41: ComponentList;
320
307
  //#endregion
321
308
  //#region temp/packages/editor/src/services/dataSource.d.ts
322
309
  interface State$2 {
@@ -360,11 +347,7 @@ declare class DataSource extends BaseService {
360
347
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
361
348
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
362
349
  */
363
- add(config: DataSourceSchema, {
364
- doNotPushHistory,
365
- historyDescription,
366
- historySource
367
- }?: HistoryOpOptions): {
350
+ add(config: DataSourceSchema, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): {
368
351
  id: string;
369
352
  type: string;
370
353
  title?: string;
@@ -383,12 +366,7 @@ declare class DataSource extends BaseService {
383
366
  * @param data.doNotPushHistory 是否不写入历史记录(默认 false)
384
367
  * @param data.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
385
368
  */
386
- update(config: DataSourceSchema, {
387
- changeRecords,
388
- doNotPushHistory,
389
- historyDescription,
390
- historySource
391
- }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
369
+ update(config: DataSourceSchema, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
392
370
  /**
393
371
  * 删除数据源
394
372
  * @param id 数据源 id
@@ -396,11 +374,7 @@ declare class DataSource extends BaseService {
396
374
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
397
375
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
398
376
  */
399
- remove(id: string, {
400
- doNotPushHistory,
401
- historyDescription,
402
- historySource
403
- }?: HistoryOpOptions): void;
377
+ remove(id: string, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): void;
404
378
  /**
405
379
  * 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
406
380
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
@@ -500,7 +474,10 @@ declare class DataSource extends BaseService {
500
474
  private applyHistoryStep;
501
475
  }
502
476
  type DataSourceService = DataSource;
503
- declare const _default$39: DataSource;
477
+ declare const _default$42: DataSource;
478
+ //#endregion
479
+ //#region temp/packages/editor/src/utils/dep/worker.d.ts
480
+ type DepsData = Record<string, Record<Id, DepData>>;
504
481
  //#endregion
505
482
  //#region temp/packages/editor/src/services/dep.d.ts
506
483
  interface DepEvents {
@@ -517,8 +494,12 @@ type StateKey = keyof State$1;
517
494
  declare class Dep extends BaseService {
518
495
  private state;
519
496
  private idleTask;
497
+ private collectWorker;
520
498
  private watcher;
521
499
  private waitingWorker?;
500
+ private resolveWaitingWorker?;
501
+ private workerGeneration;
502
+ private activeBatches;
522
503
  constructor();
523
504
  set<K extends StateKey, T extends State$1[K]>(name: K, value: T): void;
524
505
  get<K extends StateKey>(name: K): State$1[K];
@@ -532,8 +513,16 @@ declare class Dep extends BaseService {
532
513
  removeTarget(id: Id, type?: string): void;
533
514
  clearTargets(): void;
534
515
  collect(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): void;
535
- collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<void>;
536
- collectByWorker(dsl: MApp): Promise<Record<string, Record<string, DepData>>>;
516
+ /**
517
+ * 空闲收集依赖
518
+ *
519
+ * 遍历匹配是整个收集过程中最耗时的部分(要深度遍历节点树并对每个属性做 target 匹配),
520
+ * 节点/数据源多时在主线程执行会长时间卡死页面,因此优先交给 worker 执行,主线程只负责把结果写回 target。
521
+ * 自定义 target 的 isTarget 是无法跨线程传递的闭包函数(没有 descriptor),仍走主线程空闲队列;
522
+ * worker 不可用(如 SSR)或执行失败时也会回退到主线程空闲队列。
523
+ */
524
+ collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<boolean>;
525
+ collectByWorker(dsl: MApp): Promise<DepsData>;
537
526
  collectNode(node: MNode, target: Target, depExtendedData?: DepExtendedData, deep?: boolean): void;
538
527
  clear(nodes?: MNode[]): void;
539
528
  clearByType(type: DepTargetType$1, nodes?: MNode[]): void;
@@ -550,25 +539,55 @@ declare class Dep extends BaseService {
550
539
  * 按 pageId 匹配,可清掉页面内已被删除节点的残留依赖
551
540
  */
552
541
  private removePageDep;
542
+ /**
543
+ * 把遍历匹配交给 worker,结果回来后按 target 分片写回主线程
544
+ */
545
+ private collectByCollectWorker;
546
+ /**
547
+ * 用 worker 的收集结果替换 target 上这批节点的依赖
548
+ */
549
+ private enqueueApplyTask;
550
+ private enqueueTasks;
553
551
  private enqueueTask;
552
+ private beginBatchTask;
553
+ private onBatchTaskDone;
554
+ private settleBatchDs;
555
+ private finishBatch;
556
+ /**
557
+ * idleTask 被清空时,在途批次的任务不会再执行,必须主动结算,
558
+ * 否则对应的 collectIdle Promise 永远不会 resolve(collecting 卡在 true、once 监听器泄漏)。
559
+ * 收集被中断(通常紧跟一次全量重新收集),因此不再 emit collected/ds-collected,仅结算 Promise。
560
+ */
561
+ private abortActiveBatches;
562
+ private updateCollectingState;
554
563
  }
555
564
  type DepService = Dep;
556
- declare const _default$41: Dep;
565
+ declare const _default$44: Dep;
557
566
  //#endregion
558
567
  //#region temp/packages/editor/src/services/editor.d.ts
559
568
  declare class Editor extends BaseService {
560
569
  state: StoreState;
561
570
  private selectionBeforeOp;
571
+ /**
572
+ * 操作前的节点校验错误快照,与 selectionBeforeOp 同时在 captureSelectionBeforeOp 中捕获,
573
+ * 供 pushOpHistory 写入 step.extra.invalidNodeIdsBefore,用于撤销时还原到「操作前」的错误状态。
574
+ */
575
+ private invalidNodeIdsBeforeOp;
562
576
  /**
563
577
  * 最近一次 pushOpHistory 写入的历史记录 uuid。
564
578
  * 供 *AndGetHistoryId 系列方法在调用普通操作后取回本次产生的历史记录 id;
565
579
  * 普通操作不会读取它,调用前由 *AndGetHistoryId 重置为 null。
566
580
  */
567
581
  private lastPushedHistoryId;
582
+ /**
583
+ * 上一次 doAdd 的插入记忆:nodeId 为插入的节点,selectedId 为当时的选中节点。
584
+ * 仅在选中节点未变化时复用(连续 add / doNotSelect / 批量粘贴),选中变化后自动失效,无需手动清理。
585
+ */
586
+ private lastAdded;
568
587
  constructor();
569
588
  /**
570
589
  * 设置当前指点节点配置
571
- * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
590
+ * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength
572
591
  * @param value MNode
573
592
  * @param options.historySource 设置 root 时,本次变更写入历史记录的「操作来源」(仅 name === 'root' 时生效)
574
593
  */
@@ -577,7 +596,7 @@ declare class Editor extends BaseService {
577
596
  }): void;
578
597
  /**
579
598
  * 获取当前指点节点配置
580
- * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
599
+ * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength'
581
600
  * @returns MNode
582
601
  */
583
602
  get<K extends StoreStateKey>(name: K): StoreState[K];
@@ -633,28 +652,16 @@ declare class Editor extends BaseService {
633
652
  */
634
653
  multiSelect(ids: Id[]): void;
635
654
  selectRoot(): void;
636
- doAdd(node: MNode, parent: MContainer): Promise<MNode>;
655
+ doAdd(node: MNode, parent: MContainer, _options?: DslOpOptions): Promise<MNode>;
637
656
  /**
638
657
  * 向指点容器添加组件节点
639
658
  * @param addConfig 将要添加的组件节点配置
640
659
  * @param parent 要添加到的容器组件节点配置,如果不设置,默认为当前选中的组件的父节点
641
- * @param options 可选配置
642
- * @param options.doNotSelect 添加后是否不更新当前选中节点(默认 false,添加后会选中新增的节点)
643
- * @param options.doNotSwitchPage 添加后是否不切换当前页面(默认 false;新增页面 / 跨页新增时为 true 会跳过会引发页面切换的选中操作)
644
- * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
660
+ * @param options 可选配置,见 {@link DslOpOptions}
645
661
  * @returns 添加后的节点
646
662
  */
647
- add(addNode: AddMNode | MNode[], parent?: MContainer | null, {
648
- doNotSelect,
649
- doNotSwitchPage,
650
- doNotPushHistory,
651
- historyDescription,
652
- historySource
653
- }?: DslOpOptions): Promise<MNode | MNode[]>;
654
- doRemove(node: MNode, {
655
- doNotSelect,
656
- doNotSwitchPage
657
- }?: DslOpOptions): Promise<void>;
663
+ add(addNode: AddMNode | MNode[], parent?: MContainer | null, options?: DslOpOptions): Promise<MNode | MNode[]>;
664
+ doRemove(node: MNode, { doNotSelect, doNotSwitchPage }?: DslOpOptions): Promise<void>;
658
665
  /**
659
666
  * 删除组件
660
667
  * @param {Object} node 要删除的节点或节点集合
@@ -663,20 +670,8 @@ declare class Editor extends BaseService {
663
670
  * @param options.doNotSwitchPage 删除后是否不切换当前页面(默认 false;删除页面 / 页面片段时为 true 会跳过自动切换到首个剩余页面)
664
671
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
665
672
  */
666
- remove(nodeOrNodeList: MNode | MNode[], {
667
- doNotSelect,
668
- doNotSwitchPage,
669
- doNotPushHistory,
670
- historyDescription,
671
- historySource
672
- }?: DslOpOptions): Promise<void>;
673
- doUpdate(config: MNode, {
674
- changeRecords,
675
- historySource
676
- }?: {
677
- changeRecords?: ChangeRecord[];
678
- historySource?: HistoryOpSource;
679
- }): Promise<{
673
+ remove(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<void>;
674
+ doUpdate(config: MNode, data?: UpdateOptions): Promise<{
680
675
  newNode: MNode;
681
676
  oldNode: MNode;
682
677
  changeRecords?: ChangeRecord[];
@@ -685,20 +680,10 @@ declare class Editor extends BaseService {
685
680
  * 更新节点
686
681
  * update后会触发依赖收集,收集完后会掉stage.update方法
687
682
  * @param config 新的节点配置,配置中需要有id信息
688
- * @param data 额外数据
689
- * @param data.changeRecords 单节点 form 端变更记录(多节点场景下被忽略,使用 changeRecordList)
690
- * @param data.changeRecordList 多节点 form 端变更记录列表,按 config 数组同序对应每个节点;优先级高于 changeRecords
691
- * @param data.doNotPushHistory 是否不写入历史记录(默认 false)
692
- * @param data.historyDescription 入栈时附带的人类可读描述,用于历史面板展示(不影响 undo/redo 行为)
683
+ * @param data 额外数据,见 {@link UpdateOptions}
693
684
  * @returns 更新后的节点配置
694
685
  */
695
- update(config: MNode | MNode[], data?: {
696
- changeRecords?: ChangeRecord[];
697
- changeRecordList?: ChangeRecord[][];
698
- doNotPushHistory?: boolean;
699
- historyDescription?: string;
700
- historySource?: HistoryOpSource;
701
- }): Promise<MNode | MNode[]>;
686
+ update(config: MNode | MNode[], data?: UpdateOptions): Promise<MNode | MNode[]>;
702
687
  /**
703
688
  * 将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]
704
689
  * @param id1 组件ID
@@ -709,11 +694,7 @@ declare class Editor extends BaseService {
709
694
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
710
695
  * @returns void
711
696
  */
712
- sort(id1: Id, id2: Id, {
713
- doNotSelect,
714
- doNotPushHistory,
715
- historySource
716
- }?: DslOpOptions): Promise<void>;
697
+ sort(id1: Id, id2: Id, { doNotSelect, doNotPushHistory, historySource }?: DslOpOptions): Promise<void>;
717
698
  /**
718
699
  * 将组件节点配置存储到localStorage中
719
700
  * @param config 组件节点配置
@@ -736,13 +717,7 @@ declare class Editor extends BaseService {
736
717
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
737
718
  * @returns 添加后的组件节点配置
738
719
  */
739
- paste(position?: PastePosition, collectorOptions?: TargetOptions, {
740
- doNotSelect,
741
- doNotSwitchPage,
742
- doNotPushHistory,
743
- historyDescription,
744
- historySource
745
- }?: DslOpOptions): Promise<MNode | MNode[] | void>;
720
+ paste(position?: PastePosition, collectorOptions?: TargetOptions, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[] | void>;
746
721
  doPaste(config: MNode[], position?: PastePosition): Promise<MNode[]>;
747
722
  doAlignCenter(config: MNode): Promise<MNode>;
748
723
  /**
@@ -754,23 +729,14 @@ declare class Editor extends BaseService {
754
729
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
755
730
  * @returns 当前组件节点配置
756
731
  */
757
- alignCenter(config: MNode | MNode[], {
758
- doNotSelect,
759
- doNotPushHistory,
760
- historyDescription,
761
- historySource
762
- }?: DslOpOptions): Promise<MNode | MNode[]>;
732
+ alignCenter(config: MNode | MNode[], { doNotSelect, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
763
733
  /**
764
734
  * 移动当前选中节点位置
765
735
  * @param offset 偏移量
766
736
  * @param options 可选配置
767
737
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
768
738
  */
769
- moveLayer(offset: number | LayerOffset, {
770
- doNotPushHistory,
771
- historyDescription,
772
- historySource
773
- }?: DslOpOptions): Promise<void>;
739
+ moveLayer(offset: number | LayerOffset, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
774
740
  /**
775
741
  * 移动一个或多个节点到指定容器中。
776
742
  *
@@ -785,18 +751,8 @@ declare class Editor extends BaseService {
785
751
  * @param options.doNotSwitchPage 移动后是否不切换当前页面(默认 false;目标容器位于其它页面时为 true 会跳过自动选中以避免页面切换)
786
752
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
787
753
  */
788
- moveToContainer(config: MNode | MNode[], targetId: Id, {
789
- doNotSelect,
790
- doNotSwitchPage,
791
- doNotPushHistory,
792
- historyDescription,
793
- historySource
794
- }?: DslOpOptions): Promise<MNode | MNode[]>;
795
- dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, {
796
- doNotPushHistory,
797
- historyDescription,
798
- historySource
799
- }?: DslOpOptions): Promise<void>;
754
+ moveToContainer(config: MNode | MNode[], targetId: Id, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
755
+ dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
800
756
  /**
801
757
  * 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
802
758
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
@@ -809,13 +765,7 @@ declare class Editor extends BaseService {
809
765
  /** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
810
766
  removeAndGetHistoryId(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
811
767
  /** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
812
- updateAndGetHistoryId(config: MNode | MNode[], data?: {
813
- changeRecords?: ChangeRecord[];
814
- changeRecordList?: ChangeRecord[][];
815
- doNotPushHistory?: boolean;
816
- historyDescription?: string;
817
- historySource?: HistoryOpSource;
818
- }): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
768
+ updateAndGetHistoryId(config: MNode | MNode[], data?: UpdateOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
819
769
  /** 等价于 {@link moveLayer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
820
770
  moveLayerAndGetHistoryId(offset: number | LayerOffset, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
821
771
  /** 等价于 {@link moveToContainer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
@@ -867,19 +817,52 @@ declare class Editor extends BaseService {
867
817
  * @returns 实际移动到的最终游标位置
868
818
  */
869
819
  gotoPageStep(targetCursor: number): Promise<number>;
870
- move(left: number, top: number, {
871
- doNotPushHistory,
872
- historyDescription,
873
- historySource
874
- }?: DslOpOptions): Promise<void>;
820
+ move(left: number, top: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
875
821
  resetState(): void;
876
822
  destroy(): void;
877
823
  resetModifiedNodeId(): void;
824
+ /**
825
+ * 记录(或覆盖)某个节点在指定来源(属性表单 / 样式表单)上的校验错误信息。
826
+ * @param id 节点 id
827
+ * @param source 错误来源:'props'(属性表单)| 'style'(样式表单)
828
+ * @param message 错误文案(可能是包含 <br> 的 HTML)
829
+ */
830
+ setInvalidNode(id: Id, source: NodeInvalidSource, message: string): void;
831
+ /**
832
+ * 删除节点的校验错误记录。
833
+ * @param id 节点 id
834
+ * @param source 指定来源则仅删除该来源;不传则删除该节点全部来源的错误
835
+ */
836
+ deleteInvalidNode(id: Id, source?: NodeInvalidSource): void;
837
+ /** 获取当前存在校验错误的节点错误 Map(key 为节点 id) */
838
+ getInvalidNodeIds(): Map<Id, NodeInvalidInfo>;
839
+ /** 获取指定节点的校验错误信息 */
840
+ getInvalidNodeInfo(id: Id): NodeInvalidInfo | undefined;
841
+ /** 清空全部校验错误记录 */
842
+ resetInvalidNodeId(): void;
878
843
  usePlugin(options: AsyncHookPlugin<AsyncMethodName, Editor>): void;
879
844
  on<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
880
845
  once<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
881
846
  emit<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, ...args: Param): boolean;
847
+ /**
848
+ * 应用一次属性面板提交携带的校验错误信息(在写入历史记录之前调用,使历史快照与本次变更对齐)。
849
+ * - invalidInfo 为空(调用方未携带):认为本次更新对应的节点已无校验错误,清除其全部来源的错误;
850
+ * - error 非空则记录错误,为空则清除对应来源的错误。
851
+ */
852
+ private applyInvalidInfo;
853
+ /** 删除被移除节点(含其子树)的校验错误记录,避免残留误报 */
854
+ private removeInvalidNodesBySubtree;
855
+ /** 清理不在当前 DSL 中的失效节点错误记录(用于整体替换 root 后) */
856
+ private pruneInvalidNodeIds;
882
857
  private addModifiedNodeId;
858
+ /**
859
+ * 获取指定节点所属的页面 / 页面片:
860
+ * - 普通节点返回其所在的 page;
861
+ * - 节点本身就是 page / pageFragment 时返回它自己;
862
+ * - 找不到时返回 null。
863
+ * 供 `change` 事件携带「变更节点对应的 page」(而非编辑器当前选中页)。
864
+ */
865
+ private getPageOfNode;
883
866
  private captureSelectionBeforeOp;
884
867
  /**
885
868
  * 比较「上一次 root」与「新 root」的页面 / 页面片,按页面粒度把整体替换拆成历史记录:
@@ -903,10 +886,12 @@ declare class Editor extends BaseService {
903
886
  /**
904
887
  * 应用历史操作(撤销 / 重做)
905
888
  *
906
- * 所有 DSL 修改都走 `editor.add / remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
907
- * `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底。
889
+ * 删除 / 更新类修改走 `editor.remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
890
+ * `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底;
891
+ * 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
892
+ * 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
908
893
  *
909
- * 注意:这些公开方法会发出 add / remove / update 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
894
+ * 注意:这些路径都会发出 add / remove / update / change 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
910
895
  * 请监听 `history-change` 事件配合判断。
911
896
  *
912
897
  * @param step 操作记录
@@ -914,9 +899,14 @@ declare class Editor extends BaseService {
914
899
  */
915
900
  private applyHistoryOp;
916
901
  private selectedConfigExceptionHandler;
902
+ /**
903
+ * 撤销 remove / 重做 add 通过手工 splice 按 step 记录的 parentId / index 精确还原节点(不走 this.add,原因见调用处注释),
904
+ * 这里补齐与 this.add 等价的 add / change 事件,保证撤销/重做路径的事件行为与正向操作一致。
905
+ */
906
+ private emitHistoryInsertEvents;
917
907
  }
918
908
  type EditorService = Editor;
919
- declare const _default$42: Editor;
909
+ declare const _default$45: Editor;
920
910
  //#endregion
921
911
  //#region temp/packages/editor/src/services/events.d.ts
922
912
  declare const canUsePluginMethods$6: {
@@ -929,22 +919,27 @@ declare class Events extends BaseService {
929
919
  constructor();
930
920
  setEvents(events: Record<string, EventOption[]>): void;
931
921
  setEvent(type: string, events: EventOption[]): void;
932
- getEvent(type: string): EventOption[];
922
+ getEvent(type: string, _data?: {
923
+ node?: MNode | null;
924
+ }): EventOption[];
933
925
  setMethods(methods: Record<string, EventOption[]>): void;
934
926
  setMethod(type: string, method: EventOption[]): void;
935
- getMethod(type: string, _targetId: Id): EventOption[];
927
+ getMethod(type: string, _data?: {
928
+ node?: MNode | null;
929
+ targetId?: Id;
930
+ }): EventOption[];
936
931
  resetState(): void;
937
932
  destroy(): void;
938
933
  usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$4, Events>): void;
939
934
  }
940
935
  type EventsService = Events;
941
- declare const _default$43: Events;
936
+ declare const _default$46: Events;
942
937
  //#endregion
943
938
  //#region temp/packages/editor/src/utils/undo-redo.d.ts
944
939
  /**
945
940
  * UndoRedo 栈的可序列化快照,用于持久化(如写入 IndexedDB)后再还原。
946
941
  */
947
- interface SerializedUndoRedo<T = any> {
942
+ export interface SerializedUndoRedo<T = any> {
948
943
  /** 栈内全部元素(按时间正序,索引 0 为最早一步)。 */
949
944
  elementList: T[];
950
945
  /** 游标位置(已应用步骤数量)。 */
@@ -952,7 +947,7 @@ interface SerializedUndoRedo<T = any> {
952
947
  /** 栈容量上限。 */
953
948
  listMaxSize: number;
954
949
  }
955
- declare class UndoRedo<T = any> {
950
+ export declare class UndoRedo<T = any> {
956
951
  /**
957
952
  * 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
958
953
  * 游标会被夹紧到 [0, length] 区间,避免脏数据导致越界。
@@ -1155,6 +1150,22 @@ declare class History extends BaseService {
1155
1150
  * @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
1156
1151
  */
1157
1152
  markSaved(stepType: HistoryStepType, id?: Id): void;
1153
+ /**
1154
+ * 派发「页面 / 页面片结构变更」事件(`page-structure-change`)。
1155
+ *
1156
+ * 常规 `editorService.add` / `remove` 页面节点不会写入 `page` 历史栈(见 editor.add / remove 中
1157
+ * 对 isPageOrFragment 的分支),因此不会产生任何 historyService 事件。该方法用于在这些
1158
+ * 场景(以及 setRoot 整体替换 DSL 增删页面)下,向外统一通知页面结构的增删变化,供业务方感知。
1159
+ *
1160
+ * 一次操作涉及多个页面时,调用方应把本次增删的页面**合并为一个 change 一次性传入**,
1161
+ * 使一次操作只派发一个事件;`add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
1162
+ *
1163
+ * @param change 本次结构变更:{ add: 新增的页面列表, remove: 删除的页面列表 }
1164
+ */
1165
+ notifyPageStructureChange(change: {
1166
+ add: (MPage | MPageFragment)[];
1167
+ remove: (MPage | MPageFragment)[];
1168
+ }): void;
1158
1169
  /**
1159
1170
  * 把当前内存中的全部历史栈(页面 / 代码块 / 数据源 / 扩展类型)序列化后写入本地 IndexedDB。
1160
1171
  *
@@ -1254,7 +1265,7 @@ declare class History extends BaseService {
1254
1265
  private resolveDbName;
1255
1266
  }
1256
1267
  type HistoryService = History;
1257
- declare const _default$44: History;
1268
+ declare const _default$47: History;
1258
1269
  //#endregion
1259
1270
  //#region temp/packages/editor/src/services/keybinding.d.ts
1260
1271
  declare class Keybinding extends BaseService {
@@ -1293,6 +1304,7 @@ declare class Keybinding extends BaseService {
1293
1304
  private getKeyconKeys;
1294
1305
  }
1295
1306
  type KeybindingService = Keybinding;
1307
+ declare const _default$48: Keybinding;
1296
1308
  //#endregion
1297
1309
  //#region temp/packages/editor/src/services/props.d.ts
1298
1310
  declare const canUsePluginMethods$4: {
@@ -1334,10 +1346,7 @@ declare class Props extends BaseService {
1334
1346
  * @param type 组件类型
1335
1347
  * @returns 组件初始值
1336
1348
  */
1337
- getPropsValue(componentType: string, {
1338
- inputEvent,
1339
- ...defaultValue
1340
- }?: Record<string, any>): Promise<any>;
1349
+ getPropsValue(componentType: string, { inputEvent, ...defaultValue }?: Record<string, any>): Promise<any>;
1341
1350
  hasPropsValue(type: string): boolean;
1342
1351
  createId(type: string | number): string;
1343
1352
  /**
@@ -1392,7 +1401,7 @@ declare class Props extends BaseService {
1392
1401
  private setRelateId;
1393
1402
  }
1394
1403
  type PropsService = Props;
1395
- declare const _default$46: Props;
1404
+ declare const _default$50: Props;
1396
1405
  //#endregion
1397
1406
  //#region temp/packages/editor/src/services/stageOverlay.d.ts
1398
1407
  declare const canUsePluginMethods$3: {
@@ -1419,7 +1428,7 @@ declare class StageOverlay extends BaseService {
1419
1428
  private updateSelectStatus;
1420
1429
  }
1421
1430
  type StageOverlayService = StageOverlay;
1422
- declare const _default$47: StageOverlay;
1431
+ declare const _default$51: StageOverlay;
1423
1432
  //#endregion
1424
1433
  //#region temp/packages/editor/src/services/storage.d.ts
1425
1434
  interface Options$1 {
@@ -1482,7 +1491,7 @@ declare class WebStorage extends BaseService {
1482
1491
  private getValueAndProtocol;
1483
1492
  }
1484
1493
  type StorageService = WebStorage;
1485
- declare const _default$48: WebStorage;
1494
+ declare const _default$52: WebStorage;
1486
1495
  //#endregion
1487
1496
  //#region temp/packages/editor/src/services/ui.d.ts
1488
1497
  declare const canUsePluginMethods$1: {
@@ -1502,10 +1511,10 @@ declare class Ui extends BaseService {
1502
1511
  private setStageRect;
1503
1512
  }
1504
1513
  type UiService = Ui;
1505
- declare const _default$49: Ui;
1514
+ declare const _default$53: Ui;
1506
1515
  //#endregion
1507
1516
  //#region temp/packages/editor/src/type.d.ts
1508
- type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
1517
+ export type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
1509
1518
  workspace(props: {
1510
1519
  editorService: EditorService;
1511
1520
  }): any;
@@ -1513,7 +1522,7 @@ type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSl
1513
1522
  editorService: EditorService;
1514
1523
  }): any;
1515
1524
  };
1516
- interface FrameworkSlots {
1525
+ export interface FrameworkSlots {
1517
1526
  header(props: {}): any;
1518
1527
  nav(props: {}): any;
1519
1528
  'content-before'(props: {}): any;
@@ -1523,7 +1532,7 @@ interface FrameworkSlots {
1523
1532
  empty(props: {}): any;
1524
1533
  workspace(props: {}): any;
1525
1534
  'props-panel'(props: {}): any;
1526
- 'footer'(props: {}): any;
1535
+ footer(props: {}): any;
1527
1536
  'page-bar'(props: {}): any;
1528
1537
  'page-bar-add-button'(props: {}): any;
1529
1538
  'page-bar-title'(props: {
@@ -1536,19 +1545,19 @@ interface FrameworkSlots {
1536
1545
  list: (MPage | MPageFragment)[];
1537
1546
  }): any;
1538
1547
  }
1539
- interface ScrollViewerSlots {
1548
+ export interface ScrollViewerSlots {
1540
1549
  before(props: {}): any;
1541
1550
  content(props: {}): any;
1542
1551
  default(props: {}): any;
1543
1552
  }
1544
- interface StageSlots extends ScrollViewerSlots {
1553
+ export interface StageSlots extends ScrollViewerSlots {
1545
1554
  'stage-top'(props: {}): any;
1546
1555
  }
1547
- interface WorkspaceSlots extends StageSlots {
1556
+ export interface WorkspaceSlots extends StageSlots {
1548
1557
  stage(props: {}): any;
1549
1558
  'workspace-content'(props: {}): any;
1550
1559
  }
1551
- interface ComponentListPanelSlots {
1560
+ export interface ComponentListPanelSlots {
1552
1561
  'component-list-panel-header'(props: {}): any;
1553
1562
  'component-list'(props: {
1554
1563
  componentGroupList: ComponentGroup[];
@@ -1557,23 +1566,23 @@ interface ComponentListPanelSlots {
1557
1566
  component: ComponentItem;
1558
1567
  }): any;
1559
1568
  }
1560
- interface CodeBlockListPanelSlots extends CodeBlockListSlots {
1569
+ export interface CodeBlockListPanelSlots extends CodeBlockListSlots {
1561
1570
  'code-block-panel-search'(props: {}): any;
1562
1571
  'code-block-panel-header'(props: {}): any;
1563
1572
  }
1564
- interface CodeBlockListSlots {
1573
+ export interface CodeBlockListSlots {
1565
1574
  'code-block-panel-tool'(props: {
1566
1575
  id: Id;
1567
1576
  data: any;
1568
1577
  }): any;
1569
1578
  }
1570
- interface DataSourceListSlots {
1579
+ export interface DataSourceListSlots {
1571
1580
  'data-source-panel-tool'(props: {
1572
1581
  data: any;
1573
1582
  }): any;
1574
1583
  'data-source-panel-search'(props: {}): any;
1575
1584
  }
1576
- interface LayerNodeSlots {
1585
+ export interface LayerNodeSlots {
1577
1586
  'layer-node-content'(props: {
1578
1587
  data: MNode;
1579
1588
  }): any;
@@ -1584,16 +1593,17 @@ interface LayerNodeSlots {
1584
1593
  data: MNode;
1585
1594
  }): any;
1586
1595
  }
1587
- interface LayerPanelSlots extends LayerNodeSlots {
1596
+ export interface LayerPanelSlots extends LayerNodeSlots {
1588
1597
  'layer-panel-header'(props: {}): any;
1589
1598
  }
1590
- interface PropsPanelSlots {
1599
+ export interface PropsPanelSlots {
1591
1600
  'props-panel-header'(props: {}): any;
1592
1601
  }
1593
- type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPanelSlots & DataSourceListSlots;
1594
- type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
1595
- type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
1596
- interface EditorInstallOptions {
1602
+ export type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPanelSlots & DataSourceListSlots;
1603
+ export type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
1604
+ export type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
1605
+ export interface EditorInstallOptions {
1606
+ flat?: boolean;
1597
1607
  parseDSL: <T = any>(dsl: string) => T;
1598
1608
  customCreateMonacoEditor: (monaco: typeof import('monaco-editor'), codeEditorEl: HTMLElement, options: Monaco.editor.IStandaloneEditorConstructionOptions & {
1599
1609
  editorCustomType?: string;
@@ -1603,7 +1613,7 @@ interface EditorInstallOptions {
1603
1613
  }) => Promise<Monaco.editor.IStandaloneDiffEditor> | Monaco.editor.IStandaloneDiffEditor;
1604
1614
  [key: string]: any;
1605
1615
  }
1606
- interface Services {
1616
+ export interface Services {
1607
1617
  editorService: EditorService;
1608
1618
  historyService: HistoryService;
1609
1619
  storageService: StorageService;
@@ -1617,12 +1627,25 @@ interface Services {
1617
1627
  keybindingService: KeybindingService;
1618
1628
  stageOverlayService: StageOverlayService;
1619
1629
  }
1620
- interface StageOptions {
1630
+ declare module '@tmagic/form-schema' {
1631
+ interface FormContext {
1632
+ /** 编辑器服务集合(由 Editor / FormPanel provide) */
1633
+ services?: Services;
1634
+ /** 当前画布 Stage 实例(由 Editor / FormPanel provide) */
1635
+ stage?: any;
1636
+ }
1637
+ }
1638
+ export interface StageOptions {
1621
1639
  runtimeUrl?: string;
1622
1640
  autoScrollIntoView?: boolean;
1623
1641
  containerHighlightClassName?: string;
1624
1642
  containerHighlightDuration?: number;
1625
1643
  containerHighlightType?: ContainerHighlightType;
1644
+ /**
1645
+ * 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
1646
+ * 开启后在画布中拖动已有组件不会识别容器,默认 false
1647
+ */
1648
+ containerHighlightAddOnly?: boolean;
1626
1649
  disabledDragStart?: boolean;
1627
1650
  render?: (stage: StageCore$1) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
1628
1651
  moveableOptions?: CustomizeMoveableOptions;
@@ -1655,7 +1678,21 @@ interface StageOptions {
1655
1678
  /** 画布双击前的钩子函数,返回 false 则阻止默认的双击行为 */
1656
1679
  beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
1657
1680
  }
1658
- interface StoreState {
1681
+ /**
1682
+ * 节点校验错误信息,按来源(属性表单 / 样式表单)分别保存错误文案。
1683
+ * 属性表单与样式表单是两个独立的 FormPanel,均指向同一节点,故以来源为键,
1684
+ * 避免某个面板校验通过时误清另一个面板记录的错误。
1685
+ * 节点视为存在错误当且仅当任一来源存在非空文本。
1686
+ */
1687
+ export interface NodeInvalidInfo {
1688
+ /** 属性表单校验错误文案(可能为包含 <br> 的 HTML) */
1689
+ props?: string;
1690
+ /** 样式表单校验错误文案(可能为包含 <br> 的 HTML) */
1691
+ style?: string;
1692
+ }
1693
+ /** 节点校验错误来源 */
1694
+ export type NodeInvalidSource = keyof NodeInvalidInfo;
1695
+ export interface StoreState {
1659
1696
  root: MApp | null;
1660
1697
  page: MPage | MPageFragment | null;
1661
1698
  parent: MContainer | null;
@@ -1665,14 +1702,16 @@ interface StoreState {
1665
1702
  stage: StageCore$1 | null;
1666
1703
  stageLoading: boolean;
1667
1704
  modifiedNodeIds: Map<Id, Id>;
1705
+ /** 校验失败的节点错误信息,按节点 id 存储,供组件树标记与保存拦截读取 */
1706
+ invalidNodeIds: Map<Id, NodeInvalidInfo>;
1668
1707
  pageLength: number;
1669
1708
  pageFragmentLength: number;
1670
1709
  disabledMultiSelect: boolean;
1671
1710
  /** 是否始终启用多选模式(无需按住 Ctrl/Meta) */
1672
1711
  alwaysMultiSelect: boolean;
1673
1712
  }
1674
- type StoreStateKey = keyof StoreState;
1675
- interface PropsState {
1713
+ export type StoreStateKey = keyof StoreState;
1714
+ export interface PropsState {
1676
1715
  propsConfigMap: Record<string, FormConfig>;
1677
1716
  propsValueMap: Record<string, Partial<MNode>>;
1678
1717
  relateIdMap: Record<Id, Id>;
@@ -1681,7 +1720,7 @@ interface PropsState {
1681
1720
  /** 禁用代码块 */
1682
1721
  disabledCodeBlock: boolean;
1683
1722
  }
1684
- interface StageOverlayState {
1723
+ export interface StageOverlayState {
1685
1724
  wrapDiv: HTMLDivElement;
1686
1725
  sourceEl: HTMLElement | null;
1687
1726
  contentEl: HTMLElement | null;
@@ -1691,29 +1730,29 @@ interface StageOverlayState {
1691
1730
  wrapHeight: number;
1692
1731
  stageOverlayVisible: boolean;
1693
1732
  }
1694
- interface ComponentGroupState {
1733
+ export interface ComponentGroupState {
1695
1734
  list: ComponentGroup[];
1696
1735
  }
1697
- declare enum ColumnLayout {
1736
+ export declare enum ColumnLayout {
1698
1737
  LEFT = "left",
1699
1738
  CENTER = "center",
1700
1739
  RIGHT = "right"
1701
1740
  }
1702
- interface SetColumnWidth {
1741
+ export interface SetColumnWidth {
1703
1742
  [ColumnLayout.LEFT]?: number;
1704
1743
  [ColumnLayout.CENTER]?: number | 'auto';
1705
1744
  [ColumnLayout.RIGHT]?: number;
1706
1745
  }
1707
- interface GetColumnWidth {
1746
+ export interface GetColumnWidth {
1708
1747
  [ColumnLayout.LEFT]: number;
1709
1748
  [ColumnLayout.CENTER]: number;
1710
1749
  [ColumnLayout.RIGHT]: number;
1711
1750
  }
1712
- interface StageRect {
1751
+ export interface StageRect {
1713
1752
  width: number | string;
1714
1753
  height: number | string;
1715
1754
  }
1716
- interface UiState {
1755
+ export interface UiState {
1717
1756
  /** 当前点击画布是否触发选中,true: 不触发,false: 触发,默认为false */
1718
1757
  uiSelectMode: boolean;
1719
1758
  /** 是否显示整个配置源码, true: 显示, false: 不显示,默认为false */
@@ -1731,6 +1770,12 @@ interface UiState {
1731
1770
  stageRect: StageRect;
1732
1771
  /** 编辑器列布局每一列的宽度,分为左中右三列 */
1733
1772
  columnWidth: GetColumnWidth;
1773
+ /** 编辑器列布局左侧列最小宽度 */
1774
+ minLeftColumnWidth: number;
1775
+ /** 编辑器列布局中间列最小宽度 */
1776
+ minCenterColumnWidth: number;
1777
+ /** 编辑器列布局右侧列最小宽度 */
1778
+ minRightColumnWidth: number;
1734
1779
  /** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
1735
1780
  showGuides: boolean;
1736
1781
  /** 画布上是否存在参考线 */
@@ -1762,19 +1807,19 @@ interface UiState {
1762
1807
  height: number;
1763
1808
  };
1764
1809
  }
1765
- interface EditorNodeInfo {
1810
+ export interface EditorNodeInfo {
1766
1811
  node: MNode | null;
1767
1812
  parent: MContainer | null;
1768
1813
  page: MPage | MPageFragment | null;
1769
1814
  path: MNode[];
1770
1815
  }
1771
- interface AddMNode {
1816
+ export interface AddMNode {
1772
1817
  type: string;
1773
1818
  name?: string;
1774
1819
  inputEvent?: DragEvent;
1775
1820
  [key: string]: any;
1776
1821
  }
1777
- interface PastePosition {
1822
+ export interface PastePosition {
1778
1823
  left?: number;
1779
1824
  top?: number;
1780
1825
  /**
@@ -1789,7 +1834,7 @@ interface PastePosition {
1789
1834
  /**
1790
1835
  * 菜单按钮
1791
1836
  */
1792
- interface MenuButton {
1837
+ export interface MenuButton {
1793
1838
  /**
1794
1839
  * 按钮类型
1795
1840
  * button: 只有文字不带边框的按钮
@@ -1821,7 +1866,7 @@ interface MenuButton {
1821
1866
  type?: string;
1822
1867
  };
1823
1868
  }
1824
- interface MenuComponent {
1869
+ export interface MenuComponent {
1825
1870
  type: 'component';
1826
1871
  /** Vue3组件 */
1827
1872
  component: any;
@@ -1849,9 +1894,9 @@ interface MenuComponent {
1849
1894
  * 'scale-to-fit': 缩放以适应
1850
1895
  * 'history-list': 历史记录面板(按 页面 / 数据源 / 代码块 三个 tab 展示,相邻同目标修改自动合并)
1851
1896
  */
1852
- type MenuItem = '/' | 'delete' | 'undo' | 'redo' | 'zoom' | 'zoom-in' | 'zoom-out' | 'guides' | 'rule' | 'scale-to-original' | 'scale-to-fit' | 'history-list' | MenuButton | MenuComponent | string;
1897
+ export type MenuItem = '/' | 'delete' | 'undo' | 'redo' | 'zoom' | 'zoom-in' | 'zoom-out' | 'guides' | 'rule' | 'scale-to-original' | 'scale-to-fit' | 'history-list' | MenuButton | MenuComponent | string;
1853
1898
  /** 工具栏 */
1854
- interface MenuBarData {
1899
+ export interface MenuBarData {
1855
1900
  /** 顶部工具栏左边项 */
1856
1901
  [ColumnLayout.LEFT]?: MenuItem[];
1857
1902
  /** 顶部工具栏中间项 */
@@ -1859,7 +1904,7 @@ interface MenuBarData {
1859
1904
  /** 顶部工具栏右边项 */
1860
1905
  [ColumnLayout.RIGHT]?: MenuItem[];
1861
1906
  }
1862
- interface SideComponent extends MenuComponent {
1907
+ export interface SideComponent extends MenuComponent {
1863
1908
  /** 显示文案 */
1864
1909
  text: string;
1865
1910
  /** tab样式 */
@@ -1874,7 +1919,9 @@ interface SideComponent extends MenuComponent {
1874
1919
  beforeClick?: (config: SideComponent) => boolean | Promise<boolean>;
1875
1920
  /** 组件扩展参数 */
1876
1921
  boxComponentConfig?: {
1877
- /** Vue3组件 */component?: any; /** 传入组件的props对象 */
1922
+ /** Vue3组件 */
1923
+ component?: any;
1924
+ /** 传入组件的props对象 */
1878
1925
  props?: Record<string, any>;
1879
1926
  };
1880
1927
  }
@@ -1886,7 +1933,7 @@ interface SideComponent extends MenuComponent {
1886
1933
  * 独立的 tab 来展示与回滚。内置的「页面 / 数据源 / 代码块」三个 tab 之后
1887
1934
  * 会依次追加这些扩展 tab。
1888
1935
  */
1889
- interface HistoryListExtraTab {
1936
+ export interface HistoryListExtraTab {
1890
1937
  /** tab 唯一标识,作为 TMagicTabs 的 name */
1891
1938
  name: string;
1892
1939
  /** tab 显示文案,支持传入函数以展示动态内容(如记录数量) */
@@ -1904,12 +1951,12 @@ interface HistoryListExtraTab {
1904
1951
  * - data-source: 数据源,按 `type`(base/http/...) 从 dataSourceService 获取数据源表单配置
1905
1952
  * - code-block: 数据源代码块,使用内置的代码块表单配置
1906
1953
  */
1907
- type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
1954
+ export type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
1908
1955
  /**
1909
1956
  * 自定义 `loadConfig` 时回传的上下文,聚合了组件当前的对比入参,
1910
1957
  * 方便调用方在外部按需拼装 FormConfig。
1911
1958
  */
1912
- interface CompareFormLoadConfigContext {
1959
+ export interface CompareFormLoadConfigContext {
1913
1960
  /** 对比类型,见 CompareCategory */
1914
1961
  category: string;
1915
1962
  /** 节点 / 数据源类型 */
@@ -1926,8 +1973,47 @@ interface CompareFormLoadConfigContext {
1926
1973
  * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category` 取配置逻辑,
1927
1974
  * 可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
1928
1975
  */
1929
- type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
1930
- declare enum SideItemKey {
1976
+ export type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
1977
+ /**
1978
+ * CompareForm / ViewForm 共用的基础 props。
1979
+ * 两者都基于同一套「按 category 加载 FormConfig + 注入 services/stage」的逻辑(见 useCompareForm),
1980
+ * 差异仅在于是否做新旧值对比。这里抽出公共字段避免重复定义。
1981
+ */
1982
+ export interface CompareFormBaseProps {
1983
+ /** 当前值(对比场景下为修改后的值) */
1984
+ value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
1985
+ /**
1986
+ * 类型说明:
1987
+ * - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
1988
+ * - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
1989
+ * - `category` 为 `code-block` 时,`type` 可不传
1990
+ */
1991
+ type?: string;
1992
+ /** 表单配置类别,决定从哪里取 FormConfig */
1993
+ category?: CompareCategory;
1994
+ /** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
1995
+ dataSourceType?: string;
1996
+ labelWidth?: string;
1997
+ /**
1998
+ * 外层容器高度。设置后表单内容超出时会在组件内部出现滚动条,
1999
+ * 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
2000
+ */
2001
+ height?: string;
2002
+ /**
2003
+ * 表单内组件的尺寸(透传给 MForm 的 `size`),可选 'large' | 'default' | 'small'。
2004
+ * 缺省时使用 MForm 内置默认尺寸。
2005
+ */
2006
+ size?: FieldSize;
2007
+ /**
2008
+ * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
2009
+ * 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
2010
+ * `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
2011
+ */
2012
+ loadConfig?: CompareFormLoadConfig;
2013
+ /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
2014
+ services?: Services;
2015
+ }
2016
+ export declare enum SideItemKey {
1931
2017
  COMPONENT_LIST = "component-list",
1932
2018
  LAYER = "layer",
1933
2019
  CODE_BLOCK = "code-block",
@@ -1938,9 +2024,9 @@ declare enum SideItemKey {
1938
2024
  * layer: 已选组件树
1939
2025
  * code-block: 代码块
1940
2026
  */
1941
- type SideItem = `${SideItemKey}` | SideComponent;
2027
+ export type SideItem = `${SideItemKey}` | SideComponent;
1942
2028
  /** 工具栏 */
1943
- interface SideBarData {
2029
+ export interface SideBarData {
1944
2030
  /** 容器类型 */
1945
2031
  type: 'tabs';
1946
2032
  /** 默认激活的内容 */
@@ -1948,7 +2034,7 @@ interface SideBarData {
1948
2034
  /** panel列表 */
1949
2035
  items: SideItem[];
1950
2036
  }
1951
- interface ComponentItem {
2037
+ export interface ComponentItem {
1952
2038
  /** 显示文案 */
1953
2039
  text: string;
1954
2040
  /** 详情,用于tooltip */
@@ -1962,43 +2048,48 @@ interface ComponentItem {
1962
2048
  [key: string]: any;
1963
2049
  };
1964
2050
  }
1965
- interface ComponentGroup {
2051
+ export interface ComponentGroup {
1966
2052
  /** 显示文案 */
1967
2053
  title: string;
1968
2054
  /** 组内列表 */
1969
2055
  items: ComponentItem[];
1970
2056
  }
1971
- declare enum LayerOffset {
2057
+ export declare enum LayerOffset {
1972
2058
  TOP = "top",
1973
2059
  BOTTOM = "bottom"
1974
2060
  }
1975
2061
  /** 容器布局 */
1976
- declare enum Layout {
2062
+ export declare enum Layout {
1977
2063
  FLEX = "flex",
1978
2064
  FIXED = "fixed",
1979
2065
  RELATIVE = "relative",
1980
2066
  ABSOLUTE = "absolute"
1981
2067
  }
1982
- declare enum Keys {
2068
+ export declare enum Keys {
1983
2069
  ESCAPE = "Space"
1984
2070
  }
1985
- interface ScrollViewerEvent {
2071
+ export interface ScrollViewerEvent {
1986
2072
  scrollLeft: number;
1987
2073
  scrollTop: number;
1988
2074
  scrollHeight: number;
1989
2075
  scrollWidth: number;
1990
2076
  }
1991
- type CodeState = {
1992
- /** 代码块DSL数据源 */codeDsl: CodeBlockDSL | null; /** 代码块是否可编辑 */
1993
- editable: boolean; /** list模式下左侧展示的代码列表 */
1994
- combineIds: string[]; /** 为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除) */
2077
+ export type CodeState = {
2078
+ /** 代码块DSL数据源 */
2079
+ codeDsl: CodeBlockDSL | null;
2080
+ /** 代码块是否可编辑 */
2081
+ editable: boolean;
2082
+ /** list模式下左侧展示的代码列表 */
2083
+ combineIds: string[];
2084
+ /** 为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除) */
1995
2085
  undeletableList: Id[];
1996
2086
  paramsColConfig?: TableColumnConfig;
1997
2087
  };
1998
- type CodeRelation = {
1999
- /** 组件id:[代码id1,代码id2] */[compId: Id]: Id[];
2088
+ export type CodeRelation = {
2089
+ /** 组件id:[代码id1,代码id2] */
2090
+ [compId: Id]: Id[];
2000
2091
  };
2001
- interface CodeDslItem {
2092
+ export interface CodeDslItem {
2002
2093
  /** 代码块id */
2003
2094
  id: Id;
2004
2095
  /** 代码块名称 */
@@ -2010,24 +2101,24 @@ interface CodeDslItem {
2010
2101
  /** 代码块对应绑定的组件信息 */
2011
2102
  combineInfo?: CombineInfo[];
2012
2103
  }
2013
- interface CombineInfo {
2104
+ export interface CombineInfo {
2014
2105
  /** 组件id */
2015
2106
  compId: Id;
2016
2107
  /** 组件名称 */
2017
2108
  compName: string;
2018
2109
  }
2019
- interface ListState {
2110
+ export interface ListState {
2020
2111
  /** 代码块列表 */
2021
2112
  codeList: CodeDslItem[];
2022
2113
  }
2023
- declare enum CodeDeleteErrorType {
2114
+ export declare enum CodeDeleteErrorType {
2024
2115
  /** 代码块存在于不可删除列表中 */
2025
2116
  UNDELETEABLE = "undeleteable",
2026
2117
  /** 代码块存在绑定关系 */
2027
2118
  BIND = "bind"
2028
2119
  }
2029
- declare const CODE_DRAFT_STORAGE_KEY = "magicCodeDraft";
2030
- interface CodeParamStatement {
2120
+ export declare const CODE_DRAFT_STORAGE_KEY = "magicCodeDraft";
2121
+ export interface CodeParamStatement {
2031
2122
  /** 参数名称 */
2032
2123
  name: string;
2033
2124
  /** 参数类型 */
@@ -2040,7 +2131,7 @@ interface CodeParamStatement {
2040
2131
  * - `initial`:页面「未修改的初始状态」基线(设置 root 时生成),作为页面栈 index 0 的固定底线 step。
2041
2132
  * 该 step 不可被撤销/回滚(cursor 不会低于它),仅用于历史面板底部的初始行展示。
2042
2133
  */
2043
- type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
2134
+ export type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
2044
2135
  /**
2045
2136
  * 历史记录的「操作途径」——标记本次变更由哪条交互入口触发,仅用于历史面板展示 / 业务埋点,
2046
2137
  * 不影响 undo/redo 行为。缺省(未传)时 UI 视为「未知」。
@@ -2061,9 +2152,9 @@ type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
2061
2152
  *
2062
2153
  * 通过 `(string & {})` 允许业务侧扩展自定义途径字符串,同时保留内置值的自动补全。
2063
2154
  */
2064
- type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
2155
+ export type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
2065
2156
  /** *AndGetHistoryId 系列方法返回值:原操作结果 + 本次写入历史记录的 uuid 列表(未入栈时为 `[]`)。 */
2066
- type DslOpWithHistoryIdsResult<T> = {
2157
+ export type DslOpWithHistoryIdsResult<T> = {
2067
2158
  result: T;
2068
2159
  historyIds: string[];
2069
2160
  };
@@ -2078,7 +2169,7 @@ type DslOpWithHistoryIdsResult<T> = {
2078
2169
  *
2079
2170
  * 泛型 `T` 为变化内容的快照类型:页面节点为 `MNode`,代码块为 `CodeBlockContent`,数据源为 `DataSourceSchema`。
2080
2171
  */
2081
- interface StepDiffItem<T = unknown> {
2172
+ export interface StepDiffItem<T = unknown> {
2082
2173
  /** 变更后的内容快照。`opType` 为 `add` / `update` 时有,`remove` 时无。 */
2083
2174
  newSchema?: T;
2084
2175
  /** 变更前的内容快照。`opType` 为 `remove` / `update` 时有,`add` 时无。 */
@@ -2098,7 +2189,7 @@ interface StepDiffItem<T = unknown> {
2098
2189
  *
2099
2190
  * 泛型 `T` 为 `diff` 中变化内容的快照类型(页面节点 `MNode` / 代码块 `CodeBlockContent` / 数据源 `DataSourceSchema`)。
2100
2191
  */
2101
- interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
2192
+ export interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
2102
2193
  /**
2103
2194
  * 历史记录唯一标识(uuid)。入栈时自动写入(若调用方未指定),
2104
2195
  * 用于精确定位 / 引用某一条历史记录(如 revert、埋点、跨端同步等)。
@@ -2155,37 +2246,41 @@ interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
2155
2246
  * 历史记录的扩展上下文({@link BaseStepValue.extra})。
2156
2247
  * 内置字段供 `page` 类型在撤销 / 重做时恢复选区与受影响节点;扩展类型可自由附加其它键。
2157
2248
  */
2158
- interface StepExtra {
2249
+ export interface StepExtra {
2159
2250
  /** 操作前选中的节点 ID,用于撤销后恢复选择状态(page 类型) */
2160
2251
  selectedBefore?: Id[];
2161
2252
  /** 操作后选中的节点 ID,用于重做后恢复选择状态(page 类型) */
2162
2253
  selectedAfter?: Id[];
2163
2254
  /** 本次操作涉及的节点 id 集合(page 类型) */
2164
2255
  modifiedNodeIds?: Map<Id, Id>;
2256
+ /** 操作前的节点校验错误快照,撤销后还原(使撤销一个「校验失败」的改动后错误消失) */
2257
+ invalidNodeIdsBefore?: Map<Id, NodeInvalidInfo>;
2258
+ /** 操作后的节点校验错误快照,重做后还原(使重做后错误恢复) */
2259
+ invalidNodeIdsAfter?: Map<Id, NodeInvalidInfo>;
2165
2260
  [key: string]: any;
2166
2261
  }
2167
2262
  /**
2168
2263
  * 页面节点历史记录条目(`diff` 内容为 {@link MNode})。结构已与代码块 / 数据源统一收敛到
2169
2264
  * {@link BaseStepValue}:关联 id 见 `data.id`,选区等上下文见 `extra`。
2170
2265
  */
2171
- type StepValue = BaseStepValue<MNode, StepExtra>;
2266
+ export type StepValue = BaseStepValue<MNode, StepExtra>;
2172
2267
  /**
2173
2268
  * 代码块历史记录条目(`diff` 内容为 {@link CodeBlockContent}),按 `data.id`(codeBlock.id)
2174
2269
  * 分组保存到 historyState.steps.codeBlock。结构与 {@link StepValue} / {@link DataSourceStepValue}
2175
2270
  * 一致,仅 `diff` 快照类型不同。
2176
2271
  */
2177
- type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
2272
+ export type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
2178
2273
  /**
2179
2274
  * 数据源历史记录条目(`diff` 内容为 {@link DataSourceSchema}),按 `data.id`(dataSource.id)
2180
2275
  * 分组保存到 historyState.steps.dataSource。结构与 {@link StepValue} / {@link CodeBlockStepValue}
2181
2276
  * 一致,仅 `diff` 快照类型不同。
2182
2277
  */
2183
- type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
2278
+ export type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
2184
2279
  /**
2185
2280
  * 历史记录类型标识:内置 `page` / `codeBlock` / `dataSource`,并允许业务扩展自定义类型。
2186
2281
  * `(string & {})` 保留对内置字面量的智能提示,同时不限制扩展取值。
2187
2282
  */
2188
- type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
2283
+ export type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
2189
2284
  /**
2190
2285
  * 全部历史栈的统一容器,按「类型 -> id -> UndoRedo 栈」两级分组。
2191
2286
  *
@@ -2197,14 +2292,14 @@ type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
2197
2292
  * 所有类型(含扩展类型)一视同仁:均按 id 独立分栈、独立 undo/redo,且都可通过
2198
2293
  * {@link HistoryService.setMarker} 在 index 0 种入 `initial` 基线(撤销 / 回滚不会越过该基线)。
2199
2294
  */
2200
- interface HistorySteps {
2295
+ export interface HistorySteps {
2201
2296
  page: Record<Id, UndoRedo<StepValue>>;
2202
2297
  codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
2203
2298
  dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
2204
2299
  /** 扩展历史类型:按 id 分组的 UndoRedo 栈。 */
2205
2300
  [stepType: string]: Record<Id, UndoRedo<any>>;
2206
2301
  }
2207
- interface HistoryState {
2302
+ export interface HistoryState {
2208
2303
  /**
2209
2304
  * 全部历史栈的统一容器(页面 / 代码块 / 数据源 / 扩展类型),见 {@link HistorySteps}。
2210
2305
  * 各类型互不影响,支持按 id 独立 undo/redo;是否可撤销 / 重做改用 {@link HistoryService.canUndo} /
@@ -2223,7 +2318,7 @@ interface HistoryState {
2223
2318
  * 历史记录的可持久化快照。由 historyService.saveToIndexedDB 写入 IndexedDB,
2224
2319
  * 再由 historyService.restoreFromIndexedDB 读出并重建各 UndoRedo 栈。
2225
2320
  */
2226
- interface PersistedHistoryState {
2321
+ export interface PersistedHistoryState {
2227
2322
  /** 快照结构版本号,便于后续兼容升级。 */
2228
2323
  version: number;
2229
2324
  /**
@@ -2240,7 +2335,7 @@ interface PersistedHistoryState {
2240
2335
  savedAt: number;
2241
2336
  }
2242
2337
  /** historyService 持久化相关 API 的可选配置。 */
2243
- interface HistoryPersistOptions {
2338
+ export interface HistoryPersistOptions {
2244
2339
  /** IndexedDB 数据库名,默认 `tmagic-editor`(最终库名会拼上当前 DSL app id)。 */
2245
2340
  dbName?: string;
2246
2341
  /** objectStore 名,默认 `history`。 */
@@ -2257,7 +2352,7 @@ interface HistoryPersistOptions {
2257
2352
  /**
2258
2353
  * 历史面板用:当前页面的一条历史步骤(包含位置和是否已应用)。
2259
2354
  */
2260
- interface HistoryStepEntry<T> {
2355
+ export interface HistoryStepEntry<T> {
2261
2356
  /** 步骤内容 */
2262
2357
  step: T;
2263
2358
  /** 在所属栈中的索引(0 为最早) */
@@ -2280,7 +2375,7 @@ interface HistoryStepEntry<T> {
2280
2375
  * - 数据源:`HistoryGroup<DataSourceStepValue>`,`kind: 'data-source'`,`id` 为 dataSource.id;
2281
2376
  * - 代码块:`HistoryGroup<CodeBlockStepValue>`,`kind: 'code-block'`,`id` 为 codeBlock.id。
2282
2377
  */
2283
- interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
2378
+ export interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
2284
2379
  /** 历史类型标识:page / code-block / data-source(扩展类型同理)。 */
2285
2380
  kind: string;
2286
2381
  /** 所属栈 id(page 为 pageId,代码块 / 数据源为对应资源 id)。 */
@@ -2306,7 +2401,7 @@ interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
2306
2401
  /** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
2307
2402
  isCurrent?: boolean;
2308
2403
  }
2309
- declare enum KeyBindingCommand {
2404
+ export declare enum KeyBindingCommand {
2310
2405
  /** 复制 */
2311
2406
  COPY_NODE = "tmagic-system-copy-node",
2312
2407
  /** 粘贴 */
@@ -2346,12 +2441,12 @@ declare enum KeyBindingCommand {
2346
2441
  /** 切换组件 */
2347
2442
  SWITCH_NODE = "tmagic-system-switch-node"
2348
2443
  }
2349
- interface KeyBindingItem {
2444
+ export interface KeyBindingItem {
2350
2445
  command: KeyBindingCommand | string;
2351
2446
  keybinding?: string | string[];
2352
2447
  when: [string, 'keyup' | 'keydown'][];
2353
2448
  }
2354
- interface KeyBindingCacheItem {
2449
+ export interface KeyBindingCacheItem {
2355
2450
  type: string;
2356
2451
  command: KeyBindingCommand | string;
2357
2452
  keybinding?: string | string[];
@@ -2359,14 +2454,14 @@ interface KeyBindingCacheItem {
2359
2454
  bound: boolean;
2360
2455
  }
2361
2456
  /** 可新增的数据源类型选项 */
2362
- interface DatasourceTypeOption {
2457
+ export interface DatasourceTypeOption {
2363
2458
  /** 数据源类型 */
2364
2459
  type: string;
2365
2460
  /** 数据源名称 */
2366
2461
  text: string;
2367
2462
  }
2368
2463
  /** 组件树节点状态 */
2369
- interface LayerNodeStatus {
2464
+ export interface LayerNodeStatus {
2370
2465
  /** 显隐 */
2371
2466
  visible: boolean;
2372
2467
  /** 展开子节点 */
@@ -2377,22 +2472,28 @@ interface LayerNodeStatus {
2377
2472
  draggable: boolean;
2378
2473
  }
2379
2474
  /** 拖拽类型 */
2380
- declare enum DragType {
2475
+ export declare enum DragType {
2381
2476
  /** 从组件列表拖到画布 */
2382
2477
  COMPONENT_LIST = "component-list",
2383
2478
  /** 拖动组件树节点 */
2384
2479
  LAYER_TREE = "layer-tree"
2385
2480
  }
2386
- interface TreeNodeData {
2481
+ export interface TreeNodeData {
2387
2482
  id: Id;
2388
2483
  name?: string;
2389
2484
  items?: TreeNodeData[];
2390
2485
  [key: string]: any;
2391
2486
  }
2392
2487
  /** 判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
2393
- type IsExpandableFunction = (_data: TreeNodeData, _nodeStatusMap: Map<Id, LayerNodeStatus>) => boolean;
2488
+ export type IsExpandableFunction = (_data: TreeNodeData, _nodeStatusMap: Map<Id, LayerNodeStatus>) => boolean;
2394
2489
  /** canDropIn 的调用场景 */
2395
- type CanDropInScene = /** 在"已选组件"面板的组件树中拖动节点 */'layer' /** 在画布上拖动已有组件(被拖动组件本身已经存在于画布中,sourceIds 包含其 id) */ | 'stage-drag' /** 从组件列表拖入新组件到画布(被拖入的组件尚不存在,sourceIds 为空数组) */ | 'stage-add';
2490
+ export type CanDropInScene =
2491
+ /** 在"已选组件"面板的组件树中拖动节点 */
2492
+ 'layer' |
2493
+ /** 在画布上拖动已有组件(被拖动组件本身已经存在于画布中,sourceIds 包含其 id) */
2494
+ 'stage-drag' |
2495
+ /** 从组件列表拖入新组件到画布(被拖入的组件尚不存在,sourceIds 为空数组) */
2496
+ 'stage-add';
2396
2497
  /**
2397
2498
  * 判断当前正在拖动的源节点是否可以拖入目标节点内部的函数
2398
2499
  * @param _sourceIds 当前正在拖动的源节点 id 列表
@@ -2410,40 +2511,53 @@ type CanDropInScene = /** 在"已选组件"面板的组件树中拖动节点 */'
2410
2511
  * (例如把命中的"卡片外壳"节点重定向到其内层"卡片内容"容器节点)
2411
2512
  * - 其他(`true` / `void` / `undefined`):按原 targetId 正常拖入
2412
2513
  */
2413
- type CanDropInFunction = (_sourceIds: Id[], _targetId: Id, _scene: CanDropInScene) => Id | boolean | void;
2414
- type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]> };
2415
- type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]>> };
2416
- type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]> };
2417
- type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]> };
2418
- type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K] };
2419
- type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<AsyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<AsyncAfterHook<T, C>>, 'after'>;
2420
- type SyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<SyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<SyncAfterHook<T, C>>, 'after'>;
2421
- interface EventBusEvent {
2514
+ export type CanDropInFunction = (_sourceIds: Id[], _targetId: Id, _scene: CanDropInScene) => Id | boolean | void;
2515
+ export type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]>; };
2516
+ export type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]>>; };
2517
+ export type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]>; };
2518
+ export type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]>; };
2519
+ export type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K]; };
2520
+ export type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<AsyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<AsyncAfterHook<T, C>>, 'after'>;
2521
+ export type SyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<SyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<SyncAfterHook<T, C>>, 'after'>;
2522
+ export interface EventBusEvent {
2422
2523
  'edit-data-source': [id: string];
2423
2524
  'edit-data-source-method': [id: string, methodName: string];
2424
2525
  'edit-data-source-field': [id: string, fieldPath: string[]];
2425
2526
  'remove-data-source': [id: string];
2426
2527
  'edit-code': [id: string];
2427
2528
  }
2428
- interface EventBus extends EventEmitter {
2529
+ export interface EventBus extends EventEmitter$1 {
2429
2530
  on<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, listener: (...args: Param) => void): this;
2430
2531
  emit<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, ...args: Param): boolean;
2431
2532
  }
2432
- type PropsFormConfigFunction = (data: {
2533
+ export type PropsFormConfigFunction = (data: {
2433
2534
  editorService: EditorService;
2434
2535
  }) => FormConfig;
2435
- type PropsFormValueFunction = (data: {
2536
+ export type PropsFormValueFunction = (data: {
2436
2537
  editorService: EditorService;
2437
2538
  }) => Partial<MNode>;
2438
- type PartSortableOptions = Omit<Options, 'onStart' | 'onUpdate'>;
2439
- interface PageBarSortOptions extends PartSortableOptions {
2539
+ export type PartSortableOptions = Omit<Options, 'onStart' | 'onUpdate'>;
2540
+ export interface PageBarSortOptions extends PartSortableOptions {
2440
2541
  /** 在onUpdate之后调用 */
2441
2542
  afterUpdate?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
2442
2543
  /** 在onStart之前调用 */
2443
2544
  beforeStart?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
2444
2545
  }
2445
- type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: 'layer' | 'data-source' | 'viewer' | 'code-block') => (MenuButton | MenuComponent)[];
2446
- interface EditorEvents {
2546
+ /**
2547
+ * 右键菜单当前目标(侧栏树节点等)。
2548
+ * 数据源 / 代码块面板通过 `customContentMenu` 的 `getTarget` 暴露,业务在 handler 内自行读取。
2549
+ */
2550
+ export interface ContentMenuTarget {
2551
+ /** 目标 ID */
2552
+ id: string;
2553
+ /** 原始节点数据(树节点等) */
2554
+ data?: TreeNodeData;
2555
+ }
2556
+ export type ContentMenuType = 'layer' | 'data-source' | 'viewer' | 'code-block';
2557
+ export type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType,
2558
+ /** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
2559
+ getTarget?: () => ContentMenuTarget | null) => (MenuButton | MenuComponent)[];
2560
+ export interface EditorEvents {
2447
2561
  'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
2448
2562
  historySource?: HistoryOpSource;
2449
2563
  }];
@@ -2462,8 +2576,69 @@ interface EditorEvents {
2462
2576
  targetParent: MContainer;
2463
2577
  }];
2464
2578
  'history-change': [data: MPage | MPageFragment];
2579
+ /**
2580
+ * DSL 发生变更后统一触发,免去分别监听 add / remove / update / move-layer / drag-to。
2581
+ * 回调参数为 {@link EditorChangeEvent},按 `type` 区分操作类型并携带各自的操作内容(payload)
2582
+ * 以及变更所在的当前 page(可能为 null)。撤销 / 重做内部同样会经由
2583
+ * add / remove / update 触发本事件;如需区分「用户操作」与「撤销重做」请配合 `history-change`。
2584
+ */
2585
+ change: [event: EditorChangeEvent];
2586
+ /** 节点校验错误状态发生变化时触发,携带当前完整的错误 Map(供非响应式消费方订阅) */
2587
+ 'invalid-node-change': [invalidNodeIds: Map<Id, NodeInvalidInfo>];
2588
+ }
2589
+ /** `change` 事件中单个变更项:变更的 node 及其所属的 page(可能为 null)。 */
2590
+ export interface EditorChangeItem {
2591
+ node: MNode;
2592
+ page: StoreState['page'];
2465
2593
  }
2466
- interface HistoryEvents {
2594
+ /** `update` 类型变更项:node 为前后快照及 form 端变更记录,page 为其所属页面。 */
2595
+ export interface EditorUpdateChangeItem {
2596
+ node: {
2597
+ newNode: MNode;
2598
+ oldNode: MNode;
2599
+ changeRecords?: ChangeRecord[];
2600
+ };
2601
+ page: StoreState['page'];
2602
+ }
2603
+ /** {@link EditorEvents.change} 各操作类型共有的历史相关字段。 */
2604
+ export interface EditorChangeEventHistoryMeta {
2605
+ /**
2606
+ * 本次变更的「历史来源」(调用 DSL 操作时传入的 {@link HistoryOpOptions.historySource},
2607
+ * 撤销 / 重做时则为被应用 step 上记录的 `source`),未携带时为 undefined。
2608
+ */
2609
+ historySource?: HistoryOpSource;
2610
+ /**
2611
+ * 本次操作是否未写入历史记录(即调用时传入的 {@link HistoryOpOptions.doNotPushHistory},缺省为 false);
2612
+ * 撤销 / 重做路径补发的事件恒为 true(撤销/重做本身不再入栈)。
2613
+ */
2614
+ doNotPushHistory?: boolean;
2615
+ }
2616
+ /**
2617
+ * {@link EditorEvents.change} 的回调参数:以 `type` 区分操作类型,并携带对应的操作内容。
2618
+ * `data` 为本次变更的节点列表,每项包含 node 及其所属的 page(可能为 null);
2619
+ * `move-layer` 额外带层级偏移 `offset`,`drag-to` 额外带目标位置 `targetIndex` / `targetParent`;
2620
+ * 历史相关字段(historySource / doNotPushHistory)见 {@link EditorChangeEventHistoryMeta}。
2621
+ */
2622
+ export type EditorChangeEvent = ({
2623
+ type: 'add';
2624
+ data: EditorChangeItem[];
2625
+ } & EditorChangeEventHistoryMeta) | ({
2626
+ type: 'remove';
2627
+ data: EditorChangeItem[];
2628
+ } & EditorChangeEventHistoryMeta) | ({
2629
+ type: 'update';
2630
+ data: EditorUpdateChangeItem[];
2631
+ } & EditorChangeEventHistoryMeta) | ({
2632
+ type: 'move-layer';
2633
+ data: EditorChangeItem[];
2634
+ offset: number | LayerOffset;
2635
+ } & EditorChangeEventHistoryMeta) | ({
2636
+ type: 'drag-to';
2637
+ data: EditorChangeItem[];
2638
+ targetIndex: number;
2639
+ targetParent: MContainer;
2640
+ } & EditorChangeEventHistoryMeta);
2641
+ export interface HistoryEvents {
2467
2642
  change: [state: BaseStepValue | StepValue | CodeBlockStepValue | DataSourceStepValue, stepType: HistoryStepType, id: Id];
2468
2643
  'code-block-history-change': [id: Id, state: CodeBlockStepValue];
2469
2644
  'data-source-history-change': [id: Id, state: DataSourceStepValue];
@@ -2482,19 +2657,28 @@ interface HistoryEvents {
2482
2657
  marker: StepValue;
2483
2658
  stepType: HistoryStepType;
2484
2659
  }];
2660
+ /**
2661
+ * 页面 / 页面片结构变更(新增 / 删除)时派发,见 {@link HistoryService.notifyPageStructureChange}。
2662
+ * 一次操作(add / remove / setRoot 整体替换)涉及多个页面时合并为**一个**事件;
2663
+ * `add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
2664
+ */
2665
+ 'page-structure-change': [change: {
2666
+ add: (MPage | MPageFragment)[];
2667
+ remove: (MPage | MPageFragment)[];
2668
+ }];
2485
2669
  }
2486
- declare const canUsePluginMethods: {
2670
+ export declare const canUsePluginMethods: {
2487
2671
  async: readonly ["getLayout", "highlight", "select", "multiSelect", "doAdd", "add", "doRemove", "remove", "doUpdate", "update", "sort", "copy", "paste", "doPaste", "doAlignCenter", "alignCenter", "moveLayer", "moveToContainer", "dragTo", "undo", "redo", "move"];
2488
2672
  sync: never[];
2489
2673
  };
2490
- type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
2674
+ export type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
2491
2675
  /**
2492
2676
  * 历史记录写入相关的通用配置(codeBlock / dataSource / editor 共用)
2493
2677
  * - doNotPushHistory: 操作完成后是否不要将本次操作压入历史栈(撤销/重做记录),默认 false
2494
2678
  * - historyDescription: 入栈时附带的人类可读描述,用于历史面板展示;不影响 undo/redo 行为,缺省时面板会自动生成描述
2495
2679
  * - historySource: 操作途径,取值见 {@link HistoryOpSource}(画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等),用于历史面板展示与埋点;不影响 undo/redo 行为
2496
2680
  */
2497
- interface HistoryOpOptions {
2681
+ export interface HistoryOpOptions {
2498
2682
  doNotPushHistory?: boolean;
2499
2683
  historyDescription?: string;
2500
2684
  historySource?: HistoryOpSource;
@@ -2503,7 +2687,7 @@ interface HistoryOpOptions {
2503
2687
  * 在 HistoryOpOptions 基础上携带 form 端 propPath/value 变更记录,
2504
2688
  * 用于历史记录的精细化撤销/重做(按 propPath 局部 patch)。
2505
2689
  */
2506
- interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
2690
+ export interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
2507
2691
  changeRecords?: ChangeRecord[];
2508
2692
  }
2509
2693
  /**
@@ -2511,12 +2695,36 @@ interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
2511
2695
  * - doNotSelect: 操作后是否不要自动触发选中(不调用 this.select / this.multiSelect / stage.select / stage.multiSelect)
2512
2696
  * - doNotSwitchPage: 操作若会引发当前页面切换(如新增 / 删除 / 跨页移动),是否跳过这次切换
2513
2697
  */
2514
- interface DslOpOptions extends HistoryOpOptions {
2698
+ export interface DslOpOptions extends HistoryOpOptions {
2515
2699
  doNotSelect?: boolean;
2516
2700
  doNotSwitchPage?: boolean;
2517
2701
  }
2702
+ /**
2703
+ * {@link EditorService.update} / {@link EditorService.doUpdate} 的额外数据
2704
+ * - changeRecords: 单节点 form 端变更记录(多节点场景下被忽略,使用 changeRecordList)
2705
+ * - changeRecordList: 多节点 form 端变更记录列表,按 config 数组同序对应每个节点;优先级高于 changeRecords
2706
+ * - replace: 为 true 时跳过 mergeWith / toggleFixedPosition / setChildrenLayout,直接用传入配置整节点替换
2707
+ * - invalidInfo: 属性面板提交时携带的校验错误信息,在写入历史记录之前落库
2708
+ */
2709
+ export interface UpdateOptions extends HistoryOpOptionsWithChangeRecords {
2710
+ changeRecordList?: ChangeRecord[][];
2711
+ /**
2712
+ * 为 true 时不做深合并等变换,直接用传入配置整节点替换现有节点。
2713
+ * 适用于源码编辑、历史整节点快照回放等「完整 DSL」场景;默认 false(局部属性更新走 merge)。
2714
+ */
2715
+ replace?: boolean;
2716
+ /**
2717
+ * 属性面板提交时携带的校验错误信息,在写入历史记录之前落库,
2718
+ * 使历史快照与本次变更对齐,从而 undo/redo 能正确还原错误标记。
2719
+ */
2720
+ invalidInfo?: {
2721
+ id: Id;
2722
+ source: NodeInvalidSource;
2723
+ error?: string;
2724
+ };
2725
+ }
2518
2726
  /** 差异对话框的入参 */
2519
- interface DiffDialogPayload {
2727
+ export interface DiffDialogPayload {
2520
2728
  /** 表单类别 */
2521
2729
  category?: CompareCategory;
2522
2730
  /** 节点类型 / 数据源类型 */
@@ -2533,12 +2741,20 @@ interface DiffDialogPayload {
2533
2741
  targetLabel?: string;
2534
2742
  /** 用于标题展示的目标 id */
2535
2743
  id?: string | number;
2744
+ /**
2745
+ * 指定打开时的初始对比模式:
2746
+ * - before:该步骤修改前 vs 修改后
2747
+ * - current:该步骤修改后 vs 当前最新值
2748
+ * 不传时按是否存在「修改后的值」/「当前值」自动推断。
2749
+ * 若指定的模式当前不可用(对应数据缺失),将回退到自动推断结果。
2750
+ */
2751
+ mode?: 'before' | 'current';
2536
2752
  }
2537
2753
  /**
2538
2754
  * 一组「描述 + 可操作性」的判定函数集合。页面 / 数据源 / 代码块及业务自定义历史
2539
2755
  * 各自实现一份,作为整体注入,避免把 describe* / isStep* 拆成多个独立 props 反复透传。
2540
2756
  */
2541
- interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
2757
+ export interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
2542
2758
  /**
2543
2759
  * 组级描述文案生成器,接收一个 group,返回展示文本。
2544
2760
  * 不传时回退到对组内最后一步调用 {@link describeStep}(适用于不做相邻合并、每组恒为单步的历史,如数据源/代码块)。
@@ -2556,7 +2772,7 @@ interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
2556
2772
  * 把原先散落在 Bucket / BucketTab 上的 title / prefix / describe* / isStep* / showInitial / gotoEnabled
2557
2773
  * 收敛成一个对象作为单一 prop 传递,调用方一次配齐、组件内部按需读取。
2558
2774
  */
2559
- interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
2775
+ export interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
2560
2776
  /** bucket 头部标题,例如 "数据源" / "代码块"。 */
2561
2777
  title: string;
2562
2778
  /** 子项 key 的命名空间前缀(`ds` 数据源 / `cb` 代码块 / 业务自定义如 `mod`)。 */
@@ -2565,8 +2781,10 @@ interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends H
2565
2781
  showInitial?: boolean;
2566
2782
  /** 是否支持「跳转到该记录」(goto),默认 true。 */
2567
2783
  gotoEnabled?: boolean;
2784
+ /** 是否展示顶部「清空」按钮,默认 true。无需提供清空能力的自定义历史可传 false。 */
2785
+ showClear?: boolean;
2568
2786
  }
2569
- interface UseHistoryRevertOptions {
2787
+ export interface UseHistoryRevertOptions {
2570
2788
  /**
2571
2789
  * 父级应用上下文,用于让动态挂载的「差异确认弹窗」继承全局组件 / 指令 / provide / 插件
2572
2790
  * (Element Plus、@tmagic/form 字段组件等)。未显式传入时,会自动取调用方所在组件的 appContext
@@ -2574,17 +2792,18 @@ interface UseHistoryRevertOptions {
2574
2792
  */
2575
2793
  appContext?: AppContext | null;
2576
2794
  /**
2577
- * 透传给差异确认弹窗的 `extendState`(即 Editor 的 `extendFormState`),
2578
- * 使对比表单中依赖业务上下文的 `display` / `disabled` 等 filterFunction 正常工作。
2795
+ * 内置页面 / 数据源 / 代码块的差异 / 回滚确认弹窗默认宽度(透传给 TMagicDialog 的 `width`),
2796
+ * `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
2797
+ * 业务自有历史(`viewDiff` / `confirmAndRevert`)可在调用时通过各自入参的 `width` 单独覆盖。
2579
2798
  */
2580
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
2799
+ dialogWidth?: string;
2581
2800
  }
2582
2801
  /**
2583
2802
  * 业务自有历史(如管理台「模块」)做差异对比时所需的额外渲染入参。
2584
2803
  * 内置的页面 / 数据源 / 代码块按 `category` 自动取表单配置,无需传这些;
2585
2804
  * 业务自有类别可通过 `loadConfig` 注入自定义表单配置加载逻辑。
2586
2805
  */
2587
- interface CustomDiffFormOptions {
2806
+ export interface CustomDiffFormOptions {
2588
2807
  /**
2589
2808
  * 自定义差异表单配置加载逻辑(如「模块」按 c_type 重建表单配置),
2590
2809
  * 透传给弹窗内部的 CompareForm;缺省时按 `category` 走内置加载。
@@ -2592,13 +2811,23 @@ interface CustomDiffFormOptions {
2592
2811
  loadConfig?: CompareFormLoadConfig;
2593
2812
  /** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
2594
2813
  selfDiffFieldTypes?: string[];
2814
+ /**
2815
+ * 差异 / 确认回滚弹窗宽度(透传给 HistoryDiffDialog 的 TMagicDialog `width`),
2816
+ * 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
2817
+ */
2818
+ width?: string;
2819
+ /**
2820
+ * 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
2821
+ * 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
2822
+ */
2823
+ size?: FieldSize;
2595
2824
  }
2596
2825
  /**
2597
2826
  * 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
2598
2827
  * 与内置页面 / 数据源 / 代码块回滚共用「目标校验 → 差异/二次确认弹窗 → 反向回滚」流程,
2599
2828
  * 业务方只需提供:差异弹窗入参(可选)、表单配置加载(可选)、实际回滚执行函数。
2600
2829
  */
2601
- interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
2830
+ export interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
2602
2831
  /**
2603
2832
  * 差异确认弹窗入参;可对比的步骤(单实体 update)传入后弹差异确认弹窗,
2604
2833
  * 传 null / 省略则退化为普通二次确认框(add / remove / 不可对比)。
@@ -2611,7 +2840,7 @@ interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
2611
2840
  }
2612
2841
  //#endregion
2613
2842
  //#region temp/packages/editor/src/hooks/use-code-block-edit.d.ts
2614
- declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"]) => {
2843
+ export declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"]) => {
2615
2844
  codeId: import("@vue/reactivity").Ref<string | undefined, string | undefined>;
2616
2845
  codeConfig: import("@vue/reactivity").Ref<(Omit<CodeBlockContent, "content"> & {
2617
2846
  content: string;
@@ -2672,16 +2901,35 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
2672
2901
  }, {}, {}, {}, {}> | null>>;
2673
2902
  createCodeBlock: () => Promise<void>;
2674
2903
  editCode: (id: string) => Promise<void>;
2675
- deleteCode: (key: string, {
2676
- historySource
2677
- }?: {
2904
+ deleteCode: (key: string, { historySource }?: {
2678
2905
  historySource?: HistoryOpSource;
2679
2906
  }) => Promise<void>;
2680
2907
  submitCodeBlockHandler: (values: CodeBlockContent, eventData?: ContainerChangeEventData) => Promise<void>;
2681
2908
  };
2682
2909
  //#endregion
2910
+ //#region temp/packages/editor/src/hooks/use-compare-form.d.ts
2911
+ export interface UseCompareFormReturn {
2912
+ config: Ref<FormConfig>;
2913
+ currentValues: ComputedRef<FormValue>;
2914
+ wrapperStyle: ComputedRef<Record<string, string> | undefined>;
2915
+ formContext: ComputedRef<FormContext>;
2916
+ loadConfig: () => Promise<void>;
2917
+ formRef: Readonly<Ref<InstanceType<typeof MForm> | null>>;
2918
+ normalizeCodeBlockValue: (v: Partial<CodeBlockContent> | Record<string, any> | undefined) => Record<string, any>;
2919
+ }
2920
+ /**
2921
+ * CompareForm / ViewForm 共用逻辑:
2922
+ * - 按 `category`(node / data-source / code-block) 加载 FormConfig(支持自定义 `loadConfig`);
2923
+ * - 代码块 `content` 归一化为字符串;
2924
+ * - 外层容器固定高度 + 内部滚动的 `wrapperStyle`;
2925
+ * - 将 services / stage 作为 form context 传给 MForm,保证 filterFunction 上下文一致。
2926
+ *
2927
+ * 两个组件的差异仅在于是否做新旧值对比,这部分逻辑保留在各自组件中。
2928
+ */
2929
+ export declare const useCompareForm: (props: CompareFormBaseProps) => UseCompareFormReturn;
2930
+ //#endregion
2683
2931
  //#region temp/packages/editor/src/hooks/use-stage.d.ts
2684
- declare const useStage: (stageOptions: StageOptions) => StageCore$1;
2932
+ export declare const useStage: (stageOptions: StageOptions) => StageCore$1;
2685
2933
  //#endregion
2686
2934
  //#region temp/packages/editor/src/hooks/use-float-box.d.ts
2687
2935
  interface State {
@@ -2689,7 +2937,7 @@ interface State {
2689
2937
  top: number;
2690
2938
  left: number;
2691
2939
  }
2692
- declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
2940
+ export declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
2693
2941
  dragstartHandler: (e: DragEvent) => void;
2694
2942
  dragendHandler: (key: string, e: DragEvent) => void;
2695
2943
  floatBoxStates: import("@vue/reactivity").Ref<{
@@ -2701,7 +2949,7 @@ declare const useFloatBox: (slideKeys: ComputedRef<string[]>) => {
2701
2949
  };
2702
2950
  //#endregion
2703
2951
  //#region temp/packages/editor/src/hooks/use-window-rect.d.ts
2704
- declare const useWindowRect: () => {
2952
+ export declare const useWindowRect: () => {
2705
2953
  rect: {
2706
2954
  width: number;
2707
2955
  height: number;
@@ -2709,23 +2957,23 @@ declare const useWindowRect: () => {
2709
2957
  };
2710
2958
  //#endregion
2711
2959
  //#region temp/packages/editor/src/hooks/use-editor-content-height.d.ts
2712
- declare const useEditorContentHeight: () => {
2960
+ export declare const useEditorContentHeight: () => {
2713
2961
  height: import("@vue/reactivity").Ref<number, number>;
2714
2962
  };
2715
2963
  //#endregion
2716
2964
  //#region temp/packages/editor/src/hooks/use-filter.d.ts
2717
- declare const useFilter: (nodeData: Ref<TreeNodeData[]>, nodeStatusMap: Ref<Map<Id, LayerNodeStatus> | undefined>, filterNodeMethod: (value: string, data: MNode) => boolean) => {
2965
+ export declare const useFilter: (nodeData: Ref<TreeNodeData[]>, nodeStatusMap: Ref<Map<Id, LayerNodeStatus> | undefined>, filterNodeMethod: (value: string, data: MNode) => boolean) => {
2718
2966
  filterText: Ref<string, string>;
2719
2967
  filterTextChangeHandler(text: string | string[]): void;
2720
2968
  };
2721
2969
  //#endregion
2722
2970
  //#region temp/packages/editor/src/hooks/use-getso.d.ts
2723
- declare const useGetSo: (target: ShallowRef<HTMLElement | null>, emit: (evt: "change", e: OnDrag$1<Gesto>) => void) => {
2971
+ export declare const useGetSo: (target: ShallowRef<HTMLElement | null>, emit: (evt: "change", e: OnDrag$1<Gesto>) => void) => {
2724
2972
  isDragging: import("@vue/reactivity").Ref<boolean, boolean>;
2725
2973
  };
2726
2974
  //#endregion
2727
2975
  //#region temp/packages/editor/src/hooks/use-next-float-box-position.d.ts
2728
- declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent?: Ref<HTMLDivElement | null>) => {
2976
+ export declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent?: Ref<HTMLDivElement | null>) => {
2729
2977
  boxPosition: Ref<{
2730
2978
  left: number;
2731
2979
  top: number;
@@ -2740,7 +2988,7 @@ declare const useNextFloatBoxPosition: (uiService: Services["uiService"], parent
2740
2988
  };
2741
2989
  //#endregion
2742
2990
  //#region temp/packages/editor/src/hooks/use-node-status.d.ts
2743
- declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
2991
+ export declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
2744
2992
  nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
2745
2993
  visible: boolean;
2746
2994
  expand: boolean;
@@ -2755,39 +3003,45 @@ declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
2755
3003
  };
2756
3004
  //#endregion
2757
3005
  //#region temp/packages/editor/src/hooks/use-services.d.ts
2758
- declare const useServices: () => Services;
3006
+ export declare const useServices: () => Services;
2759
3007
  //#endregion
2760
3008
  //#region temp/packages/editor/src/utils/config.d.ts
3009
+ declare const isGlobalFlat: import("@vue/reactivity").Ref<boolean, boolean>;
2761
3010
  declare const setEditorConfig: (option: EditorInstallOptions) => void;
2762
3011
  declare const getEditorConfig: <K extends keyof EditorInstallOptions>(key: K) => EditorInstallOptions[K];
2763
3012
  //#endregion
2764
3013
  //#region temp/packages/editor/src/utils/props.d.ts
2765
- declare const arrayOptions: {
3014
+ export declare const arrayOptions: {
2766
3015
  text: string;
2767
3016
  value: string;
2768
3017
  }[];
2769
- declare const eqOptions: {
3018
+ export declare const eqOptions: {
2770
3019
  text: string;
2771
3020
  value: string;
2772
3021
  }[];
2773
- declare const numberOptions: {
3022
+ export declare const numberOptions: {
2774
3023
  text: string;
2775
3024
  value: string;
2776
3025
  }[];
2777
- declare const styleTabConfig: TabPaneConfig;
2778
- declare const eventTabConfig: TabPaneConfig;
2779
- declare const advancedTabConfig: TabPaneConfig;
2780
- declare const displayTabConfig: TabPaneConfig<DisplayCondsConfig>;
3026
+ export declare const booleanOptions: {
3027
+ text: string;
3028
+ value: string;
3029
+ }[];
3030
+ /** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
3031
+ export declare const getCondOpOptionsByFieldType: (type: string) => {
3032
+ text: string;
3033
+ value: string;
3034
+ }[];
3035
+ export declare const styleTabConfig: TabPaneConfig;
3036
+ export declare const eventTabConfig: TabPaneConfig;
3037
+ export declare const advancedTabConfig: TabPaneConfig;
3038
+ export declare const displayTabConfig: TabPaneConfig<DisplayCondsConfig>;
2781
3039
  /**
2782
3040
  * 统一为组件属性表单加上事件、高级、样式配置
2783
3041
  * @param config 组件属性配置
2784
3042
  * @returns Object
2785
3043
  */
2786
- declare const fillConfig: (config?: FormConfig, {
2787
- labelWidth,
2788
- disabledDataSource,
2789
- disabledCodeBlock
2790
- }?: {
3044
+ export declare const fillConfig: (config?: FormConfig, { labelWidth, disabledDataSource, disabledCodeBlock }?: {
2791
3045
  labelWidth?: string;
2792
3046
  disabledDataSource?: boolean;
2793
3047
  disabledCodeBlock?: boolean;
@@ -2804,7 +3058,7 @@ declare const fillConfig: (config?: FormConfig, {
2804
3058
  * 通过参数控制两端的细微差异(是否启用必填校验 / vs-code onChange 校验 / dataSource 相关字段显示规则等),
2805
3059
  * 避免两边同步两份相同的 schema 而造成漂移。
2806
3060
  */
2807
- interface GetCodeBlockFormConfigOptions {
3061
+ export interface GetCodeBlockFormConfigOptions {
2808
3062
  /**
2809
3063
  * 自定义 `params` 表格的"参数类型"列配置。优先级高于内置默认值;
2810
3064
  * 通常由 `codeBlockService.getParamsColConfig()` 注入业务侧的扩展。
@@ -2834,60 +3088,60 @@ interface GetCodeBlockFormConfigOptions {
2834
3088
  * 生成代码块表单配置。返回的是普通对象数组,可直接传给 `<MForm :config>`;
2835
3089
  * 如需响应式的 props 变化(如切换 dataSourceType),调用方在 `computed` 中再次调用本函数即可。
2836
3090
  */
2837
- declare const getCodeBlockFormConfig: (options?: GetCodeBlockFormConfigOptions) => FormConfig;
3091
+ export declare const getCodeBlockFormConfig: (options?: GetCodeBlockFormConfigOptions) => FormConfig;
2838
3092
  //#endregion
2839
3093
  //#region temp/packages/editor/src/utils/logger.d.ts
2840
- declare const log: (...args: any[]) => void;
2841
- declare const info: (...args: any[]) => void;
2842
- declare const warn: (...args: any[]) => void;
2843
- declare const debug: (...args: any[]) => void;
2844
- declare const error: (...args: any[]) => void;
3094
+ export declare const log: (...args: any[]) => void;
3095
+ export declare const info: (...args: any[]) => void;
3096
+ export declare const warn: (...args: any[]) => void;
3097
+ export declare const debug: (...args: any[]) => void;
3098
+ export declare const error: (...args: any[]) => void;
2845
3099
  //#endregion
2846
3100
  //#region temp/packages/editor/src/utils/editor.d.ts
2847
- declare const COPY_STORAGE_KEY = "$MagicEditorCopyData";
2848
- declare const COPY_CODE_STORAGE_KEY = "$MagicEditorCopyCode";
2849
- declare const COPY_DS_STORAGE_KEY = "$MagicEditorCopyDataSource";
3101
+ export declare const COPY_STORAGE_KEY = "$MagicEditorCopyData";
3102
+ export declare const COPY_CODE_STORAGE_KEY = "$MagicEditorCopyCode";
3103
+ export declare const COPY_DS_STORAGE_KEY = "$MagicEditorCopyDataSource";
2850
3104
  /**
2851
3105
  * 获取所有页面配置
2852
3106
  * @param root DSL跟节点
2853
3107
  * @returns 所有页面配置
2854
3108
  */
2855
- declare const getPageList: (root?: MApp | null) => MPage[];
2856
- declare const getPageFragmentList: (root?: MApp | null) => MPageFragment[];
3109
+ export declare const getPageList: (root?: MApp | null) => MPage[];
3110
+ export declare const getPageFragmentList: (root?: MApp | null) => MPageFragment[];
2857
3111
  /**
2858
3112
  * 获取所有页面名称
2859
3113
  * @param pages 所有页面配置
2860
3114
  * @returns 所有页面名称
2861
3115
  */
2862
- declare const getPageNameList: (pages: (MPage | MPageFragment)[]) => string[];
3116
+ export declare const getPageNameList: (pages: (MPage | MPageFragment)[]) => string[];
2863
3117
  /**
2864
3118
  * 新增页面时,生成页面名称
2865
3119
  * @param {Object} pageNameList 所有页面名称
2866
3120
  * @returns {string}
2867
3121
  */
2868
- declare const generatePageName: (pageNameList: string[], type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
3122
+ export declare const generatePageName: (pageNameList: string[], type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
2869
3123
  /**
2870
3124
  * 新增页面时,生成页面名称
2871
3125
  * @param {Object} app 所有页面配置
2872
3126
  * @returns {string}
2873
3127
  */
2874
- declare const generatePageNameByApp: (app: MApp, type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
2875
- declare const getNodeIndex: (id: Id, parent: MContainer | MApp) => number;
2876
- declare const getRelativeStyle: (style?: Record<string, any>) => Record<string, any>;
2877
- declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
2878
- declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
2879
- declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
2880
- declare const change2Fixed: (node: MNode, path: MNode[]) => {
3128
+ export declare const generatePageNameByApp: (app: MApp, type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
3129
+ export declare const getNodeIndex: (id: Id, parent: MContainer | MApp) => number;
3130
+ export declare const getRelativeStyle: (style?: Record<string, any>) => Record<string, any>;
3131
+ export declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
3132
+ export declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
3133
+ export declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
3134
+ export declare const change2Fixed: (node: MNode, path: MNode[]) => {
2881
3135
  [key: string]: any;
2882
3136
  };
2883
- declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
2884
- declare const getGuideLineFromCache: (key: string) => number[];
2885
- declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
2886
- declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
2887
- declare const serializeConfig: (config: any) => string;
2888
- declare const moveItemsInContainer: (sourceIndices: number[], parent: MContainer, targetIndex: number) => void;
2889
- declare const isIncludeDataSource: (node: MNode, oldNode: MNode) => boolean;
2890
- declare const buildChangeRecords: (value: any, basePath: string) => {
3137
+ export declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
3138
+ export declare const getGuideLineFromCache: (key: string) => number[];
3139
+ export declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
3140
+ export declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
3141
+ export declare const serializeConfig: (config: any) => string;
3142
+ export declare const moveItemsInContainer: (sourceIndices: number[], parent: MContainer, targetIndex: number) => void;
3143
+ export declare const isIncludeDataSource: (node: MNode, oldNode: MNode) => boolean;
3144
+ export declare const buildChangeRecords: (value: any, basePath: string) => {
2891
3145
  propPath: string;
2892
3146
  value: any;
2893
3147
  }[];
@@ -2898,7 +3152,7 @@ declare const buildChangeRecords: (value: any, basePath: string) => {
2898
3152
  * @param rootId 根节点ID,用于排除根节点被选中
2899
3153
  * @returns 选中节点的完整信息(node、parent、page)
2900
3154
  */
2901
- declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id) => EditorNodeInfo, rootId?: Id) => EditorNodeInfo;
3155
+ export declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id) => EditorNodeInfo, rootId?: Id) => EditorNodeInfo;
2902
3156
  /**
2903
3157
  * 处理节点在 fixed 定位与其他定位之间的切换
2904
3158
  * 当节点从非 fixed 变为 fixed 时,根据节点路径累加偏移量;反之则还原偏移量
@@ -2908,7 +3162,7 @@ declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id)
2908
3162
  * @param getLayoutFn 获取父节点布局方式的回调函数
2909
3163
  * @returns 处理后的节点配置(深拷贝)
2910
3164
  */
2911
- declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
3165
+ export declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
2912
3166
  /**
2913
3167
  * 根据键盘移动的偏移量计算节点的新样式
2914
3168
  * 仅对 absolute 或 fixed 定位的节点生效;优先修改 top/left,若未设置则修改 bottom/right
@@ -2917,7 +3171,7 @@ declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getL
2917
3171
  * @param top 垂直方向偏移量(正值向下,负值向上)
2918
3172
  * @returns 计算后的新样式对象,若节点不支持移动则返回 null
2919
3173
  */
2920
- declare const calcMoveStyle: (style: Record<string, any>, left: number, top: number) => Record<string, any> | null;
3174
+ export declare const calcMoveStyle: (style: Record<string, any>, left: number, top: number) => Record<string, any> | null;
2921
3175
  /**
2922
3176
  * 计算节点水平居中对齐后的样式
2923
3177
  * 流式布局(relative)下不做处理;优先通过 DOM 元素实际宽度计算,回退到配置中的 width 值
@@ -2927,7 +3181,7 @@ declare const calcMoveStyle: (style: Record<string, any>, left: number, top: num
2927
3181
  * @param doc 画布 document 对象,用于获取 DOM 元素实际宽度
2928
3182
  * @returns 计算后的新样式对象,若不支持居中则返回 null
2929
3183
  */
2930
- declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: Layout, doc?: Document) => Record<string, any> | null;
3184
+ export declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: Layout, doc?: Document) => Record<string, any> | null;
2931
3185
  /**
2932
3186
  * 计算图层移动后的目标索引
2933
3187
  * 流式布局与绝对定位布局的移动方向相反:流式布局中"上移"对应索引减小,绝对定位中"上移"对应索引增大
@@ -2937,22 +3191,22 @@ declare const calcAlignCenterStyle: (node: MNode, parent: MContainer, layout: La
2937
3191
  * @param isRelative 是否为流式布局
2938
3192
  * @returns 目标索引位置
2939
3193
  */
2940
- declare const calcLayerTargetIndex: (currentIndex: number, offset: number | LayerOffset, brothersLength: number, isRelative: boolean) => number;
3194
+ export declare const calcLayerTargetIndex: (currentIndex: number, offset: number | LayerOffset, brothersLength: number, isRelative: boolean) => number;
2941
3195
  /**
2942
3196
  * 节点配置合并策略:用于 mergeWith 的自定义回调
2943
3197
  * - undefined 且 source 拥有该 key 时返回空字符串
2944
3198
  * - 原来是数组而新值是对象时,使用新值
2945
3199
  * - 新值是数组时,直接替换而非逐元素合并
2946
3200
  */
2947
- declare const editorNodeMergeCustomizer: (objValue: any, srcValue: any, key: string, _object: any, source: any) => object | "" | undefined;
3201
+ export declare const editorNodeMergeCustomizer: (objValue: any, srcValue: any, key: string, _object: any, source: any) => object | "" | undefined;
2948
3202
  /**
2949
3203
  * 收集复制节点关联的依赖节点,将关联节点追加到 copyNodes 数组中
2950
3204
  * @param copyNodes 待复制的节点列表(会被就地修改)
2951
3205
  * @param collectorOptions 依赖收集器配置
2952
3206
  * @param getNodeById 根据 ID 获取节点的回调函数
2953
3207
  */
2954
- declare const collectRelatedNodes: (copyNodes: MNode[], collectorOptions: TargetOptions, getNodeById: (id: Id) => MNode | null) => void;
2955
- interface DragClassification {
3208
+ export declare const collectRelatedNodes: (copyNodes: MNode[], collectorOptions: TargetOptions, getNodeById: (id: Id) => MNode | null) => void;
3209
+ export interface DragClassification {
2956
3210
  sameParentIndices: number[];
2957
3211
  crossParentConfigs: {
2958
3212
  config: MNode;
@@ -2968,12 +3222,12 @@ interface DragClassification {
2968
3222
  * @param getNodeInfo 获取节点信息的回调
2969
3223
  * @returns 分类结果,包含同容器索引列表和跨容器节点列表
2970
3224
  */
2971
- declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
3225
+ export declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
2972
3226
  /**
2973
3227
  * 给「回滚」生成的新 step 用的简短描述生成器。
2974
3228
  * 与 UI 层 `describePageStep` 同义,但避免 service 反向依赖 layouts/,故放在此工具函数中。
2975
3229
  */
2976
- declare const describeStepForRevert: (step: StepValue) => string;
3230
+ export declare const describeStepForRevert: (step: StepValue) => string;
2977
3231
  //#endregion
2978
3232
  //#region temp/packages/editor/src/utils/operator.d.ts
2979
3233
  /**
@@ -2982,32 +3236,44 @@ declare const describeStepForRevert: (step: StepValue) => string;
2982
3236
  * @param config 待粘贴的元素配置(复制时保存的那份配置)
2983
3237
  * @returns
2984
3238
  */
2985
- declare const beforePaste: (position: PastePosition, config: MNode[], doc?: Document) => MNode[];
3239
+ export declare const beforePaste: (position: PastePosition, config: MNode[], doc?: Document) => MNode[];
2986
3240
  /**
2987
3241
  * 将元素粘贴到容器内时,将相对于画布坐标转换为相对于容器的坐标
2988
3242
  * @param position PastePosition 粘贴时相对于画布的坐标
2989
3243
  * @param id 元素id
2990
3244
  * @returns PastePosition 转换后的坐标
2991
3245
  */
2992
- declare const getPositionInContainer: (position: PastePosition | undefined, id: Id, doc?: Document) => {
3246
+ export declare const getPositionInContainer: (position: PastePosition | undefined, id: Id, doc?: Document) => {
2993
3247
  left: number;
2994
3248
  top: number;
2995
3249
  };
2996
- declare const getAddParent: (node: MNode) => MContainer | null | undefined;
2997
- declare const getDefaultConfig: (addNode: AddMNode, parentNode: MContainer) => Promise<any>;
3250
+ export declare const getAddParent: (node: MNode) => MContainer | null | undefined;
3251
+ export declare const getDefaultConfig: (addNode: AddMNode, parentNode: MContainer) => Promise<any>;
2998
3252
  //#endregion
2999
3253
  //#region temp/packages/editor/src/utils/data-source/index.d.ts
3000
- declare const getFormConfig: (type: string, configs: Record<string, FormConfig>) => FormConfig;
3001
- declare const getFormValue: (type: string, values: Partial<DataSourceSchema>) => Partial<DataSourceSchema>;
3002
- declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) => {
3254
+ export declare const getFormConfig: (type: string, configs: Record<string, FormConfig>) => FormConfig;
3255
+ export declare const getFormValue: (type: string, values: Partial<DataSourceSchema>) => Partial<DataSourceSchema>;
3256
+ export declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) => {
3003
3257
  value: string;
3004
3258
  type: "var" | "text";
3005
3259
  }[];
3006
- declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
3007
- declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: string[]) => string;
3260
+ export declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
3261
+ /**
3262
+ * 按字段名路径下钻 DataSchema。
3263
+ * @param skipNumberIndices 为 true 时跳过数字段(模板路径中的数组下标,如 arr[0].x)
3264
+ */
3265
+ export declare const resolveFieldByPath: (fields: DataSchema[] | undefined, fieldNames: string[], options?: {
3266
+ skipNumberIndices?: boolean;
3267
+ }) => {
3268
+ ok: boolean;
3269
+ field?: DataSchema;
3270
+ fields: DataSchema[];
3271
+ failedName?: string;
3272
+ };
3273
+ export declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: string[]) => "" | DataSourceFieldType;
3008
3274
  //#endregion
3009
3275
  //#region temp/packages/editor/src/utils/dep/idle-task.d.ts
3010
- interface IdleTaskEvents {
3276
+ export interface IdleTaskEvents {
3011
3277
  finish: [];
3012
3278
  'hight-level-finish': [];
3013
3279
  'update-task-length': [{
@@ -3015,7 +3281,7 @@ interface IdleTaskEvents {
3015
3281
  hightLevelLength: number;
3016
3282
  }];
3017
3283
  }
3018
- declare class IdleTask<T = any> extends EventEmitter$1 {
3284
+ export declare class IdleTask<T = any> extends EventEmitter {
3019
3285
  private taskList;
3020
3286
  private hightLevelTaskList;
3021
3287
  private taskHandle;
@@ -3026,6 +3292,17 @@ declare class IdleTask<T = any> extends EventEmitter$1 {
3026
3292
  once<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
3027
3293
  emit<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, ...args: Param): boolean;
3028
3294
  private runTaskQueue;
3295
+ /**
3296
+ * 执行一批任务,队列被清空时提前结束
3297
+ */
3298
+ private runTaskBatch;
3299
+ /**
3300
+ * 单个任务失败不能中断整个队列,否则后续任务永远不会被执行,
3301
+ * 依赖收集会停在半路(收集中状态与剩余任务数都不再变化)
3302
+ */
3303
+ private runTask;
3304
+ private finishRun;
3305
+ private getTaskLength;
3029
3306
  }
3030
3307
  //#endregion
3031
3308
  //#region temp/packages/editor/src/utils/scroll-viewer.d.ts
@@ -3038,7 +3315,7 @@ interface ScrollViewerOptions {
3038
3315
  height: number;
3039
3316
  };
3040
3317
  }
3041
- declare class ScrollViewer extends EventEmitter$1 {
3318
+ export declare class ScrollViewer extends EventEmitter {
3042
3319
  private container;
3043
3320
  private target;
3044
3321
  private zoom;
@@ -3055,10 +3332,7 @@ declare class ScrollViewer extends EventEmitter$1 {
3055
3332
  constructor(options: ScrollViewerOptions);
3056
3333
  destroy(): void;
3057
3334
  setZoom(zoom: number): void;
3058
- scrollTo({
3059
- left,
3060
- top
3061
- }: {
3335
+ scrollTo({ left, top }: {
3062
3336
  left?: number;
3063
3337
  top?: number;
3064
3338
  }): void;
@@ -3069,9 +3343,9 @@ declare class ScrollViewer extends EventEmitter$1 {
3069
3343
  }
3070
3344
  //#endregion
3071
3345
  //#region temp/packages/editor/src/utils/tree.d.ts
3072
- declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, status: Partial<LayerNodeStatus>) => void;
3346
+ export declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, status: Partial<LayerNodeStatus>) => void;
3073
3347
  /** 默认的组件树节点是否可展开的判断函数:当节点的子项中至少存在一个可见节点时认为可展开 */
3074
- declare const defaultIsExpandable: IsExpandableFunction;
3348
+ export declare const defaultIsExpandable: IsExpandableFunction;
3075
3349
  //#endregion
3076
3350
  //#region temp/packages/editor/src/utils/indexed-db.d.ts
3077
3351
  /**
@@ -3079,20 +3353,20 @@ declare const defaultIsExpandable: IsExpandableFunction;
3079
3353
  * 仅用于浏览器环境;在不支持 IndexedDB 的环境(如 SSR / 部分测试环境)下会 reject。
3080
3354
  */
3081
3355
  /** 是否处于支持 IndexedDB 的环境。 */
3082
- declare const isIndexedDBSupported: () => boolean;
3356
+ export declare const isIndexedDBSupported: () => boolean;
3083
3357
  /**
3084
3358
  * 打开(必要时升级)数据库,确保目标 objectStore 存在后返回连接。
3085
3359
  *
3086
3360
  * 由于 objectStore 只能在 `onupgradeneeded` 内创建,这里先以当前版本打开,
3087
3361
  * 若发现 store 不存在则关闭连接、以更高版本重开来按需创建,兼容动态 storeName。
3088
3362
  */
3089
- declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
3363
+ export declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
3090
3364
  /** 写入(覆盖)一条记录。value 通过结构化克隆存储,支持 Map / Set 等结构。 */
3091
- declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
3365
+ export declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
3092
3366
  /** 读取一条记录,不存在时返回 undefined。 */
3093
- declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
3367
+ export declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
3094
3368
  /** 删除一条记录。 */
3095
- declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
3369
+ export declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
3096
3370
  //#endregion
3097
3371
  //#region temp/packages/editor/src/utils/history.d.ts
3098
3372
  /**
@@ -3104,15 +3378,11 @@ declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) =
3104
3378
  * @param diff 单条变更 diff(缺省视为空)
3105
3379
  * @param getLabel 从快照取展示名
3106
3380
  */
3107
- declare const describeRevertStep: <T extends object>(id: Id, {
3108
- oldSchema,
3109
- newSchema,
3110
- changeRecords
3111
- }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
3381
+ export declare const describeRevertStep: <T extends object>(id: Id, { oldSchema, newSchema, changeRecords }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
3112
3382
  /**
3113
3383
  * 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
3114
3384
  */
3115
- declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
3385
+ export declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
3116
3386
  /**
3117
3387
  * 构造一条代码块 / 数据源「按 id 分栈」的历史记录:两者除 payload 字段命名外完全一致。
3118
3388
  *
@@ -3121,13 +3391,14 @@ declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "
3121
3391
  * - 仅负责构造 step 并返回,入栈与事件 emit 由统一的 history.push(stepType, step, id) 处理。
3122
3392
  * - 不直接驱动业务 service,调用方负责实际写回。
3123
3393
  */
3124
- declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
3394
+ export declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
3125
3395
  oldValue: T | null;
3126
3396
  newValue: T | null;
3127
- changeRecords?: ChangeRecord[]; /** 展示名(缺省时从快照 name / title 推断)。 */
3397
+ changeRecords?: ChangeRecord[];
3398
+ /** 展示名(缺省时从快照 name / title 推断)。 */
3128
3399
  name?: string;
3129
3400
  }) => S | null;
3130
- declare const markStackSaved: <S extends {
3401
+ export declare const markStackSaved: <S extends {
3131
3402
  saved?: boolean;
3132
3403
  }>(undoRedo?: UndoRedo<S>) => void;
3133
3404
  /**
@@ -3138,16 +3409,16 @@ declare const markStackSaved: <S extends {
3138
3409
  *
3139
3410
  * 各类型行为完全一致,仅 `kind` 与 step 快照类型不同,统一由本方法处理。
3140
3411
  */
3141
- declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
3412
+ export declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
3142
3413
  /**
3143
3414
  * 解析 step 中的"目标 id"用于合并:
3144
3415
  * - 单实体 update:取唯一一项 diff 的快照 id;快照无 id 时(如 CodeBlockContent)回退到 `step.data.id`
3145
3416
  * (即资源 id),使代码块 / 数据源同样能按资源合并相邻 update;
3146
3417
  * - 其它情形(多实体 update / add / remove):返回 undefined,表示不参与合并。
3147
3418
  */
3148
- declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
3419
+ export declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
3149
3420
  /** 解析 step 中的目标可读名(用于 UI 展示)。 */
3150
- declare const detectTargetName: (step: BaseStepValue) => string | undefined;
3421
+ export declare const detectTargetName: (step: BaseStepValue) => string | undefined;
3151
3422
  /**
3152
3423
  * 把 `Record<Id, UndoRedo>` 整体序列化为 `Record<Id, SerializedUndoRedo>`。
3153
3424
  *
@@ -3156,7 +3427,7 @@ declare const detectTargetName: (step: BaseStepValue) => string | undefined;
3156
3427
  * 这样既能写入函数,又避免序列化整份快照的开销;读取时再由 {@link parseStacksStepDiff} 还原 diff。
3157
3428
  * 不含 `diff` 的元素(如通用栈)原样透传。
3158
3429
  */
3159
- declare const serializeStacks: <T extends {
3430
+ export declare const serializeStacks: <T extends {
3160
3431
  diff?: unknown;
3161
3432
  }>(stacks: Record<Id, UndoRedo<T>>) => Record<Id, SerializedUndoRedo<T>>;
3162
3433
  /**
@@ -3166,38 +3437,97 @@ declare const serializeStacks: <T extends {
3166
3437
  * 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
3167
3438
  * 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
3168
3439
  */
3169
- declare const deserializeStacks: <T extends {
3440
+ export declare const deserializeStacks: <T extends {
3170
3441
  saved?: boolean;
3171
3442
  }>(stacks?: Record<Id, ReturnType<UndoRedo<T>["serialize"]>>, parse?: (serialized: string) => unknown) => Record<Id, UndoRedo<T>>;
3172
3443
  /**
3173
3444
  * 按 id 从「按 id 分栈」的记录表(代码块 / 数据源)中获取(或创建)对应的 UndoRedo 栈。
3174
3445
  */
3175
- declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
3446
+ export declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
3176
3447
  /**
3177
3448
  * 撤销下限:当栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
3178
3449
  * 适用于所有历史类型(page / codeBlock / dataSource / 扩展),把 cursor 钉在基线之上,
3179
3450
  * 保证 undo / canUndo / goto 都不会越过初始基线。
3180
3451
  */
3181
- declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
3452
+ export declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
3182
3453
  /** 将单次 push 产生的 history uuid(或 null)转为 *AndGetHistoryId 返回用的 uuid 列表。 */
3183
- declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
3454
+ export declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
3184
3455
  //#endregion
3185
3456
  //#region temp/packages/editor/src/utils/const.d.ts
3186
3457
  /** 当uiService.get('uiSelectMode')为true,点击组件(包括任何形式,组件树/画布)时触发的事件名 */
3187
- declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
3188
- declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
3189
- declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
3190
- declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
3191
- declare const DEFAULT_LEFT_COLUMN_WIDTH = 310;
3192
- declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
3193
- declare const MIN_LEFT_COLUMN_WIDTH = 238;
3194
- declare const MIN_CENTER_COLUMN_WIDTH = 400;
3195
- declare const MIN_RIGHT_COLUMN_WIDTH = 300;
3196
- declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
3197
- declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
3458
+ export declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
3459
+ export declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
3460
+ export declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
3461
+ export declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
3462
+ export declare const DEFAULT_LEFT_COLUMN_WIDTH = 345;
3463
+ export declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
3464
+ export declare const MIN_LEFT_COLUMN_WIDTH = 345;
3465
+ export declare const MIN_CENTER_COLUMN_WIDTH = 400;
3466
+ export declare const MIN_RIGHT_COLUMN_WIDTH = 300;
3467
+ export declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
3468
+ export declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
3469
+ //#endregion
3470
+ //#region temp/packages/editor/src/utils/type-match-rules.d.ts
3471
+ export declare const ALL_COND_OPS: Set<string>;
3472
+ export type ValidateDataSourceFieldSelectOptions = {
3473
+ /**
3474
+ * 覆盖「非数据源字段路径」时的校验。
3475
+ * 不传则按 fieldConfig 走内置 typeMatch(与表单项自身 typeMatch 行为一致)。
3476
+ */
3477
+ validatePlainValue?: (value: any, context: TypeMatchValidateContext) => string | undefined | Promise<string | undefined>;
3478
+ };
3479
+ /**
3480
+ * data-source-field-select 的 typeMatch 校验逻辑,可供自定义 rules.validator 复用。
3481
+ */
3482
+ export declare const validateDataSourceFieldSelect: (value: any, context: TypeMatchValidateContext, options?: ValidateDataSourceFieldSelectOptions) => string | undefined | Promise<string | undefined>;
3483
+ export declare const editorTypeMatchRules: Record<string, TypeMatchValidator>;
3484
+ //#endregion
3485
+ //#region temp/packages/editor/src/utils/event.d.ts
3486
+ export declare const EVENT_NAME_VALUE_SEPARATOR = ".";
3487
+ export type EventNameSelectOption = {
3488
+ text: string;
3489
+ value: string;
3490
+ };
3491
+ export type EventNameOption = EventOption | CascaderOption | EventNameSelectOption;
3492
+ /** 与 EventSelect 中 checkStrictly 一致:component 为 false,其余为 true */
3493
+ export declare const isEventNameCheckStrictly: (src?: string) => boolean;
3494
+ /** 将动作 method 值规范为与 collectEventNameOptionValues 一致的字符串(cascader 无 valueSeparator 时存数组) */
3495
+ export declare const normalizeCompActionValue: (value: unknown) => string;
3496
+ /**
3497
+ * 组装事件名称下拉/级联 options,与 EventSelect 默认 eventNameConfig.options 逻辑一致。
3498
+ */
3499
+ export declare const getEventNameOptions: (src: string | undefined, formValue?: Record<string, any>) => EventNameOption[];
3500
+ /** 将 select / cascader options 展平为最终写入 name 的字符串集合(cascader 用 `.` 拼接) */
3501
+ export declare const collectEventNameOptionValues: (options: EventNameOption[], checkStrictly: boolean, prefix?: any[], result?: Set<string>) => Set<string>;
3502
+ /**
3503
+ * 解析 event-select 允许的 name 集合。
3504
+ * 自定义 eventNameConfig.options 时返回 null(跳过枚举校验)。
3505
+ */
3506
+ export declare const getEventNameAllowedValues: (config?: {
3507
+ src?: string;
3508
+ eventNameConfig?: {
3509
+ options?: unknown;
3510
+ };
3511
+ }, formValue?: Record<string, any>) => Set<string> | null;
3512
+ /**
3513
+ * 组装联动组件动作下拉/级联 options,与 EventSelect 默认 compActionConfig.options 逻辑一致。
3514
+ */
3515
+ export declare const getCompActionOptions: (toId?: Id) => EventNameOption[];
3516
+ /**
3517
+ * 解析 event-select 联动组件动作允许的 method 集合。
3518
+ * 自定义 compActionConfig.options 时返回 null(跳过枚举校验)。
3519
+ */
3520
+ export declare const getCompActionAllowedValues: (config?: {
3521
+ src?: string;
3522
+ compActionConfig?: {
3523
+ options?: unknown;
3524
+ };
3525
+ }, model?: {
3526
+ to?: Id;
3527
+ }) => Set<string> | null;
3198
3528
  //#endregion
3199
3529
  //#region temp/packages/editor/src/utils/monaco-editor.d.ts
3200
- declare const _default$45: () => Promise<typeof import("monaco-editor")>;
3530
+ declare const _default$49: () => Promise<typeof import("monaco-editor")>;
3201
3531
  //#endregion
3202
3532
  //#region temp/packages/form/src/schema.d.ts
3203
3533
  interface ChangeRecord$1 {
@@ -3228,14 +3558,8 @@ interface FormSlots {
3228
3558
  //#endregion
3229
3559
  //#region temp/packages/editor/src/editorProps.d.ts
3230
3560
  interface EditorProps {
3231
- /**
3232
- * 主题名称:对应 `packages/editor/src/theme/themes/<theme>/index.scss` 的目录名。
3233
- *
3234
- * 设置后会在编辑器根元素上追加 `m-editor--<theme>` 修饰类,配合按需引入
3235
- * `@tmagic/editor/dist/themes/<theme>.css` 即可启用主题样式。
3236
- *
3237
- * 例如:`<MEditor theme="magic-admin" />` + `import '@tmagic/editor/dist/themes/magic-admin.css'`。
3238
- */
3561
+ /** 是否是大屏模拟器容器,大屏容器时,左侧属性面板会扩展为两列(正常3列),颜色表单不扩展两列等 */
3562
+ isLargeStageContainer?: boolean;
3239
3563
  theme?: string;
3240
3564
  /** 页面初始值 */
3241
3565
  modelValue?: MApp;
@@ -3286,6 +3610,11 @@ interface EditorProps {
3286
3610
  containerHighlightDuration?: number;
3287
3611
  /** 拖入画布中容器时,识别容器的操作类型 */
3288
3612
  containerHighlightType?: ContainerHighlightType;
3613
+ /**
3614
+ * 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
3615
+ * 开启后在画布中拖动已有组件不会识别容器,默认 false
3616
+ */
3617
+ containerHighlightAddOnly?: boolean;
3289
3618
  /** 画布大小 */
3290
3619
  stageRect?: StageRect;
3291
3620
  /** monaco editor 的配置 */
@@ -3309,6 +3638,11 @@ interface EditorProps {
3309
3638
  disabledFlashTip?: boolean;
3310
3639
  /** 禁用双击在浮层中单独编辑选中组件 */
3311
3640
  disabledStageOverlay?: boolean;
3641
+ /**
3642
+ * 是否启用「属性配置表单校验」联动能力:开启后属性/样式表单校验失败时仍更新节点,
3643
+ * 并把错误信息集中记录到 editorService,用于组件树标红提示与保存拦截;默认 false(关闭)。
3644
+ */
3645
+ enablePropsFormValidate?: boolean;
3312
3646
  /** 禁用属性配置面板右下角显示源码的按钮 */
3313
3647
  disabledShowSrc?: boolean;
3314
3648
  /** 禁用数据源 */
@@ -3345,7 +3679,6 @@ interface EditorProps {
3345
3679
  beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
3346
3680
  /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
3347
3681
  beforeLayerNodeDblclick?: (event: MouseEvent, data: TreeNodeData) => Promise<boolean | void> | boolean | void;
3348
- extendFormState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
3349
3682
  /** 历史记录面板的自定义扩展 tab,追加在内置的页面/数据源/代码块 tab 之后 */
3350
3683
  historyListExtraTabs?: HistoryListExtraTab[];
3351
3684
  /** 页面顺序拖拽配置参数 */
@@ -3368,11 +3701,10 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3368
3701
  readonly disabledShowSrc?: boolean | undefined;
3369
3702
  readonly labelWidth?: string | undefined;
3370
3703
  readonly codeValueKey?: string | undefined;
3371
- readonly labelPosition?: string | undefined;
3372
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3704
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
3705
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3373
3706
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
3374
3707
  readonly onUnmounted?: (() => any) | undefined;
3375
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3376
3708
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
3377
3709
  readonly "onForm-error"?: ((e: any) => any) | undefined;
3378
3710
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -3386,7 +3718,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3386
3718
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
3387
3719
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
3388
3720
  $host: Element | null;
3389
- $emit: ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined) => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
3721
+ $emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
3390
3722
  $el: any;
3391
3723
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
3392
3724
  config: import("@tmagic/form-schema").FormConfig;
@@ -3394,12 +3726,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3394
3726
  disabledShowSrc?: boolean;
3395
3727
  labelWidth?: string;
3396
3728
  codeValueKey?: string;
3397
- labelPosition?: string;
3398
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3729
+ labelPosition?: "top" | "left" | "right";
3399
3730
  }> & Readonly<{
3731
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3400
3732
  onMounted?: ((internalInstance: any) => any) | undefined;
3401
3733
  onUnmounted?: (() => any) | undefined;
3402
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3403
3734
  "onSubmit-error"?: ((e: any) => any) | undefined;
3404
3735
  "onForm-error"?: ((e: any) => any) | undefined;
3405
3736
  }>, {
@@ -3413,16 +3744,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3413
3744
  readonly isCompare?: boolean | undefined;
3414
3745
  readonly parentValues?: Record<string, any> | undefined;
3415
3746
  readonly labelWidth?: string | undefined;
3747
+ readonly typeMatchValid?: boolean | undefined;
3748
+ readonly validateOnInit?: boolean | undefined;
3416
3749
  readonly disabled?: boolean | undefined;
3417
3750
  readonly height?: string | undefined;
3418
3751
  readonly stepActive?: string | number | undefined;
3419
3752
  readonly size?: "small" | "default" | "large" | undefined;
3420
3753
  readonly inline?: boolean | undefined;
3421
- readonly labelPosition?: string | undefined;
3754
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
3422
3755
  readonly keyProp?: string | undefined;
3423
3756
  readonly popperClass?: string | undefined;
3424
3757
  readonly preventSubmitDefault?: boolean | undefined;
3425
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3758
+ readonly useFieldTextInError?: boolean | undefined;
3759
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
3426
3760
  readonly showDiff?: ((_data: {
3427
3761
  curValue: any;
3428
3762
  lastValue: any;
@@ -3455,16 +3789,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3455
3789
  isCompare?: boolean;
3456
3790
  parentValues?: Record<string, any>;
3457
3791
  labelWidth?: string;
3792
+ typeMatchValid?: boolean;
3793
+ validateOnInit?: boolean;
3458
3794
  disabled?: boolean;
3459
3795
  height?: string;
3460
3796
  stepActive?: string | number;
3461
3797
  size?: "small" | "default" | "large";
3462
3798
  inline?: boolean;
3463
- labelPosition?: string;
3799
+ labelPosition?: "top" | "left" | "right";
3464
3800
  keyProp?: string;
3465
3801
  popperClass?: string;
3466
3802
  preventSubmitDefault?: boolean;
3467
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3803
+ useFieldTextInError?: boolean;
3804
+ context?: import("@tmagic/form-schema").FormContext;
3468
3805
  showDiff?: (_data: {
3469
3806
  curValue: any;
3470
3807
  lastValue: any;
@@ -3487,6 +3824,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3487
3824
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3488
3825
  resetForm: () => void;
3489
3826
  submitForm: (native?: boolean) => Promise<any>;
3827
+ validate: () => Promise<string>;
3490
3828
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3491
3829
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3492
3830
  error: (...args: any[]) => void;
@@ -3498,7 +3836,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3498
3836
  disabled: boolean;
3499
3837
  labelWidth: string;
3500
3838
  inline: boolean;
3501
- labelPosition: string;
3839
+ labelPosition: "top" | "left" | "right";
3502
3840
  config: import("@tmagic/form-schema").FormConfig;
3503
3841
  height: string;
3504
3842
  initValues: Record<string, any>;
@@ -3506,7 +3844,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3506
3844
  isCompare: boolean;
3507
3845
  keyProp: string;
3508
3846
  parentValues: Record<string, any>;
3847
+ useFieldTextInError: boolean;
3509
3848
  stepActive: string | number;
3849
+ validateOnInit: boolean;
3510
3850
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3511
3851
  beforeCreate?: (() => void) | (() => void)[];
3512
3852
  created?: (() => void) | (() => void)[];
@@ -3531,7 +3871,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3531
3871
  disabled: boolean;
3532
3872
  labelWidth: string;
3533
3873
  inline: boolean;
3534
- labelPosition: string;
3874
+ labelPosition: "top" | "left" | "right";
3535
3875
  config: import("@tmagic/form-schema").FormConfig;
3536
3876
  height: string;
3537
3877
  initValues: Record<string, any>;
@@ -3539,7 +3879,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3539
3879
  isCompare: boolean;
3540
3880
  keyProp: string;
3541
3881
  parentValues: Record<string, any>;
3882
+ useFieldTextInError: boolean;
3542
3883
  stepActive: string | number;
3884
+ validateOnInit: boolean;
3543
3885
  }> & Omit<Readonly<{
3544
3886
  config: import("@tmagic/form-schema").FormConfig;
3545
3887
  initValues: Record<string, any>;
@@ -3547,16 +3889,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3547
3889
  isCompare?: boolean;
3548
3890
  parentValues?: Record<string, any>;
3549
3891
  labelWidth?: string;
3892
+ typeMatchValid?: boolean;
3893
+ validateOnInit?: boolean;
3550
3894
  disabled?: boolean;
3551
3895
  height?: string;
3552
3896
  stepActive?: string | number;
3553
3897
  size?: "small" | "default" | "large";
3554
3898
  inline?: boolean;
3555
- labelPosition?: string;
3899
+ labelPosition?: "top" | "left" | "right";
3556
3900
  keyProp?: string;
3557
3901
  popperClass?: string;
3558
3902
  preventSubmitDefault?: boolean;
3559
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3903
+ useFieldTextInError?: boolean;
3904
+ context?: import("@tmagic/form-schema").FormContext;
3560
3905
  showDiff?: (_data: {
3561
3906
  curValue: any;
3562
3907
  lastValue: any;
@@ -3570,7 +3915,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3570
3915
  "onField-input"?: ((...args: any[]) => any) | undefined;
3571
3916
  "onField-change"?: ((...args: any[]) => any) | undefined;
3572
3917
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
3573
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
3918
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
3574
3919
  values: import("@tmagic/form-schema").FormValue;
3575
3920
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
3576
3921
  formState: import("@tmagic/form-schema").FormState;
@@ -3579,15 +3924,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3579
3924
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3580
3925
  resetForm: () => void;
3581
3926
  submitForm: (native?: boolean) => Promise<any>;
3927
+ validate: () => Promise<string>;
3582
3928
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3583
3929
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
3584
3930
  $slots: FormSlots;
3585
3931
  }) | null>>;
3586
3932
  submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
3587
3933
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3934
+ submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
3588
3935
  mounted: (internalInstance: any) => any;
3589
3936
  unmounted: () => any;
3590
- submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
3591
3937
  "submit-error": (e: any) => any;
3592
3938
  "form-error": (e: any) => any;
3593
3939
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -3616,12 +3962,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3616
3962
  disabledShowSrc?: boolean;
3617
3963
  labelWidth?: string;
3618
3964
  codeValueKey?: string;
3619
- labelPosition?: string;
3620
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3965
+ labelPosition?: "top" | "left" | "right";
3621
3966
  }> & Readonly<{
3967
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3622
3968
  onMounted?: ((internalInstance: any) => any) | undefined;
3623
3969
  onUnmounted?: (() => any) | undefined;
3624
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3625
3970
  "onSubmit-error"?: ((e: any) => any) | undefined;
3626
3971
  "onForm-error"?: ((e: any) => any) | undefined;
3627
3972
  }>, "submit" | "configForm"> & {
@@ -3635,16 +3980,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3635
3980
  readonly isCompare?: boolean | undefined;
3636
3981
  readonly parentValues?: Record<string, any> | undefined;
3637
3982
  readonly labelWidth?: string | undefined;
3983
+ readonly typeMatchValid?: boolean | undefined;
3984
+ readonly validateOnInit?: boolean | undefined;
3638
3985
  readonly disabled?: boolean | undefined;
3639
3986
  readonly height?: string | undefined;
3640
3987
  readonly stepActive?: string | number | undefined;
3641
3988
  readonly size?: "small" | "default" | "large" | undefined;
3642
3989
  readonly inline?: boolean | undefined;
3643
- readonly labelPosition?: string | undefined;
3990
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
3644
3991
  readonly keyProp?: string | undefined;
3645
3992
  readonly popperClass?: string | undefined;
3646
3993
  readonly preventSubmitDefault?: boolean | undefined;
3647
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3994
+ readonly useFieldTextInError?: boolean | undefined;
3995
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
3648
3996
  readonly showDiff?: ((_data: {
3649
3997
  curValue: any;
3650
3998
  lastValue: any;
@@ -3677,16 +4025,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3677
4025
  isCompare?: boolean;
3678
4026
  parentValues?: Record<string, any>;
3679
4027
  labelWidth?: string;
4028
+ typeMatchValid?: boolean;
4029
+ validateOnInit?: boolean;
3680
4030
  disabled?: boolean;
3681
4031
  height?: string;
3682
4032
  stepActive?: string | number;
3683
4033
  size?: "small" | "default" | "large";
3684
4034
  inline?: boolean;
3685
- labelPosition?: string;
4035
+ labelPosition?: "top" | "left" | "right";
3686
4036
  keyProp?: string;
3687
4037
  popperClass?: string;
3688
4038
  preventSubmitDefault?: boolean;
3689
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4039
+ useFieldTextInError?: boolean;
4040
+ context?: import("@tmagic/form-schema").FormContext;
3690
4041
  showDiff?: (_data: {
3691
4042
  curValue: any;
3692
4043
  lastValue: any;
@@ -3709,6 +4060,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3709
4060
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3710
4061
  resetForm: () => void;
3711
4062
  submitForm: (native?: boolean) => Promise<any>;
4063
+ validate: () => Promise<string>;
3712
4064
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3713
4065
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3714
4066
  error: (...args: any[]) => void;
@@ -3720,7 +4072,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3720
4072
  disabled: boolean;
3721
4073
  labelWidth: string;
3722
4074
  inline: boolean;
3723
- labelPosition: string;
4075
+ labelPosition: "top" | "left" | "right";
3724
4076
  config: import("@tmagic/form-schema").FormConfig;
3725
4077
  height: string;
3726
4078
  initValues: Record<string, any>;
@@ -3728,7 +4080,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3728
4080
  isCompare: boolean;
3729
4081
  keyProp: string;
3730
4082
  parentValues: Record<string, any>;
4083
+ useFieldTextInError: boolean;
3731
4084
  stepActive: string | number;
4085
+ validateOnInit: boolean;
3732
4086
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3733
4087
  beforeCreate?: (() => void) | (() => void)[];
3734
4088
  created?: (() => void) | (() => void)[];
@@ -3753,7 +4107,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3753
4107
  disabled: boolean;
3754
4108
  labelWidth: string;
3755
4109
  inline: boolean;
3756
- labelPosition: string;
4110
+ labelPosition: "top" | "left" | "right";
3757
4111
  config: import("@tmagic/form-schema").FormConfig;
3758
4112
  height: string;
3759
4113
  initValues: Record<string, any>;
@@ -3761,7 +4115,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3761
4115
  isCompare: boolean;
3762
4116
  keyProp: string;
3763
4117
  parentValues: Record<string, any>;
4118
+ useFieldTextInError: boolean;
3764
4119
  stepActive: string | number;
4120
+ validateOnInit: boolean;
3765
4121
  }> & Omit<Readonly<{
3766
4122
  config: import("@tmagic/form-schema").FormConfig;
3767
4123
  initValues: Record<string, any>;
@@ -3769,16 +4125,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3769
4125
  isCompare?: boolean;
3770
4126
  parentValues?: Record<string, any>;
3771
4127
  labelWidth?: string;
4128
+ typeMatchValid?: boolean;
4129
+ validateOnInit?: boolean;
3772
4130
  disabled?: boolean;
3773
4131
  height?: string;
3774
4132
  stepActive?: string | number;
3775
4133
  size?: "small" | "default" | "large";
3776
4134
  inline?: boolean;
3777
- labelPosition?: string;
4135
+ labelPosition?: "top" | "left" | "right";
3778
4136
  keyProp?: string;
3779
4137
  popperClass?: string;
3780
4138
  preventSubmitDefault?: boolean;
3781
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4139
+ useFieldTextInError?: boolean;
4140
+ context?: import("@tmagic/form-schema").FormContext;
3782
4141
  showDiff?: (_data: {
3783
4142
  curValue: any;
3784
4143
  lastValue: any;
@@ -3792,7 +4151,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3792
4151
  "onField-input"?: ((...args: any[]) => any) | undefined;
3793
4152
  "onField-change"?: ((...args: any[]) => any) | undefined;
3794
4153
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
3795
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4154
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
3796
4155
  values: import("@tmagic/form-schema").FormValue;
3797
4156
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
3798
4157
  formState: import("@tmagic/form-schema").FormState;
@@ -3801,6 +4160,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3801
4160
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3802
4161
  resetForm: () => void;
3803
4162
  submitForm: (native?: boolean) => Promise<any>;
4163
+ validate: () => Promise<string>;
3804
4164
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3805
4165
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
3806
4166
  $slots: FormSlots;
@@ -3826,11 +4186,10 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3826
4186
  readonly disabledShowSrc?: boolean | undefined;
3827
4187
  readonly labelWidth?: string | undefined;
3828
4188
  readonly codeValueKey?: string | undefined;
3829
- readonly labelPosition?: string | undefined;
3830
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4189
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
4190
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3831
4191
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
3832
4192
  readonly onUnmounted?: (() => any) | undefined;
3833
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3834
4193
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
3835
4194
  readonly "onForm-error"?: ((e: any) => any) | undefined;
3836
4195
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -3844,7 +4203,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3844
4203
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
3845
4204
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
3846
4205
  $host: Element | null;
3847
- $emit: ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined) => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
4206
+ $emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
3848
4207
  $el: any;
3849
4208
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
3850
4209
  config: import("@tmagic/form-schema").FormConfig;
@@ -3852,12 +4211,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3852
4211
  disabledShowSrc?: boolean;
3853
4212
  labelWidth?: string;
3854
4213
  codeValueKey?: string;
3855
- labelPosition?: string;
3856
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4214
+ labelPosition?: "top" | "left" | "right";
3857
4215
  }> & Readonly<{
4216
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3858
4217
  onMounted?: ((internalInstance: any) => any) | undefined;
3859
4218
  onUnmounted?: (() => any) | undefined;
3860
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3861
4219
  "onSubmit-error"?: ((e: any) => any) | undefined;
3862
4220
  "onForm-error"?: ((e: any) => any) | undefined;
3863
4221
  }>, {
@@ -3871,16 +4229,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3871
4229
  readonly isCompare?: boolean | undefined;
3872
4230
  readonly parentValues?: Record<string, any> | undefined;
3873
4231
  readonly labelWidth?: string | undefined;
4232
+ readonly typeMatchValid?: boolean | undefined;
4233
+ readonly validateOnInit?: boolean | undefined;
3874
4234
  readonly disabled?: boolean | undefined;
3875
4235
  readonly height?: string | undefined;
3876
4236
  readonly stepActive?: string | number | undefined;
3877
4237
  readonly size?: "small" | "default" | "large" | undefined;
3878
4238
  readonly inline?: boolean | undefined;
3879
- readonly labelPosition?: string | undefined;
4239
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
3880
4240
  readonly keyProp?: string | undefined;
3881
4241
  readonly popperClass?: string | undefined;
3882
4242
  readonly preventSubmitDefault?: boolean | undefined;
3883
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4243
+ readonly useFieldTextInError?: boolean | undefined;
4244
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
3884
4245
  readonly showDiff?: ((_data: {
3885
4246
  curValue: any;
3886
4247
  lastValue: any;
@@ -3913,16 +4274,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3913
4274
  isCompare?: boolean;
3914
4275
  parentValues?: Record<string, any>;
3915
4276
  labelWidth?: string;
4277
+ typeMatchValid?: boolean;
4278
+ validateOnInit?: boolean;
3916
4279
  disabled?: boolean;
3917
4280
  height?: string;
3918
4281
  stepActive?: string | number;
3919
4282
  size?: "small" | "default" | "large";
3920
4283
  inline?: boolean;
3921
- labelPosition?: string;
4284
+ labelPosition?: "top" | "left" | "right";
3922
4285
  keyProp?: string;
3923
4286
  popperClass?: string;
3924
4287
  preventSubmitDefault?: boolean;
3925
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4288
+ useFieldTextInError?: boolean;
4289
+ context?: import("@tmagic/form-schema").FormContext;
3926
4290
  showDiff?: (_data: {
3927
4291
  curValue: any;
3928
4292
  lastValue: any;
@@ -3945,6 +4309,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3945
4309
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3946
4310
  resetForm: () => void;
3947
4311
  submitForm: (native?: boolean) => Promise<any>;
4312
+ validate: () => Promise<string>;
3948
4313
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3949
4314
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3950
4315
  error: (...args: any[]) => void;
@@ -3956,7 +4321,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3956
4321
  disabled: boolean;
3957
4322
  labelWidth: string;
3958
4323
  inline: boolean;
3959
- labelPosition: string;
4324
+ labelPosition: "top" | "left" | "right";
3960
4325
  config: import("@tmagic/form-schema").FormConfig;
3961
4326
  height: string;
3962
4327
  initValues: Record<string, any>;
@@ -3964,7 +4329,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3964
4329
  isCompare: boolean;
3965
4330
  keyProp: string;
3966
4331
  parentValues: Record<string, any>;
4332
+ useFieldTextInError: boolean;
3967
4333
  stepActive: string | number;
4334
+ validateOnInit: boolean;
3968
4335
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3969
4336
  beforeCreate?: (() => void) | (() => void)[];
3970
4337
  created?: (() => void) | (() => void)[];
@@ -3989,7 +4356,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3989
4356
  disabled: boolean;
3990
4357
  labelWidth: string;
3991
4358
  inline: boolean;
3992
- labelPosition: string;
4359
+ labelPosition: "top" | "left" | "right";
3993
4360
  config: import("@tmagic/form-schema").FormConfig;
3994
4361
  height: string;
3995
4362
  initValues: Record<string, any>;
@@ -3997,7 +4364,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3997
4364
  isCompare: boolean;
3998
4365
  keyProp: string;
3999
4366
  parentValues: Record<string, any>;
4367
+ useFieldTextInError: boolean;
4000
4368
  stepActive: string | number;
4369
+ validateOnInit: boolean;
4001
4370
  }> & Omit<Readonly<{
4002
4371
  config: import("@tmagic/form-schema").FormConfig;
4003
4372
  initValues: Record<string, any>;
@@ -4005,16 +4374,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4005
4374
  isCompare?: boolean;
4006
4375
  parentValues?: Record<string, any>;
4007
4376
  labelWidth?: string;
4377
+ typeMatchValid?: boolean;
4378
+ validateOnInit?: boolean;
4008
4379
  disabled?: boolean;
4009
4380
  height?: string;
4010
4381
  stepActive?: string | number;
4011
4382
  size?: "small" | "default" | "large";
4012
4383
  inline?: boolean;
4013
- labelPosition?: string;
4384
+ labelPosition?: "top" | "left" | "right";
4014
4385
  keyProp?: string;
4015
4386
  popperClass?: string;
4016
4387
  preventSubmitDefault?: boolean;
4017
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4388
+ useFieldTextInError?: boolean;
4389
+ context?: import("@tmagic/form-schema").FormContext;
4018
4390
  showDiff?: (_data: {
4019
4391
  curValue: any;
4020
4392
  lastValue: any;
@@ -4028,7 +4400,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4028
4400
  "onField-input"?: ((...args: any[]) => any) | undefined;
4029
4401
  "onField-change"?: ((...args: any[]) => any) | undefined;
4030
4402
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4031
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4403
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
4032
4404
  values: import("@tmagic/form-schema").FormValue;
4033
4405
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
4034
4406
  formState: import("@tmagic/form-schema").FormState;
@@ -4037,15 +4409,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4037
4409
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
4038
4410
  resetForm: () => void;
4039
4411
  submitForm: (native?: boolean) => Promise<any>;
4412
+ validate: () => Promise<string>;
4040
4413
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4041
4414
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4042
4415
  $slots: FormSlots;
4043
4416
  }) | null>>;
4044
4417
  submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
4045
4418
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4419
+ submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
4046
4420
  mounted: (internalInstance: any) => any;
4047
4421
  unmounted: () => any;
4048
- submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
4049
4422
  "submit-error": (e: any) => any;
4050
4423
  "form-error": (e: any) => any;
4051
4424
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -4074,12 +4447,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4074
4447
  disabledShowSrc?: boolean;
4075
4448
  labelWidth?: string;
4076
4449
  codeValueKey?: string;
4077
- labelPosition?: string;
4078
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4450
+ labelPosition?: "top" | "left" | "right";
4079
4451
  }> & Readonly<{
4452
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
4080
4453
  onMounted?: ((internalInstance: any) => any) | undefined;
4081
4454
  onUnmounted?: (() => any) | undefined;
4082
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
4083
4455
  "onSubmit-error"?: ((e: any) => any) | undefined;
4084
4456
  "onForm-error"?: ((e: any) => any) | undefined;
4085
4457
  }>, "submit" | "configForm"> & {
@@ -4093,16 +4465,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4093
4465
  readonly isCompare?: boolean | undefined;
4094
4466
  readonly parentValues?: Record<string, any> | undefined;
4095
4467
  readonly labelWidth?: string | undefined;
4468
+ readonly typeMatchValid?: boolean | undefined;
4469
+ readonly validateOnInit?: boolean | undefined;
4096
4470
  readonly disabled?: boolean | undefined;
4097
4471
  readonly height?: string | undefined;
4098
4472
  readonly stepActive?: string | number | undefined;
4099
4473
  readonly size?: "small" | "default" | "large" | undefined;
4100
4474
  readonly inline?: boolean | undefined;
4101
- readonly labelPosition?: string | undefined;
4475
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
4102
4476
  readonly keyProp?: string | undefined;
4103
4477
  readonly popperClass?: string | undefined;
4104
4478
  readonly preventSubmitDefault?: boolean | undefined;
4105
- readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4479
+ readonly useFieldTextInError?: boolean | undefined;
4480
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
4106
4481
  readonly showDiff?: ((_data: {
4107
4482
  curValue: any;
4108
4483
  lastValue: any;
@@ -4135,16 +4510,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4135
4510
  isCompare?: boolean;
4136
4511
  parentValues?: Record<string, any>;
4137
4512
  labelWidth?: string;
4513
+ typeMatchValid?: boolean;
4514
+ validateOnInit?: boolean;
4138
4515
  disabled?: boolean;
4139
4516
  height?: string;
4140
4517
  stepActive?: string | number;
4141
4518
  size?: "small" | "default" | "large";
4142
4519
  inline?: boolean;
4143
- labelPosition?: string;
4520
+ labelPosition?: "top" | "left" | "right";
4144
4521
  keyProp?: string;
4145
4522
  popperClass?: string;
4146
4523
  preventSubmitDefault?: boolean;
4147
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4524
+ useFieldTextInError?: boolean;
4525
+ context?: import("@tmagic/form-schema").FormContext;
4148
4526
  showDiff?: (_data: {
4149
4527
  curValue: any;
4150
4528
  lastValue: any;
@@ -4167,6 +4545,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4167
4545
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
4168
4546
  resetForm: () => void;
4169
4547
  submitForm: (native?: boolean) => Promise<any>;
4548
+ validate: () => Promise<string>;
4170
4549
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4171
4550
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4172
4551
  error: (...args: any[]) => void;
@@ -4178,7 +4557,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4178
4557
  disabled: boolean;
4179
4558
  labelWidth: string;
4180
4559
  inline: boolean;
4181
- labelPosition: string;
4560
+ labelPosition: "top" | "left" | "right";
4182
4561
  config: import("@tmagic/form-schema").FormConfig;
4183
4562
  height: string;
4184
4563
  initValues: Record<string, any>;
@@ -4186,7 +4565,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4186
4565
  isCompare: boolean;
4187
4566
  keyProp: string;
4188
4567
  parentValues: Record<string, any>;
4568
+ useFieldTextInError: boolean;
4189
4569
  stepActive: string | number;
4570
+ validateOnInit: boolean;
4190
4571
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4191
4572
  beforeCreate?: (() => void) | (() => void)[];
4192
4573
  created?: (() => void) | (() => void)[];
@@ -4211,7 +4592,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4211
4592
  disabled: boolean;
4212
4593
  labelWidth: string;
4213
4594
  inline: boolean;
4214
- labelPosition: string;
4595
+ labelPosition: "top" | "left" | "right";
4215
4596
  config: import("@tmagic/form-schema").FormConfig;
4216
4597
  height: string;
4217
4598
  initValues: Record<string, any>;
@@ -4219,7 +4600,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4219
4600
  isCompare: boolean;
4220
4601
  keyProp: string;
4221
4602
  parentValues: Record<string, any>;
4603
+ useFieldTextInError: boolean;
4222
4604
  stepActive: string | number;
4605
+ validateOnInit: boolean;
4223
4606
  }> & Omit<Readonly<{
4224
4607
  config: import("@tmagic/form-schema").FormConfig;
4225
4608
  initValues: Record<string, any>;
@@ -4227,16 +4610,19 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4227
4610
  isCompare?: boolean;
4228
4611
  parentValues?: Record<string, any>;
4229
4612
  labelWidth?: string;
4613
+ typeMatchValid?: boolean;
4614
+ validateOnInit?: boolean;
4230
4615
  disabled?: boolean;
4231
4616
  height?: string;
4232
4617
  stepActive?: string | number;
4233
4618
  size?: "small" | "default" | "large";
4234
4619
  inline?: boolean;
4235
- labelPosition?: string;
4620
+ labelPosition?: "top" | "left" | "right";
4236
4621
  keyProp?: string;
4237
4622
  popperClass?: string;
4238
4623
  preventSubmitDefault?: boolean;
4239
- extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
4624
+ useFieldTextInError?: boolean;
4625
+ context?: import("@tmagic/form-schema").FormContext;
4240
4626
  showDiff?: (_data: {
4241
4627
  curValue: any;
4242
4628
  lastValue: any;
@@ -4250,7 +4636,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4250
4636
  "onField-input"?: ((...args: any[]) => any) | undefined;
4251
4637
  "onField-change"?: ((...args: any[]) => any) | undefined;
4252
4638
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4253
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4639
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
4254
4640
  values: import("@tmagic/form-schema").FormValue;
4255
4641
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
4256
4642
  formState: import("@tmagic/form-schema").FormState;
@@ -4259,6 +4645,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4259
4645
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
4260
4646
  resetForm: () => void;
4261
4647
  submitForm: (native?: boolean) => Promise<any>;
4648
+ validate: () => Promise<string>;
4262
4649
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4263
4650
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4264
4651
  $slots: FormSlots;
@@ -4304,10 +4691,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
4304
4691
  datasourceConfigs: Record<string, import("@tmagic/form-schema").FormConfig>;
4305
4692
  containerHighlightDuration: number;
4306
4693
  containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
4694
+ containerHighlightAddOnly: boolean;
4307
4695
  canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
4308
4696
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4309
- declare const __VLS_export$37: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
4310
- declare const _default$34: typeof __VLS_export$37;
4697
+ declare const __VLS_export$39: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
4698
+ declare const _default$35: typeof __VLS_export$39;
4311
4699
  type __VLS_WithSlots$12<T, S> = T & {
4312
4700
  new (): {
4313
4701
  $slots: S;
@@ -4315,7 +4703,7 @@ type __VLS_WithSlots$12<T, S> = T & {
4315
4703
  };
4316
4704
  //#endregion
4317
4705
  //#region temp/packages/editor/src/layouts/CodeEditor.vue.d.ts
4318
- type __VLS_Props$32 = {
4706
+ type __VLS_Props$34 = {
4319
4707
  initValues?: any;
4320
4708
  modifiedValues?: any;
4321
4709
  type?: 'diff';
@@ -4331,7 +4719,7 @@ type __VLS_Props$32 = {
4331
4719
  };
4332
4720
  editorCustomType?: string;
4333
4721
  };
4334
- declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS_Props$32, {
4722
+ declare const __VLS_export$38: import("@vue/runtime-core").DefineComponent<__VLS_Props$34, {
4335
4723
  values: import("@vue/reactivity").Ref<string, string>;
4336
4724
  getEditor(): Monaco.editor.IStandaloneCodeEditor | Monaco.editor.IStandaloneDiffEditor | null;
4337
4725
  getVsEditor(): Monaco.editor.IStandaloneCodeEditor | null;
@@ -4342,7 +4730,7 @@ declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS
4342
4730
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4343
4731
  save: (...args: any[]) => void;
4344
4732
  initd: (...args: any[]) => void;
4345
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$32> & Readonly<{
4733
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$34> & Readonly<{
4346
4734
  onSave?: ((...args: any[]) => any) | undefined;
4347
4735
  onInitd?: ((...args: any[]) => any) | undefined;
4348
4736
  }>, {
@@ -4353,13 +4741,13 @@ declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS
4353
4741
  autoSave: boolean;
4354
4742
  disabledFullScreen: boolean;
4355
4743
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4356
- declare const _default$33: typeof __VLS_export$36;
4744
+ declare const _default$34: typeof __VLS_export$38;
4357
4745
  //#endregion
4358
4746
  //#region temp/packages/editor/src/layouts/sidebar/ComponentListPanel.vue.d.ts
4359
4747
  type __VLS_Slots$11 = ComponentListPanelSlots;
4360
4748
  declare const __VLS_base$11: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
4361
- declare const __VLS_export$35: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
4362
- declare const _default$6: typeof __VLS_export$35;
4749
+ declare const __VLS_export$37: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
4750
+ declare const _default$6: typeof __VLS_export$37;
4363
4751
  type __VLS_WithSlots$11<T, S> = T & {
4364
4752
  new (): {
4365
4753
  $slots: S;
@@ -4368,57 +4756,67 @@ type __VLS_WithSlots$11<T, S> = T & {
4368
4756
  //#endregion
4369
4757
  //#region temp/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue.d.ts
4370
4758
  type __VLS_Slots$10 = LayerPanelSlots;
4371
- type __VLS_Props$31 = {
4759
+ type __VLS_Props$33 = {
4372
4760
  layerContentMenu: (MenuButton | MenuComponent)[];
4373
4761
  indent?: number;
4374
4762
  nextLevelIndentIncrement?: number;
4375
- customContentMenu: CustomContentMenuFunction; /** 自定义判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
4376
- isExpandable?: IsExpandableFunction; /** 自定义判断当前拖动节点是否可以拖入目标节点内部的函数,返回 false 则禁止拖入 */
4377
- canDropIn?: CanDropInFunction; /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
4763
+ customContentMenu: CustomContentMenuFunction;
4764
+ /** 自定义判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
4765
+ isExpandable?: IsExpandableFunction;
4766
+ /** 自定义判断当前拖动节点是否可以拖入目标节点内部的函数,返回 false 则禁止拖入 */
4767
+ canDropIn?: CanDropInFunction;
4768
+ /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
4378
4769
  beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
4379
4770
  };
4380
- declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4771
+ declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$33, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4381
4772
  "node-dblclick": (event: MouseEvent, data: TreeNodeData) => any;
4382
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
4773
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$33> & Readonly<{
4383
4774
  "onNode-dblclick"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
4384
4775
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4385
- declare const __VLS_export$34: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
4386
- declare const _default$26: typeof __VLS_export$34;
4776
+ declare const __VLS_export$36: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
4777
+ declare const _default$27: typeof __VLS_export$36;
4387
4778
  type __VLS_WithSlots$10<T, S> = T & {
4388
4779
  new (): {
4389
4780
  $slots: S;
4390
4781
  };
4391
4782
  };
4392
4783
  //#endregion
4784
+ //#region temp/packages/editor/src/layouts/sidebar/layer/LayerNodeContent.vue.d.ts
4785
+ type __VLS_Props$32 = {
4786
+ data: TreeNodeData;
4787
+ };
4788
+ declare const __VLS_export$35: import("@vue/runtime-core").DefineComponent<__VLS_Props$32, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$32> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4789
+ declare const _default$26: typeof __VLS_export$35;
4790
+ //#endregion
4393
4791
  //#region temp/packages/editor/src/fields/CodeSelect.vue.d.ts
4394
- type __VLS_Props$30 = FieldProps<CodeSelectConfig>;
4395
- declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4792
+ type __VLS_Props$31 = FieldProps<CodeSelectConfig>;
4793
+ declare const __VLS_export$34: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4396
4794
  change: (v: any, eventData: ContainerChangeEventData) => any;
4397
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
4795
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
4398
4796
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
4399
4797
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4400
- declare const _default$3: typeof __VLS_export$33;
4798
+ declare const _default$3: typeof __VLS_export$34;
4401
4799
  //#endregion
4402
4800
  //#region temp/packages/editor/src/fields/CodeSelectCol.vue.d.ts
4403
- type __VLS_Props$29 = FieldProps<CodeSelectColConfig>;
4404
- declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_Props$29, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4801
+ type __VLS_Props$30 = FieldProps<CodeSelectColConfig>;
4802
+ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4405
4803
  change: (v: any, eventData: ContainerChangeEventData) => any;
4406
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$29> & Readonly<{
4804
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
4407
4805
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
4408
4806
  }>, {
4409
4807
  disabled: boolean;
4410
4808
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4411
- declare const _default$4: typeof __VLS_export$32;
4809
+ declare const _default$4: typeof __VLS_export$33;
4412
4810
  //#endregion
4413
4811
  //#region temp/packages/editor/src/fields/DataSourceFields.vue.d.ts
4414
- type __VLS_Props$28 = FieldProps<DataSourceFieldsConfig>;
4812
+ type __VLS_Props$29 = FieldProps<DataSourceFieldsConfig>;
4415
4813
  type __VLS_ModelProps$4 = {
4416
4814
  'width'?: number;
4417
4815
  'visible'?: boolean;
4418
4816
  'visible1'?: boolean;
4419
4817
  };
4420
- type __VLS_PublicProps$4 = __VLS_Props$28 & __VLS_ModelProps$4;
4421
- declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4818
+ type __VLS_PublicProps$4 = __VLS_Props$29 & __VLS_ModelProps$4;
4819
+ declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4422
4820
  change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
4423
4821
  "update:visible": (value: boolean) => any;
4424
4822
  "update:width": (value: number) => any;
@@ -4431,111 +4829,109 @@ declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS
4431
4829
  }>, {
4432
4830
  disabled: boolean;
4433
4831
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4434
- declare const _default$12: typeof __VLS_export$31;
4832
+ declare const _default$12: typeof __VLS_export$32;
4435
4833
  //#endregion
4436
4834
  //#region temp/packages/editor/src/fields/DataSourceMocks.vue.d.ts
4437
- type __VLS_Props$27 = FieldProps<DataSourceMocksConfig>;
4835
+ type __VLS_Props$28 = FieldProps<DataSourceMocksConfig>;
4438
4836
  type __VLS_ModelProps$3 = {
4439
4837
  'width'?: number;
4440
4838
  'visible'?: boolean;
4441
4839
  };
4442
- type __VLS_PublicProps$3 = __VLS_Props$27 & __VLS_ModelProps$3;
4443
- declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4444
- change: (...args: any[]) => void;
4445
- "update:visible": (value: boolean) => void;
4446
- "update:width": (value: number) => void;
4840
+ type __VLS_PublicProps$3 = __VLS_Props$28 & __VLS_ModelProps$3;
4841
+ declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4842
+ "update:visible": (value: boolean) => any;
4843
+ "update:width": (value: number) => any;
4447
4844
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$3> & Readonly<{
4448
- onChange?: ((...args: any[]) => any) | undefined;
4449
4845
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
4450
4846
  "onUpdate:width"?: ((value: number) => any) | undefined;
4451
4847
  }>, {
4452
4848
  disabled: boolean;
4453
4849
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4454
- declare const _default$16: typeof __VLS_export$30;
4850
+ declare const _default$16: typeof __VLS_export$31;
4455
4851
  //#endregion
4456
4852
  //#region temp/packages/editor/src/fields/DataSourceMethods.vue.d.ts
4457
- type __VLS_Props$26 = FieldProps<DataSourceMethodsConfig>;
4458
- declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4853
+ type __VLS_Props$27 = FieldProps<DataSourceMethodsConfig>;
4854
+ declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4459
4855
  change: (...args: any[]) => void;
4460
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
4856
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$27> & Readonly<{
4461
4857
  onChange?: ((...args: any[]) => any) | undefined;
4462
4858
  }>, {
4463
4859
  disabled: boolean;
4464
4860
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4465
- declare const _default$15: typeof __VLS_export$29;
4861
+ declare const _default$15: typeof __VLS_export$30;
4466
4862
  //#endregion
4467
4863
  //#region temp/packages/editor/src/fields/DataSourceInput.vue.d.ts
4468
- type __VLS_Props$25 = FieldProps<DataSourceInputConfig>;
4469
- declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4864
+ type __VLS_Props$26 = FieldProps<DataSourceInputConfig>;
4865
+ declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4470
4866
  change: (value: string) => any;
4471
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
4867
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
4472
4868
  onChange?: ((value: string) => any) | undefined;
4473
4869
  }>, {
4474
4870
  disabled: boolean;
4475
4871
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4476
- declare const _default$13: typeof __VLS_export$28;
4872
+ declare const _default$13: typeof __VLS_export$29;
4477
4873
  //#endregion
4478
4874
  //#region temp/packages/editor/src/fields/DataSourceSelect.vue.d.ts
4479
- type __VLS_Props$24 = FieldProps<DataSourceSelect>;
4480
- declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4875
+ type __VLS_Props$25 = FieldProps<DataSourceSelect>;
4876
+ declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4481
4877
  change: (...args: any[]) => void;
4482
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
4878
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
4483
4879
  onChange?: ((...args: any[]) => any) | undefined;
4484
4880
  }>, {
4485
4881
  disabled: boolean;
4486
4882
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4487
- declare const _default$17: typeof __VLS_export$27;
4883
+ declare const _default$17: typeof __VLS_export$28;
4488
4884
  //#endregion
4489
4885
  //#region temp/packages/editor/src/fields/DataSourceMethodSelect.vue.d.ts
4490
- type __VLS_Props$23 = FieldProps<DataSourceMethodSelectConfig>;
4491
- declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4886
+ type __VLS_Props$24 = FieldProps<DataSourceMethodSelectConfig>;
4887
+ declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4492
4888
  change: (...args: any[]) => void;
4493
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
4889
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
4494
4890
  onChange?: ((...args: any[]) => any) | undefined;
4495
4891
  }>, {
4496
4892
  disabled: boolean;
4497
4893
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4498
- declare const _default$14: typeof __VLS_export$26;
4894
+ declare const _default$14: typeof __VLS_export$27;
4499
4895
  //#endregion
4500
4896
  //#region temp/packages/editor/src/fields/DataSourceFieldSelect/Index.vue.d.ts
4501
- type __VLS_Props$22 = FieldProps<DataSourceFieldSelectConfig>;
4502
- declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4897
+ type __VLS_Props$23 = FieldProps<DataSourceFieldSelectConfig>;
4898
+ declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4503
4899
  change: (...args: any[]) => void;
4504
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
4900
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
4505
4901
  onChange?: ((...args: any[]) => any) | undefined;
4506
4902
  }>, {
4507
4903
  disabled: boolean;
4508
4904
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4509
- declare const _default$11: typeof __VLS_export$25;
4905
+ declare const _default$11: typeof __VLS_export$26;
4510
4906
  //#endregion
4511
4907
  //#region temp/packages/editor/src/fields/EventSelect.vue.d.ts
4512
- type __VLS_Props$21 = FieldProps<EventSelectConfig>;
4513
- declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4908
+ type __VLS_Props$22 = FieldProps<EventSelectConfig>;
4909
+ declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4514
4910
  change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
4515
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
4911
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
4516
4912
  onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4517
4913
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4518
- declare const _default$19: typeof __VLS_export$24;
4914
+ declare const _default$19: typeof __VLS_export$25;
4519
4915
  //#endregion
4520
4916
  //#region temp/packages/editor/src/fields/KeyValue.vue.d.ts
4521
- type __VLS_Props$20 = FieldProps<KeyValueConfig>;
4522
- declare const __VLS_export$23: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4917
+ type __VLS_Props$21 = FieldProps<KeyValueConfig>;
4918
+ declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4523
4919
  change: (value: Record<string, any>) => any;
4524
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
4920
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
4525
4921
  onChange?: ((value: Record<string, any>) => any) | undefined;
4526
4922
  }>, {
4527
4923
  disabled: boolean;
4528
4924
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4529
- declare const _default$25: typeof __VLS_export$23;
4925
+ declare const _default$25: typeof __VLS_export$24;
4530
4926
  //#endregion
4531
4927
  //#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue.d.ts
4532
4928
  type __VLS_Slots$9 = CodeBlockListSlots;
4533
- type __VLS_Props$19 = {
4929
+ type __VLS_Props$20 = {
4534
4930
  indent?: number;
4535
4931
  nextLevelIndentIncrement?: number;
4536
4932
  customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
4537
4933
  };
4538
- declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$19, {
4934
+ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {
4539
4935
  nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
4540
4936
  visible: boolean;
4541
4937
  expand: boolean;
@@ -4548,9 +4944,7 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4548
4944
  draggable: boolean;
4549
4945
  }> & Omit<Map<Id, LayerNodeStatus>, keyof Map<any, any>>)>;
4550
4946
  filter: (text: string | string[]) => void;
4551
- deleteCode: (id: string, {
4552
- historySource
4553
- }?: {
4947
+ deleteCode: (id: string, { historySource }?: {
4554
4948
  historySource?: HistoryOpSource;
4555
4949
  }) => Promise<void>;
4556
4950
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -4559,15 +4953,15 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4559
4953
  }) => any;
4560
4954
  edit: (id: string) => any;
4561
4955
  "node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
4562
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$19> & Readonly<{
4956
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
4563
4957
  onRemove?: ((id: string, args_1: {
4564
4958
  historySource?: HistoryOpSource;
4565
4959
  }) => any) | undefined;
4566
4960
  onEdit?: ((id: string) => any) | undefined;
4567
4961
  "onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
4568
4962
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4569
- declare const __VLS_export$22: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
4570
- declare const _default$1: typeof __VLS_export$22;
4963
+ declare const __VLS_export$23: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
4964
+ declare const _default$1: typeof __VLS_export$23;
4571
4965
  type __VLS_WithSlots$9<T, S> = T & {
4572
4966
  new (): {
4573
4967
  $slots: S;
@@ -4576,15 +4970,15 @@ type __VLS_WithSlots$9<T, S> = T & {
4576
4970
  //#endregion
4577
4971
  //#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts
4578
4972
  type __VLS_Slots$8 = CodeBlockListPanelSlots;
4579
- type __VLS_Props$18 = {
4973
+ type __VLS_Props$19 = {
4580
4974
  indent?: number;
4581
4975
  nextLevelIndentIncrement?: number;
4582
4976
  customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
4583
4977
  customContentMenu: CustomContentMenuFunction;
4584
4978
  };
4585
- declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$18, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$18> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4586
- declare const __VLS_export$21: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
4587
- declare const _default$2: typeof __VLS_export$21;
4979
+ declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$19, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$19> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4980
+ declare const __VLS_export$22: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
4981
+ declare const _default$2: typeof __VLS_export$22;
4588
4982
  type __VLS_WithSlots$8<T, S> = T & {
4589
4983
  new (): {
4590
4984
  $slots: S;
@@ -4592,19 +4986,21 @@ type __VLS_WithSlots$8<T, S> = T & {
4592
4986
  };
4593
4987
  //#endregion
4594
4988
  //#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts
4595
- type __VLS_Props$17 = {
4989
+ type __VLS_Props$18 = {
4596
4990
  title?: string;
4597
4991
  values: any;
4598
- disabled: boolean; /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
4599
- editMethodName?: string; /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
4992
+ disabled: boolean;
4993
+ /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
4994
+ editMethodName?: string;
4995
+ /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
4600
4996
  editFieldPath?: string[];
4601
4997
  };
4602
4998
  type __VLS_ModelProps$2 = {
4603
4999
  'visible'?: boolean;
4604
5000
  'width'?: number;
4605
5001
  };
4606
- type __VLS_PublicProps$2 = __VLS_Props$17 & __VLS_ModelProps$2;
4607
- declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
5002
+ type __VLS_PublicProps$2 = __VLS_Props$18 & __VLS_ModelProps$2;
5003
+ declare const __VLS_export$21: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
4608
5004
  show(): void;
4609
5005
  hide(): void;
4610
5006
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -4620,10 +5016,10 @@ declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS
4620
5016
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
4621
5017
  "onUpdate:width"?: ((value: number) => any) | undefined;
4622
5018
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4623
- declare const _default$10: typeof __VLS_export$20;
5019
+ declare const _default$10: typeof __VLS_export$21;
4624
5020
  //#endregion
4625
5021
  //#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceAddButton.vue.d.ts
4626
- type __VLS_Props$16 = {
5022
+ type __VLS_Props$17 = {
4627
5023
  datasourceTypeList: {
4628
5024
  text: string;
4629
5025
  type: string;
@@ -4631,22 +5027,21 @@ type __VLS_Props$16 = {
4631
5027
  addButtonConfig?: ButtonProps;
4632
5028
  addButtonText?: string;
4633
5029
  };
4634
- declare const __VLS_export$19: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5030
+ declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_Props$17, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4635
5031
  add: (type: string) => any;
4636
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
5032
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$17> & Readonly<{
4637
5033
  onAdd?: ((type: string) => any) | undefined;
4638
5034
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4639
- declare const _default$9: typeof __VLS_export$19;
5035
+ declare const _default$9: typeof __VLS_export$20;
4640
5036
  //#endregion
4641
5037
  //#region temp/packages/editor/src/layouts/props-panel/PropsPanel.vue.d.ts
4642
5038
  type __VLS_Slots$7 = PropsPanelSlots;
4643
- type __VLS_Props$15 = {
5039
+ type __VLS_Props$16 = {
4644
5040
  disabledShowSrc?: boolean;
4645
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4646
5041
  };
4647
- declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
4648
- getFormState(): FormState | undefined;
4649
- submit: (v: MNode, eventData?: ContainerChangeEventData) => Promise<void>;
5042
+ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {
5043
+ getFormState(): import("@tmagic/form-schema").FormState | undefined;
5044
+ submit: (v: MNode, eventData?: ContainerChangeEventData, error?: any, source?: NodeInvalidSource) => Promise<void>;
4650
5045
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4651
5046
  mounted: (internalInstance: {
4652
5047
  $: import("@vue/runtime-core").ComponentInternalInstance;
@@ -4657,11 +5052,10 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4657
5052
  readonly disabledShowSrc?: boolean | undefined;
4658
5053
  readonly labelWidth?: string | undefined;
4659
5054
  readonly codeValueKey?: string | undefined;
4660
- readonly labelPosition?: string | undefined;
4661
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5055
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
5056
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4662
5057
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
4663
5058
  readonly onUnmounted?: (() => any) | undefined;
4664
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4665
5059
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
4666
5060
  readonly "onForm-error"?: ((e: any) => any) | undefined;
4667
5061
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -4675,7 +5069,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4675
5069
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
4676
5070
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
4677
5071
  $host: Element | null;
4678
- $emit: ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined) => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
5072
+ $emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
4679
5073
  $el: any;
4680
5074
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
4681
5075
  config: import("@tmagic/form-schema").FormConfig;
@@ -4683,12 +5077,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4683
5077
  disabledShowSrc?: boolean;
4684
5078
  labelWidth?: string;
4685
5079
  codeValueKey?: string;
4686
- labelPosition?: string;
4687
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5080
+ labelPosition?: "top" | "left" | "right";
4688
5081
  }> & Readonly<{
5082
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4689
5083
  onMounted?: ((internalInstance: any) => any) | undefined;
4690
5084
  onUnmounted?: (() => any) | undefined;
4691
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4692
5085
  "onSubmit-error"?: ((e: any) => any) | undefined;
4693
5086
  "onForm-error"?: ((e: any) => any) | undefined;
4694
5087
  }>, {
@@ -4702,16 +5095,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4702
5095
  readonly isCompare?: boolean | undefined;
4703
5096
  readonly parentValues?: Record<string, any> | undefined;
4704
5097
  readonly labelWidth?: string | undefined;
5098
+ readonly typeMatchValid?: boolean | undefined;
5099
+ readonly validateOnInit?: boolean | undefined;
4705
5100
  readonly disabled?: boolean | undefined;
4706
5101
  readonly height?: string | undefined;
4707
5102
  readonly stepActive?: string | number | undefined;
4708
5103
  readonly size?: "small" | "default" | "large" | undefined;
4709
5104
  readonly inline?: boolean | undefined;
4710
- readonly labelPosition?: string | undefined;
5105
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
4711
5106
  readonly keyProp?: string | undefined;
4712
5107
  readonly popperClass?: string | undefined;
4713
5108
  readonly preventSubmitDefault?: boolean | undefined;
4714
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5109
+ readonly useFieldTextInError?: boolean | undefined;
5110
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
4715
5111
  readonly showDiff?: ((_data: {
4716
5112
  curValue: any;
4717
5113
  lastValue: any;
@@ -4744,16 +5140,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4744
5140
  isCompare?: boolean;
4745
5141
  parentValues?: Record<string, any>;
4746
5142
  labelWidth?: string;
5143
+ typeMatchValid?: boolean;
5144
+ validateOnInit?: boolean;
4747
5145
  disabled?: boolean;
4748
5146
  height?: string;
4749
5147
  stepActive?: string | number;
4750
5148
  size?: "small" | "default" | "large";
4751
5149
  inline?: boolean;
4752
- labelPosition?: string;
5150
+ labelPosition?: "top" | "left" | "right";
4753
5151
  keyProp?: string;
4754
5152
  popperClass?: string;
4755
5153
  preventSubmitDefault?: boolean;
4756
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5154
+ useFieldTextInError?: boolean;
5155
+ context?: import("@tmagic/form-schema").FormContext;
4757
5156
  showDiff?: (_data: {
4758
5157
  curValue: any;
4759
5158
  lastValue: any;
@@ -4770,12 +5169,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4770
5169
  }>, {
4771
5170
  values: import("@vue/reactivity").Ref<FormValue, FormValue>;
4772
5171
  lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
4773
- formState: FormState;
5172
+ formState: import("@tmagic/form-schema").FormState;
4774
5173
  initialized: import("@vue/reactivity").Ref<boolean, boolean>;
4775
5174
  changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
4776
5175
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4777
5176
  resetForm: () => void;
4778
5177
  submitForm: (native?: boolean) => Promise<any>;
5178
+ validate: () => Promise<string>;
4779
5179
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4780
5180
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4781
5181
  error: (...args: any[]) => void;
@@ -4787,7 +5187,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4787
5187
  disabled: boolean;
4788
5188
  labelWidth: string;
4789
5189
  inline: boolean;
4790
- labelPosition: string;
5190
+ labelPosition: "top" | "left" | "right";
4791
5191
  config: import("@tmagic/form-schema").FormConfig;
4792
5192
  height: string;
4793
5193
  initValues: Record<string, any>;
@@ -4795,7 +5195,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4795
5195
  isCompare: boolean;
4796
5196
  keyProp: string;
4797
5197
  parentValues: Record<string, any>;
5198
+ useFieldTextInError: boolean;
4798
5199
  stepActive: string | number;
5200
+ validateOnInit: boolean;
4799
5201
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4800
5202
  beforeCreate?: (() => void) | (() => void)[];
4801
5203
  created?: (() => void) | (() => void)[];
@@ -4820,7 +5222,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4820
5222
  disabled: boolean;
4821
5223
  labelWidth: string;
4822
5224
  inline: boolean;
4823
- labelPosition: string;
5225
+ labelPosition: "top" | "left" | "right";
4824
5226
  config: import("@tmagic/form-schema").FormConfig;
4825
5227
  height: string;
4826
5228
  initValues: Record<string, any>;
@@ -4828,7 +5230,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4828
5230
  isCompare: boolean;
4829
5231
  keyProp: string;
4830
5232
  parentValues: Record<string, any>;
5233
+ useFieldTextInError: boolean;
4831
5234
  stepActive: string | number;
5235
+ validateOnInit: boolean;
4832
5236
  }> & Omit<Readonly<{
4833
5237
  config: import("@tmagic/form-schema").FormConfig;
4834
5238
  initValues: Record<string, any>;
@@ -4836,16 +5240,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4836
5240
  isCompare?: boolean;
4837
5241
  parentValues?: Record<string, any>;
4838
5242
  labelWidth?: string;
5243
+ typeMatchValid?: boolean;
5244
+ validateOnInit?: boolean;
4839
5245
  disabled?: boolean;
4840
5246
  height?: string;
4841
5247
  stepActive?: string | number;
4842
5248
  size?: "small" | "default" | "large";
4843
5249
  inline?: boolean;
4844
- labelPosition?: string;
5250
+ labelPosition?: "top" | "left" | "right";
4845
5251
  keyProp?: string;
4846
5252
  popperClass?: string;
4847
5253
  preventSubmitDefault?: boolean;
4848
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5254
+ useFieldTextInError?: boolean;
5255
+ context?: import("@tmagic/form-schema").FormContext;
4849
5256
  showDiff?: (_data: {
4850
5257
  curValue: any;
4851
5258
  lastValue: any;
@@ -4859,24 +5266,25 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4859
5266
  "onField-input"?: ((...args: any[]) => any) | undefined;
4860
5267
  "onField-change"?: ((...args: any[]) => any) | undefined;
4861
5268
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4862
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5269
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
4863
5270
  values: FormValue;
4864
5271
  lastValuesProcessed: FormValue;
4865
- formState: FormState;
5272
+ formState: import("@tmagic/form-schema").FormState;
4866
5273
  initialized: boolean;
4867
5274
  changeRecords: ChangeRecord$1[];
4868
5275
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4869
5276
  resetForm: () => void;
4870
5277
  submitForm: (native?: boolean) => Promise<any>;
5278
+ validate: () => Promise<string>;
4871
5279
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4872
5280
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4873
5281
  $slots: FormSlots;
4874
5282
  }) | null>>;
4875
5283
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
4876
5284
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5285
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
4877
5286
  mounted: (internalInstance: any) => any;
4878
5287
  unmounted: () => any;
4879
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
4880
5288
  "submit-error": (e: any) => any;
4881
5289
  "form-error": (e: any) => any;
4882
5290
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -4905,12 +5313,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4905
5313
  disabledShowSrc?: boolean;
4906
5314
  labelWidth?: string;
4907
5315
  codeValueKey?: string;
4908
- labelPosition?: string;
4909
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5316
+ labelPosition?: "top" | "left" | "right";
4910
5317
  }> & Readonly<{
5318
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4911
5319
  onMounted?: ((internalInstance: any) => any) | undefined;
4912
5320
  onUnmounted?: (() => any) | undefined;
4913
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4914
5321
  "onSubmit-error"?: ((e: any) => any) | undefined;
4915
5322
  "onForm-error"?: ((e: any) => any) | undefined;
4916
5323
  }>, "submit" | "configForm"> & {
@@ -4924,16 +5331,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4924
5331
  readonly isCompare?: boolean | undefined;
4925
5332
  readonly parentValues?: Record<string, any> | undefined;
4926
5333
  readonly labelWidth?: string | undefined;
5334
+ readonly typeMatchValid?: boolean | undefined;
5335
+ readonly validateOnInit?: boolean | undefined;
4927
5336
  readonly disabled?: boolean | undefined;
4928
5337
  readonly height?: string | undefined;
4929
5338
  readonly stepActive?: string | number | undefined;
4930
5339
  readonly size?: "small" | "default" | "large" | undefined;
4931
5340
  readonly inline?: boolean | undefined;
4932
- readonly labelPosition?: string | undefined;
5341
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
4933
5342
  readonly keyProp?: string | undefined;
4934
5343
  readonly popperClass?: string | undefined;
4935
5344
  readonly preventSubmitDefault?: boolean | undefined;
4936
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5345
+ readonly useFieldTextInError?: boolean | undefined;
5346
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
4937
5347
  readonly showDiff?: ((_data: {
4938
5348
  curValue: any;
4939
5349
  lastValue: any;
@@ -4966,16 +5376,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4966
5376
  isCompare?: boolean;
4967
5377
  parentValues?: Record<string, any>;
4968
5378
  labelWidth?: string;
5379
+ typeMatchValid?: boolean;
5380
+ validateOnInit?: boolean;
4969
5381
  disabled?: boolean;
4970
5382
  height?: string;
4971
5383
  stepActive?: string | number;
4972
5384
  size?: "small" | "default" | "large";
4973
5385
  inline?: boolean;
4974
- labelPosition?: string;
5386
+ labelPosition?: "top" | "left" | "right";
4975
5387
  keyProp?: string;
4976
5388
  popperClass?: string;
4977
5389
  preventSubmitDefault?: boolean;
4978
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5390
+ useFieldTextInError?: boolean;
5391
+ context?: import("@tmagic/form-schema").FormContext;
4979
5392
  showDiff?: (_data: {
4980
5393
  curValue: any;
4981
5394
  lastValue: any;
@@ -4992,12 +5405,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4992
5405
  }>, {
4993
5406
  values: import("@vue/reactivity").Ref<FormValue, FormValue>;
4994
5407
  lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
4995
- formState: FormState;
5408
+ formState: import("@tmagic/form-schema").FormState;
4996
5409
  initialized: import("@vue/reactivity").Ref<boolean, boolean>;
4997
5410
  changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
4998
5411
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4999
5412
  resetForm: () => void;
5000
5413
  submitForm: (native?: boolean) => Promise<any>;
5414
+ validate: () => Promise<string>;
5001
5415
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5002
5416
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5003
5417
  error: (...args: any[]) => void;
@@ -5009,7 +5423,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5009
5423
  disabled: boolean;
5010
5424
  labelWidth: string;
5011
5425
  inline: boolean;
5012
- labelPosition: string;
5426
+ labelPosition: "top" | "left" | "right";
5013
5427
  config: import("@tmagic/form-schema").FormConfig;
5014
5428
  height: string;
5015
5429
  initValues: Record<string, any>;
@@ -5017,7 +5431,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5017
5431
  isCompare: boolean;
5018
5432
  keyProp: string;
5019
5433
  parentValues: Record<string, any>;
5434
+ useFieldTextInError: boolean;
5020
5435
  stepActive: string | number;
5436
+ validateOnInit: boolean;
5021
5437
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
5022
5438
  beforeCreate?: (() => void) | (() => void)[];
5023
5439
  created?: (() => void) | (() => void)[];
@@ -5042,7 +5458,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5042
5458
  disabled: boolean;
5043
5459
  labelWidth: string;
5044
5460
  inline: boolean;
5045
- labelPosition: string;
5461
+ labelPosition: "top" | "left" | "right";
5046
5462
  config: import("@tmagic/form-schema").FormConfig;
5047
5463
  height: string;
5048
5464
  initValues: Record<string, any>;
@@ -5050,7 +5466,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5050
5466
  isCompare: boolean;
5051
5467
  keyProp: string;
5052
5468
  parentValues: Record<string, any>;
5469
+ useFieldTextInError: boolean;
5053
5470
  stepActive: string | number;
5471
+ validateOnInit: boolean;
5054
5472
  }> & Omit<Readonly<{
5055
5473
  config: import("@tmagic/form-schema").FormConfig;
5056
5474
  initValues: Record<string, any>;
@@ -5058,16 +5476,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5058
5476
  isCompare?: boolean;
5059
5477
  parentValues?: Record<string, any>;
5060
5478
  labelWidth?: string;
5479
+ typeMatchValid?: boolean;
5480
+ validateOnInit?: boolean;
5061
5481
  disabled?: boolean;
5062
5482
  height?: string;
5063
5483
  stepActive?: string | number;
5064
5484
  size?: "small" | "default" | "large";
5065
5485
  inline?: boolean;
5066
- labelPosition?: string;
5486
+ labelPosition?: "top" | "left" | "right";
5067
5487
  keyProp?: string;
5068
5488
  popperClass?: string;
5069
5489
  preventSubmitDefault?: boolean;
5070
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5490
+ useFieldTextInError?: boolean;
5491
+ context?: import("@tmagic/form-schema").FormContext;
5071
5492
  showDiff?: (_data: {
5072
5493
  curValue: any;
5073
5494
  lastValue: any;
@@ -5081,15 +5502,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5081
5502
  "onField-input"?: ((...args: any[]) => any) | undefined;
5082
5503
  "onField-change"?: ((...args: any[]) => any) | undefined;
5083
5504
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
5084
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5505
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
5085
5506
  values: FormValue;
5086
5507
  lastValuesProcessed: FormValue;
5087
- formState: FormState;
5508
+ formState: import("@tmagic/form-schema").FormState;
5088
5509
  initialized: boolean;
5089
5510
  changeRecords: ChangeRecord$1[];
5090
5511
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5091
5512
  resetForm: () => void;
5092
5513
  submitForm: (native?: boolean) => Promise<any>;
5514
+ validate: () => Promise<string>;
5093
5515
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5094
5516
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
5095
5517
  $slots: FormSlots;
@@ -5103,7 +5525,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5103
5525
  unmounted: () => any;
5104
5526
  "submit-error": (e: any) => any;
5105
5527
  "form-error": (e: any) => any;
5106
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
5528
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
5107
5529
  onMounted?: ((internalInstance: {
5108
5530
  $: import("@vue/runtime-core").ComponentInternalInstance;
5109
5531
  $data: {};
@@ -5113,11 +5535,10 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5113
5535
  readonly disabledShowSrc?: boolean | undefined;
5114
5536
  readonly labelWidth?: string | undefined;
5115
5537
  readonly codeValueKey?: string | undefined;
5116
- readonly labelPosition?: string | undefined;
5117
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5538
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
5539
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
5118
5540
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
5119
5541
  readonly onUnmounted?: (() => any) | undefined;
5120
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
5121
5542
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
5122
5543
  readonly "onForm-error"?: ((e: any) => any) | undefined;
5123
5544
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -5131,7 +5552,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5131
5552
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
5132
5553
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
5133
5554
  $host: Element | null;
5134
- $emit: ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined) => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
5555
+ $emit: ((event: "submit", values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => void) & ((event: "mounted", internalInstance: any) => void) & ((event: "unmounted") => void) & ((event: "submit-error", e: any) => void) & ((event: "form-error", e: any) => void);
5135
5556
  $el: any;
5136
5557
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
5137
5558
  config: import("@tmagic/form-schema").FormConfig;
@@ -5139,12 +5560,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5139
5560
  disabledShowSrc?: boolean;
5140
5561
  labelWidth?: string;
5141
5562
  codeValueKey?: string;
5142
- labelPosition?: string;
5143
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5563
+ labelPosition?: "top" | "left" | "right";
5144
5564
  }> & Readonly<{
5565
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
5145
5566
  onMounted?: ((internalInstance: any) => any) | undefined;
5146
5567
  onUnmounted?: (() => any) | undefined;
5147
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
5148
5568
  "onSubmit-error"?: ((e: any) => any) | undefined;
5149
5569
  "onForm-error"?: ((e: any) => any) | undefined;
5150
5570
  }>, {
@@ -5158,16 +5578,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5158
5578
  readonly isCompare?: boolean | undefined;
5159
5579
  readonly parentValues?: Record<string, any> | undefined;
5160
5580
  readonly labelWidth?: string | undefined;
5581
+ readonly typeMatchValid?: boolean | undefined;
5582
+ readonly validateOnInit?: boolean | undefined;
5161
5583
  readonly disabled?: boolean | undefined;
5162
5584
  readonly height?: string | undefined;
5163
5585
  readonly stepActive?: string | number | undefined;
5164
5586
  readonly size?: "small" | "default" | "large" | undefined;
5165
5587
  readonly inline?: boolean | undefined;
5166
- readonly labelPosition?: string | undefined;
5588
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
5167
5589
  readonly keyProp?: string | undefined;
5168
5590
  readonly popperClass?: string | undefined;
5169
5591
  readonly preventSubmitDefault?: boolean | undefined;
5170
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5592
+ readonly useFieldTextInError?: boolean | undefined;
5593
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
5171
5594
  readonly showDiff?: ((_data: {
5172
5595
  curValue: any;
5173
5596
  lastValue: any;
@@ -5200,16 +5623,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5200
5623
  isCompare?: boolean;
5201
5624
  parentValues?: Record<string, any>;
5202
5625
  labelWidth?: string;
5626
+ typeMatchValid?: boolean;
5627
+ validateOnInit?: boolean;
5203
5628
  disabled?: boolean;
5204
5629
  height?: string;
5205
5630
  stepActive?: string | number;
5206
5631
  size?: "small" | "default" | "large";
5207
5632
  inline?: boolean;
5208
- labelPosition?: string;
5633
+ labelPosition?: "top" | "left" | "right";
5209
5634
  keyProp?: string;
5210
5635
  popperClass?: string;
5211
5636
  preventSubmitDefault?: boolean;
5212
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5637
+ useFieldTextInError?: boolean;
5638
+ context?: import("@tmagic/form-schema").FormContext;
5213
5639
  showDiff?: (_data: {
5214
5640
  curValue: any;
5215
5641
  lastValue: any;
@@ -5226,12 +5652,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5226
5652
  }>, {
5227
5653
  values: import("@vue/reactivity").Ref<FormValue, FormValue>;
5228
5654
  lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
5229
- formState: FormState;
5655
+ formState: import("@tmagic/form-schema").FormState;
5230
5656
  initialized: import("@vue/reactivity").Ref<boolean, boolean>;
5231
5657
  changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
5232
5658
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5233
5659
  resetForm: () => void;
5234
5660
  submitForm: (native?: boolean) => Promise<any>;
5661
+ validate: () => Promise<string>;
5235
5662
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5236
5663
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5237
5664
  error: (...args: any[]) => void;
@@ -5243,7 +5670,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5243
5670
  disabled: boolean;
5244
5671
  labelWidth: string;
5245
5672
  inline: boolean;
5246
- labelPosition: string;
5673
+ labelPosition: "top" | "left" | "right";
5247
5674
  config: import("@tmagic/form-schema").FormConfig;
5248
5675
  height: string;
5249
5676
  initValues: Record<string, any>;
@@ -5251,7 +5678,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5251
5678
  isCompare: boolean;
5252
5679
  keyProp: string;
5253
5680
  parentValues: Record<string, any>;
5681
+ useFieldTextInError: boolean;
5254
5682
  stepActive: string | number;
5683
+ validateOnInit: boolean;
5255
5684
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
5256
5685
  beforeCreate?: (() => void) | (() => void)[];
5257
5686
  created?: (() => void) | (() => void)[];
@@ -5276,7 +5705,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5276
5705
  disabled: boolean;
5277
5706
  labelWidth: string;
5278
5707
  inline: boolean;
5279
- labelPosition: string;
5708
+ labelPosition: "top" | "left" | "right";
5280
5709
  config: import("@tmagic/form-schema").FormConfig;
5281
5710
  height: string;
5282
5711
  initValues: Record<string, any>;
@@ -5284,7 +5713,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5284
5713
  isCompare: boolean;
5285
5714
  keyProp: string;
5286
5715
  parentValues: Record<string, any>;
5716
+ useFieldTextInError: boolean;
5287
5717
  stepActive: string | number;
5718
+ validateOnInit: boolean;
5288
5719
  }> & Omit<Readonly<{
5289
5720
  config: import("@tmagic/form-schema").FormConfig;
5290
5721
  initValues: Record<string, any>;
@@ -5292,16 +5723,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5292
5723
  isCompare?: boolean;
5293
5724
  parentValues?: Record<string, any>;
5294
5725
  labelWidth?: string;
5726
+ typeMatchValid?: boolean;
5727
+ validateOnInit?: boolean;
5295
5728
  disabled?: boolean;
5296
5729
  height?: string;
5297
5730
  stepActive?: string | number;
5298
5731
  size?: "small" | "default" | "large";
5299
5732
  inline?: boolean;
5300
- labelPosition?: string;
5733
+ labelPosition?: "top" | "left" | "right";
5301
5734
  keyProp?: string;
5302
5735
  popperClass?: string;
5303
5736
  preventSubmitDefault?: boolean;
5304
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5737
+ useFieldTextInError?: boolean;
5738
+ context?: import("@tmagic/form-schema").FormContext;
5305
5739
  showDiff?: (_data: {
5306
5740
  curValue: any;
5307
5741
  lastValue: any;
@@ -5315,24 +5749,25 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5315
5749
  "onField-input"?: ((...args: any[]) => any) | undefined;
5316
5750
  "onField-change"?: ((...args: any[]) => any) | undefined;
5317
5751
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
5318
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5752
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
5319
5753
  values: FormValue;
5320
5754
  lastValuesProcessed: FormValue;
5321
- formState: FormState;
5755
+ formState: import("@tmagic/form-schema").FormState;
5322
5756
  initialized: boolean;
5323
5757
  changeRecords: ChangeRecord$1[];
5324
5758
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5325
5759
  resetForm: () => void;
5326
5760
  submitForm: (native?: boolean) => Promise<any>;
5761
+ validate: () => Promise<string>;
5327
5762
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5328
5763
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
5329
5764
  $slots: FormSlots;
5330
5765
  }) | null>>;
5331
5766
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
5332
5767
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5768
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
5333
5769
  mounted: (internalInstance: any) => any;
5334
5770
  unmounted: () => any;
5335
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
5336
5771
  "submit-error": (e: any) => any;
5337
5772
  "form-error": (e: any) => any;
5338
5773
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -5361,12 +5796,11 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5361
5796
  disabledShowSrc?: boolean;
5362
5797
  labelWidth?: string;
5363
5798
  codeValueKey?: string;
5364
- labelPosition?: string;
5365
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5799
+ labelPosition?: "top" | "left" | "right";
5366
5800
  }> & Readonly<{
5801
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
5367
5802
  onMounted?: ((internalInstance: any) => any) | undefined;
5368
5803
  onUnmounted?: (() => any) | undefined;
5369
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
5370
5804
  "onSubmit-error"?: ((e: any) => any) | undefined;
5371
5805
  "onForm-error"?: ((e: any) => any) | undefined;
5372
5806
  }>, "submit" | "configForm"> & {
@@ -5380,16 +5814,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5380
5814
  readonly isCompare?: boolean | undefined;
5381
5815
  readonly parentValues?: Record<string, any> | undefined;
5382
5816
  readonly labelWidth?: string | undefined;
5817
+ readonly typeMatchValid?: boolean | undefined;
5818
+ readonly validateOnInit?: boolean | undefined;
5383
5819
  readonly disabled?: boolean | undefined;
5384
5820
  readonly height?: string | undefined;
5385
5821
  readonly stepActive?: string | number | undefined;
5386
5822
  readonly size?: "small" | "default" | "large" | undefined;
5387
5823
  readonly inline?: boolean | undefined;
5388
- readonly labelPosition?: string | undefined;
5824
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
5389
5825
  readonly keyProp?: string | undefined;
5390
5826
  readonly popperClass?: string | undefined;
5391
5827
  readonly preventSubmitDefault?: boolean | undefined;
5392
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5828
+ readonly useFieldTextInError?: boolean | undefined;
5829
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
5393
5830
  readonly showDiff?: ((_data: {
5394
5831
  curValue: any;
5395
5832
  lastValue: any;
@@ -5422,16 +5859,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5422
5859
  isCompare?: boolean;
5423
5860
  parentValues?: Record<string, any>;
5424
5861
  labelWidth?: string;
5862
+ typeMatchValid?: boolean;
5863
+ validateOnInit?: boolean;
5425
5864
  disabled?: boolean;
5426
5865
  height?: string;
5427
5866
  stepActive?: string | number;
5428
5867
  size?: "small" | "default" | "large";
5429
5868
  inline?: boolean;
5430
- labelPosition?: string;
5869
+ labelPosition?: "top" | "left" | "right";
5431
5870
  keyProp?: string;
5432
5871
  popperClass?: string;
5433
5872
  preventSubmitDefault?: boolean;
5434
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5873
+ useFieldTextInError?: boolean;
5874
+ context?: import("@tmagic/form-schema").FormContext;
5435
5875
  showDiff?: (_data: {
5436
5876
  curValue: any;
5437
5877
  lastValue: any;
@@ -5448,12 +5888,13 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5448
5888
  }>, {
5449
5889
  values: import("@vue/reactivity").Ref<FormValue, FormValue>;
5450
5890
  lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
5451
- formState: FormState;
5891
+ formState: import("@tmagic/form-schema").FormState;
5452
5892
  initialized: import("@vue/reactivity").Ref<boolean, boolean>;
5453
5893
  changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
5454
5894
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5455
5895
  resetForm: () => void;
5456
5896
  submitForm: (native?: boolean) => Promise<any>;
5897
+ validate: () => Promise<string>;
5457
5898
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5458
5899
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5459
5900
  error: (...args: any[]) => void;
@@ -5465,7 +5906,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5465
5906
  disabled: boolean;
5466
5907
  labelWidth: string;
5467
5908
  inline: boolean;
5468
- labelPosition: string;
5909
+ labelPosition: "top" | "left" | "right";
5469
5910
  config: import("@tmagic/form-schema").FormConfig;
5470
5911
  height: string;
5471
5912
  initValues: Record<string, any>;
@@ -5473,7 +5914,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5473
5914
  isCompare: boolean;
5474
5915
  keyProp: string;
5475
5916
  parentValues: Record<string, any>;
5917
+ useFieldTextInError: boolean;
5476
5918
  stepActive: string | number;
5919
+ validateOnInit: boolean;
5477
5920
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
5478
5921
  beforeCreate?: (() => void) | (() => void)[];
5479
5922
  created?: (() => void) | (() => void)[];
@@ -5498,7 +5941,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5498
5941
  disabled: boolean;
5499
5942
  labelWidth: string;
5500
5943
  inline: boolean;
5501
- labelPosition: string;
5944
+ labelPosition: "top" | "left" | "right";
5502
5945
  config: import("@tmagic/form-schema").FormConfig;
5503
5946
  height: string;
5504
5947
  initValues: Record<string, any>;
@@ -5506,7 +5949,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5506
5949
  isCompare: boolean;
5507
5950
  keyProp: string;
5508
5951
  parentValues: Record<string, any>;
5952
+ useFieldTextInError: boolean;
5509
5953
  stepActive: string | number;
5954
+ validateOnInit: boolean;
5510
5955
  }> & Omit<Readonly<{
5511
5956
  config: import("@tmagic/form-schema").FormConfig;
5512
5957
  initValues: Record<string, any>;
@@ -5514,16 +5959,19 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5514
5959
  isCompare?: boolean;
5515
5960
  parentValues?: Record<string, any>;
5516
5961
  labelWidth?: string;
5962
+ typeMatchValid?: boolean;
5963
+ validateOnInit?: boolean;
5517
5964
  disabled?: boolean;
5518
5965
  height?: string;
5519
5966
  stepActive?: string | number;
5520
5967
  size?: "small" | "default" | "large";
5521
5968
  inline?: boolean;
5522
- labelPosition?: string;
5969
+ labelPosition?: "top" | "left" | "right";
5523
5970
  keyProp?: string;
5524
5971
  popperClass?: string;
5525
5972
  preventSubmitDefault?: boolean;
5526
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5973
+ useFieldTextInError?: boolean;
5974
+ context?: import("@tmagic/form-schema").FormContext;
5527
5975
  showDiff?: (_data: {
5528
5976
  curValue: any;
5529
5977
  lastValue: any;
@@ -5537,15 +5985,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5537
5985
  "onField-input"?: ((...args: any[]) => any) | undefined;
5538
5986
  "onField-change"?: ((...args: any[]) => any) | undefined;
5539
5987
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
5540
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5988
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
5541
5989
  values: FormValue;
5542
5990
  lastValuesProcessed: FormValue;
5543
- formState: FormState;
5991
+ formState: import("@tmagic/form-schema").FormState;
5544
5992
  initialized: boolean;
5545
5993
  changeRecords: ChangeRecord$1[];
5546
5994
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5547
5995
  resetForm: () => void;
5548
5996
  submitForm: (native?: boolean) => Promise<any>;
5997
+ validate: () => Promise<string>;
5549
5998
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
5550
5999
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
5551
6000
  $slots: FormSlots;
@@ -5560,8 +6009,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5560
6009
  "onSubmit-error"?: ((e: any) => any) | undefined;
5561
6010
  "onForm-error"?: ((e: any) => any) | undefined;
5562
6011
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5563
- declare const __VLS_export$18: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
5564
- declare const _default$30: typeof __VLS_export$18;
6012
+ declare const __VLS_export$19: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
6013
+ declare const _default$31: typeof __VLS_export$19;
5565
6014
  type __VLS_WithSlots$7<T, S> = T & {
5566
6015
  new (): {
5567
6016
  $slots: S;
@@ -5572,16 +6021,15 @@ type __VLS_WithSlots$7<T, S> = T & {
5572
6021
  type __VLS_Slots$6 = {
5573
6022
  'props-form-panel-header'(_props: {}): any;
5574
6023
  };
5575
- type __VLS_Props$14 = {
6024
+ type __VLS_Props$15 = {
5576
6025
  config: FormConfig;
5577
6026
  values: FormValue;
5578
6027
  disabledShowSrc?: boolean;
5579
6028
  labelWidth?: string;
5580
6029
  codeValueKey?: string;
5581
- labelPosition?: string;
5582
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
6030
+ labelPosition?: 'top' | 'left' | 'right';
5583
6031
  };
5584
- declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
6032
+ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
5585
6033
  configForm: Readonly<import("@vue/reactivity").ShallowRef<({
5586
6034
  $: import("@vue/runtime-core").ComponentInternalInstance;
5587
6035
  $data: {};
@@ -5592,16 +6040,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5592
6040
  readonly isCompare?: boolean | undefined;
5593
6041
  readonly parentValues?: Record<string, any> | undefined;
5594
6042
  readonly labelWidth?: string | undefined;
6043
+ readonly typeMatchValid?: boolean | undefined;
6044
+ readonly validateOnInit?: boolean | undefined;
5595
6045
  readonly disabled?: boolean | undefined;
5596
6046
  readonly height?: string | undefined;
5597
6047
  readonly stepActive?: string | number | undefined;
5598
6048
  readonly size?: "small" | "default" | "large" | undefined;
5599
6049
  readonly inline?: boolean | undefined;
5600
- readonly labelPosition?: string | undefined;
6050
+ readonly labelPosition?: "top" | "left" | "right" | undefined;
5601
6051
  readonly keyProp?: string | undefined;
5602
6052
  readonly popperClass?: string | undefined;
5603
6053
  readonly preventSubmitDefault?: boolean | undefined;
5604
- readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
6054
+ readonly useFieldTextInError?: boolean | undefined;
6055
+ readonly context?: import("@tmagic/form-schema").FormContext | undefined;
5605
6056
  readonly showDiff?: ((_data: {
5606
6057
  curValue: any;
5607
6058
  lastValue: any;
@@ -5634,16 +6085,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5634
6085
  isCompare?: boolean;
5635
6086
  parentValues?: Record<string, any>;
5636
6087
  labelWidth?: string;
6088
+ typeMatchValid?: boolean;
6089
+ validateOnInit?: boolean;
5637
6090
  disabled?: boolean;
5638
6091
  height?: string;
5639
6092
  stepActive?: string | number;
5640
6093
  size?: "small" | "default" | "large";
5641
6094
  inline?: boolean;
5642
- labelPosition?: string;
6095
+ labelPosition?: "top" | "left" | "right";
5643
6096
  keyProp?: string;
5644
6097
  popperClass?: string;
5645
6098
  preventSubmitDefault?: boolean;
5646
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
6099
+ useFieldTextInError?: boolean;
6100
+ context?: import("@tmagic/form-schema").FormContext;
5647
6101
  showDiff?: (_data: {
5648
6102
  curValue: any;
5649
6103
  lastValue: any;
@@ -5660,12 +6114,13 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5660
6114
  }>, {
5661
6115
  values: import("@vue/reactivity").Ref<FormValue, FormValue>;
5662
6116
  lastValuesProcessed: import("@vue/reactivity").Ref<FormValue, FormValue>;
5663
- formState: FormState;
6117
+ formState: import("@tmagic/form-schema").FormState;
5664
6118
  initialized: import("@vue/reactivity").Ref<boolean, boolean>;
5665
6119
  changeRecords: import("@vue/reactivity").ShallowRef<ChangeRecord$1[], ChangeRecord$1[]>;
5666
6120
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5667
6121
  resetForm: () => void;
5668
6122
  submitForm: (native?: boolean) => Promise<any>;
6123
+ validate: () => Promise<string>;
5669
6124
  getTextByName: (name: string, config?: FormConfig) => string | undefined;
5670
6125
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5671
6126
  error: (...args: any[]) => void;
@@ -5677,7 +6132,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5677
6132
  disabled: boolean;
5678
6133
  labelWidth: string;
5679
6134
  inline: boolean;
5680
- labelPosition: string;
6135
+ labelPosition: "top" | "left" | "right";
5681
6136
  config: FormConfig;
5682
6137
  height: string;
5683
6138
  initValues: Record<string, any>;
@@ -5685,7 +6140,9 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5685
6140
  isCompare: boolean;
5686
6141
  keyProp: string;
5687
6142
  parentValues: Record<string, any>;
6143
+ useFieldTextInError: boolean;
5688
6144
  stepActive: string | number;
6145
+ validateOnInit: boolean;
5689
6146
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
5690
6147
  beforeCreate?: (() => void) | (() => void)[];
5691
6148
  created?: (() => void) | (() => void)[];
@@ -5710,7 +6167,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5710
6167
  disabled: boolean;
5711
6168
  labelWidth: string;
5712
6169
  inline: boolean;
5713
- labelPosition: string;
6170
+ labelPosition: "top" | "left" | "right";
5714
6171
  config: FormConfig;
5715
6172
  height: string;
5716
6173
  initValues: Record<string, any>;
@@ -5718,7 +6175,9 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5718
6175
  isCompare: boolean;
5719
6176
  keyProp: string;
5720
6177
  parentValues: Record<string, any>;
6178
+ useFieldTextInError: boolean;
5721
6179
  stepActive: string | number;
6180
+ validateOnInit: boolean;
5722
6181
  }> & Omit<Readonly<{
5723
6182
  config: FormConfig;
5724
6183
  initValues: Record<string, any>;
@@ -5726,16 +6185,19 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5726
6185
  isCompare?: boolean;
5727
6186
  parentValues?: Record<string, any>;
5728
6187
  labelWidth?: string;
6188
+ typeMatchValid?: boolean;
6189
+ validateOnInit?: boolean;
5729
6190
  disabled?: boolean;
5730
6191
  height?: string;
5731
6192
  stepActive?: string | number;
5732
6193
  size?: "small" | "default" | "large";
5733
6194
  inline?: boolean;
5734
- labelPosition?: string;
6195
+ labelPosition?: "top" | "left" | "right";
5735
6196
  keyProp?: string;
5736
6197
  popperClass?: string;
5737
6198
  preventSubmitDefault?: boolean;
5738
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
6199
+ useFieldTextInError?: boolean;
6200
+ context?: import("@tmagic/form-schema").FormContext;
5739
6201
  showDiff?: (_data: {
5740
6202
  curValue: any;
5741
6203
  lastValue: any;
@@ -5749,35 +6211,36 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5749
6211
  "onField-input"?: ((...args: any[]) => any) | undefined;
5750
6212
  "onField-change"?: ((...args: any[]) => any) | undefined;
5751
6213
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
5752
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
6214
+ }>, "values" | "changeHandler" | "validate" | "lastValuesProcessed" | "submitForm" | "changeRecords" | "initialized" | "formState" | "resetForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "useFieldTextInError" | "stepActive" | "validateOnInit")> & {
5753
6215
  values: FormValue;
5754
6216
  lastValuesProcessed: FormValue;
5755
- formState: FormState;
6217
+ formState: import("@tmagic/form-schema").FormState;
5756
6218
  initialized: boolean;
5757
6219
  changeRecords: ChangeRecord$1[];
5758
6220
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5759
6221
  resetForm: () => void;
5760
6222
  submitForm: (native?: boolean) => Promise<any>;
6223
+ validate: () => Promise<string>;
5761
6224
  getTextByName: (name: string, config?: FormConfig) => string | undefined;
5762
6225
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
5763
6226
  $slots: FormSlots;
5764
6227
  }) | null>>;
5765
6228
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
5766
6229
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
6230
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
5767
6231
  mounted: (internalInstance: any) => any;
5768
6232
  unmounted: () => any;
5769
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
5770
6233
  "submit-error": (e: any) => any;
5771
6234
  "form-error": (e: any) => any;
5772
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{
6235
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
6236
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
5773
6237
  onMounted?: ((internalInstance: any) => any) | undefined;
5774
6238
  onUnmounted?: (() => any) | undefined;
5775
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
5776
6239
  "onSubmit-error"?: ((e: any) => any) | undefined;
5777
6240
  "onForm-error"?: ((e: any) => any) | undefined;
5778
6241
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5779
- declare const __VLS_export$17: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
5780
- declare const _default$29: typeof __VLS_export$17;
6242
+ declare const __VLS_export$18: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
6243
+ declare const _default$30: typeof __VLS_export$18;
5781
6244
  type __VLS_WithSlots$6<T, S> = T & {
5782
6245
  new (): {
5783
6246
  $slots: S;
@@ -5785,20 +6248,20 @@ type __VLS_WithSlots$6<T, S> = T & {
5785
6248
  };
5786
6249
  //#endregion
5787
6250
  //#region temp/packages/editor/src/components/ToolButton.vue.d.ts
5788
- type __VLS_Props$13 = {
6251
+ type __VLS_Props$14 = {
5789
6252
  data?: MenuButton | MenuComponent;
5790
6253
  eventType?: 'mousedown' | 'mouseup' | 'click';
5791
6254
  };
5792
- declare const __VLS_export$16: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
6255
+ declare const __VLS_export$17: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
5793
6256
  getElRef: () => Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5794
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{}>, {
6257
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{}>, {
5795
6258
  data: MenuButton | MenuComponent;
5796
6259
  eventType: "mousedown" | "mouseup" | "click";
5797
6260
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5798
- declare const _default$35: typeof __VLS_export$16;
6261
+ declare const _default$36: typeof __VLS_export$17;
5799
6262
  //#endregion
5800
6263
  //#region temp/packages/editor/src/components/ContentMenu.vue.d.ts
5801
- type __VLS_Props$12 = {
6264
+ type __VLS_Props$13 = {
5802
6265
  menuData?: (MenuButton | MenuComponent)[];
5803
6266
  isSubMenu?: boolean;
5804
6267
  active?: string | number;
@@ -5808,7 +6271,7 @@ declare var __VLS_7$1: {};
5808
6271
  type __VLS_Slots$5 = {} & {
5809
6272
  title?: (props: typeof __VLS_7$1) => any;
5810
6273
  };
5811
- declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$12, {
6274
+ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
5812
6275
  menu: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5813
6276
  menuPosition: Ref<{
5814
6277
  left: number;
@@ -5834,7 +6297,7 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5834
6297
  mouseenter: () => any;
5835
6298
  show: () => any;
5836
6299
  hide: () => any;
5837
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$12> & Readonly<{
6300
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{
5838
6301
  onMouseenter?: (() => any) | undefined;
5839
6302
  onShow?: (() => any) | undefined;
5840
6303
  onHide?: (() => any) | undefined;
@@ -5843,8 +6306,8 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5843
6306
  isSubMenu: boolean;
5844
6307
  autoHide: boolean;
5845
6308
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5846
- declare const __VLS_export$15: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
5847
- declare const _default$8: typeof __VLS_export$15;
6309
+ declare const __VLS_export$16: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
6310
+ declare const _default$8: typeof __VLS_export$16;
5848
6311
  type __VLS_WithSlots$5<T, S> = T & {
5849
6312
  new (): {
5850
6313
  $slots: S;
@@ -5852,14 +6315,14 @@ type __VLS_WithSlots$5<T, S> = T & {
5852
6315
  };
5853
6316
  //#endregion
5854
6317
  //#region temp/packages/editor/src/components/Icon.vue.d.ts
5855
- type __VLS_Props$11 = {
6318
+ type __VLS_Props$12 = {
5856
6319
  icon?: any;
5857
6320
  };
5858
- declare const __VLS_export$14: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5859
- declare const _default$24: typeof __VLS_export$14;
6321
+ declare const __VLS_export$15: import("@vue/runtime-core").DefineComponent<__VLS_Props$12, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$12> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6322
+ declare const _default$24: typeof __VLS_export$15;
5860
6323
  //#endregion
5861
6324
  //#region temp/packages/editor/src/components/SplitView.vue.d.ts
5862
- type __VLS_Props$10 = {
6325
+ type __VLS_Props$11 = {
5863
6326
  width?: number;
5864
6327
  left?: number;
5865
6328
  right?: number;
@@ -5878,13 +6341,13 @@ type __VLS_Slots$4 = {} & {
5878
6341
  } & {
5879
6342
  right?: (props: typeof __VLS_19) => any;
5880
6343
  };
5881
- declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$10, {
6344
+ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {
5882
6345
  updateWidth(): void;
5883
6346
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5884
6347
  change: (...args: any[]) => void;
5885
6348
  "update:left": (...args: any[]) => void;
5886
6349
  "update:right": (...args: any[]) => void;
5887
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$10> & Readonly<{
6350
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
5888
6351
  onChange?: ((...args: any[]) => any) | undefined;
5889
6352
  "onUpdate:left"?: ((...args: any[]) => any) | undefined;
5890
6353
  "onUpdate:right"?: ((...args: any[]) => any) | undefined;
@@ -5893,8 +6356,8 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5893
6356
  minRight: number;
5894
6357
  minCenter: number;
5895
6358
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5896
- declare const __VLS_export$13: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
5897
- declare const _default$27: typeof __VLS_export$13;
6359
+ declare const __VLS_export$14: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
6360
+ declare const _default$28: typeof __VLS_export$14;
5898
6361
  type __VLS_WithSlots$4<T, S> = T & {
5899
6362
  new (): {
5900
6363
  $slots: S;
@@ -5911,8 +6374,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<{}, {},
5911
6374
  }, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
5912
6375
  onChange?: ((e: OnDrag$1<import("gesto").default>) => any) | undefined;
5913
6376
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
5914
- declare const __VLS_export$12: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
5915
- declare const _default$31: typeof __VLS_export$12;
6377
+ declare const __VLS_export$13: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
6378
+ declare const _default$32: typeof __VLS_export$13;
5916
6379
  type __VLS_WithSlots$3<T, S> = T & {
5917
6380
  new (): {
5918
6381
  $slots: S;
@@ -5920,7 +6383,7 @@ type __VLS_WithSlots$3<T, S> = T & {
5920
6383
  };
5921
6384
  //#endregion
5922
6385
  //#region temp/packages/editor/src/components/CodeBlockEditor.vue.d.ts
5923
- type __VLS_Props$9 = {
6386
+ type __VLS_Props$10 = {
5924
6387
  content: Omit<CodeBlockContent, 'content'> & {
5925
6388
  content: string;
5926
6389
  };
@@ -5932,8 +6395,8 @@ type __VLS_ModelProps$1 = {
5932
6395
  'width'?: number;
5933
6396
  'visible'?: boolean;
5934
6397
  };
5935
- type __VLS_PublicProps$1 = __VLS_Props$9 & __VLS_ModelProps$1;
5936
- declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
6398
+ type __VLS_PublicProps$1 = __VLS_Props$10 & __VLS_ModelProps$1;
6399
+ declare const __VLS_export$12: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
5937
6400
  show(): Promise<void>;
5938
6401
  hide(): Promise<void>;
5939
6402
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -5949,52 +6412,40 @@ declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS
5949
6412
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
5950
6413
  "onUpdate:width"?: ((value: number) => any) | undefined;
5951
6414
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5952
- declare const _default: typeof __VLS_export$11;
6415
+ declare const _default: typeof __VLS_export$12;
5953
6416
  //#endregion
5954
6417
  //#region temp/packages/editor/src/components/CompareForm.vue.d.ts
5955
- type __VLS_Props$8 = {
5956
- /** 当前值(修改后的值) */value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>; /** 用于对比的旧值(修改前的值) */
5957
- lastValue?: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
5958
- /**
5959
- * 类型说明:
5960
- * - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
5961
- * - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
5962
- * - `category` `code-block` 时,`type` 可不传
5963
- */
5964
- type?: string; /** 表单配置类别,决定从哪里取 FormConfig */
5965
- category?: CompareCategory; /** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
5966
- dataSourceType?: string;
5967
- labelWidth?: string;
5968
- /**
5969
- * 外层容器高度。设置后表单内容超出时会在 CompareForm 内部出现滚动条,
5970
- * 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
5971
- */
5972
- height?: string;
5973
- /**
5974
- * 用户自定义注入到 MForm.formState 的扩展字段,与 Editor 顶层的 `extendFormState`、
5975
- * PropsPanel 的 `extend-state` 语义一致。表单 item 的 `display` / `disabled` 等
5976
- * filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
5977
- * 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
5978
- */
5979
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5980
- /**
5981
- * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
5982
- * 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
5983
- * `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。返回的 config 直接用于对比展示。
5984
- */
5985
- loadConfig?: CompareFormLoadConfig; /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
5986
- services: Services;
6418
+ type __VLS_Props$9 = CompareFormBaseProps & {
6419
+ /** 用于对比的旧值(修改前的值) */
6420
+ lastValue?: CompareFormBaseProps['value'];
6421
+ /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
6422
+ selfDiffFieldTypes?: string[];
6423
+ };
6424
+ declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
6425
+ form: ShallowRef<InstanceType<typeof MForm> | null>;
6426
+ config: Ref<FormConfig>;
6427
+ reload: () => Promise<void>;
6428
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
6429
+ labelWidth: string;
6430
+ category: CompareCategory;
6431
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6432
+ declare const _default$5: typeof __VLS_export$11;
6433
+ //#endregion
6434
+ //#region temp/packages/editor/src/components/ViewForm.vue.d.ts
6435
+ type __VLS_Props$8 = CompareFormBaseProps & {
6436
+ /** 是否禁用表单(默认只读展示)。 */
6437
+ disabled?: boolean;
5987
6438
  };
5988
6439
  declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
5989
6440
  form: ShallowRef<InstanceType<typeof MForm> | null>;
5990
6441
  config: Ref<FormConfig>;
5991
6442
  reload: () => Promise<void>;
5992
6443
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
6444
+ disabled: boolean;
5993
6445
  labelWidth: string;
5994
- services: Services;
5995
6446
  category: CompareCategory;
5996
6447
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5997
- declare const _default$5: typeof __VLS_export$10;
6448
+ declare const _default$39: typeof __VLS_export$10;
5998
6449
  //#endregion
5999
6450
  //#region temp/packages/editor/src/layouts/history-list/composables.d.ts
6000
6451
  /**
@@ -6020,7 +6471,7 @@ interface HistoryBucketGroup<T extends BaseStepValue = BaseStepValue> {
6020
6471
  * 通用二次确认弹窗:清空历史 / 无法差异对比的回滚等会改变状态的操作,先弹出确认框,
6021
6472
  * 用户点击「确定」返回 true,取消(confirm reject)时返回 false 并静默忽略。
6022
6473
  */
6023
- declare const confirmHistoryAction: (message: string) => Promise<boolean>;
6474
+ export declare const confirmHistoryAction: (message: string) => Promise<boolean>;
6024
6475
  //#endregion
6025
6476
  //#region temp/packages/editor/src/layouts/history-list/Bucket.vue.d.ts
6026
6477
  declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -6029,9 +6480,12 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6029
6480
  * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
6030
6481
  * 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
6031
6482
  */
6032
- config: HistoryBucketConfig<T>; /** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
6033
- bucketId: string | number; /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
6034
- groups: HistoryBucketGroup<T>[]; /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
6483
+ config: HistoryBucketConfig<T>;
6484
+ /** 当前 bucket 对应的目标 id(dataSource.id codeBlock.id),同时用于组装子项的 key。 */
6485
+ bucketId: string | number;
6486
+ /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
6487
+ groups: HistoryBucketGroup<T>[];
6488
+ /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
6035
6489
  expanded: Record<string, boolean>;
6036
6490
  } & {
6037
6491
  onToggle?: ((_key: string) => any) | undefined;
@@ -6053,16 +6507,16 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6053
6507
  (_e: "revert-step", _bucketId: string | number, _index: number): void;
6054
6508
  };
6055
6509
  }>) => import("vue").VNode & {
6056
- __ctx?: Awaited<typeof __VLS_setup>;
6510
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6057
6511
  };
6058
6512
  declare const _default$22: typeof __VLS_export$9;
6059
- type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6513
+ type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
6060
6514
  //#endregion
6061
6515
  //#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
6062
6516
  declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6063
6517
  props: import("vue").PublicProps & __VLS_PrettifyLocal<{
6064
6518
  /**
6065
- * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled),
6519
+ * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled / showClear),
6066
6520
  * 由父组件按业务类型注入并整体透传给 Bucket,避免逐项透传多个 props。
6067
6521
  */
6068
6522
  config: HistoryBucketConfig<T>;
@@ -6102,26 +6556,23 @@ declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6102
6556
  (_e: "clear"): void;
6103
6557
  };
6104
6558
  }>) => import("vue").VNode & {
6105
- __ctx?: Awaited<typeof __VLS_setup>;
6559
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6106
6560
  };
6107
6561
  declare const _default$23: typeof __VLS_export$8;
6108
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6562
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
6109
6563
  //#endregion
6110
6564
  //#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
6111
6565
  type __VLS_Props$7 = {
6112
- /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */services: Services;
6113
- /**
6114
- * 来自 Editor 顶层的 `extendFormState`,用于扩展 MForm.formState。
6115
- * 透传给 CompareForm,从而让差异对比时表单 item 中依赖业务上下文的
6116
- * `display` / `disabled` 等 filterFunction 正常工作。
6117
- */
6118
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
6566
+ /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
6567
+ services?: Services;
6119
6568
  /**
6120
6569
  * 自定义 FormConfig 加载逻辑,透传给 CompareForm。传入后将接管内置的按 `category`
6121
6570
  * 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
6122
6571
  */
6123
6572
  loadConfig?: CompareFormLoadConfig;
6124
6573
  width?: string;
6574
+ /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
6575
+ size?: FieldSize;
6125
6576
  isConfirm?: boolean;
6126
6577
  onConfirm?: () => void;
6127
6578
  selfDiffFieldTypes?: string[];
@@ -6136,7 +6587,6 @@ declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_
6136
6587
  onClose?: ((...args: any[]) => any) | undefined;
6137
6588
  }>, {
6138
6589
  width: string;
6139
- services: Services;
6140
6590
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6141
6591
  declare const _default$21: typeof __VLS_export$7;
6142
6592
  //#endregion
@@ -6164,15 +6614,15 @@ declare const _default$21: typeof __VLS_export$7;
6164
6614
  * ```ts
6165
6615
  * import { useHistoryRevert } from '@tmagic/editor';
6166
6616
  *
6167
- * const { onPageRevert, onPageDiff } = useHistoryRevert(editorRef.value); // editorRef.value 即 Editor 暴露的 services
6617
+ * const { onPageRevert, onPageDiff } = useHistoryRevert({}, editorRef.value); // editorRef.value 即 Editor 暴露的 services
6168
6618
  * await onPageRevert(index); // 弹出差异 / 二次确认弹窗后回滚
6169
6619
  * onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
6170
6620
  * ```
6171
6621
  */
6172
- declare const useHistoryRevert: (services: Pick<Services, "editorService" | "dataSourceService" | "codeBlockService" | "historyService">, options?: UseHistoryRevertOptions) => {
6173
- onPageRevert: (index: number) => Promise<StepValue | null>;
6174
- onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null>;
6175
- onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null>;
6622
+ export declare const useHistoryRevert: (options?: UseHistoryRevertOptions, services?: Services) => {
6623
+ onPageRevert: (index: number) => Promise<StepValue | null | undefined>;
6624
+ onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null | undefined>;
6625
+ onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null | undefined>;
6176
6626
  onPageDiff: (index: number) => Promise<void> | void;
6177
6627
  onDataSourceDiff: (id: string | number, index: number) => Promise<void> | void;
6178
6628
  onCodeBlockDiff: (id: string | number, index: number) => Promise<void> | void;
@@ -6194,6 +6644,11 @@ interface Position {
6194
6644
  type __VLS_Props$6 = {
6195
6645
  position?: Position;
6196
6646
  title?: string;
6647
+ bodyStyle?: CSSProperties;
6648
+ /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
6649
+ initialStyle?: CSSProperties;
6650
+ /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
6651
+ frameworkWidth?: number;
6197
6652
  beforeClose?: (_done: (_cancel?: boolean) => void) => void;
6198
6653
  };
6199
6654
  type __VLS_ModelProps = {
@@ -6223,6 +6678,8 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
6223
6678
  }>, {
6224
6679
  title: string;
6225
6680
  position: Position;
6681
+ initialStyle: CSSProperties;
6682
+ frameworkWidth: number;
6226
6683
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6227
6684
  declare const __VLS_export$6: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
6228
6685
  declare const _default$20: typeof __VLS_export$6;
@@ -6249,7 +6706,8 @@ type __VLS_Props$5 = {
6249
6706
  nodeStatusMap: Map<Id, LayerNodeStatus>;
6250
6707
  indent?: number;
6251
6708
  nextLevelIndentIncrement?: number;
6252
- emptyText?: string; /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6709
+ emptyText?: string;
6710
+ /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6253
6711
  isExpandable?: IsExpandableFunction;
6254
6712
  };
6255
6713
  declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Props$5, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -6275,7 +6733,7 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
6275
6733
  indent: number;
6276
6734
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6277
6735
  declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
6278
- declare const _default$36: typeof __VLS_export$5;
6736
+ declare const _default$37: typeof __VLS_export$5;
6279
6737
  type __VLS_WithSlots$1<T, S> = T & {
6280
6738
  new (): {
6281
6739
  $slots: S;
@@ -6300,7 +6758,8 @@ type __VLS_Props$4 = {
6300
6758
  parentsId?: Id[];
6301
6759
  nodeStatusMap: Map<Id, LayerNodeStatus>;
6302
6760
  indent?: number;
6303
- nextLevelIndentIncrement?: number; /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6761
+ nextLevelIndentIncrement?: number;
6762
+ /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6304
6763
  isExpandable?: IsExpandableFunction;
6305
6764
  };
6306
6765
  declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -6326,7 +6785,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Prop
6326
6785
  isExpandable: IsExpandableFunction;
6327
6786
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6328
6787
  declare const __VLS_export$4: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
6329
- declare const _default$37: typeof __VLS_export$4;
6788
+ declare const _default$38: typeof __VLS_export$4;
6330
6789
  type __VLS_WithSlots<T, S> = T & {
6331
6790
  new (): {
6332
6791
  $slots: S;
@@ -6342,14 +6801,14 @@ declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_
6342
6801
  }>, {
6343
6802
  disabled: boolean;
6344
6803
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6345
- declare const _default$28: typeof __VLS_export$3;
6804
+ declare const _default$29: typeof __VLS_export$3;
6346
6805
  //#endregion
6347
6806
  //#region temp/packages/editor/src/fields/DisplayConds.vue.d.ts
6348
6807
  type __VLS_Props$2 = FieldProps<DisplayCondsConfig>;
6349
6808
  declare const __VLS_export$2: import("@vue/runtime-core").DefineComponent<__VLS_Props$2, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
6350
- change: (value: DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any;
6809
+ change: (value: DisplayCond | DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any;
6351
6810
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$2> & Readonly<{
6352
- onChange?: ((value: DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any) | undefined;
6811
+ onChange?: ((value: DisplayCond | DisplayCond[], eventData?: ContainerChangeEventData | undefined) => any) | undefined;
6353
6812
  }>, {
6354
6813
  disabled: boolean;
6355
6814
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
@@ -6373,11 +6832,27 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
6373
6832
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
6374
6833
  onAddDiffCount?: (() => any) | undefined;
6375
6834
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6376
- declare const _default$32: typeof __VLS_export;
6835
+ declare const _default$33: typeof __VLS_export;
6836
+ //#endregion
6837
+ //#region temp/packages/editor/src/fields/headless-validation.d.ts
6838
+ /**
6839
+ * 编辑器字段的无渲染登记表(不含 Vue 组件)。
6840
+ *
6841
+ * Node 里 `registerFields(editorFields)` 即可配合 `validateForm` / `submitForm`。
6842
+ * 安装编辑器时由 plugin 把 `component` 叠上去再传给 `@tmagic/form`。
6843
+ *
6844
+ * - 叶子:内部只渲染叶子 UI,或把子表单渲染在独立的 MForm / MFormBox 实例里
6845
+ * - innerConfig:内部再渲染 MContainer / MPanel / MGroupList,把运行期配置交出来
6846
+ * - typeMatch:该 type 自身的类型匹配校验
6847
+ *
6848
+ * innerConfig 返回的 config / model / prop 与组件模板里传给内部容器的那一组保持一一对应,
6849
+ * 且配置本身与组件共用同一份工厂(`fields/configs/`)。
6850
+ */
6851
+ export declare const editorFields: Record<string, HeadlessFieldOptions>;
6377
6852
  //#endregion
6378
6853
  //#region temp/packages/editor/src/plugin.d.ts
6379
- declare const _default$40: {
6854
+ declare const _default$43: {
6380
6855
  install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
6381
6856
  };
6382
6857
  //#endregion
6383
- 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, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, 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, confirmHistoryAction, createStackStep, _default$39 as dataSourceService, debug, _default$40 as default, defaultIsExpandable, _default$41 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$42 as editorService, eqOptions, error, eventTabConfig, _default$43 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$44 as historyService, idbDelete, idbGet, idbSet, info, isIncludeDataSource, isIndexedDBSupported, _default$45 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, numberOptions, openIndexedDB, _default$46 as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$47 as stageOverlayService, _default$48 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$49 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
6858
+ export { _default as CodeBlockEditor, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, _default$3 as CodeSelect, _default$4 as CodeSelectCol, _default$5 as CompareForm, _default$6 as ComponentListPanel, _default$7 as CondOpSelect, _default$8 as ContentMenu, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, _default$13 as DataSourceInput, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DepTargetType, _default$18 as DisplayConds, _default$19 as EventSelect, _default$20 as FloatingBox, _default$21 as HistoryDiffDialog, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, _default$24 as Icon, _default$25 as KeyValue, _default$26 as LayerNodeContent, _default$27 as LayerPanel, _default$28 as LayoutContainer, _default$28 as SplitView, type OnDrag, _default$29 as PageFragmentSelect, _default$30 as PropsFormPanel, _default$31 as PropsPanel, _default$32 as Resizer, StageCore, _default$33 as StyleSetter, _default$34 as TMagicCodeEditor, _default$35 as TMagicEditor, _default$36 as ToolButton, _default$37 as Tree, _default$38 as TreeNode, type TypeMatchValidateContext, _default$39 as ViewForm, _default$40 as codeBlockService, _default$41 as componentListService, _default$42 as dataSourceService, _default$43 as default, _default$44 as depService, designPlugin, _default$45 as editorService, _default$46 as eventsService, formPlugin, getEditorConfig, _default$47 as historyService, isGlobalFlat, _default$48 as keybindingService, _default$49 as loadMonaco, _default$50 as propsService, setEditorConfig, _default$51 as stageOverlayService, _default$52 as storageService, tablePlugin, _default$53 as uiService };