@mastergo/plugin-typings 1.18.0 → 1.20.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,29 @@
1
+ # [1.20.0](https://github.com/mastergo-design/plugin-typings/compare/v1.19.0...v1.20.0) (2023-04-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 补充paint的name字段 ([217c68e](https://github.com/mastergo-design/plugin-typings/commit/217c68efdcd1a3e6d0d0d07c3fd024794563751b))
7
+ * opaque图层禁止修改相对矩阵 ([fb634b1](https://github.com/mastergo-design/plugin-typings/commit/fb634b1eb77d7df2f5d1eeb98bd53888586b0daa))
8
+
9
+
10
+ ### Features
11
+
12
+ * 添加轮廓蒙层和是否可视属性,文本支持省略 ([89414ad](https://github.com/mastergo-design/plugin-typings/commit/89414ad67f398dd44055172b1d0f9ff47693b1d6))
13
+ * 增加pluginId ([321db49](https://github.com/mastergo-design/plugin-typings/commit/321db497ff6da8f2802bab2f5ea1c5e3f3a1fc76))
14
+ * document增加id ([d2bfdff](https://github.com/mastergo-design/plugin-typings/commit/d2bfdff8451eea4c09a757b6d01fec0c37f73e6f))
15
+
16
+
17
+
18
+ # [1.19.0](https://github.com/mastergo-design/plugin-typings/compare/v1.18.0...v1.19.0) (2023-04-11)
19
+
20
+
21
+ ### Features
22
+
23
+ * 添加currentUser接口 ([ebc74c3](https://github.com/mastergo-design/plugin-typings/commit/ebc74c3f98f97cd0fb58867ceb05fb27767bc596))
24
+
25
+
26
+
1
27
  # [1.18.0](https://github.com/mastergo-design/plugin-typings/compare/v1.17.1...v1.18.0) (2023-04-06)
2
28
 
3
29
 
package/dist/index.d.ts CHANGED
@@ -39,12 +39,16 @@ declare global {
39
39
 
40
40
  readonly documentId: number
41
41
 
42
+ readonly pluginId: number
43
+
42
44
  readonly command: string
43
45
 
44
46
  readonly mixed: string | symbol
45
47
 
46
48
  readonly clientStorage: ClientStorageAPI
47
49
 
50
+ readonly currentUser: User | null
51
+
48
52
  readonly viewport: ViewportAPI
49
53
 
50
54
  closePlugin(): void
@@ -129,6 +133,12 @@ declare global {
129
133
  RGBAToHex(rgba: RGBA): string
130
134
  }
131
135
 
136
+ interface User {
137
+ id: string | null
138
+ name: string | 'Anonymous'
139
+ photoUrl: string | null
140
+ }
141
+
132
142
  interface Rect extends Readonly<Bound> {}
133
143
  interface NotificationHandler {
134
144
  cancel: () => void
@@ -376,6 +386,7 @@ declare global {
376
386
  */
377
387
  readonly alpha?: number
378
388
  readonly blendMode?: BlendMode
389
+ readonly name?: string
379
390
  }
380
391
 
381
392
  interface GradientPaint {
@@ -390,6 +401,7 @@ declare global {
390
401
  readonly isVisible?: boolean
391
402
  readonly alpha?: number
392
403
  readonly blendMode?: BlendMode
404
+ readonly name?: string
393
405
  }
394
406
 
395
407
  interface ImagePaint {
@@ -400,6 +412,7 @@ declare global {
400
412
  readonly isVisible?: boolean
401
413
  readonly alpha?: number
402
414
  readonly blendMode?: BlendMode
415
+ readonly name?: string
403
416
  }
404
417
 
405
418
  type Paint = SolidPaint | GradientPaint | ImagePaint
@@ -551,7 +564,9 @@ declare global {
551
564
  opacity: number
552
565
  blendMode: BlendMode
553
566
  isMask: boolean
554
- effects: ReadonlyArray<Effect>
567
+ isMaskOutline: boolean
568
+ isMaskVisible: boolean
569
+ effects: ReadonlyArray<Effect>
555
570
  effectStyleId: string
556
571
  }
557
572
 
@@ -699,7 +714,7 @@ declare global {
699
714
 
700
715
  interface OpaqueNodeMixin extends BaseNodeMixin, SceneNodeMixin, ExportMixin {
701
716
  readonly absoluteTransform: Transform
702
- relativeTransform: Transform
717
+ readonly relativeTransform: Transform
703
718
  readonly absoluteRenderBounds: Bound | null
704
719
  readonly absoluteBoundingBox: Bound
705
720
  x: number
@@ -736,6 +751,8 @@ declare global {
736
751
 
737
752
  interface DocumentNode {
738
753
  readonly type: 'DOCUMENT'
754
+
755
+ readonly id: string
739
756
  name: string
740
757
 
741
758
  currentPage: PageNode
@@ -915,7 +932,7 @@ declare global {
915
932
  readonly hyperlinks: Array<HyperlinkWithRange>
916
933
  textAlignHorizontal: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFIED'
917
934
  textAlignVertical: 'TOP' | 'CENTER' | 'BOTTOM'
918
- textAutoResize: 'NONE' | 'WIDTH_AND_HEIGHT' | 'HEIGHT'
935
+ textAutoResize: 'NONE' | 'WIDTH_AND_HEIGHT' | 'HEIGHT' | 'TRUNCATE'
919
936
  paragraphSpacing: number
920
937
  readonly textStyles: ReadonlyArray<TextSegStyle>
921
938
  readonly listStyles: ReadonlyArray<ListStyle>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "main": "",
6
6
  "types": "dist/index.d.ts",