@jlceda/pro-api-types 0.1.76 → 0.1.78
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/README.en.md +1 -1
- package/index.d.ts +104 -21
- package/package.json +4 -4
package/README.en.md
CHANGED
|
@@ -10,7 +10,7 @@ JLCEDA & EasyEDA Pro Edition Extension API Interface Type Definition
|
|
|
10
10
|
|
|
11
11
|
It is recommended to use [pro-api-sdk](https://github.com/easyeda/pro-api-sdk) for extension development, this definition file is pre-configured within the SDK.
|
|
12
12
|
|
|
13
|
-
1.
|
|
13
|
+
1. Install type definition
|
|
14
14
|
|
|
15
15
|
```shell
|
|
16
16
|
npm install --save-dev @jlceda/pro-api-types
|
package/index.d.ts
CHANGED
|
@@ -416,7 +416,7 @@ declare class DMT_Project {
|
|
|
416
416
|
* @param teamUuid - 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定团队 UUID
|
|
417
417
|
* @param folderUuid - 文件夹 UUID,如若不指定,则为根文件夹
|
|
418
418
|
* @param description - 工程描述
|
|
419
|
-
* @param collaborationMode -
|
|
419
|
+
* @param collaborationMode - 工程协作模式,如若团队权限无需工程设置协作模式,则该参数将被忽略
|
|
420
420
|
* @returns 工程 UUID,如若为 `undefined` 则创建失败
|
|
421
421
|
*/
|
|
422
422
|
createProject(projectFriendlyName: string, projectName?: string, teamUuid?: string, folderUuid?: string, description?: string, collaborationMode?: EDMT_ProjectCollaborationMode): Promise<string | undefined>;
|
|
@@ -595,7 +595,7 @@ declare class DMT_Schematic {
|
|
|
595
595
|
*/
|
|
596
596
|
getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
|
|
597
597
|
/**
|
|
598
|
-
*
|
|
598
|
+
* 获取当前原理图图页的详细属性
|
|
599
599
|
*
|
|
600
600
|
* @beta
|
|
601
601
|
* @remarks 将会获取当前打开且拥有最后输入焦点的原理图图页的详细属性
|
|
@@ -770,6 +770,7 @@ declare class EDA {
|
|
|
770
770
|
sch_SelectControl: SCH_SelectControl;
|
|
771
771
|
sch_Utils: SCH_Utils;
|
|
772
772
|
sys_ClientUrl: SYS_ClientUrl;
|
|
773
|
+
sys_Environment: SYS_Environment;
|
|
773
774
|
sys_FileManager: SYS_FileManager;
|
|
774
775
|
sys_FileSystem: SYS_FileSystem;
|
|
775
776
|
sys_FontManager: SYS_FontManager;
|
|
@@ -2110,7 +2111,7 @@ declare interface ILIB_PanelLibraryItem {
|
|
|
2110
2111
|
libraryUuid: string;
|
|
2111
2112
|
/** 面板库名称 */
|
|
2112
2113
|
name: string;
|
|
2113
|
-
/**
|
|
2114
|
+
/** 分类 */
|
|
2114
2115
|
classification?: ILIB_ClassificationIndex;
|
|
2115
2116
|
/** 描述 */
|
|
2116
2117
|
description?: string;
|
|
@@ -2270,7 +2271,7 @@ declare interface IPCB_LayerItem {
|
|
|
2270
2271
|
type: EPCB_LayerType;
|
|
2271
2272
|
/** 颜色(RGB HEX 格式) */
|
|
2272
2273
|
color: string;
|
|
2273
|
-
/**
|
|
2274
|
+
/** 透明度(%) */
|
|
2274
2275
|
transparency: number;
|
|
2275
2276
|
}
|
|
2276
2277
|
|
|
@@ -3273,7 +3274,7 @@ declare class IPCB_PrimitivePolyline implements IPCB_Primitive {
|
|
|
3273
3274
|
declare interface IPCB_PrimitiveSolderMaskAndPasteMaskExpansion {
|
|
3274
3275
|
/** 顶层阻焊扩展 */
|
|
3275
3276
|
topSolderMask?: number;
|
|
3276
|
-
/**
|
|
3277
|
+
/** 底层阻焊扩展 */
|
|
3277
3278
|
bottomSolderMask?: number;
|
|
3278
3279
|
/** 顶层助焊扩展 */
|
|
3279
3280
|
topPasteMask?: number;
|
|
@@ -3960,7 +3961,7 @@ declare class ISCH_PrimitiveRectangle implements ISCH_Primitive {
|
|
|
3960
3961
|
private height;
|
|
3961
3962
|
/** 圆角半径 */
|
|
3962
3963
|
private cornerRadius;
|
|
3963
|
-
/**
|
|
3964
|
+
/** 旋转角度 */
|
|
3964
3965
|
private rotation;
|
|
3965
3966
|
/** 边框颜色 */
|
|
3966
3967
|
private color;
|
|
@@ -5585,7 +5586,7 @@ declare class PCB_Layer {
|
|
|
5585
5586
|
* PCB & 封装 / 生产资料类
|
|
5586
5587
|
*
|
|
5587
5588
|
* @public
|
|
5588
|
-
* @remarks 获取当前 PCB
|
|
5589
|
+
* @remarks 获取当前 PCB 的生产资料文件及快捷下单
|
|
5589
5590
|
*/
|
|
5590
5591
|
declare class PCB_ManufactureData {
|
|
5591
5592
|
/**
|
|
@@ -5682,7 +5683,7 @@ declare class PCB_ManufactureData {
|
|
|
5682
5683
|
*/
|
|
5683
5684
|
getNetlistFile(fileName?: string, netlistType?: ENetlistType): Promise<File | undefined>;
|
|
5684
5685
|
/**
|
|
5685
|
-
* 获取 DXF
|
|
5686
|
+
* 获取 DXF ���件
|
|
5686
5687
|
*
|
|
5687
5688
|
* @beta
|
|
5688
5689
|
* @remarks 可以使用 {@link SYS_FileSystem.saveFile} 接口将文件导出到本地文件系统
|
|
@@ -5737,6 +5738,10 @@ declare class PCB_ManufactureData {
|
|
|
5737
5738
|
* @returns PCB 信息文件
|
|
5738
5739
|
*/
|
|
5739
5740
|
getPcbInfoFile(fileName?: string): Promise<File | undefined>;
|
|
5741
|
+
/* Excluded from this release type: placeComponentsOrder */
|
|
5742
|
+
/* Excluded from this release type: placeSmtComponentsOrder */
|
|
5743
|
+
/* Excluded from this release type: placePcbOrder */
|
|
5744
|
+
/* Excluded from this release type: place3DShellOrder */
|
|
5740
5745
|
}
|
|
5741
5746
|
|
|
5742
5747
|
/**
|
|
@@ -5895,7 +5900,7 @@ declare class PCB_PrimitiveArc implements IPCB_PrimitiveAPI {
|
|
|
5895
5900
|
*/
|
|
5896
5901
|
create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, arcAngle: number, lineWidth?: number, interactiveMode?: EPCB_PrimitiveArcInteractiveMode, primitiveLock?: boolean): Promise<IPCB_PrimitiveArc | undefined>;
|
|
5897
5902
|
/**
|
|
5898
|
-
*
|
|
5903
|
+
* 删除圆弧线
|
|
5899
5904
|
*
|
|
5900
5905
|
* @beta
|
|
5901
5906
|
* @param primitiveIds - 圆弧线的图元 ID 或圆弧线图元对象
|
|
@@ -6659,7 +6664,7 @@ declare class PNL_Document {
|
|
|
6659
6664
|
* 保存文档
|
|
6660
6665
|
*
|
|
6661
6666
|
* @beta
|
|
6662
|
-
* @returns
|
|
6667
|
+
* @returns 保存操作是否成功,保存失败、上传失败等错误均返回 `false`
|
|
6663
6668
|
*/
|
|
6664
6669
|
save(): Promise<boolean>;
|
|
6665
6670
|
}
|
|
@@ -6744,7 +6749,7 @@ declare class SCH_Event {
|
|
|
6744
6749
|
* 原理图 & 符号 / 生产资料类
|
|
6745
6750
|
*
|
|
6746
6751
|
* @public
|
|
6747
|
-
* @remarks
|
|
6752
|
+
* @remarks 获取当前原理图图页的生产资料文件及快捷下单
|
|
6748
6753
|
*/
|
|
6749
6754
|
declare class SCH_ManufactureData {
|
|
6750
6755
|
/**
|
|
@@ -6767,6 +6772,8 @@ declare class SCH_ManufactureData {
|
|
|
6767
6772
|
* @returns 网表文件数据
|
|
6768
6773
|
*/
|
|
6769
6774
|
getNetlistFile(fileName?: string, netlistType?: ENetlistType): Promise<File | undefined>;
|
|
6775
|
+
/* Excluded from this release type: placeComponentsOrder */
|
|
6776
|
+
/* Excluded from this release type: placeSmtComponentsOrder */
|
|
6770
6777
|
}
|
|
6771
6778
|
|
|
6772
6779
|
/**
|
|
@@ -7081,7 +7088,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
|
|
|
7081
7088
|
*
|
|
7082
7089
|
* @beta
|
|
7083
7090
|
* @param componentUuid - 器件 UUID
|
|
7084
|
-
* @param libraryPath -
|
|
7091
|
+
* @param libraryPath - 库路径,默认为系统库
|
|
7085
7092
|
* @returns 操作是否成功
|
|
7086
7093
|
*/
|
|
7087
7094
|
setNetFlagComponentUuid_ProtectGround(componentUuid: string, libraryPath?: string): Promise<boolean>;
|
|
@@ -7439,7 +7446,7 @@ declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI {
|
|
|
7439
7446
|
* 获取矩形
|
|
7440
7447
|
*
|
|
7441
7448
|
* @public
|
|
7442
|
-
* @param primitiveIds -
|
|
7449
|
+
* @param primitiveIds - 矩形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
|
|
7443
7450
|
* @returns 矩形图元对象
|
|
7444
7451
|
*/
|
|
7445
7452
|
get(primitiveIds: string): Promise<ISCH_PrimitiveRectangle | undefined>;
|
|
@@ -7704,6 +7711,71 @@ declare class SYS_ClientUrl {
|
|
|
7704
7711
|
}, succeedCallFn?: (data: Response) => void | Promise<void>): Promise<Response>;
|
|
7705
7712
|
}
|
|
7706
7713
|
|
|
7714
|
+
/**
|
|
7715
|
+
* 系统 / 运行环境类
|
|
7716
|
+
*
|
|
7717
|
+
* @public
|
|
7718
|
+
* @remarks 获取嘉立创 EDA 专业版运行环境参数
|
|
7719
|
+
*/
|
|
7720
|
+
declare class SYS_Environment {
|
|
7721
|
+
/**
|
|
7722
|
+
* 是否处于浏览器环境
|
|
7723
|
+
*
|
|
7724
|
+
* @public
|
|
7725
|
+
* @returns 是否处于浏览器环境
|
|
7726
|
+
*/
|
|
7727
|
+
isWeb(): boolean;
|
|
7728
|
+
/**
|
|
7729
|
+
* 是否处于客户端环境
|
|
7730
|
+
*
|
|
7731
|
+
* @public
|
|
7732
|
+
* @returns 是否处于客户端环境
|
|
7733
|
+
*/
|
|
7734
|
+
isClient(): boolean;
|
|
7735
|
+
/**
|
|
7736
|
+
* 是否为 EasyEDA Pro 版本
|
|
7737
|
+
*
|
|
7738
|
+
* @public
|
|
7739
|
+
* @returns 是否为 EasyEDA Pro 版本
|
|
7740
|
+
*/
|
|
7741
|
+
isEasyEDAProEdition(): boolean;
|
|
7742
|
+
/**
|
|
7743
|
+
* 是否为嘉立创EDA 专业版本
|
|
7744
|
+
*
|
|
7745
|
+
* @public
|
|
7746
|
+
* @returns 是否为嘉立创EDA 专业版本
|
|
7747
|
+
*/
|
|
7748
|
+
isJLCEDAProEdition(): boolean;
|
|
7749
|
+
/**
|
|
7750
|
+
* 是否为私有化部署版本
|
|
7751
|
+
*
|
|
7752
|
+
* @public
|
|
7753
|
+
* @returns 是否为私有化部署版本
|
|
7754
|
+
*/
|
|
7755
|
+
isProPrivateEdition(): boolean;
|
|
7756
|
+
/**
|
|
7757
|
+
* 是否为在线模式
|
|
7758
|
+
*
|
|
7759
|
+
* @public
|
|
7760
|
+
* @returns 是否为在线模式
|
|
7761
|
+
*/
|
|
7762
|
+
isOnlineMode(): boolean;
|
|
7763
|
+
/**
|
|
7764
|
+
* 是否为半离线模式
|
|
7765
|
+
*
|
|
7766
|
+
* @public
|
|
7767
|
+
* @returns 是否为半离线模式
|
|
7768
|
+
*/
|
|
7769
|
+
isHalfOfflineMode(): boolean;
|
|
7770
|
+
/**
|
|
7771
|
+
* 是否为全离线模式
|
|
7772
|
+
*
|
|
7773
|
+
* @public
|
|
7774
|
+
* @returns 是否为全离线模式
|
|
7775
|
+
*/
|
|
7776
|
+
isOfflineMode(): boolean;
|
|
7777
|
+
}
|
|
7778
|
+
|
|
7707
7779
|
/**
|
|
7708
7780
|
* 系统 / 文件管理类
|
|
7709
7781
|
*
|
|
@@ -7797,7 +7869,7 @@ declare class SYS_FileManager {
|
|
|
7797
7869
|
*/
|
|
7798
7870
|
getFootprintFileByFootprintUuid(footprintUuid: string | Array<string>, libraryUuid?: string): Promise<File | undefined>;
|
|
7799
7871
|
/**
|
|
7800
|
-
* 使用复用模块 UUID
|
|
7872
|
+
* 使用复用模块 UUID 获取复用模块文件
|
|
7801
7873
|
*
|
|
7802
7874
|
* @beta
|
|
7803
7875
|
* @remarks 可以使用 {@link SYS_FileSystem.saveFile} 接口将文件导出到本地文件系统
|
|
@@ -8102,7 +8174,7 @@ declare class SYS_PanelControl {
|
|
|
8102
8174
|
* 打开左侧面板
|
|
8103
8175
|
*
|
|
8104
8176
|
* @public
|
|
8105
|
-
* @param tab -
|
|
8177
|
+
* @param tab - 标签页,���若不指定则不切换标签页
|
|
8106
8178
|
*/
|
|
8107
8179
|
openLeftPanel(tab?: ESYS_LeftPanelTab): void;
|
|
8108
8180
|
/**
|
|
@@ -8235,13 +8307,14 @@ declare class SYS_Timer {
|
|
|
8235
8307
|
* 设置循环定时器
|
|
8236
8308
|
*
|
|
8237
8309
|
* @public
|
|
8310
|
+
* @remarks 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
|
|
8238
8311
|
* @param id - 定时器 ID,用于定位&删除定时器
|
|
8239
8312
|
* @param timeout - 定时时间,单位 ms
|
|
8240
8313
|
* @param callFn - 定时调用函数
|
|
8241
|
-
* @param
|
|
8314
|
+
* @param args - 传给定时调用函数的参数
|
|
8242
8315
|
* @returns 定时器是否设置成功
|
|
8243
8316
|
*/
|
|
8244
|
-
setIntervalTimer(id: string, timeout: number, callFn: (
|
|
8317
|
+
setIntervalTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
|
|
8245
8318
|
/**
|
|
8246
8319
|
* 清除指定循环定时器
|
|
8247
8320
|
*
|
|
@@ -8254,12 +8327,22 @@ declare class SYS_Timer {
|
|
|
8254
8327
|
* 设置单次定时器
|
|
8255
8328
|
*
|
|
8256
8329
|
* @public
|
|
8330
|
+
* @remarks 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
|
|
8331
|
+
* @param id - 定时器 ID
|
|
8257
8332
|
* @param timeout - 定时时间,单位 ms
|
|
8258
8333
|
* @param callFn - 定时调用函数
|
|
8259
|
-
* @param
|
|
8334
|
+
* @param args - 传给定时调用函数的参数
|
|
8260
8335
|
* @returns 定时器是否设置成功
|
|
8261
8336
|
*/
|
|
8262
|
-
setTimeoutTimer(timeout: number, callFn: (
|
|
8337
|
+
setTimeoutTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
|
|
8338
|
+
/**
|
|
8339
|
+
* 清除指定单次定时器
|
|
8340
|
+
*
|
|
8341
|
+
* @public
|
|
8342
|
+
* @param id - 定时器 ID
|
|
8343
|
+
* @returns 定时器是否清除成功
|
|
8344
|
+
*/
|
|
8345
|
+
clearTimeoutTimer(id: string): boolean;
|
|
8263
8346
|
}
|
|
8264
8347
|
|
|
8265
8348
|
/**
|
|
@@ -8295,7 +8378,7 @@ declare class SYS_Unit {
|
|
|
8295
8378
|
*
|
|
8296
8379
|
* @public
|
|
8297
8380
|
* @param mil - 输入密尔数
|
|
8298
|
-
* @param numberOfDecimals -
|
|
8381
|
+
* @param numberOfDecimals - 保留小数位数,默认为 `4`
|
|
8299
8382
|
* @returns 输出毫米数
|
|
8300
8383
|
*/
|
|
8301
8384
|
milToMm(mil: number, numberOfDecimals?: number): number;
|
|
@@ -8513,7 +8596,7 @@ declare type TPCB_LayerTypesOfInnerLayer = EPCB_LayerType.SIGNAL | EPCB_LayerTyp
|
|
|
8513
8596
|
*
|
|
8514
8597
|
* @public
|
|
8515
8598
|
* @remarks
|
|
8516
|
-
*
|
|
8599
|
+
* 单多边形为首尾重合的一条不间断的线所描述的区域��如果首尾不重合将会自动重合。
|
|
8517
8600
|
*
|
|
8518
8601
|
* 单多边形的数据格式举例:
|
|
8519
8602
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jlceda/pro-api-types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.78",
|
|
4
4
|
"description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"keywords": [
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"eslint-plugin-tsdoc": "^0.3.0",
|
|
31
31
|
"fast-text-encoding": "^1.0.6",
|
|
32
32
|
"fs-extra": "^11.2.0",
|
|
33
|
-
"husky": "^9.1.
|
|
34
|
-
"lint-staged": "^15.2.
|
|
33
|
+
"husky": "^9.1.6",
|
|
34
|
+
"lint-staged": "^15.2.10",
|
|
35
35
|
"prettier": "^3.3.3",
|
|
36
36
|
"ts-node": "^10.9.2",
|
|
37
|
-
"typescript": "^5.
|
|
37
|
+
"typescript": "^5.6.2"
|
|
38
38
|
},
|
|
39
39
|
"lint-staged": {
|
|
40
40
|
"*.ts": "eslint --cache --fix",
|