@mastergo/plugin-typings 1.9.0 → 1.10.2
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 +19 -0
- package/dist/index.d.ts +20 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.10.2](https://github.com/mastergo-design/plugin-typings/compare/v1.10.0...v1.10.2) (2022-12-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* 添加mg.mixed ([8196894](https://github.com/mastergo-design/plugin-typings/commit/8196894b5ad35214319dc311a52e1c441e36bc35))
|
|
7
|
+
* 废弃teamLibrary, 换成getTeamLibraryAsync([ffecaa](https://github.com/mastergo-design/plugin-typings/commit/ffecaaf8fae47530e75b818a7918716b4170a984))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [1.10.0](https://github.com/mastergo-design/plugin-typings/compare/v1.9.0...v1.10.0) (2022-12-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 文字分段样式增加fontWeight字重字段 ([3619b51](https://github.com/mastergo-design/plugin-typings/commit/3619b518fcd8cbd137df5fa0387bc8162fb53940))
|
|
16
|
+
* 文字新增百分比行高 ([a560491](https://github.com/mastergo-design/plugin-typings/commit/a560491b9fb146184fdce13d48b6eb58be4b6949))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
1
20
|
# [1.9.0](https://github.com/mastergo-design/plugin-typings/compare/v1.8.0...v1.9.0) (2022-11-24)
|
|
2
21
|
|
|
3
22
|
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ declare global {
|
|
|
41
41
|
|
|
42
42
|
readonly command: string
|
|
43
43
|
|
|
44
|
+
readonly mixed: string | symbol
|
|
45
|
+
|
|
44
46
|
readonly clientStorage: ClientStorageAPI
|
|
45
47
|
|
|
46
48
|
readonly viewport: ViewportAPI
|
|
@@ -108,13 +110,17 @@ declare global {
|
|
|
108
110
|
createImage(imageData: Uint8Array): Promise<Image>
|
|
109
111
|
getImageByHref(href: string): Image
|
|
110
112
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
teamLibrary: TeamLibrary,
|
|
113
|
+
|
|
114
|
+
getTeamLibraryAsync(): Promise<TeamLibrary>,
|
|
115
115
|
importComponentByKeyAsync(ukey: string): Promise<ComponentNode>,
|
|
116
116
|
importComponentSetByKeyAsync(ukey: string): Promise<ComponentSetNode>,
|
|
117
117
|
importStyleByKeyAsync(ukey: string): Promise<Style>,
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated
|
|
120
|
+
*
|
|
121
|
+
* This attribute is deprecated, please use getTeamLibraryAsync instead.
|
|
122
|
+
*/
|
|
123
|
+
teamLibrary: TeamLibrary,
|
|
118
124
|
|
|
119
125
|
hexToRGBA(hex: string): RGBA
|
|
120
126
|
RGBAToHex(rgba: RGBA): string
|
|
@@ -227,6 +233,7 @@ declare global {
|
|
|
227
233
|
lineHeight: LineHeight
|
|
228
234
|
textDecoration: TextDecoration
|
|
229
235
|
textCase: TextCase
|
|
236
|
+
fontWeight: number
|
|
230
237
|
}
|
|
231
238
|
fills: Paint[]
|
|
232
239
|
}
|
|
@@ -399,10 +406,14 @@ declare global {
|
|
|
399
406
|
readonly unit: 'PIXELS' | 'PERCENT'
|
|
400
407
|
}
|
|
401
408
|
|
|
402
|
-
type LineHeight =
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
409
|
+
type LineHeight =
|
|
410
|
+
| {
|
|
411
|
+
readonly value: number
|
|
412
|
+
readonly unit: 'PIXELS' | 'PERCENT'
|
|
413
|
+
}
|
|
414
|
+
| {
|
|
415
|
+
readonly unit: 'AUTO'
|
|
416
|
+
}
|
|
406
417
|
|
|
407
418
|
type BlendMode =
|
|
408
419
|
| 'NORMAL'
|
|
@@ -563,7 +574,7 @@ declare global {
|
|
|
563
574
|
interface CornerMixin {
|
|
564
575
|
// 待确认
|
|
565
576
|
cornerSmooth: number
|
|
566
|
-
cornerRadius: number |
|
|
577
|
+
cornerRadius: number | PluginAPI['mixed']
|
|
567
578
|
}
|
|
568
579
|
|
|
569
580
|
interface DefaultShapeMixin
|