assistsx-js 0.1.29 → 0.1.30

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.
@@ -38,11 +38,19 @@ export type AccessibilityEventListener = (event: AccessibilityEvent) => void;
38
38
  export interface WebFloatingWindowOptions {
39
39
  initialWidth?: number;
40
40
  initialHeight?: number;
41
+ /** Initial window X position (default 0) */
42
+ initialX?: number;
43
+ /** Initial window Y position (default 0) */
44
+ initialY?: number;
41
45
  minWidth?: number;
42
46
  minHeight?: number;
43
47
  maxWidth?: number;
44
48
  maxHeight?: number;
45
49
  initialCenter?: boolean;
50
+ /** Whether to show top operation area (title bar, close button, etc.) */
51
+ showTopOperationArea?: boolean;
52
+ /** Whether to show bottom operation area (zoom, back/forward/refresh, etc.) */
53
+ showBottomOperationArea?: boolean;
46
54
  }
47
55
  export declare const callbacks: Map<string, (data: string) => void>;
48
56
  export declare const accessibilityEventListeners: AccessibilityEventListener[];
package/dist/AssistsX.js CHANGED
@@ -240,17 +240,21 @@ export class AssistsX {
240
240
  return data.value;
241
241
  }
242
242
  static async loadWebViewOverlay(url, options = {}) {
243
- const { initialWidth, initialHeight, minWidth, minHeight, maxWidth, maxHeight, initialCenter, timeout, } = options;
243
+ const { initialWidth, initialHeight, initialX, initialY, minWidth, minHeight, maxWidth, maxHeight, initialCenter, showTopOperationArea, showBottomOperationArea, timeout, } = options;
244
244
  const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {
245
245
  args: {
246
246
  url,
247
247
  initialWidth,
248
248
  initialHeight,
249
+ initialX,
250
+ initialY,
249
251
  minWidth,
250
252
  minHeight,
251
253
  maxWidth,
252
254
  maxHeight,
253
255
  initialCenter,
256
+ showTopOperationArea,
257
+ showBottomOperationArea,
254
258
  },
255
259
  timeout,
256
260
  });
@@ -203,17 +203,21 @@ export class AssistsXAsync {
203
203
  return data.value;
204
204
  }
205
205
  static async loadWebViewOverlay(url, options = {}) {
206
- const { initialWidth, initialHeight, minWidth, minHeight, maxWidth, maxHeight, initialCenter, timeout, } = options;
206
+ const { initialWidth, initialHeight, initialX, initialY, minWidth, minHeight, maxWidth, maxHeight, initialCenter, showTopOperationArea, showBottomOperationArea, timeout, } = options;
207
207
  const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {
208
208
  args: {
209
209
  url,
210
210
  initialWidth,
211
211
  initialHeight,
212
+ initialX,
213
+ initialY,
212
214
  minWidth,
213
215
  minHeight,
214
216
  maxWidth,
215
217
  maxHeight,
216
218
  initialCenter,
219
+ showTopOperationArea,
220
+ showBottomOperationArea,
217
221
  },
218
222
  timeout,
219
223
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/AssistsX.ts CHANGED
@@ -44,11 +44,19 @@ export type AccessibilityEventListener = (event: AccessibilityEvent) => void;
44
44
  export interface WebFloatingWindowOptions {
45
45
  initialWidth?: number;
46
46
  initialHeight?: number;
47
+ /** Initial window X position (default 0) */
48
+ initialX?: number;
49
+ /** Initial window Y position (default 0) */
50
+ initialY?: number;
47
51
  minWidth?: number;
48
52
  minHeight?: number;
49
53
  maxWidth?: number;
50
54
  maxHeight?: number;
51
55
  initialCenter?: boolean;
56
+ /** Whether to show top operation area (title bar, close button, etc.) */
57
+ showTopOperationArea?: boolean;
58
+ /** Whether to show bottom operation area (zoom, back/forward/refresh, etc.) */
59
+ showBottomOperationArea?: boolean;
52
60
  }
53
61
 
54
62
  // 回调函数存储对象
@@ -336,11 +344,15 @@ export class AssistsX {
336
344
  const {
337
345
  initialWidth,
338
346
  initialHeight,
347
+ initialX,
348
+ initialY,
339
349
  minWidth,
340
350
  minHeight,
341
351
  maxWidth,
342
352
  maxHeight,
343
353
  initialCenter,
354
+ showTopOperationArea,
355
+ showBottomOperationArea,
344
356
  timeout,
345
357
  } = options;
346
358
  const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {
@@ -348,11 +360,15 @@ export class AssistsX {
348
360
  url,
349
361
  initialWidth,
350
362
  initialHeight,
363
+ initialX,
364
+ initialY,
351
365
  minWidth,
352
366
  minHeight,
353
367
  maxWidth,
354
368
  maxHeight,
355
369
  initialCenter,
370
+ showTopOperationArea,
371
+ showBottomOperationArea,
356
372
  },
357
373
  timeout,
358
374
  });
@@ -354,11 +354,15 @@ export class AssistsXAsync {
354
354
  const {
355
355
  initialWidth,
356
356
  initialHeight,
357
+ initialX,
358
+ initialY,
357
359
  minWidth,
358
360
  minHeight,
359
361
  maxWidth,
360
362
  maxHeight,
361
363
  initialCenter,
364
+ showTopOperationArea,
365
+ showBottomOperationArea,
362
366
  timeout,
363
367
  } = options;
364
368
  const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {
@@ -366,11 +370,15 @@ export class AssistsXAsync {
366
370
  url,
367
371
  initialWidth,
368
372
  initialHeight,
373
+ initialX,
374
+ initialY,
369
375
  minWidth,
370
376
  minHeight,
371
377
  maxWidth,
372
378
  maxHeight,
373
379
  initialCenter,
380
+ showTopOperationArea,
381
+ showBottomOperationArea,
374
382
  },
375
383
  timeout,
376
384
  });