@jlceda/pro-api-types 0.1.120 → 0.1.122
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/index.d.ts +57 -71
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -589,7 +589,7 @@ declare class DMT_Schematic {
|
|
|
589
589
|
*
|
|
590
590
|
* @beta
|
|
591
591
|
* @remarks 将会获取当前打开且拥有最后输入焦点的原理图图页所关联的原理图的详细属性
|
|
592
|
-
* @returns
|
|
592
|
+
* @returns 原理图���详细属性,如若为 `undefined` 则获取失败
|
|
593
593
|
*/
|
|
594
594
|
getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
|
|
595
595
|
/**
|
|
@@ -763,8 +763,7 @@ declare class EDA {
|
|
|
763
763
|
sch_PrimitiveArc: SCH_PrimitiveArc;
|
|
764
764
|
sch_PrimitiveBus: SCH_PrimitiveBus;
|
|
765
765
|
sch_PrimitiveCircle: SCH_PrimitiveCircle;
|
|
766
|
-
sch_PrimitiveComponent: SCH_PrimitiveComponent;
|
|
767
|
-
sch_PrimitiveComponent3: SCH_PrimitiveComponent3;
|
|
766
|
+
sch_PrimitiveComponent: SCH_PrimitiveComponent | SCH_PrimitiveComponent3;
|
|
768
767
|
sch_PrimitivePin: SCH_PrimitivePin;
|
|
769
768
|
sch_PrimitivePolygon: SCH_PrimitivePolygon;
|
|
770
769
|
sch_PrimitiveRectangle: SCH_PrimitiveRectangle;
|
|
@@ -955,26 +954,6 @@ declare enum ELIB_SymbolType {
|
|
|
955
954
|
SHORT_CIRCUIT_FLAG = 22
|
|
956
955
|
}
|
|
957
956
|
|
|
958
|
-
/**
|
|
959
|
-
* 网表类型
|
|
960
|
-
*
|
|
961
|
-
* @public
|
|
962
|
-
*/
|
|
963
|
-
declare enum ENetlistType {
|
|
964
|
-
/** Allegro */
|
|
965
|
-
ALLEGRO = "Allegro",
|
|
966
|
-
/** PADS */
|
|
967
|
-
PADS = "PADS",
|
|
968
|
-
/** Protel 2 */
|
|
969
|
-
PROTEL2 = "Protel2",
|
|
970
|
-
/** 嘉立创 EDA 专业版 */
|
|
971
|
-
JLCEDA_PRO = "JLCEDA",
|
|
972
|
-
/** EasyEDA Pro Edition */
|
|
973
|
-
EASYEDA_PRO = "EasyEDA",
|
|
974
|
-
/** Altium Designer */
|
|
975
|
-
ALTIUM_DESIGNER = "AltiumDesigner"
|
|
976
|
-
}
|
|
977
|
-
|
|
978
957
|
/**
|
|
979
958
|
* 文档飞线计算功能状态
|
|
980
959
|
*
|
|
@@ -1214,21 +1193,21 @@ declare enum EPCB_LayerId {
|
|
|
1214
1193
|
*/
|
|
1215
1194
|
declare enum EPCB_LayerType {
|
|
1216
1195
|
/** 信号层 */
|
|
1217
|
-
SIGNAL =
|
|
1196
|
+
SIGNAL = "SIGNAL",
|
|
1218
1197
|
/** 内电层 */
|
|
1219
|
-
INTERNAL_ELECTRICAL =
|
|
1198
|
+
INTERNAL_ELECTRICAL = "PLANE",
|
|
1220
1199
|
/** 丝印层 */
|
|
1221
|
-
SILKSCREEN =
|
|
1200
|
+
SILKSCREEN = "SILKSCREEN",
|
|
1222
1201
|
/** 阻焊层 */
|
|
1223
|
-
SOLDER_MASK =
|
|
1202
|
+
SOLDER_MASK = "SOLDER_MASK",
|
|
1224
1203
|
/** 锡膏(助焊)层 */
|
|
1225
|
-
PASTE_MASK =
|
|
1204
|
+
PASTE_MASK = "PASTE_MASK",
|
|
1226
1205
|
/** 装配层 */
|
|
1227
|
-
ASSEMBLY =
|
|
1206
|
+
ASSEMBLY = "ASSEMBLY",
|
|
1228
1207
|
/** 其它 */
|
|
1229
|
-
OTHER =
|
|
1208
|
+
OTHER = "OTHER",
|
|
1230
1209
|
/** 自定义层 */
|
|
1231
|
-
CUSTOM =
|
|
1210
|
+
CUSTOM = "CUSTOM"
|
|
1232
1211
|
}
|
|
1233
1212
|
|
|
1234
1213
|
/**
|
|
@@ -1596,20 +1575,7 @@ declare enum ESCH_PrimitiveType {
|
|
|
1596
1575
|
/** 文本 */
|
|
1597
1576
|
TEXT = "Text",
|
|
1598
1577
|
/** 导线 */
|
|
1599
|
-
WIRE = "Wire"
|
|
1600
|
-
NETFLAG = "Netflag",
|
|
1601
|
-
NETPORT = "Netport",
|
|
1602
|
-
NO_CONNECT = "Noconnect",
|
|
1603
|
-
PART = "Part",
|
|
1604
|
-
SHORT_SYMBOL = "Short_symbol",
|
|
1605
|
-
BLOCK_SYMBOL = "Block_symbol",
|
|
1606
|
-
TABLE = "Table",
|
|
1607
|
-
CELL = "Cell",
|
|
1608
|
-
BUSENTRY = "BusEntry",
|
|
1609
|
-
NONELECTRICAL_SYMBOL = "NonElectrical_symbol",
|
|
1610
|
-
OBJ = "Obj",
|
|
1611
|
-
JUNCTION = "Junction",
|
|
1612
|
-
SHEET = "Sheet"
|
|
1578
|
+
WIRE = "Wire"
|
|
1613
1579
|
}
|
|
1614
1580
|
|
|
1615
1581
|
/**
|
|
@@ -1667,6 +1633,26 @@ declare enum ESYS_LogType {
|
|
|
1667
1633
|
/* Excluded from this release type: OPEN_PROJECT */
|
|
1668
1634
|
}
|
|
1669
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* 网表类型
|
|
1638
|
+
*
|
|
1639
|
+
* @public
|
|
1640
|
+
*/
|
|
1641
|
+
declare enum ESYS_NetlistType {
|
|
1642
|
+
/** Allegro */
|
|
1643
|
+
ALLEGRO = "Allegro",
|
|
1644
|
+
/** PADS */
|
|
1645
|
+
PADS = "PADS",
|
|
1646
|
+
/** Protel 2 */
|
|
1647
|
+
PROTEL2 = "Protel2",
|
|
1648
|
+
/** 嘉立创 EDA 专业版 */
|
|
1649
|
+
JLCEDA_PRO = "JLCEDA",
|
|
1650
|
+
/** EasyEDA Pro Edition */
|
|
1651
|
+
EASYEDA_PRO = "EasyEDA",
|
|
1652
|
+
/** Altium Designer */
|
|
1653
|
+
ALTIUM_DESIGNER = "AltiumDesigner"
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1670
1656
|
/**
|
|
1671
1657
|
* 右侧面板标签页
|
|
1672
1658
|
*
|
|
@@ -4397,7 +4383,7 @@ declare class IPCB_PrimitiveObject implements IPCB_Primitive {
|
|
|
4397
4383
|
* 设置属性状态:是否锁定
|
|
4398
4384
|
*
|
|
4399
4385
|
* @beta
|
|
4400
|
-
* @param primitiveLock -
|
|
4386
|
+
* @param primitiveLock - ���否锁定
|
|
4401
4387
|
* @returns 二进制内嵌对象图元对象
|
|
4402
4388
|
*/
|
|
4403
4389
|
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveObject;
|
|
@@ -4688,7 +4674,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
|
|
|
4688
4674
|
*/
|
|
4689
4675
|
setState_Pad(pad: TPCB_PrimitivePadShape): IPCB_PrimitivePad;
|
|
4690
4676
|
/**
|
|
4691
|
-
*
|
|
4677
|
+
* ���置属性状态:网络
|
|
4692
4678
|
*
|
|
4693
4679
|
* @beta
|
|
4694
4680
|
* @remarks 本接口仅在 PCB 编辑器可用,空字符串与 `undefined` 均被视为空网络
|
|
@@ -5756,7 +5742,7 @@ declare class ISCH_PrimitiveArc implements ISCH_Primitive {
|
|
|
5756
5742
|
private referenceY;
|
|
5757
5743
|
/** 终止点 X */
|
|
5758
5744
|
private endX;
|
|
5759
|
-
/**
|
|
5745
|
+
/** 终止��� Y */
|
|
5760
5746
|
private endY;
|
|
5761
5747
|
/** 颜色 */
|
|
5762
5748
|
private color;
|
|
@@ -6083,7 +6069,7 @@ declare class ISCH_PrimitiveBus implements ISCH_Primitive {
|
|
|
6083
6069
|
*/
|
|
6084
6070
|
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveBus;
|
|
6085
6071
|
/**
|
|
6086
|
-
*
|
|
6072
|
+
* 将图元转换为异步图元
|
|
6087
6073
|
*
|
|
6088
6074
|
* @public
|
|
6089
6075
|
* @returns 总线图元对象
|
|
@@ -7068,7 +7054,7 @@ declare class ISCH_PrimitiveComponent_2 implements ISCH_Primitive {
|
|
|
7068
7054
|
* 将对图元的更改应用到画布
|
|
7069
7055
|
*
|
|
7070
7056
|
* @beta
|
|
7071
|
-
* @returns
|
|
7057
|
+
* @returns 器件图元对���
|
|
7072
7058
|
*/
|
|
7073
7059
|
done(): Promise<ISCH_PrimitiveComponent_2>;
|
|
7074
7060
|
/* Excluded from this release type: getAllPins */
|
|
@@ -8399,7 +8385,7 @@ declare class LIB_Classification {
|
|
|
8399
8385
|
*/
|
|
8400
8386
|
createPrimary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;
|
|
8401
8387
|
/**
|
|
8402
|
-
*
|
|
8388
|
+
* 创建二级分类
|
|
8403
8389
|
*
|
|
8404
8390
|
* @beta
|
|
8405
8391
|
* @param libraryUuid - 库 UUID
|
|
@@ -9592,7 +9578,7 @@ declare class PCB_Layer {
|
|
|
9592
9578
|
* 将层设置为不可见
|
|
9593
9579
|
*
|
|
9594
9580
|
* @beta
|
|
9595
|
-
* @param layer -
|
|
9581
|
+
* @param layer - 层,如若不指定任何层则默认为所有层
|
|
9596
9582
|
* @param setOtherLayerVisible - 是否将其它层设置为可见
|
|
9597
9583
|
* @returns 操作是否成功
|
|
9598
9584
|
*/
|
|
@@ -9674,7 +9660,7 @@ declare class PCB_Layer {
|
|
|
9674
9660
|
* 修改图层属性
|
|
9675
9661
|
*
|
|
9676
9662
|
* @beta
|
|
9677
|
-
* @remarks
|
|
9663
|
+
* @remarks 仅内层和自定义层允许修改名称;仅内层允许修改类型, 透明度仅支持0-100之间的数
|
|
9678
9664
|
* @param layer - 层
|
|
9679
9665
|
* @param property - 属性
|
|
9680
9666
|
* @returns 修改后的图层属性,如若为 `undefined` 则代表修改失败或图层不存在
|
|
@@ -9814,7 +9800,7 @@ declare class PCB_ManufactureData {
|
|
|
9814
9800
|
* @param netlistType - 网表类型
|
|
9815
9801
|
* @returns 网表文件数据
|
|
9816
9802
|
*/
|
|
9817
|
-
getNetlistFile(fileName?: string, netlistType?:
|
|
9803
|
+
getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;
|
|
9818
9804
|
/**
|
|
9819
9805
|
* 获取 DXF 文件
|
|
9820
9806
|
*
|
|
@@ -10096,7 +10082,7 @@ declare class PCB_MathPolygon {
|
|
|
10096
10082
|
* @param inversion - 是否反相
|
|
10097
10083
|
* @returns 复杂多边形对象
|
|
10098
10084
|
*/
|
|
10099
|
-
convertImageToComplexPolygon(imageBlob: Blob, imageWidth: number, imageHeight: number, tolerance?: number, simplification?: number, smoothing?: number, despeckling?: number, inversion?: boolean): Promise<IPCB_ComplexPolygon | undefined>;
|
|
10085
|
+
convertImageToComplexPolygon(imageBlob: Blob, imageWidth: number, imageHeight: number, tolerance?: number, simplification?: number, smoothing?: number, despeckling?: number, whiteAsBackgroundColor?: boolean, inversion?: boolean): Promise<IPCB_ComplexPolygon | undefined>;
|
|
10100
10086
|
}
|
|
10101
10087
|
|
|
10102
10088
|
/**
|
|
@@ -10177,7 +10163,7 @@ declare class PCB_Net {
|
|
|
10177
10163
|
* @param type - 网表格式
|
|
10178
10164
|
* @returns 网表数据,当 type 为 `JLCEDA` 或 `EasyEDA` 时,返回值为数组
|
|
10179
10165
|
*/
|
|
10180
|
-
getNetlist(type?:
|
|
10166
|
+
getNetlist(type?: ESYS_NetlistType): Promise<string | Array<string>>;
|
|
10181
10167
|
/**
|
|
10182
10168
|
* 更新网表
|
|
10183
10169
|
*
|
|
@@ -10185,7 +10171,7 @@ declare class PCB_Net {
|
|
|
10185
10171
|
* @param type - 网表格式
|
|
10186
10172
|
* @param netlist - 网表数据
|
|
10187
10173
|
*/
|
|
10188
|
-
setNetlist(type:
|
|
10174
|
+
setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<boolean>;
|
|
10189
10175
|
}
|
|
10190
10176
|
|
|
10191
10177
|
/**
|
|
@@ -10360,9 +10346,6 @@ declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI {
|
|
|
10360
10346
|
y?: number;
|
|
10361
10347
|
rotation?: number;
|
|
10362
10348
|
primitiveLock?: boolean;
|
|
10363
|
-
attributes?: {
|
|
10364
|
-
[key: string]: any;
|
|
10365
|
-
};
|
|
10366
10349
|
addIntoBom?: boolean;
|
|
10367
10350
|
designator?: string | null;
|
|
10368
10351
|
name?: string | null;
|
|
@@ -10371,6 +10354,9 @@ declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI {
|
|
|
10371
10354
|
manufacturerId?: string | null;
|
|
10372
10355
|
supplier?: string | null;
|
|
10373
10356
|
supplierId?: string | null;
|
|
10357
|
+
otherProperty?: {
|
|
10358
|
+
[key: string]: any;
|
|
10359
|
+
};
|
|
10374
10360
|
}): Promise<IPCB_PrimitiveComponent | undefined>;
|
|
10375
10361
|
/**
|
|
10376
10362
|
* 获取器件
|
|
@@ -11475,7 +11461,7 @@ declare class SCH_ManufactureData {
|
|
|
11475
11461
|
* @param netlistType - 网表类型
|
|
11476
11462
|
* @returns 网表文件数据
|
|
11477
11463
|
*/
|
|
11478
|
-
getNetlistFile(fileName?: string, netlistType?:
|
|
11464
|
+
getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;
|
|
11479
11465
|
/**
|
|
11480
11466
|
* 元件下单
|
|
11481
11467
|
*
|
|
@@ -11530,7 +11516,7 @@ declare class SCH_Netlist {
|
|
|
11530
11516
|
* @param type - 网表格式
|
|
11531
11517
|
* @returns 网表数据,当 type 为 `JLCEDA` 或 `EasyEDA` 时,返回值为数组
|
|
11532
11518
|
*/
|
|
11533
|
-
getNetlist(type?:
|
|
11519
|
+
getNetlist(type?: ESYS_NetlistType): Promise<string | Array<string>>;
|
|
11534
11520
|
/**
|
|
11535
11521
|
* 更新网表
|
|
11536
11522
|
*
|
|
@@ -11538,7 +11524,7 @@ declare class SCH_Netlist {
|
|
|
11538
11524
|
* @param type - 网表格式
|
|
11539
11525
|
* @param netlist - 网表数据
|
|
11540
11526
|
*/
|
|
11541
|
-
setNetlist(type:
|
|
11527
|
+
setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<void>;
|
|
11542
11528
|
}
|
|
11543
11529
|
|
|
11544
11530
|
/**
|
|
@@ -11566,7 +11552,7 @@ declare class SCH_Primitive {
|
|
|
11566
11552
|
getPrimitiveByPrimitiveId(id: string): Promise<ISCH_Primitive | undefined>;
|
|
11567
11553
|
/* Excluded from this release type: getPrimitivesByPrimitiveId */
|
|
11568
11554
|
/**
|
|
11569
|
-
*
|
|
11555
|
+
* 获取图元的 BBox
|
|
11570
11556
|
*
|
|
11571
11557
|
* @beta
|
|
11572
11558
|
* @param primitiveIds - 图元 ID 数组或图元对象数组
|
|
@@ -11949,7 +11935,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
|
|
|
11949
11935
|
* @param direction - 端口方向
|
|
11950
11936
|
* @param net - 网络名称
|
|
11951
11937
|
* @param x - 坐标 X
|
|
11952
|
-
* @param y -
|
|
11938
|
+
* @param y - 坐标 Y
|
|
11953
11939
|
* @param rotation - 旋转角度
|
|
11954
11940
|
* @param mirror - 是否镜像
|
|
11955
11941
|
* @returns 器件图元对象
|
|
@@ -12323,7 +12309,7 @@ declare class SCH_PrimitiveComponent3 implements ISCH_PrimitiveAPI {
|
|
|
12323
12309
|
* @remarks
|
|
12324
12310
|
* 本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布
|
|
12325
12311
|
*
|
|
12326
|
-
*
|
|
12312
|
+
* 本接口的返回时机并不会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 `true` 的结果
|
|
12327
12313
|
* @param component - 关联库器件
|
|
12328
12314
|
* @returns 是否找到器件
|
|
12329
12315
|
*/
|
|
@@ -12521,7 +12507,7 @@ declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI {
|
|
|
12521
12507
|
* 删除矩形
|
|
12522
12508
|
*
|
|
12523
12509
|
* @public
|
|
12524
|
-
* @param primitiveIds - 矩形的图元 ID
|
|
12510
|
+
* @param primitiveIds - 矩形的图元 ID 或矩形���元对象
|
|
12525
12511
|
* @returns 删除操作是否成功
|
|
12526
12512
|
*/
|
|
12527
12513
|
delete(primitiveIds: string | ISCH_PrimitiveRectangle | Array<string> | Array<ISCH_PrimitiveRectangle>): Promise<boolean>;
|
|
@@ -13600,7 +13586,7 @@ declare class SYS_ShortcutKey {
|
|
|
13600
13586
|
* @param callbackFn - 回调函数
|
|
13601
13587
|
* @returns 注册操作是否成功
|
|
13602
13588
|
*/
|
|
13603
|
-
registerShortcutKey(shortcutKey:
|
|
13589
|
+
registerShortcutKey(shortcutKey: TSYS_ShortcutKeys, title: string, callbackFn: (shortcutKey: TSYS_ShortcutKeys) => void | Promise<void>, documentType: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType> | undefined, scene: Array<ESYS_ShortcutKeyEffectiveEditorScene> | undefined, hotkeyCmd: string): Promise<boolean>;
|
|
13604
13590
|
/**
|
|
13605
13591
|
* 反注册快捷键
|
|
13606
13592
|
*
|
|
@@ -13608,7 +13594,7 @@ declare class SYS_ShortcutKey {
|
|
|
13608
13594
|
* @param shortcutKey - 快捷键,不区分传入的排列顺序,将自动排序并查询匹配的快捷键
|
|
13609
13595
|
* @returns 反注册操作是否成功
|
|
13610
13596
|
*/
|
|
13611
|
-
unregisterShortcutKey(shortcutKey:
|
|
13597
|
+
unregisterShortcutKey(shortcutKey: TSYS_ShortcutKeys): Promise<boolean>;
|
|
13612
13598
|
/**
|
|
13613
13599
|
* 查询快捷键列表
|
|
13614
13600
|
*
|
|
@@ -13617,7 +13603,7 @@ declare class SYS_ShortcutKey {
|
|
|
13617
13603
|
* @returns 快捷键列表
|
|
13618
13604
|
*/
|
|
13619
13605
|
getShortcutKeys(includeSystem?: boolean): Promise<Array<{
|
|
13620
|
-
shortcutKey:
|
|
13606
|
+
shortcutKey: TSYS_ShortcutKeys;
|
|
13621
13607
|
title: string;
|
|
13622
13608
|
documentType: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>;
|
|
13623
13609
|
scene: Array<ESYS_ShortcutKeyEffectiveEditorScene>;
|
|
@@ -14263,6 +14249,6 @@ declare type TPCB_PrimitiveSpecialPadShape = Array<[number, number, TPCB_Primiti
|
|
|
14263
14249
|
*
|
|
14264
14250
|
* @public
|
|
14265
14251
|
*/
|
|
14266
|
-
declare type
|
|
14252
|
+
declare type TSYS_ShortcutKeys = Array<'SHIFT' | 'LEFT_SHIFT' | 'RIGHT_SHIFT' | 'FN' | 'ALT' | 'LEFT_ALT' | 'RIGHT_ALT' | 'CONTROL' | 'LEFT_CONTROL' | 'RIGHT_CONTROL' | 'COMMAND' | 'WIN' | 'OPTION' | 'SUPER' | 'TAB' | 'SPACE' | 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'F13' | 'F14' | 'F15' | 'F16' | 'F17' | 'F18' | 'F19' | 'F20' | '`' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '0' | '-' | '=' | 'Q' | 'W' | 'E' | 'R' | 'T' | 'Y' | 'U' | 'I' | 'O' | 'P' | '[' | ']' | 'A' | 'S' | 'D' | 'F' | 'G' | 'H' | 'J' | 'K' | 'L' | ';' | "'" | '\\' | 'Z' | 'X' | 'C' | 'V' | 'B' | 'N' | 'M' | ',' | '.' | '/'>;
|
|
14267
14253
|
|
|
14268
14254
|
|