@jlceda/pro-api-types 0.1.76 → 0.1.77
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 +31 -20
- 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 将会获取当前打开且拥有最后输入焦点的原理图图页的详细属性
|
|
@@ -2110,7 +2110,7 @@ declare interface ILIB_PanelLibraryItem {
|
|
|
2110
2110
|
libraryUuid: string;
|
|
2111
2111
|
/** 面板库名称 */
|
|
2112
2112
|
name: string;
|
|
2113
|
-
/**
|
|
2113
|
+
/** 分类 */
|
|
2114
2114
|
classification?: ILIB_ClassificationIndex;
|
|
2115
2115
|
/** 描述 */
|
|
2116
2116
|
description?: string;
|
|
@@ -2270,7 +2270,7 @@ declare interface IPCB_LayerItem {
|
|
|
2270
2270
|
type: EPCB_LayerType;
|
|
2271
2271
|
/** 颜色(RGB HEX 格式) */
|
|
2272
2272
|
color: string;
|
|
2273
|
-
/**
|
|
2273
|
+
/** 透明度(%) */
|
|
2274
2274
|
transparency: number;
|
|
2275
2275
|
}
|
|
2276
2276
|
|
|
@@ -3273,7 +3273,7 @@ declare class IPCB_PrimitivePolyline implements IPCB_Primitive {
|
|
|
3273
3273
|
declare interface IPCB_PrimitiveSolderMaskAndPasteMaskExpansion {
|
|
3274
3274
|
/** 顶层阻焊扩展 */
|
|
3275
3275
|
topSolderMask?: number;
|
|
3276
|
-
/**
|
|
3276
|
+
/** 底层阻焊扩展 */
|
|
3277
3277
|
bottomSolderMask?: number;
|
|
3278
3278
|
/** 顶层助焊扩展 */
|
|
3279
3279
|
topPasteMask?: number;
|
|
@@ -3693,7 +3693,7 @@ declare class ISCH_PrimitiveComponent implements ISCH_Primitive {
|
|
|
3693
3693
|
private manufacturer?;
|
|
3694
3694
|
/** Component 属性:制造商编号 */
|
|
3695
3695
|
private manufacturerId?;
|
|
3696
|
-
/** Component
|
|
3696
|
+
/** Component ���性:供应商 */
|
|
3697
3697
|
private supplier?;
|
|
3698
3698
|
/** Component 属性:供应商编号 */
|
|
3699
3699
|
private supplierId?;
|
|
@@ -3960,7 +3960,7 @@ declare class ISCH_PrimitiveRectangle implements ISCH_Primitive {
|
|
|
3960
3960
|
private height;
|
|
3961
3961
|
/** 圆角半径 */
|
|
3962
3962
|
private cornerRadius;
|
|
3963
|
-
/**
|
|
3963
|
+
/** 旋��角度 */
|
|
3964
3964
|
private rotation;
|
|
3965
3965
|
/** 边框颜色 */
|
|
3966
3966
|
private color;
|
|
@@ -4620,7 +4620,7 @@ declare class LIB_Device {
|
|
|
4620
4620
|
*/
|
|
4621
4621
|
getByLcscIds<T extends boolean>(lcscIds: string, libraryUuid?: string, allowMultiMatch?: T): Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>;
|
|
4622
4622
|
/**
|
|
4623
|
-
*
|
|
4623
|
+
* ���用立创 C 编号批量获取器件
|
|
4624
4624
|
*
|
|
4625
4625
|
* @beta
|
|
4626
4626
|
* @remarks
|
|
@@ -5113,7 +5113,7 @@ declare class PCB_Drc {
|
|
|
5113
5113
|
* @param ruleConfiguration - 设计规则配置
|
|
5114
5114
|
* @param configurationName - 配置名称
|
|
5115
5115
|
* @param allowOverwrite - 是否允许覆写同名设计规则配置,`false` 则将在遇到同名设计规则配置时返回 `false`,请注意可能的数据丢失风险
|
|
5116
|
-
* @returns
|
|
5116
|
+
* @returns 保���是否成功
|
|
5117
5117
|
*/
|
|
5118
5118
|
saveRuleConfiguration(ruleConfiguration: {
|
|
5119
5119
|
[key: string]: any;
|
|
@@ -5895,7 +5895,7 @@ declare class PCB_PrimitiveArc implements IPCB_PrimitiveAPI {
|
|
|
5895
5895
|
*/
|
|
5896
5896
|
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
5897
|
/**
|
|
5898
|
-
*
|
|
5898
|
+
* 删除圆弧线
|
|
5899
5899
|
*
|
|
5900
5900
|
* @beta
|
|
5901
5901
|
* @param primitiveIds - 圆弧线的图元 ID 或圆弧线图元对象
|
|
@@ -6659,7 +6659,7 @@ declare class PNL_Document {
|
|
|
6659
6659
|
* 保存文档
|
|
6660
6660
|
*
|
|
6661
6661
|
* @beta
|
|
6662
|
-
* @returns
|
|
6662
|
+
* @returns 保存操作是否成功,保存失败、上传失败等错误均返回 `false`
|
|
6663
6663
|
*/
|
|
6664
6664
|
save(): Promise<boolean>;
|
|
6665
6665
|
}
|
|
@@ -7081,7 +7081,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
|
|
|
7081
7081
|
*
|
|
7082
7082
|
* @beta
|
|
7083
7083
|
* @param componentUuid - 器件 UUID
|
|
7084
|
-
* @param libraryPath -
|
|
7084
|
+
* @param libraryPath - 库路径,默认为系统库
|
|
7085
7085
|
* @returns 操作是否成功
|
|
7086
7086
|
*/
|
|
7087
7087
|
setNetFlagComponentUuid_ProtectGround(componentUuid: string, libraryPath?: string): Promise<boolean>;
|
|
@@ -7439,7 +7439,7 @@ declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI {
|
|
|
7439
7439
|
* 获取矩形
|
|
7440
7440
|
*
|
|
7441
7441
|
* @public
|
|
7442
|
-
* @param primitiveIds -
|
|
7442
|
+
* @param primitiveIds - 矩形的��元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
|
|
7443
7443
|
* @returns 矩形图元对象
|
|
7444
7444
|
*/
|
|
7445
7445
|
get(primitiveIds: string): Promise<ISCH_PrimitiveRectangle | undefined>;
|
|
@@ -7797,7 +7797,7 @@ declare class SYS_FileManager {
|
|
|
7797
7797
|
*/
|
|
7798
7798
|
getFootprintFileByFootprintUuid(footprintUuid: string | Array<string>, libraryUuid?: string): Promise<File | undefined>;
|
|
7799
7799
|
/**
|
|
7800
|
-
* 使用复用模块 UUID
|
|
7800
|
+
* 使用复用模块 UUID 获取复用模块文件
|
|
7801
7801
|
*
|
|
7802
7802
|
* @beta
|
|
7803
7803
|
* @remarks 可以使用 {@link SYS_FileSystem.saveFile} 接口将文件导出到本地文件系统
|
|
@@ -8235,13 +8235,14 @@ declare class SYS_Timer {
|
|
|
8235
8235
|
* 设置循环定时器
|
|
8236
8236
|
*
|
|
8237
8237
|
* @public
|
|
8238
|
+
* @remarks 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
|
|
8238
8239
|
* @param id - 定时器 ID,用于定位&删除定时器
|
|
8239
8240
|
* @param timeout - 定时时间,单位 ms
|
|
8240
8241
|
* @param callFn - 定时调用函数
|
|
8241
|
-
* @param
|
|
8242
|
+
* @param args - 传给定时调用函数的参数
|
|
8242
8243
|
* @returns 定时器是否设置成功
|
|
8243
8244
|
*/
|
|
8244
|
-
setIntervalTimer(id: string, timeout: number, callFn: (
|
|
8245
|
+
setIntervalTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
|
|
8245
8246
|
/**
|
|
8246
8247
|
* 清除指定循环定时器
|
|
8247
8248
|
*
|
|
@@ -8254,12 +8255,22 @@ declare class SYS_Timer {
|
|
|
8254
8255
|
* 设置单次定时器
|
|
8255
8256
|
*
|
|
8256
8257
|
* @public
|
|
8258
|
+
* @remarks 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
|
|
8259
|
+
* @param id - 定时器 ID
|
|
8257
8260
|
* @param timeout - 定时时间,单位 ms
|
|
8258
8261
|
* @param callFn - 定时调用函数
|
|
8259
|
-
* @param
|
|
8262
|
+
* @param args - 传给定时调用函数的参数
|
|
8260
8263
|
* @returns 定时器是否设置成功
|
|
8261
8264
|
*/
|
|
8262
|
-
setTimeoutTimer(timeout: number, callFn: (
|
|
8265
|
+
setTimeoutTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
|
|
8266
|
+
/**
|
|
8267
|
+
* 清除指定单次定时器
|
|
8268
|
+
*
|
|
8269
|
+
* @public
|
|
8270
|
+
* @param id - 定时器 ID
|
|
8271
|
+
* @returns 定时器是否清除成功
|
|
8272
|
+
*/
|
|
8273
|
+
clearTimeoutTimer(id: string): boolean;
|
|
8263
8274
|
}
|
|
8264
8275
|
|
|
8265
8276
|
/**
|
|
@@ -8295,7 +8306,7 @@ declare class SYS_Unit {
|
|
|
8295
8306
|
*
|
|
8296
8307
|
* @public
|
|
8297
8308
|
* @param mil - 输入密尔数
|
|
8298
|
-
* @param numberOfDecimals -
|
|
8309
|
+
* @param numberOfDecimals - 保留小数位数,默认为 `4`
|
|
8299
8310
|
* @returns 输出毫米数
|
|
8300
8311
|
*/
|
|
8301
8312
|
milToMm(mil: number, numberOfDecimals?: number): number;
|
|
@@ -8594,7 +8605,7 @@ declare type TPCB_PolygonSourceArray = Array<'L' | 'ARC' | 'CARC' | 'C' | 'R' |
|
|
|
8594
8605
|
* @remarks
|
|
8595
8606
|
* 尺寸标注坐标集存在以下三种 {@link EPCB_PrimitiveDimensionType | 尺寸标注类型}:
|
|
8596
8607
|
*
|
|
8597
|
-
* ①
|
|
8608
|
+
* ① 半���标注
|
|
8598
8609
|
*
|
|
8599
8610
|
* `[x1, y1, x2, y2, x3, y3]`
|
|
8600
8611
|
*
|
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.77",
|
|
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",
|