@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
@@ -0,0 +1,327 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
37
+ var __values = (this && this.__values) || function(o) {
38
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
39
+ if (m) return m.call(o);
40
+ if (o && typeof o.length === "number") return {
41
+ next: function () {
42
+ if (o && i >= o.length) o = void 0;
43
+ return { value: o && o[i++], done: !o };
44
+ }
45
+ };
46
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
47
+ };
48
+ /** HTML transient layer for committed markup overlays. */
49
+ export var MARKUP_LAYER = 'markup';
50
+ /** HTML transient layer for in-progress markup jig / live preview. */
51
+ export var MARKUP_LIVE_LAYER = 'markup-live';
52
+ /**
53
+ * In-memory store for Design Review markups.
54
+ *
55
+ * Presentation (HTML / CAD transients) is owned by {@link AcApMarkupPresenter}.
56
+ * This store holds the serializable records and selection / dirty state.
57
+ */
58
+ var AcApMarkupStore = /** @class */ (function () {
59
+ function AcApMarkupStore() {
60
+ this.records = new Map();
61
+ this.listeners = new Set();
62
+ this._dirty = false;
63
+ }
64
+ Object.defineProperty(AcApMarkupStore.prototype, "drawingName", {
65
+ /** Drawing file name associated with the current sidecar. */
66
+ get: function () {
67
+ return this._drawingName;
68
+ },
69
+ set: function (value) {
70
+ this._drawingName = value;
71
+ },
72
+ enumerable: false,
73
+ configurable: true
74
+ });
75
+ Object.defineProperty(AcApMarkupStore.prototype, "dirty", {
76
+ /** Whether the store has unsaved changes since last import/export/clear. */
77
+ get: function () {
78
+ return this._dirty;
79
+ },
80
+ enumerable: false,
81
+ configurable: true
82
+ });
83
+ Object.defineProperty(AcApMarkupStore.prototype, "selectedId", {
84
+ /** Currently selected markup id (if any). */
85
+ get: function () {
86
+ return this._selectedId;
87
+ },
88
+ enumerable: false,
89
+ configurable: true
90
+ });
91
+ /** All markup records in insertion order. */
92
+ AcApMarkupStore.prototype.list = function () {
93
+ return __spreadArray([], __read(this.records.values()), false);
94
+ };
95
+ /** Look up one record by id. */
96
+ AcApMarkupStore.prototype.get = function (id) {
97
+ return this.records.get(id);
98
+ };
99
+ /** Whether a record exists. */
100
+ AcApMarkupStore.prototype.has = function (id) {
101
+ return this.records.has(id);
102
+ };
103
+ Object.defineProperty(AcApMarkupStore.prototype, "size", {
104
+ /** Number of stored markups. */
105
+ get: function () {
106
+ return this.records.size;
107
+ },
108
+ enumerable: false,
109
+ configurable: true
110
+ });
111
+ /**
112
+ * Insert or replace a record.
113
+ * Does not touch presentation — callers must publish via the presenter.
114
+ */
115
+ AcApMarkupStore.prototype.upsert = function (record, options) {
116
+ this.records.set(record.id, record);
117
+ if ((options === null || options === void 0 ? void 0 : options.markDirty) !== false)
118
+ this._dirty = true;
119
+ this.emit();
120
+ };
121
+ /**
122
+ * Patch metadata fields on an existing record.
123
+ * @returns the updated record, or undefined if missing.
124
+ */
125
+ AcApMarkupStore.prototype.updateMeta = function (id, patch) {
126
+ var existing = this.records.get(id);
127
+ if (!existing)
128
+ return undefined;
129
+ var next = __assign(__assign(__assign({}, existing), patch), { geometry: patch.text !== undefined
130
+ ? withAttachedCalloutText(existing.geometry, patch.text)
131
+ : existing.geometry, updatedAt: new Date().toISOString() });
132
+ this.records.set(id, next);
133
+ this._dirty = true;
134
+ this.emit();
135
+ return next;
136
+ };
137
+ /**
138
+ * Patch drawing style on an existing record.
139
+ * @returns the updated record, or undefined if missing.
140
+ */
141
+ AcApMarkupStore.prototype.updateStyle = function (id, patch) {
142
+ var existing = this.records.get(id);
143
+ if (!existing)
144
+ return undefined;
145
+ var next = __assign(__assign({}, existing), { style: __assign(__assign({}, existing.style), patch), updatedAt: new Date().toISOString() });
146
+ this.records.set(id, next);
147
+ this._dirty = true;
148
+ this.emit();
149
+ return next;
150
+ };
151
+ /**
152
+ * Replace geometry on an existing record (e.g. after callout grip drag).
153
+ * @returns the updated record, or undefined if missing.
154
+ */
155
+ AcApMarkupStore.prototype.updateGeometry = function (id, geometry) {
156
+ var existing = this.records.get(id);
157
+ if (!existing)
158
+ return undefined;
159
+ var next = __assign(__assign({}, existing), { geometry: geometry, updatedAt: new Date().toISOString() });
160
+ this.records.set(id, next);
161
+ this._dirty = true;
162
+ this.emit();
163
+ return next;
164
+ };
165
+ /**
166
+ * Remove a record from the store only (no presentation cleanup).
167
+ * @returns true when a record was removed.
168
+ */
169
+ AcApMarkupStore.prototype.removeRecord = function (id, options) {
170
+ if (!this.records.delete(id))
171
+ return false;
172
+ if (this._selectedId === id)
173
+ this._selectedId = undefined;
174
+ if ((options === null || options === void 0 ? void 0 : options.markDirty) !== false)
175
+ this._dirty = true;
176
+ this.emit();
177
+ return true;
178
+ };
179
+ /** Replace all records from a sidecar payload (does not mark dirty). */
180
+ AcApMarkupStore.prototype.replaceAll = function (records, drawingName) {
181
+ var e_1, _a;
182
+ this.records.clear();
183
+ try {
184
+ for (var records_1 = __values(records), records_1_1 = records_1.next(); !records_1_1.done; records_1_1 = records_1.next()) {
185
+ var r = records_1_1.value;
186
+ this.records.set(r.id, r);
187
+ }
188
+ }
189
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
190
+ finally {
191
+ try {
192
+ if (records_1_1 && !records_1_1.done && (_a = records_1.return)) _a.call(records_1);
193
+ }
194
+ finally { if (e_1) throw e_1.error; }
195
+ }
196
+ if (drawingName !== undefined)
197
+ this._drawingName = drawingName;
198
+ this._selectedId = undefined;
199
+ this._dirty = false;
200
+ this.emit();
201
+ };
202
+ /**
203
+ * Replace store contents from an undo/redo snapshot.
204
+ * Preserves dirty flag from the snapshot epoch.
205
+ */
206
+ AcApMarkupStore.prototype.restore = function (records, options) {
207
+ var e_2, _a;
208
+ this.records.clear();
209
+ try {
210
+ for (var records_2 = __values(records), records_2_1 = records_2.next(); !records_2_1.done; records_2_1 = records_2.next()) {
211
+ var r = records_2_1.value;
212
+ this.records.set(r.id, r);
213
+ }
214
+ }
215
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
216
+ finally {
217
+ try {
218
+ if (records_2_1 && !records_2_1.done && (_a = records_2.return)) _a.call(records_2);
219
+ }
220
+ finally { if (e_2) throw e_2.error; }
221
+ }
222
+ this._selectedId = undefined;
223
+ if ((options === null || options === void 0 ? void 0 : options.dirty) !== undefined)
224
+ this._dirty = options.dirty;
225
+ this.emit();
226
+ };
227
+ /** Clear every record. */
228
+ AcApMarkupStore.prototype.clear = function (options) {
229
+ if (this.records.size === 0 && this._selectedId == null)
230
+ return;
231
+ this.records.clear();
232
+ this._selectedId = undefined;
233
+ if ((options === null || options === void 0 ? void 0 : options.markDirty) !== false)
234
+ this._dirty = true;
235
+ this.emit();
236
+ };
237
+ /**
238
+ * Drop all session state when the drawing is replaced (open / new).
239
+ * Does not mark dirty and does not create an undo step.
240
+ */
241
+ AcApMarkupStore.prototype.reset = function () {
242
+ this.records.clear();
243
+ this._selectedId = undefined;
244
+ this._dirty = false;
245
+ this._drawingName = undefined;
246
+ this.emit();
247
+ };
248
+ /** Select a markup by id (or clear when undefined). */
249
+ AcApMarkupStore.prototype.setSelectedId = function (id) {
250
+ if (this._selectedId === id)
251
+ return;
252
+ this._selectedId = id;
253
+ this.emit();
254
+ };
255
+ /** Build a sidecar JSON object from current records. */
256
+ AcApMarkupStore.prototype.toSidecar = function () {
257
+ return {
258
+ version: 1,
259
+ drawingName: this._drawingName,
260
+ markups: this.list()
261
+ };
262
+ };
263
+ /** Mark the store as clean after a successful export. */
264
+ AcApMarkupStore.prototype.markClean = function () {
265
+ this._dirty = false;
266
+ this.emit();
267
+ };
268
+ /** Subscribe to store changes. Returns an unsubscribe function. */
269
+ AcApMarkupStore.prototype.subscribe = function (listener) {
270
+ var _this = this;
271
+ this.listeners.add(listener);
272
+ return function () {
273
+ _this.listeners.delete(listener);
274
+ };
275
+ };
276
+ AcApMarkupStore.prototype.emit = function () {
277
+ var e_3, _a;
278
+ try {
279
+ for (var _b = __values(__spreadArray([], __read(this.listeners), false)), _c = _b.next(); !_c.done; _c = _b.next()) {
280
+ var listener = _c.value;
281
+ try {
282
+ listener();
283
+ }
284
+ catch (_d) {
285
+ // Listener errors must not break the store.
286
+ }
287
+ }
288
+ }
289
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
290
+ finally {
291
+ try {
292
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
293
+ }
294
+ finally { if (e_3) throw e_3.error; }
295
+ }
296
+ };
297
+ return AcApMarkupStore;
298
+ }());
299
+ export { AcApMarkupStore };
300
+ /** Process-wide markup store (one active drawing session). */
301
+ var sharedStore;
302
+ /** Returns the shared markup store, creating it on first use. */
303
+ export function getMarkupStore() {
304
+ if (!sharedStore)
305
+ sharedStore = new AcApMarkupStore();
306
+ return sharedStore;
307
+ }
308
+ /**
309
+ * Keep shape-attached callout bubble text in sync with the record label.
310
+ */
311
+ function withAttachedCalloutText(geometry, text) {
312
+ if ((geometry.type === 'cloud' ||
313
+ geometry.type === 'rect' ||
314
+ geometry.type === 'circle') &&
315
+ geometry.callout) {
316
+ return __assign(__assign({}, geometry), { callout: __assign(__assign({}, geometry.callout), { text: text }) });
317
+ }
318
+ return geometry;
319
+ }
320
+ /** Valid status values for UI / validation. */
321
+ export var MARKUP_STATUSES = [
322
+ 'open',
323
+ 'question',
324
+ 'answered',
325
+ 'closed'
326
+ ];
327
+ //# sourceMappingURL=AcApMarkupStore.js.map
@@ -0,0 +1 @@
1
+ {"version":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;oBACH,QAAQ,EAAE,CAAA;gBACZ,CAAC;gBAAC,WAAM,CAAC;oBACP,4CAA4C;gBAC9C,CAAC;YACH,CAAC;;;;;;;;;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAjOD,IAiOC;;AAED,8DAA8D;AAC9D,IAAI,WAAwC,CAAA;AAE5C,iEAAiE;AACjE,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC,WAAW;QAAE,WAAW,GAAG,IAAI,eAAe,EAAE,CAAA;IACrD,OAAO,WAAW,CAAA;AACpB,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAC9B,QAAsC,EACtC,IAAwB;IAExB,IACE,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO;QACxB,QAAQ,CAAC,IAAI,KAAK,MAAM;QACxB,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC;QAC7B,QAAQ,CAAC,OAAO,EAChB,CAAC;QACD,6BACK,QAAQ,KACX,OAAO,wBAAO,QAAQ,CAAC,OAAO,KAAE,IAAI,MAAA,OACrC;IACH,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,+CAA+C;AAC/C,MAAM,CAAC,IAAM,eAAe,GAAgC;IAC1D,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;CACA,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { AcApContext } from '../../app';
2
+ import { AcEdCommand } from '../../editor';
3
+ /**
4
+ * Place a text markup label at a picked world point.
5
+ */
6
+ export declare class AcApMarkupTextCmd extends AcEdCommand {
7
+ constructor();
8
+ execute(context: AcApContext): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=AcApMarkupTextCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupTextCmd.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupTextCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EACL,WAAW,EAGZ,MAAM,cAAc,CAAA;AAcrB;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;;IAM1C,OAAO,CAAC,OAAO,EAAE,WAAW;CA4CnC"}
@@ -0,0 +1,141 @@
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 { AcTrHtmlBadge } from '@mlightcad/three-renderer';
64
+ import { AcEdCommand, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
65
+ import { AcApI18n } from '../../i18n';
66
+ import { configureMarkupCommand, createMarkupMeta, promptMarkupCapsuleText, withMarkupInput } from './AcApMarkupCmdUtil';
67
+ import { commitMarkup } from './AcApMarkupPresenter';
68
+ import { MARKUP_LIVE_LAYER } from './AcApMarkupStore';
69
+ import { defaultMarkupColor, getMarkupFontSize } from './AcApMarkupUtil';
70
+ /**
71
+ * Place a text markup label at a picked world point.
72
+ */
73
+ var AcApMarkupTextCmd = /** @class */ (function (_super) {
74
+ __extends(AcApMarkupTextCmd, _super);
75
+ function AcApMarkupTextCmd() {
76
+ var _this = _super.call(this) || this;
77
+ configureMarkupCommand(_this);
78
+ return _this;
79
+ }
80
+ AcApMarkupTextCmd.prototype.execute = function (context) {
81
+ return __awaiter(this, void 0, void 0, function () {
82
+ var _this = this;
83
+ return __generator(this, function (_a) {
84
+ switch (_a.label) {
85
+ case 0: return [4 /*yield*/, withMarkupInput(context, function () { return __awaiter(_this, void 0, void 0, function () {
86
+ var pointPrompt, pointResult, position, view, badgeId, badge, text, meta, record;
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0:
90
+ pointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.text.point'));
91
+ return [4 /*yield*/, context.view.editor.getPoint(pointPrompt)];
92
+ case 1:
93
+ pointResult = _a.sent();
94
+ if (pointResult.status !== AcEdPromptStatus.OK)
95
+ return [2 /*return*/];
96
+ position = pointResult.value;
97
+ view = context.view;
98
+ badgeId = "live-markup-text-".concat(Date.now());
99
+ badge = new AcTrHtmlBadge({
100
+ id: badgeId,
101
+ color: defaultMarkupColor(),
102
+ text: '',
103
+ fontSize: getMarkupFontSize(),
104
+ worldPosition: position,
105
+ layer: MARKUP_LIVE_LAYER,
106
+ layoutId: view.activeLayoutBtrId
107
+ });
108
+ view.htmlTransientManager.add(badge);
109
+ view.isHtmlDirty = true;
110
+ text = 'Note';
111
+ _a.label = 2;
112
+ case 2:
113
+ _a.trys.push([2, , 4, 5]);
114
+ return [4 /*yield*/, promptMarkupCapsuleText({ textElement: badge.element, element: badge.element }, { multiline: false })];
115
+ case 3:
116
+ text =
117
+ (_a.sent()) || 'Note';
118
+ return [3 /*break*/, 5];
119
+ case 4:
120
+ view.htmlTransientManager.remove(badgeId);
121
+ view.isHtmlDirty = true;
122
+ return [7 /*endfinally*/];
123
+ case 5:
124
+ meta = createMarkupMeta('text', view, context, { text: text });
125
+ record = __assign(__assign({}, meta), { type: 'text', geometry: { type: 'text', position: { x: position.x, y: position.y } } });
126
+ commitMarkup(context.view, record);
127
+ return [2 /*return*/];
128
+ }
129
+ });
130
+ }); })];
131
+ case 1:
132
+ _a.sent();
133
+ return [2 /*return*/];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ return AcApMarkupTextCmd;
139
+ }(AcEdCommand));
140
+ export { AcApMarkupTextCmd };
141
+ //# sourceMappingURL=AcApMarkupTextCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupTextCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupTextCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAGzD,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,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,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAExE;;GAEG;AACH;IAAuC,qCAAW;IAChD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,sBAAsB,CAAC,KAAI,CAAC,CAAA;;IAC9B,CAAC;IAEK,mCAAO,GAAb,UAAc,OAAoB;;;;;4BAChC,qBAAM,eAAe,CAAC,OAAO,EAAE;;;;;wCACvB,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E,EAAE,IAAI,MAAA,EAAE,CAAC,CAAA;wCACxD,MAAM,yBACP,IAAI,KACP,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,GACvE,CAAA;wCACD,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;;;;6BACnC,CAAC,EAAA;;wBAzCF,SAyCE,CAAA;;;;;KACH;IACH,wBAAC;AAAD,CAAC,AAlDD,CAAuC,WAAW,GAkDjD"}
@@ -0,0 +1,88 @@
1
+ import type { AcTrView2d } from '../../view';
2
+ /**
3
+ * Options for {@link bindMarkupInlineTextEdit}.
4
+ */
5
+ export interface AcApMarkupInlineTextEditOptions {
6
+ /** View used to commit the edit through markup history. */
7
+ view: AcTrView2d;
8
+ /** Label element that becomes content-editable. */
9
+ el: HTMLElement;
10
+ /**
11
+ * Element that receives the double-click. Defaults to {@link el}.
12
+ * Use the outer capsule / bubble so padding clicks also start editing.
13
+ */
14
+ listenOn?: HTMLElement;
15
+ /** Markup record whose `text` is updated. */
16
+ recordId: string;
17
+ /**
18
+ * When `true`, Shift+Enter inserts a newline; Enter still commits.
19
+ * @defaultValue `false`
20
+ */
21
+ multiline?: boolean;
22
+ }
23
+ /**
24
+ * Options for {@link editMarkupHtmlText}.
25
+ */
26
+ export interface AcApMarkupHtmlTextEditOptions {
27
+ /** Label element that becomes content-editable. */
28
+ el: HTMLElement;
29
+ /**
30
+ * Element that receives pointer events while editing.
31
+ * Defaults to {@link el}. Use the outer capsule so padding clicks stay in the editor.
32
+ */
33
+ listenOn?: HTMLElement;
34
+ /**
35
+ * When `true`, Shift+Enter inserts a newline; Enter still commits.
36
+ * @defaultValue `false`
37
+ */
38
+ multiline?: boolean;
39
+ /** Text shown when editing starts. Defaults to the element's current text. */
40
+ initialText?: string;
41
+ /** When aborted, editing cancels and restores {@link initialText}. */
42
+ signal?: AbortSignal;
43
+ }
44
+ /**
45
+ * Whether a markup capsule / callout label is currently content-editable.
46
+ *
47
+ * View selection gestures check this so canvas clicks cannot pick CAD
48
+ * entities while the user is typing in a capsule.
49
+ */
50
+ export declare function isMarkupHtmlTextEditing(): boolean;
51
+ /**
52
+ * Whether two pointer downs form a double-click (time + distance).
53
+ *
54
+ * Overlay click/drag handlers often call `preventDefault`, which makes
55
+ * browsers omit the native `dblclick` event. Callers should use this
56
+ * instead of waiting for `dblclick`.
57
+ */
58
+ export declare function isMarkupDoublePointer(previous: {
59
+ t: number;
60
+ x: number;
61
+ y: number;
62
+ } | undefined, next: {
63
+ t: number;
64
+ x: number;
65
+ y: number;
66
+ }): boolean;
67
+ /**
68
+ * Makes a markup capsule / callout label content-editable until the user
69
+ * commits or cancels.
70
+ *
71
+ * Enter (or blur) commits; Escape cancels and restores {@link AcApMarkupHtmlTextEditOptions.initialText}.
72
+ * Shift+Enter inserts a newline when {@link AcApMarkupHtmlTextEditOptions.multiline} is true.
73
+ *
74
+ * @returns Trimmed text on commit, or `undefined` when the user presses Escape.
75
+ */
76
+ export declare function editMarkupHtmlText(options: AcApMarkupHtmlTextEditOptions): Promise<string | undefined>;
77
+ /**
78
+ * Binds in-place text editing on a markup capsule or callout label.
79
+ *
80
+ * Starts on a timed double pointer-down (native `dblclick` is unreliable
81
+ * on these overlays). Enter commits; Escape cancels. Shift+Enter inserts a
82
+ * newline when {@link AcApMarkupInlineTextEditOptions.multiline} is true.
83
+ *
84
+ * @param options - Bind options.
85
+ * @returns Function that cancels an in-progress edit and unbinds listeners.
86
+ */
87
+ export declare function bindMarkupInlineTextEdit(options: AcApMarkupInlineTextEditOptions): () => void;
88
+ //# sourceMappingURL=AcApMarkupTextEdit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMarkupTextEdit.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupTextEdit.ts"],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