@mlightcad/cad-simple-viewer 1.5.5 → 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 (462) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +69 -1
  3. package/dist/{index.js → cad-simple-viewer.js} +34247 -29923
  4. package/dist/cad-simple-viewer.umd.cjs +913 -0
  5. package/dist/dxf-parser-worker.js +2091 -0
  6. package/dist/libredwg-parser-worker.js +5388 -5122
  7. package/dist/mtext-renderer-worker.js +3061 -2858
  8. package/lib/app/AcApContext.d.ts.map +1 -1
  9. package/lib/app/AcApContext.js +15 -2
  10. package/lib/app/AcApContext.js.map +1 -1
  11. package/lib/app/AcApDocManager.d.ts +63 -0
  12. package/lib/app/AcApDocManager.d.ts.map +1 -1
  13. package/lib/app/AcApDocManager.js +195 -23
  14. package/lib/app/AcApDocManager.js.map +1 -1
  15. package/lib/app/AcApDocument.d.ts +81 -0
  16. package/lib/app/AcApDocument.d.ts.map +1 -1
  17. package/lib/app/AcApDocument.js +154 -0
  18. package/lib/app/AcApDocument.js.map +1 -1
  19. package/lib/app/AcApLayerSessionState.d.ts +15 -0
  20. package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
  21. package/lib/app/AcApLayerSessionState.js +2 -0
  22. package/lib/app/AcApLayerSessionState.js.map +1 -0
  23. package/lib/app/AcApOpenFileDialog.d.ts +35 -0
  24. package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
  25. package/lib/app/AcApOpenFileDialog.js +192 -0
  26. package/lib/app/AcApOpenFileDialog.js.map +1 -0
  27. package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
  28. package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
  29. package/lib/app/AcApWebworkerReadiness.js +126 -0
  30. package/lib/app/AcApWebworkerReadiness.js.map +1 -0
  31. package/lib/app/AcDbOpenDatabaseOptions.d.ts +29 -0
  32. package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -1
  33. package/lib/app/AcDbOpenDatabaseOptions.js +10 -1
  34. package/lib/app/AcDbOpenDatabaseOptions.js.map +1 -1
  35. package/lib/app/index.d.ts +4 -0
  36. package/lib/app/index.d.ts.map +1 -1
  37. package/lib/app/index.js +3 -0
  38. package/lib/app/index.js.map +1 -1
  39. package/lib/command/AcApCacheFontCmd.d.ts +25 -0
  40. package/lib/command/AcApCacheFontCmd.d.ts.map +1 -0
  41. package/lib/command/AcApCacheFontCmd.js +142 -0
  42. package/lib/command/AcApCacheFontCmd.js.map +1 -0
  43. package/lib/command/AcApOpenCmd.d.ts +3 -22
  44. package/lib/command/AcApOpenCmd.d.ts.map +1 -1
  45. package/lib/command/AcApOpenCmd.js +3 -22
  46. package/lib/command/AcApOpenCmd.js.map +1 -1
  47. package/lib/command/AcApRedoCmd.d.ts +10 -0
  48. package/lib/command/AcApRedoCmd.d.ts.map +1 -0
  49. package/lib/command/AcApRedoCmd.js +85 -0
  50. package/lib/command/AcApRedoCmd.js.map +1 -0
  51. package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
  52. package/lib/command/AcApSysVarCmd.js +5 -11
  53. package/lib/command/AcApSysVarCmd.js.map +1 -1
  54. package/lib/command/AcApUndoCmd.d.ts +10 -0
  55. package/lib/command/AcApUndoCmd.d.ts.map +1 -0
  56. package/lib/command/AcApUndoCmd.js +85 -0
  57. package/lib/command/AcApUndoCmd.js.map +1 -0
  58. package/lib/command/convert/AcApPngConvertor.d.ts +1 -1
  59. package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
  60. package/lib/command/convert/AcApPngConvertor.js +5 -2
  61. package/lib/command/convert/AcApPngConvertor.js.map +1 -1
  62. package/lib/command/draw/AcApArcCmd.d.ts.map +1 -1
  63. package/lib/command/draw/AcApArcCmd.js +2 -5
  64. package/lib/command/draw/AcApArcCmd.js.map +1 -1
  65. package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
  66. package/lib/command/draw/AcApEllipseCmd.js +14 -9
  67. package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
  68. package/lib/command/draw/AcApHatchCmd.d.ts +1 -1
  69. package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
  70. package/lib/command/draw/AcApLineCmd.js +8 -2
  71. package/lib/command/draw/AcApLineCmd.js.map +1 -1
  72. package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
  73. package/lib/command/draw/AcApMLineCmd.js +4 -2
  74. package/lib/command/draw/AcApMLineCmd.js.map +1 -1
  75. package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -1
  76. package/lib/command/draw/AcApPolygonCmd.js +2 -5
  77. package/lib/command/draw/AcApPolygonCmd.js.map +1 -1
  78. package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
  79. package/lib/command/draw/AcApPolylineCmd.js +3 -0
  80. package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
  81. package/lib/command/draw/AcApRectCmd.d.ts +6 -0
  82. package/lib/command/draw/AcApRectCmd.d.ts.map +1 -1
  83. package/lib/command/draw/AcApRectCmd.js +12 -10
  84. package/lib/command/draw/AcApRectCmd.js.map +1 -1
  85. package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
  86. package/lib/command/draw/AcApSplineCmd.js +2 -0
  87. package/lib/command/draw/AcApSplineCmd.js.map +1 -1
  88. package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -1
  89. package/lib/command/draw/AcApXLineCmd.js +1 -1
  90. package/lib/command/draw/AcApXLineCmd.js.map +1 -1
  91. package/lib/command/index.d.ts +3 -0
  92. package/lib/command/index.d.ts.map +1 -1
  93. package/lib/command/index.js +3 -0
  94. package/lib/command/index.js.map +1 -1
  95. package/lib/command/layer/AcApLayerCmd.d.ts +3 -194
  96. package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
  97. package/lib/command/layer/AcApLayerCmd.js +64 -398
  98. package/lib/command/layer/AcApLayerCmd.js.map +1 -1
  99. package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -34
  100. package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
  101. package/lib/command/layer/AcApLayerCurCmd.js +18 -77
  102. package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
  103. package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -32
  104. package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
  105. package/lib/command/layer/AcApLayerDelCmd.js +26 -169
  106. package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
  107. package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -16
  108. package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
  109. package/lib/command/layer/AcApLayerFreezeCmd.js +32 -54
  110. package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
  111. package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -31
  112. package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
  113. package/lib/command/layer/AcApLayerIsoCmd.js +19 -198
  114. package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
  115. package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -40
  116. package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
  117. package/lib/command/layer/AcApLayerLockCmd.js +18 -65
  118. package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
  119. package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
  120. package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
  121. package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
  122. package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
  123. package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -9
  124. package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
  125. package/lib/command/layer/AcApLayerOffCmd.js +32 -43
  126. package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
  127. package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -22
  128. package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
  129. package/lib/command/layer/AcApLayerOnCmd.js +8 -62
  130. package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
  131. package/lib/command/layer/AcApLayerPCmd.d.ts +2 -75
  132. package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
  133. package/lib/command/layer/AcApLayerPCmd.js +6 -165
  134. package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
  135. package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -29
  136. package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
  137. package/lib/command/layer/AcApLayerThawCmd.js +8 -74
  138. package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
  139. package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -44
  140. package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
  141. package/lib/command/layer/AcApLayerUnisoCmd.js +10 -122
  142. package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
  143. package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -40
  144. package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
  145. package/lib/command/layer/AcApLayerUnlockCmd.js +18 -65
  146. package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
  147. package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
  148. package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
  149. package/lib/command/modify/AcApCopyCmd.js +67 -177
  150. package/lib/command/modify/AcApCopyCmd.js.map +1 -1
  151. package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
  152. package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
  153. package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
  154. package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
  155. package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
  156. package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
  157. package/lib/command/modify/AcApEraseCmd.js +11 -38
  158. package/lib/command/modify/AcApEraseCmd.js.map +1 -1
  159. package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
  160. package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
  161. package/lib/command/modify/AcApHideObjectsCmd.js +1 -8
  162. package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
  163. package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
  164. package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
  165. package/lib/command/modify/AcApMoveCmd.js +26 -105
  166. package/lib/command/modify/AcApMoveCmd.js.map +1 -1
  167. package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
  168. package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
  169. package/lib/command/modify/AcApMovePreviewJig.js +45 -0
  170. package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
  171. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
  172. package/lib/command/modify/AcApOffsetCmd.js +14 -37
  173. package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
  174. package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
  175. package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
  176. package/lib/command/modify/AcApRotateCmd.js +38 -204
  177. package/lib/command/modify/AcApRotateCmd.js.map +1 -1
  178. package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
  179. package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
  180. package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
  181. package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
  182. package/lib/command/modify/AcApUnisolateObjectsCmd.d.ts.map +1 -1
  183. package/lib/command/modify/AcApUnisolateObjectsCmd.js +3 -3
  184. package/lib/command/modify/AcApUnisolateObjectsCmd.js.map +1 -1
  185. package/lib/editor/command/AcEdCommand.d.ts +24 -0
  186. package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
  187. package/lib/editor/command/AcEdCommand.js +71 -5
  188. package/lib/editor/command/AcEdCommand.js.map +1 -1
  189. package/lib/editor/global/AcEdUiColor.d.ts +13 -13
  190. package/lib/editor/global/AcEdUiColor.d.ts.map +1 -1
  191. package/lib/editor/global/AcEdUiColor.js +21 -20
  192. package/lib/editor/global/AcEdUiColor.js.map +1 -1
  193. package/lib/editor/global/eventBus.d.ts +16 -2
  194. package/lib/editor/global/eventBus.d.ts.map +1 -1
  195. package/lib/editor/global/eventBus.js.map +1 -1
  196. package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
  197. package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
  198. package/lib/editor/grip/AcEdGripAppearance.js +30 -0
  199. package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
  200. package/lib/editor/grip/AcEdGripEditSession.d.ts +29 -0
  201. package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -0
  202. package/lib/editor/grip/AcEdGripEditSession.js +83 -0
  203. package/lib/editor/grip/AcEdGripEditSession.js.map +1 -0
  204. package/lib/editor/grip/AcEdGripHandle.d.ts +21 -0
  205. package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -0
  206. package/lib/editor/grip/AcEdGripHandle.js +62 -0
  207. package/lib/editor/grip/AcEdGripHandle.js.map +1 -0
  208. package/lib/editor/grip/AcEdGripManager.d.ts +171 -0
  209. package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -0
  210. package/lib/editor/grip/AcEdGripManager.js +376 -0
  211. package/lib/editor/grip/AcEdGripManager.js.map +1 -0
  212. package/lib/editor/grip/AcEdGripPolicy.d.ts +6 -0
  213. package/lib/editor/grip/AcEdGripPolicy.d.ts.map +1 -0
  214. package/lib/editor/grip/AcEdGripPolicy.js +30 -0
  215. package/lib/editor/grip/AcEdGripPolicy.js.map +1 -0
  216. package/lib/editor/grip/AcEdGripPreviewJig.d.ts +21 -0
  217. package/lib/editor/grip/AcEdGripPreviewJig.d.ts.map +1 -0
  218. package/lib/editor/grip/AcEdGripPreviewJig.js +73 -0
  219. package/lib/editor/grip/AcEdGripPreviewJig.js.map +1 -0
  220. package/lib/editor/grip/index.d.ts +5 -0
  221. package/lib/editor/grip/index.d.ts.map +1 -0
  222. package/lib/editor/grip/index.js +5 -0
  223. package/lib/editor/grip/index.js.map +1 -0
  224. package/lib/editor/index.d.ts +1 -0
  225. package/lib/editor/index.d.ts.map +1 -1
  226. package/lib/editor/index.js +1 -0
  227. package/lib/editor/index.js.map +1 -1
  228. package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
  229. package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
  230. package/lib/editor/input/AcEdBatchPreview.js +125 -0
  231. package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
  232. package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
  233. package/lib/editor/input/AcEdCursorManager.js +2 -2
  234. package/lib/editor/input/AcEdCursorManager.js.map +1 -1
  235. package/lib/editor/input/AcEdOsnapResolver.d.ts +34 -0
  236. package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -0
  237. package/lib/editor/input/AcEdOsnapResolver.js +117 -0
  238. package/lib/editor/input/AcEdOsnapResolver.js.map +1 -0
  239. package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
  240. package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
  241. package/lib/editor/input/AcEdPreviewJig.js +14 -0
  242. package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
  243. package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
  244. package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
  245. package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
  246. package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
  247. package/lib/editor/input/handler/AcEdAngleHandler.d.ts +2 -1
  248. package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -1
  249. package/lib/editor/input/handler/AcEdAngleHandler.js +6 -0
  250. package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -1
  251. package/lib/editor/input/handler/AcEdInputHandler.d.ts +20 -1
  252. package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -1
  253. package/lib/editor/input/handler/AcEdKeywordHandler.d.ts +2 -1
  254. package/lib/editor/input/handler/AcEdKeywordHandler.d.ts.map +1 -1
  255. package/lib/editor/input/handler/AcEdKeywordHandler.js +3 -0
  256. package/lib/editor/input/handler/AcEdKeywordHandler.js.map +1 -1
  257. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +2 -1
  258. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -1
  259. package/lib/editor/input/handler/AcEdNumericalHandler.js +6 -0
  260. package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -1
  261. package/lib/editor/input/handler/AcEdPointHandler.d.ts +17 -1
  262. package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -1
  263. package/lib/editor/input/handler/AcEdPointHandler.js +89 -0
  264. package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -1
  265. package/lib/editor/input/handler/AcEdStringHandler.d.ts +2 -1
  266. package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -1
  267. package/lib/editor/input/handler/AcEdStringHandler.js +3 -0
  268. package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -1
  269. package/lib/editor/input/index.d.ts +3 -0
  270. package/lib/editor/input/index.d.ts.map +1 -1
  271. package/lib/editor/input/index.js +3 -0
  272. package/lib/editor/input/index.js.map +1 -1
  273. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
  274. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
  275. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
  276. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
  277. package/lib/editor/input/session/AcEdInputSession.d.ts +11 -1
  278. package/lib/editor/input/session/AcEdInputSession.d.ts.map +1 -1
  279. package/lib/editor/input/session/AcEdInputSession.js.map +1 -1
  280. package/lib/editor/input/session/AcEdPromptInputSession.d.ts +51 -0
  281. package/lib/editor/input/session/AcEdPromptInputSession.d.ts.map +1 -0
  282. package/lib/editor/input/session/AcEdPromptInputSession.js +109 -0
  283. package/lib/editor/input/session/AcEdPromptInputSession.js.map +1 -0
  284. package/lib/editor/input/session/index.d.ts +1 -0
  285. package/lib/editor/input/session/index.d.ts.map +1 -1
  286. package/lib/editor/input/session/index.js +1 -0
  287. package/lib/editor/input/session/index.js.map +1 -1
  288. package/lib/editor/input/ui/AcEdCommandLine.d.ts +10 -0
  289. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  290. package/lib/editor/input/ui/AcEdCommandLine.js +67 -35
  291. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  292. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +0 -11
  293. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  294. package/lib/editor/input/ui/AcEdFloatingInput.js +9 -119
  295. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  296. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
  297. package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
  298. package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
  299. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
  300. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
  301. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
  302. package/lib/editor/input/ui/AcEdInputManager.d.ts +26 -23
  303. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  304. package/lib/editor/input/ui/AcEdInputManager.js +135 -83
  305. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  306. package/lib/editor/input/ui/AcEdMTextEditor.js +2 -2
  307. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
  308. package/lib/editor/view/AcEdBaseView.d.ts +44 -2
  309. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  310. package/lib/editor/view/AcEdBaseView.js +26 -12
  311. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  312. package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
  313. package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
  314. package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
  315. package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
  316. package/lib/i18n/AcApI18n.d.ts +42 -0
  317. package/lib/i18n/AcApI18n.d.ts.map +1 -1
  318. package/lib/i18n/AcApI18n.js +56 -4
  319. package/lib/i18n/AcApI18n.js.map +1 -1
  320. package/lib/i18n/en/command.d.ts +26 -0
  321. package/lib/i18n/en/command.d.ts.map +1 -1
  322. package/lib/i18n/en/command.js +26 -0
  323. package/lib/i18n/en/command.js.map +1 -1
  324. package/lib/i18n/en/jig.d.ts +26 -0
  325. package/lib/i18n/en/jig.d.ts.map +1 -1
  326. package/lib/i18n/en/jig.js +134 -108
  327. package/lib/i18n/en/jig.js.map +1 -1
  328. package/lib/i18n/en/main.d.ts +3 -0
  329. package/lib/i18n/en/main.d.ts.map +1 -1
  330. package/lib/i18n/en/main.js +4 -1
  331. package/lib/i18n/en/main.js.map +1 -1
  332. package/lib/i18n/zh/command.d.ts +26 -0
  333. package/lib/i18n/zh/command.d.ts.map +1 -1
  334. package/lib/i18n/zh/command.js +26 -0
  335. package/lib/i18n/zh/command.js.map +1 -1
  336. package/lib/i18n/zh/jig.d.ts +26 -0
  337. package/lib/i18n/zh/jig.d.ts.map +1 -1
  338. package/lib/i18n/zh/jig.js +134 -108
  339. package/lib/i18n/zh/jig.js.map +1 -1
  340. package/lib/i18n/zh/main.d.ts +3 -0
  341. package/lib/i18n/zh/main.d.ts.map +1 -1
  342. package/lib/i18n/zh/main.js +4 -1
  343. package/lib/i18n/zh/main.js.map +1 -1
  344. package/lib/index.d.ts +1 -0
  345. package/lib/index.d.ts.map +1 -1
  346. package/lib/index.js +1 -0
  347. package/lib/index.js.map +1 -1
  348. package/lib/plugin/AcApLazyPluginRegistration.d.ts +3 -8
  349. package/lib/plugin/AcApLazyPluginRegistration.d.ts.map +1 -1
  350. package/lib/service/AcApEntitySelection.d.ts +42 -0
  351. package/lib/service/AcApEntitySelection.d.ts.map +1 -0
  352. package/lib/service/AcApEntitySelection.js +156 -0
  353. package/lib/service/AcApEntitySelection.js.map +1 -0
  354. package/lib/service/AcApEntityService.d.ts +115 -0
  355. package/lib/service/AcApEntityService.d.ts.map +1 -0
  356. package/lib/service/AcApEntityService.js +194 -0
  357. package/lib/service/AcApEntityService.js.map +1 -0
  358. package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
  359. package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
  360. package/lib/service/AcApLayerIsoState.js +28 -0
  361. package/lib/service/AcApLayerIsoState.js.map +1 -0
  362. package/lib/service/AcApLayerService.d.ts +400 -0
  363. package/lib/service/AcApLayerService.d.ts.map +1 -0
  364. package/lib/service/AcApLayerService.js +1240 -0
  365. package/lib/service/AcApLayerService.js.map +1 -0
  366. package/lib/service/AcApLayerStore.d.ts +198 -0
  367. package/lib/service/AcApLayerStore.d.ts.map +1 -0
  368. package/lib/service/AcApLayerStore.js +335 -0
  369. package/lib/service/AcApLayerStore.js.map +1 -0
  370. package/lib/service/AcApServiceEdit.d.ts +18 -0
  371. package/lib/service/AcApServiceEdit.d.ts.map +1 -0
  372. package/lib/service/AcApServiceEdit.js +34 -0
  373. package/lib/service/AcApServiceEdit.js.map +1 -0
  374. package/lib/service/index.d.ts +16 -0
  375. package/lib/service/index.d.ts.map +1 -0
  376. package/lib/service/index.js +16 -0
  377. package/lib/service/index.js.map +1 -0
  378. package/lib/service/types.d.ts +116 -0
  379. package/lib/service/types.d.ts.map +1 -0
  380. package/lib/service/types.js +5 -0
  381. package/lib/service/types.js.map +1 -0
  382. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +22 -7
  383. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  384. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +58 -12
  385. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  386. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
  387. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
  388. package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
  389. package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
  390. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
  391. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
  392. package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
  393. package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
  394. package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
  395. package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
  396. package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
  397. package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
  398. package/lib/util/AcApDatabaseEdit.d.ts +11 -0
  399. package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
  400. package/lib/util/AcApDatabaseEdit.js +20 -0
  401. package/lib/util/AcApDatabaseEdit.js.map +1 -0
  402. package/lib/util/AcApFontUtil.d.ts +14 -2
  403. package/lib/util/AcApFontUtil.d.ts.map +1 -1
  404. package/lib/util/AcApFontUtil.js +18 -0
  405. package/lib/util/AcApFontUtil.js.map +1 -1
  406. package/lib/util/AcApGeTransform.d.ts +10 -0
  407. package/lib/util/AcApGeTransform.d.ts.map +1 -0
  408. package/lib/util/AcApGeTransform.js +15 -0
  409. package/lib/util/AcApGeTransform.js.map +1 -0
  410. package/lib/util/index.d.ts +2 -0
  411. package/lib/util/index.d.ts.map +1 -1
  412. package/lib/util/index.js +2 -0
  413. package/lib/util/index.js.map +1 -1
  414. package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
  415. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
  416. package/lib/view/AcEdViewKeyHandler.js +101 -0
  417. package/lib/view/AcEdViewKeyHandler.js.map +1 -0
  418. package/lib/view/AcTrEntityDisplayController.d.ts +46 -0
  419. package/lib/view/AcTrEntityDisplayController.d.ts.map +1 -0
  420. package/lib/view/AcTrEntityDisplayController.js +114 -0
  421. package/lib/view/AcTrEntityDisplayController.js.map +1 -0
  422. package/lib/view/AcTrGroupWcsBboxAssert.d.ts +43 -0
  423. package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -0
  424. package/lib/view/AcTrGroupWcsBboxAssert.js +84 -0
  425. package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -0
  426. package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
  427. package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
  428. package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
  429. package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
  430. package/lib/view/AcTrLayer.d.ts +33 -2
  431. package/lib/view/AcTrLayer.d.ts.map +1 -1
  432. package/lib/view/AcTrLayer.js +75 -2
  433. package/lib/view/AcTrLayer.js.map +1 -1
  434. package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
  435. package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
  436. package/lib/view/AcTrLayerAppearanceController.js +86 -0
  437. package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
  438. package/lib/view/AcTrLayout.d.ts +37 -2
  439. package/lib/view/AcTrLayout.d.ts.map +1 -1
  440. package/lib/view/AcTrLayout.js +161 -15
  441. package/lib/view/AcTrLayout.js.map +1 -1
  442. package/lib/view/AcTrProgressiveOpenFitController.d.ts +64 -0
  443. package/lib/view/AcTrProgressiveOpenFitController.d.ts.map +1 -0
  444. package/lib/view/AcTrProgressiveOpenFitController.js +209 -0
  445. package/lib/view/AcTrProgressiveOpenFitController.js.map +1 -0
  446. package/lib/view/AcTrScene.d.ts +47 -1
  447. package/lib/view/AcTrScene.d.ts.map +1 -1
  448. package/lib/view/AcTrScene.js +78 -3
  449. package/lib/view/AcTrScene.js.map +1 -1
  450. package/lib/view/AcTrView2d.d.ts +118 -27
  451. package/lib/view/AcTrView2d.d.ts.map +1 -1
  452. package/lib/view/AcTrView2d.js +584 -362
  453. package/lib/view/AcTrView2d.js.map +1 -1
  454. package/lib/view/index.d.ts +3 -0
  455. package/lib/view/index.d.ts.map +1 -1
  456. package/lib/view/index.js +3 -0
  457. package/lib/view/index.js.map +1 -1
  458. package/package.json +13 -11
  459. package/dist/index.umd.cjs +0 -897
  460. package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
  461. package/lib/command/layer/AcApLayerIsoState.js +0 -53
  462. package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ import { acapRunDatabaseEdit } from '../util/AcApDatabaseEdit';
2
+ /** Default undo label for layer table edits. */
3
+ export var LAYER_EDIT_LABEL = 'Layer';
4
+ /** Default undo label for entity edits outside commands. */
5
+ export var ENTITY_EDIT_LABEL = 'Entity';
6
+ /**
7
+ * Runs a database mutation with undo support when not already inside a command transaction.
8
+ *
9
+ * When a command has started an undo transaction via {@link AcEdCommand.trigger},
10
+ * the callback runs directly to avoid nested undo marks.
11
+ *
12
+ * @param db - Database to mutate.
13
+ * @param label - Undo group label shown in the undo stack.
14
+ * @param fn - Mutation callback.
15
+ * @returns The value returned by `fn`.
16
+ */
17
+ export function acapRunServiceEdit(db, label, fn) {
18
+ var _a;
19
+ if ((_a = db.transactionManager) === null || _a === void 0 ? void 0 : _a.hasTransaction()) {
20
+ return fn();
21
+ }
22
+ if (typeof db.runDatabaseEdit !== 'function') {
23
+ if (process.env.NODE_ENV !== 'production') {
24
+ console.warn("[cad-simple-viewer] acapRunServiceEdit(\"".concat(label, "\"): database.runDatabaseEdit is unavailable; mutation ran without undo support."));
25
+ }
26
+ return fn();
27
+ }
28
+ var result;
29
+ acapRunDatabaseEdit(db, label, function () {
30
+ result = fn();
31
+ });
32
+ return result;
33
+ }
34
+ //# sourceMappingURL=AcApServiceEdit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApServiceEdit.js","sourceRoot":"","sources":["../../src/service/AcApServiceEdit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,gDAAgD;AAChD,MAAM,CAAC,IAAM,gBAAgB,GAAG,OAAO,CAAA;AAEvC,4DAA4D;AAC5D,MAAM,CAAC,IAAM,iBAAiB,GAAG,QAAQ,CAAA;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,EAAgB,EAChB,KAAa,EACb,EAAW;;IAEX,IAAI,MAAA,EAAE,CAAC,kBAAkB,0CAAE,cAAc,EAAE,EAAE,CAAC;QAC5C,OAAO,EAAE,EAAE,CAAA;IACb,CAAC;IAED,IAAI,OAAO,EAAE,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;QAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CACV,mDAA2C,KAAK,qFAAiF,CAClI,CAAA;QACH,CAAC;QACD,OAAO,EAAE,EAAE,CAAA;IACb,CAAC;IAED,IAAI,MAAU,CAAA;IACd,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE;QAC7B,MAAM,GAAG,EAAE,EAAE,CAAA;IACf,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Application services for layer and entity mutations outside command classes.
3
+ *
4
+ * Re-exports layer table helpers ({@link AcApLayerService}), document-scoped
5
+ * layer UI store ({@link AcApLayerStore}), entity helpers
6
+ * ({@link AcApEntityService}), isolation snapshot helpers ({@link getLayerIsoState}),
7
+ * and shared edit/undo utilities ({@link acapRunServiceEdit}).
8
+ */
9
+ export * from './AcApServiceEdit';
10
+ export * from './AcApLayerIsoState';
11
+ export * from './AcApLayerService';
12
+ export * from './AcApLayerStore';
13
+ export * from './AcApEntityService';
14
+ export * from './AcApEntitySelection';
15
+ export * from './types';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Application services for layer and entity mutations outside command classes.
3
+ *
4
+ * Re-exports layer table helpers ({@link AcApLayerService}), document-scoped
5
+ * layer UI store ({@link AcApLayerStore}), entity helpers
6
+ * ({@link AcApEntityService}), isolation snapshot helpers ({@link getLayerIsoState}),
7
+ * and shared edit/undo utilities ({@link acapRunServiceEdit}).
8
+ */
9
+ export * from './AcApServiceEdit';
10
+ export * from './AcApLayerIsoState';
11
+ export * from './AcApLayerService';
12
+ export * from './AcApLayerStore';
13
+ export * from './AcApEntityService';
14
+ export * from './AcApEntitySelection';
15
+ export * from './types';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,116 @@
1
+ /** Bit mask for the global frozen flag in layer `standardFlags`. */
2
+ export declare const LAYER_FROZEN_FLAG = 1;
3
+ /** Bit mask for the locked flag in layer `standardFlags`. */
4
+ export declare const LAYER_LOCKED_FLAG = 4;
5
+ /**
6
+ * Options for {@link AcApLayerService.setLayerOn} and
7
+ * {@link AcApLayerService.setLayerFrozen}.
8
+ */
9
+ export interface AcApSetLayerOnOptions {
10
+ /**
11
+ * When turning off or freezing the current layer, switch `CLAYER` to another
12
+ * layer first.
13
+ *
14
+ * - CLI commands default to `false` and skip the current layer in batch ops.
15
+ * - UI callers ({@link AcApLayerStore}, Vue `useLayers`) default to `true`
16
+ * so the user can hide or freeze the active layer without leaving drawing
17
+ * on a hidden/frozen layer.
18
+ */
19
+ switchCurrentLayer?: boolean;
20
+ }
21
+ /**
22
+ * Options for batch layer on/off and freeze/thaw operations.
23
+ */
24
+ export interface AcApSetLayersVisibilityOptions {
25
+ /**
26
+ * Skip turning off or freezing the current layer.
27
+ * Default `true`.
28
+ */
29
+ skipCurrentLayer?: boolean;
30
+ }
31
+ /**
32
+ * Isolation mode for the `LAYISO` command.
33
+ *
34
+ * - `Off` — non-isolated layers are turned off.
35
+ * - `LockAndFade` — non-isolated layers are locked only. The viewer does not
36
+ * apply a visual fade; the keyword matches AutoCAD for parity. Users are
37
+ * notified via `jig.layiso.lockFadeFallback` when this mode is selected.
38
+ */
39
+ export type AcApLayerIsolationMode = 'Off' | 'LockAndFade';
40
+ /**
41
+ * Result of isolating layers via `LAYISO`.
42
+ */
43
+ export interface AcApLayerIsolateResult {
44
+ /** Names of layers that were isolated (kept visible). */
45
+ layerNames: string[];
46
+ /** Number of layers whose on, frozen, or locked state changed. */
47
+ affectedLayerCount: number;
48
+ }
49
+ /**
50
+ * Snapshot of a deleted entity used by `LAYDEL` session undo.
51
+ */
52
+ export interface AcApLaydelEntitySnapshot {
53
+ /** Object id of the block table record that owned the entity. */
54
+ ownerId: import('@mlightcad/data-model').AcDbObjectId;
55
+ /** Object id of the erased entity. */
56
+ objectId: import('@mlightcad/data-model').AcDbObjectId;
57
+ /** Cloned entity data for restoration. */
58
+ entity: import('@mlightcad/data-model').AcDbEntity;
59
+ }
60
+ /**
61
+ * Result of attempting to delete a layer.
62
+ *
63
+ * On success, includes the deleted layer record and entity snapshots for undo.
64
+ * On failure, includes a reason code and the requested layer name.
65
+ */
66
+ export type AcApDeleteLayerResult = {
67
+ /** Operation succeeded. */
68
+ ok: true;
69
+ /** Name of the deleted layer. */
70
+ layerName: string;
71
+ /** Cloned layer table record before removal. */
72
+ layer: import('@mlightcad/data-model').AcDbLayerTableRecord;
73
+ /** Entity snapshots removed with the layer. */
74
+ entities: AcApLaydelEntitySnapshot[];
75
+ } | {
76
+ /** Operation failed. */
77
+ ok: false;
78
+ /**
79
+ * Failure reason:
80
+ * - `not_found` — layer does not exist.
81
+ * - `layer_0` — layer `0` cannot be deleted.
82
+ * - `current_layer` — current layer cannot be deleted.
83
+ */
84
+ reason: 'not_found' | 'layer_0' | 'current_layer';
85
+ /** Name of the layer that could not be deleted. */
86
+ layerName: string;
87
+ };
88
+ /**
89
+ * Outcome of entity-driven layer operations (`LAYFRZ`, `LAYOFF`, `LAYLCK`, etc.).
90
+ */
91
+ export type AcApLayerByEntityResult = {
92
+ /** Operation succeeded. */
93
+ ok: true;
94
+ /** Name of the affected layer. */
95
+ layerName: string;
96
+ /** Frozen state before the operation, when applicable. */
97
+ previousFrozen?: boolean;
98
+ /** Off state before the operation, when applicable. */
99
+ previousOff?: boolean;
100
+ /** Locked state before the operation, when applicable. */
101
+ previousLocked?: boolean;
102
+ } | {
103
+ /** Operation failed or was a no-op. */
104
+ ok: false;
105
+ /**
106
+ * Failure reason:
107
+ * - `invalid_selection` — entity id does not resolve to a layer.
108
+ * - `layer_not_found` — entity layer is missing from the layer table.
109
+ * - `cannot_change_current` — current layer cannot be changed.
110
+ * - `already_frozen` / `already_off` / `already_locked` / `already_unlocked`.
111
+ */
112
+ reason: 'invalid_selection' | 'layer_not_found' | 'cannot_change_current' | 'already_frozen' | 'already_off' | 'already_locked' | 'already_unlocked';
113
+ /** Name of the layer involved, when known. */
114
+ layerName?: string;
115
+ };
116
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/service/types.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,IAAO,CAAA;AAErC,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,IAAO,CAAA;AAErC;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,aAAa,CAAA;AAE1D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,UAAU,EAAE,MAAM,EAAE,CAAA;IAEpB,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,iEAAiE;IACjE,OAAO,EAAE,OAAO,uBAAuB,EAAE,YAAY,CAAA;IAErD,sCAAsC;IACtC,QAAQ,EAAE,OAAO,uBAAuB,EAAE,YAAY,CAAA;IAEtD,0CAA0C;IAC1C,MAAM,EAAE,OAAO,uBAAuB,EAAE,UAAU,CAAA;CACnD;AAED;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IACE,2BAA2B;IAC3B,EAAE,EAAE,IAAI,CAAA;IACR,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,gDAAgD;IAChD,KAAK,EAAE,OAAO,uBAAuB,EAAE,oBAAoB,CAAA;IAC3D,+CAA+C;IAC/C,QAAQ,EAAE,wBAAwB,EAAE,CAAA;CACrC,GACD;IACE,wBAAwB;IACxB,EAAE,EAAE,KAAK,CAAA;IACT;;;;;OAKG;IACH,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,eAAe,CAAA;IACjD,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAEL;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IACE,2BAA2B;IAC3B,EAAE,EAAE,IAAI,CAAA;IACR,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uDAAuD;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GACD;IACE,uCAAuC;IACvC,EAAE,EAAE,KAAK,CAAA;IACT;;;;;;OAMG;IACH,MAAM,EACF,mBAAmB,GACnB,iBAAiB,GACjB,uBAAuB,GACvB,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,kBAAkB,CAAA;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA"}
@@ -0,0 +1,5 @@
1
+ /** Bit mask for the global frozen flag in layer `standardFlags`. */
2
+ export var LAYER_FROZEN_FLAG = 0x01;
3
+ /** Bit mask for the locked flag in layer `standardFlags`. */
4
+ export var LAYER_LOCKED_FLAG = 0x04;
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/service/types.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,CAAC,IAAM,iBAAiB,GAAG,IAAI,CAAA;AAErC,6DAA6D;AAC7D,MAAM,CAAC,IAAM,iBAAiB,GAAG,IAAI,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { AcDbObjectId } from '@mlightcad/data-model';
2
2
  import { AcTrGroup } from '@mlightcad/three-renderer';
3
- import { AcEdSpatialQueryResultItem, AcEdSpatialQueryResultItemEx } from '../editor/view';
4
- import { AcTrSpatialIndex, AcTrSpatialIndexBBox } from './AcTrSpatialIndex';
3
+ import { AcEdSpatialQueryResultItem, AcEdSpatialQueryResultItemEx } from '../editor/view/AcEdSpatialQueryResult';
4
+ import { AcTrSpatialIndex, AcTrSpatialIndexBBox, AcTrSpatialSearchOptions } from './AcTrSpatialIndex';
5
5
  /**
6
6
  * A two-level (hierarchical) spatial index designed for complex CAD
7
7
  * scene structures such as blocks, groups, layers, or nested entities.
@@ -110,13 +110,27 @@ export declare class AcTrHierarchicalSpatialIndex implements AcTrSpatialIndex {
110
110
  * 1. Search the root index for candidate hits.
111
111
  * 2. For each hit:
112
112
  * - if no child index exists, return the root-level hit directly;
113
- * - if a child index exists, search the child and attach results under
114
- * `children`.
113
+ * - if a child index exists, search the child and attach intersecting
114
+ * results under `children`;
115
+ * - when a child index exists but no child box intersects the query,
116
+ * `children` is an empty array; callers that resolve selection or pick
117
+ * should filter with {@link isEffectiveSpatialQueryHit}.
115
118
  *
116
119
  * @param bbox Query bounding box.
120
+ * @param options Optional query semantics. With `selectionMode: 'window'`,
121
+ * block references that have a child index must have every indexed child
122
+ * fully inside {@link bbox}; other hits must have their root box fully
123
+ * inside {@link bbox}.
117
124
  * @returns Aggregated search results from both levels.
118
125
  */
119
- search(bbox: AcTrSpatialIndexBBox): AcEdSpatialQueryResultItemEx[];
126
+ search(bbox: AcTrSpatialIndexBBox, options?: AcTrSpatialSearchOptions): AcEdSpatialQueryResultItemEx[];
127
+ /**
128
+ * Window-selection containment for one hierarchical hit.
129
+ *
130
+ * INSERT entities with a child index are contained only when every finite
131
+ * indexed child lies inside the pick box, not when a coarse root bbox fits.
132
+ */
133
+ private isWindowSelectionHit;
120
134
  /**
121
135
  * Tests whether any indexed item collides with the given bounding box.
122
136
  *
@@ -150,7 +164,8 @@ export declare class AcTrHierarchicalSpatialIndex implements AcTrSpatialIndex {
150
164
  * Ensures a second-level index exists for a root id and optionally initializes it.
151
165
  *
152
166
  * Behavior:
153
- * - if a child index already exists, it is returned as-is;
167
+ * - upserts the root index bbox to the union of `items`;
168
+ * - if a child index already exists, its items are replaced with `items`;
154
169
  * - otherwise an index type is selected by `items.length`;
155
170
  * - selected index is populated with `items`, stored, and returned.
156
171
  *
@@ -166,7 +181,7 @@ export declare class AcTrHierarchicalSpatialIndex implements AcTrSpatialIndex {
166
181
  * Creates or retrieves the child index for a group object.
167
182
  *
168
183
  * This is a convenience wrapper around `ensureChildIndex`, using the group's
169
- * `objectId` and `boxes` as id and initialization data.
184
+ * `objectId` and {@link AcTrGroup.wcsChildBoxes} as id and initialization data.
170
185
  *
171
186
  * @param group Group providing id and child box items.
172
187
  * @returns Existing or newly created child index, or `undefined` when empty.
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrHierarchicalSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrHierarchicalSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,4BAA6B,YAAW,gBAAgB;IACnE,MAAM,CAAC,SAAS,SAAM;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8C;IACxE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsC;IAEnE;;;;;;;;OAQG;gBACS,SAAS,CAAC,EAAE,gBAAgB,CAAC,0BAA0B,CAAC;IAIpE;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAIxD;;;;;;OAMG;IACH,gBAAgB,CAAC,EA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ACH,aAAa,CAAC,EAAE,EAAE,YAAY;IAI9B;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CACd,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,SAAS,0BAA0B,EAAE;IA2B9C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,KAAK,EAAE,SAAS;IAIjC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,iBAAiB;CAS1B"}
@@ -45,8 +45,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
45
45
  }
46
46
  return to.concat(ar || Array.prototype.slice.call(from));
47
47
  };
48
+ import { unionSpatialQueryItems } from '../editor/view/AcEdSpatialQueryResult';
49
+ import { isFiniteSpatialBBox } from '../view/AcTrGroupWcsBboxAssert';
48
50
  import { AcTrLinearSpatialIndex } from './AcTrLinearSpatialIndex';
49
51
  import { AcTrRBushSpatialIndex } from './AcTrRBushSpatialIndex';
52
+ import { isSpatialBoxFullyInside } from './AcTrSpatialIndex';
50
53
  /**
51
54
  * A two-level (hierarchical) spatial index designed for complex CAD
52
55
  * scene structures such as blocks, groups, layers, or nested entities.
@@ -173,13 +176,20 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
173
176
  * 1. Search the root index for candidate hits.
174
177
  * 2. For each hit:
175
178
  * - if no child index exists, return the root-level hit directly;
176
- * - if a child index exists, search the child and attach results under
177
- * `children`.
179
+ * - if a child index exists, search the child and attach intersecting
180
+ * results under `children`;
181
+ * - when a child index exists but no child box intersects the query,
182
+ * `children` is an empty array; callers that resolve selection or pick
183
+ * should filter with {@link isEffectiveSpatialQueryHit}.
178
184
  *
179
185
  * @param bbox Query bounding box.
186
+ * @param options Optional query semantics. With `selectionMode: 'window'`,
187
+ * block references that have a child index must have every indexed child
188
+ * fully inside {@link bbox}; other hits must have their root box fully
189
+ * inside {@link bbox}.
180
190
  * @returns Aggregated search results from both levels.
181
191
  */
182
- AcTrHierarchicalSpatialIndex.prototype.search = function (bbox) {
192
+ AcTrHierarchicalSpatialIndex.prototype.search = function (bbox, options) {
183
193
  var e_1, _a;
184
194
  var level1 = this.rootIndex.search(bbox);
185
195
  var result = [];
@@ -188,11 +198,18 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
188
198
  var hit = level1_1_1.value;
189
199
  var child = this.childIndexes.get(hit.id);
190
200
  if (!child) {
191
- result.push(hit);
201
+ if ((options === null || options === void 0 ? void 0 : options.selectionMode) !== 'window' ||
202
+ isSpatialBoxFullyInside(hit, bbox)) {
203
+ result.push(hit);
204
+ }
192
205
  continue;
193
206
  }
194
207
  var level2 = child.search(bbox);
195
- result.push(__assign(__assign({}, hit), { children: level2 }));
208
+ var hitEx = __assign(__assign({}, hit), { children: level2 });
209
+ if ((options === null || options === void 0 ? void 0 : options.selectionMode) !== 'window' ||
210
+ this.isWindowSelectionHit(hitEx, bbox)) {
211
+ result.push(hitEx);
212
+ }
196
213
  }
197
214
  }
198
215
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -204,6 +221,23 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
204
221
  }
205
222
  return result;
206
223
  };
224
+ /**
225
+ * Window-selection containment for one hierarchical hit.
226
+ *
227
+ * INSERT entities with a child index are contained only when every finite
228
+ * indexed child lies inside the pick box, not when a coarse root bbox fits.
229
+ */
230
+ AcTrHierarchicalSpatialIndex.prototype.isWindowSelectionHit = function (hit, bbox) {
231
+ var child = this.childIndexes.get(hit.id);
232
+ if (!child) {
233
+ return isSpatialBoxFullyInside(hit, bbox);
234
+ }
235
+ var allChildren = child.all().filter(isFiniteSpatialBBox);
236
+ if (allChildren.length === 0) {
237
+ return false;
238
+ }
239
+ return allChildren.every(function (item) { return isSpatialBoxFullyInside(item, bbox); });
240
+ };
207
241
  /**
208
242
  * Tests whether any indexed item collides with the given bounding box.
209
243
  *
@@ -269,7 +303,8 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
269
303
  * Ensures a second-level index exists for a root id and optionally initializes it.
270
304
  *
271
305
  * Behavior:
272
- * - if a child index already exists, it is returned as-is;
306
+ * - upserts the root index bbox to the union of `items`;
307
+ * - if a child index already exists, its items are replaced with `items`;
273
308
  * - otherwise an index type is selected by `items.length`;
274
309
  * - selected index is populated with `items`, stored, and returned.
275
310
  *
@@ -281,13 +316,24 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
281
316
  * @returns Existing or newly created child index, or `undefined` for empty input.
282
317
  */
283
318
  AcTrHierarchicalSpatialIndex.prototype.ensureChildIndex = function (id, items) {
284
- if (this.hasChildIndex(id)) {
285
- return this.childIndexes.get(id);
319
+ var finiteItems = items.filter(isFiniteSpatialBBox);
320
+ if (finiteItems.length === 0) {
321
+ return undefined;
322
+ }
323
+ var rootBox = unionSpatialQueryItems(finiteItems, id);
324
+ if (isFiniteSpatialBBox(rootBox)) {
325
+ this.insert(rootBox);
326
+ }
327
+ var existing = this.childIndexes.get(id);
328
+ if (existing) {
329
+ existing.clear();
330
+ finiteItems.forEach(function (item) { return existing.insert(__assign({}, item)); });
331
+ return existing;
286
332
  }
287
- var spatialIndex = this.createIndexBySize(items.length);
333
+ var spatialIndex = this.createIndexBySize(finiteItems.length);
288
334
  if (!spatialIndex)
289
335
  return undefined;
290
- items.forEach(function (item) { return spatialIndex.insert(item); });
336
+ finiteItems.forEach(function (item) { return spatialIndex.insert(__assign({}, item)); });
291
337
  this.setChildIndex(id, spatialIndex);
292
338
  return spatialIndex;
293
339
  };
@@ -295,13 +341,13 @@ var AcTrHierarchicalSpatialIndex = /** @class */ (function () {
295
341
  * Creates or retrieves the child index for a group object.
296
342
  *
297
343
  * This is a convenience wrapper around `ensureChildIndex`, using the group's
298
- * `objectId` and `boxes` as id and initialization data.
344
+ * `objectId` and {@link AcTrGroup.wcsChildBoxes} as id and initialization data.
299
345
  *
300
346
  * @param group Group providing id and child box items.
301
347
  * @returns Existing or newly created child index, or `undefined` when empty.
302
348
  */
303
349
  AcTrHierarchicalSpatialIndex.prototype.createChildIndex = function (group) {
304
- return this.ensureChildIndex(group.objectId, group.boxes);
350
+ return this.ensureChildIndex(group.objectId, group.wcsChildBoxes);
305
351
  };
306
352
  /**
307
353
  * Chooses a child index implementation by item count.
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrHierarchicalSpatialIndex.js","sourceRoot":"","sources":["../../src/spatialIndex/AcTrHierarchicalSpatialIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAG/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH;IAKE;;;;;;;;OAQG;IACH,sCAAY,SAAwD;QAXnD,iBAAY,GAAG,IAAI,GAAG,EAA4B,CAAA;QAYjE,IAAI,CAAC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,qBAAqB,EAAE,CAAA;IAC3D,CAAC;IAED;;;;;;;;OAQG;IACH,oDAAa,GAAb,UAAc,EAAU,EAAE,KAAuB;QAC/C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IAClC,CAAC;IAED;;;;;;OAMG;IACH,uDAAgB,GAAhB,UAAiB,EAAU;QACzB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC9B,CAAC;IAED;;;;;;OAMG;IACH,6CAAM,GAAN,UAAO,IAAgC;QACrC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7B,CAAC;IAED;;;;;;OAMG;IACH,2CAAI,GAAJ,UAAK,KAA4C;QAC/C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAED;;;;;;;;OAQG;IACH,6CAAM,GAAN,UACE,IAAgC,EAChC,MAGY;QAEZ,IA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K,EAAE,CAAA;YAChB,WAAW,CAAC,OAAO,CAAC,UAAA,IAAI,IAAI,OAAA,QAAQ,CAAC,MAAM,cAAM,IAAI,EAAG,EAA5B,CAA4B,CAAC,CAAA;YACzD,OAAO,QAAQ,CAAA;QACjB,CAAC;QAED,IAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QAC/D,IAAI,CAAC,YAAY;YAAE,OAAO,SAAS,CAAA;QAEnC,WAAW,CAAC,OAAO,CAAC,UAAA,IAAI,IAAI,OAAA,YAAY,CAAC,MAAM,cAAM,IAAI,EAAG,EAAhC,CAAgC,CAAC,CAAA;QAC7D,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,YAAY,CAAC,CAAA;QACpC,OAAO,YAAY,CAAA;IACrB,CAAC;IAED;;;;;;;;OAQG;IACH,uDAAgB,GAAhB,UAAiB,KAAgB;QAC/B,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IACnE,CAAC;IAED;;;;;;;;;;OAUG;IACK,wDAAiB,GAAzB,UAA0B,IAAY;QACpC,IAAI,IAAI,GAAG,4BAA4B,CAAC,SAAS,EAAE,CAAC;YAClD,OAAO,IAAI,qBAAqB,EAAE,CAAA;QACpC,CAAC;QACD,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;YACb,OAAO,IAAI,sBAAsB,EAAE,CAAA;QACrC,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAxTM,sCAAS,GAAG,GAAG,AAAN,CAAM;IAyTxB,mCAAC;CAAA,AA1TD,IA0TC;SA1TY,4BAA4B"}
@@ -1,6 +1,6 @@
1
1
  import { AcDbObjectId } from '@mlightcad/data-model';
2
2
  import { AcEdSpatialQueryResultItem } from '../editor/view';
3
- import { AcTrSpatialIndex, AcTrSpatialIndexBBox } from './AcTrSpatialIndex';
3
+ import { AcTrSpatialIndex, AcTrSpatialIndexBBox, AcTrSpatialSearchOptions } from './AcTrSpatialIndex';
4
4
  /**
5
5
  * A simple spatial index implementation that performs linear scanning
6
6
  * over all stored bounding boxes.
@@ -30,7 +30,7 @@ export declare class AcTrLinearSpatialIndex implements AcTrSpatialIndex {
30
30
  remove(item: AcEdSpatialQueryResultItem): void;
31
31
  removeById(id: AcDbObjectId): void;
32
32
  clear(): void;
33
- search(bbox: AcTrSpatialIndexBBox): AcEdSpatialQueryResultItem[];
33
+ search(bbox: AcTrSpatialIndexBBox, options?: AcTrSpatialSearchOptions): AcEdSpatialQueryResultItem[];
34
34
  collides(bbox: AcTrSpatialIndexBBox): boolean;
35
35
  all(): AcEdSpatialQueryResultItem[];
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrLinearSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrLinearSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,sBAAuB,YAAW,gBAAgB;IAC7D,iCAAiC;IACjC,OAAO,CAAC,KAAK,CAAsD;IAEnE,MAAM,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAI9C,IAAI,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE,GAAG,IAAI;IAMxD,MAAM,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAI9C,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IAIlC,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,0BAA0B,EAAE;IAYhE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO;IAS7C,GAAG,IAAI,0BAA0B,EAAE;CAGpC"}
1
+ {"version":3,"file":"AcTrLinearSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrLinearSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,sBAAuB,YAAW,gBAAgB;IAC7D,iCAAiC;IACjC,OAAO,CAAC,KAAK,CAAsD;IAEnE,MAAM,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAI9C,IAAI,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE,GAAG,IAAI;IAMxD,MAAM,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAI9C,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IAIlC,KAAK,IAAI,IAAI;IAIb,MAAM,CACJ,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,wBAAwB,GACjC,0BAA0B,EAAE;IAmB/B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO;IAS7C,GAAG,IAAI,0BAA0B,EAAE;CAGpC"}
@@ -9,6 +9,7 @@ var __values = (this && this.__values) || function(o) {
9
9
  };
10
10
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
11
  };
12
+ import { isSpatialBoxFullyInside } from './AcTrSpatialIndex';
12
13
  /**
13
14
  * A simple spatial index implementation that performs linear scanning
14
15
  * over all stored bounding boxes.
@@ -63,15 +64,20 @@ var AcTrLinearSpatialIndex = /** @class */ (function () {
63
64
  AcTrLinearSpatialIndex.prototype.clear = function () {
64
65
  this.items.clear();
65
66
  };
66
- AcTrLinearSpatialIndex.prototype.search = function (bbox) {
67
+ AcTrLinearSpatialIndex.prototype.search = function (bbox, options) {
67
68
  var e_2, _a;
68
69
  var result = [];
69
70
  try {
70
71
  for (var _b = __values(this.items.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
71
72
  var item = _c.value;
72
- if (intersects(item, bbox)) {
73
- result.push(item);
73
+ if (!intersects(item, bbox)) {
74
+ continue;
75
+ }
76
+ if ((options === null || options === void 0 ? void 0 : options.selectionMode) === 'window' &&
77
+ !isSpatialBoxFullyInside(item, bbox)) {
78
+ continue;
74
79
  }
80
+ result.push(item);
75
81
  }
76
82
  }
77
83
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrLinearSpatialIndex.js","sourceRoot":"","sources":["../../src/spatialIndex/AcTrLinearSpatialIndex.ts"],"names":[],"mappings":";;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAAA;QACE,iCAAiC;QACzB,UAAK,GAAG,IAAI,GAAG,EAA4C,CAAA;IAgDrE,CAAC;IA9CC,uCAAM,GAAN,UAAO,IAAgC;QACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAC/B,CAAC;IAED,qCAAI,GAAJ,UAAK,KAA4C;;;YAC/C,KAAmB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE,CAAC;gBAAtB,IAAM,IAAI,kBAAA;gBACb,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;;;;;;;;;IACH,CAAC;IAED,uCAAM,GAAN,UAAO,IAAgC;QACrC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5B,CAAC;IAED,2CAAU,GAAV,UAAW,EAAgB;QACzB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;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AAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,MAAK,QAAQ;oBACnC,CAAC,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,EACpC,CAAC;oBACD,SAAQ;gBACV,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACnB,CAAC;;;;;;;;;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED,yCAAQ,GAAR,UAAS,IAA0B;;;YACjC,KAAmB,IAAA,KAAA,SAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA,gBAAA,4BAAE,CAAC;gBAApC,IAAM,IAAI,WAAA;gBACb,IAAI,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;oBAC3B,OAAO,IAAI,CAAA;gBACb,CAAC;YACH,CAAC;;;;;;;;;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,oCAAG,GAAH;QACE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;IACxC,CAAC;IACH,6BAAC;AAAD,CAAC,AA5DD,IA4DC;;AAED,SAAS,UAAU,CAAC,CAAuB,EAAE,CAAuB;IAClE,OAAO,CAAC,CACN,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAChB,CAAA;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { AcDbObjectId } from '@mlightcad/data-model';
2
2
  import { AcEdSpatialQueryResultItem } from '../editor/view';
3
- import { AcTrSpatialIndex, AcTrSpatialIndexBBox } from './AcTrSpatialIndex';
3
+ import { AcTrSpatialIndex, AcTrSpatialIndexBBox, AcTrSpatialSearchOptions } from './AcTrSpatialIndex';
4
4
  export declare class AcTrRBushSpatialIndex implements AcTrSpatialIndex {
5
5
  private readonly tree;
6
6
  private readonly idMap;
@@ -10,7 +10,7 @@ export declare class AcTrRBushSpatialIndex implements AcTrSpatialIndex {
10
10
  remove(item: AcEdSpatialQueryResultItem, equals?: (a: AcEdSpatialQueryResultItem, b: AcEdSpatialQueryResultItem) => boolean): void;
11
11
  removeById(id: AcDbObjectId): void;
12
12
  clear(): void;
13
- search(bbox: AcTrSpatialIndexBBox): AcEdSpatialQueryResultItem[];
13
+ search(bbox: AcTrSpatialIndexBBox, options?: AcTrSpatialSearchOptions): AcEdSpatialQueryResultItem[];
14
14
  collides(bbox: AcTrSpatialIndexBBox): boolean;
15
15
  all(): AcEdSpatialQueryResultItem[];
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrRBushSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrRBushSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE3E,qBAAa,qBAAsB,YAAW,gBAAgB;IAC5D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+C;gBAEzD,UAAU,CAAC,EAAE,MAAM;IAK/B,MAAM,CAAC,IAAI,EAAE,0BAA0B;IAOvC,IAAI,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE;IAIjD,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,MAAM,CAAC,EAAE,CACP,CAAC,EAAE,0BAA0B,EAC7B,CAAC,EAAE,0BAA0B,KAC1B,OAAO,GACX,IAAI;IAKP,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IAelC,KAAK;IAKL,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,0BAA0B,EAAE;IAIhE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO;IAI7C,GAAG,IAAI,0BAA0B,EAAE;CAGpC"}
1
+ {"version":3,"file":"AcTrRBushSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrRBushSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,oBAAoB,CAAA;AAE3B,qBAAa,qBAAsB,YAAW,gBAAgB;IAC5D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+C;gBAEzD,UAAU,CAAC,EAAE,MAAM;IAK/B,MAAM,CAAC,IAAI,EAAE,0BAA0B;IAkBvC,IAAI,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE;IAIjD,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,MAAM,CAAC,EAAE,CACP,CAAC,EAAE,0BAA0B,EAC7B,CAAC,EAAE,0BAA0B,KAC1B,OAAO,GACX,IAAI;IAKP,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IAelC,KAAK;IAKL,MAAM,CACJ,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,wBAAwB,GACjC,0BAA0B,EAAE;IAQ/B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO;IAI7C,GAAG,IAAI,0BAA0B,EAAE;CAGpC"}
@@ -1,14 +1,24 @@
1
1
  import RBush from 'rbush';
2
+ import { isSpatialBoxFullyInside } from './AcTrSpatialIndex';
2
3
  var AcTrRBushSpatialIndex = /** @class */ (function () {
3
4
  function AcTrRBushSpatialIndex(maxEntries) {
4
5
  this.tree = new RBush(maxEntries);
5
6
  this.idMap = new Map();
6
7
  }
7
8
  AcTrRBushSpatialIndex.prototype.insert = function (item) {
8
- if (!this.idMap.has(item.id)) {
9
- this.tree.insert(item);
10
- this.idMap.set(item.id, item);
9
+ var existing = this.idMap.get(item.id);
10
+ if (existing) {
11
+ if (existing.minX === item.minX &&
12
+ existing.minY === item.minY &&
13
+ existing.maxX === item.maxX &&
14
+ existing.maxY === item.maxY) {
15
+ return;
16
+ }
17
+ this.remove(existing, function (a, b) { return a.id === b.id; });
18
+ this.idMap.delete(item.id);
11
19
  }
20
+ this.tree.insert(item);
21
+ this.idMap.set(item.id, item);
12
22
  };
13
23
  AcTrRBushSpatialIndex.prototype.load = function (items) {
14
24
  this.tree.load(items);
@@ -32,8 +42,12 @@ var AcTrRBushSpatialIndex = /** @class */ (function () {
32
42
  this.tree.clear();
33
43
  this.idMap.clear();
34
44
  };
35
- AcTrRBushSpatialIndex.prototype.search = function (bbox) {
36
- return this.tree.search(bbox);
45
+ AcTrRBushSpatialIndex.prototype.search = function (bbox, options) {
46
+ var hits = this.tree.search(bbox);
47
+ if ((options === null || options === void 0 ? void 0 : options.selectionMode) !== 'window') {
48
+ return hits;
49
+ }
50
+ return hits.filter(function (item) { return isSpatialBoxFullyInside(item, bbox); });
37
51
  };
38
52
  AcTrRBushSpatialIndex.prototype.collides = function (bbox) {
39
53
  return this.tree.collides(bbox);
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrRBushSpatialIndex.js","sourceRoot":"","sources":["../../src/spatialIndex/AcTrRBushSpatialIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB;IAIE,+BAAY,UAAmB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,KAAK,CAA6B,UAAU,CAAC,CAAA;QAC7D,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAA4C,CAAA;IAClE,CAAC;IAED,sCAAM,GAAN,UAAO,IAAgC;QACrC,IAAI,CAAC,IAAI,C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CAAC,EAAnC,CAAmC,CAAC,CAAA;IACjE,CAAC;IAED,wCAAQ,GAAR,UAAS,IAA0B;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,mCAAG,GAAH;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;IACxB,CAAC;IACH,4BAAC;AAAD,CAAC,AAhFD,IAgFC"}
@@ -6,6 +6,14 @@ export type AcTrSpatialIndexBBox = {
6
6
  maxX: number;
7
7
  maxY: number;
8
8
  };
9
+ /** AutoCAD-style box selection semantics applied during spatial search. */
10
+ export type AcTrSpatialSelectionMode = 'window' | 'crossing';
11
+ export interface AcTrSpatialSearchOptions {
12
+ /** Defaults to crossing (intersection). Window requires full containment. */
13
+ selectionMode?: AcTrSpatialSelectionMode;
14
+ }
15
+ /** Returns whether one axis-aligned box lies fully inside another. */
16
+ export declare function isSpatialBoxFullyInside(item: AcTrSpatialIndexBBox, box: AcTrSpatialIndexBBox): boolean;
9
17
  export interface AcTrSpatialIndex<T extends AcEdSpatialQueryResultItem = AcEdSpatialQueryResultItem> {
10
18
  /**
11
19
  * Inserts an item. To insert many items at once, use `load()`.
@@ -60,8 +68,9 @@ export interface AcTrSpatialIndex<T extends AcEdSpatialQueryResultItem = AcEdSpa
60
68
  * maxY}` format regardless of the data format.
61
69
  *
62
70
  * @param box The bounding box in which to search.
71
+ * @param options Optional query semantics (for example window selection).
63
72
  */
64
- search(box: AcTrSpatialIndexBBox): T[];
73
+ search(box: AcTrSpatialIndexBBox, options?: AcTrSpatialSearchOptions): T[];
65
74
  /**
66
75
  * Returns all items contained in the tree.
67
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AcTrSpatialIndex.d.ts","sourceRoot":"","sources":["../../src/spatialIndex/AcTrSpatialIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,0B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