screenshotone-api-sdk 1.1.8 → 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.
- package/dist/@types/main.d.ts +21 -0
- package/dist/main.js +36 -0
- package/package.json +2 -2
- package/src/main.ts +46 -0
package/dist/@types/main.d.ts
CHANGED
|
@@ -199,6 +199,22 @@ export declare class TakeOptions {
|
|
|
199
199
|
* Sets the height of the browser viewport (pixels).
|
|
200
200
|
*/
|
|
201
201
|
viewportHeight(viewportHeight: number): TakeOptions;
|
|
202
|
+
/**
|
|
203
|
+
* The clip_x option specifies only the top coordinate (x) of the area to clip.
|
|
204
|
+
*/
|
|
205
|
+
clipX(clipX: number): TakeOptions;
|
|
206
|
+
/**
|
|
207
|
+
* The clip_y option specifies only the top coordinate (y) of the area to clip.
|
|
208
|
+
*/
|
|
209
|
+
clipY(clipY: number): TakeOptions;
|
|
210
|
+
/**
|
|
211
|
+
* The clip_width option specifies only the width of the area to clip.
|
|
212
|
+
*/
|
|
213
|
+
clipWidth(clipWidth: number): TakeOptions;
|
|
214
|
+
/**
|
|
215
|
+
* The clip_height option specifies only the width of the area to clip.
|
|
216
|
+
*/
|
|
217
|
+
clipHeight(clipHeight: number): TakeOptions;
|
|
202
218
|
/**
|
|
203
219
|
* Sets the device scale factor. Acceptable value is one of: 1, 2 or 3.
|
|
204
220
|
*/
|
|
@@ -282,6 +298,11 @@ export declare class TakeOptions {
|
|
|
282
298
|
* selector is present in the view when taking a screenshot.
|
|
283
299
|
*/
|
|
284
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;
|
|
285
306
|
/**
|
|
286
307
|
* You can use your custom proxy to take screenshots
|
|
287
308
|
* or render HTML with the proxy option.
|
package/dist/main.js
CHANGED
|
@@ -376,6 +376,34 @@ class TakeOptions {
|
|
|
376
376
|
this.put("viewport_height", viewportHeight.toString());
|
|
377
377
|
return this;
|
|
378
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* The clip_x option specifies only the top coordinate (x) of the area to clip.
|
|
381
|
+
*/
|
|
382
|
+
clipX(clipX) {
|
|
383
|
+
this.put("clip_x", clipX.toString());
|
|
384
|
+
return this;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* The clip_y option specifies only the top coordinate (y) of the area to clip.
|
|
388
|
+
*/
|
|
389
|
+
clipY(clipY) {
|
|
390
|
+
this.put("clip_y", clipY.toString());
|
|
391
|
+
return this;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* The clip_width option specifies only the width of the area to clip.
|
|
395
|
+
*/
|
|
396
|
+
clipWidth(clipWidth) {
|
|
397
|
+
this.put("clip_width", clipWidth.toString());
|
|
398
|
+
return this;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* The clip_height option specifies only the width of the area to clip.
|
|
402
|
+
*/
|
|
403
|
+
clipHeight(clipHeight) {
|
|
404
|
+
this.put("clip_height", clipHeight.toString());
|
|
405
|
+
return this;
|
|
406
|
+
}
|
|
379
407
|
/**
|
|
380
408
|
* Sets the device scale factor. Acceptable value is one of: 1, 2 or 3.
|
|
381
409
|
*/
|
|
@@ -519,6 +547,14 @@ class TakeOptions {
|
|
|
519
547
|
this.put("scroll_into_view", selector);
|
|
520
548
|
return this;
|
|
521
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
|
+
}
|
|
522
558
|
/**
|
|
523
559
|
* You can use your custom proxy to take screenshots
|
|
524
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.
|
|
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
|
@@ -470,6 +470,42 @@ export class TakeOptions {
|
|
|
470
470
|
return this;
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
+
/**
|
|
474
|
+
* The clip_x option specifies only the top coordinate (x) of the area to clip.
|
|
475
|
+
*/
|
|
476
|
+
clipX(clipX: number): TakeOptions {
|
|
477
|
+
this.put("clip_x", clipX.toString());
|
|
478
|
+
|
|
479
|
+
return this;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The clip_y option specifies only the top coordinate (y) of the area to clip.
|
|
484
|
+
*/
|
|
485
|
+
clipY(clipY: number): TakeOptions {
|
|
486
|
+
this.put("clip_y", clipY.toString());
|
|
487
|
+
|
|
488
|
+
return this;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* The clip_width option specifies only the width of the area to clip.
|
|
493
|
+
*/
|
|
494
|
+
clipWidth(clipWidth: number): TakeOptions {
|
|
495
|
+
this.put("clip_width", clipWidth.toString());
|
|
496
|
+
|
|
497
|
+
return this;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* The clip_height option specifies only the width of the area to clip.
|
|
502
|
+
*/
|
|
503
|
+
clipHeight(clipHeight: number): TakeOptions {
|
|
504
|
+
this.put("clip_height", clipHeight.toString());
|
|
505
|
+
|
|
506
|
+
return this;
|
|
507
|
+
}
|
|
508
|
+
|
|
473
509
|
/**
|
|
474
510
|
* Sets the device scale factor. Acceptable value is one of: 1, 2 or 3.
|
|
475
511
|
*/
|
|
@@ -659,6 +695,16 @@ export class TakeOptions {
|
|
|
659
695
|
return this;
|
|
660
696
|
}
|
|
661
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
|
+
|
|
662
708
|
/**
|
|
663
709
|
* You can use your custom proxy to take screenshots
|
|
664
710
|
* or render HTML with the proxy option.
|