@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.
- package/dist/index.js +13000 -10094
- package/dist/index.umd.cjs +327 -24
- package/dist/libredwg-parser-worker.js +7267 -7238
- package/dist/mtext-renderer-worker.js +81 -41
- package/lib/app/AcApContext.js +1 -1
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +20 -3
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +67 -12
- 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/AcApZoomCmd.js +1 -1
- package/lib/command/AcApZoomCmd.js.map +1 -1
- 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 +116 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.js +481 -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 +54 -16
- 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/editor/view/AcEdLayerInfo.d.ts +5 -0
- package/lib/editor/view/AcEdLayerInfo.d.ts.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/AcTrLayer.d.ts +29 -5
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +44 -6
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayout.d.ts +13 -7
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +29 -21
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +22 -8
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +36 -9
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +19 -4
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +135 -43
- 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,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for {@link AcApProgress}.
|
|
3
|
+
*/
|
|
4
|
+
export interface AcApProgressOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Size of the circular loader (width & height).
|
|
7
|
+
* Accepts any valid CSS length value (e.g. "48px", "3rem", "25%").
|
|
8
|
+
* @defaultValue `"48px"`
|
|
9
|
+
*/
|
|
10
|
+
size?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Width of the spinner border stroke.
|
|
13
|
+
* Should be a valid CSS length value.
|
|
14
|
+
* @defaultValue `"5px"`
|
|
15
|
+
*/
|
|
16
|
+
borderWidth?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Color of the animated spinner arc.
|
|
19
|
+
* Accepts any valid CSS color format.
|
|
20
|
+
* @defaultValue `"#0b84ff"`
|
|
21
|
+
*/
|
|
22
|
+
color?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether a fullscreen overlay background is shown.
|
|
25
|
+
* @defaultValue `true`
|
|
26
|
+
*/
|
|
27
|
+
overlay?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Background color used when {@link overlay} is enabled.
|
|
30
|
+
* @defaultValue `"rgba(0,0,0,0.18)"`
|
|
31
|
+
*/
|
|
32
|
+
overlayColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional message text displayed under the spinner.
|
|
35
|
+
* Hidden automatically if empty or undefined.
|
|
36
|
+
* @defaultValue `""`
|
|
37
|
+
*/
|
|
38
|
+
message?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Displays a centered infinite circular loading indicator with optional text.
|
|
42
|
+
*
|
|
43
|
+
* Features:
|
|
44
|
+
* - Framework-free — pure TypeScript & DOM
|
|
45
|
+
* - Auto-injects required CSS once per document
|
|
46
|
+
* - Shows/hides without removing DOM
|
|
47
|
+
* - Dynamically update message text
|
|
48
|
+
* - Safe for multiple instances
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const progress = new AcApProgress({ message: "Loading data…" });
|
|
53
|
+
* progress.show();
|
|
54
|
+
*
|
|
55
|
+
* setTimeout(() => {
|
|
56
|
+
* progress.setMessage("Almost done…");
|
|
57
|
+
* }, 1500);
|
|
58
|
+
*
|
|
59
|
+
* // progress.hide();
|
|
60
|
+
* // progress.destroy();
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare class AcApProgress {
|
|
64
|
+
/**
|
|
65
|
+
* ID assigned to the injected `<style>` element.
|
|
66
|
+
* Used to ensure styles are only injected once.
|
|
67
|
+
*/
|
|
68
|
+
static readonly styleId: string;
|
|
69
|
+
/**
|
|
70
|
+
* Tracks whether component CSS has already been injected.
|
|
71
|
+
*/
|
|
72
|
+
static stylesInjected: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Root overlay container element appended to `document.body`.
|
|
75
|
+
*/
|
|
76
|
+
root: HTMLDivElement;
|
|
77
|
+
/**
|
|
78
|
+
* Spinner circle element.
|
|
79
|
+
*/
|
|
80
|
+
spinner: HTMLDivElement;
|
|
81
|
+
/**
|
|
82
|
+
* Message text element displayed under the spinner.
|
|
83
|
+
*/
|
|
84
|
+
messageEl: HTMLDivElement;
|
|
85
|
+
/**
|
|
86
|
+
* Immutable resolved configuration for this instance.
|
|
87
|
+
*/
|
|
88
|
+
readonly options: Required<AcApProgressOptions>;
|
|
89
|
+
/**
|
|
90
|
+
* Creates a new fullscreen infinite progress indicator.
|
|
91
|
+
*
|
|
92
|
+
* @param options - Optional {@link AcApProgressOptions} controlling appearance & behavior
|
|
93
|
+
*/
|
|
94
|
+
constructor(options?: AcApProgressOptions);
|
|
95
|
+
/**
|
|
96
|
+
* Makes the progress indicator visible.
|
|
97
|
+
* The DOM remains mounted for efficiency.
|
|
98
|
+
*
|
|
99
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
100
|
+
*/
|
|
101
|
+
show(): this;
|
|
102
|
+
/**
|
|
103
|
+
* Hides the progress indicator without removing it from the DOM.
|
|
104
|
+
*
|
|
105
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
106
|
+
*/
|
|
107
|
+
hide(): this;
|
|
108
|
+
/**
|
|
109
|
+
* Updates the displayed message text beneath the spinner.
|
|
110
|
+
*
|
|
111
|
+
* If the message is empty or undefined, the message element is hidden.
|
|
112
|
+
*
|
|
113
|
+
* @param text - New message text
|
|
114
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
115
|
+
*/
|
|
116
|
+
setMessage(text?: string): this;
|
|
117
|
+
/**
|
|
118
|
+
* Completely removes the component from the DOM.
|
|
119
|
+
* Safe to call multiple times.
|
|
120
|
+
*/
|
|
121
|
+
destroy(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Creates required DOM elements and mounts them into `document.body`.
|
|
124
|
+
* Called automatically by constructor.
|
|
125
|
+
*/
|
|
126
|
+
private createDom;
|
|
127
|
+
/**
|
|
128
|
+
* Injects required CSS into the document `<head>` if not already present.
|
|
129
|
+
* Called automatically and only once globally.
|
|
130
|
+
*/
|
|
131
|
+
private injectStyles;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=AcApProgress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApProgress.d.ts","sourceRoot":"","sources":["../../src/app/AcApProgress.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IACH,gBAAuB,OAAO,EAAE,MAAM,CAAyB;IAE/D;;OAEG;IACH,OAAc,cAAc,UAAQ;IAEpC;;OAEG;IACI,IAAI,EAAG,cAAc,CAAA;IAE5B;;OAEG;IACI,OAAO,EAAG,cAAc,CAAA;IAE/B;;OAEG;IACI,SAAS,EAAG,cAAc,CAAA;IAEjC;;OAEG;IACH,SAAgB,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAA;IAEtD;;;;OAIG;gBACS,OAAO,GAAE,mBAAwB;IAiB7C;;;;;OAKG;IACI,IAAI,IAAI,IAAI;IAKnB;;;;OAIG;IACI,IAAI,IAAI,IAAI;IAKnB;;;;;;;OAOG;IACI,UAAU,CAAC,IAAI,SAAK,GAAG,IAAI;IAMlC;;;OAGG;IACI,OAAO,IAAI,IAAI;IAMtB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAiCjB;;;OAGG;IACH,OAAO,CAAC,YAAY;CAqDrB"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Displays a centered infinite circular loading indicator with optional text.
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Framework-free — pure TypeScript & DOM
|
|
6
|
+
* - Auto-injects required CSS once per document
|
|
7
|
+
* - Shows/hides without removing DOM
|
|
8
|
+
* - Dynamically update message text
|
|
9
|
+
* - Safe for multiple instances
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const progress = new AcApProgress({ message: "Loading data…" });
|
|
14
|
+
* progress.show();
|
|
15
|
+
*
|
|
16
|
+
* setTimeout(() => {
|
|
17
|
+
* progress.setMessage("Almost done…");
|
|
18
|
+
* }, 1500);
|
|
19
|
+
*
|
|
20
|
+
* // progress.hide();
|
|
21
|
+
* // progress.destroy();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
var AcApProgress = /** @class */ (function () {
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new fullscreen infinite progress indicator.
|
|
27
|
+
*
|
|
28
|
+
* @param options - Optional {@link AcApProgressOptions} controlling appearance & behavior
|
|
29
|
+
*/
|
|
30
|
+
function AcApProgress(options) {
|
|
31
|
+
if (options === void 0) { options = {}; }
|
|
32
|
+
var _a, _b, _c, _d, _e, _f;
|
|
33
|
+
this.options = {
|
|
34
|
+
size: (_a = options.size) !== null && _a !== void 0 ? _a : '48px',
|
|
35
|
+
borderWidth: (_b = options.borderWidth) !== null && _b !== void 0 ? _b : '5px',
|
|
36
|
+
color: (_c = options.color) !== null && _c !== void 0 ? _c : '#0b84ff',
|
|
37
|
+
overlay: (_d = options.overlay) !== null && _d !== void 0 ? _d : true,
|
|
38
|
+
overlayColor: (_e = options.overlayColor) !== null && _e !== void 0 ? _e : 'rgba(0,0,0,0.5)',
|
|
39
|
+
message: (_f = options.message) !== null && _f !== void 0 ? _f : ''
|
|
40
|
+
};
|
|
41
|
+
if (!AcApProgress.stylesInjected) {
|
|
42
|
+
this.injectStyles();
|
|
43
|
+
}
|
|
44
|
+
this.createDom();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Makes the progress indicator visible.
|
|
48
|
+
* The DOM remains mounted for efficiency.
|
|
49
|
+
*
|
|
50
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
51
|
+
*/
|
|
52
|
+
AcApProgress.prototype.show = function () {
|
|
53
|
+
this.root.style.display = 'flex';
|
|
54
|
+
return this;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Hides the progress indicator without removing it from the DOM.
|
|
58
|
+
*
|
|
59
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
60
|
+
*/
|
|
61
|
+
AcApProgress.prototype.hide = function () {
|
|
62
|
+
this.root.style.display = 'none';
|
|
63
|
+
return this;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Updates the displayed message text beneath the spinner.
|
|
67
|
+
*
|
|
68
|
+
* If the message is empty or undefined, the message element is hidden.
|
|
69
|
+
*
|
|
70
|
+
* @param text - New message text
|
|
71
|
+
* @returns The current {@link AcApProgress} instance (for chaining)
|
|
72
|
+
*/
|
|
73
|
+
AcApProgress.prototype.setMessage = function (text) {
|
|
74
|
+
if (text === void 0) { text = ''; }
|
|
75
|
+
this.messageEl.textContent = text;
|
|
76
|
+
this.messageEl.style.display = text ? 'block' : 'none';
|
|
77
|
+
return this;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Completely removes the component from the DOM.
|
|
81
|
+
* Safe to call multiple times.
|
|
82
|
+
*/
|
|
83
|
+
AcApProgress.prototype.destroy = function () {
|
|
84
|
+
var _a;
|
|
85
|
+
if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
86
|
+
this.root.parentNode.removeChild(this.root);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Creates required DOM elements and mounts them into `document.body`.
|
|
91
|
+
* Called automatically by constructor.
|
|
92
|
+
*/
|
|
93
|
+
AcApProgress.prototype.createDom = function () {
|
|
94
|
+
var root = document.createElement('div');
|
|
95
|
+
root.className = 'ml-ccl-overlay';
|
|
96
|
+
root.style.display = 'flex';
|
|
97
|
+
root.style.background = this.options.overlay
|
|
98
|
+
? this.options.overlayColor
|
|
99
|
+
: 'transparent';
|
|
100
|
+
var spinner = document.createElement('div');
|
|
101
|
+
spinner.className = 'ml-ccl-spinner';
|
|
102
|
+
spinner.style.width = this.options.size;
|
|
103
|
+
spinner.style.height = this.options.size;
|
|
104
|
+
spinner.style.borderWidth = this.options.borderWidth;
|
|
105
|
+
spinner.style.borderTopColor = this.options.color;
|
|
106
|
+
var message = document.createElement('div');
|
|
107
|
+
message.className = 'ml-ccl-message';
|
|
108
|
+
message.textContent = this.options.message;
|
|
109
|
+
message.style.display = this.options.message ? 'block' : 'none';
|
|
110
|
+
var wrapper = document.createElement('div');
|
|
111
|
+
wrapper.className = 'ml-ccl-wrapper';
|
|
112
|
+
wrapper.appendChild(spinner);
|
|
113
|
+
wrapper.appendChild(message);
|
|
114
|
+
root.appendChild(wrapper);
|
|
115
|
+
document.body.appendChild(root);
|
|
116
|
+
this.root = root;
|
|
117
|
+
this.spinner = spinner;
|
|
118
|
+
this.messageEl = message;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Injects required CSS into the document `<head>` if not already present.
|
|
122
|
+
* Called automatically and only once globally.
|
|
123
|
+
*/
|
|
124
|
+
AcApProgress.prototype.injectStyles = function () {
|
|
125
|
+
if (document.getElementById(AcApProgress.styleId)) {
|
|
126
|
+
AcApProgress.stylesInjected = true;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
var css = "\n .ml-ccl-overlay {\n position: fixed;\n inset: 0;\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n pointer-events: auto;\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, Helvetica, Arial;\n }\n \n .ml-ccl-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n \n .ml-ccl-spinner {\n border-radius: 50%;\n border-style: solid;\n border-color: rgba(0,0,0,0.25);\n border-top-color: #0b84ff;\n animation: ml-ccl-rotate 0.85s linear infinite;\n box-sizing: border-box;\n }\n \n .ml-ccl-message {\n margin-top: 12px;\n font-size: 14px;\n color: #FFF;\n text-align: center;\n user-select: none;\n }\n \n @keyframes ml-ccl-rotate {\n to { transform: rotate(360deg); }\n }\n ".trim();
|
|
130
|
+
var style = document.createElement('style');
|
|
131
|
+
style.id = AcApProgress.styleId;
|
|
132
|
+
style.textContent = css;
|
|
133
|
+
document.head.appendChild(style);
|
|
134
|
+
AcApProgress.stylesInjected = true;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* ID assigned to the injected `<style>` element.
|
|
138
|
+
* Used to ensure styles are only injected once.
|
|
139
|
+
*/
|
|
140
|
+
AcApProgress.styleId = 'ml-ccl-loader-styles';
|
|
141
|
+
/**
|
|
142
|
+
* Tracks whether component CSS has already been injected.
|
|
143
|
+
*/
|
|
144
|
+
AcApProgress.stylesInjected = false;
|
|
145
|
+
return AcApProgress;
|
|
146
|
+
}());
|
|
147
|
+
export { AcApProgress };
|
|
148
|
+
//# sourceMappingURL=AcApProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApProgress.js","sourceRoot":"","sources":["../../src/app/AcApProgress.ts"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAgCE;;;;OAIG;IACH,sBAAY,OAAiC;QAAjC,wBAAA,EAAA,YAAiC;;QAC3C,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCA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AW,CAAC,OAAO,CAAC,CAAA;QAE5B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QAE/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAA;IAC1B,CAAC;IAED;;;OAGG;IACK,mCAAY,GAApB;QACE,IAAI,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;YAClD,YAAY,CAAC,cAAc,GAAG,IAAI,CAAA;YAClC,OAAM;QACR,CAAC;QAED,IAAM,GAAG,GAAG,q0BAsCT,CAAC,IAAI,EAAE,CAAA;QAEV,IAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC7C,KAAK,CAAC,EAAE,GAAG,YAAY,CAAC,OAAO,CAAA;QAC/B,KAAK,CAAC,WAAW,GAAG,GAAG,CAAA;QACvB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QAEhC,YAAY,CAAC,cAAc,GAAG,IAAI,CAAA;IACpC,CAAC;IA/LD;;;OAGG;IACoB,oBAAO,GAAW,sBAAsB,CAAA;IAE/D;;OAEG;IACW,2BAAc,GAAG,KAAK,CAAA;IAuLtC,mBAAC;CAAA,AAjMD,IAiMC;SAjMY,YAAY"}
|
|
@@ -27,6 +27,12 @@ export interface AcApSettings {
|
|
|
27
27
|
isShowCommandLine: boolean;
|
|
28
28
|
/** Whether coordinate display is visible */
|
|
29
29
|
isShowCoordinate: boolean;
|
|
30
|
+
/** Whether entity info card is visible */
|
|
31
|
+
isShowEntityInfo: boolean;
|
|
32
|
+
/** Whether language selector is visible */
|
|
33
|
+
isShowLanguageSelector: boolean;
|
|
34
|
+
/** Whether main menu is visible */
|
|
35
|
+
isShowMainMenu: boolean;
|
|
30
36
|
/** Whether the toolbar is visible */
|
|
31
37
|
isShowToolbar: boolean;
|
|
32
38
|
/** Whether performance statistics are displayed */
|
|
@@ -177,6 +183,42 @@ export declare class AcApSettingManager<T extends AcApSettings = AcApSettings> {
|
|
|
177
183
|
* @param value - True to show coordinates
|
|
178
184
|
*/
|
|
179
185
|
set isShowCoordinate(value: boolean);
|
|
186
|
+
/**
|
|
187
|
+
* Gets whether entity info card is visible.
|
|
188
|
+
*
|
|
189
|
+
* @returns True if entity info card should be displayed
|
|
190
|
+
*/
|
|
191
|
+
get isShowEntityInfo(): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Sets whether entity info card is visible.
|
|
194
|
+
*
|
|
195
|
+
* @param value - True to show entity info card
|
|
196
|
+
*/
|
|
197
|
+
set isShowEntityInfo(value: boolean);
|
|
198
|
+
/**
|
|
199
|
+
* Gets whether language selector is visible.
|
|
200
|
+
*
|
|
201
|
+
* @returns True if language selector should be displayed
|
|
202
|
+
*/
|
|
203
|
+
get isShowLanguageSelector(): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Sets whether language selector is visible.
|
|
206
|
+
*
|
|
207
|
+
* @param value - True to show language selector
|
|
208
|
+
*/
|
|
209
|
+
set isShowLanguageSelector(value: boolean);
|
|
210
|
+
/**
|
|
211
|
+
* Gets whether the main menu is visible.
|
|
212
|
+
*
|
|
213
|
+
* @returns True if the main menu should be displayed
|
|
214
|
+
*/
|
|
215
|
+
get isShowMainMenu(): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Sets whether the main menu is visible.
|
|
218
|
+
*
|
|
219
|
+
* @param value - True to show the main menu
|
|
220
|
+
*/
|
|
221
|
+
set isShowMainMenu(value: boolean);
|
|
180
222
|
/**
|
|
181
223
|
* Gets whether the toolbar is visible.
|
|
182
224
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApSettingManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":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sB,IASQ,OAAO,CAPxC;IAED;;;;OAIG;IACH,IAAI,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAExC;IAED;;;;OAIG;IACH,IAAI,cAAc,IASQ,OAAO,CAPhC;IAED;;;;OAIG;IACH,IAAI,cAAc,CAAC,KAAK,EAAE,OAAO,EAEhC;IAED;;;;OAIG;IACH,IAAI,aAAa,IASQ,OAAO,CAP/B;IAED;;;;OAIG;IACH,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAE/B;IAED;;;;OAIG;IACH,IAAI,WAAW,IASQ,OAAO,CAP7B;IAED;;;;OAIG;IACH,IAAI,WAAW,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED;;;;OAIG;IACH,IAAI,WAAW,IASQ,eAAe,CAPrC;IAED;;;;OAIG;IACH,IAAI,WAAW,CAAC,KAAK,EAAE,eAAe,EAErC;IAED;;;;;OAKG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAMvD;;;;;;OAMG;IACH,IAAI,QAAQ,kCAIX;CACF"}
|
|
@@ -5,6 +5,9 @@ var DEFAULT_VALUES = {
|
|
|
5
5
|
isDebug: false,
|
|
6
6
|
isShowCommandLine: true,
|
|
7
7
|
isShowCoordinate: true,
|
|
8
|
+
isShowEntityInfo: false,
|
|
9
|
+
isShowLanguageSelector: true,
|
|
10
|
+
isShowMainMenu: true,
|
|
8
11
|
isShowToolbar: true,
|
|
9
12
|
isShowStats: false,
|
|
10
13
|
fontMapping: {}
|
|
@@ -190,6 +193,66 @@ var AcApSettingManager = /** @class */ (function () {
|
|
|
190
193
|
enumerable: false,
|
|
191
194
|
configurable: true
|
|
192
195
|
});
|
|
196
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowEntityInfo", {
|
|
197
|
+
/**
|
|
198
|
+
* Gets whether entity info card is visible.
|
|
199
|
+
*
|
|
200
|
+
* @returns True if entity info card should be displayed
|
|
201
|
+
*/
|
|
202
|
+
get: function () {
|
|
203
|
+
return this.get('isShowEntityInfo');
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Sets whether entity info card is visible.
|
|
207
|
+
*
|
|
208
|
+
* @param value - True to show entity info card
|
|
209
|
+
*/
|
|
210
|
+
set: function (value) {
|
|
211
|
+
this.set('isShowEntityInfo', value);
|
|
212
|
+
},
|
|
213
|
+
enumerable: false,
|
|
214
|
+
configurable: true
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowLanguageSelector", {
|
|
217
|
+
/**
|
|
218
|
+
* Gets whether language selector is visible.
|
|
219
|
+
*
|
|
220
|
+
* @returns True if language selector should be displayed
|
|
221
|
+
*/
|
|
222
|
+
get: function () {
|
|
223
|
+
return this.get('isShowLanguageSelector');
|
|
224
|
+
},
|
|
225
|
+
/**
|
|
226
|
+
* Sets whether language selector is visible.
|
|
227
|
+
*
|
|
228
|
+
* @param value - True to show language selector
|
|
229
|
+
*/
|
|
230
|
+
set: function (value) {
|
|
231
|
+
this.set('isShowLanguageSelector', value);
|
|
232
|
+
},
|
|
233
|
+
enumerable: false,
|
|
234
|
+
configurable: true
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowMainMenu", {
|
|
237
|
+
/**
|
|
238
|
+
* Gets whether the main menu is visible.
|
|
239
|
+
*
|
|
240
|
+
* @returns True if the main menu should be displayed
|
|
241
|
+
*/
|
|
242
|
+
get: function () {
|
|
243
|
+
return this.get('isShowMainMenu');
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* Sets whether the main menu is visible.
|
|
247
|
+
*
|
|
248
|
+
* @param value - True to show the main menu
|
|
249
|
+
*/
|
|
250
|
+
set: function (value) {
|
|
251
|
+
this.set('isShowMainMenu', value);
|
|
252
|
+
},
|
|
253
|
+
enumerable: false,
|
|
254
|
+
configurable: true
|
|
255
|
+
});
|
|
193
256
|
Object.defineProperty(AcApSettingManager.prototype, "isShowToolbar", {
|
|
194
257
|
/**
|
|
195
258
|
* Gets whether the toolbar is visible.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApSettingManager.js","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApSettingManager.js","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA6CpC,kDAAkD;AAClD,IAAM,cAAc,GAAiB;IACnC,OAAO,EAAE,KAAK;IACd,iBAAiB,EAAE,IAAI;IACvB,gBAAgB,EAAE,IAAI;IACtB,gBAAgB,EAAE,KAAK;IACvB,sBAAsB,EAAE,IAAI;IAC5B,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,EAAE;CAChB,CAAA;AAED,gDAAgD;AAChD,IAAM,eAAe,GAAG,UAAU,CAAA;AAgBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAAA;QAIE,8CAA8C;QAC9B,WAAM,GAAG;YACvB,yCAAyC;YACzC,QAAQ,EAAE,IAAI,gBAAgB,EAAkC;SACjE,CAAA;IA0QH,CAAC;IAjQC,sBAAW,8BAAQ;QAPnB;;;;;;WAMG;aACH;YACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;gBACpB,IAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,EAAE,CAAA;YAC3C,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;;;OAAA;IAED;;;;;;;;;;;;;;OAcG;IACH,gCAAG,GAAH,UAAuB,GAAM,EAAE,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AAI,2CAAW;QALf;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;QAChC,CAAC;QAED;;;;WAIG;aACH,UAAgB,KAAsB;YACpC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;QAChC,CAAC;;;OATA;IAWD;;;;;OAKG;IACH,2CAAc,GAAd,UAAe,YAAoB,EAAE,UAAkB;QACrD,IAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAoB,CAAA;QAC1D,OAAO,CAAC,YAAY,CAAC,GAAG,UAAU,CAAA;QAClC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;IAClC,CAAC;IASD,sBAAI,wCAAQ;QAPZ;;;;;;WAMG;aACH;YACE,IAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;YACpD,IAAM,OAAO,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAM,CAAA;YAC/D,OAAO,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC;;;OAAA;IACH,yBAAC;AAAD,CAAC,AAlRD,IAkRC"}
|
package/lib/app/index.d.ts
CHANGED
package/lib/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
package/lib/app/index.js
CHANGED
package/lib/app/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AcDbCircle, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcApContext } from '../app';
|
|
3
|
+
import { AcEdBaseView, AcEdCommand, AcEdPreviewJig } from '../editor';
|
|
4
|
+
export declare class AcApCircleJig extends AcEdPreviewJig<number> {
|
|
5
|
+
private _circle;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new zoom-to-box jig.
|
|
8
|
+
*
|
|
9
|
+
* @param view - The view that will be zoomed
|
|
10
|
+
*/
|
|
11
|
+
constructor(view: AcEdBaseView, center: AcGePoint3dLike);
|
|
12
|
+
get entity(): AcDbCircle;
|
|
13
|
+
update(radius: number): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Example Command to create one circle to demostrate how to use Jig.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AcApCircleCmd extends AcEdCommand {
|
|
19
|
+
execute(context: AcApContext): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AcApCircleCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApCircleCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApCircleCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EAGf,MAAM,WAAW,CAAA;AAGlB,qBAAa,aAAc,SAAQ,cAAc,CAAC,MAAM,CAAC;IACvD,OAAO,CAAC,OAAO,CAAY;IAE3B;;;;OAIG;gBACS,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe;IAKvD,IAAI,MAAM,IAAI,UAAU,CAEvB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM;CAGtB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IACtC,OAAO,CAAC,OAAO,EAAE,WAAW;CAiBnC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { AcDbCircle } from '@mlightcad/data-model';
|
|
53
|
+
import { AcApDocManager } from '../app';
|
|
54
|
+
import { AcEdCommand, AcEdPreviewJig, AcEdPromptDistanceOptions, AcEdPromptPointOptions } from '../editor';
|
|
55
|
+
import { AcApI18n } from '../i18n';
|
|
56
|
+
var AcApCircleJig = /** @class */ (function (_super) {
|
|
57
|
+
__extends(AcApCircleJig, _super);
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new zoom-to-box jig.
|
|
60
|
+
*
|
|
61
|
+
* @param view - The view that will be zoomed
|
|
62
|
+
*/
|
|
63
|
+
function AcApCircleJig(view, center) {
|
|
64
|
+
var _this = _super.call(this, view) || this;
|
|
65
|
+
_this._circle = new AcDbCircle(center, 0);
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
Object.defineProperty(AcApCircleJig.prototype, "entity", {
|
|
69
|
+
get: function () {
|
|
70
|
+
return this._circle;
|
|
71
|
+
},
|
|
72
|
+
enumerable: false,
|
|
73
|
+
configurable: true
|
|
74
|
+
});
|
|
75
|
+
AcApCircleJig.prototype.update = function (radius) {
|
|
76
|
+
this._circle.radius = radius;
|
|
77
|
+
};
|
|
78
|
+
return AcApCircleJig;
|
|
79
|
+
}(AcEdPreviewJig));
|
|
80
|
+
export { AcApCircleJig };
|
|
81
|
+
/**
|
|
82
|
+
* Example Command to create one circle to demostrate how to use Jig.
|
|
83
|
+
*/
|
|
84
|
+
var AcApCircleCmd = /** @class */ (function (_super) {
|
|
85
|
+
__extends(AcApCircleCmd, _super);
|
|
86
|
+
function AcApCircleCmd() {
|
|
87
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
|
+
}
|
|
89
|
+
AcApCircleCmd.prototype.execute = function (context) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
var centerPrompt, center, radiusPrompt, radius, db, circle;
|
|
92
|
+
return __generator(this, function (_a) {
|
|
93
|
+
switch (_a.label) {
|
|
94
|
+
case 0:
|
|
95
|
+
centerPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.circle.center'));
|
|
96
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(centerPrompt)];
|
|
97
|
+
case 1:
|
|
98
|
+
center = _a.sent();
|
|
99
|
+
radiusPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.circle.radius'));
|
|
100
|
+
radiusPrompt.jig = new AcApCircleJig(context.view, center);
|
|
101
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(radiusPrompt)];
|
|
102
|
+
case 2:
|
|
103
|
+
radius = _a.sent();
|
|
104
|
+
db = context.doc.database;
|
|
105
|
+
circle = new AcDbCircle(center, radius);
|
|
106
|
+
db.tables.blockTable.modelSpace.appendEntity(circle);
|
|
107
|
+
return [2 /*return*/];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
return AcApCircleCmd;
|
|
113
|
+
}(AcEdCommand));
|
|
114
|
+
export { AcApCircleCmd };
|
|
115
|
+
//# sourceMappingURL=AcApCircleCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApCircleCmd.js","sourceRoot":"","sources":["../../src/command/AcApCircleCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,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