@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/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 extends FullPageScreenshotOptions { }
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrillex1224/playwright-toolkit",
3
- "version": "2.1.151",
3
+ "version": "2.1.152",
4
4
  "description": "一个在 Apify/Crawlee Actor 中启用实时截图视图的实用工具库。",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",