@mastergo/plugin-typings 1.11.0 → 1.12.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 CHANGED
@@ -1,3 +1,13 @@
1
+ # [1.12.0](https://github.com/mastergo-design/plugin-typings/compare/v1.11.0...v1.12.0) (2022-12-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * 类型优化,添加ui.viewport和ui.moveTo ([8fc66ea](https://github.com/mastergo-design/plugin-typings/commit/8fc66eaa0da1992256b90cc8ce9ad93f5fe53766))
7
+ * 修改ui可视属性字段名 ([6cd233d](https://github.com/mastergo-design/plugin-typings/commit/6cd233dc6fb3e8b310bfd4cfb3bdfee5a0c1142c))
8
+
9
+
10
+
1
11
  # [1.11.0](https://github.com/mastergo-design/plugin-typings/compare/v1.10.2...v1.11.0) (2022-12-15)
2
12
 
3
13
 
package/dist/index.d.ts CHANGED
@@ -127,12 +127,7 @@ declare global {
127
127
  RGBAToHex(rgba: RGBA): string
128
128
  }
129
129
 
130
- interface Rect {
131
- readonly x: number
132
- readonly y: number
133
- readonly width: number
134
- readonly height: number
135
- }
130
+ interface Rect extends Readonly<Bound> {}
136
131
 
137
132
  interface ViewportAPI {
138
133
  center: Vector
@@ -181,12 +176,18 @@ declare global {
181
176
  type?: 'normal' | 'highlight' | 'error' | 'warning' | 'success'
182
177
  }
183
178
 
179
+ interface UIViewport extends Bound {
180
+ headerHeight: number
181
+ visible: boolean
182
+ }
183
+
184
184
  interface UIAPI {
185
185
  show(): void
186
186
  hide(): void
187
187
  close(): void
188
188
  resize(width: number, height: number): void
189
-
189
+ moveTo(x: number, y: number): void
190
+ viewport: UIViewport
190
191
  postMessage(pluginMessage: any, origin?: string): void
191
192
  onmessage: ((pluginMessage: any, origin: string) => void) | undefined
192
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastergo/plugin-typings",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "MasterGo插件API声明文件",
5
5
  "main": "",
6
6
  "types": "dist/index.d.ts",