@mlightcad/cad-simple-viewer 1.2.4 → 1.3.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 (287) hide show
  1. package/dist/index.js +13000 -10094
  2. package/dist/index.umd.cjs +327 -24
  3. package/dist/libredwg-parser-worker.js +7267 -7238
  4. package/dist/mtext-renderer-worker.js +81 -41
  5. package/lib/app/AcApContext.js +1 -1
  6. package/lib/app/AcApContext.js.map +1 -1
  7. package/lib/app/AcApDocManager.d.ts +20 -3
  8. package/lib/app/AcApDocManager.d.ts.map +1 -1
  9. package/lib/app/AcApDocManager.js +67 -12
  10. package/lib/app/AcApDocManager.js.map +1 -1
  11. package/lib/app/AcApProgress.d.ts +133 -0
  12. package/lib/app/AcApProgress.d.ts.map +1 -0
  13. package/lib/app/AcApProgress.js +148 -0
  14. package/lib/app/AcApProgress.js.map +1 -0
  15. package/lib/app/AcApSettingManager.d.ts +42 -0
  16. package/lib/app/AcApSettingManager.d.ts.map +1 -1
  17. package/lib/app/AcApSettingManager.js +63 -0
  18. package/lib/app/AcApSettingManager.js.map +1 -1
  19. package/lib/app/index.d.ts +0 -1
  20. package/lib/app/index.d.ts.map +1 -1
  21. package/lib/app/index.js +0 -1
  22. package/lib/app/index.js.map +1 -1
  23. package/lib/command/AcApCircleCmd.d.ts +21 -0
  24. package/lib/command/AcApCircleCmd.d.ts.map +1 -0
  25. package/lib/command/AcApCircleCmd.js +115 -0
  26. package/lib/command/AcApCircleCmd.js.map +1 -0
  27. package/lib/command/AcApDimCmd.d.ts +57 -0
  28. package/lib/command/AcApDimCmd.d.ts.map +1 -0
  29. package/lib/command/AcApDimCmd.js +228 -0
  30. package/lib/command/AcApDimCmd.js.map +1 -0
  31. package/lib/command/AcApLogCmd.d.ts +13 -0
  32. package/lib/command/AcApLogCmd.d.ts.map +1 -0
  33. package/lib/command/AcApLogCmd.js +97 -0
  34. package/lib/command/AcApLogCmd.js.map +1 -0
  35. package/lib/command/AcApSysVarCmd.d.ts +15 -0
  36. package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
  37. package/lib/command/AcApSysVarCmd.js +94 -0
  38. package/lib/command/AcApSysVarCmd.js.map +1 -0
  39. package/lib/command/AcApZoomCmd.js +1 -1
  40. package/lib/command/AcApZoomCmd.js.map +1 -1
  41. package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
  42. package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
  43. package/lib/command/AcApZoomToBoxCmd.js +4 -61
  44. package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
  45. package/lib/command/index.d.ts +4 -0
  46. package/lib/command/index.d.ts.map +1 -1
  47. package/lib/command/index.js +4 -0
  48. package/lib/command/index.js.map +1 -1
  49. package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
  50. package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
  51. package/lib/editor/command/AcEdCommandStack.js +40 -0
  52. package/lib/editor/command/AcEdCommandStack.js.map +1 -1
  53. package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
  54. package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
  55. package/lib/editor/input/AcEdCursorManager.js +32 -31
  56. package/lib/editor/input/AcEdCursorManager.js.map +1 -1
  57. package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
  58. package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
  59. package/lib/editor/input/AcEdPreviewJig.js +82 -0
  60. package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
  61. package/lib/editor/input/AcEditor.d.ts +58 -11
  62. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  63. package/lib/editor/input/AcEditor.js +86 -22
  64. package/lib/editor/input/AcEditor.js.map +1 -1
  65. package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
  66. package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
  67. package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
  68. package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
  69. package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
  70. package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
  71. package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
  72. package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
  73. package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
  74. package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
  75. package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
  76. package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
  77. package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
  78. package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
  79. package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
  80. package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
  81. package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
  82. package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
  83. package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
  84. package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
  85. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
  86. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
  87. package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
  88. package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
  89. package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
  90. package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
  91. package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
  92. package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
  93. package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
  94. package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
  95. package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
  96. package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
  97. package/lib/editor/input/handler/index.d.ts +9 -0
  98. package/lib/editor/input/handler/index.d.ts.map +1 -0
  99. package/lib/editor/input/handler/index.js +9 -0
  100. package/lib/editor/input/handler/index.js.map +1 -0
  101. package/lib/editor/input/index.d.ts +4 -1
  102. package/lib/editor/input/index.d.ts.map +1 -1
  103. package/lib/editor/input/index.js +4 -1
  104. package/lib/editor/input/index.js.map +1 -1
  105. package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
  106. package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
  107. package/lib/editor/input/marker/AcEdMarker.js +124 -0
  108. package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
  109. package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
  110. package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
  111. package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
  112. package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
  113. package/lib/editor/input/marker/index.d.ts +3 -0
  114. package/lib/editor/input/marker/index.d.ts.map +1 -0
  115. package/lib/editor/input/marker/index.js +3 -0
  116. package/lib/editor/input/marker/index.js.map +1 -0
  117. package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
  118. package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
  119. package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
  120. package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
  121. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
  122. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
  123. package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
  124. package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
  125. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
  126. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
  127. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
  128. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
  129. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
  130. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
  131. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
  132. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
  133. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
  134. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
  135. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
  136. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
  137. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
  138. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
  139. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
  140. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
  141. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
  142. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
  143. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
  144. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
  145. package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
  146. package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
  147. package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
  148. package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
  149. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
  150. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
  151. package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
  152. package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
  153. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
  154. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
  155. package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
  156. package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
  157. package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
  158. package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
  159. package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
  160. package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
  161. package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
  162. package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
  163. package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
  164. package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
  165. package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
  166. package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
  167. package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
  168. package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
  169. package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
  170. package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
  171. package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
  172. package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
  173. package/lib/editor/input/prompt/index.d.ts +11 -0
  174. package/lib/editor/input/prompt/index.d.ts.map +1 -0
  175. package/lib/editor/input/prompt/index.js +11 -0
  176. package/lib/editor/input/prompt/index.js.map +1 -0
  177. package/lib/editor/input/ui/AcEdCommandLine.d.ts +116 -0
  178. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
  179. package/lib/editor/input/ui/AcEdCommandLine.js +481 -0
  180. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
  181. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
  182. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
  183. package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
  184. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
  185. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
  186. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
  187. package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
  188. package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
  189. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
  190. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
  191. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
  192. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
  193. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
  194. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
  195. package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
  196. package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
  197. package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
  198. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
  199. package/lib/editor/input/ui/AcEdInputManager.js +477 -0
  200. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
  201. package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
  202. package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
  203. package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
  204. package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
  205. package/lib/editor/input/ui/index.d.ts +3 -0
  206. package/lib/editor/input/ui/index.d.ts.map +1 -0
  207. package/lib/editor/input/ui/index.js +3 -0
  208. package/lib/editor/input/ui/index.js.map +1 -0
  209. package/lib/editor/view/AcEdBaseView.d.ts +54 -16
  210. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  211. package/lib/editor/view/AcEdBaseView.js +14 -11
  212. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  213. package/lib/editor/view/AcEdLayerInfo.d.ts +5 -0
  214. package/lib/editor/view/AcEdLayerInfo.d.ts.map +1 -1
  215. package/lib/i18n/AcApI18n.d.ts +135 -0
  216. package/lib/i18n/AcApI18n.d.ts.map +1 -0
  217. package/lib/i18n/AcApI18n.js +208 -0
  218. package/lib/i18n/AcApI18n.js.map +1 -0
  219. package/lib/i18n/en/command.d.ts +18 -0
  220. package/lib/i18n/en/command.d.ts.map +1 -0
  221. package/lib/i18n/en/command.js +17 -0
  222. package/lib/i18n/en/command.js.map +1 -0
  223. package/lib/i18n/en/jig.d.ts +11 -0
  224. package/lib/i18n/en/jig.d.ts.map +1 -0
  225. package/lib/i18n/en/jig.js +10 -0
  226. package/lib/i18n/en/jig.js.map +1 -0
  227. package/lib/i18n/en/main.d.ts +37 -0
  228. package/lib/i18n/en/main.d.ts.map +1 -0
  229. package/lib/i18n/en/main.js +36 -0
  230. package/lib/i18n/en/main.js.map +1 -0
  231. package/lib/i18n/index.d.ts +6 -0
  232. package/lib/i18n/index.d.ts.map +1 -0
  233. package/lib/i18n/index.js +31 -0
  234. package/lib/i18n/index.js.map +1 -0
  235. package/lib/i18n/zh/command.d.ts +18 -0
  236. package/lib/i18n/zh/command.d.ts.map +1 -0
  237. package/lib/i18n/zh/command.js +17 -0
  238. package/lib/i18n/zh/command.js.map +1 -0
  239. package/lib/i18n/zh/jig.d.ts +11 -0
  240. package/lib/i18n/zh/jig.d.ts.map +1 -0
  241. package/lib/i18n/zh/jig.js +10 -0
  242. package/lib/i18n/zh/jig.js.map +1 -0
  243. package/lib/i18n/zh/main.d.ts +37 -0
  244. package/lib/i18n/zh/main.d.ts.map +1 -0
  245. package/lib/i18n/zh/main.js +36 -0
  246. package/lib/i18n/zh/main.js.map +1 -0
  247. package/lib/index.d.ts +1 -0
  248. package/lib/index.d.ts.map +1 -1
  249. package/lib/index.js +1 -0
  250. package/lib/index.js.map +1 -1
  251. package/lib/view/AcTrLayer.d.ts +29 -5
  252. package/lib/view/AcTrLayer.d.ts.map +1 -1
  253. package/lib/view/AcTrLayer.js +44 -6
  254. package/lib/view/AcTrLayer.js.map +1 -1
  255. package/lib/view/AcTrLayout.d.ts +13 -7
  256. package/lib/view/AcTrLayout.d.ts.map +1 -1
  257. package/lib/view/AcTrLayout.js +29 -21
  258. package/lib/view/AcTrLayout.js.map +1 -1
  259. package/lib/view/AcTrScene.d.ts +22 -8
  260. package/lib/view/AcTrScene.d.ts.map +1 -1
  261. package/lib/view/AcTrScene.js +36 -9
  262. package/lib/view/AcTrScene.js.map +1 -1
  263. package/lib/view/AcTrView2d.d.ts +19 -4
  264. package/lib/view/AcTrView2d.d.ts.map +1 -1
  265. package/lib/view/AcTrView2d.js +135 -43
  266. package/lib/view/AcTrView2d.js.map +1 -1
  267. package/package.json +7 -7
  268. package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
  269. package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
  270. package/lib/editor/input/AcEdBaseInput.js +0 -166
  271. package/lib/editor/input/AcEdBaseInput.js.map +0 -1
  272. package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
  273. package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
  274. package/lib/editor/input/AcEdBoxSelector.js +0 -220
  275. package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
  276. package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
  277. package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
  278. package/lib/editor/input/AcEdInputPoint.js +0 -78
  279. package/lib/editor/input/AcEdInputPoint.js.map +0 -1
  280. package/lib/editor/input/AcEdJig.d.ts +0 -180
  281. package/lib/editor/input/AcEdJig.d.ts.map +0 -1
  282. package/lib/editor/input/AcEdJig.js +0 -256
  283. package/lib/editor/input/AcEdJig.js.map +0 -1
  284. package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
  285. package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
  286. package/lib/editor/input/AcEdJigLoop.js +0 -91
  287. package/lib/editor/input/AcEdJigLoop.js.map +0 -1
@@ -51,61 +51,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
51
51
  };
52
52
  import { AcApDocManager } from '../app';
53
53
  import { AcEdCommand } from '../command';
54
- import { AcEdJig } from '../editor';
55
- /**
56
- * Jig for handling zoom-to-box selection interaction.
57
- *
58
- * This jig handles the user interaction for selecting a rectangular
59
- * area to zoom to. It extends {@link AcEdJig} to provide interactive
60
- * selection capabilities.
61
- *
62
- * The jig allows users to:
63
- * - Select a rectangular area on the drawing
64
- * - Zoom the view to fit the selected area
65
- * - Provide visual feedback during selection
66
- *
67
- * @example
68
- * ```typescript
69
- * const jig = new AcApZoomToBoxJig(view);
70
- * await jig.drag(); // User selects area to zoom to
71
- * ```
72
- */
73
- var AcApZoomToBoxJig = /** @class */ (function (_super) {
74
- __extends(AcApZoomToBoxJig, _super);
75
- /**
76
- * Creates a new zoom-to-box jig.
77
- *
78
- * @param view - The view that will be zoomed
79
- */
80
- function AcApZoomToBoxJig(view) {
81
- return _super.call(this, view) || this;
82
- }
83
- /**
84
- * Handles the selection sampling and zooming operation.
85
- *
86
- * This method gets the user's selection box and applies
87
- * the zoom operation to fit that area in the view.
88
- *
89
- * @returns Promise that resolves when the zoom operation completes
90
- */
91
- AcApZoomToBoxJig.prototype.sampler = function () {
92
- return __awaiter(this, void 0, void 0, function () {
93
- var _this = this;
94
- return __generator(this, function (_a) {
95
- switch (_a.label) {
96
- case 0: return [4 /*yield*/, AcApDocManager.instance.editor.getSelection().then(function (box) {
97
- return _this.view.zoomTo(box, 1);
98
- })];
99
- case 1:
100
- _a.sent();
101
- return [2 /*return*/];
102
- }
103
- });
104
- });
105
- };
106
- return AcApZoomToBoxJig;
107
- }(AcEdJig));
108
- export { AcApZoomToBoxJig };
109
54
  /**
110
55
  * Command for zooming to a user-selected rectangular area.
111
56
  *
@@ -139,15 +84,13 @@ var AcApZoomToBoxCmd = /** @class */ (function (_super) {
139
84
  */
140
85
  AcApZoomToBoxCmd.prototype.execute = function (context) {
141
86
  return __awaiter(this, void 0, void 0, function () {
142
- var jig;
87
+ var box;
143
88
  return __generator(this, function (_a) {
144
89
  switch (_a.label) {
145
- case 0:
146
- jig = new AcApZoomToBoxJig(context.view);
147
- return [4 /*yield*/, jig.drag()];
90
+ case 0: return [4 /*yield*/, AcApDocManager.instance.editor.getSelection()];
148
91
  case 1:
149
- _a.sent();
150
- return [2 /*return*/];
92
+ box = _a.sent();
93
+ return [2 /*return*/, context.view.zoomTo(box, 1)];
151
94
  }
152
95
  });
153
96
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AcApZoomToBoxCmd.js","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAA;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH;IAAsC,oCAAgB;IACpD;;;;OAIG;IACH,0BAAY,IAAkB;QAC5B,OAAA,MAAK,YAAC,IAAI,CAAC,SAAA;IACb,CAAC;IAED;;;;;;;OAOG;IACG,kCAAO,GAAb;;;;;4BACE,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,UAAA,GAAG;4BAC1D,OAAO,KAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;wBACjC,CAAC,CAAC,EAAA;;wBAFF,SAEE,CAAA;;;;;KACH;IACH,uBAAC;AAAD,CAAC,AAvBD,CAAsC,OAAO,GAuB5C;;AAED;;;;;;;;;;;;;;;;GAgBG;AACH;IAAsC,oCAAW;IAAjD;;IAcA,CAAC;IAbC;;;;;;;;OAQG;IACG,kCAAO,GAAb,UAAc,OAAoB;;;;;;wBAC1B,GAAG,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;wBAC9C,qBAAM,GAAG,CAAC,IAAI,EAAE,EAAA;;wBAAhB,SAAgB,CAAA;;;;;KACjB;IACH,uBAAC;AAAD,CAAC,AAdD,CAAsC,WAAW,GAchD"}
1
+ {"version":3,"file":"AcApZoomToBoxCmd.js","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH;IAAsC,oCAAW;IAAjD;;IAcA,CAAC;IAbC;;;;;;;;OAQG;IACG,kCAAO,GAAb,UAAc,OAAoB;;;;;4BACpB,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,EAAA;;wBAAzD,GAAG,GAAG,SAAmD;wBAC/D,sBAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,EAAA;;;;KACnC;IACH,uBAAC;AAAD,CAAC,AAdD,CAAsC,WAAW,GAchD"}
@@ -1,10 +1,14 @@
1
1
  export * from '../editor/command/AcEdCommand';
2
2
  export * from '../editor/command/AcEdCommandStack';
3
+ export * from './AcApCircleCmd';
3
4
  export * from './AcApConvertToSvgCmd';
5
+ export * from './AcApDimCmd';
6
+ export * from './AcApLogCmd';
4
7
  export * from './AcApOpenCmd';
5
8
  export * from './AcApQNewCmd';
6
9
  export * from './AcApRegenCmd';
7
10
  export * from './AcApSelectCmd';
11
+ export * from './AcApSysVarCmd';
8
12
  export * from './AcApZoomCmd';
9
13
  export * from './AcApZoomToBoxCmd';
10
14
  export * from './AcApPanCmd';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
@@ -1,10 +1,14 @@
1
1
  export * from '../editor/command/AcEdCommand';
2
2
  export * from '../editor/command/AcEdCommandStack';
3
+ export * from './AcApCircleCmd';
3
4
  export * from './AcApConvertToSvgCmd';
5
+ export * from './AcApDimCmd';
6
+ export * from './AcApLogCmd';
4
7
  export * from './AcApOpenCmd';
5
8
  export * from './AcApQNewCmd';
6
9
  export * from './AcApRegenCmd';
7
10
  export * from './AcApSelectCmd';
11
+ export * from './AcApSysVarCmd';
8
12
  export * from './AcApZoomCmd';
9
13
  export * from './AcApZoomToBoxCmd';
10
14
  export * from './AcApPanCmd';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { AcEdCommand } from './AcEdCommand';
2
- import { AcEdCommandIterator } from './AcEdCommandIterator';
2
+ import { AcEdCommandIterator, AcEdCommandIteratorItem } from './AcEdCommandIterator';
3
3
  /**
4
4
  * Interface representing a command group in the command stack.
5
5
  * Groups commands by name and provides maps for both global and local command lookups.
@@ -75,6 +75,24 @@ export declare class AcEdCommandStack {
75
75
  * stack.
76
76
  */
77
77
  iterator(): AcEdCommandIterator;
78
+ /**
79
+ * Fuzzy search for commands by prefix using the command iterator.
80
+ *
81
+ * This method iterates through all commands in all command groups and returns those
82
+ * whose global or local names start with the provided prefix. The search is case-insensitive.
83
+ *
84
+ * @param prefix - The prefix string to search for. Case-insensitive.
85
+ * @returns An array of objects containing matched commands and their corresponding group names.
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * const matches = commandStack.searchCommandsByPrefix('LI');
90
+ * matches.forEach(item => {
91
+ * console.log(item.groupName, item.command.globalName);
92
+ * });
93
+ * ```
94
+ */
95
+ searchCommandsByPrefix(prefix: string): AcEdCommandIteratorItem[];
78
96
  /**
79
97
  * Search through all of the global and untranslated names in all of the command groups in the command
80
98
  * stack starting at the top of the stack trying to find a match with cmdName. If a match is found, the
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCommandStack.d.ts","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC9C,mDAAmD;IACnD,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC9C;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAgB;IAC3B,2CAA2C;IAC3C,MAAM,CAAC,0BAA0B,SAAS;IAC1C,iDAAiD;IACjD,MAAM,CAAC,yBAAyB,SAAS;IAEzC,+CAA+C;IAC/C,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,4CAA4C;IAC5C,OAAO,CAAC,mBAAmB,CAAkB;IAC7C,kDAAkD;IAClD,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,8CAA8C;IAC9C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAkB;IAE3C;;;OAGG;IACH,OAAO;IAgBP;;;;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,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAkB;IAE3C;;;OAGG;IACH,OAAO;IAgBP;;;;;OAKG;IACH,MAAM,KAAK,QAAQ,qBAKlB;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CACR,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,WAAW;IA+ClB;;;;;;OAMG;IACH,QAAQ;IAIR;;;;;;;;;;;;;;;;OAgBG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,EAAE;IAoBjE;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM;IAU/B;;;;;;;;;OASG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM;IAU9B;;;;;;;;;OASG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAWrD;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM;CAa9B"}
@@ -76,6 +76,9 @@ var AcEdCommandStack = /** @class */ (function () {
76
76
  * ```
77
77
  */
78
78
  AcEdCommandStack.prototype.addCommand = function (cmdGroupName, cmdGlobalName, cmdLocalName, cmd) {
79
+ cmdGroupName = cmdGroupName.toUpperCase();
80
+ cmdGlobalName = cmdGlobalName.toUpperCase();
81
+ cmdLocalName = cmdLocalName.toUpperCase();
79
82
  if (!cmdGlobalName) {
80
83
  throw new Error('[AcEdCommandStack] The global name of the command is required!');
81
84
  }
@@ -117,6 +120,38 @@ var AcEdCommandStack = /** @class */ (function () {
117
120
  AcEdCommandStack.prototype.iterator = function () {
118
121
  return new AcEdCommandIterator(this._commandsByGroup);
119
122
  };
123
+ /**
124
+ * Fuzzy search for commands by prefix using the command iterator.
125
+ *
126
+ * This method iterates through all commands in all command groups and returns those
127
+ * whose global or local names start with the provided prefix. The search is case-insensitive.
128
+ *
129
+ * @param prefix - The prefix string to search for. Case-insensitive.
130
+ * @returns An array of objects containing matched commands and their corresponding group names.
131
+ *
132
+ * @example
133
+ * ```typescript
134
+ * const matches = commandStack.searchCommandsByPrefix('LI');
135
+ * matches.forEach(item => {
136
+ * console.log(item.groupName, item.command.globalName);
137
+ * });
138
+ * ```
139
+ */
140
+ AcEdCommandStack.prototype.searchCommandsByPrefix = function (prefix) {
141
+ prefix = prefix.toUpperCase();
142
+ var results = [];
143
+ var iter = this.iterator();
144
+ var item = iter.next();
145
+ while (!item.done) {
146
+ var command = item.value.command;
147
+ if (command.globalName.startsWith(prefix) ||
148
+ command.localName.startsWith(prefix)) {
149
+ results.push(item.value);
150
+ }
151
+ item = iter.next();
152
+ }
153
+ return results;
154
+ };
120
155
  /**
121
156
  * Search through all of the global and untranslated names in all of the command groups in the command
122
157
  * stack starting at the top of the stack trying to find a match with cmdName. If a match is found, the
@@ -129,6 +164,7 @@ var AcEdCommandStack = /** @class */ (function () {
129
164
  */
130
165
  AcEdCommandStack.prototype.lookupGlobalCmd = function (cmdName) {
131
166
  var e_1, _a;
167
+ cmdName = cmdName.toUpperCase();
132
168
  var result = undefined;
133
169
  try {
134
170
  for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -159,6 +195,7 @@ var AcEdCommandStack = /** @class */ (function () {
159
195
  */
160
196
  AcEdCommandStack.prototype.lookupLocalCmd = function (cmdName) {
161
197
  var e_2, _a;
198
+ cmdName = cmdName.toUpperCase();
162
199
  var result = undefined;
163
200
  try {
164
201
  for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -189,6 +226,8 @@ var AcEdCommandStack = /** @class */ (function () {
189
226
  */
190
227
  AcEdCommandStack.prototype.removeCmd = function (cmdGroupName, cmdGlobalName) {
191
228
  var e_3, _a;
229
+ cmdGroupName = cmdGroupName.toUpperCase();
230
+ cmdGlobalName = cmdGlobalName.toUpperCase();
192
231
  try {
193
232
  for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
194
233
  var group = _c.value;
@@ -214,6 +253,7 @@ var AcEdCommandStack = /** @class */ (function () {
214
253
  * @returns Return true if successful. Return false if no command group is found with the name `GroupName`.
215
254
  */
216
255
  AcEdCommandStack.prototype.removeGroup = function (groupName) {
256
+ groupName = groupName.toUpperCase();
217
257
  var tmp = -1;
218
258
  this._commandsByGroup.some(function (group, index) {
219
259
  tmp = index;
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCommandStack.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAe3D;;;;;;;;;;;;;GAaG;AACH;IAeE;;;OAGG;IACH;QACE,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,mBAAmB,GAAG;YACzB,SAAS,EAAE,gBAAgB,CAAC,0BAA0B;YACtD,oBAAoB,EAAE,IAAI,GAAG,EAAE;YAC/B,mBAAmB,EAAE,IAAI,GAAG,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,oBAAoB,GAAG;YAC1B,SAAS,EAAE,gBAAgB,CAAC,yBAAyB;YACrD,oBAAoB,EAAE,IAAI,GAAG,EAAE;YAC/B,mBAAmB,EAAE,IAAI,GAAG,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;QACpD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;IACvD,CAAC;IAQD,sBAAW,4BAAQ;QANnB;;;;;WAKG;aACH;YACE,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;gBAChC,gBAAgB,CAAC,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;YACrD,CAAC;YACD,OAAO,gBAAgB,CAAC,SAAS,CAAA;QACnC,CAAC;;;OAAA;IAED;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,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;gBACzD,CAAC;YACH,CAAC;;;;;;;;;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;OAMG;IACH,sCAAW,GAAX,UAAY,SAAiB;QAC3B,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAA;QACnC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAA;QACZ,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAC,KAAK,EAAE,KAAK;YACtC,GAAG,GAAG,KAAK,CAAA;YACX,OAAO,KAAK,CAAC,SAAS,IAAI,SAAS,CAAA;QACrC,CAAC,CAAC,CAAA;QACF,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;YACpC,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAjPD,2CAA2C;IACpC,2CAA0B,GAAG,MAAM,CAAA;IAC1C,iDAAiD;IAC1C,0CAAyB,GAAG,MAAM,CAAA;IA+O3C,uBAAC;CAAA,AAnPD,IAmPC;SAnPY,gBAAgB"}
@@ -1,3 +1,4 @@
1
+ import { AcEdBaseView } from '../view';
1
2
  /**
2
3
  * Enumeration of cursor types available in the CAD editor.
3
4
  *
@@ -58,47 +59,30 @@ export declare enum AcEdCorsorType {
58
59
  *
59
60
  * The cursor manager maintains a cache of cursor definitions to avoid
60
61
  * recreating them repeatedly, improving performance.
61
- *
62
- * @internal This class is for internal use by the editor system
63
- *
64
- * @example
65
- * ```typescript
66
- * const cursorManager = new AcEdCursorManager();
67
- * const canvas = document.getElementById('canvas') as HTMLCanvasElement;
68
- *
69
- * // Set crosshair cursor
70
- * cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
71
- *
72
- * // Set grab cursor for panning
73
- * cursorManager.setCursor(AcEdCorsorType.Grab, canvas);
74
- * ```
75
62
  */
76
63
  export declare class AcEdCursorManager {
64
+ /** The view associated with the cursor manager */
65
+ private _view;
66
+ /** The current curos type in the associated view */
67
+ private _currentCursor;
77
68
  /** Cache of cursor definitions mapped by cursor type */
78
69
  private _cursorMap;
79
70
  /**
80
71
  * Creates a new cursor manager instance.
81
- *
82
- * Initializes the cursor cache and creates default cursor definitions.
72
+ * Initializes the cursor and creates default cursor definitions.
73
+ * @param view - The view associated with the cursor manager
83
74
  */
84
- constructor();
75
+ constructor(view: AcEdBaseView);
85
76
  /**
86
- * Sets the cursor for the specified HTML element.
87
- *
88
- * Applies the appropriate cursor style based on the cursor type.
89
- * For built-in cursor types, uses CSS cursor values. For custom
90
- * cursor types, uses cached SVG-based cursor definitions.
77
+ * The current cursor type for the associated view.
78
+ */
79
+ get currentCursor(): AcEdCorsorType;
80
+ /**
81
+ * Sets the current cursor for the associated view.
91
82
  *
92
83
  * @param cursorType - The type of cursor to set
93
- * @param element - The HTML element to apply the cursor to
94
- *
95
- * @example
96
- * ```typescript
97
- * const canvas = document.getElementById('canvas') as HTMLCanvasElement;
98
- * cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
99
- * ```
100
84
  */
101
- setCursor(cursorType: AcEdCorsorType, element: HTMLElement): void;
85
+ setCursor(cursorType: AcEdCorsorType): void;
102
86
  /**
103
87
  * Encodes an SVG string into a CSS cursor URL.
104
88
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCursorManager.d.ts","sourceRoot":"","sources":["../../../src/editor/input/AcEdCursorManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,cAAc;IACxB,+CAA+C;IAC/C,eAAe,KAAK;IACpB,mDAAmD;IACnD,SAAS,IAAI;IACb,0CAA0C;IAC1C,UAAU,IAAA;IACV,6CAA6C;IAC7C,UAAU,IAAA;IACV,yBAAyB;IACzB,UAAU,IAAA;IACV,4CAA4C;IAC5C,SAAS,IAAA;IACT,+BAA+B;IAC/B,gBAAgB,IAAA;IAChB,8CAA8C;IAC9C,iBAAiB,IAAA;IACjB,yCAAyC;IACzC,SAAS,IAAA;IACT,8BAA8B;IAC9B,YAAY,IAAA;IACZ,iDAAiD;IACjD,aAAa,IAAA;IACb,+CAA+C;IAC/C,mBAAmB,KAAA;IACnB,gDAAgD;IAChD,cAAc,KAAA;IACd,8BAA8B;IAC9B,eAAe,KAAA;IACf,mCAAmC;IACnC,IAAI,KAAA;CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,iBAAiB;IAC5B,wDAAwD;IACxD,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;;OAIG;;IASH;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW;IAa1D;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIrE;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;CAsB5B"}
1
+ {"version":3,"file":"AcEdCursorManager.d.ts","sourceRoot":"","sources":["../../../src/editor/input/AcEdCursorManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,cAAc;IACxB,+CAA+C;IAC/C,eAAe,KAAK;IACpB,mDAAmD;IACnD,SAAS,IAAI;IACb,0CAA0C;IAC1C,UAAU,IAAA;IACV,6CAA6C;IAC7C,UAAU,IAAA;IACV,yBAAyB;IACzB,UAAU,IAAA;IACV,4CAA4C;IAC5C,SAAS,IAAA;IACT,+BAA+B;IAC/B,gBAAgB,IAAA;IAChB,8CAA8C;IAC9C,iBAAiB,IAAA;IACjB,yCAAyC;IACzC,SAAS,IAAA;IACT,8BAA8B;IAC9B,YAAY,IAAA;IACZ,iDAAiD;IACjD,aAAa,IAAA;IACb,+CAA+C;IAC/C,mBAAmB,KAAA;IACnB,gDAAgD;IAChD,cAAc,KAAA;IACd,8BAA8B;IAC9B,eAAe,KAAA;IACf,mCAAmC;IACnC,IAAI,KAAA;CACL;AAED;;;;;;;;;GASG;AACH,qBAAa,iBAAiB;IAC5B,kDAAkD;IAClD,OAAO,CAAC,KAAK,CAAc;IAE3B,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAAiB;IAEvC,wDAAwD;IACxD,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;;OAIG;gBACS,IAAI,EAAE,YAAY;IAuB9B;;OAEG;IACH,IAAI,aAAa,mBAEhB;IAED;;;;OAIG;IACH,SAAS,CAAC,UAAU,EAAE,cAAc;IAepC;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIrE;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;CAsB5B"}
@@ -1,3 +1,4 @@
1
+ import { AcDbSysVarManager } from '@mlightcad/data-model';
1
2
  /**
2
3
  * Enumeration of cursor types available in the CAD editor.
3
4
  *
@@ -59,48 +60,47 @@ export var AcEdCorsorType;
59
60
  *
60
61
  * The cursor manager maintains a cache of cursor definitions to avoid
61
62
  * recreating them repeatedly, improving performance.
62
- *
63
- * @internal This class is for internal use by the editor system
64
- *
65
- * @example
66
- * ```typescript
67
- * const cursorManager = new AcEdCursorManager();
68
- * const canvas = document.getElementById('canvas') as HTMLCanvasElement;
69
- *
70
- * // Set crosshair cursor
71
- * cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
72
- *
73
- * // Set grab cursor for panning
74
- * cursorManager.setCursor(AcEdCorsorType.Grab, canvas);
75
- * ```
76
63
  */
77
64
  var AcEdCursorManager = /** @class */ (function () {
78
65
  /**
79
66
  * Creates a new cursor manager instance.
80
- *
81
- * Initializes the cursor cache and creates default cursor definitions.
67
+ * Initializes the cursor and creates default cursor definitions.
68
+ * @param view - The view associated with the cursor manager
82
69
  */
83
- function AcEdCursorManager() {
70
+ function AcEdCursorManager(view) {
71
+ var _this = this;
72
+ this._view = view;
84
73
  this._cursorMap = new Map();
85
- this._cursorMap.set(AcEdCorsorType.Crosshair, this.createRectCrossIcon(10, 10));
74
+ var totalLength = 20;
75
+ var rectSize = 10;
76
+ this._cursorMap.set(AcEdCorsorType.Crosshair, this.createRectCrossIcon(rectSize, totalLength - rectSize));
77
+ AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(function (args) {
78
+ if (args.name === 'PICKBOX') {
79
+ var size = args.newVal;
80
+ size = size >= 0 ? size : 0;
81
+ _this._cursorMap.set(AcEdCorsorType.Crosshair, _this.createRectCrossIcon(size, totalLength - size));
82
+ _this.setCursor(_this._currentCursor);
83
+ }
84
+ });
85
+ this.setCursor(AcEdCorsorType.Crosshair);
86
86
  }
87
+ Object.defineProperty(AcEdCursorManager.prototype, "currentCursor", {
88
+ /**
89
+ * The current cursor type for the associated view.
90
+ */
91
+ get: function () {
92
+ return this._currentCursor;
93
+ },
94
+ enumerable: false,
95
+ configurable: true
96
+ });
87
97
  /**
88
- * Sets the cursor for the specified HTML element.
89
- *
90
- * Applies the appropriate cursor style based on the cursor type.
91
- * For built-in cursor types, uses CSS cursor values. For custom
92
- * cursor types, uses cached SVG-based cursor definitions.
98
+ * Sets the current cursor for the associated view.
93
99
  *
94
100
  * @param cursorType - The type of cursor to set
95
- * @param element - The HTML element to apply the cursor to
96
- *
97
- * @example
98
- * ```typescript
99
- * const canvas = document.getElementById('canvas') as HTMLCanvasElement;
100
- * cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
101
- * ```
102
101
  */
103
- AcEdCursorManager.prototype.setCursor = function (cursorType, element) {
102
+ AcEdCursorManager.prototype.setCursor = function (cursorType) {
103
+ var element = this._view.canvas;
104
104
  if (cursorType <= AcEdCorsorType.NoSpecialCursor) {
105
105
  element.style.cursor = 'default';
106
106
  }
@@ -113,6 +113,7 @@ var AcEdCursorManager = /** @class */ (function () {
113
113
  element.style.cursor = cursor;
114
114
  }
115
115
  }
116
+ this._currentCursor = cursorType;
116
117
  };
117
118
  /**
118
119
  * Encodes an SVG string into a CSS cursor URL.
@@ -1 +1 @@
1
- {"version":3,"file":"AcEdCursorManager.js","sourceRoot":"","sources":["../../../src/editor/input/AcEdCursorManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,cA+BX;AA/BD,WAAY,cAAc;IACxB,+CAA+C;IAC/C,0EAAoB,CAAA;IACpB,mDAAmD;IACnD,6DAAa,CAAA;IACb,0CAA0C;IAC1C,+DAAU,CAAA;IACV,6CAA6C;IAC7C,+DAAU,CAAA;IACV,yBAAyB;IACzB,+DAAU,CAAA;IACV,4CAA4C;IAC5C,6DAAS,CAAA;IACT,+BAA+B;IAC/B,2EAAgB,CAAA;IAChB,8CAA8C;IAC9C,6EAAiB,CAAA;IACjB,yCAAyC;IACzC,6DAAS,CAAA;IACT,8BAA8B;IAC9B,mEAAY,CAAA;IACZ,iDAAiD;IACjD,qEAAa,CAAA;IACb,+CAA+C;IAC/C,kFAAmB,CAAA;IACnB,gDAAgD;IAChD,wEAAc,CAAA;IACd,8BAA8B;IAC9B,0EAAe,CAAA;IACf,mCAAmC;IACnC,oDAAI,CAAA;AACN,CAAC,EA/BW,cAAc,KAAd,cAAc,QA+BzB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAIE;;;;OAIG;IACH;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CACjB,cAAc,CAAC,SAAS,EACxB,IAAI,CAAC,mBAAmB,CAAC,EAAE,EAAE,EAAE,CAAC,CACjC,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,qCAAS,GAAT,UAAU,UAA0B,EAAE,OAAoB;QACxD,IAAI,UAAU,I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BAAa,SAAS,gDAClI,QAAQ,GAAG,UAAU,qBAAS,UAAU,qBAAS,QAAQ,GAAG,UAAU,yBAAa,SAAS,8BAElH,CAAA;QACD,OAAO,IAAI,CAAC,iBAAiB,CAC3B,GAAG,EACH,QAAQ,GAAG,UAAU,EACrB,QAAQ,GAAG,UAAU,CACtB,CAAA;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AApHD,IAoHC"}
@@ -0,0 +1,103 @@
1
+ import { AcDbEntity } from '@mlightcad/data-model';
2
+ import { AcEdBaseView } from '../view/AcEdBaseView';
3
+ /**
4
+ * @class AcEdPreviewJig<T>
5
+ * @template T
6
+ *
7
+ * @description
8
+ * A generic, TypeScript-based version of AutoCAD’s AcEdJig system for
9
+ * interactive previews during editor input.
10
+ *
11
+ * This class manages a *transient preview entity* that updates dynamically
12
+ * as the user moves the cursor or provides other incremental input.
13
+ *
14
+ * ## Why Generic?
15
+ * AutoCAD’s jig can sample different types of values:
16
+ * - a 3D point → during acquirePoint()
17
+ * - a distance → during acquireDistance()
18
+ * - an angle → during acquireAngle()
19
+ *
20
+ * Using a generic type parameter `T` allows the jig to update entities
21
+ * based on different input types while sharing the same structure.
22
+ *
23
+ * ## Method Mapping vs AutoCAD AcEdJig
24
+ * | AutoCAD AcEdJig Method | Purpose | This Class |
25
+ * |-------------------------|---------|------------|
26
+ * | `sampler()` | Sample new input | `update(value: T)` |
27
+ * | `worldDraw()` | Draw geometry | `render()` |
28
+ * | `startJig()` | Begin preview | `setEntity()` |
29
+ * | `drag()` | Main loop | Controlled externally via JS events |
30
+ *
31
+ * ## Entity Integration
32
+ * The preview entity may optionally implement:
33
+ * ```ts
34
+ * onJigUpdate(value: T): void
35
+ * ```
36
+ * When present, the jig will call it whenever the input changes.
37
+ *
38
+ * ## Example Use Cases
39
+ * - Point acquisition (`T = AcGePoint3d`)
40
+ * - Distance jig (`T = number`)
41
+ * - Angle jig (`T = number`)
42
+ *
43
+ * Example:
44
+ * ```ts
45
+ * const jig = new AcEdPreviewJig<AcGePoint3d>(view)
46
+ * jig.setEntity(circleEntity)
47
+ * await editor.getPoint("Specify center:", { jig })
48
+ * ```
49
+ */
50
+ export declare abstract class AcEdPreviewJig<T> {
51
+ private view;
52
+ /**
53
+ * Construct a new preview jig.
54
+ *
55
+ * @param view The CAD drawing view responsible for rendering transient graphics.
56
+ * Called via `view.draw(entity)` on each update.
57
+ */
58
+ constructor(view: AcEdBaseView);
59
+ /**
60
+ * Assign the preview entity used by the jig.
61
+ *
62
+ * The entity should be transient (not yet added to the model database).
63
+ *
64
+ * @param ent The preview entity to display.
65
+ */
66
+ abstract get entity(): AcDbEntity | null;
67
+ /**
68
+ * Update the preview entity based on incremental input.
69
+ *
70
+ * This method replaces the older `updatePoint()` and now accepts any type `T`,
71
+ * enabling use for point, distance, angle, or custom parameter updates.
72
+ *
73
+ * This function performs the conceptual role of AutoCAD’s `sampler()`:
74
+ * the editor triggers this method whenever the user’s input changes.
75
+ *
76
+ * If the preview entity implements:
77
+ * ```ts
78
+ * onJigUpdate(value: T)
79
+ * ```
80
+ * then it will be invoked here to recompute geometry.
81
+ *
82
+ * @param value Incremental value of type `T` describing new jig input.
83
+ * Examples:
84
+ * - world point
85
+ * - radius/distance
86
+ * - angle in radians
87
+ */
88
+ abstract update(value: T): void;
89
+ /**
90
+ * Render the preview entity through the associated view.
91
+ *
92
+ * Equivalent to AutoCAD’s `worldDraw()` — called after each `update(value)`.
93
+ */
94
+ render(): void;
95
+ /**
96
+ * End the jig and clear any transient preview state.
97
+ *
98
+ * Should be called when the user finalizes input (mouse click or Enter)
99
+ * to prevent further updates and allow garbage collection.
100
+ */
101
+ end(): void;
102
+ }
103
+ //# sourceMappingURL=AcEdPreviewJig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdPreviewJig.d.ts","sourceRoot":"","sources":["../../../src/editor/input/AcEdPreviewJig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,8BAAsB,cAAc,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,CAAc;IAE1B;;;;;OAKG;gBACS,IAAI,EAAE,YAAY;IAI9B;;;;;;OAMG;IACH,QAAQ,KAAK,MAAM,IAAI,UAAU,GAAG,IAAI,CAAA;IAExC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAE/B;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAMd;;;;;OAKG;IACH,GAAG,IAAI,IAAI;CAKZ"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @class AcEdPreviewJig<T>
3
+ * @template T
4
+ *
5
+ * @description
6
+ * A generic, TypeScript-based version of AutoCAD’s AcEdJig system for
7
+ * interactive previews during editor input.
8
+ *
9
+ * This class manages a *transient preview entity* that updates dynamically
10
+ * as the user moves the cursor or provides other incremental input.
11
+ *
12
+ * ## Why Generic?
13
+ * AutoCAD’s jig can sample different types of values:
14
+ * - a 3D point → during acquirePoint()
15
+ * - a distance → during acquireDistance()
16
+ * - an angle → during acquireAngle()
17
+ *
18
+ * Using a generic type parameter `T` allows the jig to update entities
19
+ * based on different input types while sharing the same structure.
20
+ *
21
+ * ## Method Mapping vs AutoCAD AcEdJig
22
+ * | AutoCAD AcEdJig Method | Purpose | This Class |
23
+ * |-------------------------|---------|------------|
24
+ * | `sampler()` | Sample new input | `update(value: T)` |
25
+ * | `worldDraw()` | Draw geometry | `render()` |
26
+ * | `startJig()` | Begin preview | `setEntity()` |
27
+ * | `drag()` | Main loop | Controlled externally via JS events |
28
+ *
29
+ * ## Entity Integration
30
+ * The preview entity may optionally implement:
31
+ * ```ts
32
+ * onJigUpdate(value: T): void
33
+ * ```
34
+ * When present, the jig will call it whenever the input changes.
35
+ *
36
+ * ## Example Use Cases
37
+ * - Point acquisition (`T = AcGePoint3d`)
38
+ * - Distance jig (`T = number`)
39
+ * - Angle jig (`T = number`)
40
+ *
41
+ * Example:
42
+ * ```ts
43
+ * const jig = new AcEdPreviewJig<AcGePoint3d>(view)
44
+ * jig.setEntity(circleEntity)
45
+ * await editor.getPoint("Specify center:", { jig })
46
+ * ```
47
+ */
48
+ var AcEdPreviewJig = /** @class */ (function () {
49
+ /**
50
+ * Construct a new preview jig.
51
+ *
52
+ * @param view The CAD drawing view responsible for rendering transient graphics.
53
+ * Called via `view.draw(entity)` on each update.
54
+ */
55
+ function AcEdPreviewJig(view) {
56
+ this.view = view;
57
+ }
58
+ /**
59
+ * Render the preview entity through the associated view.
60
+ *
61
+ * Equivalent to AutoCAD’s `worldDraw()` — called after each `update(value)`.
62
+ */
63
+ AcEdPreviewJig.prototype.render = function () {
64
+ if (this.entity) {
65
+ this.view.addTransientEntity(this.entity);
66
+ }
67
+ };
68
+ /**
69
+ * End the jig and clear any transient preview state.
70
+ *
71
+ * Should be called when the user finalizes input (mouse click or Enter)
72
+ * to prevent further updates and allow garbage collection.
73
+ */
74
+ AcEdPreviewJig.prototype.end = function () {
75
+ if (this.entity) {
76
+ this.view.removeTransientEntity(this.entity.objectId);
77
+ }
78
+ };
79
+ return AcEdPreviewJig;
80
+ }());
81
+ export { AcEdPreviewJig };
82
+ //# sourceMappingURL=AcEdPreviewJig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdPreviewJig.js","sourceRoot":"","sources":["../../../src/editor/input/AcEdPreviewJig.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IAGE;;;;;OAKG;IACH,wBAAY,IAAkB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAkCD;;;;OAIG;IACH,+BAAM,GAAN;QACE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,4BAAG,GAAH;QACE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QACvD,CAAC;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAnED,IAmEC"}