@mlightcad/cad-simple-viewer 1.5.10 → 1.6.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 (510) hide show
  1. package/README.md +23 -8
  2. package/dist/cad-simple-viewer.js +35023 -70495
  3. package/dist/cad-simple-viewer.umd.cjs +143 -420
  4. package/lib/app/AcApDocManager.d.ts +50 -39
  5. package/lib/app/AcApDocManager.d.ts.map +1 -1
  6. package/lib/app/AcApDocManager.js +146 -72
  7. package/lib/app/AcApDocManager.js.map +1 -1
  8. package/lib/app/AcApSettingManager.d.ts +24 -10
  9. package/lib/app/AcApSettingManager.d.ts.map +1 -1
  10. package/lib/app/AcApSettingManager.js +49 -10
  11. package/lib/app/AcApSettingManager.js.map +1 -1
  12. package/lib/app/AcApWebworkerReadiness.d.ts +7 -2
  13. package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -1
  14. package/lib/app/AcApWebworkerReadiness.js +13 -8
  15. package/lib/app/AcApWebworkerReadiness.js.map +1 -1
  16. package/lib/app/AcApWorkerAssets.d.ts +14 -1
  17. package/lib/app/AcApWorkerAssets.d.ts.map +1 -1
  18. package/lib/app/AcApWorkerAssets.js +14 -1
  19. package/lib/app/AcApWorkerAssets.js.map +1 -1
  20. package/lib/app/index.d.ts +0 -1
  21. package/lib/app/index.d.ts.map +1 -1
  22. package/lib/app/index.js +0 -1
  23. package/lib/app/index.js.map +1 -1
  24. package/lib/command/AcApRedoCmd.d.ts +1 -1
  25. package/lib/command/AcApRedoCmd.d.ts.map +1 -1
  26. package/lib/command/AcApRedoCmd.js +9 -4
  27. package/lib/command/AcApRedoCmd.js.map +1 -1
  28. package/lib/command/AcApUndoCmd.d.ts +1 -1
  29. package/lib/command/AcApUndoCmd.d.ts.map +1 -1
  30. package/lib/command/AcApUndoCmd.js +9 -4
  31. package/lib/command/AcApUndoCmd.js.map +1 -1
  32. package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -1
  33. package/lib/command/convert/AcApConvertToPngCmd.js +5 -1
  34. package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -1
  35. package/lib/command/convert/AcApPngConvertor.d.ts +4 -1
  36. package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
  37. package/lib/command/convert/AcApPngConvertor.js +131 -78
  38. package/lib/command/convert/AcApPngConvertor.js.map +1 -1
  39. package/lib/command/draw/AcApRevCloudCmd.d.ts +48 -0
  40. package/lib/command/draw/AcApRevCloudCmd.d.ts.map +1 -0
  41. package/lib/command/draw/AcApRevCloudCmd.js +747 -0
  42. package/lib/command/draw/AcApRevCloudCmd.js.map +1 -0
  43. package/lib/command/draw/AcApRevCloudGeom.d.ts +57 -0
  44. package/lib/command/draw/AcApRevCloudGeom.d.ts.map +1 -0
  45. package/lib/command/draw/AcApRevCloudGeom.js +373 -0
  46. package/lib/command/draw/AcApRevCloudGeom.js.map +1 -0
  47. package/lib/command/draw/AcApSketchCmd.d.ts +59 -0
  48. package/lib/command/draw/AcApSketchCmd.d.ts.map +1 -0
  49. package/lib/command/draw/AcApSketchCmd.js +537 -0
  50. package/lib/command/draw/AcApSketchCmd.js.map +1 -0
  51. package/lib/command/draw/index.d.ts +3 -0
  52. package/lib/command/draw/index.d.ts.map +1 -1
  53. package/lib/command/draw/index.js +3 -0
  54. package/lib/command/draw/index.js.map +1 -1
  55. package/lib/command/index.d.ts +2 -1
  56. package/lib/command/index.d.ts.map +1 -1
  57. package/lib/command/index.js +2 -1
  58. package/lib/command/index.js.map +1 -1
  59. package/lib/command/markup/AcApClearMarkupsCmd.d.ts +10 -0
  60. package/lib/command/markup/AcApClearMarkupsCmd.d.ts.map +1 -0
  61. package/lib/command/{review/AcApRevCircleCmd.js → markup/AcApClearMarkupsCmd.js} +19 -49
  62. package/lib/command/markup/AcApClearMarkupsCmd.js.map +1 -0
  63. package/lib/command/markup/AcApMarkupArrowCmd.d.ts +10 -0
  64. package/lib/command/markup/AcApMarkupArrowCmd.d.ts.map +1 -0
  65. package/lib/command/markup/AcApMarkupArrowCmd.js +164 -0
  66. package/lib/command/markup/AcApMarkupArrowCmd.js.map +1 -0
  67. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts +17 -0
  68. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -0
  69. package/lib/command/markup/AcApMarkupCalloutCmd.js +259 -0
  70. package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -0
  71. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts +78 -0
  72. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts.map +1 -0
  73. package/lib/command/markup/AcApMarkupCalloutDrag.js +78 -0
  74. package/lib/command/markup/AcApMarkupCalloutDrag.js.map +1 -0
  75. package/lib/command/markup/AcApMarkupCircleCmd.d.ts +10 -0
  76. package/lib/command/markup/AcApMarkupCircleCmd.d.ts.map +1 -0
  77. package/lib/command/markup/AcApMarkupCircleCmd.js +174 -0
  78. package/lib/command/markup/AcApMarkupCircleCmd.js.map +1 -0
  79. package/lib/command/markup/AcApMarkupCloudCmd.d.ts +11 -0
  80. package/lib/command/markup/AcApMarkupCloudCmd.d.ts.map +1 -0
  81. package/lib/command/markup/AcApMarkupCloudCmd.js +178 -0
  82. package/lib/command/markup/AcApMarkupCloudCmd.js.map +1 -0
  83. package/lib/command/markup/AcApMarkupCmdUtil.d.ts +43 -0
  84. package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -0
  85. package/lib/command/markup/AcApMarkupCmdUtil.js +133 -0
  86. package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -0
  87. package/lib/command/markup/AcApMarkupGeometry.d.ts +57 -0
  88. package/lib/command/markup/AcApMarkupGeometry.d.ts.map +1 -0
  89. package/lib/command/markup/AcApMarkupGeometry.js +231 -0
  90. package/lib/command/markup/AcApMarkupGeometry.js.map +1 -0
  91. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts +10 -0
  92. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts.map +1 -0
  93. package/lib/command/markup/AcApMarkupHighlightCmd.js +166 -0
  94. package/lib/command/markup/AcApMarkupHighlightCmd.js.map +1 -0
  95. package/lib/command/markup/AcApMarkupHistory.d.ts +139 -0
  96. package/lib/command/markup/AcApMarkupHistory.d.ts.map +1 -0
  97. package/lib/command/markup/AcApMarkupHistory.js +336 -0
  98. package/lib/command/markup/AcApMarkupHistory.js.map +1 -0
  99. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts +17 -0
  100. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts.map +1 -0
  101. package/lib/command/markup/AcApMarkupImportExportCmd.js +182 -0
  102. package/lib/command/markup/AcApMarkupImportExportCmd.js.map +1 -0
  103. package/lib/command/markup/AcApMarkupLineCmd.d.ts +10 -0
  104. package/lib/command/markup/AcApMarkupLineCmd.d.ts.map +1 -0
  105. package/lib/command/markup/AcApMarkupLineCmd.js +185 -0
  106. package/lib/command/markup/AcApMarkupLineCmd.js.map +1 -0
  107. package/lib/command/markup/AcApMarkupPresenter.d.ts +62 -0
  108. package/lib/command/markup/AcApMarkupPresenter.d.ts.map +1 -0
  109. package/lib/command/markup/AcApMarkupPresenter.js +288 -0
  110. package/lib/command/markup/AcApMarkupPresenter.js.map +1 -0
  111. package/lib/command/markup/AcApMarkupRectCmd.d.ts +10 -0
  112. package/lib/command/markup/AcApMarkupRectCmd.d.ts.map +1 -0
  113. package/lib/command/markup/AcApMarkupRectCmd.js +174 -0
  114. package/lib/command/markup/AcApMarkupRectCmd.js.map +1 -0
  115. package/lib/command/markup/AcApMarkupRepublish.d.ts +29 -0
  116. package/lib/command/markup/AcApMarkupRepublish.d.ts.map +1 -0
  117. package/lib/command/markup/AcApMarkupRepublish.js +28 -0
  118. package/lib/command/markup/AcApMarkupRepublish.js.map +1 -0
  119. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts +88 -0
  120. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts.map +1 -0
  121. package/lib/command/markup/AcApMarkupShapeBuilder.js +246 -0
  122. package/lib/command/markup/AcApMarkupShapeBuilder.js.map +1 -0
  123. package/lib/command/markup/AcApMarkupShapeCallout.d.ts +46 -0
  124. package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -0
  125. package/lib/command/markup/AcApMarkupShapeCallout.js +356 -0
  126. package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -0
  127. package/lib/command/markup/AcApMarkupSidecar.d.ts +14 -0
  128. package/lib/command/markup/AcApMarkupSidecar.d.ts.map +1 -0
  129. package/lib/command/markup/AcApMarkupSidecar.js +196 -0
  130. package/lib/command/markup/AcApMarkupSidecar.js.map +1 -0
  131. package/lib/command/markup/AcApMarkupStampCmd.d.ts +10 -0
  132. package/lib/command/markup/AcApMarkupStampCmd.d.ts.map +1 -0
  133. package/lib/command/markup/AcApMarkupStampCmd.js +158 -0
  134. package/lib/command/markup/AcApMarkupStampCmd.js.map +1 -0
  135. package/lib/command/markup/AcApMarkupStore.d.ts +94 -0
  136. package/lib/command/markup/AcApMarkupStore.d.ts.map +1 -0
  137. package/lib/command/markup/AcApMarkupStore.js +327 -0
  138. package/lib/command/markup/AcApMarkupStore.js.map +1 -0
  139. package/lib/command/markup/AcApMarkupTextCmd.d.ts +10 -0
  140. package/lib/command/markup/AcApMarkupTextCmd.d.ts.map +1 -0
  141. package/lib/command/markup/AcApMarkupTextCmd.js +141 -0
  142. package/lib/command/markup/AcApMarkupTextCmd.js.map +1 -0
  143. package/lib/command/markup/AcApMarkupTextEdit.d.ts +88 -0
  144. package/lib/command/markup/AcApMarkupTextEdit.d.ts.map +1 -0
  145. package/lib/command/markup/AcApMarkupTextEdit.js +249 -0
  146. package/lib/command/markup/AcApMarkupTextEdit.js.map +1 -0
  147. package/lib/command/markup/AcApMarkupTypes.d.ts +118 -0
  148. package/lib/command/markup/AcApMarkupTypes.d.ts.map +1 -0
  149. package/lib/command/markup/AcApMarkupTypes.js +8 -0
  150. package/lib/command/markup/AcApMarkupTypes.js.map +1 -0
  151. package/lib/command/markup/AcApMarkupUtil.d.ts +41 -0
  152. package/lib/command/markup/AcApMarkupUtil.d.ts.map +1 -0
  153. package/lib/command/markup/AcApMarkupUtil.js +135 -0
  154. package/lib/command/markup/AcApMarkupUtil.js.map +1 -0
  155. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts +17 -0
  156. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts.map +1 -0
  157. package/lib/command/{review/AcApRevVisibilityCmd.js → markup/AcApMarkupVisibilityCmd.js} +30 -27
  158. package/lib/command/markup/AcApMarkupVisibilityCmd.js.map +1 -0
  159. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts +48 -0
  160. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts.map +1 -0
  161. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js +291 -0
  162. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js.map +1 -0
  163. package/lib/command/markup/entity/AcApMarkupEntity.d.ts +131 -0
  164. package/lib/command/markup/entity/AcApMarkupEntity.d.ts.map +1 -0
  165. package/lib/command/markup/entity/AcApMarkupEntity.js +191 -0
  166. package/lib/command/markup/entity/AcApMarkupEntity.js.map +1 -0
  167. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts +20 -0
  168. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts.map +1 -0
  169. package/lib/command/markup/entity/AcApMarkupEntityFactory.js +43 -0
  170. package/lib/command/markup/entity/AcApMarkupEntityFactory.js.map +1 -0
  171. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts +94 -0
  172. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts.map +1 -0
  173. package/lib/command/markup/entity/AcApMarkupEntityGrips.js +204 -0
  174. package/lib/command/markup/entity/AcApMarkupEntityGrips.js.map +1 -0
  175. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts +27 -0
  176. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts.map +1 -0
  177. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js +124 -0
  178. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js.map +1 -0
  179. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts +40 -0
  180. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts.map +1 -0
  181. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js +294 -0
  182. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js.map +1 -0
  183. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts +32 -0
  184. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts.map +1 -0
  185. package/lib/command/markup/entity/AcApMarkupShapeEntity.js +241 -0
  186. package/lib/command/markup/entity/AcApMarkupShapeEntity.js.map +1 -0
  187. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts +23 -0
  188. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts.map +1 -0
  189. package/lib/command/markup/entity/AcApMarkupStampEntity.js +125 -0
  190. package/lib/command/markup/entity/AcApMarkupStampEntity.js.map +1 -0
  191. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts +23 -0
  192. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts.map +1 -0
  193. package/lib/command/markup/entity/AcApMarkupTextEntity.js +129 -0
  194. package/lib/command/markup/entity/AcApMarkupTextEntity.js.map +1 -0
  195. package/lib/command/markup/entity/index.d.ts +13 -0
  196. package/lib/command/markup/entity/index.d.ts.map +1 -0
  197. package/lib/command/markup/entity/index.js +13 -0
  198. package/lib/command/markup/entity/index.js.map +1 -0
  199. package/lib/command/markup/index.d.ts +27 -0
  200. package/lib/command/markup/index.d.ts.map +1 -0
  201. package/lib/command/markup/index.js +27 -0
  202. package/lib/command/markup/index.js.map +1 -0
  203. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +5 -12
  204. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
  205. package/lib/command/measure/AcApClearMeasurementsCmd.js +42 -20
  206. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
  207. package/lib/command/measure/AcApMeasureAngleCmd.d.ts +13 -3
  208. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
  209. package/lib/command/measure/AcApMeasureAngleCmd.js +76 -210
  210. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
  211. package/lib/command/measure/AcApMeasureArcCmd.d.ts +21 -1
  212. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
  213. package/lib/command/measure/AcApMeasureArcCmd.js +103 -97
  214. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
  215. package/lib/command/measure/AcApMeasureAreaCmd.d.ts +11 -1
  216. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
  217. package/lib/command/measure/AcApMeasureAreaCmd.js +126 -144
  218. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
  219. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +24 -15
  220. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
  221. package/lib/command/measure/AcApMeasureDistanceCmd.js +52 -52
  222. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
  223. package/lib/command/measure/AcApMeasurePointCmd.d.ts +24 -0
  224. package/lib/command/measure/AcApMeasurePointCmd.d.ts.map +1 -0
  225. package/lib/command/measure/AcApMeasurePointCmd.js +114 -0
  226. package/lib/command/measure/AcApMeasurePointCmd.js.map +1 -0
  227. package/lib/command/measure/AcApMeasurementGeometry.d.ts +22 -0
  228. package/lib/command/measure/AcApMeasurementGeometry.d.ts.map +1 -0
  229. package/lib/command/measure/AcApMeasurementGeometry.js +127 -0
  230. package/lib/command/measure/AcApMeasurementGeometry.js.map +1 -0
  231. package/lib/command/measure/AcApMeasurementHistory.d.ts +78 -0
  232. package/lib/command/measure/AcApMeasurementHistory.d.ts.map +1 -0
  233. package/lib/command/measure/AcApMeasurementHistory.js +387 -0
  234. package/lib/command/measure/AcApMeasurementHistory.js.map +1 -0
  235. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts +17 -0
  236. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts.map +1 -0
  237. package/lib/command/measure/AcApMeasurementImportExportCmd.js +207 -0
  238. package/lib/command/measure/AcApMeasurementImportExportCmd.js.map +1 -0
  239. package/lib/command/measure/AcApMeasurementPlace.d.ts +9 -0
  240. package/lib/command/measure/AcApMeasurementPlace.d.ts.map +1 -0
  241. package/lib/command/measure/AcApMeasurementPlace.js +33 -0
  242. package/lib/command/measure/AcApMeasurementPlace.js.map +1 -0
  243. package/lib/command/measure/AcApMeasurementSidecar.d.ts +19 -0
  244. package/lib/command/measure/AcApMeasurementSidecar.d.ts.map +1 -0
  245. package/lib/command/measure/AcApMeasurementSidecar.js +173 -0
  246. package/lib/command/measure/AcApMeasurementSidecar.js.map +1 -0
  247. package/lib/command/measure/AcApMeasurementStore.d.ts +90 -0
  248. package/lib/command/measure/AcApMeasurementStore.d.ts.map +1 -0
  249. package/lib/command/measure/AcApMeasurementStore.js +364 -0
  250. package/lib/command/measure/AcApMeasurementStore.js.map +1 -0
  251. package/lib/command/measure/AcApMeasurementTypes.d.ts +56 -0
  252. package/lib/command/measure/AcApMeasurementTypes.d.ts.map +1 -0
  253. package/lib/command/measure/AcApMeasurementTypes.js +2 -0
  254. package/lib/command/measure/AcApMeasurementTypes.js.map +1 -0
  255. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts +10 -0
  256. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts.map +1 -0
  257. package/lib/command/measure/AcApMeasurementVisibilityCmd.js +78 -0
  258. package/lib/command/measure/AcApMeasurementVisibilityCmd.js.map +1 -0
  259. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts +68 -0
  260. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts.map +1 -0
  261. package/lib/command/measure/entity/AcApMeasureAngleEntity.js +188 -0
  262. package/lib/command/measure/entity/AcApMeasureAngleEntity.js.map +1 -0
  263. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts +85 -0
  264. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts.map +1 -0
  265. package/lib/command/measure/entity/AcApMeasureArcEntity.js +159 -0
  266. package/lib/command/measure/entity/AcApMeasureArcEntity.js.map +1 -0
  267. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts +60 -0
  268. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts.map +1 -0
  269. package/lib/command/measure/entity/AcApMeasureAreaEntity.js +184 -0
  270. package/lib/command/measure/entity/AcApMeasureAreaEntity.js.map +1 -0
  271. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts +60 -0
  272. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts.map +1 -0
  273. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js +166 -0
  274. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js.map +1 -0
  275. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +129 -0
  276. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -0
  277. package/lib/command/measure/entity/AcApMeasureDrawUtil.js +257 -0
  278. package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -0
  279. package/lib/command/measure/entity/AcApMeasureEntity.d.ts +148 -0
  280. package/lib/command/measure/entity/AcApMeasureEntity.d.ts.map +1 -0
  281. package/lib/command/measure/entity/AcApMeasureEntity.js +141 -0
  282. package/lib/command/measure/entity/AcApMeasureEntity.js.map +1 -0
  283. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts +15 -0
  284. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts.map +1 -0
  285. package/lib/command/measure/entity/AcApMeasureEntityFactory.js +35 -0
  286. package/lib/command/measure/entity/AcApMeasureEntityFactory.js.map +1 -0
  287. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts +56 -0
  288. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts.map +1 -0
  289. package/lib/command/measure/entity/AcApMeasurePointEntity.js +125 -0
  290. package/lib/command/measure/entity/AcApMeasurePointEntity.js.map +1 -0
  291. package/lib/command/measure/entity/index.d.ts +12 -0
  292. package/lib/command/measure/entity/index.d.ts.map +1 -0
  293. package/lib/command/measure/entity/index.js +12 -0
  294. package/lib/command/measure/entity/index.js.map +1 -0
  295. package/lib/command/measure/index.d.ts +10 -0
  296. package/lib/command/measure/index.d.ts.map +1 -1
  297. package/lib/command/measure/index.js +10 -0
  298. package/lib/command/measure/index.js.map +1 -1
  299. package/lib/command/modify/AcApCopyCmd.d.ts +1 -1
  300. package/lib/command/modify/AcApCopyCmd.js +2 -2
  301. package/lib/command/modify/AcApCopyCmd.js.map +1 -1
  302. package/lib/command/modify/AcApMoveCmd.js +1 -1
  303. package/lib/command/modify/AcApMoveCmd.js.map +1 -1
  304. package/lib/command/modify/AcApOffsetCmd.d.ts +1 -1
  305. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
  306. package/lib/command/modify/AcApOffsetCmd.js +5 -10
  307. package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
  308. package/lib/command/modify/AcApRotateCmd.d.ts +1 -1
  309. package/lib/command/modify/AcApRotateCmd.js +2 -2
  310. package/lib/command/modify/AcApRotateCmd.js.map +1 -1
  311. package/lib/command/overlay/AcApHtmlLivePreview.d.ts +121 -0
  312. package/lib/command/overlay/AcApHtmlLivePreview.d.ts.map +1 -0
  313. package/lib/command/overlay/AcApHtmlLivePreview.js +193 -0
  314. package/lib/command/overlay/AcApHtmlLivePreview.js.map +1 -0
  315. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts +63 -0
  316. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts.map +1 -0
  317. package/lib/command/overlay/AcApOverlayDrawUtil.js +115 -0
  318. package/lib/command/overlay/AcApOverlayDrawUtil.js.map +1 -0
  319. package/lib/command/overlay/AcApOverlayEntity.d.ts +93 -0
  320. package/lib/command/overlay/AcApOverlayEntity.d.ts.map +1 -0
  321. package/lib/command/overlay/AcApOverlayEntity.js +65 -0
  322. package/lib/command/overlay/AcApOverlayEntity.js.map +1 -0
  323. package/lib/command/overlay/AcApOverlayGripHost.d.ts +105 -0
  324. package/lib/command/overlay/AcApOverlayGripHost.d.ts.map +1 -0
  325. package/lib/command/overlay/AcApOverlayGripHost.js +207 -0
  326. package/lib/command/overlay/AcApOverlayGripHost.js.map +1 -0
  327. package/lib/command/overlay/AcApOverlaySerializable.d.ts +20 -0
  328. package/lib/command/overlay/AcApOverlaySerializable.d.ts.map +1 -0
  329. package/lib/command/overlay/AcApOverlaySerializable.js +2 -0
  330. package/lib/command/overlay/AcApOverlaySerializable.js.map +1 -0
  331. package/lib/command/overlay/index.d.ts +13 -0
  332. package/lib/command/overlay/index.d.ts.map +1 -0
  333. package/lib/command/overlay/index.js +13 -0
  334. package/lib/command/overlay/index.js.map +1 -0
  335. package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
  336. package/lib/editor/command/AcEdCommand.js +1 -0
  337. package/lib/editor/command/AcEdCommand.js.map +1 -1
  338. package/lib/editor/global/AcEdUiLayout.d.ts +3 -3
  339. package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
  340. package/lib/editor/global/AcEdUiLayout.js +3 -3
  341. package/lib/editor/global/AcEdUiLayout.js.map +1 -1
  342. package/lib/editor/global/AcEdUiTheme.d.ts +1 -1
  343. package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
  344. package/lib/editor/global/AcEdUiTheme.js +1 -1
  345. package/lib/editor/global/AcEdUiTheme.js.map +1 -1
  346. package/lib/editor/global/eventBus.d.ts +5 -0
  347. package/lib/editor/global/eventBus.d.ts.map +1 -1
  348. package/lib/editor/global/eventBus.js.map +1 -1
  349. package/lib/editor/input/AcEditor.d.ts +6 -0
  350. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  351. package/lib/editor/input/AcEditor.js +10 -0
  352. package/lib/editor/input/AcEditor.js.map +1 -1
  353. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +7 -0
  354. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
  355. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +17 -0
  356. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
  357. package/lib/editor/input/ui/AcEdInputManager.d.ts +9 -0
  358. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  359. package/lib/editor/input/ui/AcEdInputManager.js +17 -0
  360. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  361. package/lib/editor/input/ui/AcEdMTextEditor.js +3 -3
  362. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
  363. package/lib/i18n/cs/command.d.ts +60 -0
  364. package/lib/i18n/cs/command.d.ts.map +1 -1
  365. package/lib/i18n/cs/command.js +63 -3
  366. package/lib/i18n/cs/command.js.map +1 -1
  367. package/lib/i18n/cs/jig.d.ts +1227 -1
  368. package/lib/i18n/cs/jig.d.ts.map +1 -1
  369. package/lib/i18n/cs/jig.js +1226 -6
  370. package/lib/i18n/cs/jig.js.map +1 -1
  371. package/lib/i18n/cs/main.d.ts +5 -0
  372. package/lib/i18n/cs/main.d.ts.map +1 -1
  373. package/lib/i18n/cs/main.js +5 -0
  374. package/lib/i18n/cs/main.js.map +1 -1
  375. package/lib/i18n/en/command.d.ts +57 -0
  376. package/lib/i18n/en/command.d.ts.map +1 -1
  377. package/lib/i18n/en/command.js +60 -3
  378. package/lib/i18n/en/command.js.map +1 -1
  379. package/lib/i18n/en/jig.d.ts +180 -0
  380. package/lib/i18n/en/jig.d.ts.map +1 -1
  381. package/lib/i18n/en/jig.js +181 -1
  382. package/lib/i18n/en/jig.js.map +1 -1
  383. package/lib/i18n/en/main.d.ts +5 -0
  384. package/lib/i18n/en/main.d.ts.map +1 -1
  385. package/lib/i18n/en/main.js +5 -0
  386. package/lib/i18n/en/main.js.map +1 -1
  387. package/lib/i18n/tr/command.d.ts +57 -0
  388. package/lib/i18n/tr/command.d.ts.map +1 -1
  389. package/lib/i18n/tr/command.js +60 -3
  390. package/lib/i18n/tr/command.js.map +1 -1
  391. package/lib/i18n/tr/jig.d.ts +180 -0
  392. package/lib/i18n/tr/jig.d.ts.map +1 -1
  393. package/lib/i18n/tr/jig.js +181 -1
  394. package/lib/i18n/tr/jig.js.map +1 -1
  395. package/lib/i18n/tr/main.d.ts +7 -0
  396. package/lib/i18n/tr/main.d.ts.map +1 -1
  397. package/lib/i18n/tr/main.js +7 -0
  398. package/lib/i18n/tr/main.js.map +1 -1
  399. package/lib/i18n/zh/command.d.ts +57 -0
  400. package/lib/i18n/zh/command.d.ts.map +1 -1
  401. package/lib/i18n/zh/command.js +60 -3
  402. package/lib/i18n/zh/command.js.map +1 -1
  403. package/lib/i18n/zh/jig.d.ts +180 -0
  404. package/lib/i18n/zh/jig.d.ts.map +1 -1
  405. package/lib/i18n/zh/jig.js +181 -1
  406. package/lib/i18n/zh/jig.js.map +1 -1
  407. package/lib/i18n/zh/main.d.ts +5 -0
  408. package/lib/i18n/zh/main.d.ts.map +1 -1
  409. package/lib/i18n/zh/main.js +5 -0
  410. package/lib/i18n/zh/main.js.map +1 -1
  411. package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
  412. package/lib/plugin/AcApPluginManager.js +2 -1
  413. package/lib/plugin/AcApPluginManager.js.map +1 -1
  414. package/lib/service/AcApEntitySelection.d.ts +0 -3
  415. package/lib/service/AcApEntitySelection.d.ts.map +1 -1
  416. package/lib/service/AcApEntitySelection.js +42 -36
  417. package/lib/service/AcApEntitySelection.js.map +1 -1
  418. package/lib/ui/AcApDrawStyle.d.ts +63 -0
  419. package/lib/ui/AcApDrawStyle.d.ts.map +1 -0
  420. package/lib/ui/AcApDrawStyle.js +149 -0
  421. package/lib/ui/AcApDrawStyle.js.map +1 -0
  422. package/lib/ui/AcApDrawStyleToolbar.d.ts +124 -0
  423. package/lib/ui/AcApDrawStyleToolbar.d.ts.map +1 -0
  424. package/lib/ui/AcApDrawStyleToolbar.js +486 -0
  425. package/lib/ui/AcApDrawStyleToolbar.js.map +1 -0
  426. package/lib/ui/AcUiDialog.d.ts.map +1 -1
  427. package/lib/ui/AcUiDialog.js +2 -2
  428. package/lib/ui/AcUiDialog.js.map +1 -1
  429. package/lib/ui/index.d.ts +2 -0
  430. package/lib/ui/index.d.ts.map +1 -1
  431. package/lib/ui/index.js +2 -0
  432. package/lib/ui/index.js.map +1 -1
  433. package/lib/util/AcApDatabaseEdit.d.ts.map +1 -1
  434. package/lib/util/AcApDatabaseEdit.js +1 -0
  435. package/lib/util/AcApDatabaseEdit.js.map +1 -1
  436. package/lib/util/AcApMeasurementUnits.d.ts +52 -0
  437. package/lib/util/AcApMeasurementUnits.d.ts.map +1 -0
  438. package/lib/util/AcApMeasurementUnits.js +137 -0
  439. package/lib/util/AcApMeasurementUnits.js.map +1 -0
  440. package/lib/util/AcApMeasurementUtil.d.ts +42 -0
  441. package/lib/util/AcApMeasurementUtil.d.ts.map +1 -0
  442. package/lib/util/AcApMeasurementUtil.js +98 -0
  443. package/lib/util/AcApMeasurementUtil.js.map +1 -0
  444. package/lib/util/AcApScreenHitTest.d.ts +35 -0
  445. package/lib/util/AcApScreenHitTest.d.ts.map +1 -0
  446. package/lib/util/AcApScreenHitTest.js +98 -0
  447. package/lib/util/AcApScreenHitTest.js.map +1 -0
  448. package/lib/util/AcApScriptParser.d.ts +13 -0
  449. package/lib/util/AcApScriptParser.d.ts.map +1 -0
  450. package/lib/util/AcApScriptParser.js +55 -0
  451. package/lib/util/AcApScriptParser.js.map +1 -0
  452. package/lib/util/index.d.ts +4 -1
  453. package/lib/util/index.d.ts.map +1 -1
  454. package/lib/util/index.js +4 -1
  455. package/lib/util/index.js.map +1 -1
  456. package/lib/view/AcEdReviewOverlayPick.d.ts +25 -0
  457. package/lib/view/AcEdReviewOverlayPick.d.ts.map +1 -0
  458. package/lib/view/AcEdReviewOverlayPick.js +229 -0
  459. package/lib/view/AcEdReviewOverlayPick.js.map +1 -0
  460. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
  461. package/lib/view/AcEdViewKeyHandler.js +53 -0
  462. package/lib/view/AcEdViewKeyHandler.js.map +1 -1
  463. package/lib/view/AcTrScene.d.ts +15 -1
  464. package/lib/view/AcTrScene.d.ts.map +1 -1
  465. package/lib/view/AcTrScene.js +25 -2
  466. package/lib/view/AcTrScene.js.map +1 -1
  467. package/lib/view/AcTrView2d.d.ts +46 -5
  468. package/lib/view/AcTrView2d.d.ts.map +1 -1
  469. package/lib/view/AcTrView2d.js +179 -74
  470. package/lib/view/AcTrView2d.js.map +1 -1
  471. package/lib/view/index.d.ts +1 -0
  472. package/lib/view/index.d.ts.map +1 -1
  473. package/lib/view/index.js +1 -0
  474. package/lib/view/index.js.map +1 -1
  475. package/package.json +7 -6
  476. package/dist/libredwg-parser-worker.js +0 -7525
  477. package/lib/app/AcApAnnotation.d.ts +0 -47
  478. package/lib/app/AcApAnnotation.d.ts.map +0 -1
  479. package/lib/app/AcApAnnotation.js +0 -135
  480. package/lib/app/AcApAnnotation.js.map +0 -1
  481. package/lib/command/review/AcApBaseRevCmd.d.ts +0 -36
  482. package/lib/command/review/AcApBaseRevCmd.d.ts.map +0 -1
  483. package/lib/command/review/AcApBaseRevCmd.js +0 -68
  484. package/lib/command/review/AcApBaseRevCmd.js.map +0 -1
  485. package/lib/command/review/AcApRevCircleCmd.d.ts +0 -18
  486. package/lib/command/review/AcApRevCircleCmd.d.ts.map +0 -1
  487. package/lib/command/review/AcApRevCircleCmd.js.map +0 -1
  488. package/lib/command/review/AcApRevCloudCmd.d.ts +0 -26
  489. package/lib/command/review/AcApRevCloudCmd.d.ts.map +0 -1
  490. package/lib/command/review/AcApRevCloudCmd.js +0 -240
  491. package/lib/command/review/AcApRevCloudCmd.js.map +0 -1
  492. package/lib/command/review/AcApRevRectCmd.d.ts +0 -18
  493. package/lib/command/review/AcApRevRectCmd.d.ts.map +0 -1
  494. package/lib/command/review/AcApRevRectCmd.js +0 -155
  495. package/lib/command/review/AcApRevRectCmd.js.map +0 -1
  496. package/lib/command/review/AcApRevVisibilityCmd.d.ts +0 -15
  497. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +0 -1
  498. package/lib/command/review/AcApRevVisibilityCmd.js.map +0 -1
  499. package/lib/command/review/AcApSketchCmd.d.ts +0 -32
  500. package/lib/command/review/AcApSketchCmd.d.ts.map +0 -1
  501. package/lib/command/review/AcApSketchCmd.js +0 -175
  502. package/lib/command/review/AcApSketchCmd.js.map +0 -1
  503. package/lib/command/review/index.d.ts +0 -7
  504. package/lib/command/review/index.d.ts.map +0 -1
  505. package/lib/command/review/index.js +0 -7
  506. package/lib/command/review/index.js.map +0 -1
  507. package/lib/util/AcApMeasurementElementGenerator.d.ts +0 -36
  508. package/lib/util/AcApMeasurementElementGenerator.d.ts.map +0 -1
  509. package/lib/util/AcApMeasurementElementGenerator.js +0 -92
  510. package/lib/util/AcApMeasurementElementGenerator.js.map +0 -1
@@ -49,42 +49,45 @@ 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 { AcApAnnotation } from '../../app';
53
- import { AcEdOpenMode } from '../../editor';
54
- import { AcApBaseRevCmd } from './AcApBaseRevCmd';
52
+ import { AcEdCommand, AcEdOpenMode } from '../../editor';
53
+ import { MARKUP_LAYER, MARKUP_LIVE_LAYER } from './AcApMarkupStore';
54
+ /** Session visibility for the markup HTML / canvas layer. */
55
+ var markupVisible = true;
56
+ /** Whether markup overlays are currently shown. */
57
+ export function isMarkupVisible() {
58
+ return markupVisible;
59
+ }
55
60
  /**
56
- * Command for switching the visibility of the current layer.
61
+ * Show or hide all Design Review markup overlays (committed + live layers).
57
62
  */
58
- var AcApRevVisibilityCmd = /** @class */ (function (_super) {
59
- __extends(AcApRevVisibilityCmd, _super);
60
- function AcApRevVisibilityCmd() {
63
+ export function setMarkupVisible(view, visible) {
64
+ markupVisible = visible;
65
+ view.htmlTransientManager.setVisible(visible, MARKUP_LAYER);
66
+ view.htmlTransientManager.setVisible(visible, MARKUP_LIVE_LAYER);
67
+ view.isHtmlDirty = true;
68
+ }
69
+ /**
70
+ * Toggle Design Review markup overlay visibility.
71
+ */
72
+ var AcApMarkupVisibilityCmd = /** @class */ (function (_super) {
73
+ __extends(AcApMarkupVisibilityCmd, _super);
74
+ function AcApMarkupVisibilityCmd() {
61
75
  var _this = _super.call(this) || this;
62
76
  _this.mode = AcEdOpenMode.Review;
63
- _this.isShowEntityDrawStyleToolbar = false;
77
+ _this.recordsUndoStack = false;
64
78
  return _this;
65
79
  }
66
- /**
67
- * Executes the command to switch the visibility of the current layer.
68
- *
69
- * @param context - The application context containing the view
70
- */
71
- AcApRevVisibilityCmd.prototype.execute = function (context) {
80
+ AcApMarkupVisibilityCmd.prototype.execute = function (context) {
72
81
  return __awaiter(this, void 0, void 0, function () {
73
- var db, annotation, annotationLayer, layer;
82
+ var view;
74
83
  return __generator(this, function (_a) {
75
- db = context.doc.database;
76
- annotation = new AcApAnnotation(db);
77
- annotationLayer = annotation.getAnnotationLayer();
78
- if (annotationLayer) {
79
- layer = db.tables.layerTable.getAt(annotationLayer);
80
- if (layer)
81
- layer.isOff = !layer.isOff;
82
- }
84
+ view = context.view;
85
+ setMarkupVisible(view, !markupVisible);
83
86
  return [2 /*return*/];
84
87
  });
85
88
  });
86
89
  };
87
- return AcApRevVisibilityCmd;
88
- }(AcApBaseRevCmd));
89
- export { AcApRevVisibilityCmd };
90
- //# sourceMappingURL=AcApRevVisibilityCmd.js.map
90
+ return AcApMarkupVisibilityCmd;
91
+ }(AcEdCommand));
92
+ export { AcApMarkupVisibilityCmd };
93
+ //# sourceMappingURL=AcApMarkupVisibilityCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupVisibilityCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupVisibilityCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEnE,6DAA6D;AAC7D,IAAI,aAAa,GAAG,IAAI,CAAA;AAExB,mDAAmD;AACnD,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAA;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgB,EAAE,OAAgB;IACjE,aAAa,GAAG,OAAO,CAAA;IACvB,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAC3D,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;IAChE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;AACzB,CAAC;AAED;;GAEG;AACH;IAA6C,2CAAW;IACtD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,MAAM,CAAA;QAC/B,KAAI,CAAC,gBAAgB,GAAG,KAAK,CAAA;;IAC/B,CAAC;IAEK,yCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,IAAI,GAAG,OAAO,CAAC,IAAkB,CAAA;gBACvC,gBAAgB,CAAC,IAAI,EAAE,CAAC,aAAa,CAAC,CAAA;;;;KACvC;IACH,8BAAC;AAAD,CAAC,AAXD,CAA6C,WAAW,GAWvD"}
@@ -0,0 +1,48 @@
1
+ import { AcGePoint3d, type AcGeVector3dLike } from '@mlightcad/data-model';
2
+ import type { AcTrView2d } from '../../../view';
3
+ import { type AcApOverlayWorldDrawResult } from '../../overlay';
4
+ import type { AcApMarkupRecord } from '../AcApMarkupTypes';
5
+ import { AcApMarkupEntity } from './AcApMarkupEntity';
6
+ /**
7
+ * Standalone callout markup (leader + bubble).
8
+ *
9
+ * Grips: tip (0), bubble anchor (1), and midpoint center-move (2).
10
+ */
11
+ export declare class AcApMarkupCalloutEntity extends AcApMarkupEntity {
12
+ /**
13
+ * @param record - Store record whose geometry type must be `callout`.
14
+ */
15
+ constructor(record: AcApMarkupRecord);
16
+ /**
17
+ * Focus on the bubble anchor.
18
+ *
19
+ * @returns Anchor world point, or `undefined` when geometry is wrong type.
20
+ */
21
+ primaryPoint(): {
22
+ x: number;
23
+ y: number;
24
+ z: number;
25
+ } | undefined;
26
+ /**
27
+ * Tip, anchor, and midpoint grips.
28
+ *
29
+ * @returns Three WCS grip points, or empty when geometry is wrong type.
30
+ */
31
+ subGetGripPoints(): AcGePoint3d[];
32
+ /**
33
+ * Move tip (0), anchor (1), or both via midpoint (2).
34
+ *
35
+ * @param indices - Grip indices to move.
36
+ * @param offset - World-space translation.
37
+ * @returns This entity for chaining.
38
+ */
39
+ subMoveGripPointsAt(indices: number[], offset: AcGeVector3dLike): this;
40
+ /**
41
+ * Publish leader canvas, bubble, tip/center dots, and tip/bubble/center grips.
42
+ *
43
+ * @param view - Active 2D view.
44
+ * @returns Built visuals with deferred grip binding.
45
+ */
46
+ protected subWorldDraw(view: AcTrView2d): AcApOverlayWorldDrawResult;
47
+ }
48
+ //# sourceMappingURL=AcApMarkupCalloutEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupCalloutEntity.d.ts","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupCalloutEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAO1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAIL,KAAK,0BAA0B,EACV,MAAM,eAAe,CAAA;AAK5C,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAMrD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,gBAAgB;IAC3D;;OAEG;gBACS,MAAM,EAAE,gBAAgB;IAIpC;;;;OAIG;IACM,YAAY;;;;;IAMrB;;;;OAIG;IACM,gBAAgB,IAAI,WAAW,EAAE;IAc1C;;;;;;OAMG;IACM,mBAAmB,CAC1B,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,gBAAgB,GACvB,IAAI;IAsBP;;;;;OAKG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,0BAA0B;CAkJrE"}
@@ -0,0 +1,291 @@
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
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __values = (this && this.__values) || function(o) {
28
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
29
+ if (m) return m.call(o);
30
+ if (o && typeof o.length === "number") return {
31
+ next: function () {
32
+ if (o && i >= o.length) o = void 0;
33
+ return { value: o && o[i++], done: !o };
34
+ }
35
+ };
36
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
37
+ };
38
+ import { AcGePoint3d } from '@mlightcad/data-model';
39
+ import { AcTrHtmlCallout, AcTrHtmlCanvasOverlay, AcTrHtmlDot } from '@mlightcad/three-renderer';
40
+ import { acapBindOverlayCalloutGrips, acapDrawOverlayLeader, acapFitOverlayCanvas, acapPlaceOverlayHtml } from '../../overlay';
41
+ import { runMarkupEdit } from '../AcApMarkupHistory';
42
+ import { republishMarkup } from '../AcApMarkupRepublish';
43
+ import { getMarkupStore } from '../AcApMarkupStore';
44
+ import { bindMarkupInlineTextEdit } from '../AcApMarkupTextEdit';
45
+ import { AcApMarkupEntity } from './AcApMarkupEntity';
46
+ import { bindMarkupCenterMove, selectMarkupGroup } from './AcApMarkupEntityGrips';
47
+ /**
48
+ * Standalone callout markup (leader + bubble).
49
+ *
50
+ * Grips: tip (0), bubble anchor (1), and midpoint center-move (2).
51
+ */
52
+ var AcApMarkupCalloutEntity = /** @class */ (function (_super) {
53
+ __extends(AcApMarkupCalloutEntity, _super);
54
+ /**
55
+ * @param record - Store record whose geometry type must be `callout`.
56
+ */
57
+ function AcApMarkupCalloutEntity(record) {
58
+ return _super.call(this, record) || this;
59
+ }
60
+ /**
61
+ * Focus on the bubble anchor.
62
+ *
63
+ * @returns Anchor world point, or `undefined` when geometry is wrong type.
64
+ */
65
+ AcApMarkupCalloutEntity.prototype.primaryPoint = function () {
66
+ var geom = this.record.geometry;
67
+ if (geom.type !== 'callout')
68
+ return undefined;
69
+ return { x: geom.anchor.x, y: geom.anchor.y, z: 0 };
70
+ };
71
+ /**
72
+ * Tip, anchor, and midpoint grips.
73
+ *
74
+ * @returns Three WCS grip points, or empty when geometry is wrong type.
75
+ */
76
+ AcApMarkupCalloutEntity.prototype.subGetGripPoints = function () {
77
+ var geom = this.record.geometry;
78
+ if (geom.type !== 'callout')
79
+ return [];
80
+ return [
81
+ new AcGePoint3d(geom.tip.x, geom.tip.y, 0),
82
+ new AcGePoint3d(geom.anchor.x, geom.anchor.y, 0),
83
+ new AcGePoint3d((geom.tip.x + geom.anchor.x) / 2, (geom.tip.y + geom.anchor.y) / 2, 0)
84
+ ];
85
+ };
86
+ /**
87
+ * Move tip (0), anchor (1), or both via midpoint (2).
88
+ *
89
+ * @param indices - Grip indices to move.
90
+ * @param offset - World-space translation.
91
+ * @returns This entity for chaining.
92
+ */
93
+ AcApMarkupCalloutEntity.prototype.subMoveGripPointsAt = function (indices, offset) {
94
+ var e_1, _a;
95
+ var geom = this.record.geometry;
96
+ if (geom.type !== 'callout')
97
+ return this;
98
+ var tip = __assign({}, geom.tip);
99
+ var anchor = __assign({}, geom.anchor);
100
+ try {
101
+ for (var indices_1 = __values(indices), indices_1_1 = indices_1.next(); !indices_1_1.done; indices_1_1 = indices_1.next()) {
102
+ var index = indices_1_1.value;
103
+ if (index === 0) {
104
+ tip = { x: tip.x + offset.x, y: tip.y + offset.y };
105
+ }
106
+ else if (index === 1) {
107
+ anchor = { x: anchor.x + offset.x, y: anchor.y + offset.y };
108
+ }
109
+ else if (index === 2) {
110
+ tip = { x: tip.x + offset.x, y: tip.y + offset.y };
111
+ anchor = { x: anchor.x + offset.x, y: anchor.y + offset.y };
112
+ }
113
+ }
114
+ }
115
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
116
+ finally {
117
+ try {
118
+ if (indices_1_1 && !indices_1_1.done && (_a = indices_1.return)) _a.call(indices_1);
119
+ }
120
+ finally { if (e_1) throw e_1.error; }
121
+ }
122
+ this.record = __assign(__assign({}, this.record), { geometry: { type: 'callout', tip: tip, anchor: anchor } });
123
+ return this;
124
+ };
125
+ /**
126
+ * Publish leader canvas, bubble, tip/center dots, and tip/bubble/center grips.
127
+ *
128
+ * @param view - Active 2D view.
129
+ * @returns Built visuals with deferred grip binding.
130
+ */
131
+ AcApMarkupCalloutEntity.prototype.subWorldDraw = function (view) {
132
+ var _this = this;
133
+ var geom = this.record.geometry;
134
+ if (geom.type !== 'callout') {
135
+ return this.emptyResult(this.createGroup());
136
+ }
137
+ var _a = this.style(), color = _a.color, canvasLineWidth = _a.canvasLineWidth, layer = _a.layer, layoutId = _a.layoutId;
138
+ var group = this.createGroup();
139
+ /** Unbinders for viewChanged, inline edit, and grips. */
140
+ var cleanups = [];
141
+ /** Grip binders deferred until after manager.add(group). */
142
+ var pendingGrips = [];
143
+ var container = view.container;
144
+ var overlay = new AcTrHtmlCanvasOverlay({
145
+ id: "".concat(this.record.id, "-leader"),
146
+ container: container,
147
+ layer: layer,
148
+ layoutId: layoutId
149
+ });
150
+ group.addCanvas(overlay);
151
+ /** Live tip / anchor mutated during grips before store commit. */
152
+ var live = {
153
+ tip: __assign({}, geom.tip),
154
+ anchor: __assign({}, geom.anchor)
155
+ };
156
+ /**
157
+ * Redraw the leader (with arrow) from {@link live}.
158
+ */
159
+ var redraw = function () {
160
+ var ctx = acapFitOverlayCanvas(overlay.canvas, container);
161
+ if (!ctx)
162
+ return;
163
+ acapDrawOverlayLeader(ctx, view.worldToScreen(live.tip), view.worldToScreen(live.anchor), _this.record.style.color, true, canvasLineWidth);
164
+ };
165
+ redraw();
166
+ view.events.viewChanged.addEventListener(redraw);
167
+ cleanups.push(function () { return view.events.viewChanged.removeEventListener(redraw); });
168
+ var bubble = new AcTrHtmlCallout({
169
+ id: "".concat(this.record.id, "-bubble"),
170
+ color: color,
171
+ text: this.record.text || this.record.comment || 'Callout',
172
+ fontSize: this.record.style.fontSize,
173
+ worldPosition: live.anchor,
174
+ layer: layer,
175
+ layoutId: layoutId
176
+ });
177
+ var tipDot = new AcTrHtmlDot({
178
+ id: "".concat(this.record.id, "-tip"),
179
+ color: color,
180
+ worldPosition: live.tip,
181
+ layer: layer,
182
+ layoutId: layoutId
183
+ });
184
+ var centerDot = new AcTrHtmlDot({
185
+ id: "".concat(this.record.id, "-center"),
186
+ color: color,
187
+ worldPosition: {
188
+ x: (live.tip.x + live.anchor.x) / 2,
189
+ y: (live.tip.y + live.anchor.y) / 2
190
+ },
191
+ layer: layer,
192
+ layoutId: layoutId
193
+ });
194
+ group.add(bubble, tipDot, centerDot);
195
+ cleanups.push(bindMarkupInlineTextEdit({
196
+ view: view,
197
+ el: bubble.textElement,
198
+ listenOn: bubble.element,
199
+ recordId: this.record.id,
200
+ multiline: true
201
+ }));
202
+ /**
203
+ * Keep the center grip halfway between tip and bubble during live drag.
204
+ */
205
+ var syncCenter = function () {
206
+ acapPlaceOverlayHtml(view, centerDot, {
207
+ x: (live.tip.x + live.anchor.x) / 2,
208
+ y: (live.tip.y + live.anchor.y) / 2
209
+ });
210
+ };
211
+ pendingGrips.push(function () {
212
+ cleanups.push(acapBindOverlayCalloutGrips({
213
+ view: view,
214
+ group: group,
215
+ tipEl: tipDot,
216
+ bubbleEl: bubble,
217
+ state: live,
218
+ onDragStart: function () { return selectMarkupGroup(view, _this.record.id); },
219
+ onLiveChange: function () {
220
+ redraw();
221
+ syncCenter();
222
+ },
223
+ onCommit: function (next) {
224
+ runMarkupEdit(view, 'Move Callout', function () {
225
+ var updated = getMarkupStore().updateGeometry(_this.record.id, {
226
+ type: 'callout',
227
+ tip: next.tip,
228
+ anchor: next.anchor
229
+ });
230
+ if (updated)
231
+ republishMarkup(view, updated);
232
+ });
233
+ }
234
+ }), bindMarkupCenterMove({
235
+ view: view,
236
+ recordId: _this.record.id,
237
+ centerEl: centerDot,
238
+ attached: {
239
+ live: live,
240
+ redraw: redraw,
241
+ tipDot: tipDot,
242
+ bubble: bubble
243
+ }
244
+ }));
245
+ });
246
+ return {
247
+ group: group,
248
+ entityIds: [],
249
+ dispose: function () {
250
+ var e_2, _a;
251
+ try {
252
+ for (var cleanups_1 = __values(cleanups), cleanups_1_1 = cleanups_1.next(); !cleanups_1_1.done; cleanups_1_1 = cleanups_1.next()) {
253
+ var fn = cleanups_1_1.value;
254
+ try {
255
+ fn();
256
+ }
257
+ catch (_b) {
258
+ // ignore
259
+ }
260
+ }
261
+ }
262
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
263
+ finally {
264
+ try {
265
+ if (cleanups_1_1 && !cleanups_1_1.done && (_a = cleanups_1.return)) _a.call(cleanups_1);
266
+ }
267
+ finally { if (e_2) throw e_2.error; }
268
+ }
269
+ },
270
+ bindGrips: function () {
271
+ var e_3, _a;
272
+ try {
273
+ for (var pendingGrips_1 = __values(pendingGrips), pendingGrips_1_1 = pendingGrips_1.next(); !pendingGrips_1_1.done; pendingGrips_1_1 = pendingGrips_1.next()) {
274
+ var bind = pendingGrips_1_1.value;
275
+ bind();
276
+ }
277
+ }
278
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
279
+ finally {
280
+ try {
281
+ if (pendingGrips_1_1 && !pendingGrips_1_1.done && (_a = pendingGrips_1.return)) _a.call(pendingGrips_1);
282
+ }
283
+ finally { if (e_3) throw e_3.error; }
284
+ }
285
+ }
286
+ };
287
+ };
288
+ return AcApMarkupCalloutEntity;
289
+ }(AcApMarkupEntity));
290
+ export { AcApMarkupCalloutEntity };
291
+ //# sourceMappingURL=AcApMarkupCalloutEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupCalloutEntity.js","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupCalloutEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,WAAW,EACZ,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EAEpB,oBAAoB,EAAC,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAA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int3d, type AcGePoint3dLike, type AcGeVector3dLike, type AcGiLineWeight } from '@mlightcad/data-model';
2
+ import { AcTrHtmlGroup } from '@mlightcad/three-renderer';
3
+ import type { AcTrView2d } from '../../../view';
4
+ import { AcApOverlayEntity, type AcApOverlaySerializable, type AcApOverlayWorldDrawResult } from '../../overlay';
5
+ import type { AcApMarkupRecord } from '../AcApMarkupTypes';
6
+ import { cssToMarkupColor } from '../AcApMarkupUtil';
7
+ /**
8
+ * Shared draw state derived from a markup record for HTML / CAD styling.
9
+ */
10
+ export interface AcApMarkupDrawStyle {
11
+ /** Resolved AutoCAD-style color for HTML and CAD transients. */
12
+ color: ReturnType<typeof cssToMarkupColor>;
13
+ /** CAD line weight applied to transient entities. */
14
+ lineWeight: AcGiLineWeight;
15
+ /** Canvas stroke width in CSS pixels corresponding to {@link lineWeight}. */
16
+ canvasLineWidth: number;
17
+ /** HTML transient layer name for this markup. */
18
+ layer: string;
19
+ /** Layout BTR id, or `undefined` when visible on every layout. */
20
+ layoutId: string | undefined;
21
+ }
22
+ /**
23
+ * Build {@link AcApMarkupDrawStyle} from a store record's style fields.
24
+ *
25
+ * @param record - Markup record whose style and layout are read.
26
+ * @returns Resolved color, weights, layer, and layout for drawing.
27
+ */
28
+ export declare function markupDrawStyleFromRecord(record: AcApMarkupRecord): AcApMarkupDrawStyle;
29
+ /**
30
+ * Base class for Design Review markup overlays.
31
+ *
32
+ * Concrete types implement {@link subWorldDraw} and optional grip protocols.
33
+ * Geometry and metadata live on {@link record}; render primitives are composed
34
+ * into an {@link AcTrHtmlGroup}.
35
+ *
36
+ * Implements {@link AcApOverlaySerializable} via {@link toRecord}. Rehydrate
37
+ * with {@link import('./AcApMarkupEntityFactory').createMarkupEntityFromRecord}.
38
+ */
39
+ export declare abstract class AcApMarkupEntity extends AcApOverlayEntity implements AcApOverlaySerializable<AcApMarkupRecord> {
40
+ /** Current store snapshot driving this entity's geometry and metadata. */
41
+ protected record: AcApMarkupRecord;
42
+ /**
43
+ * @param record - Initial markup store record.
44
+ */
45
+ constructor(record: AcApMarkupRecord);
46
+ /**
47
+ * Markup id from the store record (also the HTML group id).
48
+ */
49
+ get id(): string;
50
+ /**
51
+ * Sidecar / store snapshot of this markup (same object as the live record).
52
+ *
53
+ * @returns Current {@link AcApMarkupRecord}.
54
+ */
55
+ toRecord(): AcApMarkupRecord;
56
+ /**
57
+ * Current store record held by this entity (alias of {@link toRecord}).
58
+ */
59
+ get markupRecord(): AcApMarkupRecord;
60
+ /**
61
+ * Replace the in-memory record (e.g. after store update before republish).
62
+ *
63
+ * @param record - Next store snapshot.
64
+ */
65
+ setRecord(record: AcApMarkupRecord): void;
66
+ /**
67
+ * Resolve draw style from the current record.
68
+ *
69
+ * @returns Color, line weight, layer, and layout for publishing.
70
+ */
71
+ protected style(): AcApMarkupDrawStyle;
72
+ /**
73
+ * Hit-test this markup's stroke / fill via {@link hitTestMarkupGeometry}.
74
+ *
75
+ * @param canvas - Pick location in canvas space.
76
+ * @param worldToScreen - World → canvas converter.
77
+ * @param threshold - Hit slop in pixels.
78
+ * @returns Whether the pick hits drawn geometry.
79
+ */
80
+ hitTest(canvas: {
81
+ x: number;
82
+ y: number;
83
+ }, worldToScreen: (point: {
84
+ x: number;
85
+ y: number;
86
+ }) => {
87
+ x: number;
88
+ y: number;
89
+ }, threshold: number): boolean;
90
+ /**
91
+ * Focus point at the geometry center (or type-specific primary point).
92
+ *
93
+ * @returns World point for zoom / focus, or `undefined`.
94
+ */
95
+ primaryPoint(): AcGePoint3dLike | undefined;
96
+ /**
97
+ * Default single center grip for whole-markup move.
98
+ *
99
+ * @returns Center grip, or empty when geometry has no center.
100
+ */
101
+ subGetGripPoints(): AcGePoint3d[];
102
+ /**
103
+ * Translate the whole markup when grip index `0` is moved.
104
+ *
105
+ * @param indices - Grip indices to move.
106
+ * @param offset - World-space translation.
107
+ * @returns This entity for chaining.
108
+ */
109
+ subMoveGripPointsAt(indices: number[], offset: AcGeVector3dLike): this;
110
+ /**
111
+ * Build an empty world-draw result for an already-created group.
112
+ *
113
+ * @param group - HTML group shell.
114
+ * @returns Result with no CAD entities and a no-op dispose.
115
+ */
116
+ protected emptyResult(group: AcTrHtmlGroup): AcApOverlayWorldDrawResult;
117
+ /**
118
+ * Create a selectable markup group shell for {@link id}.
119
+ *
120
+ * @returns New empty {@link AcTrHtmlGroup} on the markup layer.
121
+ */
122
+ protected createGroup(): AcTrHtmlGroup;
123
+ /**
124
+ * Emit HTML + CAD + canvas visuals for this markup type.
125
+ *
126
+ * @param view - Active 2D view.
127
+ * @returns Built visuals and cleanup hooks.
128
+ */
129
+ protected abstract subWorldDraw(view: AcTrView2d): AcApOverlayWorldDrawResult;
130
+ }
131
+ //# sourceMappingURL=AcApMarkupEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntity.d.ts","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAChC,MAAM,eAAe,CAAA;AAOtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EACL,gBAAgB,EAGjB,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;IAC1C,qDAAqD;IACrD,UAAU,EAAE,cAAc,CAAA;IAC1B,6EAA6E;IAC7E,eAAe,EAAE,MAAM,CAAA;IACvB,iDAAiD;IACjD,KAA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