@mastergo/plugin-typings 1.10.0 → 1.11.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 +25 -0
- package/dist/index.d.ts +14 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# [1.11.0](https://github.com/mastergo-design/plugin-typings/compare/v1.10.2...v1.11.0) (2022-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 修复错误的parent类型 ([b92257d](https://github.com/mastergo-design/plugin-typings/commit/b92257db0b34b8689328a82f523183161cef71c2))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* 添加getNodeByPosition接口 ([9cda766](https://github.com/mastergo-design/plugin-typings/commit/9cda7668c19e07f2f4755c81464efa11a25a5ab9))
|
|
12
|
+
* 文字分段样式增加lineHeightByPx描述实际px行高字段 ([0cd8111](https://github.com/mastergo-design/plugin-typings/commit/0cd81114b45304f0363f6f05a4a0a84ea8a9208f))
|
|
13
|
+
* 修改返回值类型 ([eb71a36](https://github.com/mastergo-design/plugin-typings/commit/eb71a36444ff1c2f714d686ac7476579a4fe0a23))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.10.2](https://github.com/mastergo-design/plugin-typings/compare/v1.10.0...v1.10.2) (2022-12-13)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* 添加mg.mixed ([8196894](https://github.com/mastergo-design/plugin-typings/commit/8196894b5ad35214319dc311a52e1c441e36bc35))
|
|
23
|
+
* 废弃teamLibrary, 换成getTeamLibraryAsync([ffecaa](https://github.com/mastergo-design/plugin-typings/commit/ffecaaf8fae47530e75b818a7918716b4170a984))
|
|
24
|
+
|
|
25
|
+
|
|
1
26
|
# [1.10.0](https://github.com/mastergo-design/plugin-typings/compare/v1.9.0...v1.10.0) (2022-12-01)
|
|
2
27
|
|
|
3
28
|
|
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
|
|
@@ -57,6 +59,7 @@ declare global {
|
|
|
57
59
|
showUI(html: string, options?: ShowUIOptions): void
|
|
58
60
|
|
|
59
61
|
getNodeById(id: string): SceneNode | null
|
|
62
|
+
getNodeByPosition(position: {x: number, y: number}): SceneNode | null
|
|
60
63
|
createRectangle(): RectangleNode
|
|
61
64
|
createLine(): LineNode
|
|
62
65
|
createEllipse(): EllipseNode
|
|
@@ -108,13 +111,17 @@ declare global {
|
|
|
108
111
|
createImage(imageData: Uint8Array): Promise<Image>
|
|
109
112
|
getImageByHref(href: string): Image
|
|
110
113
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
teamLibrary: TeamLibrary,
|
|
114
|
+
|
|
115
|
+
getTeamLibraryAsync(): Promise<TeamLibrary>,
|
|
115
116
|
importComponentByKeyAsync(ukey: string): Promise<ComponentNode>,
|
|
116
117
|
importComponentSetByKeyAsync(ukey: string): Promise<ComponentSetNode>,
|
|
117
118
|
importStyleByKeyAsync(ukey: string): Promise<Style>,
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated
|
|
121
|
+
*
|
|
122
|
+
* This attribute is deprecated, please use getTeamLibraryAsync instead.
|
|
123
|
+
*/
|
|
124
|
+
teamLibrary: TeamLibrary,
|
|
118
125
|
|
|
119
126
|
hexToRGBA(hex: string): RGBA
|
|
120
127
|
RGBAToHex(rgba: RGBA): string
|
|
@@ -225,6 +232,7 @@ declare global {
|
|
|
225
232
|
fontSize: number
|
|
226
233
|
letterSpacing: LetterSpacing
|
|
227
234
|
lineHeight: LineHeight
|
|
235
|
+
lineHeightByPx: number
|
|
228
236
|
textDecoration: TextDecoration
|
|
229
237
|
textCase: TextCase
|
|
230
238
|
fontWeight: number
|
|
@@ -439,7 +447,7 @@ declare global {
|
|
|
439
447
|
|
|
440
448
|
interface BaseNodeMixin {
|
|
441
449
|
readonly id: string
|
|
442
|
-
readonly parent: (BaseNode & ChildrenMixin) |
|
|
450
|
+
readonly parent: (BaseNode & ChildrenMixin) | null
|
|
443
451
|
name: string
|
|
444
452
|
removed: boolean
|
|
445
453
|
remove(): void
|
|
@@ -568,7 +576,7 @@ declare global {
|
|
|
568
576
|
interface CornerMixin {
|
|
569
577
|
// 待确认
|
|
570
578
|
cornerSmooth: number
|
|
571
|
-
cornerRadius: number |
|
|
579
|
+
cornerRadius: number | PluginAPI['mixed']
|
|
572
580
|
}
|
|
573
581
|
|
|
574
582
|
interface DefaultShapeMixin
|