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