@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
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Validates string input according to {@link AcEdPromptStringOptions}.
3
+ * Supports empty string rules, keyword checking, and maximum length.
4
+ */
5
+ var AcEdStringHandler = /** @class */ (function () {
6
+ function AcEdStringHandler(options) {
7
+ this.options = options;
8
+ }
9
+ AcEdStringHandler.prototype.parse = function (value) {
10
+ if (!this.options.allowSpaces && value.includes(' ')) {
11
+ return null;
12
+ }
13
+ if (!this.options.allowEmpty && value.length === 0) {
14
+ return null;
15
+ }
16
+ if (this.options.maxLength && value.length > this.options.maxLength) {
17
+ return null;
18
+ }
19
+ return value;
20
+ };
21
+ return AcEdStringHandler;
22
+ }());
23
+ export { AcEdStringHandler };
24
+ //# sourceMappingURL=AcEdStringHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdStringHandler.js","sourceRoot":"","sources":["../../../../src/editor/input/handler/AcEdStringHandler.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IAGE,2BAAY,OAAgC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,iCAAK,GAAL,UAAM,KAAa;QACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACrD,OAAO,IAAI,CAAA;QACb,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,IAAI,CAAA;QACb,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YACpE,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IACH,wBAAC;AAAD,CAAC,AAtBD,IAsBC"}
@@ -0,0 +1,9 @@
1
+ export * from './AcEdAngleHandler';
2
+ export * from './AcEdDistanceHandler';
3
+ export * from './AcEdDoubleHandler';
4
+ export * from './AcEdInputHandler';
5
+ export * from './AcEdIntegerHandler';
6
+ export * from './AcEdNumericalHandler';
7
+ export * from './AcEdPointHandler';
8
+ export * from './AcEdStringHandler';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,9 @@
1
+ export * from './AcEdAngleHandler';
2
+ export * from './AcEdDistanceHandler';
3
+ export * from './AcEdDoubleHandler';
4
+ export * from './AcEdInputHandler';
5
+ export * from './AcEdIntegerHandler';
6
+ export * from './AcEdNumericalHandler';
7
+ export * from './AcEdPointHandler';
8
+ export * from './AcEdStringHandler';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/input/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
@@ -1,5 +1,8 @@
1
1
  export * from './AcEdCursorManager';
2
- export * from './AcEdJig';
3
2
  export * from './AcEditor';
3
+ export * from './AcEdPreviewJig';
4
4
  export * from './AcEdSelectionSet';
5
+ export * from './marker';
6
+ export * from './prompt';
7
+ export * from './ui';
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,MAAM,CAAA"}
@@ -1,5 +1,8 @@
1
1
  export * from './AcEdCursorManager';
2
- export * from './AcEdJig';
3
2
  export * from './AcEditor';
3
+ export * from './AcEdPreviewJig';
4
4
  export * from './AcEdSelectionSet';
5
+ export * from './marker';
6
+ export * from './prompt';
7
+ export * from './ui';
5
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editor/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editor/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,MAAM,CAAA"}
@@ -0,0 +1,72 @@
1
+ import { AcGePoint2dLike } from '@mlightcad/geometry-engine';
2
+ /**
3
+ * Supported marker shapes.
4
+ */
5
+ export type AcEdMarkerType = 'circle' | 'triangle' | 'rect';
6
+ /**
7
+ * Represents a single marker displayed in screen coordinates.
8
+ *
9
+ * A marker is a small shape (circle, triangle, or rectangle) rendered using DOM elements.
10
+ * Its appearance is determined by type, size, and color.
11
+ *
12
+ * The marker:
13
+ * - Is absolutely positioned on the screen.
14
+ * - Cannot receive pointer events.
15
+ * - Automatically injects required CSS once globally.
16
+ */
17
+ export declare class AcEdMarker {
18
+ /** DOM element representing the marker */
19
+ private _el;
20
+ /** Size (width = height) of the marker in pixels */
21
+ private _size;
22
+ /** Marker shape type */
23
+ private _type;
24
+ /** Marker stroke or fill color */
25
+ private _color;
26
+ /**
27
+ * Creates a new OSNAP marker instance.
28
+ *
29
+ * @param type - Shape type of the marker (`circle`, `triangle`, `rect`)
30
+ * @param size - Size of the marker (width/height in px; triangle uses font-size)
31
+ * @param color - Marker color (CSS color string)
32
+ */
33
+ constructor(type?: AcEdMarkerType, size?: number, color?: string);
34
+ /**
35
+ * Gets the current marker color.
36
+ */
37
+ get color(): string;
38
+ /**
39
+ * Sets marker color and updates DOM immediately.
40
+ */
41
+ set color(value: string);
42
+ /**
43
+ * Gets the current marker type.
44
+ */
45
+ get type(): AcEdMarkerType;
46
+ /**
47
+ * Sets the marker type and updates DOM shape instantly.
48
+ */
49
+ set type(value: AcEdMarkerType);
50
+ /**
51
+ * Injects required CSS into the document.
52
+ * Ensures that CSS is only injected one time.
53
+ */
54
+ private static injectCSS;
55
+ /**
56
+ * Applies the appropriate CSS class and size properties
57
+ * according to the marker's chosen shape type.
58
+ */
59
+ private applyShape;
60
+ /**
61
+ * Sets the screen position of the marker.
62
+ *
63
+ * @param pos - Position in screen coordinate in pixels
64
+ */
65
+ setPosition(pos: AcGePoint2dLike): void;
66
+ /**
67
+ * Removes the marker from DOM and cleans up resources.
68
+ * Should be called when the marker is no longer needed.
69
+ */
70
+ destroy(): void;
71
+ }
72
+ //# sourceMappingURL=AcEdMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdMarker.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/marker/AcEdMarker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAA;AAE3D;;;;;;;;;;GAUG;AACH,qBAAa,UAAU;IACrB,0CAA0C;IAC1C,OAAO,CAAC,GAAG,CAAa;IAExB,oDAAoD;IACpD,OAAO,CAAC,KAAK,CAAQ;IAErB,wBAAwB;IACxB,OAAO,CAAC,KAAK,CAAgB;IAE7B,kCAAkC;IAClC,OAAO,CAAC,MAAM,CAAQ;IAEtB;;;;;;OAMG;gBAED,IAAI,GAAE,cAAuB,EAC7B,IAAI,GAAE,MAAU,EAChB,KAAK,GAAE,MAAgB;IAoBzB;;OAEG;IACH,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED;;OAEG;IACH,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,cAAc,CAEhC;IAED;;OAEG;IACH,IAAW,IAAI,CAAC,KAAK,EAAE,cAAc,EAGpC;IAED;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAiCxB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAqBlB;;;;OAIG;IACI,WAAW,CAAC,GAAG,EAAE,eAAe;IAKvC;;;OAGG;IACI,OAAO;CAGf"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Represents a single marker displayed in screen coordinates.
3
+ *
4
+ * A marker is a small shape (circle, triangle, or rectangle) rendered using DOM elements.
5
+ * Its appearance is determined by type, size, and color.
6
+ *
7
+ * The marker:
8
+ * - Is absolutely positioned on the screen.
9
+ * - Cannot receive pointer events.
10
+ * - Automatically injects required CSS once globally.
11
+ */
12
+ var AcEdMarker = /** @class */ (function () {
13
+ /**
14
+ * Creates a new OSNAP marker instance.
15
+ *
16
+ * @param type - Shape type of the marker (`circle`, `triangle`, `rect`)
17
+ * @param size - Size of the marker (width/height in px; triangle uses font-size)
18
+ * @param color - Marker color (CSS color string)
19
+ */
20
+ function AcEdMarker(type, size, color) {
21
+ if (type === void 0) { type = 'rect'; }
22
+ if (size === void 0) { size = 8; }
23
+ if (color === void 0) { color = 'green'; }
24
+ this._type = type;
25
+ this._size = size;
26
+ this._color = color;
27
+ // Ensure CSS is injected once
28
+ AcEdMarker.injectCSS();
29
+ // Create marker DOM
30
+ this._el = document.createElement('div');
31
+ this._el.classList.add('ml-marker');
32
+ this._el.style.color = color;
33
+ this.applyShape();
34
+ // Attach to document
35
+ document.body.appendChild(this._el);
36
+ }
37
+ Object.defineProperty(AcEdMarker.prototype, "color", {
38
+ /**
39
+ * Gets the current marker color.
40
+ */
41
+ get: function () {
42
+ return this._color;
43
+ },
44
+ /**
45
+ * Sets marker color and updates DOM immediately.
46
+ */
47
+ set: function (value) {
48
+ this._color = value;
49
+ this._el.style.color = value;
50
+ },
51
+ enumerable: false,
52
+ configurable: true
53
+ });
54
+ Object.defineProperty(AcEdMarker.prototype, "type", {
55
+ /**
56
+ * Gets the current marker type.
57
+ */
58
+ get: function () {
59
+ return this._type;
60
+ },
61
+ /**
62
+ * Sets the marker type and updates DOM shape instantly.
63
+ */
64
+ set: function (value) {
65
+ this._type = value;
66
+ this.applyShape();
67
+ },
68
+ enumerable: false,
69
+ configurable: true
70
+ });
71
+ /**
72
+ * Injects required CSS into the document.
73
+ * Ensures that CSS is only injected one time.
74
+ */
75
+ AcEdMarker.injectCSS = function () {
76
+ if (document.getElementById('ml-marker-style'))
77
+ return;
78
+ var style = document.createElement('style');
79
+ style.id = 'ml-marker-style';
80
+ style.textContent = "\n .ml-marker {\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -50%);\n z-index: 999999;\n }\n .ml-marker-circle {\n border-radius: 50%;\n border: 2px solid currentColor;\n background: transparent;\n }\n .ml-marker-rect {\n border: 2px solid currentColor;\n background: transparent;\n }\n .ml-marker-triangle {\n width: 0;\n height: 0;\n border-left: 0.5em solid transparent;\n border-right: 0.5em solid transparent;\n border-bottom: 1em solid currentColor;\n transform: translate(-50%, -100%);\n }\n ";
81
+ document.head.appendChild(style);
82
+ };
83
+ /**
84
+ * Applies the appropriate CSS class and size properties
85
+ * according to the marker's chosen shape type.
86
+ */
87
+ AcEdMarker.prototype.applyShape = function () {
88
+ switch (this._type) {
89
+ case 'circle':
90
+ this._el.classList.add('ml-marker-circle');
91
+ this._el.style.width = "".concat(this._size, "px");
92
+ this._el.style.height = "".concat(this._size, "px");
93
+ break;
94
+ case 'rect':
95
+ this._el.classList.add('ml-marker-rect');
96
+ this._el.style.width = "".concat(this._size, "px");
97
+ this._el.style.height = "".concat(this._size, "px");
98
+ break;
99
+ case 'triangle':
100
+ this._el.classList.add('ml-marker-triangle');
101
+ this._el.style.fontSize = "".concat(this._size, "px"); // font-size scales triangle
102
+ break;
103
+ }
104
+ };
105
+ /**
106
+ * Sets the screen position of the marker.
107
+ *
108
+ * @param pos - Position in screen coordinate in pixels
109
+ */
110
+ AcEdMarker.prototype.setPosition = function (pos) {
111
+ this._el.style.left = "".concat(pos.x, "px");
112
+ this._el.style.top = "".concat(pos.y, "px");
113
+ };
114
+ /**
115
+ * Removes the marker from DOM and cleans up resources.
116
+ * Should be called when the marker is no longer needed.
117
+ */
118
+ AcEdMarker.prototype.destroy = function () {
119
+ this._el.remove();
120
+ };
121
+ return AcEdMarker;
122
+ }());
123
+ export { AcEdMarker };
124
+ //# sourceMappingURL=AcEdMarker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdMarker.js","sourceRoot":"","sources":["../../../../src/editor/input/marker/AcEdMarker.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,52 @@
1
+ import { AcGePoint2dLike } from '@mlightcad/geometry-engine';
2
+ import { AcEdBaseView } from '../../view';
3
+ import { AcEdMarker, AcEdMarkerType } from './AcEdMarker';
4
+ /**
5
+ * Manages a stack of markers using a singleton pattern.
6
+ *
7
+ * - `getInstance()` returns the global instance.
8
+ * - `showMarker()` pushes a new marker onto the stack.
9
+ * - `hideMarker()` pops the last marker.
10
+ * - `clear()` removes all markers.
11
+ *
12
+ * Typical usage is to show temporary marker that appear and disappear
13
+ * based on user cursor movement or snapping events.
14
+ */
15
+ export declare class AcEdMarkerManager {
16
+ /** The view associated with this input operation */
17
+ private view;
18
+ /** Internal stack of active markers */
19
+ private stack;
20
+ constructor(view: AcEdBaseView);
21
+ /**
22
+ * Creates and shows a new OSNAP marker at the specified position in world coordinate
23
+ * system. The marker is added to the top of the internal stack.
24
+ *
25
+ * @param pos - Position in world coordinate system
26
+ * @param type - Marker shape type
27
+ * @param size - Marker size in pixels
28
+ * @param color - Marker color (CSS string)
29
+ */
30
+ showMarker(pos: AcGePoint2dLike, type?: AcEdMarkerType, size?: number, color?: string): AcEdMarker;
31
+ /**
32
+ * Hides the most recently shown marker (LIFO).
33
+ * If no marker exists, nothing happens.
34
+ */
35
+ hideMarker(): void;
36
+ /**
37
+ * Removes all active markers and clears the stack.
38
+ * Should be called when OSNAP indicators need to be fully reset.
39
+ */
40
+ clear(): void;
41
+ /**
42
+ * Returns the marker at the top of the marker stack without removing it.
43
+ *
44
+ * This method is safe to call even when the stack is empty. In that case,
45
+ * it returns `undefined`.
46
+ *
47
+ * @returns The top marker of the internal stack, or `undefined` if the
48
+ * stack contains no marker.
49
+ */
50
+ top(): AcEdMarker | undefined;
51
+ }
52
+ //# sourceMappingURL=AcEdOSnapMarkerManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdOSnapMarkerManager.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/marker/AcEdOSnapMarkerManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAEzD;;;;;;;;;;GAUG;AACH,qBAAa,iBAAiB;IAC5B,oDAAoD;IACpD,OAAO,CAAC,IAAI,CAAc;IAE1B,uCAAuC;IACvC,OAAO,CAAC,KAAK,CAAmB;gBAEpB,IAAI,EAAE,YAAY;IAI9B;;;;;;;;OAQG;IACI,UAAU,CACf,GAAG,EAAE,eAAe,EACpB,IAAI,CAAC,EAAE,cAAc,EACrB,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM;IAShB;;;OAGG;IACI,UAAU;IAKjB;;;OAGG;IACI,KAAK;IAKZ;;;;;;;;OAQG;IACI,GAAG,IAAI,UAAU,GAAG,SAAS;CAGrC"}
@@ -0,0 +1,91 @@
1
+ var __values = (this && this.__values) || function(o) {
2
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
+ if (m) return m.call(o);
4
+ if (o && typeof o.length === "number") return {
5
+ next: function () {
6
+ if (o && i >= o.length) o = void 0;
7
+ return { value: o && o[i++], done: !o };
8
+ }
9
+ };
10
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
+ };
12
+ import { AcEdMarker } from './AcEdMarker';
13
+ /**
14
+ * Manages a stack of markers using a singleton pattern.
15
+ *
16
+ * - `getInstance()` returns the global instance.
17
+ * - `showMarker()` pushes a new marker onto the stack.
18
+ * - `hideMarker()` pops the last marker.
19
+ * - `clear()` removes all markers.
20
+ *
21
+ * Typical usage is to show temporary marker that appear and disappear
22
+ * based on user cursor movement or snapping events.
23
+ */
24
+ var AcEdMarkerManager = /** @class */ (function () {
25
+ function AcEdMarkerManager(view) {
26
+ /** Internal stack of active markers */
27
+ this.stack = [];
28
+ this.view = view;
29
+ }
30
+ /**
31
+ * Creates and shows a new OSNAP marker at the specified position in world coordinate
32
+ * system. The marker is added to the top of the internal stack.
33
+ *
34
+ * @param pos - Position in world coordinate system
35
+ * @param type - Marker shape type
36
+ * @param size - Marker size in pixels
37
+ * @param color - Marker color (CSS string)
38
+ */
39
+ AcEdMarkerManager.prototype.showMarker = function (pos, type, size, color) {
40
+ var winPos = this.view.wcs2Cwcs(pos);
41
+ var marker = new AcEdMarker(type, size, color);
42
+ marker.setPosition(winPos);
43
+ this.stack.push(marker);
44
+ return marker;
45
+ };
46
+ /**
47
+ * Hides the most recently shown marker (LIFO).
48
+ * If no marker exists, nothing happens.
49
+ */
50
+ AcEdMarkerManager.prototype.hideMarker = function () {
51
+ var marker = this.stack.pop();
52
+ if (marker)
53
+ marker.destroy();
54
+ };
55
+ /**
56
+ * Removes all active markers and clears the stack.
57
+ * Should be called when OSNAP indicators need to be fully reset.
58
+ */
59
+ AcEdMarkerManager.prototype.clear = function () {
60
+ var e_1, _a;
61
+ try {
62
+ for (var _b = __values(this.stack), _c = _b.next(); !_c.done; _c = _b.next()) {
63
+ var marker = _c.value;
64
+ marker.destroy();
65
+ }
66
+ }
67
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
68
+ finally {
69
+ try {
70
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
71
+ }
72
+ finally { if (e_1) throw e_1.error; }
73
+ }
74
+ this.stack = [];
75
+ };
76
+ /**
77
+ * Returns the marker at the top of the marker stack without removing it.
78
+ *
79
+ * This method is safe to call even when the stack is empty. In that case,
80
+ * it returns `undefined`.
81
+ *
82
+ * @returns The top marker of the internal stack, or `undefined` if the
83
+ * stack contains no marker.
84
+ */
85
+ AcEdMarkerManager.prototype.top = function () {
86
+ return this.stack[this.stack.length - 1];
87
+ };
88
+ return AcEdMarkerManager;
89
+ }());
90
+ export { AcEdMarkerManager };
91
+ //# sourceMappingURL=AcEdOSnapMarkerManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdOSnapMarkerManager.js","sourceRoot":"","sources":["../../../../src/editor/input/marker/AcEdOSnapMarkerManager.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAEzD;;;;;;;;;;GAUG;AACH;IAOE,2BAAY,IAAkB;QAH9B,uCAAuC;QAC/B,UAAK,GAAiB,EAAE,CAAA;QAG9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED;;;;;;;;OAQG;IACI,sCAAU,GAAjB,UACE,GAAoB,EACpB,IAAqB,EACrB,IAAa,EACb,KAAc;QAEd,IAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QACtC,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QAChD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvB,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;OAGG;IACI,sCAAU,GAAjB;QACE,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;QAC/B,IAAI,MAAM;YAAE,MAAM,CAAC,OAAO,EAAE,CAAA;IAC9B,CAAC;IAED;;;OAGG;IACI,iCAAK,GAAZ;;;YACE,KAAqB,IAAA,KAAA,SAAA,IAAI,CAAC,KAAK,CAAA,gBAAA;gBAA1B,IAAM,MAAM,WAAA;gBAAgB,MAAM,CAAC,OAAO,EAAE,CAAA;aAAA;;;;;;;;;QACjD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;IACjB,CAAC;IAED;;;;;;;;OAQG;IACI,+BAAG,GAAV;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;IACH,wBAAC;AAAD,CAAC,AA/DD,IA+DC"}
@@ -0,0 +1,3 @@
1
+ export * from './AcEdMarker';
2
+ export * from './AcEdOSnapMarkerManager';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/marker/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './AcEdMarker';
2
+ export * from './AcEdOSnapMarkerManager';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/input/marker/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Represents a single keyword option in a prompt, similar to Autodesk.AutoCAD.EditorInput.Keyword.
3
+ * Keywords can be shown to the user, used internally as global identifiers, and can be enabled/disabled or visible/hidden.
4
+ */
5
+ export declare class AcEdKeyword {
6
+ private _displayName;
7
+ private _enabled;
8
+ private _globalName;
9
+ private _isReadOnly;
10
+ private _localName;
11
+ private _visible;
12
+ /**
13
+ * Creates a new Keyword.
14
+ * @param displayName - The text displayed to the user for this keyword.
15
+ * @param globalName - The internal global name (never shown to user). Defaults to `displayName`.
16
+ * @param localName - Internal local name (usually same as global name). Defaults to `globalName`.
17
+ * @param enabled - Whether the keyword is currently enabled. Default is `true`.
18
+ * @param isReadOnly - If `true`, the keyword properties cannot be modified. Default is `false`.
19
+ * @param visible - Whether the keyword is visible to the user. Default is `true`.
20
+ */
21
+ constructor(displayName: string, globalName?: string, localName?: string, enabled?: boolean, isReadOnly?: boolean, visible?: boolean);
22
+ /**
23
+ * Gets or sets the display name of the keyword.
24
+ * This is the name shown to the user in prompts.
25
+ * Setting has no effect if `isReadOnly` is true.
26
+ */
27
+ get displayName(): string;
28
+ set displayName(name: string);
29
+ /**
30
+ * Gets or sets whether the keyword is currently enabled.
31
+ * Disabled keywords cannot be selected by the user.
32
+ * Setting has no effect if `isReadOnly` is true.
33
+ */
34
+ get enabled(): boolean;
35
+ set enabled(flag: boolean);
36
+ /**
37
+ * Gets or sets the global name of the keyword.
38
+ * The global name is used internally by programs and is never displayed to the user.
39
+ * Setting has no effect if `isReadOnly` is true.
40
+ */
41
+ get globalName(): string;
42
+ set globalName(name: string);
43
+ /**
44
+ * Gets a value indicating whether the keyword is read-only.
45
+ * True if the keyword is read-only; otherwise, false.
46
+ */
47
+ get isReadOnly(): boolean;
48
+ /**
49
+ * Gets or sets the local name of the keyword.
50
+ * Usually the same as the global name; not displayed to the user.
51
+ * Setting has no effect if `isReadOnly` is true.
52
+ */
53
+ get localName(): string;
54
+ set localName(name: string);
55
+ /**
56
+ * Gets or sets whether the keyword is visible to the user.
57
+ * Hidden keywords cannot be selected by typing, but can be used programmatically.
58
+ * Setting has no effect if `isReadOnly` is true.
59
+ */
60
+ get visible(): boolean;
61
+ set visible(flag: boolean);
62
+ }
63
+ //# sourceMappingURL=AcEdKeyword.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcEdKeyword.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdKeyword.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,WAAW;IAEtB,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;;;;;;OAQG;gBAED,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,OAAc,EACvB,UAAU,GAAE,OAAe,EAC3B,OAAO,GAAE,OAAc;IAUzB;;;;OAIG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,IAAI,WAAW,CAAC,IAAI,EAAE,MAAM,EAE3B;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IACD,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,EAExB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IACD,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAE1B;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,EAEzB;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IACD,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,EAExB;CACF"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Represents a single keyword option in a prompt, similar to Autodesk.AutoCAD.EditorInput.Keyword.
3
+ * Keywords can be shown to the user, used internally as global identifiers, and can be enabled/disabled or visible/hidden.
4
+ */
5
+ var AcEdKeyword = /** @class */ (function () {
6
+ /**
7
+ * Creates a new Keyword.
8
+ * @param displayName - The text displayed to the user for this keyword.
9
+ * @param globalName - The internal global name (never shown to user). Defaults to `displayName`.
10
+ * @param localName - Internal local name (usually same as global name). Defaults to `globalName`.
11
+ * @param enabled - Whether the keyword is currently enabled. Default is `true`.
12
+ * @param isReadOnly - If `true`, the keyword properties cannot be modified. Default is `false`.
13
+ * @param visible - Whether the keyword is visible to the user. Default is `true`.
14
+ */
15
+ function AcEdKeyword(displayName, globalName, localName, enabled, isReadOnly, visible) {
16
+ if (enabled === void 0) { enabled = true; }
17
+ if (isReadOnly === void 0) { isReadOnly = false; }
18
+ if (visible === void 0) { visible = true; }
19
+ this._displayName = displayName;
20
+ this._globalName = globalName !== null && globalName !== void 0 ? globalName : displayName;
21
+ this._localName = localName !== null && localName !== void 0 ? localName : this._globalName;
22
+ this._enabled = enabled;
23
+ this._isReadOnly = isReadOnly;
24
+ this._visible = visible;
25
+ }
26
+ Object.defineProperty(AcEdKeyword.prototype, "displayName", {
27
+ /**
28
+ * Gets or sets the display name of the keyword.
29
+ * This is the name shown to the user in prompts.
30
+ * Setting has no effect if `isReadOnly` is true.
31
+ */
32
+ get: function () {
33
+ return this._displayName;
34
+ },
35
+ set: function (name) {
36
+ if (!this._isReadOnly)
37
+ this._displayName = name;
38
+ },
39
+ enumerable: false,
40
+ configurable: true
41
+ });
42
+ Object.defineProperty(AcEdKeyword.prototype, "enabled", {
43
+ /**
44
+ * Gets or sets whether the keyword is currently enabled.
45
+ * Disabled keywords cannot be selected by the user.
46
+ * Setting has no effect if `isReadOnly` is true.
47
+ */
48
+ get: function () {
49
+ return this._enabled;
50
+ },
51
+ set: function (flag) {
52
+ if (!this._isReadOnly)
53
+ this._enabled = flag;
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ Object.defineProperty(AcEdKeyword.prototype, "globalName", {
59
+ /**
60
+ * Gets or sets the global name of the keyword.
61
+ * The global name is used internally by programs and is never displayed to the user.
62
+ * Setting has no effect if `isReadOnly` is true.
63
+ */
64
+ get: function () {
65
+ return this._globalName;
66
+ },
67
+ set: function (name) {
68
+ if (!this._isReadOnly)
69
+ this._globalName = name;
70
+ },
71
+ enumerable: false,
72
+ configurable: true
73
+ });
74
+ Object.defineProperty(AcEdKeyword.prototype, "isReadOnly", {
75
+ /**
76
+ * Gets a value indicating whether the keyword is read-only.
77
+ * True if the keyword is read-only; otherwise, false.
78
+ */
79
+ get: function () {
80
+ return this._isReadOnly;
81
+ },
82
+ enumerable: false,
83
+ configurable: true
84
+ });
85
+ Object.defineProperty(AcEdKeyword.prototype, "localName", {
86
+ /**
87
+ * Gets or sets the local name of the keyword.
88
+ * Usually the same as the global name; not displayed to the user.
89
+ * Setting has no effect if `isReadOnly` is true.
90
+ */
91
+ get: function () {
92
+ return this._localName;
93
+ },
94
+ set: function (name) {
95
+ if (!this._isReadOnly)
96
+ this._localName = name;
97
+ },
98
+ enumerable: false,
99
+ configurable: true
100
+ });
101
+ Object.defineProperty(AcEdKeyword.prototype, "visible", {
102
+ /**
103
+ * Gets or sets whether the keyword is visible to the user.
104
+ * Hidden keywords cannot be selected by typing, but can be used programmatically.
105
+ * Setting has no effect if `isReadOnly` is true.
106
+ */
107
+ get: function () {
108
+ return this._visible;
109
+ },
110
+ set: function (flag) {
111
+ if (!this._isReadOnly)
112
+ this._visible = flag;
113
+ },
114
+ enumerable: false,
115
+ configurable: true
116
+ });
117
+ return AcEdKeyword;
118
+ }());
119
+ export { AcEdKeyword };
120
+ //# sourceMappingURL=AcEdKeyword.js.map