@ansight/react-native 1.3.0-preview.5 → 1.3.0-preview.9

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
@@ -77,8 +77,8 @@ bundle; its API requires the native Ansight module.
77
77
 
78
78
  This package version expects matching native SDK packages:
79
79
 
80
- - CocoaPods: `Ansight`, `AnsightObjC` version `1.3.0-preview.5`
81
- - Maven: `ai.ansight:ansight-android:1.3.0-preview.5`
80
+ - CocoaPods: `Ansight`, `AnsightObjC` version `1.3.0-preview.9`
81
+ - Maven: `ai.ansight:ansight-android:1.3.0-preview.9`
82
82
 
83
83
  ## Quickstart
84
84
 
@@ -67,6 +67,6 @@ repositories {
67
67
  dependencies {
68
68
  implementation("com.facebook.react:react-android")
69
69
  def ansightAndroidVersion =
70
- findProperty("ansightAndroidVersion") ?: "1.3.0-preview.5"
71
- implementation("ai.ansight:ansight-android:1.3.0-preview.5")
70
+ findProperty("ansightAndroidVersion") ?: "1.3.0-preview.9"
71
+ implementation("ai.ansight:ansight-android:1.3.0-preview.9")
72
72
  }
@@ -783,6 +783,10 @@ class AnsightReactNativeModule(
783
783
  AnsightSessionJpegCaptureOptions.DefaultCaptureGpuBackedSurfaces,
784
784
  ),
785
785
  mode = sessionJpegCaptureMode(jpeg.stringValue("mode")),
786
+ captureKeyboardPresence = jpeg.booleanValue(
787
+ "captureKeyboardPresence",
788
+ AnsightSessionJpegCaptureOptions.DefaultCaptureKeyboardPresence,
789
+ ),
786
790
  )
787
791
  },
788
792
  )
@@ -981,6 +985,10 @@ class AnsightReactNativeModule(
981
985
  AnsightSessionJpegCaptureOptions.DefaultCaptureGpuBackedSurfaces,
982
986
  ),
983
987
  mode = sessionJpegCaptureMode(map.stringValue("mode")),
988
+ captureKeyboardPresence = map.booleanValue(
989
+ "captureKeyboardPresence",
990
+ AnsightSessionJpegCaptureOptions.DefaultCaptureKeyboardPresence,
991
+ ),
984
992
  )
985
993
  }
986
994
 
@@ -1179,6 +1187,7 @@ class AnsightReactNativeModule(
1179
1187
  "quality" to capture.quality,
1180
1188
  "maxWidth" to capture.maxWidth,
1181
1189
  "captureGpuBackedSurfaces" to capture.captureGpuBackedSurfaces,
1190
+ "captureKeyboardPresence" to capture.captureKeyboardPresence,
1182
1191
  "mode" to when (capture.mode) {
1183
1192
  AnsightSessionJpegCaptureMode.ScreenshotAndVisualTree -> "screenshotAndVisualTree"
1184
1193
  AnsightSessionJpegCaptureMode.ScreenshotWithVisualTreeOnTouch -> "screenshotWithVisualTreeOnTouch"
package/index.d.ts CHANGED
@@ -37,6 +37,7 @@ export interface AnsightSessionJpegCaptureOptions {
37
37
  quality?: number;
38
38
  maxWidth?: number;
39
39
  captureGpuBackedSurfaces?: boolean;
40
+ captureKeyboardPresence?: boolean;
40
41
  mode?: "screenshotOnly" | "screenshotAndVisualTree" | "screenshotWithVisualTreeOnTouch";
41
42
  }
42
43
 
@@ -290,7 +291,8 @@ export class AnsightOptionsBuilder {
290
291
  quality?: number,
291
292
  maxWidth?: number | null,
292
293
  captureGpuBackedSurfaces?: boolean,
293
- mode?: "screenshotOnly" | "screenshotAndVisualTree" | "screenshotWithVisualTreeOnTouch"
294
+ mode?: "screenshotOnly" | "screenshotAndVisualTree" | "screenshotWithVisualTreeOnTouch",
295
+ captureKeyboardPresence?: boolean
294
296
  ): this;
295
297
  withoutSessionJpegCapture(): this;
296
298
  withTouchCapture(touchCapture?: AnsightTouchCaptureOptions): this;
package/index.js CHANGED
@@ -294,6 +294,7 @@ class AnsightOptionsBuilder {
294
294
  maxWidth: arguments.length > 2 ? arguments[2] : 480,
295
295
  captureGpuBackedSurfaces: arguments.length > 3 ? arguments[3] : true,
296
296
  mode: arguments.length > 4 ? arguments[4] : "screenshotOnly",
297
+ captureKeyboardPresence: arguments.length > 5 ? arguments[5] : false,
297
298
  };
298
299
  return this;
299
300
  }
@@ -301,6 +302,7 @@ class AnsightOptionsBuilder {
301
302
  intervalMilliseconds: 2000,
302
303
  quality: 60,
303
304
  maxWidth: 480,
305
+ captureKeyboardPresence: false,
304
306
  mode: "screenshotOnly",
305
307
  ...(optionsOrIntervalMilliseconds || {}),
306
308
  };
@@ -976,7 +976,12 @@ final class AnsightReactNative: RCTEventEmitter {
976
976
  ),
977
977
  mode: AnsightSessionJpegCaptureMode(
978
978
  rawValue: stringValue(jpeg, "mode") ?? ""
979
- ) ?? .screenshotOnly
979
+ ) ?? .screenshotOnly,
980
+ captureKeyboardPresence: boolValue(
981
+ jpeg,
982
+ "captureKeyboardPresence",
983
+ defaultValue: AnsightSessionJpegCaptureOptions.defaultCaptureKeyboardPresence
984
+ )
980
985
  )
981
986
  }
982
987
  }
@@ -1320,7 +1325,12 @@ final class AnsightReactNative: RCTEventEmitter {
1320
1325
  ),
1321
1326
  mode: AnsightSessionJpegCaptureMode(
1322
1327
  rawValue: stringValue(dictionary, "mode") ?? ""
1323
- ) ?? .screenshotOnly
1328
+ ) ?? .screenshotOnly,
1329
+ captureKeyboardPresence: boolValue(
1330
+ dictionary,
1331
+ "captureKeyboardPresence",
1332
+ defaultValue: AnsightSessionJpegCaptureOptions.defaultCaptureKeyboardPresence
1333
+ )
1324
1334
  )
1325
1335
  }
1326
1336
 
@@ -1371,6 +1381,7 @@ final class AnsightReactNative: RCTEventEmitter {
1371
1381
  "quality": capture.quality,
1372
1382
  "maxWidth": capture.maxWidth as Any,
1373
1383
  "captureGpuBackedSurfaces": capture.captureGpuBackedSurfaces,
1384
+ "captureKeyboardPresence": capture.captureKeyboardPresence,
1374
1385
  "mode": capture.mode.rawValue,
1375
1386
  ]
1376
1387
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansight/react-native",
3
- "version": "1.3.0-preview.5",
3
+ "version": "1.3.0-preview.9",
4
4
  "description": "React Native bridge for the Ansight mobile SDK.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",