@jlceda/pro-api-types 0.1.75 → 0.1.76

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 +96 -18
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -416,7 +416,7 @@ declare class DMT_Project {
416
416
  * @param teamUuid - 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定团队 UUID
417
417
  * @param folderUuid - 文件夹 UUID,如若不指定,则为根文件夹
418
418
  * @param description - 工程描述
419
- * @param collaborationMode - 工程协作模式,如若团队权限无需工程设置协作模式,则该参数将被忽略
419
+ * @param collaborationMode - 工程协作模式,如若团队权限无需工程设置协作模式,则��参数将被忽略
420
420
  * @returns 工程 UUID,如若为 `undefined` 则创建失败
421
421
  */
422
422
  createProject(projectFriendlyName: string, projectName?: string, teamUuid?: string, folderUuid?: string, description?: string, collaborationMode?: EDMT_ProjectCollaborationMode): Promise<string | undefined>;
@@ -595,7 +595,7 @@ declare class DMT_Schematic {
595
595
  */
596
596
  getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
597
597
  /**
598
- * 获取当前原理图图页的详细属性
598
+ * 获取当前原��图图页的详细属性
599
599
  *
600
600
  * @beta
601
601
  * @remarks 将会获取当前打开且拥有最后输入焦点的原理图图页的详细属性
@@ -784,6 +784,7 @@ declare class EDA {
784
784
  sys_ToastMessage: SYS_ToastMessage;
785
785
  sys_Unit: SYS_Unit;
786
786
  sys_WebSocket: SYS_WebSocket;
787
+ sys_Window: SYS_Window;
787
788
  /* Excluded from this release type: extensionUuid */
788
789
  /* Excluded from this release type: allowExternalInteractions */
789
790
  /* Excluded from this release type: __constructor */
@@ -1550,6 +1551,30 @@ declare enum ESYS_Unit {
1550
1551
  MIL = "mil"
1551
1552
  }
1552
1553
 
1554
+ /**
1555
+ * 窗口事件类型
1556
+ *
1557
+ * @public
1558
+ */
1559
+ declare enum ESYS_WindowEventType {
1560
+ /** 失去焦点 */
1561
+ BLUR = "blur",
1562
+ /** 获取焦点 */
1563
+ FOCUS = "focus"
1564
+ }
1565
+
1566
+ /**
1567
+ * 打开窗口上下文目标
1568
+ *
1569
+ * @public
1570
+ */
1571
+ declare enum ESYS_WindowOpenTarget {
1572
+ /** 新标签页 */
1573
+ BLANK = "_blank",
1574
+ /** 当前页 */
1575
+ SELF = "_self"
1576
+ }
1577
+
1553
1578
  /**
1554
1579
  * 板子属性
1555
1580
  *
@@ -2085,7 +2110,7 @@ declare interface ILIB_PanelLibraryItem {
2085
2110
  libraryUuid: string;
2086
2111
  /** 面板库名称 */
2087
2112
  name: string;
2088
- /** 分类 */
2113
+ /** 分�� */
2089
2114
  classification?: ILIB_ClassificationIndex;
2090
2115
  /** 描述 */
2091
2116
  description?: string;
@@ -2245,7 +2270,7 @@ declare interface IPCB_LayerItem {
2245
2270
  type: EPCB_LayerType;
2246
2271
  /** 颜色(RGB HEX 格式) */
2247
2272
  color: string;
2248
- /** 透明度(%) */
2273
+ /** ��明度(%) */
2249
2274
  transparency: number;
2250
2275
  }
2251
2276
 
@@ -2554,7 +2579,7 @@ declare class IPCB_PrimitiveDimension implements IPCB_Primitive {
2554
2579
  * @returns
2555
2580
  */
2556
2581
  getState_PrimitiveId(): string;
2557
- /** @alpha 所有的 setState_* 方法都需要对��据进行基本的格式校验 */
2582
+ /** @alpha 所有的 setState_* 方法都需要对数据进行基本的格式校验 */
2558
2583
  /**
2559
2584
  * 设置属性状态:尺寸标注类型
2560
2585
  *
@@ -2997,7 +3022,7 @@ declare class IPCB_PrimitivePad implements IPCB_Primitive {
2997
3022
  * @remarks
2998
3023
  * 设置焊盘外形时将会联动设置部分其它属性状态:
2999
3024
  *
3000
- * 1. 特殊焊盘外形属性将被清���
3025
+ * 1. 特殊焊盘外形属性将被清空
3001
3026
  *
3002
3027
  * @param pad - 焊盘外形
3003
3028
  * @returns 焊盘图元对象
@@ -3248,7 +3273,7 @@ declare class IPCB_PrimitivePolyline implements IPCB_Primitive {
3248
3273
  declare interface IPCB_PrimitiveSolderMaskAndPasteMaskExpansion {
3249
3274
  /** 顶层阻焊扩展 */
3250
3275
  topSolderMask?: number;
3251
- /** 底层阻焊扩展 */
3276
+ /** 底��阻焊扩展 */
3252
3277
  bottomSolderMask?: number;
3253
3278
  /** 顶层助焊扩展 */
3254
3279
  topPasteMask?: number;
@@ -3935,7 +3960,7 @@ declare class ISCH_PrimitiveRectangle implements ISCH_Primitive {
3935
3960
  private height;
3936
3961
  /** 圆角半径 */
3937
3962
  private cornerRadius;
3938
- /** 旋转角度 */
3963
+ /** 旋���角度 */
3939
3964
  private rotation;
3940
3965
  /** 边框颜色 */
3941
3966
  private color;
@@ -4201,6 +4226,20 @@ declare interface ISYS_MultilingualLanguagesData {
4201
4226
  [language: string]: ISYS_LanguageKeyValuePairs;
4202
4227
  }
4203
4228
 
4229
+ /**
4230
+ * 窗口事件监听可移除对象
4231
+ *
4232
+ * @public
4233
+ * @remarks 本对象从 {@link addEventListener} 获取,并可用于移除创建的事件监听,仅需将其传入 {@link removeEventListener}
4234
+ */
4235
+ declare interface ISYS_WindowEventListenerRemovableObject {
4236
+ type: ESYS_WindowEventType;
4237
+ listener: (ev: any) => any;
4238
+ options?: {
4239
+ capture?: boolean;
4240
+ };
4241
+ }
4242
+
4204
4243
  /**
4205
4244
  * 综合库 / 3D 模型类
4206
4245
  *
@@ -4989,7 +5028,7 @@ declare class PCB_Document {
4989
5028
  * 嘉立创 EDA 专业版 API 使用的均为数据原点;
4990
5029
  *
4991
5030
  * 如果希望在 API 操作时前端画布坐标能与数据一致,
4992
- * 建议调用本方法并设置偏移量���零,
5031
+ * 建议调用本方法并设置偏移量为零,
4993
5032
  * 即 `setCanvasOrigin(0, 0)`;
4994
5033
  *
4995
5034
  * 此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
@@ -5856,7 +5895,7 @@ declare class PCB_PrimitiveArc implements IPCB_PrimitiveAPI {
5856
5895
  */
5857
5896
  create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, arcAngle: number, lineWidth?: number, interactiveMode?: EPCB_PrimitiveArcInteractiveMode, primitiveLock?: boolean): Promise<IPCB_PrimitiveArc | undefined>;
5858
5897
  /**
5859
- * 删除圆弧线
5898
+ * ���除圆弧线
5860
5899
  *
5861
5900
  * @beta
5862
5901
  * @param primitiveIds - 圆弧线的图元 ID 或圆弧线图元对象
@@ -6620,7 +6659,7 @@ declare class PNL_Document {
6620
6659
  * 保存文档
6621
6660
  *
6622
6661
  * @beta
6623
- * @returns 保存操作是否成功,保存失败、上传失败等错误均返回 `false`
6662
+ * @returns 保存操作是否成功,保存失败、上传���败等错误均返回 `false`
6624
6663
  */
6625
6664
  save(): Promise<boolean>;
6626
6665
  }
@@ -7042,7 +7081,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
7042
7081
  *
7043
7082
  * @beta
7044
7083
  * @param componentUuid - 器件 UUID
7045
- * @param libraryPath - 库路径,默认为系统库
7084
+ * @param libraryPath - 库路���,默认为系统库
7046
7085
  * @returns 操作是否成功
7047
7086
  */
7048
7087
  setNetFlagComponentUuid_ProtectGround(componentUuid: string, libraryPath?: string): Promise<boolean>;
@@ -7142,7 +7181,7 @@ declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI {
7142
7181
  * @param primitiveId - 图元 ID
7143
7182
  * @param x - 坐标 X
7144
7183
  * @param y - 坐标 Y
7145
- * @param rotation - 旋转角度,可��� `0` `90` `180` `270`
7184
+ * @param rotation - 旋转角度,可选 `0` `90` `180` `270`
7146
7185
  * @param mirror - 是否镜像
7147
7186
  * @param libraryPath - 库路径,默认为系统库
7148
7187
  * @param addIntoBom - 是否加入 BOM
@@ -7326,7 +7365,7 @@ declare class SCH_PrimitivePolygon implements ISCH_PrimitiveAPI {
7326
7365
  * 获取多边形
7327
7366
  *
7328
7367
  * @beta
7329
- * @param primitiveIds - 多边形的图元 ID,可以为字符串或��符串数组,如若为数组,则返回的也是数组
7368
+ * @param primitiveIds - 多边形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
7330
7369
  * @returns 多边形图元对象
7331
7370
  */
7332
7371
  get(primitiveIds: string): Promise<ISCH_PrimitivePolygon | undefined>;
@@ -7400,7 +7439,7 @@ declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI {
7400
7439
  * 获取矩形
7401
7440
  *
7402
7441
  * @public
7403
- * @param primitiveIds - 矩形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
7442
+ * @param primitiveIds - 矩形的���元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
7404
7443
  * @returns 矩形图元对象
7405
7444
  */
7406
7445
  get(primitiveIds: string): Promise<ISCH_PrimitiveRectangle | undefined>;
@@ -7514,7 +7553,7 @@ declare class SCH_PrimitiveWire implements ISCH_PrimitiveAPI {
7514
7553
  * 3. 有多个坐标点在多个不同网络的图元上,则创建失败
7515
7554
  *
7516
7555
  * 如若已指定,则遵循:
7517
- * 1. 有一个或多个坐���点在其他网络的图元上,且其他图元并未显式(通常指的是包含网络标签或网络端口)指定网络,则其他图元跟随指定的网络;
7556
+ * 1. 有一个或多个坐标点在其他网络的图元上,且其他图元并未显式(通常指的是包含网络标签或网络端口)指定网络,则其他图元跟随指定的网络;
7518
7557
  * 2. 如若其他图元指定了网络,则创建失败
7519
7558
  * @param color - 导线颜色,`null` 表示默认
7520
7559
  * @param lineWidth - 线宽,范围 `1-10`,`null` 表示默认
@@ -7758,7 +7797,7 @@ declare class SYS_FileManager {
7758
7797
  */
7759
7798
  getFootprintFileByFootprintUuid(footprintUuid: string | Array<string>, libraryUuid?: string): Promise<File | undefined>;
7760
7799
  /**
7761
- * 使用复用模块 UUID 获取复用模块文件
7800
+ * 使用复用模块 UUID ��取复用模块文件
7762
7801
  *
7763
7802
  * @beta
7764
7803
  * @remarks 可以使用 {@link SYS_FileSystem.saveFile} 接口将文件导出到本地文件系统
@@ -8256,7 +8295,7 @@ declare class SYS_Unit {
8256
8295
  *
8257
8296
  * @public
8258
8297
  * @param mil - 输入密尔数
8259
- * @param numberOfDecimals - 保留小数位数,默认为 `4`
8298
+ * @param numberOfDecimals - 保留小��位数,默认为 `4`
8260
8299
  * @returns 输出毫米数
8261
8300
  */
8262
8301
  milToMm(mil: number, numberOfDecimals?: number): number;
@@ -8358,6 +8397,45 @@ declare class SYS_WebSocket {
8358
8397
  close(id: string, code?: number, reason?: string, extensionUuid?: string): void;
8359
8398
  }
8360
8399
 
8400
+ /**
8401
+ * 系统 / 窗口类
8402
+ *
8403
+ * @public
8404
+ * @remarks 为了保证安全性,仅提供有限的窗口跳转与监听支持,更多操作请使用内联框架窗口 {@link SYS_IFrame}
8405
+ */
8406
+ declare class SYS_Window {
8407
+ /**
8408
+ * 打开资源窗口
8409
+ *
8410
+ * @beta
8411
+ * @param url - 欲加载资源的 URL 或路径
8412
+ * @param target - 上下文目标
8413
+ */
8414
+ open(url: string, target?: ESYS_WindowOpenTarget): void;
8415
+ /**
8416
+ * 新增事件监听
8417
+ *
8418
+ * @beta
8419
+ * @param type - 事件类型,当前支持 `blur` `focus`
8420
+ * @param listener - 事件监听回调
8421
+ * @param options - 可选参数
8422
+ * @returns 事件监听方法,用于移除事件监听,如若为 `undefined` 则表示创建事件监听失败
8423
+ */
8424
+ addEventListener(type: ESYS_WindowEventType, listener: (ev: any) => any, options?: {
8425
+ capture?: boolean;
8426
+ once?: boolean;
8427
+ passive?: boolean;
8428
+ signal?: AbortSignal;
8429
+ }): ISYS_WindowEventListenerRemovableObject | undefined;
8430
+ /**
8431
+ * 移除事件监听
8432
+ *
8433
+ * @beta
8434
+ * @param removableObject - 窗口事件监听可移除对象
8435
+ */
8436
+ removeEventListener(removableObject: ISYS_WindowEventListenerRemovableObject): void;
8437
+ }
8438
+
8361
8439
  /**
8362
8440
  * 可选中图层
8363
8441
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jlceda/pro-api-types",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "description": "嘉立创EDA & EasyEDA 专业版扩展 API 接口类型定义",
5
5
  "typings": "index.d.ts",
6
6
  "keywords": [