@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.
- package/dist/index.js +11406 -8892
- package/dist/index.umd.cjs +314 -24
- package/dist/libredwg-parser-worker.js +7267 -7238
- package/dist/mtext-renderer-worker.js +32 -9
- package/lib/app/AcApDocManager.d.ts +20 -3
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +66 -11
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +133 -0
- package/lib/app/AcApProgress.d.ts.map +1 -0
- package/lib/app/AcApProgress.js +148 -0
- package/lib/app/AcApProgress.js.map +1 -0
- package/lib/app/AcApSettingManager.d.ts +42 -0
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +63 -0
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/index.d.ts +0 -1
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +0 -1
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCircleCmd.d.ts +21 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -0
- package/lib/command/AcApCircleCmd.js +115 -0
- package/lib/command/AcApCircleCmd.js.map +1 -0
- package/lib/command/AcApDimCmd.d.ts +57 -0
- package/lib/command/AcApDimCmd.d.ts.map +1 -0
- package/lib/command/AcApDimCmd.js +228 -0
- package/lib/command/AcApDimCmd.js.map +1 -0
- package/lib/command/AcApLogCmd.d.ts +13 -0
- package/lib/command/AcApLogCmd.d.ts.map +1 -0
- package/lib/command/AcApLogCmd.js +97 -0
- package/lib/command/AcApLogCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts +15 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
- package/lib/command/AcApSysVarCmd.js +94 -0
- package/lib/command/AcApSysVarCmd.js.map +1 -0
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.js +4 -61
- package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
- package/lib/command/index.d.ts +4 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +4 -0
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +40 -0
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +32 -31
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.js +82 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +58 -11
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +86 -22
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
- package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
- package/lib/editor/input/handler/index.d.ts +9 -0
- package/lib/editor/input/handler/index.d.ts.map +1 -0
- package/lib/editor/input/handler/index.js +9 -0
- package/lib/editor/input/handler/index.js.map +1 -0
- package/lib/editor/input/index.d.ts +4 -1
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +4 -1
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdMarker.js +124 -0
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
- package/lib/editor/input/marker/index.d.ts +3 -0
- package/lib/editor/input/marker/index.d.ts.map +1 -0
- package/lib/editor/input/marker/index.js +3 -0
- package/lib/editor/input/marker/index.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
- package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
- package/lib/editor/input/prompt/index.d.ts +11 -0
- package/lib/editor/input/prompt/index.d.ts.map +1 -0
- package/lib/editor/input/prompt/index.js +11 -0
- package/lib/editor/input/prompt/index.js.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +114 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.js +453 -0
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.js +477 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
- package/lib/editor/input/ui/index.d.ts +3 -0
- package/lib/editor/input/ui/index.d.ts.map +1 -0
- package/lib/editor/input/ui/index.js +3 -0
- package/lib/editor/input/ui/index.js.map +1 -0
- package/lib/editor/view/AcEdBaseView.d.ts +35 -11
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -11
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +135 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -0
- package/lib/i18n/AcApI18n.js +208 -0
- package/lib/i18n/AcApI18n.js.map +1 -0
- package/lib/i18n/en/command.d.ts +18 -0
- package/lib/i18n/en/command.d.ts.map +1 -0
- package/lib/i18n/en/command.js +17 -0
- package/lib/i18n/en/command.js.map +1 -0
- package/lib/i18n/en/jig.d.ts +11 -0
- package/lib/i18n/en/jig.d.ts.map +1 -0
- package/lib/i18n/en/jig.js +10 -0
- package/lib/i18n/en/jig.js.map +1 -0
- package/lib/i18n/en/main.d.ts +37 -0
- package/lib/i18n/en/main.d.ts.map +1 -0
- package/lib/i18n/en/main.js +36 -0
- package/lib/i18n/en/main.js.map +1 -0
- package/lib/i18n/index.d.ts +6 -0
- package/lib/i18n/index.d.ts.map +1 -0
- package/lib/i18n/index.js +31 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/zh/command.d.ts +18 -0
- package/lib/i18n/zh/command.d.ts.map +1 -0
- package/lib/i18n/zh/command.js +17 -0
- package/lib/i18n/zh/command.js.map +1 -0
- package/lib/i18n/zh/jig.d.ts +11 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -0
- package/lib/i18n/zh/jig.js +10 -0
- package/lib/i18n/zh/jig.js.map +1 -0
- package/lib/i18n/zh/main.d.ts +37 -0
- package/lib/i18n/zh/main.d.ts.map +1 -0
- package/lib/i18n/zh/main.js +36 -0
- package/lib/i18n/zh/main.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +19 -6
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -6
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +11 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +73 -35
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +7 -7
- package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
- package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
- package/lib/editor/input/AcEdBaseInput.js +0 -166
- package/lib/editor/input/AcEdBaseInput.js.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
- package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.js +0 -220
- package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
- package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
- package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
- package/lib/editor/input/AcEdInputPoint.js +0 -78
- package/lib/editor/input/AcEdInputPoint.js.map +0 -1
- package/lib/editor/input/AcEdJig.d.ts +0 -180
- package/lib/editor/input/AcEdJig.d.ts.map +0 -1
- package/lib/editor/input/AcEdJig.js +0 -256
- package/lib/editor/input/AcEdJig.js.map +0 -1
- package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
- package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
- package/lib/editor/input/AcEdJigLoop.js +0 -91
- package/lib/editor/input/AcEdJigLoop.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { AcEdPromptResult } from './AcEdPromptResult';
|
|
17
|
+
/**
|
|
18
|
+
* Result of a prompt that requests a **point**.
|
|
19
|
+
*
|
|
20
|
+
* This mirrors `Autodesk.AutoCAD.EditorInput.PromptPointResult`.
|
|
21
|
+
*/
|
|
22
|
+
var AcEdPromptPointResult = /** @class */ (function (_super) {
|
|
23
|
+
__extends(AcEdPromptPointResult, _super);
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new result for a point prompt.
|
|
26
|
+
*
|
|
27
|
+
* @param status The status of the prompt (OK, Cancel, Error, etc.)
|
|
28
|
+
* @param value The point returned (valid only on OK)
|
|
29
|
+
*/
|
|
30
|
+
function AcEdPromptPointResult(status, value) {
|
|
31
|
+
var _this = _super.call(this, status, undefined) || this;
|
|
32
|
+
_this.value = value;
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
return AcEdPromptPointResult;
|
|
36
|
+
}(AcEdPromptResult));
|
|
37
|
+
export { AcEdPromptPointResult };
|
|
38
|
+
//# sourceMappingURL=AcEdPromptPointResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptPointResult.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptPointResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD;;;;GAIG;AACH;IAA2C,yCAAgB;IASzD;;;;;OAKG;IACH,+BAAY,MAAwB,EAAE,KAAuB;QAC3D,YAAA,MAAK,YAAC,MAAM,EAAE,SAAS,CAAC,SAAA;QACxB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAA;;IACpB,CAAC;IACH,4BAAC;AAAD,CAAC,AAnBD,CAA2C,gBAAgB,GAmB1D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AcEdPromptStatus } from './AcEdPromptStatus';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for a prompt result, similar to `Autodesk.AutoCAD.EditorInput.PromptResult`.
|
|
4
|
+
* This class encapsulates common information returned by prompt methods.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AcEdPromptResult {
|
|
7
|
+
/**
|
|
8
|
+
* The status of the prompt (e.g. OK, Cancel, Error).
|
|
9
|
+
* Modeled on `PromptStatus` in the AutoCAD .NET API.
|
|
10
|
+
*/
|
|
11
|
+
status: AcEdPromptStatus;
|
|
12
|
+
/**
|
|
13
|
+
* An optional string result.
|
|
14
|
+
* This is typically set when `status` is `Keyword` or when the prompt
|
|
15
|
+
* returns a string as its primary result.
|
|
16
|
+
* Corresponds to `PromptResult.StringResult` in the .NET API.
|
|
17
|
+
*/
|
|
18
|
+
stringResult?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new `AcEdPromptResult`.
|
|
21
|
+
* @param status The prompt status.
|
|
22
|
+
* @param stringResult Optional string result.
|
|
23
|
+
* @param message Optional message.
|
|
24
|
+
*/
|
|
25
|
+
constructor(status: AcEdPromptStatus, stringResult?: string);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=AcEdPromptResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptResult.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B;;;OAGG;IACH,MAAM,EAAE,gBAAgB,CAAA;IAExB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;OAKG;gBACS,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAE,MAAM;CAI5D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for a prompt result, similar to `Autodesk.AutoCAD.EditorInput.PromptResult`.
|
|
3
|
+
* This class encapsulates common information returned by prompt methods.
|
|
4
|
+
*/
|
|
5
|
+
var AcEdPromptResult = /** @class */ (function () {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new `AcEdPromptResult`.
|
|
8
|
+
* @param status The prompt status.
|
|
9
|
+
* @param stringResult Optional string result.
|
|
10
|
+
* @param message Optional message.
|
|
11
|
+
*/
|
|
12
|
+
function AcEdPromptResult(status, stringResult) {
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.stringResult = stringResult;
|
|
15
|
+
}
|
|
16
|
+
return AcEdPromptResult;
|
|
17
|
+
}());
|
|
18
|
+
export { AcEdPromptResult };
|
|
19
|
+
//# sourceMappingURL=AcEdPromptResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptResult.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptResult.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IAeE;;;;;OAKG;IACH,0BAAY,MAAwB,EAAE,YAAqB;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;IACH,uBAAC;AAAD,CAAC,AAzBD,IAyBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumeration that represents the status of a prompt operation, modeled
|
|
3
|
+
* after `Autodesk.AutoCAD.EditorInput.PromptStatus`.
|
|
4
|
+
* These values correspond to return codes from AutoCAD prompt routines.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AcEdPromptStatus {
|
|
7
|
+
/** User canceled the request (e.g., pressed Ctrl-C) */
|
|
8
|
+
Cancel = -5002,
|
|
9
|
+
/** Generic non-specific error */
|
|
10
|
+
Error = -5001,
|
|
11
|
+
/** The user entered a keyword (e.g. from a keyword list) */
|
|
12
|
+
Keyword = -5005,
|
|
13
|
+
/** Modeless prompt status */
|
|
14
|
+
Modeless = 5027,
|
|
15
|
+
/** No result (e.g., no input) */
|
|
16
|
+
None = 5000,
|
|
17
|
+
/** OK / successful prompt (user accepted) */
|
|
18
|
+
OK = 5100,
|
|
19
|
+
/** Other – a status outside of the default list */
|
|
20
|
+
Other = 5028
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=AcEdPromptStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptStatus.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,gBAAgB;IAC1B,uDAAuD;IACvD,MAAM,QAAQ;IACd,iCAAiC;IACjC,KAAK,QAAQ;IACb,4DAA4D;IAC5D,OAAO,QAAQ;IACf,6BAA6B;IAC7B,QAAQ,OAAS;IACjB,iCAAiC;IACjC,IAAI,OAAS;IACb,6CAA6C;IAC7C,EAAE,OAAS;IACX,mDAAmD;IACnD,KAAK,OAAS;CACf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumeration that represents the status of a prompt operation, modeled
|
|
3
|
+
* after `Autodesk.AutoCAD.EditorInput.PromptStatus`.
|
|
4
|
+
* These values correspond to return codes from AutoCAD prompt routines.
|
|
5
|
+
*/
|
|
6
|
+
export var AcEdPromptStatus;
|
|
7
|
+
(function (AcEdPromptStatus) {
|
|
8
|
+
/** User canceled the request (e.g., pressed Ctrl-C) */
|
|
9
|
+
AcEdPromptStatus[AcEdPromptStatus["Cancel"] = -5002] = "Cancel";
|
|
10
|
+
/** Generic non-specific error */
|
|
11
|
+
AcEdPromptStatus[AcEdPromptStatus["Error"] = -5001] = "Error";
|
|
12
|
+
/** The user entered a keyword (e.g. from a keyword list) */
|
|
13
|
+
AcEdPromptStatus[AcEdPromptStatus["Keyword"] = -5005] = "Keyword";
|
|
14
|
+
/** Modeless prompt status */
|
|
15
|
+
AcEdPromptStatus[AcEdPromptStatus["Modeless"] = 5027] = "Modeless";
|
|
16
|
+
/** No result (e.g., no input) */
|
|
17
|
+
AcEdPromptStatus[AcEdPromptStatus["None"] = 5000] = "None";
|
|
18
|
+
/** OK / successful prompt (user accepted) */
|
|
19
|
+
AcEdPromptStatus[AcEdPromptStatus["OK"] = 5100] = "OK";
|
|
20
|
+
/** Other – a status outside of the default list */
|
|
21
|
+
AcEdPromptStatus[AcEdPromptStatus["Other"] = 5028] = "Other";
|
|
22
|
+
})(AcEdPromptStatus || (AcEdPromptStatus = {}));
|
|
23
|
+
//# sourceMappingURL=AcEdPromptStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptStatus.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B,uDAAuD;IACvD,+DAAc,CAAA;IACd,iCAAiC;IACjC,6DAAa,CAAA;IACb,4DAA4D;IAC5D,iEAAe,CAAA;IACf,6BAA6B;IAC7B,kEAAiB,CAAA;IACjB,iCAAiC;IACjC,0DAAa,CAAA;IACb,6CAA6C;IAC7C,sDAAW,CAAA;IACX,mDAAmD;IACnD,4DAAc,CAAA;AAChB,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,QAe3B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AcEdPromptOptions } from './AcEdPromptOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Options for prompting the user to enter a string, similar to
|
|
4
|
+
* AutoCAD .NET `PromptStringOptions`.
|
|
5
|
+
*
|
|
6
|
+
* Allows configuration of whether spaces are permitted, default values,
|
|
7
|
+
* and whether the default should be used when the user presses ENTER.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AcEdPromptStringOptions extends AcEdPromptOptions<string> {
|
|
10
|
+
private _allowSpaces;
|
|
11
|
+
private _allowEmpty;
|
|
12
|
+
private _maxLength?;
|
|
13
|
+
private _defaultValue;
|
|
14
|
+
private _useDefaultValue;
|
|
15
|
+
/**
|
|
16
|
+
* Constructs a new `AcEdPromptStringOptions` with a given prompt message.
|
|
17
|
+
* @param message - The message shown to the user when prompting for a string.
|
|
18
|
+
*/
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
/**
|
|
21
|
+
* Gets or sets whether spaces are allowed in the input string.
|
|
22
|
+
* If `false`, pressing the spacebar may terminate the input (depending on implementation).
|
|
23
|
+
* Corresponds to `PromptStringOptions.AllowSpaces` in AutoCAD .NET.
|
|
24
|
+
*/
|
|
25
|
+
get allowSpaces(): boolean;
|
|
26
|
+
set allowSpaces(flag: boolean);
|
|
27
|
+
/**
|
|
28
|
+
* When true, an empty string is considered valid input.
|
|
29
|
+
* Default: `false` — empty string is not allowed.
|
|
30
|
+
*/
|
|
31
|
+
get allowEmpty(): boolean;
|
|
32
|
+
set allowEmpty(flag: boolean);
|
|
33
|
+
/**
|
|
34
|
+
* Maximum allowed number of characters in the input string.
|
|
35
|
+
* If `undefined`, there is no length restriction.
|
|
36
|
+
*/
|
|
37
|
+
get maxLength(): number | undefined;
|
|
38
|
+
set maxLength(value: number | undefined);
|
|
39
|
+
/**
|
|
40
|
+
* Gets or sets the default string value.
|
|
41
|
+
* This value may be used if the user presses ENTER, depending on `useDefaultValue`.
|
|
42
|
+
* Corresponds to `PromptStringOptions.DefaultValue` in AutoCAD .NET.
|
|
43
|
+
*/
|
|
44
|
+
get defaultValue(): string;
|
|
45
|
+
set defaultValue(val: string);
|
|
46
|
+
/**
|
|
47
|
+
* Gets or sets whether the default value should be used when the user presses ENTER
|
|
48
|
+
* without entering any other input.
|
|
49
|
+
* Corresponds to `PromptStringOptions.UseDefaultValue` in AutoCAD .NET.
|
|
50
|
+
*/
|
|
51
|
+
get useDefaultValue(): boolean;
|
|
52
|
+
set useDefaultValue(flag: boolean);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=AcEdPromptStringOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptStringOptions.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptStringOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACpE,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,gBAAgB,CAAiB;IAEzC;;;OAGG;gBACS,OAAO,EAAE,MAAM;IAI3B;;;;OAIG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAI5B;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,UAAU,CAAC,IAAI,EAAE,OAAO,EAI3B;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAItC;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,EAI3B;IAED;;;;OAIG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IACD,IAAI,eAAe,CAAC,IAAI,EAAE,OAAO,EAIhC;CACF"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { AcEdPromptOptions } from './AcEdPromptOptions';
|
|
17
|
+
/**
|
|
18
|
+
* Options for prompting the user to enter a string, similar to
|
|
19
|
+
* AutoCAD .NET `PromptStringOptions`.
|
|
20
|
+
*
|
|
21
|
+
* Allows configuration of whether spaces are permitted, default values,
|
|
22
|
+
* and whether the default should be used when the user presses ENTER.
|
|
23
|
+
*/
|
|
24
|
+
var AcEdPromptStringOptions = /** @class */ (function (_super) {
|
|
25
|
+
__extends(AcEdPromptStringOptions, _super);
|
|
26
|
+
/**
|
|
27
|
+
* Constructs a new `AcEdPromptStringOptions` with a given prompt message.
|
|
28
|
+
* @param message - The message shown to the user when prompting for a string.
|
|
29
|
+
*/
|
|
30
|
+
function AcEdPromptStringOptions(message) {
|
|
31
|
+
var _this = _super.call(this, message) || this;
|
|
32
|
+
_this._allowSpaces = true;
|
|
33
|
+
_this._allowEmpty = false;
|
|
34
|
+
_this._defaultValue = '';
|
|
35
|
+
_this._useDefaultValue = false;
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
Object.defineProperty(AcEdPromptStringOptions.prototype, "allowSpaces", {
|
|
39
|
+
/**
|
|
40
|
+
* Gets or sets whether spaces are allowed in the input string.
|
|
41
|
+
* If `false`, pressing the spacebar may terminate the input (depending on implementation).
|
|
42
|
+
* Corresponds to `PromptStringOptions.AllowSpaces` in AutoCAD .NET.
|
|
43
|
+
*/
|
|
44
|
+
get: function () {
|
|
45
|
+
return this._allowSpaces;
|
|
46
|
+
},
|
|
47
|
+
set: function (flag) {
|
|
48
|
+
if (!this.isReadOnly) {
|
|
49
|
+
this._allowSpaces = flag;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
enumerable: false,
|
|
53
|
+
configurable: true
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(AcEdPromptStringOptions.prototype, "allowEmpty", {
|
|
56
|
+
/**
|
|
57
|
+
* When true, an empty string is considered valid input.
|
|
58
|
+
* Default: `false` — empty string is not allowed.
|
|
59
|
+
*/
|
|
60
|
+
get: function () {
|
|
61
|
+
return this._allowEmpty;
|
|
62
|
+
},
|
|
63
|
+
set: function (flag) {
|
|
64
|
+
if (!this.isReadOnly) {
|
|
65
|
+
this._allowEmpty = flag;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(AcEdPromptStringOptions.prototype, "maxLength", {
|
|
72
|
+
/**
|
|
73
|
+
* Maximum allowed number of characters in the input string.
|
|
74
|
+
* If `undefined`, there is no length restriction.
|
|
75
|
+
*/
|
|
76
|
+
get: function () {
|
|
77
|
+
return this._maxLength;
|
|
78
|
+
},
|
|
79
|
+
set: function (value) {
|
|
80
|
+
if (!this.isReadOnly) {
|
|
81
|
+
this._maxLength = value;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
enumerable: false,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(AcEdPromptStringOptions.prototype, "defaultValue", {
|
|
88
|
+
/**
|
|
89
|
+
* Gets or sets the default string value.
|
|
90
|
+
* This value may be used if the user presses ENTER, depending on `useDefaultValue`.
|
|
91
|
+
* Corresponds to `PromptStringOptions.DefaultValue` in AutoCAD .NET.
|
|
92
|
+
*/
|
|
93
|
+
get: function () {
|
|
94
|
+
return this._defaultValue;
|
|
95
|
+
},
|
|
96
|
+
set: function (val) {
|
|
97
|
+
if (!this.isReadOnly) {
|
|
98
|
+
this._defaultValue = val;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
enumerable: false,
|
|
102
|
+
configurable: true
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(AcEdPromptStringOptions.prototype, "useDefaultValue", {
|
|
105
|
+
/**
|
|
106
|
+
* Gets or sets whether the default value should be used when the user presses ENTER
|
|
107
|
+
* without entering any other input.
|
|
108
|
+
* Corresponds to `PromptStringOptions.UseDefaultValue` in AutoCAD .NET.
|
|
109
|
+
*/
|
|
110
|
+
get: function () {
|
|
111
|
+
return this._useDefaultValue;
|
|
112
|
+
},
|
|
113
|
+
set: function (flag) {
|
|
114
|
+
if (!this.isReadOnly) {
|
|
115
|
+
this._useDefaultValue = flag;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
enumerable: false,
|
|
119
|
+
configurable: true
|
|
120
|
+
});
|
|
121
|
+
return AcEdPromptStringOptions;
|
|
122
|
+
}(AcEdPromptOptions));
|
|
123
|
+
export { AcEdPromptStringOptions };
|
|
124
|
+
//# sourceMappingURL=AcEdPromptStringOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdPromptStringOptions.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptStringOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;;GAMG;AACH;IAA6C,2CAAyB;IAOpE;;;OAGG;IACH,iCAAY,OAAe;QACzB,YAAA,MAAK,YAAC,OAAO,CAAC,SAAA;QAXR,kBAAY,GAAY,IAAI,CAAA;QAC5B,iBAAW,GAAY,KAAK,CAAA;QAE5B,mBAAa,GAAW,EAAE,CAAA;QAC1B,sBAAgB,GAAY,KAAK,CAAA;;IAQzC,CAAC;IAOD,sBAAI,gDAAW;QALf;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,YAAY,CAAA;QAC1B,CAAC;aACD,UAAgB,IAAa;YAC3B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;YAC1B,CAAC;QACH,CAAC;;;OALA;IAWD,sBAAI,+CAAU;QAJd;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,WAAW,CAAA;QACzB,CAAC;aACD,UAAe,IAAa;YAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;YACzB,CAAC;QACH,CAAC;;;OALA;IAWD,sBAAI,8CAAS;QAJb;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,UAAU,CAAA;QACxB,CAAC;aACD,UAAc,KAAyB;YACrC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;YACzB,CAAC;QACH,CAAC;;;OALA;IAYD,sBAAI,iDAAY;QALhB;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,aAAa,CAAA;QAC3B,CAAC;aACD,UAAiB,GAAW;YAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,aAAa,GAAG,GAAG,CAAA;YAC1B,CAAC;QACH,CAAC;;;OALA;IAYD,sBAAI,oDAAe;QALnB;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAA;QAC9B,CAAC;aACD,UAAoB,IAAa;YAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAA;YAC9B,CAAC;QACH,CAAC;;;OALA;IAMH,8BAAC;AAAD,CAAC,AAlFD,CAA6C,iBAAiB,GAkF7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './AcEdKeyword';
|
|
2
|
+
export * from './AcEdKeywordCollection';
|
|
3
|
+
export * from './AcEdPromptAngleOptions';
|
|
4
|
+
export * from './AcEdPromptDistanceOptions';
|
|
5
|
+
export * from './AcEdPromptDoubleOptions';
|
|
6
|
+
export * from './AcEdPromptIntegerOptions';
|
|
7
|
+
export * from './AcEdPromptNumericalOptions';
|
|
8
|
+
export * from './AcEdPromptOptions';
|
|
9
|
+
export * from './AcEdPromptPointOptions';
|
|
10
|
+
export * from './AcEdPromptStringOptions';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './AcEdKeyword';
|
|
2
|
+
export * from './AcEdKeywordCollection';
|
|
3
|
+
export * from './AcEdPromptAngleOptions';
|
|
4
|
+
export * from './AcEdPromptDistanceOptions';
|
|
5
|
+
export * from './AcEdPromptDoubleOptions';
|
|
6
|
+
export * from './AcEdPromptIntegerOptions';
|
|
7
|
+
export * from './AcEdPromptNumericalOptions';
|
|
8
|
+
export * from './AcEdPromptOptions';
|
|
9
|
+
export * from './AcEdPromptPointOptions';
|
|
10
|
+
export * from './AcEdPromptStringOptions';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoCAD-style floating command line with Promise-based execution.
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Floating command bar with left terminal glyph + down toggle and right up toggle
|
|
6
|
+
* - Command history popup
|
|
7
|
+
* - Message panel above the bar
|
|
8
|
+
* - Enter repeats last command if input empty
|
|
9
|
+
* - Esc cancels current command
|
|
10
|
+
* - Inline clickable options
|
|
11
|
+
* - Keyboard navigation
|
|
12
|
+
* - Promise-based execution for async command handling
|
|
13
|
+
* - Auto-complete popup for matching commands
|
|
14
|
+
*/
|
|
15
|
+
export declare class AcEdCommandLine {
|
|
16
|
+
container: HTMLElement;
|
|
17
|
+
history: string[];
|
|
18
|
+
historyIndex: number;
|
|
19
|
+
lastExecuted: string | null;
|
|
20
|
+
isCmdPopupOpen: boolean;
|
|
21
|
+
isMsgPanelOpen: boolean;
|
|
22
|
+
minWidth: number;
|
|
23
|
+
widthRatio: number;
|
|
24
|
+
cliContainer: HTMLDivElement;
|
|
25
|
+
wrapper: HTMLDivElement;
|
|
26
|
+
bar: HTMLDivElement;
|
|
27
|
+
leftGroup: HTMLDivElement;
|
|
28
|
+
termGlyph: HTMLDivElement;
|
|
29
|
+
downBtn: HTMLButtonElement;
|
|
30
|
+
input: HTMLDivElement;
|
|
31
|
+
upBtn: HTMLButtonElement;
|
|
32
|
+
cmdPopup: HTMLDivElement;
|
|
33
|
+
msgPanel: HTMLDivElement;
|
|
34
|
+
autoCompleteIndex: number;
|
|
35
|
+
constructor(container?: HTMLElement);
|
|
36
|
+
/** Visibility of the command line */
|
|
37
|
+
get visible(): boolean;
|
|
38
|
+
set visible(val: boolean);
|
|
39
|
+
/**
|
|
40
|
+
* Localize a text key using AcApI18n.t().
|
|
41
|
+
*
|
|
42
|
+
* This helper centralizes localization calls for the class and makes
|
|
43
|
+
* it easier to adjust localization behavior in one place if needed.
|
|
44
|
+
*
|
|
45
|
+
* @param key - Localization key (flat key style, e.g. "command.placeholder")
|
|
46
|
+
* @param defaultText - Default English (or fallback) text to use if the key is missing
|
|
47
|
+
* @returns localized string from AcApI18n or the provided defaultText
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const placeholder = this.localize('main.commandLine.placeholder', 'Type command')
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
private localize;
|
|
55
|
+
/** Refresh all messages when locale changes */
|
|
56
|
+
private refreshLocale;
|
|
57
|
+
/**
|
|
58
|
+
* Execute a command line string.
|
|
59
|
+
* Returns a Promise that resolves when the command is completed.
|
|
60
|
+
* @param cmdLine - Command string
|
|
61
|
+
* @returns Promise<void>
|
|
62
|
+
*/
|
|
63
|
+
executeCommand(cmdLine: string): void;
|
|
64
|
+
/** Inject CSS styles */
|
|
65
|
+
injectCSS(): void;
|
|
66
|
+
/** Create the command line UI elements */
|
|
67
|
+
createUI(): void;
|
|
68
|
+
/** Bind event listeners */
|
|
69
|
+
bindEvents(): void;
|
|
70
|
+
/** Handle Enter/Escape keys */
|
|
71
|
+
handleKeyDown(e: KeyboardEvent): void;
|
|
72
|
+
/** Handle Up/Down keys for history or auto-complete */
|
|
73
|
+
handleArrowKeys(e: KeyboardEvent): void;
|
|
74
|
+
/** Handle input change to show auto-complete */
|
|
75
|
+
handleInputChange(): void;
|
|
76
|
+
/** Navigate auto-complete list with arrow keys */
|
|
77
|
+
navigateAutoComplete(dir: number): void;
|
|
78
|
+
/** Navigate command history */
|
|
79
|
+
navigateHistory(dir: number): void;
|
|
80
|
+
/** Get current input text */
|
|
81
|
+
getInputText(): string;
|
|
82
|
+
/** Set input text */
|
|
83
|
+
setInputText(text?: string): void;
|
|
84
|
+
/** Render command line with options */
|
|
85
|
+
renderCommandLine(cmd: string, options?: string[]): void;
|
|
86
|
+
/** Insert option into input */
|
|
87
|
+
insertOption(opt: string): void;
|
|
88
|
+
/** Move cursor to end of input */
|
|
89
|
+
setCursorToEnd(): void;
|
|
90
|
+
/** Resolve command name */
|
|
91
|
+
resolveCommand(cmdLine: string): import("../../command").AcEdCommand | undefined;
|
|
92
|
+
/** Show or hide popups */
|
|
93
|
+
updatePopups({ showCmd, showMsg }?: {
|
|
94
|
+
showCmd?: boolean | undefined;
|
|
95
|
+
showMsg?: boolean | undefined;
|
|
96
|
+
}): void;
|
|
97
|
+
/** Show command history popup */
|
|
98
|
+
showCommandHistoryPopup(): void;
|
|
99
|
+
/** Position command history popup */
|
|
100
|
+
positionCmdPopup(): void;
|
|
101
|
+
/** Show message panel */
|
|
102
|
+
showMessagePanel(): void;
|
|
103
|
+
/** Position message panel */
|
|
104
|
+
positionMsgPanel(): void;
|
|
105
|
+
/** Print message to message panel with optional localization key */
|
|
106
|
+
printMessage(msg: string, msgKey?: string): void;
|
|
107
|
+
/** Print error message with optional localization key */
|
|
108
|
+
printError(msg: string, msgKey?: string): void;
|
|
109
|
+
/** Print executed command line to history */
|
|
110
|
+
printHistoryLine(cmdLine: string): void;
|
|
111
|
+
/** Handle window resize */
|
|
112
|
+
resizeHandler(): void;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=AcEdCommandLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdCommandLine.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdCommandLine.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,qBAAa,eAAe;IAC1B,SAAS,EAAE,WAAW,CAAA;IACtB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAG,cAAc,CAAA;IAC7B,OAAO,EAAG,cAAc,CAAA;IACxB,GAAG,EAAG,cAAc,CAAA;IACpB,SAAS,EAAG,cAAc,CAAA;IAC1B,SAAS,EAAG,cAAc,CAAA;IAC1B,OAAO,EAAG,iBAAiB,CAAA;IAC3B,KAAK,EAAG,cAAc,CAAA;IACtB,KAAK,EAAG,iBAAiB,CAAA;IACzB,QAAQ,EAAG,cAAc,CAAA;IACzB,QAAQ,EAAG,cAAc,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;gBAEb,SAAS,GAAE,WAA2B;IAmBlD,qCAAqC;IACrC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,GAAG,EAAE,OAAO,EAEvB;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,QAAQ;IAIhB,+CAA+C;IAC/C,OAAO,CAAC,aAAa;IA6BrB;;;;;OAKG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM;IA8B9B,wBAAwB;IACxB,SAAS;IA0LT,0CAA0C;IAC1C,QAAQ;IAqDR,2BAA2B;IAC3B,UAAU;IAsCV,+BAA+B;IAC/B,aAAa,CAAC,CAAC,EAAE,aAAa;IAc9B,uDAAuD;IACvD,eAAe,CAAC,CAAC,EAAE,aAAa;IAahC,gDAAgD;IAChD,iBAAiB;IA6BjB,kDAAkD;IAClD,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAsBhC,+BAA+B;IAC/B,eAAe,CAAC,GAAG,EAAE,MAAM;IAc3B,6BAA6B;IAC7B,YAAY,IAAI,MAAM;IAMtB,qBAAqB;IACrB,YAAY,CAAC,IAAI,SAAK;IAMtB,uCAAuC;IACvC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,EAAO;IAkBrD,+BAA+B;IAC/B,YAAY,CAAC,GAAG,EAAE,MAAM;IAMxB,kCAAkC;IAClC,cAAc;IAWd,2BAA2B;IAC3B,cAAc,CAAC,OAAO,EAAE,MAAM;IAO9B,0BAA0B;IAC1B,YAAY,CAAC,EAAE,OAAe,EAAE,OAAe,EAAE;;;KAAK;IAStD,iCAAiC;IACjC,uBAAuB;IAmBvB,qCAAqC;IACrC,gBAAgB;IAKhB,yBAAyB;IACzB,gBAAgB;IAKhB,6BAA6B;IAC7B,gBAAgB;IAIhB,oEAAoE;IACpE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IASzC,yDAAyD;IACzD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IASvC,6CAA6C;IAC7C,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAUhC,2BAA2B;IAC3B,aAAa;CAMd"}
|