@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
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 mlight-lee
3
+ Copyright (c) 2026 mlightcad
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CAD Simple Viewer
2
2
 
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![npm version](https://img.shields.io/npm/v/@mlightcad/cad-simple-viewer.svg)](https://www.npmjs.com/package/@mlightcad/cad-simple-viewer)
5
+
3
6
  This package provides the **high-performance** core components of a CAD viewer such as document management, command handling, and collaboration between the UI and rendering engines. It's designed for optimal performance when handling large CAD files.
4
7
 
5
8
  This module doesn't depend on any UI framework and doesn't provide any UI except canvas. If you want to integrate a high-performance CAD viewer into a web application with your own UI, this module is the correct choice.
@@ -25,6 +28,7 @@ Use `cad-simple-viewer` if you need **core CAD logic only** (document management
25
28
  - `src/app/` – Document/context management, settings
26
29
  - `src/command/` – Command implementations (open, zoom, select, etc.)
27
30
  - `src/editor/` – Command stack, input handling, global functions
31
+ - `src/service/` – Layer/entity services and UI layer store
28
32
  - `src/view/` – Layout and scene management
29
33
  - `src/util/` – Utilities
30
34
 
@@ -51,15 +55,79 @@ This capability makes `cad-simple-viewer` suitable for applications that need to
51
55
 
52
56
  In [cad-simple-viewer-example](https://github.com/mlight-lee/cad-simple-viewer-example) it demonstrates how to create one drawing with [**realdwg-web API**](https://mlight-lee.github.io/realdwg-web/).
53
57
 
58
+ ## Layer services
59
+
60
+ Layer table mutations are centralized in `AcApLayerService`. UI integrations should use `AcApDocument.layerStore`, which observes that document's layer table and delegates mutations to its layer service.
61
+
62
+ ### Turning layers on/off from UI vs CLI
63
+
64
+ `AcApLayerService.setLayerOn` accepts `{ switchCurrentLayer?: boolean }`:
65
+
66
+ - **CLI commands** leave the default `false`. Batch helpers skip the current layer instead.
67
+ - **UI callers** (`AcApLayerStore`, Vue `useLayers`) pass `true` so hiding or freezing the active layer moves `CLAYER` to another visible layer first.
68
+
69
+ ### LAYISO `LockAndFade` mode
70
+
71
+ The `LockAndFade` isolation keyword matches AutoCAD naming but the viewer **locks** non-isolated layers only. It does not apply a visual fade; users are notified when selecting this mode in the `LAYISO` command.
72
+
73
+ ## Web Worker deployment
74
+
75
+ The viewer loads three worker scripts for DXF parsing, DWG parsing, and MTEXT rendering. Host applications must deploy these files and point to them via `webworkerFileUrls` in `AcApDocManager.createInstance()`.
76
+
77
+ Before calling `openDocument()`, verify that the workers are reachable. Use the built-in readiness API rather than downloading worker bodies with a plain GET request (the LibreDWG worker alone is ~12 MB):
78
+
79
+ ```typescript
80
+ const workerUrls = {
81
+ dxfParser: './workers/dxf-parser-worker.js',
82
+ dwgParser: './workers/libredwg-parser-worker.js',
83
+ mtextRender: './workers/mtext-renderer-worker.js'
84
+ }
85
+
86
+ // Option 1: check before creating the manager
87
+ const ready = await AcApDocManager.checkWebworkerReadiness(workerUrls)
88
+ if (!ready) {
89
+ throw new Error('CAD worker scripts are missing or blocked')
90
+ }
91
+
92
+ const manager = AcApDocManager.createInstance({ webworkerFileUrls: workerUrls })
93
+
94
+ // Option 2: check on an existing manager instance
95
+ if (!(await manager.areWorkersReady())) {
96
+ throw new Error('CAD worker scripts are missing or blocked')
97
+ }
98
+ ```
99
+
100
+ `areWorkersReady()` and `checkWebworkerReadiness()` use HEAD requests internally. Successful URL probes are cached for the current page lifecycle; failures are not cached at the probe layer, so a transient network error can succeed on a later `areWorkersReady()` call. After each check, `manager.workersReady` is `true` or `false` (`null` only before the first check).
101
+
102
+ You can also enable automatic checks during initialization:
103
+
104
+ ```typescript
105
+ AcApDocManager.createInstance({
106
+ webworkerFileUrls: workerUrls,
107
+ checkWorkersOnInit: true
108
+ })
109
+
110
+ manager.events.workersReady.addEventListener(({ ready }) => {
111
+ if (!ready) console.error('CAD workers are not reachable')
112
+ })
113
+ ```
114
+
54
115
  ## Available Exports
55
116
 
56
117
  ### Core Classes
57
118
 
58
119
  - `AcApContext` - Main application context
59
120
  - `AcApDocManager` - Document management
60
- - `AcApDocument` - Individual document handling
121
+ - `AcApDocument` - Individual document handling (includes `layerService` and `layerStore`)
61
122
  - `AcApSettingManager` - Settings management
62
123
 
124
+ ### Services
125
+
126
+ - `AcApLayerService` - Layer table mutations with undo
127
+ - `AcApLayerStore` - Cached layer rows and UI-friendly mutations (via `AcApDocument.layerStore`)
128
+ - `AcApEntityService` - Entity selection, transform, and edit helpers
129
+ - `acapRunServiceEdit` - Undo-wrapped edits outside command transactions
130
+
63
131
  ### Commands
64
132
 
65
133
  - `AcApOpenCmd` - Open file command