@mlightcad/cad-simple-viewer 1.5.11 → 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 (487) hide show
  1. package/README.md +23 -8
  2. package/dist/cad-simple-viewer.js +32135 -25300
  3. package/dist/cad-simple-viewer.umd.cjs +136 -24
  4. package/lib/app/AcApDocManager.d.ts +18 -24
  5. package/lib/app/AcApDocManager.d.ts.map +1 -1
  6. package/lib/app/AcApDocManager.js +40 -41
  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/draw/AcApRevCloudCmd.d.ts +48 -0
  33. package/lib/command/draw/AcApRevCloudCmd.d.ts.map +1 -0
  34. package/lib/command/draw/AcApRevCloudCmd.js +747 -0
  35. package/lib/command/draw/AcApRevCloudCmd.js.map +1 -0
  36. package/lib/command/draw/AcApRevCloudGeom.d.ts +57 -0
  37. package/lib/command/draw/AcApRevCloudGeom.d.ts.map +1 -0
  38. package/lib/command/draw/AcApRevCloudGeom.js +373 -0
  39. package/lib/command/draw/AcApRevCloudGeom.js.map +1 -0
  40. package/lib/command/draw/AcApSketchCmd.d.ts +59 -0
  41. package/lib/command/draw/AcApSketchCmd.d.ts.map +1 -0
  42. package/lib/command/draw/AcApSketchCmd.js +537 -0
  43. package/lib/command/draw/AcApSketchCmd.js.map +1 -0
  44. package/lib/command/draw/index.d.ts +3 -0
  45. package/lib/command/draw/index.d.ts.map +1 -1
  46. package/lib/command/draw/index.js +3 -0
  47. package/lib/command/draw/index.js.map +1 -1
  48. package/lib/command/index.d.ts +2 -1
  49. package/lib/command/index.d.ts.map +1 -1
  50. package/lib/command/index.js +2 -1
  51. package/lib/command/index.js.map +1 -1
  52. package/lib/command/markup/AcApClearMarkupsCmd.d.ts +10 -0
  53. package/lib/command/markup/AcApClearMarkupsCmd.d.ts.map +1 -0
  54. package/lib/command/{review/AcApRevCircleCmd.js → markup/AcApClearMarkupsCmd.js} +19 -49
  55. package/lib/command/markup/AcApClearMarkupsCmd.js.map +1 -0
  56. package/lib/command/markup/AcApMarkupArrowCmd.d.ts +10 -0
  57. package/lib/command/markup/AcApMarkupArrowCmd.d.ts.map +1 -0
  58. package/lib/command/markup/AcApMarkupArrowCmd.js +164 -0
  59. package/lib/command/markup/AcApMarkupArrowCmd.js.map +1 -0
  60. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts +17 -0
  61. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -0
  62. package/lib/command/markup/AcApMarkupCalloutCmd.js +259 -0
  63. package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -0
  64. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts +78 -0
  65. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts.map +1 -0
  66. package/lib/command/markup/AcApMarkupCalloutDrag.js +78 -0
  67. package/lib/command/markup/AcApMarkupCalloutDrag.js.map +1 -0
  68. package/lib/command/markup/AcApMarkupCircleCmd.d.ts +10 -0
  69. package/lib/command/markup/AcApMarkupCircleCmd.d.ts.map +1 -0
  70. package/lib/command/markup/AcApMarkupCircleCmd.js +174 -0
  71. package/lib/command/markup/AcApMarkupCircleCmd.js.map +1 -0
  72. package/lib/command/markup/AcApMarkupCloudCmd.d.ts +11 -0
  73. package/lib/command/markup/AcApMarkupCloudCmd.d.ts.map +1 -0
  74. package/lib/command/markup/AcApMarkupCloudCmd.js +178 -0
  75. package/lib/command/markup/AcApMarkupCloudCmd.js.map +1 -0
  76. package/lib/command/markup/AcApMarkupCmdUtil.d.ts +43 -0
  77. package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -0
  78. package/lib/command/markup/AcApMarkupCmdUtil.js +133 -0
  79. package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -0
  80. package/lib/command/markup/AcApMarkupGeometry.d.ts +57 -0
  81. package/lib/command/markup/AcApMarkupGeometry.d.ts.map +1 -0
  82. package/lib/command/markup/AcApMarkupGeometry.js +231 -0
  83. package/lib/command/markup/AcApMarkupGeometry.js.map +1 -0
  84. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts +10 -0
  85. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts.map +1 -0
  86. package/lib/command/markup/AcApMarkupHighlightCmd.js +166 -0
  87. package/lib/command/markup/AcApMarkupHighlightCmd.js.map +1 -0
  88. package/lib/command/markup/AcApMarkupHistory.d.ts +139 -0
  89. package/lib/command/markup/AcApMarkupHistory.d.ts.map +1 -0
  90. package/lib/command/markup/AcApMarkupHistory.js +336 -0
  91. package/lib/command/markup/AcApMarkupHistory.js.map +1 -0
  92. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts +17 -0
  93. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts.map +1 -0
  94. package/lib/command/markup/AcApMarkupImportExportCmd.js +182 -0
  95. package/lib/command/markup/AcApMarkupImportExportCmd.js.map +1 -0
  96. package/lib/command/markup/AcApMarkupLineCmd.d.ts +10 -0
  97. package/lib/command/markup/AcApMarkupLineCmd.d.ts.map +1 -0
  98. package/lib/command/markup/AcApMarkupLineCmd.js +185 -0
  99. package/lib/command/markup/AcApMarkupLineCmd.js.map +1 -0
  100. package/lib/command/markup/AcApMarkupPresenter.d.ts +62 -0
  101. package/lib/command/markup/AcApMarkupPresenter.d.ts.map +1 -0
  102. package/lib/command/markup/AcApMarkupPresenter.js +288 -0
  103. package/lib/command/markup/AcApMarkupPresenter.js.map +1 -0
  104. package/lib/command/markup/AcApMarkupRectCmd.d.ts +10 -0
  105. package/lib/command/markup/AcApMarkupRectCmd.d.ts.map +1 -0
  106. package/lib/command/markup/AcApMarkupRectCmd.js +174 -0
  107. package/lib/command/markup/AcApMarkupRectCmd.js.map +1 -0
  108. package/lib/command/markup/AcApMarkupRepublish.d.ts +29 -0
  109. package/lib/command/markup/AcApMarkupRepublish.d.ts.map +1 -0
  110. package/lib/command/markup/AcApMarkupRepublish.js +28 -0
  111. package/lib/command/markup/AcApMarkupRepublish.js.map +1 -0
  112. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts +88 -0
  113. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts.map +1 -0
  114. package/lib/command/markup/AcApMarkupShapeBuilder.js +246 -0
  115. package/lib/command/markup/AcApMarkupShapeBuilder.js.map +1 -0
  116. package/lib/command/markup/AcApMarkupShapeCallout.d.ts +46 -0
  117. package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -0
  118. package/lib/command/markup/AcApMarkupShapeCallout.js +356 -0
  119. package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -0
  120. package/lib/command/markup/AcApMarkupSidecar.d.ts +14 -0
  121. package/lib/command/markup/AcApMarkupSidecar.d.ts.map +1 -0
  122. package/lib/command/markup/AcApMarkupSidecar.js +196 -0
  123. package/lib/command/markup/AcApMarkupSidecar.js.map +1 -0
  124. package/lib/command/markup/AcApMarkupStampCmd.d.ts +10 -0
  125. package/lib/command/markup/AcApMarkupStampCmd.d.ts.map +1 -0
  126. package/lib/command/markup/AcApMarkupStampCmd.js +158 -0
  127. package/lib/command/markup/AcApMarkupStampCmd.js.map +1 -0
  128. package/lib/command/markup/AcApMarkupStore.d.ts +94 -0
  129. package/lib/command/markup/AcApMarkupStore.d.ts.map +1 -0
  130. package/lib/command/markup/AcApMarkupStore.js +327 -0
  131. package/lib/command/markup/AcApMarkupStore.js.map +1 -0
  132. package/lib/command/markup/AcApMarkupTextCmd.d.ts +10 -0
  133. package/lib/command/markup/AcApMarkupTextCmd.d.ts.map +1 -0
  134. package/lib/command/markup/AcApMarkupTextCmd.js +141 -0
  135. package/lib/command/markup/AcApMarkupTextCmd.js.map +1 -0
  136. package/lib/command/markup/AcApMarkupTextEdit.d.ts +88 -0
  137. package/lib/command/markup/AcApMarkupTextEdit.d.ts.map +1 -0
  138. package/lib/command/markup/AcApMarkupTextEdit.js +249 -0
  139. package/lib/command/markup/AcApMarkupTextEdit.js.map +1 -0
  140. package/lib/command/markup/AcApMarkupTypes.d.ts +118 -0
  141. package/lib/command/markup/AcApMarkupTypes.d.ts.map +1 -0
  142. package/lib/command/markup/AcApMarkupTypes.js +8 -0
  143. package/lib/command/markup/AcApMarkupTypes.js.map +1 -0
  144. package/lib/command/markup/AcApMarkupUtil.d.ts +41 -0
  145. package/lib/command/markup/AcApMarkupUtil.d.ts.map +1 -0
  146. package/lib/command/markup/AcApMarkupUtil.js +135 -0
  147. package/lib/command/markup/AcApMarkupUtil.js.map +1 -0
  148. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts +17 -0
  149. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts.map +1 -0
  150. package/lib/command/{review/AcApRevVisibilityCmd.js → markup/AcApMarkupVisibilityCmd.js} +30 -27
  151. package/lib/command/markup/AcApMarkupVisibilityCmd.js.map +1 -0
  152. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts +48 -0
  153. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts.map +1 -0
  154. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js +291 -0
  155. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js.map +1 -0
  156. package/lib/command/markup/entity/AcApMarkupEntity.d.ts +131 -0
  157. package/lib/command/markup/entity/AcApMarkupEntity.d.ts.map +1 -0
  158. package/lib/command/markup/entity/AcApMarkupEntity.js +191 -0
  159. package/lib/command/markup/entity/AcApMarkupEntity.js.map +1 -0
  160. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts +20 -0
  161. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts.map +1 -0
  162. package/lib/command/markup/entity/AcApMarkupEntityFactory.js +43 -0
  163. package/lib/command/markup/entity/AcApMarkupEntityFactory.js.map +1 -0
  164. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts +94 -0
  165. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts.map +1 -0
  166. package/lib/command/markup/entity/AcApMarkupEntityGrips.js +204 -0
  167. package/lib/command/markup/entity/AcApMarkupEntityGrips.js.map +1 -0
  168. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts +27 -0
  169. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts.map +1 -0
  170. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js +124 -0
  171. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js.map +1 -0
  172. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts +40 -0
  173. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts.map +1 -0
  174. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js +294 -0
  175. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js.map +1 -0
  176. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts +32 -0
  177. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts.map +1 -0
  178. package/lib/command/markup/entity/AcApMarkupShapeEntity.js +241 -0
  179. package/lib/command/markup/entity/AcApMarkupShapeEntity.js.map +1 -0
  180. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts +23 -0
  181. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts.map +1 -0
  182. package/lib/command/markup/entity/AcApMarkupStampEntity.js +125 -0
  183. package/lib/command/markup/entity/AcApMarkupStampEntity.js.map +1 -0
  184. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts +23 -0
  185. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts.map +1 -0
  186. package/lib/command/markup/entity/AcApMarkupTextEntity.js +129 -0
  187. package/lib/command/markup/entity/AcApMarkupTextEntity.js.map +1 -0
  188. package/lib/command/markup/entity/index.d.ts +13 -0
  189. package/lib/command/markup/entity/index.d.ts.map +1 -0
  190. package/lib/command/markup/entity/index.js +13 -0
  191. package/lib/command/markup/entity/index.js.map +1 -0
  192. package/lib/command/markup/index.d.ts +27 -0
  193. package/lib/command/markup/index.d.ts.map +1 -0
  194. package/lib/command/markup/index.js +27 -0
  195. package/lib/command/markup/index.js.map +1 -0
  196. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +5 -12
  197. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
  198. package/lib/command/measure/AcApClearMeasurementsCmd.js +42 -20
  199. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
  200. package/lib/command/measure/AcApMeasureAngleCmd.d.ts +13 -3
  201. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
  202. package/lib/command/measure/AcApMeasureAngleCmd.js +76 -210
  203. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
  204. package/lib/command/measure/AcApMeasureArcCmd.d.ts +21 -1
  205. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
  206. package/lib/command/measure/AcApMeasureArcCmd.js +103 -97
  207. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
  208. package/lib/command/measure/AcApMeasureAreaCmd.d.ts +11 -1
  209. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
  210. package/lib/command/measure/AcApMeasureAreaCmd.js +126 -144
  211. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
  212. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +24 -15
  213. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
  214. package/lib/command/measure/AcApMeasureDistanceCmd.js +52 -52
  215. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
  216. package/lib/command/measure/AcApMeasurePointCmd.d.ts +24 -0
  217. package/lib/command/measure/AcApMeasurePointCmd.d.ts.map +1 -0
  218. package/lib/command/measure/AcApMeasurePointCmd.js +114 -0
  219. package/lib/command/measure/AcApMeasurePointCmd.js.map +1 -0
  220. package/lib/command/measure/AcApMeasurementGeometry.d.ts +22 -0
  221. package/lib/command/measure/AcApMeasurementGeometry.d.ts.map +1 -0
  222. package/lib/command/measure/AcApMeasurementGeometry.js +127 -0
  223. package/lib/command/measure/AcApMeasurementGeometry.js.map +1 -0
  224. package/lib/command/measure/AcApMeasurementHistory.d.ts +78 -0
  225. package/lib/command/measure/AcApMeasurementHistory.d.ts.map +1 -0
  226. package/lib/command/measure/AcApMeasurementHistory.js +387 -0
  227. package/lib/command/measure/AcApMeasurementHistory.js.map +1 -0
  228. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts +17 -0
  229. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts.map +1 -0
  230. package/lib/command/measure/AcApMeasurementImportExportCmd.js +207 -0
  231. package/lib/command/measure/AcApMeasurementImportExportCmd.js.map +1 -0
  232. package/lib/command/measure/AcApMeasurementPlace.d.ts +9 -0
  233. package/lib/command/measure/AcApMeasurementPlace.d.ts.map +1 -0
  234. package/lib/command/measure/AcApMeasurementPlace.js +33 -0
  235. package/lib/command/measure/AcApMeasurementPlace.js.map +1 -0
  236. package/lib/command/measure/AcApMeasurementSidecar.d.ts +19 -0
  237. package/lib/command/measure/AcApMeasurementSidecar.d.ts.map +1 -0
  238. package/lib/command/measure/AcApMeasurementSidecar.js +173 -0
  239. package/lib/command/measure/AcApMeasurementSidecar.js.map +1 -0
  240. package/lib/command/measure/AcApMeasurementStore.d.ts +90 -0
  241. package/lib/command/measure/AcApMeasurementStore.d.ts.map +1 -0
  242. package/lib/command/measure/AcApMeasurementStore.js +364 -0
  243. package/lib/command/measure/AcApMeasurementStore.js.map +1 -0
  244. package/lib/command/measure/AcApMeasurementTypes.d.ts +56 -0
  245. package/lib/command/measure/AcApMeasurementTypes.d.ts.map +1 -0
  246. package/lib/command/measure/AcApMeasurementTypes.js +2 -0
  247. package/lib/command/measure/AcApMeasurementTypes.js.map +1 -0
  248. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts +10 -0
  249. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts.map +1 -0
  250. package/lib/command/measure/AcApMeasurementVisibilityCmd.js +78 -0
  251. package/lib/command/measure/AcApMeasurementVisibilityCmd.js.map +1 -0
  252. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts +68 -0
  253. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts.map +1 -0
  254. package/lib/command/measure/entity/AcApMeasureAngleEntity.js +188 -0
  255. package/lib/command/measure/entity/AcApMeasureAngleEntity.js.map +1 -0
  256. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts +85 -0
  257. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts.map +1 -0
  258. package/lib/command/measure/entity/AcApMeasureArcEntity.js +159 -0
  259. package/lib/command/measure/entity/AcApMeasureArcEntity.js.map +1 -0
  260. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts +60 -0
  261. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts.map +1 -0
  262. package/lib/command/measure/entity/AcApMeasureAreaEntity.js +184 -0
  263. package/lib/command/measure/entity/AcApMeasureAreaEntity.js.map +1 -0
  264. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts +60 -0
  265. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts.map +1 -0
  266. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js +166 -0
  267. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js.map +1 -0
  268. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +129 -0
  269. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -0
  270. package/lib/command/measure/entity/AcApMeasureDrawUtil.js +257 -0
  271. package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -0
  272. package/lib/command/measure/entity/AcApMeasureEntity.d.ts +148 -0
  273. package/lib/command/measure/entity/AcApMeasureEntity.d.ts.map +1 -0
  274. package/lib/command/measure/entity/AcApMeasureEntity.js +141 -0
  275. package/lib/command/measure/entity/AcApMeasureEntity.js.map +1 -0
  276. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts +15 -0
  277. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts.map +1 -0
  278. package/lib/command/measure/entity/AcApMeasureEntityFactory.js +35 -0
  279. package/lib/command/measure/entity/AcApMeasureEntityFactory.js.map +1 -0
  280. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts +56 -0
  281. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts.map +1 -0
  282. package/lib/command/measure/entity/AcApMeasurePointEntity.js +125 -0
  283. package/lib/command/measure/entity/AcApMeasurePointEntity.js.map +1 -0
  284. package/lib/command/measure/entity/index.d.ts +12 -0
  285. package/lib/command/measure/entity/index.d.ts.map +1 -0
  286. package/lib/command/measure/entity/index.js +12 -0
  287. package/lib/command/measure/entity/index.js.map +1 -0
  288. package/lib/command/measure/index.d.ts +10 -0
  289. package/lib/command/measure/index.d.ts.map +1 -1
  290. package/lib/command/measure/index.js +10 -0
  291. package/lib/command/measure/index.js.map +1 -1
  292. package/lib/command/modify/AcApCopyCmd.d.ts +1 -1
  293. package/lib/command/modify/AcApCopyCmd.js +2 -2
  294. package/lib/command/modify/AcApCopyCmd.js.map +1 -1
  295. package/lib/command/modify/AcApMoveCmd.js +1 -1
  296. package/lib/command/modify/AcApMoveCmd.js.map +1 -1
  297. package/lib/command/modify/AcApOffsetCmd.d.ts +1 -1
  298. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
  299. package/lib/command/modify/AcApOffsetCmd.js +5 -10
  300. package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
  301. package/lib/command/modify/AcApRotateCmd.d.ts +1 -1
  302. package/lib/command/modify/AcApRotateCmd.js +2 -2
  303. package/lib/command/modify/AcApRotateCmd.js.map +1 -1
  304. package/lib/command/overlay/AcApHtmlLivePreview.d.ts +121 -0
  305. package/lib/command/overlay/AcApHtmlLivePreview.d.ts.map +1 -0
  306. package/lib/command/overlay/AcApHtmlLivePreview.js +193 -0
  307. package/lib/command/overlay/AcApHtmlLivePreview.js.map +1 -0
  308. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts +63 -0
  309. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts.map +1 -0
  310. package/lib/command/overlay/AcApOverlayDrawUtil.js +115 -0
  311. package/lib/command/overlay/AcApOverlayDrawUtil.js.map +1 -0
  312. package/lib/command/overlay/AcApOverlayEntity.d.ts +93 -0
  313. package/lib/command/overlay/AcApOverlayEntity.d.ts.map +1 -0
  314. package/lib/command/overlay/AcApOverlayEntity.js +65 -0
  315. package/lib/command/overlay/AcApOverlayEntity.js.map +1 -0
  316. package/lib/command/overlay/AcApOverlayGripHost.d.ts +105 -0
  317. package/lib/command/overlay/AcApOverlayGripHost.d.ts.map +1 -0
  318. package/lib/command/overlay/AcApOverlayGripHost.js +207 -0
  319. package/lib/command/overlay/AcApOverlayGripHost.js.map +1 -0
  320. package/lib/command/overlay/AcApOverlaySerializable.d.ts +20 -0
  321. package/lib/command/overlay/AcApOverlaySerializable.d.ts.map +1 -0
  322. package/lib/command/overlay/AcApOverlaySerializable.js +2 -0
  323. package/lib/command/overlay/AcApOverlaySerializable.js.map +1 -0
  324. package/lib/command/overlay/index.d.ts +13 -0
  325. package/lib/command/overlay/index.d.ts.map +1 -0
  326. package/lib/command/overlay/index.js +13 -0
  327. package/lib/command/overlay/index.js.map +1 -0
  328. package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
  329. package/lib/editor/command/AcEdCommand.js +1 -0
  330. package/lib/editor/command/AcEdCommand.js.map +1 -1
  331. package/lib/editor/global/AcEdUiLayout.d.ts +3 -3
  332. package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
  333. package/lib/editor/global/AcEdUiLayout.js +3 -3
  334. package/lib/editor/global/AcEdUiLayout.js.map +1 -1
  335. package/lib/editor/global/AcEdUiTheme.d.ts +1 -1
  336. package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
  337. package/lib/editor/global/AcEdUiTheme.js +1 -1
  338. package/lib/editor/global/AcEdUiTheme.js.map +1 -1
  339. package/lib/editor/global/eventBus.d.ts +5 -0
  340. package/lib/editor/global/eventBus.d.ts.map +1 -1
  341. package/lib/editor/global/eventBus.js.map +1 -1
  342. package/lib/editor/input/ui/AcEdMTextEditor.js +3 -3
  343. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
  344. package/lib/i18n/cs/command.d.ts +60 -0
  345. package/lib/i18n/cs/command.d.ts.map +1 -1
  346. package/lib/i18n/cs/command.js +63 -3
  347. package/lib/i18n/cs/command.js.map +1 -1
  348. package/lib/i18n/cs/jig.d.ts +1227 -1
  349. package/lib/i18n/cs/jig.d.ts.map +1 -1
  350. package/lib/i18n/cs/jig.js +1226 -6
  351. package/lib/i18n/cs/jig.js.map +1 -1
  352. package/lib/i18n/cs/main.d.ts +5 -0
  353. package/lib/i18n/cs/main.d.ts.map +1 -1
  354. package/lib/i18n/cs/main.js +5 -0
  355. package/lib/i18n/cs/main.js.map +1 -1
  356. package/lib/i18n/en/command.d.ts +57 -0
  357. package/lib/i18n/en/command.d.ts.map +1 -1
  358. package/lib/i18n/en/command.js +60 -3
  359. package/lib/i18n/en/command.js.map +1 -1
  360. package/lib/i18n/en/jig.d.ts +180 -0
  361. package/lib/i18n/en/jig.d.ts.map +1 -1
  362. package/lib/i18n/en/jig.js +181 -1
  363. package/lib/i18n/en/jig.js.map +1 -1
  364. package/lib/i18n/en/main.d.ts +5 -0
  365. package/lib/i18n/en/main.d.ts.map +1 -1
  366. package/lib/i18n/en/main.js +5 -0
  367. package/lib/i18n/en/main.js.map +1 -1
  368. package/lib/i18n/tr/command.d.ts +57 -0
  369. package/lib/i18n/tr/command.d.ts.map +1 -1
  370. package/lib/i18n/tr/command.js +60 -3
  371. package/lib/i18n/tr/command.js.map +1 -1
  372. package/lib/i18n/tr/jig.d.ts +180 -0
  373. package/lib/i18n/tr/jig.d.ts.map +1 -1
  374. package/lib/i18n/tr/jig.js +181 -1
  375. package/lib/i18n/tr/jig.js.map +1 -1
  376. package/lib/i18n/tr/main.d.ts +7 -0
  377. package/lib/i18n/tr/main.d.ts.map +1 -1
  378. package/lib/i18n/tr/main.js +7 -0
  379. package/lib/i18n/tr/main.js.map +1 -1
  380. package/lib/i18n/zh/command.d.ts +57 -0
  381. package/lib/i18n/zh/command.d.ts.map +1 -1
  382. package/lib/i18n/zh/command.js +60 -3
  383. package/lib/i18n/zh/command.js.map +1 -1
  384. package/lib/i18n/zh/jig.d.ts +180 -0
  385. package/lib/i18n/zh/jig.d.ts.map +1 -1
  386. package/lib/i18n/zh/jig.js +181 -1
  387. package/lib/i18n/zh/jig.js.map +1 -1
  388. package/lib/i18n/zh/main.d.ts +5 -0
  389. package/lib/i18n/zh/main.d.ts.map +1 -1
  390. package/lib/i18n/zh/main.js +5 -0
  391. package/lib/i18n/zh/main.js.map +1 -1
  392. package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
  393. package/lib/plugin/AcApPluginManager.js +2 -1
  394. package/lib/plugin/AcApPluginManager.js.map +1 -1
  395. package/lib/service/AcApEntitySelection.d.ts +0 -3
  396. package/lib/service/AcApEntitySelection.d.ts.map +1 -1
  397. package/lib/service/AcApEntitySelection.js +42 -36
  398. package/lib/service/AcApEntitySelection.js.map +1 -1
  399. package/lib/ui/AcApDrawStyle.d.ts +63 -0
  400. package/lib/ui/AcApDrawStyle.d.ts.map +1 -0
  401. package/lib/ui/AcApDrawStyle.js +149 -0
  402. package/lib/ui/AcApDrawStyle.js.map +1 -0
  403. package/lib/ui/AcApDrawStyleToolbar.d.ts +124 -0
  404. package/lib/ui/AcApDrawStyleToolbar.d.ts.map +1 -0
  405. package/lib/ui/AcApDrawStyleToolbar.js +486 -0
  406. package/lib/ui/AcApDrawStyleToolbar.js.map +1 -0
  407. package/lib/ui/AcUiDialog.d.ts.map +1 -1
  408. package/lib/ui/AcUiDialog.js +2 -2
  409. package/lib/ui/AcUiDialog.js.map +1 -1
  410. package/lib/ui/index.d.ts +2 -0
  411. package/lib/ui/index.d.ts.map +1 -1
  412. package/lib/ui/index.js +2 -0
  413. package/lib/ui/index.js.map +1 -1
  414. package/lib/util/AcApDatabaseEdit.d.ts.map +1 -1
  415. package/lib/util/AcApDatabaseEdit.js +1 -0
  416. package/lib/util/AcApDatabaseEdit.js.map +1 -1
  417. package/lib/util/AcApMeasurementUnits.d.ts +52 -0
  418. package/lib/util/AcApMeasurementUnits.d.ts.map +1 -0
  419. package/lib/util/AcApMeasurementUnits.js +137 -0
  420. package/lib/util/AcApMeasurementUnits.js.map +1 -0
  421. package/lib/util/AcApMeasurementUtil.d.ts +42 -0
  422. package/lib/util/AcApMeasurementUtil.d.ts.map +1 -0
  423. package/lib/util/AcApMeasurementUtil.js +98 -0
  424. package/lib/util/AcApMeasurementUtil.js.map +1 -0
  425. package/lib/util/AcApScreenHitTest.d.ts +35 -0
  426. package/lib/util/AcApScreenHitTest.d.ts.map +1 -0
  427. package/lib/util/AcApScreenHitTest.js +98 -0
  428. package/lib/util/AcApScreenHitTest.js.map +1 -0
  429. package/lib/util/index.d.ts +3 -1
  430. package/lib/util/index.d.ts.map +1 -1
  431. package/lib/util/index.js +3 -1
  432. package/lib/util/index.js.map +1 -1
  433. package/lib/view/AcEdReviewOverlayPick.d.ts +25 -0
  434. package/lib/view/AcEdReviewOverlayPick.d.ts.map +1 -0
  435. package/lib/view/AcEdReviewOverlayPick.js +229 -0
  436. package/lib/view/AcEdReviewOverlayPick.js.map +1 -0
  437. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
  438. package/lib/view/AcEdViewKeyHandler.js +53 -0
  439. package/lib/view/AcEdViewKeyHandler.js.map +1 -1
  440. package/lib/view/AcTrScene.d.ts +15 -1
  441. package/lib/view/AcTrScene.d.ts.map +1 -1
  442. package/lib/view/AcTrScene.js +25 -2
  443. package/lib/view/AcTrScene.js.map +1 -1
  444. package/lib/view/AcTrView2d.d.ts +35 -5
  445. package/lib/view/AcTrView2d.d.ts.map +1 -1
  446. package/lib/view/AcTrView2d.js +127 -70
  447. package/lib/view/AcTrView2d.js.map +1 -1
  448. package/lib/view/index.d.ts +1 -0
  449. package/lib/view/index.d.ts.map +1 -1
  450. package/lib/view/index.js +1 -0
  451. package/lib/view/index.js.map +1 -1
  452. package/package.json +5 -6
  453. package/dist/libredwg-parser-worker.js +0 -7525
  454. package/lib/app/AcApAnnotation.d.ts +0 -47
  455. package/lib/app/AcApAnnotation.d.ts.map +0 -1
  456. package/lib/app/AcApAnnotation.js +0 -135
  457. package/lib/app/AcApAnnotation.js.map +0 -1
  458. package/lib/command/review/AcApBaseRevCmd.d.ts +0 -36
  459. package/lib/command/review/AcApBaseRevCmd.d.ts.map +0 -1
  460. package/lib/command/review/AcApBaseRevCmd.js +0 -68
  461. package/lib/command/review/AcApBaseRevCmd.js.map +0 -1
  462. package/lib/command/review/AcApRevCircleCmd.d.ts +0 -18
  463. package/lib/command/review/AcApRevCircleCmd.d.ts.map +0 -1
  464. package/lib/command/review/AcApRevCircleCmd.js.map +0 -1
  465. package/lib/command/review/AcApRevCloudCmd.d.ts +0 -26
  466. package/lib/command/review/AcApRevCloudCmd.d.ts.map +0 -1
  467. package/lib/command/review/AcApRevCloudCmd.js +0 -240
  468. package/lib/command/review/AcApRevCloudCmd.js.map +0 -1
  469. package/lib/command/review/AcApRevRectCmd.d.ts +0 -18
  470. package/lib/command/review/AcApRevRectCmd.d.ts.map +0 -1
  471. package/lib/command/review/AcApRevRectCmd.js +0 -155
  472. package/lib/command/review/AcApRevRectCmd.js.map +0 -1
  473. package/lib/command/review/AcApRevVisibilityCmd.d.ts +0 -15
  474. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +0 -1
  475. package/lib/command/review/AcApRevVisibilityCmd.js.map +0 -1
  476. package/lib/command/review/AcApSketchCmd.d.ts +0 -32
  477. package/lib/command/review/AcApSketchCmd.d.ts.map +0 -1
  478. package/lib/command/review/AcApSketchCmd.js +0 -175
  479. package/lib/command/review/AcApSketchCmd.js.map +0 -1
  480. package/lib/command/review/index.d.ts +0 -7
  481. package/lib/command/review/index.d.ts.map +0 -1
  482. package/lib/command/review/index.js +0 -7
  483. package/lib/command/review/index.js.map +0 -1
  484. package/lib/util/AcApMeasurementElementGenerator.d.ts +0 -36
  485. package/lib/util/AcApMeasurementElementGenerator.d.ts.map +0 -1
  486. package/lib/util/AcApMeasurementElementGenerator.js +0 -92
  487. package/lib/util/AcApMeasurementElementGenerator.js.map +0 -1
@@ -49,62 +49,32 @@ 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 { AcDbCircle, AcGePoint3d } from '@mlightcad/data-model';
53
- import { AcApDocManager } from '../../app';
54
- import { AcEdOpenMode, AcEdPromptDistanceOptions, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
55
- import { AcApI18n } from '../../i18n';
56
- import { AcApCircleJig } from '../draw/AcApCircleCmd';
57
- import { AcApBaseRevCmd } from './AcApBaseRevCmd';
52
+ import { AcEdCommand } from '../../editor';
53
+ import { configureMarkupCommand } from './AcApMarkupCmdUtil';
54
+ import { getMarkupPresenter } from './AcApMarkupPresenter';
58
55
  /**
59
- * Command to create one revision circle.
56
+ * Clear Design Review markups on the active layout (Model / paper space).
60
57
  */
61
- var AcApRevCircleCmd = /** @class */ (function (_super) {
62
- __extends(AcApRevCircleCmd, _super);
63
- /**
64
- * Creates revision circle command instance.
65
- */
66
- function AcApRevCircleCmd() {
58
+ var AcApClearMarkupsCmd = /** @class */ (function (_super) {
59
+ __extends(AcApClearMarkupsCmd, _super);
60
+ function AcApClearMarkupsCmd() {
67
61
  var _this = _super.call(this) || this;
68
- _this.mode = AcEdOpenMode.Review;
62
+ configureMarkupCommand(_this);
69
63
  return _this;
70
64
  }
71
- /**
72
- * Command entry point for revision circle creation.
73
- *
74
- * @param context - Current application/document context.
75
- */
76
- AcApRevCircleCmd.prototype.execute = function (context) {
65
+ AcApClearMarkupsCmd.prototype.execute = function (context) {
77
66
  return __awaiter(this, void 0, void 0, function () {
78
- var centerPrompt, centerResult, center, radiusPrompt, radiusResult, radius;
67
+ var view;
79
68
  return __generator(this, function (_a) {
80
- switch (_a.label) {
81
- case 0:
82
- centerPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.circle.center'));
83
- return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(centerPrompt)];
84
- case 1:
85
- centerResult = _a.sent();
86
- if (centerResult.status !== AcEdPromptStatus.OK)
87
- return [2 /*return*/];
88
- center = centerResult.value;
89
- radiusPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.circle.radius'));
90
- radiusPrompt.allowZero = false;
91
- radiusPrompt.useBasePoint = true;
92
- radiusPrompt.useDashedLine = true;
93
- radiusPrompt.basePoint = new AcGePoint3d(center);
94
- radiusPrompt.jig = new AcApCircleJig(context.view, center);
95
- return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(radiusPrompt)];
96
- case 2:
97
- radiusResult = _a.sent();
98
- if (radiusResult.status !== AcEdPromptStatus.OK)
99
- return [2 /*return*/];
100
- radius = radiusResult.value;
101
- context.doc.database.tables.blockTable.modelSpace.appendEntity(new AcDbCircle(center, radius));
102
- return [2 /*return*/];
103
- }
69
+ view = context.view;
70
+ getMarkupPresenter().clearLayout(view, view.activeLayoutBtrId, {
71
+ clearStore: true
72
+ });
73
+ return [2 /*return*/];
104
74
  });
105
75
  });
106
76
  };
107
- return AcApRevCircleCmd;
108
- }(AcApBaseRevCmd));
109
- export { AcApRevCircleCmd };
110
- //# sourceMappingURL=AcApRevCircleCmd.js.map
77
+ return AcApClearMarkupsCmd;
78
+ }(AcEdCommand));
79
+ export { AcApClearMarkupsCmd };
80
+ //# sourceMappingURL=AcApClearMarkupsCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApClearMarkupsCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApClearMarkupsCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE1D;;GAEG;AACH;IAAyC,uCAAW;IAClD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,sBAAsB,CAAC,KAAI,CAAC,CAAA;;IAC9B,CAAC;IAEK,qCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,IAAI,GAAG,OAAO,CAAC,IAAkB,CAAA;gBACvC,kBAAkB,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE;oBAC7D,UAAU,EAAE,IAAI;iBACjB,CAAC,CAAA;;;;KACH;IACH,0BAAC;AAAD,CAAC,AAZD,CAAyC,WAAW,GAYnD"}
@@ -0,0 +1,10 @@
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
+ /**
4
+ * Create an arrow markup (line + arrowhead overlay).
5
+ */
6
+ export declare class AcApMarkupArrowCmd extends AcEdCommand {
7
+ constructor();
8
+ execute(context: AcApContext): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=AcApMarkupArrowCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupArrowCmd.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupArrowCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAEL,WAAW,EAIZ,MAAM,cAAc,CAAA;AA+DrB;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;;IAM3C,OAAO,CAAC,OAAO,EAAE,WAAW;CAgCnC"}
@@ -0,0 +1,164 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
+ return new (P || (P = Promise))(function (resolve, reject) {
30
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
34
+ });
35
+ };
36
+ var __generator = (this && this.__generator) || function (thisArg, body) {
37
+ 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);
38
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
39
+ function verb(n) { return function (v) { return step([n, v]); }; }
40
+ function step(op) {
41
+ if (f) throw new TypeError("Generator is already executing.");
42
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
43
+ 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;
44
+ if (y = 0, t) op = [op[0] & 2, t.value];
45
+ switch (op[0]) {
46
+ case 0: case 1: t = op; break;
47
+ case 4: _.label++; return { value: op[1], done: false };
48
+ case 5: _.label++; y = op[1]; op = [0]; continue;
49
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
50
+ default:
51
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
53
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
54
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
55
+ if (t[2]) _.ops.pop();
56
+ _.trys.pop(); continue;
57
+ }
58
+ op = body.call(thisArg, _);
59
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
60
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
61
+ }
62
+ };
63
+ import { AcEdCommand, AcEdPreviewJig, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
64
+ import { AcApI18n } from '../../i18n';
65
+ import { AcApHtmlLivePreview, acapStrokeLiveSegment } from '../overlay/AcApHtmlLivePreview';
66
+ import { configureMarkupCommand, createMarkupMeta, withMarkupInput } from './AcApMarkupCmdUtil';
67
+ import { commitMarkup } from './AcApMarkupPresenter';
68
+ import { MARKUP_LIVE_LAYER } from './AcApMarkupStore';
69
+ import { defaultMarkupColor, getMarkupLineWeight, markupCanvasLineWidth } from './AcApMarkupUtil';
70
+ var AcApMarkupArrowJig = /** @class */ (function (_super) {
71
+ __extends(AcApMarkupArrowJig, _super);
72
+ function AcApMarkupArrowJig(view, p1, color) {
73
+ var _this = _super.call(this, view) || this;
74
+ _this._view = view;
75
+ _this._p1 = p1;
76
+ _this._p2 = p1;
77
+ _this._color = color;
78
+ _this._preview = new AcApHtmlLivePreview(_this._view, "live-markup-arrow-".concat(Date.now()), MARKUP_LIVE_LAYER);
79
+ return _this;
80
+ }
81
+ Object.defineProperty(AcApMarkupArrowJig.prototype, "entity", {
82
+ /** HTML-only preview — no CAD transient. */
83
+ get: function () {
84
+ return null;
85
+ },
86
+ enumerable: false,
87
+ configurable: true
88
+ });
89
+ AcApMarkupArrowJig.prototype.update = function (p2) {
90
+ var _this = this;
91
+ this._p2 = p2;
92
+ this._color = defaultMarkupColor();
93
+ var lineWidth = markupCanvasLineWidth(getMarkupLineWeight());
94
+ this._preview.acapSetDraw(function (ctx, view) {
95
+ acapStrokeLiveSegment(ctx, view, _this._p1, _this._p2, _this._color, lineWidth, {
96
+ arrow: true
97
+ });
98
+ });
99
+ };
100
+ AcApMarkupArrowJig.prototype.end = function () {
101
+ _super.prototype.end.call(this);
102
+ this._preview.acapDispose();
103
+ };
104
+ return AcApMarkupArrowJig;
105
+ }(AcEdPreviewJig));
106
+ /**
107
+ * Create an arrow markup (line + arrowhead overlay).
108
+ */
109
+ var AcApMarkupArrowCmd = /** @class */ (function (_super) {
110
+ __extends(AcApMarkupArrowCmd, _super);
111
+ function AcApMarkupArrowCmd() {
112
+ var _this = _super.call(this) || this;
113
+ configureMarkupCommand(_this);
114
+ return _this;
115
+ }
116
+ AcApMarkupArrowCmd.prototype.execute = function (context) {
117
+ return __awaiter(this, void 0, void 0, function () {
118
+ var _this = this;
119
+ return __generator(this, function (_a) {
120
+ switch (_a.label) {
121
+ case 0: return [4 /*yield*/, withMarkupInput(context, function () { return __awaiter(_this, void 0, void 0, function () {
122
+ var color, p1Prompt, p1Result, p1, p2Prompt, p2Result, p2, meta, record;
123
+ return __generator(this, function (_a) {
124
+ switch (_a.label) {
125
+ case 0:
126
+ color = defaultMarkupColor();
127
+ p1Prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.arrow.firstPoint'));
128
+ return [4 /*yield*/, context.view.editor.getPoint(p1Prompt)];
129
+ case 1:
130
+ p1Result = _a.sent();
131
+ if (p1Result.status !== AcEdPromptStatus.OK)
132
+ return [2 /*return*/];
133
+ p1 = p1Result.value;
134
+ p2Prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.arrow.secondPoint'));
135
+ p2Prompt.useBasePoint = true;
136
+ p2Prompt.jig = new AcApMarkupArrowJig(context.view, p1, color);
137
+ return [4 /*yield*/, context.view.editor.getPoint(p2Prompt)];
138
+ case 2:
139
+ p2Result = _a.sent();
140
+ if (p2Result.status !== AcEdPromptStatus.OK)
141
+ return [2 /*return*/];
142
+ p2 = p2Result.value;
143
+ meta = createMarkupMeta('arrow', context.view, context);
144
+ record = __assign(__assign({}, meta), { type: 'arrow', geometry: {
145
+ type: 'arrow',
146
+ start: { x: p1.x, y: p1.y },
147
+ end: { x: p2.x, y: p2.y }
148
+ } });
149
+ commitMarkup(context.view, record);
150
+ return [2 /*return*/];
151
+ }
152
+ });
153
+ }); })];
154
+ case 1:
155
+ _a.sent();
156
+ return [2 /*return*/];
157
+ }
158
+ });
159
+ });
160
+ };
161
+ return AcApMarkupArrowCmd;
162
+ }(AcEdCommand));
163
+ export { AcApMarkupArrowCmd };
164
+ //# sourceMappingURL=AcApMarkupArrowCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupArrowCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupArrowCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EAEL,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,kBAAkB,CAAA;AAEzB;IAAiC,sCAA+B;IAO9D,4BAAY,IAAkB,EAAE,EAAmB,EAAE,KAAgB;QACnE,YAAA,MAAK,YAAC,IAAI,CAAC,SAAA;QACX,KAAI,CAAC,KAAK,GAAG,IAAkB,CAAA;QAC/B,KAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,KAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,KAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,KAAI,CAAC,QAAQ,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"}
@@ -0,0 +1,17 @@
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
+ /**
4
+ * Create a callout (leader tip + text bubble) with Design Review–style jig preview.
5
+ *
6
+ * Matches Autodesk Design Review 2D callout placement:
7
+ * 1. Click where the leader / arrow tip begins
8
+ * 2. Drag to place the callout text box (live leader + arrow + bubble preview)
9
+ * 3. Type the callout text in the capsule
10
+ *
11
+ * @see Autodesk Design Review help — Create a Callout for 2D Content
12
+ */
13
+ export declare class AcApMarkupCalloutCmd extends AcEdCommand {
14
+ constructor();
15
+ execute(context: AcApContext): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=AcApMarkupCalloutCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupCalloutCmd.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupCalloutCmd.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAEL,WAAW,EAIZ,MAAM,cAAc,CAAA;AAyJrB;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;;IAM7C,OAAO,CAAC,OAAO,EAAE,WAAW;CAkDnC"}
@@ -0,0 +1,259 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
+ return new (P || (P = Promise))(function (resolve, reject) {
30
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
34
+ });
35
+ };
36
+ var __generator = (this && this.__generator) || function (thisArg, body) {
37
+ 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);
38
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
39
+ function verb(n) { return function (v) { return step([n, v]); }; }
40
+ function step(op) {
41
+ if (f) throw new TypeError("Generator is already executing.");
42
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
43
+ 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;
44
+ if (y = 0, t) op = [op[0] & 2, t.value];
45
+ switch (op[0]) {
46
+ case 0: case 1: t = op; break;
47
+ case 4: _.label++; return { value: op[1], done: false };
48
+ case 5: _.label++; y = op[1]; op = [0]; continue;
49
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
50
+ default:
51
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
53
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
54
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
55
+ if (t[2]) _.ops.pop();
56
+ _.trys.pop(); continue;
57
+ }
58
+ op = body.call(thisArg, _);
59
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
60
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
61
+ }
62
+ };
63
+ import { AcGePoint3d } from '@mlightcad/data-model';
64
+ import { AcTrHtmlCallout, AcTrHtmlDot } from '@mlightcad/three-renderer';
65
+ import { AcEdCommand, AcEdPreviewJig, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
66
+ import { AcApI18n } from '../../i18n';
67
+ import { AcApHtmlLivePreview, acapStrokeLiveSegment } from '../overlay/AcApHtmlLivePreview';
68
+ import { configureMarkupCommand, createMarkupMeta, promptMarkupCapsuleText, withMarkupInput } from './AcApMarkupCmdUtil';
69
+ import { commitMarkup } from './AcApMarkupPresenter';
70
+ import { MARKUP_LIVE_LAYER } from './AcApMarkupStore';
71
+ import { defaultMarkupColor, getMarkupFontSize, getMarkupLineWeight, markupCanvasLineWidth, subscribeMarkupDrawStyle } from './AcApMarkupUtil';
72
+ /**
73
+ * Live preview while placing a callout text bubble:
74
+ * tip marker + leader line + arrowhead + floating callout bubble.
75
+ */
76
+ var AcApMarkupCalloutJig = /** @class */ (function (_super) {
77
+ __extends(AcApMarkupCalloutJig, _super);
78
+ function AcApMarkupCalloutJig(view, tip, text, color) {
79
+ var _a;
80
+ var _this = _super.call(this, view) || this;
81
+ _this._view = view;
82
+ _this._tip = { x: tip.x, y: tip.y, z: (_a = tip.z) !== null && _a !== void 0 ? _a : 0 };
83
+ _this._anchor = __assign({}, _this._tip);
84
+ _this._color = color;
85
+ _this._ht = _this._view.htmlTransientManager;
86
+ var layoutId = _this._view.activeLayoutBtrId;
87
+ var stamp = Date.now();
88
+ _this._tipDotId = "live-markup-callout-tip-".concat(stamp);
89
+ _this._bubbleId = "live-markup-callout-bubble-".concat(stamp);
90
+ _this._tipDot = new AcTrHtmlDot({
91
+ id: _this._tipDotId,
92
+ color: color,
93
+ worldPosition: _this._tip,
94
+ layer: MARKUP_LIVE_LAYER,
95
+ layoutId: layoutId
96
+ });
97
+ _this._ht.add(_this._tipDot);
98
+ _this._bubble = new AcTrHtmlCallout({
99
+ id: _this._bubbleId,
100
+ color: color,
101
+ text: text,
102
+ fontSize: getMarkupFontSize(),
103
+ worldPosition: _this._tip,
104
+ layer: MARKUP_LIVE_LAYER,
105
+ layoutId: layoutId
106
+ });
107
+ _this._ht.add(_this._bubble);
108
+ _this._preview = new AcApHtmlLivePreview(_this._view, "live-markup-callout-leader-".concat(stamp), MARKUP_LIVE_LAYER);
109
+ _this._unsubDrawStyle = subscribeMarkupDrawStyle(function () {
110
+ return _this.applyCurrentStyle();
111
+ });
112
+ _this._view.isHtmlDirty = true;
113
+ return _this;
114
+ }
115
+ Object.defineProperty(AcApMarkupCalloutJig.prototype, "entity", {
116
+ /** HTML-only preview — no CAD transient. */
117
+ get: function () {
118
+ return null;
119
+ },
120
+ enumerable: false,
121
+ configurable: true
122
+ });
123
+ AcApMarkupCalloutJig.prototype.update = function (anchor) {
124
+ var _a;
125
+ this._anchor = { x: anchor.x, y: anchor.y, z: (_a = anchor.z) !== null && _a !== void 0 ? _a : 0 };
126
+ this._color = defaultMarkupColor();
127
+ this._bubble.setPosition(this._anchor);
128
+ this._bubble.setFontSize(getMarkupFontSize());
129
+ this.paintLeader();
130
+ this._view.isHtmlDirty = true;
131
+ };
132
+ Object.defineProperty(AcApMarkupCalloutJig.prototype, "capsule", {
133
+ /** Capsule used for in-place text entry after the bubble is placed. */
134
+ get: function () {
135
+ return this._bubble;
136
+ },
137
+ enumerable: false,
138
+ configurable: true
139
+ });
140
+ /**
141
+ * Called when point input ends. Keep leader + bubble visible while the user
142
+ * types callout text; {@link disposePreview} cleans up afterwards.
143
+ */
144
+ AcApMarkupCalloutJig.prototype.end = function () {
145
+ // Intentionally do not remove the HTML overlays.
146
+ };
147
+ /** Remove frozen preview graphics after text entry (or cancel). */
148
+ AcApMarkupCalloutJig.prototype.disposePreview = function () {
149
+ var _a;
150
+ (_a = this._unsubDrawStyle) === null || _a === void 0 ? void 0 : _a.call(this);
151
+ this._unsubDrawStyle = undefined;
152
+ this._preview.acapDispose();
153
+ this._ht.remove(this._tipDotId);
154
+ this._ht.remove(this._bubbleId);
155
+ this._view.isHtmlDirty = true;
156
+ };
157
+ /** Apply session draw style to the frozen preview (including during text entry). */
158
+ AcApMarkupCalloutJig.prototype.applyCurrentStyle = function () {
159
+ this._color = defaultMarkupColor();
160
+ this._tipDot.setColor(this._color);
161
+ this._bubble.setColor(this._color);
162
+ this._bubble.setFontSize(getMarkupFontSize());
163
+ this.paintLeader();
164
+ this._view.isHtmlDirty = true;
165
+ };
166
+ AcApMarkupCalloutJig.prototype.paintLeader = function () {
167
+ var lineWidth = markupCanvasLineWidth(getMarkupLineWeight());
168
+ var color = this._color;
169
+ var tip = this._tip;
170
+ var anchor = this._anchor;
171
+ this._preview.acapSetDraw(function (ctx, view) {
172
+ // Arrow at tip (leader begins at tip, bubble at anchor).
173
+ acapStrokeLiveSegment(ctx, view, anchor, tip, color, lineWidth, {
174
+ arrow: true
175
+ });
176
+ });
177
+ };
178
+ return AcApMarkupCalloutJig;
179
+ }(AcEdPreviewJig));
180
+ /**
181
+ * Create a callout (leader tip + text bubble) with Design Review–style jig preview.
182
+ *
183
+ * Matches Autodesk Design Review 2D callout placement:
184
+ * 1. Click where the leader / arrow tip begins
185
+ * 2. Drag to place the callout text box (live leader + arrow + bubble preview)
186
+ * 3. Type the callout text in the capsule
187
+ *
188
+ * @see Autodesk Design Review help — Create a Callout for 2D Content
189
+ */
190
+ var AcApMarkupCalloutCmd = /** @class */ (function (_super) {
191
+ __extends(AcApMarkupCalloutCmd, _super);
192
+ function AcApMarkupCalloutCmd() {
193
+ var _this = _super.call(this) || this;
194
+ configureMarkupCommand(_this);
195
+ return _this;
196
+ }
197
+ AcApMarkupCalloutCmd.prototype.execute = function (context) {
198
+ return __awaiter(this, void 0, void 0, function () {
199
+ var _this = this;
200
+ return __generator(this, function (_a) {
201
+ switch (_a.label) {
202
+ case 0: return [4 /*yield*/, withMarkupInput(context, function () { return __awaiter(_this, void 0, void 0, function () {
203
+ var color, tipPrompt, tipResult, tip, jig, anchorPrompt, anchorResult, anchor, text, meta, record;
204
+ var _a;
205
+ return __generator(this, function (_b) {
206
+ switch (_b.label) {
207
+ case 0:
208
+ color = defaultMarkupColor();
209
+ tipPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.callout.tip'));
210
+ return [4 /*yield*/, context.view.editor.getPoint(tipPrompt)];
211
+ case 1:
212
+ tipResult = _b.sent();
213
+ if (tipResult.status !== AcEdPromptStatus.OK)
214
+ return [2 /*return*/];
215
+ tip = tipResult.value;
216
+ jig = new AcApMarkupCalloutJig(context.view, tip, '', color);
217
+ _b.label = 2;
218
+ case 2:
219
+ _b.trys.push([2, , 5, 6]);
220
+ anchorPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.callout.anchor'));
221
+ anchorPrompt.basePoint = new AcGePoint3d(tip.x, tip.y, (_a = tip.z) !== null && _a !== void 0 ? _a : 0);
222
+ anchorPrompt.useBasePoint = true;
223
+ anchorPrompt.useDashedLine = false;
224
+ anchorPrompt.jig = jig;
225
+ return [4 /*yield*/, context.view.editor.getPoint(anchorPrompt)];
226
+ case 3:
227
+ anchorResult = _b.sent();
228
+ if (anchorResult.status !== AcEdPromptStatus.OK)
229
+ return [2 /*return*/];
230
+ anchor = anchorResult.value;
231
+ return [4 /*yield*/, promptMarkupCapsuleText(jig.capsule)];
232
+ case 4:
233
+ text = _b.sent();
234
+ meta = createMarkupMeta('callout', context.view, context, { text: text || undefined });
235
+ record = __assign(__assign({}, meta), { type: 'callout', geometry: {
236
+ type: 'callout',
237
+ tip: { x: tip.x, y: tip.y },
238
+ anchor: { x: anchor.x, y: anchor.y }
239
+ } });
240
+ commitMarkup(context.view, record);
241
+ return [3 /*break*/, 6];
242
+ case 5:
243
+ jig.disposePreview();
244
+ return [7 /*endfinally*/];
245
+ case 6: return [2 /*return*/];
246
+ }
247
+ });
248
+ }); })];
249
+ case 1:
250
+ _a.sent();
251
+ return [2 /*return*/];
252
+ }
253
+ });
254
+ });
255
+ };
256
+ return AcApMarkupCalloutCmd;
257
+ }(AcEdCommand));
258
+ export { AcApMarkupCalloutCmd };
259
+ //# sourceMappingURL=AcApMarkupCalloutCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupCalloutCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupCalloutCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAEL,WAAW,EAEZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,eAAe,EACf,WAAW,EAEZ,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAEL,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,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AY,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE;4CAAE,sBAAM;wCACjD,MAAM,GAAG,YAAY,CAAC,KAAM,CAAA;wCAGrB,qBAAM,uBAAuB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAA;;wCAAjD,IAAI,GAAG,SAA0C;wCAEjD,IAAI,GAAG,gBAAgB,CAC3B,SAAS,EACT,OAAO,CAAC,IAAkB,EAC1B,OAAO,EACP,EAAE,IAAI,EAAE,IAAI,IAAI,SAAS,EAAE,CAC5B,CAAA;wCACK,MAAM,yBACP,IAAI,KACP,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE;gDACR,IAAI,EAAE,SAAS;gDACf,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE;gDAC3B,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE;6CACrC,GACF,CAAA;wCACD,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;;;wCAElC,GAAG,CAAC,cAAc,EAAE,CAAA;;;;;6BAEvB,CAAC,EAAA;;wBA/CF,SA+CE,CAAA;;;;;KACH;IACH,2BAAC;AAAD,CAAC,AAxDD,CAA0C,WAAW,GAwDpD"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Pointer-drag grips for markup HTML overlays.
3
+ *
4
+ * Implementation lives in the shared overlay grip host; this module re-exports
5
+ * markup-facing names for existing call sites.
6
+ */
7
+ import type { AcTrHtmlElement, AcTrHtmlGroup } from '@mlightcad/three-renderer';
8
+ import type { AcTrView2d } from '../../view';
9
+ import { type AcApOverlayCalloutGripState, type AcApOverlayPoint2d, type AcApOverlayPointerDragOptions } from '../overlay';
10
+ import { type AcApMarkupShapeOutline } from './AcApMarkupShapeCallout';
11
+ import type { AcApMarkupPoint2d } from './AcApMarkupTypes';
12
+ /**
13
+ * Alias of {@link AcApOverlayCalloutGripState} for markup call sites.
14
+ */
15
+ export type AcApMarkupCalloutGripState = AcApOverlayCalloutGripState;
16
+ /**
17
+ * Convert a pointer event to a world-space 2D point on the view.
18
+ *
19
+ * @deprecated Prefer {@link acapPointerEventToOverlayWorld}.
20
+ * @param view - Active 2D view.
21
+ * @param ev - Pointer event in viewport client coordinates.
22
+ * @returns World XY under the pointer.
23
+ */
24
+ export declare function pointerEventToMarkupWorld(view: AcTrView2d, ev: PointerEvent): AcApMarkupPoint2d;
25
+ /**
26
+ * Move a published HTML overlay and refresh its transform baseline.
27
+ *
28
+ * @deprecated Prefer {@link acapPlaceOverlayHtml}.
29
+ * @param view - Active 2D view.
30
+ * @param el - Published CSS2D overlay.
31
+ * @param point - New world-space anchor.
32
+ */
33
+ export declare function placeMarkupHtml(view: AcTrView2d, el: AcTrHtmlElement, point: AcApOverlayPoint2d): void;
34
+ /**
35
+ * Bind pointer-drag on one HTML overlay handle.
36
+ *
37
+ * @deprecated Prefer {@link acapBindOverlayPointerDrag}.
38
+ * @param options - Same as {@link AcApOverlayPointerDragOptions}.
39
+ * @returns Cleanup that removes listeners.
40
+ */
41
+ export declare function bindMarkupPointerDrag(options: AcApOverlayPointerDragOptions): () => void;
42
+ /**
43
+ * Options for {@link bindMarkupCalloutGrips}.
44
+ */
45
+ export interface AcApMarkupCalloutGripBindOptions {
46
+ /** Active 2D view. */
47
+ view: AcTrView2d;
48
+ /** Parent markup group. */
49
+ group: AcTrHtmlGroup;
50
+ /** Tip handle overlay. */
51
+ tipEl: AcTrHtmlElement;
52
+ /** Bubble handle overlay. */
53
+ bubbleEl: AcTrHtmlElement;
54
+ /** Mutable tip / anchor state. */
55
+ state: AcApMarkupCalloutGripState;
56
+ /**
57
+ * When set, tip drags are projected onto this shape outline
58
+ * (cloud / rect / circle attached callouts).
59
+ */
60
+ outline?: AcApMarkupShapeOutline;
61
+ /** Invoked when tip or bubble drag starts. */
62
+ onDragStart?: () => void;
63
+ /** Invoked after each live tip / anchor change. */
64
+ onLiveChange: () => void;
65
+ /** Invoked when a tip or bubble drag commits. */
66
+ onCommit: (next: AcApMarkupCalloutGripState) => void;
67
+ }
68
+ /**
69
+ * Wire drag handles on callout tip + bubble.
70
+ *
71
+ * Tip is constrained to {@link AcApMarkupCalloutGripBindOptions.outline} when
72
+ * provided.
73
+ *
74
+ * @param options - Tip / bubble elements, state, and optional outline.
75
+ * @returns Cleanup that unbinds both grips.
76
+ */
77
+ export declare function bindMarkupCalloutGrips(options: AcApMarkupCalloutGripBindOptions): () => void;
78
+ //# sourceMappingURL=AcApMarkupCalloutDrag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupCalloutDrag.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupCalloutDrag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,6BAA6B,EAEH,MAAM,YAAY,CAAA;AACnD,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,2BAA2B,CAAA;AAEpE;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,YAAY,GACf,iBAAiB,CAEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,kBAAkB,GACxB,IAAI,CAEN;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,6BAA6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