@mastergo/plugin-typings 1.17.1 → 1.19.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 CHANGED
@@ -1,3 +1,21 @@
1
+ # [1.19.0](https://github.com/mastergo-design/plugin-typings/compare/v1.18.0...v1.19.0) (2023-04-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * 添加currentUser接口 ([ebc74c3](https://github.com/mastergo-design/plugin-typings/commit/ebc74c3f98f97cd0fb58867ceb05fb27767bc596))
7
+
8
+
9
+
10
+ # [1.18.0](https://github.com/mastergo-design/plugin-typings/compare/v1.17.1...v1.18.0) (2023-04-06)
11
+
12
+
13
+ ### Features
14
+
15
+ * 容器图层增加expanded属性, 实例增加resetoverrides方法 ([a2d1bad](https://github.com/mastergo-design/plugin-typings/commit/a2d1bad715c5e6d3096c4c406ce73a1fc4f3b391))
16
+
17
+
18
+
1
19
  ## [1.17.1](https://github.com/mastergo-design/plugin-typings/compare/v1.17.0...v1.17.1) (2023-03-30)
2
20
 
3
21
 
package/dist/index.d.ts CHANGED
@@ -45,6 +45,8 @@ declare global {
45
45
 
46
46
  readonly clientStorage: ClientStorageAPI
47
47
 
48
+ readonly currentUser: User | null
49
+
48
50
  readonly viewport: ViewportAPI
49
51
 
50
52
  closePlugin(): void
@@ -129,6 +131,12 @@ declare global {
129
131
  RGBAToHex(rgba: RGBA): string
130
132
  }
131
133
 
134
+ interface User {
135
+ id: string | null
136
+ name: string | 'Anonymous'
137
+ photoUrl: string | null
138
+ }
139
+
132
140
  interface Rect extends Readonly<Bound> {}
133
141
  interface NotificationHandler {
134
142
  cancel: () => void
@@ -620,6 +628,7 @@ declare global {
620
628
 
621
629
  interface DefaultContainerMixin
622
630
  extends BaseNodeMixin,
631
+ ContainerMixin,
623
632
  ReactionMixin,
624
633
  SceneNodeMixin,
625
634
  ChildrenMixin,
@@ -629,7 +638,9 @@ declare global {
629
638
  ConstraintMixin,
630
639
  LayoutMixin,
631
640
  ExportMixin { }
632
-
641
+ interface ContainerMixin {
642
+ expanded: boolean
643
+ }
633
644
  interface AutoLayout {
634
645
  flexMode: 'NONE' | 'HORIZONTAL' | 'VERTICAL'
635
646
  itemSpacing: number
@@ -844,6 +855,7 @@ declare global {
844
855
 
845
856
  interface BooleanOperationNode
846
857
  extends DefaultShapeMixin,
858
+ ContainerMixin,
847
859
  ChildrenMixin,
848
860
  CornerMixin {
849
861
  readonly type: 'BOOLEAN_OPERATION'
@@ -854,6 +866,7 @@ declare global {
854
866
 
855
867
  interface GroupNode
856
868
  extends DefaultShapeMixin,
869
+ ContainerMixin,
857
870
  ChildrenMixin,
858
871
  CornerMixin {
859
872
  readonly type: 'GROUP'
@@ -1044,6 +1057,8 @@ declare global {
1044
1057
  readonly exposedInstances: InstanceNode[]
1045
1058
  isExposedInstance: boolean
1046
1059
 
1060
+ resetOverrides(): void
1061
+
1047
1062
  clone(): InstanceNode
1048
1063
  /**
1049
1064
  * this is an async func
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "1.17.1",
3
+ "version": "1.19.0",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "main": "",
6
6
  "types": "dist/index.d.ts",