mxcad-app 1.0.73 → 1.0.75
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/chunks/hooks2.js.gz +0 -0
- package/dist/chunks/index44.js.gz +0 -0
- package/dist/chunks/lib.js.gz +0 -0
- package/dist/chunks/mxcad.js.gz +0 -0
- package/dist/chunks/mxdraw.js.gz +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.d.ts +27 -27
- package/dist/index.umd.js.gz +0 -0
- package/dist/mxcad.d.ts +41 -10
- package/dist/mxcadAppAssets/wasm/2d/mxdrawassembly_min.wasm.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-st/mxdrawassembly_minst.wasm.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-x64/mxdrawassembly_min.wasm.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-x64-st/mxdrawassembly_min.js.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-x64-st/mxdrawassembly_minst.wasm.gz +0 -0
- package/dist/styles/style.css.gz +0 -0
- package/package.json +1 -1
package/dist/chunks/hooks2.js.gz
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/chunks/lib.js.gz
CHANGED
|
Binary file
|
package/dist/chunks/mxcad.js.gz
CHANGED
|
Binary file
|
package/dist/chunks/mxdraw.js.gz
CHANGED
|
Binary file
|
package/dist/index.cjs.gz
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1178,7 +1178,7 @@ id: number;
|
|
|
1178
1178
|
value?: null | string | undefined;
|
|
1179
1179
|
};
|
|
1180
1180
|
lineWeight: McDb.LineWeight;
|
|
1181
|
-
} | number
|
|
1181
|
+
} | number) => void;
|
|
1182
1182
|
parseJSON: (jsonText?: string) => void;
|
|
1183
1183
|
stringifyJSON: () => string;
|
|
1184
1184
|
initLayerList: () => void;
|
|
@@ -1846,7 +1846,7 @@ id: number;
|
|
|
1846
1846
|
value?: null | string | undefined;
|
|
1847
1847
|
};
|
|
1848
1848
|
lineWeight: McDb.LineWeight;
|
|
1849
|
-
} | number
|
|
1849
|
+
} | number) => void;
|
|
1850
1850
|
parseJSON: (jsonText?: string) => void;
|
|
1851
1851
|
stringifyJSON: () => string;
|
|
1852
1852
|
initLayerList: () => void;
|
|
@@ -2514,7 +2514,7 @@ id: number;
|
|
|
2514
2514
|
value?: null | string | undefined;
|
|
2515
2515
|
};
|
|
2516
2516
|
lineWeight: McDb.LineWeight;
|
|
2517
|
-
} | number
|
|
2517
|
+
} | number) => void;
|
|
2518
2518
|
parseJSON: (jsonText?: string) => void;
|
|
2519
2519
|
stringifyJSON: () => string;
|
|
2520
2520
|
initLayerList: () => void;
|
|
@@ -2638,6 +2638,16 @@ declare module '@howdyjs/to-drag' {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
2640
2640
|
|
|
2641
|
+
declare module "@tiptap/core" {
|
|
2642
|
+
interface Commands<ReturnType> {
|
|
2643
|
+
selectedText: {
|
|
2644
|
+
setSelectedText: (from: number, to: number) => ReturnType;
|
|
2645
|
+
unsetSelectedText: (from: number, to: number) => ReturnType;
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
|
|
2641
2651
|
declare module '@tiptap/core' {
|
|
2642
2652
|
interface Commands<ReturnType> {
|
|
2643
2653
|
Underline: {
|
|
@@ -2651,16 +2661,15 @@ declare module '@tiptap/core' {
|
|
|
2651
2661
|
|
|
2652
2662
|
declare module '@tiptap/core' {
|
|
2653
2663
|
interface Commands<ReturnType> {
|
|
2654
|
-
|
|
2664
|
+
fontSize: {
|
|
2655
2665
|
/**
|
|
2656
2666
|
* Set the font size attribute
|
|
2657
2667
|
*/
|
|
2658
|
-
|
|
2668
|
+
setFontSize: (size: string) => ReturnType;
|
|
2659
2669
|
/**
|
|
2660
2670
|
* Unset the font size attribute
|
|
2661
2671
|
*/
|
|
2662
|
-
|
|
2663
|
-
toggleStrike: () => ReturnType;
|
|
2672
|
+
unsetFontSize: () => ReturnType;
|
|
2664
2673
|
};
|
|
2665
2674
|
}
|
|
2666
2675
|
}
|
|
@@ -2668,25 +2677,16 @@ declare module '@tiptap/core' {
|
|
|
2668
2677
|
|
|
2669
2678
|
declare module '@tiptap/core' {
|
|
2670
2679
|
interface Commands<ReturnType> {
|
|
2671
|
-
|
|
2680
|
+
Strike: {
|
|
2672
2681
|
/**
|
|
2673
2682
|
* Set the font size attribute
|
|
2674
2683
|
*/
|
|
2675
|
-
|
|
2684
|
+
setStrike: () => ReturnType;
|
|
2676
2685
|
/**
|
|
2677
2686
|
* Unset the font size attribute
|
|
2678
2687
|
*/
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
declare module "@tiptap/core" {
|
|
2686
|
-
interface Commands<ReturnType> {
|
|
2687
|
-
selectedText: {
|
|
2688
|
-
setSelectedText: (from: number, to: number) => ReturnType;
|
|
2689
|
-
unsetSelectedText: (from: number, to: number) => ReturnType;
|
|
2688
|
+
unsetStrike: () => ReturnType;
|
|
2689
|
+
toggleStrike: () => ReturnType;
|
|
2690
2690
|
};
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
@@ -2694,16 +2694,15 @@ declare module "@tiptap/core" {
|
|
|
2694
2694
|
|
|
2695
2695
|
declare module '@tiptap/core' {
|
|
2696
2696
|
interface Commands<ReturnType> {
|
|
2697
|
-
|
|
2697
|
+
TextDecoration: {
|
|
2698
2698
|
/**
|
|
2699
2699
|
* Set the font size attribute
|
|
2700
2700
|
*/
|
|
2701
|
-
|
|
2701
|
+
setTextDecoration: (textDecoration: string) => ReturnType;
|
|
2702
2702
|
/**
|
|
2703
2703
|
* Unset the font size attribute
|
|
2704
2704
|
*/
|
|
2705
|
-
|
|
2706
|
-
toggleOverline: () => ReturnType;
|
|
2705
|
+
unsetTextDecoration: () => ReturnType;
|
|
2707
2706
|
};
|
|
2708
2707
|
}
|
|
2709
2708
|
}
|
|
@@ -2711,15 +2710,16 @@ declare module '@tiptap/core' {
|
|
|
2711
2710
|
|
|
2712
2711
|
declare module '@tiptap/core' {
|
|
2713
2712
|
interface Commands<ReturnType> {
|
|
2714
|
-
|
|
2713
|
+
Overline: {
|
|
2715
2714
|
/**
|
|
2716
2715
|
* Set the font size attribute
|
|
2717
2716
|
*/
|
|
2718
|
-
|
|
2717
|
+
setOverline: () => ReturnType;
|
|
2719
2718
|
/**
|
|
2720
2719
|
* Unset the font size attribute
|
|
2721
2720
|
*/
|
|
2722
|
-
|
|
2721
|
+
unsetOverline: () => ReturnType;
|
|
2722
|
+
toggleOverline: () => ReturnType;
|
|
2723
2723
|
};
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/mxcad.d.ts
CHANGED
|
@@ -8384,6 +8384,43 @@ declare module "mxcad" {
|
|
|
8384
8384
|
}
|
|
8385
8385
|
/**
|
|
8386
8386
|
* 光栅图片类,该类用于在CAD中显示光栅图形
|
|
8387
|
+
* @example
|
|
8388
|
+
* ```ts
|
|
8389
|
+
import { MxCpp, McGePoint3d, McDbRasterImage, McGeVector3d } from "mxcad";
|
|
8390
|
+
|
|
8391
|
+
//画图片
|
|
8392
|
+
function drawImg() {
|
|
8393
|
+
const mxcad = MxCpp.getCurrentMxCAD();
|
|
8394
|
+
// 创建新画布
|
|
8395
|
+
mxcad.newFile();
|
|
8396
|
+
//图片地址
|
|
8397
|
+
let imagUrl = "https://cdn.pixabay.com/photo/2022/11/15/12/23/winter-7593872_960_720.jpg";
|
|
8398
|
+
mxcad.loadImage(imagUrl, (image) => {
|
|
8399
|
+
if (!image) {
|
|
8400
|
+
console.log("loadImage failed");
|
|
8401
|
+
return;
|
|
8402
|
+
}
|
|
8403
|
+
let width = mxcad.mxdraw.viewCoordLong2Cad(100);
|
|
8404
|
+
let height = (image.height / image.width) * width;
|
|
8405
|
+
const id = mxcad.addImageDefine(imagUrl, "winter-7593872_960_720.jpg", true);
|
|
8406
|
+
const img = new McDbRasterImage();
|
|
8407
|
+
img.setImageDefId(id);
|
|
8408
|
+
img.setDwgImageSize(image.width, image.height);
|
|
8409
|
+
const origin = new McGePoint3d(0, 0, 0);
|
|
8410
|
+
|
|
8411
|
+
const uCorner = McGeVector3d.kXAxis.clone();
|
|
8412
|
+
uCorner.mult(width);
|
|
8413
|
+
|
|
8414
|
+
const vOnPlane = McGeVector3d.kYAxis.clone();
|
|
8415
|
+
vOnPlane.mult(height);
|
|
8416
|
+
|
|
8417
|
+
img.setOrientation(origin, uCorner, vOnPlane);
|
|
8418
|
+
mxcad.drawEntity(img);
|
|
8419
|
+
//mxcad.drawImage((pt as any).x, (pt as any).y, width, height, 0, imagUrl,true,image.width,image.height);
|
|
8420
|
+
mxcad.updateDisplay();
|
|
8421
|
+
});
|
|
8422
|
+
};
|
|
8423
|
+
* ```
|
|
8387
8424
|
*/
|
|
8388
8425
|
export class McDbRasterImage extends McDbEntity {
|
|
8389
8426
|
/**
|
|
@@ -8439,12 +8476,10 @@ declare module "mxcad" {
|
|
|
8439
8476
|
};
|
|
8440
8477
|
/**
|
|
8441
8478
|
* 设置保存dwg文件时,图片的宽高像素。
|
|
8442
|
-
* ```
|
|
8443
8479
|
*/
|
|
8444
8480
|
setDwgImageSize(width: number, height: number): boolean;
|
|
8445
8481
|
/**
|
|
8446
8482
|
* 返回dwg文件中的图片的宽高像素。
|
|
8447
|
-
* ```
|
|
8448
8483
|
*/
|
|
8449
8484
|
getDwgImageSize(): number[];
|
|
8450
8485
|
/**
|
|
@@ -8462,7 +8497,7 @@ declare module "mxcad" {
|
|
|
8462
8497
|
*/
|
|
8463
8498
|
setImageDefId(imageId: McObjectId): void;
|
|
8464
8499
|
/**
|
|
8465
|
-
* 获取图像的定义
|
|
8500
|
+
* 获取图像的定义ID
|
|
8466
8501
|
* @example
|
|
8467
8502
|
* ```ts
|
|
8468
8503
|
* //假设 rasterImage 为光栅图片实例
|
|
@@ -8531,7 +8566,6 @@ declare module "mxcad" {
|
|
|
8531
8566
|
export class McDbWipeout extends McDbEntity {
|
|
8532
8567
|
/**
|
|
8533
8568
|
* 构造函数。
|
|
8534
|
-
* ```
|
|
8535
8569
|
*/
|
|
8536
8570
|
constructor(x?: object);
|
|
8537
8571
|
/**
|
|
@@ -8590,7 +8624,6 @@ declare module "mxcad" {
|
|
|
8590
8624
|
/**
|
|
8591
8625
|
* 得到样条线的数据.
|
|
8592
8626
|
* @example
|
|
8593
|
-
* ```
|
|
8594
8627
|
*/
|
|
8595
8628
|
getNurbsData(): {
|
|
8596
8629
|
degree: number;
|
|
@@ -8606,7 +8639,7 @@ declare module "mxcad" {
|
|
|
8606
8639
|
/**
|
|
8607
8640
|
* 设置样条线的数据.
|
|
8608
8641
|
* @example
|
|
8609
|
-
*
|
|
8642
|
+
*
|
|
8610
8643
|
*/
|
|
8611
8644
|
setNurbsData(data: {
|
|
8612
8645
|
degree: number;
|
|
@@ -8622,7 +8655,6 @@ declare module "mxcad" {
|
|
|
8622
8655
|
/**
|
|
8623
8656
|
* 得到样条线的拟合数据.
|
|
8624
8657
|
* @example
|
|
8625
|
-
* ```
|
|
8626
8658
|
*/
|
|
8627
8659
|
getFitPoints(): {
|
|
8628
8660
|
degree: number;
|
|
@@ -8635,7 +8667,6 @@ declare module "mxcad" {
|
|
|
8635
8667
|
/**
|
|
8636
8668
|
*设置样条线的拟合数据.
|
|
8637
8669
|
* @example
|
|
8638
|
-
* ```
|
|
8639
8670
|
*/
|
|
8640
8671
|
setFitPoints(data: {
|
|
8641
8672
|
degree: number;
|
|
@@ -8652,7 +8683,7 @@ declare module "mxcad" {
|
|
|
8652
8683
|
* ```ts
|
|
8653
8684
|
* ```
|
|
8654
8685
|
*/
|
|
8655
|
-
export class McDbXline extends
|
|
8686
|
+
export class McDbXline extends McDbCurve {
|
|
8656
8687
|
/**
|
|
8657
8688
|
* 构造函数。
|
|
8658
8689
|
* @param imp 内部对象。
|
|
@@ -8722,7 +8753,7 @@ declare module "mxcad" {
|
|
|
8722
8753
|
* ```ts
|
|
8723
8754
|
* ```
|
|
8724
8755
|
*/
|
|
8725
|
-
export class McDbRay extends
|
|
8756
|
+
export class McDbRay extends McDbCurve {
|
|
8726
8757
|
/**
|
|
8727
8758
|
* 构造函数。
|
|
8728
8759
|
* @param imp 内部对象。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/styles/style.css.gz
CHANGED
|
Binary file
|