@jlceda/pro-api-types 0.1.123 → 0.1.125
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 +182 -25
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -81,12 +81,22 @@ 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
|
*
|
|
88
98
|
* @public
|
|
89
|
-
* @remarks
|
|
99
|
+
* @remarks 如若文档尚未保存,执行此操作将会直接丢失所有未保存的数据,请在修改操作完成后首先执行 {@link SCH_Document.save}、{@link PCB_Document.save}、{@link PNL_Document.save} 保存数据
|
|
90
100
|
* @param tabId - 标签页 ID,此处支持 {@link IDMT_SchematicPageItem.uuid}、{@link IDMT_PcbItem.uuid}、{@link IDMT_PanelItem.uuid} 作为输入
|
|
91
101
|
* @returns 操作是否成功
|
|
92
102
|
*/
|
|
@@ -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
|
/**
|
|
@@ -307,7 +380,7 @@ declare class DMT_Panel {
|
|
|
307
380
|
* 获取当前面板的详细属性
|
|
308
381
|
*
|
|
309
382
|
* @public
|
|
310
|
-
* @remarks
|
|
383
|
+
* @remarks 将会��取当前打开且拥有最后输入焦点的面板的详细属性
|
|
311
384
|
* @returns 面板的详细属性,如若为 `undefined` 则获取失败
|
|
312
385
|
*/
|
|
313
386
|
getCurrentPanelInfo(): Promise<IDMT_PanelItem | undefined>;
|
|
@@ -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;
|
|
@@ -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` 均被视为空网络
|
|
@@ -4961,7 +5118,7 @@ declare class IPCB_PrimitivePolyline implements IPCB_Primitive {
|
|
|
4961
5118
|
*/
|
|
4962
5119
|
toSync(): IPCB_PrimitivePolyline;
|
|
4963
5120
|
/**
|
|
4964
|
-
*
|
|
5121
|
+
* 查询图元是否为异步图元
|
|
4965
5122
|
*
|
|
4966
5123
|
* @public
|
|
4967
5124
|
* @returns 是否为异步图元
|
|
@@ -5607,7 +5764,7 @@ declare class IPCB_PrimitiveVia implements IPCB_Primitive {
|
|
|
5607
5764
|
*
|
|
5608
5765
|
* @beta
|
|
5609
5766
|
* @param diameter - 外径
|
|
5610
|
-
* @returns
|
|
5767
|
+
* @returns 过孔图元对象
|
|
5611
5768
|
*/
|
|
5612
5769
|
setState_Diameter(diameter: number): IPCB_PrimitiveVia;
|
|
5613
5770
|
/**
|
|
@@ -6913,7 +7070,7 @@ declare class ISCH_PrimitiveComponent_2 implements ISCH_Primitive {
|
|
|
6913
7070
|
*
|
|
6914
7071
|
* @beta
|
|
6915
7072
|
* @param y - 坐标 Y
|
|
6916
|
-
* @returns
|
|
7073
|
+
* @returns 器件图元对象
|
|
6917
7074
|
*/
|
|
6918
7075
|
setState_Y(y: number): ISCH_PrimitiveComponent_2;
|
|
6919
7076
|
/**
|
|
@@ -7054,7 +7211,7 @@ declare class ISCH_PrimitiveComponent_2 implements ISCH_Primitive {
|
|
|
7054
7211
|
* 将对图元的更改应用到画布
|
|
7055
7212
|
*
|
|
7056
7213
|
* @beta
|
|
7057
|
-
* @returns
|
|
7214
|
+
* @returns 器件图元对象
|
|
7058
7215
|
*/
|
|
7059
7216
|
done(): Promise<ISCH_PrimitiveComponent_2>;
|
|
7060
7217
|
/* Excluded from this release type: getAllPins */
|
|
@@ -7690,7 +7847,7 @@ declare class ISCH_PrimitiveRectangle implements ISCH_Primitive {
|
|
|
7690
7847
|
* 设置属性状态:填充样式
|
|
7691
7848
|
*
|
|
7692
7849
|
* @beta
|
|
7693
|
-
* @param fillStyle -
|
|
7850
|
+
* @param fillStyle - 填充样式
|
|
7694
7851
|
* @returns 矩形图元对象
|
|
7695
7852
|
*/
|
|
7696
7853
|
setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveRectangle;
|
|
@@ -8305,7 +8462,7 @@ declare class LIB_Cbb {
|
|
|
8305
8462
|
* 修改复用模块
|
|
8306
8463
|
*
|
|
8307
8464
|
* @beta
|
|
8308
|
-
* @remarks
|
|
8465
|
+
* @remarks 如希望清除某些属性,则将其的值设置为 `null`
|
|
8309
8466
|
* @param cbbUuid - 复用模块 UUID
|
|
8310
8467
|
* @param libraryUuid - 库 UUID,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
8311
8468
|
* @param cbbName - 复用模块名称
|
|
@@ -8362,7 +8519,7 @@ declare class LIB_Cbb {
|
|
|
8362
8519
|
* @beta
|
|
8363
8520
|
* @param cbbUuid - 复用模块 UUID
|
|
8364
8521
|
* @param libraryUuid - 库 UUID,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
8365
|
-
* @param splitScreenId - 分屏 ID
|
|
8522
|
+
* @param splitScreenId - 分屏 ID,不填写则默认在最后输入焦点的分屏内打开,可以���用 {@link DMT_EditorControl} 内的接口获取
|
|
8366
8523
|
* @returns 标签页 ID,对应 {@link IDMT_EditorTabItem.tabId},可使用 {@link DMT_EditorControl.getSplitScreenIdByTabId} 获取到分屏 ID
|
|
8367
8524
|
*/
|
|
8368
8525
|
openSymbolInEditor(cbbUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;
|
|
@@ -8667,7 +8824,7 @@ declare class LIB_Footprint {
|
|
|
8667
8824
|
*/
|
|
8668
8825
|
modify(footprintUuid: string, libraryUuid: string, footprintName?: string, classification?: ILIB_ClassificationIndex | null, description?: string | null): Promise<boolean>;
|
|
8669
8826
|
/**
|
|
8670
|
-
*
|
|
8827
|
+
* 更新封装的文档源码
|
|
8671
8828
|
*
|
|
8672
8829
|
* @beta
|
|
8673
8830
|
* @param footprintUuid - 封装 UUID
|
|
@@ -9127,7 +9284,7 @@ declare class PCB_Drc {
|
|
|
9127
9284
|
* 检查 DRC
|
|
9128
9285
|
*
|
|
9129
9286
|
* @beta
|
|
9130
|
-
* @param strict -
|
|
9287
|
+
* @param strict - ���否严格检查,当前 PCB 统一为严格检查模式
|
|
9131
9288
|
* @param userInterface - 是否显示 UI(呼出底部 DRC 窗口)
|
|
9132
9289
|
* @param includeVerboseError - 是否在返回值中包含详细错误信息,如若为 `true`,则返回值将始终为数组
|
|
9133
9290
|
* @returns DRC 检查是否通过
|
|
@@ -9771,7 +9928,7 @@ declare class PCB_ManufactureData {
|
|
|
9771
9928
|
* @param fileName - 文件名
|
|
9772
9929
|
* @param fileType - 文件类型
|
|
9773
9930
|
* @param template - 模板名称
|
|
9774
|
-
* @param filterOptions - 过滤规则,仅应包含需要启用的规则,`property` 为规则名称,`includeValue`
|
|
9931
|
+
* @param filterOptions - 过滤规则,仅应包含需要启用的规则,`property` 为规则名称,`includeValue` 为匹配的值
|
|
9775
9932
|
* @param statistics - 统计,包含所有需要启用的统计项的名称
|
|
9776
9933
|
* @param property - 属性,包含所有需要启用的属性的名称
|
|
9777
9934
|
* @param columns - 列的属性及排序,`title`、`sort`、`group`、`orderWeight` 不传入则取默认值,`null` 代表 **无** 或 **空**
|
|
@@ -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<{
|
|
@@ -11436,7 +11593,7 @@ declare class SCH_Event {
|
|
|
11436
11593
|
}
|
|
11437
11594
|
|
|
11438
11595
|
/**
|
|
11439
|
-
* 原理图 & 符号 /
|
|
11596
|
+
* 原理图 & 符号 / 生产资��类
|
|
11440
11597
|
*
|
|
11441
11598
|
* @public
|
|
11442
11599
|
* @remarks 获取当前原理图图页的生产资料文件及快捷下单
|
|
@@ -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(): {
|