@mastergo/plugin-typings 1.19.0 → 1.21.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,20 @@
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
+
1
18
  # [1.19.0](https://github.com/mastergo-design/plugin-typings/compare/v1.18.0...v1.19.0) (2023-04-11)
2
19
 
3
20
 
package/dist/index.d.ts CHANGED
@@ -39,6 +39,8 @@ 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
@@ -224,8 +226,12 @@ declare global {
224
226
  onmessage: ((pluginMessage: any, origin: string) => void) | undefined
225
227
  }
226
228
  type PublishStatus = 'UNPUBLISHED' | 'CURRENT' | 'CHANGED'
229
+ interface DocumentationLink {
230
+ readonly uri: string
231
+ }
227
232
  interface PublishableMixin {
228
233
  description: string
234
+ documentationLinks: ReadonlyArray<DocumentationLink>
229
235
  /**
230
236
  * 是否为团队库组件/样式
231
237
  */
@@ -239,7 +245,7 @@ declare global {
239
245
 
240
246
  type StyleType = 'PAINT' | 'TEXT' | 'EFFECT' | 'GRID'
241
247
 
242
- interface BaseStyle extends PublishableMixin {
248
+ interface BaseStyle extends Omit<PublishableMixin, 'documentationLinks'> {
243
249
  readonly id: string
244
250
  readonly type: StyleType
245
251
  name: string
@@ -384,6 +390,7 @@ declare global {
384
390
  */
385
391
  readonly alpha?: number
386
392
  readonly blendMode?: BlendMode
393
+ readonly name?: string
387
394
  }
388
395
 
389
396
  interface GradientPaint {
@@ -398,16 +405,32 @@ declare global {
398
405
  readonly isVisible?: boolean
399
406
  readonly alpha?: number
400
407
  readonly blendMode?: BlendMode
408
+ readonly name?: string
409
+ }
410
+
411
+ interface ImageFilters {
412
+ exposure?: number
413
+ contrast?: number
414
+ saturation?: number
415
+ temperature?: number
416
+ tint?: number
417
+ highlights?: number
418
+ shadows?: number
419
+ hue?: number
401
420
  }
402
421
 
403
422
  interface ImagePaint {
404
423
  readonly type: 'IMAGE'
405
424
  readonly imageRef: string
406
425
  readonly scaleMode?: 'FILL' | 'TILE' | 'STRETCH' | 'FIT' | 'CROP'
426
+ readonly filters?: ImageFilters
407
427
 
408
428
  readonly isVisible?: boolean
409
429
  readonly alpha?: number
410
430
  readonly blendMode?: BlendMode
431
+ readonly name?: string
432
+ readonly ratio?: number
433
+ readonly rotation?: number
411
434
  }
412
435
 
413
436
  type Paint = SolidPaint | GradientPaint | ImagePaint
@@ -559,7 +582,9 @@ declare global {
559
582
  opacity: number
560
583
  blendMode: BlendMode
561
584
  isMask: boolean
562
- effects: ReadonlyArray<Effect>
585
+ isMaskOutline: boolean
586
+ isMaskVisible: boolean
587
+ effects: ReadonlyArray<Effect>
563
588
  effectStyleId: string
564
589
  }
565
590
 
@@ -707,7 +732,7 @@ declare global {
707
732
 
708
733
  interface OpaqueNodeMixin extends BaseNodeMixin, SceneNodeMixin, ExportMixin {
709
734
  readonly absoluteTransform: Transform
710
- relativeTransform: Transform
735
+ readonly relativeTransform: Transform
711
736
  readonly absoluteRenderBounds: Bound | null
712
737
  readonly absoluteBoundingBox: Bound
713
738
  x: number
@@ -744,6 +769,8 @@ declare global {
744
769
 
745
770
  interface DocumentNode {
746
771
  readonly type: 'DOCUMENT'
772
+
773
+ readonly id: string
747
774
  name: string
748
775
 
749
776
  currentPage: PageNode
@@ -923,7 +950,7 @@ declare global {
923
950
  readonly hyperlinks: Array<HyperlinkWithRange>
924
951
  textAlignHorizontal: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFIED'
925
952
  textAlignVertical: 'TOP' | 'CENTER' | 'BOTTOM'
926
- textAutoResize: 'NONE' | 'WIDTH_AND_HEIGHT' | 'HEIGHT'
953
+ textAutoResize: 'NONE' | 'WIDTH_AND_HEIGHT' | 'HEIGHT' | 'TRUNCATE'
927
954
  paragraphSpacing: number
928
955
  readonly textStyles: ReadonlyArray<TextSegStyle>
929
956
  readonly listStyles: ReadonlyArray<ListStyle>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "1.19.0",
3
+ "version": "1.21.0",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "main": "",
6
6
  "types": "dist/index.d.ts",