assistsx-js 0.1.35 → 0.1.36

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.
@@ -14,8 +14,11 @@ export declare class Float {
14
14
  toast(text: string, delay?: number, timeout?: number): Promise<void>;
15
15
  /** Move floating window to x, y */
16
16
  move(x: number, y: number, timeout?: number): Promise<void>;
17
- /** Refresh floating window view config. Optional: width, height, x, y (omit to keep current) */
17
+ /** Refresh floating window view config. Optional: showTopOperationArea, showBottomOperationArea, backgroundColor, width, height, x, y (omit to keep current) */
18
18
  refresh(options?: {
19
+ showTopOperationArea?: boolean;
20
+ showBottomOperationArea?: boolean;
21
+ backgroundColor?: string | number;
19
22
  width?: number;
20
23
  height?: number;
21
24
  x?: number;
@@ -122,10 +122,16 @@ export class Float {
122
122
  throw new Error(this.errorMessage(res, "Float.move failed"));
123
123
  }
124
124
  }
125
- /** Refresh floating window view config. Optional: width, height, x, y (omit to keep current) */
125
+ /** Refresh floating window view config. Optional: showTopOperationArea, showBottomOperationArea, backgroundColor, width, height, x, y (omit to keep current) */
126
126
  async refresh(options = {}) {
127
- const { width, height, x, y, timeout } = options;
127
+ const { showTopOperationArea, showBottomOperationArea, backgroundColor, width, height, x, y, timeout, } = options;
128
128
  const args = {};
129
+ if (showTopOperationArea !== undefined)
130
+ args.showTopOperationArea = showTopOperationArea;
131
+ if (showBottomOperationArea !== undefined)
132
+ args.showBottomOperationArea = showBottomOperationArea;
133
+ if (backgroundColor !== undefined)
134
+ args.backgroundColor = backgroundColor;
129
135
  if (width !== undefined)
130
136
  args.width = width;
131
137
  if (height !== undefined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -189,12 +189,35 @@ export class Float {
189
189
  }
190
190
  }
191
191
 
192
- /** Refresh floating window view config. Optional: width, height, x, y (omit to keep current) */
192
+ /** Refresh floating window view config. Optional: showTopOperationArea, showBottomOperationArea, backgroundColor, width, height, x, y (omit to keep current) */
193
193
  async refresh(
194
- options: { width?: number; height?: number; x?: number; y?: number; timeout?: number } = {}
194
+ options: {
195
+ showTopOperationArea?: boolean;
196
+ showBottomOperationArea?: boolean;
197
+ backgroundColor?: string | number;
198
+ width?: number;
199
+ height?: number;
200
+ x?: number;
201
+ y?: number;
202
+ timeout?: number;
203
+ } = {}
195
204
  ): Promise<void> {
196
- const { width, height, x, y, timeout } = options;
197
- const args: Record<string, number | undefined> = {};
205
+ const {
206
+ showTopOperationArea,
207
+ showBottomOperationArea,
208
+ backgroundColor,
209
+ width,
210
+ height,
211
+ x,
212
+ y,
213
+ timeout,
214
+ } = options;
215
+ const args: Record<string, number | boolean | string | undefined> = {};
216
+ if (showTopOperationArea !== undefined)
217
+ args.showTopOperationArea = showTopOperationArea;
218
+ if (showBottomOperationArea !== undefined)
219
+ args.showBottomOperationArea = showBottomOperationArea;
220
+ if (backgroundColor !== undefined) args.backgroundColor = backgroundColor;
198
221
  if (width !== undefined) args.width = width;
199
222
  if (height !== undefined) args.height = height;
200
223
  if (x !== undefined) args.x = x;