@skrillex1224/playwright-toolkit 3.0.41 → 3.0.43

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 CHANGED
@@ -226,7 +226,7 @@ const cookies = Utils.parseCookies('key=value; key2=value2', '.example.com');
226
226
  await page.context().addCookies(cookies);
227
227
 
228
228
  // 全页面滚动截图 (自动检测所有滚动元素,强制展开后截图,默认会执行 watermarkify)
229
- // 默认会将返回的 base64 压缩到 5MiB 以内,避免 Apify/Crawlee dataset 单条 item 超限
229
+ // 默认会将返回的 base64 压缩到 500KiB 以内,避免 Apify/Crawlee dataset 单条 item 超限
230
230
  const base64Image = await Share.captureScreen(page);
231
231
 
232
232
  // 截图只使用当前页面运行时 viewport;移动端请通过 ActorInfo.device 切换,不再通过截图参数覆盖
package/dist/index.cjs CHANGED
@@ -9887,11 +9887,11 @@ var watermarkifyScreenshotBuffer = async (buffer, meta, page = null, options = {
9887
9887
  // src/internals/compression.js
9888
9888
  var import_jimp2 = require("jimp");
9889
9889
  var logger16 = createInternalLogger("Compression");
9890
- var DEFAULT_SCREENSHOT_MAX_BYTES = 5 * 1024 * 1024;
9890
+ var DEFAULT_SCREENSHOT_MAX_BYTES = 500 * 1024;
9891
9891
  var DEFAULT_SCREENSHOT_OUTPUT_TYPE = "jpeg";
9892
- var DEFAULT_SCREENSHOT_QUALITY = 0.72;
9893
- var DEFAULT_SCREENSHOT_MIN_QUALITY = 0.38;
9894
- var DEFAULT_SCREENSHOT_MIN_SCALE = 0.25;
9892
+ var DEFAULT_SCREENSHOT_QUALITY = 0.32;
9893
+ var DEFAULT_SCREENSHOT_MIN_QUALITY = 0.32;
9894
+ var DEFAULT_SCREENSHOT_MIN_SCALE = 0.2;
9895
9895
  var SUPPORTED_SCREENSHOT_OUTPUT_TYPES = /* @__PURE__ */ new Set(["jpeg"]);
9896
9896
  var toPositiveInteger2 = (value, fallback = 0) => {
9897
9897
  const number = Math.floor(Number(value) || 0);
@@ -10476,7 +10476,7 @@ var Share = {
10476
10476
  * @param {Object} [options]
10477
10477
  * @param {boolean} [options.restore]
10478
10478
  * @param {number} [options.maxHeight]
10479
- * @param {number} [options.maxBytes] 默认 5MiB,返回 base64 超过后会压缩
10479
+ * @param {number} [options.maxBytes] 默认 500KiB,返回 base64 超过后会压缩
10480
10480
  * @param {'jpeg'|'jpg'} [options.type] 压缩输出格式,默认 jpeg
10481
10481
  * @param {boolean|Object} [options.compression] 传 false 可关闭压缩
10482
10482
  * @param {'default'|'cloak'} [options.mode] 截图水印合成模式,默认取当前 toolkit mode