@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
@@ -0,0 +1,191 @@
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
+ import { AcGePoint3d } from '@mlightcad/data-model';
28
+ import { AcTrHtmlGroup } from '@mlightcad/three-renderer';
29
+ import { AcApOverlayEntity } from '../../overlay';
30
+ import { hitTestMarkupGeometry, markupGeometryCenter, translateMarkupGeometry } from '../AcApMarkupGeometry';
31
+ import { MARKUP_LAYER } from '../AcApMarkupStore';
32
+ import { cssToMarkupColor, MARKUP_LINE_WEIGHT, markupCanvasLineWidth } from '../AcApMarkupUtil';
33
+ /**
34
+ * Build {@link AcApMarkupDrawStyle} from a store record's style fields.
35
+ *
36
+ * @param record - Markup record whose style and layout are read.
37
+ * @returns Resolved color, weights, layer, and layout for drawing.
38
+ */
39
+ export function markupDrawStyleFromRecord(record) {
40
+ var lineWeight = record.style.lineWeight != null && record.style.lineWeight > 0
41
+ ? record.style.lineWeight
42
+ : MARKUP_LINE_WEIGHT;
43
+ return {
44
+ color: cssToMarkupColor(record.style.color),
45
+ lineWeight: lineWeight,
46
+ canvasLineWidth: markupCanvasLineWidth(lineWeight),
47
+ layer: MARKUP_LAYER,
48
+ layoutId: record.layoutId
49
+ };
50
+ }
51
+ /**
52
+ * Base class for Design Review markup overlays.
53
+ *
54
+ * Concrete types implement {@link subWorldDraw} and optional grip protocols.
55
+ * Geometry and metadata live on {@link record}; render primitives are composed
56
+ * into an {@link AcTrHtmlGroup}.
57
+ *
58
+ * Implements {@link AcApOverlaySerializable} via {@link toRecord}. Rehydrate
59
+ * with {@link import('./AcApMarkupEntityFactory').createMarkupEntityFromRecord}.
60
+ */
61
+ var AcApMarkupEntity = /** @class */ (function (_super) {
62
+ __extends(AcApMarkupEntity, _super);
63
+ /**
64
+ * @param record - Initial markup store record.
65
+ */
66
+ function AcApMarkupEntity(record) {
67
+ var _this = _super.call(this) || this;
68
+ _this.record = record;
69
+ return _this;
70
+ }
71
+ Object.defineProperty(AcApMarkupEntity.prototype, "id", {
72
+ /**
73
+ * Markup id from the store record (also the HTML group id).
74
+ */
75
+ get: function () {
76
+ return this.record.id;
77
+ },
78
+ enumerable: false,
79
+ configurable: true
80
+ });
81
+ /**
82
+ * Sidecar / store snapshot of this markup (same object as the live record).
83
+ *
84
+ * @returns Current {@link AcApMarkupRecord}.
85
+ */
86
+ AcApMarkupEntity.prototype.toRecord = function () {
87
+ return this.record;
88
+ };
89
+ Object.defineProperty(AcApMarkupEntity.prototype, "markupRecord", {
90
+ /**
91
+ * Current store record held by this entity (alias of {@link toRecord}).
92
+ */
93
+ get: function () {
94
+ return this.toRecord();
95
+ },
96
+ enumerable: false,
97
+ configurable: true
98
+ });
99
+ /**
100
+ * Replace the in-memory record (e.g. after store update before republish).
101
+ *
102
+ * @param record - Next store snapshot.
103
+ */
104
+ AcApMarkupEntity.prototype.setRecord = function (record) {
105
+ this.record = record;
106
+ };
107
+ /**
108
+ * Resolve draw style from the current record.
109
+ *
110
+ * @returns Color, line weight, layer, and layout for publishing.
111
+ */
112
+ AcApMarkupEntity.prototype.style = function () {
113
+ return markupDrawStyleFromRecord(this.record);
114
+ };
115
+ /**
116
+ * Hit-test this markup's stroke / fill via {@link hitTestMarkupGeometry}.
117
+ *
118
+ * @param canvas - Pick location in canvas space.
119
+ * @param worldToScreen - World → canvas converter.
120
+ * @param threshold - Hit slop in pixels.
121
+ * @returns Whether the pick hits drawn geometry.
122
+ */
123
+ AcApMarkupEntity.prototype.hitTest = function (canvas, worldToScreen, threshold) {
124
+ return hitTestMarkupGeometry(this.record.geometry, canvas, worldToScreen, threshold);
125
+ };
126
+ /**
127
+ * Focus point at the geometry center (or type-specific primary point).
128
+ *
129
+ * @returns World point for zoom / focus, or `undefined`.
130
+ */
131
+ AcApMarkupEntity.prototype.primaryPoint = function () {
132
+ var center = markupGeometryCenter(this.record.geometry);
133
+ if (!center)
134
+ return undefined;
135
+ return { x: center.x, y: center.y, z: 0 };
136
+ };
137
+ /**
138
+ * Default single center grip for whole-markup move.
139
+ *
140
+ * @returns Center grip, or empty when geometry has no center.
141
+ */
142
+ AcApMarkupEntity.prototype.subGetGripPoints = function () {
143
+ var center = markupGeometryCenter(this.record.geometry);
144
+ return center ? [new AcGePoint3d(center.x, center.y, 0)] : [];
145
+ };
146
+ /**
147
+ * Translate the whole markup when grip index `0` is moved.
148
+ *
149
+ * @param indices - Grip indices to move.
150
+ * @param offset - World-space translation.
151
+ * @returns This entity for chaining.
152
+ */
153
+ AcApMarkupEntity.prototype.subMoveGripPointsAt = function (indices, offset) {
154
+ if (indices.length === 0)
155
+ return this;
156
+ if (!indices.includes(0))
157
+ return this;
158
+ this.record = __assign(__assign({}, this.record), { geometry: translateMarkupGeometry(this.record.geometry, offset.x, offset.y) });
159
+ return this;
160
+ };
161
+ /**
162
+ * Build an empty world-draw result for an already-created group.
163
+ *
164
+ * @param group - HTML group shell.
165
+ * @returns Result with no CAD entities and a no-op dispose.
166
+ */
167
+ AcApMarkupEntity.prototype.emptyResult = function (group) {
168
+ return {
169
+ group: group,
170
+ entityIds: [],
171
+ dispose: function () { return undefined; }
172
+ };
173
+ };
174
+ /**
175
+ * Create a selectable markup group shell for {@link id}.
176
+ *
177
+ * @returns New empty {@link AcTrHtmlGroup} on the markup layer.
178
+ */
179
+ AcApMarkupEntity.prototype.createGroup = function () {
180
+ var _a = this.style(), layer = _a.layer, layoutId = _a.layoutId;
181
+ return new AcTrHtmlGroup({
182
+ id: this.record.id,
183
+ layer: layer,
184
+ layoutId: layoutId,
185
+ selectable: true
186
+ });
187
+ };
188
+ return AcApMarkupEntity;
189
+ }(AcApOverlayEntity));
190
+ export { AcApMarkupEntity };
191
+ //# sourceMappingURL=AcApMarkupEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntity.js","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAEL,WAAW,EAIZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BA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,IAAI,CAAC,MAAM,CAAC,QAAQ,EACpB,MAAM,CAAC,CAAC,EACR,MAAM,CAAC,CAAC,CACT,GACF,CAAA;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;OAKG;IACO,sCAAW,GAArB,UAAsB,KAAoB;QACxC,OAAO;YACL,KAAK,OAAA;YACL,SAAS,EAAE,EAAoB;YAC/B,OAAO,EAAE,cAAM,OAAA,SAAS,EAAT,CAAS;SACzB,CAAA;IACH,CAAC;IAED;;;;OAIG;IACO,sCAAW,GAArB;QACQ,IAAA,KAAsB,IAAI,CAAC,KAAK,EAAE,EAAhC,KAAK,WAAA,EAAE,QAAQ,cAAiB,CAAA;QACxC,OAAO,IAAI,aAAa,CAAC;YACvB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;YAClB,KAAK,OAAA;YACL,QAAQ,UAAA;YACR,UAAU,EAAE,IAAI;SACjB,CAAC,CAAA;IACJ,CAAC;IAWH,uBAAC;AAAD,CAAC,AAnKD,CACU,iBAAiB,GAkK1B"}
@@ -0,0 +1,20 @@
1
+ import type { AcApMarkupRecord } from '../AcApMarkupTypes';
2
+ import type { AcApMarkupEntity } from './AcApMarkupEntity';
3
+ /**
4
+ * Create the concrete markup entity for a store / sidecar record (deserialize).
5
+ *
6
+ * Pair with {@link AcApMarkupEntity.toRecord} for the serialize half of the
7
+ * overlay persistence protocol. Dispatches on
8
+ * {@link AcApMarkupRecord.geometry} `.type` to the matching entity class
9
+ * (text, line/arrow, cloud/rect/circle, highlight, callout, stamp/symbol).
10
+ *
11
+ * @param record - Markup store record to wrap.
12
+ * @returns Entity instance that implements overlay draw / grip / serialize.
13
+ */
14
+ export declare function createMarkupEntityFromRecord(record: AcApMarkupRecord): AcApMarkupEntity;
15
+ /**
16
+ * @deprecated Prefer {@link createMarkupEntityFromRecord} for symmetry with
17
+ * measure deserialize.
18
+ */
19
+ export declare const createMarkupEntity: typeof createMarkupEntityFromRecord;
20
+ //# sourceMappingURL=AcApMarkupEntityFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntityFactory.d.ts","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntityFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAO1D;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,gBAAgB,GACvB,gBAAgB,CAmBlB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,qCAA+B,CAAA"}
@@ -0,0 +1,43 @@
1
+ import { AcApMarkupCalloutEntity } from './AcApMarkupCalloutEntity';
2
+ import { AcApMarkupHighlightEntity } from './AcApMarkupHighlightEntity';
3
+ import { AcApMarkupSegmentEntity } from './AcApMarkupSegmentEntity';
4
+ import { AcApMarkupShapeEntity } from './AcApMarkupShapeEntity';
5
+ import { AcApMarkupStampEntity } from './AcApMarkupStampEntity';
6
+ import { AcApMarkupTextEntity } from './AcApMarkupTextEntity';
7
+ /**
8
+ * Create the concrete markup entity for a store / sidecar record (deserialize).
9
+ *
10
+ * Pair with {@link AcApMarkupEntity.toRecord} for the serialize half of the
11
+ * overlay persistence protocol. Dispatches on
12
+ * {@link AcApMarkupRecord.geometry} `.type` to the matching entity class
13
+ * (text, line/arrow, cloud/rect/circle, highlight, callout, stamp/symbol).
14
+ *
15
+ * @param record - Markup store record to wrap.
16
+ * @returns Entity instance that implements overlay draw / grip / serialize.
17
+ */
18
+ export function createMarkupEntityFromRecord(record) {
19
+ switch (record.geometry.type) {
20
+ case 'text':
21
+ return new AcApMarkupTextEntity(record);
22
+ case 'line':
23
+ case 'arrow':
24
+ return new AcApMarkupSegmentEntity(record);
25
+ case 'cloud':
26
+ case 'rect':
27
+ case 'circle':
28
+ return new AcApMarkupShapeEntity(record);
29
+ case 'highlight':
30
+ return new AcApMarkupHighlightEntity(record);
31
+ case 'callout':
32
+ return new AcApMarkupCalloutEntity(record);
33
+ case 'stamp':
34
+ case 'symbol':
35
+ return new AcApMarkupStampEntity(record);
36
+ }
37
+ }
38
+ /**
39
+ * @deprecated Prefer {@link createMarkupEntityFromRecord} for symmetry with
40
+ * measure deserialize.
41
+ */
42
+ export var createMarkupEntity = createMarkupEntityFromRecord;
43
+ //# sourceMappingURL=AcApMarkupEntityFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntityFactory.js","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntityFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAwB;IAExB,QAAQ,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC7B,KAAK,MAAM;YACT,OAAO,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAA;QACzC,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAA;QAC5C,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ;YACX,OAAO,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAA;QAC1C,KAAK,WAAW;YACd,OAAO,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAA;QAC9C,KAAK,SAAS;YACZ,OAAO,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAA;QAC5C,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ;YACX,OAAO,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,IAAM,kBAAkB,GAAG,4BAA4B,CAAA"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Shared markup grip / attached-callout helpers used by concrete markup entities.
3
+ */
4
+ import { AcTrHtmlCallout, AcTrHtmlDot, type AcTrHtmlElement, type AcTrHtmlGroup } from '@mlightcad/three-renderer';
5
+ import type { AcTrView2d } from '../../../view';
6
+ import type { AcApMarkupShapeOutline } from '../AcApMarkupShapeCallout';
7
+ import type { AcApMarkupAttachedCallout, AcApMarkupPoint2d, AcApMarkupRecord } from '../AcApMarkupTypes';
8
+ import type { AcApMarkupDrawStyle } from './AcApMarkupEntity';
9
+ /**
10
+ * Live visuals for a shape-attached callout (leader + tip + bubble).
11
+ */
12
+ export interface AcApMarkupAttachedCalloutVisual {
13
+ /** Mutable tip / anchor updated during grips and center move. */
14
+ live: {
15
+ tip: AcApMarkupPoint2d;
16
+ anchor: AcApMarkupPoint2d;
17
+ };
18
+ /** Redraw the leader canvas from {@link live}. */
19
+ redraw: () => void;
20
+ /** Tip grip HTML dot. */
21
+ tipDot: AcTrHtmlDot;
22
+ /** Text bubble HTML callout. */
23
+ bubble: AcTrHtmlCallout;
24
+ /**
25
+ * Bind tip / bubble pointer grips after the parent group is added to the
26
+ * HTML transient manager (avoids racing manager attach).
27
+ * Required for shape-attached callouts; optional when only used for
28
+ * center-move coupling.
29
+ */
30
+ bindGrips?: () => void;
31
+ }
32
+ /**
33
+ * Select a markup HTML group and sync the store selection id.
34
+ *
35
+ * @param view2d - Active 2D view.
36
+ * @param id - Markup / group id to select.
37
+ */
38
+ export declare function selectMarkupGroup(view2d: AcTrView2d, id: string): void;
39
+ /**
40
+ * Options for {@link publishAttachedCallout}.
41
+ */
42
+ export interface AcApPublishAttachedCalloutOptions {
43
+ /** Active 2D view. */
44
+ view: AcTrView2d;
45
+ /** Parent markup group that receives the bubble, tip, and canvas. */
46
+ group: AcTrHtmlGroup;
47
+ /** Parent shape markup record. */
48
+ record: AcApMarkupRecord;
49
+ /** Attached callout geometry from the store. */
50
+ callout: AcApMarkupAttachedCallout;
51
+ /** Resolved draw style for color / layer / layout. */
52
+ style: AcApMarkupDrawStyle;
53
+ /** Cleanup list that receives viewChanged / grip unbinders. */
54
+ cleanups: Array<() => void>;
55
+ /** Shape outline used to constrain the tip grip. */
56
+ outline: AcApMarkupShapeOutline;
57
+ }
58
+ /**
59
+ * Attach a shape callout (leader without arrow + text bubble) with tip/bubble grips.
60
+ *
61
+ * @param options - Parent group, record, callout geometry, and outline.
62
+ * @returns Live visual handles for center-move coupling.
63
+ */
64
+ export declare function publishAttachedCallout(options: AcApPublishAttachedCalloutOptions): AcApMarkupAttachedCalloutVisual;
65
+ /**
66
+ * Options for {@link bindMarkupCenterMove}.
67
+ */
68
+ export interface AcApMarkupCenterMoveOptions {
69
+ /** Active 2D view. */
70
+ view: AcTrView2d;
71
+ /** Markup id whose geometry is updated on commit. */
72
+ recordId: string;
73
+ /** Center grip HTML element. */
74
+ centerEl: AcTrHtmlElement;
75
+ /**
76
+ * Called during drag with the world-space translation from drag origin.
77
+ * Used to live-preview HTML canvas shapes (no CAD transients).
78
+ */
79
+ onLiveOffset?: (dx: number, dy: number) => void;
80
+ /** Optional attached callout to keep in sync while moving. */
81
+ attached?: AcApMarkupAttachedCalloutVisual;
82
+ }
83
+ /**
84
+ * Whole-markup drag via a center grip element.
85
+ *
86
+ * Live-previews canvas geometry via {@link AcApMarkupCenterMoveOptions.onLiveOffset}
87
+ * and optionally moves an attached callout; commits via
88
+ * {@link translateMarkupGeometry}.
89
+ *
90
+ * @param options - Center handle and optional attached callout.
91
+ * @returns Cleanup that unbinds the pointer drag.
92
+ */
93
+ export declare function bindMarkupCenterMove(options: AcApMarkupCenterMoveOptions): () => void;
94
+ //# sourceMappingURL=AcApMarkupEntityGrips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntityGrips.d.ts","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntityGrips.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,eAAe,EAEf,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAe/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAIvE,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,oBAAoB,CAAA;AAK3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE7D;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,iEAAiE;IACjE,IAAI,EAAE;QAAE,GAAG,EAAE,iBAAiB,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAA;IAC3D,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,yBAAyB;IACzB,MAAM,EAAE,WAAW,CAAA;IACnB,gCAAgC;IAChC,MAAM,EAAE,eAAe,CAAA;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAGtE;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,sBAAsB;IACtB,IAAI,EAAE,UAAU,CAAA;IAChB,qEAAqE;IACrE,KAAK,EAAE,aAAa,CAAA;IACpB,kCAAkC;IAClC,MAAM,EAAE,gBAAgB,CAAA;IACxB,gDAAgD;IAChD,OAAO,EAAE,yBAAyB,CAAA;IAClC,sDAAsD;IACtD,KAAK,EAAE,mBAAmB,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAA;IAC3B,oDAAoD;IACpD,OAAO,EAAE,sBAAsB,CAAA;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,iCAAiC,GACzC,+BAA+B,CA+GjC;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB;IACtB,IAAI,EAAE,UAAU,CAAA;IAChB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,eAAe,CAAA;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,+BAA+B,CAAA;CAC3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,2BAA2B,GACnC,MAAM,IAAI,CAmEZ"}
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Shared markup grip / attached-callout helpers used by concrete markup entities.
3
+ */
4
+ var __assign = (this && this.__assign) || function () {
5
+ __assign = Object.assign || function(t) {
6
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
7
+ s = arguments[i];
8
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
9
+ t[p] = s[p];
10
+ }
11
+ return t;
12
+ };
13
+ return __assign.apply(this, arguments);
14
+ };
15
+ import { AcTrHtmlCallout, AcTrHtmlCanvasOverlay, AcTrHtmlDot } from '@mlightcad/three-renderer';
16
+ import { acapBindOverlayCalloutGrips, acapBindOverlayPointerDrag, acapDrawOverlayLeader, acapFitOverlayCanvas, acapPlaceOverlayHtml } from '../../overlay';
17
+ import { markupGeometryCenter, translateMarkupGeometry, translateMarkupPoint } from '../AcApMarkupGeometry';
18
+ import { runMarkupEdit } from '../AcApMarkupHistory';
19
+ import { republishMarkup } from '../AcApMarkupRepublish';
20
+ import { computeLeaderTipOnShape } from '../AcApMarkupShapeCallout';
21
+ import { getMarkupStore } from '../AcApMarkupStore';
22
+ import { bindMarkupInlineTextEdit } from '../AcApMarkupTextEdit';
23
+ import { MARKUP_LINE_WEIGHT, markupCanvasLineWidth } from '../AcApMarkupUtil';
24
+ /**
25
+ * Select a markup HTML group and sync the store selection id.
26
+ *
27
+ * @param view2d - Active 2D view.
28
+ * @param id - Markup / group id to select.
29
+ */
30
+ export function selectMarkupGroup(view2d, id) {
31
+ getMarkupStore().setSelectedId(id);
32
+ view2d.htmlTransientManager.selectGroup(id);
33
+ }
34
+ /**
35
+ * Attach a shape callout (leader without arrow + text bubble) with tip/bubble grips.
36
+ *
37
+ * @param options - Parent group, record, callout geometry, and outline.
38
+ * @returns Live visual handles for center-move coupling.
39
+ */
40
+ export function publishAttachedCallout(options) {
41
+ var view2d = options.view, group = options.group, record = options.record, callout = options.callout, style = options.style, cleanups = options.cleanups, outline = options.outline;
42
+ var color = style.color, layer = style.layer, layoutId = style.layoutId;
43
+ var container = view2d.container;
44
+ var overlay = new AcTrHtmlCanvasOverlay({
45
+ id: "".concat(record.id, "-shape-leader"),
46
+ container: container,
47
+ layer: layer,
48
+ layoutId: layoutId
49
+ });
50
+ group.addCanvas(overlay);
51
+ var live = {
52
+ tip: __assign({}, callout.tip),
53
+ anchor: __assign({}, callout.anchor)
54
+ };
55
+ /**
56
+ * Redraw the leader stroke from {@link live} tip / anchor.
57
+ */
58
+ var redraw = function () {
59
+ var ctx = acapFitOverlayCanvas(overlay.canvas, container);
60
+ if (!ctx)
61
+ return;
62
+ acapDrawOverlayLeader(ctx, view2d.worldToScreen(live.tip), view2d.worldToScreen(live.anchor), record.style.color, false, markupCanvasLineWidth(record.style.lineWeight != null && record.style.lineWeight > 0
63
+ ? record.style.lineWeight
64
+ : MARKUP_LINE_WEIGHT));
65
+ };
66
+ redraw();
67
+ view2d.events.viewChanged.addEventListener(redraw);
68
+ cleanups.push(function () { return view2d.events.viewChanged.removeEventListener(redraw); });
69
+ var bubble = new AcTrHtmlCallout({
70
+ id: "".concat(record.id, "-shape-bubble"),
71
+ color: color,
72
+ text: callout.text || record.text || '',
73
+ fontSize: record.style.fontSize,
74
+ worldPosition: live.anchor,
75
+ layer: layer,
76
+ layoutId: layoutId
77
+ });
78
+ var tipDot = new AcTrHtmlDot({
79
+ id: "".concat(record.id, "-shape-tip"),
80
+ color: color,
81
+ worldPosition: live.tip,
82
+ layer: layer,
83
+ layoutId: layoutId
84
+ });
85
+ group.add(bubble, tipDot);
86
+ cleanups.push(bindMarkupInlineTextEdit({
87
+ view: view2d,
88
+ el: bubble.textElement,
89
+ listenOn: bubble.element,
90
+ recordId: record.id,
91
+ multiline: true
92
+ }));
93
+ /**
94
+ * Wire tip / bubble grips after the parent group is published.
95
+ */
96
+ var bindGrips = function () {
97
+ cleanups.push(acapBindOverlayCalloutGrips({
98
+ view: view2d,
99
+ group: group,
100
+ tipEl: tipDot,
101
+ bubbleEl: bubble,
102
+ state: live,
103
+ constrainTip: function (point) { return computeLeaderTipOnShape(outline, point); },
104
+ onDragStart: function () { return selectMarkupGroup(view2d, record.id); },
105
+ onLiveChange: redraw,
106
+ onCommit: function (next) {
107
+ var current = getMarkupStore().get(record.id);
108
+ if (!current || current.geometry.type !== outline.kind)
109
+ return;
110
+ var geom = current.geometry;
111
+ if (geom.type !== 'cloud' &&
112
+ geom.type !== 'rect' &&
113
+ geom.type !== 'circle') {
114
+ return;
115
+ }
116
+ runMarkupEdit(view2d, 'Move Callout', function () {
117
+ var _a, _b;
118
+ var updated = getMarkupStore().updateGeometry(record.id, __assign(__assign({}, geom), { callout: {
119
+ tip: next.tip,
120
+ anchor: next.anchor,
121
+ text: (_b = (_a = geom.callout) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : callout.text
122
+ } }));
123
+ if (updated)
124
+ republishMarkup(view2d, updated);
125
+ });
126
+ }
127
+ }));
128
+ };
129
+ return { live: live, redraw: redraw, tipDot: tipDot, bubble: bubble, bindGrips: bindGrips };
130
+ }
131
+ /**
132
+ * Whole-markup drag via a center grip element.
133
+ *
134
+ * Live-previews canvas geometry via {@link AcApMarkupCenterMoveOptions.onLiveOffset}
135
+ * and optionally moves an attached callout; commits via
136
+ * {@link translateMarkupGeometry}.
137
+ *
138
+ * @param options - Center handle and optional attached callout.
139
+ * @returns Cleanup that unbinds the pointer drag.
140
+ */
141
+ export function bindMarkupCenterMove(options) {
142
+ var view = options.view, recordId = options.recordId, centerEl = options.centerEl, onLiveOffset = options.onLiveOffset, attached = options.attached;
143
+ /** World origin captured at drag start (geometry center or element position). */
144
+ var origin = {
145
+ x: centerEl.object.position.x,
146
+ y: centerEl.object.position.y
147
+ };
148
+ /** Last pointer world position during the drag. */
149
+ var last = __assign({}, origin);
150
+ /** Attached callout tip/anchor at drag start, for relative preview. */
151
+ var originalCallout;
152
+ return acapBindOverlayPointerDrag({
153
+ view: view,
154
+ el: centerEl.element,
155
+ cursor: 'move',
156
+ onDragStart: function () {
157
+ selectMarkupGroup(view, recordId);
158
+ var stored = getMarkupStore().get(recordId);
159
+ var center = stored ? markupGeometryCenter(stored.geometry) : undefined;
160
+ origin = center !== null && center !== void 0 ? center : {
161
+ x: centerEl.object.position.x,
162
+ y: centerEl.object.position.y
163
+ };
164
+ last = __assign({}, origin);
165
+ originalCallout = attached
166
+ ? {
167
+ tip: __assign({}, attached.live.tip),
168
+ anchor: __assign({}, attached.live.anchor)
169
+ }
170
+ : undefined;
171
+ },
172
+ onMove: function (point) {
173
+ last = point;
174
+ var dx = point.x - origin.x;
175
+ var dy = point.y - origin.y;
176
+ onLiveOffset === null || onLiveOffset === void 0 ? void 0 : onLiveOffset(dx, dy);
177
+ acapPlaceOverlayHtml(view, centerEl, point);
178
+ if (attached && originalCallout) {
179
+ attached.live.tip = translateMarkupPoint(originalCallout.tip, dx, dy);
180
+ attached.live.anchor = translateMarkupPoint(originalCallout.anchor, dx, dy);
181
+ acapPlaceOverlayHtml(view, attached.tipDot, attached.live.tip);
182
+ acapPlaceOverlayHtml(view, attached.bubble, attached.live.anchor);
183
+ attached.redraw();
184
+ }
185
+ },
186
+ onCommit: function () {
187
+ var dx = last.x - origin.x;
188
+ var dy = last.y - origin.y;
189
+ if (Math.hypot(dx, dy) < 1e-9) {
190
+ onLiveOffset === null || onLiveOffset === void 0 ? void 0 : onLiveOffset(0, 0);
191
+ return;
192
+ }
193
+ runMarkupEdit(view, 'Move Markup', function () {
194
+ var current = getMarkupStore().get(recordId);
195
+ if (!current)
196
+ return;
197
+ var updated = getMarkupStore().updateGeometry(recordId, translateMarkupGeometry(current.geometry, dx, dy));
198
+ if (updated)
199
+ republishMarkup(view, updated);
200
+ });
201
+ }
202
+ });
203
+ }
204
+ //# sourceMappingURL=AcApMarkupEntityGrips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupEntityGrips.js","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupEntityGrips.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;AAEH,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,WAAW,EAGZ,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;A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AAI,CAAC,MAAM,CAAC,CAAA;gBACjE,QAAQ,CAAC,MAAM,EAAE,CAAA;YACnB,CAAC;QACH,CAAC;QACD,QAAQ,EAAE;YACR,IAAM,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAA;YAC5B,IAAM,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAA;YAC5B,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;gBAC9B,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,CAAC,EAAE,CAAC,CAAC,CAAA;gBACpB,OAAM;YACR,CAAC;YACD,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE;gBACjC,IAAM,OAAO,GAAG,cAAc,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;gBAC9C,IAAI,CAAC,OAAO;oBAAE,OAAM;gBACpB,IAAM,OAAO,GAAG,cAAc,EAAE,CAAC,cAAc,CAC7C,QAAQ,EACR,uBAAuB,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,CAClD,CAAA;gBACD,IAAI,OAAO;oBAAE,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { AcTrView2d } from '../../../view';
2
+ import { type AcApOverlayWorldDrawResult } from '../../overlay';
3
+ import type { AcApMarkupRecord } from '../AcApMarkupTypes';
4
+ import { AcApMarkupEntity } from './AcApMarkupEntity';
5
+ /**
6
+ * Highlight rectangle markup (canvas fill + invisible center hit target).
7
+ */
8
+ export declare class AcApMarkupHighlightEntity extends AcApMarkupEntity {
9
+ /**
10
+ * @param record - Store record whose geometry type must be `highlight`.
11
+ */
12
+ constructor(record: AcApMarkupRecord);
13
+ /**
14
+ * Highlight has no move grip in the current UX.
15
+ *
16
+ * @returns Empty grip list.
17
+ */
18
+ subGetGripPoints(): never[];
19
+ /**
20
+ * Publish a canvas highlight fill/stroke and a center hit-target dot.
21
+ *
22
+ * @param view - Active 2D view for canvas sizing and viewChanged redraw.
23
+ * @returns Group with canvas overlay and dispose for the redraw listener.
24
+ */
25
+ protected subWorldDraw(view: AcTrView2d): AcApOverlayWorldDrawResult;
26
+ }
27
+ //# sourceMappingURL=AcApMarkupHighlightEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupHighlightEntity.d.ts","sourceRoot":"","sources":["../../../../src/command/markup/entity/AcApMarkupHighlightEntity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAEkB,KAAK,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D;;OAEG;gBACS,MAAM,EAAE,gBAAgB;IAIpC;;;;OAIG;IACM,gBAAgB;IAIzB;;;;;OAKG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,0BAA0B;CA+DrE"}