@jlceda/pro-api-types 0.2.52 → 0.2.54
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 +75 -27
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -525,15 +525,9 @@ declare global {
|
|
|
525
525
|
* @alpha
|
|
526
526
|
* @param properties - 属性
|
|
527
527
|
* @param libraryUuid - 库 UUID,默认为系统库,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
528
|
-
* @param classification - 分类,默认为全部
|
|
529
|
-
*
|
|
530
|
-
* ADD since EDA v4
|
|
531
|
-
* @param symbolType - 符号类型,默认为全部
|
|
532
|
-
* @param itemsOfPage - 一页搜索结果的数量
|
|
533
|
-
* @param page - 页数
|
|
534
528
|
* @returns 搜索到的符号属性的列表
|
|
535
529
|
*/
|
|
536
|
-
searchByProperties(properties: ILIB_SymbolPropertiesForSearch, libraryUuid?: string
|
|
530
|
+
searchByProperties(properties: ILIB_SymbolPropertiesForSearch, libraryUuid?: string): Promise<Array<ILIB_SymbolSearchItem>>;
|
|
537
531
|
/**
|
|
538
532
|
* 在编辑器打开文档
|
|
539
533
|
*
|
|
@@ -2446,7 +2440,7 @@ declare global {
|
|
|
2446
2440
|
* @param page - 页数
|
|
2447
2441
|
* @returns 搜索到的器件属性的列表
|
|
2448
2442
|
*/
|
|
2449
|
-
searchByProperties(properties: ILIB_DevicePropertiesForSearch, libraryUuid?: string, classification?: Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Array<ILIB_DeviceSearchItem
|
|
2443
|
+
searchByProperties(properties: ILIB_DevicePropertiesForSearch, libraryUuid?: string, classification?: Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_DeviceSearchItem>>;
|
|
2450
2444
|
/**
|
|
2451
2445
|
* 使用立创 C 编号获取器件
|
|
2452
2446
|
*
|
|
@@ -2622,14 +2616,9 @@ declare global {
|
|
|
2622
2616
|
* @alpha
|
|
2623
2617
|
* @param properties - 属性
|
|
2624
2618
|
* @param libraryUuid - 库 UUID,默认为系统库,可以使用 {@link LIB_LibrariesList} 内的接口获取
|
|
2625
|
-
* @param classification - 分类,默认为全部
|
|
2626
|
-
*
|
|
2627
|
-
* ADD since EDA v4
|
|
2628
|
-
* @param itemsOfPage - 一页搜索结果的数量
|
|
2629
|
-
* @param page - 页数
|
|
2630
2619
|
* @returns 搜索到的封装属性的列表
|
|
2631
2620
|
*/
|
|
2632
|
-
searchByProperties(properties: ILIB_FootprintPropertiesForSearch, libraryUuid?: string
|
|
2621
|
+
searchByProperties(properties: ILIB_FootprintPropertiesForSearch, libraryUuid?: string): Promise<Array<ILIB_FootprintSearchItem>>;
|
|
2633
2622
|
/**
|
|
2634
2623
|
* 在编辑器打开文档
|
|
2635
2624
|
*
|
|
@@ -4403,7 +4392,7 @@ declare global {
|
|
|
4403
4392
|
*
|
|
4404
4393
|
* @public
|
|
4405
4394
|
* @remarks
|
|
4406
|
-
*
|
|
4395
|
+
* 本接口在前端画布上定��到指定的数据层面坐标;
|
|
4407
4396
|
*
|
|
4408
4397
|
* 如果希望在进行本操作时前端画布坐标能与传入数据一致,
|
|
4409
4398
|
* 建议调用 {@link PCB_Document.setCanvasOrigin} 方法并设置偏移量为零;
|
|
@@ -5119,7 +5108,7 @@ declare global {
|
|
|
5119
5108
|
/**
|
|
5120
5109
|
* 新增实时 DRC 结果事件监听
|
|
5121
5110
|
*
|
|
5122
|
-
* @
|
|
5111
|
+
* @beta
|
|
5123
5112
|
* @remarks
|
|
5124
5113
|
* 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
|
|
5125
5114
|
* @param id - 事件 ID,用以防止重复注册事件
|
|
@@ -5129,6 +5118,45 @@ declare global {
|
|
|
5129
5118
|
addRealTimeDrcResultEventListener(id: string, eventType: 'all', callFn: (eventType: undefined, props: [{
|
|
5130
5119
|
drcResult: any;
|
|
5131
5120
|
}]) => void | Promise<void>): void;
|
|
5121
|
+
/**
|
|
5122
|
+
* 新增光线追踪引擎 3D 预览点击材质事件监听
|
|
5123
|
+
*
|
|
5124
|
+
* @alpha
|
|
5125
|
+
* @remarks 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
|
|
5126
|
+
*
|
|
5127
|
+
* ADD since EDA v4
|
|
5128
|
+
* @param id - 事件 ID,用以防止重复注册事件
|
|
5129
|
+
* @param callFn - 事件触发时的回调函数
|
|
5130
|
+
* @param onlyOnce - 是否仅监听一次
|
|
5131
|
+
*/
|
|
5132
|
+
addRayTracerEngine3DViewClickMaterialEventListener(id: string, callFn: (props: {
|
|
5133
|
+
materialId: number;
|
|
5134
|
+
material: any;
|
|
5135
|
+
}) => void | Promise<void>, onlyOnce?: boolean): void;
|
|
5136
|
+
/**
|
|
5137
|
+
* 新增光线追踪引擎 3D 预览相机变动(拖动 3D 模型)事件监听
|
|
5138
|
+
*
|
|
5139
|
+
* @alpha
|
|
5140
|
+
* @remarks 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
|
|
5141
|
+
*
|
|
5142
|
+
* ADD since EDA v4
|
|
5143
|
+
* @param id - 事件 ID,用以防止重复注册事件
|
|
5144
|
+
* @param callFn - 事件触发时的回调函数
|
|
5145
|
+
* @param onlyOnce - 是否仅监听一次
|
|
5146
|
+
*/
|
|
5147
|
+
addRayTracerEngine3DViewCameraChangeEventListener(id: string, callFn: (props: {
|
|
5148
|
+
position: {
|
|
5149
|
+
x: number;
|
|
5150
|
+
y: number;
|
|
5151
|
+
z: number;
|
|
5152
|
+
};
|
|
5153
|
+
rotation: {
|
|
5154
|
+
x: number;
|
|
5155
|
+
y: number;
|
|
5156
|
+
z: number;
|
|
5157
|
+
};
|
|
5158
|
+
focalLength: number;
|
|
5159
|
+
}) => void | Promise<void>, onlyOnce?: boolean): void;
|
|
5132
5160
|
/**
|
|
5133
5161
|
* 移除事件监听
|
|
5134
5162
|
*
|
|
@@ -5250,7 +5278,7 @@ declare global {
|
|
|
5250
5278
|
* @param fileName - 文件名
|
|
5251
5279
|
* @param password - 加密密码
|
|
5252
5280
|
* @param fileType - 文件格式
|
|
5253
|
-
* @returns 文档文件数据,`undefined`
|
|
5281
|
+
* @returns 文档文件数据,`undefined` 表示当前��打开文档或数据获取失败
|
|
5254
5282
|
*/
|
|
5255
5283
|
getDocumentFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;
|
|
5256
5284
|
/**
|
|
@@ -7712,6 +7740,7 @@ declare global {
|
|
|
7712
7740
|
* 设置属性状态:是否反相
|
|
7713
7741
|
*
|
|
7714
7742
|
* @beta
|
|
7743
|
+
* @remarks 默认字体不支持反相
|
|
7715
7744
|
* @param reverse - 是否反相
|
|
7716
7745
|
* @returns 文本图元对象
|
|
7717
7746
|
*/
|
|
@@ -8151,6 +8180,7 @@ declare global {
|
|
|
8151
8180
|
* 设置属性状态:是否反相
|
|
8152
8181
|
*
|
|
8153
8182
|
* @beta
|
|
8183
|
+
* @remarks 默认字体不支持反相
|
|
8154
8184
|
* @param reverse - 是否反相
|
|
8155
8185
|
* @returns 属性图元对象
|
|
8156
8186
|
*/
|
|
@@ -10424,7 +10454,7 @@ declare global {
|
|
|
10424
10454
|
* 获取器件
|
|
10425
10455
|
*
|
|
10426
10456
|
* @beta
|
|
10427
|
-
* @remarks 如若传入多个图元 ID,任意图元 ID
|
|
10457
|
+
* @remarks 如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
|
|
10428
10458
|
* @param primitiveIds - 器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
|
|
10429
10459
|
* @returns 器件图元对象,空数组表示获取失败
|
|
10430
10460
|
*/
|
|
@@ -11547,7 +11577,7 @@ declare global {
|
|
|
11547
11577
|
* 查询图元是否为异步图元
|
|
11548
11578
|
*
|
|
11549
11579
|
* @public
|
|
11550
|
-
* @returns
|
|
11580
|
+
* @returns 是否为异步图���
|
|
11551
11581
|
*/
|
|
11552
11582
|
isAsync(): boolean;
|
|
11553
11583
|
/**
|
|
@@ -11586,7 +11616,7 @@ declare global {
|
|
|
11586
11616
|
* @beta
|
|
11587
11617
|
* @param layer - 层
|
|
11588
11618
|
* @param topLeftX - 左上点 X
|
|
11589
|
-
* @param topLeftY -
|
|
11619
|
+
* @param topLeftY - 左上点 Y
|
|
11590
11620
|
* @param binaryData - 二进制数据
|
|
11591
11621
|
* @param width - 宽
|
|
11592
11622
|
* @param height - 高
|
|
@@ -11741,6 +11771,10 @@ declare global {
|
|
|
11741
11771
|
* 获取属性状态:二进制数据
|
|
11742
11772
|
*
|
|
11743
11773
|
* @public
|
|
11774
|
+
* @remarks
|
|
11775
|
+
* 从画布取回的 `binaryData` 数据可能为 `hashId`,这是由于我们后端存储二进制内嵌对象数据的是对象存储,
|
|
11776
|
+
*
|
|
11777
|
+
* 对象存储以 `hashId` 作为索引,需要完整取回数据将会造成额外请求消耗性能
|
|
11744
11778
|
* @returns 二进制数据
|
|
11745
11779
|
*/
|
|
11746
11780
|
getState_BinaryData(): string;
|
|
@@ -11814,6 +11848,10 @@ declare global {
|
|
|
11814
11848
|
* 设置属性状态:二进制数据
|
|
11815
11849
|
*
|
|
11816
11850
|
* @public
|
|
11851
|
+
* @remarks
|
|
11852
|
+
* 从画布重新取回的 `binaryData` 数据可能为 `hashId`,这是由于我们后端存储二进制内嵌对象数据的是对象存储,
|
|
11853
|
+
*
|
|
11854
|
+
* 对象存储以 `hashId` 作为索引,需要完整取回数据将会造成额外请求消耗性能
|
|
11817
11855
|
* @param binaryData - 二进制数据
|
|
11818
11856
|
* @returns 二进制内嵌对象图元对象
|
|
11819
11857
|
*/
|
|
@@ -11944,6 +11982,16 @@ declare global {
|
|
|
11944
11982
|
* @param configurations - 渲染配置
|
|
11945
11983
|
*/
|
|
11946
11984
|
setRenderConfigurations(configurations: any): Promise<void>;
|
|
11985
|
+
/**
|
|
11986
|
+
* 获取光线追踪渲染配置
|
|
11987
|
+
*
|
|
11988
|
+
* @beta
|
|
11989
|
+
* @remarks 本接口配置定义还在进行中
|
|
11990
|
+
*
|
|
11991
|
+
* ADD since EDA v4
|
|
11992
|
+
* @returns 渲染配置
|
|
11993
|
+
*/
|
|
11994
|
+
getRenderConfigurations(): Promise<any>;
|
|
11947
11995
|
}
|
|
11948
11996
|
|
|
11949
11997
|
/**
|
|
@@ -14314,7 +14362,7 @@ declare global {
|
|
|
14314
14362
|
*/
|
|
14315
14363
|
getState_LineType(): ESCH_PrimitiveLineType | null;
|
|
14316
14364
|
/**
|
|
14317
|
-
*
|
|
14365
|
+
* 获取属性状态:填充样式
|
|
14318
14366
|
*
|
|
14319
14367
|
* @public
|
|
14320
14368
|
* @returns 填充样式
|
|
@@ -14887,7 +14935,7 @@ declare global {
|
|
|
14887
14935
|
* 设置属性状态:引脚类型
|
|
14888
14936
|
*
|
|
14889
14937
|
* @internal
|
|
14890
|
-
* @remarks
|
|
14938
|
+
* @remarks 本器件引脚图元属性不支持修改,本接口调用将不会有任何效果
|
|
14891
14939
|
* @returns 器件引脚图元对象
|
|
14892
14940
|
*/
|
|
14893
14941
|
setState_PinType(): ISCH_PrimitiveComponentPin;
|
|
@@ -16995,7 +17043,7 @@ declare global {
|
|
|
16995
17043
|
*
|
|
16996
17044
|
* @beta
|
|
16997
17045
|
* @param line - 坐标组
|
|
16998
|
-
* @returns
|
|
17046
|
+
* @returns 多边形图元对象
|
|
16999
17047
|
*/
|
|
17000
17048
|
setState_Line(line: Array<number>): ISCH_PrimitivePolygon;
|
|
17001
17049
|
/**
|
|
@@ -18085,7 +18133,7 @@ declare global {
|
|
|
18085
18133
|
setCellStyle: (style: CSSProperties) => void;
|
|
18086
18134
|
/** 设置行样式 */
|
|
18087
18135
|
setRowStyle: (style: CSSProperties) => void;
|
|
18088
|
-
/**
|
|
18136
|
+
/** 设置所有单元格样式 */
|
|
18089
18137
|
setAllCellStyle: (style: CSSProperties) => void;
|
|
18090
18138
|
/** 设置行数据 */
|
|
18091
18139
|
setRowData: (data: {
|
|
@@ -19532,7 +19580,7 @@ declare global {
|
|
|
19532
19580
|
*
|
|
19533
19581
|
* 本接口无法移除 {@link SYS_HeaderMenu.insertSystemHeaderMenus | 导入系统顶部菜单} 接口导入的系统顶部菜单项
|
|
19534
19582
|
*
|
|
19535
|
-
*
|
|
19583
|
+
* 本��口无法移除第一级菜单,`id` 数组请至少传递 `2` 个值
|
|
19536
19584
|
*
|
|
19537
19585
|
* 本接口无法移除 **高级** 菜单下的任何子菜单
|
|
19538
19586
|
*
|
|
@@ -19561,7 +19609,7 @@ declare global {
|
|
|
19561
19609
|
*
|
|
19562
19610
|
* 本接口不能在 **高级** 菜单下新增任何子菜单
|
|
19563
19611
|
*
|
|
19564
|
-
*
|
|
19612
|
+
* 本接口新增的子菜单将默认排列在原菜单的结尾,除非指定了 `props.insertBefore` 参数
|
|
19565
19613
|
*
|
|
19566
19614
|
* 注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
|
|
19567
19615
|
*
|
|
@@ -20583,7 +20631,7 @@ declare global {
|
|
|
20583
20631
|
*/
|
|
20584
20632
|
unregisterShortcutKey(shortcutKey: TSYS_ShortcutKeys): Promise<boolean>;
|
|
20585
20633
|
/**
|
|
20586
|
-
*
|
|
20634
|
+
* 查询快捷键列表
|
|
20587
20635
|
*
|
|
20588
20636
|
* @beta
|
|
20589
20637
|
* @param includeSystem - 是否包含系统快捷键
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.
|
|
1
|
+
{ "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.54", "description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义", "typings": "index.d.ts", "author": "JLCEDA <support@lceda.cn>", "license": "Apache-2.0", "homepage": "https://pro.lceda.cn/", "keywords": ["jlceda", "pro-api"], "scripts": { "lint": "eslint", "fix": "eslint --fix", "build": "ts-node ./build/build.ts" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", "@types/fast-text-encoding": "^1.0.3", "@types/fs-extra": "^11.0.4", "dotenv": "^16.4.7", "eslint": "^9.37.0", "fast-text-encoding": "^1.0.6", "fs-extra": "^11.3.0", "lint-staged": "^16.2.3", "simple-git-hooks": "^2.13.1", "ts-node": "^10.9.2", "typescript": "^5.7.3" }, "simple-git-hooks": { "pre-commit": "npx lint-staged" }, "lint-staged": { "*": "eslint --fix" } }
|