@mastergo/plugin-typings 1.7.2 → 1.9.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 +586 -0
- package/dist/index.d.ts +56 -18
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
# [1.9.0](https://github.com/mastergo-design/plugin-typings/compare/v1.8.0...v1.9.0) (2022-11-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 修复ComponentPropertyDefinitions类型不清晰的问题 ([dd8ad00](https://github.com/mastergo-design/plugin-typings/commit/dd8ad0049e2edfe48c18118991f15f0f97b90f87))
|
|
7
|
+
* 修复variantProperties类型不清晰问题 ([1da5b1d](https://github.com/mastergo-design/plugin-typings/commit/1da5b1dc57f3ad8b2116523e03e62165084d0453))
|
|
8
|
+
* 移除BooleanOperationNode, ComponentSetNode, InstanceNode无效的appendChild, insertChild方法 ([c3da0cd](https://github.com/mastergo-design/plugin-typings/commit/c3da0cdc00eb37728f816a05dbcd81fb4dd256b6))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* 添加flatten和rescale接口 ([dc87721](https://github.com/mastergo-design/plugin-typings/commit/dc87721478c725285e3e903beab045c6f175360c))
|
|
14
|
+
* 图层新增翻转接口/新增findAllWithCriteria接口/全局创建组件和创建容器方法新增可选参数 ([a318458](https://github.com/mastergo-design/plugin-typings/commit/a318458714cadf0e1c16613c73b3d77f866a3b70))
|
|
15
|
+
* 新增setRangeTextStyleId设置分段文字样式 ([7cd5e9c](https://github.com/mastergo-design/plugin-typings/commit/7cd5e9c59cc54a63f2c0a22cf992dcce5b2184ea))
|
|
16
|
+
* 与group等接口统一类型 ([4107784](https://github.com/mastergo-design/plugin-typings/commit/410778431defb243d3cc3a191d5fb9790f5ea26e))
|
|
17
|
+
* textNode增加setRangeFillStyleId ([f03314b](https://github.com/mastergo-design/plugin-typings/commit/f03314b1e32eb9c327b31ac487dbcb3148781da4))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# [1.8.0](https://github.com/mastergo-design/plugin-typings/compare/v1.7.1...v1.8.0) (2022-11-18)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* 添加clientStorage的deleteAsync和keysAsync方法 ([481d020](https://github.com/mastergo-design/plugin-typings/commit/481d020c0d7816ebab85290b5b36437474f30761))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [1.7.1](https://github.com/mastergo-design/plugin-typings/compare/v1.7.0...v1.7.1) (2022-11-16)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# [1.7.0](https://github.com/mastergo-design/plugin-typings/compare/v1.6.1...v1.7.0) (2022-11-11)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* 删除PageNode不存在的pluginData相关接口 ([6bf26d0](https://github.com/mastergo-design/plugin-typings/commit/6bf26d0957859516e02b3a49b4ebae42fe2810f8))
|
|
40
|
+
* 修复Document findAll和findOne入参出参类型错误问题 ([4576d99](https://github.com/mastergo-design/plugin-typings/commit/4576d998fa9f2c65cd37587ec3f2ef11e1c23654))
|
|
41
|
+
* 修复DocumentNode类型错误问题 ([b34511e](https://github.com/mastergo-design/plugin-typings/commit/b34511ed489d9e20b78b6bc25de9d14f126b5ea6))
|
|
42
|
+
* 修复export接口返回类型错误问题 ([8760817](https://github.com/mastergo-design/plugin-typings/commit/87608176944225bc69e27587772b42bbde2ca246))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* 添加ShowUIOptions.x, ShowUIOption.y ([298e252](https://github.com/mastergo-design/plugin-typings/commit/298e252bfc655245d6829d7598dd54f8d52e92dd))
|
|
48
|
+
* 新增teamLibrary, importComponentByKeyAsync, importComponentSetByKeyAsync, importStyleByKeyAsync等团队库接口 ([8a59a5c](https://github.com/mastergo-design/plugin-typings/commit/8a59a5cc5991fe6b2e0a7b4626d355fc90070135))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# 1.6.1 (2022-11-09)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* viewport增加rulerVisible控制标识显示和layoutGridVisible控制布局网格展示
|
|
58
|
+
增加resizeToFit()让容器图层缩放到和内容尺寸一致
|
|
59
|
+
增加文字列表样式listStyle ([2d22357](https://github.com/mastergo-design/plugin-typings/commit/2d22357015b51c5f80efc33c8dcfbd32d1504cf2))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# [1.5.0] (2022-10-18)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* 添加command、run
|
|
69
|
+
|
|
70
|
+
# [1.4.0] (2022-10-13)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Features
|
|
74
|
+
|
|
75
|
+
* 调整changelog
|
|
76
|
+
* 连接线增加bound
|
|
77
|
+
* 限定master
|
|
78
|
+
* 修复loadFontAsync的返回类型错误问题
|
|
79
|
+
* 移除test
|
|
80
|
+
* 增加锁定比例字段
|
|
81
|
+
* 增加自动布局相关定义
|
|
82
|
+
* 增加ignore
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# [1.3.0] (2022-09-30)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
|
|
90
|
+
* 连接线增加bound
|
|
91
|
+
* 修复loadFontAsync的返回类型错误问题
|
|
92
|
+
* 增加锁定比例字段
|
|
93
|
+
* 增加自动布局相关定义
|
|
94
|
+
|
|
95
|
+
# [1.1.0] (2022-09-16)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
* 限制连接线的strokeAlign为center
|
|
101
|
+
* 修复connector的strokeAlign可写的bug
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* 添加textcase类型
|
|
107
|
+
* 完善连接点类型
|
|
108
|
+
* 移除超链接,等待接入新版
|
|
109
|
+
* 移除createText参数
|
|
110
|
+
* 增加connector类型typings
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# [1.0.0] (2022-09-02)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Bug Fixes
|
|
118
|
+
|
|
119
|
+
* 修复strokeStyle type错误问题
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### Features
|
|
123
|
+
|
|
124
|
+
* 补充lineNode strokeCap
|
|
125
|
+
* 补充scaleMode
|
|
126
|
+
* 更新package设置及readme
|
|
127
|
+
* 整理npm包,移除工具函数
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
# [1.0.0] (2022-09-02)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Bug Fixes
|
|
135
|
+
|
|
136
|
+
* 修复strokeStyle type错误问题
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Features
|
|
140
|
+
|
|
141
|
+
* 补充lineNode strokeCap
|
|
142
|
+
* 补充scaleMode
|
|
143
|
+
* 更新package设置及readme
|
|
144
|
+
* 整理npm包,移除工具函数
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# [1.0.0] (2022-09-02)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Bug Fixes
|
|
152
|
+
|
|
153
|
+
* 修复strokeStyle type错误问题
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Features
|
|
157
|
+
|
|
158
|
+
* 补充lineNode strokeCap
|
|
159
|
+
* 补充scaleMode
|
|
160
|
+
* 更新package设置及readme
|
|
161
|
+
* 整理npm包,移除工具函数
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# [1.1.0] (2022-09-02)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
|
|
170
|
+
* 修复strokeStyle type错误问题
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Features
|
|
174
|
+
|
|
175
|
+
* 补充lineNode strokeCap
|
|
176
|
+
* 补充scaleMode
|
|
177
|
+
* 更新package设置及readme
|
|
178
|
+
* 整理npm包,移除工具函数
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
# [0.4.0] (2022-07-22)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### Bug Fixes
|
|
186
|
+
|
|
187
|
+
* 修复booleanoperation的type错误
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Features
|
|
191
|
+
|
|
192
|
+
* 添加单边描边类型
|
|
193
|
+
* 增加获取自定义样式列表接口
|
|
194
|
+
* 增加document name 属性
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## [0.3.1] (2022-07-08)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
# [0.3.0] (2022-07-08)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
# [0.3.0] (2022-07-08)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
# [0.2.0] (2022-07-01)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
# [0.27.0] (2022-01-25)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Features
|
|
218
|
+
|
|
219
|
+
* new mg api
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## [0.26.1] (2021-12-23)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
# [0.26.0] (2021-12-23)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### Features
|
|
231
|
+
|
|
232
|
+
* 添加颜色转换函数
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## [0.25.1] (2021-12-23)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
# [0.25.0] (2021-12-22)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### Features
|
|
244
|
+
|
|
245
|
+
* 添加 paint 工具函数
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
# [0.24.0] (2021-12-21)
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### Features
|
|
253
|
+
|
|
254
|
+
* add useAbsoluteBounds for ExportSettings
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## [0.23.1] (2021-12-21)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Features
|
|
262
|
+
|
|
263
|
+
* add visible option for ShowUIOptions
|
|
264
|
+
* update
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
# [0.23.0] (2021-12-21)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Features
|
|
272
|
+
|
|
273
|
+
* add relativeTransform
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
## [0.22.1] (2021-12-20)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
# [0.22.0] (2021-11-30)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### Bug Fixes
|
|
285
|
+
|
|
286
|
+
* change showUI interface
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# [0.21.0] (2021-11-17)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
### Features
|
|
294
|
+
|
|
295
|
+
* add text superlink interfacee
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
# [0.20.0] (2021-11-17)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
### Bug Fixes
|
|
303
|
+
|
|
304
|
+
* fix notify
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# [0.19.0] (2021-11-17)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Bug Fixes
|
|
312
|
+
|
|
313
|
+
* fix notify interface
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# [0.18.0] (2021-11-17)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
### Bug Fixes
|
|
321
|
+
|
|
322
|
+
* remove useless imagePaint properties
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
# [0.17.0] (2021-11-17)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
### Features
|
|
330
|
+
|
|
331
|
+
* add image interface and createImage
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
# [0.16.0] (2021-11-09)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### Bug Fixes
|
|
339
|
+
|
|
340
|
+
* setRangeTextDecoration
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
# [0.15.0] (2021-11-09)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
### Bug Fixes
|
|
348
|
+
|
|
349
|
+
* setRangeLineHeight
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
# [0.14.0] (2021-11-09)
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
### Bug Fixes
|
|
357
|
+
|
|
358
|
+
* lineheight
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
# [0.13.0] (2021-11-09)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
### Bug Fixes
|
|
366
|
+
|
|
367
|
+
* range letterspacing
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
# [0.12.0] (2021-11-09)
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### Bug Fixes
|
|
375
|
+
|
|
376
|
+
* text setRangeFont
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### Features
|
|
380
|
+
|
|
381
|
+
* add removed
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
# [0.22.0] (2021-11-30)
|
|
386
|
+
|
|
387
|
+
### Bug Fixes
|
|
388
|
+
|
|
389
|
+
- change showUI interface
|
|
390
|
+
|
|
391
|
+
# [0.21.0] (2021-11-17)
|
|
392
|
+
|
|
393
|
+
### Features
|
|
394
|
+
|
|
395
|
+
- add text superlink interfacee
|
|
396
|
+
|
|
397
|
+
# [0.20.0] (2021-11-17)
|
|
398
|
+
|
|
399
|
+
### Bug Fixes
|
|
400
|
+
|
|
401
|
+
- fix notify
|
|
402
|
+
|
|
403
|
+
# [0.19.0] (2021-11-17)
|
|
404
|
+
|
|
405
|
+
### Bug Fixes
|
|
406
|
+
|
|
407
|
+
- fix notify interface
|
|
408
|
+
|
|
409
|
+
# [0.18.0] (2021-11-17)
|
|
410
|
+
|
|
411
|
+
### Bug Fixes
|
|
412
|
+
|
|
413
|
+
- remove useless imagePaint properties
|
|
414
|
+
|
|
415
|
+
# [0.17.0] (2021-11-17)
|
|
416
|
+
|
|
417
|
+
### Features
|
|
418
|
+
|
|
419
|
+
- add image interface and createImage
|
|
420
|
+
|
|
421
|
+
# [0.16.0] (2021-11-09)
|
|
422
|
+
|
|
423
|
+
### Bug Fixes
|
|
424
|
+
|
|
425
|
+
- setRangeTextDecoration
|
|
426
|
+
|
|
427
|
+
# [0.15.0] (2021-11-09)
|
|
428
|
+
|
|
429
|
+
### Bug Fixes
|
|
430
|
+
|
|
431
|
+
- setRangeLineHeight
|
|
432
|
+
|
|
433
|
+
# [0.14.0] (2021-11-09)
|
|
434
|
+
|
|
435
|
+
### Bug Fixes
|
|
436
|
+
|
|
437
|
+
- lineheight
|
|
438
|
+
|
|
439
|
+
# [0.13.0] (2021-11-09)
|
|
440
|
+
|
|
441
|
+
### Bug Fixes
|
|
442
|
+
|
|
443
|
+
- range letterspacing
|
|
444
|
+
|
|
445
|
+
# [0.12.0] (2021-11-09)
|
|
446
|
+
|
|
447
|
+
### Bug Fixes
|
|
448
|
+
|
|
449
|
+
- text setRangeFont
|
|
450
|
+
|
|
451
|
+
# [0.11.0] (2021-11-04)
|
|
452
|
+
|
|
453
|
+
### Features
|
|
454
|
+
|
|
455
|
+
- add removed
|
|
456
|
+
|
|
457
|
+
# [0.10.0] (2021-11-02)
|
|
458
|
+
|
|
459
|
+
## [0.9.1] (2021-10-28)
|
|
460
|
+
|
|
461
|
+
### Features
|
|
462
|
+
|
|
463
|
+
- 补充组件与实例相关接口
|
|
464
|
+
|
|
465
|
+
# [0.9.0] (2021-10-28)
|
|
466
|
+
|
|
467
|
+
### Features
|
|
468
|
+
|
|
469
|
+
- 文本节点相关接口类型
|
|
470
|
+
|
|
471
|
+
## [0.8.1] (2021-10-27)
|
|
472
|
+
|
|
473
|
+
### Features
|
|
474
|
+
|
|
475
|
+
- 字体加载 api
|
|
476
|
+
|
|
477
|
+
# [0.8.0] (2021-10-27)
|
|
478
|
+
|
|
479
|
+
### Features
|
|
480
|
+
|
|
481
|
+
- 添加 clone() 类型
|
|
482
|
+
|
|
483
|
+
## [0.7.1] (2021-10-26)
|
|
484
|
+
|
|
485
|
+
### Bug Fixes
|
|
486
|
+
|
|
487
|
+
- BlurEffect 增加 blendMode
|
|
488
|
+
|
|
489
|
+
# [0.7.0] (2021-10-26)
|
|
490
|
+
|
|
491
|
+
### Features
|
|
492
|
+
|
|
493
|
+
- 补充样式相关的 api
|
|
494
|
+
|
|
495
|
+
## [0.6.1] (2021-10-18)
|
|
496
|
+
|
|
497
|
+
### Features
|
|
498
|
+
|
|
499
|
+
- 支持 flexGrow 和 alignSelf
|
|
500
|
+
|
|
501
|
+
# [0.6.0] (2021-10-11)
|
|
502
|
+
|
|
503
|
+
### Features
|
|
504
|
+
|
|
505
|
+
- support ui.notify() & mastergo.saveVersionHistoryAsync
|
|
506
|
+
|
|
507
|
+
# [0.5.0] (2021-10-09)
|
|
508
|
+
|
|
509
|
+
### Features
|
|
510
|
+
|
|
511
|
+
- auto layout
|
|
512
|
+
|
|
513
|
+
## [0.4.9] (2021-09-28)
|
|
514
|
+
|
|
515
|
+
### Bug Fixes
|
|
516
|
+
|
|
517
|
+
- some tweak
|
|
518
|
+
|
|
519
|
+
## [0.4.8] (2021-09-26)
|
|
520
|
+
|
|
521
|
+
### Bug Fixes
|
|
522
|
+
|
|
523
|
+
- export typings
|
|
524
|
+
|
|
525
|
+
## [0.4.7] (2021-09-24)
|
|
526
|
+
|
|
527
|
+
### Bug Fixes
|
|
528
|
+
|
|
529
|
+
- rename bound to bounds
|
|
530
|
+
|
|
531
|
+
## [0.4.6] (2021-09-24)
|
|
532
|
+
|
|
533
|
+
### Bug Fixes
|
|
534
|
+
|
|
535
|
+
- the type of ui.onmessage
|
|
536
|
+
|
|
537
|
+
## [0.4.5] (2021-09-24)
|
|
538
|
+
|
|
539
|
+
### Bug Fixes
|
|
540
|
+
|
|
541
|
+
- tweak the type of ui.postMessage
|
|
542
|
+
|
|
543
|
+
## [0.4.4] (2021-09-23)
|
|
544
|
+
|
|
545
|
+
### Bug Fixes
|
|
546
|
+
|
|
547
|
+
- the off type
|
|
548
|
+
- types
|
|
549
|
+
|
|
550
|
+
## [0.4.3] (2021-09-23)
|
|
551
|
+
|
|
552
|
+
### Bug Fixes
|
|
553
|
+
|
|
554
|
+
- PageNode's children should be SceneNode
|
|
555
|
+
|
|
556
|
+
## [0.4.2] (2021-09-23)
|
|
557
|
+
|
|
558
|
+
### Bug Fixes
|
|
559
|
+
|
|
560
|
+
- tweak typings
|
|
561
|
+
|
|
562
|
+
## [0.4.1] (2021-09-22)
|
|
563
|
+
|
|
564
|
+
### Bug Fixes
|
|
565
|
+
|
|
566
|
+
- upgrade layout mixin
|
|
567
|
+
|
|
568
|
+
# [0.4.0] (2021-09-22)
|
|
569
|
+
|
|
570
|
+
### Features
|
|
571
|
+
|
|
572
|
+
- support children methods
|
|
573
|
+
|
|
574
|
+
# [0.3.0] (2021-09-17)
|
|
575
|
+
|
|
576
|
+
### Features
|
|
577
|
+
|
|
578
|
+
- support some methods
|
|
579
|
+
|
|
580
|
+
# [0.2.0] (2021-09-17)
|
|
581
|
+
|
|
582
|
+
### Bug Fixes
|
|
583
|
+
|
|
584
|
+
- concat dts
|
|
585
|
+
|
|
586
|
+
# 0.1.0 (2021-09-17)
|
package/dist/index.d.ts
CHANGED
|
@@ -64,8 +64,8 @@ declare global {
|
|
|
64
64
|
createStar(): StarNode
|
|
65
65
|
createPen(): PenNode
|
|
66
66
|
createText(): TextNode
|
|
67
|
-
createFrame(): FrameNode
|
|
68
|
-
createComponent(): ComponentNode
|
|
67
|
+
createFrame(children?: SceneNode[]): FrameNode
|
|
68
|
+
createComponent(children?: SceneNode[]): ComponentNode
|
|
69
69
|
createPage(): PageNode
|
|
70
70
|
createSlice(): SliceNode
|
|
71
71
|
createConnector(): ConnectorNode
|
|
@@ -73,13 +73,18 @@ declare global {
|
|
|
73
73
|
|
|
74
74
|
getHoverLayer(): PageNode | SceneNode
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated
|
|
78
|
+
* This function is deprecated, please use viewport.layoutGridVisible instead.
|
|
79
|
+
*/
|
|
76
80
|
showGrid(show: boolean): void
|
|
77
81
|
|
|
78
|
-
group(children:
|
|
79
|
-
union(children:
|
|
80
|
-
subtract(children:
|
|
81
|
-
intersect(children:
|
|
82
|
-
exclude(children:
|
|
82
|
+
group(children: SceneNode[]): GroupNode
|
|
83
|
+
union(children: SceneNode[]): BooleanOperationNode
|
|
84
|
+
subtract(children: SceneNode[]): BooleanOperationNode
|
|
85
|
+
intersect(children: SceneNode[]): BooleanOperationNode
|
|
86
|
+
exclude(children: SceneNode[]): BooleanOperationNode
|
|
87
|
+
flatten(nodes: SceneNode[]): PenNode
|
|
83
88
|
|
|
84
89
|
saveVersionHistoryAsync(desc: string): Promise<void>
|
|
85
90
|
|
|
@@ -109,7 +114,7 @@ declare global {
|
|
|
109
114
|
teamLibrary: TeamLibrary,
|
|
110
115
|
importComponentByKeyAsync(ukey: string): Promise<ComponentNode>,
|
|
111
116
|
importComponentSetByKeyAsync(ukey: string): Promise<ComponentSetNode>,
|
|
112
|
-
importStyleByKeyAsync(ukey: string): Promise<
|
|
117
|
+
importStyleByKeyAsync(ukey: string): Promise<Style>,
|
|
113
118
|
|
|
114
119
|
hexToRGBA(hex: string): RGBA
|
|
115
120
|
RGBAToHex(rgba: RGBA): string
|
|
@@ -128,12 +133,14 @@ declare global {
|
|
|
128
133
|
readonly bound: Rect
|
|
129
134
|
rulerVisible: boolean
|
|
130
135
|
layoutGridVisible: boolean
|
|
131
|
-
scrollAndZoomIntoView(nodes:
|
|
136
|
+
scrollAndZoomIntoView(nodes: SceneNode[]): void
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
interface ClientStorageAPI {
|
|
135
140
|
getAsync(key: string): Promise<any | undefined>
|
|
136
141
|
setAsync(key: string, value: any): Promise<void>
|
|
142
|
+
deleteAsync(key: string): Promise<void>
|
|
143
|
+
keysAsync(): Promise<string[]>
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
type ShowUIOptions = {
|
|
@@ -295,7 +302,6 @@ declare global {
|
|
|
295
302
|
readonly color: RGBA
|
|
296
303
|
// Effect的 x, y;
|
|
297
304
|
readonly offset: Vector
|
|
298
|
-
// spread和radius待确定
|
|
299
305
|
readonly spread: number
|
|
300
306
|
readonly radius: number
|
|
301
307
|
readonly isVisible: boolean
|
|
@@ -461,6 +467,7 @@ declare global {
|
|
|
461
467
|
|
|
462
468
|
findAll(callback?: (node: SceneNode) => boolean): ReadonlyArray<SceneNode>
|
|
463
469
|
findOne(callback: (node: SceneNode) => boolean): SceneNode | null
|
|
470
|
+
findAllWithCriteria<T extends NodeType[]>(criteria: { types: T }): Array<{ type: T[number] } & SceneNode>
|
|
464
471
|
}
|
|
465
472
|
|
|
466
473
|
interface ConstraintMixin {
|
|
@@ -474,6 +481,12 @@ declare global {
|
|
|
474
481
|
height: number
|
|
475
482
|
}
|
|
476
483
|
|
|
484
|
+
type ScaleCenter = 'TOPLEFT' | 'TOP' | 'TOPRIGHT' | 'LEFT' | 'CENTER' | 'RIGHT' | 'BOTTOMLEFT' | 'BOTTOM' | 'BOTTOMRIGHT'
|
|
485
|
+
|
|
486
|
+
interface ScaleOption {
|
|
487
|
+
scaleCenter?: ScaleCenter
|
|
488
|
+
}
|
|
489
|
+
|
|
477
490
|
interface LayoutMixin {
|
|
478
491
|
absoluteTransform: Transform
|
|
479
492
|
relativeTransform: Transform
|
|
@@ -487,6 +500,8 @@ declare global {
|
|
|
487
500
|
layoutPositioning: 'AUTO' | 'ABSOLUTE' // applicable only inside auto-layout frames
|
|
488
501
|
alignSelf: 'STRETCH' | 'INHERIT' // applicable only inside auto-layout frames
|
|
489
502
|
flexGrow: 0 | 1 // applicable only inside auto-layout frames
|
|
503
|
+
rescale(scale: number, scaleOption?: ScaleOption): void
|
|
504
|
+
flip(direction: 'VERTICAL' | 'HORIZONTAL'): void
|
|
490
505
|
}
|
|
491
506
|
|
|
492
507
|
interface BlendMixin {
|
|
@@ -681,6 +696,7 @@ declare global {
|
|
|
681
696
|
|
|
682
697
|
findAll(callback?: (node: SceneNode) => boolean): ReadonlyArray<SceneNode>
|
|
683
698
|
findOne(callback: (node: SceneNode) => boolean): SceneNode | null
|
|
699
|
+
findAllWithCriteria<T extends NodeType[]>(criteria: { types: T }): Array<{ type: T[number] } & SceneNode>
|
|
684
700
|
}
|
|
685
701
|
|
|
686
702
|
interface PageNode
|
|
@@ -794,7 +810,7 @@ declare global {
|
|
|
794
810
|
interface BooleanOperationNode
|
|
795
811
|
extends DefaultShapeMixin,
|
|
796
812
|
FrameContainerMixin,
|
|
797
|
-
ChildrenMixin,
|
|
813
|
+
Omit<ChildrenMixin, 'appendChild' | 'insertChild'>,
|
|
798
814
|
CornerMixin {
|
|
799
815
|
readonly type: 'BOOLEAN_OPERATION'
|
|
800
816
|
booleanOperation: 'UNION' | 'INTERSECT' | 'SUBTRACT' | 'EXCLUDE'
|
|
@@ -845,7 +861,7 @@ declare global {
|
|
|
845
861
|
readonly hasMissingFont: boolean
|
|
846
862
|
/**
|
|
847
863
|
* @deprecated
|
|
848
|
-
* This attribute is
|
|
864
|
+
* This attribute is deprecated, please use hyperlinks instead.
|
|
849
865
|
*/
|
|
850
866
|
readonly superlinks: Array<Superlink>
|
|
851
867
|
readonly hyperlinks: Array<HyperlinkWithRange>
|
|
@@ -876,26 +892,43 @@ declare global {
|
|
|
876
892
|
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
877
893
|
/**
|
|
878
894
|
* @deprecated
|
|
879
|
-
* This function is
|
|
895
|
+
* This function is deprecated, please use setRangeHyperlink instead.
|
|
880
896
|
*/
|
|
881
897
|
setRangeSuperLink(start: number, end: number, link: string | null): void
|
|
882
898
|
setRangeHyperlink(start: number, end: number, hyperlink: Hyperlink | null): void
|
|
883
899
|
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
884
900
|
setRangeListStyle(start: number, end: number, type: 'ORDERED' | 'BULLETED' | 'NONE'): void
|
|
901
|
+
|
|
902
|
+
setRangeFillStyleId(start: number, end: number, fillStyleId: string): void
|
|
903
|
+
setRangeTextStyleId(start: number, end: number, textStyleId: string): void
|
|
885
904
|
}
|
|
886
905
|
|
|
887
906
|
interface ComponentNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin, PublishableMixin {
|
|
888
907
|
readonly type: 'COMPONENT'
|
|
889
|
-
readonly variantProperties: Array<
|
|
908
|
+
readonly variantProperties: Array<VariantProperty> | undefined
|
|
890
909
|
setVariantPropertyValues(property: Record<string, string>): void
|
|
891
910
|
clone(): ComponentNode
|
|
892
911
|
createInstance(): InstanceNode
|
|
893
912
|
resizeToFit(): void
|
|
894
913
|
}
|
|
895
914
|
|
|
896
|
-
|
|
915
|
+
|
|
916
|
+
type VariantMixin = {
|
|
917
|
+
property: string
|
|
918
|
+
type: 'variant'
|
|
919
|
+
values: string[]
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
interface VariantProperty {
|
|
923
|
+
property: string
|
|
924
|
+
value: string
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
type ComponentPropertyDefinitions = Array<VariantMixin>
|
|
928
|
+
|
|
929
|
+
interface ComponentSetNode extends Omit<DefaultContainerMixin, 'appendChild' | 'insertChild'>, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin, PublishableMixin {
|
|
897
930
|
readonly type: 'COMPONENT_SET'
|
|
898
|
-
readonly componentPropertyDefinitions:
|
|
931
|
+
readonly componentPropertyDefinitions: ComponentPropertyDefinitions
|
|
899
932
|
clone(): ComponentSetNode
|
|
900
933
|
createVariantComponent(): void
|
|
901
934
|
createVariantProperties(properties: Array<string>): void
|
|
@@ -905,9 +938,9 @@ declare global {
|
|
|
905
938
|
resizeToFit(): void
|
|
906
939
|
}
|
|
907
940
|
|
|
908
|
-
interface InstanceNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
941
|
+
interface InstanceNode extends Omit<DefaultContainerMixin, 'appendChild' | 'insertChild'>, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
909
942
|
readonly type: 'INSTANCE'
|
|
910
|
-
readonly variantProperties: Array<
|
|
943
|
+
readonly variantProperties: Array<VariantProperty> | undefined
|
|
911
944
|
setVariantPropertyValues(property: Record<string, string>): void
|
|
912
945
|
clone(): InstanceNode
|
|
913
946
|
/**
|
|
@@ -969,6 +1002,11 @@ declare global {
|
|
|
969
1002
|
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
970
1003
|
setRangeHyperlink(start: number, end: number, hyperlink: Hyperlink | null): void
|
|
971
1004
|
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
1005
|
+
|
|
1006
|
+
setRangeListStyle(start: number, end: number, type: 'ORDERED' | 'BULLETED' | 'NONE'): void
|
|
1007
|
+
|
|
1008
|
+
setRangeFillStyleId(start: number, end: number, fillStyleId: string): void
|
|
1009
|
+
setRangeTextStyleId(start: number, end: number, textStyleId: string): void
|
|
972
1010
|
}
|
|
973
1011
|
|
|
974
1012
|
|