@mastergo/plugin-typings 2.13.2-beta.10 → 2.14.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +9 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1272,11 +1272,9 @@ declare global {
1272
1272
  createImage(imageData: Uint8Array, isSync?: boolean): Promise<Image>
1273
1273
  getImageByHref(href: string): Image
1274
1274
  /**
1275
- * 导出多个图层组成的png图片
1276
- * @param layerIds 图层id数组
1277
- * @param scale 缩放比例
1275
+ * 导出多个图层组成的png图片, 可过滤图层id,设置导出图片的缩放倍率
1278
1276
  */
1279
- exportPngByLayerIds(layerIds: string[], scale?: number): string
1277
+ exportPng(params: GlobalExportPngSetting): string;
1280
1278
  /**
1281
1279
  * 导出多个图层组成的svg图片
1282
1280
  * @param layerIds 图层id数组
@@ -1308,6 +1306,12 @@ declare global {
1308
1306
  ) => void
1309
1307
  }
1310
1308
 
1309
+ interface GlobalExportPngSetting {
1310
+ ids?: string[];
1311
+ filterIds?: string[];
1312
+ scale?: number;
1313
+ }
1314
+
1311
1315
  interface User {
1312
1316
  id: string | null
1313
1317
  name: string | 'Anonymous'
@@ -1397,6 +1401,7 @@ declare global {
1397
1401
  exportSettings: ReadonlyArray<ExportSettings>
1398
1402
  export(settings?: ExportSettings): Uint8Array | string // Defaults to PNG format
1399
1403
  exportAsync(settings?: ExportSettings): Promise<Uint8Array | string>
1404
+ exportPng(settings?: Omit<GlobalExportPngSetting, 'ids'>): string
1400
1405
  }
1401
1406
 
1402
1407
  interface NotifyOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "2.13.2-beta.10",
3
+ "version": "2.14.0-beta.0",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "type": "module",
6
6
  "main": "",