screenshotone-api-sdk 1.1.9 → 1.1.10

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.
@@ -298,6 +298,11 @@ export declare class TakeOptions {
298
298
  * selector is present in the view when taking a screenshot.
299
299
  */
300
300
  scrollIntoView(selector: string): TakeOptions;
301
+ /**
302
+ * After the given element appears in the viewport and its top coordinate is aligned with the viewport’s top,
303
+ * you can adjust the position a bit before taking a screenshot.
304
+ */
305
+ scrollIntoViewAdjustTop(adjustTop: number): TakeOptions;
301
306
  /**
302
307
  * You can use your custom proxy to take screenshots
303
308
  * or render HTML with the proxy option.
package/dist/main.js CHANGED
@@ -547,6 +547,14 @@ class TakeOptions {
547
547
  this.put("scroll_into_view", selector);
548
548
  return this;
549
549
  }
550
+ /**
551
+ * After the given element appears in the viewport and its top coordinate is aligned with the viewport’s top,
552
+ * you can adjust the position a bit before taking a screenshot.
553
+ */
554
+ scrollIntoViewAdjustTop(adjustTop) {
555
+ this.put("scroll_into_view_adjust_top", adjustTop.toString());
556
+ return this;
557
+ }
550
558
  /**
551
559
  * You can use your custom proxy to take screenshots
552
560
  * or render HTML with the proxy option.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "screenshotone-api-sdk",
3
3
  "homepage": "https://screenshotone.com",
4
- "version": "1.1.9",
4
+ "version": "1.1.10",
5
5
  "description": "Use ScreenshotOne.com API to generate screenshots of any website.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,4 +47,4 @@
47
47
  "build": "tsc",
48
48
  "prepare": "npm run build"
49
49
  }
50
- }
50
+ }
package/src/main.ts CHANGED
@@ -695,6 +695,16 @@ export class TakeOptions {
695
695
  return this;
696
696
  }
697
697
 
698
+ /**
699
+ * After the given element appears in the viewport and its top coordinate is aligned with the viewport’s top,
700
+ * you can adjust the position a bit before taking a screenshot.
701
+ */
702
+ scrollIntoViewAdjustTop(adjustTop: number): TakeOptions {
703
+ this.put("scroll_into_view_adjust_top", adjustTop.toString());
704
+
705
+ return this;
706
+ }
707
+
698
708
  /**
699
709
  * You can use your custom proxy to take screenshots
700
710
  * or render HTML with the proxy option.