@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
@@ -1,30 +1,10 @@
1
1
  import { AcApContext } from '../../app';
2
- import { AcEdCommand } from '../../editor';
2
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
3
3
  /**
4
4
  * AutoCAD-like `LAYTHW` command.
5
- *
6
- * The command thaws every frozen layer in the current drawing by clearing the
7
- * global frozen flag. Per-viewport layer freeze state is not represented in
8
- * the current viewer, matching the command to database-wide layer thawing only.
9
5
  */
10
- export declare class AcApLayerThawCmd extends AcEdCommand {
11
- /**
12
- * Creates a write-enabled `LAYTHW` command instance.
13
- */
6
+ export declare class AcApLayerThawCmd extends AcApLayerMutationCmd {
14
7
  constructor();
15
- /**
16
- * Runs the thaw-all-layers workflow.
17
- *
18
- * @param context - Active application context used to update the current drawing.
19
- * @returns Resolves when all layer states have been processed.
20
- */
21
8
  execute(context: AcApContext): Promise<void>;
22
- /**
23
- * Clears or sets the frozen bit while preserving other layer flags.
24
- *
25
- * @param layer - Target layer table record.
26
- * @param frozen - Whether the layer should be marked frozen.
27
- */
28
- private setLayerFrozen;
29
9
  }
30
10
  //# sourceMappingURL=AcApLayerThawCmd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApLayerThawCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAA;AAGxD;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;OAEG;;IAMH;;;;;OAKG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IAoBlC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAIvB"}
1
+ {"version":3,"file":"AcApLayerThawCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAIvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;;IAMlD,OAAO,CAAC,OAAO,EAAE,WAAW;CAWnC"}
@@ -49,69 +49,25 @@ 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
- var __read = (this && this.__read) || function (o, n) {
53
- var m = typeof Symbol === "function" && o[Symbol.iterator];
54
- if (!m) return o;
55
- var i = m.call(o), r, ar = [], e;
56
- try {
57
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
58
- }
59
- catch (error) { e = { error: error }; }
60
- finally {
61
- try {
62
- if (r && !r.done && (m = i["return"])) m.call(i);
63
- }
64
- finally { if (e) throw e.error; }
65
- }
66
- return ar;
67
- };
68
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
69
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
70
- if (ar || !(i in from)) {
71
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
72
- ar[i] = from[i];
73
- }
74
- }
75
- return to.concat(ar || Array.prototype.slice.call(from));
76
- };
77
- import { AcEdCommand, AcEdOpenMode } from '../../editor';
52
+ import { AcEdOpenMode } from '../../editor';
78
53
  import { AcApI18n } from '../../i18n';
54
+ import { AcApLayerService } from '../../service';
55
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
79
56
  /**
80
57
  * AutoCAD-like `LAYTHW` command.
81
- *
82
- * The command thaws every frozen layer in the current drawing by clearing the
83
- * global frozen flag. Per-viewport layer freeze state is not represented in
84
- * the current viewer, matching the command to database-wide layer thawing only.
85
58
  */
86
59
  var AcApLayerThawCmd = /** @class */ (function (_super) {
87
60
  __extends(AcApLayerThawCmd, _super);
88
- /**
89
- * Creates a write-enabled `LAYTHW` command instance.
90
- */
91
61
  function AcApLayerThawCmd() {
92
62
  var _this = _super.call(this) || this;
93
63
  _this.mode = AcEdOpenMode.Write;
94
64
  return _this;
95
65
  }
96
- /**
97
- * Runs the thaw-all-layers workflow.
98
- *
99
- * @param context - Active application context used to update the current drawing.
100
- * @returns Resolves when all layer states have been processed.
101
- */
102
66
  AcApLayerThawCmd.prototype.execute = function (context) {
103
67
  return __awaiter(this, void 0, void 0, function () {
104
- var layers, thawed;
105
- var _this = this;
68
+ var thawed;
106
69
  return __generator(this, function (_a) {
107
- layers = __spreadArray([], __read(context.doc.database.tables.layerTable.newIterator()), false);
108
- thawed = 0;
109
- layers.forEach(function (layer) {
110
- if (!layer.isFrozen)
111
- return;
112
- _this.setLayerFrozen(layer, false);
113
- thawed++;
114
- });
70
+ thawed = new AcApLayerService(context.doc.database).thawAllLayers();
115
71
  context.view.selectionSet.clear();
116
72
  if (thawed === 0) {
117
73
  this.showMessage(AcApI18n.t('jig.laythw.alreadyThawed'));
@@ -122,18 +78,7 @@ var AcApLayerThawCmd = /** @class */ (function (_super) {
122
78
  });
123
79
  });
124
80
  };
125
- /**
126
- * Clears or sets the frozen bit while preserving other layer flags.
127
- *
128
- * @param layer - Target layer table record.
129
- * @param frozen - Whether the layer should be marked frozen.
130
- */
131
- AcApLayerThawCmd.prototype.setLayerFrozen = function (layer, frozen) {
132
- var _a;
133
- var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
134
- layer.standardFlags = frozen ? flags | 0x01 : flags & ~0x01;
135
- };
136
81
  return AcApLayerThawCmd;
137
- }(AcEdCommand));
82
+ }(AcApLayerMutationCmd));
138
83
  export { AcApLayerThawCmd };
139
84
  //# sourceMappingURL=AcApLayerThawCmd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApLayerThawCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EAAE,WAAW,EA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,CAAC;IACH,uBAAC;AAAD,CAAC,AA7CD,CAAsC,WAAW,GA6ChD"}
1
+ {"version":3,"file":"AcApLayerThawCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAsC,oCAAoB;IACxD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,kCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,MAAM,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,CAAA;gBACzE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;gBAEjC,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;oBACjB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAA;oBACxD,sBAAM;gBACR,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,UAAG,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,eAAK,MAAM,CAAE,EAAE,SAAS,CAAC,CAAA;;;;KAC7E;IACH,uBAAC;AAAD,CAAC,AAjBD,CAAsC,oBAAoB,GAiBzD"}
@@ -1,45 +1,10 @@
1
1
  import { AcApContext } from '../../app';
2
- import { AcEdCommand } from '../../editor';
2
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
3
3
  /**
4
4
  * AutoCAD-like `LAYUNISO` command.
5
- *
6
- * The command restores the layer state captured by the previous `LAYISO`.
7
- * It only reverts properties that still match the value applied by `LAYISO`,
8
- * so layer edits made after isolation are retained.
9
5
  */
10
- export declare class AcApLayerUnisoCmd extends AcEdCommand {
11
- /**
12
- * Creates a write-enabled `LAYUNISO` command instance.
13
- */
6
+ export declare class AcApLayerUnisoCmd extends AcApLayerMutationCmd {
14
7
  constructor();
15
- /**
16
- * Restores the previous `LAYISO` layer state when available.
17
- *
18
- * @param context - Active application context used to update layer states.
19
- * @returns Resolves after restoration is attempted.
20
- */
21
8
  execute(context: AcApContext): Promise<void>;
22
- /**
23
- * Restores tracked layer flags that were not changed after `LAYISO`.
24
- *
25
- * @param layer - Layer to restore.
26
- * @param snapshot - Before/after state captured for this layer by `LAYISO`.
27
- * @returns `true` if any tracked flag was restored.
28
- */
29
- private restoreLayerIfUnchanged;
30
- /**
31
- * Sets or clears the frozen bit while preserving other layer flags.
32
- *
33
- * @param layer - Target layer table record.
34
- * @param frozen - Whether the layer should be marked frozen.
35
- */
36
- private setLayerFrozen;
37
- /**
38
- * Sets or clears the locked bit while preserving other layer flags.
39
- *
40
- * @param layer - Target layer table record.
41
- * @param locked - Whether the layer should be marked locked.
42
- */
43
- private setLayerLocked;
44
9
  }
45
10
  //# sourceMappingURL=AcApLayerUnisoCmd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApLayerUnisoCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAA;AAOxD;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;OAEG;;IAMH;;;;;OAKG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IA+ClC;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAiC/B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAIvB"}
1
+ {"version":3,"file":"AcApLayerUnisoCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,oBAAoB;;IAMnD,OAAO,CAAC,OAAO,EAAE,WAAW;CAoBnC"}
@@ -49,81 +49,28 @@ 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
- var __values = (this && this.__values) || function(o) {
53
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
54
- if (m) return m.call(o);
55
- if (o && typeof o.length === "number") return {
56
- next: function () {
57
- if (o && i >= o.length) o = void 0;
58
- return { value: o && o[i++], done: !o };
59
- }
60
- };
61
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
62
- };
63
- import { AcEdCommand, AcEdOpenMode } from '../../editor';
52
+ import { AcEdOpenMode } from '../../editor';
64
53
  import { AcApI18n } from '../../i18n';
65
- import { AcApLayerIsoState } from './AcApLayerIsoState';
54
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
66
55
  /**
67
56
  * AutoCAD-like `LAYUNISO` command.
68
- *
69
- * The command restores the layer state captured by the previous `LAYISO`.
70
- * It only reverts properties that still match the value applied by `LAYISO`,
71
- * so layer edits made after isolation are retained.
72
57
  */
73
58
  var AcApLayerUnisoCmd = /** @class */ (function (_super) {
74
59
  __extends(AcApLayerUnisoCmd, _super);
75
- /**
76
- * Creates a write-enabled `LAYUNISO` command instance.
77
- */
78
60
  function AcApLayerUnisoCmd() {
79
61
  var _this = _super.call(this) || this;
80
62
  _this.mode = AcEdOpenMode.Write;
81
63
  return _this;
82
64
  }
83
- /**
84
- * Restores the previous `LAYISO` layer state when available.
85
- *
86
- * @param context - Active application context used to update layer states.
87
- * @returns Resolves after restoration is attempted.
88
- */
89
65
  AcApLayerUnisoCmd.prototype.execute = function (context) {
90
66
  return __awaiter(this, void 0, void 0, function () {
91
- var snapshot, db, table, restoredLayers, _a, _b, entry, layer;
92
- var e_1, _c;
93
- return __generator(this, function (_d) {
94
- snapshot = AcApLayerIsoState.consume();
95
- if (!snapshot) {
67
+ var restoredLayers;
68
+ return __generator(this, function (_a) {
69
+ restoredLayers = context.doc.unisolateLayers();
70
+ if (restoredLayers === undefined) {
96
71
  this.showMessage(AcApI18n.t('jig.layuniso.noPrevious'), 'warning');
97
72
  return [2 /*return*/];
98
73
  }
99
- db = context.doc.database;
100
- table = db.tables.layerTable;
101
- restoredLayers = 0;
102
- try {
103
- for (_a = __values(snapshot.layers), _b = _a.next(); !_b.done; _b = _a.next()) {
104
- entry = _b.value;
105
- layer = table.getAt(entry.name);
106
- if (!layer) {
107
- this.showMessage("".concat(AcApI18n.t('jig.layuniso.layerNotFound'), ": ").concat(entry.name), 'warning');
108
- continue;
109
- }
110
- if (this.restoreLayerIfUnchanged(layer, entry)) {
111
- restoredLayers++;
112
- }
113
- }
114
- }
115
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
116
- finally {
117
- try {
118
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
119
- }
120
- finally { if (e_1) throw e_1.error; }
121
- }
122
- if (db.clayer === snapshot.currentLayerAfter &&
123
- snapshot.currentLayerBefore !== snapshot.currentLayerAfter &&
124
- table.getAt(snapshot.currentLayerBefore)) {
125
- db.clayer = snapshot.currentLayerBefore;
126
- }
127
74
  context.view.selectionSet.clear();
128
75
  if (restoredLayers === 0) {
129
76
  this.showMessage(AcApI18n.t('jig.layuniso.nothingRestored'));
@@ -134,55 +81,7 @@ var AcApLayerUnisoCmd = /** @class */ (function (_super) {
134
81
  });
135
82
  });
136
83
  };
137
- /**
138
- * Restores tracked layer flags that were not changed after `LAYISO`.
139
- *
140
- * @param layer - Layer to restore.
141
- * @param snapshot - Before/after state captured for this layer by `LAYISO`.
142
- * @returns `true` if any tracked flag was restored.
143
- */
144
- AcApLayerUnisoCmd.prototype.restoreLayerIfUnchanged = function (layer, snapshot) {
145
- var restored = false;
146
- if (layer.isOff === snapshot.isolated.isOff &&
147
- layer.isOff !== snapshot.before.isOff) {
148
- layer.isOff = snapshot.before.isOff;
149
- restored = true;
150
- }
151
- if (layer.isFrozen === snapshot.isolated.isFrozen &&
152
- layer.isFrozen !== snapshot.before.isFrozen) {
153
- this.setLayerFrozen(layer, snapshot.before.isFrozen);
154
- restored = true;
155
- }
156
- if (layer.isLocked === snapshot.isolated.isLocked &&
157
- layer.isLocked !== snapshot.before.isLocked) {
158
- this.setLayerLocked(layer, snapshot.before.isLocked);
159
- restored = true;
160
- }
161
- return restored;
162
- };
163
- /**
164
- * Sets or clears the frozen bit while preserving other layer flags.
165
- *
166
- * @param layer - Target layer table record.
167
- * @param frozen - Whether the layer should be marked frozen.
168
- */
169
- AcApLayerUnisoCmd.prototype.setLayerFrozen = function (layer, frozen) {
170
- var _a;
171
- var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
172
- layer.standardFlags = frozen ? flags | 0x01 : flags & ~0x01;
173
- };
174
- /**
175
- * Sets or clears the locked bit while preserving other layer flags.
176
- *
177
- * @param layer - Target layer table record.
178
- * @param locked - Whether the layer should be marked locked.
179
- */
180
- AcApLayerUnisoCmd.prototype.setLayerLocked = function (layer, locked) {
181
- var _a;
182
- var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
183
- layer.standardFlags = locked ? flags | 0x04 : flags & ~0x04;
184
- };
185
84
  return AcApLayerUnisoCmd;
186
- }(AcEdCommand));
85
+ }(AcApLayerMutationCmd));
187
86
  export { AcApLayerUnisoCmd };
188
87
  //# sourceMappingURL=AcApLayerUnisoC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AAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAuC,qCAAoB;IACzD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,mCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAA;gBAEpD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;oBACjC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,EAAE,SAAS,CAAC,CAAA;oBAClE,sBAAM;gBACR,CAAC;gBAED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;gBAEjC,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;oBACzB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;oBAC5D,sBAAM;gBACR,CAAC;gBAED,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,eAAK,cAAc,CAAE,EAC3D,SAAS,CACV,CAAA;;;;KACF;IACH,wBAAC;AAAD,CAAC,AA1BD,CAAuC,oBAAoB,GA0B1D"}
@@ -1,43 +1,12 @@
1
1
  import { AcApContext } from '../../app';
2
- import { AcEdCommand } from '../../editor';
2
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
3
3
  /**
4
4
  * AutoCAD-like `LAYULK` command.
5
- *
6
- * The command repeatedly asks the user to pick an entity and unlocks the
7
- * corresponding layer. It intentionally works by selection instead of layer
8
- * name entry, matching AutoCAD's `LAYULK` workflow.
9
5
  */
10
- export declare class AcApLayerUnlockCmd extends AcEdCommand {
11
- /**
12
- * Creates a write-enabled `LAYULK` command instance.
13
- */
6
+ export declare class AcApLayerUnlockCmd extends AcApLayerMutationCmd {
14
7
  constructor();
15
- /**
16
- * Runs the interactive unlock-layer workflow until the user cancels.
17
- *
18
- * @param context - Active application context used to read and update the current drawing.
19
- * @returns Resolves when the command loop ends.
20
- */
21
8
  execute(context: AcApContext): Promise<void>;
22
- /**
23
- * Prompts for one entity whose layer should be unlocked.
24
- *
25
- * @returns Picked entity identifier, or `undefined` when the user cancels.
26
- */
27
9
  private promptSelection;
28
- /**
29
- * Sets or clears the locked bit in `standardFlags`.
30
- *
31
- * @param layer - Target layer table record.
32
- * @param locked - `true` to lock, `false` to unlock.
33
- */
34
- private setLayerLocked;
35
- /**
36
- * Resolves the picked entity's layer and unlocks it when needed.
37
- *
38
- * @param context - Active application context containing the current database and view.
39
- * @param objectId - Identifier of the entity selected by the user.
40
- */
41
10
  private unlockEntityLayer;
42
11
  }
43
12
  //# sourceMappingURL=AcApLayerUnlockCmd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApLayerUnlockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EAIZ,MAAM,cAAc,CAAA;AAGrB;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;OAEG;;IAMH;;;;;OAKG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IASlC;;;;OAIG;YACW,eAAe;IAc7B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;CAkC1B"}
1
+ {"version":3,"file":"AcApLayerUnlockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AAQvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,oBAAoB;;IAMpD,OAAO,CAAC,OAAO,EAAE,WAAW;YASpB,eAAe;IAc7B,OAAO,CAAC,iBAAiB;CA+B1B"}
@@ -50,31 +50,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  }
51
51
  };
52
52
  import { AcApDocManager } from '../../app';
53
- import { AcEdCommand, AcEdOpenMode, AcEdPromptEntityOptions, AcEdPromptStatus } from '../../editor';
53
+ import { AcEdOpenMode, AcEdPromptEntityOptions, AcEdPromptStatus } from '../../editor';
54
54
  import { AcApI18n } from '../../i18n';
55
+ import { AcApLayerService } from '../../service';
56
+ import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
55
57
  /**
56
58
  * AutoCAD-like `LAYULK` command.
57
- *
58
- * The command repeatedly asks the user to pick an entity and unlocks the
59
- * corresponding layer. It intentionally works by selection instead of layer
60
- * name entry, matching AutoCAD's `LAYULK` workflow.
61
59
  */
62
60
  var AcApLayerUnlockCmd = /** @class */ (function (_super) {
63
61
  __extends(AcApLayerUnlockCmd, _super);
64
- /**
65
- * Creates a write-enabled `LAYULK` command instance.
66
- */
67
62
  function AcApLayerUnlockCmd() {
68
63
  var _this = _super.call(this) || this;
69
64
  _this.mode = AcEdOpenMode.Write;
70
65
  return _this;
71
66
  }
72
- /**
73
- * Runs the interactive unlock-layer workflow until the user cancels.
74
- *
75
- * @param context - Active application context used to read and update the current drawing.
76
- * @returns Resolves when the command loop ends.
77
- */
78
67
  AcApLayerUnlockCmd.prototype.execute = function (context) {
79
68
  return __awaiter(this, void 0, void 0, function () {
80
69
  var objectId;
@@ -94,11 +83,6 @@ var AcApLayerUnlockCmd = /** @class */ (function (_super) {
94
83
  });
95
84
  });
96
85
  };
97
- /**
98
- * Prompts for one entity whose layer should be unlocked.
99
- *
100
- * @returns Picked entity identifier, or `undefined` when the user cancels.
101
- */
102
86
  AcApLayerUnlockCmd.prototype.promptSelection = function () {
103
87
  return __awaiter(this, void 0, void 0, function () {
104
88
  var prompt, result;
@@ -120,46 +104,25 @@ var AcApLayerUnlockCmd = /** @class */ (function (_super) {
120
104
  });
121
105
  });
122
106
  };
123
- /**
124
- * Sets or clears the locked bit in `standardFlags`.
125
- *
126
- * @param layer - Target layer table record.
127
- * @param locked - `true` to lock, `false` to unlock.
128
- */
129
- AcApLayerUnlockCmd.prototype.setLayerLocked = function (layer, locked) {
130
- var _a;
131
- var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
132
- layer.standardFlags = locked ? flags | 0x04 : flags & ~0x04;
133
- };
134
- /**
135
- * Resolves the picked entity's layer and unlocks it when needed.
136
- *
137
- * @param context - Active application context containing the current database and view.
138
- * @param objectId - Identifier of the entity selected by the user.
139
- */
140
107
  AcApLayerUnlockCmd.prototype.unlockEntityLayer = function (context, objectId) {
141
- var _a;
142
- var db = context.doc.database;
143
- var entity = db.tables.blockTable.getEntityById(objectId);
144
- var layerName = (_a = entity === null || entity === void 0 ? void 0 : entity.layer) === null || _a === void 0 ? void 0 : _a.trim();
145
- if (!layerName) {
146
- this.showMessage(AcApI18n.t('jig.layulk.invalidSelection'), 'warning');
147
- return;
148
- }
149
- var layer = db.tables.layerTable.getAt(layerName);
150
- if (!layer) {
151
- this.showMessage("".concat(AcApI18n.t('jig.layulk.layerNotFound'), ": ").concat(layerName), 'warning');
152
- return;
153
- }
154
- if (!layer.isLocked) {
155
- this.showMessage("".concat(AcApI18n.t('jig.layulk.alreadyUnlocked'), ": ").concat(layer.name), 'info');
156
- return;
108
+ var result = new AcApLayerService(context.doc.database).unlockLayerByEntity(objectId);
109
+ if (!result.ok) {
110
+ switch (result.reason) {
111
+ case 'invalid_selection':
112
+ this.showMessage(AcApI18n.t('jig.layulk.invalidSelection'), 'warning');
113
+ return;
114
+ case 'layer_not_found':
115
+ this.showMessage("".concat(AcApI18n.t('jig.layulk.layerNotFound'), ": ").concat(result.layerName), 'warning');
116
+ return;
117
+ case 'already_unlocked':
118
+ this.showMessage("".concat(AcApI18n.t('jig.layulk.alreadyUnlocked'), ": ").concat(result.layerName), 'info');
119
+ return;
120
+ }
157
121
  }
158
- this.setLayerLocked(layer, false);
159
122
  context.view.selectionSet.clear();
160
- this.showMessage("".concat(AcApI18n.t('jig.layulk.unlocked'), ": ").concat(layer.name), 'success');
123
+ this.showMessage("".concat(AcApI18n.t('jig.layulk.unlocked'), ": ").concat(result.layerName), 'success');
161
124
  };
162
125
  return AcApLayerUnlockCmd;
163
- }(AcEdCommand));
126
+ }(AcApLayerMutationCmd));
164
127
  export { AcApLayerUnlockCmd };
165
128
  //# sourceMappingURL=AcApLayerUnlockCmd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApLayerUnlockCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC;;;;;;GAMG;AACH;IAAwC,sCAAW;IACjD;;OAEG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAED;;;;;OAKG;IACG,oCAAO,GAAb,UAAc,OAAoB;;;;;;6BACzB,IAAI;wBACQ,qBAAM,IAAI,CAAC,eAAe,EAAE,EAAA;;wBAAvC,QAAQ,GAAG,SAA4B;wBAC7C,IAAI,CAAC,QAAQ;4BAAE,sBAAM;wBAErB,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;;;;;KAE5C;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,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;gBACtB,KAAK,mBAAmB;oBACtB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,6BAA6B,CAAC,EAAE,SAAS,CAAC,CAAA;oBACtE,OAAM;gBACR,KAAK,iBAAiB;oBACpB,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAChE,SAAS,CACV,CAAA;oBACD,OAAM;gBACR,KAAK,kBAAkB;oBACrB,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAClE,MAAM,CACP,CAAA;oBACD,OAAM;YACV,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAC3D,SAAS,CACV,CAAA;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA5DD,CAAwC,oBAAoB,GA4D3D"}
@@ -40,6 +40,18 @@ export declare class AcApCopyCmd extends AcEdCommand {
40
40
  * @returns Displacement assigned to the requested copy index.
41
41
  */
42
42
  private scaleDisplacement;
43
+ /**
44
+ * Appends cloned entities to model space and shows them immediately in the view.
45
+ *
46
+ * Database edits during an active command transaction may not reach the view
47
+ * until the command ends. Explicit {@link AcEdBaseView.addEntity} keeps each
48
+ * placement visible while the COPY loop continues. All placements still share
49
+ * one undo mark from {@link AcEdCommand.trigger}.
50
+ *
51
+ * @param context - Active command context with database and view access
52
+ * @param copies - Cloned entities to append and display
53
+ */
54
+ private appendCopies;
43
55
  /**
44
56
  * Clones source entities and translates each clone batch into its final position.
45
57
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AcApCopyCmd.d.ts","sourceRoot":"","sources":["../../../src/command/modify/AcApCopyCmd.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkB,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvE,OAAO,EAEL,WAAW,EAQZ,MAAM,cAAc,CAAA;AAmJrB;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,MAAM,CAAC,YAAY,CAAuB;IAElD;;OAEG;;IAMH;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAWlB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;IA8BnB;;;;;OAKG;YACW,cAAc;IAuB5B;;;;;;;;;;;OAWG;YACW,oBAAoB;IAgFlC;;;;;;;;OAQG;YACW,eAAe;IAsE7B;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;CAqGnC"}
1
+ {"version":3,"file":"AcApCopyCmd.d.ts","sourceRoot":"","sources":["../../../src/command/modify/AcApCopyCmd.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EAOZ,MAAM,cAAc,CAAA;AAarB;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,MAAM,CAAC,YAAY,CAAuB;IAElD;;OAEG;;IAMH;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAWlB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IASzB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,YAAY;IAQpB;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;IA8BnB;;;;;OAKG;YACW,cAAc;IAuB5B;;;;;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