@mastergo/plugin-typings 1.14.0 → 1.15.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [1.15.1](https://github.com/mastergo-design/plugin-typings/compare/v1.15.0...v1.15.1) (2023-03-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 修复penNetwork错误类型 ([ea28765](https://github.com/mastergo-design/plugin-typings/commit/ea2876522eb76661e0cee898e97acee732081041))
7
+
8
+
9
+
10
+ # [1.15.0](https://github.com/mastergo-design/plugin-typings/compare/v1.14.0...v1.15.0) (2023-03-15)
11
+
12
+
13
+ ### Features
14
+
15
+ * 添加notify方法参数, 以及关闭方法 ([ae12bba](https://github.com/mastergo-design/plugin-typings/commit/ae12bbafb0a00dc042911859b18fbdb2934ddbf4))
16
+ * SceneNodeMixin增加attachedConnectors ([62af223](https://github.com/mastergo-design/plugin-typings/commit/62af223ca0d88d16976c29a7516e7cb0244015ce))
17
+
18
+
19
+
1
20
  # [1.14.0](https://github.com/mastergo-design/plugin-typings/compare/v1.13.0...v1.14.0) (2023-02-07)
2
21
 
3
22
 
package/dist/index.d.ts CHANGED
@@ -91,7 +91,7 @@ declare global {
91
91
 
92
92
  saveVersionHistoryAsync(desc: string): Promise<void>
93
93
 
94
- notify(message: string, options?: NotifyOptions): void
94
+ notify(message: string, options?: NotifyOptions): NotificationHandler
95
95
 
96
96
  getStyleById(id: string): Style | null
97
97
  getTitleByFontFamilyAndStyle(fontFamily: string, fontStyle: string) : FontAlias | null
@@ -128,7 +128,9 @@ declare global {
128
128
  }
129
129
 
130
130
  interface Rect extends Readonly<Bound> {}
131
-
131
+ interface NotificationHandler {
132
+ cancel: () => void
133
+ }
132
134
  interface ViewportAPI {
133
135
  center: Vector
134
136
  zoom: number
@@ -192,6 +194,8 @@ declare global {
192
194
  interface NotifyOptions {
193
195
  position?: 'top' | 'bottom'
194
196
  type?: 'normal' | 'highlight' | 'error' | 'warning' | 'success'
197
+ timeout?: number
198
+ isLoading?: boolean
195
199
  }
196
200
 
197
201
  interface UIViewport extends Bound {
@@ -402,20 +406,16 @@ declare global {
402
406
 
403
407
  // 待确定
404
408
  interface VectorVertex {
405
- readonly id: number
406
409
  readonly x: number
407
410
  readonly y: number
408
- readonly type: 'PATH_NODE' | 'CONTROL_NODE' // 0 路径端点 1 控制节点
409
411
  readonly strokeCap?: StrokeCap
410
- readonly strokeJoin?: StrokeJoin
411
412
  readonly cornerRadius?: number
412
413
  }
413
414
 
414
415
  // 待确定
415
416
  interface VectorRegion {
416
- readonly id: number
417
417
  readonly windingRule: WindingRule
418
- readonly pathIds?: ReadonlyArray<number>
418
+ readonly loops: ReadonlyArray<VectorPaths>
419
419
  }
420
420
 
421
421
  interface VectorCtrl {
@@ -486,6 +486,7 @@ declare global {
486
486
  interface SceneNodeMixin {
487
487
  isVisible: boolean
488
488
  isLocked: boolean
489
+ readonly attachedConnectors: ConnectorNode[]
489
490
  componentPropertyReferences: {
490
491
  isVisible?: string,
491
492
  characters?: string,
@@ -820,18 +821,13 @@ declare global {
820
821
  clone(): StarNode
821
822
  }
822
823
 
823
- // interface VectorPath {
824
- // readonly id: number
825
- // readonly nodeIds: ReadonlyArray<number>
826
- // }
827
- type VectorPath = number[]
828
-
829
- type VectorPaths = ReadonlyArray<VectorPath>
824
+ type VectorPaths = ReadonlyArray<number>
825
+ type VectorPath = [number, number, number, number]
830
826
 
831
827
  interface PenNetwork {
832
- paths: ReadonlyArray<VectorPaths>
828
+ paths: ReadonlyArray<VectorPath>
833
829
  nodes: ReadonlyArray<VectorVertex>
834
- regions: ReadonlyArray<VectorRegion> | []
830
+ regions: ReadonlyArray<VectorRegion>
835
831
  ctrlNodes: ReadonlyArray<VectorCtrl>
836
832
  }
837
833
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "main": "",
6
6
  "types": "dist/index.d.ts",