@jlceda/pro-api-types 0.1.90 → 0.1.92

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 +110 -45
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -413,7 +413,7 @@ declare class DMT_Project {
413
413
  * @beta
414
414
  * @param projectFriendlyName - 工程友好名称
415
415
  * @param projectName - 工程名称,仅支持字母 `a-zA-Z`、数字 `0-9`、中划线 `-`,如若不指定,则根据工程友好名称自动生成
416
- * @param teamUuid - 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定团队 UUID
416
+ * @param teamUuid - 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定��队 UUID
417
417
  * @param folderUuid - 文件夹 UUID,如若不指定,则为根文件夹
418
418
  * @param description - 工程描述
419
419
  * @param collaborationMode - 工程协作模式,如若团队权限无需工程设置协作模式,则该参数将被忽略
@@ -754,6 +754,9 @@ declare class EDA {
754
754
  pcb_PrimitiveRegion: PCB_PrimitiveRegion;
755
755
  pcb_PrimitiveVia: PCB_PrimitiveVia;
756
756
  pcb_SelectControl: PCB_SelectControl;
757
+ EPCB_LayerId: {
758
+ [key: string]: number;
759
+ };
757
760
  pnl_Document: PNL_Document;
758
761
  sch_Document: SCH_Document;
759
762
  sch_Drc: SCH_Drc;
@@ -773,6 +776,7 @@ declare class EDA {
773
776
  sch_SelectControl: SCH_SelectControl;
774
777
  sch_Utils: SCH_Utils;
775
778
  sys_ClientUrl: SYS_ClientUrl;
779
+ sys_Dialog: SYS_Dialog;
776
780
  sys_Environment: SYS_Environment;
777
781
  sys_FileManager: SYS_FileManager;
778
782
  sys_FileSystem: SYS_FileSystem;
@@ -1187,7 +1191,7 @@ declare enum EPCB_LayerId {
1187
1191
  SHELL_3D_TOP = 54,
1188
1192
  /** 3D 外壳底层 */
1189
1193
  SHELL_3D_BOTTOM = 55,
1190
- /** 钻��图层 */
1194
+ /** 钻孔图层 */
1191
1195
  DRILL_DRAWING = 56
1192
1196
  }
1193
1197
 
@@ -2043,36 +2047,12 @@ declare interface ILIB_DeviceAssociationItem {
2043
2047
  footprintUuid?: string;
2044
2048
  }
2045
2049
 
2046
- /**
2047
- * 器件属性
2048
- *
2049
- * @public
2050
- */
2051
- declare interface ILIB_DeviceItem {
2052
- /** 库类型 */
2053
- readonly libraryType: ELIB_LibraryType.DEVICE;
2054
- /** 器件 UUID */
2055
- uuid: string;
2056
- /** 所属库 UUID */
2057
- libraryUuid: string;
2058
- /** 器件名称 */
2059
- name: string;
2060
- /** 器件分类 */
2061
- classification?: ILIB_ClassificationIndex;
2062
- /** 关联 */
2063
- association: ILIB_DeviceAssociationItem;
2064
- /** 描述 */
2065
- description?: string;
2066
- /** 扩展属性 */
2067
- property: ILIB_DevicePropertyItem;
2068
- }
2069
-
2070
2050
  /**
2071
2051
  * 器件扩展属性
2072
2052
  *
2073
2053
  * @public
2074
2054
  */
2075
- declare interface ILIB_DevicePropertyItem {
2055
+ declare interface ILIB_DeviceExtendPropertyItem {
2076
2056
  /** 名称 */
2077
2057
  name?: string;
2078
2058
  /** 位号 */
@@ -2095,6 +2075,30 @@ declare interface ILIB_DevicePropertyItem {
2095
2075
  [key: string]: boolean | number | string | undefined;
2096
2076
  }
2097
2077
 
2078
+ /**
2079
+ * 器件属性
2080
+ *
2081
+ * @public
2082
+ */
2083
+ declare interface ILIB_DeviceItem {
2084
+ /** 库类型 */
2085
+ readonly libraryType: ELIB_LibraryType.DEVICE;
2086
+ /** 器件 UUID */
2087
+ uuid: string;
2088
+ /** 所属库 UUID */
2089
+ libraryUuid: string;
2090
+ /** 器件名称 */
2091
+ name: string;
2092
+ /** 器件分类 */
2093
+ classification?: ILIB_ClassificationIndex;
2094
+ /** 关联 */
2095
+ association: ILIB_DeviceAssociationItem;
2096
+ /** 描述 */
2097
+ description?: string;
2098
+ /** 扩展属性 */
2099
+ property: ILIB_DeviceExtendPropertyItem;
2100
+ }
2101
+
2098
2102
  /**
2099
2103
  * 搜索到的器件属性
2100
2104
  *
@@ -2600,11 +2604,11 @@ declare class IPCB_PrimitiveArc implements IPCB_Primitive {
2600
2604
  *
2601
2605
  * @beta
2602
2606
  * @param layer - 层
2603
- * @returns 圆弧线图元对象
2607
+ * @returns 圆弧线图��对象
2604
2608
  */
2605
2609
  setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitiveArc;
2606
2610
  /**
2607
- * ��置属性状态:起始位置 X
2611
+ * 设置属性状态:起始位置 X
2608
2612
  *
2609
2613
  * @beta
2610
2614
  * @param startX - 起始位置 X
@@ -3235,7 +3239,7 @@ declare class IPCB_PrimitiveImage implements IPCB_Primitive {
3235
3239
  * 获取属性状态:图像源数据(复杂多边形)
3236
3240
  *
3237
3241
  * @public
3238
- * @returns ���像源数据(复杂多边形)
3242
+ * @returns 图像源数据(复杂多边形)
3239
3243
  */
3240
3244
  getState_ComplexPolygon(): TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>;
3241
3245
  /**
@@ -3404,7 +3408,7 @@ declare class IPCB_PrimitiveLine implements IPCB_Primitive {
3404
3408
  private startY;
3405
3409
  /** 终止位置 X */
3406
3410
  private endX;
3407
- /** 终止��置 Y */
3411
+ /** 终止位置 Y */
3408
3412
  private endY;
3409
3413
  /** 线宽 */
3410
3414
  private lineWidth;
@@ -3866,7 +3870,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
3866
3870
  */
3867
3871
  setState_HoleOffsetX(holeOffsetX: number): IPCB_PrimitivePad;
3868
3872
  /**
3869
- * 设置属性状态:孔偏移 Y
3873
+ * 设置属性状态:孔偏��� Y
3870
3874
  *
3871
3875
  * @beta
3872
3876
  * @remarks 如若孔不存在,则属性将不会被修改
@@ -4481,7 +4485,7 @@ declare class IPCB_PrimitiveRegion implements IPCB_Primitive {
4481
4485
  */
4482
4486
  setState_LineWidth(lineWidth: number): IPCB_PrimitiveRegion;
4483
4487
  /**
4484
- * 设��属性状态:是否锁定
4488
+ * 设置属性状态:是否锁定
4485
4489
  *
4486
4490
  * @beta
4487
4491
  * @param primitiveLock - 是否锁定
@@ -5057,7 +5061,7 @@ declare class ISCH_PrimitiveComponent implements ISCH_Primitive {
5057
5061
  private readonly primitiveType;
5058
5062
  /** 器件类型 */
5059
5063
  private componentType;
5060
- /** 图元 ID */
5064
+ /** ���元 ID */
5061
5065
  private primitiveId?;
5062
5066
  /** 关联库器件 */
5063
5067
  private component;
@@ -5848,6 +5852,24 @@ declare class ISCH_PrimitiveWire implements ISCH_Primitive {
5848
5852
  done(): ISCH_PrimitiveWire;
5849
5853
  }
5850
5854
 
5855
+ /**
5856
+ * 文件系统文件路径
5857
+ *
5858
+ * @public
5859
+ */
5860
+ declare interface ISYS_FileSystemFileList {
5861
+ /** 文件名(前后均无斜杠) */
5862
+ fileName: string;
5863
+ /** 是否为目录 */
5864
+ isDirectory: boolean;
5865
+ /** 目录子文件 */
5866
+ subFiles?: Array<ISYS_FileSystemFileList>;
5867
+ /** 相对路径,不包含前面的传入路径和文件名(当没有传入路径时,不存在相对路径),且前后均无斜杠 */
5868
+ relativePath?: string;
5869
+ /** 完整路径,包含文件名的绝对路径 */
5870
+ fullPath: string;
5871
+ }
5872
+
5851
5873
  /**
5852
5874
  * 语言数据键值对
5853
5875
  *
@@ -6187,7 +6209,7 @@ declare class LIB_Device {
6187
6209
  symbolType?: ELIB_SymbolType;
6188
6210
  symbolUuid?: string;
6189
6211
  footprintUuid?: string;
6190
- }, description?: string, property?: ILIB_DevicePropertyItem): Promise<string | undefined>;
6212
+ }, description?: string, property?: ILIB_DeviceExtendPropertyItem): Promise<string | undefined>;
6191
6213
  /**
6192
6214
  * 删除器件
6193
6215
  *
@@ -6709,7 +6731,7 @@ declare class PCB_Document {
6709
6731
  * 建议调用本方法并设置偏移量为零,
6710
6732
  * 即 `setCanvasOrigin(0, 0)`;
6711
6733
  *
6712
- * 此处的单位为数据层面单位,在跨度上等��于画布层面的 mil
6734
+ * 此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
6713
6735
  * @param offsetX - 画布原点相对于数据原点的 X 坐标偏移
6714
6736
  * @param offsetY - 画布原点相对于数据原点的 Y 坐标偏移
6715
6737
  * @returns 操作是否成功
@@ -7879,7 +7901,7 @@ declare class PCB_PrimitiveFill implements IPCB_PrimitiveAPI {
7879
7901
  }
7880
7902
 
7881
7903
  /**
7882
- * PCB & 封装 / 图像图元类
7904
+ * PCB & 封装 / 图像��元类
7883
7905
  *
7884
7906
  * @public
7885
7907
  */
@@ -8435,7 +8457,7 @@ declare class SCH_Document {
8435
8457
  * 保存文档
8436
8458
  *
8437
8459
  * @public
8438
- * @returns 保存操作是否成功,保存失败、上传��败等错误均返回 `false`
8460
+ * @returns 保存操作是否成功,保存失败、上传失败等错误均返回 `false`
8439
8461
  */
8440
8462
  save(): Promise<boolean>;
8441
8463
  }
@@ -8540,7 +8562,7 @@ declare class SCH_ManufactureData {
8540
8562
  */
8541
8563
  placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
8542
8564
  /**
8543
- * SMT ��件下单
8565
+ * SMT 元件下单
8544
8566
  *
8545
8567
  * @beta
8546
8568
  * @param interactive - 是否启用交互式检查
@@ -9019,7 +9041,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
9019
9041
  *
9020
9042
  * @beta
9021
9043
  * @param primitiveIds - 器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
9022
- * @returns 器��图元对象,`undefined` 表示获取失败
9044
+ * @returns 器件图元对象,`undefined` 表示获取失败
9023
9045
  */
9024
9046
  get(primitiveIds: string): Promise<ISCH_PrimitiveComponent | undefined>;
9025
9047
  /**
@@ -9113,7 +9135,7 @@ declare class SCH_PrimitivePin implements ISCH_PrimitiveAPI {
9113
9135
  * 获取所有引脚的图元 ID
9114
9136
  *
9115
9137
  * @beta
9116
- * @remarks 当��于符号编辑器时,componentPrimitiveId 应始终为 undefined
9138
+ * @remarks 当处于符号编辑器时,componentPrimitiveId 应始终为 undefined
9117
9139
  * @returns 引脚的图元 ID 数组
9118
9140
  */
9119
9141
  getAllPrimitiveId(componentPrimitiveId?: string | ISCH_PrimitiveComponent): Promise<Array<string>>;
@@ -9207,7 +9229,7 @@ declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI {
9207
9229
  * @param height - 高
9208
9230
  * @param cornerRadius - 圆角半径
9209
9231
  * @param rotation - 旋转角度,绕左上点旋转,可选 `0` `90` `180` `270`
9210
- * @param color - 颜色,`null` ���示默认
9232
+ * @param color - 颜色,`null` 表示默认
9211
9233
  * @param fillColor - 填充颜色,`none` 表示无填充,`null` 表示默认
9212
9234
  * @param lineWidth - 线宽,范围 `1-10`,`null` 表示默认
9213
9235
  * @param lineType - 线型,`0` 实线,`1` 短划线,`2` 点线,`3` 点划线,`null` 表示默认
@@ -9513,6 +9535,40 @@ declare class SYS_ClientUrl {
9513
9535
  }, succeedCallFn?: (data: Response) => void | Promise<void>): Promise<Response>;
9514
9536
  }
9515
9537
 
9538
+ /**
9539
+ * 系统 / 对话框类
9540
+ *
9541
+ * @public
9542
+ * @remarks 生成对话框窗口
9543
+ */
9544
+ declare class SYS_Dialog {
9545
+ /**
9546
+ * 弹出消息窗口
9547
+ *
9548
+ * @public
9549
+ * @remarks 显示一个文字消息窗口
9550
+ * @param content - 消息文本,支持使用 `\n` 换行
9551
+ * @param title - 弹出窗口标题
9552
+ * @param buttonTitle - 按钮标题,为空则不显示按钮
9553
+ */
9554
+ showInformationMessage(content: string, title?: string, buttonTitle?: string): void;
9555
+ /**
9556
+ * 弹出确认窗口
9557
+ *
9558
+ * @public
9559
+ * @remarks 显示一个拥有确认和取消按钮的窗口
9560
+ * @param content - 消息文本,支持使用 `\n` 换行
9561
+ * @param title - 弹出窗口标题
9562
+ * @param mainButtonTitle - 主要按钮标题
9563
+ * @param buttonTitle - 主要按钮标题
9564
+ * @param callbackFn - 回调函数,如需调用扩展内的函数,请在函数名前加上扩展的唯一 ID,以西文句号 `.` 分隔
9565
+ */
9566
+ showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;
9567
+ /* Excluded from this release type: showInputDialog */
9568
+ /* Excluded from this release type: showSelectDialog */
9569
+ /* Excluded from this release type: showSelectDialog */
9570
+ }
9571
+
9516
9572
  /**
9517
9573
  * 系统 / 运行环境类
9518
9574
  *
@@ -9686,7 +9742,7 @@ declare class SYS_FileSystem {
9686
9742
  private allowExternalInteractions?;
9687
9743
  /* Excluded from this release type: __constructor */
9688
9744
  /**
9689
- * 打开读入文��窗口
9745
+ * 打开读入文件窗口
9690
9746
  *
9691
9747
  * @beta
9692
9748
  * @param filenameExtensions - 文件扩展名
@@ -9704,6 +9760,12 @@ declare class SYS_FileSystem {
9704
9760
  saveFile(fileData: File | Blob, fileName?: string): Promise<void>;
9705
9761
  /* Excluded from this release type: readFileFromFileSystem */
9706
9762
  /* Excluded from this release type: saveFileToFileSystem */
9763
+ /* Excluded from this release type: listFilesOfFileSystem */
9764
+ /* Excluded from this release type: deleteFileInFileSystem */
9765
+ /* Excluded from this release type: getEdaPath */
9766
+ /* Excluded from this release type: getDocumentsPath */
9767
+ /* Excluded from this release type: getLibrariesPaths */
9768
+ /* Excluded from this release type: getProjectsPaths */
9707
9769
  }
9708
9770
 
9709
9771
  /**
@@ -9931,6 +9993,7 @@ declare class SYS_Log {
9931
9993
  * 系统 / 消息框类
9932
9994
  *
9933
9995
  * @public
9996
+ * @deprecated 已更名为 {@link SYS_Dialog}
9934
9997
  * @remarks 生成消息提示框
9935
9998
  */
9936
9999
  declare class SYS_MessageBox {
@@ -9938,6 +10001,7 @@ declare class SYS_MessageBox {
9938
10001
  * 显示消息框
9939
10002
  *
9940
10003
  * @public
10004
+ * @deprecated 请使用 {@link SYS_Dialog.showInformationMessage} 替代
9941
10005
  * @remarks 显示一个文字消息提示框
9942
10006
  * @param content - 消息文本,支持使用 `\n` 换行
9943
10007
  * @param title - 消息框标题
@@ -9948,12 +10012,13 @@ declare class SYS_MessageBox {
9948
10012
  * 显示确认框
9949
10013
  *
9950
10014
  * @public
10015
+ * @deprecated 请使用 {@link SYS_Dialog.showConfirmationMessage} 替代
9951
10016
  * @remarks 显示一个拥有确认和取消按钮的确认框
9952
10017
  * @param content - 消息文本,支持使用 `\n` 换行
9953
10018
  * @param title - 确认框标题
9954
10019
  * @param mainButtonTitle - 主要按钮标题
9955
10020
  * @param buttonTitle - 主要按钮标题
9956
- * @param callbackFn - 回调函数,如需调用插件内的函数,请在函数名前加上插件的唯一 ID,以西文句号 `.` 分隔
10021
+ * @param callbackFn - 回调函数,如需调用扩展内的函数,请在函数名前加上扩展的唯一 ID,以西文句号 `.` 分隔
9957
10022
  */
9958
10023
  showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;
9959
10024
  }
@@ -10061,7 +10126,7 @@ declare class SYS_ShortcutKey {
10061
10126
  * @param shortcutKey - 快捷键,数组中包含多个元素则解析为组合快捷键,将按规则排序后存入缓存
10062
10127
  * @param title - 快捷键标题,快捷键的友好名称
10063
10128
  * @param callbackFn - 回调函数
10064
- * @returns 注册操作���否成功
10129
+ * @returns 注册操作是否成功
10065
10130
  */
10066
10131
  registerShortcutKey(shortcutKey: TShortcutKeys, title: string, callbackFn: (shortcutKey: TShortcutKeys) => void | Promise<void>, documentType: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType> | undefined, scene: Array<ESYS_ShortcutKeyEffectiveEditorScene> | undefined, hotkeyCmd: string): Promise<boolean>;
10067
10132
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jlceda/pro-api-types",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
4
4
  "description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义",
5
5
  "typings": "index.d.ts",
6
6
  "keywords": [