@jlceda/pro-api-types 0.2.47 → 0.2.48

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.
Files changed (2) hide show
  1. package/index.d.ts +65 -18
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -424,6 +424,15 @@ declare global {
424
424
  /** 前次修改者 */
425
425
  lastModifiedBy: string;
426
426
  }
427
+ /**
428
+ * 可用于精确搜索的符号参数
429
+ *
430
+ * @public
431
+ */
432
+ interface ILIB_SymbolPropertiesForSearch {
433
+ /** 符号名称 */
434
+ name?: string;
435
+ }
427
436
  /**
428
437
  * 综合库 / 符号类
429
438
  *
@@ -508,6 +517,21 @@ declare global {
508
517
  * @returns 搜索到的符号属性列表
509
518
  */
510
519
  search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_SymbolSearchItem>>;
520
+ /**
521
+ * 使用属性精确搜索符号
522
+ *
523
+ * @alpha
524
+ * @param properties - 属性
525
+ * @param libraryUuid - 库 UUID,默认为系统库,可以使用 {@link LIB_LibrariesList} 内的接口获取
526
+ * @param classification - 分类,默认为全部
527
+ *
528
+ * ADD since EDA v4
529
+ * @param symbolType - 符号类型,默认为全部
530
+ * @param itemsOfPage - 一页搜索结果的数量
531
+ * @param page - 页数
532
+ * @returns 搜索到的符号属性的列表
533
+ */
534
+ searchByProperties(properties: ILIB_SymbolPropertiesForSearch, libraryUuid?: string, classification?: Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Array<ILIB_SymbolSearchItem>;
511
535
  /**
512
536
  * 在编辑器打开文档
513
537
  *
@@ -945,7 +969,7 @@ declare global {
945
969
  /** 标签页是否可关闭 */
946
970
  isAbleDelete: boolean;
947
971
  /**
948
- * 标签页是否不使用 I18n 功能(内部功能)
972
+ * ��签页是否不使用 I18n 功能(内部功能)
949
973
  *
950
974
  * @internal
951
975
  */
@@ -1350,7 +1374,7 @@ declare global {
1350
1374
  * 文档树 / 面板管理类
1351
1375
  *
1352
1376
  * @public
1353
- * @remarks 在当前打开的工程内进行面板管理的相关操作
1377
+ * @remarks 在当前打开的工程内进行面板管理的��关操作
1354
1378
  */
1355
1379
  class DMT_Panel {
1356
1380
  /**
@@ -1382,7 +1406,7 @@ declare global {
1382
1406
  *
1383
1407
  * @public
1384
1408
  * @param panelUuid - 面板 UUID
1385
- * @returns 面板的详细属性,如若为 `undefined` 则获取��败
1409
+ * @returns 面板的详细属性,如若为 `undefined` 则获取失败
1386
1410
  */
1387
1411
  getPanelInfo(panelUuid: string): Promise<IDMT_PanelItem | undefined>;
1388
1412
  /**
@@ -2420,7 +2444,7 @@ declare global {
2420
2444
  * @param page - 页数
2421
2445
  * @returns 搜索到的器件属性的列表
2422
2446
  */
2423
- searchByProperties(properties: ILIB_DevicePropertiesForSearch, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Array<ILIB_DeviceSearchItem>;
2447
+ searchByProperties(properties: ILIB_DevicePropertiesForSearch, libraryUuid?: string, classification?: Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Array<ILIB_DeviceSearchItem>;
2424
2448
  /**
2425
2449
  * 使用立创 C 编号获取器件
2426
2450
  *
@@ -2499,6 +2523,15 @@ declare global {
2499
2523
  /** 前次修改者 */
2500
2524
  lastModifiedBy: string;
2501
2525
  }
2526
+ /**
2527
+ * 可用于精确搜索的封装参数
2528
+ *
2529
+ * @public
2530
+ */
2531
+ interface ILIB_FootprintPropertiesForSearch {
2532
+ /** 封装名称 */
2533
+ name?: string;
2534
+ }
2502
2535
  /**
2503
2536
  * 综合库 / 封装类
2504
2537
  *
@@ -2581,6 +2614,20 @@ declare global {
2581
2614
  * @returns 搜索到的封装属性列表
2582
2615
  */
2583
2616
  search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_FootprintSearchItem>>;
2617
+ /**
2618
+ * 使用属性精确搜索封装
2619
+ *
2620
+ * @alpha
2621
+ * @param properties - 属性
2622
+ * @param libraryUuid - 库 UUID,默认为系统库,可以使用 {@link LIB_LibrariesList} 内的接口获取
2623
+ * @param classification - 分类,默认为全部
2624
+ *
2625
+ * ADD since EDA v4
2626
+ * @param itemsOfPage - 一页搜索结果的数量
2627
+ * @param page - 页数
2628
+ * @returns 搜索到的封装属性的列表
2629
+ */
2630
+ searchByProperties(properties: ILIB_FootprintPropertiesForSearch, libraryUuid?: string, classification?: Array<string>, itemsOfPage?: number, page?: number): Array<ILIB_FootprintSearchItem>;
2584
2631
  /**
2585
2632
  * 在编辑器打开文档
2586
2633
  *
@@ -4373,7 +4420,7 @@ declare global {
4373
4420
  * 本接口在前端画布上定位到指定的区域,区域数据为相对于数据原点的偏移;
4374
4421
  *
4375
4422
  * 例如:传入数据为 `{left: 0, right: 60, top: 100, bottom: -20}` =\> `navigateToRegion(0, 60, 100, -20)`,
4376
- * 则画布将会定位到以 `[30, 40]` 为中心的,`x` 轴方向长度为 `60`,`y` 轴��向长度为 `120` 的矩形范围;
4423
+ * 则画布将会定位到以 `[30, 40]` 为中心的,`x` 轴方向长度为 `60`,`y` 轴方向长度为 `120` 的矩形范围;
4377
4424
  *
4378
4425
  * 本接口不进行缩放操作,但会生成指示定位中心及表示区域范围的矩形框;
4379
4426
  *
@@ -4806,7 +4853,7 @@ declare global {
4806
4853
  */
4807
4854
  modifyDifferentialPairNegativeNet(differentialPairName: string, negativeNet: string): Promise<boolean>;
4808
4855
  /**
4809
- * 获取所有差分对的详细属性
4856
+ * 获取所有差分对的详���属性
4810
4857
  *
4811
4858
  * @beta
4812
4859
  * @remarks
@@ -8221,7 +8268,7 @@ declare global {
8221
8268
  */
8222
8269
  get(primitiveIds: string): Promise<IPCB_PrimitivePoured | undefined>;
8223
8270
  /**
8224
- * 获取覆铜填充
8271
+ * ���取覆铜填充
8225
8272
  *
8226
8273
  * @beta
8227
8274
  * @remarks 如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
@@ -8749,7 +8796,7 @@ declare global {
8749
8796
  * @param net - 网络名称
8750
8797
  * @param layer - 层
8751
8798
  * @param primitiveLock - 是否锁定
8752
- * @returns 覆铜边框的图元 ID 数组
8799
+ * @returns 覆铜边框的图元 ID 数��
8753
8800
  */
8754
8801
  getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean): Promise<Array<string>>;
8755
8802
  /**
@@ -9875,7 +9922,7 @@ declare global {
9875
9922
  */
9876
9923
  create(): Promise<IPCB_PrimitivePad>;
9877
9924
  /**
9878
- * 获取属性状态:图元类型
9925
+ * 获取属性��态:图元类型
9879
9926
  *
9880
9927
  * @public
9881
9928
  * @returns 图元类型
@@ -10376,7 +10423,7 @@ declare global {
10376
10423
  *
10377
10424
  * @beta
10378
10425
  * @remarks 如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
10379
- * @param primitiveIds - 器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
10426
+ * @param primitiveIds - 器��的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
10380
10427
  * @returns 器件图元对象,空数组表示获取失败
10381
10428
  */
10382
10429
  get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveComponent>>;
@@ -13729,7 +13776,7 @@ declare global {
13729
13776
  */
13730
13777
  setState_FontSize(fontSize: number | null): ISCH_PrimitiveAttribute;
13731
13778
  /**
13732
- * 设置属性状态:是否加粗
13779
+ * ��置属性状态:是否加粗
13733
13780
  *
13734
13781
  * @beta
13735
13782
  * @param bold - 是否加粗
@@ -13789,7 +13836,7 @@ declare global {
13789
13836
  *
13790
13837
  * @beta
13791
13838
  * @param keyVisible - 键是否显示
13792
- * @returns 属性图元对���
13839
+ * @returns 属性图元对象
13793
13840
  */
13794
13841
  setState_KeyVisible(keyVisible: boolean | null): ISCH_PrimitiveAttribute;
13795
13842
  /**
@@ -14838,7 +14885,7 @@ declare global {
14838
14885
  */
14839
14886
  setState_NoConnected(noConnected: boolean): ISCH_PrimitiveComponentPin;
14840
14887
  /**
14841
- * 将异步图元重置为当前画布状态
14888
+ * 将异���图元重置为当前画布状态
14842
14889
  *
14843
14890
  * @internal
14844
14891
  * @remarks 本器件引脚图元属性不支持修改,本接口调用将不会有任何效果
@@ -16499,6 +16546,7 @@ declare global {
16499
16546
  * 创建二进制内嵌对象
16500
16547
  *
16501
16548
  * @beta
16549
+ * @param content - 对象内容
16502
16550
  * @param startX - 起点坐标 X
16503
16551
  * @param startY - 起点坐标 Y
16504
16552
  * @param width - 宽
@@ -16506,7 +16554,6 @@ declare global {
16506
16554
  * @param rotation - 旋转角度
16507
16555
  * @param mirror - 是否镜像
16508
16556
  * @param fileName - 文件名称
16509
- * @param content - 对象内容
16510
16557
  * @returns 二进制内嵌对象图元对象
16511
16558
  */
16512
16559
  create(content: File | string, startX: number, startY: number, width?: number, height?: number, rotation?: number, mirror?: boolean, fileName?: string): Promise<ISCH_PrimitiveObject | undefined>;
@@ -17484,7 +17531,7 @@ declare global {
17484
17531
  */
17485
17532
  getState_PrimitiveId(): string;
17486
17533
  /**
17487
- * 获取属性状态:多段线坐标组
17534
+ * 获取属性状态:多���线坐标组
17488
17535
  *
17489
17536
  * @public
17490
17537
  * @returns 多段线坐标组
@@ -19017,7 +19064,7 @@ declare global {
19017
19064
  */
19018
19065
  isOfflineMode(): boolean;
19019
19066
  /**
19020
- * 获取编辑器当前版本
19067
+ * 获取编辑器���前版本
19021
19068
  *
19022
19069
  * @public
19023
19070
  * @returns 编辑器当前版本
@@ -19511,7 +19558,7 @@ declare global {
19511
19558
  insertDividerAfter?: boolean;
19512
19559
  /** 在指定 ID 的菜单项的前面插入当前菜单项 */
19513
19560
  insertBefore?: string;
19514
- /** 在插入时是如若指定的菜单项前面存在分隔线,是否跨过该分隔线(即和 insertBefore 指定 ID 的菜单项之间是否可能存在分隔线,这和 insertDividerAfter 并不冲突,因为 insertDividerAfter 在菜单项插入完成后添加) */
19561
+ /** 在插入时如若指定的菜单项前面存在分隔线,是否跨过该分隔线(即和 insertBefore 指定 ID 的菜单项之间是否可能存在分隔线,这和 insertDividerAfter 并不冲突,因为 insertDividerAfter 在菜单项插入完成后添加) */
19515
19562
  crossDividerWhenInsert?: boolean;
19516
19563
  }): Promise<string | undefined>;
19517
19564
  /**
@@ -20542,7 +20589,7 @@ declare global {
20542
20589
  * 获取扩展所有用户配置
20543
20590
  *
20544
20591
  * @public
20545
- * @remarks 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
20592
+ * @remarks 注意:本接口仅扩展有效,在独立脚本环境��调用将始终 `throw Error`
20546
20593
  * @returns 扩展所有用户配置信息
20547
20594
  */
20548
20595
  getExtensionAllUserConfigs(): {
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.47", "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" } }
1
+ { "name": "@jlceda/pro-api-types", "type": "module", "version": "0.2.48", "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" } }