@mastergo/plugin-typings 2.18.0-beta.0 → 2.18.1
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/dist/index.d.ts +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1374,6 +1374,8 @@ declare global {
|
|
|
1374
1374
|
|
|
1375
1375
|
getNodeById<T extends SceneNode>(id: string): T | null
|
|
1376
1376
|
getNodeByPosition(position: { x: number; y: number }): SceneNode | null
|
|
1377
|
+
getRootNodeById<T extends SceneNode>(id: string): T | null
|
|
1378
|
+
getRootParentLayerId(id: string): string | null
|
|
1377
1379
|
createRectangle(): RectangleNode
|
|
1378
1380
|
createLine(): LineNode
|
|
1379
1381
|
createEllipse(): EllipseNode
|
|
@@ -1503,7 +1505,7 @@ declare global {
|
|
|
1503
1505
|
loadFontAsync(fontName: FontName): Promise<boolean>
|
|
1504
1506
|
createImage(imageData: Uint8Array, isSync?: boolean): Promise<Image>
|
|
1505
1507
|
getImageByHref(href: string): Image
|
|
1506
|
-
|
|
1508
|
+
|
|
1507
1509
|
/**
|
|
1508
1510
|
* 导出多个图层组成的png图片, 可过滤图层id,设置导出图片的缩放倍率
|
|
1509
1511
|
*/
|
|
@@ -1539,7 +1541,7 @@ declare global {
|
|
|
1539
1541
|
) => void
|
|
1540
1542
|
}
|
|
1541
1543
|
|
|
1542
|
-
interface GlobalExportPngSetting {
|
|
1544
|
+
interface GlobalExportPngSetting {
|
|
1543
1545
|
ids?: string[];
|
|
1544
1546
|
filterIds?: string[];
|
|
1545
1547
|
scale?: number;
|
|
@@ -2059,6 +2061,7 @@ declare global {
|
|
|
2059
2061
|
readonly alpha?: number
|
|
2060
2062
|
readonly blendMode?: BlendMode
|
|
2061
2063
|
readonly name?: string
|
|
2064
|
+
readonly colorStyleId: string
|
|
2062
2065
|
}
|
|
2063
2066
|
|
|
2064
2067
|
interface GradientPaint {
|
|
@@ -2077,6 +2080,7 @@ declare global {
|
|
|
2077
2080
|
readonly alpha?: number
|
|
2078
2081
|
readonly blendMode?: BlendMode
|
|
2079
2082
|
readonly name?: string
|
|
2083
|
+
readonly colorStyleId: string
|
|
2080
2084
|
}
|
|
2081
2085
|
|
|
2082
2086
|
interface ImageFilters {
|
|
@@ -2102,6 +2106,7 @@ declare global {
|
|
|
2102
2106
|
readonly name?: string
|
|
2103
2107
|
readonly ratio?: number
|
|
2104
2108
|
readonly rotation?: number
|
|
2109
|
+
readonly colorStyleId: string
|
|
2105
2110
|
}
|
|
2106
2111
|
|
|
2107
2112
|
type Paint = SolidPaint | GradientPaint | ImagePaint
|
|
@@ -2288,6 +2293,7 @@ declare global {
|
|
|
2288
2293
|
alignSelf: 'STRETCH' | 'INHERIT' // applicable only inside auto-layout frames
|
|
2289
2294
|
flexGrow: 0 | 1 // applicable only inside auto-layout frames
|
|
2290
2295
|
rescale(scale: number, scaleOption?: ScaleOption): void
|
|
2296
|
+
resize(width: number, height: number): void
|
|
2291
2297
|
scaleFactor: number // The default value is 1
|
|
2292
2298
|
flip(direction: 'VERTICAL' | 'HORIZONTAL'): void
|
|
2293
2299
|
}
|