@mlightcad/cad-simple-viewer 1.4.13 → 1.5.1

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 (465) hide show
  1. package/dist/index.js +26532 -44513
  2. package/dist/index.umd.cjs +163 -52
  3. package/dist/libredwg-parser-worker.js +4378 -7481
  4. package/dist/mtext-renderer-worker.js +4107 -3865
  5. package/dist/viewer-runtime.iife.js +3879 -0
  6. package/lib/app/AcApAnnotation.js +4 -4
  7. package/lib/app/AcApAnnotation.js.map +1 -1
  8. package/lib/app/AcApDocManager.d.ts +59 -6
  9. package/lib/app/AcApDocManager.d.ts.map +1 -1
  10. package/lib/app/AcApDocManager.js +188 -28
  11. package/lib/app/AcApDocManager.js.map +1 -1
  12. package/lib/command/AcApLogCmd.d.ts +1 -1
  13. package/lib/command/AcApLogCmd.d.ts.map +1 -1
  14. package/lib/command/AcApLogCmd.js +1 -1
  15. package/lib/command/AcApLogCmd.js.map +1 -1
  16. package/lib/command/AcApOpenCmd.d.ts +1 -1
  17. package/lib/command/AcApOpenCmd.d.ts.map +1 -1
  18. package/lib/command/AcApOpenCmd.js +1 -2
  19. package/lib/command/AcApOpenCmd.js.map +1 -1
  20. package/lib/command/AcApPanCmd.d.ts +1 -1
  21. package/lib/command/AcApPanCmd.d.ts.map +1 -1
  22. package/lib/command/AcApPanCmd.js +1 -2
  23. package/lib/command/AcApPanCmd.js.map +1 -1
  24. package/lib/command/AcApQNewCmd.d.ts +1 -1
  25. package/lib/command/AcApQNewCmd.d.ts.map +1 -1
  26. package/lib/command/AcApQNewCmd.js +1 -1
  27. package/lib/command/AcApQNewCmd.js.map +1 -1
  28. package/lib/command/AcApRegenCmd.d.ts +1 -1
  29. package/lib/command/AcApRegenCmd.d.ts.map +1 -1
  30. package/lib/command/AcApRegenCmd.js +1 -1
  31. package/lib/command/AcApRegenCmd.js.map +1 -1
  32. package/lib/command/AcApSelectCmd.d.ts +1 -1
  33. package/lib/command/AcApSelectCmd.d.ts.map +1 -1
  34. package/lib/command/AcApSelectCmd.js +1 -2
  35. package/lib/command/AcApSelectCmd.js.map +1 -1
  36. package/lib/command/AcApZoomCmd.js +3 -3
  37. package/lib/command/AcApZoomCmd.js.map +1 -1
  38. package/lib/command/{AcApConvertToDxfCmd.d.ts → convert/AcApConvertToDxfCmd.d.ts} +2 -2
  39. package/lib/command/convert/AcApConvertToDxfCmd.d.ts.map +1 -0
  40. package/lib/command/{AcApConvertToDxfCmd.js → convert/AcApConvertToDxfCmd.js} +1 -1
  41. package/lib/command/convert/AcApConvertToDxfCmd.js.map +1 -0
  42. package/lib/command/{AcApConvertToPngCmd.d.ts → convert/AcApConvertToPngCmd.d.ts} +23 -5
  43. package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -0
  44. package/lib/command/{AcApConvertToPngCmd.js → convert/AcApConvertToPngCmd.js} +88 -15
  45. package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -0
  46. package/lib/command/{AcApConvertToSvgCmd.d.ts → convert/AcApConvertToSvgCmd.d.ts} +2 -2
  47. package/lib/command/convert/AcApConvertToSvgCmd.d.ts.map +1 -0
  48. package/lib/command/{AcApConvertToSvgCmd.js → convert/AcApConvertToSvgCmd.js} +1 -1
  49. package/lib/command/convert/AcApConvertToSvgCmd.js.map +1 -0
  50. package/lib/command/convert/AcApDxfConvertor.d.ts.map +1 -0
  51. package/lib/command/{AcApDxfConvertor.js → convert/AcApDxfConvertor.js} +1 -1
  52. package/lib/command/convert/AcApDxfConvertor.js.map +1 -0
  53. package/lib/command/convert/AcApExportHtmlCmd.d.ts +22 -0
  54. package/lib/command/convert/AcApExportHtmlCmd.d.ts.map +1 -0
  55. package/lib/command/convert/AcApExportHtmlCmd.js +93 -0
  56. package/lib/command/convert/AcApExportHtmlCmd.js.map +1 -0
  57. package/lib/command/convert/AcApHtmlConvertor.d.ts +61 -0
  58. package/lib/command/convert/AcApHtmlConvertor.d.ts.map +1 -0
  59. package/lib/command/convert/AcApHtmlConvertor.js +223 -0
  60. package/lib/command/convert/AcApHtmlConvertor.js.map +1 -0
  61. package/lib/command/convert/AcApHtmlSnapshotBuilder.d.ts +65 -0
  62. package/lib/command/convert/AcApHtmlSnapshotBuilder.d.ts.map +1 -0
  63. package/lib/command/convert/AcApHtmlSnapshotBuilder.js +301 -0
  64. package/lib/command/convert/AcApHtmlSnapshotBuilder.js.map +1 -0
  65. package/lib/command/{AcApPngConvertor.d.ts → convert/AcApPngConvertor.d.ts} +20 -35
  66. package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -0
  67. package/lib/command/{AcApPngConvertor.js → convert/AcApPngConvertor.js} +99 -71
  68. package/lib/command/convert/AcApPngConvertor.js.map +1 -0
  69. package/lib/command/convert/AcApSvgConvertor.d.ts.map +1 -0
  70. package/lib/command/{AcApSvgConvertor.js → convert/AcApSvgConvertor.js} +1 -1
  71. package/lib/command/convert/AcApSvgConvertor.js.map +1 -0
  72. package/lib/command/convert/index.d.ts +9 -0
  73. package/lib/command/convert/index.d.ts.map +1 -0
  74. package/lib/command/convert/index.js +9 -0
  75. package/lib/command/convert/index.js.map +1 -0
  76. package/lib/command/draw/AcApArcCmd.d.ts +297 -0
  77. package/lib/command/draw/AcApArcCmd.d.ts.map +1 -0
  78. package/lib/command/{AcApArcCmd.js → draw/AcApArcCmd.js} +839 -32
  79. package/lib/command/draw/AcApArcCmd.js.map +1 -0
  80. package/lib/command/{AcApCircleCmd.d.ts → draw/AcApCircleCmd.d.ts} +2 -2
  81. package/lib/command/draw/AcApCircleCmd.d.ts.map +1 -0
  82. package/lib/command/{AcApCircleCmd.js → draw/AcApCircleCmd.js} +8 -9
  83. package/lib/command/draw/AcApCircleCmd.js.map +1 -0
  84. package/lib/command/{AcApDimLinearCmd.d.ts → draw/AcApDimLinearCmd.d.ts} +2 -2
  85. package/lib/command/draw/AcApDimLinearCmd.d.ts.map +1 -0
  86. package/lib/command/{AcApDimLinearCmd.js → draw/AcApDimLinearCmd.js} +3 -3
  87. package/lib/command/draw/AcApDimLinearCmd.js.map +1 -0
  88. package/lib/command/{AcApEllipseCmd.d.ts → draw/AcApEllipseCmd.d.ts} +2 -2
  89. package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -0
  90. package/lib/command/{AcApEllipseCmd.js → draw/AcApEllipseCmd.js} +7 -9
  91. package/lib/command/draw/AcApEllipseCmd.js.map +1 -0
  92. package/lib/command/{AcApHatchCmd.d.ts → draw/AcApHatchCmd.d.ts} +54 -17
  93. package/lib/command/draw/AcApHatchCmd.d.ts.map +1 -0
  94. package/lib/command/{AcApHatchCmd.js → draw/AcApHatchCmd.js} +122 -30
  95. package/lib/command/draw/AcApHatchCmd.js.map +1 -0
  96. package/lib/command/{AcApLineCmd.d.ts → draw/AcApLineCmd.d.ts} +2 -2
  97. package/lib/command/draw/AcApLineCmd.d.ts.map +1 -0
  98. package/lib/command/{AcApLineCmd.js → draw/AcApLineCmd.js} +3 -3
  99. package/lib/command/draw/AcApLineCmd.js.map +1 -0
  100. package/lib/command/draw/AcApMLineCmd.d.ts +31 -0
  101. package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -0
  102. package/lib/command/draw/AcApMLineCmd.js +528 -0
  103. package/lib/command/draw/AcApMLineCmd.js.map +1 -0
  104. package/lib/command/{AcApMTextCmd.d.ts → draw/AcApMTextCmd.d.ts} +2 -2
  105. package/lib/command/draw/AcApMTextCmd.d.ts.map +1 -0
  106. package/lib/command/{AcApMTextCmd.js → draw/AcApMTextCmd.js} +6 -4
  107. package/lib/command/draw/AcApMTextCmd.js.map +1 -0
  108. package/lib/command/draw/AcApPointCmd.d.ts +16 -0
  109. package/lib/command/draw/AcApPointCmd.d.ts.map +1 -0
  110. package/lib/command/draw/AcApPointCmd.js +98 -0
  111. package/lib/command/draw/AcApPointCmd.js.map +1 -0
  112. package/lib/command/{AcApPolygonCmd.d.ts → draw/AcApPolygonCmd.d.ts} +2 -2
  113. package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -0
  114. package/lib/command/{AcApPolygonCmd.js → draw/AcApPolygonCmd.js} +7 -8
  115. package/lib/command/draw/AcApPolygonCmd.js.map +1 -0
  116. package/lib/command/{AcApPolylineCmd.d.ts → draw/AcApPolylineCmd.d.ts} +51 -2
  117. package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -0
  118. package/lib/command/{AcApPolylineCmd.js → draw/AcApPolylineCmd.js} +203 -21
  119. package/lib/command/draw/AcApPolylineCmd.js.map +1 -0
  120. package/lib/command/draw/AcApRayCmd.d.ts +10 -0
  121. package/lib/command/draw/AcApRayCmd.d.ts.map +1 -0
  122. package/lib/command/draw/AcApRayCmd.js +144 -0
  123. package/lib/command/draw/AcApRayCmd.js.map +1 -0
  124. package/lib/command/{AcApRectCmd.d.ts → draw/AcApRectCmd.d.ts} +2 -2
  125. package/lib/command/draw/AcApRectCmd.d.ts.map +1 -0
  126. package/lib/command/{AcApRectCmd.js → draw/AcApRectCmd.js} +12 -13
  127. package/lib/command/draw/AcApRectCmd.js.map +1 -0
  128. package/lib/command/{AcApSplineCmd.d.ts → draw/AcApSplineCmd.d.ts} +2 -2
  129. package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -0
  130. package/lib/command/{AcApSplineCmd.js → draw/AcApSplineCmd.js} +6 -9
  131. package/lib/command/draw/AcApSplineCmd.js.map +1 -0
  132. package/lib/command/draw/AcApXLineCmd.d.ts +25 -0
  133. package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -0
  134. package/lib/command/draw/AcApXLineCmd.js +209 -0
  135. package/lib/command/draw/AcApXLineCmd.js.map +1 -0
  136. package/lib/command/draw/index.d.ts +16 -0
  137. package/lib/command/draw/index.d.ts.map +1 -0
  138. package/lib/command/draw/index.js +16 -0
  139. package/lib/command/draw/index.js.map +1 -0
  140. package/lib/command/index.d.ts +6 -32
  141. package/lib/command/index.d.ts.map +1 -1
  142. package/lib/command/index.js +6 -32
  143. package/lib/command/index.js.map +1 -1
  144. package/lib/command/layer/AcApLayerCloseCmd.d.ts +23 -0
  145. package/lib/command/layer/AcApLayerCloseCmd.d.ts.map +1 -0
  146. package/lib/command/layer/AcApLayerCloseCmd.js +86 -0
  147. package/lib/command/layer/AcApLayerCloseCmd.js.map +1 -0
  148. package/lib/command/{AcApLayerCmd.d.ts → layer/AcApLayerCmd.d.ts} +3 -5
  149. package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -0
  150. package/lib/command/{AcApLayerCmd.js → layer/AcApLayerCmd.js} +5 -8
  151. package/lib/command/layer/AcApLayerCmd.js.map +1 -0
  152. package/lib/command/layer/AcApLayerCurCmd.d.ts +43 -0
  153. package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -0
  154. package/lib/command/layer/AcApLayerCurCmd.js +183 -0
  155. package/lib/command/layer/AcApLayerCurCmd.js.map +1 -0
  156. package/lib/command/layer/AcApLayerDelCmd.d.ts +112 -0
  157. package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -0
  158. package/lib/command/layer/AcApLayerDelCmd.js +446 -0
  159. package/lib/command/layer/AcApLayerDelCmd.js.map +1 -0
  160. package/lib/command/layer/AcApLayerFreezeCmd.d.ts +103 -0
  161. package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -0
  162. package/lib/command/layer/AcApLayerFreezeCmd.js +398 -0
  163. package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -0
  164. package/lib/command/layer/AcApLayerIsoCmd.d.ts +99 -0
  165. package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -0
  166. package/lib/command/layer/AcApLayerIsoCmd.js +485 -0
  167. package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -0
  168. package/lib/command/layer/AcApLayerIsoState.d.ts +68 -0
  169. package/lib/command/layer/AcApLayerIsoState.d.ts.map +1 -0
  170. package/lib/command/layer/AcApLayerIsoState.js +53 -0
  171. package/lib/command/layer/AcApLayerIsoState.js.map +1 -0
  172. package/lib/command/layer/AcApLayerLockCmd.d.ts +50 -0
  173. package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -0
  174. package/lib/command/layer/AcApLayerLockCmd.js +175 -0
  175. package/lib/command/layer/AcApLayerLockCmd.js.map +1 -0
  176. package/lib/command/layer/AcApLayerOffCmd.d.ts +95 -0
  177. package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -0
  178. package/lib/command/layer/AcApLayerOffCmd.js +384 -0
  179. package/lib/command/layer/AcApLayerOffCmd.js.map +1 -0
  180. package/lib/command/layer/AcApLayerOnCmd.d.ts +30 -0
  181. package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -0
  182. package/lib/command/layer/AcApLayerOnCmd.js +138 -0
  183. package/lib/command/layer/AcApLayerOnCmd.js.map +1 -0
  184. package/lib/command/layer/AcApLayerPCmd.d.ts +83 -0
  185. package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -0
  186. package/lib/command/layer/AcApLayerPCmd.js +241 -0
  187. package/lib/command/layer/AcApLayerPCmd.js.map +1 -0
  188. package/lib/command/layer/AcApLayerThawCmd.d.ts +37 -0
  189. package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -0
  190. package/lib/command/layer/AcApLayerThawCmd.js +150 -0
  191. package/lib/command/layer/AcApLayerThawCmd.js.map +1 -0
  192. package/lib/command/layer/AcApLayerUnisoCmd.d.ts +52 -0
  193. package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -0
  194. package/lib/command/layer/AcApLayerUnisoCmd.js +199 -0
  195. package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -0
  196. package/lib/command/layer/AcApLayerUnlockCmd.d.ts +50 -0
  197. package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -0
  198. package/lib/command/layer/AcApLayerUnlockCmd.js +175 -0
  199. package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -0
  200. package/lib/command/layer/index.d.ts +14 -0
  201. package/lib/command/layer/index.d.ts.map +1 -0
  202. package/lib/command/layer/index.js +14 -0
  203. package/lib/command/layer/index.js.map +1 -0
  204. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +24 -0
  205. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -0
  206. package/lib/command/{AcApClearMeasurementsCmd.js → measure/AcApClearMeasurementsCmd.js} +16 -5
  207. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -0
  208. package/lib/command/{AcApMeasureAngleCmd.d.ts → measure/AcApMeasureAngleCmd.d.ts} +2 -2
  209. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -0
  210. package/lib/command/{AcApMeasureAngleCmd.js → measure/AcApMeasureAngleCmd.js} +18 -9
  211. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -0
  212. package/lib/command/{AcApMeasureArcCmd.d.ts → measure/AcApMeasureArcCmd.d.ts} +2 -2
  213. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -0
  214. package/lib/command/{AcApMeasureArcCmd.js → measure/AcApMeasureArcCmd.js} +14 -7
  215. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -0
  216. package/lib/command/{AcApMeasureAreaCmd.d.ts → measure/AcApMeasureAreaCmd.d.ts} +2 -2
  217. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -0
  218. package/lib/command/{AcApMeasureAreaCmd.js → measure/AcApMeasureAreaCmd.js} +14 -7
  219. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -0
  220. package/lib/command/{AcApMeasureDistanceCmd.d.ts → measure/AcApMeasureDistanceCmd.d.ts} +5 -4
  221. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -0
  222. package/lib/command/{AcApMeasureDistanceCmd.js → measure/AcApMeasureDistanceCmd.js} +17 -9
  223. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -0
  224. package/lib/command/measure/index.d.ts +6 -0
  225. package/lib/command/measure/index.d.ts.map +1 -0
  226. package/lib/command/measure/index.js +6 -0
  227. package/lib/command/measure/index.js.map +1 -0
  228. package/lib/command/modify/AcApCopyCmd.d.ts +94 -0
  229. package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -0
  230. package/lib/command/modify/AcApCopyCmd.js +549 -0
  231. package/lib/command/modify/AcApCopyCmd.js.map +1 -0
  232. package/lib/command/{AcApEraseCmd.d.ts → modify/AcApEraseCmd.d.ts} +2 -2
  233. package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -0
  234. package/lib/command/{AcApEraseCmd.js → modify/AcApEraseCmd.js} +3 -5
  235. package/lib/command/modify/AcApEraseCmd.js.map +1 -0
  236. package/lib/command/{AcApMoveCmd.d.ts → modify/AcApMoveCmd.d.ts} +2 -2
  237. package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -0
  238. package/lib/command/{AcApMoveCmd.js → modify/AcApMoveCmd.js} +3 -4
  239. package/lib/command/modify/AcApMoveCmd.js.map +1 -0
  240. package/lib/command/modify/AcApOffsetCmd.d.ts +30 -0
  241. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -0
  242. package/lib/command/modify/AcApOffsetCmd.js +424 -0
  243. package/lib/command/modify/AcApOffsetCmd.js.map +1 -0
  244. package/lib/command/modify/AcApRotateCmd.d.ts +81 -0
  245. package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -0
  246. package/lib/command/modify/AcApRotateCmd.js +486 -0
  247. package/lib/command/modify/AcApRotateCmd.js.map +1 -0
  248. package/lib/command/modify/index.d.ts +6 -0
  249. package/lib/command/modify/index.d.ts.map +1 -0
  250. package/lib/command/modify/index.js +6 -0
  251. package/lib/command/modify/index.js.map +1 -0
  252. package/lib/command/{AcApBaseRevCmd.d.ts → review/AcApBaseRevCmd.d.ts} +2 -2
  253. package/lib/command/review/AcApBaseRevCmd.d.ts.map +1 -0
  254. package/lib/command/{AcApBaseRevCmd.js → review/AcApBaseRevCmd.js} +2 -2
  255. package/lib/command/review/AcApBaseRevCmd.js.map +1 -0
  256. package/lib/command/{AcApRevCircleCmd.d.ts → review/AcApRevCircleCmd.d.ts} +1 -1
  257. package/lib/command/review/AcApRevCircleCmd.d.ts.map +1 -0
  258. package/lib/command/{AcApRevCircleCmd.js → review/AcApRevCircleCmd.js} +8 -5
  259. package/lib/command/review/AcApRevCircleCmd.js.map +1 -0
  260. package/lib/command/{AcApRevCloudCmd.d.ts → review/AcApRevCloudCmd.d.ts} +2 -2
  261. package/lib/command/review/AcApRevCloudCmd.d.ts.map +1 -0
  262. package/lib/command/{AcApRevCloudCmd.js → review/AcApRevCloudCmd.js} +3 -3
  263. package/lib/command/review/AcApRevCloudCmd.js.map +1 -0
  264. package/lib/command/{AcApRevRectCmd.d.ts → review/AcApRevRectCmd.d.ts} +1 -1
  265. package/lib/command/review/AcApRevRectCmd.d.ts.map +1 -0
  266. package/lib/command/{AcApRevRectCmd.js → review/AcApRevRectCmd.js} +3 -3
  267. package/lib/command/review/AcApRevRectCmd.js.map +1 -0
  268. package/lib/command/{AcApRevVisibilityCmd.d.ts → review/AcApRevVisibilityCmd.d.ts} +1 -1
  269. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +1 -0
  270. package/lib/command/{AcApRevVisibilityCmd.js → review/AcApRevVisibilityCmd.js} +2 -2
  271. package/lib/command/review/AcApRevVisibilityCmd.js.map +1 -0
  272. package/lib/command/{AcApSketchCmd.d.ts → review/AcApSketchCmd.d.ts} +2 -2
  273. package/lib/command/review/AcApSketchCmd.d.ts.map +1 -0
  274. package/lib/command/{AcApSketchCmd.js → review/AcApSketchCmd.js} +3 -3
  275. package/lib/command/review/AcApSketchCmd.js.map +1 -0
  276. package/lib/command/review/index.d.ts +7 -0
  277. package/lib/command/review/index.d.ts.map +1 -0
  278. package/lib/command/review/index.js +7 -0
  279. package/lib/command/review/index.js.map +1 -0
  280. package/lib/editor/global/eventBus.d.ts +4 -6
  281. package/lib/editor/global/eventBus.d.ts.map +1 -1
  282. package/lib/editor/global/eventBus.js.map +1 -1
  283. package/lib/editor/input/AcEdSelectionFilter.js +7 -6
  284. package/lib/editor/input/AcEdSelectionFilter.js.map +1 -1
  285. package/lib/editor/input/AcEditor.d.ts +17 -0
  286. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  287. package/lib/editor/input/AcEditor.js +23 -0
  288. package/lib/editor/input/AcEditor.js.map +1 -1
  289. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +6 -0
  290. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
  291. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +16 -0
  292. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
  293. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -1
  294. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +1 -1
  295. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -1
  296. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +6 -0
  297. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -1
  298. package/lib/editor/input/prompt/AcEdPromptPointOptions.js +16 -0
  299. package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -1
  300. package/lib/editor/input/ui/AcEdCommandLine.d.ts +25 -23
  301. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  302. package/lib/editor/input/ui/AcEdCommandLine.js +101 -43
  303. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  304. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +9 -0
  305. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  306. package/lib/editor/input/ui/AcEdFloatingInput.js +25 -5
  307. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  308. package/lib/editor/input/ui/AcEdInputManager.d.ts +46 -6
  309. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  310. package/lib/editor/input/ui/AcEdInputManager.js +153 -43
  311. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  312. package/lib/editor/input/ui/AcEdMTextEditor.d.ts +67 -2
  313. package/lib/editor/input/ui/AcEdMTextEditor.d.ts.map +1 -1
  314. package/lib/editor/input/ui/AcEdMTextEditor.js +210 -19
  315. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
  316. package/lib/editor/input/ui/AcEdMessageType.d.ts +10 -0
  317. package/lib/editor/input/ui/AcEdMessageType.d.ts.map +1 -0
  318. package/lib/editor/input/ui/AcEdMessageType.js +2 -0
  319. package/lib/editor/input/ui/AcEdMessageType.js.map +1 -0
  320. package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
  321. package/lib/editor/input/ui/AcEdRubberBand.js +16 -8
  322. package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
  323. package/lib/editor/input/ui/index.d.ts +1 -0
  324. package/lib/editor/input/ui/index.d.ts.map +1 -1
  325. package/lib/editor/input/ui/index.js +1 -0
  326. package/lib/editor/input/ui/index.js.map +1 -1
  327. package/lib/editor/view/AcEdBaseView.d.ts +3 -8
  328. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  329. package/lib/editor/view/AcEdBaseView.js +3 -5
  330. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  331. package/lib/editor/view/AcEdHoverController.d.ts +2 -3
  332. package/lib/editor/view/AcEdHoverController.d.ts.map +1 -1
  333. package/lib/editor/view/AcEdHoverController.js +7 -0
  334. package/lib/editor/view/AcEdHoverController.js.map +1 -1
  335. package/lib/editor/view/AcEdSelectionAction.d.ts +108 -0
  336. package/lib/editor/view/AcEdSelectionAction.d.ts.map +1 -0
  337. package/lib/editor/view/AcEdSelectionAction.js +74 -0
  338. package/lib/editor/view/AcEdSelectionAction.js.map +1 -0
  339. package/lib/editor/view/index.d.ts +1 -0
  340. package/lib/editor/view/index.d.ts.map +1 -1
  341. package/lib/editor/view/index.js +1 -0
  342. package/lib/editor/view/index.js.map +1 -1
  343. package/lib/i18n/en/command.d.ts +187 -13
  344. package/lib/i18n/en/command.d.ts.map +1 -1
  345. package/lib/i18n/en/command.js +195 -21
  346. package/lib/i18n/en/command.js.map +1 -1
  347. package/lib/i18n/en/jig.d.ts +579 -212
  348. package/lib/i18n/en/jig.d.ts.map +1 -1
  349. package/lib/i18n/en/jig.js +669 -302
  350. package/lib/i18n/en/jig.js.map +1 -1
  351. package/lib/i18n/zh/command.d.ts +187 -13
  352. package/lib/i18n/zh/command.d.ts.map +1 -1
  353. package/lib/i18n/zh/command.js +196 -22
  354. package/lib/i18n/zh/command.js.map +1 -1
  355. package/lib/i18n/zh/jig.d.ts +579 -212
  356. package/lib/i18n/zh/jig.d.ts.map +1 -1
  357. package/lib/i18n/zh/jig.js +668 -301
  358. package/lib/i18n/zh/jig.js.map +1 -1
  359. package/lib/index.d.ts +2 -1
  360. package/lib/index.d.ts.map +1 -1
  361. package/lib/index.js +2 -1
  362. package/lib/index.js.map +1 -1
  363. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +136 -2
  364. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  365. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +154 -16
  366. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  367. package/lib/util/AcApFontUtil.d.ts +69 -0
  368. package/lib/util/AcApFontUtil.d.ts.map +1 -0
  369. package/lib/util/AcApFontUtil.js +161 -0
  370. package/lib/util/AcApFontUtil.js.map +1 -0
  371. package/lib/util/index.d.ts +2 -0
  372. package/lib/util/index.d.ts.map +1 -1
  373. package/lib/util/index.js +2 -0
  374. package/lib/util/index.js.map +1 -1
  375. package/lib/util/yieldToMain.d.ts +5 -0
  376. package/lib/util/yieldToMain.d.ts.map +1 -0
  377. package/lib/util/yieldToMain.js +11 -0
  378. package/lib/util/yieldToMain.js.map +1 -0
  379. package/lib/view/AcTrLayout.d.ts +17 -0
  380. package/lib/view/AcTrLayout.d.ts.map +1 -1
  381. package/lib/view/AcTrLayout.js +34 -2
  382. package/lib/view/AcTrLayout.js.map +1 -1
  383. package/lib/view/AcTrLayoutView.d.ts +12 -0
  384. package/lib/view/AcTrLayoutView.d.ts.map +1 -1
  385. package/lib/view/AcTrLayoutView.js +18 -0
  386. package/lib/view/AcTrLayoutView.js.map +1 -1
  387. package/lib/view/AcTrPickResultUtil.d.ts +4 -0
  388. package/lib/view/AcTrPickResultUtil.d.ts.map +1 -0
  389. package/lib/view/AcTrPickResultUtil.js +54 -0
  390. package/lib/view/AcTrPickResultUtil.js.map +1 -0
  391. package/lib/view/AcTrScene.d.ts +38 -6
  392. package/lib/view/AcTrScene.d.ts.map +1 -1
  393. package/lib/view/AcTrScene.js +57 -30
  394. package/lib/view/AcTrScene.js.map +1 -1
  395. package/lib/view/AcTrView2d.d.ts +191 -0
  396. package/lib/view/AcTrView2d.d.ts.map +1 -1
  397. package/lib/view/AcTrView2d.js +795 -137
  398. package/lib/view/AcTrView2d.js.map +1 -1
  399. package/package.json +14 -8
  400. package/lib/command/AcApArcCmd.d.ts +0 -140
  401. package/lib/command/AcApArcCmd.d.ts.map +0 -1
  402. package/lib/command/AcApArcCmd.js.map +0 -1
  403. package/lib/command/AcApBaseRevCmd.d.ts.map +0 -1
  404. package/lib/command/AcApBaseRevCmd.js.map +0 -1
  405. package/lib/command/AcApCircleCmd.d.ts.map +0 -1
  406. package/lib/command/AcApCircleCmd.js.map +0 -1
  407. package/lib/command/AcApClearMeasurementsCmd.d.ts +0 -13
  408. package/lib/command/AcApClearMeasurementsCmd.d.ts.map +0 -1
  409. package/lib/command/AcApClearMeasurementsCmd.js.map +0 -1
  410. package/lib/command/AcApConvertToDxfCmd.d.ts.map +0 -1
  411. package/lib/command/AcApConvertToDxfCmd.js.map +0 -1
  412. package/lib/command/AcApConvertToPngCmd.d.ts.map +0 -1
  413. package/lib/command/AcApConvertToPngCmd.js.map +0 -1
  414. package/lib/command/AcApConvertToSvgCmd.d.ts.map +0 -1
  415. package/lib/command/AcApConvertToSvgCmd.js.map +0 -1
  416. package/lib/command/AcApDimLinearCmd.d.ts.map +0 -1
  417. package/lib/command/AcApDimLinearCmd.js.map +0 -1
  418. package/lib/command/AcApDxfConvertor.d.ts.map +0 -1
  419. package/lib/command/AcApDxfConvertor.js.map +0 -1
  420. package/lib/command/AcApEllipseCmd.d.ts.map +0 -1
  421. package/lib/command/AcApEllipseCmd.js.map +0 -1
  422. package/lib/command/AcApEraseCmd.d.ts.map +0 -1
  423. package/lib/command/AcApEraseCmd.js.map +0 -1
  424. package/lib/command/AcApHatchCmd.d.ts.map +0 -1
  425. package/lib/command/AcApHatchCmd.js.map +0 -1
  426. package/lib/command/AcApLayerCmd.d.ts.map +0 -1
  427. package/lib/command/AcApLayerCmd.js.map +0 -1
  428. package/lib/command/AcApLineCmd.d.ts.map +0 -1
  429. package/lib/command/AcApLineCmd.js.map +0 -1
  430. package/lib/command/AcApMTextCmd.d.ts.map +0 -1
  431. package/lib/command/AcApMTextCmd.js.map +0 -1
  432. package/lib/command/AcApMeasureAngleCmd.d.ts.map +0 -1
  433. package/lib/command/AcApMeasureAngleCmd.js.map +0 -1
  434. package/lib/command/AcApMeasureArcCmd.d.ts.map +0 -1
  435. package/lib/command/AcApMeasureArcCmd.js.map +0 -1
  436. package/lib/command/AcApMeasureAreaCmd.d.ts.map +0 -1
  437. package/lib/command/AcApMeasureAreaCmd.js.map +0 -1
  438. package/lib/command/AcApMeasureDistanceCmd.d.ts.map +0 -1
  439. package/lib/command/AcApMeasureDistanceCmd.js.map +0 -1
  440. package/lib/command/AcApMoveCmd.d.ts.map +0 -1
  441. package/lib/command/AcApMoveCmd.js.map +0 -1
  442. package/lib/command/AcApPngConvertor.d.ts.map +0 -1
  443. package/lib/command/AcApPngConvertor.js.map +0 -1
  444. package/lib/command/AcApPolygonCmd.d.ts.map +0 -1
  445. package/lib/command/AcApPolygonCmd.js.map +0 -1
  446. package/lib/command/AcApPolylineCmd.d.ts.map +0 -1
  447. package/lib/command/AcApPolylineCmd.js.map +0 -1
  448. package/lib/command/AcApRectCmd.d.ts.map +0 -1
  449. package/lib/command/AcApRectCmd.js.map +0 -1
  450. package/lib/command/AcApRevCircleCmd.d.ts.map +0 -1
  451. package/lib/command/AcApRevCircleCmd.js.map +0 -1
  452. package/lib/command/AcApRevCloudCmd.d.ts.map +0 -1
  453. package/lib/command/AcApRevCloudCmd.js.map +0 -1
  454. package/lib/command/AcApRevRectCmd.d.ts.map +0 -1
  455. package/lib/command/AcApRevRectCmd.js.map +0 -1
  456. package/lib/command/AcApRevVisibilityCmd.d.ts.map +0 -1
  457. package/lib/command/AcApRevVisibilityCmd.js.map +0 -1
  458. package/lib/command/AcApSketchCmd.d.ts.map +0 -1
  459. package/lib/command/AcApSketchCmd.js.map +0 -1
  460. package/lib/command/AcApSplineCmd.d.ts.map +0 -1
  461. package/lib/command/AcApSplineCmd.js.map +0 -1
  462. package/lib/command/AcApSvgConvertor.d.ts.map +0 -1
  463. package/lib/command/AcApSvgConvertor.js.map +0 -1
  464. /package/lib/command/{AcApDxfConvertor.d.ts → convert/AcApDxfConvertor.d.ts} +0 -0
  465. /package/lib/command/{AcApSvgConvertor.d.ts → convert/AcApSvgConvertor.d.ts} +0 -0
@@ -0,0 +1,301 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ var __values = (this && this.__values) || function(o) {
38
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
39
+ if (m) return m.call(o);
40
+ if (o && typeof o.length === "number") return {
41
+ next: function () {
42
+ if (o && i >= o.length) o = void 0;
43
+ return { value: o && o[i++], done: !o };
44
+ }
45
+ };
46
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
47
+ };
48
+ var __read = (this && this.__read) || function (o, n) {
49
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
50
+ if (!m) return o;
51
+ var i = m.call(o), r, ar = [], e;
52
+ try {
53
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54
+ }
55
+ catch (error) { e = { error: error }; }
56
+ finally {
57
+ try {
58
+ if (r && !r.done && (m = i["return"])) m.call(i);
59
+ }
60
+ finally { if (e) throw e.error; }
61
+ }
62
+ return ar;
63
+ };
64
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
65
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
66
+ if (ar || !(i in from)) {
67
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
68
+ ar[i] = from[i];
69
+ }
70
+ }
71
+ return to.concat(ar || Array.prototype.slice.call(from));
72
+ };
73
+ import { ACEX_SNAPSHOT_VERSION, buildOsnapCatalog, buildViewerMetadata, collectBatchesFromObject3D } from '@mlightcad/cad-html-exporter';
74
+ import { AcApI18n } from '../../i18n';
75
+ import { yieldToMain } from '../../util';
76
+ /**
77
+ * Serializes the live Three.js scene into a versioned {@link AcExSnapshotV1}.
78
+ *
79
+ * The snapshot contains layer visibility, per-layout line/mesh batches, and
80
+ * viewer metadata (extents, units, background). It is display-only: no DXF/DWG
81
+ * entities or edit capability are preserved.
82
+ */
83
+ var AcApHtmlSnapshotBuilder = /** @class */ (function () {
84
+ function AcApHtmlSnapshotBuilder() {
85
+ }
86
+ /**
87
+ * Builds a snapshot synchronously in one pass.
88
+ *
89
+ * Prefer {@link buildAsync} for interactive export so the UI can stay responsive.
90
+ *
91
+ * @param scene - Current renderer scene (layouts, layers, active layout).
92
+ * @param database - Open drawing database used for layout names and metadata.
93
+ * @param options - Optional title, background, and locale overrides.
94
+ * @returns A complete v1 snapshot ready for `packHtml`.
95
+ */
96
+ AcApHtmlSnapshotBuilder.prototype.build = function (scene, database, options) {
97
+ if (options === void 0) { options = {}; }
98
+ return this.buildSync(scene, database, options);
99
+ };
100
+ /**
101
+ * Builds a snapshot incrementally, yielding to the main thread between layouts.
102
+ *
103
+ * Geometry is collected per layout layer so a busy indicator can repaint
104
+ * during large drawings.
105
+ *
106
+ * @param scene - Current renderer scene (layouts, layers, active layout).
107
+ * @param database - Open drawing database used for layout names and metadata.
108
+ * @param options - Optional title, background, and locale overrides.
109
+ * @returns A complete v1 snapshot ready for `packHtml`.
110
+ */
111
+ AcApHtmlSnapshotBuilder.prototype.buildAsync = function (scene_1, database_1) {
112
+ return __awaiter(this, arguments, void 0, function (scene, database, options) {
113
+ var meta, layers, layouts, _a, _b, _c, btrId, layout, lineBatches, meshBatches, _d, _e, _f, layer, collected, e_1_1, e_2_1;
114
+ var e_2, _g, e_1, _h;
115
+ if (options === void 0) { options = {}; }
116
+ return __generator(this, function (_j) {
117
+ switch (_j.label) {
118
+ case 0: return [4 /*yield*/, yieldToMain()];
119
+ case 1:
120
+ _j.sent();
121
+ meta = buildViewerMetadata(database, {
122
+ title: options.title,
123
+ background: options.background
124
+ });
125
+ layers = [];
126
+ scene.layers.forEach(function (layer) {
127
+ var _a;
128
+ layers.push({
129
+ name: layer.name,
130
+ color: (_a = layer.color.RGB) !== null && _a !== void 0 ? _a : 0xffffff,
131
+ visible: !layer.isOff && !layer.isFrozen
132
+ });
133
+ });
134
+ layouts = [];
135
+ _j.label = 2;
136
+ case 2:
137
+ _j.trys.push([2, 15, 16, 17]);
138
+ _a = __values(scene.layouts), _b = _a.next();
139
+ _j.label = 3;
140
+ case 3:
141
+ if (!!_b.done) return [3 /*break*/, 14];
142
+ _c = __read(_b.value, 2), btrId = _c[0], layout = _c[1];
143
+ lineBatches = [];
144
+ meshBatches = [];
145
+ _j.label = 4;
146
+ case 4:
147
+ _j.trys.push([4, 9, 10, 11]);
148
+ _d = (e_1 = void 0, __values(layout.layers)), _e = _d.next();
149
+ _j.label = 5;
150
+ case 5:
151
+ if (!!_e.done) return [3 /*break*/, 8];
152
+ _f = __read(_e.value, 2), layer = _f[1];
153
+ collected = collectBatchesFromObject3D(layer.internalObject);
154
+ lineBatches.push.apply(lineBatches, __spreadArray([], __read(collected.lineBatches), false));
155
+ meshBatches.push.apply(meshBatches, __spreadArray([], __read(collected.meshBatches), false));
156
+ return [4 /*yield*/, yieldToMain()];
157
+ case 6:
158
+ _j.sent();
159
+ _j.label = 7;
160
+ case 7:
161
+ _e = _d.next();
162
+ return [3 /*break*/, 5];
163
+ case 8: return [3 /*break*/, 11];
164
+ case 9:
165
+ e_1_1 = _j.sent();
166
+ e_1 = { error: e_1_1 };
167
+ return [3 /*break*/, 11];
168
+ case 10:
169
+ try {
170
+ if (_e && !_e.done && (_h = _d.return)) _h.call(_d);
171
+ }
172
+ finally { if (e_1) throw e_1.error; }
173
+ return [7 /*endfinally*/];
174
+ case 11:
175
+ layouts.push({
176
+ btrId: btrId,
177
+ name: resolveLayoutName(database, btrId),
178
+ isModelSpace: btrId === scene.modelSpaceBtrId,
179
+ lineBatches: lineBatches,
180
+ meshBatches: meshBatches,
181
+ osnap: buildOsnapCatalog(database, btrId)
182
+ });
183
+ return [4 /*yield*/, yieldToMain()];
184
+ case 12:
185
+ _j.sent();
186
+ _j.label = 13;
187
+ case 13:
188
+ _b = _a.next();
189
+ return [3 /*break*/, 3];
190
+ case 14: return [3 /*break*/, 17];
191
+ case 15:
192
+ e_2_1 = _j.sent();
193
+ e_2 = { error: e_2_1 };
194
+ return [3 /*break*/, 17];
195
+ case 16:
196
+ try {
197
+ if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
198
+ }
199
+ finally { if (e_2) throw e_2.error; }
200
+ return [7 /*endfinally*/];
201
+ case 17: return [2 /*return*/, {
202
+ version: ACEX_SNAPSHOT_VERSION,
203
+ meta: buildSnapshotMeta(meta, options),
204
+ layers: layers,
205
+ layouts: layouts,
206
+ activeLayoutBtrId: scene.activeLayoutBtrId || scene.modelSpaceBtrId
207
+ }];
208
+ }
209
+ });
210
+ });
211
+ };
212
+ /**
213
+ * Synchronous implementation shared by {@link build} and {@link buildAsync}.
214
+ *
215
+ * @param scene - Current renderer scene.
216
+ * @param database - Open drawing database.
217
+ * @param options - Snapshot overrides.
218
+ * @returns A complete v1 snapshot.
219
+ */
220
+ AcApHtmlSnapshotBuilder.prototype.buildSync = function (scene, database, options) {
221
+ var meta = buildViewerMetadata(database, {
222
+ title: options.title,
223
+ background: options.background
224
+ });
225
+ var layers = [];
226
+ scene.layers.forEach(function (layer) {
227
+ var _a;
228
+ layers.push({
229
+ name: layer.name,
230
+ color: (_a = layer.color.RGB) !== null && _a !== void 0 ? _a : 0xffffff,
231
+ visible: !layer.isOff && !layer.isFrozen
232
+ });
233
+ });
234
+ var layouts = [];
235
+ scene.layouts.forEach(function (layout, btrId) {
236
+ var _a = collectBatchesFromObject3D(layout.internalObject), lineBatches = _a.lineBatches, meshBatches = _a.meshBatches;
237
+ layouts.push({
238
+ btrId: btrId,
239
+ name: resolveLayoutName(database, btrId),
240
+ isModelSpace: btrId === scene.modelSpaceBtrId,
241
+ lineBatches: lineBatches,
242
+ meshBatches: meshBatches,
243
+ osnap: buildOsnapCatalog(database, btrId)
244
+ });
245
+ });
246
+ return {
247
+ version: ACEX_SNAPSHOT_VERSION,
248
+ meta: buildSnapshotMeta(meta, options),
249
+ layers: layers,
250
+ layouts: layouts,
251
+ activeLayoutBtrId: scene.activeLayoutBtrId || scene.modelSpaceBtrId
252
+ };
253
+ };
254
+ return AcApHtmlSnapshotBuilder;
255
+ }());
256
+ export { AcApHtmlSnapshotBuilder };
257
+ /**
258
+ * Merges database-derived viewer metadata with export-time options.
259
+ *
260
+ * @param meta - Extents, units, and background from {@link buildViewerMetadata}.
261
+ * @param options - User overrides (title is taken from `meta`; locale from options).
262
+ * @returns The `meta` block stored on {@link AcExSnapshotV1}.
263
+ */
264
+ function buildSnapshotMeta(meta, options) {
265
+ var _a;
266
+ return {
267
+ title: meta.title,
268
+ createdAt: new Date().toISOString(),
269
+ extents: meta.extents,
270
+ units: meta.units,
271
+ background: meta.background,
272
+ locale: (_a = options.locale) !== null && _a !== void 0 ? _a : AcApI18n.currentLocale
273
+ };
274
+ }
275
+ /**
276
+ * Resolves a block table record object id to its layout/block name.
277
+ *
278
+ * @param database - Drawing whose block table is searched.
279
+ * @param btrId - Object id of the layout's owning block table record.
280
+ * @returns The record name, or `btrId` if no matching block is found.
281
+ */
282
+ function resolveLayoutName(database, btrId) {
283
+ var e_3, _a;
284
+ try {
285
+ for (var _b = __values(database.tables.blockTable.newIterator()), _c = _b.next(); !_c.done; _c = _b.next()) {
286
+ var block = _c.value;
287
+ if (block.objectId === btrId) {
288
+ return block.name;
289
+ }
290
+ }
291
+ }
292
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
293
+ finally {
294
+ try {
295
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
296
+ }
297
+ finally { if (e_3) throw e_3.error; }
298
+ }
299
+ return btrId;
300
+ }
301
+ //# sourceMappingURL=AcApHtmlSnapshotBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApHtmlSnapshotBuilder.js","sourceRoot":"","sources":["../../../src/command/convert/AcApHtmlSnapshotBuilder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,qBAAqB,EAMrB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAwBxC;;;;;;GAMG;AACH;IAAA;IAmIA,CAAC;IAlIC;;;;;;;;;OASG;IACH,uCAAK,GAAL,UACE,KAAgB,EAChB,QAAsB,EACtB,OAA4C;QAA5C,wBAAA,EAAA,YAA4C;QAE5C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAED;;;;;;;;;;OAUG;IACG,4CAAU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AK,KAAK,EAAE,CAAC;gBAC7B,OAAO,KAAK,CAAC,IAAI,CAAA;YACnB,CAAC;QACH,CAAC;;;;;;;;;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -6,22 +6,6 @@ import { AcGeBox2d } from '@mlightcad/data-model';
6
6
  * to PNG format and download it as a file. It renders the current view
7
7
  * using WebGLRenderTarget for optimal performance without requiring
8
8
  * preserveDrawingBuffer to be enabled on the renderer.
9
- *
10
- * The conversion process:
11
- * 1. Gets the current view and its associated renderer, scene, and camera
12
- * 2. Creates an offscreen render target for pixel capture
13
- * 3. Renders the scene to the render target
14
- * 4. Reads the pixel data and flips it vertically (WebGL renders upside down)
15
- * 5. Creates a canvas, draws the pixel data, and exports as PNG
16
- * 6. Triggers a download of the PNG file
17
- *
18
- * @example
19
- * ```typescript
20
- * const converter = new AcApPngConvertor();
21
- *
22
- * // Convert and download current drawing as PNG
23
- * converter.convert();
24
- * ```
25
9
  */
26
10
  export declare class AcApPngConvertor {
27
11
  /**
@@ -36,26 +20,27 @@ export declare class AcApPngConvertor {
36
20
  * - Exports as PNG and downloads with timestamp-based filename
37
21
  *
38
22
  * @param bounds - Optional world coordinate bounding box to export.
39
- * If provided, the camera will zoom to fit this region.
40
- * If not provided, exports the current view.
41
- * @param long_side - Optional maximum dimension (width or height) in pixels for the output PNG.
42
- * The other dimension is calculated based on the aspect ratio of bounds.
43
- * If not provided, uses the current view dimensions.
44
- * @example
45
- * ```typescript
46
- * const converter = new AcApPngConvertor();
47
- * converter.convert(); // Downloads the drawing as PNG
48
- * ```
49
- *
50
- * @example
51
- * ```typescript
52
- * // Export a specific region
53
- * const bounds = new AcGeBox2d(new AcGePoint2d(0, 0), new AcGePoint2d(100, 100));
54
- * const converter = new AcApPngConvertor();
55
- * converter.convert(bounds); // Downloads the specified region as PNG
56
- * ```
23
+ * If provided, the camera will zoom to fit this region.
24
+ * If not provided, exports the current view.
25
+ * @param longSide - Optional maximum dimension (width or height) in pixels.
26
+ */
27
+ convert(bounds?: AcGeBox2d, longSide?: number): void;
28
+ /**
29
+ * Resolves a pixel output size from a long-side target and aspect ratio.
30
+ */
31
+ private resolveOutputSize;
32
+ /**
33
+ * Computes render size using source aspect so final target can be center-cropped.
34
+ */
35
+ private resolveRenderSizeForCenterCrop;
36
+ /**
37
+ * Center-crops an RGBA pixel buffer from source to destination size.
38
+ */
39
+ private cropPixelsCentered;
40
+ /**
41
+ * Returns the world-space aspect ratio of bounds.
57
42
  */
58
- convert(bounds?: AcGeBox2d, long_side?: number): void;
43
+ private getBoundsAspect;
59
44
  /**
60
45
  * Flips pixel data vertically to correct WebGL's upside-down rendering.
61
46
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApPngConvertor.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApPngConvertor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,uBAAuB,CAAA;AAM/D;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM;IAmH7C;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAqBzB;;OAEG;IACH,OAAO,CAAC,8BAA8B;IAiCtC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAyB1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAQvB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,oBAAoB;IAgB5B;;;;;;;;OAQG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uBAAuB;CAchC"}
@@ -1,6 +1,6 @@
1
1
  import { AcGeVector2d } from '@mlightcad/data-model';
2
2
  import * as THREE from 'three';
3
- import { AcApDocManager } from '../app';
3
+ import { AcApDocManager } from '../../app';
4
4
  /**
5
5
  * Utility class for converting CAD drawings to PNG format.
6
6
  *
@@ -8,22 +8,6 @@ import { AcApDocManager } from '../app';
8
8
  * to PNG format and download it as a file. It renders the current view
9
9
  * using WebGLRenderTarget for optimal performance without requiring
10
10
  * preserveDrawingBuffer to be enabled on the renderer.
11
- *
12
- * The conversion process:
13
- * 1. Gets the current view and its associated renderer, scene, and camera
14
- * 2. Creates an offscreen render target for pixel capture
15
- * 3. Renders the scene to the render target
16
- * 4. Reads the pixel data and flips it vertically (WebGL renders upside down)
17
- * 5. Creates a canvas, draws the pixel data, and exports as PNG
18
- * 6. Triggers a download of the PNG file
19
- *
20
- * @example
21
- * ```typescript
22
- * const converter = new AcApPngConvertor();
23
- *
24
- * // Convert and download current drawing as PNG
25
- * converter.convert();
26
- * ```
27
11
  */
28
12
  var AcApPngConvertor = /** @class */ (function () {
29
13
  function AcApPngConvertor() {
@@ -40,26 +24,11 @@ var AcApPngConvertor = /** @class */ (function () {
40
24
  * - Exports as PNG and downloads with timestamp-based filename
41
25
  *
42
26
  * @param bounds - Optional world coordinate bounding box to export.
43
- * If provided, the camera will zoom to fit this region.
44
- * If not provided, exports the current view.
45
- * @param long_side - Optional maximum dimension (width or height) in pixels for the output PNG.
46
- * The other dimension is calculated based on the aspect ratio of bounds.
47
- * If not provided, uses the current view dimensions.
48
- * @example
49
- * ```typescript
50
- * const converter = new AcApPngConvertor();
51
- * converter.convert(); // Downloads the drawing as PNG
52
- * ```
53
- *
54
- * @example
55
- * ```typescript
56
- * // Export a specific region
57
- * const bounds = new AcGeBox2d(new AcGePoint2d(0, 0), new AcGePoint2d(100, 100));
58
- * const converter = new AcApPngConvertor();
59
- * converter.convert(bounds); // Downloads the specified region as PNG
60
- * ```
27
+ * If provided, the camera will zoom to fit this region.
28
+ * If not provided, exports the current view.
29
+ * @param longSide - Optional maximum dimension (width or height) in pixels.
61
30
  */
62
- AcApPngConvertor.prototype.convert = function (bounds, long_side) {
31
+ AcApPngConvertor.prototype.convert = function (bounds, longSide) {
63
32
  var view = AcApDocManager.instance.curView;
64
33
  var renderer = view.renderer.internalRenderer;
65
34
  var scene = view.internalScene;
@@ -68,34 +37,31 @@ var AcApPngConvertor = /** @class */ (function () {
68
37
  console.error('[PNGOUT] Scene or camera not available');
69
38
  return;
70
39
  }
71
- var outputWidth = view.width;
72
- var outputHeight = view.height;
73
- if (long_side && bounds) {
74
- var size = new AcGeVector2d();
75
- bounds.getSize(size);
76
- var boundsWidth = size.x;
77
- var boundsHeight = size.y;
78
- var boundsAspect = boundsWidth / boundsHeight;
79
- if (boundsAspect > 1) {
80
- outputWidth = long_side;
81
- outputHeight = Math.round(long_side / boundsAspect);
82
- }
83
- else {
84
- outputHeight = long_side;
85
- outputWidth = Math.round(long_side * boundsAspect);
86
- }
40
+ var viewAspect = view.width / Math.max(view.height, 1);
41
+ var targetAspect = bounds ? this.getBoundsAspect(bounds) : viewAspect;
42
+ var outputWidth = Math.max(1, Math.round(view.width));
43
+ var outputHeight = Math.max(1, Math.round(view.height));
44
+ if (longSide && longSide > 0) {
45
+ var outputSize = this.resolveOutputSize(longSide, targetAspect);
46
+ outputWidth = outputSize.width;
47
+ outputHeight = outputSize.height;
87
48
  }
88
- // Save original camera state for restoration later
49
+ // Keep stable render path at view aspect, then center-crop to target aspect.
50
+ var renderSize = this.resolveRenderSizeForCenterCrop(outputWidth, outputHeight, viewAspect);
51
+ var renderWidth = renderSize.width;
52
+ var renderHeight = renderSize.height;
53
+ var needsCrop = renderWidth !== outputWidth || renderHeight !== outputHeight;
54
+ // Save original camera state for restoration later (keep legacy fitting path).
89
55
  var originalZoom = camera.zoom;
90
56
  var originalPosition = camera.position.clone();
91
- // If bounds provided, calculate zoom and position to fit the specified region
57
+ // Legacy zoom-based fitting; this path historically produced correct bounds.
92
58
  if (bounds) {
93
59
  var size = new AcGeVector2d();
94
60
  bounds.getSize(size);
95
61
  var center = new AcGeVector2d();
96
62
  bounds.getCenter(center);
97
- var boundsWidth = size.x;
98
- var boundsHeight = size.y;
63
+ var boundsWidth = Math.max(Math.abs(size.x), Number.EPSILON);
64
+ var boundsHeight = Math.max(Math.abs(size.y), Number.EPSILON);
99
65
  var widthRatio = view.width / boundsWidth;
100
66
  var heightRatio = view.height / boundsHeight;
101
67
  var scale = Math.min(widthRatio, heightRatio);
@@ -104,36 +70,98 @@ var AcApPngConvertor = /** @class */ (function () {
104
70
  camera.zoom = scale;
105
71
  camera.updateProjectionMatrix();
106
72
  }
107
- // Create a render target for offscreen rendering
108
- var renderTarget = new THREE.WebGLRenderTarget(outputWidth, outputHeight, {
73
+ var renderTarget = new THREE.WebGLRenderTarget(renderWidth, renderHeight, {
109
74
  minFilter: THREE.LinearFilter,
110
75
  magFilter: THREE.LinearFilter,
111
76
  format: THREE.RGBAFormat,
112
77
  type: THREE.UnsignedByteType
113
78
  });
114
- // Store the original render target
115
79
  var originalRenderTarget = renderer.getRenderTarget();
116
- // Render to the offscreen target
117
80
  renderer.setRenderTarget(renderTarget);
118
81
  renderer.render(scene, camera);
119
- // Read pixels from the render target
120
- var pixels = new Uint8Array(outputWidth * outputHeight * 4);
121
- renderer.readRenderTargetPixels(renderTarget, 0, 0, outputWidth, outputHeight, pixels);
122
- // Restore the original render target
82
+ var pixels = new Uint8Array(renderWidth * renderHeight * 4);
83
+ renderer.readRenderTargetPixels(renderTarget, 0, 0, renderWidth, renderHeight, pixels);
123
84
  renderer.setRenderTarget(originalRenderTarget);
124
- // Clean up the render target
125
85
  renderTarget.dispose();
126
- // Restore original camera state
127
86
  camera.zoom = originalZoom;
128
87
  camera.position.copy(originalPosition);
129
88
  camera.updateProjectionMatrix();
130
- // Flip the image vertically (WebGL renders upside down)
131
- var flippedPixels = this.flipPixelsVertically(pixels, outputWidth, outputHeight);
132
- // Create canvas and draw the pixels
133
- var canvas = this.createCanvasFromPixels(flippedPixels, outputWidth, outputHeight);
134
- // Export to PNG and download
89
+ var flippedPixels = this.flipPixelsVertically(pixels, renderWidth, renderHeight);
90
+ var finalPixels = needsCrop
91
+ ? this.cropPixelsCentered(flippedPixels, renderWidth, renderHeight, outputWidth, outputHeight)
92
+ : flippedPixels;
93
+ var canvas = this.createCanvasFromPixels(finalPixels, outputWidth, outputHeight);
135
94
  this.createFileAndDownloadIt(canvas);
136
95
  };
96
+ /**
97
+ * Resolves a pixel output size from a long-side target and aspect ratio.
98
+ */
99
+ AcApPngConvertor.prototype.resolveOutputSize = function (longSide, aspect) {
100
+ var clampedLongSide = Math.max(1, Math.round(longSide));
101
+ var safeAspect = Number.isFinite(aspect) && aspect > Number.EPSILON ? aspect : 1;
102
+ if (safeAspect >= 1) {
103
+ return {
104
+ width: clampedLongSide,
105
+ height: Math.max(1, Math.round(clampedLongSide / safeAspect))
106
+ };
107
+ }
108
+ return {
109
+ width: Math.max(1, Math.round(clampedLongSide * safeAspect)),
110
+ height: clampedLongSide
111
+ };
112
+ };
113
+ /**
114
+ * Computes render size using source aspect so final target can be center-cropped.
115
+ */
116
+ AcApPngConvertor.prototype.resolveRenderSizeForCenterCrop = function (targetWidth, targetHeight, sourceAspect) {
117
+ var safeSourceAspect = Number.isFinite(sourceAspect) && sourceAspect > Number.EPSILON
118
+ ? sourceAspect
119
+ : 1;
120
+ var targetAspect = targetWidth / Math.max(targetHeight, 1);
121
+ if (Math.abs(targetAspect - safeSourceAspect) < 1e-6) {
122
+ return { width: targetWidth, height: targetHeight };
123
+ }
124
+ if (safeSourceAspect > targetAspect) {
125
+ // Source is wider; extend width then crop left/right.
126
+ return {
127
+ width: Math.max(targetWidth, Math.ceil(targetHeight * safeSourceAspect)),
128
+ height: targetHeight
129
+ };
130
+ }
131
+ // Source is taller/narrower; extend height then crop top/bottom.
132
+ return {
133
+ width: targetWidth,
134
+ height: Math.max(targetHeight, Math.ceil(targetWidth / safeSourceAspect))
135
+ };
136
+ };
137
+ /**
138
+ * Center-crops an RGBA pixel buffer from source to destination size.
139
+ */
140
+ AcApPngConvertor.prototype.cropPixelsCentered = function (pixels, srcWidth, srcHeight, dstWidth, dstHeight) {
141
+ if (srcWidth === dstWidth && srcHeight === dstHeight) {
142
+ return pixels;
143
+ }
144
+ var offsetX = Math.floor((srcWidth - dstWidth) / 2);
145
+ var offsetY = Math.floor((srcHeight - dstHeight) / 2);
146
+ var cropped = new Uint8Array(dstWidth * dstHeight * 4);
147
+ for (var y = 0; y < dstHeight; y++) {
148
+ var srcStart = ((y + offsetY) * srcWidth + offsetX) * 4;
149
+ var srcEnd = srcStart + dstWidth * 4;
150
+ var dstStart = y * dstWidth * 4;
151
+ cropped.set(pixels.subarray(srcStart, srcEnd), dstStart);
152
+ }
153
+ return cropped;
154
+ };
155
+ /**
156
+ * Returns the world-space aspect ratio of bounds.
157
+ */
158
+ AcApPngConvertor.prototype.getBoundsAspect = function (bounds) {
159
+ var size = new AcGeVector2d();
160
+ bounds.getSize(size);
161
+ var width = Math.max(Math.abs(size.x), Number.EPSILON);
162
+ var height = Math.max(Math.abs(size.y), Number.EPSILON);
163
+ return width / height;
164
+ };
137
165
  /**
138
166
  * Flips pixel data vertically to correct WebGL's upside-down rendering.
139
167
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApPngConvertor.js","sourceRoot":"","sources":["../../../src/command/convert/AcApPngConvertor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG1C;;;;;;;GAOG;AACH;IAAA;IAoTA,CAAC;IAnTC;;;;;;;;;;;;;;;OAeG;IACH,kCAAO,GAAP,UAAQ,MAAkB,EAAE,QAAiB;QAC3C,IAAM,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAqB,CAAA;QAC1D,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAA;QAC/C,IAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAA;QAChC,IAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAA;QAElC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,EAAE,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G,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QACpD,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1B,GAAG,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;;;;;;OAUG;IACK,kDAAuB,GAA/B,UAAgC,MAAyB;QACvD,gCAAgC;QAChC,IAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;QAE7C,kDAAkD;QAClD,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAChD,YAAY,CAAC,IAAI,GAAG,OAAO,CAAA;QAC3B,YAAY,CAAC,QAAQ,GAAG,qBAAc,IAAI,CAAC,GAAG,EAAE,SAAM,CAAA;QAEtD,uBAAuB;QACvB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QACvC,YAAY,CAAC,KAAK,EAAE,CAAA;QACpB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;IACzC,CAAC;IACH,uBAAC;AAAD,CAAC,AApTD,IAoTC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSvgConvertor.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApSvgConvertor.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;OAcG;IACH,OAAO;IAUP;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,uBAAuB;CAoBhC"}
@@ -10,7 +10,7 @@ var __values = (this && this.__values) || function(o) {
10
10
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
11
  };
12
12
  import { AcSvgRenderer } from '@mlightcad/svg-renderer';
13
- import { AcApDocManager } from '../app';
13
+ import { AcApDocManager } from '../../app';
14
14
  /**
15
15
  * Utility class for converting CAD drawings to SVG format.
16
16
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSvgConvertor.js","sourceRoot":"","sources":["../../../src/command/convert/AcApSvgConvertor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAAA;IA0DA,CAAC;IAzDC;;;;;;;;;;;;;;OAcG;IACH,kCAAO,GAAP;;QACE,IAAM,QAAQ,GACZ,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA;QACzF,IAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAA;;YACpC,KAAqB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE,CAAC;gBAA3B,IAAM,MAAM,qBAAA;gBACf,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;YAC5B,CAAC;;;;;;;;;QACD,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IACjD,CAAC;IAED;;;;;;;;;;;OAWG;IACK,kDAAuB,GAA/B,UAAgC,UAAkB;QAChD,sCAAsC;QACtC,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE;YACrC,IAAI,EAAE,6BAA6B;SACpC,CAAC,CAAA;QAEF,4BAA4B;QAC5B,IAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;QAExC,kDAAkD;QAClD,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAChD,YAAY,CAAC,IAAI,GAAG,GAAG,CAAA;QACvB,YAAY,CAAC,QAAQ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