@jlceda/pro-api-types 0.1.124 → 0.1.126
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 +179 -22
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -81,7 +81,17 @@ declare class DMT_EditorControl {
|
|
|
81
81
|
* @returns 标签页 ID,如若为 `undefined`,则打开文档失败
|
|
82
82
|
*/
|
|
83
83
|
openDocument(documentUuid: string, splitScreenId?: string): Promise<string | undefined>;
|
|
84
|
-
|
|
84
|
+
/**
|
|
85
|
+
* 打开库符号、封装文档
|
|
86
|
+
*
|
|
87
|
+
* @beta
|
|
88
|
+
* @param libraryUuid - 库 UUID,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
89
|
+
* @param libraryType - 库类型,支持符号和封装
|
|
90
|
+
* @param uuid - 符号、封装 UUID
|
|
91
|
+
* @param splitScreenId - 分屏 ID,即 {@link DMT_EditorControl.getSplitScreenTree} 方法获取到的 {@link IDMT_EditorSplitScreenItem.id}
|
|
92
|
+
* @returns 标签页 ID,如若为 `undefined`,则打开文档失败
|
|
93
|
+
*/
|
|
94
|
+
openLibraryDocument(libraryUuid: string, libraryType: ELIB_LibraryType.SYMBOL | ELIB_LibraryType.FOOTPRINT, uuid: string, splitScreenId?: string): Promise<string | undefined>;
|
|
85
95
|
/**
|
|
86
96
|
* 关闭文档
|
|
87
97
|
*
|
|
@@ -172,11 +182,74 @@ declare class DMT_EditorControl {
|
|
|
172
182
|
* @returns 操作是否成功
|
|
173
183
|
*/
|
|
174
184
|
mergeAllDocumentFromSplitScreen(): Promise<boolean>;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
/**
|
|
186
|
+
* 获取画布渲染区域图像
|
|
187
|
+
*
|
|
188
|
+
* @beta
|
|
189
|
+
* @param tabId - 标签页 ID,如若未传入,则获取最后输入焦点的画布
|
|
190
|
+
* @returns - 画布渲染区域的 Blob 格式图像数据
|
|
191
|
+
*/
|
|
192
|
+
getCurrentRenderedAreaImage(tabId?: string): Promise<Blob | undefined>;
|
|
193
|
+
/**
|
|
194
|
+
* 缩放到区域
|
|
195
|
+
*
|
|
196
|
+
* @beta
|
|
197
|
+
* @remarks 在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil
|
|
198
|
+
* @param left - 矩形框第一 X 坐标
|
|
199
|
+
* @param right - 矩形框第二 X 坐标
|
|
200
|
+
* @param top - 矩形框第一 Y 坐标
|
|
201
|
+
* @param bottom - 矩形框第二 Y 坐标
|
|
202
|
+
* @param tabId - 标签页 ID,如若未传入,则为最后输入焦点的画布
|
|
203
|
+
* @returns 操作是否成功
|
|
204
|
+
*/
|
|
205
|
+
zoomToRegion(left: number, right: number, top: number, bottom: number, tabId?: string): Promise<boolean>;
|
|
206
|
+
/**
|
|
207
|
+
* 缩放到坐标
|
|
208
|
+
*
|
|
209
|
+
* @beta
|
|
210
|
+
* @remarks 在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil
|
|
211
|
+
* @param x - 中心坐标 X,如若不传入则不改变当前 X 坐标
|
|
212
|
+
* @param y - 中心坐标 Y,如若不传入则不改变当前 Y 坐标
|
|
213
|
+
* @param scaleRatio - 缩放比,如若不传入则不改变当前缩放比,单位跨度为 `1/100`,如若传入 `200`,则表示缩放比为 `200%`
|
|
214
|
+
* @param tabId - 标签页 ID,如若未传入,则为最后输入焦点的画布
|
|
215
|
+
* @returns 缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
|
|
216
|
+
*/
|
|
217
|
+
zoomTo(x?: number, y?: number, scaleRatio?: number, tabId?: string): Promise<{
|
|
218
|
+
left: number;
|
|
219
|
+
right: number;
|
|
220
|
+
top: number;
|
|
221
|
+
bottom: number;
|
|
222
|
+
} | false>;
|
|
223
|
+
/**
|
|
224
|
+
* 缩放到所有图元(适应全部)
|
|
225
|
+
*
|
|
226
|
+
* @beta
|
|
227
|
+
* @remarks 在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil
|
|
228
|
+
* @param tabId - 标签页 ID,如若未传入,则为最后输入焦点的画布
|
|
229
|
+
* @returns 缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
|
|
230
|
+
*/
|
|
231
|
+
zoomToAllPrimitives(tabId?: string): Promise<{
|
|
232
|
+
left: number;
|
|
233
|
+
right: number;
|
|
234
|
+
top: number;
|
|
235
|
+
bottom: number;
|
|
236
|
+
} | false>;
|
|
237
|
+
/**
|
|
238
|
+
* 缩放到已选中图元(适应选中)
|
|
239
|
+
*
|
|
240
|
+
* @beta
|
|
241
|
+
* @remarks 在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil
|
|
242
|
+
* @param tabId - 标签页 ID,如若未传入,则为最后输入焦点的画布
|
|
243
|
+
* @returns 缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
|
|
244
|
+
*/
|
|
245
|
+
zoomToSelectedPrimitives(tabId?: string): Promise<{
|
|
246
|
+
left: number;
|
|
247
|
+
right: number;
|
|
248
|
+
top: number;
|
|
249
|
+
bottom: number;
|
|
250
|
+
} | false>;
|
|
251
|
+
/* Excluded from this release type: generateIndicatorMarkers */
|
|
252
|
+
/* Excluded from this release type: removeIndicatorMarkers */
|
|
180
253
|
}
|
|
181
254
|
|
|
182
255
|
/**
|
|
@@ -410,7 +483,7 @@ declare class DMT_Project {
|
|
|
410
483
|
*
|
|
411
484
|
* @beta
|
|
412
485
|
* @param projectFriendlyName - 工程友好名称
|
|
413
|
-
* @param projectName - 工程名称,仅支持字母 `a-zA-Z`、数字 `0-9`、中划线
|
|
486
|
+
* @param projectName - 工程名称,仅支持字母 `a-zA-Z`、数字 `0-9`、中划线 `-`,如若不指定,则根据工程友好名称自动生成
|
|
414
487
|
* @param teamUuid - 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定团队 UUID
|
|
415
488
|
* @param folderUuid - 文件夹 UUID,如若不指定,则为根文件夹
|
|
416
489
|
* @param description - 工程描述
|
|
@@ -509,7 +582,7 @@ declare class DMT_Schematic {
|
|
|
509
582
|
* @beta
|
|
510
583
|
* @param schematicPageUuid - 原理图图页 UUID
|
|
511
584
|
* @param schematicPageName - 原理图图页名称
|
|
512
|
-
* @returns
|
|
585
|
+
* @returns 是否���改成功
|
|
513
586
|
*/
|
|
514
587
|
modifySchematicPageName(schematicPageUuid: string, schematicPageName: string): Promise<boolean>;
|
|
515
588
|
/**
|
|
@@ -858,6 +931,24 @@ declare enum EDMT_EditorSplitScreenDirection {
|
|
|
858
931
|
VERTICAL = "vertical"
|
|
859
932
|
}
|
|
860
933
|
|
|
934
|
+
/**
|
|
935
|
+
* 指示标记类型
|
|
936
|
+
*
|
|
937
|
+
* @public
|
|
938
|
+
*/
|
|
939
|
+
declare enum EDMT_IndicatorMarkerType {
|
|
940
|
+
/** 点 */
|
|
941
|
+
POINT = "point",
|
|
942
|
+
/** 圆形 */
|
|
943
|
+
CIRCLE = "circle",
|
|
944
|
+
/** 线段 */
|
|
945
|
+
LINE = "line",
|
|
946
|
+
/** 圆弧 */
|
|
947
|
+
ARC = "arc",
|
|
948
|
+
/** 矩形 */
|
|
949
|
+
RECTANGLE = "rectangle"
|
|
950
|
+
}
|
|
951
|
+
|
|
861
952
|
/**
|
|
862
953
|
* 文档树项目类型
|
|
863
954
|
*
|
|
@@ -1429,7 +1520,7 @@ declare enum ESCH_PrimitiveComponentType {
|
|
|
1429
1520
|
/** 元件 */
|
|
1430
1521
|
COMPONENT = "part",
|
|
1431
1522
|
/** 图纸 */
|
|
1432
|
-
DRAWING = "
|
|
1523
|
+
DRAWING = "sheet",
|
|
1433
1524
|
/** 网络标识 */
|
|
1434
1525
|
NET_FLAG = "netflag",
|
|
1435
1526
|
/** 网络端口 */
|
|
@@ -1451,7 +1542,7 @@ declare enum ESCH_PrimitiveComponentType_2 {
|
|
|
1451
1542
|
/** 元件 */
|
|
1452
1543
|
COMPONENT = "part",
|
|
1453
1544
|
/** 图纸 */
|
|
1454
|
-
DRAWING = "
|
|
1545
|
+
DRAWING = "sheet",
|
|
1455
1546
|
/** 网络标识 */
|
|
1456
1547
|
NET_FLAG = "netflag",
|
|
1457
1548
|
/** 网络端口 */
|
|
@@ -1915,6 +2006,72 @@ declare interface IDMT_FolderItem {
|
|
|
1915
2006
|
childrenFoldersUuid?: Array<string>;
|
|
1916
2007
|
}
|
|
1917
2008
|
|
|
2009
|
+
/**
|
|
2010
|
+
* 指示标记外形
|
|
2011
|
+
*
|
|
2012
|
+
* @public
|
|
2013
|
+
*/
|
|
2014
|
+
declare interface IDMT_IndicatorMarkerShape {
|
|
2015
|
+
/** 类型 */
|
|
2016
|
+
type: EDMT_IndicatorMarkerType;
|
|
2017
|
+
/**
|
|
2018
|
+
* 点:坐标 X
|
|
2019
|
+
*
|
|
2020
|
+
* 圆形:圆心 X
|
|
2021
|
+
*/
|
|
2022
|
+
x?: number;
|
|
2023
|
+
/**
|
|
2024
|
+
* 点:坐标 Y
|
|
2025
|
+
*
|
|
2026
|
+
* 圆形:圆心 Y
|
|
2027
|
+
*/
|
|
2028
|
+
y?: number;
|
|
2029
|
+
/**
|
|
2030
|
+
* 圆形:半径
|
|
2031
|
+
*/
|
|
2032
|
+
r?: number;
|
|
2033
|
+
/**
|
|
2034
|
+
* 线段 | 圆弧:起始点 X
|
|
2035
|
+
*/
|
|
2036
|
+
startX?: number;
|
|
2037
|
+
/**
|
|
2038
|
+
* 线段 | 圆弧:起始点 Y
|
|
2039
|
+
*/
|
|
2040
|
+
startY?: number;
|
|
2041
|
+
/**
|
|
2042
|
+
* 圆弧:参考点 X
|
|
2043
|
+
*/
|
|
2044
|
+
referenceX?: number;
|
|
2045
|
+
/**
|
|
2046
|
+
* 圆弧:参考点 Y
|
|
2047
|
+
*/
|
|
2048
|
+
referenceY?: number;
|
|
2049
|
+
/**
|
|
2050
|
+
* 线段 | 圆弧:终止点 X
|
|
2051
|
+
*/
|
|
2052
|
+
endX?: number;
|
|
2053
|
+
/**
|
|
2054
|
+
* 线段 | 圆弧:终止点 Y
|
|
2055
|
+
*/
|
|
2056
|
+
endY?: number;
|
|
2057
|
+
/**
|
|
2058
|
+
* 矩形:上 Y
|
|
2059
|
+
*/
|
|
2060
|
+
top?: number;
|
|
2061
|
+
/**
|
|
2062
|
+
* 矩形:下 Y
|
|
2063
|
+
*/
|
|
2064
|
+
bottom?: number;
|
|
2065
|
+
/**
|
|
2066
|
+
* 矩形:左 X
|
|
2067
|
+
*/
|
|
2068
|
+
left?: number;
|
|
2069
|
+
/**
|
|
2070
|
+
* 矩形:右 X
|
|
2071
|
+
*/
|
|
2072
|
+
right?: number;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
1918
2075
|
/**
|
|
1919
2076
|
* 面板属性
|
|
1920
2077
|
*
|
|
@@ -1925,7 +2082,7 @@ declare interface IDMT_PanelItem {
|
|
|
1925
2082
|
readonly itemType: EDMT_ItemType.PANEL;
|
|
1926
2083
|
/** 面板 UUID */
|
|
1927
2084
|
uuid: string;
|
|
1928
|
-
/**
|
|
2085
|
+
/** 面板名称 */
|
|
1929
2086
|
name: string;
|
|
1930
2087
|
/** 所属工程 UUID */
|
|
1931
2088
|
parentProjectUuid: string;
|
|
@@ -4629,7 +4786,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
|
|
|
4629
4786
|
*/
|
|
4630
4787
|
setState_Layer(layer: TPCB_LayersOfPad): IPCB_PrimitivePad;
|
|
4631
4788
|
/**
|
|
4632
|
-
*
|
|
4789
|
+
* 设置属性状���:焊盘编号
|
|
4633
4790
|
*
|
|
4634
4791
|
* @beta
|
|
4635
4792
|
* @param padNumber - 焊盘编号
|
|
@@ -4674,7 +4831,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
|
|
|
4674
4831
|
*/
|
|
4675
4832
|
setState_Pad(pad: TPCB_PrimitivePadShape): IPCB_PrimitivePad;
|
|
4676
4833
|
/**
|
|
4677
|
-
*
|
|
4834
|
+
* 设置属性状态:网络
|
|
4678
4835
|
*
|
|
4679
4836
|
* @beta
|
|
4680
4837
|
* @remarks 本接口仅在 PCB 编辑器可用,空字符串与 `undefined` 均被视为空网络
|
|
@@ -8270,7 +8427,7 @@ declare class LIB_3DModel {
|
|
|
8270
8427
|
* @param classification - 分类,默认为全部
|
|
8271
8428
|
* @param itemsOfPage - 一页搜索结果的数量
|
|
8272
8429
|
* @param page - 页数
|
|
8273
|
-
* @returns
|
|
8430
|
+
* @returns ���索到的 3D 模型属性列表
|
|
8274
8431
|
*/
|
|
8275
8432
|
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex, itemsOfPage?: number, page?: number): Promise<Array<ILIB_3DModelSearchItem>>;
|
|
8276
8433
|
}
|
|
@@ -9024,7 +9181,7 @@ declare class PCB_Document {
|
|
|
9024
9181
|
*/
|
|
9025
9182
|
startCalculatingRatline(): Promise<boolean>;
|
|
9026
9183
|
/**
|
|
9027
|
-
*
|
|
9184
|
+
* 停���飞线计算功能
|
|
9028
9185
|
*
|
|
9029
9186
|
* @public
|
|
9030
9187
|
* @returns 操作是否成功
|
|
@@ -10188,7 +10345,7 @@ declare class PCB_Primitive {
|
|
|
10188
10345
|
* 获取图元的 BBox
|
|
10189
10346
|
*
|
|
10190
10347
|
* @beta
|
|
10191
|
-
* @param primitiveIds -
|
|
10348
|
+
* @param primitiveIds - ���元 ID 数组或图元对象数组
|
|
10192
10349
|
* @returns 图元的 BBox,如若图元不存在或没有 BBox,将会返回 `undefined` 的结果
|
|
10193
10350
|
*/
|
|
10194
10351
|
getPrimitivesBBox(primitiveIds: Array<string | IPCB_Primitive>): Promise<{
|
|
@@ -10317,7 +10474,7 @@ declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI {
|
|
|
10317
10474
|
*
|
|
10318
10475
|
* @beta
|
|
10319
10476
|
* @param primitiveIds - 器件的图元 ID 或器件图元对象
|
|
10320
|
-
* @returns
|
|
10477
|
+
* @returns 删除操作是否成功
|
|
10321
10478
|
*/
|
|
10322
10479
|
delete(primitiveIds: string | IPCB_PrimitiveComponent | Array<string> | Array<IPCB_PrimitiveComponent>): Promise<boolean>;
|
|
10323
10480
|
/**
|
|
@@ -11436,7 +11593,7 @@ declare class SCH_Event {
|
|
|
11436
11593
|
}
|
|
11437
11594
|
|
|
11438
11595
|
/**
|
|
11439
|
-
* 原理图 & 符号 /
|
|
11596
|
+
* 原理图 & 符号 / 生产资���类
|
|
11440
11597
|
*
|
|
11441
11598
|
* @public
|
|
11442
11599
|
* @remarks 获取当前原理图图页的生产资料文件及快捷下单
|
|
@@ -11821,7 +11978,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
|
|
|
11821
11978
|
private defaultLibraryUuid;
|
|
11822
11979
|
/* Excluded from this release type: __constructor */
|
|
11823
11980
|
/**
|
|
11824
|
-
*
|
|
11981
|
+
* 设��在扩展 API 中 Power 网络标识关联的器件 UUID
|
|
11825
11982
|
*
|
|
11826
11983
|
* @beta
|
|
11827
11984
|
* @param component - 关联库器件
|
|
@@ -13624,7 +13781,7 @@ declare class SYS_Storage {
|
|
|
13624
13781
|
* 获取扩展所有用户配置
|
|
13625
13782
|
*
|
|
13626
13783
|
* @public
|
|
13627
|
-
* @remarks
|
|
13784
|
+
* @remarks 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
|
|
13628
13785
|
* @returns 扩展所有用户配置信息
|
|
13629
13786
|
*/
|
|
13630
13787
|
getExtensionAllUserConfigs(): {
|
|
@@ -13935,7 +14092,7 @@ declare class SYS_Window {
|
|
|
13935
14092
|
* 可选中图层
|
|
13936
14093
|
*
|
|
13937
14094
|
* @public
|
|
13938
|
-
* @remarks
|
|
14095
|
+
* @remarks 此处为所有在编辑器图层菜单中可以选中并设置��见性的图层
|
|
13939
14096
|
*/
|
|
13940
14097
|
declare type TPCB_LayersInTheSelectable = TPCB_LayersOfInner | TPCB_LayersOfCustom | EPCB_LayerId.TOP | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.TOP_SOLDER_MASK | EPCB_LayerId.TOP_PASTE_MASK | EPCB_LayerId.TOP_ASSEMBLY | EPCB_LayerId.TOP_STIFFENER | EPCB_LayerId.BOTTOM | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.BOTTOM_SOLDER_MASK | EPCB_LayerId.BOTTOM_PASTE_MASK | EPCB_LayerId.BOTTOM_ASSEMBLY | EPCB_LayerId.BOTTOM_STIFFENER | EPCB_LayerId.BOARD_OUTLINE | EPCB_LayerId.MULTI | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL | EPCB_LayerId.DRILL_DRAWING | EPCB_LayerId.RATLINE | EPCB_LayerId.COMPONENT_SHAPE | EPCB_LayerId.COMPONENT_MARKING | EPCB_LayerId.PIN_SOLDERING | EPCB_LayerId.PIN_FLOATING | EPCB_LayerId.SHELL_3D_OUTLINE | EPCB_LayerId.SHELL_3D_TOP | EPCB_LayerId.SHELL_3D_BOTTOM;
|
|
13941
14098
|
|
|
@@ -14030,7 +14187,7 @@ declare type TPCB_LayerTypesOfInnerLayer = EPCB_LayerType.SIGNAL | EPCB_LayerTyp
|
|
|
14030
14187
|
*
|
|
14031
14188
|
* @public
|
|
14032
14189
|
* @remarks
|
|
14033
|
-
*
|
|
14190
|
+
* 单多边形为首尾重合的一条不间断的线所描述的区域,如果首尾不重合将会自动重合。
|
|
14034
14191
|
*
|
|
14035
14192
|
* 单多边形的数据格式举例:
|
|
14036
14193
|
*
|