mxcad-app 1.0.19 → 1.0.20

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.
Binary file
Binary file
Binary file
Binary file
package/dist/index.cjs.gz CHANGED
Binary file
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import { LocaleInstance } from 'vuetify';
12
12
  import { LocaleMessages } from 'vuetify';
13
13
  import { LocaleOptions } from 'vuetify';
14
14
  import { McObject } from 'mxcad';
15
+ import { MxCADPluginSampleCode } from 'mxcad';
15
16
  import { Ref } from 'vue';
16
17
  import { ShallowRef } from 'vue';
17
18
  import { ThemeInstance } from 'vuetify';
@@ -146,6 +147,8 @@ declare class MxCADApp extends MxCADEvents {
146
147
  };
147
148
  goTo: GoToInstance;
148
149
  }>;
150
+ /** 初始化代码编辑器的代码示例 */
151
+ initCodeEditorCodeExamples(codes: MxCADPluginSampleCode[]): void;
149
152
  }
150
153
 
151
154
  export declare let mxcadApp: MxCADApp;
@@ -233,17 +236,11 @@ declare module '@tiptap/core' {
233
236
  }
234
237
 
235
238
 
236
- declare module '@tiptap/core' {
239
+ declare module "@tiptap/core" {
237
240
  interface Commands<ReturnType> {
238
- TextDecoration: {
239
- /**
240
- * Set the font size attribute
241
- */
242
- setTextDecoration: (textDecoration: string) => ReturnType;
243
- /**
244
- * Unset the font size attribute
245
- */
246
- unsetTextDecoration: () => ReturnType;
241
+ selectedText: {
242
+ setSelectedText: (from: number, to: number) => ReturnType;
243
+ unsetSelectedText: (from: number, to: number) => ReturnType;
247
244
  };
248
245
  }
249
246
  }
@@ -266,16 +263,6 @@ declare module '@tiptap/core' {
266
263
  }
267
264
 
268
265
 
269
- declare module "@tiptap/core" {
270
- interface Commands<ReturnType> {
271
- selectedText: {
272
- setSelectedText: (from: number, to: number) => ReturnType;
273
- unsetSelectedText: (from: number, to: number) => ReturnType;
274
- };
275
- }
276
- }
277
-
278
-
279
266
  declare module '@tiptap/core' {
280
267
  interface Commands<ReturnType> {
281
268
  Underline: {
@@ -302,3 +289,19 @@ declare module '@tiptap/core' {
302
289
  };
303
290
  }
304
291
  }
292
+
293
+
294
+ declare module '@tiptap/core' {
295
+ interface Commands<ReturnType> {
296
+ TextDecoration: {
297
+ /**
298
+ * Set the font size attribute
299
+ */
300
+ setTextDecoration: (textDecoration: string) => ReturnType;
301
+ /**
302
+ * Unset the font size attribute
303
+ */
304
+ unsetTextDecoration: () => ReturnType;
305
+ };
306
+ }
307
+ }
Binary file
package/dist/mxcad.d.ts CHANGED
@@ -4648,8 +4648,7 @@ declare module "mxcad" {
4648
4648
  * ```ts
4649
4649
  * import { McGePoint3d, McDbCircle } from "mxcad"
4650
4650
  *
4651
- * const center = new McGePoint3d(0,0,0);
4652
- * const circle = new McDbCircle(center, 20);
4651
+ * const circle = new McDbCircle(0,0,0, 20);
4653
4652
  * const area = circle.getArea();
4654
4653
  * console.log("圆面积:", area)
4655
4654
  * ```
@@ -5029,8 +5028,7 @@ declare module "mxcad" {
5029
5028
  * ```ts
5030
5029
  * import { McGePoint3d, McDbCircle } from "mxcad"
5031
5030
  *
5032
- * const center = new McGePoint3d(0,0,0);
5033
- * const circle = new McDbCircle(center, 20);
5031
+ * const circle = new McDbCircle(0,0,0, 20);
5034
5032
  * const vec = circle.getFirstDeriv(new McGePoint3d(20,0,0));//目标点切向量
5035
5033
  * if(vec.ret){
5036
5034
  * const val = vec.val;
@@ -5050,8 +5048,7 @@ declare module "mxcad" {
5050
5048
  * ```ts
5051
5049
  * import { McGePoint3d, McDbCircle, MxCADUiPrPoint, MxCpp } from "mxcad"
5052
5050
  *
5053
- * const center = new McGePoint3d(0,0,0);
5054
- * const circle = new McDbCircle(center, 20);
5051
+ * const circle = new McDbCircle(0,0,0, 20);
5055
5052
  * const mxcad = MxCpp.getCurrentMxCAD();
5056
5053
  * mxcad.drawEntity(circle);
5057
5054
  *
@@ -12246,7 +12243,7 @@ declare module "mxcad" {
12246
12243
  * @param dAng 图片角度,单位是度
12247
12244
  * @param imageUrl 图片路径
12248
12245
  */
12249
- drawImage(dPosX: number, dPosY: number, dWidth: number, dHeight: number, dAng: number, imageUrl: string, isConvertBase64?: boolean, dwgImageSizeWidth?: number, dwgImageSizeHeight?: number): McObjectId;
12246
+ drawImage(dPosX: number, dPosY: number, dWidth: number, dHeight: number, dAng: number, imageName: string, isConvertBase64?: boolean, dwgImageSizeWidth?: number, dwgImageSizeHeight?: number, imageUrl?: string): McObjectId;
12250
12247
  /**
12251
12248
  * 添加一个图片定义到cad数据库中 。
12252
12249
  * @param imageUrl 图片路径
@@ -12266,7 +12263,7 @@ declare module "mxcad" {
12266
12263
  });
12267
12264
  * ```
12268
12265
  */
12269
- addImageDefine(imageUrl: string, sName?: string, isConvertBase64?: boolean): McObjectId;
12266
+ addImageDefine(imageUrl: string, sName?: string, isConvertBase64?: boolean, sourceFileName?: string): McObjectId;
12270
12267
  /**
12271
12268
  * 显示线重
12272
12269
  */