@tmagic/editor 1.8.0-beta.2 → 1.8.0-beta.20

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 (306) hide show
  1. package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +43 -9
  2. package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +8 -4
  3. package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +3 -2
  4. package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +22 -98
  5. package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +32 -9
  6. package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +68 -17
  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 +1 -1
  9. package/dist/es/components/ScrollBar.js +0 -1
  10. package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +1 -1
  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 +7 -7
  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 +58 -0
  19. package/dist/es/editorProps.js +9 -1
  20. package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +16 -5
  21. package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +7 -7
  22. package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +81 -44
  23. package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +10 -3
  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 +13 -6
  26. package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +11 -8
  27. package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +39 -12
  28. package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +11 -20
  29. package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +11 -6
  30. package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +30 -14
  31. package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +11 -4
  32. package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +5 -2
  33. package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +38 -6
  34. package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +151 -153
  35. package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +5 -2
  36. package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +5 -2
  37. package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +8 -10
  38. package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +5 -2
  39. package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +28 -6
  40. package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/dist/es/fields/StyleSetter/icons/align-items/Center.js +31 -0
  42. package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +31 -0
  43. package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +31 -0
  44. package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +50 -0
  45. package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +50 -0
  46. package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +7 -7
  47. package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +6 -3
  48. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +29 -6
  49. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +32 -6
  50. package/dist/es/fields/StyleSetter/icons/display/Block.js +1 -1
  51. package/dist/es/fields/StyleSetter/icons/display/Flex.js +1 -1
  52. package/dist/es/fields/StyleSetter/icons/display/Inline.js +1 -1
  53. package/dist/es/fields/StyleSetter/icons/display/InlineBlock.js +1 -1
  54. package/dist/es/fields/StyleSetter/icons/display/None.js +1 -1
  55. package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +11 -3
  56. package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +11 -3
  57. package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +11 -3
  58. package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +11 -3
  59. package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +17 -3
  60. package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +19 -3
  61. package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +19 -3
  62. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +37 -3
  63. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +33 -3
  64. package/dist/es/fields/StyleSetter/icons/text-align/Center.js +1 -1
  65. package/dist/es/fields/StyleSetter/icons/text-align/Left.js +1 -1
  66. package/dist/es/fields/StyleSetter/icons/text-align/Right.js +1 -1
  67. package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +56 -30
  68. package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +7 -4
  69. package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +35 -26
  70. package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +76 -48
  71. package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -23
  72. package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +7 -4
  73. package/dist/es/fields/UISelect.js +0 -1
  74. package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +5 -2
  75. package/dist/es/hooks/use-code-block-edit.js +6 -3
  76. package/dist/es/hooks/use-compare-form.js +119 -0
  77. package/dist/es/hooks/use-data-source-edit.js +5 -2
  78. package/dist/es/hooks/use-stage.js +9 -4
  79. package/dist/es/icons/CenterIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  80. package/dist/es/icons/CodeIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  81. package/dist/es/icons/DatasourceIcon.js +17 -0
  82. package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  83. package/dist/es/index.js +24 -10
  84. package/dist/es/initService.js +19 -13
  85. package/dist/es/layouts/AddPageBox.vue_vue_type_script_setup_true_lang.js +1 -1
  86. package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +24 -12
  87. package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +25 -18
  88. package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +4 -4
  89. package/dist/es/layouts/NavMenuColumn.vue_vue_type_script_setup_true_lang.js +1 -1
  90. package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +25 -38
  91. package/dist/es/layouts/history-list/BucketTab.js +5 -0
  92. package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +62 -0
  93. package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +177 -88
  94. package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +139 -37
  95. package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +164 -107
  96. package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +44 -9
  97. package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +49 -53
  98. package/dist/es/layouts/history-list/composables.js +138 -108
  99. package/dist/es/layouts/history-list/useHistoryList.js +56 -0
  100. package/dist/es/layouts/history-list/useHistoryRevert.js +317 -0
  101. package/dist/es/layouts/page-bar/AddButton.vue_vue_type_script_setup_true_lang.js +1 -1
  102. package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +5 -3
  103. package/dist/es/layouts/page-bar/PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js +1 -1
  104. package/dist/es/layouts/page-bar/PageList.vue_vue_type_script_setup_true_lang.js +1 -1
  105. package/dist/es/layouts/page-bar/Search.vue_vue_type_script_setup_true_lang.js +2 -2
  106. package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +50 -7
  107. package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +33 -13
  108. package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
  109. package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +3 -3
  110. package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +26 -38
  111. package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +4 -4
  112. package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  113. package/dist/es/layouts/sidebar/code-block/useContentMenu.js +19 -4
  114. package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.vue_vue_type_script_setup_true_lang.js +1 -1
  115. package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +23 -6
  116. package/dist/es/layouts/sidebar/data-source/DataSourceList.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +27 -5
  118. package/dist/es/layouts/sidebar/data-source/useContentMenu.js +19 -4
  119. package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +8 -8
  120. package/dist/es/layouts/sidebar/layer/LayerNodeContent.js +5 -0
  121. package/dist/es/layouts/sidebar/layer/LayerNodeContent.vue_vue_type_script_setup_true_lang.js +46 -0
  122. package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +2 -2
  123. package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +3 -2
  124. package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
  125. package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
  126. package/dist/es/layouts/workspace/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
  127. package/dist/es/layouts/workspace/Workspace.vue_vue_type_script_setup_true_lang.js +1 -1
  128. package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +9 -3
  129. package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +2 -2
  130. package/dist/es/layouts/workspace/viewer/StageOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  131. package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +16 -16
  132. package/dist/es/plugin.js +5 -2
  133. package/dist/es/services/codeBlock.js +137 -56
  134. package/dist/es/services/dataSource.js +122 -52
  135. package/dist/es/services/dep.js +162 -41
  136. package/dist/es/services/editor.js +613 -179
  137. package/dist/es/services/history.js +350 -386
  138. package/dist/es/services/keybinding.js +6 -6
  139. package/dist/es/services/props.js +3 -2
  140. package/dist/es/services/storage.js +2 -2
  141. package/dist/es/services/ui.js +10 -2
  142. package/dist/es/style.css +549 -113
  143. package/dist/es/utils/config.js +4 -1
  144. package/dist/es/utils/const.js +2 -2
  145. package/dist/es/utils/content-menu.js +19 -11
  146. package/dist/es/utils/data-source/index.js +34 -11
  147. package/dist/es/utils/dep/collect-worker-client.js +114 -0
  148. package/dist/es/utils/dep/idle-task.js +47 -22
  149. package/dist/es/utils/dep/worker.js +1 -1
  150. package/dist/es/utils/editor.js +103 -49
  151. package/dist/es/utils/event.js +123 -0
  152. package/dist/es/utils/history.js +220 -0
  153. package/dist/es/utils/indexed-db.js +86 -0
  154. package/dist/es/utils/monaco-editor.js +22 -6
  155. package/dist/es/utils/operator.js +2 -2
  156. package/dist/es/utils/props.js +114 -33
  157. package/dist/es/utils/type-match-rules.js +367 -0
  158. package/dist/es/utils/undo-redo.js +60 -1
  159. package/dist/style.css +549 -113
  160. package/dist/themes/magic-admin.css +3028 -0
  161. package/dist/tmagic-editor.umd.cjs +14273 -10029
  162. package/package.json +8 -8
  163. package/src/Editor.vue +43 -2
  164. package/src/components/CodeBlockEditor.vue +3 -0
  165. package/src/components/CompareForm.vue +18 -146
  166. package/src/components/ContentMenu.vue +44 -8
  167. package/src/components/FloatingBox.vue +84 -9
  168. package/src/components/ScrollBar.vue +0 -67
  169. package/src/components/ToolButton.vue +2 -2
  170. package/src/components/ViewForm.vue +55 -0
  171. package/src/editorProps.ts +30 -0
  172. package/src/fields/Code.vue +10 -2
  173. package/src/fields/CodeLink.vue +2 -5
  174. package/src/fields/CodeSelect.vue +54 -40
  175. package/src/fields/CodeSelectCol.vue +8 -1
  176. package/src/fields/CondOpSelect.vue +2 -24
  177. package/src/fields/DataSourceFieldSelect/FieldSelect.vue +16 -2
  178. package/src/fields/DataSourceFieldSelect/Index.vue +14 -5
  179. package/src/fields/DataSourceFields.vue +42 -8
  180. package/src/fields/DataSourceInput.vue +10 -28
  181. package/src/fields/DataSourceMethodSelect.vue +9 -4
  182. package/src/fields/DataSourceMethods.vue +42 -21
  183. package/src/fields/DataSourceMocks.vue +3 -0
  184. package/src/fields/DisplayConds.vue +18 -1
  185. package/src/fields/EventSelect.vue +145 -161
  186. package/src/fields/StyleSetter/Index.vue +3 -12
  187. package/src/fields/StyleSetter/components/Border.vue +15 -6
  188. package/src/fields/StyleSetter/icons/align-items/Center.vue +19 -0
  189. package/src/fields/StyleSetter/icons/align-items/FlexEnd.vue +19 -0
  190. package/src/fields/StyleSetter/icons/align-items/FlexStart.vue +19 -0
  191. package/src/fields/StyleSetter/icons/align-items/SpaceAround.vue +34 -0
  192. package/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue +34 -0
  193. package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
  194. package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +20 -4
  195. package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +10 -28
  196. package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +4 -5
  197. package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +4 -5
  198. package/src/fields/StyleSetter/icons/flex-direction/Column.vue +4 -3
  199. package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +4 -3
  200. package/src/fields/StyleSetter/icons/flex-direction/Row.vue +4 -3
  201. package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +4 -3
  202. package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -2
  203. package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +15 -2
  204. package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +15 -2
  205. package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +28 -3
  206. package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +28 -2
  207. package/src/fields/StyleSetter/pro/Background.vue +99 -55
  208. package/src/fields/StyleSetter/pro/Border.vue +9 -11
  209. package/src/fields/StyleSetter/pro/Font.vue +66 -64
  210. package/src/fields/StyleSetter/pro/Layout.vue +211 -139
  211. package/src/fields/StyleSetter/pro/Position.vue +69 -67
  212. package/src/fields/StyleSetter/pro/Transform.vue +23 -25
  213. package/src/fields/UISelect.vue +0 -12
  214. package/src/hooks/index.ts +1 -0
  215. package/src/hooks/use-code-block-edit.ts +4 -3
  216. package/src/hooks/use-compare-form.ts +187 -0
  217. package/src/hooks/use-data-source-edit.ts +2 -2
  218. package/src/hooks/use-stage.ts +5 -3
  219. package/src/icons/DatasourceIcon.vue +7 -0
  220. package/src/index.ts +12 -0
  221. package/src/initService.ts +26 -16
  222. package/src/layouts/CodeEditor.vue +34 -11
  223. package/src/layouts/Framework.vue +15 -8
  224. package/src/layouts/NavMenu.vue +3 -3
  225. package/src/layouts/history-list/Bucket.vue +33 -41
  226. package/src/layouts/history-list/BucketTab.vue +72 -0
  227. package/src/layouts/history-list/GroupRow.vue +190 -93
  228. package/src/layouts/history-list/HistoryDiffDialog.vue +169 -90
  229. package/src/layouts/history-list/HistoryListPanel.vue +191 -95
  230. package/src/layouts/history-list/InitialRow.vue +38 -8
  231. package/src/layouts/history-list/PageTab.vue +67 -43
  232. package/src/layouts/history-list/composables.ts +239 -125
  233. package/src/layouts/history-list/useHistoryList.ts +60 -0
  234. package/src/layouts/history-list/useHistoryRevert.ts +425 -0
  235. package/src/layouts/page-bar/PageBar.vue +4 -2
  236. package/src/layouts/props-panel/FormPanel.vue +72 -6
  237. package/src/layouts/props-panel/PropsPanel.vue +62 -18
  238. package/src/layouts/props-panel/use-style-panel.ts +4 -3
  239. package/src/layouts/sidebar/ComponentListPanel.vue +10 -6
  240. package/src/layouts/sidebar/Sidebar.vue +13 -6
  241. package/src/layouts/sidebar/code-block/CodeBlockList.vue +5 -5
  242. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +5 -2
  243. package/src/layouts/sidebar/code-block/useContentMenu.ts +14 -2
  244. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +34 -2
  245. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +29 -4
  246. package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
  247. package/src/layouts/sidebar/layer/LayerMenu.vue +21 -13
  248. package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
  249. package/src/layouts/sidebar/layer/LayerNodeTool.vue +7 -4
  250. package/src/layouts/sidebar/layer/LayerPanel.vue +4 -1
  251. package/src/layouts/sidebar/layer/use-click.ts +3 -3
  252. package/src/layouts/sidebar/layer/use-node-status.ts +2 -2
  253. package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
  254. package/src/layouts/workspace/viewer/Stage.vue +1 -1
  255. package/src/layouts/workspace/viewer/ViewerMenu.vue +15 -15
  256. package/src/plugin.ts +6 -3
  257. package/src/services/codeBlock.ts +152 -47
  258. package/src/services/dataSource.ts +120 -41
  259. package/src/services/dep.ts +292 -47
  260. package/src/services/editor.ts +820 -224
  261. package/src/services/history.ts +449 -412
  262. package/src/services/keybinding.ts +6 -6
  263. package/src/services/ui.ts +33 -5
  264. package/src/theme/code-block.scss +37 -0
  265. package/src/theme/common/var.scss +1 -1
  266. package/src/theme/component-list-panel.scss +2 -2
  267. package/src/theme/data-source-field.scss +4 -0
  268. package/src/theme/display-conds.scss +11 -0
  269. package/src/theme/event.scss +70 -1
  270. package/src/theme/floating-box.scss +9 -1
  271. package/src/theme/framework.scss +4 -1
  272. package/src/theme/history-list-panel.scss +157 -23
  273. package/src/theme/layer-node-content.scss +14 -0
  274. package/src/theme/nav-menu.scss +5 -1
  275. package/src/theme/page-bar.scss +0 -4
  276. package/src/theme/props-panel.scss +5 -4
  277. package/src/theme/scroll-bar.scss +64 -0
  278. package/src/theme/style-setter/border.scss +17 -5
  279. package/src/theme/theme.scss +4 -0
  280. package/src/theme/themes/magic-admin/index.scss +214 -0
  281. package/src/theme/ui-select.scss +9 -0
  282. package/src/type.ts +668 -124
  283. package/src/utils/config.ts +9 -1
  284. package/src/utils/const.ts +3 -2
  285. package/src/utils/content-menu.ts +20 -11
  286. package/src/utils/data-source/index.ts +32 -12
  287. package/src/utils/dep/collect-worker-client.ts +149 -0
  288. package/src/utils/dep/idle-task.ts +72 -35
  289. package/src/utils/dep/worker.ts +113 -9
  290. package/src/utils/editor.ts +166 -60
  291. package/src/utils/event.ts +224 -0
  292. package/src/utils/history.ts +286 -0
  293. package/src/utils/index.ts +4 -0
  294. package/src/utils/indexed-db.ts +122 -0
  295. package/src/utils/monaco-editor.ts +27 -0
  296. package/src/utils/operator.ts +2 -2
  297. package/src/utils/props.ts +114 -11
  298. package/src/utils/type-match-rules.ts +684 -0
  299. package/src/utils/undo-redo.ts +88 -0
  300. package/types/index.d.ts +1979 -515
  301. package/dist/es/layouts/history-list/CodeBlockTab.js +0 -5
  302. package/dist/es/layouts/history-list/CodeBlockTab.vue_vue_type_script_setup_true_lang.js +0 -62
  303. package/dist/es/layouts/history-list/DataSourceTab.js +0 -5
  304. package/dist/es/layouts/history-list/DataSourceTab.vue_vue_type_script_setup_true_lang.js +0 -62
  305. package/src/layouts/history-list/CodeBlockTab.vue +0 -61
  306. package/src/layouts/history-list/DataSourceTab.vue +0 -61
package/types/index.d.ts CHANGED
@@ -1,11 +1,11 @@
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, FormInstallOptions, FormState, FormValue, KeyValueConfig, MForm, PageFragmentSelectConfig, TabPaneConfig, TableColumnConfig, TypeFunction, TypeMatchValidateContext, TypeMatchValidator } 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, 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";
@@ -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;
@@ -62,13 +62,23 @@ declare class BaseService extends EventEmitter$1 {
62
62
  }
63
63
  //#endregion
64
64
  //#region temp/packages/editor/src/services/codeBlock.d.ts
65
- declare const canUsePluginMethods$7: {
65
+ declare const canUsePluginMethods$8: {
66
66
  async: readonly ["setCodeDslById", "setEditStatus", "setCombineIds", "setUndeleteableList", "deleteCodeDslByIds"];
67
67
  sync: string[];
68
68
  };
69
- type AsyncMethodName$4 = Writable<(typeof canUsePluginMethods$7)['async']>;
69
+ type AsyncMethodName$4 = Writable<(typeof canUsePluginMethods$8)['async']>;
70
70
  declare class CodeBlock extends BaseService {
71
71
  private state;
72
+ /**
73
+ * 最近一次写入历史栈的代码块历史记录 uuid(单条写入场景:新增 / 更新)。
74
+ * 供 setCodeDslById(Sync)AndGetHistoryId 取回,普通方法不读取它。
75
+ */
76
+ private lastPushedHistoryId;
77
+ /**
78
+ * deleteCodeDslByIds 一次删除多个代码块时,按写入顺序收集的历史记录 uuid 列表。
79
+ * 在 deleteCodeDslByIds 入口处重置,供 deleteCodeDslByIdsAndGetHistoryId 取回。
80
+ */
81
+ private lastDeletedHistoryIds;
72
82
  constructor();
73
83
  /**
74
84
  * 设置活动的代码块dsl数据源
@@ -100,7 +110,9 @@ declare class CodeBlock extends BaseService {
100
110
  */
101
111
  setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, {
102
112
  changeRecords,
103
- doNotPushHistory
113
+ doNotPushHistory,
114
+ historyDescription,
115
+ historySource
104
116
  }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
105
117
  /**
106
118
  * 为了兼容历史原因
@@ -117,7 +129,8 @@ declare class CodeBlock extends BaseService {
117
129
  setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, {
118
130
  changeRecords,
119
131
  doNotPushHistory,
120
- historyDescription
132
+ historyDescription,
133
+ historySource
121
134
  }?: HistoryOpOptionsWithChangeRecords): void;
122
135
  /**
123
136
  * 根据代码块id数组获取代码dsl
@@ -178,8 +191,25 @@ declare class CodeBlock extends BaseService {
178
191
  */
179
192
  deleteCodeDslByIds(codeIds: Id[], {
180
193
  doNotPushHistory,
181
- historyDescription
194
+ historyDescription,
195
+ historySource
182
196
  }?: HistoryOpOptions): Promise<void>;
197
+ /**
198
+ * 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
199
+ * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
200
+ * 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
201
+ *
202
+ * 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
203
+ */
204
+ /** 等价于 {@link setCodeDslById},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
205
+ setCodeDslByIdAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, options?: HistoryOpOptionsWithChangeRecords): Promise<DslOpWithHistoryIdsResult<void>>;
206
+ /** 等价于 {@link setCodeDslByIdSync},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
207
+ setCodeDslByIdSyncAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<void>;
208
+ /**
209
+ * 等价于 {@link deleteCodeDslByIds},并额外返回本次写入的全部历史记录 uuid(按删除顺序)。
210
+ * 一次删除多个代码块会产生多条历史记录;未写入任何历史时 historyIds 为 `[]`。
211
+ */
212
+ deleteCodeDslByIdsAndGetHistoryId(codeIds: Id[], options?: HistoryOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
183
213
  setParamsColConfig(config: TableColumnConfig): void;
184
214
  getParamsColConfig(): TableColumnConfig | undefined;
185
215
  /**
@@ -223,6 +253,14 @@ declare class CodeBlock extends BaseService {
223
253
  * @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
224
254
  */
225
255
  revert(id: Id, index: number): Promise<CodeBlockStepValue | null>;
256
+ /**
257
+ * 通过历史记录 uuid 回滚代码块历史步骤,语义同 {@link revert},
258
+ * 仅无需调用方再传 codeBlockId 与 index:内部会按 uuid 在全部代码块栈中定位对应步骤后再回滚。
259
+ * 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
260
+ *
261
+ * @param uuids 目标历史记录的 uuid 列表,通常由 {@link setCodeDslByIdAndGetHistoryId} 等方法返回的 `historyIds`
262
+ */
263
+ revertById(uuids: string[]): Promise<(CodeBlockStepValue | null)[]>;
226
264
  /**
227
265
  * 生成代码块唯一id
228
266
  * @returns {Id} 代码块唯一id
@@ -264,7 +302,7 @@ declare class CodeBlock extends BaseService {
264
302
  private applyHistoryStep;
265
303
  }
266
304
  type CodeBlockService = CodeBlock;
267
- declare const _default$35: CodeBlock;
305
+ declare const _default$40: CodeBlock;
268
306
  //#endregion
269
307
  //#region temp/packages/editor/src/services/componentList.d.ts
270
308
  declare class ComponentList extends BaseService {
@@ -279,6 +317,7 @@ declare class ComponentList extends BaseService {
279
317
  destroy(): void;
280
318
  }
281
319
  type ComponentListService = ComponentList;
320
+ declare const _default$41: ComponentList;
282
321
  //#endregion
283
322
  //#region temp/packages/editor/src/services/dataSource.d.ts
284
323
  interface State$2 {
@@ -291,13 +330,19 @@ interface State$2 {
291
330
  methods: Record<string, EventOption[]>;
292
331
  }
293
332
  type StateKey$1 = keyof State$2;
294
- declare const canUsePluginMethods$6: {
333
+ declare const canUsePluginMethods$7: {
295
334
  async: never[];
296
335
  sync: readonly ["getFormConfig", "setFormConfig", "getFormValue", "setFormValue", "getFormEvent", "setFormEvent", "getFormMethod", "setFormMethod", "add", "update", "remove", "createId"];
297
336
  };
298
- type SyncMethodName$4 = Writable<(typeof canUsePluginMethods$6)['sync']>;
337
+ type SyncMethodName$5 = Writable<(typeof canUsePluginMethods$7)['sync']>;
299
338
  declare class DataSource extends BaseService {
300
339
  private state;
340
+ /**
341
+ * 最近一次写入历史栈的数据源历史记录 uuid。
342
+ * 供 *AndGetHistoryId 系列方法在调用 add / update / remove 后取回本次产生的历史记录 id;
343
+ * 普通方法不读取它,调用前由 *AndGetHistoryId 重置为 null。
344
+ */
345
+ private lastPushedHistoryId;
301
346
  constructor();
302
347
  set<K extends StateKey$1, T extends State$2[K]>(name: K, value: T): void;
303
348
  get<K extends StateKey$1>(name: K): State$2[K];
@@ -318,7 +363,8 @@ declare class DataSource extends BaseService {
318
363
  */
319
364
  add(config: DataSourceSchema, {
320
365
  doNotPushHistory,
321
- historyDescription
366
+ historyDescription,
367
+ historySource
322
368
  }?: HistoryOpOptions): {
323
369
  id: string;
324
370
  type: string;
@@ -341,7 +387,8 @@ declare class DataSource extends BaseService {
341
387
  update(config: DataSourceSchema, {
342
388
  changeRecords,
343
389
  doNotPushHistory,
344
- historyDescription
390
+ historyDescription,
391
+ historySource
345
392
  }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
346
393
  /**
347
394
  * 删除数据源
@@ -352,8 +399,22 @@ declare class DataSource extends BaseService {
352
399
  */
353
400
  remove(id: string, {
354
401
  doNotPushHistory,
355
- historyDescription
402
+ historyDescription,
403
+ historySource
356
404
  }?: HistoryOpOptions): void;
405
+ /**
406
+ * 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
407
+ * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
408
+ * 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
409
+ *
410
+ * 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
411
+ */
412
+ /** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
413
+ addAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<DataSourceSchema>;
414
+ /** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
415
+ updateAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<DataSourceSchema>;
416
+ /** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
417
+ removeAndGetHistoryId(id: string, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<void>;
357
418
  /**
358
419
  * 撤销指定数据源的最近一次变更。
359
420
  *
@@ -394,11 +455,19 @@ declare class DataSource extends BaseService {
394
455
  * @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
395
456
  */
396
457
  revert(id: Id, index: number): DataSourceStepValue | null;
458
+ /**
459
+ * 通过历史记录 uuid 回滚数据源历史步骤,语义同 {@link revert},
460
+ * 仅无需调用方再传 dataSourceId 与 index:内部会按 uuid 在全部数据源栈中定位对应步骤后再回滚。
461
+ * 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
462
+ *
463
+ * @param uuids 目标历史记录的 uuid 列表,通常由 {@link addAndGetHistoryId} 等方法返回的 `historyIds`
464
+ */
465
+ revertById(uuids: string[]): (DataSourceStepValue | null)[];
397
466
  createId(): string;
398
467
  getDataSourceById(id: string): DataSourceSchema | undefined;
399
468
  resetState(): void;
400
469
  destroy(): void;
401
- usePlugin(options: SyncHookPlugin<SyncMethodName$4, DataSource>): void;
470
+ usePlugin(options: SyncHookPlugin<SyncMethodName$5, DataSource>): void;
402
471
  /**
403
472
  * 复制时会带上组件关联的数据源
404
473
  * @param config 组件节点配置
@@ -432,7 +501,10 @@ declare class DataSource extends BaseService {
432
501
  private applyHistoryStep;
433
502
  }
434
503
  type DataSourceService = DataSource;
435
- declare const _default$36: DataSource;
504
+ declare const _default$42: DataSource;
505
+ //#endregion
506
+ //#region temp/packages/editor/src/utils/dep/worker.d.ts
507
+ type DepsData = Record<string, Record<Id, DepData>>;
436
508
  //#endregion
437
509
  //#region temp/packages/editor/src/services/dep.d.ts
438
510
  interface DepEvents {
@@ -449,8 +521,12 @@ type StateKey = keyof State$1;
449
521
  declare class Dep extends BaseService {
450
522
  private state;
451
523
  private idleTask;
524
+ private collectWorker;
452
525
  private watcher;
453
526
  private waitingWorker?;
527
+ private resolveWaitingWorker?;
528
+ private workerGeneration;
529
+ private activeBatches;
454
530
  constructor();
455
531
  set<K extends StateKey, T extends State$1[K]>(name: K, value: T): void;
456
532
  get<K extends StateKey>(name: K): State$1[K];
@@ -464,8 +540,16 @@ declare class Dep extends BaseService {
464
540
  removeTarget(id: Id, type?: string): void;
465
541
  clearTargets(): void;
466
542
  collect(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): void;
467
- collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<void>;
468
- collectByWorker(dsl: MApp): Promise<Record<string, Record<string, DepData>>>;
543
+ /**
544
+ * 空闲收集依赖
545
+ *
546
+ * 遍历匹配是整个收集过程中最耗时的部分(要深度遍历节点树并对每个属性做 target 匹配),
547
+ * 节点/数据源多时在主线程执行会长时间卡死页面,因此优先交给 worker 执行,主线程只负责把结果写回 target。
548
+ * 自定义 target 的 isTarget 是无法跨线程传递的闭包函数(没有 descriptor),仍走主线程空闲队列;
549
+ * worker 不可用(如 SSR)或执行失败时也会回退到主线程空闲队列。
550
+ */
551
+ collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType$1): Promise<boolean>;
552
+ collectByWorker(dsl: MApp): Promise<DepsData>;
469
553
  collectNode(node: MNode, target: Target, depExtendedData?: DepExtendedData, deep?: boolean): void;
470
554
  clear(nodes?: MNode[]): void;
471
555
  clearByType(type: DepTargetType$1, nodes?: MNode[]): void;
@@ -482,25 +566,59 @@ declare class Dep extends BaseService {
482
566
  * 按 pageId 匹配,可清掉页面内已被删除节点的残留依赖
483
567
  */
484
568
  private removePageDep;
569
+ /**
570
+ * 把遍历匹配交给 worker,结果回来后按 target 分片写回主线程
571
+ */
572
+ private collectByCollectWorker;
573
+ /**
574
+ * 用 worker 的收集结果替换 target 上这批节点的依赖
575
+ */
576
+ private enqueueApplyTask;
577
+ private enqueueTasks;
485
578
  private enqueueTask;
579
+ private beginBatchTask;
580
+ private onBatchTaskDone;
581
+ private settleBatchDs;
582
+ private finishBatch;
583
+ /**
584
+ * idleTask 被清空时,在途批次的任务不会再执行,必须主动结算,
585
+ * 否则对应的 collectIdle Promise 永远不会 resolve(collecting 卡在 true、once 监听器泄漏)。
586
+ * 收集被中断(通常紧跟一次全量重新收集),因此不再 emit collected/ds-collected,仅结算 Promise。
587
+ */
588
+ private abortActiveBatches;
589
+ private updateCollectingState;
486
590
  }
487
591
  type DepService = Dep;
488
- declare const _default$38: Dep;
592
+ declare const _default$44: Dep;
489
593
  //#endregion
490
594
  //#region temp/packages/editor/src/services/editor.d.ts
491
595
  declare class Editor extends BaseService {
492
596
  state: StoreState;
493
597
  private selectionBeforeOp;
598
+ /**
599
+ * 操作前的节点校验错误快照,与 selectionBeforeOp 同时在 captureSelectionBeforeOp 中捕获,
600
+ * 供 pushOpHistory 写入 step.extra.invalidNodeIdsBefore,用于撤销时还原到「操作前」的错误状态。
601
+ */
602
+ private invalidNodeIdsBeforeOp;
603
+ /**
604
+ * 最近一次 pushOpHistory 写入的历史记录 uuid。
605
+ * 供 *AndGetHistoryId 系列方法在调用普通操作后取回本次产生的历史记录 id;
606
+ * 普通操作不会读取它,调用前由 *AndGetHistoryId 重置为 null。
607
+ */
608
+ private lastPushedHistoryId;
494
609
  constructor();
495
610
  /**
496
611
  * 设置当前指点节点配置
497
- * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
612
+ * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength
498
613
  * @param value MNode
614
+ * @param options.historySource 设置 root 时,本次变更写入历史记录的「操作来源」(仅 name === 'root' 时生效)
499
615
  */
500
- set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T): void;
616
+ set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T, options?: {
617
+ historySource?: HistoryOpSource;
618
+ }): void;
501
619
  /**
502
620
  * 获取当前指点节点配置
503
- * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
621
+ * @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'invalidNodeIds' | 'pageLength' | 'pageFragmentLength'
504
622
  * @returns MNode
505
623
  */
506
624
  get<K extends StoreStateKey>(name: K): StoreState[K];
@@ -571,7 +689,8 @@ declare class Editor extends BaseService {
571
689
  doNotSelect,
572
690
  doNotSwitchPage,
573
691
  doNotPushHistory,
574
- historyDescription
692
+ historyDescription,
693
+ historySource
575
694
  }?: DslOpOptions): Promise<MNode | MNode[]>;
576
695
  doRemove(node: MNode, {
577
696
  doNotSelect,
@@ -589,12 +708,15 @@ declare class Editor extends BaseService {
589
708
  doNotSelect,
590
709
  doNotSwitchPage,
591
710
  doNotPushHistory,
592
- historyDescription
711
+ historyDescription,
712
+ historySource
593
713
  }?: DslOpOptions): Promise<void>;
594
714
  doUpdate(config: MNode, {
595
- changeRecords
715
+ changeRecords,
716
+ historySource
596
717
  }?: {
597
718
  changeRecords?: ChangeRecord[];
719
+ historySource?: HistoryOpSource;
598
720
  }): Promise<{
599
721
  newNode: MNode;
600
722
  oldNode: MNode;
@@ -616,6 +738,16 @@ declare class Editor extends BaseService {
616
738
  changeRecordList?: ChangeRecord[][];
617
739
  doNotPushHistory?: boolean;
618
740
  historyDescription?: string;
741
+ historySource?: HistoryOpSource;
742
+ /**
743
+ * 属性面板提交时携带的校验错误信息,在写入历史记录之前落库,
744
+ * 使历史快照与本次变更对齐,从而 undo/redo 能正确还原错误标记。
745
+ */
746
+ invalidInfo?: {
747
+ id: Id;
748
+ source: NodeInvalidSource;
749
+ error?: string;
750
+ };
619
751
  }): Promise<MNode | MNode[]>;
620
752
  /**
621
753
  * 将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]
@@ -629,7 +761,8 @@ declare class Editor extends BaseService {
629
761
  */
630
762
  sort(id1: Id, id2: Id, {
631
763
  doNotSelect,
632
- doNotPushHistory
764
+ doNotPushHistory,
765
+ historySource
633
766
  }?: DslOpOptions): Promise<void>;
634
767
  /**
635
768
  * 将组件节点配置存储到localStorage中
@@ -656,7 +789,9 @@ declare class Editor extends BaseService {
656
789
  paste(position?: PastePosition, collectorOptions?: TargetOptions, {
657
790
  doNotSelect,
658
791
  doNotSwitchPage,
659
- doNotPushHistory
792
+ doNotPushHistory,
793
+ historyDescription,
794
+ historySource
660
795
  }?: DslOpOptions): Promise<MNode | MNode[] | void>;
661
796
  doPaste(config: MNode[], position?: PastePosition): Promise<MNode[]>;
662
797
  doAlignCenter(config: MNode): Promise<MNode>;
@@ -671,7 +806,9 @@ declare class Editor extends BaseService {
671
806
  */
672
807
  alignCenter(config: MNode | MNode[], {
673
808
  doNotSelect,
674
- doNotPushHistory
809
+ doNotPushHistory,
810
+ historyDescription,
811
+ historySource
675
812
  }?: DslOpOptions): Promise<MNode | MNode[]>;
676
813
  /**
677
814
  * 移动当前选中节点位置
@@ -680,7 +817,9 @@ declare class Editor extends BaseService {
680
817
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
681
818
  */
682
819
  moveLayer(offset: number | LayerOffset, {
683
- doNotPushHistory
820
+ doNotPushHistory,
821
+ historyDescription,
822
+ historySource
684
823
  }?: DslOpOptions): Promise<void>;
685
824
  /**
686
825
  * 移动一个或多个节点到指定容器中。
@@ -699,11 +838,40 @@ declare class Editor extends BaseService {
699
838
  moveToContainer(config: MNode | MNode[], targetId: Id, {
700
839
  doNotSelect,
701
840
  doNotSwitchPage,
702
- doNotPushHistory
841
+ doNotPushHistory,
842
+ historyDescription,
843
+ historySource
703
844
  }?: DslOpOptions): Promise<MNode | MNode[]>;
704
845
  dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, {
705
- doNotPushHistory
846
+ doNotPushHistory,
847
+ historyDescription,
848
+ historySource
706
849
  }?: DslOpOptions): Promise<void>;
850
+ /**
851
+ * 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
852
+ * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
853
+ * 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
854
+ *
855
+ * 当本次操作未写入历史(doNotPushHistory 为 true、或操作无实际变更 / 提前返回)时 historyIds 为 `[]`。
856
+ */
857
+ /** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
858
+ addAndGetHistoryId(addNode: AddMNode | MNode[], parent?: MContainer | null, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
859
+ /** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
860
+ removeAndGetHistoryId(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
861
+ /** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
862
+ updateAndGetHistoryId(config: MNode | MNode[], data?: {
863
+ changeRecords?: ChangeRecord[];
864
+ changeRecordList?: ChangeRecord[][];
865
+ doNotPushHistory?: boolean;
866
+ historyDescription?: string;
867
+ historySource?: HistoryOpSource;
868
+ }): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
869
+ /** 等价于 {@link moveLayer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
870
+ moveLayerAndGetHistoryId(offset: number | LayerOffset, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
871
+ /** 等价于 {@link moveToContainer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
872
+ moveToContainerAndGetHistoryId(config: MNode | MNode[], targetId: Id, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
873
+ /** 等价于 {@link dragTo},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
874
+ dragToAndGetHistoryId(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
707
875
  /**
708
876
  * 撤销当前操作
709
877
  * @returns 被撤销的操作
@@ -731,6 +899,14 @@ declare class Editor extends BaseService {
731
899
  * @returns 反向后产生的新 step;目标不存在 / 未应用 / 反向失败时返回 null
732
900
  */
733
901
  revertPageStep(index: number): Promise<StepValue | null>;
902
+ /**
903
+ * 通过历史记录 uuid 回滚当前页面的历史步骤,语义与 {@link revertPageStep} 完全一致,
904
+ * 仅入参从 index 改为 uuid 列表({@link StepValue.uuid})。按数组顺序依次回滚,
905
+ * 返回与入参同序的结果列表(某项失败时为 `null`)。
906
+ *
907
+ * @param uuids 目标历史记录的 uuid 列表,通常由 *AndGetHistoryId 方法返回的 `historyIds`
908
+ */
909
+ revertPageStepById(uuids: string[]): Promise<(StepValue | null)[]>;
734
910
  /**
735
911
  * 跳转当前页面历史栈到指定游标位置。
736
912
  *
@@ -742,25 +918,84 @@ declare class Editor extends BaseService {
742
918
  */
743
919
  gotoPageStep(targetCursor: number): Promise<number>;
744
920
  move(left: number, top: number, {
745
- doNotPushHistory
921
+ doNotPushHistory,
922
+ historyDescription,
923
+ historySource
746
924
  }?: DslOpOptions): Promise<void>;
747
925
  resetState(): void;
748
926
  destroy(): void;
749
927
  resetModifiedNodeId(): void;
928
+ /**
929
+ * 记录(或覆盖)某个节点在指定来源(属性表单 / 样式表单)上的校验错误信息。
930
+ * @param id 节点 id
931
+ * @param source 错误来源:'props'(属性表单)| 'style'(样式表单)
932
+ * @param message 错误文案(可能是包含 <br> 的 HTML)
933
+ */
934
+ setInvalidNode(id: Id, source: NodeInvalidSource, message: string): void;
935
+ /**
936
+ * 删除节点的校验错误记录。
937
+ * @param id 节点 id
938
+ * @param source 指定来源则仅删除该来源;不传则删除该节点全部来源的错误
939
+ */
940
+ deleteInvalidNode(id: Id, source?: NodeInvalidSource): void;
941
+ /** 获取当前存在校验错误的节点错误 Map(key 为节点 id) */
942
+ getInvalidNodeIds(): Map<Id, NodeInvalidInfo>;
943
+ /** 获取指定节点的校验错误信息 */
944
+ getInvalidNodeInfo(id: Id): NodeInvalidInfo | undefined;
945
+ /** 清空全部校验错误记录 */
946
+ resetInvalidNodeId(): void;
750
947
  usePlugin(options: AsyncHookPlugin<AsyncMethodName, Editor>): void;
751
948
  on<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
752
949
  once<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
753
950
  emit<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, ...args: Param): boolean;
951
+ /**
952
+ * 应用一次属性面板提交携带的校验错误信息(在写入历史记录之前调用,使历史快照与本次变更对齐)。
953
+ * - invalidInfo 为空(调用方未携带):认为本次更新对应的节点已无校验错误,清除其全部来源的错误;
954
+ * - error 非空则记录错误,为空则清除对应来源的错误。
955
+ */
956
+ private applyInvalidInfo;
957
+ /** 删除被移除节点(含其子树)的校验错误记录,避免残留误报 */
958
+ private removeInvalidNodesBySubtree;
959
+ /** 清理不在当前 DSL 中的失效节点错误记录(用于整体替换 root 后) */
960
+ private pruneInvalidNodeIds;
754
961
  private addModifiedNodeId;
962
+ /**
963
+ * 获取指定节点所属的页面 / 页面片:
964
+ * - 普通节点返回其所在的 page;
965
+ * - 节点本身就是 page / pageFragment 时返回它自己;
966
+ * - 找不到时返回 null。
967
+ * 供 `change` 事件携带「变更节点对应的 page」(而非编辑器当前选中页)。
968
+ */
969
+ private getPageOfNode;
755
970
  private captureSelectionBeforeOp;
971
+ /**
972
+ * 比较「上一次 root」与「新 root」的页面 / 页面片,按页面粒度把整体替换拆成历史记录:
973
+ * - 新旧都存在且内容变化的页面 → 一条 `update`(整页快照替换,无 changeRecords);
974
+ * - 仅新 root 存在的页面 → 一条 `add`;
975
+ * - 仅旧 root 存在的页面 → 一条 `remove`。
976
+ *
977
+ * 每条记录落到对应页面自己的历史栈(与普通节点操作一致),并标记来源 `source`。
978
+ * 内容未变化的页面不产生记录,避免重复设置相同 DSL 时产生噪声。
979
+ */
980
+ private pushRootDiffHistory;
981
+ /**
982
+ * 构造一条页面级「set root」历史记录(不携带选区 / modifiedNodeIds 上下文)并落到该页面自己的栈。
983
+ *
984
+ * 连续 set root 替换:若该页栈最新一条已是**同来源**的 set root 记录({@link StepValue.rootStep} 且 `source` 相同),
985
+ * 则用本次记录**替换**它而非新增,避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录;
986
+ * 来源不同则照常新增(initial 基线不是 rootStep,不在此列)。
987
+ */
988
+ private pushPageDiffStep;
756
989
  private pushOpHistory;
757
990
  /**
758
991
  * 应用历史操作(撤销 / 重做)
759
992
  *
760
- * 所有 DSL 修改都走 `editor.add / remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
761
- * `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底。
993
+ * 删除 / 更新类修改走 `editor.remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
994
+ * `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底;
995
+ * 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
996
+ * 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
762
997
  *
763
- * 注意:这些公开方法会发出 add / remove / update 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
998
+ * 注意:这些路径都会发出 add / remove / update / change 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
764
999
  * 请监听 `history-change` 事件配合判断。
765
1000
  *
766
1001
  * @param step 操作记录
@@ -768,17 +1003,22 @@ declare class Editor extends BaseService {
768
1003
  */
769
1004
  private applyHistoryOp;
770
1005
  private selectedConfigExceptionHandler;
1006
+ /**
1007
+ * 撤销 remove / 重做 add 通过手工 splice 按 step 记录的 parentId / index 精确还原节点(不走 this.add,原因见调用处注释),
1008
+ * 这里补齐与 this.add 等价的 add / change 事件,保证撤销/重做路径的事件行为与正向操作一致。
1009
+ */
1010
+ private emitHistoryInsertEvents;
771
1011
  }
772
1012
  type EditorService = Editor;
773
- declare const _default$39: Editor;
1013
+ declare const _default$45: Editor;
774
1014
  //#endregion
775
1015
  //#region temp/packages/editor/src/services/events.d.ts
776
- declare const canUsePluginMethods$5: {
1016
+ declare const canUsePluginMethods$6: {
777
1017
  async: readonly [];
778
1018
  sync: readonly ["setEvent", "getEvent", "setMethod", "getMethod"];
779
1019
  };
780
- type AsyncMethodName$3 = Writable<(typeof canUsePluginMethods$5)['async']>;
781
- type SyncMethodName$3 = Writable<(typeof canUsePluginMethods$5)['sync']>;
1020
+ type AsyncMethodName$3 = Writable<(typeof canUsePluginMethods$6)['async']>;
1021
+ type SyncMethodName$4 = Writable<(typeof canUsePluginMethods$6)['sync']>;
782
1022
  declare class Events extends BaseService {
783
1023
  constructor();
784
1024
  setEvents(events: Record<string, EventOption[]>): void;
@@ -789,17 +1029,43 @@ declare class Events extends BaseService {
789
1029
  getMethod(type: string, _targetId: Id): EventOption[];
790
1030
  resetState(): void;
791
1031
  destroy(): void;
792
- usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$3, Events>): void;
1032
+ usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$4, Events>): void;
793
1033
  }
794
1034
  type EventsService = Events;
795
- declare const _default$40: Events;
1035
+ declare const _default$46: Events;
796
1036
  //#endregion
797
1037
  //#region temp/packages/editor/src/utils/undo-redo.d.ts
1038
+ /**
1039
+ * UndoRedo 栈的可序列化快照,用于持久化(如写入 IndexedDB)后再还原。
1040
+ */
1041
+ interface SerializedUndoRedo<T = any> {
1042
+ /** 栈内全部元素(按时间正序,索引 0 为最早一步)。 */
1043
+ elementList: T[];
1044
+ /** 游标位置(已应用步骤数量)。 */
1045
+ listCursor: number;
1046
+ /** 栈容量上限。 */
1047
+ listMaxSize: number;
1048
+ }
798
1049
  declare class UndoRedo<T = any> {
1050
+ /**
1051
+ * 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
1052
+ * 游标会被夹紧到 [0, length] 区间,避免脏数据导致越界。
1053
+ *
1054
+ * @param options.isSavedStep 可选谓词:若提供,则把游标定位到「最近一条满足该谓词的记录」之后
1055
+ * (即恢复到最近一个已保存点);找不到匹配记录时退回快照中的原游标。
1056
+ */
1057
+ static fromSerialized<T = any>(data: SerializedUndoRedo<T>, options?: {
1058
+ isSavedStep?: (element: T) => boolean;
1059
+ }): UndoRedo<T>;
799
1060
  private elementList;
800
1061
  private listCursor;
801
1062
  private listMaxSize;
802
1063
  constructor(listMaxSize?: number);
1064
+ /**
1065
+ * 导出当前栈的可序列化快照(深克隆,避免外部改动污染内部状态)。
1066
+ * 配合 {@link UndoRedo.fromSerialized} 可在持久化后完整还原撤销/重做栈。
1067
+ */
1068
+ serialize(): SerializedUndoRedo<T>;
803
1069
  pushElement(element: T): void;
804
1070
  canUndo(): boolean;
805
1071
  /** 返回被撤销的操作 */
@@ -808,6 +1074,19 @@ declare class UndoRedo<T = any> {
808
1074
  /** 返回被重做的操作 */
809
1075
  redo(): T | null;
810
1076
  getCurrentElement(): T | null;
1077
+ /**
1078
+ * 用 `element` 替换当前游标所在元素(cursor - 1),并丢弃其后的重做尾部(与 {@link pushElement} 的丢尾一致),
1079
+ * 游标位置保持不变(元素数量不增)。cursor 为 0(无已应用元素)时不做任何操作并返回 false。
1080
+ * 用于「连续同类记录合并」等就地替换最新一条的场景。
1081
+ */
1082
+ replaceCurrentElement(element: T): boolean;
1083
+ /**
1084
+ * 对当前游标所在元素(cursor - 1)做就地更新;cursor 为 0(全部已撤销)时不做任何操作。
1085
+ * 用于给「当前步骤」打标记(如标记为已保存)等元数据写入场景。
1086
+ */
1087
+ updateCurrentElement(updater: (element: T) => void): void;
1088
+ /** 对栈内全部元素做就地更新。用于批量清理元数据(如清空所有元素的已保存标记)。 */
1089
+ updateElements(updater: (element: T, index: number) => void): void;
811
1090
  /**
812
1091
  * 返回栈内全部元素的浅克隆数组(按时间顺序,索引 0 为最早一步)。
813
1092
  * 仅用于历史面板等只读展示场景,不应直接修改返回值。
@@ -825,166 +1104,267 @@ declare class UndoRedo<T = any> {
825
1104
  }
826
1105
  //#endregion
827
1106
  //#region temp/packages/editor/src/services/history.d.ts
1107
+ declare const canUsePluginMethods$5: {
1108
+ sync: readonly ["push", "undo", "redo"];
1109
+ };
1110
+ type SyncMethodName$3 = Writable<(typeof canUsePluginMethods$5)['sync']>;
828
1111
  declare class History extends BaseService {
1112
+ state: {
1113
+ steps: {
1114
+ [x: string]: Record<Id, UndoRedo<any>>;
1115
+ page: Record<Id, UndoRedo<StepValue>>;
1116
+ codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
1117
+ dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
1118
+ };
1119
+ stepNames: Record<string, string>;
1120
+ };
1121
+ constructor();
829
1122
  /**
830
- * 把单个代码块栈拆成若干 group:
831
- * - 把"新增/删除"独立成组(语义上属于一次性事件,不应与 update 合并);
832
- * - 连续 'update' 合并到同一组,组内 steps 顺序就是发生顺序。
833
- */
834
- private static mergeCodeBlockSteps;
835
- private static mergeDataSourceSteps;
836
- /**
837
- * 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
1123
+ * 注册一个扩展历史类型,使其可与内置 `page` / `codeBlock` / `dataSource` 一样走统一的
1124
+ * {@link push} / {@link undo} / {@link redo}(按 id 分栈、独立 undo/redo)。
1125
+ *
1126
+ * @param stepType 自定义历史类型标识(勿与内置类型重名)
1127
+ * @param options.event push/undo/redo 后派发的事件名,缺省为 `${stepType}-history-change`
1128
+ * @param options.name 历史面板中的展示名称(tab / 分组标题等),缺省回退到 stepType 本身
838
1129
  */
839
- private static detectOpType;
1130
+ registerStepType(stepType: string, options?: {
1131
+ event?: string;
1132
+ name?: string;
1133
+ }): void;
840
1134
  /**
841
- * 把页面栈拆成若干 group:
842
- * - 单节点的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group;
843
- * - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单节点修改组);
844
- * - 多节点 'update'(如批量改属性)也独立成组(无明确单一目标,避免误合并)。
1135
+ * 读取指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
1136
+ * 未登记名称时回退到 stepType 本身。
845
1137
  */
846
- private static mergePageSteps;
1138
+ getStepName(stepType: HistoryStepType): string;
847
1139
  /**
848
- * 解析 StepValue 中的"目标节点 id"用于合并:
849
- * - 单节点 update:取唯一一项 updatedItems 的节点 id;
850
- * - 其它情形(多节点 update / add / remove):返回 undefined,表示不参与合并。
1140
+ * 设置指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
1141
+ * 内置 `page` / `codeBlock` / `dataSource` 也可在此覆盖默认中文名。
851
1142
  */
852
- private static detectPageTargetId;
853
- /** 解析 StepValue 中的目标节点可读名(用于 UI 展示)。 */
854
- private static detectPageTargetName;
855
- state: {
856
- pageId?: Id | undefined;
857
- pageSteps: Record<Id, UndoRedo<StepValue>>;
858
- canRedo: boolean;
859
- canUndo: boolean;
860
- codeBlockState: Record<Id, UndoRedo<CodeBlockStepValue>>;
861
- dataSourceState: Record<Id, UndoRedo<DataSourceStepValue>>;
862
- };
863
- constructor();
1143
+ setStepName(stepType: HistoryStepType, name: string): void;
864
1144
  reset(): void;
865
- resetPage(): void;
866
- changePage(page: MPage | MPageFragment): void;
867
1145
  resetState(): void;
868
1146
  /**
869
- * 把一条步骤推入指定页面的栈;不指定 pageId 时落到当前活动页。
1147
+ * 为指定历史栈(默认 `page`,也适用于 codeBlock / dataSource / 扩展类型)种入一条「初始基线」记录。
1148
+ *
1149
+ * 该记录是一条 `opType: 'initial'` 的 step,作为对应栈 **index 0 的固定底线**:
1150
+ * - 它是一条真实入栈的 step(随栈一起持久化),但被钉为撤销/回滚的下限——cursor 永不低于它,
1151
+ * 因此不会被 undo / goto / revert 触达(详见 {@link undo} / {@link undoFloor});
1152
+ * - 历史面板把它过滤出分组列表(见 {@link getHistoryGroups}),改由底部「初始」行展示。
1153
+ *
1154
+ * 仅当目标栈为空时种入(保证 initial 一定位于 index 0);已存在 initial 底线时不重复种入。
870
1155
  *
871
- * 跨页操作(例如 `moveToContainer` 把节点搬到其它页)必须显式传入 `pageId`,
872
- * 否则会把记录错误地落到操作发起页 / 当前激活页,破坏目标页 / 源页的撤销栈语义。
1156
+ * @param stepType 历史类型
1157
+ * @param id 目标栈 id(page pageId,其余类型为对应资源 id)
1158
+ * @param options 基线展示信息(名称 / 描述 / 来源)
1159
+ */
1160
+ setMarker(stepType: HistoryStepType, id: Id, options?: {
1161
+ name?: string;
1162
+ description?: string;
1163
+ source?: HistoryOpSource;
1164
+ extra?: Record<string, any>;
1165
+ }): StepValue | null;
1166
+ /**
1167
+ * 读取指定历史栈的初始基线 step(栈 index 0 且 `opType: 'initial'`);
1168
+ * 不存在或 id 缺省时返回 undefined。
873
1169
  */
874
- push(state: StepValue, pageId?: Id): StepValue | null;
1170
+ getMarker(stepType: HistoryStepType, id?: Id): StepValue | undefined;
875
1171
  /**
876
- * 推入一条代码块变更记录(与页面/节点完全无关),按 `codeBlockId` 维度独立一份 UndoRedo 栈。
1172
+ * 把一条步骤推入指定历史栈。统一入口,所有类型(page / codeBlock / dataSource / 扩展)行为完全一致:
1173
+ * 按 `stepType` 选择目标栈类型,按 `id`(必填)选择具体栈,按需建栈后入栈,并派发对应的历史变更事件
1174
+ * (`page` 为 `change`,其余见 {@link registerStepType}),回调签名统一为 `(id, step)`。
877
1175
  *
878
- * - 新增:oldContent = null,newContent = 新内容
879
- * - 更新:oldContent / newContent 都为对应内容
880
- * - 删除:newContent = null,oldContent = 删除前内容
881
- * - `changeRecords` 来自 form 端,撤销/重做时若有则按 propPath 局部覆盖;缺省才退化为整内容替换。
882
- * - 不直接驱动 codeBlockService,调用方负责实际写回。
883
- */
884
- pushCodeBlock(codeBlockId: Id, payload: {
885
- oldContent: CodeBlockContent | null;
886
- newContent: CodeBlockContent | null;
887
- changeRecords?: ChangeRecord[]; /** 可选的人类可读描述(如「修改按钮颜色」),仅用于历史面板展示。 */
888
- historyDescription?: string;
889
- }): CodeBlockStepValue | null;
1176
+ * 跨页 / 跨资源操作(如 `moveToContainer` 把节点搬到其它页)必须显式传入目标 id,
1177
+ * 否则无法落到正确的栈。step 可由 `createStackStep` 等构造后传入。
1178
+ *
1179
+ * @param stepType 历史类型
1180
+ * @param step 已构造好的历史记录(缺省自动补全 uuid / timestamp)
1181
+ * @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
1182
+ */
1183
+ push(stepType: 'page', step: StepValue, id: Id): StepValue | null;
1184
+ push(stepType: 'codeBlock', step: CodeBlockStepValue, id: Id): CodeBlockStepValue | null;
1185
+ push(stepType: 'dataSource', step: DataSourceStepValue, id: Id): DataSourceStepValue | null;
1186
+ push<T extends BaseStepValue>(stepType: string, step: T, id: Id): T | null;
890
1187
  /**
891
- * 推入一条数据源变更记录(与页面/节点完全无关),按 `dataSourceId` 维度独立一份 UndoRedo 栈。
892
- * 行为同 pushCodeBlock(新增 oldSchema=null;删除 newSchema=null)。
1188
+ * 撤销指定历史栈的最近一次变更。统一入口,所有类型行为一致:
1189
+ * `id`(必填)+ `stepType` 定位栈,不会越过 index 0 的 initial 基线(所有类型同等适用),
1190
+ * 仅在确有可撤销 step 时派发对应的历史变更事件(`page` 为 `change`,回调签名 `(id, step)`)。
1191
+ *
1192
+ * @param stepType 历史类型
1193
+ * @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
893
1194
  */
894
- pushDataSource(dataSourceId: Id, payload: {
895
- oldSchema: DataSourceSchema | null;
896
- newSchema: DataSourceSchema | null;
897
- changeRecords?: ChangeRecord[]; /** 可选的人类可读描述,仅用于历史面板展示。 */
898
- historyDescription?: string;
899
- }): DataSourceStepValue | null;
900
- /** 撤销指定代码块的最近一次变更。 */
901
- undoCodeBlock(codeBlockId: Id): CodeBlockStepValue | null;
902
- /** 重做指定代码块的下一次变更。 */
903
- redoCodeBlock(codeBlockId: Id): CodeBlockStepValue | null;
904
- /** 是否可对指定代码块撤销。 */
905
- canUndoCodeBlock(codeBlockId: Id): boolean;
906
- /** 是否可对指定代码块重做。 */
907
- canRedoCodeBlock(codeBlockId: Id): boolean;
908
- /** 撤销指定数据源的最近一次变更。 */
909
- undoDataSource(dataSourceId: Id): DataSourceStepValue | null;
910
- /** 重做指定数据源的下一次变更。 */
911
- redoDataSource(dataSourceId: Id): DataSourceStepValue | null;
912
- /** 是否可对指定数据源撤销。 */
913
- canUndoDataSource(dataSourceId: Id): boolean;
914
- /** 是否可对指定数据源重做。 */
915
- canRedoDataSource(dataSourceId: Id): boolean;
916
- undo(): StepValue | null;
917
- redo(): StepValue | null;
1195
+ undo(stepType: 'page', id: Id): StepValue | null;
1196
+ undo(stepType: 'codeBlock', id: Id): CodeBlockStepValue | null;
1197
+ undo(stepType: 'dataSource', id: Id): DataSourceStepValue | null;
1198
+ undo<T extends BaseStepValue>(stepType: string, id: Id): T | null;
1199
+ /**
1200
+ * 重做指定历史栈的下一次变更。语义与 {@link undo} 对称,详见其说明。
1201
+ *
1202
+ * @param stepType 历史类型
1203
+ * @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id),必填
1204
+ */
1205
+ redo(stepType: 'page', id: Id): StepValue | null;
1206
+ redo(stepType: 'codeBlock', id: Id): CodeBlockStepValue | null;
1207
+ redo(stepType: 'dataSource', id: Id): DataSourceStepValue | null;
1208
+ redo<T extends BaseStepValue>(stepType: string, id: Id): T | null;
1209
+ /**
1210
+ * 是否可对指定历史栈撤销(cursor 高于 initial 基线底线)。
1211
+ * @param stepType 历史类型
1212
+ * @param id 目标栈 id;缺省 / 无效时返回 false
1213
+ */
1214
+ canUndo(stepType: HistoryStepType, id?: Id): boolean;
1215
+ /**
1216
+ * 是否可对指定历史栈重做。
1217
+ * @param stepType 历史类型
1218
+ * @param id 目标栈 id;缺省 / 无效时返回 false
1219
+ */
1220
+ canRedo(stepType: HistoryStepType, id?: Id): boolean;
1221
+ /** 读取指定页面历史栈当前游标所在的 step(cursor - 1);无则返回 null。 */
1222
+ getCurrentPageStep(pageId: Id): StepValue | null;
1223
+ /**
1224
+ * 用 `state` 替换指定页面栈当前游标所在的 step(并丢弃其后的重做尾部),游标不变。
1225
+ * 用于「连续 set root 记录合并」等就地替换最新一条的场景;替换成功后派发 `change`。
1226
+ */
1227
+ replaceCurrentStep(stepType: HistoryStepType, state: StepValue, id: Id): StepValue | null;
918
1228
  destroy(): void;
919
1229
  /**
920
- * 取出当前活动页的历史步骤平铺列表(包含已应用 + 已撤销)。
921
- * 列表按时间正序,最早一步在最前面。
922
- * 通常 UI 应使用 `getPageHistoryGroups` 取已合并分组的版本;本方法仅为兼容/调试保留。
1230
+ * 清空历史记录栈。统一入口,所有类型(page / codeBlock / dataSource / 扩展)行为一致:
1231
+ * - 传入 `id`:仅清空 `stepType` 下该 id 对应的栈;
1232
+ * - 缺省 `id`:清空 `stepType` 下的全部栈。
1233
+ *
1234
+ * 仅删除撤销/重做记录,不会改动 DSL / 代码块 / 数据源本身。清空时会**保留各栈原有的
1235
+ * initial 基线**(文案 / 来源),无基线时清空成空栈。清空后派发 `clear`(签名 `(id, stepType)`)。
1236
+ *
1237
+ * @param stepType 历史类型
1238
+ * @param id 目标栈 id;缺省表示清空该类型下全部栈
923
1239
  */
924
- getPageStepList(pageId?: Id): PageHistoryStepEntry[];
1240
+ clear(stepType: HistoryStepType, id?: Id): void;
925
1241
  /**
926
- * 取出当前活动页的历史栈,按"目标节点"做相邻合并:
927
- * - 连续修改同一节点(单节点 update)的多步合并为一个 group,组内可展开查看每步;
928
- * - add / remove / 多节点 update 始终独立成组。
929
- * 用于历史面板的"页面"tab 展示。
1242
+ * 标记历史记录为「已保存」(把对应栈当前游标所在的记录标为 `saved`)。统一入口:
1243
+ * - 缺省 `id`:标记**全部类型、全部栈**(整份 DSL 落库场景),派发 `mark-saved` 且 `kind: 'all'`;
1244
+ * - 传入 `id`:仅标记 `stepType` 下该 id 对应的栈,派发 `mark-saved` 且 `kind` 为 `stepType`。
1245
+ *
1246
+ * 同一栈内任意时刻最多只有一条记录为 `saved`;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
1247
+ *
1248
+ * @param stepType 历史类型
1249
+ * @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
930
1250
  */
931
- getPageHistoryGroups(pageId?: Id): PageHistoryGroup[];
1251
+ markSaved(stepType: HistoryStepType, id?: Id): void;
1252
+ /**
1253
+ * 派发「页面 / 页面片结构变更」事件(`page-structure-change`)。
1254
+ *
1255
+ * 常规 `editorService.add` / `remove` 页面节点不会写入 `page` 历史栈(见 editor.add / remove 中
1256
+ * 对 isPageOrFragment 的分支),因此不会产生任何 historyService 事件。该方法用于在这些
1257
+ * 场景(以及 setRoot 整体替换 DSL 增删页面)下,向外统一通知页面结构的增删变化,供业务方感知。
1258
+ *
1259
+ * 一次操作涉及多个页面时,调用方应把本次增删的页面**合并为一个 change 一次性传入**,
1260
+ * 使一次操作只派发一个事件;`add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
1261
+ *
1262
+ * @param change 本次结构变更:{ add: 新增的页面列表, remove: 删除的页面列表 }
1263
+ */
1264
+ notifyPageStructureChange(change: {
1265
+ add: (MPage | MPageFragment)[];
1266
+ remove: (MPage | MPageFragment)[];
1267
+ }): void;
932
1268
  /**
933
- * 取出全部代码块的历史栈,按 codeBlockId 分组。
934
- * 同一栈内相邻、同 opType 且作用于同一 id 的多步会被合并为一个 group:
935
- * - 这正是"代码块/数据源各自按 id 分栈"的天然表现,再叠加"连续修改同目标的相邻步骤合并展示"。
936
- * - 合并后 group 暴露子步骤数组,UI 可展开查看每一步的 changeRecords。
937
- * - applied 字段:组内最后一步是否处于已应用段。
1269
+ * 把当前内存中的全部历史栈(页面 / 代码块 / 数据源 / 扩展类型)序列化后写入本地 IndexedDB。
1270
+ *
1271
+ * - 每个 UndoRedo 栈连同其游标、容量一并保存,恢复后可继续 undo/redo;
1272
+ * - `key` 用于区分不同活动页 / 项目(同一 store 下可保存多份快照),缺省为 `default`;
1273
+ * - 返回写入成功的快照对象,便于调用方记录 savedAt 等信息;
1274
+ * - 不支持 IndexedDB 的环境(如 SSR)会 reject。
938
1275
  */
939
- getCodeBlockHistoryGroups(): CodeBlockHistoryGroup[];
1276
+ saveToIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState>;
940
1277
  /**
941
- * 读取指定页面历史栈的当前游标(已应用步骤数量)。不传则取当前活动页。
942
- * 没有对应栈时返回 0。
1278
+ * 从本地 IndexedDB 读取此前保存的历史快照并重建全部撤销/重做栈。
1279
+ *
1280
+ * - 读取到的每个栈都会经 {@link UndoRedo.fromSerialized} 还原(含游标),随后可直接 undo/redo;
1281
+ * - 会整体覆盖当前内存中的历史状态(活动页由 editorService 维护,不在此恢复);
1282
+ * - 找不到对应记录时返回 null,且不改动当前状态;
1283
+ * - 不支持 IndexedDB 的环境(如 SSR)会 reject。
943
1284
  */
944
- getPageCursor(pageId?: Id): number;
945
- /** 读取指定代码块历史栈的当前游标。 */
946
- getCodeBlockCursor(codeBlockId: Id): number;
947
- /** 读取指定数据源历史栈的当前游标。 */
948
- getDataSourceCursor(dataSourceId: Id): number;
1285
+ restoreFromIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState | null>;
949
1286
  /**
950
- * 取出指定代码块历史栈的平铺步骤列表(含 applied 标记)。供 revert 等按 index 索引步骤使用。
1287
+ * 取出指定历史类型(页面 / 代码块 / 数据源 / 扩展类型)某个栈的平铺步骤列表(含 applied 标记)。
1288
+ * 统一入口,替代旧的 `getPageStepList` / `getCodeBlockStepList` / `getDataSourceStepList`。
1289
+ *
1290
+ * 列表按时间正序,最早一步在最前面;`applied` 表示该步骤处于栈游标之前(已应用)。
1291
+ * 供 revert / goto 等按 index 索引步骤的场景使用。通常 UI 应使用
1292
+ * {@link getHistoryGroups} 取已合并分组的版本;本方法仅为兼容/调试保留。
1293
+ *
1294
+ * @param stepType 历史类型
1295
+ * @param id 目标栈 id(page 为 pageId,其余类型为对应资源 id);缺省 / 无效时返回空数组
951
1296
  */
952
- getCodeBlockStepList(codeBlockId: Id): {
953
- step: CodeBlockStepValue;
954
- index: number;
955
- applied: boolean;
956
- }[];
1297
+ getStepList(stepType: 'page', id?: Id): HistoryStepEntry<StepValue>[];
1298
+ getStepList(stepType: 'codeBlock', id: Id): HistoryStepEntry<CodeBlockStepValue>[];
1299
+ getStepList(stepType: 'dataSource', id: Id): HistoryStepEntry<DataSourceStepValue>[];
1300
+ getStepList<T extends BaseStepValue>(stepType: HistoryStepType, id?: Id): HistoryStepEntry<T>[];
957
1301
  /**
958
- * 取出指定数据源历史栈的平铺步骤列表(含 applied 标记)。供 revert 等按 index 索引步骤使用。
1302
+ * 取出指定历史类型的历史分组(页面 / 代码块 / 数据源 / 扩展类型统一入口)。
1303
+ *
1304
+ * 把目标栈的步骤列表按"目标"做相邻合并(连续修改同一目标的 update 合并为一组,组内可展开查看每步;
1305
+ * add / remove / 多实体 update 始终独立成组),并过滤掉 index 0 的 initial 基线(底部「初始」行由
1306
+ * {@link getMarker} 驱动)。各类型行为完全一致,仅 `kind` 与 step 快照类型不同。
1307
+ *
1308
+ * 作用域:
1309
+ * - 传入 `id`:仅取该 id 对应的单个栈(页面历史按活动页查看,传入 pageId);
1310
+ * - 缺省 `id`:遍历该类型下全部栈并汇总(代码块 / 数据源按全部资源分桶展示)。
1311
+ *
1312
+ * @param stepType 历史类型,缺省 `page`
1313
+ * @param id 目标栈 id;缺省表示遍历该类型下全部栈
959
1314
  */
960
- getDataSourceStepList(dataSourceId: Id): {
961
- step: DataSourceStepValue;
962
- index: number;
963
- applied: boolean;
964
- }[];
1315
+ getHistoryGroups(stepType: 'page', id?: Id): HistoryGroup<StepValue>[];
1316
+ getHistoryGroups(stepType: 'codeBlock', id?: Id): HistoryGroup<CodeBlockStepValue>[];
1317
+ getHistoryGroups(stepType: 'dataSource', id?: Id): HistoryGroup<DataSourceStepValue>[];
1318
+ getHistoryGroups<T extends BaseStepValue>(stepType: HistoryStepType, id?: Id): HistoryGroup<T>[];
965
1319
  /**
966
- * 取出全部数据源的历史栈,按 dataSourceId 分组。同上。
1320
+ * 读取指定历史栈的当前游标(已应用步骤数量)。统一入口,替代旧的
1321
+ * `getPageCursor` / `getCodeBlockCursor` / `getDataSourceCursor`。
1322
+ * - `id` 缺省或非法、或对应栈不存在时返回 0;
1323
+ * - `stepType` 支持 `page` / `codeBlock` / `dataSource` / 扩展类型。
967
1324
  */
968
- getDataSourceHistoryGroups(): DataSourceHistoryGroup[];
1325
+ getCursor(stepType: HistoryStepType, id?: Id): number;
969
1326
  /**
970
- * 取出指定页面的栈;不传 pageId 时按当前活动页取。
1327
+ * 按历史记录 uuid 在指定历史类型的栈中查找其所属 id 与索引,统一入口,替代旧的
1328
+ * `getPageStepIndexByUuid` / `findCodeBlockStepLocationByUuid` / `findDataSourceStepLocationByUuid`。
1329
+ *
1330
+ * - 传入 `id`:仅在该 id 对应的单个栈中查找(如页面历史按活动页查看,传入 pageId);
1331
+ * - 缺省 `id`:遍历该类型下全部栈查找(代码块 / 数据源等按全部资源分桶的场景)。
1332
+ *
1333
+ * 找不到时返回 null。供「按 uuid 回滚」等需要把 uuid 映射回 (id, index) 的场景使用。
971
1334
  *
972
- * 跨页 push 时如果目标页的栈尚不存在(用户从未进入过该页),会按需创建一条空栈,
973
- * 这样切到目标页时 Ctrl+Z 也能撤回该步骤。
1335
+ * @param stepType 历史类型
1336
+ * @param uuid 目标历史记录的 uuid
1337
+ * @param id 目标栈 id;缺省表示遍历该类型下全部栈
974
1338
  */
975
- private getUndoRedo;
976
- private setCanUndoRedo;
1339
+ findStepLocationByUuid(stepType: HistoryStepType, uuid: string, id?: Id): {
1340
+ id: Id;
1341
+ index: number;
1342
+ } | null;
1343
+ usePlugin(options: SyncHookPlugin<SyncMethodName$3, History>): void;
1344
+ emit<Name extends keyof HistoryEvents, Param extends HistoryEvents[Name]>(eventName: Name, ...args: Param): boolean;
977
1345
  /**
978
- * id 获取(或创建)指定代码块的 UndoRedo 栈。
1346
+ * 取出指定历史类型的栈桶(`Record<id, UndoRedo>`);不存在时按需创建空桶,
1347
+ * 从而支持通过 {@link registerStepType} 或首次 push 动态扩展历史类型。
979
1348
  */
980
- private getCodeBlockUndoRedo;
1349
+ private getStepBucket;
981
1350
  /**
982
- * id 获取(或创建)指定数据源的 UndoRedo 栈。
1351
+ * 清空单个历史栈并按需重建其 initial 基线(保留原基线的文案 / 来源)。
983
1352
  */
984
- private getDataSourceUndoRedo;
1353
+ private clearStack;
1354
+ /** 入栈前补全 step 的 uuid / timestamp(调用方未指定时)。 */
1355
+ private fillStepMeta;
1356
+ /** 校验「按 id 分栈」类型(codeBlock / dataSource / 扩展)的 id 是否有效。 */
1357
+ private isValidStackId;
1358
+ /** 清空全部历史栈内容(保留已注册的类型键,使扩展类型在 reset 后仍可用)。 */
1359
+ private clearAllSteps;
1360
+ /**
1361
+ * 把基础 dbName 与当前 DSL(root app)的 id 拼成最终库名,实现不同应用历史隔离。
1362
+ * 取不到 app id(如尚未加载 DSL)时退回基础 dbName。
1363
+ */
1364
+ private resolveDbName;
985
1365
  }
986
1366
  type HistoryService = History;
987
- declare const _default$41: History;
1367
+ declare const _default$47: History;
988
1368
  //#endregion
989
1369
  //#region temp/packages/editor/src/services/keybinding.d.ts
990
1370
  declare class Keybinding extends BaseService {
@@ -1023,6 +1403,7 @@ declare class Keybinding extends BaseService {
1023
1403
  private getKeyconKeys;
1024
1404
  }
1025
1405
  type KeybindingService = Keybinding;
1406
+ declare const _default$48: Keybinding;
1026
1407
  //#endregion
1027
1408
  //#region temp/packages/editor/src/services/props.d.ts
1028
1409
  declare const canUsePluginMethods$4: {
@@ -1122,7 +1503,7 @@ declare class Props extends BaseService {
1122
1503
  private setRelateId;
1123
1504
  }
1124
1505
  type PropsService = Props;
1125
- declare const _default$43: Props;
1506
+ declare const _default$50: Props;
1126
1507
  //#endregion
1127
1508
  //#region temp/packages/editor/src/services/stageOverlay.d.ts
1128
1509
  declare const canUsePluginMethods$3: {
@@ -1149,7 +1530,7 @@ declare class StageOverlay extends BaseService {
1149
1530
  private updateSelectStatus;
1150
1531
  }
1151
1532
  type StageOverlayService = StageOverlay;
1152
- declare const _default$44: StageOverlay;
1533
+ declare const _default$51: StageOverlay;
1153
1534
  //#endregion
1154
1535
  //#region temp/packages/editor/src/services/storage.d.ts
1155
1536
  interface Options$1 {
@@ -1212,7 +1593,7 @@ declare class WebStorage extends BaseService {
1212
1593
  private getValueAndProtocol;
1213
1594
  }
1214
1595
  type StorageService = WebStorage;
1215
- declare const _default$45: WebStorage;
1596
+ declare const _default$52: WebStorage;
1216
1597
  //#endregion
1217
1598
  //#region temp/packages/editor/src/services/ui.d.ts
1218
1599
  declare const canUsePluginMethods$1: {
@@ -1232,7 +1613,7 @@ declare class Ui extends BaseService {
1232
1613
  private setStageRect;
1233
1614
  }
1234
1615
  type UiService = Ui;
1235
- declare const _default$46: Ui;
1616
+ declare const _default$53: Ui;
1236
1617
  //#endregion
1237
1618
  //#region temp/packages/editor/src/type.d.ts
1238
1619
  type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
@@ -1253,7 +1634,7 @@ interface FrameworkSlots {
1253
1634
  empty(props: {}): any;
1254
1635
  workspace(props: {}): any;
1255
1636
  'props-panel'(props: {}): any;
1256
- 'footer'(props: {}): any;
1637
+ footer(props: {}): any;
1257
1638
  'page-bar'(props: {}): any;
1258
1639
  'page-bar-add-button'(props: {}): any;
1259
1640
  'page-bar-title'(props: {
@@ -1324,6 +1705,7 @@ type SidebarSlots = LayerPanelSlots & CodeBlockListPanelSlots & ComponentListPan
1324
1705
  type BeforeAdd = (config: MNode, parent: MContainer) => Promise<MNode> | MNode;
1325
1706
  type GetConfig = (config: FormConfig) => Promise<FormConfig> | FormConfig;
1326
1707
  interface EditorInstallOptions {
1708
+ flat?: boolean;
1327
1709
  parseDSL: <T = any>(dsl: string) => T;
1328
1710
  customCreateMonacoEditor: (monaco: typeof import('monaco-editor'), codeEditorEl: HTMLElement, options: Monaco.editor.IStandaloneEditorConstructionOptions & {
1329
1711
  editorCustomType?: string;
@@ -1353,6 +1735,11 @@ interface StageOptions {
1353
1735
  containerHighlightClassName?: string;
1354
1736
  containerHighlightDuration?: number;
1355
1737
  containerHighlightType?: ContainerHighlightType;
1738
+ /**
1739
+ * 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
1740
+ * 开启后在画布中拖动已有组件不会识别容器,默认 false
1741
+ */
1742
+ containerHighlightAddOnly?: boolean;
1356
1743
  disabledDragStart?: boolean;
1357
1744
  render?: (stage: StageCore$1) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
1358
1745
  moveableOptions?: CustomizeMoveableOptions;
@@ -1376,10 +1763,29 @@ interface StageOptions {
1376
1763
  */
1377
1764
  alwaysMultiSelect?: boolean;
1378
1765
  disabledRule?: boolean;
1766
+ /**
1767
+ * 禁用「非点击画布选中组件时(如从图层树、面包屑等外部选中),对选中区域做高亮闪烁提示」,
1768
+ * 默认 false(即默认开启闪烁)
1769
+ */
1770
+ disabledFlashTip?: boolean;
1379
1771
  zoom?: number;
1380
1772
  /** 画布双击前的钩子函数,返回 false 则阻止默认的双击行为 */
1381
1773
  beforeDblclick?: (event: MouseEvent) => Promise<boolean | void> | boolean | void;
1382
1774
  }
1775
+ /**
1776
+ * 节点校验错误信息,按来源(属性表单 / 样式表单)分别保存错误文案。
1777
+ * 属性表单与样式表单是两个独立的 FormPanel,均指向同一节点,故以来源为键,
1778
+ * 避免某个面板校验通过时误清另一个面板记录的错误。
1779
+ * 节点视为存在错误当且仅当任一来源存在非空文本。
1780
+ */
1781
+ interface NodeInvalidInfo {
1782
+ /** 属性表单校验错误文案(可能为包含 <br> 的 HTML) */
1783
+ props?: string;
1784
+ /** 样式表单校验错误文案(可能为包含 <br> 的 HTML) */
1785
+ style?: string;
1786
+ }
1787
+ /** 节点校验错误来源 */
1788
+ type NodeInvalidSource = keyof NodeInvalidInfo;
1383
1789
  interface StoreState {
1384
1790
  root: MApp | null;
1385
1791
  page: MPage | MPageFragment | null;
@@ -1390,6 +1796,8 @@ interface StoreState {
1390
1796
  stage: StageCore$1 | null;
1391
1797
  stageLoading: boolean;
1392
1798
  modifiedNodeIds: Map<Id, Id>;
1799
+ /** 校验失败的节点错误信息,按节点 id 存储,供组件树标记与保存拦截读取 */
1800
+ invalidNodeIds: Map<Id, NodeInvalidInfo>;
1393
1801
  pageLength: number;
1394
1802
  pageFragmentLength: number;
1395
1803
  disabledMultiSelect: boolean;
@@ -1456,6 +1864,12 @@ interface UiState {
1456
1864
  stageRect: StageRect;
1457
1865
  /** 编辑器列布局每一列的宽度,分为左中右三列 */
1458
1866
  columnWidth: GetColumnWidth;
1867
+ /** 编辑器列布局左侧列最小宽度 */
1868
+ minLeftColumnWidth: number;
1869
+ /** 编辑器列布局中间列最小宽度 */
1870
+ minCenterColumnWidth: number;
1871
+ /** 编辑器列布局右侧列最小宽度 */
1872
+ minRightColumnWidth: number;
1459
1873
  /** 是否显示画布参考线,true: 显示,false: 不显示,默认为true */
1460
1874
  showGuides: boolean;
1461
1875
  /** 画布上是否存在参考线 */
@@ -1472,6 +1886,8 @@ interface UiState {
1472
1886
  hideSlideBar: boolean;
1473
1887
  /** 侧边栏面板配置 */
1474
1888
  sideBarItems: SideComponent[];
1889
+ /** 当前激活的侧边栏面板 */
1890
+ sideBarActiveTabName: string;
1475
1891
  navMenuRect: {
1476
1892
  left: number;
1477
1893
  top: number;
@@ -1489,6 +1905,7 @@ interface EditorNodeInfo {
1489
1905
  node: MNode | null;
1490
1906
  parent: MContainer | null;
1491
1907
  page: MPage | MPageFragment | null;
1908
+ path: MNode[];
1492
1909
  }
1493
1910
  interface AddMNode {
1494
1911
  type: string;
@@ -1539,6 +1956,9 @@ interface MenuButton {
1539
1956
  items?: MenuButton[];
1540
1957
  /** 唯一标识,用于高亮 */
1541
1958
  id?: string | number;
1959
+ buttonProps?: {
1960
+ type?: string;
1961
+ };
1542
1962
  }
1543
1963
  interface MenuComponent {
1544
1964
  type: 'component';
@@ -1597,6 +2017,106 @@ interface SideComponent extends MenuComponent {
1597
2017
  props?: Record<string, any>;
1598
2018
  };
1599
2019
  }
2020
+ /**
2021
+ * 历史记录面板(HistoryListPanel)的自定义扩展 tab。
2022
+ *
2023
+ * 业务方可通过 Editor 的 `historyListExtraTabs` 注入额外的历史记录 tab,
2024
+ * 例如某个自定义模块维护自己的操作历史时,可以在历史记录面板中增加一个
2025
+ * 独立的 tab 来展示与回滚。内置的「页面 / 数据源 / 代码块」三个 tab 之后
2026
+ * 会依次追加这些扩展 tab。
2027
+ */
2028
+ interface HistoryListExtraTab {
2029
+ /** tab 唯一标识,作为 TMagicTabs 的 name */
2030
+ name: string;
2031
+ /** tab 显示文案,支持传入函数以展示动态内容(如记录数量) */
2032
+ label: string | (() => string);
2033
+ /** tab 内容区渲染的组件(Vue 组件或字符串标签) */
2034
+ component: any;
2035
+ /** 传入内容组件的 props */
2036
+ props?: Record<string, any>;
2037
+ /** 内容组件的事件监听 */
2038
+ listeners?: Record<string, (..._args: any[]) => any>;
2039
+ }
2040
+ /**
2041
+ * 对比表单(CompareForm)的对比类型:
2042
+ * - node: 节点组件,按 `type` 从 propsService 获取属性表单配置
2043
+ * - data-source: 数据源,按 `type`(base/http/...) 从 dataSourceService 获取数据源表单配置
2044
+ * - code-block: 数据源代码块,使用内置的代码块表单配置
2045
+ */
2046
+ type CompareCategory = 'node' | 'data-source' | 'code-block' | string;
2047
+ /**
2048
+ * 自定义 `loadConfig` 时回传的上下文,聚合了组件当前的对比入参,
2049
+ * 方便调用方在外部按需拼装 FormConfig。
2050
+ */
2051
+ interface CompareFormLoadConfigContext {
2052
+ /** 对比类型,见 CompareCategory */
2053
+ category: string;
2054
+ /** 节点 / 数据源类型 */
2055
+ type?: string;
2056
+ /** 数据源代码块场景下的数据源类型 */
2057
+ dataSourceType?: string;
2058
+ /**
2059
+ * 内置的默认 FormConfig 加载逻辑(按 `category` 从 propsService / dataSourceService /
2060
+ * 代码块工具取配置)。自定义 `loadConfig` 可调用它复用默认结果,再做二次加工。
2061
+ */
2062
+ defaultLoadConfig: () => Promise<FormConfig>;
2063
+ }
2064
+ /**
2065
+ * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category` 取配置逻辑,
2066
+ * 可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
2067
+ */
2068
+ type CompareFormLoadConfig = (ctx: CompareFormLoadConfigContext) => FormConfig | Promise<FormConfig>;
2069
+ /**
2070
+ * CompareForm / ViewForm 共用的基础 props。
2071
+ * 两者都基于同一套「按 category 加载 FormConfig + 注入 services/stage」的逻辑(见 useCompareForm),
2072
+ * 差异仅在于是否做新旧值对比。这里抽出公共字段避免重复定义。
2073
+ */
2074
+ interface CompareFormBaseProps {
2075
+ /** 当前值(对比场景下为修改后的值) */
2076
+ value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
2077
+ /**
2078
+ * 类型说明:
2079
+ * - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
2080
+ * - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
2081
+ * - `category` 为 `code-block` 时,`type` 可不传
2082
+ */
2083
+ type?: string;
2084
+ /** 表单配置类别,决定从哪里取 FormConfig */
2085
+ category?: CompareCategory;
2086
+ /** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
2087
+ dataSourceType?: string;
2088
+ labelWidth?: string;
2089
+ /**
2090
+ * 外层容器高度。设置后表单内容超出时会在组件内部出现滚动条,
2091
+ * 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
2092
+ */
2093
+ height?: string;
2094
+ /**
2095
+ * 用户自定义注入到 MForm.formState 的扩展字段,与 Editor 顶层的 `extendFormState`、
2096
+ * PropsPanel 的 `extend-state` 语义一致。表单 item 的 `display` / `disabled` 等
2097
+ * filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
2098
+ * 因此在对比 / 展示场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
2099
+ */
2100
+ extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
2101
+ /**
2102
+ * 外部透传的基础 formState(通常来自 PropsPanel 主属性表单)。
2103
+ * 组件会提取其中的扩展字段覆盖到自己的 formState,保证 filterFunction 上下文一致。
2104
+ */
2105
+ baseFormState?: FormState;
2106
+ /**
2107
+ * 表单内组件的尺寸(透传给 MForm 的 `size`),可选 'large' | 'default' | 'small'。
2108
+ * 缺省时使用 MForm 内置默认尺寸。
2109
+ */
2110
+ size?: FieldSize;
2111
+ /**
2112
+ * 自定义 FormConfig 加载逻辑。传入后将接管内置的按 `category`(node/data-source/code-block)
2113
+ * 取配置逻辑,调用方可根据业务自行返回(或异步返回)表单配置。可通过
2114
+ * `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
2115
+ */
2116
+ loadConfig?: CompareFormLoadConfig;
2117
+ /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
2118
+ services?: Services;
2119
+ }
1600
2120
  declare enum SideItemKey {
1601
2121
  COMPONENT_LIST = "component-list",
1602
2122
  LAYER = "layer",
@@ -1704,112 +2224,236 @@ interface CodeParamStatement {
1704
2224
  type?: string | TypeFunction<string>;
1705
2225
  [key: string]: any;
1706
2226
  }
1707
- type HistoryOpType = 'add' | 'remove' | 'update';
1708
- interface StepValue {
1709
- /** 页面信息 */
2227
+ /**
2228
+ * 历史记录操作类型:
2229
+ * - `add` / `remove` / `update`:普通可撤销/重做的节点变更;
2230
+ * - `initial`:页面「未修改的初始状态」基线(设置 root 时生成),作为页面栈 index 0 的固定底线 step。
2231
+ * 该 step 不可被撤销/回滚(cursor 不会低于它),仅用于历史面板底部的初始行展示。
2232
+ */
2233
+ type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
2234
+ /**
2235
+ * 历史记录的「操作途径」——标记本次变更由哪条交互入口触发,仅用于历史面板展示 / 业务埋点,
2236
+ * 不影响 undo/redo 行为。缺省(未传)时 UI 视为「未知」。
2237
+ *
2238
+ * - `stage`:画布(拖拽 / 缩放 / 排序等舞台直接操作)
2239
+ * - `tree`:树形面板(图层 / 数据源 / 代码块等树形结构里的拖拽 / 菜单操作)
2240
+ * - `component-panel`:组件面板(左侧组件列表点击 / 拖拽新增组件)
2241
+ * - `props`:配置面板表单(属性表单字段编辑)
2242
+ * - `code`:源码编辑器(配置面板「源码」面板里直接编辑 JSON/代码后保存)
2243
+ * - `stage-contextmenu`:画布右键菜单(舞台上节点的右键上下文菜单)
2244
+ * - `tree-contextmenu`:树面板右键菜单(图层 / 数据源 / 代码块等树形列表上的右键上下文菜单)
2245
+ * - `toolbar`:工具栏菜单(顶部导航工具栏按钮)
2246
+ * - `shortcut`:键盘快捷键
2247
+ * - `rollback`:历史回滚(历史面板里对某条历史「回滚」,反向应用为一条新记录,类 git revert)
2248
+ * - `api`:代码 / 接口调用(程序化触发)
2249
+ * - `ai`:AI 生成 / 智能助手触发的变更
2250
+ * - `unknown`:未知来源
2251
+ *
2252
+ * 通过 `(string & {})` 允许业务侧扩展自定义途径字符串,同时保留内置值的自动补全。
2253
+ */
2254
+ type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
2255
+ /** *AndGetHistoryId 系列方法返回值:原操作结果 + 本次写入历史记录的 uuid 列表(未入栈时为 `[]`)。 */
2256
+ type DslOpWithHistoryIdsResult<T> = {
2257
+ result: T;
2258
+ historyIds: string[];
2259
+ };
2260
+ /**
2261
+ * 单条变更的 diff 描述,统一表达「页面节点 / 代码块 / 数据源」的变化内容,
2262
+ * 被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 的 `diff` 复用。
2263
+ *
2264
+ * 按 `opType` 区分携带的字段:
2265
+ * - `add`:仅 `newSchema`(页面节点还带 `parentId` / `index`);
2266
+ * - `remove`:仅 `oldSchema`(页面节点还带 `parentId` / `index`);
2267
+ * - `update`:`oldSchema` + `newSchema`,并可带 `changeRecords` 做局部更新。
2268
+ *
2269
+ * 泛型 `T` 为变化内容的快照类型:页面节点为 `MNode`,代码块为 `CodeBlockContent`,数据源为 `DataSourceSchema`。
2270
+ */
2271
+ interface StepDiffItem<T = unknown> {
2272
+ /** 变更后的内容快照。`opType` 为 `add` / `update` 时有,`remove` 时无。 */
2273
+ newSchema?: T;
2274
+ /** 变更前的内容快照。`opType` 为 `remove` / `update` 时有,`add` 时无。 */
2275
+ oldSchema?: T;
2276
+ /** 父节点 id。仅页面节点有(数据源 / 代码块没有父节点)。 */
2277
+ parentId?: Id;
2278
+ /** 在父节点 items 数组中的索引。仅页面节点有(数据源 / 代码块无需排序)。 */
2279
+ index?: number;
2280
+ /**
2281
+ * form 端 propPath/value 变更列表,仅 `opType` 为 `update` 时有;
2282
+ * 撤销/重做时若有则按 propPath 局部更新,缺省才退化为整内容替换。
2283
+ */
2284
+ changeRecords?: ChangeRecord[];
2285
+ }
2286
+ /**
2287
+ * 历史记录条目公共字段,被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 复用。
2288
+ *
2289
+ * 泛型 `T` 为 `diff` 中变化内容的快照类型(页面节点 `MNode` / 代码块 `CodeBlockContent` / 数据源 `DataSourceSchema`)。
2290
+ */
2291
+ interface BaseStepValue<T = unknown, U extends Record<string, any> = {}> {
2292
+ /**
2293
+ * 历史记录唯一标识(uuid)。入栈时自动写入(若调用方未指定),
2294
+ * 用于精确定位 / 引用某一条历史记录(如 revert、埋点、跨端同步等)。
2295
+ * 注意与 `data.id`(关联的页面 / 代码块 / 数据源 id)区分。
2296
+ */
2297
+ uuid: string;
2298
+ /**
2299
+ * 关联目标信息:`id` 为关联的页面 / 代码块 / 数据源等资源 id(也是历史栈的分组 key),
2300
+ * `name` 为展示名。所有历史类型统一携带。
2301
+ */
1710
2302
  data: {
1711
2303
  name: string;
1712
2304
  id: Id;
1713
2305
  };
2306
+ /** 操作类型:新增 / 删除 / 更新(三类历史记录统一携带)。 */
1714
2307
  opType: HistoryOpType;
1715
- /** 操作前选中的节点 ID,用于撤销后恢复选择状态 */
1716
- selectedBefore: Id[];
1717
- /** 操作后选中的节点 ID,用于重做后恢复选择状态 */
1718
- selectedAfter: Id[];
1719
- modifiedNodeIds: Map<Id, Id>;
1720
- /** opType 'add': 新增的节点 */
1721
- nodes?: MNode[];
1722
- /** opType 'add': 父节点 ID */
1723
- parentId?: Id;
1724
- /** opType 'add': 每个新增节点在父节点 items 中的索引 */
1725
- indexMap?: Record<string, number>;
1726
- /** opType 'remove': 被删除的节点及其位置信息 */
1727
- removedItems?: {
1728
- node: MNode;
1729
- parentId: Id;
1730
- index: number;
1731
- }[];
1732
2308
  /**
1733
- * opType 'update': 变更前后的节点快照
1734
- *
1735
- * `changeRecords` 来自 form 端的 propPath/value 列表,撤销/重做时只对这些 propPath 做局部更新;
1736
- * 缺省(未传 / 空数组)才退化为整节点替换。
2309
+ * 本次变更的内容(统一 diff 表达),每项见 {@link StepDiffItem}。
2310
+ * 页面节点(add/remove 多节点、update 多节点)会有多项,代码块 / 数据源通常只有一项。
1737
2311
  */
1738
- updatedItems?: {
1739
- oldNode: MNode;
1740
- newNode: MNode;
1741
- changeRecords?: ChangeRecord[];
1742
- }[];
2312
+ diff: StepDiffItem<T>[];
1743
2313
  /**
1744
2314
  * 调用方可选传入的人类可读描述(如「调整按钮颜色」),用于历史面板展示。
1745
2315
  * 不影响 undo/redo 行为;缺省时面板会根据节点 / propPath 自动生成描述。
1746
2316
  */
1747
2317
  historyDescription?: string;
2318
+ /**
2319
+ * 操作途径:标记本次变更由哪条交互入口触发,取值见 {@link HistoryOpSource}
2320
+ * (画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等)。
2321
+ * 仅用于历史面板展示与业务埋点,不影响 undo/redo 行为;缺省时面板视为「未知」。
2322
+ */
2323
+ source?: HistoryOpSource;
2324
+ /**
2325
+ * 入栈时间戳(毫秒)。入栈时自动写入(若调用方未指定),仅用于历史面板展示。
2326
+ */
2327
+ timestamp?: number;
2328
+ /**
2329
+ * 是否为「已保存」记录:DSL 落库(如保存到后端 / 本地)时由 historyService.markSaved 标记。
2330
+ * 同一栈内任意时刻最多只有一条记录为 true;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
2331
+ */
2332
+ saved?: boolean;
2333
+ /**
2334
+ * 是否为「整体设置 root」(set root)产生的记录(由 {@link Editor.pushRootDiffHistory} 写入)。
2335
+ * 用于「连续 set root 合并」:当某页栈最新一条已是 root 记录时,下一条 set root 会替换它而非新增,
2336
+ * 避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录。
2337
+ */
2338
+ rootStep?: boolean;
2339
+ /** 操作人 */
2340
+ operator?: string;
2341
+ /** 扩展信息 */
2342
+ extra?: U;
1748
2343
  }
1749
2344
  /**
1750
- * 代码块历史记录条目。按 codeBlock.id 分组保存到 historyState.codeBlockState。
1751
- * - 新增:oldContent = null,newContent = 新内容
1752
- * - 更新:oldContent / newContent 都为对应内容
1753
- * - 删除:newContent = null,oldContent = 删除前内容
2345
+ * 历史记录的扩展上下文({@link BaseStepValue.extra})。
2346
+ * 内置字段供 `page` 类型在撤销 / 重做时恢复选区与受影响节点;扩展类型可自由附加其它键。
1754
2347
  */
1755
- interface CodeBlockStepValue {
1756
- /** 关联的代码块 id */
1757
- id: Id;
1758
- /** 变更前的代码块内容,新增时为 null */
1759
- oldContent: CodeBlockContent | null;
1760
- /** 变更后的代码块内容,删除时为 null */
1761
- newContent: CodeBlockContent | null;
1762
- /**
1763
- * form 端 propPath/value 列表。撤销/重做时若有则按 propPath 局部更新;
1764
- * 缺省才退化为整内容替换。新增/删除场景通常无 changeRecords。
1765
- */
1766
- changeRecords?: ChangeRecord[];
1767
- /** 调用方可选传入的人类可读描述,用于历史面板展示;不影响 undo/redo 行为。 */
1768
- historyDescription?: string;
2348
+ interface StepExtra {
2349
+ /** 操作前选中的节点 ID,用于撤销后恢复选择状态(page 类型) */
2350
+ selectedBefore?: Id[];
2351
+ /** 操作后选中的节点 ID,用于重做后恢复选择状态(page 类型) */
2352
+ selectedAfter?: Id[];
2353
+ /** 本次操作涉及的节点 id 集合(page 类型) */
2354
+ modifiedNodeIds?: Map<Id, Id>;
2355
+ /** 操作前的节点校验错误快照,撤销后还原(使撤销一个「校验失败」的改动后错误消失) */
2356
+ invalidNodeIdsBefore?: Map<Id, NodeInvalidInfo>;
2357
+ /** 操作后的节点校验错误快照,重做后还原(使重做后错误恢复) */
2358
+ invalidNodeIdsAfter?: Map<Id, NodeInvalidInfo>;
2359
+ [key: string]: any;
1769
2360
  }
1770
2361
  /**
1771
- * 数据源历史记录条目。按 dataSource.id 分组保存到 historyState.dataSourceState。
1772
- * - 新增:oldSchema = null,newSchema = 新 schema
1773
- * - 更新:oldSchema / newSchema 都为对应 schema
1774
- * - 删除:newSchema = null,oldSchema = 删除前 schema
2362
+ * 页面节点历史记录条目(`diff` 内容为 {@link MNode})。结构已与代码块 / 数据源统一收敛到
2363
+ * {@link BaseStepValue}:关联 id `data.id`,选区等上下文见 `extra`。
1775
2364
  */
1776
- interface DataSourceStepValue {
1777
- /** 关联的数据源 id */
1778
- id: Id;
1779
- /** 变更前的数据源 schema,新增时为 null */
1780
- oldSchema: DataSourceSchema | null;
1781
- /** 变更后的数据源 schema,删除时为 null */
1782
- newSchema: DataSourceSchema | null;
2365
+ type StepValue = BaseStepValue<MNode, StepExtra>;
2366
+ /**
2367
+ * 代码块历史记录条目(`diff` 内容为 {@link CodeBlockContent}),按 `data.id`(codeBlock.id)
2368
+ * 分组保存到 historyState.steps.codeBlock。结构与 {@link StepValue} / {@link DataSourceStepValue}
2369
+ * 一致,仅 `diff` 快照类型不同。
2370
+ */
2371
+ type CodeBlockStepValue = BaseStepValue<CodeBlockContent>;
2372
+ /**
2373
+ * 数据源历史记录条目(`diff` 内容为 {@link DataSourceSchema}),按 `data.id`(dataSource.id)
2374
+ * 分组保存到 historyState.steps.dataSource。结构与 {@link StepValue} / {@link CodeBlockStepValue}
2375
+ * 一致,仅 `diff` 快照类型不同。
2376
+ */
2377
+ type DataSourceStepValue = BaseStepValue<DataSourceSchema>;
2378
+ /**
2379
+ * 历史记录类型标识:内置 `page` / `codeBlock` / `dataSource`,并允许业务扩展自定义类型。
2380
+ * `(string & {})` 保留对内置字面量的智能提示,同时不限制扩展取值。
2381
+ */
2382
+ type HistoryStepType = 'page' | 'codeBlock' | 'dataSource' | (string & {});
2383
+ /**
2384
+ * 全部历史栈的统一容器,按「类型 -> id -> UndoRedo 栈」两级分组。
2385
+ *
2386
+ * - `page`:页面历史栈,按 page.id 分组(每页一份 UndoRedo);
2387
+ * - `codeBlock`:代码块历史栈,按 codeBlock.id 分组;
2388
+ * - `dataSource`:数据源历史栈,按 dataSource.id 分组;
2389
+ * - 其余键:业务通过 {@link HistoryService.registerStepType} 注册的自定义历史类型。
2390
+ *
2391
+ * 所有类型(含扩展类型)一视同仁:均按 id 独立分栈、独立 undo/redo,且都可通过
2392
+ * {@link HistoryService.setMarker} 在 index 0 种入 `initial` 基线(撤销 / 回滚不会越过该基线)。
2393
+ */
2394
+ interface HistorySteps {
2395
+ page: Record<Id, UndoRedo<StepValue>>;
2396
+ codeBlock: Record<Id, UndoRedo<CodeBlockStepValue>>;
2397
+ dataSource: Record<Id, UndoRedo<DataSourceStepValue>>;
2398
+ /** 扩展历史类型:按 id 分组的 UndoRedo 栈。 */
2399
+ [stepType: string]: Record<Id, UndoRedo<any>>;
2400
+ }
2401
+ interface HistoryState {
1783
2402
  /**
1784
- * form propPath/value 列表。撤销/重做时若有则按 propPath 局部更新;
1785
- * 缺省才退化为整 schema 替换。新增/删除场景通常无 changeRecords。
2403
+ * 全部历史栈的统一容器(页面 / 代码块 / 数据源 / 扩展类型),见 {@link HistorySteps}。
2404
+ * 各类型互不影响,支持按 id 独立 undo/redo;是否可撤销 / 重做改用 {@link HistoryService.canUndo} /
2405
+ * {@link HistoryService.canRedo}(按 stepType + id 查询)替代旧的全局 canUndo / canRedo 字段。
1786
2406
  */
1787
- changeRecords?: ChangeRecord[];
1788
- /** 调用方可选传入的人类可读描述,用于历史面板展示;不影响 undo/redo 行为。 */
1789
- historyDescription?: string;
2407
+ steps: HistorySteps;
2408
+ /**
2409
+ * 各历史类型的展示名称,用于历史面板({@link HistorySteps} 的 tab / 分组标题等)。
2410
+ * 内置 `page` / `codeBlock` / `dataSource` 有默认中文名(页面 / 代码块 / 数据源),
2411
+ * 扩展类型可通过 {@link HistoryService.registerStepType} 的 `name` 选项或
2412
+ * {@link HistoryService.setStepName} 登记;读取请用 {@link HistoryService.getStepName}。
2413
+ */
2414
+ stepNames: Record<string, string>;
1790
2415
  }
1791
- interface HistoryState {
1792
- pageId?: Id;
1793
- pageSteps: Record<Id, UndoRedo<StepValue>>;
1794
- canRedo: boolean;
1795
- canUndo: boolean;
2416
+ /**
2417
+ * 历史记录的可持久化快照。由 historyService.saveToIndexedDB 写入 IndexedDB,
2418
+ * 再由 historyService.restoreFromIndexedDB 读出并重建各 UndoRedo 栈。
2419
+ */
2420
+ interface PersistedHistoryState {
2421
+ /** 快照结构版本号,便于后续兼容升级。 */
2422
+ version: number;
1796
2423
  /**
1797
- * 代码块历史栈,按 codeBlock.id 分组(每个代码块独立一份 UndoRedo)。
1798
- * 与页面/节点无关,支持独立 undo/redo。
2424
+ * 全部历史栈的序列化快照,按「类型 -> id」两级分组,与 {@link HistorySteps} 对应。
2425
+ * 内置 `page` / `codeBlock` / `dataSource`,并包含业务注册的扩展类型。
1799
2426
  */
1800
- codeBlockState: Record<Id, UndoRedo<CodeBlockStepValue>>;
2427
+ steps: {
2428
+ page: Record<Id, SerializedUndoRedo<StepValue>>;
2429
+ codeBlock: Record<Id, SerializedUndoRedo<CodeBlockStepValue>>;
2430
+ dataSource: Record<Id, SerializedUndoRedo<DataSourceStepValue>>;
2431
+ [stepType: string]: Record<Id, SerializedUndoRedo<any>>;
2432
+ };
2433
+ /** 保存时间戳(毫秒)。 */
2434
+ savedAt: number;
2435
+ }
2436
+ /** historyService 持久化相关 API 的可选配置。 */
2437
+ interface HistoryPersistOptions {
2438
+ /** IndexedDB 数据库名,默认 `tmagic-editor`(最终库名会拼上当前 DSL app id)。 */
2439
+ dbName?: string;
2440
+ /** objectStore 名,默认 `history`。 */
2441
+ storeName?: string;
2442
+ /** 记录 key,用于区分不同活动页 / 项目,默认 `default`。 */
2443
+ key?: IDBValidKey;
1801
2444
  /**
1802
- * 数据源历史栈,按 dataSource.id 分组(每个数据源独立一份 UndoRedo)。
1803
- * 与页面/节点无关,支持独立 undo/redo。
2445
+ * 显式指定用于库名隔离的 DSL app id。
2446
+ * 缺省时回退到当前 editorService 的 `root.id`;在「先恢复历史再 set root」场景下 root 尚未设置,
2447
+ * 需由调用方(如从待加载 DSL 取 id)显式传入,否则会读 / 写到未按 app 隔离的默认库。
1804
2448
  */
1805
- dataSourceState: Record<Id, UndoRedo<DataSourceStepValue>>;
2449
+ appId?: Id;
1806
2450
  }
1807
2451
  /**
1808
2452
  * 历史面板用:当前页面的一条历史步骤(包含位置和是否已应用)。
1809
2453
  */
1810
- interface PageHistoryStepEntry {
2454
+ interface HistoryStepEntry<T> {
1811
2455
  /** 步骤内容 */
1812
- step: StepValue;
2456
+ step: T;
1813
2457
  /** 在所属栈中的索引(0 为最早) */
1814
2458
  index: number;
1815
2459
  /** 是否处于"已应用"段(即位于栈游标之前)。撤销后变为 false。 */
@@ -1818,69 +2462,42 @@ interface PageHistoryStepEntry {
1818
2462
  isCurrent?: boolean;
1819
2463
  }
1820
2464
  /**
1821
- * 页面历史面板分组。
1822
- * - 连续修改同一目标节点(updatedItems[0].oldNode.id 一致)的 'update' 步骤合并成一组;
1823
- * - 多节点更新 / add / remove 始终独立成组(无法明确归属单一目标)。
1824
- * - targetId 为 undefined 表示"无明确目标"(如 add/remove/多节点 update),不参与合并。
2465
+ * 历史面板分组(页面 / 数据源 / 代码块 / 扩展类型统一结构)。
2466
+ *
2467
+ * 把指定历史栈的步骤列表按"目标"做相邻合并:
2468
+ * - 连续修改同一目标(单实体 update,targetId 一致)的多步合并成一组,组内可展开查看每步;
2469
+ * - add / remove / 多实体 update 始终独立成组(无法明确归属单一目标);
2470
+ * - targetId 为 undefined 表示"无明确目标",不参与合并。
2471
+ *
2472
+ * 各类型仅 `kind` 与 step 快照类型不同,统一由泛型描述:
2473
+ * - 页面:`HistoryGroup<StepValue>`,`kind: 'page'`,`id` 为 pageId,`targetId` 为被改节点 id;
2474
+ * - 数据源:`HistoryGroup<DataSourceStepValue>`,`kind: 'data-source'`,`id` 为 dataSource.id;
2475
+ * - 代码块:`HistoryGroup<CodeBlockStepValue>`,`kind: 'code-block'`,`id` 为 codeBlock.id。
1825
2476
  */
1826
- interface PageHistoryGroup {
1827
- kind: 'page';
1828
- /** 所属页面 id */
1829
- pageId: Id;
1830
- /** 该分组的操作类型 */
2477
+ interface HistoryGroup<T extends BaseStepValue = BaseStepValue> {
2478
+ /** 历史类型标识:page / code-block / data-source(扩展类型同理)。 */
2479
+ kind: string;
2480
+ /** 所属栈 id(page 为 pageId,代码块 / 数据源为对应资源 id)。 */
2481
+ id: Id;
2482
+ /** 该分组的操作类型。 */
1831
2483
  opType: HistoryOpType;
1832
2484
  /**
1833
- * 合并的目标节点 id;只有"单节点 update"才有值,并按此 id 与相邻同 id 的 update 合并。
1834
- * undefined 表示该分组不可被合并(add / remove / 多节点 update)。
2485
+ * 合并的目标 id:仅"单实体 update"有值,并按此与相邻同 id 的 update 合并。
2486
+ * undefined 表示该分组不可被合并(add / remove / 多实体 update)。
1835
2487
  */
1836
2488
  targetId?: Id;
1837
- /** 目标节点的可读名(取最后一步的 newNode.name/type/id */
2489
+ /** 目标可读名(取最后一步快照的 name/type/id)。 */
1838
2490
  targetName?: string;
1839
- /** 组内所有步骤,按时间正序 */
1840
- steps: PageHistoryStepEntry[];
1841
- /** 组内最后一步是否已应用 */
1842
- applied: boolean;
1843
- /** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
1844
- isCurrent?: boolean;
1845
- }
1846
- /**
1847
- * 代码块历史面板分组。
1848
- * - 同一 codeBlockId 的栈内,相邻的 'update' 操作会合并成一个 group;
1849
- * - 'add' / 'remove' 始终独立成组(语义上是一次性事件)。
1850
- */
1851
- interface CodeBlockHistoryGroup {
1852
- kind: 'code-block';
1853
- /** 关联的 codeBlock id */
1854
- id: Id;
1855
- /** 该分组的操作类型 */
1856
- opType: HistoryOpType;
1857
- /** 组内所有步骤,按时间正序 */
1858
- steps: {
1859
- step: CodeBlockStepValue;
1860
- index: number;
1861
- applied: boolean;
1862
- isCurrent?: boolean;
1863
- }[];
1864
- /** 组内最后一步是否已应用,用于整组的状态展示 */
1865
- applied: boolean;
1866
- /** 是否为当前所在的分组(包含该栈最近一次已应用步骤的那一组)。 */
1867
- isCurrent?: boolean;
1868
- }
1869
- /**
1870
- * 数据源历史面板分组,结构同 CodeBlockHistoryGroup。
1871
- */
1872
- interface DataSourceHistoryGroup {
1873
- kind: 'data-source';
1874
- id: Id;
1875
- opType: HistoryOpType;
2491
+ /** 组内所有步骤,按时间正序。 */
1876
2492
  steps: {
1877
- step: DataSourceStepValue;
2493
+ step: T;
1878
2494
  index: number;
1879
2495
  applied: boolean;
1880
2496
  isCurrent?: boolean;
1881
2497
  }[];
2498
+ /** 组内最后一步是否已应用。 */
1882
2499
  applied: boolean;
1883
- /** 是否为当前所在的分组(包含该栈最近一次已应用步骤的那一组)。 */
2500
+ /** 是否为当前所在的分组(包含栈中最近一次已应用步骤的那一组)。 */
1884
2501
  isCurrent?: boolean;
1885
2502
  }
1886
2503
  declare enum KeyBindingCommand {
@@ -1997,10 +2614,12 @@ type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...ar
1997
2614
  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'>;
1998
2615
  interface EventBusEvent {
1999
2616
  'edit-data-source': [id: string];
2617
+ 'edit-data-source-method': [id: string, methodName: string];
2618
+ 'edit-data-source-field': [id: string, fieldPath: string[]];
2000
2619
  'remove-data-source': [id: string];
2001
2620
  'edit-code': [id: string];
2002
2621
  }
2003
- interface EventBus extends EventEmitter {
2622
+ interface EventBus extends EventEmitter$1 {
2004
2623
  on<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, listener: (...args: Param) => void): this;
2005
2624
  emit<Name extends keyof EventBusEvent, Param extends EventBusEvent[Name]>(eventName: Name, ...args: Param): boolean;
2006
2625
  }
@@ -2017,9 +2636,24 @@ interface PageBarSortOptions extends PartSortableOptions {
2017
2636
  /** 在onStart之前调用 */
2018
2637
  beforeStart?: (event: SortableEvent, sortable: Sortable) => void | Promise<void>;
2019
2638
  }
2020
- type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: 'layer' | 'data-source' | 'viewer' | 'code-block') => (MenuButton | MenuComponent)[];
2639
+ /**
2640
+ * 右键菜单当前目标(侧栏树节点等)。
2641
+ * 数据源 / 代码块面板通过 `customContentMenu` 的 `getTarget` 暴露,业务在 handler 内自行读取。
2642
+ */
2643
+ interface ContentMenuTarget {
2644
+ /** 目标 ID */
2645
+ id: string;
2646
+ /** 原始节点数据(树节点等) */
2647
+ data?: TreeNodeData;
2648
+ }
2649
+ type ContentMenuType = 'layer' | 'data-source' | 'viewer' | 'code-block';
2650
+ type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType, /** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
2651
+
2652
+ getTarget?: () => ContentMenuTarget | null) => (MenuButton | MenuComponent)[];
2021
2653
  interface EditorEvents {
2022
- 'root-change': [value: StoreState['root'], preValue?: StoreState['root']];
2654
+ 'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
2655
+ historySource?: HistoryOpSource;
2656
+ }];
2023
2657
  select: [node: MNode | null];
2024
2658
  add: [nodes: MNode[]];
2025
2659
  remove: [nodes: MNode[]];
@@ -2035,6 +2669,96 @@ interface EditorEvents {
2035
2669
  targetParent: MContainer;
2036
2670
  }];
2037
2671
  'history-change': [data: MPage | MPageFragment];
2672
+ /**
2673
+ * DSL 发生变更后统一触发,免去分别监听 add / remove / update / move-layer / drag-to。
2674
+ * 回调参数为 {@link EditorChangeEvent},按 `type` 区分操作类型并携带各自的操作内容(payload)
2675
+ * 以及变更所在的当前 page(可能为 null)。撤销 / 重做内部同样会经由
2676
+ * add / remove / update 触发本事件;如需区分「用户操作」与「撤销重做」请配合 `history-change`。
2677
+ */
2678
+ change: [event: EditorChangeEvent];
2679
+ /** 节点校验错误状态发生变化时触发,携带当前完整的错误 Map(供非响应式消费方订阅) */
2680
+ 'invalid-node-change': [invalidNodeIds: Map<Id, NodeInvalidInfo>];
2681
+ }
2682
+ /** `change` 事件中单个变更项:变更的 node 及其所属的 page(可能为 null)。 */
2683
+ interface EditorChangeItem {
2684
+ node: MNode;
2685
+ page: StoreState['page'];
2686
+ }
2687
+ /** `update` 类型变更项:node 为前后快照及 form 端变更记录,page 为其所属页面。 */
2688
+ interface EditorUpdateChangeItem {
2689
+ node: {
2690
+ newNode: MNode;
2691
+ oldNode: MNode;
2692
+ changeRecords?: ChangeRecord[];
2693
+ };
2694
+ page: StoreState['page'];
2695
+ }
2696
+ /** {@link EditorEvents.change} 各操作类型共有的历史相关字段。 */
2697
+ interface EditorChangeEventHistoryMeta {
2698
+ /**
2699
+ * 本次变更的「历史来源」(调用 DSL 操作时传入的 {@link HistoryOpOptions.historySource},
2700
+ * 撤销 / 重做时则为被应用 step 上记录的 `source`),未携带时为 undefined。
2701
+ */
2702
+ historySource?: HistoryOpSource;
2703
+ /**
2704
+ * 本次操作是否未写入历史记录(即调用时传入的 {@link HistoryOpOptions.doNotPushHistory},缺省为 false);
2705
+ * 撤销 / 重做路径补发的事件恒为 true(撤销/重做本身不再入栈)。
2706
+ */
2707
+ doNotPushHistory?: boolean;
2708
+ }
2709
+ /**
2710
+ * {@link EditorEvents.change} 的回调参数:以 `type` 区分操作类型,并携带对应的操作内容。
2711
+ * `data` 为本次变更的节点列表,每项包含 node 及其所属的 page(可能为 null);
2712
+ * `move-layer` 额外带层级偏移 `offset`,`drag-to` 额外带目标位置 `targetIndex` / `targetParent`;
2713
+ * 历史相关字段(historySource / doNotPushHistory)见 {@link EditorChangeEventHistoryMeta}。
2714
+ */
2715
+ type EditorChangeEvent = ({
2716
+ type: 'add';
2717
+ data: EditorChangeItem[];
2718
+ } & EditorChangeEventHistoryMeta) | ({
2719
+ type: 'remove';
2720
+ data: EditorChangeItem[];
2721
+ } & EditorChangeEventHistoryMeta) | ({
2722
+ type: 'update';
2723
+ data: EditorUpdateChangeItem[];
2724
+ } & EditorChangeEventHistoryMeta) | ({
2725
+ type: 'move-layer';
2726
+ data: EditorChangeItem[];
2727
+ offset: number | LayerOffset;
2728
+ } & EditorChangeEventHistoryMeta) | ({
2729
+ type: 'drag-to';
2730
+ data: EditorChangeItem[];
2731
+ targetIndex: number;
2732
+ targetParent: MContainer;
2733
+ } & EditorChangeEventHistoryMeta);
2734
+ interface HistoryEvents {
2735
+ change: [state: BaseStepValue | StepValue | CodeBlockStepValue | DataSourceStepValue, stepType: HistoryStepType, id: Id];
2736
+ 'code-block-history-change': [id: Id, state: CodeBlockStepValue];
2737
+ 'data-source-history-change': [id: Id, state: DataSourceStepValue];
2738
+ 'restore-from-indexed-db': [snapshot: PersistedHistoryState | null];
2739
+ 'save-to-indexed-db': [snapshot: PersistedHistoryState];
2740
+ 'mark-saved': [{
2741
+ kind: HistoryStepType;
2742
+ id?: Id;
2743
+ }];
2744
+ clear: [{
2745
+ id: Id;
2746
+ stepType: HistoryStepType;
2747
+ }];
2748
+ 'marker-change': [{
2749
+ id: Id;
2750
+ marker: StepValue;
2751
+ stepType: HistoryStepType;
2752
+ }];
2753
+ /**
2754
+ * 页面 / 页面片结构变更(新增 / 删除)时派发,见 {@link HistoryService.notifyPageStructureChange}。
2755
+ * 一次操作(add / remove / setRoot 整体替换)涉及多个页面时合并为**一个**事件;
2756
+ * `add` / `remove` 分别为本次新增与删除的页面列表(其一可为空数组)。
2757
+ */
2758
+ 'page-structure-change': [change: {
2759
+ add: (MPage | MPageFragment)[];
2760
+ remove: (MPage | MPageFragment)[];
2761
+ }];
2038
2762
  }
2039
2763
  declare const canUsePluginMethods: {
2040
2764
  async: readonly ["getLayout", "highlight", "select", "multiSelect", "doAdd", "add", "doRemove", "remove", "doUpdate", "update", "sort", "copy", "paste", "doPaste", "doAlignCenter", "alignCenter", "moveLayer", "moveToContainer", "dragTo", "undo", "redo", "move"];
@@ -2045,26 +2769,159 @@ type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
2045
2769
  * 历史记录写入相关的通用配置(codeBlock / dataSource / editor 共用)
2046
2770
  * - doNotPushHistory: 操作完成后是否不要将本次操作压入历史栈(撤销/重做记录),默认 false
2047
2771
  * - historyDescription: 入栈时附带的人类可读描述,用于历史面板展示;不影响 undo/redo 行为,缺省时面板会自动生成描述
2772
+ * - historySource: 操作途径,取值见 {@link HistoryOpSource}(画布 / 树面板 / 组件面板 / 配置面板 / 源码编辑器 / 右键菜单 / 工具栏 / 快捷键 / 回滚 / 接口 等),用于历史面板展示与埋点;不影响 undo/redo 行为
2048
2773
  */
2049
2774
  interface HistoryOpOptions {
2050
2775
  doNotPushHistory?: boolean;
2051
2776
  historyDescription?: string;
2777
+ historySource?: HistoryOpSource;
2778
+ }
2779
+ /**
2780
+ * 在 HistoryOpOptions 基础上携带 form 端 propPath/value 变更记录,
2781
+ * 用于历史记录的精细化撤销/重做(按 propPath 局部 patch)。
2782
+ */
2783
+ interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
2784
+ changeRecords?: ChangeRecord[];
2785
+ }
2786
+ /**
2787
+ * DSL 修改类操作的通用配置
2788
+ * - doNotSelect: 操作后是否不要自动触发选中(不调用 this.select / this.multiSelect / stage.select / stage.multiSelect)
2789
+ * - doNotSwitchPage: 操作若会引发当前页面切换(如新增 / 删除 / 跨页移动),是否跳过这次切换
2790
+ */
2791
+ interface DslOpOptions extends HistoryOpOptions {
2792
+ doNotSelect?: boolean;
2793
+ doNotSwitchPage?: boolean;
2794
+ }
2795
+ /** 差异对话框的入参 */
2796
+ interface DiffDialogPayload {
2797
+ /** 表单类别 */
2798
+ category?: CompareCategory;
2799
+ /** 节点类型 / 数据源类型 */
2800
+ type?: string;
2801
+ /** 代码块场景下的数据源类型 */
2802
+ dataSourceType?: string;
2803
+ /** 该 step 修改前的值(oldNode / oldSchema / oldContent) */
2804
+ lastValue: Record<string, any>;
2805
+ /** 该 step 修改后的值(newNode / newSchema / newContent) */
2806
+ value: Record<string, any>;
2807
+ /** 当前编辑器中实际的最新值;不传或为 null 时禁用「与当前对比」 */
2808
+ currentValue?: Record<string, any> | null;
2809
+ /** 用于标题展示的目标名称 */
2810
+ targetLabel?: string;
2811
+ /** 用于标题展示的目标 id */
2812
+ id?: string | number;
2813
+ /**
2814
+ * 指定打开时的初始对比模式:
2815
+ * - before:该步骤修改前 vs 修改后
2816
+ * - current:该步骤修改后 vs 当前最新值
2817
+ * 不传时按是否存在「修改后的值」/「当前值」自动推断。
2818
+ * 若指定的模式当前不可用(对应数据缺失),将回退到自动推断结果。
2819
+ */
2820
+ mode?: 'before' | 'current';
2821
+ }
2822
+ /**
2823
+ * 一组「描述 + 可操作性」的判定函数集合。页面 / 数据源 / 代码块及业务自定义历史
2824
+ * 各自实现一份,作为整体注入,避免把 describe* / isStep* 拆成多个独立 props 反复透传。
2825
+ */
2826
+ interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
2827
+ /**
2828
+ * 组级描述文案生成器,接收一个 group,返回展示文本。
2829
+ * 不传时回退到对组内最后一步调用 {@link describeStep}(适用于不做相邻合并、每组恒为单步的历史,如数据源/代码块)。
2830
+ */
2831
+ describeGroup?: (_group: any) => string;
2832
+ /** 单步描述文案生成器,接收一个 step,返回展示文本(合并组展开后的子步列表用)。 */
2833
+ describeStep: (_step: T) => string;
2834
+ /** 判断某个 step 是否可查看差异(前后值都存在)。不传则一律不展示差异入口。 */
2835
+ isStepDiffable?: (_step: T) => boolean;
2836
+ /** 判断某个 step 是否支持回滚(如更新需带 changeRecords)。不传则已应用即可回滚。 */
2837
+ isStepRevertable?: (_step: T) => boolean;
2838
+ }
2839
+ /**
2840
+ * 通用 bucket(数据源 / 代码块 / 业务自定义历史)的整体渲染配置。
2841
+ * 把原先散落在 Bucket / BucketTab 上的 title / prefix / describe* / isStep* / showInitial / gotoEnabled
2842
+ * 收敛成一个对象作为单一 prop 传递,调用方一次配齐、组件内部按需读取。
2843
+ */
2844
+ interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
2845
+ /** bucket 头部标题,例如 "数据源" / "代码块"。 */
2846
+ title: string;
2847
+ /** 子项 key 的命名空间前缀(`ds` 数据源 / `cb` 代码块 / 业务自定义如 `mod`)。 */
2848
+ prefix: string;
2849
+ /** 是否展示底部「回到初始状态」入口,默认 true。无 undo cursor 语义的自定义历史可传 false。 */
2850
+ showInitial?: boolean;
2851
+ /** 是否支持「跳转到该记录」(goto),默认 true。 */
2852
+ gotoEnabled?: boolean;
2853
+ /** 是否展示顶部「清空」按钮,默认 true。无需提供清空能力的自定义历史可传 false。 */
2854
+ showClear?: boolean;
2855
+ }
2856
+ interface UseHistoryRevertOptions {
2857
+ /**
2858
+ * 父级应用上下文,用于让动态挂载的「差异确认弹窗」继承全局组件 / 指令 / provide / 插件
2859
+ * (Element Plus、@tmagic/form 字段组件等)。未显式传入时,会自动取调用方所在组件的 appContext
2860
+ * (`getCurrentInstance()?.appContext`)。业务方若在组件 setup 之外调用,需手动传入(如 `editorApp._context`)。
2861
+ */
2862
+ appContext?: AppContext | null;
2863
+ /**
2864
+ * 透传给差异确认弹窗的 `extendState`(即 Editor 的 `extendFormState`),
2865
+ * 使对比表单中依赖业务上下文的 `display` / `disabled` 等 filterFunction 正常工作。
2866
+ */
2867
+ extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
2868
+ /**
2869
+ * 返回 PropsPanel 主属性表单(FormPanel -> MForm)的 formState。
2870
+ * 仅页面历史「查看差异 / 回滚确认」场景会使用该 formState 覆盖 CompareForm 中同名扩展字段,
2871
+ * 以保证两处 filterFunction 读取到一致的运行态上下文。
2872
+ */
2873
+ getPropsPanelFormState?: () => FormState | undefined;
2874
+ /**
2875
+ * 内置页面 / 数据源 / 代码块的差异 / 回滚确认弹窗默认宽度(透传给 TMagicDialog 的 `width`),
2876
+ * 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
2877
+ * 业务自有历史(`viewDiff` / `confirmAndRevert`)可在调用时通过各自入参的 `width` 单独覆盖。
2878
+ */
2879
+ dialogWidth?: string;
2052
2880
  }
2053
2881
  /**
2054
- * 在 HistoryOpOptions 基础上携带 form 端 propPath/value 变更记录,
2055
- * 用于历史记录的精细化撤销/重做(按 propPath 局部 patch)。
2882
+ * 业务自有历史(如管理台「模块」)做差异对比时所需的额外渲染入参。
2883
+ * 内置的页面 / 数据源 / 代码块按 `category` 自动取表单配置,无需传这些;
2884
+ * 业务自有类别可通过 `loadConfig` 注入自定义表单配置加载逻辑。
2056
2885
  */
2057
- interface HistoryOpOptionsWithChangeRecords extends HistoryOpOptions {
2058
- changeRecords?: ChangeRecord[];
2886
+ interface CustomDiffFormOptions {
2887
+ /**
2888
+ * 自定义差异表单配置加载逻辑(如「模块」按 c_type 重建表单配置),
2889
+ * 透传给弹窗内部的 CompareForm;缺省时按 `category` 走内置加载。
2890
+ */
2891
+ loadConfig?: CompareFormLoadConfig;
2892
+ /** 需要走 self diff 的字段类型(如模块的 mod-cond)。 */
2893
+ selfDiffFieldTypes?: string[];
2894
+ /**
2895
+ * 可选:外部提供的 formState(通常来自 PropsPanel 主表单),
2896
+ * 对比弹窗会用它覆盖 CompareForm 中同名扩展字段,避免上下文不一致。
2897
+ */
2898
+ compareFormState?: FormState;
2899
+ /**
2900
+ * 差异 / 确认回滚弹窗宽度(透传给 HistoryDiffDialog 的 TMagicDialog `width`),
2901
+ * 如 `'1200px'` / `'80%'`。缺省时使用弹窗内置默认宽度(900px)。
2902
+ */
2903
+ width?: string;
2904
+ /**
2905
+ * 差异 / 确认回滚弹窗内 form 表单的尺寸(透传给 CompareForm 的 `size`),
2906
+ * 可选 `'large' | 'default' | 'small'`,缺省时使用表单内置默认尺寸。
2907
+ */
2908
+ size?: FieldSize;
2059
2909
  }
2060
2910
  /**
2061
- * DSL 修改类操作的通用配置
2062
- * - doNotSelect: 操作后是否不要自动触发选中(不调用 this.select / this.multiSelect / stage.select / stage.multiSelect)
2063
- * - doNotSwitchPage: 操作若会引发当前页面切换(如新增 / 删除 / 跨页移动),是否跳过这次切换
2911
+ * 业务自有历史复用「单步回滚」交互({@link useHistoryRevert} 的 `confirmAndRevert`)的入参。
2912
+ * 与内置页面 / 数据源 / 代码块回滚共用「目标校验 差异/二次确认弹窗 反向回滚」流程,
2913
+ * 业务方只需提供:差异弹窗入参(可选)、表单配置加载(可选)、实际回滚执行函数。
2064
2914
  */
2065
- interface DslOpOptions extends HistoryOpOptions {
2066
- doNotSelect?: boolean;
2067
- doNotSwitchPage?: boolean;
2915
+ interface ConfirmAndRevertOptions<T = unknown> extends CustomDiffFormOptions {
2916
+ /**
2917
+ * 差异确认弹窗入参;可对比的步骤(单实体 update)传入后弹差异确认弹窗,
2918
+ * 传 null / 省略则退化为普通二次确认框(add / remove / 不可对比)。
2919
+ */
2920
+ diffPayload?: DiffDialogPayload | null;
2921
+ /** 回滚前置校验:返回 true 表示目标数据已删除等不可回滚,给出统一提示并中止。 */
2922
+ isTargetMissing?: () => boolean;
2923
+ /** 用户确认后执行的实际回滚逻辑。 */
2924
+ revert: () => T | Promise<T>;
2068
2925
  }
2069
2926
  //#endregion
2070
2927
  //#region temp/packages/editor/src/hooks/use-code-block-edit.d.ts
@@ -2089,8 +2946,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
2089
2946
  onClose?: (() => any) | undefined;
2090
2947
  onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
2091
2948
  onOpen?: (() => any) | undefined;
2092
- "onUpdate:width"?: ((value: number) => any) | undefined;
2093
2949
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
2950
+ "onUpdate:width"?: ((value: number) => any) | undefined;
2094
2951
  }>, {
2095
2952
  show(): Promise<void>;
2096
2953
  hide(): Promise<void>;
@@ -2098,8 +2955,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
2098
2955
  close: () => any;
2099
2956
  submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
2100
2957
  open: () => any;
2101
- "update:width": (value: number) => any;
2102
2958
  "update:visible": (value: boolean) => any;
2959
+ "update:width": (value: number) => any;
2103
2960
  }, import("@vue/runtime-core").PublicProps, {}, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
2104
2961
  P: {};
2105
2962
  B: {};
@@ -2121,18 +2978,43 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
2121
2978
  onClose?: (() => any) | undefined;
2122
2979
  onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
2123
2980
  onOpen?: (() => any) | undefined;
2124
- "onUpdate:width"?: ((value: number) => any) | undefined;
2125
2981
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
2982
+ "onUpdate:width"?: ((value: number) => any) | undefined;
2126
2983
  }>, {
2127
2984
  show(): Promise<void>;
2128
2985
  hide(): Promise<void>;
2129
2986
  }, {}, {}, {}, {}> | null>>;
2130
2987
  createCodeBlock: () => Promise<void>;
2131
2988
  editCode: (id: string) => Promise<void>;
2132
- deleteCode: (key: string) => Promise<void>;
2989
+ deleteCode: (key: string, {
2990
+ historySource
2991
+ }?: {
2992
+ historySource?: HistoryOpSource;
2993
+ }) => Promise<void>;
2133
2994
  submitCodeBlockHandler: (values: CodeBlockContent, eventData?: ContainerChangeEventData) => Promise<void>;
2134
2995
  };
2135
2996
  //#endregion
2997
+ //#region temp/packages/editor/src/hooks/use-compare-form.d.ts
2998
+ interface UseCompareFormReturn {
2999
+ config: Ref<FormConfig>;
3000
+ currentValues: ComputedRef<FormValue>;
3001
+ wrapperStyle: ComputedRef<Record<string, string> | undefined>;
3002
+ mergedExtendState: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
3003
+ loadConfig: () => Promise<void>;
3004
+ formRef: Readonly<Ref<InstanceType<typeof MForm> | null>>;
3005
+ normalizeCodeBlockValue: (v: Partial<CodeBlockContent> | Record<string, any> | undefined) => Record<string, any>;
3006
+ }
3007
+ /**
3008
+ * CompareForm / ViewForm 共用逻辑:
3009
+ * - 按 `category`(node / data-source / code-block) 加载 FormConfig(支持自定义 `loadConfig`);
3010
+ * - 代码块 `content` 归一化为字符串;
3011
+ * - 外层容器固定高度 + 内部滚动的 `wrapperStyle`;
3012
+ * - 将 services / stage 注入 MForm.formState,保证 filterFunction 上下文一致。
3013
+ *
3014
+ * 两个组件的差异仅在于是否做新旧值对比,这部分逻辑保留在各自组件中。
3015
+ */
3016
+ declare const useCompareForm: (props: CompareFormBaseProps) => UseCompareFormReturn;
3017
+ //#endregion
2136
3018
  //#region temp/packages/editor/src/hooks/use-stage.d.ts
2137
3019
  declare const useStage: (stageOptions: StageOptions) => StageCore$1;
2138
3020
  //#endregion
@@ -2211,6 +3093,7 @@ declare const useNodeStatus: (nodeData: ComputedRef<TreeNodeData[]>) => {
2211
3093
  declare const useServices: () => Services;
2212
3094
  //#endregion
2213
3095
  //#region temp/packages/editor/src/utils/config.d.ts
3096
+ declare const isGlobalFlat: import("@vue/reactivity").Ref<boolean, boolean>;
2214
3097
  declare const setEditorConfig: (option: EditorInstallOptions) => void;
2215
3098
  declare const getEditorConfig: <K extends keyof EditorInstallOptions>(key: K) => EditorInstallOptions[K];
2216
3099
  //#endregion
@@ -2227,6 +3110,15 @@ declare const numberOptions: {
2227
3110
  text: string;
2228
3111
  value: string;
2229
3112
  }[];
3113
+ declare const booleanOptions: {
3114
+ text: string;
3115
+ value: string;
3116
+ }[];
3117
+ /** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
3118
+ declare const getCondOpOptionsByFieldType: (type: string) => {
3119
+ text: string;
3120
+ value: string;
3121
+ }[];
2230
3122
  declare const styleTabConfig: TabPaneConfig;
2231
3123
  declare const eventTabConfig: TabPaneConfig;
2232
3124
  declare const advancedTabConfig: TabPaneConfig;
@@ -2245,6 +3137,18 @@ declare const fillConfig: (config?: FormConfig, {
2245
3137
  disabledDataSource?: boolean;
2246
3138
  disabledCodeBlock?: boolean;
2247
3139
  }) => FormConfig;
3140
+ /**
3141
+ * 将属性表单配置中「样式」tab-pane 的 `display` 强制置为 `true`。
3142
+ *
3143
+ * `propsService.getPropsConfig` 返回的样式 tab 默认带有
3144
+ * `display: ({ services }) => !(services?.uiService?.get('showStylePanel') ?? true)`,
3145
+ * 在对比 / 只读展示场景(CompareForm / ViewForm)下并不需要跟随 uiService 状态隐藏,
3146
+ * 这里统一放开,保证样式 tab 始终可见。
3147
+ *
3148
+ * @param formConfig 组件属性表单配置
3149
+ * @returns 处理后的表单配置(不修改入参,返回浅拷贝)
3150
+ */
3151
+ declare const removeStyleDisplayConfig: (formConfig: FormConfig) => FormConfig;
2248
3152
  //#endregion
2249
3153
  //#region temp/packages/editor/src/utils/code-block.d.ts
2250
3154
  /**
@@ -2330,10 +3234,10 @@ declare const getRelativeStyle: (style?: Record<string, any>) => Record<string,
2330
3234
  declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
2331
3235
  declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
2332
3236
  declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
2333
- declare const change2Fixed: (node: MNode, root: MApp) => {
3237
+ declare const change2Fixed: (node: MNode, path: MNode[]) => {
2334
3238
  [key: string]: any;
2335
3239
  };
2336
- declare const Fixed2Other: (node: MNode, root: MApp, getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
3240
+ declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
2337
3241
  declare const getGuideLineFromCache: (key: string) => number[];
2338
3242
  declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
2339
3243
  declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
@@ -2361,7 +3265,7 @@ declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id)
2361
3265
  * @param getLayoutFn 获取父节点布局方式的回调函数
2362
3266
  * @returns 处理后的节点配置(深拷贝)
2363
3267
  */
2364
- declare const toggleFixedPosition: (dist: MNode, src: MNode, root: MApp, getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
3268
+ declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
2365
3269
  /**
2366
3270
  * 根据键盘移动的偏移量计算节点的新样式
2367
3271
  * 仅对 absolute 或 fixed 定位的节点生效;优先修改 top/left,若未设置则修改 bottom/right
@@ -2422,6 +3326,11 @@ interface DragClassification {
2422
3326
  * @returns 分类结果,包含同容器索引列表和跨容器节点列表
2423
3327
  */
2424
3328
  declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
3329
+ /**
3330
+ * 给「回滚」生成的新 step 用的简短描述生成器。
3331
+ * 与 UI 层 `describePageStep` 同义,但避免 service 反向依赖 layouts/,故放在此工具函数中。
3332
+ */
3333
+ declare const describeStepForRevert: (step: StepValue) => string;
2425
3334
  //#endregion
2426
3335
  //#region temp/packages/editor/src/utils/operator.d.ts
2427
3336
  /**
@@ -2452,7 +3361,19 @@ declare const getDisplayField: (dataSources: DataSourceSchema[], key: string) =>
2452
3361
  type: "var" | "text";
2453
3362
  }[];
2454
3363
  declare const getCascaderOptionsFromFields: (fields?: DataSchema[], dataSourceFieldType?: DataSourceFieldType[]) => CascaderOption[];
2455
- declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: string[]) => string;
3364
+ /**
3365
+ * 按字段名路径下钻 DataSchema。
3366
+ * @param skipNumberIndices 为 true 时跳过数字段(模板路径中的数组下标,如 arr[0].x)
3367
+ */
3368
+ declare const resolveFieldByPath: (fields: DataSchema[] | undefined, fieldNames: string[], options?: {
3369
+ skipNumberIndices?: boolean;
3370
+ }) => {
3371
+ ok: boolean;
3372
+ field?: DataSchema;
3373
+ fields: DataSchema[];
3374
+ failedName?: string;
3375
+ };
3376
+ declare const getFieldType: (ds: DataSourceSchema | undefined, fieldNames: string[]) => "" | DataSourceFieldType;
2456
3377
  //#endregion
2457
3378
  //#region temp/packages/editor/src/utils/dep/idle-task.d.ts
2458
3379
  interface IdleTaskEvents {
@@ -2463,7 +3384,7 @@ interface IdleTaskEvents {
2463
3384
  hightLevelLength: number;
2464
3385
  }];
2465
3386
  }
2466
- declare class IdleTask<T = any> extends EventEmitter$1 {
3387
+ declare class IdleTask<T = any> extends EventEmitter {
2467
3388
  private taskList;
2468
3389
  private hightLevelTaskList;
2469
3390
  private taskHandle;
@@ -2474,6 +3395,13 @@ declare class IdleTask<T = any> extends EventEmitter$1 {
2474
3395
  once<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, listener: (...args: Param) => void | Promise<void>): this;
2475
3396
  emit<Name extends keyof IdleTaskEvents, Param extends IdleTaskEvents[Name]>(eventName: Name, ...args: Param): boolean;
2476
3397
  private runTaskQueue;
3398
+ /**
3399
+ * 单个任务失败不能中断整个队列,否则后续任务永远不会被执行,
3400
+ * 依赖收集会停在半路(收集中状态与剩余任务数都不再变化)
3401
+ */
3402
+ private runTask;
3403
+ private finishRun;
3404
+ private getTaskLength;
2477
3405
  }
2478
3406
  //#endregion
2479
3407
  //#region temp/packages/editor/src/utils/scroll-viewer.d.ts
@@ -2486,7 +3414,7 @@ interface ScrollViewerOptions {
2486
3414
  height: number;
2487
3415
  };
2488
3416
  }
2489
- declare class ScrollViewer extends EventEmitter$1 {
3417
+ declare class ScrollViewer extends EventEmitter {
2490
3418
  private container;
2491
3419
  private target;
2492
3420
  private zoom;
@@ -2521,22 +3449,179 @@ declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, st
2521
3449
  /** 默认的组件树节点是否可展开的判断函数:当节点的子项中至少存在一个可见节点时认为可展开 */
2522
3450
  declare const defaultIsExpandable: IsExpandableFunction;
2523
3451
  //#endregion
3452
+ //#region temp/packages/editor/src/utils/indexed-db.d.ts
3453
+ /**
3454
+ * 一组极简的、基于原生 IndexedDB 的 Promise KV 工具,避免引入额外依赖。
3455
+ * 仅用于浏览器环境;在不支持 IndexedDB 的环境(如 SSR / 部分测试环境)下会 reject。
3456
+ */
3457
+ /** 是否处于支持 IndexedDB 的环境。 */
3458
+ declare const isIndexedDBSupported: () => boolean;
3459
+ /**
3460
+ * 打开(必要时升级)数据库,确保目标 objectStore 存在后返回连接。
3461
+ *
3462
+ * 由于 objectStore 只能在 `onupgradeneeded` 内创建,这里先以当前版本打开,
3463
+ * 若发现 store 不存在则关闭连接、以更高版本重开来按需创建,兼容动态 storeName。
3464
+ */
3465
+ declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
3466
+ /** 写入(覆盖)一条记录。value 通过结构化克隆存储,支持 Map / Set 等结构。 */
3467
+ declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
3468
+ /** 读取一条记录,不存在时返回 undefined。 */
3469
+ declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
3470
+ /** 删除一条记录。 */
3471
+ declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
3472
+ //#endregion
3473
+ //#region temp/packages/editor/src/utils/history.d.ts
3474
+ /**
3475
+ * 「回滚」生成的新 step 简短描述。代码块 / 数据源共用。
3476
+ * 二者逻辑一致,仅展示名取值字段不同(代码块取 `name`,数据源取 `title`),
3477
+ * 因此通过 `getLabel` 注入取值方式。
3478
+ *
3479
+ * @param id 关联的代码块 / 数据源 id
3480
+ * @param diff 单条变更 diff(缺省视为空)
3481
+ * @param getLabel 从快照取展示名
3482
+ */
3483
+ declare const describeRevertStep: <T extends object>(id: Id, {
3484
+ oldSchema,
3485
+ newSchema,
3486
+ changeRecords
3487
+ }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
3488
+ /**
3489
+ * 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
3490
+ */
3491
+ declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
3492
+ /**
3493
+ * 构造一条代码块 / 数据源「按 id 分栈」的历史记录:两者除 payload 字段命名外完全一致。
3494
+ *
3495
+ * - `add`:oldValue = null;`remove`:newValue = null;`update`:两者都有,可带 changeRecords 做局部更新。
3496
+ * - 内容会做 cloneDeep 防止后续被外部引用篡改;opType 依据 old/new 是否为 null 推断。
3497
+ * - 仅负责构造 step 并返回,入栈与事件 emit 由统一的 history.push(stepType, step, id) 处理。
3498
+ * - 不直接驱动业务 service,调用方负责实际写回。
3499
+ */
3500
+ declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
3501
+ oldValue: T | null;
3502
+ newValue: T | null;
3503
+ changeRecords?: ChangeRecord[]; /** 展示名(缺省时从快照 name / title 推断)。 */
3504
+ name?: string;
3505
+ }) => S | null;
3506
+ declare const markStackSaved: <S extends {
3507
+ saved?: boolean;
3508
+ }>(undoRedo?: UndoRedo<S>) => void;
3509
+ /**
3510
+ * 把单个历史栈(页面 / 代码块 / 数据源 / 扩展类型)的步骤列表按"目标"做相邻合并:
3511
+ * - 单实体的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group,组内可展开查看每步;
3512
+ * - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单实体修改组);
3513
+ * - 多实体 'update'(如页面批量改属性)也独立成组(无明确单一目标,避免误合并)。
3514
+ *
3515
+ * 各类型行为完全一致,仅 `kind` 与 step 快照类型不同,统一由本方法处理。
3516
+ */
3517
+ declare const mergeSteps: <T extends BaseStepValue>(kind: string, id: Id, list: T[], cursor: number) => HistoryGroup<T>[];
3518
+ /**
3519
+ * 解析 step 中的"目标 id"用于合并:
3520
+ * - 单实体 update:取唯一一项 diff 的快照 id;快照无 id 时(如 CodeBlockContent)回退到 `step.data.id`
3521
+ * (即资源 id),使代码块 / 数据源同样能按资源合并相邻 update;
3522
+ * - 其它情形(多实体 update / add / remove):返回 undefined,表示不参与合并。
3523
+ */
3524
+ declare const detectTargetId: (step: BaseStepValue) => Id | undefined;
3525
+ /** 解析 step 中的目标可读名(用于 UI 展示)。 */
3526
+ declare const detectTargetName: (step: BaseStepValue) => string | undefined;
3527
+ /**
3528
+ * 把 `Record<Id, UndoRedo>` 整体序列化为 `Record<Id, SerializedUndoRedo>`。
3529
+ *
3530
+ * 序列化(深克隆)的同一趟里,只把每条 step 中可能含函数的 `diff` 用 serialize-javascript 序列化成字符串,
3531
+ * 其余字段(uuid / opType / timestamp / `modifiedNodeIds` Map 等)原样保留,交给 IndexedDB 结构化克隆。
3532
+ * 这样既能写入函数,又避免序列化整份快照的开销;读取时再由 {@link parseStacksStepDiff} 还原 diff。
3533
+ * 不含 `diff` 的元素(如通用栈)原样透传。
3534
+ */
3535
+ declare const serializeStacks: <T extends {
3536
+ diff?: unknown;
3537
+ }>(stacks: Record<Id, UndoRedo<T>>) => Record<Id, SerializedUndoRedo<T>>;
3538
+ /**
3539
+ * 把 `Record<Id, SerializedUndoRedo>` 整体还原为 `Record<Id, UndoRedo>`。
3540
+ * 还原时把每个栈的游标定位到最近一条已保存(`saved === true`)记录之后。
3541
+ *
3542
+ * 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
3543
+ * 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
3544
+ */
3545
+ declare const deserializeStacks: <T extends {
3546
+ saved?: boolean;
3547
+ }>(stacks?: Record<Id, ReturnType<UndoRedo<T>["serialize"]>>, parse?: (serialized: string) => unknown) => Record<Id, UndoRedo<T>>;
3548
+ /**
3549
+ * 按 id 从「按 id 分栈」的记录表(代码块 / 数据源)中获取(或创建)对应的 UndoRedo 栈。
3550
+ */
3551
+ declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
3552
+ /**
3553
+ * 撤销下限:当栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
3554
+ * 适用于所有历史类型(page / codeBlock / dataSource / 扩展),把 cursor 钉在基线之上,
3555
+ * 保证 undo / canUndo / goto 都不会越过初始基线。
3556
+ */
3557
+ declare const undoFloor: (undoRedo: UndoRedo<any>) => number;
3558
+ /** 将单次 push 产生的 history uuid(或 null)转为 *AndGetHistoryId 返回用的 uuid 列表。 */
3559
+ declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
3560
+ //#endregion
2524
3561
  //#region temp/packages/editor/src/utils/const.d.ts
2525
3562
  /** 当uiService.get('uiSelectMode')为true,点击组件(包括任何形式,组件树/画布)时触发的事件名 */
2526
3563
  declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
2527
3564
  declare const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
2528
3565
  declare const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
2529
3566
  declare const PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
2530
- declare const DEFAULT_LEFT_COLUMN_WIDTH = 310;
3567
+ declare const DEFAULT_LEFT_COLUMN_WIDTH = 345;
2531
3568
  declare const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
2532
- declare const MIN_LEFT_COLUMN_WIDTH = 200;
3569
+ declare const MIN_LEFT_COLUMN_WIDTH = 345;
2533
3570
  declare const MIN_CENTER_COLUMN_WIDTH = 400;
2534
3571
  declare const MIN_RIGHT_COLUMN_WIDTH = 300;
2535
3572
  declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
2536
3573
  declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
2537
3574
  //#endregion
3575
+ //#region temp/packages/editor/src/utils/type-match-rules.d.ts
3576
+ declare const ALL_COND_OPS: Set<string>;
3577
+ declare const editorTypeMatchRules: Record<string, TypeMatchValidator>;
3578
+ //#endregion
3579
+ //#region temp/packages/editor/src/utils/event.d.ts
3580
+ declare const EVENT_NAME_VALUE_SEPARATOR = ".";
3581
+ type EventNameSelectOption = {
3582
+ text: string;
3583
+ value: string;
3584
+ };
3585
+ type EventNameOption = EventOption | CascaderOption | EventNameSelectOption;
3586
+ /** 与 EventSelect 中 checkStrictly 一致:component 为 false,其余为 true */
3587
+ declare const isEventNameCheckStrictly: (src?: string) => boolean;
3588
+ /** 将动作 method 值规范为与 collectEventNameOptionValues 一致的字符串(cascader 无 valueSeparator 时存数组) */
3589
+ declare const normalizeCompActionValue: (value: unknown) => string;
3590
+ /**
3591
+ * 组装事件名称下拉/级联 options,与 EventSelect 默认 eventNameConfig.options 逻辑一致。
3592
+ */
3593
+ declare const getEventNameOptions: (src: string | undefined, formValue?: Record<string, any>) => EventNameOption[];
3594
+ /** 将 select / cascader options 展平为最终写入 name 的字符串集合(cascader 用 `.` 拼接) */
3595
+ declare const collectEventNameOptionValues: (options: EventNameOption[], checkStrictly: boolean, prefix?: any[], result?: Set<string>) => Set<string>;
3596
+ /**
3597
+ * 解析 event-select 允许的 name 集合。
3598
+ * 自定义 eventNameConfig.options 时返回 null(跳过枚举校验)。
3599
+ */
3600
+ declare const getEventNameAllowedValues: (config?: {
3601
+ src?: string;
3602
+ eventNameConfig?: {
3603
+ options?: unknown;
3604
+ };
3605
+ }, formValue?: Record<string, any>) => Set<string> | null;
3606
+ /**
3607
+ * 组装联动组件动作下拉/级联 options,与 EventSelect 默认 compActionConfig.options 逻辑一致。
3608
+ */
3609
+ declare const getCompActionOptions: (toId?: Id) => EventNameOption[];
3610
+ /**
3611
+ * 解析 event-select 联动组件动作允许的 method 集合。
3612
+ * 自定义 compActionConfig.options 时返回 null(跳过枚举校验)。
3613
+ */
3614
+ declare const getCompActionAllowedValues: (config?: {
3615
+ src?: string;
3616
+ compActionConfig?: {
3617
+ options?: unknown;
3618
+ };
3619
+ }, model?: {
3620
+ to?: Id;
3621
+ }) => Set<string> | null;
3622
+ //#endregion
2538
3623
  //#region temp/packages/editor/src/utils/monaco-editor.d.ts
2539
- declare const _default$42: () => Promise<typeof import("monaco-editor")>;
3624
+ declare const _default$49: () => Promise<typeof import("monaco-editor")>;
2540
3625
  //#endregion
2541
3626
  //#region temp/packages/form/src/schema.d.ts
2542
3627
  interface ChangeRecord$1 {
@@ -2567,6 +3652,9 @@ interface FormSlots {
2567
3652
  //#endregion
2568
3653
  //#region temp/packages/editor/src/editorProps.d.ts
2569
3654
  interface EditorProps {
3655
+ /** 是否是大屏模拟器容器,大屏容器时,左侧属性面板会扩展为两列(正常3列),颜色表单不扩展两列等 */
3656
+ isLargeStageContainer?: boolean;
3657
+ theme?: string;
2570
3658
  /** 页面初始值 */
2571
3659
  modelValue?: MApp;
2572
3660
  /** 左侧面板中的组件类型列表 */
@@ -2616,6 +3704,11 @@ interface EditorProps {
2616
3704
  containerHighlightDuration?: number;
2617
3705
  /** 拖入画布中容器时,识别容器的操作类型 */
2618
3706
  containerHighlightType?: ContainerHighlightType;
3707
+ /**
3708
+ * 是否仅在新增组件(从组件列表拖入新组件)时才启用识别容器,
3709
+ * 开启后在画布中拖动已有组件不会识别容器,默认 false
3710
+ */
3711
+ containerHighlightAddOnly?: boolean;
2619
3712
  /** 画布大小 */
2620
3713
  stageRect?: StageRect;
2621
3714
  /** monaco editor 的配置 */
@@ -2635,8 +3728,15 @@ interface EditorProps {
2635
3728
  alwaysMultiSelect?: boolean;
2636
3729
  /** 禁用页面片 */
2637
3730
  disabledPageFragment?: boolean;
3731
+ /** 禁用「非点击画布选中组件时(如从图层树、面包屑等外部选中),对选中区域做高亮闪烁提示」,默认 false(即默认开启闪烁) */
3732
+ disabledFlashTip?: boolean;
2638
3733
  /** 禁用双击在浮层中单独编辑选中组件 */
2639
3734
  disabledStageOverlay?: boolean;
3735
+ /**
3736
+ * 是否启用「属性配置表单校验」联动能力:开启后属性/样式表单校验失败时仍更新节点,
3737
+ * 并把错误信息集中记录到 editorService,用于组件树标红提示与保存拦截;默认 false(关闭)。
3738
+ */
3739
+ enablePropsFormValidate?: boolean;
2640
3740
  /** 禁用属性配置面板右下角显示源码的按钮 */
2641
3741
  disabledShowSrc?: boolean;
2642
3742
  /** 禁用数据源 */
@@ -2674,6 +3774,8 @@ interface EditorProps {
2674
3774
  /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
2675
3775
  beforeLayerNodeDblclick?: (event: MouseEvent, data: TreeNodeData) => Promise<boolean | void> | boolean | void;
2676
3776
  extendFormState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
3777
+ /** 历史记录面板的自定义扩展 tab,追加在内置的页面/数据源/代码块 tab 之后 */
3778
+ historyListExtraTabs?: HistoryListExtraTab[];
2677
3779
  /** 页面顺序拖拽配置参数 */
2678
3780
  pageBarSortOptions?: PageBarSortOptions;
2679
3781
  /** 页面搜索函数 */
@@ -2696,9 +3798,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2696
3798
  readonly codeValueKey?: string | undefined;
2697
3799
  readonly labelPosition?: string | undefined;
2698
3800
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3801
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
2699
3802
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
2700
3803
  readonly onUnmounted?: (() => any) | undefined;
2701
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
2702
3804
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
2703
3805
  readonly "onForm-error"?: ((e: any) => any) | undefined;
2704
3806
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -2712,7 +3814,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2712
3814
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
2713
3815
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
2714
3816
  $host: Element | null;
2715
- $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);
3817
+ $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);
2716
3818
  $el: any;
2717
3819
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
2718
3820
  config: import("@tmagic/form-schema").FormConfig;
@@ -2723,9 +3825,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2723
3825
  labelPosition?: string;
2724
3826
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
2725
3827
  }> & Readonly<{
3828
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
2726
3829
  onMounted?: ((internalInstance: any) => any) | undefined;
2727
3830
  onUnmounted?: (() => any) | undefined;
2728
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
2729
3831
  "onSubmit-error"?: ((e: any) => any) | undefined;
2730
3832
  "onForm-error"?: ((e: any) => any) | undefined;
2731
3833
  }>, {
@@ -2739,6 +3841,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2739
3841
  readonly isCompare?: boolean | undefined;
2740
3842
  readonly parentValues?: Record<string, any> | undefined;
2741
3843
  readonly labelWidth?: string | undefined;
3844
+ readonly typeMatchValid?: boolean | undefined;
3845
+ readonly validateOnInit?: boolean | undefined;
2742
3846
  readonly disabled?: boolean | undefined;
2743
3847
  readonly height?: string | undefined;
2744
3848
  readonly stepActive?: string | number | undefined;
@@ -2748,6 +3852,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2748
3852
  readonly keyProp?: string | undefined;
2749
3853
  readonly popperClass?: string | undefined;
2750
3854
  readonly preventSubmitDefault?: boolean | undefined;
3855
+ readonly useFieldTextInError?: boolean | undefined;
2751
3856
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
2752
3857
  readonly showDiff?: ((_data: {
2753
3858
  curValue: any;
@@ -2755,6 +3860,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2755
3860
  config: any;
2756
3861
  }) => boolean) | undefined;
2757
3862
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
3863
+ readonly theme?: string | undefined;
2758
3864
  readonly onError?: ((...args: any[]) => any) | undefined;
2759
3865
  readonly onChange?: ((...args: any[]) => any) | undefined;
2760
3866
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -2780,6 +3886,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2780
3886
  isCompare?: boolean;
2781
3887
  parentValues?: Record<string, any>;
2782
3888
  labelWidth?: string;
3889
+ typeMatchValid?: boolean;
3890
+ validateOnInit?: boolean;
2783
3891
  disabled?: boolean;
2784
3892
  height?: string;
2785
3893
  stepActive?: string | number;
@@ -2789,6 +3897,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2789
3897
  keyProp?: string;
2790
3898
  popperClass?: string;
2791
3899
  preventSubmitDefault?: boolean;
3900
+ useFieldTextInError?: boolean;
2792
3901
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
2793
3902
  showDiff?: (_data: {
2794
3903
  curValue: any;
@@ -2796,6 +3905,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2796
3905
  config: any;
2797
3906
  }) => boolean;
2798
3907
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
3908
+ theme?: string;
2799
3909
  }> & Readonly<{
2800
3910
  onError?: ((...args: any[]) => any) | undefined;
2801
3911
  onChange?: ((...args: any[]) => any) | undefined;
@@ -2811,6 +3921,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2811
3921
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
2812
3922
  resetForm: () => void;
2813
3923
  submitForm: (native?: boolean) => Promise<any>;
3924
+ validate: () => Promise<string>;
2814
3925
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
2815
3926
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
2816
3927
  error: (...args: any[]) => void;
@@ -2831,6 +3942,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2831
3942
  keyProp: string;
2832
3943
  parentValues: Record<string, any>;
2833
3944
  stepActive: string | number;
3945
+ validateOnInit: boolean;
3946
+ useFieldTextInError: boolean;
2834
3947
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
2835
3948
  beforeCreate?: (() => void) | (() => void)[];
2836
3949
  created?: (() => void) | (() => void)[];
@@ -2864,6 +3977,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2864
3977
  keyProp: string;
2865
3978
  parentValues: Record<string, any>;
2866
3979
  stepActive: string | number;
3980
+ validateOnInit: boolean;
3981
+ useFieldTextInError: boolean;
2867
3982
  }> & Omit<Readonly<{
2868
3983
  config: import("@tmagic/form-schema").FormConfig;
2869
3984
  initValues: Record<string, any>;
@@ -2871,6 +3986,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2871
3986
  isCompare?: boolean;
2872
3987
  parentValues?: Record<string, any>;
2873
3988
  labelWidth?: string;
3989
+ typeMatchValid?: boolean;
3990
+ validateOnInit?: boolean;
2874
3991
  disabled?: boolean;
2875
3992
  height?: string;
2876
3993
  stepActive?: string | number;
@@ -2880,6 +3997,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2880
3997
  keyProp?: string;
2881
3998
  popperClass?: string;
2882
3999
  preventSubmitDefault?: boolean;
4000
+ useFieldTextInError?: boolean;
2883
4001
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
2884
4002
  showDiff?: (_data: {
2885
4003
  curValue: any;
@@ -2887,13 +4005,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2887
4005
  config: any;
2888
4006
  }) => boolean;
2889
4007
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4008
+ theme?: string;
2890
4009
  }> & Readonly<{
2891
4010
  onError?: ((...args: any[]) => any) | undefined;
2892
4011
  onChange?: ((...args: any[]) => any) | undefined;
2893
4012
  "onField-input"?: ((...args: any[]) => any) | undefined;
2894
4013
  "onField-change"?: ((...args: any[]) => any) | undefined;
2895
4014
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
2896
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4015
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
2897
4016
  values: import("@tmagic/form-schema").FormValue;
2898
4017
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
2899
4018
  formState: import("@tmagic/form-schema").FormState;
@@ -2902,15 +4021,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2902
4021
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
2903
4022
  resetForm: () => void;
2904
4023
  submitForm: (native?: boolean) => Promise<any>;
4024
+ validate: () => Promise<string>;
2905
4025
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
2906
4026
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
2907
4027
  $slots: FormSlots;
2908
4028
  }) | null>>;
2909
4029
  submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
2910
4030
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4031
+ submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
2911
4032
  mounted: (internalInstance: any) => any;
2912
4033
  unmounted: () => any;
2913
- submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
2914
4034
  "submit-error": (e: any) => any;
2915
4035
  "form-error": (e: any) => any;
2916
4036
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -2942,9 +4062,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2942
4062
  labelPosition?: string;
2943
4063
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
2944
4064
  }> & Readonly<{
4065
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
2945
4066
  onMounted?: ((internalInstance: any) => any) | undefined;
2946
4067
  onUnmounted?: (() => any) | undefined;
2947
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
2948
4068
  "onSubmit-error"?: ((e: any) => any) | undefined;
2949
4069
  "onForm-error"?: ((e: any) => any) | undefined;
2950
4070
  }>, "submit" | "configForm"> & {
@@ -2958,6 +4078,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2958
4078
  readonly isCompare?: boolean | undefined;
2959
4079
  readonly parentValues?: Record<string, any> | undefined;
2960
4080
  readonly labelWidth?: string | undefined;
4081
+ readonly typeMatchValid?: boolean | undefined;
4082
+ readonly validateOnInit?: boolean | undefined;
2961
4083
  readonly disabled?: boolean | undefined;
2962
4084
  readonly height?: string | undefined;
2963
4085
  readonly stepActive?: string | number | undefined;
@@ -2967,6 +4089,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2967
4089
  readonly keyProp?: string | undefined;
2968
4090
  readonly popperClass?: string | undefined;
2969
4091
  readonly preventSubmitDefault?: boolean | undefined;
4092
+ readonly useFieldTextInError?: boolean | undefined;
2970
4093
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
2971
4094
  readonly showDiff?: ((_data: {
2972
4095
  curValue: any;
@@ -2974,6 +4097,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2974
4097
  config: any;
2975
4098
  }) => boolean) | undefined;
2976
4099
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
4100
+ readonly theme?: string | undefined;
2977
4101
  readonly onError?: ((...args: any[]) => any) | undefined;
2978
4102
  readonly onChange?: ((...args: any[]) => any) | undefined;
2979
4103
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -2999,6 +4123,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
2999
4123
  isCompare?: boolean;
3000
4124
  parentValues?: Record<string, any>;
3001
4125
  labelWidth?: string;
4126
+ typeMatchValid?: boolean;
4127
+ validateOnInit?: boolean;
3002
4128
  disabled?: boolean;
3003
4129
  height?: string;
3004
4130
  stepActive?: string | number;
@@ -3008,6 +4134,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3008
4134
  keyProp?: string;
3009
4135
  popperClass?: string;
3010
4136
  preventSubmitDefault?: boolean;
4137
+ useFieldTextInError?: boolean;
3011
4138
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3012
4139
  showDiff?: (_data: {
3013
4140
  curValue: any;
@@ -3015,6 +4142,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3015
4142
  config: any;
3016
4143
  }) => boolean;
3017
4144
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4145
+ theme?: string;
3018
4146
  }> & Readonly<{
3019
4147
  onError?: ((...args: any[]) => any) | undefined;
3020
4148
  onChange?: ((...args: any[]) => any) | undefined;
@@ -3030,6 +4158,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3030
4158
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3031
4159
  resetForm: () => void;
3032
4160
  submitForm: (native?: boolean) => Promise<any>;
4161
+ validate: () => Promise<string>;
3033
4162
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3034
4163
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3035
4164
  error: (...args: any[]) => void;
@@ -3050,6 +4179,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3050
4179
  keyProp: string;
3051
4180
  parentValues: Record<string, any>;
3052
4181
  stepActive: string | number;
4182
+ validateOnInit: boolean;
4183
+ useFieldTextInError: boolean;
3053
4184
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3054
4185
  beforeCreate?: (() => void) | (() => void)[];
3055
4186
  created?: (() => void) | (() => void)[];
@@ -3083,6 +4214,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3083
4214
  keyProp: string;
3084
4215
  parentValues: Record<string, any>;
3085
4216
  stepActive: string | number;
4217
+ validateOnInit: boolean;
4218
+ useFieldTextInError: boolean;
3086
4219
  }> & Omit<Readonly<{
3087
4220
  config: import("@tmagic/form-schema").FormConfig;
3088
4221
  initValues: Record<string, any>;
@@ -3090,6 +4223,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3090
4223
  isCompare?: boolean;
3091
4224
  parentValues?: Record<string, any>;
3092
4225
  labelWidth?: string;
4226
+ typeMatchValid?: boolean;
4227
+ validateOnInit?: boolean;
3093
4228
  disabled?: boolean;
3094
4229
  height?: string;
3095
4230
  stepActive?: string | number;
@@ -3099,6 +4234,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3099
4234
  keyProp?: string;
3100
4235
  popperClass?: string;
3101
4236
  preventSubmitDefault?: boolean;
4237
+ useFieldTextInError?: boolean;
3102
4238
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3103
4239
  showDiff?: (_data: {
3104
4240
  curValue: any;
@@ -3106,13 +4242,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3106
4242
  config: any;
3107
4243
  }) => boolean;
3108
4244
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4245
+ theme?: string;
3109
4246
  }> & Readonly<{
3110
4247
  onError?: ((...args: any[]) => any) | undefined;
3111
4248
  onChange?: ((...args: any[]) => any) | undefined;
3112
4249
  "onField-input"?: ((...args: any[]) => any) | undefined;
3113
4250
  "onField-change"?: ((...args: any[]) => any) | undefined;
3114
4251
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
3115
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4252
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
3116
4253
  values: import("@tmagic/form-schema").FormValue;
3117
4254
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
3118
4255
  formState: import("@tmagic/form-schema").FormState;
@@ -3121,6 +4258,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3121
4258
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3122
4259
  resetForm: () => void;
3123
4260
  submitForm: (native?: boolean) => Promise<any>;
4261
+ validate: () => Promise<string>;
3124
4262
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3125
4263
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
3126
4264
  $slots: FormSlots;
@@ -3148,9 +4286,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3148
4286
  readonly codeValueKey?: string | undefined;
3149
4287
  readonly labelPosition?: string | undefined;
3150
4288
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4289
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3151
4290
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
3152
4291
  readonly onUnmounted?: (() => any) | undefined;
3153
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3154
4292
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
3155
4293
  readonly "onForm-error"?: ((e: any) => any) | undefined;
3156
4294
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -3164,7 +4302,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3164
4302
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
3165
4303
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
3166
4304
  $host: Element | null;
3167
- $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);
4305
+ $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);
3168
4306
  $el: any;
3169
4307
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
3170
4308
  config: import("@tmagic/form-schema").FormConfig;
@@ -3175,9 +4313,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3175
4313
  labelPosition?: string;
3176
4314
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3177
4315
  }> & Readonly<{
4316
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3178
4317
  onMounted?: ((internalInstance: any) => any) | undefined;
3179
4318
  onUnmounted?: (() => any) | undefined;
3180
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3181
4319
  "onSubmit-error"?: ((e: any) => any) | undefined;
3182
4320
  "onForm-error"?: ((e: any) => any) | undefined;
3183
4321
  }>, {
@@ -3191,6 +4329,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3191
4329
  readonly isCompare?: boolean | undefined;
3192
4330
  readonly parentValues?: Record<string, any> | undefined;
3193
4331
  readonly labelWidth?: string | undefined;
4332
+ readonly typeMatchValid?: boolean | undefined;
4333
+ readonly validateOnInit?: boolean | undefined;
3194
4334
  readonly disabled?: boolean | undefined;
3195
4335
  readonly height?: string | undefined;
3196
4336
  readonly stepActive?: string | number | undefined;
@@ -3200,6 +4340,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3200
4340
  readonly keyProp?: string | undefined;
3201
4341
  readonly popperClass?: string | undefined;
3202
4342
  readonly preventSubmitDefault?: boolean | undefined;
4343
+ readonly useFieldTextInError?: boolean | undefined;
3203
4344
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3204
4345
  readonly showDiff?: ((_data: {
3205
4346
  curValue: any;
@@ -3207,6 +4348,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3207
4348
  config: any;
3208
4349
  }) => boolean) | undefined;
3209
4350
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
4351
+ readonly theme?: string | undefined;
3210
4352
  readonly onError?: ((...args: any[]) => any) | undefined;
3211
4353
  readonly onChange?: ((...args: any[]) => any) | undefined;
3212
4354
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -3232,6 +4374,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3232
4374
  isCompare?: boolean;
3233
4375
  parentValues?: Record<string, any>;
3234
4376
  labelWidth?: string;
4377
+ typeMatchValid?: boolean;
4378
+ validateOnInit?: boolean;
3235
4379
  disabled?: boolean;
3236
4380
  height?: string;
3237
4381
  stepActive?: string | number;
@@ -3241,6 +4385,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3241
4385
  keyProp?: string;
3242
4386
  popperClass?: string;
3243
4387
  preventSubmitDefault?: boolean;
4388
+ useFieldTextInError?: boolean;
3244
4389
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3245
4390
  showDiff?: (_data: {
3246
4391
  curValue: any;
@@ -3248,6 +4393,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3248
4393
  config: any;
3249
4394
  }) => boolean;
3250
4395
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4396
+ theme?: string;
3251
4397
  }> & Readonly<{
3252
4398
  onError?: ((...args: any[]) => any) | undefined;
3253
4399
  onChange?: ((...args: any[]) => any) | undefined;
@@ -3263,6 +4409,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3263
4409
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3264
4410
  resetForm: () => void;
3265
4411
  submitForm: (native?: boolean) => Promise<any>;
4412
+ validate: () => Promise<string>;
3266
4413
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3267
4414
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3268
4415
  error: (...args: any[]) => void;
@@ -3283,6 +4430,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3283
4430
  keyProp: string;
3284
4431
  parentValues: Record<string, any>;
3285
4432
  stepActive: string | number;
4433
+ validateOnInit: boolean;
4434
+ useFieldTextInError: boolean;
3286
4435
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3287
4436
  beforeCreate?: (() => void) | (() => void)[];
3288
4437
  created?: (() => void) | (() => void)[];
@@ -3316,6 +4465,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3316
4465
  keyProp: string;
3317
4466
  parentValues: Record<string, any>;
3318
4467
  stepActive: string | number;
4468
+ validateOnInit: boolean;
4469
+ useFieldTextInError: boolean;
3319
4470
  }> & Omit<Readonly<{
3320
4471
  config: import("@tmagic/form-schema").FormConfig;
3321
4472
  initValues: Record<string, any>;
@@ -3323,6 +4474,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3323
4474
  isCompare?: boolean;
3324
4475
  parentValues?: Record<string, any>;
3325
4476
  labelWidth?: string;
4477
+ typeMatchValid?: boolean;
4478
+ validateOnInit?: boolean;
3326
4479
  disabled?: boolean;
3327
4480
  height?: string;
3328
4481
  stepActive?: string | number;
@@ -3332,6 +4485,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3332
4485
  keyProp?: string;
3333
4486
  popperClass?: string;
3334
4487
  preventSubmitDefault?: boolean;
4488
+ useFieldTextInError?: boolean;
3335
4489
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3336
4490
  showDiff?: (_data: {
3337
4491
  curValue: any;
@@ -3339,13 +4493,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3339
4493
  config: any;
3340
4494
  }) => boolean;
3341
4495
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4496
+ theme?: string;
3342
4497
  }> & Readonly<{
3343
4498
  onError?: ((...args: any[]) => any) | undefined;
3344
4499
  onChange?: ((...args: any[]) => any) | undefined;
3345
4500
  "onField-input"?: ((...args: any[]) => any) | undefined;
3346
4501
  "onField-change"?: ((...args: any[]) => any) | undefined;
3347
4502
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
3348
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4503
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
3349
4504
  values: import("@tmagic/form-schema").FormValue;
3350
4505
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
3351
4506
  formState: import("@tmagic/form-schema").FormState;
@@ -3354,15 +4509,16 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3354
4509
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3355
4510
  resetForm: () => void;
3356
4511
  submitForm: (native?: boolean) => Promise<any>;
4512
+ validate: () => Promise<string>;
3357
4513
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3358
4514
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
3359
4515
  $slots: FormSlots;
3360
4516
  }) | null>>;
3361
4517
  submit: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => Promise<void>;
3362
4518
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4519
+ submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any;
3363
4520
  mounted: (internalInstance: any) => any;
3364
4521
  unmounted: () => any;
3365
- submit: (values: any, eventData?: ContainerChangeEventData$1 | undefined) => any;
3366
4522
  "submit-error": (e: any) => any;
3367
4523
  "form-error": (e: any) => any;
3368
4524
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -3394,9 +4550,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3394
4550
  labelPosition?: string;
3395
4551
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3396
4552
  }> & Readonly<{
4553
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined, error?: any) => any) | undefined;
3397
4554
  onMounted?: ((internalInstance: any) => any) | undefined;
3398
4555
  onUnmounted?: (() => any) | undefined;
3399
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData$1 | undefined) => any) | undefined;
3400
4556
  "onSubmit-error"?: ((e: any) => any) | undefined;
3401
4557
  "onForm-error"?: ((e: any) => any) | undefined;
3402
4558
  }>, "submit" | "configForm"> & {
@@ -3410,6 +4566,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3410
4566
  readonly isCompare?: boolean | undefined;
3411
4567
  readonly parentValues?: Record<string, any> | undefined;
3412
4568
  readonly labelWidth?: string | undefined;
4569
+ readonly typeMatchValid?: boolean | undefined;
4570
+ readonly validateOnInit?: boolean | undefined;
3413
4571
  readonly disabled?: boolean | undefined;
3414
4572
  readonly height?: string | undefined;
3415
4573
  readonly stepActive?: string | number | undefined;
@@ -3419,6 +4577,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3419
4577
  readonly keyProp?: string | undefined;
3420
4578
  readonly popperClass?: string | undefined;
3421
4579
  readonly preventSubmitDefault?: boolean | undefined;
4580
+ readonly useFieldTextInError?: boolean | undefined;
3422
4581
  readonly extendState?: ((_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
3423
4582
  readonly showDiff?: ((_data: {
3424
4583
  curValue: any;
@@ -3426,6 +4585,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3426
4585
  config: any;
3427
4586
  }) => boolean) | undefined;
3428
4587
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
4588
+ readonly theme?: string | undefined;
3429
4589
  readonly onError?: ((...args: any[]) => any) | undefined;
3430
4590
  readonly onChange?: ((...args: any[]) => any) | undefined;
3431
4591
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -3451,6 +4611,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3451
4611
  isCompare?: boolean;
3452
4612
  parentValues?: Record<string, any>;
3453
4613
  labelWidth?: string;
4614
+ typeMatchValid?: boolean;
4615
+ validateOnInit?: boolean;
3454
4616
  disabled?: boolean;
3455
4617
  height?: string;
3456
4618
  stepActive?: string | number;
@@ -3460,6 +4622,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3460
4622
  keyProp?: string;
3461
4623
  popperClass?: string;
3462
4624
  preventSubmitDefault?: boolean;
4625
+ useFieldTextInError?: boolean;
3463
4626
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3464
4627
  showDiff?: (_data: {
3465
4628
  curValue: any;
@@ -3467,6 +4630,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3467
4630
  config: any;
3468
4631
  }) => boolean;
3469
4632
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4633
+ theme?: string;
3470
4634
  }> & Readonly<{
3471
4635
  onError?: ((...args: any[]) => any) | undefined;
3472
4636
  onChange?: ((...args: any[]) => any) | undefined;
@@ -3482,6 +4646,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3482
4646
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3483
4647
  resetForm: () => void;
3484
4648
  submitForm: (native?: boolean) => Promise<any>;
4649
+ validate: () => Promise<string>;
3485
4650
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3486
4651
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3487
4652
  error: (...args: any[]) => void;
@@ -3502,6 +4667,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3502
4667
  keyProp: string;
3503
4668
  parentValues: Record<string, any>;
3504
4669
  stepActive: string | number;
4670
+ validateOnInit: boolean;
4671
+ useFieldTextInError: boolean;
3505
4672
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
3506
4673
  beforeCreate?: (() => void) | (() => void)[];
3507
4674
  created?: (() => void) | (() => void)[];
@@ -3535,6 +4702,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3535
4702
  keyProp: string;
3536
4703
  parentValues: Record<string, any>;
3537
4704
  stepActive: string | number;
4705
+ validateOnInit: boolean;
4706
+ useFieldTextInError: boolean;
3538
4707
  }> & Omit<Readonly<{
3539
4708
  config: import("@tmagic/form-schema").FormConfig;
3540
4709
  initValues: Record<string, any>;
@@ -3542,6 +4711,8 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3542
4711
  isCompare?: boolean;
3543
4712
  parentValues?: Record<string, any>;
3544
4713
  labelWidth?: string;
4714
+ typeMatchValid?: boolean;
4715
+ validateOnInit?: boolean;
3545
4716
  disabled?: boolean;
3546
4717
  height?: string;
3547
4718
  stepActive?: string | number;
@@ -3551,6 +4722,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3551
4722
  keyProp?: string;
3552
4723
  popperClass?: string;
3553
4724
  preventSubmitDefault?: boolean;
4725
+ useFieldTextInError?: boolean;
3554
4726
  extendState?: (_state: import("@tmagic/form-schema").FormState) => Record<string, any> | Promise<Record<string, any>>;
3555
4727
  showDiff?: (_data: {
3556
4728
  curValue: any;
@@ -3558,13 +4730,14 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3558
4730
  config: any;
3559
4731
  }) => boolean;
3560
4732
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
4733
+ theme?: string;
3561
4734
  }> & Readonly<{
3562
4735
  onError?: ((...args: any[]) => any) | undefined;
3563
4736
  onChange?: ((...args: any[]) => any) | undefined;
3564
4737
  "onField-input"?: ((...args: any[]) => any) | undefined;
3565
4738
  "onField-change"?: ((...args: any[]) => any) | undefined;
3566
4739
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
3567
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
4740
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
3568
4741
  values: import("@tmagic/form-schema").FormValue;
3569
4742
  lastValuesProcessed: import("@tmagic/form-schema").FormValue;
3570
4743
  formState: import("@tmagic/form-schema").FormState;
@@ -3573,6 +4746,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3573
4746
  changeHandler: (v: import("@tmagic/form-schema").FormValue, eventData: ContainerChangeEventData$1) => void;
3574
4747
  resetForm: () => void;
3575
4748
  submitForm: (native?: boolean) => Promise<any>;
4749
+ validate: () => Promise<string>;
3576
4750
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
3577
4751
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
3578
4752
  $slots: FormSlots;
@@ -3596,7 +4770,9 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3596
4770
  disabledCodeBlock: boolean;
3597
4771
  disabledMultiSelect: boolean;
3598
4772
  alwaysMultiSelect: boolean;
4773
+ disabledFlashTip: boolean;
3599
4774
  disabledPageFragment: boolean;
4775
+ historyListExtraTabs: HistoryListExtraTab[];
3600
4776
  disabledShowSrc: boolean;
3601
4777
  customContentMenu: CustomContentMenuFunction;
3602
4778
  layerContentMenu: (MenuButton | MenuComponent)[];
@@ -3616,10 +4792,11 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
3616
4792
  datasourceConfigs: Record<string, import("@tmagic/form-schema").FormConfig>;
3617
4793
  containerHighlightDuration: number;
3618
4794
  containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
4795
+ containerHighlightAddOnly: boolean;
3619
4796
  canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
3620
4797
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3621
- declare const __VLS_export$34: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
3622
- declare const _default$31: typeof __VLS_export$34;
4798
+ declare const __VLS_export$39: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
4799
+ declare const _default$35: typeof __VLS_export$39;
3623
4800
  type __VLS_WithSlots$12<T, S> = T & {
3624
4801
  new (): {
3625
4802
  $slots: S;
@@ -3627,7 +4804,7 @@ type __VLS_WithSlots$12<T, S> = T & {
3627
4804
  };
3628
4805
  //#endregion
3629
4806
  //#region temp/packages/editor/src/layouts/CodeEditor.vue.d.ts
3630
- type __VLS_Props$31 = {
4807
+ type __VLS_Props$34 = {
3631
4808
  initValues?: any;
3632
4809
  modifiedValues?: any;
3633
4810
  type?: 'diff';
@@ -3643,7 +4820,7 @@ type __VLS_Props$31 = {
3643
4820
  };
3644
4821
  editorCustomType?: string;
3645
4822
  };
3646
- declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {
4823
+ declare const __VLS_export$38: import("@vue/runtime-core").DefineComponent<__VLS_Props$34, {
3647
4824
  values: import("@vue/reactivity").Ref<string, string>;
3648
4825
  getEditor(): Monaco.editor.IStandaloneCodeEditor | Monaco.editor.IStandaloneDiffEditor | null;
3649
4826
  getVsEditor(): Monaco.editor.IStandaloneCodeEditor | null;
@@ -3654,7 +4831,7 @@ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS
3654
4831
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3655
4832
  save: (...args: any[]) => void;
3656
4833
  initd: (...args: any[]) => void;
3657
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
4834
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$34> & Readonly<{
3658
4835
  onSave?: ((...args: any[]) => any) | undefined;
3659
4836
  onInitd?: ((...args: any[]) => any) | undefined;
3660
4837
  }>, {
@@ -3665,13 +4842,13 @@ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS
3665
4842
  autoSave: boolean;
3666
4843
  disabledFullScreen: boolean;
3667
4844
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3668
- declare const _default$30: typeof __VLS_export$33;
4845
+ declare const _default$34: typeof __VLS_export$38;
3669
4846
  //#endregion
3670
4847
  //#region temp/packages/editor/src/layouts/sidebar/ComponentListPanel.vue.d.ts
3671
4848
  type __VLS_Slots$11 = ComponentListPanelSlots;
3672
4849
  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>;
3673
- declare const __VLS_export$32: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
3674
- declare const _default$6: typeof __VLS_export$32;
4850
+ declare const __VLS_export$37: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
4851
+ declare const _default$6: typeof __VLS_export$37;
3675
4852
  type __VLS_WithSlots$11<T, S> = T & {
3676
4853
  new (): {
3677
4854
  $slots: S;
@@ -3680,7 +4857,7 @@ type __VLS_WithSlots$11<T, S> = T & {
3680
4857
  //#endregion
3681
4858
  //#region temp/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue.d.ts
3682
4859
  type __VLS_Slots$10 = LayerPanelSlots;
3683
- type __VLS_Props$30 = {
4860
+ type __VLS_Props$33 = {
3684
4861
  layerContentMenu: (MenuButton | MenuComponent)[];
3685
4862
  indent?: number;
3686
4863
  nextLevelIndentIncrement?: number;
@@ -3689,165 +4866,170 @@ type __VLS_Props$30 = {
3689
4866
  canDropIn?: CanDropInFunction; /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
3690
4867
  beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
3691
4868
  };
3692
- declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4869
+ declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$33, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3693
4870
  "node-dblclick": (event: MouseEvent, data: TreeNodeData) => any;
3694
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
4871
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$33> & Readonly<{
3695
4872
  "onNode-dblclick"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
3696
4873
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3697
- declare const __VLS_export$31: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
3698
- declare const _default$23: typeof __VLS_export$31;
4874
+ declare const __VLS_export$36: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
4875
+ declare const _default$27: typeof __VLS_export$36;
3699
4876
  type __VLS_WithSlots$10<T, S> = T & {
3700
4877
  new (): {
3701
4878
  $slots: S;
3702
4879
  };
3703
4880
  };
3704
4881
  //#endregion
4882
+ //#region temp/packages/editor/src/layouts/sidebar/layer/LayerNodeContent.vue.d.ts
4883
+ type __VLS_Props$32 = {
4884
+ data: TreeNodeData;
4885
+ };
4886
+ 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>;
4887
+ declare const _default$26: typeof __VLS_export$35;
4888
+ //#endregion
3705
4889
  //#region temp/packages/editor/src/fields/CodeSelect.vue.d.ts
3706
- type __VLS_Props$29 = FieldProps<CodeSelectConfig>;
3707
- declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$29, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4890
+ type __VLS_Props$31 = FieldProps<CodeSelectConfig>;
4891
+ declare const __VLS_export$34: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3708
4892
  change: (v: any, eventData: ContainerChangeEventData) => any;
3709
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$29> & Readonly<{
4893
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
3710
4894
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
3711
4895
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3712
- declare const _default$3: typeof __VLS_export$30;
4896
+ declare const _default$3: typeof __VLS_export$34;
3713
4897
  //#endregion
3714
4898
  //#region temp/packages/editor/src/fields/CodeSelectCol.vue.d.ts
3715
- type __VLS_Props$28 = FieldProps<CodeSelectColConfig>;
3716
- declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$28, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4899
+ type __VLS_Props$30 = FieldProps<CodeSelectColConfig>;
4900
+ declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3717
4901
  change: (v: any, eventData: ContainerChangeEventData) => any;
3718
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$28> & Readonly<{
4902
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
3719
4903
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
3720
4904
  }>, {
3721
4905
  disabled: boolean;
3722
4906
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3723
- declare const _default$4: typeof __VLS_export$29;
4907
+ declare const _default$4: typeof __VLS_export$33;
3724
4908
  //#endregion
3725
4909
  //#region temp/packages/editor/src/fields/DataSourceFields.vue.d.ts
3726
- type __VLS_Props$27 = FieldProps<DataSourceFieldsConfig>;
4910
+ type __VLS_Props$29 = FieldProps<DataSourceFieldsConfig>;
3727
4911
  type __VLS_ModelProps$4 = {
3728
4912
  'width'?: number;
3729
4913
  'visible'?: boolean;
3730
4914
  'visible1'?: boolean;
3731
4915
  };
3732
- type __VLS_PublicProps$4 = __VLS_Props$27 & __VLS_ModelProps$4;
3733
- declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4916
+ type __VLS_PublicProps$4 = __VLS_Props$29 & __VLS_ModelProps$4;
4917
+ declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3734
4918
  change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
3735
- "update:width": (value: number) => any;
3736
4919
  "update:visible": (value: boolean) => any;
4920
+ "update:width": (value: number) => any;
3737
4921
  "update:visible1": (value: boolean) => any;
3738
4922
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$4> & Readonly<{
3739
4923
  onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
3740
- "onUpdate:width"?: ((value: number) => any) | undefined;
3741
4924
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
4925
+ "onUpdate:width"?: ((value: number) => any) | undefined;
3742
4926
  "onUpdate:visible1"?: ((value: boolean) => any) | undefined;
3743
4927
  }>, {
3744
4928
  disabled: boolean;
3745
4929
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3746
- declare const _default$12: typeof __VLS_export$28;
4930
+ declare const _default$12: typeof __VLS_export$32;
3747
4931
  //#endregion
3748
4932
  //#region temp/packages/editor/src/fields/DataSourceMocks.vue.d.ts
3749
- type __VLS_Props$26 = FieldProps<DataSourceMocksConfig>;
4933
+ type __VLS_Props$28 = FieldProps<DataSourceMocksConfig>;
3750
4934
  type __VLS_ModelProps$3 = {
3751
4935
  'width'?: number;
3752
4936
  'visible'?: boolean;
3753
4937
  };
3754
- type __VLS_PublicProps$3 = __VLS_Props$26 & __VLS_ModelProps$3;
3755
- declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3756
- change: (...args: any[]) => void;
3757
- "update:width": (value: number) => void;
3758
- "update:visible": (value: boolean) => void;
4938
+ type __VLS_PublicProps$3 = __VLS_Props$28 & __VLS_ModelProps$3;
4939
+ declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4940
+ "update:visible": (value: boolean) => any;
4941
+ "update:width": (value: number) => any;
3759
4942
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$3> & Readonly<{
3760
- onChange?: ((...args: any[]) => any) | undefined;
3761
- "onUpdate:width"?: ((value: number) => any) | undefined;
3762
4943
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
4944
+ "onUpdate:width"?: ((value: number) => any) | undefined;
3763
4945
  }>, {
3764
4946
  disabled: boolean;
3765
4947
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3766
- declare const _default$16: typeof __VLS_export$27;
4948
+ declare const _default$16: typeof __VLS_export$31;
3767
4949
  //#endregion
3768
4950
  //#region temp/packages/editor/src/fields/DataSourceMethods.vue.d.ts
3769
- type __VLS_Props$25 = FieldProps<DataSourceMethodsConfig>;
3770
- declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4951
+ type __VLS_Props$27 = FieldProps<DataSourceMethodsConfig>;
4952
+ declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3771
4953
  change: (...args: any[]) => void;
3772
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
4954
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$27> & Readonly<{
3773
4955
  onChange?: ((...args: any[]) => any) | undefined;
3774
4956
  }>, {
3775
4957
  disabled: boolean;
3776
4958
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3777
- declare const _default$15: typeof __VLS_export$26;
4959
+ declare const _default$15: typeof __VLS_export$30;
3778
4960
  //#endregion
3779
4961
  //#region temp/packages/editor/src/fields/DataSourceInput.vue.d.ts
3780
- type __VLS_Props$24 = FieldProps<DataSourceInputConfig>;
3781
- declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4962
+ type __VLS_Props$26 = FieldProps<DataSourceInputConfig>;
4963
+ declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3782
4964
  change: (value: string) => any;
3783
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
4965
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
3784
4966
  onChange?: ((value: string) => any) | undefined;
3785
4967
  }>, {
3786
4968
  disabled: boolean;
3787
4969
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3788
- declare const _default$13: typeof __VLS_export$25;
4970
+ declare const _default$13: typeof __VLS_export$29;
3789
4971
  //#endregion
3790
4972
  //#region temp/packages/editor/src/fields/DataSourceSelect.vue.d.ts
3791
- type __VLS_Props$23 = FieldProps<DataSourceSelect>;
3792
- declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4973
+ type __VLS_Props$25 = FieldProps<DataSourceSelect>;
4974
+ declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3793
4975
  change: (...args: any[]) => void;
3794
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
4976
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
3795
4977
  onChange?: ((...args: any[]) => any) | undefined;
3796
4978
  }>, {
3797
4979
  disabled: boolean;
3798
4980
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3799
- declare const _default$17: typeof __VLS_export$24;
4981
+ declare const _default$17: typeof __VLS_export$28;
3800
4982
  //#endregion
3801
4983
  //#region temp/packages/editor/src/fields/DataSourceMethodSelect.vue.d.ts
3802
- type __VLS_Props$22 = FieldProps<DataSourceMethodSelectConfig>;
3803
- declare const __VLS_export$23: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4984
+ type __VLS_Props$24 = FieldProps<DataSourceMethodSelectConfig>;
4985
+ declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3804
4986
  change: (...args: any[]) => void;
3805
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
4987
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
3806
4988
  onChange?: ((...args: any[]) => any) | undefined;
3807
4989
  }>, {
3808
4990
  disabled: boolean;
3809
4991
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3810
- declare const _default$14: typeof __VLS_export$23;
4992
+ declare const _default$14: typeof __VLS_export$27;
3811
4993
  //#endregion
3812
4994
  //#region temp/packages/editor/src/fields/DataSourceFieldSelect/Index.vue.d.ts
3813
- type __VLS_Props$21 = FieldProps<DataSourceFieldSelectConfig>;
3814
- declare const __VLS_export$22: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4995
+ type __VLS_Props$23 = FieldProps<DataSourceFieldSelectConfig>;
4996
+ declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3815
4997
  change: (...args: any[]) => void;
3816
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
4998
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
3817
4999
  onChange?: ((...args: any[]) => any) | undefined;
3818
5000
  }>, {
3819
5001
  disabled: boolean;
3820
5002
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3821
- declare const _default$11: typeof __VLS_export$22;
5003
+ declare const _default$11: typeof __VLS_export$26;
3822
5004
  //#endregion
3823
5005
  //#region temp/packages/editor/src/fields/EventSelect.vue.d.ts
3824
- type __VLS_Props$20 = FieldProps<EventSelectConfig>;
3825
- declare const __VLS_export$21: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5006
+ type __VLS_Props$22 = FieldProps<EventSelectConfig>;
5007
+ declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3826
5008
  change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
3827
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
5009
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
3828
5010
  onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
3829
5011
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3830
- declare const _default$19: typeof __VLS_export$21;
5012
+ declare const _default$19: typeof __VLS_export$25;
3831
5013
  //#endregion
3832
5014
  //#region temp/packages/editor/src/fields/KeyValue.vue.d.ts
3833
- type __VLS_Props$19 = FieldProps<KeyValueConfig>;
3834
- declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_Props$19, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5015
+ type __VLS_Props$21 = FieldProps<KeyValueConfig>;
5016
+ declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3835
5017
  change: (value: Record<string, any>) => any;
3836
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$19> & Readonly<{
5018
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
3837
5019
  onChange?: ((value: Record<string, any>) => any) | undefined;
3838
5020
  }>, {
3839
5021
  disabled: boolean;
3840
5022
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3841
- declare const _default$22: typeof __VLS_export$20;
5023
+ declare const _default$25: typeof __VLS_export$24;
3842
5024
  //#endregion
3843
5025
  //#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue.d.ts
3844
5026
  type __VLS_Slots$9 = CodeBlockListSlots;
3845
- type __VLS_Props$18 = {
5027
+ type __VLS_Props$20 = {
3846
5028
  indent?: number;
3847
5029
  nextLevelIndentIncrement?: number;
3848
5030
  customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
3849
5031
  };
3850
- declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$18, {
5032
+ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {
3851
5033
  nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
3852
5034
  visible: boolean;
3853
5035
  expand: boolean;
@@ -3860,18 +5042,26 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
3860
5042
  draggable: boolean;
3861
5043
  }> & Omit<Map<Id, LayerNodeStatus>, keyof Map<any, any>>)>;
3862
5044
  filter: (text: string | string[]) => void;
3863
- deleteCode: (id: string) => Promise<void>;
5045
+ deleteCode: (id: string, {
5046
+ historySource
5047
+ }?: {
5048
+ historySource?: HistoryOpSource;
5049
+ }) => Promise<void>;
3864
5050
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3865
- remove: (id: string) => any;
5051
+ remove: (id: string, args_1: {
5052
+ historySource?: HistoryOpSource;
5053
+ }) => any;
3866
5054
  edit: (id: string) => any;
3867
5055
  "node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
3868
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$18> & Readonly<{
3869
- onRemove?: ((id: string) => any) | undefined;
5056
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
5057
+ onRemove?: ((id: string, args_1: {
5058
+ historySource?: HistoryOpSource;
5059
+ }) => any) | undefined;
3870
5060
  onEdit?: ((id: string) => any) | undefined;
3871
5061
  "onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
3872
5062
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3873
- declare const __VLS_export$19: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
3874
- declare const _default$1: typeof __VLS_export$19;
5063
+ declare const __VLS_export$23: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
5064
+ declare const _default$1: typeof __VLS_export$23;
3875
5065
  type __VLS_WithSlots$9<T, S> = T & {
3876
5066
  new (): {
3877
5067
  $slots: S;
@@ -3880,15 +5070,15 @@ type __VLS_WithSlots$9<T, S> = T & {
3880
5070
  //#endregion
3881
5071
  //#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts
3882
5072
  type __VLS_Slots$8 = CodeBlockListPanelSlots;
3883
- type __VLS_Props$17 = {
5073
+ type __VLS_Props$19 = {
3884
5074
  indent?: number;
3885
5075
  nextLevelIndentIncrement?: number;
3886
5076
  customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
3887
5077
  customContentMenu: CustomContentMenuFunction;
3888
5078
  };
3889
- declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$17, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$17> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3890
- declare const __VLS_export$18: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
3891
- declare const _default$2: typeof __VLS_export$18;
5079
+ 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>;
5080
+ declare const __VLS_export$22: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
5081
+ declare const _default$2: typeof __VLS_export$22;
3892
5082
  type __VLS_WithSlots$8<T, S> = T & {
3893
5083
  new (): {
3894
5084
  $slots: S;
@@ -3896,36 +5086,38 @@ type __VLS_WithSlots$8<T, S> = T & {
3896
5086
  };
3897
5087
  //#endregion
3898
5088
  //#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts
3899
- type __VLS_Props$16 = {
5089
+ type __VLS_Props$18 = {
3900
5090
  title?: string;
3901
5091
  values: any;
3902
- disabled: boolean;
5092
+ disabled: boolean; /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
5093
+ editMethodName?: string; /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
5094
+ editFieldPath?: string[];
3903
5095
  };
3904
5096
  type __VLS_ModelProps$2 = {
3905
5097
  'visible'?: boolean;
3906
5098
  'width'?: number;
3907
5099
  };
3908
- type __VLS_PublicProps$2 = __VLS_Props$16 & __VLS_ModelProps$2;
3909
- declare const __VLS_export$17: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
5100
+ type __VLS_PublicProps$2 = __VLS_Props$18 & __VLS_ModelProps$2;
5101
+ declare const __VLS_export$21: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
3910
5102
  show(): void;
3911
5103
  hide(): void;
3912
5104
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3913
5105
  close: () => any;
3914
5106
  submit: (v: any, eventData: ContainerChangeEventData) => any;
3915
5107
  open: (id: string) => any;
3916
- "update:width": (value: number) => any;
3917
5108
  "update:visible": (value: boolean) => any;
5109
+ "update:width": (value: number) => any;
3918
5110
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$2> & Readonly<{
3919
5111
  onClose?: (() => any) | undefined;
3920
5112
  onSubmit?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
3921
5113
  onOpen?: ((id: string) => any) | undefined;
3922
- "onUpdate:width"?: ((value: number) => any) | undefined;
3923
5114
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
5115
+ "onUpdate:width"?: ((value: number) => any) | undefined;
3924
5116
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3925
- declare const _default$10: typeof __VLS_export$17;
5117
+ declare const _default$10: typeof __VLS_export$21;
3926
5118
  //#endregion
3927
5119
  //#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceAddButton.vue.d.ts
3928
- type __VLS_Props$15 = {
5120
+ type __VLS_Props$17 = {
3929
5121
  datasourceTypeList: {
3930
5122
  text: string;
3931
5123
  type: string;
@@ -3933,22 +5125,22 @@ type __VLS_Props$15 = {
3933
5125
  addButtonConfig?: ButtonProps;
3934
5126
  addButtonText?: string;
3935
5127
  };
3936
- declare const __VLS_export$16: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5128
+ declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_Props$17, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3937
5129
  add: (type: string) => any;
3938
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
5130
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$17> & Readonly<{
3939
5131
  onAdd?: ((type: string) => any) | undefined;
3940
5132
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
3941
- declare const _default$9: typeof __VLS_export$16;
5133
+ declare const _default$9: typeof __VLS_export$20;
3942
5134
  //#endregion
3943
5135
  //#region temp/packages/editor/src/layouts/props-panel/PropsPanel.vue.d.ts
3944
5136
  type __VLS_Slots$7 = PropsPanelSlots;
3945
- type __VLS_Props$14 = {
5137
+ type __VLS_Props$16 = {
3946
5138
  disabledShowSrc?: boolean;
3947
5139
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
3948
5140
  };
3949
- declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
5141
+ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {
3950
5142
  getFormState(): FormState | undefined;
3951
- submit: (v: MNode, eventData?: ContainerChangeEventData) => Promise<void>;
5143
+ submit: (v: MNode, eventData?: ContainerChangeEventData, error?: any, source?: NodeInvalidSource) => Promise<void>;
3952
5144
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
3953
5145
  mounted: (internalInstance: {
3954
5146
  $: import("@vue/runtime-core").ComponentInternalInstance;
@@ -3961,9 +5153,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
3961
5153
  readonly codeValueKey?: string | undefined;
3962
5154
  readonly labelPosition?: string | undefined;
3963
5155
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5156
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
3964
5157
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
3965
5158
  readonly onUnmounted?: (() => any) | undefined;
3966
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
3967
5159
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
3968
5160
  readonly "onForm-error"?: ((e: any) => any) | undefined;
3969
5161
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -3977,7 +5169,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
3977
5169
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
3978
5170
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
3979
5171
  $host: Element | null;
3980
- $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);
5172
+ $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);
3981
5173
  $el: any;
3982
5174
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
3983
5175
  config: import("@tmagic/form-schema").FormConfig;
@@ -3988,9 +5180,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
3988
5180
  labelPosition?: string;
3989
5181
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
3990
5182
  }> & Readonly<{
5183
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
3991
5184
  onMounted?: ((internalInstance: any) => any) | undefined;
3992
5185
  onUnmounted?: (() => any) | undefined;
3993
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
3994
5186
  "onSubmit-error"?: ((e: any) => any) | undefined;
3995
5187
  "onForm-error"?: ((e: any) => any) | undefined;
3996
5188
  }>, {
@@ -4004,6 +5196,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4004
5196
  readonly isCompare?: boolean | undefined;
4005
5197
  readonly parentValues?: Record<string, any> | undefined;
4006
5198
  readonly labelWidth?: string | undefined;
5199
+ readonly typeMatchValid?: boolean | undefined;
5200
+ readonly validateOnInit?: boolean | undefined;
4007
5201
  readonly disabled?: boolean | undefined;
4008
5202
  readonly height?: string | undefined;
4009
5203
  readonly stepActive?: string | number | undefined;
@@ -4013,6 +5207,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4013
5207
  readonly keyProp?: string | undefined;
4014
5208
  readonly popperClass?: string | undefined;
4015
5209
  readonly preventSubmitDefault?: boolean | undefined;
5210
+ readonly useFieldTextInError?: boolean | undefined;
4016
5211
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4017
5212
  readonly showDiff?: ((_data: {
4018
5213
  curValue: any;
@@ -4020,6 +5215,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4020
5215
  config: any;
4021
5216
  }) => boolean) | undefined;
4022
5217
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
5218
+ readonly theme?: string | undefined;
4023
5219
  readonly onError?: ((...args: any[]) => any) | undefined;
4024
5220
  readonly onChange?: ((...args: any[]) => any) | undefined;
4025
5221
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -4045,6 +5241,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4045
5241
  isCompare?: boolean;
4046
5242
  parentValues?: Record<string, any>;
4047
5243
  labelWidth?: string;
5244
+ typeMatchValid?: boolean;
5245
+ validateOnInit?: boolean;
4048
5246
  disabled?: boolean;
4049
5247
  height?: string;
4050
5248
  stepActive?: string | number;
@@ -4054,6 +5252,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4054
5252
  keyProp?: string;
4055
5253
  popperClass?: string;
4056
5254
  preventSubmitDefault?: boolean;
5255
+ useFieldTextInError?: boolean;
4057
5256
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4058
5257
  showDiff?: (_data: {
4059
5258
  curValue: any;
@@ -4061,6 +5260,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4061
5260
  config: any;
4062
5261
  }) => boolean;
4063
5262
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5263
+ theme?: string;
4064
5264
  }> & Readonly<{
4065
5265
  onError?: ((...args: any[]) => any) | undefined;
4066
5266
  onChange?: ((...args: any[]) => any) | undefined;
@@ -4076,6 +5276,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4076
5276
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4077
5277
  resetForm: () => void;
4078
5278
  submitForm: (native?: boolean) => Promise<any>;
5279
+ validate: () => Promise<string>;
4079
5280
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4080
5281
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4081
5282
  error: (...args: any[]) => void;
@@ -4096,6 +5297,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4096
5297
  keyProp: string;
4097
5298
  parentValues: Record<string, any>;
4098
5299
  stepActive: string | number;
5300
+ validateOnInit: boolean;
5301
+ useFieldTextInError: boolean;
4099
5302
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4100
5303
  beforeCreate?: (() => void) | (() => void)[];
4101
5304
  created?: (() => void) | (() => void)[];
@@ -4129,6 +5332,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4129
5332
  keyProp: string;
4130
5333
  parentValues: Record<string, any>;
4131
5334
  stepActive: string | number;
5335
+ validateOnInit: boolean;
5336
+ useFieldTextInError: boolean;
4132
5337
  }> & Omit<Readonly<{
4133
5338
  config: import("@tmagic/form-schema").FormConfig;
4134
5339
  initValues: Record<string, any>;
@@ -4136,6 +5341,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4136
5341
  isCompare?: boolean;
4137
5342
  parentValues?: Record<string, any>;
4138
5343
  labelWidth?: string;
5344
+ typeMatchValid?: boolean;
5345
+ validateOnInit?: boolean;
4139
5346
  disabled?: boolean;
4140
5347
  height?: string;
4141
5348
  stepActive?: string | number;
@@ -4145,6 +5352,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4145
5352
  keyProp?: string;
4146
5353
  popperClass?: string;
4147
5354
  preventSubmitDefault?: boolean;
5355
+ useFieldTextInError?: boolean;
4148
5356
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4149
5357
  showDiff?: (_data: {
4150
5358
  curValue: any;
@@ -4152,13 +5360,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4152
5360
  config: any;
4153
5361
  }) => boolean;
4154
5362
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5363
+ theme?: string;
4155
5364
  }> & Readonly<{
4156
5365
  onError?: ((...args: any[]) => any) | undefined;
4157
5366
  onChange?: ((...args: any[]) => any) | undefined;
4158
5367
  "onField-input"?: ((...args: any[]) => any) | undefined;
4159
5368
  "onField-change"?: ((...args: any[]) => any) | undefined;
4160
5369
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4161
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5370
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
4162
5371
  values: FormValue;
4163
5372
  lastValuesProcessed: FormValue;
4164
5373
  formState: FormState;
@@ -4167,15 +5376,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4167
5376
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4168
5377
  resetForm: () => void;
4169
5378
  submitForm: (native?: boolean) => Promise<any>;
5379
+ validate: () => Promise<string>;
4170
5380
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4171
5381
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4172
5382
  $slots: FormSlots;
4173
5383
  }) | null>>;
4174
5384
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
4175
5385
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5386
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
4176
5387
  mounted: (internalInstance: any) => any;
4177
5388
  unmounted: () => any;
4178
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
4179
5389
  "submit-error": (e: any) => any;
4180
5390
  "form-error": (e: any) => any;
4181
5391
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -4207,9 +5417,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4207
5417
  labelPosition?: string;
4208
5418
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4209
5419
  }> & Readonly<{
5420
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4210
5421
  onMounted?: ((internalInstance: any) => any) | undefined;
4211
5422
  onUnmounted?: (() => any) | undefined;
4212
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4213
5423
  "onSubmit-error"?: ((e: any) => any) | undefined;
4214
5424
  "onForm-error"?: ((e: any) => any) | undefined;
4215
5425
  }>, "submit" | "configForm"> & {
@@ -4223,6 +5433,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4223
5433
  readonly isCompare?: boolean | undefined;
4224
5434
  readonly parentValues?: Record<string, any> | undefined;
4225
5435
  readonly labelWidth?: string | undefined;
5436
+ readonly typeMatchValid?: boolean | undefined;
5437
+ readonly validateOnInit?: boolean | undefined;
4226
5438
  readonly disabled?: boolean | undefined;
4227
5439
  readonly height?: string | undefined;
4228
5440
  readonly stepActive?: string | number | undefined;
@@ -4232,6 +5444,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4232
5444
  readonly keyProp?: string | undefined;
4233
5445
  readonly popperClass?: string | undefined;
4234
5446
  readonly preventSubmitDefault?: boolean | undefined;
5447
+ readonly useFieldTextInError?: boolean | undefined;
4235
5448
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4236
5449
  readonly showDiff?: ((_data: {
4237
5450
  curValue: any;
@@ -4239,6 +5452,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4239
5452
  config: any;
4240
5453
  }) => boolean) | undefined;
4241
5454
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
5455
+ readonly theme?: string | undefined;
4242
5456
  readonly onError?: ((...args: any[]) => any) | undefined;
4243
5457
  readonly onChange?: ((...args: any[]) => any) | undefined;
4244
5458
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -4264,6 +5478,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4264
5478
  isCompare?: boolean;
4265
5479
  parentValues?: Record<string, any>;
4266
5480
  labelWidth?: string;
5481
+ typeMatchValid?: boolean;
5482
+ validateOnInit?: boolean;
4267
5483
  disabled?: boolean;
4268
5484
  height?: string;
4269
5485
  stepActive?: string | number;
@@ -4273,6 +5489,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4273
5489
  keyProp?: string;
4274
5490
  popperClass?: string;
4275
5491
  preventSubmitDefault?: boolean;
5492
+ useFieldTextInError?: boolean;
4276
5493
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4277
5494
  showDiff?: (_data: {
4278
5495
  curValue: any;
@@ -4280,6 +5497,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4280
5497
  config: any;
4281
5498
  }) => boolean;
4282
5499
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5500
+ theme?: string;
4283
5501
  }> & Readonly<{
4284
5502
  onError?: ((...args: any[]) => any) | undefined;
4285
5503
  onChange?: ((...args: any[]) => any) | undefined;
@@ -4295,6 +5513,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4295
5513
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4296
5514
  resetForm: () => void;
4297
5515
  submitForm: (native?: boolean) => Promise<any>;
5516
+ validate: () => Promise<string>;
4298
5517
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4299
5518
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4300
5519
  error: (...args: any[]) => void;
@@ -4315,6 +5534,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4315
5534
  keyProp: string;
4316
5535
  parentValues: Record<string, any>;
4317
5536
  stepActive: string | number;
5537
+ validateOnInit: boolean;
5538
+ useFieldTextInError: boolean;
4318
5539
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4319
5540
  beforeCreate?: (() => void) | (() => void)[];
4320
5541
  created?: (() => void) | (() => void)[];
@@ -4348,6 +5569,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4348
5569
  keyProp: string;
4349
5570
  parentValues: Record<string, any>;
4350
5571
  stepActive: string | number;
5572
+ validateOnInit: boolean;
5573
+ useFieldTextInError: boolean;
4351
5574
  }> & Omit<Readonly<{
4352
5575
  config: import("@tmagic/form-schema").FormConfig;
4353
5576
  initValues: Record<string, any>;
@@ -4355,6 +5578,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4355
5578
  isCompare?: boolean;
4356
5579
  parentValues?: Record<string, any>;
4357
5580
  labelWidth?: string;
5581
+ typeMatchValid?: boolean;
5582
+ validateOnInit?: boolean;
4358
5583
  disabled?: boolean;
4359
5584
  height?: string;
4360
5585
  stepActive?: string | number;
@@ -4364,6 +5589,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4364
5589
  keyProp?: string;
4365
5590
  popperClass?: string;
4366
5591
  preventSubmitDefault?: boolean;
5592
+ useFieldTextInError?: boolean;
4367
5593
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4368
5594
  showDiff?: (_data: {
4369
5595
  curValue: any;
@@ -4371,13 +5597,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4371
5597
  config: any;
4372
5598
  }) => boolean;
4373
5599
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5600
+ theme?: string;
4374
5601
  }> & Readonly<{
4375
5602
  onError?: ((...args: any[]) => any) | undefined;
4376
5603
  onChange?: ((...args: any[]) => any) | undefined;
4377
5604
  "onField-input"?: ((...args: any[]) => any) | undefined;
4378
5605
  "onField-change"?: ((...args: any[]) => any) | undefined;
4379
5606
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4380
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5607
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
4381
5608
  values: FormValue;
4382
5609
  lastValuesProcessed: FormValue;
4383
5610
  formState: FormState;
@@ -4386,6 +5613,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4386
5613
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4387
5614
  resetForm: () => void;
4388
5615
  submitForm: (native?: boolean) => Promise<any>;
5616
+ validate: () => Promise<string>;
4389
5617
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4390
5618
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4391
5619
  $slots: FormSlots;
@@ -4399,7 +5627,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4399
5627
  unmounted: () => any;
4400
5628
  "submit-error": (e: any) => any;
4401
5629
  "form-error": (e: any) => any;
4402
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{
5630
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
4403
5631
  onMounted?: ((internalInstance: {
4404
5632
  $: import("@vue/runtime-core").ComponentInternalInstance;
4405
5633
  $data: {};
@@ -4411,9 +5639,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4411
5639
  readonly codeValueKey?: string | undefined;
4412
5640
  readonly labelPosition?: string | undefined;
4413
5641
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
5642
+ readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4414
5643
  readonly onMounted?: ((internalInstance: any) => any) | undefined;
4415
5644
  readonly onUnmounted?: (() => any) | undefined;
4416
- readonly onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4417
5645
  readonly "onSubmit-error"?: ((e: any) => any) | undefined;
4418
5646
  readonly "onForm-error"?: ((e: any) => any) | undefined;
4419
5647
  } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
@@ -4427,7 +5655,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4427
5655
  $root: import("@vue/runtime-core").ComponentPublicInstance | null;
4428
5656
  $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
4429
5657
  $host: Element | null;
4430
- $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);
5658
+ $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);
4431
5659
  $el: any;
4432
5660
  $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
4433
5661
  config: import("@tmagic/form-schema").FormConfig;
@@ -4438,9 +5666,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4438
5666
  labelPosition?: string;
4439
5667
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4440
5668
  }> & Readonly<{
5669
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4441
5670
  onMounted?: ((internalInstance: any) => any) | undefined;
4442
5671
  onUnmounted?: (() => any) | undefined;
4443
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4444
5672
  "onSubmit-error"?: ((e: any) => any) | undefined;
4445
5673
  "onForm-error"?: ((e: any) => any) | undefined;
4446
5674
  }>, {
@@ -4454,6 +5682,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4454
5682
  readonly isCompare?: boolean | undefined;
4455
5683
  readonly parentValues?: Record<string, any> | undefined;
4456
5684
  readonly labelWidth?: string | undefined;
5685
+ readonly typeMatchValid?: boolean | undefined;
5686
+ readonly validateOnInit?: boolean | undefined;
4457
5687
  readonly disabled?: boolean | undefined;
4458
5688
  readonly height?: string | undefined;
4459
5689
  readonly stepActive?: string | number | undefined;
@@ -4463,6 +5693,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4463
5693
  readonly keyProp?: string | undefined;
4464
5694
  readonly popperClass?: string | undefined;
4465
5695
  readonly preventSubmitDefault?: boolean | undefined;
5696
+ readonly useFieldTextInError?: boolean | undefined;
4466
5697
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4467
5698
  readonly showDiff?: ((_data: {
4468
5699
  curValue: any;
@@ -4470,6 +5701,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4470
5701
  config: any;
4471
5702
  }) => boolean) | undefined;
4472
5703
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
5704
+ readonly theme?: string | undefined;
4473
5705
  readonly onError?: ((...args: any[]) => any) | undefined;
4474
5706
  readonly onChange?: ((...args: any[]) => any) | undefined;
4475
5707
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -4495,6 +5727,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4495
5727
  isCompare?: boolean;
4496
5728
  parentValues?: Record<string, any>;
4497
5729
  labelWidth?: string;
5730
+ typeMatchValid?: boolean;
5731
+ validateOnInit?: boolean;
4498
5732
  disabled?: boolean;
4499
5733
  height?: string;
4500
5734
  stepActive?: string | number;
@@ -4504,6 +5738,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4504
5738
  keyProp?: string;
4505
5739
  popperClass?: string;
4506
5740
  preventSubmitDefault?: boolean;
5741
+ useFieldTextInError?: boolean;
4507
5742
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4508
5743
  showDiff?: (_data: {
4509
5744
  curValue: any;
@@ -4511,6 +5746,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4511
5746
  config: any;
4512
5747
  }) => boolean;
4513
5748
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5749
+ theme?: string;
4514
5750
  }> & Readonly<{
4515
5751
  onError?: ((...args: any[]) => any) | undefined;
4516
5752
  onChange?: ((...args: any[]) => any) | undefined;
@@ -4526,6 +5762,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4526
5762
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4527
5763
  resetForm: () => void;
4528
5764
  submitForm: (native?: boolean) => Promise<any>;
5765
+ validate: () => Promise<string>;
4529
5766
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4530
5767
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4531
5768
  error: (...args: any[]) => void;
@@ -4546,6 +5783,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4546
5783
  keyProp: string;
4547
5784
  parentValues: Record<string, any>;
4548
5785
  stepActive: string | number;
5786
+ validateOnInit: boolean;
5787
+ useFieldTextInError: boolean;
4549
5788
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4550
5789
  beforeCreate?: (() => void) | (() => void)[];
4551
5790
  created?: (() => void) | (() => void)[];
@@ -4579,6 +5818,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4579
5818
  keyProp: string;
4580
5819
  parentValues: Record<string, any>;
4581
5820
  stepActive: string | number;
5821
+ validateOnInit: boolean;
5822
+ useFieldTextInError: boolean;
4582
5823
  }> & Omit<Readonly<{
4583
5824
  config: import("@tmagic/form-schema").FormConfig;
4584
5825
  initValues: Record<string, any>;
@@ -4586,6 +5827,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4586
5827
  isCompare?: boolean;
4587
5828
  parentValues?: Record<string, any>;
4588
5829
  labelWidth?: string;
5830
+ typeMatchValid?: boolean;
5831
+ validateOnInit?: boolean;
4589
5832
  disabled?: boolean;
4590
5833
  height?: string;
4591
5834
  stepActive?: string | number;
@@ -4595,6 +5838,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4595
5838
  keyProp?: string;
4596
5839
  popperClass?: string;
4597
5840
  preventSubmitDefault?: boolean;
5841
+ useFieldTextInError?: boolean;
4598
5842
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4599
5843
  showDiff?: (_data: {
4600
5844
  curValue: any;
@@ -4602,13 +5846,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4602
5846
  config: any;
4603
5847
  }) => boolean;
4604
5848
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5849
+ theme?: string;
4605
5850
  }> & Readonly<{
4606
5851
  onError?: ((...args: any[]) => any) | undefined;
4607
5852
  onChange?: ((...args: any[]) => any) | undefined;
4608
5853
  "onField-input"?: ((...args: any[]) => any) | undefined;
4609
5854
  "onField-change"?: ((...args: any[]) => any) | undefined;
4610
5855
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4611
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
5856
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
4612
5857
  values: FormValue;
4613
5858
  lastValuesProcessed: FormValue;
4614
5859
  formState: FormState;
@@ -4617,15 +5862,16 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4617
5862
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4618
5863
  resetForm: () => void;
4619
5864
  submitForm: (native?: boolean) => Promise<any>;
5865
+ validate: () => Promise<string>;
4620
5866
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4621
5867
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4622
5868
  $slots: FormSlots;
4623
5869
  }) | null>>;
4624
5870
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
4625
5871
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5872
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
4626
5873
  mounted: (internalInstance: any) => any;
4627
5874
  unmounted: () => any;
4628
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
4629
5875
  "submit-error": (e: any) => any;
4630
5876
  "form-error": (e: any) => any;
4631
5877
  }, string, {}, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
@@ -4657,9 +5903,9 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4657
5903
  labelPosition?: string;
4658
5904
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4659
5905
  }> & Readonly<{
5906
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
4660
5907
  onMounted?: ((internalInstance: any) => any) | undefined;
4661
5908
  onUnmounted?: (() => any) | undefined;
4662
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
4663
5909
  "onSubmit-error"?: ((e: any) => any) | undefined;
4664
5910
  "onForm-error"?: ((e: any) => any) | undefined;
4665
5911
  }>, "submit" | "configForm"> & {
@@ -4673,6 +5919,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4673
5919
  readonly isCompare?: boolean | undefined;
4674
5920
  readonly parentValues?: Record<string, any> | undefined;
4675
5921
  readonly labelWidth?: string | undefined;
5922
+ readonly typeMatchValid?: boolean | undefined;
5923
+ readonly validateOnInit?: boolean | undefined;
4676
5924
  readonly disabled?: boolean | undefined;
4677
5925
  readonly height?: string | undefined;
4678
5926
  readonly stepActive?: string | number | undefined;
@@ -4682,6 +5930,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4682
5930
  readonly keyProp?: string | undefined;
4683
5931
  readonly popperClass?: string | undefined;
4684
5932
  readonly preventSubmitDefault?: boolean | undefined;
5933
+ readonly useFieldTextInError?: boolean | undefined;
4685
5934
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4686
5935
  readonly showDiff?: ((_data: {
4687
5936
  curValue: any;
@@ -4689,6 +5938,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4689
5938
  config: any;
4690
5939
  }) => boolean) | undefined;
4691
5940
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
5941
+ readonly theme?: string | undefined;
4692
5942
  readonly onError?: ((...args: any[]) => any) | undefined;
4693
5943
  readonly onChange?: ((...args: any[]) => any) | undefined;
4694
5944
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -4714,6 +5964,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4714
5964
  isCompare?: boolean;
4715
5965
  parentValues?: Record<string, any>;
4716
5966
  labelWidth?: string;
5967
+ typeMatchValid?: boolean;
5968
+ validateOnInit?: boolean;
4717
5969
  disabled?: boolean;
4718
5970
  height?: string;
4719
5971
  stepActive?: string | number;
@@ -4723,6 +5975,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4723
5975
  keyProp?: string;
4724
5976
  popperClass?: string;
4725
5977
  preventSubmitDefault?: boolean;
5978
+ useFieldTextInError?: boolean;
4726
5979
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4727
5980
  showDiff?: (_data: {
4728
5981
  curValue: any;
@@ -4730,6 +5983,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4730
5983
  config: any;
4731
5984
  }) => boolean;
4732
5985
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
5986
+ theme?: string;
4733
5987
  }> & Readonly<{
4734
5988
  onError?: ((...args: any[]) => any) | undefined;
4735
5989
  onChange?: ((...args: any[]) => any) | undefined;
@@ -4745,6 +5999,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4745
5999
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4746
6000
  resetForm: () => void;
4747
6001
  submitForm: (native?: boolean) => Promise<any>;
6002
+ validate: () => Promise<string>;
4748
6003
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4749
6004
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4750
6005
  error: (...args: any[]) => void;
@@ -4765,6 +6020,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4765
6020
  keyProp: string;
4766
6021
  parentValues: Record<string, any>;
4767
6022
  stepActive: string | number;
6023
+ validateOnInit: boolean;
6024
+ useFieldTextInError: boolean;
4768
6025
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4769
6026
  beforeCreate?: (() => void) | (() => void)[];
4770
6027
  created?: (() => void) | (() => void)[];
@@ -4798,6 +6055,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4798
6055
  keyProp: string;
4799
6056
  parentValues: Record<string, any>;
4800
6057
  stepActive: string | number;
6058
+ validateOnInit: boolean;
6059
+ useFieldTextInError: boolean;
4801
6060
  }> & Omit<Readonly<{
4802
6061
  config: import("@tmagic/form-schema").FormConfig;
4803
6062
  initValues: Record<string, any>;
@@ -4805,6 +6064,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4805
6064
  isCompare?: boolean;
4806
6065
  parentValues?: Record<string, any>;
4807
6066
  labelWidth?: string;
6067
+ typeMatchValid?: boolean;
6068
+ validateOnInit?: boolean;
4808
6069
  disabled?: boolean;
4809
6070
  height?: string;
4810
6071
  stepActive?: string | number;
@@ -4814,6 +6075,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4814
6075
  keyProp?: string;
4815
6076
  popperClass?: string;
4816
6077
  preventSubmitDefault?: boolean;
6078
+ useFieldTextInError?: boolean;
4817
6079
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4818
6080
  showDiff?: (_data: {
4819
6081
  curValue: any;
@@ -4821,13 +6083,14 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4821
6083
  config: any;
4822
6084
  }) => boolean;
4823
6085
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
6086
+ theme?: string;
4824
6087
  }> & Readonly<{
4825
6088
  onError?: ((...args: any[]) => any) | undefined;
4826
6089
  onChange?: ((...args: any[]) => any) | undefined;
4827
6090
  "onField-input"?: ((...args: any[]) => any) | undefined;
4828
6091
  "onField-change"?: ((...args: any[]) => any) | undefined;
4829
6092
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
4830
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
6093
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
4831
6094
  values: FormValue;
4832
6095
  lastValuesProcessed: FormValue;
4833
6096
  formState: FormState;
@@ -4836,6 +6099,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4836
6099
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4837
6100
  resetForm: () => void;
4838
6101
  submitForm: (native?: boolean) => Promise<any>;
6102
+ validate: () => Promise<string>;
4839
6103
  getTextByName: (name: string, config?: import("@tmagic/form-schema").FormConfig) => string | undefined;
4840
6104
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
4841
6105
  $slots: FormSlots;
@@ -4850,8 +6114,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4850
6114
  "onSubmit-error"?: ((e: any) => any) | undefined;
4851
6115
  "onForm-error"?: ((e: any) => any) | undefined;
4852
6116
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
4853
- declare const __VLS_export$15: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
4854
- declare const _default$27: typeof __VLS_export$15;
6117
+ declare const __VLS_export$19: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
6118
+ declare const _default$31: typeof __VLS_export$19;
4855
6119
  type __VLS_WithSlots$7<T, S> = T & {
4856
6120
  new (): {
4857
6121
  $slots: S;
@@ -4862,7 +6126,7 @@ type __VLS_WithSlots$7<T, S> = T & {
4862
6126
  type __VLS_Slots$6 = {
4863
6127
  'props-form-panel-header'(_props: {}): any;
4864
6128
  };
4865
- type __VLS_Props$13 = {
6129
+ type __VLS_Props$15 = {
4866
6130
  config: FormConfig;
4867
6131
  values: FormValue;
4868
6132
  disabledShowSrc?: boolean;
@@ -4871,7 +6135,7 @@ type __VLS_Props$13 = {
4871
6135
  labelPosition?: string;
4872
6136
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4873
6137
  };
4874
- declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
6138
+ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
4875
6139
  configForm: Readonly<import("@vue/reactivity").ShallowRef<({
4876
6140
  $: import("@vue/runtime-core").ComponentInternalInstance;
4877
6141
  $data: {};
@@ -4882,6 +6146,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4882
6146
  readonly isCompare?: boolean | undefined;
4883
6147
  readonly parentValues?: Record<string, any> | undefined;
4884
6148
  readonly labelWidth?: string | undefined;
6149
+ readonly typeMatchValid?: boolean | undefined;
6150
+ readonly validateOnInit?: boolean | undefined;
4885
6151
  readonly disabled?: boolean | undefined;
4886
6152
  readonly height?: string | undefined;
4887
6153
  readonly stepActive?: string | number | undefined;
@@ -4891,6 +6157,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4891
6157
  readonly keyProp?: string | undefined;
4892
6158
  readonly popperClass?: string | undefined;
4893
6159
  readonly preventSubmitDefault?: boolean | undefined;
6160
+ readonly useFieldTextInError?: boolean | undefined;
4894
6161
  readonly extendState?: ((_state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
4895
6162
  readonly showDiff?: ((_data: {
4896
6163
  curValue: any;
@@ -4898,6 +6165,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4898
6165
  config: any;
4899
6166
  }) => boolean) | undefined;
4900
6167
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
6168
+ readonly theme?: string | undefined;
4901
6169
  readonly onError?: ((...args: any[]) => any) | undefined;
4902
6170
  readonly onChange?: ((...args: any[]) => any) | undefined;
4903
6171
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -4923,6 +6191,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4923
6191
  isCompare?: boolean;
4924
6192
  parentValues?: Record<string, any>;
4925
6193
  labelWidth?: string;
6194
+ typeMatchValid?: boolean;
6195
+ validateOnInit?: boolean;
4926
6196
  disabled?: boolean;
4927
6197
  height?: string;
4928
6198
  stepActive?: string | number;
@@ -4932,6 +6202,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4932
6202
  keyProp?: string;
4933
6203
  popperClass?: string;
4934
6204
  preventSubmitDefault?: boolean;
6205
+ useFieldTextInError?: boolean;
4935
6206
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
4936
6207
  showDiff?: (_data: {
4937
6208
  curValue: any;
@@ -4939,6 +6210,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4939
6210
  config: any;
4940
6211
  }) => boolean;
4941
6212
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
6213
+ theme?: string;
4942
6214
  }> & Readonly<{
4943
6215
  onError?: ((...args: any[]) => any) | undefined;
4944
6216
  onChange?: ((...args: any[]) => any) | undefined;
@@ -4954,6 +6226,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4954
6226
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
4955
6227
  resetForm: () => void;
4956
6228
  submitForm: (native?: boolean) => Promise<any>;
6229
+ validate: () => Promise<string>;
4957
6230
  getTextByName: (name: string, config?: FormConfig) => string | undefined;
4958
6231
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
4959
6232
  error: (...args: any[]) => void;
@@ -4974,6 +6247,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
4974
6247
  keyProp: string;
4975
6248
  parentValues: Record<string, any>;
4976
6249
  stepActive: string | number;
6250
+ validateOnInit: boolean;
6251
+ useFieldTextInError: boolean;
4977
6252
  }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
4978
6253
  beforeCreate?: (() => void) | (() => void)[];
4979
6254
  created?: (() => void) | (() => void)[];
@@ -5007,6 +6282,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5007
6282
  keyProp: string;
5008
6283
  parentValues: Record<string, any>;
5009
6284
  stepActive: string | number;
6285
+ validateOnInit: boolean;
6286
+ useFieldTextInError: boolean;
5010
6287
  }> & Omit<Readonly<{
5011
6288
  config: FormConfig;
5012
6289
  initValues: Record<string, any>;
@@ -5014,6 +6291,8 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5014
6291
  isCompare?: boolean;
5015
6292
  parentValues?: Record<string, any>;
5016
6293
  labelWidth?: string;
6294
+ typeMatchValid?: boolean;
6295
+ validateOnInit?: boolean;
5017
6296
  disabled?: boolean;
5018
6297
  height?: string;
5019
6298
  stepActive?: string | number;
@@ -5023,6 +6302,7 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5023
6302
  keyProp?: string;
5024
6303
  popperClass?: string;
5025
6304
  preventSubmitDefault?: boolean;
6305
+ useFieldTextInError?: boolean;
5026
6306
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5027
6307
  showDiff?: (_data: {
5028
6308
  curValue: any;
@@ -5030,13 +6310,14 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5030
6310
  config: any;
5031
6311
  }) => boolean;
5032
6312
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
6313
+ theme?: string;
5033
6314
  }> & Readonly<{
5034
6315
  onError?: ((...args: any[]) => any) | undefined;
5035
6316
  onChange?: ((...args: any[]) => any) | undefined;
5036
6317
  "onField-input"?: ((...args: any[]) => any) | undefined;
5037
6318
  "onField-change"?: ((...args: any[]) => any) | undefined;
5038
6319
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
5039
- }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive")> & {
6320
+ }>, "values" | "changeHandler" | "validate" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "validateOnInit" | "useFieldTextInError")> & {
5040
6321
  values: FormValue;
5041
6322
  lastValuesProcessed: FormValue;
5042
6323
  formState: FormState;
@@ -5045,26 +6326,27 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5045
6326
  changeHandler: (v: FormValue, eventData: ContainerChangeEventData) => void;
5046
6327
  resetForm: () => void;
5047
6328
  submitForm: (native?: boolean) => Promise<any>;
6329
+ validate: () => Promise<string>;
5048
6330
  getTextByName: (name: string, config?: FormConfig) => string | undefined;
5049
6331
  } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
5050
6332
  $slots: FormSlots;
5051
6333
  }) | null>>;
5052
6334
  submit: (v: FormValue, eventData: ContainerChangeEventData) => Promise<void>;
5053
6335
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
6336
+ submit: (values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any;
5054
6337
  mounted: (internalInstance: any) => any;
5055
6338
  unmounted: () => any;
5056
- submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
5057
6339
  "submit-error": (e: any) => any;
5058
6340
  "form-error": (e: any) => any;
5059
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{
6341
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
6342
+ onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined, error?: any) => any) | undefined;
5060
6343
  onMounted?: ((internalInstance: any) => any) | undefined;
5061
6344
  onUnmounted?: (() => any) | undefined;
5062
- onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
5063
6345
  "onSubmit-error"?: ((e: any) => any) | undefined;
5064
6346
  "onForm-error"?: ((e: any) => any) | undefined;
5065
6347
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5066
- declare const __VLS_export$14: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
5067
- declare const _default$26: typeof __VLS_export$14;
6348
+ declare const __VLS_export$18: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
6349
+ declare const _default$30: typeof __VLS_export$18;
5068
6350
  type __VLS_WithSlots$6<T, S> = T & {
5069
6351
  new (): {
5070
6352
  $slots: S;
@@ -5072,20 +6354,20 @@ type __VLS_WithSlots$6<T, S> = T & {
5072
6354
  };
5073
6355
  //#endregion
5074
6356
  //#region temp/packages/editor/src/components/ToolButton.vue.d.ts
5075
- type __VLS_Props$12 = {
6357
+ type __VLS_Props$14 = {
5076
6358
  data?: MenuButton | MenuComponent;
5077
6359
  eventType?: 'mousedown' | 'mouseup' | 'click';
5078
6360
  };
5079
- declare const __VLS_export$13: import("@vue/runtime-core").DefineComponent<__VLS_Props$12, {
6361
+ declare const __VLS_export$17: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
5080
6362
  getElRef: () => Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5081
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$12> & Readonly<{}>, {
6363
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{}>, {
5082
6364
  data: MenuButton | MenuComponent;
5083
6365
  eventType: "mousedown" | "mouseup" | "click";
5084
6366
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5085
- declare const _default$32: typeof __VLS_export$13;
6367
+ declare const _default$36: typeof __VLS_export$17;
5086
6368
  //#endregion
5087
6369
  //#region temp/packages/editor/src/components/ContentMenu.vue.d.ts
5088
- type __VLS_Props$11 = {
6370
+ type __VLS_Props$13 = {
5089
6371
  menuData?: (MenuButton | MenuComponent)[];
5090
6372
  isSubMenu?: boolean;
5091
6373
  active?: string | number;
@@ -5095,7 +6377,7 @@ declare var __VLS_7$1: {};
5095
6377
  type __VLS_Slots$5 = {} & {
5096
6378
  title?: (props: typeof __VLS_7$1) => any;
5097
6379
  };
5098
- declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {
6380
+ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
5099
6381
  menu: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5100
6382
  menuPosition: Ref<{
5101
6383
  left: number;
@@ -5121,7 +6403,7 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5121
6403
  mouseenter: () => any;
5122
6404
  show: () => any;
5123
6405
  hide: () => any;
5124
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
6406
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{
5125
6407
  onMouseenter?: (() => any) | undefined;
5126
6408
  onShow?: (() => any) | undefined;
5127
6409
  onHide?: (() => any) | undefined;
@@ -5130,8 +6412,8 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5130
6412
  isSubMenu: boolean;
5131
6413
  autoHide: boolean;
5132
6414
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5133
- declare const __VLS_export$12: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
5134
- declare const _default$8: typeof __VLS_export$12;
6415
+ declare const __VLS_export$16: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
6416
+ declare const _default$8: typeof __VLS_export$16;
5135
6417
  type __VLS_WithSlots$5<T, S> = T & {
5136
6418
  new (): {
5137
6419
  $slots: S;
@@ -5139,14 +6421,14 @@ type __VLS_WithSlots$5<T, S> = T & {
5139
6421
  };
5140
6422
  //#endregion
5141
6423
  //#region temp/packages/editor/src/components/Icon.vue.d.ts
5142
- type __VLS_Props$10 = {
6424
+ type __VLS_Props$12 = {
5143
6425
  icon?: any;
5144
6426
  };
5145
- declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$10, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$10> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5146
- declare const _default$21: typeof __VLS_export$11;
6427
+ 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>;
6428
+ declare const _default$24: typeof __VLS_export$15;
5147
6429
  //#endregion
5148
6430
  //#region temp/packages/editor/src/components/SplitView.vue.d.ts
5149
- type __VLS_Props$9 = {
6431
+ type __VLS_Props$11 = {
5150
6432
  width?: number;
5151
6433
  left?: number;
5152
6434
  right?: number;
@@ -5165,13 +6447,13 @@ type __VLS_Slots$4 = {} & {
5165
6447
  } & {
5166
6448
  right?: (props: typeof __VLS_19) => any;
5167
6449
  };
5168
- declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
6450
+ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {
5169
6451
  updateWidth(): void;
5170
6452
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5171
6453
  change: (...args: any[]) => void;
5172
6454
  "update:left": (...args: any[]) => void;
5173
6455
  "update:right": (...args: any[]) => void;
5174
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$9> & Readonly<{
6456
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{
5175
6457
  onChange?: ((...args: any[]) => any) | undefined;
5176
6458
  "onUpdate:left"?: ((...args: any[]) => any) | undefined;
5177
6459
  "onUpdate:right"?: ((...args: any[]) => any) | undefined;
@@ -5180,8 +6462,8 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5180
6462
  minRight: number;
5181
6463
  minCenter: number;
5182
6464
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5183
- declare const __VLS_export$10: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
5184
- declare const _default$24: typeof __VLS_export$10;
6465
+ declare const __VLS_export$14: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
6466
+ declare const _default$28: typeof __VLS_export$14;
5185
6467
  type __VLS_WithSlots$4<T, S> = T & {
5186
6468
  new (): {
5187
6469
  $slots: S;
@@ -5198,8 +6480,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<{}, {},
5198
6480
  }, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
5199
6481
  onChange?: ((e: OnDrag$1<import("gesto").default>) => any) | undefined;
5200
6482
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
5201
- declare const __VLS_export$9: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
5202
- declare const _default$28: typeof __VLS_export$9;
6483
+ declare const __VLS_export$13: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
6484
+ declare const _default$32: typeof __VLS_export$13;
5203
6485
  type __VLS_WithSlots$3<T, S> = T & {
5204
6486
  new (): {
5205
6487
  $slots: S;
@@ -5207,7 +6489,7 @@ type __VLS_WithSlots$3<T, S> = T & {
5207
6489
  };
5208
6490
  //#endregion
5209
6491
  //#region temp/packages/editor/src/components/CodeBlockEditor.vue.d.ts
5210
- type __VLS_Props$8 = {
6492
+ type __VLS_Props$10 = {
5211
6493
  content: Omit<CodeBlockContent, 'content'> & {
5212
6494
  content: string;
5213
6495
  };
@@ -5219,68 +6501,245 @@ type __VLS_ModelProps$1 = {
5219
6501
  'width'?: number;
5220
6502
  'visible'?: boolean;
5221
6503
  };
5222
- type __VLS_PublicProps$1 = __VLS_Props$8 & __VLS_ModelProps$1;
5223
- declare const __VLS_export$8: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
6504
+ type __VLS_PublicProps$1 = __VLS_Props$10 & __VLS_ModelProps$1;
6505
+ declare const __VLS_export$12: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
5224
6506
  show(): Promise<void>;
5225
6507
  hide(): Promise<void>;
5226
6508
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
5227
6509
  close: () => any;
5228
6510
  submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
5229
6511
  open: () => any;
5230
- "update:width": (value: number) => any;
5231
6512
  "update:visible": (value: boolean) => any;
6513
+ "update:width": (value: number) => any;
5232
6514
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$1> & Readonly<{
5233
6515
  onClose?: (() => any) | undefined;
5234
6516
  onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
5235
6517
  onOpen?: (() => any) | undefined;
5236
- "onUpdate:width"?: ((value: number) => any) | undefined;
5237
6518
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
6519
+ "onUpdate:width"?: ((value: number) => any) | undefined;
5238
6520
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5239
- declare const _default: typeof __VLS_export$8;
6521
+ declare const _default: typeof __VLS_export$12;
5240
6522
  //#endregion
5241
6523
  //#region temp/packages/editor/src/components/CompareForm.vue.d.ts
6524
+ type __VLS_Props$9 = CompareFormBaseProps & {
6525
+ /** 用于对比的旧值(修改前的值) */lastValue?: CompareFormBaseProps['value']; /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
6526
+ selfDiffFieldTypes?: string[];
6527
+ };
6528
+ declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
6529
+ form: ShallowRef<InstanceType<typeof MForm> | null>;
6530
+ config: Ref<FormConfig>;
6531
+ reload: () => Promise<void>;
6532
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
6533
+ labelWidth: string;
6534
+ category: CompareCategory;
6535
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6536
+ declare const _default$5: typeof __VLS_export$11;
6537
+ //#endregion
6538
+ //#region temp/packages/editor/src/components/ViewForm.vue.d.ts
6539
+ type __VLS_Props$8 = CompareFormBaseProps & {
6540
+ /** 是否禁用表单(默认只读展示)。 */disabled?: boolean;
6541
+ };
6542
+ declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
6543
+ form: ShallowRef<InstanceType<typeof MForm> | null>;
6544
+ config: Ref<FormConfig>;
6545
+ reload: () => Promise<void>;
6546
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
6547
+ disabled: boolean;
6548
+ labelWidth: string;
6549
+ category: CompareCategory;
6550
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
6551
+ declare const _default$39: typeof __VLS_export$10;
6552
+ //#endregion
6553
+ //#region temp/packages/editor/src/layouts/history-list/composables.d.ts
5242
6554
  /**
5243
- * 对比类型:
5244
- * - node: 节点组件,按 `type` propsService 获取属性表单配置
5245
- * - data-source: 数据源,按 `type`(base/http/...) 从 dataSourceService 获取数据源表单配置
5246
- * - code-block: 数据源代码块,使用内置的代码块表单配置
6555
+ * 通用 bucket 分组(数据源 / 代码块及业务自定义历史)在面板中的展示结构。
6556
+ * Bucket / BucketTab 复用,step 类型通过泛型 T 收窄(约束为 {@link BaseStepValue})。
6557
+ */
6558
+ interface HistoryBucketGroup<T extends BaseStepValue = BaseStepValue> {
6559
+ /** 组内最后一步是否已应用 */
6560
+ applied: boolean;
6561
+ /** 是否为当前所在的分组 */
6562
+ isCurrent?: boolean;
6563
+ /** 该分组的操作类型 */
6564
+ opType: HistoryOpType;
6565
+ /** 组内所有步骤 */
6566
+ steps: {
6567
+ index: number;
6568
+ applied: boolean;
6569
+ isCurrent?: boolean;
6570
+ step: T;
6571
+ }[];
6572
+ }
6573
+ /**
6574
+ * 通用二次确认弹窗:清空历史 / 无法差异对比的回滚等会改变状态的操作,先弹出确认框,
6575
+ * 用户点击「确定」返回 true,取消(confirm reject)时返回 false 并静默忽略。
5247
6576
  */
5248
- type CompareCategory = 'node' | 'data-source' | 'code-block';
6577
+ declare const confirmHistoryAction: (message: string) => Promise<boolean>;
6578
+ //#endregion
6579
+ //#region temp/packages/editor/src/layouts/history-list/Bucket.vue.d.ts
6580
+ 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<{
6581
+ props: import("vue").PublicProps & __VLS_PrettifyLocal$1<{
6582
+ /**
6583
+ * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
6584
+ * 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
6585
+ */
6586
+ config: HistoryBucketConfig<T>; /** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
6587
+ bucketId: string | number; /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
6588
+ groups: HistoryBucketGroup<T>[]; /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
6589
+ expanded: Record<string, boolean>;
6590
+ } & {
6591
+ onToggle?: ((_key: string) => any) | undefined;
6592
+ onGoto?: ((_bucketId: string | number, _index: number) => any) | undefined;
6593
+ "onDiff-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
6594
+ "onRevert-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
6595
+ "onGoto-initial"?: ((_bucketId: string | number) => any) | undefined;
6596
+ }> & (typeof globalThis extends {
6597
+ __VLS_PROPS_FALLBACK: infer P;
6598
+ } ? P : {});
6599
+ expose: (exposed: {}) => void;
6600
+ attrs: any;
6601
+ slots: {};
6602
+ emit: {
6603
+ (_e: "toggle", _key: string): void;
6604
+ (_e: "goto", _bucketId: string | number, _index: number): void;
6605
+ (_e: "goto-initial", _bucketId: string | number): void;
6606
+ (_e: "diff-step", _bucketId: string | number, _index: number): void;
6607
+ (_e: "revert-step", _bucketId: string | number, _index: number): void;
6608
+ };
6609
+ }>) => import("vue").VNode & {
6610
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6611
+ };
6612
+ declare const _default$22: typeof __VLS_export$9;
6613
+ type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6614
+ //#endregion
6615
+ //#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
6616
+ 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<{
6617
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
6618
+ /**
6619
+ * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled / showClear),
6620
+ * 由父组件按业务类型注入并整体透传给 Bucket,避免逐项透传多个 props。
6621
+ */
6622
+ config: HistoryBucketConfig<T>;
6623
+ /**
6624
+ * 已按目标 id 聚拢成的 bucket 列表,每个 bucket 内部的 groups 已按时间倒序排好。
6625
+ * 空数组时显示空态。
6626
+ */
6627
+ buckets: {
6628
+ id: string | number;
6629
+ groups: HistoryBucketGroup<T>[];
6630
+ }[];
6631
+ /**
6632
+ * 共享的折叠状态表(key -> 是否展开),由顶层 panel 统一维护。
6633
+ * key 形如 `${prefix}-${id}-${组内首步 index}`——以稳定的 step 索引而非展示位置标识分组,
6634
+ * 这样历史数据更新后已展开的分组状态仍能正确保持。
6635
+ */
6636
+ expanded: Record<string, boolean>;
6637
+ } & {
6638
+ onClear?: (() => any) | undefined;
6639
+ onToggle?: ((_key: string) => any) | undefined;
6640
+ onGoto?: ((_targetId: string | number, _index: number) => any) | undefined;
6641
+ "onDiff-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
6642
+ "onRevert-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
6643
+ "onGoto-initial"?: ((_targetId: string | number) => any) | undefined;
6644
+ }> & (typeof globalThis extends {
6645
+ __VLS_PROPS_FALLBACK: infer P;
6646
+ } ? P : {});
6647
+ expose: (exposed: {}) => void;
6648
+ attrs: any;
6649
+ slots: {};
6650
+ emit: {
6651
+ (_e: "toggle", _key: string): void;
6652
+ (_e: "goto", _targetId: string | number, _index: number): void;
6653
+ (_e: "goto-initial", _targetId: string | number): void;
6654
+ (_e: "diff-step", _targetId: string | number, _index: number): void;
6655
+ (_e: "revert-step", _targetId: string | number, _index: number): void;
6656
+ (_e: "clear"): void;
6657
+ };
6658
+ }>) => import("vue").VNode & {
6659
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6660
+ };
6661
+ declare const _default$23: typeof __VLS_export$8;
6662
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6663
+ //#endregion
6664
+ //#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
5249
6665
  type __VLS_Props$7 = {
5250
- /** 当前值(修改后的值) */value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>; /** 用于对比的旧值(修改前的值) */
5251
- lastValue?: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
5252
- /**
5253
- * 类型说明:
5254
- * - `category` 为 `node` 时,`type` 为节点组件的类型,例如 'text'、'button'、'page'、'container' 等
5255
- * - `category` 为 `data-source` 时,`type` 为数据源类型,例如 'base'、'http'
5256
- * - `category` 为 `code-block` 时,`type` 可不传
5257
- */
5258
- type?: string; /** 表单配置类别,决定从哪里取 FormConfig */
5259
- category?: CompareCategory; /** 数据源代码块场景下的数据源类型(base/http),用于代码块表单中"执行时机"展示 */
5260
- dataSourceType?: string;
5261
- labelWidth?: string;
6666
+ /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */services?: Services;
5262
6667
  /**
5263
- * 外层容器高度。设置后表单内容超出时会在 CompareForm 内部出现滚动条,
5264
- * 避免 dialog / 面板使用方需要自行处理滚动。可传任意 CSS 长度,例如 `60vh` / `400px` / `100%`。
6668
+ * 来自 Editor 顶层的 `extendFormState`,用于扩展 MForm.formState。
6669
+ * 透传给 CompareForm,从而让差异对比时表单 item 中依赖业务上下文的
6670
+ * `display` / `disabled` 等 filterFunction 正常工作。
5265
6671
  */
5266
- height?: string;
6672
+ extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
5267
6673
  /**
5268
- * 用户自定义注入到 MForm.formState 的扩展字段,与 Editor 顶层的 `extendFormState`、
5269
- * PropsPanel `extend-state` 语义一致。表单 item 的 `display` / `disabled` 等
5270
- * filterFunction 经常依赖这里注入的字段(如 stage、自定义业务上下文等),
5271
- * 因此在差异对比场景下也需要透传,避免出现 `formState.xxx is undefined` 的运行时错误。
6674
+ * 自定义 FormConfig 加载逻辑,透传给 CompareForm。传入后将接管内置的按 `category`
6675
+ * 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
5272
6676
  */
5273
- extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
6677
+ loadConfig?: CompareFormLoadConfig;
6678
+ width?: string; /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
6679
+ size?: FieldSize;
6680
+ isConfirm?: boolean;
6681
+ onConfirm?: () => void;
6682
+ selfDiffFieldTypes?: string[];
6683
+ compareFormState?: FormState;
5274
6684
  };
5275
6685
  declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$7, {
5276
- form: ShallowRef<InstanceType<typeof MForm> | null>;
5277
- config: Ref<FormConfig>;
5278
- reload: () => Promise<void>;
5279
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$7> & Readonly<{}>, {
5280
- labelWidth: string;
5281
- category: CompareCategory;
6686
+ open: (p: DiffDialogPayload) => void;
6687
+ confirm: (p: DiffDialogPayload) => Promise<boolean>;
6688
+ close: () => void;
6689
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
6690
+ close: (...args: any[]) => void;
6691
+ }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$7> & Readonly<{
6692
+ onClose?: ((...args: any[]) => any) | undefined;
6693
+ }>, {
6694
+ width: string;
5282
6695
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5283
- declare const _default$5: typeof __VLS_export$7;
6696
+ declare const _default$21: typeof __VLS_export$7;
6697
+ //#endregion
6698
+ //#region temp/packages/editor/src/layouts/history-list/useHistoryRevert.d.ts
6699
+ /**
6700
+ * 历史记录「单步回滚」与「查看差异」的完整交互流程,供历史面板与业务方共用。
6701
+ *
6702
+ * 单步回滚(类 git revert):
6703
+ * 1. 前置校验:目标数据已被删除(update 写回目标 / 页面 remove 的原父容器缺失)时给出「回滚失败」提示并中止;
6704
+ * 2. 二次确认:可差异对比的步骤(单实体 update)弹出差异确认弹窗,其余步骤弹普通二次确认框;
6705
+ * 3. 用户确认后执行对应 service 的 revert(页面 / 数据源 / 代码块)。
6706
+ *
6707
+ * 查看差异:可差异对比的步骤动态挂载只读 HistoryDiffDialog 展示前后值差异。
6708
+ *
6709
+ * 上述弹窗均按需动态挂载 HistoryDiffDialog 实现,业务方无需自行挂载任何弹窗。
6710
+ *
6711
+ * 返回的能力分三组:
6712
+ * - 内置三类(页面 / 数据源 / 代码块):`onPageRevert` / `onDataSourceRevert` / `onCodeBlockRevert` 单步回滚,
6713
+ * `onPageDiff` / `onDataSourceDiff` / `onCodeBlockDiff` 查看差异,及配套的 `buildXxxDiffPayload` / `isXxxRevertTargetMissing`;
6714
+ * - 业务自有历史(如管理台「模块」):`confirmAndRevert` / `viewDiff` 复用同一套交互流程,由业务方自行构造差异入参;
6715
+ * 即上述内置三类本质上是它们各自预置好 payload 构造与 service.revert 的特例。
6716
+ *
6717
+ * 业务方可在拿到 Editor 实例暴露的 `services` 后直接 import 调用:
6718
+ *
6719
+ * ```ts
6720
+ * import { useHistoryRevert } from '@tmagic/editor';
6721
+ *
6722
+ * const { onPageRevert, onPageDiff } = useHistoryRevert({}, editorRef.value); // editorRef.value 即 Editor 暴露的 services
6723
+ * await onPageRevert(index); // 弹出差异 / 二次确认弹窗后回滚
6724
+ * onPageDiff(index); // 弹出只读差异弹窗查看前后值差异
6725
+ * ```
6726
+ */
6727
+ declare const useHistoryRevert: (options?: UseHistoryRevertOptions, services?: Services) => {
6728
+ onPageRevert: (index: number) => Promise<StepValue | null | undefined>;
6729
+ onDataSourceRevert: (id: string | number, index: number) => Promise<DataSourceStepValue | null | undefined>;
6730
+ onCodeBlockRevert: (id: string | number, index: number) => Promise<CodeBlockStepValue | null | undefined>;
6731
+ onPageDiff: (index: number) => Promise<void> | void;
6732
+ onDataSourceDiff: (id: string | number, index: number) => Promise<void> | void;
6733
+ onCodeBlockDiff: (id: string | number, index: number) => Promise<void> | void;
6734
+ buildPageDiffPayload: (index: number) => DiffDialogPayload | null;
6735
+ buildDataSourceDiffPayload: (id: string | number, index: number) => DiffDialogPayload | null;
6736
+ buildCodeBlockDiffPayload: (id: string | number, index: number) => DiffDialogPayload | null;
6737
+ isPageRevertTargetMissing: (index: number) => boolean;
6738
+ isDataSourceRevertTargetMissing: (id: string | number, index: number) => boolean;
6739
+ isCodeBlockRevertTargetMissing: (id: string | number, index: number) => boolean;
6740
+ confirmAndRevert: <T = unknown>(revertOptions: ConfirmAndRevertOptions<T>) => Promise<T | null>;
6741
+ viewDiff: (payload: DiffDialogPayload | null, extra?: CustomDiffFormOptions) => Promise<void> | void;
6742
+ };
5284
6743
  //#endregion
5285
6744
  //#region temp/packages/editor/src/components/FloatingBox.vue.d.ts
5286
6745
  interface Position {
@@ -5290,6 +6749,9 @@ interface Position {
5290
6749
  type __VLS_Props$6 = {
5291
6750
  position?: Position;
5292
6751
  title?: string;
6752
+ bodyStyle?: CSSProperties; /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
6753
+ initialStyle?: CSSProperties; /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
6754
+ frameworkWidth?: number;
5293
6755
  beforeClose?: (_done: (_cancel?: boolean) => void) => void;
5294
6756
  };
5295
6757
  type __VLS_ModelProps = {
@@ -5309,16 +6771,18 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
5309
6771
  target: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5310
6772
  titleEl: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
5311
6773
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
6774
+ "update:visible": (value: boolean) => any;
5312
6775
  "update:width": (value: number) => any;
5313
6776
  "update:height": (value: number) => any;
5314
- "update:visible": (value: boolean) => any;
5315
6777
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
6778
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
5316
6779
  "onUpdate:width"?: ((value: number) => any) | undefined;
5317
6780
  "onUpdate:height"?: ((value: number) => any) | undefined;
5318
- "onUpdate:visible"?: ((value: boolean) => any) | undefined;
5319
6781
  }>, {
5320
6782
  title: string;
5321
6783
  position: Position;
6784
+ initialStyle: CSSProperties;
6785
+ frameworkWidth: number;
5322
6786
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5323
6787
  declare const __VLS_export$6: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
5324
6788
  declare const _default$20: typeof __VLS_export$6;
@@ -5371,7 +6835,7 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5371
6835
  indent: number;
5372
6836
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5373
6837
  declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
5374
- declare const _default$33: typeof __VLS_export$5;
6838
+ declare const _default$37: typeof __VLS_export$5;
5375
6839
  type __VLS_WithSlots$1<T, S> = T & {
5376
6840
  new (): {
5377
6841
  $slots: S;
@@ -5422,7 +6886,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Prop
5422
6886
  isExpandable: IsExpandableFunction;
5423
6887
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5424
6888
  declare const __VLS_export$4: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5425
- declare const _default$34: typeof __VLS_export$4;
6889
+ declare const _default$38: typeof __VLS_export$4;
5426
6890
  type __VLS_WithSlots<T, S> = T & {
5427
6891
  new (): {
5428
6892
  $slots: S;
@@ -5438,7 +6902,7 @@ declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_
5438
6902
  }>, {
5439
6903
  disabled: boolean;
5440
6904
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5441
- declare const _default$25: typeof __VLS_export$3;
6905
+ declare const _default$29: typeof __VLS_export$3;
5442
6906
  //#endregion
5443
6907
  //#region temp/packages/editor/src/fields/DisplayConds.vue.d.ts
5444
6908
  type __VLS_Props$2 = FieldProps<DisplayCondsConfig>;
@@ -5469,11 +6933,11 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5469
6933
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
5470
6934
  onAddDiffCount?: (() => any) | undefined;
5471
6935
  }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
5472
- declare const _default$29: typeof __VLS_export;
6936
+ declare const _default$33: typeof __VLS_export;
5473
6937
  //#endregion
5474
6938
  //#region temp/packages/editor/src/plugin.d.ts
5475
- declare const _default$37: {
6939
+ declare const _default$43: {
5476
6940
  install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
5477
6941
  };
5478
6942
  //#endregion
5479
- export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, CodeBlockHistoryGroup, _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, _default$5 as CompareForm, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, _default$8 as ContentMenu, CustomContentMenuFunction, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, DataSourceHistoryGroup, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpType, HistoryState, _default$21 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$22 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$23 as LayerPanel, LayerPanelSlots, Layout, _default$24 as LayoutContainer, _default$24 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$25 as PageFragmentSelect, PageHistoryGroup, PageHistoryStepEntry, PartSortableOptions, PastePosition, PropsFormConfigFunction, _default$26 as PropsFormPanel, PropsFormValueFunction, _default$27 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$28 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepValue, StoreState, StoreStateKey, _default$29 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$30 as TMagicCodeEditor, _default$31 as TMagicEditor, _default$32 as ToolButton, _default$33 as Tree, _default$34 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$35 as codeBlockService, collectRelatedNodes, _default$36 as dataSourceService, debug, _default$37 as default, defaultIsExpandable, _default$38 as depService, designPlugin, displayTabConfig, editorNodeMergeCustomizer, _default$39 as editorService, eqOptions, error, eventTabConfig, _default$40 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$41 as historyService, info, isIncludeDataSource, _default$42 as loadMonaco, log, moveItemsInContainer, numberOptions, _default$43 as propsService, resolveSelectedNode, serializeConfig, setChildrenLayout, setEditorConfig, setLayout, _default$44 as stageOverlayService, _default$45 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$46 as uiService, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
6943
+ export { ALL_COND_OPS, 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, CompareFormBaseProps, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, ConfirmAndRevertOptions, _default$8 as ContentMenu, ContentMenuTarget, ContentMenuType, 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, EVENT_NAME_VALUE_SEPARATOR, EditorChangeEvent, EditorChangeEventHistoryMeta, EditorChangeItem, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EditorUpdateChangeItem, EventBus, EventBusEvent, EventNameOption, EventNameSelectOption, _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, _default$26 as LayerNodeContent, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$27 as LayerPanel, LayerPanelSlots, Layout, _default$28 as LayoutContainer, _default$28 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, NodeInvalidInfo, NodeInvalidSource, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$29 as PageFragmentSelect, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$30 as PropsFormPanel, PropsFormValueFunction, _default$31 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$32 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepExtra, StepValue, StoreState, StoreStateKey, _default$33 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$34 as TMagicCodeEditor, _default$35 as TMagicEditor, _default$36 as ToolButton, _default$37 as Tree, _default$38 as TreeNode, TreeNodeData, type TypeMatchValidateContext, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, UseCompareFormReturn, UseHistoryRevertOptions, V_GUIDE_LINE_STORAGE_KEY, _default$39 as ViewForm, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, booleanOptions, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$40 as codeBlockService, collectEventNameOptionValues, collectRelatedNodes, _default$41 as componentListService, confirmHistoryAction, createStackStep, _default$42 as dataSourceService, debug, _default$43 as default, defaultIsExpandable, _default$44 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectStackOpType, detectTargetId, detectTargetName, displayTabConfig, editorNodeMergeCustomizer, _default$45 as editorService, editorTypeMatchRules, eqOptions, error, eventTabConfig, _default$46 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getCompActionAllowedValues, getCompActionOptions, getCondOpOptionsByFieldType, getDefaultConfig, getDisplayField, getEditorConfig, getEventNameAllowedValues, getEventNameOptions, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$47 as historyService, idbDelete, idbGet, idbSet, info, isEventNameCheckStrictly, isGlobalFlat, isIncludeDataSource, isIndexedDBSupported, _default$48 as keybindingService, _default$49 as loadMonaco, log, markStackSaved, mergeSteps, moveItemsInContainer, normalizeCompActionValue, numberOptions, openIndexedDB, _default$50 as propsService, removeStyleDisplayConfig, resolveFieldByPath, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$51 as stageOverlayService, _default$52 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$53 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useCompareForm, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useHistoryRevert, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };