@mlightcad/cad-simple-viewer 1.4.12 → 1.4.13

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 (160) hide show
  1. package/dist/index.js +15901 -10590
  2. package/dist/index.umd.cjs +55 -48
  3. package/dist/libredwg-parser-worker.js +4724 -4762
  4. package/lib/app/AcApDocManager.d.ts +60 -4
  5. package/lib/app/AcApDocManager.d.ts.map +1 -1
  6. package/lib/app/AcApDocManager.js +160 -33
  7. package/lib/app/AcApDocManager.js.map +1 -1
  8. package/lib/command/AcApArcCmd.d.ts.map +1 -1
  9. package/lib/command/AcApArcCmd.js +1 -1
  10. package/lib/command/AcApArcCmd.js.map +1 -1
  11. package/lib/command/AcApCircleCmd.d.ts +59 -0
  12. package/lib/command/AcApCircleCmd.d.ts.map +1 -1
  13. package/lib/command/AcApCircleCmd.js +489 -18
  14. package/lib/command/AcApCircleCmd.js.map +1 -1
  15. package/lib/command/AcApConvertToPngCmd.d.ts +35 -0
  16. package/lib/command/AcApConvertToPngCmd.d.ts.map +1 -0
  17. package/lib/command/{AcApZoomToBoxCmd.js → AcApConvertToPngCmd.js} +50 -26
  18. package/lib/command/AcApConvertToPngCmd.js.map +1 -0
  19. package/lib/command/AcApEllipseCmd.d.ts +87 -0
  20. package/lib/command/AcApEllipseCmd.d.ts.map +1 -0
  21. package/lib/command/AcApEllipseCmd.js +583 -0
  22. package/lib/command/AcApEllipseCmd.js.map +1 -0
  23. package/lib/command/AcApHatchCmd.d.ts +210 -0
  24. package/lib/command/AcApHatchCmd.d.ts.map +1 -0
  25. package/lib/command/AcApHatchCmd.js +808 -0
  26. package/lib/command/AcApHatchCmd.js.map +1 -0
  27. package/lib/command/AcApLayerCmd.d.ts +217 -0
  28. package/lib/command/AcApLayerCmd.d.ts.map +1 -0
  29. package/lib/command/AcApLayerCmd.js +768 -0
  30. package/lib/command/AcApLayerCmd.js.map +1 -0
  31. package/lib/command/AcApLineCmd.d.ts +36 -1
  32. package/lib/command/AcApLineCmd.d.ts.map +1 -1
  33. package/lib/command/AcApLineCmd.js +157 -20
  34. package/lib/command/AcApLineCmd.js.map +1 -1
  35. package/lib/command/AcApMeasureAreaCmd.d.ts.map +1 -1
  36. package/lib/command/AcApMeasureAreaCmd.js +3 -0
  37. package/lib/command/AcApMeasureAreaCmd.js.map +1 -1
  38. package/lib/command/AcApMoveCmd.d.ts +16 -0
  39. package/lib/command/AcApMoveCmd.d.ts.map +1 -0
  40. package/lib/command/AcApMoveCmd.js +278 -0
  41. package/lib/command/AcApMoveCmd.js.map +1 -0
  42. package/lib/command/AcApPngConvertor.d.ts +95 -0
  43. package/lib/command/AcApPngConvertor.d.ts.map +1 -0
  44. package/lib/command/AcApPngConvertor.js +205 -0
  45. package/lib/command/AcApPngConvertor.js.map +1 -0
  46. package/lib/command/AcApPolygonCmd.d.ts +69 -0
  47. package/lib/command/AcApPolygonCmd.d.ts.map +1 -0
  48. package/lib/command/AcApPolygonCmd.js +422 -0
  49. package/lib/command/AcApPolygonCmd.js.map +1 -0
  50. package/lib/command/AcApRectCmd.d.ts +149 -4
  51. package/lib/command/AcApRectCmd.d.ts.map +1 -1
  52. package/lib/command/AcApRectCmd.js +716 -34
  53. package/lib/command/AcApRectCmd.js.map +1 -1
  54. package/lib/command/AcApRevCircleCmd.d.ts +8 -0
  55. package/lib/command/AcApRevCircleCmd.d.ts.map +1 -1
  56. package/lib/command/AcApRevCircleCmd.js +30 -6
  57. package/lib/command/AcApRevCircleCmd.js.map +1 -1
  58. package/lib/command/AcApRevRectCmd.d.ts +8 -0
  59. package/lib/command/AcApRevRectCmd.d.ts.map +1 -1
  60. package/lib/command/AcApRevRectCmd.js +78 -6
  61. package/lib/command/AcApRevRectCmd.js.map +1 -1
  62. package/lib/command/AcApSplineCmd.d.ts +66 -1
  63. package/lib/command/AcApSplineCmd.d.ts.map +1 -1
  64. package/lib/command/AcApSplineCmd.js +466 -59
  65. package/lib/command/AcApSplineCmd.js.map +1 -1
  66. package/lib/command/AcApZoomCmd.d.ts +91 -20
  67. package/lib/command/AcApZoomCmd.d.ts.map +1 -1
  68. package/lib/command/AcApZoomCmd.js +288 -23
  69. package/lib/command/AcApZoomCmd.js.map +1 -1
  70. package/lib/command/index.d.ts +7 -1
  71. package/lib/command/index.d.ts.map +1 -1
  72. package/lib/command/index.js +7 -1
  73. package/lib/command/index.js.map +1 -1
  74. package/lib/editor/command/AcEdCommandStack.d.ts +54 -1
  75. package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
  76. package/lib/editor/command/AcEdCommandStack.js +207 -25
  77. package/lib/editor/command/AcEdCommandStack.js.map +1 -1
  78. package/lib/editor/input/AcEdSelectionFilter.d.ts +79 -0
  79. package/lib/editor/input/AcEdSelectionFilter.d.ts.map +1 -0
  80. package/lib/editor/input/AcEdSelectionFilter.js +231 -0
  81. package/lib/editor/input/AcEdSelectionFilter.js.map +1 -0
  82. package/lib/editor/input/AcEditor.d.ts +20 -2
  83. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  84. package/lib/editor/input/AcEditor.js +66 -0
  85. package/lib/editor/input/AcEditor.js.map +1 -1
  86. package/lib/editor/input/index.d.ts +1 -0
  87. package/lib/editor/input/index.d.ts.map +1 -1
  88. package/lib/editor/input/index.js +1 -0
  89. package/lib/editor/input/index.js.map +1 -1
  90. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +47 -0
  91. package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -1
  92. package/lib/editor/input/prompt/AcEdKeywordCollection.js +19 -0
  93. package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -1
  94. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
  95. package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
  96. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
  97. package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
  98. package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts +17 -0
  99. package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts.map +1 -1
  100. package/lib/editor/input/prompt/AcEdPromptEntityOptions.js +30 -3
  101. package/lib/editor/input/prompt/AcEdPromptEntityOptions.js.map +1 -1
  102. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +6 -1
  103. package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -1
  104. package/lib/editor/input/prompt/AcEdPromptOptions.js +7 -0
  105. package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -1
  106. package/lib/editor/input/session/AcEdKeywordSession.d.ts +65 -0
  107. package/lib/editor/input/session/AcEdKeywordSession.d.ts.map +1 -1
  108. package/lib/editor/input/session/AcEdKeywordSession.js +71 -0
  109. package/lib/editor/input/session/AcEdKeywordSession.js.map +1 -1
  110. package/lib/editor/input/ui/AcEdCommandLine.d.ts +23 -0
  111. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  112. package/lib/editor/input/ui/AcEdCommandLine.js +42 -6
  113. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  114. package/lib/editor/input/ui/AcEdFloatingInput.d.ts +1 -0
  115. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  116. package/lib/editor/input/ui/AcEdFloatingInput.js +8 -2
  117. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  118. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +23 -1
  119. package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
  120. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +32 -9
  121. package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
  122. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +28 -0
  123. package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
  124. package/lib/editor/input/ui/AcEdInputManager.d.ts +356 -16
  125. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  126. package/lib/editor/input/ui/AcEdInputManager.js +964 -529
  127. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  128. package/lib/editor/input/ui/AcEdRubberBand.d.ts +15 -1
  129. package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
  130. package/lib/editor/input/ui/AcEdRubberBand.js +42 -10
  131. package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
  132. package/lib/i18n/en/command.d.ts +21 -3
  133. package/lib/i18n/en/command.d.ts.map +1 -1
  134. package/lib/i18n/en/command.js +21 -3
  135. package/lib/i18n/en/command.js.map +1 -1
  136. package/lib/i18n/en/jig.d.ts +443 -0
  137. package/lib/i18n/en/jig.d.ts.map +1 -1
  138. package/lib/i18n/en/jig.js +452 -9
  139. package/lib/i18n/en/jig.js.map +1 -1
  140. package/lib/i18n/zh/command.d.ts +21 -3
  141. package/lib/i18n/zh/command.d.ts.map +1 -1
  142. package/lib/i18n/zh/command.js +21 -3
  143. package/lib/i18n/zh/command.js.map +1 -1
  144. package/lib/i18n/zh/jig.d.ts +443 -0
  145. package/lib/i18n/zh/jig.d.ts.map +1 -1
  146. package/lib/i18n/zh/jig.js +452 -9
  147. package/lib/i18n/zh/jig.js.map +1 -1
  148. package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
  149. package/lib/plugin/AcApPluginManager.js.map +1 -1
  150. package/lib/view/AcTrLayer.d.ts.map +1 -1
  151. package/lib/view/AcTrLayer.js +5 -3
  152. package/lib/view/AcTrLayer.js.map +1 -1
  153. package/lib/view/AcTrView2d.d.ts +0 -1
  154. package/lib/view/AcTrView2d.d.ts.map +1 -1
  155. package/lib/view/AcTrView2d.js +17 -4
  156. package/lib/view/AcTrView2d.js.map +1 -1
  157. package/package.json +11 -9
  158. package/lib/command/AcApZoomToBoxCmd.d.ts +0 -29
  159. package/lib/command/AcApZoomToBoxCmd.d.ts.map +0 -1
  160. package/lib/command/AcApZoomToBoxCmd.js.map +0 -1
@@ -1 +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AAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,EAAA;;wBAD5D,cAAc,GAClB,SAAgE;wBAClE,IAAI,cAAc,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE;4BAAE,sBAAO,SAAS,EAAA;wBAC7D,MAAM,GAAG,CAAC,MAAA,cAAc,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAA;wBAC9C,sBAAO,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,EAAA;;;;KACpD;IAED;;;;;;OAMG;IACK,2CAAmB,GAA3B,UAA4B,KAAsB,EAAE,MAAuB;QACzE,OAAO,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IACjD,CAAC;IAED;;;;;;;OAOG;IACK,6CAAqB,GAA7B,UACE,EAAmB,EACnB,EAAmB,EACnB,EAAmB;QAEnB,OAAO,2BAA2B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IAChD,CAAC;IACH,oBAAC;AAAD,CAAC,AA7aD,CAAmC,WAAW,GA6a7C"}
@@ -0,0 +1,35 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../editor';
3
+ /**
4
+ * Command for exporting the current CAD drawing to PNG format.
5
+ *
6
+ * This command creates a PNG converter and initiates the conversion
7
+ * process to export the current drawing as a PNG file. The command:
8
+ * - Creates a new PNG converter instance
9
+ * - Prompts for optional bounding box (or press Enter to use drawing extents)
10
+ * - Prompts for optional long side pixel value (or press Enter for default)
11
+ * - Converts the current view to PNG format
12
+ * - Automatically downloads the PNG file
13
+ *
14
+ * This is useful for exporting drawings to a raster image format
15
+ * that can be displayed in browsers or used in other applications.
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const convertCmd = new AcApConvertToPngCmd();
20
+ * convertCmd.execute(context); // User prompted for bounds and longside
21
+ * ```
22
+ */
23
+ export declare class AcApConvertToPngCmd extends AcEdCommand {
24
+ /**
25
+ * Executes the PNG conversion command.
26
+ *
27
+ * Prompts the user for:
28
+ * 1. Optional bounding box (press Enter to skip and use drawing extents)
29
+ * 2. Optional long side pixel value (press Enter for default 8000)
30
+ *
31
+ * @param _context - The application context (unused in this command)
32
+ */
33
+ execute(_context: AcApContext): Promise<void>;
34
+ }
35
+ //# sourceMappingURL=AcApConvertToPngCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToPngCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApConvertToPngCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,WAAW,EAIZ,MAAM,WAAW,CAAA;AAIlB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;CAqCpC"}
@@ -49,55 +49,79 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
+ import { AcGeBox2d, AcGePoint2d } from '@mlightcad/data-model';
52
53
  import { AcApDocManager } from '../app';
53
- import { AcEdCommand, AcEdPromptBoxOptions, AcEdPromptStatus } from '../editor';
54
+ import { AcEdCommand, AcEdPromptBoxOptions, AcEdPromptDoubleOptions, AcEdPromptStatus } from '../editor';
54
55
  import { AcApI18n } from '../i18n';
56
+ import { AcApPngConvertor } from './AcApPngConvertor';
55
57
  /**
56
- * Command for zooming to a user-selected rectangular area.
58
+ * Command for exporting the current CAD drawing to PNG format.
57
59
  *
58
- * This command initiates an interactive zoom-to-box operation where:
59
- * - User selects a rectangular area by dragging
60
- * - The view zooms to fit the selected area
61
- * - The zoom level is adjusted to show the entire selected region
60
+ * This command creates a PNG converter and initiates the conversion
61
+ * process to export the current drawing as a PNG file. The command:
62
+ * - Creates a new PNG converter instance
63
+ * - Prompts for optional bounding box (or press Enter to use drawing extents)
64
+ * - Prompts for optional long side pixel value (or press Enter for default)
65
+ * - Converts the current view to PNG format
66
+ * - Automatically downloads the PNG file
62
67
  *
63
- * This provides precise navigation control, allowing users to quickly
64
- * focus on specific areas of large drawings.
68
+ * This is useful for exporting drawings to a raster image format
69
+ * that can be displayed in browsers or used in other applications.
65
70
  *
66
71
  * @example
67
72
  * ```typescript
68
- * const zoomToBoxCmd = new AcApZoomToBoxCmd();
69
- * await zoomToBoxCmd.execute(context); // User selects area to zoom to
73
+ * const convertCmd = new AcApConvertToPngCmd();
74
+ * convertCmd.execute(context); // User prompted for bounds and longside
70
75
  * ```
71
76
  */
72
- var AcApZoomToBoxCmd = /** @class */ (function (_super) {
73
- __extends(AcApZoomToBoxCmd, _super);
74
- function AcApZoomToBoxCmd() {
77
+ var AcApConvertToPngCmd = /** @class */ (function (_super) {
78
+ __extends(AcApConvertToPngCmd, _super);
79
+ function AcApConvertToPngCmd() {
75
80
  return _super !== null && _super.apply(this, arguments) || this;
76
81
  }
77
82
  /**
78
- * Executes the zoom-to-box command.
83
+ * Executes the PNG conversion command.
79
84
  *
80
- * @param context - The application context containing the view
81
- * @returns Promise that resolves when the zoom operation completes
85
+ * Prompts the user for:
86
+ * 1. Optional bounding box (press Enter to skip and use drawing extents)
87
+ * 2. Optional long side pixel value (press Enter for default 8000)
88
+ *
89
+ * @param _context - The application context (unused in this command)
82
90
  */
83
- AcApZoomToBoxCmd.prototype.execute = function (context) {
91
+ AcApConvertToPngCmd.prototype.execute = function (_context) {
84
92
  return __awaiter(this, void 0, void 0, function () {
85
- var options, boxResult;
93
+ var converter, boxOptions, boxResult, bounds, db, ext, longSidePrompt, longSideResult, longSide;
86
94
  return __generator(this, function (_a) {
87
95
  switch (_a.label) {
88
96
  case 0:
89
- options = new AcEdPromptBoxOptions(AcApI18n.t('main.inputManager.firstCorner'), AcApI18n.t('main.inputManager.secondCorner'));
90
- return [4 /*yield*/, AcApDocManager.instance.editor.getBox(options)];
97
+ converter = new AcApPngConvertor();
98
+ boxOptions = new AcEdPromptBoxOptions(AcApI18n.t('pngout.boundsFirstCorner'), AcApI18n.t('pngout.boundsSecondCorner'));
99
+ return [4 /*yield*/, AcApDocManager.instance.editor.getBox(boxOptions)];
91
100
  case 1:
92
101
  boxResult = _a.sent();
93
- if (boxResult.status !== AcEdPromptStatus.OK || !boxResult.value)
94
- return [2 /*return*/];
95
- return [2 /*return*/, context.view.zoomTo(boxResult.value, 1)];
102
+ if (boxResult.status === AcEdPromptStatus.OK && boxResult.value) {
103
+ bounds = boxResult.value;
104
+ }
105
+ else {
106
+ db = AcApDocManager.instance.curDocument.database;
107
+ ext = db.extents;
108
+ bounds = new AcGeBox2d(new AcGePoint2d(ext.min.x, ext.min.y), new AcGePoint2d(ext.max.x, ext.max.y));
109
+ }
110
+ longSidePrompt = new AcEdPromptDoubleOptions(AcApI18n.t('pngout.longSidePrompt'));
111
+ longSidePrompt.allowNone = true;
112
+ return [4 /*yield*/, AcApDocManager.instance.editor.getDouble(longSidePrompt)];
113
+ case 2:
114
+ longSideResult = _a.sent();
115
+ longSide = longSideResult.status === AcEdPromptStatus.OK && longSideResult.value !== undefined
116
+ ? longSideResult.value
117
+ : 8000;
118
+ converter.convert(bounds, longSide);
119
+ return [2 /*return*/];
96
120
  }
97
121
  });
98
122
  });
99
123
  };
100
- return AcApZoomToBoxCmd;
124
+ return AcApConvertToPngCmd;
101
125
  }(AcEdCommand));
102
- export { AcApZoomToBoxCmd };
103
- //# sourceMappingURL=AcApZoomToBoxCmd.js.map
126
+ export { AcApConvertToPngCmd };
127
+ //# sourceMappingURL=AcApConvertToPngCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToPngCmd.js","sourceRoot":"","sources":["../../src/command/AcApConvertToPngCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW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,cAAc,GAAG,IAAI,uBAAuB,CAChD,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,CACpC,CAAA;wBACD,cAAc,CAAC,SAAS,GAAG,IAAI,CAAA;wBACR,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,EAAA;;wBAA/E,cAAc,GAAG,SAA8D;wBAE/E,QAAQ,GACZ,cAAc,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE,IAAI,cAAc,CAAC,KAAK,KAAK,SAAS;4BACjF,CAAC,CAAC,cAAc,CAAC,KAAK;4BACtB,CAAC,CAAC,IAAI,CAAA;wBAEV,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;;;;;KACpC;IACH,0BAAC;AAAD,CAAC,AA/CD,CAAyC,WAAW,GA+CnD"}
@@ -0,0 +1,87 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../editor';
3
+ /**
4
+ * Command to create one ellipse or ellipse arc.
5
+ */
6
+ export declare class AcApEllipseCmd extends AcEdCommand {
7
+ /**
8
+ * Creates ELLIPSE command instance.
9
+ */
10
+ constructor();
11
+ /**
12
+ * Command entry point.
13
+ *
14
+ * Supported branches:
15
+ * - Axis endpoint workflow
16
+ * - Center-first workflow
17
+ * - Arc-prefixed variants for ellipse arc creation
18
+ *
19
+ * @param context - Current application/document context.
20
+ */
21
+ execute(context: AcApContext): Promise<void>;
22
+ /**
23
+ * Adds one localized keyword to a point prompt.
24
+ *
25
+ * @param prompt - Target point prompt.
26
+ * @param key - Keyword i18n key suffix.
27
+ */
28
+ private addKeyword;
29
+ /**
30
+ * Appends final ellipse entity to model space.
31
+ *
32
+ * @param context - Current application/document context.
33
+ * @param definition - Ellipse geometric definition to append.
34
+ */
35
+ private appendEllipse;
36
+ /**
37
+ * Emits one warning message for invalid ellipse input.
38
+ *
39
+ * @param key - Invalid-input category key.
40
+ */
41
+ private warnInvalidInput;
42
+ /**
43
+ * Runs `Arc` entry branch where user can provide axis endpoints or center.
44
+ *
45
+ * @param context - Current application/document context.
46
+ */
47
+ private runArcEntryFlow;
48
+ /**
49
+ * Runs center-first workflow:
50
+ * center -> first axis endpoint -> other axis/rotation -> optional arc angles.
51
+ *
52
+ * @param context - Current application/document context.
53
+ * @param arcMode - Whether to continue into arc-angle prompts.
54
+ */
55
+ private runCenterFlow;
56
+ /**
57
+ * Runs axis-endpoint workflow:
58
+ * first axis endpoint -> second axis endpoint -> other axis/rotation.
59
+ *
60
+ * @param context - Current application/document context.
61
+ * @param firstAxisEndpoint - First endpoint of major/minor axis line.
62
+ * @param arcMode - Whether to continue into arc-angle prompts.
63
+ */
64
+ private runAxisEndFlow;
65
+ /**
66
+ * Prompts for the second axis radius by point or rotation angle option.
67
+ *
68
+ * In arc mode, this method also continues into arc start/end angle prompts.
69
+ *
70
+ * @param context - Current application/document context.
71
+ * @param center - Ellipse center point.
72
+ * @param firstAxisUnit - Unit direction of first specified axis.
73
+ * @param firstAxisRadius - Radius length along first specified axis.
74
+ * @param arcMode - Whether to return an ellipse arc definition.
75
+ * @returns Final ellipse definition, or `undefined` on cancel/invalid.
76
+ */
77
+ private promptOtherAxis;
78
+ /**
79
+ * Prompts start and end angles for ellipse-arc creation.
80
+ *
81
+ * @param context - Current application/document context.
82
+ * @param baseEllipse - Base full-ellipse definition before arc trimming.
83
+ * @returns Arc ellipse definition, or `undefined` when canceled.
84
+ */
85
+ private promptArcAngles;
86
+ }
87
+ //# sourceMappingURL=AcApEllipseCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApEllipseCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApEllipseCmd.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EAQZ,MAAM,WAAW,CAAA;AA0PlB;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;;IAMH;;;;;;;;;OASG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IAuBlC;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAQlB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAarB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;OAIG;YACW,eAAe;IAgB7B;;;;;;OAMG;YACW,aAAa;IAqC3B;;;;;;;OAOG;YACW,cAAc;IAsC5B;;;;;;;;;;;OAWG;YACW,eAAe;IA6F7B;;;;;;OAMG;YACW,eAAe;CAqE9B"}