screenshotone-api-sdk 1.1.22 → 1.1.23

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.
@@ -119,9 +119,15 @@ export declare class TakeOptions {
119
119
  */
120
120
  externalIdentifier(identifier: string): TakeOptions;
121
121
  /**
122
- * When reduced_motion set to `true`,
123
- * the API will request the site to minimize the amount of non-essential motion it uses.
124
- * When the site supports it, it should use animations as least as possible.
122
+ * Actively reduces supported motion by finishing animations and pausing media and sliders.
123
+ * Also enables the reduced-motion preference. The API default is false.
124
+ * Unlike reducedMotion(), this does not rely only on the website honoring that preference.
125
+ */
126
+ reduceMotion(reduceMotion: boolean): TakeOptions;
127
+ /**
128
+ * Requests reduced motion through the prefers-reduced-motion preference.
129
+ * Websites may ignore this preference; it does not actively freeze motion.
130
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
125
131
  */
126
132
  reducedMotion(reducedMotion: boolean): TakeOptions;
127
133
  /**
@@ -629,11 +635,17 @@ export declare class AnimateOptions {
629
635
  */
630
636
  responseType(responseType: string): this;
631
637
  /**
632
- * When reduced_motion set to `true`,
633
- * the API will request the site to minimize the amount of non-essential motion it uses.
634
- * When the site supports it, it should use animations as least as possible.
638
+ * Actively reduces supported page motion during recording by finishing animations
639
+ * and pausing media and sliders. Also enables the reduced-motion preference.
640
+ * The API default is false. Unlike reducedMotion(), this actively freezes motion.
641
+ */
642
+ reduceMotion(reduceMotion: boolean): AnimateOptions;
643
+ /**
644
+ * Requests reduced motion through the prefers-reduced-motion preference.
645
+ * Websites may ignore this preference; it does not actively freeze motion.
646
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
635
647
  */
636
- reducedMotion(darkMode: boolean): AnimateOptions;
648
+ reducedMotion(reducedMotion: boolean): AnimateOptions;
637
649
  /**
638
650
  * If you want to request the page and it is supported to be rendered for printers, specify `print`.
639
651
  * If the page is by default rendered for printers and you want it to be rendered for screens,
package/dist/main.js CHANGED
@@ -263,9 +263,18 @@ class TakeOptions {
263
263
  return this;
264
264
  }
265
265
  /**
266
- * When reduced_motion set to `true`,
267
- * the API will request the site to minimize the amount of non-essential motion it uses.
268
- * When the site supports it, it should use animations as least as possible.
266
+ * Actively reduces supported motion by finishing animations and pausing media and sliders.
267
+ * Also enables the reduced-motion preference. The API default is false.
268
+ * Unlike reducedMotion(), this does not rely only on the website honoring that preference.
269
+ */
270
+ reduceMotion(reduceMotion) {
271
+ this.put("reduce_motion", reduceMotion ? "true" : "false");
272
+ return this;
273
+ }
274
+ /**
275
+ * Requests reduced motion through the prefers-reduced-motion preference.
276
+ * Websites may ignore this preference; it does not actively freeze motion.
277
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
269
278
  */
270
279
  reducedMotion(reducedMotion) {
271
280
  this.put("reduced_motion", reducedMotion ? "true" : "false");
@@ -1126,12 +1135,21 @@ class AnimateOptions {
1126
1135
  return this;
1127
1136
  }
1128
1137
  /**
1129
- * When reduced_motion set to `true`,
1130
- * the API will request the site to minimize the amount of non-essential motion it uses.
1131
- * When the site supports it, it should use animations as least as possible.
1138
+ * Actively reduces supported page motion during recording by finishing animations
1139
+ * and pausing media and sliders. Also enables the reduced-motion preference.
1140
+ * The API default is false. Unlike reducedMotion(), this actively freezes motion.
1141
+ */
1142
+ reduceMotion(reduceMotion) {
1143
+ this.put("reduce_motion", reduceMotion ? "true" : "false");
1144
+ return this;
1145
+ }
1146
+ /**
1147
+ * Requests reduced motion through the prefers-reduced-motion preference.
1148
+ * Websites may ignore this preference; it does not actively freeze motion.
1149
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
1132
1150
  */
1133
- reducedMotion(darkMode) {
1134
- this.put("reduced_motion", darkMode ? "true" : "false");
1151
+ reducedMotion(reducedMotion) {
1152
+ this.put("reduced_motion", reducedMotion ? "true" : "false");
1135
1153
  return this;
1136
1154
  }
1137
1155
  /**
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.22",
4
+ "version": "1.1.23",
5
5
  "description": "Use ScreenshotOne.com API to generate screenshots of any website.",
6
6
  "repository": {
7
7
  "type": "git",
package/src/main.ts CHANGED
@@ -346,9 +346,20 @@ export class TakeOptions {
346
346
  }
347
347
 
348
348
  /**
349
- * When reduced_motion set to `true`,
350
- * the API will request the site to minimize the amount of non-essential motion it uses.
351
- * When the site supports it, it should use animations as least as possible.
349
+ * Actively reduces supported motion by finishing animations and pausing media and sliders.
350
+ * Also enables the reduced-motion preference. The API default is false.
351
+ * Unlike reducedMotion(), this does not rely only on the website honoring that preference.
352
+ */
353
+ reduceMotion(reduceMotion: boolean): TakeOptions {
354
+ this.put("reduce_motion", reduceMotion ? "true" : "false");
355
+
356
+ return this;
357
+ }
358
+
359
+ /**
360
+ * Requests reduced motion through the prefers-reduced-motion preference.
361
+ * Websites may ignore this preference; it does not actively freeze motion.
362
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
352
363
  */
353
364
  reducedMotion(reducedMotion: boolean): TakeOptions {
354
365
  this.put("reduced_motion", reducedMotion ? "true" : "false");
@@ -1452,12 +1463,23 @@ export class AnimateOptions {
1452
1463
  }
1453
1464
 
1454
1465
  /**
1455
- * When reduced_motion set to `true`,
1456
- * the API will request the site to minimize the amount of non-essential motion it uses.
1457
- * When the site supports it, it should use animations as least as possible.
1466
+ * Actively reduces supported page motion during recording by finishing animations
1467
+ * and pausing media and sliders. Also enables the reduced-motion preference.
1468
+ * The API default is false. Unlike reducedMotion(), this actively freezes motion.
1458
1469
  */
1459
- reducedMotion(darkMode: boolean): AnimateOptions {
1460
- this.put("reduced_motion", darkMode ? "true" : "false");
1470
+ reduceMotion(reduceMotion: boolean): AnimateOptions {
1471
+ this.put("reduce_motion", reduceMotion ? "true" : "false");
1472
+
1473
+ return this;
1474
+ }
1475
+
1476
+ /**
1477
+ * Requests reduced motion through the prefers-reduced-motion preference.
1478
+ * Websites may ignore this preference; it does not actively freeze motion.
1479
+ * Use reduceMotion(true) to actively reduce motion and enable this preference.
1480
+ */
1481
+ reducedMotion(reducedMotion: boolean): AnimateOptions {
1482
+ this.put("reduced_motion", reducedMotion ? "true" : "false");
1461
1483
 
1462
1484
  return this;
1463
1485
  }