@mlightcad/cad-simple-viewer 1.7.0 → 1.7.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 (322) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +185 -180
  3. package/dist/cad-simple-viewer.js +17061 -12706
  4. package/dist/cad-simple-viewer.umd.cjs +981 -114
  5. package/dist/mtext-renderer-worker.js +1908 -1765
  6. package/icons.ts +7 -7
  7. package/lib/app/AcApContext.d.ts.map +1 -1
  8. package/lib/app/AcApContext.js +4 -3
  9. package/lib/app/AcApContext.js.map +1 -1
  10. package/lib/app/AcApDocManager.d.ts +38 -18
  11. package/lib/app/AcApDocManager.d.ts.map +1 -1
  12. package/lib/app/AcApDocManager.js +59 -45
  13. package/lib/app/AcApDocManager.js.map +1 -1
  14. package/lib/app/AcApOpenDatabaseOptions.d.ts +17 -1
  15. package/lib/app/AcApOpenDatabaseOptions.d.ts.map +1 -1
  16. package/lib/app/AcApOpenDatabaseOptions.js +1 -1
  17. package/lib/app/AcApOpenDatabaseOptions.js.map +1 -1
  18. package/lib/app/AcApOpenFileProgressController.d.ts +4 -2
  19. package/lib/app/AcApOpenFileProgressController.d.ts.map +1 -1
  20. package/lib/app/AcApOpenFileProgressController.js +4 -2
  21. package/lib/app/AcApOpenFileProgressController.js.map +1 -1
  22. package/lib/app/index.d.ts +1 -0
  23. package/lib/app/index.d.ts.map +1 -1
  24. package/lib/app/index.js +1 -0
  25. package/lib/app/index.js.map +1 -1
  26. package/lib/app/notification/AcApNotificationEventBridge.d.ts +130 -0
  27. package/lib/app/notification/AcApNotificationEventBridge.d.ts.map +1 -0
  28. package/lib/app/notification/AcApNotificationEventBridge.js +309 -0
  29. package/lib/app/notification/AcApNotificationEventBridge.js.map +1 -0
  30. package/lib/app/notification/AcApNotificationService.d.ts +185 -0
  31. package/lib/app/notification/AcApNotificationService.d.ts.map +1 -0
  32. package/lib/app/notification/AcApNotificationService.js +271 -0
  33. package/lib/app/notification/AcApNotificationService.js.map +1 -0
  34. package/lib/app/notification/AcApNotificationStore.d.ts +147 -0
  35. package/lib/app/notification/AcApNotificationStore.d.ts.map +1 -0
  36. package/lib/app/notification/AcApNotificationStore.js +345 -0
  37. package/lib/app/notification/AcApNotificationStore.js.map +1 -0
  38. package/lib/app/notification/AcApNotificationTypes.d.ts +195 -0
  39. package/lib/app/notification/AcApNotificationTypes.d.ts.map +1 -0
  40. package/lib/app/notification/AcApNotificationTypes.js +78 -0
  41. package/lib/app/notification/AcApNotificationTypes.js.map +1 -0
  42. package/lib/app/notification/index.d.ts +13 -0
  43. package/lib/app/notification/index.d.ts.map +1 -0
  44. package/lib/app/notification/index.js +13 -0
  45. package/lib/app/notification/index.js.map +1 -0
  46. package/lib/command/AcApInstallDrawStyleSessionAccessory.js +11 -7
  47. package/lib/command/AcApInstallDrawStyleSessionAccessory.js.map +1 -1
  48. package/lib/command/AcApSwitchBgCmd.d.ts.map +1 -1
  49. package/lib/command/AcApSwitchBgCmd.js +7 -2
  50. package/lib/command/AcApSwitchBgCmd.js.map +1 -1
  51. package/lib/command/AcApToolbarDocBind.d.ts +19 -0
  52. package/lib/command/AcApToolbarDocBind.d.ts.map +1 -0
  53. package/lib/command/AcApToolbarDocBind.js +62 -0
  54. package/lib/command/AcApToolbarDocBind.js.map +1 -0
  55. package/lib/command/convert/AcApConvertToBmpCmd.d.ts +14 -0
  56. package/lib/command/convert/AcApConvertToBmpCmd.d.ts.map +1 -0
  57. package/lib/command/convert/AcApConvertToBmpCmd.js +34 -0
  58. package/lib/command/convert/AcApConvertToBmpCmd.js.map +1 -0
  59. package/lib/command/convert/AcApConvertToJpgCmd.d.ts +14 -0
  60. package/lib/command/convert/AcApConvertToJpgCmd.d.ts.map +1 -0
  61. package/lib/command/convert/AcApConvertToJpgCmd.js +34 -0
  62. package/lib/command/convert/AcApConvertToJpgCmd.js.map +1 -0
  63. package/lib/command/convert/AcApConvertToPngCmd.d.ts +4 -36
  64. package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -1
  65. package/lib/command/convert/AcApConvertToPngCmd.js +4 -138
  66. package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -1
  67. package/lib/command/convert/AcApConvertToRasterImageCmd.d.ts +40 -0
  68. package/lib/command/convert/AcApConvertToRasterImageCmd.d.ts.map +1 -0
  69. package/lib/command/convert/AcApConvertToRasterImageCmd.js +161 -0
  70. package/lib/command/convert/AcApConvertToRasterImageCmd.js.map +1 -0
  71. package/lib/command/convert/{AcApPngConvertor.d.ts → AcApRasterImageConvertor.d.ts} +36 -12
  72. package/lib/command/convert/AcApRasterImageConvertor.d.ts.map +1 -0
  73. package/lib/command/convert/{AcApPngConvertor.js → AcApRasterImageConvertor.js} +163 -32
  74. package/lib/command/convert/AcApRasterImageConvertor.js.map +1 -0
  75. package/lib/command/convert/index.d.ts +4 -1
  76. package/lib/command/convert/index.d.ts.map +1 -1
  77. package/lib/command/convert/index.js +4 -1
  78. package/lib/command/convert/index.js.map +1 -1
  79. package/lib/command/index.d.ts +2 -0
  80. package/lib/command/index.d.ts.map +1 -1
  81. package/lib/command/index.js +2 -0
  82. package/lib/command/index.js.map +1 -1
  83. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -1
  84. package/lib/command/markup/AcApMarkupCalloutCmd.js +51 -1
  85. package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -1
  86. package/lib/command/markup/AcApMarkupCmdUtil.d.ts +5 -0
  87. package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -1
  88. package/lib/command/markup/AcApMarkupCmdUtil.js +27 -9
  89. package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -1
  90. package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -1
  91. package/lib/command/markup/AcApMarkupShapeCallout.js +49 -1
  92. package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -1
  93. package/lib/editor/global/AcEdUiLayout.d.ts +6 -0
  94. package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
  95. package/lib/editor/global/AcEdUiLayout.js +6 -0
  96. package/lib/editor/global/AcEdUiLayout.js.map +1 -1
  97. package/lib/editor/input/ui/AcEdCanvasTouchCalloutGuard.d.ts +31 -0
  98. package/lib/editor/input/ui/AcEdCanvasTouchCalloutGuard.d.ts.map +1 -0
  99. package/lib/editor/input/ui/AcEdCanvasTouchCalloutGuard.js +67 -0
  100. package/lib/editor/input/ui/AcEdCanvasTouchCalloutGuard.js.map +1 -0
  101. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +2 -0
  102. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  103. package/lib/editor/input/ui/AcEdFloatingInput.js +13 -2
  104. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  105. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +6 -0
  106. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
  107. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  108. package/lib/editor/input/ui/AcEdInputManager.js +47 -7
  109. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  110. package/lib/editor/input/ui/AcEdMobileBoxGesture.d.ts.map +1 -1
  111. package/lib/editor/input/ui/AcEdMobileBoxGesture.js +2 -0
  112. package/lib/editor/input/ui/AcEdMobileBoxGesture.js.map +1 -1
  113. package/lib/editor/input/ui/AcEdMobileCommandChrome.d.ts +18 -4
  114. package/lib/editor/input/ui/AcEdMobileCommandChrome.d.ts.map +1 -1
  115. package/lib/editor/input/ui/AcEdMobileCommandChrome.js +14 -0
  116. package/lib/editor/input/ui/AcEdMobileCommandChrome.js.map +1 -1
  117. package/lib/editor/input/ui/AcEdSessionAccessoryController.d.ts +10 -2
  118. package/lib/editor/input/ui/AcEdSessionAccessoryController.d.ts.map +1 -1
  119. package/lib/editor/input/ui/AcEdSessionAccessoryController.js +15 -4
  120. package/lib/editor/input/ui/AcEdSessionAccessoryController.js.map +1 -1
  121. package/lib/editor/input/ui/AcEdTouchPointTiming.d.ts +1 -1
  122. package/lib/editor/input/ui/AcEdTouchPointTiming.d.ts.map +1 -1
  123. package/lib/editor/input/ui/AcEdTouchPointTiming.js +1 -1
  124. package/lib/editor/input/ui/AcEdTouchPointTiming.js.map +1 -1
  125. package/lib/editor/input/ui/index.d.ts +1 -0
  126. package/lib/editor/input/ui/index.d.ts.map +1 -1
  127. package/lib/editor/input/ui/index.js +1 -0
  128. package/lib/editor/input/ui/index.js.map +1 -1
  129. package/lib/editor/view/AcEdBaseView.d.ts +12 -0
  130. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  131. package/lib/editor/view/AcEdBaseView.js +19 -9
  132. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  133. package/lib/editor/view/AcEdSelectionBoxIntersect.d.ts +36 -0
  134. package/lib/editor/view/AcEdSelectionBoxIntersect.d.ts.map +1 -0
  135. package/lib/editor/view/AcEdSelectionBoxIntersect.js +113 -0
  136. package/lib/editor/view/AcEdSelectionBoxIntersect.js.map +1 -0
  137. package/lib/editor/view/index.d.ts +1 -0
  138. package/lib/editor/view/index.d.ts.map +1 -1
  139. package/lib/editor/view/index.js +1 -0
  140. package/lib/editor/view/index.js.map +1 -1
  141. package/lib/i18n/AcApI18n.d.ts +2 -1
  142. package/lib/i18n/AcApI18n.d.ts.map +1 -1
  143. package/lib/i18n/AcApI18n.js +4 -1
  144. package/lib/i18n/AcApI18n.js.map +1 -1
  145. package/lib/i18n/ar/command.d.ts +9 -0
  146. package/lib/i18n/ar/command.d.ts.map +1 -1
  147. package/lib/i18n/ar/command.js +1 -1
  148. package/lib/i18n/ar/command.js.map +1 -1
  149. package/lib/i18n/ar/jig.d.ts +47 -0
  150. package/lib/i18n/ar/jig.d.ts.map +1 -1
  151. package/lib/i18n/ar/jig.js +17 -1
  152. package/lib/i18n/ar/jig.js.map +1 -1
  153. package/lib/i18n/ar/main.d.ts +30 -0
  154. package/lib/i18n/ar/main.d.ts.map +1 -1
  155. package/lib/i18n/ar/main.js +34 -4
  156. package/lib/i18n/ar/main.js.map +1 -1
  157. package/lib/i18n/cs/command.d.ts +9 -0
  158. package/lib/i18n/cs/command.d.ts.map +1 -1
  159. package/lib/i18n/cs/command.js +9 -0
  160. package/lib/i18n/cs/command.js.map +1 -1
  161. package/lib/i18n/cs/jig.d.ts +47 -0
  162. package/lib/i18n/cs/jig.d.ts.map +1 -1
  163. package/lib/i18n/cs/jig.js +47 -0
  164. package/lib/i18n/cs/jig.js.map +1 -1
  165. package/lib/i18n/cs/main.d.ts +30 -0
  166. package/lib/i18n/cs/main.d.ts.map +1 -1
  167. package/lib/i18n/cs/main.js +34 -4
  168. package/lib/i18n/cs/main.js.map +1 -1
  169. package/lib/i18n/en/command.d.ts +9 -0
  170. package/lib/i18n/en/command.d.ts.map +1 -1
  171. package/lib/i18n/en/command.js +9 -0
  172. package/lib/i18n/en/command.js.map +1 -1
  173. package/lib/i18n/en/jig.d.ts +47 -0
  174. package/lib/i18n/en/jig.d.ts.map +1 -1
  175. package/lib/i18n/en/jig.js +47 -0
  176. package/lib/i18n/en/jig.js.map +1 -1
  177. package/lib/i18n/en/main.d.ts +30 -0
  178. package/lib/i18n/en/main.d.ts.map +1 -1
  179. package/lib/i18n/en/main.js +34 -4
  180. package/lib/i18n/en/main.js.map +1 -1
  181. package/lib/i18n/index.d.ts +2 -2
  182. package/lib/i18n/index.d.ts.map +1 -1
  183. package/lib/i18n/index.js.map +1 -1
  184. package/lib/i18n/tr/command.d.ts +9 -0
  185. package/lib/i18n/tr/command.d.ts.map +1 -1
  186. package/lib/i18n/tr/command.js +9 -0
  187. package/lib/i18n/tr/command.js.map +1 -1
  188. package/lib/i18n/tr/jig.d.ts +47 -0
  189. package/lib/i18n/tr/jig.d.ts.map +1 -1
  190. package/lib/i18n/tr/jig.js +47 -0
  191. package/lib/i18n/tr/jig.js.map +1 -1
  192. package/lib/i18n/tr/main.d.ts +30 -0
  193. package/lib/i18n/tr/main.d.ts.map +1 -1
  194. package/lib/i18n/tr/main.js +34 -4
  195. package/lib/i18n/tr/main.js.map +1 -1
  196. package/lib/i18n/zh/command.d.ts +9 -0
  197. package/lib/i18n/zh/command.d.ts.map +1 -1
  198. package/lib/i18n/zh/command.js +9 -0
  199. package/lib/i18n/zh/command.js.map +1 -1
  200. package/lib/i18n/zh/jig.d.ts +47 -0
  201. package/lib/i18n/zh/jig.d.ts.map +1 -1
  202. package/lib/i18n/zh/jig.js +47 -0
  203. package/lib/i18n/zh/jig.js.map +1 -1
  204. package/lib/i18n/zh/main.d.ts +30 -0
  205. package/lib/i18n/zh/main.d.ts.map +1 -1
  206. package/lib/i18n/zh/main.js +34 -4
  207. package/lib/i18n/zh/main.js.map +1 -1
  208. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +6 -0
  209. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  210. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +10 -0
  211. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  212. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +4 -0
  213. package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
  214. package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -0
  215. package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
  216. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +4 -0
  217. package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
  218. package/lib/spatialIndex/AcTrRBushSpatialIndex.js +9 -0
  219. package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
  220. package/lib/ui/AcUiDefaultNotificationUi.d.ts +167 -0
  221. package/lib/ui/AcUiDefaultNotificationUi.d.ts.map +1 -0
  222. package/lib/ui/AcUiDefaultNotificationUi.js +603 -0
  223. package/lib/ui/AcUiDefaultNotificationUi.js.map +1 -0
  224. package/lib/ui/AcUiDrawStyle.d.ts +2 -1
  225. package/lib/ui/AcUiDrawStyle.d.ts.map +1 -1
  226. package/lib/ui/AcUiDrawStyle.js +2 -1
  227. package/lib/ui/AcUiDrawStyle.js.map +1 -1
  228. package/lib/ui/AcUiDrawStyleSessionAccessory.d.ts.map +1 -1
  229. package/lib/ui/AcUiDrawStyleSessionAccessory.js +5 -1
  230. package/lib/ui/AcUiDrawStyleSessionAccessory.js.map +1 -1
  231. package/lib/ui/AcUiMobileSessionPanel.d.ts +73 -8
  232. package/lib/ui/AcUiMobileSessionPanel.d.ts.map +1 -1
  233. package/lib/ui/AcUiMobileSessionPanel.js +314 -49
  234. package/lib/ui/AcUiMobileSessionPanel.js.map +1 -1
  235. package/lib/ui/AcUiShortCutToolbar.d.ts +24 -0
  236. package/lib/ui/AcUiShortCutToolbar.d.ts.map +1 -1
  237. package/lib/ui/AcUiShortCutToolbar.js +73 -5
  238. package/lib/ui/AcUiShortCutToolbar.js.map +1 -1
  239. package/lib/ui/index.d.ts +2 -0
  240. package/lib/ui/index.d.ts.map +1 -1
  241. package/lib/ui/index.js +2 -0
  242. package/lib/ui/index.js.map +1 -1
  243. package/lib/ui/toolbar/AcUiDropdownMenu.d.ts +48 -0
  244. package/lib/ui/toolbar/AcUiDropdownMenu.d.ts.map +1 -0
  245. package/lib/ui/toolbar/AcUiDropdownMenu.js +116 -0
  246. package/lib/ui/toolbar/AcUiDropdownMenu.js.map +1 -0
  247. package/lib/ui/toolbar/AcUiSubToolbar.d.ts +125 -0
  248. package/lib/ui/toolbar/AcUiSubToolbar.d.ts.map +1 -0
  249. package/lib/ui/toolbar/AcUiSubToolbar.js +625 -0
  250. package/lib/ui/toolbar/AcUiSubToolbar.js.map +1 -0
  251. package/lib/ui/toolbar/AcUiToolbar.d.ts +446 -0
  252. package/lib/ui/toolbar/AcUiToolbar.d.ts.map +1 -0
  253. package/lib/ui/toolbar/AcUiToolbar.js +1550 -0
  254. package/lib/ui/toolbar/AcUiToolbar.js.map +1 -0
  255. package/lib/ui/toolbar/AcUiToolbarStyles.d.ts +20 -0
  256. package/lib/ui/toolbar/AcUiToolbarStyles.d.ts.map +1 -0
  257. package/lib/ui/toolbar/AcUiToolbarStyles.js +34 -0
  258. package/lib/ui/toolbar/AcUiToolbarStyles.js.map +1 -0
  259. package/lib/ui/toolbar/acuiWrapPackLayout.d.ts +19 -0
  260. package/lib/ui/toolbar/acuiWrapPackLayout.d.ts.map +1 -0
  261. package/lib/ui/toolbar/acuiWrapPackLayout.js +36 -0
  262. package/lib/ui/toolbar/acuiWrapPackLayout.js.map +1 -0
  263. package/lib/ui/toolbar/index.d.ts +19 -0
  264. package/lib/ui/toolbar/index.d.ts.map +1 -0
  265. package/lib/ui/toolbar/index.js +15 -0
  266. package/lib/ui/toolbar/index.js.map +1 -0
  267. package/lib/ui/toolbar/resolveToolbarChrome.d.ts +14 -0
  268. package/lib/ui/toolbar/resolveToolbarChrome.d.ts.map +1 -0
  269. package/lib/ui/toolbar/resolveToolbarChrome.js +35 -0
  270. package/lib/ui/toolbar/resolveToolbarChrome.js.map +1 -0
  271. package/lib/ui/toolbar/resolveToolbarItemState.d.ts +63 -0
  272. package/lib/ui/toolbar/resolveToolbarItemState.d.ts.map +1 -0
  273. package/lib/ui/toolbar/resolveToolbarItemState.js +171 -0
  274. package/lib/ui/toolbar/resolveToolbarItemState.js.map +1 -0
  275. package/lib/ui/toolbar/toolbarItemUtils.d.ts +62 -0
  276. package/lib/ui/toolbar/toolbarItemUtils.d.ts.map +1 -0
  277. package/lib/ui/toolbar/toolbarItemUtils.js +184 -0
  278. package/lib/ui/toolbar/toolbarItemUtils.js.map +1 -0
  279. package/lib/ui/toolbar/types.d.ts +268 -0
  280. package/lib/ui/toolbar/types.d.ts.map +1 -0
  281. package/lib/ui/toolbar/types.js +8 -0
  282. package/lib/ui/toolbar/types.js.map +1 -0
  283. package/lib/ui-html-entry.d.ts +8 -1
  284. package/lib/ui-html-entry.d.ts.map +1 -1
  285. package/lib/ui-html-entry.js +6 -1
  286. package/lib/ui-html-entry.js.map +1 -1
  287. package/lib/util/AcApAnalyzeUnsupportedDrawing.d.ts +53 -0
  288. package/lib/util/AcApAnalyzeUnsupportedDrawing.d.ts.map +1 -0
  289. package/lib/util/AcApAnalyzeUnsupportedDrawing.js +164 -0
  290. package/lib/util/AcApAnalyzeUnsupportedDrawing.js.map +1 -0
  291. package/lib/util/AcApFormatFontMissedMessage.d.ts +32 -0
  292. package/lib/util/AcApFormatFontMissedMessage.d.ts.map +1 -0
  293. package/lib/util/AcApFormatFontMissedMessage.js +46 -0
  294. package/lib/util/AcApFormatFontMissedMessage.js.map +1 -0
  295. package/lib/util/AcApFormatUnsupportedEntitiesMessage.d.ts +44 -0
  296. package/lib/util/AcApFormatUnsupportedEntitiesMessage.d.ts.map +1 -0
  297. package/lib/util/AcApFormatUnsupportedEntitiesMessage.js +105 -0
  298. package/lib/util/AcApFormatUnsupportedEntitiesMessage.js.map +1 -0
  299. package/lib/util/index.d.ts +3 -0
  300. package/lib/util/index.d.ts.map +1 -1
  301. package/lib/util/index.js +3 -0
  302. package/lib/util/index.js.map +1 -1
  303. package/lib/view/AcTrLayer.d.ts +13 -1
  304. package/lib/view/AcTrLayer.d.ts.map +1 -1
  305. package/lib/view/AcTrLayer.js +28 -11
  306. package/lib/view/AcTrLayer.js.map +1 -1
  307. package/lib/view/AcTrLayout.d.ts +17 -2
  308. package/lib/view/AcTrLayout.d.ts.map +1 -1
  309. package/lib/view/AcTrLayout.js +44 -3
  310. package/lib/view/AcTrLayout.js.map +1 -1
  311. package/lib/view/AcTrScene.d.ts +4 -0
  312. package/lib/view/AcTrScene.d.ts.map +1 -1
  313. package/lib/view/AcTrScene.js +6 -0
  314. package/lib/view/AcTrScene.js.map +1 -1
  315. package/lib/view/AcTrView2d.d.ts +93 -14
  316. package/lib/view/AcTrView2d.d.ts.map +1 -1
  317. package/lib/view/AcTrView2d.js +382 -102
  318. package/lib/view/AcTrView2d.js.map +1 -1
  319. package/package.json +8 -8
  320. package/src/ui/icons.ts +387 -387
  321. package/lib/command/convert/AcApPngConvertor.d.ts.map +0 -1
  322. package/lib/command/convert/AcApPngConvertor.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { AcApSettingManager } from '../app/AcApSettingManager';
2
2
  import { ACED_DRAW_STYLE_SESSION_PROVIDER_ID } from '../editor/command/AcEdSessionAccessory';
3
- import { acedIsMobileUiLayout } from '../editor/global/AcEdUiLayout';
3
+ import { acedIsMobileOrPadUi, acedSubscribeUiLayout } from '../editor/global/AcEdUiLayout';
4
4
  import { acuiResolveDrawStyleKind, acuiShouldShowDrawStyleToolbar } from '../ui/AcUiDrawStyle';
5
5
  import { AcUiDrawStyleSessionAccessory } from '../ui/AcUiDrawStyleSessionAccessory';
6
6
  import { ACED_SHORTCUT_TOOLBAR_PROVIDER_ID, AcUiShortCutToolbar } from '../ui/AcUiShortCutToolbar';
@@ -65,9 +65,10 @@ function ensureShortCutToolbar(view) {
65
65
  * Keeps draw-style controls embedded in the shortcut toolbar.
66
66
  *
67
67
  * Mounts the shared draw-style controls into {@link AcUiShortCutToolbar.accessoryHost}
68
- * when a measure/markup overlay is selected, or when a draw command is active on
69
- * desktop layout. On mobile, an active draw command uses the session-panel slot
70
- * instead; this binder clears the shortcut accessory in that case.
68
+ * when a measure/markup overlay is selected (no draw command running), or when a
69
+ * draw command is active on **desktop** layout. Phone and pad draw commands use
70
+ * the session-panel accessory slot instead; this binder clears the shortcut
71
+ * accessory in those cases so controls can remount on the panel.
71
72
  * Never uses the desktop top-center selection chrome.
72
73
  *
73
74
  * @param view - View whose selection accessory is updated.
@@ -114,12 +115,13 @@ function bindSelectionSessionAccessory(view, commandManager, host) {
114
115
  var markupSelected = getMarkupStore().selectedId != null;
115
116
  var selected = measureSelected || markupSelected;
116
117
  // Desktop draw commands share the shortcut slot with selection styling.
117
- // Mobile draw commands use the session panel — clear the shortcut slot so
118
- // the shared controls row can remount there (and remount on shortcut after).
118
+ // Phone/pad draw commands use the session panel — clear the shortcut slot
119
+ // so the shared controls row can remount there (and remount on shortcut
120
+ // after the command ends, only when an overlay stays selected).
119
121
  var showOnShortcut = shortcut.isVisible &&
120
122
  kind != null &&
121
123
  acuiShouldShowDrawStyleToolbar(kind) &&
122
- ((commandActive && !acedIsMobileUiLayout()) ||
124
+ ((commandActive && !acedIsMobileOrPadUi()) ||
123
125
  (!commandActive && selected));
124
126
  if (showOnShortcut) {
125
127
  mountSelection();
@@ -140,6 +142,7 @@ function bindSelectionSessionAccessory(view, commandManager, host) {
140
142
  // `activeCommand` is cleared after `commandEnded` in runActive; defer remount.
141
143
  queueMicrotask(function () { return sync(); });
142
144
  };
145
+ var offLayout = acedSubscribeUiLayout(function () { return sync(); });
143
146
  AcApSettingManager.instance.events.modified.addEventListener(onSettingsModified);
144
147
  view.editor.events.commandWillStart.addEventListener(onCommandWillStart);
145
148
  view.editor.events.commandEnded.addEventListener(onCommandEnded);
@@ -147,6 +150,7 @@ function bindSelectionSessionAccessory(view, commandManager, host) {
147
150
  return function () {
148
151
  offMarkup();
149
152
  offMeasure();
153
+ offLayout();
150
154
  AcApSettingManager.instance.events.modified.removeEventListener(onSettingsModified);
151
155
  view.editor.events.commandWillStart.removeEventListener(onCommandWillStart);
152
156
  view.editor.events.commandEnded.removeEventListener(onCommandEnded);
@@ -1 +1 @@
1
- {"version":3,"file":"AcApInstallDrawStyleSessionAccessory.js","sourceRoot":"","sources":["../../src/command/AcApInstallDrawStyleSessionAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAEnB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,mCAAmC,EAEpC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAEL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EACL,iCAAiC,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CACtC,MAAA,cAAc,CAAC,aAAa,0CAAE,UAAU,CACzC;QACD,cAAc,EAAE,cAAc,EAAE,CAAC,UAAU,IAAI,IAAI;QACnD,mBAAmB,EAAE,wBAAwB,EAAE,IAAI,IAAI;KACxD,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"AcApInstallDrawStyleSessionAccessory.js","sourceRoot":"","sources":["../../src/command/AcApInstallDrawStyleSessionAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAEnB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,mCAAmC,EAEpC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1F,OAAO,EAEL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EACL,iCAAiC,EACjC,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAGrE,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,gCAAgC,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oCAAoC,CAClD,GAAuC;IAEvC,IAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAC5C,mCAAmC,CACpC,CAAA;IACD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE7B,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAE/B,IAAM,IAAI,GAAG,IAAI,6BAA6B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACxD,IAAI,CAAC,u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nC"}
1
+ {"version":3,"file":"AcApSwitchBgCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApSwitchBgCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAOvC;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;CAwBnC"}
@@ -70,10 +70,15 @@ var AcApSwitchBgCmd = /** @class */ (function (_super) {
70
70
  */
71
71
  AcApSwitchBgCmd.prototype.execute = function (context) {
72
72
  return __awaiter(this, void 0, void 0, function () {
73
- var db, view, isModelSpace, variableName, sysVarManager, sysVar, currentColor;
73
+ var view, db, isModelSpace, variableName, sysVarManager, sysVar, currentColor;
74
74
  return __generator(this, function (_a) {
75
- db = context.doc.database;
76
75
  view = context.view;
76
+ // Reading mode owns the clear colour (white) and linework; switching the
77
+ // layout background would not be visible until reading mode is disabled.
78
+ if (view.readingModeEnabled) {
79
+ return [2 /*return*/];
80
+ }
81
+ db = context.doc.database;
77
82
  isModelSpace = view.activeLayoutBtrId === view.modelSpaceBtrId;
78
83
  variableName = layoutBackgroundSysVar(isModelSpace);
79
84
  sysVarManager = AcDbSysVarManager.instance();
@@ -1 +1 @@
1
- {"version":3,"file":"AcApSwitchBgCmd.js","sourceRoot":"","sources":["../../src/command/AcApSwitchBgCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAGpE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EACL,sBAAsB,EACtB,+BAA+B,EAChC,MAAM,8BAA8B,CAAA;AAGrC;;;;;GAKG;AACH;IAAqC,mCAAW;IAAhD;;IAwBA,CAAC;IAvBC;;;;O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C5B,sBAAM;gBACR,CAAC;gBAEK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;gBACzB,YAAY,GAAG,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,eAAe,CAAA;gBAC9D,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAA;gBACnD,aAAa,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAA;gBAC5C,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;gBACxD,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,sBAAM;gBACR,CAAC;gBAEK,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAc,CAAA;gBACxE,aAAa,CAAC,MAAM,CAClB,YAAY,EACZ,+BAA+B,CAAC,YAAY,CAAC,EAC7C,EAAE,CACH,CAAA;;;;KACF;IACH,sBAAC;AAAD,CAAC,AA9BD,CAAqC,WAAW,GA8B/C"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Wires {@link AcUiToolbar} document open / open-mode state to DocManager.
3
+ *
4
+ * Kept separate from the UI module so the offline HTML viewer-runtime can
5
+ * import {@link AcUiToolbar} without pulling DocManager into the IIFE.
6
+ *
7
+ * @module AcApToolbarDocBind
8
+ * @packageDocumentation
9
+ */
10
+ import type { AcUiToolbar } from '../ui/toolbar/AcUiToolbar';
11
+ /**
12
+ * Binds document activated / opening events to a main toolbar.
13
+ * Safe to call after DocManager construction completes.
14
+ *
15
+ * @param toolbar - Toolbar created for a view container.
16
+ * @returns Cleanup that removes listeners.
17
+ */
18
+ export declare function acapBindToolbarDocState(toolbar: AcUiToolbar): () => void;
19
+ //# sourceMappingURL=AcApToolbarDocBind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApToolbarDocBind.d.ts","sourceRoot":"","sources":["../../src/command/AcApToolbarDocBind.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,CA2CxE"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Wires {@link AcUiToolbar} document open / open-mode state to DocManager.
3
+ *
4
+ * Kept separate from the UI module so the offline HTML viewer-runtime can
5
+ * import {@link AcUiToolbar} without pulling DocManager into the IIFE.
6
+ *
7
+ * @module AcApToolbarDocBind
8
+ * @packageDocumentation
9
+ */
10
+ import { AcApDocManager } from '../app/AcApDocManager';
11
+ import { AcEdOpenMode } from '../editor/view/AcEdOpenMode';
12
+ /**
13
+ * Binds document activated / opening events to a main toolbar.
14
+ * Safe to call after DocManager construction completes.
15
+ *
16
+ * @param toolbar - Toolbar created for a view container.
17
+ * @returns Cleanup that removes listeners.
18
+ */
19
+ export function acapBindToolbarDocState(toolbar) {
20
+ var syncFromDocument = function () {
21
+ var _a;
22
+ var dm = AcApDocManager.tryGetInstance();
23
+ if (!dm) {
24
+ toolbar.setDocState({
25
+ hasDocument: false,
26
+ isOpening: false,
27
+ openMode: AcEdOpenMode.Read
28
+ });
29
+ return;
30
+ }
31
+ var doc = dm.curDocument;
32
+ toolbar.setDocState({
33
+ hasDocument: Boolean(doc),
34
+ isOpening: false,
35
+ openMode: (_a = doc === null || doc === void 0 ? void 0 : doc.openMode) !== null && _a !== void 0 ? _a : AcEdOpenMode.Read
36
+ });
37
+ };
38
+ var onDocumentToBeOpened = function () {
39
+ toolbar.setDocState({ isOpening: true });
40
+ };
41
+ var attachDocManager = function (attempt) {
42
+ if (attempt === void 0) { attempt = 0; }
43
+ var dm = AcApDocManager.tryGetInstance();
44
+ if (!dm) {
45
+ // Created mid-constructor: retry briefly until the singleton is assigned.
46
+ // Cap retries so hosts without DocManager never spin forever.
47
+ if (attempt < 20)
48
+ queueMicrotask(function () { return attachDocManager(attempt + 1); });
49
+ return;
50
+ }
51
+ dm.events.documentActivated.addEventListener(syncFromDocument);
52
+ dm.events.documentToBeOpened.addEventListener(onDocumentToBeOpened);
53
+ syncFromDocument();
54
+ };
55
+ attachDocManager();
56
+ return function () {
57
+ var dm = AcApDocManager.tryGetInstance();
58
+ dm === null || dm === void 0 ? void 0 : dm.events.documentActivated.removeEventListener(syncFromDocument);
59
+ dm === null || dm === void 0 ? void 0 : dm.events.documentToBeOpened.removeEventListener(onDocumentToBeOpened);
60
+ };
61
+ }
62
+ //# sourceMappingURL=AcApToolbarDocBind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApToolbarDocBind.js","sourceRoot":"","sources":["../../src/command/AcApToolbarDocBind.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAG1D;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAoB;IAC1D,IAAM,gBAAgB,GAAG;;QACvB,IAAM,EAAE,GAAG,cAAc,CAAC,cAAc,EAAE,CAAA;QAC1C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO,CAAC,WAAW,CAAC;gBAClB,WAAW,EAAE,KAAK;gBAClB,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,YAAY,CAAC,IAAI;aAC5B,CAAC,CAAA;YACF,OAAM;QACR,CAAC;QACD,IAAM,GAAG,GAAG,EAAE,CAAC,WAAW,CAAA;QAC1B,OAAO,CAAC,WAAW,CAAC;YAClB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;YACzB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,mCAAI,YAAY,CAAC,IAAI;SAC7C,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IAAM,oBAAoB,GAAG;QAC3B,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1C,CAAC,CAAA;IAED,IAAM,gBAAgB,GAAG,UAAC,OAAW;QAAX,wBAAA,EAAA,WAAW;QACnC,IAAM,EAAE,GAAG,cAAc,CAAC,cAAc,EAAE,CAAA;QAC1C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,0EAA0E;YAC1E,8DAA8D;YAC9D,IAAI,OAAO,GAAG,EAAE;gBAAE,cAAc,CAAC,cAAM,OAAA,gBAAgB,CAAC,OAAO,GAAG,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAA;YACrE,OAAM;QACR,CAAC;QACD,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;QAC9D,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAA;QACnE,gBAAgB,EAAE,CAAA;IACpB,CAAC,CAAA;IAED,gBAAgB,EAAE,CAAA;IAElB,OAAO;QACL,IAAM,EAAE,GAAG,cAAc,CAAC,cAAc,EAAE,CAAA;QAC1C,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;QAClE,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IACzE,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
2
+ /**
3
+ * Command for exporting the current CAD drawing to BMP format (`bmpout`).
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const convertCmd = new AcApConvertToBmpCmd();
8
+ * convertCmd.execute(context); // User prompted for bounds and longside
9
+ * ```
10
+ */
11
+ export declare class AcApConvertToBmpCmd extends AcApConvertToRasterImageCmd {
12
+ constructor();
13
+ }
14
+ //# sourceMappingURL=AcApConvertToBmpCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToBmpCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToBmpCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,SAAQ,2BAA2B;;CAInE"}
@@ -0,0 +1,34 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
17
+ /**
18
+ * Command for exporting the current CAD drawing to BMP format (`bmpout`).
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const convertCmd = new AcApConvertToBmpCmd();
23
+ * convertCmd.execute(context); // User prompted for bounds and longside
24
+ * ```
25
+ */
26
+ var AcApConvertToBmpCmd = /** @class */ (function (_super) {
27
+ __extends(AcApConvertToBmpCmd, _super);
28
+ function AcApConvertToBmpCmd() {
29
+ return _super.call(this, 'bmp', 'bmpout') || this;
30
+ }
31
+ return AcApConvertToBmpCmd;
32
+ }(AcApConvertToRasterImageCmd));
33
+ export { AcApConvertToBmpCmd };
34
+ //# sourceMappingURL=AcApConvertToBmpCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToBmpCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToBmpCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH;IAAyC,uCAA2B;IAClE;QACE,OAAA,MAAK,YAAC,KAAK,EAAE,QAAQ,CAAC,SAAA;IACxB,CAAC;IACH,0BAAC;AAAD,CAAC,AAJD,CAAyC,2BAA2B,GAInE"}
@@ -0,0 +1,14 @@
1
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
2
+ /**
3
+ * Command for exporting the current CAD drawing to JPEG format (`jpgout`).
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const convertCmd = new AcApConvertToJpgCmd();
8
+ * convertCmd.execute(context); // User prompted for bounds and longside
9
+ * ```
10
+ */
11
+ export declare class AcApConvertToJpgCmd extends AcApConvertToRasterImageCmd {
12
+ constructor();
13
+ }
14
+ //# sourceMappingURL=AcApConvertToJpgCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToJpgCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToJpgCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,SAAQ,2BAA2B;;CAInE"}
@@ -0,0 +1,34 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
17
+ /**
18
+ * Command for exporting the current CAD drawing to JPEG format (`jpgout`).
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const convertCmd = new AcApConvertToJpgCmd();
23
+ * convertCmd.execute(context); // User prompted for bounds and longside
24
+ * ```
25
+ */
26
+ var AcApConvertToJpgCmd = /** @class */ (function (_super) {
27
+ __extends(AcApConvertToJpgCmd, _super);
28
+ function AcApConvertToJpgCmd() {
29
+ return _super.call(this, 'jpeg', 'jpgout') || this;
30
+ }
31
+ return AcApConvertToJpgCmd;
32
+ }(AcApConvertToRasterImageCmd));
33
+ export { AcApConvertToJpgCmd };
34
+ //# sourceMappingURL=AcApConvertToJpgCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToJpgCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToJpgCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH;IAAyC,uCAA2B;IAClE;QACE,OAAA,MAAK,YAAC,MAAM,EAAE,QAAQ,CAAC,SAAA;IACzB,CAAC;IACH,0BAAC;AAAD,CAAC,AAJD,CAAyC,2BAA2B,GAInE"}
@@ -1,18 +1,6 @@
1
- import { AcApContext } from '../../app';
2
- import { AcEdCommand } from '../../editor';
1
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
3
2
  /**
4
- * Command for exporting the current CAD drawing to PNG format.
5
- *
6
- * This command creates a PNG converter and initiates the conversion
7
- * process to export the current drawing as a PNG file. The command:
8
- * - Creates a new PNG converter instance
9
- * - Prompts for an export bounding box
10
- * - Prompts for optional long side pixel value (or press Enter for default)
11
- * - Converts the current view to PNG format
12
- * - Automatically downloads the PNG file
13
- *
14
- * This is useful for exporting drawings to a raster image format
15
- * that can be displayed in browsers or used in other applications.
3
+ * Command for exporting the current CAD drawing to PNG format (`pngout`).
16
4
  *
17
5
  * @example
18
6
  * ```typescript
@@ -20,27 +8,7 @@ import { AcEdCommand } from '../../editor';
20
8
  * convertCmd.execute(context); // User prompted for bounds and longside
21
9
  * ```
22
10
  */
23
- export declare class AcApConvertToPngCmd extends AcEdCommand {
24
- /**
25
- * Executes the PNG conversion command.
26
- *
27
- * Prompts the user for:
28
- * 1. Export bounding box
29
- * 2. Optional long side pixel value (press Enter for default 1024)
30
- *
31
- * @param _context - The application context (unused in this command)
32
- */
33
- execute(_context: AcApContext): Promise<void>;
34
- /**
35
- * Returns the current drawing extents projected to XY bounds.
36
- */
37
- private getCurrentDrawingBounds;
38
- /**
39
- * Keeps active layout-view size in sync with current view size.
40
- *
41
- * This guards against stale screen-to-world mapping after container layout
42
- * changes that do not fire a window resize event.
43
- */
44
- private syncActiveLayoutViewSize;
11
+ export declare class AcApConvertToPngCmd extends AcApConvertToRasterImageCmd {
12
+ constructor();
45
13
  }
46
14
  //# sourceMappingURL=AcApConvertToPngCmd.d.ts.map
@@ -1 +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;IAsDnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;CAQjC"}
1
+ {"version":3,"file":"AcApConvertToPngCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToPngCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,SAAQ,2BAA2B;;CAInE"}
@@ -13,61 +13,9 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
- return new (P || (P = Promise))(function (resolve, reject) {
19
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
- step((generator = generator.apply(thisArg, _arguments || [])).next());
23
- });
24
- };
25
- var __generator = (this && this.__generator) || function (thisArg, body) {
26
- 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);
27
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
- function verb(n) { return function (v) { return step([n, v]); }; }
29
- function step(op) {
30
- if (f) throw new TypeError("Generator is already executing.");
31
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
- 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;
33
- if (y = 0, t) op = [op[0] & 2, t.value];
34
- switch (op[0]) {
35
- case 0: case 1: t = op; break;
36
- case 4: _.label++; return { value: op[1], done: false };
37
- case 5: _.label++; y = op[1]; op = [0]; continue;
38
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
- default:
40
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
- if (t[2]) _.ops.pop();
45
- _.trys.pop(); continue;
46
- }
47
- op = body.call(thisArg, _);
48
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
- }
51
- };
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';
56
- import { AcApPngConvertor } from './AcApPngConvertor';
57
- var DEFAULT_LONG_SIDE_PX = 1024;
16
+ import { AcApConvertToRasterImageCmd } from './AcApConvertToRasterImageCmd';
58
17
  /**
59
- * Command for exporting the current CAD drawing to PNG format.
60
- *
61
- * This command creates a PNG converter and initiates the conversion
62
- * process to export the current drawing as a PNG file. The command:
63
- * - Creates a new PNG converter instance
64
- * - Prompts for an export bounding box
65
- * - Prompts for optional long side pixel value (or press Enter for default)
66
- * - Converts the current view to PNG format
67
- * - Automatically downloads the PNG file
68
- *
69
- * This is useful for exporting drawings to a raster image format
70
- * that can be displayed in browsers or used in other applications.
18
+ * Command for exporting the current CAD drawing to PNG format (`pngout`).
71
19
  *
72
20
  * @example
73
21
  * ```typescript
@@ -78,91 +26,9 @@ var DEFAULT_LONG_SIDE_PX = 1024;
78
26
  var AcApConvertToPngCmd = /** @class */ (function (_super) {
79
27
  __extends(AcApConvertToPngCmd, _super);
80
28
  function AcApConvertToPngCmd() {
81
- return _super !== null && _super.apply(this, arguments) || this;
29
+ return _super.call(this, 'png', 'pngout') || this;
82
30
  }
83
- /**
84
- * Executes the PNG conversion command.
85
- *
86
- * Prompts the user for:
87
- * 1. Export bounding box
88
- * 2. Optional long side pixel value (press Enter for default 1024)
89
- *
90
- * @param _context - The application context (unused in this command)
91
- */
92
- AcApConvertToPngCmd.prototype.execute = function (_context) {
93
- return __awaiter(this, void 0, void 0, function () {
94
- var converter, view, boxOptions, boxResult, bounds, longSidePrompt, longSideResult, longSide;
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0:
98
- converter = new AcApPngConvertor();
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;
104
- // Empty Enter (script blank line) → use drawing extents.
105
- boxOptions.allowNone = true;
106
- return [4 /*yield*/, AcApDocManager.instance.editor.getBox(boxOptions)];
107
- case 1:
108
- boxResult = _a.sent();
109
- if (boxResult.status === AcEdPromptStatus.OK && boxResult.value) {
110
- bounds = boxResult.value;
111
- }
112
- else if (boxResult.status === AcEdPromptStatus.None) {
113
- bounds = this.getCurrentDrawingBounds();
114
- }
115
- else {
116
- // User canceled or prompt failed: abort command gracefully.
117
- return [2 /*return*/];
118
- }
119
- longSidePrompt = new AcEdPromptDoubleOptions(AcApI18n.t('jig.pngout.longSidePrompt'));
120
- longSidePrompt.allowNone = true;
121
- longSidePrompt.allowNegative = false;
122
- longSidePrompt.allowZero = false;
123
- longSidePrompt.defaultValue = DEFAULT_LONG_SIDE_PX;
124
- longSidePrompt.useDefaultValue = true;
125
- return [4 /*yield*/, AcApDocManager.instance.editor.getDouble(longSidePrompt)];
126
- case 2:
127
- longSideResult = _a.sent();
128
- if (longSideResult.status === AcEdPromptStatus.Cancel ||
129
- longSideResult.status === AcEdPromptStatus.Error) {
130
- return [2 /*return*/];
131
- }
132
- longSide = longSideResult.status === AcEdPromptStatus.OK &&
133
- longSideResult.value !== undefined
134
- ? longSideResult.value
135
- : DEFAULT_LONG_SIDE_PX;
136
- return [4 /*yield*/, converter.convert(bounds, longSide)];
137
- case 3:
138
- _a.sent();
139
- return [2 /*return*/];
140
- }
141
- });
142
- });
143
- };
144
- /**
145
- * Returns the current drawing extents projected to XY bounds.
146
- */
147
- AcApConvertToPngCmd.prototype.getCurrentDrawingBounds = function () {
148
- var db = AcApDocManager.instance.curDocument.database;
149
- var ext = db.extents;
150
- return new AcGeBox2d(new AcGePoint2d(ext.min.x, ext.min.y), new AcGePoint2d(ext.max.x, ext.max.y));
151
- };
152
- /**
153
- * Keeps active layout-view size in sync with current view size.
154
- *
155
- * This guards against stale screen-to-world mapping after container layout
156
- * changes that do not fire a window resize event.
157
- */
158
- AcApConvertToPngCmd.prototype.syncActiveLayoutViewSize = function (view) {
159
- var layoutView = view.activeLayoutView;
160
- if (!layoutView) {
161
- return;
162
- }
163
- layoutView.resize(view.width, view.height);
164
- };
165
31
  return AcApConvertToPngCmd;
166
- }(AcEdCommand));
32
+ }(AcApConvertToRasterImageCmd));
167
33
  export { AcApConvertToPngCmd };
168
34
  //# sourceMappingURL=AcApConvertToPngCmd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcApConvertToPngCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToPngCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9D,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,gBAAgB,EAA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CAAC;QAED,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC5C,CAAC;IACH,0BAAC;AAAD,CAAC,AA1FD,CAAyC,WAAW,GA0FnD"}
1
+ {"version":3,"file":"AcApConvertToPngCmd.js","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToPngCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAE3E;;;;;;;;GAQG;AACH;IAAyC,uCAA2B;IAClE;QACE,OAAA,MAAK,YAAC,KAAK,EAAE,QAAQ,CAAC,SAAA;IACxB,CAAC;IACH,0BAAC;AAAD,CAAC,AAJD,CAAyC,2BAA2B,GAInE"}
@@ -0,0 +1,40 @@
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
+ import { AcApRasterImageFormat } from './AcApRasterImageConvertor';
4
+ /**
5
+ * Shared command logic for exporting the current drawing to a raster image.
6
+ *
7
+ * Prompts for an export bounding box and optional long-side pixel size, then
8
+ * downloads the image via {@link AcApRasterImageConvertor}.
9
+ */
10
+ export declare class AcApConvertToRasterImageCmd extends AcEdCommand {
11
+ private readonly _format;
12
+ private readonly _jigKey;
13
+ /**
14
+ * @param format - Target raster format (`png`, `jpeg`, or `bmp`).
15
+ * @param jigKey - i18n jig namespace (`pngout`, `jpgout`, or `bmpout`).
16
+ */
17
+ constructor(format: AcApRasterImageFormat, jigKey: string);
18
+ /**
19
+ * Executes the raster export command.
20
+ *
21
+ * Prompts the user for:
22
+ * 1. Export bounding box
23
+ * 2. Optional long side pixel value (press Enter for default 1024)
24
+ *
25
+ * @param _context - The application context (unused in this command)
26
+ */
27
+ execute(_context: AcApContext): Promise<void>;
28
+ /**
29
+ * Returns the current drawing extents projected to XY bounds.
30
+ */
31
+ private getCurrentDrawingBounds;
32
+ /**
33
+ * Keeps active layout-view size in sync with current view size.
34
+ *
35
+ * This guards against stale screen-to-world mapping after container layout
36
+ * changes that do not fire a window resize event.
37
+ */
38
+ private syncActiveLayoutViewSize;
39
+ }
40
+ //# sourceMappingURL=AcApConvertToRasterImageCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToRasterImageCmd.d.ts","sourceRoot":"","sources":["../../../src/command/convert/AcApConvertToRasterImageCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EAIZ,MAAM,cAAc,CAAA;AAGrB,OAAO,EAEL,qBAAqB,EACtB,MAAM,4BAA4B,CAAA;AAInC;;;;;GAKG;AACH,qBAAa,2BAA4B,SAAQ,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAEhC;;;OAGG;gBACS,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM;IAMzD;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;IAoDnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;CAQjC"}