@mlightcad/cad-simple-viewer 1.2.4 → 1.2.5

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 (273) hide show
  1. package/dist/index.js +11406 -8892
  2. package/dist/index.umd.cjs +314 -24
  3. package/dist/libredwg-parser-worker.js +7267 -7238
  4. package/dist/mtext-renderer-worker.js +32 -9
  5. package/lib/app/AcApDocManager.d.ts +20 -3
  6. package/lib/app/AcApDocManager.d.ts.map +1 -1
  7. package/lib/app/AcApDocManager.js +66 -11
  8. package/lib/app/AcApDocManager.js.map +1 -1
  9. package/lib/app/AcApProgress.d.ts +133 -0
  10. package/lib/app/AcApProgress.d.ts.map +1 -0
  11. package/lib/app/AcApProgress.js +148 -0
  12. package/lib/app/AcApProgress.js.map +1 -0
  13. package/lib/app/AcApSettingManager.d.ts +42 -0
  14. package/lib/app/AcApSettingManager.d.ts.map +1 -1
  15. package/lib/app/AcApSettingManager.js +63 -0
  16. package/lib/app/AcApSettingManager.js.map +1 -1
  17. package/lib/app/index.d.ts +0 -1
  18. package/lib/app/index.d.ts.map +1 -1
  19. package/lib/app/index.js +0 -1
  20. package/lib/app/index.js.map +1 -1
  21. package/lib/command/AcApCircleCmd.d.ts +21 -0
  22. package/lib/command/AcApCircleCmd.d.ts.map +1 -0
  23. package/lib/command/AcApCircleCmd.js +115 -0
  24. package/lib/command/AcApCircleCmd.js.map +1 -0
  25. package/lib/command/AcApDimCmd.d.ts +57 -0
  26. package/lib/command/AcApDimCmd.d.ts.map +1 -0
  27. package/lib/command/AcApDimCmd.js +228 -0
  28. package/lib/command/AcApDimCmd.js.map +1 -0
  29. package/lib/command/AcApLogCmd.d.ts +13 -0
  30. package/lib/command/AcApLogCmd.d.ts.map +1 -0
  31. package/lib/command/AcApLogCmd.js +97 -0
  32. package/lib/command/AcApLogCmd.js.map +1 -0
  33. package/lib/command/AcApSysVarCmd.d.ts +15 -0
  34. package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
  35. package/lib/command/AcApSysVarCmd.js +94 -0
  36. package/lib/command/AcApSysVarCmd.js.map +1 -0
  37. package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
  38. package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
  39. package/lib/command/AcApZoomToBoxCmd.js +4 -61
  40. package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
  41. package/lib/command/index.d.ts +4 -0
  42. package/lib/command/index.d.ts.map +1 -1
  43. package/lib/command/index.js +4 -0
  44. package/lib/command/index.js.map +1 -1
  45. package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
  46. package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
  47. package/lib/editor/command/AcEdCommandStack.js +40 -0
  48. package/lib/editor/command/AcEdCommandStack.js.map +1 -1
  49. package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
  50. package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
  51. package/lib/editor/input/AcEdCursorManager.js +32 -31
  52. package/lib/editor/input/AcEdCursorManager.js.map +1 -1
  53. package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
  54. package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
  55. package/lib/editor/input/AcEdPreviewJig.js +82 -0
  56. package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
  57. package/lib/editor/input/AcEditor.d.ts +58 -11
  58. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  59. package/lib/editor/input/AcEditor.js +86 -22
  60. package/lib/editor/input/AcEditor.js.map +1 -1
  61. package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
  62. package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
  63. package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
  64. package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
  65. package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
  66. package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
  67. package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
  68. package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
  69. package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
  70. package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
  71. package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
  72. package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
  73. package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
  74. package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
  75. package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
  76. package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
  77. package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
  78. package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
  79. package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
  80. package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
  81. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
  82. package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
  83. package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
  84. package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
  85. package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
  86. package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
  87. package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
  88. package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
  89. package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
  90. package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
  91. package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
  92. package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
  93. package/lib/editor/input/handler/index.d.ts +9 -0
  94. package/lib/editor/input/handler/index.d.ts.map +1 -0
  95. package/lib/editor/input/handler/index.js +9 -0
  96. package/lib/editor/input/handler/index.js.map +1 -0
  97. package/lib/editor/input/index.d.ts +4 -1
  98. package/lib/editor/input/index.d.ts.map +1 -1
  99. package/lib/editor/input/index.js +4 -1
  100. package/lib/editor/input/index.js.map +1 -1
  101. package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
  102. package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
  103. package/lib/editor/input/marker/AcEdMarker.js +124 -0
  104. package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
  105. package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
  106. package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
  107. package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
  108. package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
  109. package/lib/editor/input/marker/index.d.ts +3 -0
  110. package/lib/editor/input/marker/index.d.ts.map +1 -0
  111. package/lib/editor/input/marker/index.js +3 -0
  112. package/lib/editor/input/marker/index.js.map +1 -0
  113. package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
  114. package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
  115. package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
  116. package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
  117. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
  118. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
  119. package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
  120. package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
  121. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
  122. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
  123. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
  124. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
  125. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
  126. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
  127. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
  128. package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
  129. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
  130. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
  131. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
  132. package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
  133. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
  134. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
  135. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
  136. package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
  137. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
  138. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
  139. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
  140. package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
  141. package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
  142. package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
  143. package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
  144. package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
  145. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
  146. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
  147. package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
  148. package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
  149. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
  150. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
  151. package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
  152. package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
  153. package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
  154. package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
  155. package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
  156. package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
  157. package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
  158. package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
  159. package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
  160. package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
  161. package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
  162. package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
  163. package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
  164. package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
  165. package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
  166. package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
  167. package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
  168. package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
  169. package/lib/editor/input/prompt/index.d.ts +11 -0
  170. package/lib/editor/input/prompt/index.d.ts.map +1 -0
  171. package/lib/editor/input/prompt/index.js +11 -0
  172. package/lib/editor/input/prompt/index.js.map +1 -0
  173. package/lib/editor/input/ui/AcEdCommandLine.d.ts +114 -0
  174. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
  175. package/lib/editor/input/ui/AcEdCommandLine.js +453 -0
  176. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
  177. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
  178. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
  179. package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
  180. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
  181. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
  182. package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
  183. package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
  184. package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
  185. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
  186. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
  187. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
  188. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
  189. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
  190. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
  191. package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
  192. package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
  193. package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
  194. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
  195. package/lib/editor/input/ui/AcEdInputManager.js +477 -0
  196. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
  197. package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
  198. package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
  199. package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
  200. package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
  201. package/lib/editor/input/ui/index.d.ts +3 -0
  202. package/lib/editor/input/ui/index.d.ts.map +1 -0
  203. package/lib/editor/input/ui/index.js +3 -0
  204. package/lib/editor/input/ui/index.js.map +1 -0
  205. package/lib/editor/view/AcEdBaseView.d.ts +35 -11
  206. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  207. package/lib/editor/view/AcEdBaseView.js +14 -11
  208. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  209. package/lib/i18n/AcApI18n.d.ts +135 -0
  210. package/lib/i18n/AcApI18n.d.ts.map +1 -0
  211. package/lib/i18n/AcApI18n.js +208 -0
  212. package/lib/i18n/AcApI18n.js.map +1 -0
  213. package/lib/i18n/en/command.d.ts +18 -0
  214. package/lib/i18n/en/command.d.ts.map +1 -0
  215. package/lib/i18n/en/command.js +17 -0
  216. package/lib/i18n/en/command.js.map +1 -0
  217. package/lib/i18n/en/jig.d.ts +11 -0
  218. package/lib/i18n/en/jig.d.ts.map +1 -0
  219. package/lib/i18n/en/jig.js +10 -0
  220. package/lib/i18n/en/jig.js.map +1 -0
  221. package/lib/i18n/en/main.d.ts +37 -0
  222. package/lib/i18n/en/main.d.ts.map +1 -0
  223. package/lib/i18n/en/main.js +36 -0
  224. package/lib/i18n/en/main.js.map +1 -0
  225. package/lib/i18n/index.d.ts +6 -0
  226. package/lib/i18n/index.d.ts.map +1 -0
  227. package/lib/i18n/index.js +31 -0
  228. package/lib/i18n/index.js.map +1 -0
  229. package/lib/i18n/zh/command.d.ts +18 -0
  230. package/lib/i18n/zh/command.d.ts.map +1 -0
  231. package/lib/i18n/zh/command.js +17 -0
  232. package/lib/i18n/zh/command.js.map +1 -0
  233. package/lib/i18n/zh/jig.d.ts +11 -0
  234. package/lib/i18n/zh/jig.d.ts.map +1 -0
  235. package/lib/i18n/zh/jig.js +10 -0
  236. package/lib/i18n/zh/jig.js.map +1 -0
  237. package/lib/i18n/zh/main.d.ts +37 -0
  238. package/lib/i18n/zh/main.d.ts.map +1 -0
  239. package/lib/i18n/zh/main.js +36 -0
  240. package/lib/i18n/zh/main.js.map +1 -0
  241. package/lib/index.d.ts +1 -0
  242. package/lib/index.d.ts.map +1 -1
  243. package/lib/index.js +1 -0
  244. package/lib/index.js.map +1 -1
  245. package/lib/view/AcTrScene.d.ts +19 -6
  246. package/lib/view/AcTrScene.d.ts.map +1 -1
  247. package/lib/view/AcTrScene.js +25 -6
  248. package/lib/view/AcTrScene.js.map +1 -1
  249. package/lib/view/AcTrView2d.d.ts +11 -1
  250. package/lib/view/AcTrView2d.d.ts.map +1 -1
  251. package/lib/view/AcTrView2d.js +73 -35
  252. package/lib/view/AcTrView2d.js.map +1 -1
  253. package/package.json +7 -7
  254. package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
  255. package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
  256. package/lib/editor/input/AcEdBaseInput.js +0 -166
  257. package/lib/editor/input/AcEdBaseInput.js.map +0 -1
  258. package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
  259. package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
  260. package/lib/editor/input/AcEdBoxSelector.js +0 -220
  261. package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
  262. package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
  263. package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
  264. package/lib/editor/input/AcEdInputPoint.js +0 -78
  265. package/lib/editor/input/AcEdInputPoint.js.map +0 -1
  266. package/lib/editor/input/AcEdJig.d.ts +0 -180
  267. package/lib/editor/input/AcEdJig.d.ts.map +0 -1
  268. package/lib/editor/input/AcEdJig.js +0 -256
  269. package/lib/editor/input/AcEdJig.js.map +0 -1
  270. package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
  271. package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
  272. package/lib/editor/input/AcEdJigLoop.js +0 -91
  273. package/lib/editor/input/AcEdJigLoop.js.map +0 -1
@@ -0,0 +1,453 @@
1
+ import { AcApDocManager } from '../../../app';
2
+ import { AcApI18n } from '../../../i18n';
3
+ import { AcEdCommandStack } from '../../command';
4
+ /**
5
+ * AutoCAD-style floating command line with Promise-based execution.
6
+ *
7
+ * Features:
8
+ * - Floating command bar with left terminal glyph + down toggle and right up toggle
9
+ * - Command history popup
10
+ * - Message panel above the bar
11
+ * - Enter repeats last command if input empty
12
+ * - Esc cancels current command
13
+ * - Inline clickable options
14
+ * - Keyboard navigation
15
+ * - Promise-based execution for async command handling
16
+ * - Auto-complete popup for matching commands
17
+ */
18
+ var AcEdCommandLine = /** @class */ (function () {
19
+ function AcEdCommandLine(container) {
20
+ if (container === void 0) { container = document.body; }
21
+ var _this = this;
22
+ this.container = container;
23
+ this.history = [];
24
+ this.historyIndex = -1;
25
+ this.lastExecuted = null;
26
+ this.isCmdPopupOpen = false;
27
+ this.isMsgPanelOpen = false;
28
+ this.minWidth = 420;
29
+ this.widthRatio = 0.66;
30
+ this.autoCompleteIndex = -1;
31
+ this.injectCSS();
32
+ this.createUI();
33
+ this.bindEvents();
34
+ this.resizeHandler();
35
+ window.addEventListener('resize', function () { return _this.resizeHandler(); });
36
+ AcApI18n.events.localeChanged.addEventListener(function () { return _this.refreshLocale(); });
37
+ }
38
+ Object.defineProperty(AcEdCommandLine.prototype, "visible", {
39
+ /** Visibility of the command line */
40
+ get: function () {
41
+ return this.cliContainer.style.display !== 'none';
42
+ },
43
+ set: function (val) {
44
+ this.cliContainer.style.display = val ? 'block' : 'none';
45
+ },
46
+ enumerable: false,
47
+ configurable: true
48
+ });
49
+ /**
50
+ * Localize a text key using AcApI18n.t().
51
+ *
52
+ * This helper centralizes localization calls for the class and makes
53
+ * it easier to adjust localization behavior in one place if needed.
54
+ *
55
+ * @param key - Localization key (flat key style, e.g. "command.placeholder")
56
+ * @param defaultText - Default English (or fallback) text to use if the key is missing
57
+ * @returns localized string from AcApI18n or the provided defaultText
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const placeholder = this.localize('main.commandLine.placeholder', 'Type command')
62
+ * ```
63
+ */
64
+ AcEdCommandLine.prototype.localize = function (key, defaultText) {
65
+ return AcApI18n.t(key, { fallback: defaultText });
66
+ };
67
+ /** Refresh all messages when locale changes */
68
+ AcEdCommandLine.prototype.refreshLocale = function () {
69
+ var _this = this;
70
+ Array.from(this.msgPanel.children).forEach(function (child) {
71
+ var _a, _b, _c, _d, _e, _f;
72
+ var div = child;
73
+ var key = div.dataset.msgKey;
74
+ if (key) {
75
+ if (key === 'main.commandLine.executed') {
76
+ // Preserve the command name part
77
+ var cmdName = (_c = (_b = (_a = div.textContent) === null || _a === void 0 ? void 0 : _a.split(':')[1]) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
78
+ div.textContent = "".concat(_this.localize(key), ": ").concat(cmdName);
79
+ }
80
+ else if (key === 'main.commandLine.unknownCommand') {
81
+ var cmd = (_f = (_e = (_d = div.textContent) === null || _d === void 0 ? void 0 : _d.split(':')[1]) === null || _e === void 0 ? void 0 : _e.trim()) !== null && _f !== void 0 ? _f : '';
82
+ div.textContent = "".concat(_this.localize(key), ": ").concat(cmd);
83
+ }
84
+ else {
85
+ div.textContent = _this.localize(key);
86
+ }
87
+ }
88
+ });
89
+ // Refresh input placeholder
90
+ this.input.setAttribute('data-placeholder', this.localize('main.commandLine.placeholder'));
91
+ // Refresh button titles
92
+ this.downBtn.title = this.localize('main.commandLine.showHistory');
93
+ this.upBtn.title = this.localize('main.commandLine.showMessages');
94
+ };
95
+ /**
96
+ * Execute a command line string.
97
+ * Returns a Promise that resolves when the command is completed.
98
+ * @param cmdLine - Command string
99
+ * @returns Promise<void>
100
+ */
101
+ AcEdCommandLine.prototype.executeCommand = function (cmdLine) {
102
+ if (!cmdLine || !cmdLine.trim()) {
103
+ if (this.lastExecuted)
104
+ cmdLine = this.lastExecuted;
105
+ else {
106
+ this.printMessage(this.localize('main.commandLine.noLast', '(no last command)'));
107
+ return;
108
+ }
109
+ }
110
+ var command = this.resolveCommand(cmdLine);
111
+ if (!command) {
112
+ var unknown = this.localize('main.commandLine.unknownCommand');
113
+ this.printError("".concat(unknown, ": ").concat(cmdLine));
114
+ return;
115
+ }
116
+ this.history.push(command.globalName);
117
+ this.historyIndex = this.history.length;
118
+ this.lastExecuted = command.globalName;
119
+ this.printHistoryLine(cmdLine);
120
+ var executed = this.localize('main.commandLine.executed');
121
+ this.printMessage("".concat(executed, ": ").concat(command.localName));
122
+ AcApDocManager.instance.sendStringToExecute(cmdLine);
123
+ this.renderCommandLine('');
124
+ };
125
+ /** Inject CSS styles */
126
+ AcEdCommandLine.prototype.injectCSS = function () {
127
+ var style = document.createElement('style');
128
+ style.textContent = "\n .ml-cli-container {\n position: fixed;\n bottom: 45px;\n left: 50%;\n transform: translateX(-50%);\n font-family: \"Segoe UI\", Arial, sans-serif;\n font-size: 13px;\n box-sizing: border-box;\n user-select: none;\n }\n\n .ml-cli-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n border-radius: 6px;\n background: linear-gradient(#ededed, #e0e0e0);\n border: 1px solid rgba(0, 0, 0, 0.35);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);\n min-width: 300px;\n height: 32px;\n }\n\n .ml-cli-left {\n display: flex;\n align-items: center;\n gap: 6px;\n background: rgba(0, 0, 0, 0.06);\n padding: 4px 6px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n height: 100%;\n }\n\n .ml-cli-term {\n width: 22px;\n height: 18px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 3px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.15);\n font-weight: 700;\n color: #222;\n font-size: 12px;\n }\n\n .ml-cli-down,\n .ml-cli-up {\n width: 20px;\n height: 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 3px;\n background: transparent;\n border: none;\n cursor: pointer;\n font-size: 20px;\n color: #222;\n padding: 0;\n }\n\n .ml-cli-input {\n flex: 1;\n display: flex;\n align-items: center;\n min-height: 22px;\n padding: 0 6px;\n border-radius: 3px;\n background: transparent;\n outline: none;\n border: none;\n font-family: monospace;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n line-height: normal;\n }\n\n .ml-cli-input[data-placeholder]:empty:before {\n content: attr(data-placeholder);\n color: #9a9a9a;\n font-weight: 400;\n display: flex;\n align-items: center;\n height: 100%;\n }\n\n .ml-cli-option {\n display: inline-block;\n color: #222;\n background: #f7f7f7;\n border: 1px solid rgba(0, 0, 0, 0.06);\n padding: 2px 6px;\n border-radius: 3px;\n margin: 0 4px;\n cursor: pointer;\n font-size: 12px;\n }\n\n .ml-cli-option:hover {\n background: #eaeaea;\n }\n\n .ml-cli-cmd-popup {\n position: absolute;\n bottom: 100%;\n left: 0;\n transform: translate(0, 0);\n max-height: 220px;\n overflow-y: auto;\n background: #333;\n border: 1px solid rgba(0, 0, 0, 0.5);\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);\n border-radius: 4px;\n padding: 6px 0;\n color: #fff;\n }\n\n .ml-cli-cmd-popup .item {\n padding: 8px 14px;\n cursor: pointer;\n color: #fff;\n font-size: 14px;\n }\n\n .ml-cli-cmd-popup .item:hover {\n background: #444;\n }\n\n .ml-cli-msg-panel {\n position: absolute;\n bottom: 100%;\n left: 0;\n transform: translate(0, 0);\n max-height: 340px;\n overflow-y: auto;\n background: #333;\n border: 1px solid rgba(0, 0, 0, 0.5);\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);\n border-radius: 4px;\n padding: 6px 0;\n font-family: \"Microsoft YaHei\", Arial, sans-serif;\n color: #fff;\n font-size: 14px;\n white-space: pre-wrap;\n line-height: 1.35;\n }\n\n .ml-cli-history-line {\n padding: 4px 6px;\n color: #fff;\n }\n\n .ml-cli-msg-error {\n color: #ff5555;\n }\n\n .ml-cli-wrapper {\n position: relative;\n width: 100%;\n }\n\n .hidden {\n display: none !important;\n }\n\n .ml-cli-cmd-popup::-webkit-scrollbar,\n .ml-cli-msg-panel::-webkit-scrollbar {\n width: 10px;\n }\n\n .ml-cli-cmd-popup::-webkit-scrollbar-thumb,\n .ml-cli-msg-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 6px;\n }\n ";
129
+ document.head.appendChild(style);
130
+ };
131
+ /** Create the command line UI elements */
132
+ AcEdCommandLine.prototype.createUI = function () {
133
+ this.cliContainer = document.createElement('div');
134
+ this.cliContainer.className = 'ml-cli-container';
135
+ this.wrapper = document.createElement('div');
136
+ this.wrapper.className = 'ml-cli-wrapper';
137
+ this.cliContainer.appendChild(this.wrapper);
138
+ this.bar = document.createElement('div');
139
+ this.bar.className = 'ml-cli-bar';
140
+ this.wrapper.appendChild(this.bar);
141
+ this.leftGroup = document.createElement('div');
142
+ this.leftGroup.className = 'ml-cli-left';
143
+ this.bar.appendChild(this.leftGroup);
144
+ this.termGlyph = document.createElement('div');
145
+ this.termGlyph.className = 'ml-cli-term';
146
+ this.termGlyph.textContent = '>';
147
+ this.leftGroup.appendChild(this.termGlyph);
148
+ this.downBtn = document.createElement('button');
149
+ this.downBtn.className = 'ml-cli-down';
150
+ this.downBtn.title = this.localize('main.commandLine.showHistory');
151
+ this.downBtn.innerHTML = '&#9662;';
152
+ this.leftGroup.appendChild(this.downBtn);
153
+ this.input = document.createElement('div');
154
+ this.input.className = 'ml-cli-input';
155
+ this.input.contentEditable = 'true';
156
+ this.input.setAttribute('spellcheck', 'false');
157
+ this.input.setAttribute('data-placeholder', this.localize('main.commandLine.placeholder'));
158
+ this.bar.appendChild(this.input);
159
+ this.upBtn = document.createElement('button');
160
+ this.upBtn.className = 'ml-cli-up';
161
+ this.upBtn.title = this.localize('main.commandLine.showMessages');
162
+ this.upBtn.innerHTML = '&#9652;';
163
+ this.bar.appendChild(this.upBtn);
164
+ this.cmdPopup = document.createElement('div');
165
+ this.cmdPopup.className = 'ml-cli-cmd-popup hidden';
166
+ this.wrapper.appendChild(this.cmdPopup);
167
+ this.msgPanel = document.createElement('div');
168
+ this.msgPanel.className = 'ml-cli-msg-panel hidden';
169
+ this.wrapper.appendChild(this.msgPanel);
170
+ this.container.appendChild(this.cliContainer);
171
+ };
172
+ /** Bind event listeners */
173
+ AcEdCommandLine.prototype.bindEvents = function () {
174
+ var _this = this;
175
+ this.downBtn.addEventListener('click', function (e) {
176
+ e.stopPropagation();
177
+ _this.isCmdPopupOpen = !_this.isCmdPopupOpen;
178
+ _this.updatePopups({ showCmd: _this.isCmdPopupOpen, showMsg: false });
179
+ if (_this.isCmdPopupOpen)
180
+ _this.showCommandHistoryPopup();
181
+ });
182
+ this.upBtn.addEventListener('click', function (e) {
183
+ e.stopPropagation();
184
+ _this.isMsgPanelOpen = !_this.isMsgPanelOpen;
185
+ _this.updatePopups({ showCmd: false, showMsg: _this.isMsgPanelOpen });
186
+ if (_this.isMsgPanelOpen)
187
+ _this.showMessagePanel();
188
+ });
189
+ document.addEventListener('click', function (e) {
190
+ if (!_this.cliContainer.contains(e.target)) {
191
+ _this.updatePopups({ showCmd: false, showMsg: false });
192
+ }
193
+ });
194
+ this.input.addEventListener('keydown', function (e) { return _this.handleKeyDown(e); });
195
+ this.input.addEventListener('keydown', function (e) { return _this.handleArrowKeys(e); });
196
+ this.input.addEventListener('input', function () { return _this.handleInputChange(); });
197
+ this.input.addEventListener('focus', function () {
198
+ return _this.updatePopups({ showCmd: false, showMsg: false });
199
+ });
200
+ this.cmdPopup.addEventListener('click', function (e) {
201
+ var item = e.target.closest('.item');
202
+ if (item) {
203
+ _this.setInputText(item.dataset.value || '');
204
+ _this.input.focus();
205
+ _this.updatePopups({ showCmd: false, showMsg: false });
206
+ }
207
+ });
208
+ };
209
+ /** Handle Enter/Escape keys */
210
+ AcEdCommandLine.prototype.handleKeyDown = function (e) {
211
+ if (e.key === 'Enter') {
212
+ e.preventDefault();
213
+ var text = this.getInputText();
214
+ this.executeCommand(text);
215
+ this.updatePopups({ showCmd: false, showMsg: false });
216
+ }
217
+ else if (e.key === 'Escape') {
218
+ e.preventDefault();
219
+ this.setInputText('');
220
+ this.printMessage(this.localize('main.commandLine.canceled'));
221
+ this.updatePopups({ showCmd: false, showMsg: false });
222
+ }
223
+ };
224
+ /** Handle Up/Down keys for history or auto-complete */
225
+ AcEdCommandLine.prototype.handleArrowKeys = function (e) {
226
+ if (e.key === 'ArrowUp') {
227
+ e.preventDefault();
228
+ if (this.isCmdPopupOpen)
229
+ this.navigateAutoComplete(-1);
230
+ else
231
+ this.navigateHistory(-1);
232
+ }
233
+ if (e.key === 'ArrowDown') {
234
+ e.preventDefault();
235
+ if (this.isCmdPopupOpen)
236
+ this.navigateAutoComplete(1);
237
+ else
238
+ this.navigateHistory(1);
239
+ }
240
+ };
241
+ /** Handle input change to show auto-complete */
242
+ AcEdCommandLine.prototype.handleInputChange = function () {
243
+ var _this = this;
244
+ var text = this.getInputText();
245
+ if (!text) {
246
+ this.updatePopups({ showCmd: false });
247
+ return;
248
+ }
249
+ var matches = AcEdCommandStack.instance.searchCommandsByPrefix(text);
250
+ if (matches.length) {
251
+ this.autoCompleteIndex = -1;
252
+ this.cmdPopup.innerHTML = '';
253
+ matches.forEach(function (item, idx) {
254
+ var div = document.createElement('div');
255
+ div.className = 'item';
256
+ div.dataset.value = item.command.globalName;
257
+ var description = AcApI18n.cmdDescription(item.commandGroup, item.command.globalName);
258
+ div.innerHTML = "<strong>".concat(item.command.globalName, " - ").concat(description, "</strong>");
259
+ if (idx === _this.autoCompleteIndex)
260
+ div.classList.add('selected');
261
+ _this.cmdPopup.appendChild(div);
262
+ });
263
+ this.updatePopups({ showCmd: true });
264
+ }
265
+ else {
266
+ this.updatePopups({ showCmd: false });
267
+ }
268
+ };
269
+ /** Navigate auto-complete list with arrow keys */
270
+ AcEdCommandLine.prototype.navigateAutoComplete = function (dir) {
271
+ var _this = this;
272
+ var _a;
273
+ var items = Array.from(this.cmdPopup.querySelectorAll('.item'));
274
+ if (!items.length)
275
+ return;
276
+ this.autoCompleteIndex += dir;
277
+ if (this.autoCompleteIndex < 0)
278
+ this.autoCompleteIndex = 0;
279
+ if (this.autoCompleteIndex >= items.length)
280
+ this.autoCompleteIndex = items.length - 1;
281
+ items.forEach(function (el, idx) {
282
+ el.classList.toggle('selected', idx === _this.autoCompleteIndex);
283
+ });
284
+ var selected = items[this.autoCompleteIndex];
285
+ if (selected) {
286
+ this.setInputText((_a = selected.dataset.value) !== null && _a !== void 0 ? _a : '');
287
+ }
288
+ };
289
+ /** Navigate command history */
290
+ AcEdCommandLine.prototype.navigateHistory = function (dir) {
291
+ if (!this.history.length)
292
+ return;
293
+ if (this.historyIndex === -1)
294
+ this.historyIndex = this.history.length;
295
+ this.historyIndex += dir;
296
+ if (this.historyIndex < 0)
297
+ this.historyIndex = 0;
298
+ if (this.historyIndex > this.history.length)
299
+ this.historyIndex = this.history.length;
300
+ if (this.historyIndex >= 0 && this.historyIndex < this.history.length) {
301
+ this.setInputText(this.history[this.historyIndex]);
302
+ }
303
+ else {
304
+ this.setInputText('');
305
+ }
306
+ };
307
+ /** Get current input text */
308
+ AcEdCommandLine.prototype.getInputText = function () {
309
+ var clone = this.input.cloneNode(true);
310
+ clone.querySelectorAll('.ml-cli-option').forEach(function (n) { return n.remove(); });
311
+ return clone.innerText.replace(/\u00A0/g, ' ').trim();
312
+ };
313
+ /** Set input text */
314
+ AcEdCommandLine.prototype.setInputText = function (text) {
315
+ if (text === void 0) { text = ''; }
316
+ this.input.innerHTML = '';
317
+ if (text)
318
+ this.input.appendChild(document.createTextNode(text + ' '));
319
+ this.setCursorToEnd();
320
+ };
321
+ /** Render command line with options */
322
+ AcEdCommandLine.prototype.renderCommandLine = function (cmd, options) {
323
+ var _this = this;
324
+ if (options === void 0) { options = []; }
325
+ this.input.innerHTML = '';
326
+ if (cmd)
327
+ this.input.appendChild(document.createTextNode(cmd + ' '));
328
+ options.forEach(function (opt) {
329
+ var span = document.createElement('span');
330
+ span.className = 'ml-cli-option';
331
+ span.textContent = opt;
332
+ span.addEventListener('click', function (e) {
333
+ e.stopPropagation();
334
+ _this.insertOption(opt);
335
+ });
336
+ _this.input.appendChild(span);
337
+ _this.input.appendChild(document.createTextNode(' '));
338
+ });
339
+ this.setCursorToEnd();
340
+ this.input.focus();
341
+ };
342
+ /** Insert option into input */
343
+ AcEdCommandLine.prototype.insertOption = function (opt) {
344
+ this.input.appendChild(document.createTextNode(opt + ' '));
345
+ this.setCursorToEnd();
346
+ this.input.focus();
347
+ };
348
+ /** Move cursor to end of input */
349
+ AcEdCommandLine.prototype.setCursorToEnd = function () {
350
+ var range = document.createRange();
351
+ range.selectNodeContents(this.input);
352
+ range.collapse(false);
353
+ var sel = window.getSelection();
354
+ if (!sel)
355
+ return;
356
+ sel.removeAllRanges();
357
+ sel.addRange(range);
358
+ this.input.scrollLeft = this.input.scrollWidth;
359
+ };
360
+ /** Resolve command name */
361
+ AcEdCommandLine.prototype.resolveCommand = function (cmdLine) {
362
+ var parts = cmdLine.trim().split(/\s+/);
363
+ var cmdStr = parts[0].toUpperCase();
364
+ // TODO: Should look up local cmd too
365
+ return AcEdCommandStack.instance.lookupLocalCmd(cmdStr);
366
+ };
367
+ /** Show or hide popups */
368
+ AcEdCommandLine.prototype.updatePopups = function (_a) {
369
+ var _b = _a === void 0 ? {} : _a, _c = _b.showCmd, showCmd = _c === void 0 ? false : _c, _d = _b.showMsg, showMsg = _d === void 0 ? false : _d;
370
+ this.isCmdPopupOpen = showCmd;
371
+ this.isMsgPanelOpen = showMsg;
372
+ this.cmdPopup.classList.toggle('hidden', !showCmd);
373
+ this.msgPanel.classList.toggle('hidden', !showMsg);
374
+ if (showCmd)
375
+ this.positionCmdPopup();
376
+ if (showMsg)
377
+ this.positionMsgPanel();
378
+ };
379
+ /** Show command history popup */
380
+ AcEdCommandLine.prototype.showCommandHistoryPopup = function () {
381
+ this.cmdPopup.innerHTML = '';
382
+ if (!this.history.length) {
383
+ var empty = document.createElement('div');
384
+ empty.className = 'item';
385
+ empty.textContent = this.localize('main.commandLine.noHistory');
386
+ this.cmdPopup.appendChild(empty);
387
+ }
388
+ else {
389
+ for (var i = this.history.length - 1; i >= 0; i--) {
390
+ var item = document.createElement('div');
391
+ item.className = 'item';
392
+ item.dataset.value = this.history[i];
393
+ item.textContent = this.history[i];
394
+ this.cmdPopup.appendChild(item);
395
+ }
396
+ }
397
+ this.positionCmdPopup();
398
+ };
399
+ /** Position command history popup */
400
+ AcEdCommandLine.prototype.positionCmdPopup = function () {
401
+ this.cmdPopup.style.left = '0px';
402
+ this.cmdPopup.style.width = this.bar.offsetWidth + 'px';
403
+ };
404
+ /** Show message panel */
405
+ AcEdCommandLine.prototype.showMessagePanel = function () {
406
+ this.msgPanel.scrollTop = this.msgPanel.scrollHeight;
407
+ this.positionMsgPanel();
408
+ };
409
+ /** Position message panel */
410
+ AcEdCommandLine.prototype.positionMsgPanel = function () {
411
+ this.msgPanel.style.width = this.bar.offsetWidth + 'px';
412
+ };
413
+ /** Print message to message panel with optional localization key */
414
+ AcEdCommandLine.prototype.printMessage = function (msg, msgKey) {
415
+ var div = document.createElement('div');
416
+ div.className = 'ml-cli-history-line';
417
+ div.textContent = msg;
418
+ if (msgKey)
419
+ div.dataset.msgKey = msgKey;
420
+ this.msgPanel.appendChild(div);
421
+ this.showMessagePanel();
422
+ };
423
+ /** Print error message with optional localization key */
424
+ AcEdCommandLine.prototype.printError = function (msg, msgKey) {
425
+ var div = document.createElement('div');
426
+ div.className = 'ml-cli-history-line ml-cli-msg-error';
427
+ div.textContent = msg;
428
+ if (msgKey)
429
+ div.dataset.msgKey = msgKey;
430
+ this.msgPanel.appendChild(div);
431
+ this.showMessagePanel();
432
+ };
433
+ /** Print executed command line to history */
434
+ AcEdCommandLine.prototype.printHistoryLine = function (cmdLine) {
435
+ var div = document.createElement('div');
436
+ div.className = 'ml-cli-history-line';
437
+ div.textContent = '> ' + cmdLine;
438
+ // For executed command messages, also store msgKey
439
+ div.dataset.msgKey = 'main.commandLine.executed';
440
+ this.msgPanel.appendChild(div);
441
+ this.showMessagePanel();
442
+ };
443
+ /** Handle window resize */
444
+ AcEdCommandLine.prototype.resizeHandler = function () {
445
+ var w = Math.max(this.minWidth, window.innerWidth * this.widthRatio);
446
+ this.bar.style.width = w + 'px';
447
+ this.positionMsgPanel();
448
+ this.positionCmdPopup();
449
+ };
450
+ return AcEdCommandLine;
451
+ }());
452
+ export { AcEdCommandLine };
453
+ //# sourceMappingURL=AcEdCommandLine.js.map
@@ -0,0 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D,GAAG,CAAC,WAAW,GAAG,GAAG,CAAA;QACrB,IAAI,MAAM;YAAE,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAA;QACvC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACzB,CAAC;IAED,6CAA6C;IAC7C,0CAAgB,GAAhB,UAAiB,OAAe;QAC9B,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACzC,GAAG,CAAC,SAAS,GAAG,qBAAqB,CAAA;QACrC,GAAG,CAAC,WAAW,GAAG,IAAI,GAAG,OAAO,CAAA;QAChC,mDAAmD;QACnD,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,2BAA2B,CAAA;QAChD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACzB,CAAC;IAED,2BAA2B;IAC3B,uCAAa,GAAb;QACE,IAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;QACtE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAA;QAC/B,IAAI,CAAC,gBAAgB,EAAE,CAAA;QACvB,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AAhpBD,IAgpBC"}
@@ -0,0 +1,151 @@
1
+ import { AcGePoint2dLike } from '@mlightcad/data-model';
2
+ import { AcEdFloatingInputOptions } from './AcEdFloatingInputTypes';
3
+ /**
4
+ * A UI component providing a small floating input box used inside CAD editing
5
+ * workflows. It supports both single-input (distance, angle, etc.) and
6
+ * double-input (coordinate entry) modes.
7
+ *
8
+ * The component is responsible for:
9
+ *
10
+ * - Creating, styling, and destroying its HTML structure
11
+ * - Handling keyboard events (Enter, Escape)
12
+ * - Managing live validation (via built-in or custom callback)
13
+ * - Emitting commit/change/cancel events
14
+ * - Ensuring no memory leaks via `dispose()`
15
+ *
16
+ * This abstraction allows higher-level objects such as AcEdInputManager to
17
+ * remain clean and free from DOM-handling logic.
18
+ */
19
+ export declare class AcEdFloatingInput<T> {
20
+ /**
21
+ * Mouse position in the parent element of the floating input.
22
+ */
23
+ mousePos?: AcGePoint2dLike;
24
+ /** Inject styles only once */
25
+ private static stylesInjected;
26
+ /**
27
+ * Parent element for positioning. Defaults to body if not provided.
28
+ */
29
+ private parent;
30
+ /**
31
+ * Root container DIV used to position and style the floating widget.
32
+ */
33
+ private container;
34
+ /**
35
+ * X and Y Input elements.
36
+ */
37
+ private inputs;
38
+ /**
39
+ * Callback functions
40
+ */
41
+ private onCommit?;
42
+ private onChange?;
43
+ private onCancel?;
44
+ private validateFn;
45
+ private getDynamicValue;
46
+ private drawPreview?;
47
+ /** Whether the widget is currently visible. */
48
+ private visible;
49
+ /** Whether this instance has been disposed. */
50
+ private disposed;
51
+ /**
52
+ * Cached bound handler for mouse enter event—ensures removal works.
53
+ */
54
+ private boundOnMouseEnter;
55
+ /**
56
+ * Cached bound handler for mouse leave event—ensures removal works.
57
+ */
58
+ private boundOnMouseLeave;
59
+ /**
60
+ * Cached bound handler for mouse move event—ensures removal works.
61
+ */
62
+ private boundOnMouseMove;
63
+ /**
64
+ * Cached bound handler for click event—ensures removal works.
65
+ */
66
+ private boundOnClick;
67
+ /**
68
+ * Constructs a new floating input widget with the given options.
69
+ *
70
+ * @param options Configuration object controlling behavior, callbacks,
71
+ * validation, and display mode.
72
+ */
73
+ constructor(options: AcEdFloatingInputOptions<T>);
74
+ /**
75
+ * Injects minimal CSS required for the floating input and preview rectangle.
76
+ * Useful when you do not have a separate CSS file.
77
+ */
78
+ private injectCSS;
79
+ /**
80
+ * Indicates whether the floating input widget is currently visible.
81
+ * Can be used by external code to check if the input is shown on the screen.
82
+ */
83
+ get isVisible(): boolean;
84
+ /**
85
+ * Shows the floating input box at the specified screen coordinates.
86
+ * @param pos - The mouse position in browser
87
+ */
88
+ showAt(pos: AcGePoint2dLike): void;
89
+ /**
90
+ * Hides the floating input widget.
91
+ *
92
+ * - Removes the widget from view.
93
+ * - Stops tracking mouse movement on the parent element.
94
+ *
95
+ * Safe to call multiple times; if the widget is already hidden, this method
96
+ * does nothing.
97
+ */
98
+ hide(): void;
99
+ /**
100
+ * Disposes the floating input widget permanently.
101
+ *
102
+ * - Removes all event listeners (keyboard, input, mouse move).
103
+ * - Removes the widget's DOM container from the parent.
104
+ * - Marks the widget as disposed; after this, it cannot be shown again.
105
+ *
106
+ * Safe to call multiple times; subsequent calls have no effect.
107
+ */
108
+ dispose(): void;
109
+ /**
110
+ * Sets position of this floating input
111
+ * @param pos - The mouse position in browser
112
+ * @returns The mouse position in the parent element of the floating input.
113
+ */
114
+ setPosition(pos: AcGePoint2dLike): {
115
+ x: number;
116
+ y: number;
117
+ };
118
+ /**
119
+ * Removes event listeners bound to the parent element
120
+ * @param isRemoveAll - If true, removes all of event listeners bound
121
+ * to the parent element
122
+ */
123
+ private removeListener;
124
+ /**
125
+ * Handles mouse move events to show floating input.
126
+ * @param e The mouse leave event.
127
+ */
128
+ private handleMouseEnter;
129
+ /**
130
+ * Handles mouse move events to hide floating input.
131
+ * @param e The mouse leave event.
132
+ */
133
+ private handleMouseLeave;
134
+ /**
135
+ * Handles mouse move events to reposition the floating input.
136
+ *
137
+ * Ensures that the input box follows the cursor while staying entirely
138
+ * within the bounds of the parent element. Applies a small offset
139
+ * to avoid overlapping the cursor.
140
+ *
141
+ * @param e The mouse move event containing the current cursor position.
142
+ */
143
+ private handleMouseMove;
144
+ /**
145
+ * Handles click events to commit inputs.
146
+ *
147
+ * @param e The click event containing the current cursor position.
148
+ */
149
+ private handleClick;
150
+ }
151
+ //# sourceMappingURL=AcEdFloatingInput.d.ts.map
@@ -0,0 +1 @@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