@skrillex1224/playwright-toolkit 2.1.151 → 2.1.152
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/README.md +6 -0
- package/dist/index.cjs +25 -5
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +25 -5
- package/dist/index.js.map +2 -2
- package/index.d.ts +18 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -400,7 +400,24 @@ export interface ShareLinkCaptureResult {
|
|
|
400
400
|
source: 'response' | 'dom' | 'none';
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
export interface ShareScreenCaptureOptions
|
|
403
|
+
export interface ShareScreenCaptureOptions {
|
|
404
|
+
/** 额外缓冲高度 (默认: 视口高度的一半) */
|
|
405
|
+
buffer?: number;
|
|
406
|
+
/** 截图后是否恢复视口:
|
|
407
|
+
* - false: 不恢复(默认)
|
|
408
|
+
* - true: 恢复宽高
|
|
409
|
+
* - 'width-only': 仅恢复宽度
|
|
410
|
+
* - 'height-only': 仅恢复高度
|
|
411
|
+
* 若 moblie=true 且未显式传 restore,则默认 'width-only'
|
|
412
|
+
*/
|
|
413
|
+
restore?: boolean | 'width-only' | 'height-only';
|
|
414
|
+
/** 最大截图高度 (默认: 8000px) */
|
|
415
|
+
maxHeight?: number;
|
|
416
|
+
/** 是否按移动端宽度截图(保持拼写兼容:moblie) */
|
|
417
|
+
moblie?: boolean;
|
|
418
|
+
/** moblie 的别名 */
|
|
419
|
+
mobile?: boolean;
|
|
420
|
+
}
|
|
404
421
|
|
|
405
422
|
export interface ShareModule {
|
|
406
423
|
captureLink(page: Page, options?: ShareLinkCaptureOptions): Promise<ShareLinkCaptureResult>;
|