@mlightcad/cad-simple-viewer 1.5.6 → 1.5.7

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 (321) hide show
  1. package/README.md +66 -1
  2. package/dist/cad-simple-viewer.js +30394 -28405
  3. package/dist/cad-simple-viewer.umd.cjs +150 -158
  4. package/dist/dxf-parser-worker.js +796 -707
  5. package/lib/app/AcApContext.d.ts.map +1 -1
  6. package/lib/app/AcApContext.js +15 -5
  7. package/lib/app/AcApContext.js.map +1 -1
  8. package/lib/app/AcApDocManager.d.ts +56 -0
  9. package/lib/app/AcApDocManager.d.ts.map +1 -1
  10. package/lib/app/AcApDocManager.js +112 -14
  11. package/lib/app/AcApDocManager.js.map +1 -1
  12. package/lib/app/AcApDocument.d.ts +81 -0
  13. package/lib/app/AcApDocument.d.ts.map +1 -1
  14. package/lib/app/AcApDocument.js +154 -0
  15. package/lib/app/AcApDocument.js.map +1 -1
  16. package/lib/app/AcApLayerSessionState.d.ts +15 -0
  17. package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
  18. package/lib/app/AcApLayerSessionState.js +2 -0
  19. package/lib/app/AcApLayerSessionState.js.map +1 -0
  20. package/lib/app/AcApOpenFileDialog.d.ts +35 -0
  21. package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
  22. package/lib/app/AcApOpenFileDialog.js +192 -0
  23. package/lib/app/AcApOpenFileDialog.js.map +1 -0
  24. package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
  25. package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
  26. package/lib/app/AcApWebworkerReadiness.js +126 -0
  27. package/lib/app/AcApWebworkerReadiness.js.map +1 -0
  28. package/lib/app/index.d.ts +3 -0
  29. package/lib/app/index.d.ts.map +1 -1
  30. package/lib/app/index.js +2 -0
  31. package/lib/app/index.js.map +1 -1
  32. package/lib/command/AcApOpenCmd.d.ts +3 -22
  33. package/lib/command/AcApOpenCmd.d.ts.map +1 -1
  34. package/lib/command/AcApOpenCmd.js +3 -22
  35. package/lib/command/AcApOpenCmd.js.map +1 -1
  36. package/lib/command/AcApRedoCmd.d.ts +10 -0
  37. package/lib/command/AcApRedoCmd.d.ts.map +1 -0
  38. package/lib/command/AcApRedoCmd.js +85 -0
  39. package/lib/command/AcApRedoCmd.js.map +1 -0
  40. package/lib/command/AcApUndoCmd.d.ts +10 -0
  41. package/lib/command/AcApUndoCmd.d.ts.map +1 -0
  42. package/lib/command/AcApUndoCmd.js +85 -0
  43. package/lib/command/AcApUndoCmd.js.map +1 -0
  44. package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
  45. package/lib/command/draw/AcApEllipseCmd.js +12 -4
  46. package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
  47. package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
  48. package/lib/command/draw/AcApLineCmd.js +8 -2
  49. package/lib/command/draw/AcApLineCmd.js.map +1 -1
  50. package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
  51. package/lib/command/draw/AcApMLineCmd.js +2 -0
  52. package/lib/command/draw/AcApMLineCmd.js.map +1 -1
  53. package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
  54. package/lib/command/draw/AcApPolylineCmd.js +3 -0
  55. package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
  56. package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
  57. package/lib/command/draw/AcApSplineCmd.js +2 -0
  58. package/lib/command/draw/AcApSplineCmd.js.map +1 -1
  59. package/lib/command/index.d.ts +2 -0
  60. package/lib/command/index.d.ts.map +1 -1
  61. package/lib/command/index.js +2 -0
  62. package/lib/command/index.js.map +1 -1
  63. package/lib/command/layer/AcApLayerCmd.d.ts +3 -187
  64. package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
  65. package/lib/command/layer/AcApLayerCmd.js +52 -376
  66. package/lib/command/layer/AcApLayerCmd.js.map +1 -1
  67. package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -27
  68. package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
  69. package/lib/command/layer/AcApLayerCurCmd.js +18 -67
  70. package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
  71. package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -25
  72. package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
  73. package/lib/command/layer/AcApLayerDelCmd.js +22 -155
  74. package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
  75. package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -9
  76. package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
  77. package/lib/command/layer/AcApLayerFreezeCmd.js +27 -39
  78. package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
  79. package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -24
  80. package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
  81. package/lib/command/layer/AcApLayerIsoCmd.js +14 -183
  82. package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
  83. package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -33
  84. package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
  85. package/lib/command/layer/AcApLayerLockCmd.js +18 -55
  86. package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
  87. package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
  88. package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
  89. package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
  90. package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
  91. package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -2
  92. package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
  93. package/lib/command/layer/AcApLayerOffCmd.js +27 -28
  94. package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
  95. package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -15
  96. package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
  97. package/lib/command/layer/AcApLayerOnCmd.js +6 -49
  98. package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
  99. package/lib/command/layer/AcApLayerPCmd.d.ts +2 -68
  100. package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
  101. package/lib/command/layer/AcApLayerPCmd.js +4 -152
  102. package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
  103. package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -22
  104. package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
  105. package/lib/command/layer/AcApLayerThawCmd.js +6 -61
  106. package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
  107. package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -37
  108. package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
  109. package/lib/command/layer/AcApLayerUnisoCmd.js +7 -108
  110. package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
  111. package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -33
  112. package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
  113. package/lib/command/layer/AcApLayerUnlockCmd.js +18 -55
  114. package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
  115. package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
  116. package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
  117. package/lib/command/modify/AcApCopyCmd.js +67 -177
  118. package/lib/command/modify/AcApCopyCmd.js.map +1 -1
  119. package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
  120. package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
  121. package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
  122. package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
  123. package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
  124. package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
  125. package/lib/command/modify/AcApEraseCmd.js +11 -38
  126. package/lib/command/modify/AcApEraseCmd.js.map +1 -1
  127. package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
  128. package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
  129. package/lib/command/modify/AcApHideObjectsCmd.js +0 -7
  130. package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
  131. package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
  132. package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
  133. package/lib/command/modify/AcApMoveCmd.js +26 -105
  134. package/lib/command/modify/AcApMoveCmd.js.map +1 -1
  135. package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
  136. package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
  137. package/lib/command/modify/AcApMovePreviewJig.js +45 -0
  138. package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
  139. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
  140. package/lib/command/modify/AcApOffsetCmd.js +5 -33
  141. package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
  142. package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
  143. package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
  144. package/lib/command/modify/AcApRotateCmd.js +37 -200
  145. package/lib/command/modify/AcApRotateCmd.js.map +1 -1
  146. package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
  147. package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
  148. package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
  149. package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
  150. package/lib/editor/command/AcEdCommand.d.ts +8 -0
  151. package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
  152. package/lib/editor/command/AcEdCommand.js +48 -5
  153. package/lib/editor/command/AcEdCommand.js.map +1 -1
  154. package/lib/editor/global/eventBus.d.ts +10 -2
  155. package/lib/editor/global/eventBus.d.ts.map +1 -1
  156. package/lib/editor/global/eventBus.js.map +1 -1
  157. package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
  158. package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
  159. package/lib/editor/grip/AcEdGripAppearance.js +30 -0
  160. package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
  161. package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -1
  162. package/lib/editor/grip/AcEdGripEditSession.js +9 -2
  163. package/lib/editor/grip/AcEdGripEditSession.js.map +1 -1
  164. package/lib/editor/grip/AcEdGripHandle.d.ts +3 -2
  165. package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -1
  166. package/lib/editor/grip/AcEdGripHandle.js +9 -6
  167. package/lib/editor/grip/AcEdGripHandle.js.map +1 -1
  168. package/lib/editor/grip/AcEdGripManager.d.ts +13 -1
  169. package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -1
  170. package/lib/editor/grip/AcEdGripManager.js +54 -14
  171. package/lib/editor/grip/AcEdGripManager.js.map +1 -1
  172. package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
  173. package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
  174. package/lib/editor/input/AcEdBatchPreview.js +125 -0
  175. package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
  176. package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
  177. package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
  178. package/lib/editor/input/AcEdPreviewJig.js +14 -0
  179. package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
  180. package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
  181. package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
  182. package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
  183. package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
  184. package/lib/editor/input/index.d.ts +2 -0
  185. package/lib/editor/input/index.d.ts.map +1 -1
  186. package/lib/editor/input/index.js +2 -0
  187. package/lib/editor/input/index.js.map +1 -1
  188. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
  189. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
  190. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
  191. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
  192. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
  193. package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
  194. package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
  195. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
  196. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
  197. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
  198. package/lib/editor/view/AcEdBaseView.d.ts +37 -2
  199. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  200. package/lib/editor/view/AcEdBaseView.js +14 -12
  201. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  202. package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
  203. package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
  204. package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
  205. package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
  206. package/lib/i18n/AcApI18n.d.ts +42 -0
  207. package/lib/i18n/AcApI18n.d.ts.map +1 -1
  208. package/lib/i18n/AcApI18n.js +56 -4
  209. package/lib/i18n/AcApI18n.js.map +1 -1
  210. package/lib/i18n/en/command.d.ts +23 -0
  211. package/lib/i18n/en/command.d.ts.map +1 -1
  212. package/lib/i18n/en/command.js +23 -0
  213. package/lib/i18n/en/command.js.map +1 -1
  214. package/lib/i18n/zh/command.d.ts +23 -0
  215. package/lib/i18n/zh/command.d.ts.map +1 -1
  216. package/lib/i18n/zh/command.js +23 -0
  217. package/lib/i18n/zh/command.js.map +1 -1
  218. package/lib/index.d.ts +1 -0
  219. package/lib/index.d.ts.map +1 -1
  220. package/lib/index.js +1 -0
  221. package/lib/index.js.map +1 -1
  222. package/lib/service/AcApEntitySelection.d.ts +42 -0
  223. package/lib/service/AcApEntitySelection.d.ts.map +1 -0
  224. package/lib/service/AcApEntitySelection.js +156 -0
  225. package/lib/service/AcApEntitySelection.js.map +1 -0
  226. package/lib/service/AcApEntityService.d.ts +115 -0
  227. package/lib/service/AcApEntityService.d.ts.map +1 -0
  228. package/lib/service/AcApEntityService.js +194 -0
  229. package/lib/service/AcApEntityService.js.map +1 -0
  230. package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
  231. package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
  232. package/lib/service/AcApLayerIsoState.js +28 -0
  233. package/lib/service/AcApLayerIsoState.js.map +1 -0
  234. package/lib/service/AcApLayerService.d.ts +400 -0
  235. package/lib/service/AcApLayerService.d.ts.map +1 -0
  236. package/lib/service/AcApLayerService.js +1240 -0
  237. package/lib/service/AcApLayerService.js.map +1 -0
  238. package/lib/service/AcApLayerStore.d.ts +198 -0
  239. package/lib/service/AcApLayerStore.d.ts.map +1 -0
  240. package/lib/service/AcApLayerStore.js +335 -0
  241. package/lib/service/AcApLayerStore.js.map +1 -0
  242. package/lib/service/AcApServiceEdit.d.ts +18 -0
  243. package/lib/service/AcApServiceEdit.d.ts.map +1 -0
  244. package/lib/service/AcApServiceEdit.js +34 -0
  245. package/lib/service/AcApServiceEdit.js.map +1 -0
  246. package/lib/service/index.d.ts +16 -0
  247. package/lib/service/index.d.ts.map +1 -0
  248. package/lib/service/index.js +16 -0
  249. package/lib/service/index.js.map +1 -0
  250. package/lib/service/types.d.ts +116 -0
  251. package/lib/service/types.d.ts.map +1 -0
  252. package/lib/service/types.js +5 -0
  253. package/lib/service/types.js.map +1 -0
  254. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +21 -6
  255. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  256. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +56 -10
  257. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  258. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
  259. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
  260. package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
  261. package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
  262. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
  263. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
  264. package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
  265. package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
  266. package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
  267. package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
  268. package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
  269. package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
  270. package/lib/util/AcApDatabaseEdit.d.ts +11 -0
  271. package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
  272. package/lib/util/AcApDatabaseEdit.js +20 -0
  273. package/lib/util/AcApDatabaseEdit.js.map +1 -0
  274. package/lib/util/AcApGeTransform.d.ts +10 -0
  275. package/lib/util/AcApGeTransform.d.ts.map +1 -0
  276. package/lib/util/AcApGeTransform.js +15 -0
  277. package/lib/util/AcApGeTransform.js.map +1 -0
  278. package/lib/util/index.d.ts +2 -0
  279. package/lib/util/index.d.ts.map +1 -1
  280. package/lib/util/index.js +2 -0
  281. package/lib/util/index.js.map +1 -1
  282. package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
  283. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
  284. package/lib/view/AcEdViewKeyHandler.js +101 -0
  285. package/lib/view/AcEdViewKeyHandler.js.map +1 -0
  286. package/lib/view/AcTrGroupWcsBboxAssert.d.ts +16 -0
  287. package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -1
  288. package/lib/view/AcTrGroupWcsBboxAssert.js +19 -0
  289. package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -1
  290. package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
  291. package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
  292. package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
  293. package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
  294. package/lib/view/AcTrLayer.d.ts +26 -2
  295. package/lib/view/AcTrLayer.d.ts.map +1 -1
  296. package/lib/view/AcTrLayer.js +64 -0
  297. package/lib/view/AcTrLayer.js.map +1 -1
  298. package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
  299. package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
  300. package/lib/view/AcTrLayerAppearanceController.js +86 -0
  301. package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
  302. package/lib/view/AcTrLayout.d.ts +36 -1
  303. package/lib/view/AcTrLayout.d.ts.map +1 -1
  304. package/lib/view/AcTrLayout.js +160 -14
  305. package/lib/view/AcTrLayout.js.map +1 -1
  306. package/lib/view/AcTrScene.d.ts +47 -1
  307. package/lib/view/AcTrScene.d.ts.map +1 -1
  308. package/lib/view/AcTrScene.js +78 -3
  309. package/lib/view/AcTrScene.js.map +1 -1
  310. package/lib/view/AcTrView2d.d.ts +50 -53
  311. package/lib/view/AcTrView2d.d.ts.map +1 -1
  312. package/lib/view/AcTrView2d.js +195 -312
  313. package/lib/view/AcTrView2d.js.map +1 -1
  314. package/lib/view/index.d.ts +3 -0
  315. package/lib/view/index.d.ts.map +1 -1
  316. package/lib/view/index.js +3 -0
  317. package/lib/view/index.js.map +1 -1
  318. package/package.json +7 -7
  319. package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
  320. package/lib/command/layer/AcApLayerIsoState.js +0 -53
  321. package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
@@ -49,148 +49,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
- import { AcGeMatrix3d, AcGePoint3d, AcGeTol } from '@mlightcad/data-model';
53
- import { AcApAnnotation, AcApDocManager } from '../../app';
54
- import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptAngleOptions, AcEdPromptPointOptions, AcEdPromptSelectionOptions, AcEdPromptStatus } from '../../editor';
52
+ import { AcGePoint3d, AcGeTol } from '@mlightcad/data-model';
53
+ import { AcApDocManager } from '../../app';
54
+ import { AcEdCommand, AcEdOpenMode, AcEdPromptAngleOptions, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
55
55
  import { AcApI18n } from '../../i18n';
56
- /**
57
- * Static preview jig used while ROTATE asks for supporting inputs such as
58
- * reference points. It keeps cloned source entities visible without mutating
59
- * database entities.
60
- */
61
- var AcApRotateStaticJig = /** @class */ (function (_super) {
62
- __extends(AcApRotateStaticJig, _super);
63
- /**
64
- * Creates a static transient preview for prompts that do not modify geometry.
65
- *
66
- * @param view - Active editor view that renders transient entities.
67
- * @param sourceEntities - Original entities cloned for preview display.
68
- */
69
- function AcApRotateStaticJig(view, sourceEntities) {
70
- var _this = _super.call(this, view) || this;
71
- _this._view = view;
72
- _this._previewEntities = sourceEntities
73
- .map(function (entity) { return entity.clone(); })
74
- .filter(function (entity) { return !!entity; });
75
- return _this;
76
- }
77
- Object.defineProperty(AcApRotateStaticJig.prototype, "entity", {
78
- /**
79
- * Gets the first preview entity so the jig can integrate with the editor API.
80
- *
81
- * @returns First transient preview entity, or `null` when cloning failed.
82
- */
83
- get: function () {
84
- var _a;
85
- return (_a = this._previewEntities[0]) !== null && _a !== void 0 ? _a : null;
86
- },
87
- enumerable: false,
88
- configurable: true
89
- });
90
- /**
91
- * Accepts prompt updates without changing geometry because this preview is static.
92
- *
93
- * @param _value - Prompt value supplied by the editor, ignored by this jig.
94
- */
95
- AcApRotateStaticJig.prototype.update = function (_value) {
96
- // Static preview only.
97
- };
98
- /**
99
- * Adds the cloned entities to the view as transient preview graphics.
100
- */
101
- AcApRotateStaticJig.prototype.render = function () {
102
- if (this._previewEntities.length === 0)
103
- return;
104
- this._view.addTransientEntity(this._previewEntities);
105
- };
106
- /**
107
- * Removes every transient preview entity from the view.
108
- */
109
- AcApRotateStaticJig.prototype.end = function () {
110
- var _this = this;
111
- this._previewEntities.forEach(function (entity) {
112
- return _this._view.removeTransientEntity(entity.objectId);
113
- });
114
- };
115
- return AcApRotateStaticJig;
116
- }(AcEdPreviewJig));
117
- /**
118
- * ROTATE preview jig.
119
- *
120
- * It clones source entities once and applies only the incremental delta angle
121
- * to those clones as the cursor moves, so database entities remain unchanged
122
- * until command commit.
123
- */
124
- var AcApRotatePreviewJig = /** @class */ (function (_super) {
125
- __extends(AcApRotatePreviewJig, _super);
126
- /**
127
- * Creates a dynamic ROTATE preview jig.
128
- *
129
- * @param view - Active editor view that renders transient entities.
130
- * @param sourceEntities - Original entities cloned for preview display.
131
- * @param basePoint - Rotation base point.
132
- * @param referenceAngleDeg - Reference angle in degrees used for reference-based rotation prompts.
133
- */
134
- function AcApRotatePreviewJig(view, sourceEntities, basePoint, referenceAngleDeg) {
135
- if (referenceAngleDeg === void 0) { referenceAngleDeg = 0; }
136
- var _this = _super.call(this, view) || this;
137
- _this._lastAngleRad = 0;
138
- _this._view = view;
139
- _this._basePoint = new AcGePoint3d(basePoint);
140
- _this._referenceAngleDeg = referenceAngleDeg;
141
- _this._previewEntities = sourceEntities
142
- .map(function (entity) { return entity.clone(); })
143
- .filter(function (entity) { return !!entity; });
144
- return _this;
145
- }
146
- Object.defineProperty(AcApRotatePreviewJig.prototype, "entity", {
147
- /**
148
- * Gets the first transient preview entity required by the jig API.
149
- *
150
- * @returns First preview entity, or `null` when cloning failed.
151
- */
152
- get: function () {
153
- var _a;
154
- return (_a = this._previewEntities[0]) !== null && _a !== void 0 ? _a : null;
155
- },
156
- enumerable: false,
157
- configurable: true
158
- });
159
- /**
160
- * Applies only the incremental rotation delta to preview clones.
161
- *
162
- * @param angleDeg - Current angle input in degrees from the editor prompt.
163
- */
164
- AcApRotatePreviewJig.prototype.update = function (angleDeg) {
165
- if (this._previewEntities.length === 0)
166
- return;
167
- var angleRad = ((angleDeg - this._referenceAngleDeg) * Math.PI) / 180;
168
- var deltaRad = angleRad - this._lastAngleRad;
169
- if (AcGeTol.equalToZero(deltaRad))
170
- return;
171
- var matrix = AcApRotateCmd.createRotationMatrix(this._basePoint, deltaRad);
172
- this._previewEntities.forEach(function (entity) { return entity.transformBy(matrix); });
173
- this._lastAngleRad = angleRad;
174
- };
175
- /**
176
- * Adds rotated preview clones to the view as transient geometry.
177
- */
178
- AcApRotatePreviewJig.prototype.render = function () {
179
- if (this._previewEntities.length === 0)
180
- return;
181
- this._view.addTransientEntity(this._previewEntities);
182
- };
183
- /**
184
- * Removes transient preview clones from the view.
185
- */
186
- AcApRotatePreviewJig.prototype.end = function () {
187
- var _this = this;
188
- this._previewEntities.forEach(function (entity) {
189
- return _this._view.removeTransientEntity(entity.objectId);
190
- });
191
- };
192
- return AcApRotatePreviewJig;
193
- }(AcEdPreviewJig));
56
+ import { resolveSelectedEntities } from '../../service';
57
+ import { createRotationMatrix } from '../../util/AcApGeTransform';
58
+ import { AcApRotatePreviewJig, AcApRotateStaticJig } from './AcApRotatePreviewJig';
194
59
  /**
195
60
  * Command to rotate selected entities around a base point.
196
61
  *
@@ -210,19 +75,6 @@ var AcApRotateCmd = /** @class */ (function (_super) {
210
75
  _this.mode = AcEdOpenMode.Review;
211
76
  return _this;
212
77
  }
213
- /**
214
- * Builds a world-space rotation matrix around a given base point.
215
- *
216
- * @param basePoint - Rotation origin.
217
- * @param angleRad - Rotation angle in radians.
218
- * @returns Composite transform that rotates around `basePoint`.
219
- */
220
- AcApRotateCmd.createRotationMatrix = function (basePoint, angleRad) {
221
- return new AcGeMatrix3d()
222
- .makeTranslation(basePoint.x, basePoint.y, basePoint.z)
223
- .multiply(new AcGeMatrix3d().makeRotationZ(angleRad))
224
- .multiply(new AcGeMatrix3d().makeTranslation(-basePoint.x, -basePoint.y, -basePoint.z));
225
- };
226
78
  /**
227
79
  * Adds one localized ROTATE keyword to an angle prompt.
228
80
  *
@@ -350,6 +202,8 @@ var AcApRotateCmd = /** @class */ (function (_super) {
350
202
  prompt_2.basePoint = basePoint;
351
203
  prompt_2.allowNegative = true;
352
204
  prompt_2.allowZero = true;
205
+ // AutoCAD ROTATE: Enter at angle prompt ends without rotating.
206
+ prompt_2.allowNone = true;
353
207
  prompt_2.jig = new AcApRotatePreviewJig(context.view, sourceEntities, basePoint);
354
208
  return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(prompt_2)];
355
209
  case 2:
@@ -380,6 +234,7 @@ var AcApRotateCmd = /** @class */ (function (_super) {
380
234
  newAnglePrompt.basePoint = basePoint;
381
235
  newAnglePrompt.allowNegative = true;
382
236
  newAnglePrompt.allowZero = true;
237
+ newAnglePrompt.allowNone = true;
383
238
  newAnglePrompt.jig = new AcApRotatePreviewJig(context.view, sourceEntities, basePoint, referenceAngleDeg);
384
239
  return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(newAnglePrompt)];
385
240
  case 4:
@@ -405,71 +260,45 @@ var AcApRotateCmd = /** @class */ (function (_super) {
405
260
  */
406
261
  AcApRotateCmd.prototype.execute = function (context) {
407
262
  return __awaiter(this, void 0, void 0, function () {
408
- var selectionSet, annotation, blockTable, selectionIds, _a, ids, sourceEntities, basePointPrompt, basePointResult, basePoint, rotation, matrix, clones;
409
- var _b, _c;
410
- return __generator(this, function (_d) {
411
- switch (_d.label) {
263
+ var selectionSet, resolved, sourceEntities, basePointPrompt, basePointResult, basePoint, rotation, matrix, entityService;
264
+ return __generator(this, function (_a) {
265
+ switch (_a.label) {
412
266
  case 0:
413
267
  selectionSet = context.view.selectionSet;
414
- annotation = new AcApAnnotation(context.doc.database);
415
- blockTable = context.doc.database.tables.blockTable;
416
- if (!(selectionSet.count > 0)) return [3 /*break*/, 1];
417
- _a = selectionSet.ids;
418
- return [3 /*break*/, 3];
419
- case 1: return [4 /*yield*/, AcApDocManager.instance.editor.getSelection(new AcEdPromptSelectionOptions(AcApI18n.sysCmdPrompt('rotate')))];
420
- case 2:
421
- _a = ((_c = (_b = (_d.sent()).value) === null || _b === void 0 ? void 0 : _b.ids) !== null && _c !== void 0 ? _c : []);
422
- _d.label = 3;
423
- case 3:
424
- selectionIds = _a;
425
- if (selectionIds.length === 0)
426
- return [2 /*return*/];
427
- ids = context.doc.openMode == AcEdOpenMode.Review
428
- ? annotation.filterAnnotationEntities(selectionIds)
429
- : selectionIds;
430
- if (ids.length === 0) {
431
- selectionSet.clear();
432
- return [2 /*return*/];
433
- }
434
- sourceEntities = ids
435
- .map(function (id) { return blockTable.getEntityById(id); })
436
- .filter(function (entity) { return !!entity; });
437
- if (sourceEntities.length === 0) {
438
- selectionSet.clear();
268
+ return [4 /*yield*/, resolveSelectedEntities(context, {
269
+ promptKey: 'rotate'
270
+ })];
271
+ case 1:
272
+ resolved = _a.sent();
273
+ if (!resolved)
439
274
  return [2 /*return*/];
440
- }
275
+ sourceEntities = resolved.entities;
441
276
  basePointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.rotate.basePoint'));
442
277
  basePointPrompt.jig = new AcApRotateStaticJig(context.view, sourceEntities);
278
+ // AutoCAD ROTATE: Enter at base point cancels without rotating.
279
+ basePointPrompt.allowNone = true;
443
280
  return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(basePointPrompt)];
444
- case 4:
445
- basePointResult = _d.sent();
281
+ case 2:
282
+ basePointResult = _a.sent();
446
283
  if (basePointResult.status !== AcEdPromptStatus.OK) {
447
284
  selectionSet.clear();
448
285
  return [2 /*return*/];
449
286
  }
450
287
  basePoint = new AcGePoint3d(basePointResult.value);
451
288
  return [4 /*yield*/, this.promptRotationAngle(context, sourceEntities, basePoint)];
452
- case 5:
453
- rotation = _d.sent();
289
+ case 3:
290
+ rotation = _a.sent();
454
291
  if (!rotation) {
455
292
  selectionSet.clear();
456
293
  return [2 /*return*/];
457
294
  }
458
- matrix = AcApRotateCmd.createRotationMatrix(basePoint, rotation.angleRad);
295
+ matrix = createRotationMatrix(basePoint, rotation.angleRad);
296
+ entityService = context.doc.entityService;
459
297
  if (rotation.copyMode) {
460
- clones = sourceEntities
461
- .map(function (entity) { return entity.clone(); })
462
- .filter(function (entity) { return !!entity; });
463
- clones.forEach(function (entity) { return entity.transformBy(matrix); });
464
- if (clones.length > 0) {
465
- blockTable.modelSpace.appendEntity(clones);
466
- }
298
+ entityService.cloneAndTransform(sourceEntities, matrix);
467
299
  }
468
300
  else {
469
- sourceEntities.forEach(function (entity) {
470
- entity.transformBy(matrix);
471
- entity.triggerModifiedEvent();
472
- });
301
+ entityService.transformEntities(sourceEntities, matrix);
473
302
  }
474
303
  selectionSet.clear();
475
304
  return [2 /*return*/];
@@ -477,6 +306,14 @@ var AcApRotateCmd = /** @class */ (function (_super) {
477
306
  });
478
307
  });
479
308
  };
309
+ /**
310
+ * Builds a world-space rotation matrix around a given base point.
311
+ *
312
+ * @param basePoint - Rotation origin.
313
+ * @param angleRad - Rotation angle in radians.
314
+ * @returns Composite transform that rotates around `basePoint`.
315
+ */
316
+ AcApRotateCmd.createRotationMatrix = createRotationMatrix;
480
317
  return AcApRotateCmd;
481
318
  }(AcEdCommand));
482
319
  export { AcApRotateCmd };
@@ -1 +1 @@
1
- {"version":3,"file":"AcApRotateCmd.js","sourceRoot":"","sources":["../../../src/command/modify/AcApRotateCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAEL,YAAY,EACZ,WAAW,EAEX,OAAO,EACR,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvE,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,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BAAiB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;wBACzD,CAAC;wBAED,YAAY,CAAC,KAAK,EAAE,CAAA;;;;;KACrB;IAjRD;;;;;;OAMG;IACI,kCAAoB,GAAG,oBAAoB,CAAA;IA2QpD,oBAAC;CAAA,AA3RD,CAAmC,WAAW,GA2R7C;SA3RY,aAAa"}
@@ -0,0 +1,47 @@
1
+ import { AcDbEntity, AcGePoint3dLike } from '@mlightcad/data-model';
2
+ import { AcEdSelectionStaticPreviewJig, AcEdSelectionTransformPreviewJig } from '../../editor/input/AcEdSelectionPreviewJig';
3
+ import { AcEdBaseView } from '../../editor/view/AcEdBaseView';
4
+ /**
5
+ * Static preview jig used while ROTATE asks for supporting inputs such as
6
+ * reference points. It keeps cloned source entities visible without mutating
7
+ * database entities.
8
+ */
9
+ export declare class AcApRotateStaticJig<T> extends AcEdSelectionStaticPreviewJig<T> {
10
+ }
11
+ /**
12
+ * ROTATE preview jig.
13
+ *
14
+ * Reuses GPU-resident batched geometry when possible. The legacy transient
15
+ * clone path publishes once and then updates transforms only.
16
+ */
17
+ export declare class AcApRotatePreviewJig extends AcEdSelectionTransformPreviewJig<number> {
18
+ private _basePoint;
19
+ private _lastAngleRad;
20
+ private _referenceAngleDeg;
21
+ /**
22
+ * Creates a dynamic ROTATE preview jig.
23
+ *
24
+ * @param view - Active editor view that renders transient entities.
25
+ * @param sourceEntities - Original entities cloned for preview display.
26
+ * @param basePoint - Rotation base point.
27
+ * @param referenceAngleDeg - Reference angle in degrees used for reference-based rotation prompts.
28
+ */
29
+ constructor(view: AcEdBaseView, sourceEntities: AcDbEntity[], basePoint: AcGePoint3dLike, referenceAngleDeg?: number);
30
+ /**
31
+ * Gets the first transient preview entity required by the jig API.
32
+ *
33
+ * @returns First preview entity, or `null` when cloning failed.
34
+ */
35
+ get entity(): AcDbEntity;
36
+ /**
37
+ * Applies rotation to the preview overlay or transient clone set.
38
+ *
39
+ * @param angleDeg - Current angle input in degrees from the editor prompt.
40
+ */
41
+ update(angleDeg: number): void;
42
+ protected buildTransforms(angleDeg: number): {
43
+ objectId: string;
44
+ matrix: import("@mlightcad/data-model").AcGeMatrix3d;
45
+ }[];
46
+ }
47
+ //# sourceMappingURL=AcApRotatePreviewJig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApRotatePreviewJig.d.ts","sourceRoot":"","sources":["../../../src/command/modify/AcApRotatePreviewJig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EAEhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAG7D;;;;GAIG;AACH,qBAAa,mBAAmB,CAAC,CAAC,CAAE,SAAQ,6BAA6B,CAAC,CAAC,CAAC;CAAG;AAE/E;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,gCAAgC,CAAC,MAAM,CAAC;IAChF,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,aAAa,CAAI;IACzB,OAAO,CAAC,kBAAkB,CAAQ;IAElC;;;;;;;OAOG;gBAED,IAAI,EAAE,YAAY,EAClB,cAAc,EAAE,UAAU,EAAE,EAC5B,SAAS,EAAE,eAAe,EAC1B,iBAAiB,SAAI;IAOvB;;;;OAIG;IACH,IAAI,MAAM,eAET;IAED;;;;OAIG;IACM,MAAM,CAAC,QAAQ,EAAE,MAAM;IAiBhC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM;;;;CAQ3C"}
@@ -0,0 +1,97 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { AcGePoint3d, AcGeTol } from '@mlightcad/data-model';
17
+ import { AcEdSelectionStaticPreviewJig, AcEdSelectionTransformPreviewJig } from '../../editor/input/AcEdSelectionPreviewJig';
18
+ import { createRotationMatrix } from '../../util/AcApGeTransform';
19
+ /**
20
+ * Static preview jig used while ROTATE asks for supporting inputs such as
21
+ * reference points. It keeps cloned source entities visible without mutating
22
+ * database entities.
23
+ */
24
+ var AcApRotateStaticJig = /** @class */ (function (_super) {
25
+ __extends(AcApRotateStaticJig, _super);
26
+ function AcApRotateStaticJig() {
27
+ return _super !== null && _super.apply(this, arguments) || this;
28
+ }
29
+ return AcApRotateStaticJig;
30
+ }(AcEdSelectionStaticPreviewJig));
31
+ export { AcApRotateStaticJig };
32
+ /**
33
+ * ROTATE preview jig.
34
+ *
35
+ * Reuses GPU-resident batched geometry when possible. The legacy transient
36
+ * clone path publishes once and then updates transforms only.
37
+ */
38
+ var AcApRotatePreviewJig = /** @class */ (function (_super) {
39
+ __extends(AcApRotatePreviewJig, _super);
40
+ /**
41
+ * Creates a dynamic ROTATE preview jig.
42
+ *
43
+ * @param view - Active editor view that renders transient entities.
44
+ * @param sourceEntities - Original entities cloned for preview display.
45
+ * @param basePoint - Rotation base point.
46
+ * @param referenceAngleDeg - Reference angle in degrees used for reference-based rotation prompts.
47
+ */
48
+ function AcApRotatePreviewJig(view, sourceEntities, basePoint, referenceAngleDeg) {
49
+ if (referenceAngleDeg === void 0) { referenceAngleDeg = 0; }
50
+ var _this = _super.call(this, view, sourceEntities) || this;
51
+ _this._lastAngleRad = 0;
52
+ _this._basePoint = new AcGePoint3d(basePoint);
53
+ _this._referenceAngleDeg = referenceAngleDeg;
54
+ return _this;
55
+ }
56
+ Object.defineProperty(AcApRotatePreviewJig.prototype, "entity", {
57
+ /**
58
+ * Gets the first transient preview entity required by the jig API.
59
+ *
60
+ * @returns First preview entity, or `null` when cloning failed.
61
+ */
62
+ get: function () {
63
+ var _a;
64
+ return (_a = this.previewEntities[0]) !== null && _a !== void 0 ? _a : null;
65
+ },
66
+ enumerable: false,
67
+ configurable: true
68
+ });
69
+ /**
70
+ * Applies rotation to the preview overlay or transient clone set.
71
+ *
72
+ * @param angleDeg - Current angle input in degrees from the editor prompt.
73
+ */
74
+ AcApRotatePreviewJig.prototype.update = function (angleDeg) {
75
+ var angleRad = ((angleDeg - this._referenceAngleDeg) * Math.PI) / 180;
76
+ if (this.batchPreview.useBatchPreview) {
77
+ if (AcGeTol.equalToZero(angleRad - this._lastAngleRad))
78
+ return;
79
+ this.batchPreview.updateMatrix(this._view, createRotationMatrix(this._basePoint, angleRad));
80
+ this._lastAngleRad = angleRad;
81
+ return;
82
+ }
83
+ this._lastAngleRad = angleRad;
84
+ _super.prototype.update.call(this, angleDeg);
85
+ };
86
+ AcApRotatePreviewJig.prototype.buildTransforms = function (angleDeg) {
87
+ var angleRad = ((angleDeg - this._referenceAngleDeg) * Math.PI) / 180;
88
+ var matrix = createRotationMatrix(this._basePoint, angleRad);
89
+ return this.previewEntries.map(function (entry) { return ({
90
+ objectId: entry.entity.objectId,
91
+ matrix: matrix
92
+ }); });
93
+ };
94
+ return AcApRotatePreviewJig;
95
+ }(AcEdSelectionTransformPreviewJig));
96
+ export { AcApRotatePreviewJig };
97
+ //# sourceMappingURL=AcApRotatePreviewJig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApRotatePreviewJig.js","sourceRoot":"","sources":["../../../src/command/modify/AcApRotatePreviewJig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAEL,WAAW,EAEX,OAAO,EACR,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,6BAA6B,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I,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,gBAAK,CAAC,MAAM,YAAC,QAAQ,CAAC,CAAA;IACxB,CAAC;IAES,8CAAe,GAAzB,UAA0B,QAAgB;QACxC,IAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAA;QACvE,IAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC;YACvC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;YAC/B,MAAM,QAAA;SACP,CAAC,EAHsC,CAGtC,CAAC,CAAA;IACL,CAAC;IACH,2BAAC;AAAD,CAAC,AA/DD,CAA0C,gCAAgC,GA+DzE"}
@@ -134,6 +134,10 @@ export declare abstract class AcEdCommand<TUserData extends object = {}> {
134
134
  * @param value - The minimum access mode (Read, Review, or Write)
135
135
  */
136
136
  set mode(value: AcEdOpenMode);
137
+ /**
138
+ * When false, this command does not create its own undo record.
139
+ */
140
+ recordsUndoStack: boolean;
137
141
  /**
138
142
  * Called right before the command starts executing.
139
143
  *
@@ -182,6 +186,10 @@ export declare abstract class AcEdCommand<TUserData extends object = {}> {
182
186
  * ```
183
187
  */
184
188
  trigger(context: AcApContext): Promise<void>;
189
+ /**
190
+ * Returns true when this command should be wrapped in an undo mark.
191
+ */
192
+ protected shouldRecordUndoStack(context: AcApContext): boolean;
185
193
  /**
186
194
  * Executes the command logic.
187
195
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCommand.d.ts","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA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WG;IACH,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAIrD;;;;;;;;;;;;;;;;;;;OAmBG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IAqClC;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO;IAU9D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;IAInC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CACnB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,eAAwB,EAC9B,MAAM,CAAC,EAAE,MAAM,GACd,IAAI;IAIP;;;;;OAKG;IACH,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,eAAwB,GAAG,IAAI;CAGxE"}
@@ -35,6 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  }
36
36
  };
37
37
  import { AcApDocManager } from '../../app';
38
+ import { acapNotifyUndoStackChanged } from '../../util/AcApDatabaseEdit';
38
39
  import { eventBus } from '../global/eventBus';
39
40
  import { AcEdOpenMode } from '../view';
40
41
  /**
@@ -90,6 +91,10 @@ var AcEdCommand = /** @class */ (function () {
90
91
  function AcEdCommand() {
91
92
  /** The minimum access mode required to execute this command */
92
93
  this._mode = AcEdOpenMode.Read;
94
+ /**
95
+ * When false, this command does not create its own undo record.
96
+ */
97
+ this.recordsUndoStack = true;
93
98
  this._globalName = '';
94
99
  this._localName = '';
95
100
  this._userData = {};
@@ -252,25 +257,63 @@ var AcEdCommand = /** @class */ (function () {
252
257
  */
253
258
  AcEdCommand.prototype.trigger = function (context) {
254
259
  return __awaiter(this, void 0, void 0, function () {
260
+ var db, tm, recordUndo, undoTransactionActive, error_1;
255
261
  return __generator(this, function (_a) {
256
262
  switch (_a.label) {
257
263
  case 0:
258
- _a.trys.push([0, , 2, 3]);
264
+ db = context.doc.database;
265
+ tm = db.transactionManager;
266
+ recordUndo = this.shouldRecordUndoStack(context);
267
+ undoTransactionActive = false;
268
+ if (recordUndo) {
269
+ tm.startUndoMark(this.globalName || this.localName);
270
+ tm.startTransaction();
271
+ undoTransactionActive = true;
272
+ }
273
+ _a.label = 1;
274
+ case 1:
275
+ _a.trys.push([1, 3, 4, 5]);
259
276
  this.onCommandWillStart(context);
260
277
  context.view.editor.events.commandWillStart.dispatch({ command: this });
261
278
  return [4 /*yield*/, this.execute(context)];
262
- case 1:
263
- _a.sent();
264
- return [3 /*break*/, 3];
265
279
  case 2:
280
+ _a.sent();
281
+ return [3 /*break*/, 5];
282
+ case 3:
283
+ error_1 = _a.sent();
284
+ if (undoTransactionActive && tm.hasTransaction()) {
285
+ tm.abortTransaction();
286
+ }
287
+ if (undoTransactionActive) {
288
+ tm.cancelUndoMark();
289
+ undoTransactionActive = false;
290
+ }
291
+ throw error_1;
292
+ case 4:
293
+ if (undoTransactionActive && tm.hasTransaction()) {
294
+ tm.commitTransaction();
295
+ tm.endUndoMark();
296
+ undoTransactionActive = false;
297
+ acapNotifyUndoStackChanged();
298
+ }
266
299
  context.view.editor.events.commandEnded.dispatch({ command: this });
267
300
  this.onCommandEnded(context);
268
301
  return [7 /*endfinally*/];
269
- case 3: return [2 /*return*/];
302
+ case 5: return [2 /*return*/];
270
303
  }
271
304
  });
272
305
  });
273
306
  };
307
+ /**
308
+ * Returns true when this command should be wrapped in an undo mark.
309
+ */
310
+ AcEdCommand.prototype.shouldRecordUndoStack = function (context) {
311
+ if (!this.recordsUndoStack) {
312
+ return false;
313
+ }
314
+ return (context.doc.openMode >= AcEdOpenMode.Review &&
315
+ this.mode >= AcEdOpenMode.Review);
316
+ };
274
317
  /**
275
318
  * Executes the command logic.
276
319
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCommand.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EA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