@mlightcad/cad-simple-viewer 1.8.0-preview.2 → 1.8.0-preview.4

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 (668) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +206 -204
  3. package/dist/cad-simple-viewer-AcApSimpleUiChrome-D_0b6okm.js +890 -0
  4. package/dist/cad-simple-viewer-AcApSimpleUiChrome-DcZiBNvh.js +1 -0
  5. package/dist/cad-simple-viewer-AcUiFileOpenSession-AGSCe0Nv.js +324 -0
  6. package/dist/{cad-simple-viewer-AcUiFileOpenSession-BCcqBAH9.js → cad-simple-viewer-AcUiFileOpenSession-Bo3U3wCu.js} +707 -167
  7. package/dist/cad-simple-viewer-file-open-panel.js +26 -24
  8. package/dist/cad-simple-viewer-file-open-panel.umd.cjs +1 -1
  9. package/dist/cad-simple-viewer.js +64100 -41238
  10. package/dist/cad-simple-viewer.umd.cjs +1659 -497
  11. package/dist/mtext-renderer-worker.js +4 -5
  12. package/file-open-panel.ts +6 -6
  13. package/icons.ts +7 -7
  14. package/lib/app/AcApClipboard.d.ts +97 -0
  15. package/lib/app/AcApClipboard.d.ts.map +1 -0
  16. package/lib/app/AcApClipboard.js +270 -0
  17. package/lib/app/AcApClipboard.js.map +1 -0
  18. package/lib/app/AcApContext.d.ts +10 -0
  19. package/lib/app/AcApContext.d.ts.map +1 -1
  20. package/lib/app/AcApContext.js +24 -8
  21. package/lib/app/AcApContext.js.map +1 -1
  22. package/lib/app/AcApDocManager.d.ts +63 -0
  23. package/lib/app/AcApDocManager.d.ts.map +1 -1
  24. package/lib/app/AcApDocManager.js +264 -35
  25. package/lib/app/AcApDocManager.js.map +1 -1
  26. package/lib/app/AcApDocument.d.ts.map +1 -1
  27. package/lib/app/AcApDocument.js +11 -11
  28. package/lib/app/AcApDocument.js.map +1 -1
  29. package/lib/app/AcApOpenFileDialog.d.ts +2 -2
  30. package/lib/app/AcApOpenFileDialog.js +2 -2
  31. package/lib/app/AcApPaletteService.d.ts +154 -0
  32. package/lib/app/AcApPaletteService.d.ts.map +1 -0
  33. package/lib/app/AcApPaletteService.js +327 -0
  34. package/lib/app/AcApPaletteService.js.map +1 -0
  35. package/lib/app/acapHealModelLayoutLink.d.ts +30 -0
  36. package/lib/app/acapHealModelLayoutLink.d.ts.map +1 -0
  37. package/lib/app/acapHealModelLayoutLink.js +192 -0
  38. package/lib/app/acapHealModelLayoutLink.js.map +1 -0
  39. package/lib/app/dataSource/AcApLocalDataSource.d.ts +1 -1
  40. package/lib/app/dataSource/AcApLocalDataSource.js +2 -2
  41. package/lib/app/dataSource/AcApLocalDataSource.js.map +1 -1
  42. package/lib/app/dataSource/AcApUrlDataSource.js +1 -1
  43. package/lib/app/dataSource/AcApUrlDataSource.js.map +1 -1
  44. package/lib/app/index.d.ts +2 -0
  45. package/lib/app/index.d.ts.map +1 -1
  46. package/lib/app/index.js +2 -0
  47. package/lib/app/index.js.map +1 -1
  48. package/lib/command/AcApShortCutToolbarDocBind.d.ts.map +1 -1
  49. package/lib/command/AcApShortCutToolbarDocBind.js +30 -3
  50. package/lib/command/AcApShortCutToolbarDocBind.js.map +1 -1
  51. package/lib/command/AcApUcsCmd.d.ts +26 -0
  52. package/lib/command/AcApUcsCmd.d.ts.map +1 -0
  53. package/lib/command/AcApUcsCmd.js +545 -0
  54. package/lib/command/AcApUcsCmd.js.map +1 -0
  55. package/lib/command/AcApViewRestoreCmd.d.ts +13 -0
  56. package/lib/command/AcApViewRestoreCmd.d.ts.map +1 -0
  57. package/lib/command/AcApViewRestoreCmd.js +101 -0
  58. package/lib/command/AcApViewRestoreCmd.js.map +1 -0
  59. package/lib/command/block/AcApDashBSearchCmd.d.ts +57 -0
  60. package/lib/command/block/AcApDashBSearchCmd.d.ts.map +1 -0
  61. package/lib/command/block/AcApDashBSearchCmd.js +618 -0
  62. package/lib/command/block/AcApDashBSearchCmd.js.map +1 -0
  63. package/lib/command/block/index.d.ts +2 -0
  64. package/lib/command/block/index.d.ts.map +1 -0
  65. package/lib/command/block/index.js +2 -0
  66. package/lib/command/block/index.js.map +1 -0
  67. package/lib/command/clipboard/AcApClipboardUtils.d.ts +61 -0
  68. package/lib/command/clipboard/AcApClipboardUtils.d.ts.map +1 -0
  69. package/lib/command/clipboard/AcApClipboardUtils.js +203 -0
  70. package/lib/command/clipboard/AcApClipboardUtils.js.map +1 -0
  71. package/lib/command/clipboard/AcApCopyBaseCmd.d.ts +13 -0
  72. package/lib/command/clipboard/AcApCopyBaseCmd.d.ts.map +1 -0
  73. package/lib/command/clipboard/AcApCopyBaseCmd.js +95 -0
  74. package/lib/command/clipboard/AcApCopyBaseCmd.js.map +1 -0
  75. package/lib/command/clipboard/AcApCopyClipCmd.d.ts +15 -0
  76. package/lib/command/clipboard/AcApCopyClipCmd.d.ts.map +1 -0
  77. package/lib/command/clipboard/AcApCopyClipCmd.js +85 -0
  78. package/lib/command/clipboard/AcApCopyClipCmd.js.map +1 -0
  79. package/lib/command/clipboard/AcApCutClipCmd.d.ts +11 -0
  80. package/lib/command/clipboard/AcApCutClipCmd.d.ts.map +1 -0
  81. package/lib/command/clipboard/AcApCutClipCmd.js +91 -0
  82. package/lib/command/clipboard/AcApCutClipCmd.js.map +1 -0
  83. package/lib/command/clipboard/AcApPasteBlockCmd.d.ts +23 -0
  84. package/lib/command/clipboard/AcApPasteBlockCmd.d.ts.map +1 -0
  85. package/lib/command/clipboard/AcApPasteBlockCmd.js +127 -0
  86. package/lib/command/clipboard/AcApPasteBlockCmd.js.map +1 -0
  87. package/lib/command/clipboard/AcApPasteClipCmd.d.ts +14 -0
  88. package/lib/command/clipboard/AcApPasteClipCmd.d.ts.map +1 -0
  89. package/lib/command/clipboard/AcApPasteClipCmd.js +100 -0
  90. package/lib/command/clipboard/AcApPasteClipCmd.js.map +1 -0
  91. package/lib/command/clipboard/AcApPasteOrigCmd.d.ts +15 -0
  92. package/lib/command/clipboard/AcApPasteOrigCmd.d.ts.map +1 -0
  93. package/lib/command/clipboard/AcApPasteOrigCmd.js +99 -0
  94. package/lib/command/clipboard/AcApPasteOrigCmd.js.map +1 -0
  95. package/lib/command/clipboard/AcApPastePreviewJig.d.ts +37 -0
  96. package/lib/command/clipboard/AcApPastePreviewJig.d.ts.map +1 -0
  97. package/lib/command/clipboard/AcApPastePreviewJig.js +87 -0
  98. package/lib/command/clipboard/AcApPastePreviewJig.js.map +1 -0
  99. package/lib/command/clipboard/index.d.ts +9 -0
  100. package/lib/command/clipboard/index.d.ts.map +1 -0
  101. package/lib/command/clipboard/index.js +9 -0
  102. package/lib/command/clipboard/index.js.map +1 -0
  103. package/lib/command/convert/AcApBlockPreviewConvertor.d.ts +8 -0
  104. package/lib/command/convert/AcApBlockPreviewConvertor.d.ts.map +1 -1
  105. package/lib/command/convert/AcApBlockPreviewConvertor.js +16 -0
  106. package/lib/command/convert/AcApBlockPreviewConvertor.js.map +1 -1
  107. package/lib/command/convert/AcApEntityPreviewConvertor.d.ts +32 -0
  108. package/lib/command/convert/AcApEntityPreviewConvertor.d.ts.map +1 -1
  109. package/lib/command/convert/AcApEntityPreviewConvertor.js +70 -14
  110. package/lib/command/convert/AcApEntityPreviewConvertor.js.map +1 -1
  111. package/lib/command/draw/AcApDimBlockUtil.d.ts +7 -0
  112. package/lib/command/draw/AcApDimBlockUtil.d.ts.map +1 -1
  113. package/lib/command/draw/AcApDimBlockUtil.js +16 -54
  114. package/lib/command/draw/AcApDimBlockUtil.js.map +1 -1
  115. package/lib/command/draw/AcApLeaderCmd.d.ts +49 -0
  116. package/lib/command/draw/AcApLeaderCmd.d.ts.map +1 -0
  117. package/lib/command/draw/AcApLeaderCmd.js +611 -0
  118. package/lib/command/draw/AcApLeaderCmd.js.map +1 -0
  119. package/lib/command/draw/AcApMLeaderCmd.d.ts +41 -0
  120. package/lib/command/draw/AcApMLeaderCmd.d.ts.map +1 -0
  121. package/lib/command/draw/AcApMLeaderCmd.js +632 -0
  122. package/lib/command/draw/AcApMLeaderCmd.js.map +1 -0
  123. package/lib/command/draw/AcApMLeaderCmdUtil.d.ts +137 -0
  124. package/lib/command/draw/AcApMLeaderCmdUtil.d.ts.map +1 -0
  125. package/lib/command/draw/AcApMLeaderCmdUtil.js +411 -0
  126. package/lib/command/draw/AcApMLeaderCmdUtil.js.map +1 -0
  127. package/lib/command/draw/AcApMLeaderEditCmd.d.ts +13 -0
  128. package/lib/command/draw/AcApMLeaderEditCmd.d.ts.map +1 -0
  129. package/lib/command/draw/AcApMLeaderEditCmd.js +245 -0
  130. package/lib/command/draw/AcApMLeaderEditCmd.js.map +1 -0
  131. package/lib/command/draw/acedRenderDimStylePreview.d.ts +7 -0
  132. package/lib/command/draw/acedRenderDimStylePreview.d.ts.map +1 -0
  133. package/lib/command/draw/acedRenderDimStylePreview.js +141 -0
  134. package/lib/command/draw/acedRenderDimStylePreview.js.map +1 -0
  135. package/lib/command/draw/dimStylePreview.d.ts +62 -0
  136. package/lib/command/draw/dimStylePreview.d.ts.map +1 -0
  137. package/lib/command/draw/dimStylePreview.js +723 -0
  138. package/lib/command/draw/dimStylePreview.js.map +1 -0
  139. package/lib/command/draw/index.d.ts +6 -0
  140. package/lib/command/draw/index.d.ts.map +1 -1
  141. package/lib/command/draw/index.js +6 -0
  142. package/lib/command/draw/index.js.map +1 -1
  143. package/lib/command/group/AcApDashGroupCmd.d.ts +18 -0
  144. package/lib/command/group/AcApDashGroupCmd.d.ts.map +1 -0
  145. package/lib/command/group/AcApDashGroupCmd.js +457 -0
  146. package/lib/command/group/AcApDashGroupCmd.js.map +1 -0
  147. package/lib/command/group/AcApGroupCmd.d.ts +18 -0
  148. package/lib/command/group/AcApGroupCmd.d.ts.map +1 -0
  149. package/lib/command/group/AcApGroupCmd.js +253 -0
  150. package/lib/command/group/AcApGroupCmd.js.map +1 -0
  151. package/lib/command/group/AcApGroupEditCmd.d.ts +14 -0
  152. package/lib/command/group/AcApGroupEditCmd.d.ts.map +1 -0
  153. package/lib/command/group/AcApGroupEditCmd.js +241 -0
  154. package/lib/command/group/AcApGroupEditCmd.js.map +1 -0
  155. package/lib/command/group/AcApUngroupCmd.d.ts +20 -0
  156. package/lib/command/group/AcApUngroupCmd.d.ts.map +1 -0
  157. package/lib/command/group/AcApUngroupCmd.js +249 -0
  158. package/lib/command/group/AcApUngroupCmd.js.map +1 -0
  159. package/lib/command/group/index.d.ts +5 -0
  160. package/lib/command/group/index.d.ts.map +1 -0
  161. package/lib/command/group/index.js +5 -0
  162. package/lib/command/group/index.js.map +1 -0
  163. package/lib/command/index.d.ts +5 -0
  164. package/lib/command/index.d.ts.map +1 -1
  165. package/lib/command/index.js +5 -0
  166. package/lib/command/index.js.map +1 -1
  167. package/lib/command/markup/AcApMarkupSessionBootstrap.d.ts +9 -1
  168. package/lib/command/markup/AcApMarkupSessionBootstrap.d.ts.map +1 -1
  169. package/lib/command/markup/AcApMarkupSessionBootstrap.js +21 -7
  170. package/lib/command/markup/AcApMarkupSessionBootstrap.js.map +1 -1
  171. package/lib/command/markup/index.d.ts +1 -1
  172. package/lib/command/markup/index.d.ts.map +1 -1
  173. package/lib/command/markup/index.js +4 -2
  174. package/lib/command/markup/index.js.map +1 -1
  175. package/lib/command/measure/AcApMeasureArcCmd.d.ts +7 -0
  176. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
  177. package/lib/command/measure/AcApMeasureArcCmd.js +183 -73
  178. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
  179. package/lib/command/measure/AcApMeasureArcLock.d.ts +23 -1
  180. package/lib/command/measure/AcApMeasureArcLock.d.ts.map +1 -1
  181. package/lib/command/measure/AcApMeasureArcLock.js +57 -1
  182. package/lib/command/measure/AcApMeasureArcLock.js.map +1 -1
  183. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +3 -1
  184. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -1
  185. package/lib/command/measure/entity/AcApMeasureDrawUtil.js +44 -4
  186. package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -1
  187. package/lib/command/modify/AcApScaleCmd.d.ts +115 -0
  188. package/lib/command/modify/AcApScaleCmd.d.ts.map +1 -0
  189. package/lib/command/modify/AcApScaleCmd.js +347 -0
  190. package/lib/command/modify/AcApScaleCmd.js.map +1 -0
  191. package/lib/command/modify/AcApScalePreviewJig.d.ts +56 -0
  192. package/lib/command/modify/AcApScalePreviewJig.d.ts.map +1 -0
  193. package/lib/command/modify/AcApScalePreviewJig.js +115 -0
  194. package/lib/command/modify/AcApScalePreviewJig.js.map +1 -0
  195. package/lib/command/modify/index.d.ts +1 -0
  196. package/lib/command/modify/index.d.ts.map +1 -1
  197. package/lib/command/modify/index.js +1 -0
  198. package/lib/command/modify/index.js.map +1 -1
  199. package/lib/command/ui/AcApFindUiCmd.d.ts +26 -0
  200. package/lib/command/ui/AcApFindUiCmd.d.ts.map +1 -0
  201. package/lib/command/ui/AcApFindUiCmd.js +83 -0
  202. package/lib/command/ui/AcApFindUiCmd.js.map +1 -0
  203. package/lib/command/ui/AcApLayerUiCmd.d.ts +65 -0
  204. package/lib/command/ui/AcApLayerUiCmd.d.ts.map +1 -0
  205. package/lib/command/ui/AcApLayerUiCmd.js +142 -0
  206. package/lib/command/ui/AcApLayerUiCmd.js.map +1 -0
  207. package/lib/command/ui/AcApMarkupPanelUiCmd.d.ts +26 -0
  208. package/lib/command/ui/AcApMarkupPanelUiCmd.d.ts.map +1 -0
  209. package/lib/command/ui/AcApMarkupPanelUiCmd.js +83 -0
  210. package/lib/command/ui/AcApMarkupPanelUiCmd.js.map +1 -0
  211. package/lib/command/ui/AcApMeasurementPanelUiCmd.d.ts +26 -0
  212. package/lib/command/ui/AcApMeasurementPanelUiCmd.d.ts.map +1 -0
  213. package/lib/command/ui/AcApMeasurementPanelUiCmd.js +83 -0
  214. package/lib/command/ui/AcApMeasurementPanelUiCmd.js.map +1 -0
  215. package/lib/command/ui/index.d.ts +5 -0
  216. package/lib/command/ui/index.d.ts.map +1 -0
  217. package/lib/command/ui/index.js +5 -0
  218. package/lib/command/ui/index.js.map +1 -0
  219. package/lib/editor/grip/AcEdGripEditSession.d.ts +13 -0
  220. package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -1
  221. package/lib/editor/grip/AcEdGripEditSession.js +44 -9
  222. package/lib/editor/grip/AcEdGripEditSession.js.map +1 -1
  223. package/lib/editor/grip/AcEdGripManager.d.ts +21 -1
  224. package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -1
  225. package/lib/editor/grip/AcEdGripManager.js +204 -22
  226. package/lib/editor/grip/AcEdGripManager.js.map +1 -1
  227. package/lib/editor/grip/AcEdGripPreviewJig.d.ts +7 -0
  228. package/lib/editor/grip/AcEdGripPreviewJig.d.ts.map +1 -1
  229. package/lib/editor/grip/AcEdGripPreviewJig.js +18 -1
  230. package/lib/editor/grip/AcEdGripPreviewJig.js.map +1 -1
  231. package/lib/editor/grip/AcEdGripViewport.d.ts +35 -0
  232. package/lib/editor/grip/AcEdGripViewport.d.ts.map +1 -0
  233. package/lib/editor/grip/AcEdGripViewport.js +68 -0
  234. package/lib/editor/grip/AcEdGripViewport.js.map +1 -0
  235. package/lib/editor/grip/AcEdGroupGripEditSession.d.ts +24 -0
  236. package/lib/editor/grip/AcEdGroupGripEditSession.d.ts.map +1 -0
  237. package/lib/editor/grip/AcEdGroupGripEditSession.js +76 -0
  238. package/lib/editor/grip/AcEdGroupGripEditSession.js.map +1 -0
  239. package/lib/editor/grip/AcEdGroupGripPolicy.d.ts +46 -0
  240. package/lib/editor/grip/AcEdGroupGripPolicy.d.ts.map +1 -0
  241. package/lib/editor/grip/AcEdGroupGripPolicy.js +187 -0
  242. package/lib/editor/grip/AcEdGroupGripPolicy.js.map +1 -0
  243. package/lib/editor/grip/index.d.ts +3 -0
  244. package/lib/editor/grip/index.d.ts.map +1 -1
  245. package/lib/editor/grip/index.js +3 -0
  246. package/lib/editor/grip/index.js.map +1 -1
  247. package/lib/editor/input/AcEdOrthoMode.d.ts +2 -2
  248. package/lib/editor/input/AcEdOrthoMode.d.ts.map +1 -1
  249. package/lib/editor/input/AcEdOrthoMode.js +20 -7
  250. package/lib/editor/input/AcEdOrthoMode.js.map +1 -1
  251. package/lib/editor/input/AcEdOsnapCenterMarks.d.ts +16 -0
  252. package/lib/editor/input/AcEdOsnapCenterMarks.d.ts.map +1 -1
  253. package/lib/editor/input/AcEdOsnapCenterMarks.js +24 -3
  254. package/lib/editor/input/AcEdOsnapCenterMarks.js.map +1 -1
  255. package/lib/editor/input/AcEdOsnapResolver.d.ts +0 -1
  256. package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -1
  257. package/lib/editor/input/AcEdOsnapResolver.js +3 -16
  258. package/lib/editor/input/AcEdOsnapResolver.js.map +1 -1
  259. package/lib/editor/input/AcEdPolarTracking.d.ts.map +1 -1
  260. package/lib/editor/input/AcEdPolarTracking.js +16 -10
  261. package/lib/editor/input/AcEdPolarTracking.js.map +1 -1
  262. package/lib/editor/input/handler/AcEdPointHandler.d.ts +1 -1
  263. package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -1
  264. package/lib/editor/input/handler/AcEdPointHandler.js +36 -16
  265. package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -1
  266. package/lib/editor/input/prompt/AcEdPromptSelectionOptions.d.ts +12 -0
  267. package/lib/editor/input/prompt/AcEdPromptSelectionOptions.d.ts.map +1 -1
  268. package/lib/editor/input/prompt/AcEdPromptSelectionOptions.js +20 -0
  269. package/lib/editor/input/prompt/AcEdPromptSelectionOptions.js.map +1 -1
  270. package/lib/editor/input/ui/AcEdCommandLine.d.ts +5 -0
  271. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  272. package/lib/editor/input/ui/AcEdCommandLine.js +33 -5
  273. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  274. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  275. package/lib/editor/input/ui/AcEdInputManager.js +30 -7
  276. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  277. package/lib/editor/view/AcEdBaseView.d.ts +47 -0
  278. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  279. package/lib/editor/view/AcEdBaseView.js +80 -0
  280. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  281. package/lib/editor/view/AcEdSelectionBoxIntersect.d.ts +40 -4
  282. package/lib/editor/view/AcEdSelectionBoxIntersect.d.ts.map +1 -1
  283. package/lib/editor/view/AcEdSelectionBoxIntersect.js +199 -3
  284. package/lib/editor/view/AcEdSelectionBoxIntersect.js.map +1 -1
  285. package/lib/editor/view/AcEdViewportBoxSelection.d.ts +10 -0
  286. package/lib/editor/view/AcEdViewportBoxSelection.d.ts.map +1 -1
  287. package/lib/editor/view/AcEdViewportBoxSelection.js +15 -8
  288. package/lib/editor/view/AcEdViewportBoxSelection.js.map +1 -1
  289. package/lib/file-open-panel.d.ts.map +1 -1
  290. package/lib/file-open-panel.js +4 -0
  291. package/lib/file-open-panel.js.map +1 -1
  292. package/lib/find/AcApFindNavigator.d.ts +47 -0
  293. package/lib/find/AcApFindNavigator.d.ts.map +1 -1
  294. package/lib/find/AcApFindNavigator.js +13 -5
  295. package/lib/find/AcApFindNavigator.js.map +1 -1
  296. package/lib/find/findDrawing.d.ts +1 -1
  297. package/lib/find/findDrawing.d.ts.map +1 -1
  298. package/lib/find/findDrawing.js +4 -3
  299. package/lib/find/findDrawing.js.map +1 -1
  300. package/lib/find/findText.d.ts +40 -13
  301. package/lib/find/findText.d.ts.map +1 -1
  302. package/lib/find/findText.js +100 -44
  303. package/lib/find/findText.js.map +1 -1
  304. package/lib/find/index.d.ts +8 -0
  305. package/lib/find/index.d.ts.map +1 -1
  306. package/lib/find/index.js +8 -0
  307. package/lib/find/index.js.map +1 -1
  308. package/lib/i18n/AcApI18n.d.ts +1 -1
  309. package/lib/i18n/AcApI18n.d.ts.map +1 -1
  310. package/lib/i18n/AcApI18n.js +2 -0
  311. package/lib/i18n/AcApI18n.js.map +1 -1
  312. package/lib/i18n/AcUiI18n.d.ts +23 -0
  313. package/lib/i18n/AcUiI18n.d.ts.map +1 -0
  314. package/lib/i18n/AcUiI18n.js +126 -0
  315. package/lib/i18n/AcUiI18n.js.map +1 -0
  316. package/lib/i18n/ar/command.d.ts +103 -6
  317. package/lib/i18n/ar/command.d.ts.map +1 -1
  318. package/lib/i18n/ar/command.js +601 -11
  319. package/lib/i18n/ar/command.js.map +1 -1
  320. package/lib/i18n/ar/jig.d.ts +1423 -579
  321. package/lib/i18n/ar/jig.d.ts.map +1 -1
  322. package/lib/i18n/ar/jig.js +2096 -322
  323. package/lib/i18n/ar/jig.js.map +1 -1
  324. package/lib/i18n/ar/main.d.ts +22 -0
  325. package/lib/i18n/ar/main.d.ts.map +1 -1
  326. package/lib/i18n/ar/main.js +22 -0
  327. package/lib/i18n/ar/main.js.map +1 -1
  328. package/lib/i18n/ar/simpleUi.d.ts +170 -0
  329. package/lib/i18n/ar/simpleUi.d.ts.map +1 -0
  330. package/lib/i18n/ar/simpleUi.js +169 -0
  331. package/lib/i18n/ar/simpleUi.js.map +1 -0
  332. package/lib/i18n/cs/command.d.ts +111 -1
  333. package/lib/i18n/cs/command.d.ts.map +1 -1
  334. package/lib/i18n/cs/command.js +112 -2
  335. package/lib/i18n/cs/command.js.map +1 -1
  336. package/lib/i18n/cs/jig.d.ts +867 -0
  337. package/lib/i18n/cs/jig.d.ts.map +1 -1
  338. package/lib/i18n/cs/jig.js +988 -24
  339. package/lib/i18n/cs/jig.js.map +1 -1
  340. package/lib/i18n/cs/main.d.ts +22 -0
  341. package/lib/i18n/cs/main.d.ts.map +1 -1
  342. package/lib/i18n/cs/main.js +23 -1
  343. package/lib/i18n/cs/main.js.map +1 -1
  344. package/lib/i18n/cs/simpleUi.d.ts +170 -0
  345. package/lib/i18n/cs/simpleUi.d.ts.map +1 -0
  346. package/lib/i18n/cs/simpleUi.js +169 -0
  347. package/lib/i18n/cs/simpleUi.js.map +1 -0
  348. package/lib/i18n/en/command.d.ts +98 -1
  349. package/lib/i18n/en/command.d.ts.map +1 -1
  350. package/lib/i18n/en/command.js +99 -2
  351. package/lib/i18n/en/command.js.map +1 -1
  352. package/lib/i18n/en/jig.d.ts +844 -0
  353. package/lib/i18n/en/jig.d.ts.map +1 -1
  354. package/lib/i18n/en/jig.js +801 -1
  355. package/lib/i18n/en/jig.js.map +1 -1
  356. package/lib/i18n/en/main.d.ts +22 -0
  357. package/lib/i18n/en/main.d.ts.map +1 -1
  358. package/lib/i18n/en/main.js +22 -0
  359. package/lib/i18n/en/main.js.map +1 -1
  360. package/lib/i18n/en/simpleUi.d.ts +170 -0
  361. package/lib/i18n/en/simpleUi.d.ts.map +1 -0
  362. package/lib/i18n/en/simpleUi.js +169 -0
  363. package/lib/i18n/en/simpleUi.js.map +1 -0
  364. package/lib/i18n/index.d.ts +1 -0
  365. package/lib/i18n/index.d.ts.map +1 -1
  366. package/lib/i18n/index.js +37 -6
  367. package/lib/i18n/index.js.map +1 -1
  368. package/lib/i18n/ja/command.d.ts +605 -0
  369. package/lib/i18n/ja/command.d.ts.map +1 -0
  370. package/lib/i18n/ja/command.js +604 -0
  371. package/lib/i18n/ja/command.js.map +1 -0
  372. package/lib/i18n/ja/jig.d.ts +2425 -0
  373. package/lib/i18n/ja/jig.d.ts.map +1 -0
  374. package/lib/i18n/ja/jig.js +2316 -0
  375. package/lib/i18n/ja/jig.js.map +1 -0
  376. package/lib/i18n/ja/main.d.ts +216 -0
  377. package/lib/i18n/ja/main.d.ts.map +1 -0
  378. package/lib/i18n/ja/main.js +215 -0
  379. package/lib/i18n/ja/main.js.map +1 -0
  380. package/lib/i18n/ja/simpleUi.d.ts +170 -0
  381. package/lib/i18n/ja/simpleUi.d.ts.map +1 -0
  382. package/lib/i18n/ja/simpleUi.js +169 -0
  383. package/lib/i18n/ja/simpleUi.js.map +1 -0
  384. package/lib/i18n/ko/command.d.ts +605 -0
  385. package/lib/i18n/ko/command.d.ts.map +1 -0
  386. package/lib/i18n/ko/command.js +604 -0
  387. package/lib/i18n/ko/command.js.map +1 -0
  388. package/lib/i18n/ko/jig.d.ts +2425 -0
  389. package/lib/i18n/ko/jig.d.ts.map +1 -0
  390. package/lib/i18n/ko/jig.js +2316 -0
  391. package/lib/i18n/ko/jig.js.map +1 -0
  392. package/lib/i18n/ko/main.d.ts +216 -0
  393. package/lib/i18n/ko/main.d.ts.map +1 -0
  394. package/lib/i18n/ko/main.js +215 -0
  395. package/lib/i18n/ko/main.js.map +1 -0
  396. package/lib/i18n/ko/simpleUi.d.ts +170 -0
  397. package/lib/i18n/ko/simpleUi.d.ts.map +1 -0
  398. package/lib/i18n/ko/simpleUi.js +169 -0
  399. package/lib/i18n/ko/simpleUi.js.map +1 -0
  400. package/lib/i18n/tr/command.d.ts +111 -1
  401. package/lib/i18n/tr/command.d.ts.map +1 -1
  402. package/lib/i18n/tr/command.js +112 -2
  403. package/lib/i18n/tr/command.js.map +1 -1
  404. package/lib/i18n/tr/jig.d.ts +867 -0
  405. package/lib/i18n/tr/jig.d.ts.map +1 -1
  406. package/lib/i18n/tr/jig.js +1096 -24
  407. package/lib/i18n/tr/jig.js.map +1 -1
  408. package/lib/i18n/tr/main.d.ts +22 -0
  409. package/lib/i18n/tr/main.d.ts.map +1 -1
  410. package/lib/i18n/tr/main.js +23 -1
  411. package/lib/i18n/tr/main.js.map +1 -1
  412. package/lib/i18n/tr/simpleUi.d.ts +170 -0
  413. package/lib/i18n/tr/simpleUi.d.ts.map +1 -0
  414. package/lib/i18n/tr/simpleUi.js +169 -0
  415. package/lib/i18n/tr/simpleUi.js.map +1 -0
  416. package/lib/i18n/zh/command.d.ts +98 -1
  417. package/lib/i18n/zh/command.d.ts.map +1 -1
  418. package/lib/i18n/zh/command.js +99 -2
  419. package/lib/i18n/zh/command.js.map +1 -1
  420. package/lib/i18n/zh/jig.d.ts +844 -0
  421. package/lib/i18n/zh/jig.d.ts.map +1 -1
  422. package/lib/i18n/zh/jig.js +793 -1
  423. package/lib/i18n/zh/jig.js.map +1 -1
  424. package/lib/i18n/zh/main.d.ts +22 -0
  425. package/lib/i18n/zh/main.d.ts.map +1 -1
  426. package/lib/i18n/zh/main.js +22 -0
  427. package/lib/i18n/zh/main.js.map +1 -1
  428. package/lib/i18n/zh/simpleUi.d.ts +170 -0
  429. package/lib/i18n/zh/simpleUi.d.ts.map +1 -0
  430. package/lib/i18n/zh/simpleUi.js +169 -0
  431. package/lib/i18n/zh/simpleUi.js.map +1 -0
  432. package/lib/index.d.ts +1 -1
  433. package/lib/index.d.ts.map +1 -1
  434. package/lib/index.js +1 -1
  435. package/lib/index.js.map +1 -1
  436. package/lib/service/AcApEntityService.d.ts +36 -2
  437. package/lib/service/AcApEntityService.d.ts.map +1 -1
  438. package/lib/service/AcApEntityService.js +92 -23
  439. package/lib/service/AcApEntityService.js.map +1 -1
  440. package/lib/service/AcApGroup.d.ts +95 -0
  441. package/lib/service/AcApGroup.d.ts.map +1 -0
  442. package/lib/service/AcApGroup.js +421 -0
  443. package/lib/service/AcApGroup.js.map +1 -0
  444. package/lib/service/AcApLlmSettingsService.d.ts +74 -0
  445. package/lib/service/AcApLlmSettingsService.d.ts.map +1 -0
  446. package/lib/service/AcApLlmSettingsService.js +126 -0
  447. package/lib/service/AcApLlmSettingsService.js.map +1 -0
  448. package/lib/service/AcApNamedViewService.d.ts +139 -0
  449. package/lib/service/AcApNamedViewService.d.ts.map +1 -0
  450. package/lib/service/AcApNamedViewService.js +407 -0
  451. package/lib/service/AcApNamedViewService.js.map +1 -0
  452. package/lib/service/AcApTextRecognitionService.d.ts +107 -0
  453. package/lib/service/AcApTextRecognitionService.d.ts.map +1 -0
  454. package/lib/service/AcApTextRecognitionService.js +304 -0
  455. package/lib/service/AcApTextRecognitionService.js.map +1 -0
  456. package/lib/service/AcApUcsService.d.ts +101 -0
  457. package/lib/service/AcApUcsService.d.ts.map +1 -0
  458. package/lib/service/AcApUcsService.js +753 -0
  459. package/lib/service/AcApUcsService.js.map +1 -0
  460. package/lib/service/index.d.ts +5 -0
  461. package/lib/service/index.d.ts.map +1 -1
  462. package/lib/service/index.js +5 -0
  463. package/lib/service/index.js.map +1 -1
  464. package/lib/smartBlock/AcApSmartBlockConvert.d.ts +98 -0
  465. package/lib/smartBlock/AcApSmartBlockConvert.d.ts.map +1 -0
  466. package/lib/smartBlock/AcApSmartBlockConvert.js +300 -0
  467. package/lib/smartBlock/AcApSmartBlockConvert.js.map +1 -0
  468. package/lib/smartBlock/AcApSmartBlockDetect.d.ts +149 -0
  469. package/lib/smartBlock/AcApSmartBlockDetect.d.ts.map +1 -0
  470. package/lib/smartBlock/AcApSmartBlockDetect.js +1464 -0
  471. package/lib/smartBlock/AcApSmartBlockDetect.js.map +1 -0
  472. package/lib/smartBlock/AcApSmartBlockSearch.d.ts +161 -0
  473. package/lib/smartBlock/AcApSmartBlockSearch.d.ts.map +1 -0
  474. package/lib/smartBlock/AcApSmartBlockSearch.js +712 -0
  475. package/lib/smartBlock/AcApSmartBlockSearch.js.map +1 -0
  476. package/lib/smartBlock/AcApSmartBlockSession.d.ts +85 -0
  477. package/lib/smartBlock/AcApSmartBlockSession.d.ts.map +1 -0
  478. package/lib/smartBlock/AcApSmartBlockSession.js +233 -0
  479. package/lib/smartBlock/AcApSmartBlockSession.js.map +1 -0
  480. package/lib/smartBlock/AcEdShapeFeatures.d.ts +33 -0
  481. package/lib/smartBlock/AcEdShapeFeatures.d.ts.map +1 -0
  482. package/lib/smartBlock/AcEdShapeFeatures.js +571 -0
  483. package/lib/smartBlock/AcEdShapeFeatures.js.map +1 -0
  484. package/lib/smartBlock/AcEdShapeMatcher.d.ts +146 -0
  485. package/lib/smartBlock/AcEdShapeMatcher.d.ts.map +1 -0
  486. package/lib/smartBlock/AcEdShapeMatcher.js +749 -0
  487. package/lib/smartBlock/AcEdShapeMatcher.js.map +1 -0
  488. package/lib/smartBlock/index.d.ts +7 -0
  489. package/lib/smartBlock/index.d.ts.map +1 -0
  490. package/lib/smartBlock/index.js +7 -0
  491. package/lib/smartBlock/index.js.map +1 -0
  492. package/lib/ui/AcApSimpleUiChrome.d.ts +374 -0
  493. package/lib/ui/AcApSimpleUiChrome.d.ts.map +1 -0
  494. package/lib/ui/AcApSimpleUiChrome.js +1308 -0
  495. package/lib/ui/AcApSimpleUiChrome.js.map +1 -0
  496. package/lib/ui/AcUiColorPicker.d.ts +47 -0
  497. package/lib/ui/AcUiColorPicker.d.ts.map +1 -0
  498. package/lib/ui/AcUiColorPicker.js +133 -0
  499. package/lib/ui/AcUiColorPicker.js.map +1 -0
  500. package/lib/ui/AcUiFileOpenPanel.js +1 -1
  501. package/lib/ui/AcUiFileOpenPanel.js.map +1 -1
  502. package/lib/ui/AcUiFindPaletteView.d.ts +99 -0
  503. package/lib/ui/AcUiFindPaletteView.d.ts.map +1 -0
  504. package/lib/ui/AcUiFindPaletteView.js +426 -0
  505. package/lib/ui/AcUiFindPaletteView.js.map +1 -0
  506. package/lib/ui/AcUiLayerListView.d.ts +114 -0
  507. package/lib/ui/AcUiLayerListView.d.ts.map +1 -0
  508. package/lib/ui/AcUiLayerListView.js +443 -0
  509. package/lib/ui/AcUiLayerListView.js.map +1 -0
  510. package/lib/ui/AcUiMeasurementPaletteView.d.ts +83 -0
  511. package/lib/ui/AcUiMeasurementPaletteView.d.ts.map +1 -0
  512. package/lib/ui/AcUiMeasurementPaletteView.js +341 -0
  513. package/lib/ui/AcUiMeasurementPaletteView.js.map +1 -0
  514. package/lib/ui/AcUiReviewPaletteView.d.ts +141 -0
  515. package/lib/ui/AcUiReviewPaletteView.d.ts.map +1 -0
  516. package/lib/ui/AcUiReviewPaletteView.js +524 -0
  517. package/lib/ui/AcUiReviewPaletteView.js.map +1 -0
  518. package/lib/ui/AcUiShortCutToolbar.d.ts +24 -2
  519. package/lib/ui/AcUiShortCutToolbar.d.ts.map +1 -1
  520. package/lib/ui/AcUiShortCutToolbar.js +48 -6
  521. package/lib/ui/AcUiShortCutToolbar.js.map +1 -1
  522. package/lib/ui/AcUiSimpleUiOptions.d.ts +88 -0
  523. package/lib/ui/AcUiSimpleUiOptions.d.ts.map +1 -0
  524. package/lib/ui/AcUiSimpleUiOptions.js +2 -0
  525. package/lib/ui/AcUiSimpleUiOptions.js.map +1 -0
  526. package/lib/ui/AcUiSimpleUiStyles.d.ts +12 -0
  527. package/lib/ui/AcUiSimpleUiStyles.d.ts.map +1 -0
  528. package/lib/ui/AcUiSimpleUiStyles.js +28 -0
  529. package/lib/ui/AcUiSimpleUiStyles.js.map +1 -0
  530. package/lib/ui/AcUiThemeSync.d.ts +58 -0
  531. package/lib/ui/AcUiThemeSync.d.ts.map +1 -0
  532. package/lib/ui/AcUiThemeSync.js +114 -0
  533. package/lib/ui/AcUiThemeSync.js.map +1 -0
  534. package/lib/ui/acuiNormalizeSimpleUiOptions.d.ts +20 -0
  535. package/lib/ui/acuiNormalizeSimpleUiOptions.d.ts.map +1 -0
  536. package/lib/ui/acuiNormalizeSimpleUiOptions.js +46 -0
  537. package/lib/ui/acuiNormalizeSimpleUiOptions.js.map +1 -0
  538. package/lib/ui/dock/AcUiDockPanel.d.ts +204 -0
  539. package/lib/ui/dock/AcUiDockPanel.d.ts.map +1 -0
  540. package/lib/ui/dock/AcUiDockPanel.js +926 -0
  541. package/lib/ui/dock/AcUiDockPanel.js.map +1 -0
  542. package/lib/ui/dock/acuiDockPanelStyles.d.ts +9 -0
  543. package/lib/ui/dock/acuiDockPanelStyles.d.ts.map +1 -0
  544. package/lib/ui/dock/acuiDockPanelStyles.js +27 -0
  545. package/lib/ui/dock/acuiDockPanelStyles.js.map +1 -0
  546. package/lib/ui/dock/index.d.ts +3 -0
  547. package/lib/ui/dock/index.d.ts.map +1 -0
  548. package/lib/ui/dock/index.js +3 -0
  549. package/lib/ui/dock/index.js.map +1 -0
  550. package/lib/ui/icons.d.ts +22 -14
  551. package/lib/ui/icons.d.ts.map +1 -1
  552. package/lib/ui/icons.js +42 -32
  553. package/lib/ui/icons.js.map +1 -1
  554. package/lib/ui/index.d.ts +12 -0
  555. package/lib/ui/index.d.ts.map +1 -1
  556. package/lib/ui/index.js +11 -0
  557. package/lib/ui/index.js.map +1 -1
  558. package/lib/ui/toolbar/AcUiToolbar.d.ts +1 -1
  559. package/lib/ui/toolbar/AcUiToolbar.js +1 -1
  560. package/lib/ui/toolbar/createLayoutToolbarItem.d.ts +41 -0
  561. package/lib/ui/toolbar/createLayoutToolbarItem.d.ts.map +1 -0
  562. package/lib/ui/toolbar/createLayoutToolbarItem.js +103 -0
  563. package/lib/ui/toolbar/createLayoutToolbarItem.js.map +1 -0
  564. package/lib/ui/toolbar/createToolbarLayoutSwitcher.d.ts +40 -0
  565. package/lib/ui/toolbar/createToolbarLayoutSwitcher.d.ts.map +1 -0
  566. package/lib/ui/toolbar/createToolbarLayoutSwitcher.js +65 -0
  567. package/lib/ui/toolbar/createToolbarLayoutSwitcher.js.map +1 -0
  568. package/lib/ui/toolbar/defaultToolbarItems.d.ts +44 -0
  569. package/lib/ui/toolbar/defaultToolbarItems.d.ts.map +1 -0
  570. package/lib/ui/toolbar/defaultToolbarItems.js +614 -0
  571. package/lib/ui/toolbar/defaultToolbarItems.js.map +1 -0
  572. package/lib/ui/toolbar/index.d.ts +3 -1
  573. package/lib/ui/toolbar/index.d.ts.map +1 -1
  574. package/lib/ui/toolbar/index.js +1 -0
  575. package/lib/ui/toolbar/index.js.map +1 -1
  576. package/lib/ui/toolbar/mergeToolbarOptionsForLayout.d.ts +25 -0
  577. package/lib/ui/toolbar/mergeToolbarOptionsForLayout.d.ts.map +1 -0
  578. package/lib/ui/toolbar/mergeToolbarOptionsForLayout.js +164 -0
  579. package/lib/ui/toolbar/mergeToolbarOptionsForLayout.js.map +1 -0
  580. package/lib/ui/toolbar/resolveDockMountTarget.d.ts +22 -0
  581. package/lib/ui/toolbar/resolveDockMountTarget.d.ts.map +1 -0
  582. package/lib/ui/toolbar/resolveDockMountTarget.js +47 -0
  583. package/lib/ui/toolbar/resolveDockMountTarget.js.map +1 -0
  584. package/lib/ui/toolbar/resolveToolbarItems.d.ts +46 -0
  585. package/lib/ui/toolbar/resolveToolbarItems.d.ts.map +1 -0
  586. package/lib/ui/toolbar/resolveToolbarItems.js +161 -0
  587. package/lib/ui/toolbar/resolveToolbarItems.js.map +1 -0
  588. package/lib/ui/toolbar/resolveToolbarMountTarget.d.ts +17 -0
  589. package/lib/ui/toolbar/resolveToolbarMountTarget.d.ts.map +1 -0
  590. package/lib/ui/toolbar/resolveToolbarMountTarget.js +39 -0
  591. package/lib/ui/toolbar/resolveToolbarMountTarget.js.map +1 -0
  592. package/lib/ui/toolbar/simpleUiPresets.d.ts +15 -0
  593. package/lib/ui/toolbar/simpleUiPresets.d.ts.map +1 -0
  594. package/lib/ui/toolbar/simpleUiPresets.js +14 -0
  595. package/lib/ui/toolbar/simpleUiPresets.js.map +1 -0
  596. package/lib/ui/toolbar/types.d.ts +18 -0
  597. package/lib/ui/toolbar/types.d.ts.map +1 -1
  598. package/lib/util/AcApFontUtil.d.ts +19 -0
  599. package/lib/util/AcApFontUtil.d.ts.map +1 -1
  600. package/lib/util/AcApFontUtil.js +108 -13
  601. package/lib/util/AcApFontUtil.js.map +1 -1
  602. package/lib/util/AcApGeTransform.d.ts +8 -0
  603. package/lib/util/AcApGeTransform.d.ts.map +1 -1
  604. package/lib/util/AcApGeTransform.js +13 -0
  605. package/lib/util/AcApGeTransform.js.map +1 -1
  606. package/lib/util/AcApLayoutViewFraming.d.ts +22 -0
  607. package/lib/util/AcApLayoutViewFraming.d.ts.map +1 -1
  608. package/lib/util/AcApLayoutViewFraming.js +24 -0
  609. package/lib/util/AcApLayoutViewFraming.js.map +1 -1
  610. package/lib/util/AcApTextMeasure.d.ts +43 -0
  611. package/lib/util/AcApTextMeasure.d.ts.map +1 -0
  612. package/lib/util/AcApTextMeasure.js +82 -0
  613. package/lib/util/AcApTextMeasure.js.map +1 -0
  614. package/lib/util/acapResolveOpenFileType.d.ts +12 -0
  615. package/lib/util/acapResolveOpenFileType.d.ts.map +1 -0
  616. package/lib/util/acapResolveOpenFileType.js +22 -0
  617. package/lib/util/acapResolveOpenFileType.js.map +1 -0
  618. package/lib/util/index.d.ts +2 -0
  619. package/lib/util/index.d.ts.map +1 -1
  620. package/lib/util/index.js +2 -0
  621. package/lib/util/index.js.map +1 -1
  622. package/lib/view/AcApUcsIconOverlay.d.ts +26 -0
  623. package/lib/view/AcApUcsIconOverlay.d.ts.map +1 -0
  624. package/lib/view/AcApUcsIconOverlay.js +143 -0
  625. package/lib/view/AcApUcsIconOverlay.js.map +1 -0
  626. package/lib/view/AcEdViewKeyHandler.d.ts +11 -0
  627. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
  628. package/lib/view/AcEdViewKeyHandler.js +39 -3
  629. package/lib/view/AcEdViewKeyHandler.js.map +1 -1
  630. package/lib/view/AcTrEntityDisplayController.d.ts +5 -0
  631. package/lib/view/AcTrEntityDisplayController.d.ts.map +1 -1
  632. package/lib/view/AcTrEntityDisplayController.js +5 -0
  633. package/lib/view/AcTrEntityDisplayController.js.map +1 -1
  634. package/lib/view/AcTrLayer.d.ts +27 -0
  635. package/lib/view/AcTrLayer.d.ts.map +1 -1
  636. package/lib/view/AcTrLayer.js +40 -0
  637. package/lib/view/AcTrLayer.js.map +1 -1
  638. package/lib/view/AcTrLayout.d.ts +55 -1
  639. package/lib/view/AcTrLayout.d.ts.map +1 -1
  640. package/lib/view/AcTrLayout.js +252 -51
  641. package/lib/view/AcTrLayout.js.map +1 -1
  642. package/lib/view/AcTrLayoutView.d.ts +0 -12
  643. package/lib/view/AcTrLayoutView.d.ts.map +1 -1
  644. package/lib/view/AcTrLayoutView.js +0 -20
  645. package/lib/view/AcTrLayoutView.js.map +1 -1
  646. package/lib/view/AcTrLayoutViewManager.d.ts +6 -0
  647. package/lib/view/AcTrLayoutViewManager.d.ts.map +1 -1
  648. package/lib/view/AcTrLayoutViewManager.js +8 -0
  649. package/lib/view/AcTrLayoutViewManager.js.map +1 -1
  650. package/lib/view/AcTrScene.d.ts +12 -0
  651. package/lib/view/AcTrScene.d.ts.map +1 -1
  652. package/lib/view/AcTrScene.js +65 -16
  653. package/lib/view/AcTrScene.js.map +1 -1
  654. package/lib/view/AcTrView2d.d.ts +92 -1
  655. package/lib/view/AcTrView2d.d.ts.map +1 -1
  656. package/lib/view/AcTrView2d.js +371 -96
  657. package/lib/view/AcTrView2d.js.map +1 -1
  658. package/lib/view/AcTrViewSessionState.d.ts +5 -0
  659. package/lib/view/AcTrViewSessionState.d.ts.map +1 -1
  660. package/package.json +12 -16
  661. package/src/file-open-panel.ts +93 -89
  662. package/src/ui/icons.ts +428 -411
  663. package/dist/cad-simple-viewer-AcUiFileOpenSession-drptdOYc.js +0 -324
  664. package/find.ts +0 -7
  665. package/src/find/AcApFindNavigator.ts +0 -190
  666. package/src/find/findDrawing.ts +0 -211
  667. package/src/find/findText.ts +0 -624
  668. package/src/find/index.ts +0 -2
@@ -0,0 +1,712 @@
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 __values = (this && this.__values) || function(o) {
13
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
14
+ if (m) return m.call(o);
15
+ if (o && typeof o.length === "number") return {
16
+ next: function () {
17
+ if (o && i >= o.length) o = void 0;
18
+ return { value: o && o[i++], done: !o };
19
+ }
20
+ };
21
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
22
+ };
23
+ var __read = (this && this.__read) || function (o, n) {
24
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
25
+ if (!m) return o;
26
+ var i = m.call(o), r, ar = [], e;
27
+ try {
28
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
29
+ }
30
+ catch (error) { e = { error: error }; }
31
+ finally {
32
+ try {
33
+ if (r && !r.done && (m = i["return"])) m.call(i);
34
+ }
35
+ finally { if (e) throw e.error; }
36
+ }
37
+ return ar;
38
+ };
39
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
40
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
41
+ if (ar || !(i in from)) {
42
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
43
+ ar[i] = from[i];
44
+ }
45
+ }
46
+ return to.concat(ar || Array.prototype.slice.call(from));
47
+ };
48
+ import { AcDbBlockReference, AcGeBox2d } from '@mlightcad/data-model';
49
+ import { excludeLockedLayerIds } from '../service/AcApLockedLayer';
50
+ import { acedEntityToShapeFeature } from './AcEdShapeFeatures';
51
+ import { acedFindShapeMatches, AcEdShapeGridCache } from './AcEdShapeMatcher';
52
+ /**
53
+ * Caches entity features for one search session, so changing review
54
+ * filters does not describe the whole drawing again. Features are stored
55
+ * without the layer prefix; layer matching is applied on read.
56
+ */
57
+ var AcApSmartBlockFeatureCache = /** @class */ (function () {
58
+ function AcApSmartBlockFeatureCache() {
59
+ this.raw = new Map();
60
+ this.layered = new Map();
61
+ }
62
+ /**
63
+ * Feature of `entity`, or `undefined` when matching cannot describe it.
64
+ *
65
+ * @param entity - Entity to describe.
66
+ * @param matchLayer - Prefix the kind with the layer name.
67
+ */
68
+ AcApSmartBlockFeatureCache.prototype.get = function (entity, matchLayer) {
69
+ var _a;
70
+ var feature = this.raw.get(entity.objectId);
71
+ if (feature === undefined) {
72
+ feature =
73
+ (_a = acedEntityToShapeFeature(entity, entity.objectId, {
74
+ matchLayer: false
75
+ })) !== null && _a !== void 0 ? _a : null;
76
+ this.raw.set(entity.objectId, feature);
77
+ }
78
+ if (!feature || !matchLayer)
79
+ return feature !== null && feature !== void 0 ? feature : undefined;
80
+ // Layered copies are cached too: detection searches many times.
81
+ var layered = this.layered.get(entity.objectId);
82
+ if (!layered || layered.kind !== "".concat(entity.layer, "|").concat(feature.kind)) {
83
+ layered = __assign(__assign({}, feature), { kind: "".concat(entity.layer, "|").concat(feature.kind) });
84
+ this.layered.set(entity.objectId, layered);
85
+ }
86
+ return layered;
87
+ };
88
+ return AcApSmartBlockFeatureCache;
89
+ }());
90
+ export { AcApSmartBlockFeatureCache };
91
+ /**
92
+ * Shapes a search may use, grouped by kind. Usually every visible,
93
+ * describable model-space shape not on a locked layer
94
+ * ({@link AcApSmartBlockCandidatePool.fromDatabase}); build it once to run
95
+ * many searches over an unchanged drawing. Detection also builds small
96
+ * pools around the places copies can be. A search without a pool builds
97
+ * the full one.
98
+ */
99
+ var AcApSmartBlockCandidatePool = /** @class */ (function () {
100
+ /**
101
+ * @param features - Shapes to search among; kinds must already carry the
102
+ * layer prefix when layers are matched.
103
+ */
104
+ function AcApSmartBlockCandidatePool(features) {
105
+ var e_1, _a;
106
+ /** Spatial indexes shared by the searches over this pool. */
107
+ this.gridCache = new AcEdShapeGridCache();
108
+ this.byKind = new Map();
109
+ this.byId = new Map();
110
+ try {
111
+ for (var features_1 = __values(features), features_1_1 = features_1.next(); !features_1_1.done; features_1_1 = features_1.next()) {
112
+ var feature = features_1_1.value;
113
+ this.byId.set(feature.id, feature);
114
+ var list = this.byKind.get(feature.kind);
115
+ if (list)
116
+ list.push(feature);
117
+ else
118
+ this.byKind.set(feature.kind, [feature]);
119
+ }
120
+ }
121
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
122
+ finally {
123
+ try {
124
+ if (features_1_1 && !features_1_1.done && (_a = features_1.return)) _a.call(features_1);
125
+ }
126
+ finally { if (e_1) throw e_1.error; }
127
+ }
128
+ }
129
+ /**
130
+ * Pool of every visible, describable model-space shape that is not on a
131
+ * locked layer.
132
+ *
133
+ * @param db - Drawing database.
134
+ * @param matchLayer - Prefix kinds with the layer name.
135
+ * @param cache - Feature cache to fill and reuse.
136
+ */
137
+ AcApSmartBlockCandidatePool.fromDatabase = function (db, matchLayer, cache) {
138
+ var e_2, _a;
139
+ if (cache === void 0) { cache = new AcApSmartBlockFeatureCache(); }
140
+ var features = new Map();
141
+ try {
142
+ for (var _b = __values(db.tables.blockTable.modelSpace.newIterator()), _c = _b.next(); !_c.done; _c = _b.next()) {
143
+ var entity = _c.value;
144
+ if (!entity.visibility)
145
+ continue;
146
+ var feature = cache.get(entity, matchLayer);
147
+ if (feature)
148
+ features.set(entity.objectId, feature);
149
+ }
150
+ }
151
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
152
+ finally {
153
+ try {
154
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
155
+ }
156
+ finally { if (e_2) throw e_2.error; }
157
+ }
158
+ return new AcApSmartBlockCandidatePool(excludeLockedLayerIds(db, __spreadArray([], __read(features.keys()), false)).ids.map(function (id) { return features.get(id); }));
159
+ };
160
+ /** Shapes of one kind. */
161
+ AcApSmartBlockCandidatePool.prototype.ofKind = function (kind) {
162
+ var _a;
163
+ return (_a = this.byKind.get(kind)) !== null && _a !== void 0 ? _a : [];
164
+ };
165
+ /** Feature of a pooled shape. */
166
+ AcApSmartBlockCandidatePool.prototype.feature = function (id) {
167
+ return this.byId.get(id);
168
+ };
169
+ return AcApSmartBlockCandidatePool;
170
+ }());
171
+ export { AcApSmartBlockCandidatePool };
172
+ /**
173
+ * Builds the search template from selected entity ids.
174
+ *
175
+ * @param db - Drawing database.
176
+ * @param ids - Selected entity ids.
177
+ * @param options - Search options (layer matching).
178
+ */
179
+ export function acapBuildSmartBlockTemplate(db, ids, options) {
180
+ var e_3, _a;
181
+ if (options === void 0) { options = {}; }
182
+ var blockTable = db.tables.blockTable;
183
+ var template = {
184
+ entities: [],
185
+ ids: [],
186
+ unsupportedIds: [],
187
+ features: [],
188
+ texts: []
189
+ };
190
+ var featureOptions = toFeatureOptions(options);
191
+ try {
192
+ for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
193
+ var id = ids_1_1.value;
194
+ var entity = blockTable.getEntityById(id);
195
+ if (!entity)
196
+ continue;
197
+ var feature = acedEntityToShapeFeature(entity, id, featureOptions);
198
+ if (!feature) {
199
+ template.unsupportedIds.push(id);
200
+ continue;
201
+ }
202
+ template.entities.push(entity);
203
+ template.ids.push(id);
204
+ template.features.push(feature);
205
+ template.texts.push(feature.label);
206
+ }
207
+ }
208
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
209
+ finally {
210
+ try {
211
+ if (ids_1_1 && !ids_1_1.done && (_a = ids_1.return)) _a.call(ids_1);
212
+ }
213
+ finally { if (e_3) throw e_3.error; }
214
+ }
215
+ return template;
216
+ }
217
+ /**
218
+ * Finds every copy of `template` in model space.
219
+ *
220
+ * Loose-geometry copies come from {@link acedFindShapeMatches}. With
221
+ * `includeExistingBlocks`, references of blocks whose definition is the same
222
+ * geometry are reported as well. Shapes on locked layers are never matched,
223
+ * since they could not be replaced.
224
+ *
225
+ * @param db - Drawing database.
226
+ * @param template - Template from {@link acapBuildSmartBlockTemplate}.
227
+ * @param options - Search options.
228
+ * @returns Matches sorted by position (left to right, then bottom to top).
229
+ */
230
+ export function acapFindSmartBlockMatches(db, template, options, cache, pool) {
231
+ var e_4, _a;
232
+ var _b, _c, _d;
233
+ if (options === void 0) { options = {}; }
234
+ if (cache === void 0) { cache = new AcApSmartBlockFeatureCache(); }
235
+ if (template.entities.length === 0)
236
+ return [];
237
+ var matchLayer = (_b = options.matchLayer) !== null && _b !== void 0 ? _b : true;
238
+ var textVariations = (_c = options.textVariations) !== null && _c !== void 0 ? _c : true;
239
+ // Rebuilt per search: layer matching may have been toggled since the
240
+ // template was built.
241
+ var templateFeatures = template.entities.map(function (entity) { return cache.get(entity, matchLayer); });
242
+ // Like AutoCAD, selected single-line texts do not take part in the
243
+ // geometry match: texts with other strings (room numbers, axis labels)
244
+ // are rarely placed at exactly the same spot, e.g. left-aligned "1" and
245
+ // "10" start at different points. Geometry fixes the transform; each
246
+ // template text then picks up the text found at its place in the copy.
247
+ // A template made of texts only is matched as plain shapes.
248
+ var textIndices = [];
249
+ var shapeIndices = [];
250
+ templateFeatures.forEach(function (f, i) {
251
+ return (f.label === undefined ? shapeIndices : textIndices).push(i);
252
+ });
253
+ if (shapeIndices.length === 0)
254
+ textIndices.length = 0;
255
+ var shapeFeatures = shapeIndices.map(function (i) { return templateFeatures[i]; });
256
+ var templateIds = new Set(template.ids);
257
+ var shapeKinds = new Set(shapeFeatures.map(function (f) { return f.kind; }));
258
+ var textKinds = new Set(textIndices.map(function (i) { return templateFeatures[i].kind; }));
259
+ var source = pool !== null && pool !== void 0 ? pool : AcApSmartBlockCandidatePool.fromDatabase(db, matchLayer, cache);
260
+ var ofKinds = function (kinds) {
261
+ return __spreadArray([], __read(kinds), false).flatMap(function (kind) { return source.ofKind(kind); });
262
+ };
263
+ // Only shapes of the template's kinds can take part in a copy. The
264
+ // matcher skips the template's own shapes itself.
265
+ var candidates = ofKinds(shapeKinds);
266
+ var textCandidates = textIndices.length > 0
267
+ ? ofKinds(textKinds).filter(function (f) { return !templateIds.has(f.id); })
268
+ : [];
269
+ var candidateFeatures = { get: function (id) { return source.feature(id); } };
270
+ var texts = new TextPicker(db, textIndices.map(function (i) { return ({
271
+ entity: template.entities[i],
272
+ feature: templateFeatures[i]
273
+ }); }), textCandidates, textVariations);
274
+ var textIdsOf = new Map();
275
+ var shapeMatches = acedFindShapeMatches(shapeFeatures, candidates, {
276
+ tolerance: options.tolerance,
277
+ allowRotation: options.allowRotation,
278
+ allowMirror: options.allowMirror,
279
+ allowScale: options.allowScale,
280
+ ignoreLabels: textVariations,
281
+ gridCache: pool === null || pool === void 0 ? void 0 : pool.gridCache,
282
+ // A copy must hold every selected text at its place. Checked inside the
283
+ // search so symmetric geometry tries the transform that fits the texts.
284
+ accept: function (match) {
285
+ var ids = texts.pick(match);
286
+ if (ids)
287
+ textIdsOf.set(match, ids);
288
+ return !!ids;
289
+ }
290
+ });
291
+ var matches = [];
292
+ var _loop_1 = function (match) {
293
+ var textIds = (_d = textIdsOf.get(match)) !== null && _d !== void 0 ? _d : [];
294
+ var ids = new Array(templateFeatures.length);
295
+ shapeIndices.forEach(function (index, i) { return (ids[index] = match.ids[i]); });
296
+ textIndices.forEach(function (index, i) { return (ids[index] = textIds[i]); });
297
+ matches.push(__assign(__assign({}, match), { ids: ids, included: true, texts: templateFeatures.map(function (f, i) { var _a; return f.label === undefined ? undefined : (_a = candidateFeatures.get(ids[i])) === null || _a === void 0 ? void 0 : _a.label; }) }));
298
+ };
299
+ try {
300
+ for (var shapeMatches_1 = __values(shapeMatches), shapeMatches_1_1 = shapeMatches_1.next(); !shapeMatches_1_1.done; shapeMatches_1_1 = shapeMatches_1.next()) {
301
+ var match = shapeMatches_1_1.value;
302
+ _loop_1(match);
303
+ }
304
+ }
305
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
306
+ finally {
307
+ try {
308
+ if (shapeMatches_1_1 && !shapeMatches_1_1.done && (_a = shapeMatches_1.return)) _a.call(shapeMatches_1);
309
+ }
310
+ finally { if (e_4) throw e_4.error; }
311
+ }
312
+ if (options.includeExistingBlocks) {
313
+ matches.push.apply(matches, __spreadArray([], __read(findBlockReferenceMatches(db, template, options)), false));
314
+ }
315
+ var origin = matchOrigin(template);
316
+ var keyOf = function (m) { return applyAffine(m.transform, origin); };
317
+ return matches.sort(function (a, b) {
318
+ var pa = keyOf(a);
319
+ var pb = keyOf(b);
320
+ return Math.abs(pa.x - pb.x) > 1e-9 ? pa.x - pb.x : pa.y - pb.y;
321
+ });
322
+ }
323
+ /**
324
+ * Lists blocks whose definition is the template geometry (same shapes and
325
+ * nothing else), up to rotation, mirroring and uniform scale. Layers are not
326
+ * compared since block content usually lives on layer `0`.
327
+ *
328
+ * @param db - Drawing database.
329
+ * @param template - Template from {@link acapBuildSmartBlockTemplate}.
330
+ */
331
+ export function acapFindEquivalentBlocks(db, template, options) {
332
+ var e_5, _a, e_6, _b;
333
+ var _c;
334
+ if (options === void 0) { options = {}; }
335
+ var result = [];
336
+ if (template.entities.length === 0)
337
+ return result;
338
+ var featureOptions = { matchLayer: false };
339
+ var templateFeatures = template.entities.map(function (entity, i) {
340
+ return acedEntityToShapeFeature(entity, template.ids[i], featureOptions);
341
+ });
342
+ try {
343
+ for (var _d = __values(db.tables.blockTable.newIterator()), _e = _d.next(); !_e.done; _e = _d.next()) {
344
+ var record = _e.value;
345
+ if (!isUserBlock(record))
346
+ continue;
347
+ // Cheap size check before describing the definition.
348
+ var entities = __spreadArray([], __read(record.newIterator()), false);
349
+ if (entities.length !== templateFeatures.length)
350
+ continue;
351
+ var features = [];
352
+ try {
353
+ for (var entities_1 = (e_6 = void 0, __values(entities)), entities_1_1 = entities_1.next(); !entities_1_1.done; entities_1_1 = entities_1.next()) {
354
+ var entity = entities_1_1.value;
355
+ var feature = acedEntityToShapeFeature(entity, entity.objectId, featureOptions);
356
+ if (!feature)
357
+ break;
358
+ features.push(feature);
359
+ }
360
+ }
361
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
362
+ finally {
363
+ try {
364
+ if (entities_1_1 && !entities_1_1.done && (_b = entities_1.return)) _b.call(entities_1);
365
+ }
366
+ finally { if (e_6) throw e_6.error; }
367
+ }
368
+ if (features.length !== templateFeatures.length)
369
+ continue;
370
+ var _f = __read(acedFindShapeMatches(templateFeatures, features, {
371
+ allowRotation: true,
372
+ allowMirror: true,
373
+ allowScale: true,
374
+ ignoreLabels: (_c = options.textVariations) !== null && _c !== void 0 ? _c : true
375
+ }), 1), match = _f[0];
376
+ if (match)
377
+ result.push({ blockName: record.name, transform: match.transform });
378
+ }
379
+ }
380
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
381
+ finally {
382
+ try {
383
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
384
+ }
385
+ finally { if (e_5) throw e_5.error; }
386
+ }
387
+ return result;
388
+ }
389
+ /**
390
+ * Center of the template's extents: AutoCAD's default insertion point for a
391
+ * new block.
392
+ */
393
+ export function acapSmartBlockTemplateCenter(template) {
394
+ var e_7, _a;
395
+ var box = new AcGeBox2d();
396
+ try {
397
+ for (var _b = __values(template.entities), _c = _b.next(); !_c.done; _c = _b.next()) {
398
+ var entity = _c.value;
399
+ var ext = entity.geometricExtents;
400
+ if (ext.isEmpty())
401
+ continue;
402
+ box.expandByPoint(ext.min);
403
+ box.expandByPoint(ext.max);
404
+ }
405
+ }
406
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
407
+ finally {
408
+ try {
409
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
410
+ }
411
+ finally { if (e_7) throw e_7.error; }
412
+ }
413
+ if (box.isEmpty())
414
+ return matchOrigin(template);
415
+ return {
416
+ x: (box.min.x + box.max.x) / 2,
417
+ y: (box.min.y + box.max.y) / 2
418
+ };
419
+ }
420
+ /**
421
+ * Indices of template texts whose string differs in at least one included
422
+ * instance; these become attributes when converting with text variations.
423
+ */
424
+ export function acapSmartBlockVariableTexts(template, matches) {
425
+ var indices = [];
426
+ template.texts.forEach(function (text, i) {
427
+ if (text === undefined)
428
+ return;
429
+ var varies = matches.some(function (m) { return m.included && !m.blockReference && m.texts[i] !== text; });
430
+ if (varies)
431
+ indices.push(i);
432
+ });
433
+ return indices;
434
+ }
435
+ /** Composes two affine maps: `outer ∘ inner`. */
436
+ export function acapComposeAffine2d(outer, inner) {
437
+ return {
438
+ a: outer.a * inner.a + outer.c * inner.b,
439
+ b: outer.b * inner.a + outer.d * inner.b,
440
+ c: outer.a * inner.c + outer.c * inner.d,
441
+ d: outer.b * inner.c + outer.d * inner.d,
442
+ e: outer.a * inner.e + outer.c * inner.f + outer.e,
443
+ f: outer.b * inner.e + outer.d * inner.f + outer.f
444
+ };
445
+ }
446
+ /** Splits a similarity map into rotation, uniform scale and mirroring. */
447
+ export function acapDecomposeAffine2d(t) {
448
+ var det = t.a * t.d - t.b * t.c;
449
+ return {
450
+ rotation: Math.atan2(t.b, t.a),
451
+ scale: Math.sqrt(Math.abs(det)),
452
+ mirrored: det < 0
453
+ };
454
+ }
455
+ function findBlockReferenceMatches(db, template, options) {
456
+ var e_8, _a, e_9, _b;
457
+ var _c;
458
+ var equivalents = acapFindEquivalentBlocks(db, template, options);
459
+ if (equivalents.length === 0)
460
+ return [];
461
+ var byName = new Map(equivalents.map(function (b) { return [b.blockName, b]; }));
462
+ var templateIds = new Set(template.ids);
463
+ var refIds = [];
464
+ var refs = new Map();
465
+ try {
466
+ for (var _d = __values(db.tables.blockTable.modelSpace.newIterator()), _e = _d.next(); !_e.done; _e = _d.next()) {
467
+ var entity = _e.value;
468
+ if (!(entity instanceof AcDbBlockReference))
469
+ continue;
470
+ if (templateIds.has(entity.objectId) || !byName.has(entity.blockName)) {
471
+ continue;
472
+ }
473
+ refIds.push(entity.objectId);
474
+ refs.set(entity.objectId, entity);
475
+ }
476
+ }
477
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
478
+ finally {
479
+ try {
480
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
481
+ }
482
+ finally { if (e_8) throw e_8.error; }
483
+ }
484
+ var matches = [];
485
+ try {
486
+ for (var _f = __values(excludeLockedLayerIds(db, refIds).ids), _g = _f.next(); !_g.done; _g = _f.next()) {
487
+ var id = _g.value;
488
+ var ref = refs.get(id);
489
+ var e = ref.blockTransform.elements;
490
+ var refAffine = {
491
+ a: e[0],
492
+ b: e[1],
493
+ c: e[4],
494
+ d: e[5],
495
+ e: e[12],
496
+ f: e[13]
497
+ };
498
+ var transform = acapComposeAffine2d(refAffine, byName.get(ref.blockName).transform);
499
+ var parts = acapDecomposeAffine2d(transform);
500
+ // Non-uniformly scaled references are not a similarity of the template.
501
+ var sx = Math.hypot(transform.a, transform.b);
502
+ var sy = Math.hypot(transform.c, transform.d);
503
+ if (Math.abs(sx - sy) > 1e-6 * Math.max(sx, sy, 1))
504
+ continue;
505
+ if (!options.allowScale && Math.abs(parts.scale - 1) > 1e-6)
506
+ continue;
507
+ if (!((_c = options.allowMirror) !== null && _c !== void 0 ? _c : true) && parts.mirrored)
508
+ continue;
509
+ matches.push(__assign(__assign({}, parts), { transform: transform, ids: [id], included: true, blockReference: true, texts: template.texts.map(function () { return undefined; }) }));
510
+ }
511
+ }
512
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
513
+ finally {
514
+ try {
515
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
516
+ }
517
+ finally { if (e_9) throw e_9.error; }
518
+ }
519
+ return matches;
520
+ }
521
+ function isUserBlock(record) {
522
+ var name = record.name;
523
+ if (!name || name.startsWith('*'))
524
+ return false;
525
+ if (record.isModelSapce || record.isPaperSapce)
526
+ return false;
527
+ // External references are not editable definitions.
528
+ return !record.isXref;
529
+ }
530
+ function toFeatureOptions(options) {
531
+ var _a;
532
+ return {
533
+ matchLayer: (_a = options.matchLayer) !== null && _a !== void 0 ? _a : true,
534
+ includeBlockReferences: true
535
+ };
536
+ }
537
+ function matchOrigin(template) {
538
+ var _a, _b;
539
+ return (_b = (_a = template.features[0]) === null || _a === void 0 ? void 0 : _a.center) !== null && _b !== void 0 ? _b : { x: 0, y: 0 };
540
+ }
541
+ function applyAffine(t, p) {
542
+ return { x: t.a * p.x + t.c * p.y + t.e, y: t.b * p.x + t.d * p.y + t.f };
543
+ }
544
+ /**
545
+ * Pairs the template texts with the texts of a geometry copy.
546
+ *
547
+ * A text belongs to a copy when it lies where the template text lands under
548
+ * the copy's transform: its extents center within one text height, with
549
+ * the same height and orientation (mirrored copies may keep their text
550
+ * readable, as with `MIRRTEXT` = 0). Extents centers rather than insertion
551
+ * points are compared so differently long strings still pair up. Strings
552
+ * must be equal unless text variations are searched. Each text belongs to
553
+ * one copy only.
554
+ */
555
+ var TextPicker = /** @class */ (function () {
556
+ /**
557
+ * @param db - Drawing database.
558
+ * @param texts - Template texts with their features (search layer mode).
559
+ * @param candidates - Text features the copies may use.
560
+ * @param ignoreLabels - Accept texts with other strings.
561
+ */
562
+ function TextPicker(db, texts, candidates, ignoreLabels) {
563
+ var e_10, _a, e_11, _b;
564
+ this.ignoreLabels = ignoreLabels;
565
+ this.byKind = new Map();
566
+ this.claimed = new Set();
567
+ var blockTable = db.tables.blockTable;
568
+ this.templateTexts = texts.map(function (_a) {
569
+ var entity = _a.entity, feature = _a.feature;
570
+ return ({
571
+ feature: feature,
572
+ center: textCenter(entity, feature)
573
+ });
574
+ });
575
+ try {
576
+ for (var candidates_1 = __values(candidates), candidates_1_1 = candidates_1.next(); !candidates_1_1.done; candidates_1_1 = candidates_1.next()) {
577
+ var feature = candidates_1_1.value;
578
+ var entity = blockTable.getEntityById(feature.id);
579
+ var candidate = {
580
+ feature: feature,
581
+ center: entity ? textCenter(entity, feature) : feature.center
582
+ };
583
+ var list = this.byKind.get(feature.kind);
584
+ if (list)
585
+ list.push(candidate);
586
+ else
587
+ this.byKind.set(feature.kind, [candidate]);
588
+ }
589
+ }
590
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
591
+ finally {
592
+ try {
593
+ if (candidates_1_1 && !candidates_1_1.done && (_a = candidates_1.return)) _a.call(candidates_1);
594
+ }
595
+ finally { if (e_10) throw e_10.error; }
596
+ }
597
+ try {
598
+ // Sorted by x so a lookup only scans a narrow band.
599
+ for (var _c = __values(this.byKind.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
600
+ var list = _d.value;
601
+ list.sort(function (a, b) { return a.center.x - b.center.x; });
602
+ }
603
+ }
604
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
605
+ finally {
606
+ try {
607
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
608
+ }
609
+ finally { if (e_11) throw e_11.error; }
610
+ }
611
+ }
612
+ /**
613
+ * Ids of the copy's texts in template text order, or `undefined` when a
614
+ * template text has no counterpart. Found texts are claimed.
615
+ */
616
+ TextPicker.prototype.pick = function (match) {
617
+ var e_12, _a;
618
+ var _this = this;
619
+ var ids = [];
620
+ var taken = new Set();
621
+ try {
622
+ for (var _b = __values(this.templateTexts), _c = _b.next(); !_c.done; _c = _b.next()) {
623
+ var source = _c.value;
624
+ var found = this.find(source, match, taken);
625
+ if (!found)
626
+ return undefined;
627
+ ids.push(found);
628
+ taken.add(found);
629
+ }
630
+ }
631
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
632
+ finally {
633
+ try {
634
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
635
+ }
636
+ finally { if (e_12) throw e_12.error; }
637
+ }
638
+ ids.forEach(function (id) { return _this.claimed.add(id); });
639
+ return ids;
640
+ };
641
+ TextPicker.prototype.find = function (source, match, taken) {
642
+ var _a, _b;
643
+ var list = this.byKind.get(source.feature.kind);
644
+ if (!list)
645
+ return undefined;
646
+ var t = match.transform;
647
+ var f = source.feature;
648
+ var scale = match.scale;
649
+ var height = f.size * scale;
650
+ var radius = Math.max(height, 1e-9);
651
+ var center = applyAffine(t, source.center);
652
+ var dir = textDirection(f);
653
+ var mapped = normalize({
654
+ x: t.a * dir.x + t.c * dir.y,
655
+ y: t.b * dir.x + t.d * dir.y
656
+ });
657
+ var cosTol = Math.cos((2 * Math.PI) / 180);
658
+ var best;
659
+ var bestDist = radius;
660
+ var lo = 0;
661
+ var hi = list.length;
662
+ while (lo < hi) {
663
+ var mid = (lo + hi) >> 1;
664
+ if (list[mid].center.x < center.x - radius)
665
+ lo = mid + 1;
666
+ else
667
+ hi = mid;
668
+ }
669
+ for (var k = lo; k < list.length; k++) {
670
+ var c = list[k];
671
+ if (c.center.x > center.x + radius)
672
+ break;
673
+ var g = c.feature;
674
+ if (this.claimed.has(g.id) || taken.has(g.id))
675
+ continue;
676
+ if (!this.ignoreLabels && ((_a = g.label) !== null && _a !== void 0 ? _a : '') !== ((_b = f.label) !== null && _b !== void 0 ? _b : ''))
677
+ continue;
678
+ if (Math.abs(g.size - height) > Math.max(height * 0.02, 1e-9))
679
+ continue;
680
+ var d = Math.hypot(c.center.x - center.x, c.center.y - center.y);
681
+ if (d > bestDist)
682
+ continue;
683
+ var v = textDirection(g);
684
+ var dot = v.x * mapped.x + v.y * mapped.y;
685
+ if (dot < cosTol && !(match.mirrored && dot <= -cosTol))
686
+ continue;
687
+ best = g.id;
688
+ bestDist = d;
689
+ }
690
+ return best;
691
+ };
692
+ return TextPicker;
693
+ }());
694
+ /** Center of a text's extents; its insertion point when they are empty. */
695
+ function textCenter(entity, feature) {
696
+ var ext = entity.geometricExtents;
697
+ if (ext.isEmpty())
698
+ return feature.center;
699
+ return { x: (ext.min.x + ext.max.x) / 2, y: (ext.min.y + ext.max.y) / 2 };
700
+ }
701
+ /** Unit baseline direction of a text feature. */
702
+ function textDirection(feature) {
703
+ var _a = __read(feature.points, 2), p0 = _a[0], p1 = _a[1];
704
+ if (!p0 || !p1)
705
+ return { x: 1, y: 0 };
706
+ return normalize({ x: p1.x - p0.x, y: p1.y - p0.y });
707
+ }
708
+ function normalize(v) {
709
+ var len = Math.hypot(v.x, v.y);
710
+ return len > 0 ? { x: v.x / len, y: v.y / len } : { x: 1, y: 0 };
711
+ }
712
+ //# sourceMappingURL=AcApSmartBlockSearch.js.map