mxcad-app 1.0.70 → 1.0.71
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/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 +29 -24
- package/dist/index.umd.js.gz +0 -0
- package/dist/mxcad.d.ts +40 -14
- package/dist/mxcadAppAssets/wasm/2d/mxdrawassembly_min.js.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d/mxdrawassembly_min.wasm.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-st/mxdrawassembly_min.js.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-st/mxdrawassembly_minst.wasm.gz +0 -0
- package/dist/mxcadAppAssets/wasm/2d-x64/mxdrawassembly_min.js.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/package.json +1 -1
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
|
@@ -22,6 +22,9 @@ import { ShallowRef } from 'vue';
|
|
|
22
22
|
import { Store } from 'pinia';
|
|
23
23
|
import { StoreDefinition } from 'pinia';
|
|
24
24
|
import { ThemeInstance } from 'vuetify';
|
|
25
|
+
import { VoerkaI18nScope } from '@voerkai18n/runtime';
|
|
26
|
+
import { VueTransformResultType } from '@voerkai18n/vue';
|
|
27
|
+
import { VueTranslateComponentType } from '@voerkai18n/vue';
|
|
25
28
|
|
|
26
29
|
declare interface AppConfig {
|
|
27
30
|
uiConfig?: string;
|
|
@@ -124,6 +127,8 @@ declare type LineType = typeof defaultLineType & {
|
|
|
124
127
|
};
|
|
125
128
|
|
|
126
129
|
declare class MxCADApp extends MxCADEvents {
|
|
130
|
+
/** i18nScope 国际化模块 */
|
|
131
|
+
get i18nScope(): VoerkaI18nScope<VueTranslateComponentType, VueTransformResultType>;
|
|
127
132
|
setStaticAssetPath(url: string): void;
|
|
128
133
|
getStaticAssetPath(): string;
|
|
129
134
|
initConfig(config: AppConfig): void;
|
|
@@ -2635,16 +2640,15 @@ declare module '@howdyjs/to-drag' {
|
|
|
2635
2640
|
|
|
2636
2641
|
declare module '@tiptap/core' {
|
|
2637
2642
|
interface Commands<ReturnType> {
|
|
2638
|
-
|
|
2643
|
+
TextDecoration: {
|
|
2639
2644
|
/**
|
|
2640
2645
|
* Set the font size attribute
|
|
2641
2646
|
*/
|
|
2642
|
-
|
|
2647
|
+
setTextDecoration: (textDecoration: string) => ReturnType;
|
|
2643
2648
|
/**
|
|
2644
2649
|
* Unset the font size attribute
|
|
2645
2650
|
*/
|
|
2646
|
-
|
|
2647
|
-
toggleOverline: () => ReturnType;
|
|
2651
|
+
unsetTextDecoration: () => ReturnType;
|
|
2648
2652
|
};
|
|
2649
2653
|
}
|
|
2650
2654
|
}
|
|
@@ -2652,15 +2656,16 @@ declare module '@tiptap/core' {
|
|
|
2652
2656
|
|
|
2653
2657
|
declare module '@tiptap/core' {
|
|
2654
2658
|
interface Commands<ReturnType> {
|
|
2655
|
-
|
|
2659
|
+
Overline: {
|
|
2656
2660
|
/**
|
|
2657
2661
|
* Set the font size attribute
|
|
2658
2662
|
*/
|
|
2659
|
-
|
|
2663
|
+
setOverline: () => ReturnType;
|
|
2660
2664
|
/**
|
|
2661
2665
|
* Unset the font size attribute
|
|
2662
2666
|
*/
|
|
2663
|
-
|
|
2667
|
+
unsetOverline: () => ReturnType;
|
|
2668
|
+
toggleOverline: () => ReturnType;
|
|
2664
2669
|
};
|
|
2665
2670
|
}
|
|
2666
2671
|
}
|
|
@@ -2668,15 +2673,26 @@ declare module '@tiptap/core' {
|
|
|
2668
2673
|
|
|
2669
2674
|
declare module '@tiptap/core' {
|
|
2670
2675
|
interface Commands<ReturnType> {
|
|
2671
|
-
|
|
2676
|
+
Strike: {
|
|
2672
2677
|
/**
|
|
2673
2678
|
* Set the font size attribute
|
|
2674
2679
|
*/
|
|
2675
|
-
|
|
2680
|
+
setStrike: () => ReturnType;
|
|
2676
2681
|
/**
|
|
2677
2682
|
* Unset the font size attribute
|
|
2678
2683
|
*/
|
|
2679
|
-
|
|
2684
|
+
unsetStrike: () => ReturnType;
|
|
2685
|
+
toggleStrike: () => ReturnType;
|
|
2686
|
+
};
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
|
|
2691
|
+
declare module "@tiptap/core" {
|
|
2692
|
+
interface Commands<ReturnType> {
|
|
2693
|
+
selectedText: {
|
|
2694
|
+
setSelectedText: (from: number, to: number) => ReturnType;
|
|
2695
|
+
unsetSelectedText: (from: number, to: number) => ReturnType;
|
|
2680
2696
|
};
|
|
2681
2697
|
}
|
|
2682
2698
|
}
|
|
@@ -2695,26 +2711,15 @@ declare module '@tiptap/core' {
|
|
|
2695
2711
|
|
|
2696
2712
|
declare module '@tiptap/core' {
|
|
2697
2713
|
interface Commands<ReturnType> {
|
|
2698
|
-
|
|
2714
|
+
fontSize: {
|
|
2699
2715
|
/**
|
|
2700
2716
|
* Set the font size attribute
|
|
2701
2717
|
*/
|
|
2702
|
-
|
|
2718
|
+
setFontSize: (size: string) => ReturnType;
|
|
2703
2719
|
/**
|
|
2704
2720
|
* Unset the font size attribute
|
|
2705
2721
|
*/
|
|
2706
|
-
|
|
2707
|
-
toggleStrike: () => ReturnType;
|
|
2708
|
-
};
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
declare module "@tiptap/core" {
|
|
2714
|
-
interface Commands<ReturnType> {
|
|
2715
|
-
selectedText: {
|
|
2716
|
-
setSelectedText: (from: number, to: number) => ReturnType;
|
|
2717
|
-
unsetSelectedText: (from: number, to: number) => ReturnType;
|
|
2722
|
+
unsetFontSize: () => ReturnType;
|
|
2718
2723
|
};
|
|
2719
2724
|
}
|
|
2720
2725
|
}
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/mxcad.d.ts
CHANGED
|
@@ -12995,18 +12995,44 @@ declare module "mxcad" {
|
|
|
12995
12995
|
* @param call 回调函数
|
|
12996
12996
|
* @example
|
|
12997
12997
|
* ```ts
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
12998
|
+
import { MxCpp } from "mxcad";
|
|
12999
|
+
function selectLocalFile() {
|
|
13000
|
+
return new Promise((resolve) => {
|
|
13001
|
+
const input = document.createElement("input");
|
|
13002
|
+
input.type = "file";
|
|
13003
|
+
input.accept = "image/*";
|
|
13004
|
+
input.onchange = (e) => resolve(e.target.files[0]);
|
|
13005
|
+
input.click();
|
|
13006
|
+
});
|
|
13007
|
+
}
|
|
13008
|
+
function fileToBase64(file) {
|
|
13009
|
+
return new Promise((resolve, reject) => {
|
|
13010
|
+
const reader = new FileReader();
|
|
13011
|
+
reader.onload = () => resolve(reader.result);
|
|
13012
|
+
reader.onerror = reject;
|
|
13013
|
+
reader.readAsDataURL(file);
|
|
13014
|
+
});
|
|
13015
|
+
}
|
|
13016
|
+
|
|
13017
|
+
const file = await selectLocalFile();
|
|
13018
|
+
if (!file) return;
|
|
13019
|
+
const imagData = await fileToBase64(file);
|
|
13020
|
+
let mxcad = MxCpp.getCurrentMxCAD();
|
|
13021
|
+
|
|
13022
|
+
mxcad.loadImageBase64(imagData, "test.jpg", (image) => {
|
|
13023
|
+
if (!image) {
|
|
13024
|
+
console.log("loadImage failed");
|
|
13025
|
+
return;
|
|
13026
|
+
}
|
|
13027
|
+
let width = mxcad.mxdraw.viewCoordLong2Cad(100);
|
|
13028
|
+
let height = (image.height / image.width) * width;
|
|
13029
|
+
|
|
13030
|
+
let viewAngle = 0.0;
|
|
13031
|
+
let id = mxcad.drawImage(100, 100, width, height, viewAngle, "test.jpg", true, image.width, image.height,"",imagData);
|
|
13032
|
+
|
|
13033
|
+
|
|
13034
|
+
mxcad.updateDisplay();
|
|
13035
|
+
})
|
|
13010
13036
|
* ```
|
|
13011
13037
|
*/
|
|
13012
13038
|
loadImageBase64(sImageBase64: string, imageFileName: string, call: (image: any) => void): void;
|
|
@@ -13019,7 +13045,7 @@ declare module "mxcad" {
|
|
|
13019
13045
|
* @param dAng 图片角度,单位是度
|
|
13020
13046
|
* @param imageUrl 图片路径
|
|
13021
13047
|
*/
|
|
13022
|
-
drawImage(dPosX: number, dPosY: number, dWidth: number, dHeight: number, dAng: number, imageName: string, isConvertBase64?: boolean, dwgImageSizeWidth?: number, dwgImageSizeHeight?: number, imageUrl?: string): McObjectId;
|
|
13048
|
+
drawImage(dPosX: number, dPosY: number, dWidth: number, dHeight: number, dAng: number, imageName: string, isConvertBase64?: boolean, dwgImageSizeWidth?: number, dwgImageSizeHeight?: number, imageUrl?: string, sImageBase64?: string): McObjectId;
|
|
13023
13049
|
/**
|
|
13024
13050
|
* 添加一个图片定义到cad数据库中 。
|
|
13025
13051
|
* @param imageUrl 图片路径
|
|
@@ -13039,7 +13065,7 @@ declare module "mxcad" {
|
|
|
13039
13065
|
});
|
|
13040
13066
|
* ```
|
|
13041
13067
|
*/
|
|
13042
|
-
addImageDefine(imageUrl: string, sName?: string, isConvertBase64?: boolean, sourceFileName?: string): McObjectId;
|
|
13068
|
+
addImageDefine(imageUrl: string, sName?: string, isConvertBase64?: boolean, sourceFileName?: string, sBase64Data?: string): McObjectId;
|
|
13043
13069
|
/**
|
|
13044
13070
|
* 显示线重
|
|
13045
13071
|
*/
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|