@tmagic/editor 1.8.5 → 1.8.6

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 (282) hide show
  1. package/dist/es/{Editor.vue_vue_type_script_setup_true_lang.js → Editor.vue.js} +9 -9
  2. package/dist/es/{Editor.js → Editor2.vue.js} +1 -1
  3. package/dist/es/components/{CodeBlockEditor.vue_vue_type_script_setup_true_lang.js → CodeBlockEditor.vue.js} +5 -5
  4. package/dist/es/components/{CodeBlockEditor.js → CodeBlockEditor2.vue.js} +1 -1
  5. package/dist/es/components/{CodeParams.js → CodeParams2.vue.js} +1 -1
  6. package/dist/es/components/{CompareForm.js → CompareForm2.vue.js} +1 -1
  7. package/dist/es/components/{ContentMenu.vue_vue_type_script_setup_true_lang.js → ContentMenu.vue.js} +2 -2
  8. package/dist/es/components/{ContentMenu.js → ContentMenu2.vue.js} +1 -1
  9. package/dist/es/components/{FloatingBox.vue_vue_type_script_setup_true_lang.js → FloatingBox.vue.js} +2 -2
  10. package/dist/es/components/{FloatingBox.js → FloatingBox2.vue.js} +1 -1
  11. package/dist/es/components/{Icon.js → Icon2.vue.js} +1 -1
  12. package/dist/es/components/{Resizer.js → Resizer2.vue.js} +1 -1
  13. package/dist/es/components/{ScrollBar.js → ScrollBar2.vue.js} +1 -1
  14. package/dist/es/components/{ScrollViewer.vue_vue_type_script_setup_true_lang.js → ScrollViewer.vue.js} +3 -3
  15. package/dist/es/components/{ScrollViewer.js → ScrollViewer2.vue.js} +1 -1
  16. package/dist/es/components/{SearchInput.js → SearchInput2.vue.js} +1 -1
  17. package/dist/es/components/{SplitView.vue_vue_type_script_setup_true_lang.js → SplitView.vue.js} +1 -1
  18. package/dist/es/components/{SplitView.js → SplitView2.vue.js} +1 -1
  19. package/dist/es/components/{ToolButton.vue_vue_type_script_setup_true_lang.js → ToolButton.vue.js} +3 -3
  20. package/dist/es/components/{ToolButton.js → ToolButton2.vue.js} +1 -1
  21. package/dist/es/components/{Tree.vue_vue_type_script_setup_true_lang.js → Tree.vue.js} +1 -1
  22. package/dist/es/components/{Tree.js → Tree2.vue.js} +1 -1
  23. package/dist/es/components/{TreeNode.vue_vue_type_script_setup_true_lang.js → TreeNode.vue.js} +2 -2
  24. package/dist/es/components/{TreeNode.js → TreeNode2.vue.js} +1 -1
  25. package/dist/es/components/{ViewForm.js → ViewForm2.vue.js} +1 -1
  26. package/dist/es/fields/{Code.vue_vue_type_script_setup_true_lang.js → Code.vue.js} +1 -1
  27. package/dist/es/fields/{Code.js → Code2.vue.js} +1 -1
  28. package/dist/es/fields/{CodeLink.js → CodeLink2.vue.js} +1 -1
  29. package/dist/es/fields/{CodeSelect.js → CodeSelect2.vue.js} +1 -1
  30. package/dist/es/fields/{CodeSelectCol.vue_vue_type_script_setup_true_lang.js → CodeSelectCol.vue.js} +7 -7
  31. package/dist/es/fields/{CodeSelectCol.js → CodeSelectCol2.vue.js} +1 -1
  32. package/dist/es/fields/{CondOpSelect.js → CondOpSelect2.vue.js} +1 -1
  33. package/dist/es/fields/DataSourceFieldSelect/{FieldSelect.vue_vue_type_script_setup_true_lang.js → FieldSelect.vue.js} +55 -14
  34. package/dist/es/fields/DataSourceFieldSelect/{FieldSelect.js → FieldSelect2.vue.js} +1 -1
  35. package/dist/es/fields/DataSourceFieldSelect/{Index.vue_vue_type_script_setup_true_lang.js → Index.vue.js} +7 -7
  36. package/dist/es/fields/DataSourceFieldSelect/{Index.js → Index2.vue.js} +1 -1
  37. package/dist/es/fields/{DataSourceFields.vue_vue_type_script_setup_true_lang.js → DataSourceFields.vue.js} +50 -17
  38. package/dist/es/fields/{DataSourceFields.js → DataSourceFields2.vue.js} +1 -1
  39. package/dist/es/fields/{DataSourceInput.vue_vue_type_script_setup_true_lang.js → DataSourceInput.vue.js} +5 -5
  40. package/dist/es/fields/{DataSourceInput.js → DataSourceInput2.vue.js} +1 -1
  41. package/dist/es/fields/{DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js → DataSourceMethodSelect.vue.js} +7 -7
  42. package/dist/es/fields/{DataSourceMethodSelect.js → DataSourceMethodSelect2.vue.js} +1 -1
  43. package/dist/es/fields/{DataSourceMethods.vue_vue_type_script_setup_true_lang.js → DataSourceMethods.vue.js} +3 -3
  44. package/dist/es/fields/{DataSourceMethods.js → DataSourceMethods2.vue.js} +1 -1
  45. package/dist/es/fields/{DataSourceMocks.vue_vue_type_script_setup_true_lang.js → DataSourceMocks.vue.js} +8 -8
  46. package/dist/es/fields/{DataSourceMocks.js → DataSourceMocks2.vue.js} +1 -1
  47. package/dist/es/fields/{DataSourceSelect.vue_vue_type_script_setup_true_lang.js → DataSourceSelect.vue.js} +5 -5
  48. package/dist/es/fields/{DataSourceSelect.js → DataSourceSelect2.vue.js} +1 -1
  49. package/dist/es/fields/{DisplayConds.js → DisplayConds2.vue.js} +1 -1
  50. package/dist/es/fields/{EventSelect.js → EventSelect2.vue.js} +1 -1
  51. package/dist/es/fields/{KeyValue.vue_vue_type_script_setup_true_lang.js → KeyValue.vue.js} +3 -3
  52. package/dist/es/fields/{KeyValue.js → KeyValue2.vue.js} +1 -1
  53. package/dist/es/fields/{PageFragmentSelect.vue_vue_type_script_setup_true_lang.js → PageFragmentSelect.vue.js} +4 -4
  54. package/dist/es/fields/{PageFragmentSelect.js → PageFragmentSelect2.vue.js} +1 -1
  55. package/dist/es/fields/StyleSetter/{Index.vue_vue_type_script_setup_true_lang.js → Index.vue.js} +7 -7
  56. package/dist/es/fields/StyleSetter/{Index.js → Index2.vue.js} +1 -1
  57. package/dist/es/fields/StyleSetter/components/{BackgroundPosition.js → BackgroundPosition2.vue.js} +1 -1
  58. package/dist/es/fields/StyleSetter/components/{Border.js → Border2.vue.js} +1 -1
  59. package/dist/es/fields/StyleSetter/components/{Box.js → Box2.vue.js} +1 -1
  60. package/dist/es/fields/StyleSetter/configs.js +43 -43
  61. package/dist/es/fields/StyleSetter/pro/{Background.js → Background2.vue.js} +1 -1
  62. package/dist/es/fields/StyleSetter/pro/{Border.vue_vue_type_script_setup_true_lang.js → Border.vue.js} +3 -3
  63. package/dist/es/fields/StyleSetter/pro/{Border.js → Border2.vue.js} +1 -1
  64. package/dist/es/fields/StyleSetter/pro/{Font.js → Font2.vue.js} +1 -1
  65. package/dist/es/fields/StyleSetter/pro/{Layout.vue_vue_type_script_setup_true_lang.js → Layout.vue.js} +4 -4
  66. package/dist/es/fields/StyleSetter/pro/{Layout.js → Layout2.vue.js} +1 -1
  67. package/dist/es/fields/StyleSetter/pro/{Position.js → Position2.vue.js} +1 -1
  68. package/dist/es/fields/StyleSetter/pro/{Transform.js → Transform2.vue.js} +1 -1
  69. package/dist/es/fields/{UISelect.js → UISelect2.vue.js} +1 -1
  70. package/dist/es/fields/configs/codeSelect.js +2 -2
  71. package/dist/es/fields/configs/displayConds.js +1 -1
  72. package/dist/es/fields/configs/eventSelect.js +3 -3
  73. package/dist/es/fields/headless-validation.js +1 -1
  74. package/dist/es/hooks/use-code-block-edit.js +1 -1
  75. package/dist/es/hooks/use-compare-form.js +1 -1
  76. package/dist/es/hooks/use-editor-content-height.js +1 -1
  77. package/dist/es/hooks/use-filter.js +2 -2
  78. package/dist/es/hooks/use-float-box.js +1 -1
  79. package/dist/es/hooks/use-form-context.js +1 -1
  80. package/dist/es/hooks/use-node-status.js +1 -1
  81. package/dist/es/hooks/use-stage.js +28 -3
  82. package/dist/es/icons/{CenterIcon.js → CenterIcon2.vue.js} +1 -1
  83. package/dist/es/icons/{CodeIcon.js → CodeIcon2.vue.js} +1 -1
  84. package/dist/es/icons/{FolderMinusIcon.js → FolderMinusIcon2.vue.js} +1 -1
  85. package/dist/es/index.js +47 -47
  86. package/dist/es/initService.js +9 -9
  87. package/dist/es/layouts/{AddPageBox.vue_vue_type_script_setup_true_lang.js → AddPageBox.vue.js} +4 -4
  88. package/dist/es/layouts/{AddPageBox.js → AddPageBox2.vue.js} +1 -1
  89. package/dist/es/layouts/{CodeEditor.vue_vue_type_script_setup_true_lang.js → CodeEditor.vue.js} +5 -5
  90. package/dist/es/layouts/{CodeEditor.js → CodeEditor2.vue.js} +1 -1
  91. package/dist/es/layouts/{Framework.vue_vue_type_script_setup_true_lang.js → Framework.vue.js} +5 -5
  92. package/dist/es/layouts/{Framework.js → Framework2.vue.js} +1 -1
  93. package/dist/es/layouts/{NavMenu.vue_vue_type_script_setup_true_lang.js → NavMenu.vue.js} +5 -5
  94. package/dist/es/layouts/{NavMenu.js → NavMenu2.vue.js} +1 -1
  95. package/dist/es/layouts/{NavMenuColumn.vue_vue_type_script_setup_true_lang.js → NavMenuColumn.vue.js} +14 -6
  96. package/dist/es/layouts/{NavMenuColumn.js → NavMenuColumn2.vue.js} +1 -1
  97. package/dist/es/layouts/history-list/{Bucket.vue_vue_type_script_setup_true_lang.js → Bucket.vue.js} +3 -3
  98. package/dist/es/layouts/history-list/{Bucket.js → Bucket2.vue.js} +1 -1
  99. package/dist/es/layouts/history-list/{BucketTab.vue_vue_type_script_setup_true_lang.js → BucketTab.vue.js} +2 -2
  100. package/dist/es/layouts/history-list/{BucketTab.js → BucketTab2.vue.js} +1 -1
  101. package/dist/es/layouts/history-list/{GroupRow.js → GroupRow2.vue.js} +1 -1
  102. package/dist/es/layouts/history-list/{HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js → HistoryDiffDialog.vue.js} +3 -3
  103. package/dist/es/layouts/history-list/{HistoryDiffDialog.js → HistoryDiffDialog2.vue.js} +1 -1
  104. package/dist/es/layouts/history-list/{HistoryListPanel.vue_vue_type_script_setup_true_lang.js → HistoryListPanel.vue.js} +6 -6
  105. package/dist/es/layouts/history-list/{HistoryListPanel.js → HistoryListPanel2.vue.js} +1 -1
  106. package/dist/es/layouts/history-list/{InitialRow.js → InitialRow2.vue.js} +1 -1
  107. package/dist/es/layouts/history-list/{PageTab.vue_vue_type_script_setup_true_lang.js → PageTab.vue.js} +4 -4
  108. package/dist/es/layouts/history-list/{PageTab.js → PageTab2.vue.js} +1 -1
  109. package/dist/es/layouts/history-list/composables.js +1 -1
  110. package/dist/es/layouts/history-list/useHistoryList.js +1 -1
  111. package/dist/es/layouts/history-list/useHistoryRevert.js +3 -3
  112. package/dist/es/layouts/page-bar/{AddButton.vue_vue_type_script_setup_true_lang.js → AddButton.vue.js} +6 -6
  113. package/dist/es/layouts/page-bar/{AddButton.js → AddButton2.vue.js} +1 -1
  114. package/dist/es/layouts/page-bar/{PageBar.vue_vue_type_script_setup_true_lang.js → PageBar.vue.js} +8 -8
  115. package/dist/es/layouts/page-bar/{PageBar.js → PageBar2.vue.js} +1 -1
  116. package/dist/es/layouts/page-bar/{PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js → PageBarScrollContainer.vue.js} +2 -2
  117. package/dist/es/layouts/page-bar/{PageBarScrollContainer.js → PageBarScrollContainer2.vue.js} +1 -1
  118. package/dist/es/layouts/page-bar/{PageList.vue_vue_type_script_setup_true_lang.js → PageList.vue.js} +3 -3
  119. package/dist/es/layouts/page-bar/{PageList.js → PageList2.vue.js} +1 -1
  120. package/dist/es/layouts/page-bar/{Search.vue_vue_type_script_setup_true_lang.js → Search.vue.js} +3 -3
  121. package/dist/es/layouts/page-bar/{Search.js → Search2.vue.js} +1 -1
  122. package/dist/es/layouts/props-panel/{FormPanel.vue_vue_type_script_setup_true_lang.js → FormPanel.vue.js} +7 -7
  123. package/dist/es/layouts/props-panel/{FormPanel.js → FormPanel2.vue.js} +1 -1
  124. package/dist/es/layouts/props-panel/{PropsPanel.vue_vue_type_script_setup_true_lang.js → PropsPanel.vue.js} +7 -7
  125. package/dist/es/layouts/props-panel/{PropsPanel.js → PropsPanel2.vue.js} +1 -1
  126. package/dist/es/layouts/props-panel/use-style-panel.js +1 -1
  127. package/dist/es/layouts/sidebar/{ComponentListPanel.vue_vue_type_script_setup_true_lang.js → ComponentListPanel.vue.js} +7 -7
  128. package/dist/es/layouts/sidebar/{ComponentListPanel.js → ComponentListPanel2.vue.js} +1 -1
  129. package/dist/es/layouts/sidebar/{Sidebar.vue_vue_type_script_setup_true_lang.js → Sidebar.vue.js} +8 -8
  130. package/dist/es/layouts/sidebar/{Sidebar.js → Sidebar2.vue.js} +1 -1
  131. package/dist/es/layouts/sidebar/code-block/{CodeBlockList.vue_vue_type_script_setup_true_lang.js → CodeBlockList.vue.js} +5 -5
  132. package/dist/es/layouts/sidebar/code-block/{CodeBlockList.js → CodeBlockList2.vue.js} +1 -1
  133. package/dist/es/layouts/sidebar/code-block/{CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js → CodeBlockListPanel.vue.js} +6 -6
  134. package/dist/es/layouts/sidebar/code-block/{CodeBlockListPanel.js → CodeBlockListPanel2.vue.js} +1 -1
  135. package/dist/es/layouts/sidebar/code-block/useContentMenu.js +1 -1
  136. package/dist/es/layouts/sidebar/data-source/{DataSourceAddButton.vue_vue_type_script_setup_true_lang.js → DataSourceAddButton.vue.js} +2 -2
  137. package/dist/es/layouts/sidebar/data-source/{DataSourceAddButton.js → DataSourceAddButton2.vue.js} +1 -1
  138. package/dist/es/layouts/sidebar/data-source/{DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js → DataSourceConfigPanel.vue.js} +4 -4
  139. package/dist/es/layouts/sidebar/data-source/{DataSourceConfigPanel.js → DataSourceConfigPanel2.vue.js} +1 -1
  140. package/dist/es/layouts/sidebar/data-source/{DataSourceList.vue_vue_type_script_setup_true_lang.js → DataSourceList.vue.js} +5 -5
  141. package/dist/es/layouts/sidebar/data-source/{DataSourceList.js → DataSourceList2.vue.js} +1 -1
  142. package/dist/es/layouts/sidebar/data-source/{DataSourceListPanel.vue_vue_type_script_setup_true_lang.js → DataSourceListPanel.vue.js} +8 -8
  143. package/dist/es/layouts/sidebar/data-source/{DataSourceListPanel.js → DataSourceListPanel2.vue.js} +1 -1
  144. package/dist/es/layouts/sidebar/data-source/useContentMenu.js +1 -1
  145. package/dist/es/layouts/sidebar/layer/{LayerMenu.vue_vue_type_script_setup_true_lang.js → LayerMenu.vue.js} +5 -5
  146. package/dist/es/layouts/sidebar/layer/{LayerMenu.js → LayerMenu2.vue.js} +1 -1
  147. package/dist/es/layouts/sidebar/layer/{LayerNodeContent.vue_vue_type_script_setup_true_lang.js → LayerNodeContent.vue.js} +3 -3
  148. package/dist/es/layouts/sidebar/layer/{LayerNodeContent.js → LayerNodeContent2.vue.js} +1 -1
  149. package/dist/es/layouts/sidebar/layer/{LayerNodeTool.js → LayerNodeTool2.vue.js} +1 -1
  150. package/dist/es/layouts/sidebar/layer/{LayerPanel.vue_vue_type_script_setup_true_lang.js → LayerPanel.vue.js} +7 -7
  151. package/dist/es/layouts/sidebar/layer/{LayerPanel.js → LayerPanel2.vue.js} +1 -1
  152. package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
  153. package/dist/es/layouts/sidebar/layer/use-drag.js +1 -1
  154. package/dist/es/layouts/sidebar/layer/use-keybinding.js +1 -1
  155. package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
  156. package/dist/es/layouts/workspace/{Breadcrumb.js → Breadcrumb2.vue.js} +1 -1
  157. package/dist/es/layouts/workspace/{Workspace.vue_vue_type_script_setup_true_lang.js → Workspace.vue.js} +3 -3
  158. package/dist/es/layouts/workspace/{Workspace.js → Workspace2.vue.js} +1 -1
  159. package/dist/es/layouts/workspace/viewer/{NodeListMenu.vue_vue_type_script_setup_true_lang.js → NodeListMenu.vue.js} +5 -5
  160. package/dist/es/layouts/workspace/viewer/{NodeListMenu.js → NodeListMenu2.vue.js} +1 -1
  161. package/dist/es/layouts/workspace/viewer/{Stage.vue_vue_type_script_setup_true_lang.js → Stage.vue.js} +70 -55
  162. package/dist/es/layouts/workspace/viewer/{Stage.js → Stage2.vue.js} +1 -1
  163. package/dist/es/layouts/workspace/viewer/{StageOverlay.vue_vue_type_script_setup_true_lang.js → StageOverlay.vue.js} +3 -3
  164. package/dist/es/layouts/workspace/viewer/{StageOverlay.js → StageOverlay2.vue.js} +1 -1
  165. package/dist/es/layouts/workspace/viewer/{ViewerMenu.vue_vue_type_script_setup_true_lang.js → ViewerMenu.vue.js} +6 -6
  166. package/dist/es/layouts/workspace/viewer/{ViewerMenu.js → ViewerMenu2.vue.js} +1 -1
  167. package/dist/es/plugin.js +24 -24
  168. package/dist/es/sdk/index.js +2 -2
  169. package/dist/es/sdk/services/CodeBlock.js +18 -18
  170. package/dist/es/sdk/services/DataSource.js +17 -17
  171. package/dist/es/sdk/services/Dep.js +3 -3
  172. package/dist/es/sdk/services/Editor.js +60 -58
  173. package/dist/es/sdk/services/Events.js +2 -2
  174. package/dist/es/sdk/services/History.js +1 -1
  175. package/dist/es/sdk/services/Props.js +6 -6
  176. package/dist/es/sdk/services/WebStorage.js +1 -1
  177. package/dist/es/sdk/utils/dep.js +2 -2
  178. package/dist/es/sdk/utils/operator.js +3 -3
  179. package/dist/es/sdk/validate/index.js +4 -4
  180. package/dist/es/sdk/wiring.js +2 -2
  181. package/dist/es/services/keybinding.js +2 -2
  182. package/dist/es/services/stageOverlay.js +2 -2
  183. package/dist/es/services/ui.js +2 -2
  184. package/dist/es/utils/code-block.js +2 -2
  185. package/dist/es/utils/content-menu.js +3 -3
  186. package/dist/es/utils/data-source/index.js +88 -5
  187. package/dist/es/utils/dep/collect-worker-client.js +1 -1
  188. package/dist/es/utils/dep/idle-task.js +1 -1
  189. package/dist/es/utils/editor.js +7 -6
  190. package/dist/es/utils/event.js +1 -1
  191. package/dist/es/utils/history.js +2 -2
  192. package/dist/es/utils/operator.js +1 -1
  193. package/dist/es/utils/page.js +21 -0
  194. package/dist/es/utils/props.js +1 -1
  195. package/dist/es/utils/type-match-rules.js +4 -4
  196. package/dist/tmagic-editor-headless.umd.cjs +73 -41
  197. package/dist/tmagic-editor-sdk.umd.cjs +41 -38
  198. package/dist/tmagic-editor.umd.cjs +554 -181
  199. package/package.json +8 -8
  200. package/src/fields/DataSourceFieldSelect/FieldSelect.vue +68 -9
  201. package/src/fields/DataSourceFields.vue +53 -10
  202. package/src/fields/DataSourceMocks.vue +2 -2
  203. package/src/hooks/use-stage.ts +26 -1
  204. package/src/layouts/NavMenuColumn.vue +8 -1
  205. package/src/layouts/workspace/viewer/Stage.vue +77 -57
  206. package/src/sdk/services/Editor.ts +6 -4
  207. package/src/type.ts +2 -0
  208. package/src/utils/data-source/index.ts +151 -6
  209. package/src/utils/editor.ts +4 -0
  210. package/src/utils/page.ts +32 -0
  211. package/types/headless.d.ts +14 -3
  212. package/types/index.d.ts +137 -298
  213. package/types/sdk.d.ts +3 -43
  214. package/dist/es/components/{CodeParams.vue_vue_type_script_setup_true_lang.js → CodeParams.vue.js} +2 -2
  215. package/dist/es/components/{CompareForm.vue_vue_type_script_setup_true_lang.js → CompareForm.vue.js} +3 -3
  216. package/dist/es/components/{Icon.vue_vue_type_script_setup_true_lang.js → Icon.vue.js} +1 -1
  217. package/dist/es/components/{Resizer.vue_vue_type_script_setup_true_lang.js → Resizer.vue.js} +1 -1
  218. package/dist/es/components/{ScrollBar.vue_vue_type_script_setup_true_lang.js → ScrollBar.vue.js} +0 -0
  219. package/dist/es/components/{SearchInput.vue_vue_type_script_setup_true_lang.js → SearchInput.vue.js} +1 -1
  220. package/dist/es/components/{ViewForm.vue_vue_type_script_setup_true_lang.js → ViewForm.vue.js} +2 -2
  221. package/dist/es/fields/{CodeLink.vue_vue_type_script_setup_true_lang.js → CodeLink.vue.js} +1 -1
  222. package/dist/es/fields/{CodeSelect.vue_vue_type_script_setup_true_lang.js → CodeSelect.vue.js} +2 -2
  223. package/dist/es/fields/{CondOpSelect.vue_vue_type_script_setup_true_lang.js → CondOpSelect.vue.js} +3 -3
  224. package/dist/es/fields/{DisplayConds.vue_vue_type_script_setup_true_lang.js → DisplayConds.vue.js} +2 -2
  225. package/dist/es/fields/{EventSelect.vue_vue_type_script_setup_true_lang.js → EventSelect.vue.js} +2 -2
  226. package/dist/es/fields/StyleSetter/components/{BackgroundPosition.vue_vue_type_script_setup_true_lang.js → BackgroundPosition.vue.js} +1 -1
  227. package/dist/es/fields/StyleSetter/components/{Border.vue_vue_type_script_setup_true_lang.js → Border.vue.js} +2 -2
  228. package/dist/es/fields/StyleSetter/components/{Box.vue_vue_type_script_setup_true_lang.js → Box.vue.js} +0 -0
  229. package/dist/es/fields/StyleSetter/icons/align-items/{Baseline.js → Baseline.vue.js} +1 -1
  230. package/dist/es/fields/StyleSetter/icons/align-items/{Center.js → Center.vue.js} +1 -1
  231. package/dist/es/fields/StyleSetter/icons/align-items/{End.js → End.vue.js} +1 -1
  232. package/dist/es/fields/StyleSetter/icons/align-items/{FlexEnd.js → FlexEnd.vue.js} +1 -1
  233. package/dist/es/fields/StyleSetter/icons/align-items/{FlexStart.js → FlexStart.vue.js} +1 -1
  234. package/dist/es/fields/StyleSetter/icons/align-items/{Normal.js → Normal.vue.js} +1 -1
  235. package/dist/es/fields/StyleSetter/icons/align-items/{SpaceAround.js → SpaceAround.vue.js} +1 -1
  236. package/dist/es/fields/StyleSetter/icons/align-items/{SpaceBetween.js → SpaceBetween.vue.js} +1 -1
  237. package/dist/es/fields/StyleSetter/icons/align-items/{Start.js → Start.vue.js} +1 -1
  238. package/dist/es/fields/StyleSetter/icons/align-items/{Stretch.js → Stretch.vue.js} +1 -1
  239. package/dist/es/fields/StyleSetter/icons/background-repeat/{NoRepeat.js → NoRepeat.vue.js} +1 -1
  240. package/dist/es/fields/StyleSetter/icons/background-repeat/{Repeat.js → Repeat.vue.js} +1 -1
  241. package/dist/es/fields/StyleSetter/icons/background-repeat/{RepeatX.js → RepeatX.vue.js} +1 -1
  242. package/dist/es/fields/StyleSetter/icons/background-repeat/{RepeatY.js → RepeatY.vue.js} +1 -1
  243. package/dist/es/fields/StyleSetter/icons/background-repeat/{Round.js → Round.vue.js} +1 -1
  244. package/dist/es/fields/StyleSetter/icons/background-repeat/{Space.js → Space.vue.js} +1 -1
  245. package/dist/es/fields/StyleSetter/icons/display/{Block.js → Block.vue.js} +1 -1
  246. package/dist/es/fields/StyleSetter/icons/display/{Flex.js → Flex.vue.js} +1 -1
  247. package/dist/es/fields/StyleSetter/icons/display/{Grid.js → Grid.vue.js} +1 -1
  248. package/dist/es/fields/StyleSetter/icons/display/{Inline.js → Inline.vue.js} +1 -1
  249. package/dist/es/fields/StyleSetter/icons/display/{InlineBlock.js → InlineBlock.vue.js} +1 -1
  250. package/dist/es/fields/StyleSetter/icons/display/{InlineFlex.js → InlineFlex.vue.js} +1 -1
  251. package/dist/es/fields/StyleSetter/icons/display/{InlineGrid.js → InlineGrid.vue.js} +1 -1
  252. package/dist/es/fields/StyleSetter/icons/display/{None.js → None.vue.js} +1 -1
  253. package/dist/es/fields/StyleSetter/icons/flex-direction/{Column.js → Column.vue.js} +1 -1
  254. package/dist/es/fields/StyleSetter/icons/flex-direction/{ColumnReverse.js → ColumnReverse.vue.js} +1 -1
  255. package/dist/es/fields/StyleSetter/icons/flex-direction/{Row.js → Row.vue.js} +1 -1
  256. package/dist/es/fields/StyleSetter/icons/flex-direction/{RowReverse.js → RowReverse.vue.js} +1 -1
  257. package/dist/es/fields/StyleSetter/icons/justify-content/{Center.js → Center.vue.js} +1 -1
  258. package/dist/es/fields/StyleSetter/icons/justify-content/{FlexEnd.js → FlexEnd.vue.js} +1 -1
  259. package/dist/es/fields/StyleSetter/icons/justify-content/{FlexStart.js → FlexStart.vue.js} +1 -1
  260. package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceAround.js → SpaceAround.vue.js} +1 -1
  261. package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceBetween.js → SpaceBetween.vue.js} +1 -1
  262. package/dist/es/fields/StyleSetter/icons/justify-content/{SpaceEvenly.js → SpaceEvenly.vue.js} +1 -1
  263. package/dist/es/fields/StyleSetter/icons/text-align/{Center.js → Center.vue.js} +1 -1
  264. package/dist/es/fields/StyleSetter/icons/text-align/{End.js → End.vue.js} +1 -1
  265. package/dist/es/fields/StyleSetter/icons/text-align/{Justify.js → Justify.vue.js} +1 -1
  266. package/dist/es/fields/StyleSetter/icons/text-align/{Left.js → Left.vue.js} +1 -1
  267. package/dist/es/fields/StyleSetter/icons/text-align/{MatchParent.js → MatchParent.vue.js} +1 -1
  268. package/dist/es/fields/StyleSetter/icons/text-align/{Right.js → Right.vue.js} +1 -1
  269. package/dist/es/fields/StyleSetter/icons/text-align/{Start.js → Start.vue.js} +1 -1
  270. package/dist/es/fields/StyleSetter/pro/{Background.vue_vue_type_script_setup_true_lang.js → Background.vue.js} +2 -2
  271. package/dist/es/fields/StyleSetter/pro/{Font.vue_vue_type_script_setup_true_lang.js → Font.vue.js} +2 -2
  272. package/dist/es/fields/StyleSetter/pro/{Position.vue_vue_type_script_setup_true_lang.js → Position.vue.js} +2 -2
  273. package/dist/es/fields/StyleSetter/pro/{Transform.vue_vue_type_script_setup_true_lang.js → Transform.vue.js} +2 -2
  274. package/dist/es/fields/{UISelect.vue_vue_type_script_setup_true_lang.js → UISelect.vue.js} +5 -5
  275. package/dist/es/icons/{CenterIcon.vue_vue_type_script_setup_true_lang.js → CenterIcon.vue.js} +0 -0
  276. package/dist/es/icons/{CodeIcon.vue_vue_type_script_setup_true_lang.js → CodeIcon.vue.js} +0 -0
  277. package/dist/es/icons/{DatasourceIcon.js → DatasourceIcon.vue.js} +1 -1
  278. package/dist/es/icons/{FolderMinusIcon.vue_vue_type_script_setup_true_lang.js → FolderMinusIcon.vue.js} +0 -0
  279. package/dist/es/layouts/history-list/{GroupRow.vue_vue_type_script_setup_true_lang.js → GroupRow.vue.js} +1 -1
  280. package/dist/es/layouts/history-list/{InitialRow.vue_vue_type_script_setup_true_lang.js → InitialRow.vue.js} +1 -1
  281. package/dist/es/layouts/sidebar/layer/{LayerNodeTool.vue_vue_type_script_setup_true_lang.js → LayerNodeTool.vue.js} +2 -2
  282. package/dist/es/layouts/workspace/{Breadcrumb.vue_vue_type_script_setup_true_lang.js → Breadcrumb.vue.js} +2 -2
@@ -1,10 +1,10 @@
1
- import { LayerOffset, Layout } from "../type.js";
2
- import { isFixed } from "../sdk/utils/position.js";
3
- import { calcValueByFontsize, getElById, getNodePath, isNumber, isPage, isPageFragment, isPop, isValueIncludeDataSource } from "@tmagic/utils";
4
- import { NODE_CONDS_KEY, Target, Watcher } from "@tmagic/core";
5
- import { cloneDeep as cloneDeep$1, get, isObject } from "lodash-es";
6
1
  import { detailedDiff } from "deep-object-diff";
2
+ import { cloneDeep, get, isObject } from "lodash-es";
7
3
  import serialize from "serialize-javascript";
4
+ import { NODE_CONDS_KEY, Target, Watcher } from "@tmagic/core";
5
+ import { calcValueByFontsize, getElById, getNodePath, isNumber, isPage, isPageFragment, isPop, isValueIncludeDataSource } from "@tmagic/utils";
6
+ import { LayerOffset, Layout } from "../type.js";
7
+ import { isFixed } from "../sdk/utils/position.js";
8
8
  // packages/editor/src/utils/editor.ts
9
9
  var COPY_STORAGE_KEY = "$MagicEditorCopyData";
10
10
  var COPY_CODE_STORAGE_KEY = "$MagicEditorCopyCode";
@@ -202,6 +202,7 @@ var fixNodeLeft = (config, parent, doc) => {
202
202
  if (el && parentEl) {
203
203
  const calcParentOffsetWidth = calcValueByFontsize(doc, parentEl.offsetWidth);
204
204
  const calcElOffsetWidth = calcValueByFontsize(doc, el.offsetWidth);
205
+ if (calcElOffsetWidth > calcParentOffsetWidth) return config.style.left;
205
206
  if (calcElOffsetWidth + left > calcParentOffsetWidth) return calcParentOffsetWidth - calcElOffsetWidth;
206
207
  }
207
208
  return config.style.left;
@@ -309,7 +310,7 @@ var resolveSelectedNode = (config, getNodeInfoFn, rootId) => {
309
310
  * @returns 处理后的节点配置(深拷贝)
310
311
  */
311
312
  var toggleFixedPosition = async (dist, src, path, getLayoutFn) => {
312
- const newConfig = cloneDeep$1(dist);
313
+ const newConfig = cloneDeep(dist);
313
314
  if (!isPop(src) && newConfig.style?.position) {
314
315
  if (isFixed(newConfig.style) && !isFixed(src.style || {})) newConfig.style = change2Fixed(newConfig, path);
315
316
  else if (!isFixed(newConfig.style) && isFixed(src.style || {})) newConfig.style = await Fixed2Other(newConfig, path, getLayoutFn);
@@ -1,6 +1,6 @@
1
+ import { DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, traverseNode } from "@tmagic/utils";
1
2
  import { dataSourceService, editorService, eventsService } from "../services/sdk-instance.js";
2
3
  import { getCascaderOptionsFromFields } from "./data-source/index.js";
3
- import { DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, traverseNode } from "@tmagic/utils";
4
4
  // packages/editor/src/utils/event.ts
5
5
  /** 未显式传入 services 时使用浏览器端默认实例 */
6
6
  var getDefaultServices = () => ({
@@ -1,7 +1,7 @@
1
- import { UndoRedo } from "./undo-redo.js";
2
- import { guid } from "@tmagic/utils";
3
1
  import { cloneDeep } from "lodash-es";
4
2
  import serialize from "serialize-javascript";
3
+ import { guid } from "@tmagic/utils";
4
+ import { UndoRedo } from "./undo-redo.js";
5
5
  // packages/editor/src/utils/history.ts
6
6
  /**
7
7
  * 「回滚」生成的新 step 简短描述。代码块 / 数据源共用。
@@ -1,6 +1,6 @@
1
+ import { toRaw } from "vue";
1
2
  import { editorService, propsService } from "../services/sdk-instance.js";
2
3
  import { beforePaste as beforePaste$1, getAddParent as getAddParent$1, getDefaultConfig as getDefaultConfig$1, getPositionInContainer as getPositionInContainer$1 } from "../sdk/utils/operator.js";
3
- import { toRaw } from "vue";
4
4
  // packages/editor/src/utils/operator.ts
5
5
  var getContext = () => ({
6
6
  editor: editorService,
@@ -0,0 +1,21 @@
1
+ import { isEqual, omit } from "lodash-es";
2
+ // packages/editor/src/utils/page.ts
3
+ /**
4
+ * 页面 id 和页面自身配置都没变,只是 items 换了顺序。
5
+ * 这种更新来自子节点排序,不是切页,也不是改页面配置。
6
+ */
7
+ var isSamePageItemsReorder = (prev, next) => {
8
+ if (!prev || !next || `${prev.id}` !== `${next.id}`) return false;
9
+ if (!isEqual(omit(prev, "items"), omit(next, "items"))) return false;
10
+ const prevItems = prev.items ?? [];
11
+ const nextItems = next.items ?? [];
12
+ if (!prevItems.length || prevItems.length !== nextItems.length) return false;
13
+ const used = /* @__PURE__ */ new Set();
14
+ return nextItems.every((item) => {
15
+ const index = prevItems.findIndex((prevItem, itemIndex) => !used.has(itemIndex) && isEqual(prevItem, item));
16
+ if (index < 0) return false;
17
+ used.add(index);
18
+ return true;
19
+ });
20
+ };
21
+ export { isSamePageItemsReorder };
@@ -1,5 +1,5 @@
1
- import { advancedTabConfig, arrayOptions, booleanOptions, displayTabConfig, eqOptions, eventTabConfig, fillConfig as fillConfig$1, getCondOpOptionsByFieldType, numberOptions, styleTabConfig } from "../sdk/utils/props.js";
2
1
  import { tMagicMessage } from "@tmagic/design";
2
+ import { advancedTabConfig, arrayOptions, booleanOptions, displayTabConfig, eqOptions, eventTabConfig, fillConfig as fillConfig$1, getCondOpOptionsByFieldType, numberOptions, styleTabConfig } from "../sdk/utils/props.js";
3
3
  // packages/editor/src/utils/props.ts
4
4
  /** 浏览器端默认用 `navigator.clipboard` 复制,并用 `tMagicMessage` 提示 */
5
5
  var copyTextToClipboard = (text) => navigator.clipboard.writeText(text);
@@ -1,10 +1,10 @@
1
+ import { NodeType } from "@tmagic/core";
2
+ import { appendValidateSuggestion } from "@tmagic/design/headless";
3
+ import { MAX_SUGGESTION_OPTIONS, optionSuggestion, stringifyExampleValue, validateTypeMatch } from "@tmagic/form/headless";
4
+ import { DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, DATA_SOURCE_SET_DATA_METHOD_NAME, dataSourceTemplateRegExp, getKeysArray, isArrayIndex, removeDataSourceFieldPrefix } from "@tmagic/utils";
1
5
  import { codeBlockService, dataSourceService, editorService } from "../services/sdk-instance.js";
2
6
  import { getFieldType, resolveFieldByPath } from "./data-source/index.js";
3
7
  import { arrayOptions, booleanOptions, eqOptions, getCondOpOptionsByFieldType, numberOptions } from "../sdk/utils/props.js";
4
- import { DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, DATA_SOURCE_SET_DATA_METHOD_NAME, dataSourceTemplateRegExp, getKeysArray, isArrayIndex, removeDataSourceFieldPrefix } from "@tmagic/utils";
5
- import { NodeType } from "@tmagic/core";
6
- import { MAX_SUGGESTION_OPTIONS, optionSuggestion, stringifyExampleValue, validateTypeMatch } from "@tmagic/form/headless";
7
- import { appendValidateSuggestion } from "@tmagic/design/headless";
8
8
  // packages/editor/src/utils/type-match-rules.ts
9
9
  /** 复用 form 的可选项建议文案;额外过滤 null / 空串,避免业务侧无效枚举污染提示。 */
10
10
  var listSuggestion = (values) => optionSuggestion(values.filter((item) => item !== null && item !== ""));
@@ -21,12 +21,14 @@
21
21
  var __getProtoOf = Object.getPrototypeOf;
22
22
  var __hasOwnProp = Object.prototype.hasOwnProperty;
23
23
  var __copyProps = (to, from, except, desc) => {
24
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
25
- key = keys[i];
26
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
27
- get: ((k) => from[k]).bind(null, key),
28
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
- });
24
+ if (from && typeof from === "object" || typeof from === "function") {
25
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
26
+ desc = __getOwnPropDesc(from, key);
27
+ __defProp(to, key, {
28
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
29
+ enumerable: !desc || desc.enumerable
30
+ });
31
+ }
30
32
  }
31
33
  return to;
32
34
  };
@@ -280,7 +282,7 @@
280
282
  * _.isObject(null);
281
283
  * // => false
282
284
  */
283
- function isObject(value) {
285
+ function isObject$1(value) {
284
286
  var type = typeof value;
285
287
  return value != null && (type == "object" || type == "function");
286
288
  }
@@ -321,9 +323,9 @@
321
323
  function toNumber(value) {
322
324
  if (typeof value == "number") return value;
323
325
  if (isSymbol(value)) return NAN;
324
- if (isObject(value)) {
326
+ if (isObject$1(value)) {
325
327
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
326
- value = isObject(other) ? other + "" : other;
328
+ value = isObject$1(other) ? other + "" : other;
327
329
  }
328
330
  if (typeof value != "string") return value === 0 ? value : +value;
329
331
  value = baseTrim(value);
@@ -374,7 +376,7 @@
374
376
  * // => false
375
377
  */
376
378
  function isFunction(value) {
377
- if (!isObject(value)) return false;
379
+ if (!isObject$1(value)) return false;
378
380
  var tag = baseGetTag(value);
379
381
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
380
382
  }
@@ -444,7 +446,7 @@
444
446
  * else `false`.
445
447
  */
446
448
  function baseIsNative(value) {
447
- if (!isObject(value) || isMasked(value)) return false;
449
+ if (!isObject$1(value) || isMasked(value)) return false;
448
450
  return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
449
451
  }
450
452
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js
@@ -488,7 +490,7 @@
488
490
  var baseCreate = function() {
489
491
  function object() {}
490
492
  return function(proto) {
491
- if (!isObject(proto)) return {};
493
+ if (!isObject$1(proto)) return {};
492
494
  if (objectCreate) return objectCreate(proto);
493
495
  object.prototype = proto;
494
496
  var result = new object();
@@ -707,7 +709,7 @@
707
709
  }
708
710
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js
709
711
  /** Used as references for various `Number` constants. */
710
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
712
+ var MAX_SAFE_INTEGER$1 = 0x1fffffffffffff;
711
713
  /** Used to detect unsigned integer values. */
712
714
  var reIsUint = /^(?:0|[1-9]\d*)$/;
713
715
  /**
@@ -856,7 +858,7 @@
856
858
  }
857
859
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
858
860
  /** Used as references for various `Number` constants. */
859
- var MAX_SAFE_INTEGER = 9007199254740991;
861
+ var MAX_SAFE_INTEGER = 0x1fffffffffffff;
860
862
  /**
861
863
  * Checks if `value` is a valid array-like length.
862
864
  *
@@ -927,7 +929,7 @@
927
929
  * else `false`.
928
930
  */
929
931
  function isIterateeCall(value, index, object) {
930
- if (!isObject(object)) return false;
932
+ if (!isObject$1(object)) return false;
931
933
  var type = typeof index;
932
934
  if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
933
935
  return false;
@@ -1264,7 +1266,7 @@
1264
1266
  * @returns {Array} Returns the array of property names.
1265
1267
  */
1266
1268
  function baseKeysIn(object) {
1267
- if (!isObject(object)) return nativeKeysIn(object);
1269
+ if (!isObject$1(object)) return nativeKeysIn(object);
1268
1270
  var isProto = isPrototype(object), result = [];
1269
1271
  for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$8.call(object, key)))) result.push(key);
1270
1272
  return result;
@@ -2587,7 +2589,7 @@
2587
2589
  var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2588
2590
  if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
2589
2591
  if (result !== void 0) return result;
2590
- if (!isObject(value)) return value;
2592
+ if (!isObject$1(value)) return value;
2591
2593
  var isArr = isArray(value);
2592
2594
  if (isArr) {
2593
2595
  result = initCloneArray(value);
@@ -3167,7 +3169,7 @@
3167
3169
  var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
3168
3170
  if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
3169
3171
  wait = toNumber(wait) || 0;
3170
- if (isObject(options)) {
3172
+ if (isObject$1(options)) {
3171
3173
  leading = !!options.leading;
3172
3174
  maxing = "maxWait" in options;
3173
3175
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -3356,7 +3358,7 @@
3356
3358
  } else if (isPlainObject$1(srcValue) || isArguments(srcValue)) {
3357
3359
  newValue = objValue;
3358
3360
  if (isArguments(objValue)) newValue = toPlainObject(objValue);
3359
- else if (!isObject(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
3361
+ else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
3360
3362
  } else isCommon = false;
3361
3363
  }
3362
3364
  if (isCommon) {
@@ -3382,7 +3384,7 @@
3382
3384
  if (object === source) return;
3383
3385
  baseFor(source, function(srcValue, key) {
3384
3386
  stack || (stack = new Stack());
3385
- if (isObject(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3387
+ if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3386
3388
  else {
3387
3389
  var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
3388
3390
  if (newValue === void 0) newValue = srcValue;
@@ -3577,7 +3579,7 @@
3577
3579
  * @returns {Object} Returns `object`.
3578
3580
  */
3579
3581
  function baseSet(object, path, value, customizer) {
3580
- if (!isObject(object)) return object;
3582
+ if (!isObject$1(object)) return object;
3581
3583
  path = castPath(path, object);
3582
3584
  var index = -1, length = path.length, lastIndex = length - 1, nested = object;
3583
3585
  while (nested != null && ++index < length) {
@@ -3586,7 +3588,7 @@
3586
3588
  if (index != lastIndex) {
3587
3589
  var objValue = nested[key];
3588
3590
  newValue = customizer ? customizer(objValue, key, nested) : void 0;
3589
- if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
3591
+ if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
3590
3592
  }
3591
3593
  assignValue(nested, key, newValue);
3592
3594
  nested = nested[key];
@@ -3697,7 +3699,7 @@
3697
3699
  function throttle(func, wait, options) {
3698
3700
  var leading = true, trailing = true;
3699
3701
  if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
3700
- if (isObject(options)) {
3702
+ if (isObject$1(options)) {
3701
3703
  leading = "leading" in options ? !!options.leading : leading;
3702
3704
  trailing = "trailing" in options ? !!options.trailing : trailing;
3703
3705
  }
@@ -4014,6 +4016,7 @@
4014
4016
  if (el && parentEl) {
4015
4017
  const calcParentOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, parentEl.offsetWidth);
4016
4018
  const calcElOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, el.offsetWidth);
4019
+ if (calcElOffsetWidth > calcParentOffsetWidth) return config.style.left;
4017
4020
  if (calcElOffsetWidth + left > calcParentOffsetWidth) return calcParentOffsetWidth - calcElOffsetWidth;
4018
4021
  }
4019
4022
  return config.style.left;
@@ -4039,7 +4042,7 @@
4039
4042
  var isIncludeDataSourceByDiffAddResult = (diffResult) => {
4040
4043
  for (const value of Object.values(diffResult)) {
4041
4044
  if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
4042
- if (isObject(value)) return isIncludeDataSourceByDiffAddResult(value);
4045
+ if (isObject$1(value)) return isIncludeDataSourceByDiffAddResult(value);
4043
4046
  }
4044
4047
  return false;
4045
4048
  };
@@ -4047,7 +4050,7 @@
4047
4050
  for (const [key, value] of Object.entries(diffResult)) {
4048
4051
  if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
4049
4052
  if ((0, _tmagic_utils.isValueIncludeDataSource)(oldNode[key])) return true;
4050
- if (isObject(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
4053
+ if (isObject$1(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
4051
4054
  }
4052
4055
  return false;
4053
4056
  };
@@ -4185,7 +4188,7 @@
4185
4188
  */
4186
4189
  var editorNodeMergeCustomizer = (objValue, srcValue, key, _object, source) => {
4187
4190
  if (typeof srcValue === "undefined" && Object.hasOwn(source, key)) return "";
4188
- if (isObject(srcValue) && Array.isArray(objValue)) return srcValue;
4191
+ if (isObject$1(srcValue) && Array.isArray(objValue)) return srcValue;
4189
4192
  if (Array.isArray(srcValue)) return srcValue;
4190
4193
  };
4191
4194
  /**
@@ -5638,18 +5641,47 @@
5638
5641
  ...values
5639
5642
  };
5640
5643
  };
5641
- var getCascaderOptionsFromFields = (fields = [], dataSourceFieldType = ["any"]) => {
5644
+ /** 数组下标固定提供 0–19,不随 mock 或默认值的长度变化 */
5645
+ var ARRAY_INDEX_COUNT = 20;
5646
+ var appendArrayIndexOptions = (field, dataSourceFieldType, typeSet, includesAny, context) => {
5647
+ const elementFields = field.fields;
5648
+ const taken = new Set((elementFields || []).map((item) => item.name));
5649
+ const elementType = elementFields?.length ? "object" : "any";
5650
+ if (!elementFields?.length && !includesAny) return [];
5651
+ const children = getCascaderOptionsFromFields(elementFields, dataSourceFieldType, {}, context);
5652
+ if (!(includesAny || typeSet.has(elementType)) && !children.length) return [];
5653
+ const indexNodes = [];
5654
+ for (let index = 0; index < ARRAY_INDEX_COUNT; index++) {
5655
+ const name = `${index}`;
5656
+ if (taken.has(name)) continue;
5657
+ indexNodes.push({
5658
+ label: `[${index}]`,
5659
+ value: index,
5660
+ arrayIndex: true,
5661
+ ...children.length ? { children } : {}
5662
+ });
5663
+ }
5664
+ return indexNodes;
5665
+ };
5666
+ var getCascaderOptionsFromFields = (fields = [], dataSourceFieldType = ["any"], data, context = {}) => {
5642
5667
  const typeSet = new Set(dataSourceFieldType.length ? dataSourceFieldType : ["any"]);
5643
5668
  const includesAny = typeSet.has("any");
5644
5669
  const result = [];
5645
5670
  for (const field of fields) {
5646
5671
  const fieldType = field.type || "any";
5647
5672
  const isContainerType = fieldType === "any" || fieldType === "array" || fieldType === "object";
5648
- const children = isContainerType ? getCascaderOptionsFromFields(field.fields, dataSourceFieldType) : [];
5673
+ const showElementFields = fieldType !== "array" || context.directArrayElements !== false;
5674
+ const nestedData = data ? {} : void 0;
5675
+ let children = isContainerType && showElementFields ? getCascaderOptionsFromFields(field.fields, dataSourceFieldType, nestedData, context) : [];
5676
+ if (fieldType === "array" && data) {
5677
+ const indexNodes = appendArrayIndexOptions(field, dataSourceFieldType, typeSet, includesAny, context);
5678
+ children = [...children, ...indexNodes];
5679
+ }
5649
5680
  if (includesAny || typeSet.has(fieldType) || isContainerType && children.length) result.push({
5650
5681
  label: `${field.title || field.name}(${field.type})`,
5651
5682
  value: field.name,
5652
- children
5683
+ children,
5684
+ fieldType
5653
5685
  });
5654
5686
  }
5655
5687
  return result;
@@ -6715,7 +6747,7 @@
6715
6747
  if (name === "nodes" && Array.isArray(value)) this.set("node", value[0]);
6716
6748
  if (name === "root") {
6717
6749
  if (Array.isArray(value)) throw new Error("root 不能为数组");
6718
- if (value && isObject(value)) {
6750
+ if (value && isObject$1(value)) {
6719
6751
  const app = value;
6720
6752
  this.state.pageLength = getPageList(app).length || 0;
6721
6753
  this.state.pageFragmentLength = getPageFragmentList(app).length || 0;
@@ -6929,14 +6961,16 @@
6929
6961
  root: cloneDeep(root),
6930
6962
  index: insertIndex
6931
6963
  });
6932
- const newStyle = fixNodePosition(node, parent, stage);
6933
- if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
6934
- node.style = newStyle;
6935
- await stage?.update({
6936
- config: cloneDeep(node),
6937
- parentId: parent.id,
6938
- root: cloneDeep(root)
6939
- });
6964
+ if (!options.doNotFixPosition) {
6965
+ const newStyle = fixNodePosition(node, parent, stage);
6966
+ if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
6967
+ node.style = newStyle;
6968
+ await stage?.update({
6969
+ config: cloneDeep(node),
6970
+ parentId: parent.id,
6971
+ root: cloneDeep(root)
6972
+ });
6973
+ }
6940
6974
  }
6941
6975
  this.addModifiedNodeId(node.id);
6942
6976
  return node;
@@ -7334,9 +7368,7 @@
7334
7368
  const parent = this.getParentById(config.id);
7335
7369
  if (!parent) throw new Error("找不到父节点");
7336
7370
  const node = cloneDeep(this.toRaw(config));
7337
- const layout = await this.getLayout(parent, node);
7338
- const doc = this.get("stage")?.renderer?.contentWindow?.document;
7339
- const newStyle = calcAlignCenterStyle(node, parent, layout, doc);
7371
+ const newStyle = calcAlignCenterStyle(node, parent, await this.getLayout(parent, node), this.get("stage")?.renderer?.contentWindow?.document);
7340
7372
  if (!newStyle) return config;
7341
7373
  node.style = newStyle;
7342
7374
  return node;
@@ -19,12 +19,14 @@
19
19
  var __getProtoOf = Object.getPrototypeOf;
20
20
  var __hasOwnProp = Object.prototype.hasOwnProperty;
21
21
  var __copyProps = (to, from, except, desc) => {
22
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
23
- key = keys[i];
24
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
25
- get: ((k) => from[k]).bind(null, key),
26
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
27
- });
22
+ if (from && typeof from === "object" || typeof from === "function") {
23
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
24
+ desc = __getOwnPropDesc(from, key);
25
+ __defProp(to, key, {
26
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
27
+ enumerable: !desc || desc.enumerable
28
+ });
29
+ }
28
30
  }
29
31
  return to;
30
32
  };
@@ -278,7 +280,7 @@
278
280
  * _.isObject(null);
279
281
  * // => false
280
282
  */
281
- function isObject(value) {
283
+ function isObject$1(value) {
282
284
  var type = typeof value;
283
285
  return value != null && (type == "object" || type == "function");
284
286
  }
@@ -319,9 +321,9 @@
319
321
  function toNumber(value) {
320
322
  if (typeof value == "number") return value;
321
323
  if (isSymbol(value)) return NAN;
322
- if (isObject(value)) {
324
+ if (isObject$1(value)) {
323
325
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
324
- value = isObject(other) ? other + "" : other;
326
+ value = isObject$1(other) ? other + "" : other;
325
327
  }
326
328
  if (typeof value != "string") return value === 0 ? value : +value;
327
329
  value = baseTrim(value);
@@ -372,7 +374,7 @@
372
374
  * // => false
373
375
  */
374
376
  function isFunction(value) {
375
- if (!isObject(value)) return false;
377
+ if (!isObject$1(value)) return false;
376
378
  var tag = baseGetTag(value);
377
379
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
378
380
  }
@@ -442,7 +444,7 @@
442
444
  * else `false`.
443
445
  */
444
446
  function baseIsNative(value) {
445
- if (!isObject(value) || isMasked(value)) return false;
447
+ if (!isObject$1(value) || isMasked(value)) return false;
446
448
  return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
447
449
  }
448
450
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js
@@ -486,7 +488,7 @@
486
488
  var baseCreate = function() {
487
489
  function object() {}
488
490
  return function(proto) {
489
- if (!isObject(proto)) return {};
491
+ if (!isObject$1(proto)) return {};
490
492
  if (objectCreate) return objectCreate(proto);
491
493
  object.prototype = proto;
492
494
  var result = new object();
@@ -705,7 +707,7 @@
705
707
  }
706
708
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js
707
709
  /** Used as references for various `Number` constants. */
708
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
710
+ var MAX_SAFE_INTEGER$1 = 0x1fffffffffffff;
709
711
  /** Used to detect unsigned integer values. */
710
712
  var reIsUint = /^(?:0|[1-9]\d*)$/;
711
713
  /**
@@ -854,7 +856,7 @@
854
856
  }
855
857
  // node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
856
858
  /** Used as references for various `Number` constants. */
857
- var MAX_SAFE_INTEGER = 9007199254740991;
859
+ var MAX_SAFE_INTEGER = 0x1fffffffffffff;
858
860
  /**
859
861
  * Checks if `value` is a valid array-like length.
860
862
  *
@@ -925,7 +927,7 @@
925
927
  * else `false`.
926
928
  */
927
929
  function isIterateeCall(value, index, object) {
928
- if (!isObject(object)) return false;
930
+ if (!isObject$1(object)) return false;
929
931
  var type = typeof index;
930
932
  if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
931
933
  return false;
@@ -1262,7 +1264,7 @@
1262
1264
  * @returns {Array} Returns the array of property names.
1263
1265
  */
1264
1266
  function baseKeysIn(object) {
1265
- if (!isObject(object)) return nativeKeysIn(object);
1267
+ if (!isObject$1(object)) return nativeKeysIn(object);
1266
1268
  var isProto = isPrototype(object), result = [];
1267
1269
  for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$7.call(object, key)))) result.push(key);
1268
1270
  return result;
@@ -2585,7 +2587,7 @@
2585
2587
  var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2586
2588
  if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
2587
2589
  if (result !== void 0) return result;
2588
- if (!isObject(value)) return value;
2590
+ if (!isObject$1(value)) return value;
2589
2591
  var isArr = isArray(value);
2590
2592
  if (isArr) {
2591
2593
  result = initCloneArray(value);
@@ -3165,7 +3167,7 @@
3165
3167
  var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
3166
3168
  if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
3167
3169
  wait = toNumber(wait) || 0;
3168
- if (isObject(options)) {
3170
+ if (isObject$1(options)) {
3169
3171
  leading = !!options.leading;
3170
3172
  maxing = "maxWait" in options;
3171
3173
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -3354,7 +3356,7 @@
3354
3356
  } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
3355
3357
  newValue = objValue;
3356
3358
  if (isArguments(objValue)) newValue = toPlainObject(objValue);
3357
- else if (!isObject(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
3359
+ else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
3358
3360
  } else isCommon = false;
3359
3361
  }
3360
3362
  if (isCommon) {
@@ -3380,7 +3382,7 @@
3380
3382
  if (object === source) return;
3381
3383
  baseFor(source, function(srcValue, key) {
3382
3384
  stack || (stack = new Stack());
3383
- if (isObject(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3385
+ if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3384
3386
  else {
3385
3387
  var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
3386
3388
  if (newValue === void 0) newValue = srcValue;
@@ -3530,7 +3532,7 @@
3530
3532
  * @returns {Object} Returns `object`.
3531
3533
  */
3532
3534
  function baseSet(object, path, value, customizer) {
3533
- if (!isObject(object)) return object;
3535
+ if (!isObject$1(object)) return object;
3534
3536
  path = castPath(path, object);
3535
3537
  var index = -1, length = path.length, lastIndex = length - 1, nested = object;
3536
3538
  while (nested != null && ++index < length) {
@@ -3539,7 +3541,7 @@
3539
3541
  if (index != lastIndex) {
3540
3542
  var objValue = nested[key];
3541
3543
  newValue = customizer ? customizer(objValue, key, nested) : void 0;
3542
- if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
3544
+ if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
3543
3545
  }
3544
3546
  assignValue(nested, key, newValue);
3545
3547
  nested = nested[key];
@@ -3650,7 +3652,7 @@
3650
3652
  function throttle(func, wait, options) {
3651
3653
  var leading = true, trailing = true;
3652
3654
  if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
3653
- if (isObject(options)) {
3655
+ if (isObject$1(options)) {
3654
3656
  leading = "leading" in options ? !!options.leading : leading;
3655
3657
  trailing = "trailing" in options ? !!options.trailing : trailing;
3656
3658
  }
@@ -3967,6 +3969,7 @@
3967
3969
  if (el && parentEl) {
3968
3970
  const calcParentOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, parentEl.offsetWidth);
3969
3971
  const calcElOffsetWidth = (0, _tmagic_utils.calcValueByFontsize)(doc, el.offsetWidth);
3972
+ if (calcElOffsetWidth > calcParentOffsetWidth) return config.style.left;
3970
3973
  if (calcElOffsetWidth + left > calcParentOffsetWidth) return calcParentOffsetWidth - calcElOffsetWidth;
3971
3974
  }
3972
3975
  return config.style.left;
@@ -3992,7 +3995,7 @@
3992
3995
  var isIncludeDataSourceByDiffAddResult = (diffResult) => {
3993
3996
  for (const value of Object.values(diffResult)) {
3994
3997
  if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
3995
- if (isObject(value)) return isIncludeDataSourceByDiffAddResult(value);
3998
+ if (isObject$1(value)) return isIncludeDataSourceByDiffAddResult(value);
3996
3999
  }
3997
4000
  return false;
3998
4001
  };
@@ -4000,7 +4003,7 @@
4000
4003
  for (const [key, value] of Object.entries(diffResult)) {
4001
4004
  if ((0, _tmagic_utils.isValueIncludeDataSource)(value)) return true;
4002
4005
  if ((0, _tmagic_utils.isValueIncludeDataSource)(oldNode[key])) return true;
4003
- if (isObject(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
4006
+ if (isObject$1(value)) return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
4004
4007
  }
4005
4008
  return false;
4006
4009
  };
@@ -4138,7 +4141,7 @@
4138
4141
  */
4139
4142
  var editorNodeMergeCustomizer = (objValue, srcValue, key, _object, source) => {
4140
4143
  if (typeof srcValue === "undefined" && Object.hasOwn(source, key)) return "";
4141
- if (isObject(srcValue) && Array.isArray(objValue)) return srcValue;
4144
+ if (isObject$1(srcValue) && Array.isArray(objValue)) return srcValue;
4142
4145
  if (Array.isArray(srcValue)) return srcValue;
4143
4146
  };
4144
4147
  /**
@@ -6585,7 +6588,7 @@
6585
6588
  if (name === "nodes" && Array.isArray(value)) this.set("node", value[0]);
6586
6589
  if (name === "root") {
6587
6590
  if (Array.isArray(value)) throw new Error("root 不能为数组");
6588
- if (value && isObject(value)) {
6591
+ if (value && isObject$1(value)) {
6589
6592
  const app = value;
6590
6593
  this.state.pageLength = getPageList(app).length || 0;
6591
6594
  this.state.pageFragmentLength = getPageFragmentList(app).length || 0;
@@ -6799,14 +6802,16 @@
6799
6802
  root: cloneDeep(root),
6800
6803
  index: insertIndex
6801
6804
  });
6802
- const newStyle = fixNodePosition(node, parent, stage);
6803
- if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
6804
- node.style = newStyle;
6805
- await stage?.update({
6806
- config: cloneDeep(node),
6807
- parentId: parent.id,
6808
- root: cloneDeep(root)
6809
- });
6805
+ if (!options.doNotFixPosition) {
6806
+ const newStyle = fixNodePosition(node, parent, stage);
6807
+ if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
6808
+ node.style = newStyle;
6809
+ await stage?.update({
6810
+ config: cloneDeep(node),
6811
+ parentId: parent.id,
6812
+ root: cloneDeep(root)
6813
+ });
6814
+ }
6810
6815
  }
6811
6816
  this.addModifiedNodeId(node.id);
6812
6817
  return node;
@@ -7204,9 +7209,7 @@
7204
7209
  const parent = this.getParentById(config.id);
7205
7210
  if (!parent) throw new Error("找不到父节点");
7206
7211
  const node = cloneDeep(this.toRaw(config));
7207
- const layout = await this.getLayout(parent, node);
7208
- const doc = this.get("stage")?.renderer?.contentWindow?.document;
7209
- const newStyle = calcAlignCenterStyle(node, parent, layout, doc);
7212
+ const newStyle = calcAlignCenterStyle(node, parent, await this.getLayout(parent, node), this.get("stage")?.renderer?.contentWindow?.document);
7210
7213
  if (!newStyle) return config;
7211
7214
  node.style = newStyle;
7212
7215
  return node;