@mlightcad/cad-simple-viewer 1.4.13 → 1.5.0

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 (406) hide show
  1. package/dist/index.js +16972 -11328
  2. package/dist/index.umd.cjs +158 -34
  3. package/dist/libredwg-parser-worker.js +4828 -4464
  4. package/dist/mtext-renderer-worker.js +3587 -3534
  5. package/lib/app/AcApDocManager.d.ts +14 -5
  6. package/lib/app/AcApDocManager.d.ts.map +1 -1
  7. package/lib/app/AcApDocManager.js +62 -19
  8. package/lib/app/AcApDocManager.js.map +1 -1
  9. package/lib/command/AcApLogCmd.d.ts +1 -1
  10. package/lib/command/AcApLogCmd.d.ts.map +1 -1
  11. package/lib/command/AcApLogCmd.js +1 -1
  12. package/lib/command/AcApLogCmd.js.map +1 -1
  13. package/lib/command/AcApOpenCmd.d.ts +1 -1
  14. package/lib/command/AcApOpenCmd.d.ts.map +1 -1
  15. package/lib/command/AcApOpenCmd.js +1 -2
  16. package/lib/command/AcApOpenCmd.js.map +1 -1
  17. package/lib/command/AcApPanCmd.d.ts +1 -1
  18. package/lib/command/AcApPanCmd.d.ts.map +1 -1
  19. package/lib/command/AcApPanCmd.js +1 -2
  20. package/lib/command/AcApPanCmd.js.map +1 -1
  21. package/lib/command/AcApQNewCmd.d.ts +1 -1
  22. package/lib/command/AcApQNewCmd.d.ts.map +1 -1
  23. package/lib/command/AcApQNewCmd.js +1 -1
  24. package/lib/command/AcApQNewCmd.js.map +1 -1
  25. package/lib/command/AcApRegenCmd.d.ts +1 -1
  26. package/lib/command/AcApRegenCmd.d.ts.map +1 -1
  27. package/lib/command/AcApRegenCmd.js +1 -1
  28. package/lib/command/AcApRegenCmd.js.map +1 -1
  29. package/lib/command/AcApSelectCmd.d.ts +1 -1
  30. package/lib/command/AcApSelectCmd.d.ts.map +1 -1
  31. package/lib/command/AcApSelectCmd.js +1 -2
  32. package/lib/command/AcApSelectCmd.js.map +1 -1
  33. package/lib/command/{AcApConvertToDxfCmd.d.ts → convert/AcApConvertToDxfCmd.d.ts} +2 -2
  34. package/lib/command/convert/AcApConvertToDxfCmd.d.ts.map +1 -0
  35. package/lib/command/{AcApConvertToDxfCmd.js → convert/AcApConvertToDxfCmd.js} +1 -1
  36. package/lib/command/convert/AcApConvertToDxfCmd.js.map +1 -0
  37. package/lib/command/{AcApConvertToPngCmd.d.ts → convert/AcApConvertToPngCmd.d.ts} +23 -5
  38. package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -0
  39. package/lib/command/{AcApConvertToPngCmd.js → convert/AcApConvertToPngCmd.js} +88 -15
  40. package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -0
  41. package/lib/command/{AcApConvertToSvgCmd.d.ts → convert/AcApConvertToSvgCmd.d.ts} +2 -2
  42. package/lib/command/convert/AcApConvertToSvgCmd.d.ts.map +1 -0
  43. package/lib/command/{AcApConvertToSvgCmd.js → convert/AcApConvertToSvgCmd.js} +1 -1
  44. package/lib/command/convert/AcApConvertToSvgCmd.js.map +1 -0
  45. package/lib/command/convert/AcApDxfConvertor.d.ts.map +1 -0
  46. package/lib/command/{AcApDxfConvertor.js → convert/AcApDxfConvertor.js} +1 -1
  47. package/lib/command/convert/AcApDxfConvertor.js.map +1 -0
  48. package/lib/command/{AcApPngConvertor.d.ts → convert/AcApPngConvertor.d.ts} +20 -35
  49. package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -0
  50. package/lib/command/{AcApPngConvertor.js → convert/AcApPngConvertor.js} +99 -71
  51. package/lib/command/convert/AcApPngConvertor.js.map +1 -0
  52. package/lib/command/convert/AcApSvgConvertor.d.ts.map +1 -0
  53. package/lib/command/{AcApSvgConvertor.js → convert/AcApSvgConvertor.js} +1 -1
  54. package/lib/command/convert/AcApSvgConvertor.js.map +1 -0
  55. package/lib/command/convert/index.d.ts +6 -0
  56. package/lib/command/convert/index.d.ts.map +1 -0
  57. package/lib/command/convert/index.js +6 -0
  58. package/lib/command/convert/index.js.map +1 -0
  59. package/lib/command/draw/AcApArcCmd.d.ts +297 -0
  60. package/lib/command/draw/AcApArcCmd.d.ts.map +1 -0
  61. package/lib/command/{AcApArcCmd.js → draw/AcApArcCmd.js} +793 -12
  62. package/lib/command/draw/AcApArcCmd.js.map +1 -0
  63. package/lib/command/{AcApCircleCmd.d.ts → draw/AcApCircleCmd.d.ts} +2 -2
  64. package/lib/command/draw/AcApCircleCmd.d.ts.map +1 -0
  65. package/lib/command/{AcApCircleCmd.js → draw/AcApCircleCmd.js} +3 -3
  66. package/lib/command/draw/AcApCircleCmd.js.map +1 -0
  67. package/lib/command/{AcApDimLinearCmd.d.ts → draw/AcApDimLinearCmd.d.ts} +2 -2
  68. package/lib/command/draw/AcApDimLinearCmd.d.ts.map +1 -0
  69. package/lib/command/{AcApDimLinearCmd.js → draw/AcApDimLinearCmd.js} +3 -3
  70. package/lib/command/draw/AcApDimLinearCmd.js.map +1 -0
  71. package/lib/command/{AcApEllipseCmd.d.ts → draw/AcApEllipseCmd.d.ts} +2 -2
  72. package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -0
  73. package/lib/command/{AcApEllipseCmd.js → draw/AcApEllipseCmd.js} +3 -3
  74. package/lib/command/draw/AcApEllipseCmd.js.map +1 -0
  75. package/lib/command/{AcApHatchCmd.d.ts → draw/AcApHatchCmd.d.ts} +54 -17
  76. package/lib/command/draw/AcApHatchCmd.d.ts.map +1 -0
  77. package/lib/command/{AcApHatchCmd.js → draw/AcApHatchCmd.js} +122 -30
  78. package/lib/command/draw/AcApHatchCmd.js.map +1 -0
  79. package/lib/command/{AcApLineCmd.d.ts → draw/AcApLineCmd.d.ts} +2 -2
  80. package/lib/command/draw/AcApLineCmd.d.ts.map +1 -0
  81. package/lib/command/{AcApLineCmd.js → draw/AcApLineCmd.js} +3 -3
  82. package/lib/command/draw/AcApLineCmd.js.map +1 -0
  83. package/lib/command/draw/AcApMLineCmd.d.ts +31 -0
  84. package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -0
  85. package/lib/command/draw/AcApMLineCmd.js +531 -0
  86. package/lib/command/draw/AcApMLineCmd.js.map +1 -0
  87. package/lib/command/{AcApMTextCmd.d.ts → draw/AcApMTextCmd.d.ts} +2 -2
  88. package/lib/command/draw/AcApMTextCmd.d.ts.map +1 -0
  89. package/lib/command/{AcApMTextCmd.js → draw/AcApMTextCmd.js} +3 -3
  90. package/lib/command/draw/AcApMTextCmd.js.map +1 -0
  91. package/lib/command/draw/AcApPointCmd.d.ts +16 -0
  92. package/lib/command/draw/AcApPointCmd.d.ts.map +1 -0
  93. package/lib/command/draw/AcApPointCmd.js +98 -0
  94. package/lib/command/draw/AcApPointCmd.js.map +1 -0
  95. package/lib/command/{AcApPolygonCmd.d.ts → draw/AcApPolygonCmd.d.ts} +2 -2
  96. package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -0
  97. package/lib/command/{AcApPolygonCmd.js → draw/AcApPolygonCmd.js} +3 -3
  98. package/lib/command/draw/AcApPolygonCmd.js.map +1 -0
  99. package/lib/command/{AcApPolylineCmd.d.ts → draw/AcApPolylineCmd.d.ts} +2 -2
  100. package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -0
  101. package/lib/command/{AcApPolylineCmd.js → draw/AcApPolylineCmd.js} +3 -3
  102. package/lib/command/draw/AcApPolylineCmd.js.map +1 -0
  103. package/lib/command/draw/AcApRayCmd.d.ts +10 -0
  104. package/lib/command/draw/AcApRayCmd.d.ts.map +1 -0
  105. package/lib/command/draw/AcApRayCmd.js +145 -0
  106. package/lib/command/draw/AcApRayCmd.js.map +1 -0
  107. package/lib/command/{AcApRectCmd.d.ts → draw/AcApRectCmd.d.ts} +2 -2
  108. package/lib/command/draw/AcApRectCmd.d.ts.map +1 -0
  109. package/lib/command/{AcApRectCmd.js → draw/AcApRectCmd.js} +3 -3
  110. package/lib/command/draw/AcApRectCmd.js.map +1 -0
  111. package/lib/command/{AcApSplineCmd.d.ts → draw/AcApSplineCmd.d.ts} +2 -2
  112. package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -0
  113. package/lib/command/{AcApSplineCmd.js → draw/AcApSplineCmd.js} +3 -3
  114. package/lib/command/draw/AcApSplineCmd.js.map +1 -0
  115. package/lib/command/draw/AcApXLineCmd.d.ts +25 -0
  116. package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -0
  117. package/lib/command/draw/AcApXLineCmd.js +210 -0
  118. package/lib/command/draw/AcApXLineCmd.js.map +1 -0
  119. package/lib/command/draw/index.d.ts +16 -0
  120. package/lib/command/draw/index.d.ts.map +1 -0
  121. package/lib/command/draw/index.js +16 -0
  122. package/lib/command/draw/index.js.map +1 -0
  123. package/lib/command/index.d.ts +6 -32
  124. package/lib/command/index.d.ts.map +1 -1
  125. package/lib/command/index.js +6 -32
  126. package/lib/command/index.js.map +1 -1
  127. package/lib/command/layer/AcApLayerCloseCmd.d.ts +23 -0
  128. package/lib/command/layer/AcApLayerCloseCmd.d.ts.map +1 -0
  129. package/lib/command/layer/AcApLayerCloseCmd.js +86 -0
  130. package/lib/command/layer/AcApLayerCloseCmd.js.map +1 -0
  131. package/lib/command/{AcApLayerCmd.d.ts → layer/AcApLayerCmd.d.ts} +3 -5
  132. package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -0
  133. package/lib/command/{AcApLayerCmd.js → layer/AcApLayerCmd.js} +5 -8
  134. package/lib/command/layer/AcApLayerCmd.js.map +1 -0
  135. package/lib/command/layer/AcApLayerCurCmd.d.ts +43 -0
  136. package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -0
  137. package/lib/command/layer/AcApLayerCurCmd.js +183 -0
  138. package/lib/command/layer/AcApLayerCurCmd.js.map +1 -0
  139. package/lib/command/layer/AcApLayerDelCmd.d.ts +112 -0
  140. package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -0
  141. package/lib/command/layer/AcApLayerDelCmd.js +446 -0
  142. package/lib/command/layer/AcApLayerDelCmd.js.map +1 -0
  143. package/lib/command/layer/AcApLayerFreezeCmd.d.ts +103 -0
  144. package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -0
  145. package/lib/command/layer/AcApLayerFreezeCmd.js +398 -0
  146. package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -0
  147. package/lib/command/layer/AcApLayerIsoCmd.d.ts +99 -0
  148. package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -0
  149. package/lib/command/layer/AcApLayerIsoCmd.js +485 -0
  150. package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -0
  151. package/lib/command/layer/AcApLayerIsoState.d.ts +68 -0
  152. package/lib/command/layer/AcApLayerIsoState.d.ts.map +1 -0
  153. package/lib/command/layer/AcApLayerIsoState.js +53 -0
  154. package/lib/command/layer/AcApLayerIsoState.js.map +1 -0
  155. package/lib/command/layer/AcApLayerLockCmd.d.ts +50 -0
  156. package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -0
  157. package/lib/command/layer/AcApLayerLockCmd.js +175 -0
  158. package/lib/command/layer/AcApLayerLockCmd.js.map +1 -0
  159. package/lib/command/layer/AcApLayerOffCmd.d.ts +95 -0
  160. package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -0
  161. package/lib/command/layer/AcApLayerOffCmd.js +384 -0
  162. package/lib/command/layer/AcApLayerOffCmd.js.map +1 -0
  163. package/lib/command/layer/AcApLayerOnCmd.d.ts +30 -0
  164. package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -0
  165. package/lib/command/layer/AcApLayerOnCmd.js +138 -0
  166. package/lib/command/layer/AcApLayerOnCmd.js.map +1 -0
  167. package/lib/command/layer/AcApLayerPCmd.d.ts +83 -0
  168. package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -0
  169. package/lib/command/layer/AcApLayerPCmd.js +241 -0
  170. package/lib/command/layer/AcApLayerPCmd.js.map +1 -0
  171. package/lib/command/layer/AcApLayerThawCmd.d.ts +37 -0
  172. package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -0
  173. package/lib/command/layer/AcApLayerThawCmd.js +150 -0
  174. package/lib/command/layer/AcApLayerThawCmd.js.map +1 -0
  175. package/lib/command/layer/AcApLayerUnisoCmd.d.ts +52 -0
  176. package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -0
  177. package/lib/command/layer/AcApLayerUnisoCmd.js +199 -0
  178. package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -0
  179. package/lib/command/layer/AcApLayerUnlockCmd.d.ts +50 -0
  180. package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -0
  181. package/lib/command/layer/AcApLayerUnlockCmd.js +175 -0
  182. package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -0
  183. package/lib/command/layer/index.d.ts +14 -0
  184. package/lib/command/layer/index.d.ts.map +1 -0
  185. package/lib/command/layer/index.js +14 -0
  186. package/lib/command/layer/index.js.map +1 -0
  187. package/lib/command/{AcApClearMeasurementsCmd.d.ts → measure/AcApClearMeasurementsCmd.d.ts} +2 -2
  188. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -0
  189. package/lib/command/{AcApClearMeasurementsCmd.js → measure/AcApClearMeasurementsCmd.js} +1 -1
  190. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -0
  191. package/lib/command/{AcApMeasureAngleCmd.d.ts → measure/AcApMeasureAngleCmd.d.ts} +2 -2
  192. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -0
  193. package/lib/command/{AcApMeasureAngleCmd.js → measure/AcApMeasureAngleCmd.js} +3 -3
  194. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -0
  195. package/lib/command/{AcApMeasureArcCmd.d.ts → measure/AcApMeasureArcCmd.d.ts} +2 -2
  196. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -0
  197. package/lib/command/{AcApMeasureArcCmd.js → measure/AcApMeasureArcCmd.js} +3 -3
  198. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -0
  199. package/lib/command/{AcApMeasureAreaCmd.d.ts → measure/AcApMeasureAreaCmd.d.ts} +2 -2
  200. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -0
  201. package/lib/command/{AcApMeasureAreaCmd.js → measure/AcApMeasureAreaCmd.js} +3 -3
  202. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -0
  203. package/lib/command/{AcApMeasureDistanceCmd.d.ts → measure/AcApMeasureDistanceCmd.d.ts} +2 -2
  204. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -0
  205. package/lib/command/{AcApMeasureDistanceCmd.js → measure/AcApMeasureDistanceCmd.js} +3 -3
  206. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -0
  207. package/lib/command/measure/index.d.ts +6 -0
  208. package/lib/command/measure/index.d.ts.map +1 -0
  209. package/lib/command/measure/index.js +6 -0
  210. package/lib/command/measure/index.js.map +1 -0
  211. package/lib/command/modify/AcApCopyCmd.d.ts +94 -0
  212. package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -0
  213. package/lib/command/modify/AcApCopyCmd.js +549 -0
  214. package/lib/command/modify/AcApCopyCmd.js.map +1 -0
  215. package/lib/command/{AcApEraseCmd.d.ts → modify/AcApEraseCmd.d.ts} +2 -2
  216. package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -0
  217. package/lib/command/{AcApEraseCmd.js → modify/AcApEraseCmd.js} +3 -5
  218. package/lib/command/modify/AcApEraseCmd.js.map +1 -0
  219. package/lib/command/{AcApMoveCmd.d.ts → modify/AcApMoveCmd.d.ts} +2 -2
  220. package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -0
  221. package/lib/command/{AcApMoveCmd.js → modify/AcApMoveCmd.js} +3 -4
  222. package/lib/command/modify/AcApMoveCmd.js.map +1 -0
  223. package/lib/command/modify/AcApRotateCmd.d.ts +81 -0
  224. package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -0
  225. package/lib/command/modify/AcApRotateCmd.js +487 -0
  226. package/lib/command/modify/AcApRotateCmd.js.map +1 -0
  227. package/lib/command/modify/index.d.ts +5 -0
  228. package/lib/command/modify/index.d.ts.map +1 -0
  229. package/lib/command/modify/index.js +5 -0
  230. package/lib/command/modify/index.js.map +1 -0
  231. package/lib/command/{AcApBaseRevCmd.d.ts → review/AcApBaseRevCmd.d.ts} +2 -2
  232. package/lib/command/review/AcApBaseRevCmd.d.ts.map +1 -0
  233. package/lib/command/{AcApBaseRevCmd.js → review/AcApBaseRevCmd.js} +2 -2
  234. package/lib/command/review/AcApBaseRevCmd.js.map +1 -0
  235. package/lib/command/{AcApRevCircleCmd.d.ts → review/AcApRevCircleCmd.d.ts} +1 -1
  236. package/lib/command/review/AcApRevCircleCmd.d.ts.map +1 -0
  237. package/lib/command/{AcApRevCircleCmd.js → review/AcApRevCircleCmd.js} +4 -4
  238. package/lib/command/review/AcApRevCircleCmd.js.map +1 -0
  239. package/lib/command/{AcApRevCloudCmd.d.ts → review/AcApRevCloudCmd.d.ts} +2 -2
  240. package/lib/command/review/AcApRevCloudCmd.d.ts.map +1 -0
  241. package/lib/command/{AcApRevCloudCmd.js → review/AcApRevCloudCmd.js} +3 -3
  242. package/lib/command/review/AcApRevCloudCmd.js.map +1 -0
  243. package/lib/command/{AcApRevRectCmd.d.ts → review/AcApRevRectCmd.d.ts} +1 -1
  244. package/lib/command/review/AcApRevRectCmd.d.ts.map +1 -0
  245. package/lib/command/{AcApRevRectCmd.js → review/AcApRevRectCmd.js} +3 -3
  246. package/lib/command/review/AcApRevRectCmd.js.map +1 -0
  247. package/lib/command/{AcApRevVisibilityCmd.d.ts → review/AcApRevVisibilityCmd.d.ts} +1 -1
  248. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +1 -0
  249. package/lib/command/{AcApRevVisibilityCmd.js → review/AcApRevVisibilityCmd.js} +2 -2
  250. package/lib/command/review/AcApRevVisibilityCmd.js.map +1 -0
  251. package/lib/command/{AcApSketchCmd.d.ts → review/AcApSketchCmd.d.ts} +2 -2
  252. package/lib/command/review/AcApSketchCmd.d.ts.map +1 -0
  253. package/lib/command/{AcApSketchCmd.js → review/AcApSketchCmd.js} +3 -3
  254. package/lib/command/review/AcApSketchCmd.js.map +1 -0
  255. package/lib/command/review/index.d.ts +7 -0
  256. package/lib/command/review/index.d.ts.map +1 -0
  257. package/lib/command/review/index.js +7 -0
  258. package/lib/command/review/index.js.map +1 -0
  259. package/lib/editor/global/eventBus.d.ts +4 -6
  260. package/lib/editor/global/eventBus.d.ts.map +1 -1
  261. package/lib/editor/global/eventBus.js.map +1 -1
  262. package/lib/editor/input/AcEditor.d.ts +17 -0
  263. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  264. package/lib/editor/input/AcEditor.js +23 -0
  265. package/lib/editor/input/AcEditor.js.map +1 -1
  266. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +6 -0
  267. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
  268. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +16 -0
  269. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
  270. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +6 -0
  271. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -1
  272. package/lib/editor/input/prompt/AcEdPromptPointOptions.js +16 -0
  273. package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -1
  274. package/lib/editor/input/ui/AcEdCommandLine.d.ts +25 -23
  275. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  276. package/lib/editor/input/ui/AcEdCommandLine.js +101 -43
  277. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  278. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  279. package/lib/editor/input/ui/AcEdFloatingInput.js +4 -2
  280. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  281. package/lib/editor/input/ui/AcEdInputManager.d.ts +21 -0
  282. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  283. package/lib/editor/input/ui/AcEdInputManager.js +34 -4
  284. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  285. package/lib/editor/input/ui/AcEdMessageType.d.ts +10 -0
  286. package/lib/editor/input/ui/AcEdMessageType.d.ts.map +1 -0
  287. package/lib/editor/input/ui/AcEdMessageType.js +2 -0
  288. package/lib/editor/input/ui/AcEdMessageType.js.map +1 -0
  289. package/lib/editor/input/ui/index.d.ts +1 -0
  290. package/lib/editor/input/ui/index.d.ts.map +1 -1
  291. package/lib/editor/input/ui/index.js +1 -0
  292. package/lib/editor/input/ui/index.js.map +1 -1
  293. package/lib/editor/view/AcEdBaseView.d.ts +3 -8
  294. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  295. package/lib/editor/view/AcEdBaseView.js +3 -5
  296. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  297. package/lib/editor/view/AcEdHoverController.d.ts +2 -3
  298. package/lib/editor/view/AcEdHoverController.d.ts.map +1 -1
  299. package/lib/editor/view/AcEdHoverController.js +7 -0
  300. package/lib/editor/view/AcEdHoverController.js.map +1 -1
  301. package/lib/editor/view/AcEdSelectionAction.d.ts +108 -0
  302. package/lib/editor/view/AcEdSelectionAction.d.ts.map +1 -0
  303. package/lib/editor/view/AcEdSelectionAction.js +74 -0
  304. package/lib/editor/view/AcEdSelectionAction.js.map +1 -0
  305. package/lib/editor/view/index.d.ts +1 -0
  306. package/lib/editor/view/index.d.ts.map +1 -1
  307. package/lib/editor/view/index.js +1 -0
  308. package/lib/editor/view/index.js.map +1 -1
  309. package/lib/i18n/en/command.d.ts +135 -15
  310. package/lib/i18n/en/command.d.ts.map +1 -1
  311. package/lib/i18n/en/command.js +144 -24
  312. package/lib/i18n/en/command.js.map +1 -1
  313. package/lib/i18n/en/jig.d.ts +571 -212
  314. package/lib/i18n/en/jig.d.ts.map +1 -1
  315. package/lib/i18n/en/jig.js +661 -302
  316. package/lib/i18n/en/jig.js.map +1 -1
  317. package/lib/i18n/zh/command.d.ts +135 -15
  318. package/lib/i18n/zh/command.d.ts.map +1 -1
  319. package/lib/i18n/zh/command.js +145 -25
  320. package/lib/i18n/zh/command.js.map +1 -1
  321. package/lib/i18n/zh/jig.d.ts +571 -212
  322. package/lib/i18n/zh/jig.d.ts.map +1 -1
  323. package/lib/i18n/zh/jig.js +660 -301
  324. package/lib/i18n/zh/jig.js.map +1 -1
  325. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +136 -2
  326. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  327. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +154 -16
  328. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  329. package/lib/view/AcTrLayout.d.ts +17 -0
  330. package/lib/view/AcTrLayout.d.ts.map +1 -1
  331. package/lib/view/AcTrLayout.js +34 -2
  332. package/lib/view/AcTrLayout.js.map +1 -1
  333. package/lib/view/AcTrPickResultUtil.d.ts +4 -0
  334. package/lib/view/AcTrPickResultUtil.d.ts.map +1 -0
  335. package/lib/view/AcTrPickResultUtil.js +54 -0
  336. package/lib/view/AcTrPickResultUtil.js.map +1 -0
  337. package/lib/view/AcTrView2d.d.ts +25 -0
  338. package/lib/view/AcTrView2d.d.ts.map +1 -1
  339. package/lib/view/AcTrView2d.js +225 -100
  340. package/lib/view/AcTrView2d.js.map +1 -1
  341. package/package.json +6 -6
  342. package/lib/command/AcApArcCmd.d.ts +0 -140
  343. package/lib/command/AcApArcCmd.d.ts.map +0 -1
  344. package/lib/command/AcApArcCmd.js.map +0 -1
  345. package/lib/command/AcApBaseRevCmd.d.ts.map +0 -1
  346. package/lib/command/AcApBaseRevCmd.js.map +0 -1
  347. package/lib/command/AcApCircleCmd.d.ts.map +0 -1
  348. package/lib/command/AcApCircleCmd.js.map +0 -1
  349. package/lib/command/AcApClearMeasurementsCmd.d.ts.map +0 -1
  350. package/lib/command/AcApClearMeasurementsCmd.js.map +0 -1
  351. package/lib/command/AcApConvertToDxfCmd.d.ts.map +0 -1
  352. package/lib/command/AcApConvertToDxfCmd.js.map +0 -1
  353. package/lib/command/AcApConvertToPngCmd.d.ts.map +0 -1
  354. package/lib/command/AcApConvertToPngCmd.js.map +0 -1
  355. package/lib/command/AcApConvertToSvgCmd.d.ts.map +0 -1
  356. package/lib/command/AcApConvertToSvgCmd.js.map +0 -1
  357. package/lib/command/AcApDimLinearCmd.d.ts.map +0 -1
  358. package/lib/command/AcApDimLinearCmd.js.map +0 -1
  359. package/lib/command/AcApDxfConvertor.d.ts.map +0 -1
  360. package/lib/command/AcApDxfConvertor.js.map +0 -1
  361. package/lib/command/AcApEllipseCmd.d.ts.map +0 -1
  362. package/lib/command/AcApEllipseCmd.js.map +0 -1
  363. package/lib/command/AcApEraseCmd.d.ts.map +0 -1
  364. package/lib/command/AcApEraseCmd.js.map +0 -1
  365. package/lib/command/AcApHatchCmd.d.ts.map +0 -1
  366. package/lib/command/AcApHatchCmd.js.map +0 -1
  367. package/lib/command/AcApLayerCmd.d.ts.map +0 -1
  368. package/lib/command/AcApLayerCmd.js.map +0 -1
  369. package/lib/command/AcApLineCmd.d.ts.map +0 -1
  370. package/lib/command/AcApLineCmd.js.map +0 -1
  371. package/lib/command/AcApMTextCmd.d.ts.map +0 -1
  372. package/lib/command/AcApMTextCmd.js.map +0 -1
  373. package/lib/command/AcApMeasureAngleCmd.d.ts.map +0 -1
  374. package/lib/command/AcApMeasureAngleCmd.js.map +0 -1
  375. package/lib/command/AcApMeasureArcCmd.d.ts.map +0 -1
  376. package/lib/command/AcApMeasureArcCmd.js.map +0 -1
  377. package/lib/command/AcApMeasureAreaCmd.d.ts.map +0 -1
  378. package/lib/command/AcApMeasureAreaCmd.js.map +0 -1
  379. package/lib/command/AcApMeasureDistanceCmd.d.ts.map +0 -1
  380. package/lib/command/AcApMeasureDistanceCmd.js.map +0 -1
  381. package/lib/command/AcApMoveCmd.d.ts.map +0 -1
  382. package/lib/command/AcApMoveCmd.js.map +0 -1
  383. package/lib/command/AcApPngConvertor.d.ts.map +0 -1
  384. package/lib/command/AcApPngConvertor.js.map +0 -1
  385. package/lib/command/AcApPolygonCmd.d.ts.map +0 -1
  386. package/lib/command/AcApPolygonCmd.js.map +0 -1
  387. package/lib/command/AcApPolylineCmd.d.ts.map +0 -1
  388. package/lib/command/AcApPolylineCmd.js.map +0 -1
  389. package/lib/command/AcApRectCmd.d.ts.map +0 -1
  390. package/lib/command/AcApRectCmd.js.map +0 -1
  391. package/lib/command/AcApRevCircleCmd.d.ts.map +0 -1
  392. package/lib/command/AcApRevCircleCmd.js.map +0 -1
  393. package/lib/command/AcApRevCloudCmd.d.ts.map +0 -1
  394. package/lib/command/AcApRevCloudCmd.js.map +0 -1
  395. package/lib/command/AcApRevRectCmd.d.ts.map +0 -1
  396. package/lib/command/AcApRevRectCmd.js.map +0 -1
  397. package/lib/command/AcApRevVisibilityCmd.d.ts.map +0 -1
  398. package/lib/command/AcApRevVisibilityCmd.js.map +0 -1
  399. package/lib/command/AcApSketchCmd.d.ts.map +0 -1
  400. package/lib/command/AcApSketchCmd.js.map +0 -1
  401. package/lib/command/AcApSplineCmd.d.ts.map +0 -1
  402. package/lib/command/AcApSplineCmd.js.map +0 -1
  403. package/lib/command/AcApSvgConvertor.d.ts.map +0 -1
  404. package/lib/command/AcApSvgConvertor.js.map +0 -1
  405. /package/lib/command/{AcApDxfConvertor.d.ts → convert/AcApDxfConvertor.d.ts} +0 -0
  406. /package/lib/command/{AcApSvgConvertor.d.ts → convert/AcApSvgConvertor.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToDxfCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToDxfCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;GAEG;AACH;IAAyC,uCAAW;IAApD;;IAKA,CAAC;IAJO,qCAAO,GAAb,UAAc,QAAqB;;;;gBAC3B,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;gBACxC,SAAS,CAAC,OAAO,EAAE,CAAA;;;;KACpB;IACH,0BAAC;AAAD,CAAC,AALD,CAAyC,WAAW,GAKnD"}
@@ -1,12 +1,12 @@
1
- import { AcApContext } from '../app';
2
- import { AcEdCommand } from '../editor';
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
3
  /**
4
4
  * Command for exporting the current CAD drawing to PNG format.
5
5
  *
6
6
  * This command creates a PNG converter and initiates the conversion
7
7
  * process to export the current drawing as a PNG file. The command:
8
8
  * - Creates a new PNG converter instance
9
- * - Prompts for optional bounding box (or press Enter to use drawing extents)
9
+ * - Prompts for an export bounding box
10
10
  * - Prompts for optional long side pixel value (or press Enter for default)
11
11
  * - Converts the current view to PNG format
12
12
  * - Automatically downloads the PNG file
@@ -25,11 +25,29 @@ export declare class AcApConvertToPngCmd extends AcEdCommand {
25
25
  * Executes the PNG conversion command.
26
26
  *
27
27
  * Prompts the user for:
28
- * 1. Optional bounding box (press Enter to skip and use drawing extents)
29
- * 2. Optional long side pixel value (press Enter for default 8000)
28
+ * 1. Export bounding box
29
+ * 2. Optional long side pixel value (press Enter for default 1024)
30
30
  *
31
31
  * @param _context - The application context (unused in this command)
32
32
  */
33
33
  execute(_context: AcApContext): Promise<void>;
34
+ /**
35
+ * Returns the current drawing extents projected to XY bounds.
36
+ */
37
+ private getCurrentDrawingBounds;
38
+ /**
39
+ * Expands user-picked bounds to include extents of intersected entities.
40
+ *
41
+ * This avoids cutting entities when the pick box touches their geometry
42
+ * edges (for example anti-aliased line caps or text glyph overhangs).
43
+ */
44
+ private expandBoundsToEntityExtents;
45
+ /**
46
+ * Keeps active layout-view size in sync with current view size.
47
+ *
48
+ * This guards against stale screen-to-world mapping after container layout
49
+ * changes that do not fire a window resize event.
50
+ */
51
+ private syncActiveLayoutViewSize;
34
52
  }
35
53
  //# sourceMappingURL=AcApConvertToPngCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToPngCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToPngCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EAIZ,MAAM,cAAc,CAAA;AAOrB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;IAwDnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;;;OAKG;IACH,OAAO,CAAC,2BAA2B;IAmDnC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;CAQjC"}
@@ -50,17 +50,18 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  }
51
51
  };
52
52
  import { AcGeBox2d, AcGePoint2d } from '@mlightcad/data-model';
53
- import { AcApDocManager } from '../app';
54
- import { AcEdCommand, AcEdPromptBoxOptions, AcEdPromptDoubleOptions, AcEdPromptStatus } from '../editor';
55
- import { AcApI18n } from '../i18n';
53
+ import { AcApDocManager } from '../../app';
54
+ import { AcEdCommand, AcEdPromptBoxOptions, AcEdPromptDoubleOptions, AcEdPromptStatus } from '../../editor';
55
+ import { AcApI18n } from '../../i18n';
56
56
  import { AcApPngConvertor } from './AcApPngConvertor';
57
+ var DEFAULT_LONG_SIDE_PX = 1024;
57
58
  /**
58
59
  * Command for exporting the current CAD drawing to PNG format.
59
60
  *
60
61
  * This command creates a PNG converter and initiates the conversion
61
62
  * process to export the current drawing as a PNG file. The command:
62
63
  * - Creates a new PNG converter instance
63
- * - Prompts for optional bounding box (or press Enter to use drawing extents)
64
+ * - Prompts for an export bounding box
64
65
  * - Prompts for optional long side pixel value (or press Enter for default)
65
66
  * - Converts the current view to PNG format
66
67
  * - Automatically downloads the PNG file
@@ -83,44 +84,116 @@ var AcApConvertToPngCmd = /** @class */ (function (_super) {
83
84
  * Executes the PNG conversion command.
84
85
  *
85
86
  * Prompts the user for:
86
- * 1. Optional bounding box (press Enter to skip and use drawing extents)
87
- * 2. Optional long side pixel value (press Enter for default 8000)
87
+ * 1. Export bounding box
88
+ * 2. Optional long side pixel value (press Enter for default 1024)
88
89
  *
89
90
  * @param _context - The application context (unused in this command)
90
91
  */
91
92
  AcApConvertToPngCmd.prototype.execute = function (_context) {
92
93
  return __awaiter(this, void 0, void 0, function () {
93
- var converter, boxOptions, boxResult, bounds, db, ext, longSidePrompt, longSideResult, longSide;
94
+ var converter, view, boxOptions, boxResult, bounds, expandedBounds, longSidePrompt, longSideResult, longSide;
94
95
  return __generator(this, function (_a) {
95
96
  switch (_a.label) {
96
97
  case 0:
97
98
  converter = new AcApPngConvertor();
98
- boxOptions = new AcEdPromptBoxOptions(AcApI18n.t('pngout.boundsFirstCorner'), AcApI18n.t('pngout.boundsSecondCorner'));
99
+ view = AcApDocManager.instance.curView;
100
+ this.syncActiveLayoutViewSize(view);
101
+ boxOptions = new AcEdPromptBoxOptions(AcApI18n.t('jig.pngout.boundsFirstCorner'), AcApI18n.t('jig.pngout.boundsSecondCorner'));
102
+ // Export window corners should follow exact click positions.
103
+ boxOptions.disableOSnap = true;
99
104
  return [4 /*yield*/, AcApDocManager.instance.editor.getBox(boxOptions)];
100
105
  case 1:
101
106
  boxResult = _a.sent();
102
107
  if (boxResult.status === AcEdPromptStatus.OK && boxResult.value) {
103
- bounds = boxResult.value;
108
+ expandedBounds = this.expandBoundsToEntityExtents(boxResult.value, view);
109
+ bounds = expandedBounds.bounds;
110
+ }
111
+ else if (boxResult.status === AcEdPromptStatus.None) {
112
+ bounds = this.getCurrentDrawingBounds();
104
113
  }
105
114
  else {
106
- db = AcApDocManager.instance.curDocument.database;
107
- ext = db.extents;
108
- bounds = new AcGeBox2d(new AcGePoint2d(ext.min.x, ext.min.y), new AcGePoint2d(ext.max.x, ext.max.y));
115
+ // User canceled or prompt failed: abort command gracefully.
116
+ return [2 /*return*/];
109
117
  }
110
- longSidePrompt = new AcEdPromptDoubleOptions(AcApI18n.t('pngout.longSidePrompt'));
118
+ longSidePrompt = new AcEdPromptDoubleOptions("".concat(AcApI18n.t('jig.pngout.longSidePrompt'), " <").concat(DEFAULT_LONG_SIDE_PX, ">"));
111
119
  longSidePrompt.allowNone = true;
120
+ longSidePrompt.allowNegative = false;
121
+ longSidePrompt.allowZero = false;
122
+ longSidePrompt.defaultValue = DEFAULT_LONG_SIDE_PX;
123
+ longSidePrompt.useDefaultValue = true;
112
124
  return [4 /*yield*/, AcApDocManager.instance.editor.getDouble(longSidePrompt)];
113
125
  case 2:
114
126
  longSideResult = _a.sent();
115
- longSide = longSideResult.status === AcEdPromptStatus.OK && longSideResult.value !== undefined
127
+ if (longSideResult.status === AcEdPromptStatus.Cancel ||
128
+ longSideResult.status === AcEdPromptStatus.Error) {
129
+ return [2 /*return*/];
130
+ }
131
+ longSide = longSideResult.status === AcEdPromptStatus.OK &&
132
+ longSideResult.value !== undefined
116
133
  ? longSideResult.value
117
- : 8000;
134
+ : DEFAULT_LONG_SIDE_PX;
118
135
  converter.convert(bounds, longSide);
119
136
  return [2 /*return*/];
120
137
  }
121
138
  });
122
139
  });
123
140
  };
141
+ /**
142
+ * Returns the current drawing extents projected to XY bounds.
143
+ */
144
+ AcApConvertToPngCmd.prototype.getCurrentDrawingBounds = function () {
145
+ var db = AcApDocManager.instance.curDocument.database;
146
+ var ext = db.extents;
147
+ return new AcGeBox2d(new AcGePoint2d(ext.min.x, ext.min.y), new AcGePoint2d(ext.max.x, ext.max.y));
148
+ };
149
+ /**
150
+ * Expands user-picked bounds to include extents of intersected entities.
151
+ *
152
+ * This avoids cutting entities when the pick box touches their geometry
153
+ * edges (for example anti-aliased line caps or text glyph overhangs).
154
+ */
155
+ AcApConvertToPngCmd.prototype.expandBoundsToEntityExtents = function (userBounds, view) {
156
+ var hits = view.search(userBounds);
157
+ var entityBounds = new AcGeBox2d();
158
+ var hasEntityBounds = false;
159
+ var expandByItem = function (item) {
160
+ var _a;
161
+ entityBounds.expandByPoint(new AcGePoint2d(item.minX, item.minY));
162
+ entityBounds.expandByPoint(new AcGePoint2d(item.maxX, item.maxY));
163
+ hasEntityBounds = true;
164
+ (_a = item.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
165
+ entityBounds.expandByPoint(new AcGePoint2d(child.minX, child.minY));
166
+ entityBounds.expandByPoint(new AcGePoint2d(child.maxX, child.maxY));
167
+ });
168
+ };
169
+ hits.forEach(function (hit) { return expandByItem(hit); });
170
+ if (!hasEntityBounds || entityBounds.isEmpty()) {
171
+ return { bounds: userBounds, expanded: false };
172
+ }
173
+ var merged = new AcGeBox2d()
174
+ .expandByPoint(userBounds.min)
175
+ .expandByPoint(userBounds.max)
176
+ .expandByPoint(entityBounds.min)
177
+ .expandByPoint(entityBounds.max);
178
+ var expanded = merged.min.x !== userBounds.min.x ||
179
+ merged.min.y !== userBounds.min.y ||
180
+ merged.max.x !== userBounds.max.x ||
181
+ merged.max.y !== userBounds.max.y;
182
+ return { bounds: merged, expanded: expanded };
183
+ };
184
+ /**
185
+ * Keeps active layout-view size in sync with current view size.
186
+ *
187
+ * This guards against stale screen-to-world mapping after container layout
188
+ * changes that do not fire a window resize event.
189
+ */
190
+ AcApConvertToPngCmd.prototype.syncActiveLayoutViewSize = function (view) {
191
+ var layoutView = view.activeLayoutView;
192
+ if (!layoutView) {
193
+ return;
194
+ }
195
+ layoutView.resize(view.width, view.height);
196
+ };
124
197
  return AcApConvertToPngCmd;
125
198
  }(AcEdCommand));
126
199
  export { AcApConvertToPngCmd };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToPngCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToPngCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;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EAAE,KAAK,EAAE,CAAA;QAChD,CAAC;QAED,IAAM,MAAM,GAAG,IAAI,SAAS,EAAE;aAC3B,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;aAC7B,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;aAC7B,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC;aAC/B,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAElC,IAAM,QAAQ,GACZ,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;QAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAA,EAAE,CAAA;IACrC,CAAC;IAED;;;;;OAKG;IACK,sDAAwB,GAAhC,UAAiC,IAAgB;QAC/C,IAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAA;QACxC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAM;QACR,CAAC;QAED,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC5C,CAAC;IACH,0BAAC;AAAD,CAAC,AArJD,CAAyC,WAAW,GAqJnD"}
@@ -1,5 +1,5 @@
1
- import { AcApContext } from '../app';
2
- import { AcEdCommand } from '../command';
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
3
  /**
4
4
  * Command for converting the current CAD drawing to SVG format.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToSvgCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToSvgCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG1C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;;;;OAOG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;CAIpC"}
@@ -49,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
- import { AcEdCommand } from '../command';
52
+ import { AcEdCommand } from '../../editor';
53
53
  import { AcApSvgConvertor } from './AcApSvgConvertor';
54
54
  /**
55
55
  * Command for converting the current CAD drawing to SVG format.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToSvgCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToSvgCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH;IAAyC,uCAAW;IAApD;;IAaA,CAAC;IAZC;;;;;;;OAOG;IACG,qCAAO,GAAb,UAAc,QAAqB;;;;gBAC3B,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;gBACxC,SAAS,CAAC,OAAO,EAAE,CAAA;;;;KACpB;IACH,0BAAC;AAAD,CAAC,AAbD,CAAyC,WAAW,GAanD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApDxfConvertor.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApDxfConvertor.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,OAAO;IAOP,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,WAAW;CAIpB"}
@@ -1,4 +1,4 @@
1
- import { AcApDocManager } from '../app';
1
+ import { AcApDocManager } from '../../app';
2
2
  /**
3
3
  * Utility class for exporting the current CAD drawing to DXF format.
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApDxfConvertor.js","sourceRoot":"","sources":["../../../src/command/convert/AcApDxfConvertor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C;;GAEG;AACH;IAAA;IA6BA,CAAC;IA5BC;;OAEG;IACH,kCAAO,GAAP;QACE,IAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAA;QACpD,IAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QACzD,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACzE,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,UAAG,QAAQ,SAAM,CAAC,CAAA;IAC7D,CAAC;IAEO,kDAAuB,GAA/B,UAAgC,UAAkB,EAAE,QAAgB;QAClE,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE;YACrC,IAAI,EAAE,+BAA+B;SACtC,CAAC,CAAA;QACF,IAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;QACxC,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAChD,YAAY,CAAC,IAAI,GAAG,GAAG,CAAA;QACvB,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAChC,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;QACvC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;IAEO,sCAAW,GAAnB,UAAoB,QAAgB;QAClC,IAAM,cAAc,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,KAAI,SAAS,CAAA;QACpD,OAAO,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,SAAS,CAAA;IAC5D,CAAC;IACH,uBAAC;AAAD,CAAC,AA7BD,IA6BC"}
@@ -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,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ACH,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,GAAG,aAAa,CAAA;QAErC,mFAAmF;QACnF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QAEvC,uBAAuB;QACvB,YAAY,CAAC,KAAK,EAAE,CAAA;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AA1DD,IA0DC"}
@@ -0,0 +1,6 @@
1
+ export * from './AcApConvertToDxfCmd';
2
+ export * from './AcApConvertToPngCmd';
3
+ export * from './AcApPngConvertor';
4
+ export * from './AcApConvertToSvgCmd';
5
+ export * from './AcApDxfConvertor';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/command/convert/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './AcApConvertToDxfCmd';
2
+ export * from './AcApConvertToPngCmd';
3
+ export * from './AcApPngConvertor';
4
+ export * from './AcApConvertToSvgCmd';
5
+ export * from './AcApDxfConvertor';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command/convert/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA"}