expo-camera 12.1.2 → 12.2.0

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +21 -3
  2. package/README.md +3 -3
  3. package/android/build.gradle +27 -12
  4. package/android/src/main/java/expo/modules/camera/ExpoCameraView.kt +1 -1
  5. package/build/Camera.d.ts +91 -6
  6. package/build/Camera.d.ts.map +1 -0
  7. package/build/Camera.js +95 -3
  8. package/build/Camera.js.map +1 -1
  9. package/build/Camera.types.d.ts +206 -75
  10. package/build/Camera.types.d.ts.map +1 -0
  11. package/build/Camera.types.js +32 -51
  12. package/build/Camera.types.js.map +1 -1
  13. package/build/ExponentCamera.d.ts +1 -0
  14. package/build/ExponentCamera.d.ts.map +1 -0
  15. package/build/ExponentCamera.web.d.ts +1 -0
  16. package/build/ExponentCamera.web.d.ts.map +1 -0
  17. package/build/ExponentCameraManager.d.ts +1 -0
  18. package/build/ExponentCameraManager.d.ts.map +1 -0
  19. package/build/ExponentCameraManager.web.d.ts +1 -0
  20. package/build/ExponentCameraManager.web.d.ts.map +1 -0
  21. package/build/WebCameraUtils.d.ts +3 -2
  22. package/build/WebCameraUtils.d.ts.map +1 -0
  23. package/build/WebCameraUtils.js.map +1 -1
  24. package/build/WebCapabilityUtils.d.ts +1 -0
  25. package/build/WebCapabilityUtils.d.ts.map +1 -0
  26. package/build/WebConstants.d.ts +1 -0
  27. package/build/WebConstants.d.ts.map +1 -0
  28. package/build/WebUserMediaManager.d.ts +1 -0
  29. package/build/WebUserMediaManager.d.ts.map +1 -0
  30. package/build/index.d.ts +3 -1
  31. package/build/index.d.ts.map +1 -0
  32. package/build/index.js +2 -1
  33. package/build/index.js.map +1 -1
  34. package/build/useWebCameraStream.d.ts +1 -0
  35. package/build/useWebCameraStream.d.ts.map +1 -0
  36. package/build/useWebQRScanner.d.ts +2 -2
  37. package/build/useWebQRScanner.d.ts.map +1 -0
  38. package/build/useWebQRScanner.js +2 -2
  39. package/build/useWebQRScanner.js.map +1 -1
  40. package/build/utils/props.d.ts +1 -0
  41. package/build/utils/props.d.ts.map +1 -0
  42. package/ios/EXCamera.xcframework/ios-arm64/EXCamera.framework/EXCamera +0 -0
  43. package/ios/EXCamera.xcframework/ios-arm64/EXCamera.framework/Info.plist +0 -0
  44. package/ios/EXCamera.xcframework/ios-arm64_x86_64-simulator/EXCamera.framework/EXCamera +0 -0
  45. package/ios/EXCamera.xcframework/ios-arm64_x86_64-simulator/EXCamera.framework/Info.plist +0 -0
  46. package/package.json +3 -3
  47. package/plugin/src/withCamera.ts +6 -4
  48. package/src/Camera.tsx +99 -26
  49. package/src/Camera.types.ts +214 -83
  50. package/src/WebCameraUtils.ts +4 -4
  51. package/src/index.ts +17 -4
  52. package/src/useWebQRScanner.ts +3 -4
@@ -1,82 +1,60 @@
1
1
  import { PermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions } from 'expo-modules-core';
2
2
  import { ViewProps } from 'react-native';
3
3
  export declare enum CameraType {
4
- /**
5
- * @platforms ios, android, web
6
- */
7
4
  front = "front",
8
- /**
9
- * @platforms ios, android, web
10
- */
11
5
  back = "back"
12
6
  }
13
7
  export declare enum FlashMode {
14
- /**
15
- * @platforms ios, android, web
16
- */
17
8
  on = "on",
18
- /**
19
- * @platforms ios, android, web
20
- */
21
9
  off = "off",
22
- /**
23
- * @platforms ios, android, web
24
- */
25
10
  auto = "auto",
26
- /**
27
- * @platforms ios, android, web
28
- */
29
11
  torch = "torch"
30
12
  }
31
13
  export declare enum AutoFocus {
32
- /**
33
- * @platforms ios, android, web
34
- */
35
14
  on = "on",
36
- /**
37
- * @platforms ios, android, web
38
- */
39
15
  off = "off",
40
16
  /**
41
- * @platforms web
17
+ * @platform web
42
18
  */
43
19
  auto = "auto",
44
20
  /**
45
- * @platforms web
21
+ * @platform web
46
22
  */
47
23
  singleShot = "singleShot"
48
24
  }
49
25
  export declare enum WhiteBalance {
50
- /**
51
- * @platforms ios, android, web
52
- */
53
26
  auto = "auto",
54
27
  /**
55
- * @platforms ios, android
28
+ * @platform android
29
+ * @platform ios
56
30
  */
57
31
  sunny = "sunny",
58
32
  /**
59
- * @platforms ios, android
33
+ * @platform android
34
+ * @platform ios
60
35
  */
61
36
  cloudy = "cloudy",
62
37
  /**
63
- * @platforms ios, android
38
+ * @platform android
39
+ * @platform ios
64
40
  */
65
41
  shadow = "shadow",
66
42
  /**
67
- * @platforms ios, android
43
+ * @platform android
44
+ * @platform ios
68
45
  */
69
46
  incandescent = "incandescent",
70
47
  /**
71
- * @platforms ios, android
48
+ * @platform android
49
+ * @platform ios
72
50
  */
73
51
  fluorescent = "fluorescent",
74
52
  /**
75
- * @platforms web
53
+ * @platform web
76
54
  */
77
55
  continuous = "continuous",
78
56
  /**
79
- * @platforms web
57
+ * @platform web
80
58
  */
81
59
  manual = "manual"
82
60
  }
@@ -86,29 +64,28 @@ export declare enum ImageType {
86
64
  }
87
65
  /**
88
66
  * This option specifies what codec to use when recording a video.
67
+ * @platform ios
89
68
  */
90
69
  export declare enum VideoCodec {
91
- /**
92
- * @platforms ios
93
- */
94
70
  H264 = "avc1",
95
- /**
96
- * @platforms ios
97
- */
98
71
  HEVC = "hvc1",
99
- /**
100
- * @platforms ios
101
- */
102
72
  JPEG = "jpeg",
103
- /**
104
- * @platforms ios
105
- */
106
73
  AppleProRes422 = "apcn",
107
- /**
108
- * @platforms ios
109
- */
110
74
  AppleProRes4444 = "ap4h"
111
75
  }
76
+ export declare enum VideoStabilization {
77
+ off = "off",
78
+ standard = "standard",
79
+ cinematic = "cinematic",
80
+ auto = "auto"
81
+ }
82
+ export declare enum VideoQuality {
83
+ '2160p' = "2160p",
84
+ '1080p' = "1080p",
85
+ '720p' = "720p",
86
+ '480p' = "480p",
87
+ '4:3' = "4:3"
88
+ }
112
89
  export declare type ImageParameters = {
113
90
  imageType: ImageType;
114
91
  quality: number | null;
@@ -131,44 +108,104 @@ export declare type WebCameraSettings = Partial<{
131
108
  focusDistance: number;
132
109
  zoom: number;
133
110
  }>;
134
- export declare type CapturedPicture = {
111
+ export declare type CameraCapturedPicture = {
135
112
  width: number;
136
113
  height: number;
137
114
  uri: string;
138
115
  base64?: string;
139
- exif?: Partial<MediaTrackSettings>;
116
+ exif?: Partial<MediaTrackSettings> | any;
140
117
  };
141
118
  export declare type CameraPictureOptions = {
119
+ /**
120
+ * Specify the quality of compression, from 0 to 1. 0 means compress for small size, 1 means compress for maximum quality.
121
+ */
142
122
  quality?: number;
123
+ /**
124
+ * Whether to also include the image data in Base64 format.
125
+ */
143
126
  base64?: boolean;
127
+ /**
128
+ * Whether to also include the EXIF data for the image.
129
+ */
144
130
  exif?: boolean;
131
+ /**
132
+ * A callback invoked when picture is saved. If set, the promise of this method will resolve immediately with no data after picture is captured.
133
+ * The data that it should contain will be passed to this callback. If displaying or processing a captured photo right after taking it
134
+ * is not your case, this callback lets you skip waiting for it to be saved.
135
+ * @param picture
136
+ */
145
137
  onPictureSaved?: (picture: CameraCapturedPicture) => void;
138
+ /**
139
+ * If set to `true`, camera skips orientation adjustment and returns an image straight from the device's camera.
140
+ * If enabled, `quality` option is discarded (processing pipeline is skipped as a whole).
141
+ * Although enabling this option reduces image delivery time significantly, it may cause the image to appear in a wrong orientation
142
+ * in the `Image` component (at the time of writing, it does not respect EXIF orientation of the images).
143
+ * > **Note**: Enabling `skipProcessing` would cause orientation uncertainty. `Image` component does not respect EXIF
144
+ * > stored orientation information, that means obtained image would be displayed wrongly (rotated by 90°, 180° or 270°).
145
+ * > Different devices provide different orientations. For example some Sony Xperia or Samsung devices don't provide
146
+ * > correctly oriented images by default. To always obtain correctly oriented image disable `skipProcessing` option.
147
+ */
146
148
  skipProcessing?: boolean;
149
+ /**
150
+ * @platform web
151
+ */
147
152
  scale?: number;
153
+ /**
154
+ * @platform web
155
+ */
148
156
  imageType?: ImageType;
157
+ /**
158
+ * @platform web
159
+ */
149
160
  isImageMirror?: boolean;
161
+ /**
162
+ * @hidden
163
+ */
150
164
  id?: number;
165
+ /**
166
+ * @hidden
167
+ */
151
168
  fastMode?: boolean;
152
169
  };
153
170
  export declare type CameraRecordingOptions = {
171
+ /**
172
+ * Maximum video duration in seconds.
173
+ */
154
174
  maxDuration?: number;
175
+ /**
176
+ * Maximum video file size in bytes.
177
+ */
155
178
  maxFileSize?: number;
179
+ /**
180
+ * Specify the quality of recorded video. Usage: `Camera.Constants.VideoQuality.<value>`,
181
+ * possible values: for 16:9 resolution `2160p`, `1080p`, `720p`, `480p` : `Android only` and for 4:3 `4:3` (the size is 640x480).
182
+ * If the chosen quality is not available for a device, the highest available is chosen.
183
+ */
156
184
  quality?: number | string;
185
+ /**
186
+ * If present, video will be recorded with no sound.
187
+ */
157
188
  mute?: boolean;
189
+ /**
190
+ * If `true`, the recorded video will be flipped along the vertical axis. iOS flips videos recorded with the front camera by default,
191
+ * but you can reverse that back by setting this to `true`. On Android, this is handled in the user's device settings.
192
+ * @platform ios
193
+ */
158
194
  mirror?: boolean;
195
+ /**
196
+ * Only works if `useCamera2Api` is set to `true`. This option specifies a desired video bitrate. For example, `5*1000*1000` would be 5Mbps.
197
+ * @platform android
198
+ */
159
199
  videoBitrate?: number;
200
+ /**
201
+ * This option specifies what codec to use when recording the video. See [`Camera.Constants.VideoCodec`](#video-codec) for the possible values.
202
+ * @platform ios
203
+ */
160
204
  codec?: VideoCodec;
161
205
  };
162
- export declare type CameraCapturedPicture = {
163
- width: number;
164
- height: number;
165
- uri: string;
166
- base64?: string;
167
- exif?: any;
168
- };
169
206
  export declare type PictureSavedListener = (event: {
170
207
  nativeEvent: {
171
- data: CapturedPicture;
208
+ data: CameraCapturedPicture;
172
209
  id: number;
173
210
  };
174
211
  }) => void;
@@ -179,15 +216,23 @@ export declare type MountErrorListener = (event: {
179
216
  export declare type CameraMountError = {
180
217
  message: string;
181
218
  };
182
- declare type Point = {
219
+ export declare type Point = {
183
220
  x: number;
184
221
  y: number;
185
222
  };
186
223
  export declare type BarCodePoint = Point;
187
224
  export declare type BarCodeScanningResult = {
225
+ /**
226
+ * The barcode type.
227
+ */
188
228
  type: string;
229
+ /**
230
+ * The information encoded in the bar code.
231
+ */
189
232
  data: string;
190
- /** @platform web */
233
+ /**
234
+ * Corner points of the bounding box.
235
+ */
191
236
  cornerPoints?: BarCodePoint[];
192
237
  };
193
238
  export declare type Face = {
@@ -219,31 +264,116 @@ export declare type FaceDetectionResult = {
219
264
  faces: Face[];
220
265
  };
221
266
  export declare type ConstantsType = {
222
- Type: typeof CameraType;
223
- FlashMode: typeof FlashMode;
224
- AutoFocus: typeof AutoFocus;
225
- WhiteBalance: typeof WhiteBalance;
226
- VideoQuality: any;
227
- VideoStabilization: any;
228
- VideoCodec: typeof VideoCodec;
267
+ Type: CameraType;
268
+ FlashMode: FlashMode;
269
+ AutoFocus: AutoFocus;
270
+ WhiteBalance: WhiteBalance;
271
+ VideoQuality: VideoQuality;
272
+ VideoStabilization: VideoStabilization;
273
+ VideoCodec: VideoCodec;
229
274
  };
230
275
  export declare type CameraProps = ViewProps & {
231
- type?: number | keyof typeof CameraType;
232
- flashMode?: number | keyof typeof FlashMode;
233
- whiteBalance?: number | keyof typeof WhiteBalance;
234
- autoFocus?: boolean | number | keyof typeof AutoFocus;
276
+ /**
277
+ * Camera facing. Use one of `Camera.Constants.Type`. When `Type.front`, use the front-facing camera.
278
+ * When `Type.back`, use the back-facing camera.
279
+ * @default Type.back
280
+ */
281
+ type?: number | CameraType;
282
+ /**
283
+ * Camera flash mode. Use one of `Camera.Constants.FlashMode`. When `on`, the flash on your device will
284
+ * turn on when taking a picture, when `off`, it won't. Setting to `auto` will fire flash if required,
285
+ * `torch` turns on flash during the preview.
286
+ * @default FlashMode.off
287
+ */
288
+ flashMode?: number | FlashMode;
289
+ /**
290
+ * Camera white balance. Use one of [`Camera.Constants.WhiteBalance`](#whitebalance). If a device does not support any of these values previous one is used.
291
+ */
292
+ whiteBalance?: number | WhiteBalance;
293
+ /**
294
+ * State of camera auto focus. Use one of [`Camera.Constants.AutoFocus`](#autofocus). When `on`,
295
+ * auto focus will be enabled, when `off`, it won't and focus will lock as it was in the moment of change,
296
+ * but it can be adjusted on some devices via `focusDepth` prop.
297
+ */
298
+ autoFocus?: boolean | number | AutoFocus;
299
+ /**
300
+ * A value between `0` and `1` being a percentage of device's max zoom. `0` - not zoomed, `1` - maximum zoom.
301
+ * @default 0
302
+ */
235
303
  zoom?: number;
304
+ /**
305
+ * A string representing aspect ratio of the preview, eg. `4:3`, `16:9`, `1:1`. To check if a ratio is supported
306
+ * by the device use [`getSupportedRatiosAsync`](#getsupportedratiosasync).
307
+ * @default 4:3.
308
+ * @platform android
309
+ */
236
310
  ratio?: string;
311
+ /**
312
+ * Distance to plane of the sharpest focus. A value between `0` and `1` where: `0` - infinity focus, `1` - focus as close as possible.
313
+ * For Android this is available only for some devices and when `useCamera2Api` is set to `true`.
314
+ * @default 0
315
+ */
237
316
  focusDepth?: number;
238
- onCameraReady?: Function;
317
+ /**
318
+ * Callback invoked when camera preview has been set.
319
+ */
320
+ onCameraReady?: () => void;
321
+ /**
322
+ * Whether to use Android's Camera2 API. See `Note` at the top of this page.
323
+ * @platform android
324
+ */
239
325
  useCamera2Api?: boolean;
326
+ /**
327
+ * A string representing the size of pictures [`takePictureAsync`](#takepictureasync) will take.
328
+ * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).
329
+ */
240
330
  pictureSize?: string;
331
+ /**
332
+ * The video stabilization mode used for a video recording. Use one of [`Camera.Constants.VideoStabilization`](#videostabilization).
333
+ * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).
334
+ * @platform ios
335
+ */
241
336
  videoStabilizationMode?: number;
337
+ /**
338
+ * Callback invoked when camera preview could not been started.
339
+ * @param event Error object that contains a `message`.
340
+ */
242
341
  onMountError?: (event: CameraMountError) => void;
342
+ /**
343
+ * Settings exposed by [`BarCodeScanner`](bar-code-scanner) module. Supported settings: **barCodeTypes**.
344
+ * @example
345
+ * ```tsx
346
+ * <Camera
347
+ * barCodeScannerSettings={{
348
+ * barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr],
349
+ * }}
350
+ * />
351
+ * ```
352
+ */
243
353
  barCodeScannerSettings?: object;
354
+ /**
355
+ * Callback that is invoked when a bar code has been successfully scanned. The callback is provided with
356
+ * an object of the [`BarCodeScanningResult`](#barcodescanningresult) shape, where the `type`
357
+ * refers to the bar code type that was scanned and the `data` is the information encoded in the bar code
358
+ * (in this case of QR codes, this is often a URL). See [`BarCodeScanner.Constants.BarCodeType`](bar-code-scanner#supported-formats)
359
+ * for supported values.
360
+ * @param scanningResult
361
+ */
244
362
  onBarCodeScanned?: (scanningResult: BarCodeScanningResult) => void;
363
+ /**
364
+ * A settings object passed directly to an underlying module providing face detection features.
365
+ * See [`DetectionOptions`](facedetector/#detectionoptions) in FaceDetector documentation for details.
366
+ */
245
367
  faceDetectorSettings?: object;
368
+ /**
369
+ * Callback invoked with results of face detection on the preview. See [FaceDetector documentation](facedetector/#detectionresult) for details.
370
+ * @param faces
371
+ */
246
372
  onFacesDetected?: (faces: FaceDetectionResult) => void;
373
+ /**
374
+ * A URL for an image to be shown while the camera is loading.
375
+ * @platform web
376
+ */
247
377
  poster?: string;
248
378
  };
249
379
  export declare type CameraNativeProps = {
@@ -282,3 +412,4 @@ export declare type BarCodeSettings = {
282
412
  interval?: number;
283
413
  };
284
414
  export { PermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions };
415
+ //# sourceMappingURL=Camera.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Camera.types.d.ts","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,oBAAY,UAAU;IACpB,KAAK,UA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,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,85 +1,63 @@
1
1
  import { PermissionStatus, } from 'expo-modules-core';
2
2
  export var CameraType;
3
3
  (function (CameraType) {
4
- /**
5
- * @platforms ios, android, web
6
- */
7
4
  CameraType["front"] = "front";
8
- /**
9
- * @platforms ios, android, web
10
- */
11
5
  CameraType["back"] = "back";
12
6
  })(CameraType || (CameraType = {}));
13
7
  export var FlashMode;
14
8
  (function (FlashMode) {
15
- /**
16
- * @platforms ios, android, web
17
- */
18
9
  FlashMode["on"] = "on";
19
- /**
20
- * @platforms ios, android, web
21
- */
22
10
  FlashMode["off"] = "off";
23
- /**
24
- * @platforms ios, android, web
25
- */
26
11
  FlashMode["auto"] = "auto";
27
- /**
28
- * @platforms ios, android, web
29
- */
30
12
  FlashMode["torch"] = "torch";
31
13
  })(FlashMode || (FlashMode = {}));
32
14
  export var AutoFocus;
33
15
  (function (AutoFocus) {
34
- /**
35
- * @platforms ios, android, web
36
- */
37
16
  AutoFocus["on"] = "on";
38
- /**
39
- * @platforms ios, android, web
40
- */
41
17
  AutoFocus["off"] = "off";
42
18
  /**
43
- * @platforms web
19
+ * @platform web
44
20
  */
45
21
  AutoFocus["auto"] = "auto";
46
22
  /**
47
- * @platforms web
23
+ * @platform web
48
24
  */
49
25
  AutoFocus["singleShot"] = "singleShot";
50
26
  })(AutoFocus || (AutoFocus = {}));
51
27
  export var WhiteBalance;
52
28
  (function (WhiteBalance) {
53
- /**
54
- * @platforms ios, android, web
55
- */
56
29
  WhiteBalance["auto"] = "auto";
57
30
  /**
58
- * @platforms ios, android
31
+ * @platform android
32
+ * @platform ios
59
33
  */
60
34
  WhiteBalance["sunny"] = "sunny";
61
35
  /**
62
- * @platforms ios, android
36
+ * @platform android
37
+ * @platform ios
63
38
  */
64
39
  WhiteBalance["cloudy"] = "cloudy";
65
40
  /**
66
- * @platforms ios, android
41
+ * @platform android
42
+ * @platform ios
67
43
  */
68
44
  WhiteBalance["shadow"] = "shadow";
69
45
  /**
70
- * @platforms ios, android
46
+ * @platform android
47
+ * @platform ios
71
48
  */
72
49
  WhiteBalance["incandescent"] = "incandescent";
73
50
  /**
74
- * @platforms ios, android
51
+ * @platform android
52
+ * @platform ios
75
53
  */
76
54
  WhiteBalance["fluorescent"] = "fluorescent";
77
55
  /**
78
- * @platforms web
56
+ * @platform web
79
57
  */
80
58
  WhiteBalance["continuous"] = "continuous";
81
59
  /**
82
- * @platforms web
60
+ * @platform web
83
61
  */
84
62
  WhiteBalance["manual"] = "manual";
85
63
  })(WhiteBalance || (WhiteBalance = {}));
@@ -90,29 +68,32 @@ export var ImageType;
90
68
  })(ImageType || (ImageType = {}));
91
69
  /**
92
70
  * This option specifies what codec to use when recording a video.
71
+ * @platform ios
93
72
  */
94
73
  export var VideoCodec;
95
74
  (function (VideoCodec) {
96
- /**
97
- * @platforms ios
98
- */
99
75
  VideoCodec["H264"] = "avc1";
100
- /**
101
- * @platforms ios
102
- */
103
76
  VideoCodec["HEVC"] = "hvc1";
104
- /**
105
- * @platforms ios
106
- */
107
77
  VideoCodec["JPEG"] = "jpeg";
108
- /**
109
- * @platforms ios
110
- */
111
78
  VideoCodec["AppleProRes422"] = "apcn";
112
- /**
113
- * @platforms ios
114
- */
115
79
  VideoCodec["AppleProRes4444"] = "ap4h";
116
80
  })(VideoCodec || (VideoCodec = {}));
81
+ // @needsAudit
82
+ export var VideoStabilization;
83
+ (function (VideoStabilization) {
84
+ VideoStabilization["off"] = "off";
85
+ VideoStabilization["standard"] = "standard";
86
+ VideoStabilization["cinematic"] = "cinematic";
87
+ VideoStabilization["auto"] = "auto";
88
+ })(VideoStabilization || (VideoStabilization = {}));
89
+ // @needsAudit
90
+ export var VideoQuality;
91
+ (function (VideoQuality) {
92
+ VideoQuality["2160p"] = "2160p";
93
+ VideoQuality["1080p"] = "1080p";
94
+ VideoQuality["720p"] = "720p";
95
+ VideoQuality["480p"] = "480p";
96
+ VideoQuality["4:3"] = "4:3";
97
+ })(VideoQuality || (VideoQuality = {}));
117
98
  export { PermissionStatus };
118
99
  //# sourceMappingURL=Camera.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Camera.types.js","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB;;OAEG;IACH,6BAAe,CAAA;IACf;;OAEG;IACH,2BAAa,CAAA;AACf,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAED,MAAM,CAAN,IAAY,SAiBX;AAjBD,WAAY,SAAS;IACnB;;OAEG;IACH,sBAAS,CAAA;IACT;;OAEG;IACH,wBAAW,CAAA;IACX;;OAEG;IACH,0BAAa,CAAA;IACb;;OAEG;IACH,4BAAe,CAAA;AACjB,CAAC,EAjBW,SAAS,KAAT,SAAS,QAiBpB;AAED,MAAM,CAAN,IAAY,SAiBX;AAjBD,WAAY,SAAS;IACnB;;OAEG;IACH,sBAAS,CAAA;IACT;;OAEG;IACH,wBAAW,CAAA;IACX;;OAEG;IACH,0BAAa,CAAA;IACb;;OAEG;IACH,sCAAyB,CAAA;AAC3B,CAAC,EAjBW,SAAS,KAAT,SAAS,QAiBpB;AAED,MAAM,CAAN,IAAY,YAiCX;AAjCD,WAAY,YAAY;IACtB;;OAEG;IACH,6BAAa,CAAA;IACb;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,6CAA6B,CAAA;IAC7B;;OAEG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,yCAAyB,CAAA;IACzB;;OAEG;IACH,iCAAiB,CAAA;AACnB,CAAC,EAjCW,YAAY,KAAZ,YAAY,QAiCvB;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACb,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAqBX;AArBD,WAAY,UAAU;IACpB;;OAEG;IACH,2BAAa,CAAA;IACb;;OAEG;IACH,2BAAa,CAAA;IACb;;OAEG;IACH,2BAAa,CAAA;IACb;;OAEG;IACH,qCAAuB,CAAA;IACvB;;OAEG;IACH,sCAAwB,CAAA;AAC1B,CAAC,EArBW,UAAU,KAAV,UAAU,QAqBrB;AA2LD,OAAO,EAAsB,gBAAgB,EAA+C,CAAC","sourcesContent":["import {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n} from 'expo-modules-core';\nimport { ViewProps } from 'react-native';\n\nexport enum CameraType {\n /**\n * @platforms ios, android, web\n */\n front = 'front',\n /**\n * @platforms ios, android, web\n */\n back = 'back',\n}\n\nexport enum FlashMode {\n /**\n * @platforms ios, android, web\n */\n on = 'on',\n /**\n * @platforms ios, android, web\n */\n off = 'off',\n /**\n * @platforms ios, android, web\n */\n auto = 'auto',\n /**\n * @platforms ios, android, web\n */\n torch = 'torch',\n}\n\nexport enum AutoFocus {\n /**\n * @platforms ios, android, web\n */\n on = 'on',\n /**\n * @platforms ios, android, web\n */\n off = 'off',\n /**\n * @platforms web\n */\n auto = 'auto',\n /**\n * @platforms web\n */\n singleShot = 'singleShot',\n}\n\nexport enum WhiteBalance {\n /**\n * @platforms ios, android, web\n */\n auto = 'auto',\n /**\n * @platforms ios, android\n */\n sunny = 'sunny',\n /**\n * @platforms ios, android\n */\n cloudy = 'cloudy',\n /**\n * @platforms ios, android\n */\n shadow = 'shadow',\n /**\n * @platforms ios, android\n */\n incandescent = 'incandescent',\n /**\n * @platforms ios, android\n */\n fluorescent = 'fluorescent',\n /**\n * @platforms web\n */\n continuous = 'continuous',\n /**\n * @platforms web\n */\n manual = 'manual',\n}\n\nexport enum ImageType {\n png = 'png',\n jpg = 'jpg',\n}\n\n/**\n * This option specifies what codec to use when recording a video.\n */\nexport enum VideoCodec {\n /**\n * @platforms ios\n */\n H264 = 'avc1',\n /**\n * @platforms ios\n */\n HEVC = 'hvc1',\n /**\n * @platforms ios\n */\n JPEG = 'jpeg',\n /**\n * @platforms ios\n */\n AppleProRes422 = 'apcn',\n /**\n * @platforms ios\n */\n AppleProRes4444 = 'ap4h',\n}\n\nexport type ImageParameters = {\n imageType: ImageType;\n quality: number | null;\n};\n\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\nexport type WebCameraSettings = Partial<{\n autoFocus: string;\n flashMode: string;\n whiteBalance: string;\n exposureCompensation: number;\n colorTemperature: number;\n iso: number;\n brightness: number;\n contrast: number;\n saturation: number;\n sharpness: number;\n focusDistance: number;\n zoom: number;\n}>;\n\nexport type CapturedPicture = {\n width: number;\n height: number;\n uri: string;\n base64?: string;\n // note(bacon): The types are currently only defined for web.\n exif?: Partial<MediaTrackSettings>;\n};\n\nexport type CameraPictureOptions = {\n quality?: number;\n base64?: boolean;\n exif?: boolean;\n onPictureSaved?: (picture: CameraCapturedPicture) => void;\n // TODO(Bacon): Is it possible to implement this in the browser?\n skipProcessing?: boolean;\n // Web-only\n scale?: number;\n imageType?: ImageType;\n isImageMirror?: boolean;\n // internal\n id?: number;\n fastMode?: boolean;\n};\n\nexport type CameraRecordingOptions = {\n maxDuration?: number;\n maxFileSize?: number;\n quality?: number | string;\n mute?: boolean;\n mirror?: boolean;\n // Android\n videoBitrate?: number;\n // iOS\n codec?: VideoCodec;\n};\n\nexport type CameraCapturedPicture = {\n width: number;\n height: number;\n uri: string;\n base64?: string;\n exif?: any;\n};\n\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CapturedPicture; id: number };\n}) => void;\n\nexport type CameraReadyListener = () => void;\n\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\nexport type CameraMountError = { message: string };\n\ntype Point = {\n x: number;\n y: number;\n};\n\nexport type BarCodePoint = Point;\n\nexport type BarCodeScanningResult = {\n type: string;\n data: string;\n /** @platform web */\n cornerPoints?: BarCodePoint[];\n};\n\nexport type Face = {\n faceID: number;\n bounds: {\n origin: Point;\n size: {\n height: number;\n width: number;\n };\n };\n rollAngle: number;\n yawAngle: number;\n smilingProbability: number;\n leftEarPosition: Point;\n rightEarPosition: Point;\n leftEyePosition: Point;\n leftEyeOpenProbability: number;\n rightEyePosition: Point;\n rightEyeOpenProbability: number;\n leftCheekPosition: Point;\n rightCheekPosition: Point;\n mouthPosition: Point;\n leftMouthPosition: Point;\n rightMouthPosition: Point;\n noseBasePosition: Point;\n};\n\nexport type FaceDetectionResult = { faces: Face[] };\n\nexport type ConstantsType = {\n Type: typeof CameraType;\n FlashMode: typeof FlashMode;\n AutoFocus: typeof AutoFocus;\n WhiteBalance: typeof WhiteBalance;\n VideoQuality: any;\n VideoStabilization: any;\n VideoCodec: typeof VideoCodec;\n};\n\nexport type CameraProps = ViewProps & {\n type?: number | keyof typeof CameraType;\n flashMode?: number | keyof typeof FlashMode;\n whiteBalance?: number | keyof typeof WhiteBalance;\n autoFocus?: boolean | number | keyof typeof AutoFocus;\n zoom?: number;\n ratio?: string;\n focusDepth?: number;\n onCameraReady?: Function;\n useCamera2Api?: boolean;\n pictureSize?: string;\n videoStabilizationMode?: number;\n onMountError?: (event: CameraMountError) => void;\n barCodeScannerSettings?: object;\n onBarCodeScanned?: (scanningResult: BarCodeScanningResult) => void;\n faceDetectorSettings?: object;\n onFacesDetected?: (faces: FaceDetectionResult) => void;\n poster?: string;\n};\n\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Function;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarCodeScanned?: (event: { nativeEvent: BarCodeScanningResult }) => void;\n onFacesDetected?: (event: { nativeEvent: FaceDetectionResult }) => void;\n onFaceDetectionError?: (event: { nativeEvent: Error }) => void;\n onPictureSaved?: PictureSavedListener;\n type?: number | string;\n flashMode?: number | string;\n autoFocus?: string | boolean | number;\n focusDepth?: number;\n zoom?: number;\n whiteBalance?: number | string;\n pictureSize?: string;\n barCodeScannerSettings?: BarCodeSettings;\n faceDetectorSettings?: object;\n barCodeScannerEnabled?: boolean;\n faceDetectorEnabled?: boolean;\n // Android\n ratio?: string;\n useCamera2Api?: boolean;\n // Web\n poster?: string;\n};\n\nexport type BarCodeSettings = {\n barCodeTypes: string[];\n interval?: number;\n};\n\nexport { PermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions };\n"]}
1
+ {"version":3,"file":"Camera.types.js","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,2BAAa,CAAA;AACf,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,SAKX;A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AY;IACtB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,2BAAa,CAAA;AACf,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAiVD,OAAO,EAAsB,gBAAgB,EAA+C,CAAC","sourcesContent":["import {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n} from 'expo-modules-core';\nimport { ViewProps } from 'react-native';\n\nexport enum CameraType {\n front = 'front',\n back = 'back',\n}\n\nexport enum FlashMode {\n on = 'on',\n off = 'off',\n auto = 'auto',\n torch = 'torch',\n}\n\nexport enum AutoFocus {\n on = 'on',\n off = 'off',\n /**\n * @platform web\n */\n auto = 'auto',\n /**\n * @platform web\n */\n singleShot = 'singleShot',\n}\n\nexport enum WhiteBalance {\n auto = 'auto',\n /**\n * @platform android\n * @platform ios\n */\n sunny = 'sunny',\n /**\n * @platform android\n * @platform ios\n */\n cloudy = 'cloudy',\n /**\n * @platform android\n * @platform ios\n */\n shadow = 'shadow',\n /**\n * @platform android\n * @platform ios\n */\n incandescent = 'incandescent',\n /**\n * @platform android\n * @platform ios\n */\n fluorescent = 'fluorescent',\n /**\n * @platform web\n */\n continuous = 'continuous',\n /**\n * @platform web\n */\n manual = 'manual',\n}\n\nexport enum ImageType {\n png = 'png',\n jpg = 'jpg',\n}\n\n/**\n * This option specifies what codec to use when recording a video.\n * @platform ios\n */\nexport enum VideoCodec {\n H264 = 'avc1',\n HEVC = 'hvc1',\n JPEG = 'jpeg',\n AppleProRes422 = 'apcn',\n AppleProRes4444 = 'ap4h',\n}\n\n// @needsAudit\nexport enum VideoStabilization {\n off = 'off',\n standard = 'standard',\n cinematic = 'cinematic',\n auto = 'auto',\n}\n\n// @needsAudit\nexport enum VideoQuality {\n '2160p' = '2160p',\n '1080p' = '1080p',\n '720p' = '720p',\n '480p' = '480p',\n '4:3' = '4:3',\n}\n\n// @needsAudit\nexport type ImageParameters = {\n imageType: ImageType;\n quality: number | null;\n};\n\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\nexport type WebCameraSettings = Partial<{\n autoFocus: string;\n flashMode: string;\n whiteBalance: string;\n exposureCompensation: number;\n colorTemperature: number;\n iso: number;\n brightness: number;\n contrast: number;\n saturation: number;\n sharpness: number;\n focusDistance: number;\n zoom: number;\n}>;\n\nexport type CameraCapturedPicture = {\n width: number;\n height: number;\n uri: string;\n base64?: string;\n exif?: Partial<MediaTrackSettings> | any;\n};\n\n// @needsAudit @docsMissing\nexport type CameraPictureOptions = {\n /**\n * Specify the quality of compression, from 0 to 1. 0 means compress for small size, 1 means compress for maximum quality.\n */\n quality?: number;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n /**\n * Whether to also include the EXIF data for the image.\n */\n exif?: boolean;\n /**\n * A callback invoked when picture is saved. If set, the promise of this method will resolve immediately with no data after picture is captured.\n * The data that it should contain will be passed to this callback. If displaying or processing a captured photo right after taking it\n * is not your case, this callback lets you skip waiting for it to be saved.\n * @param picture\n */\n onPictureSaved?: (picture: CameraCapturedPicture) => void;\n // TODO(Bacon): Is it possible to implement this in the browser?\n /**\n * If set to `true`, camera skips orientation adjustment and returns an image straight from the device's camera.\n * If enabled, `quality` option is discarded (processing pipeline is skipped as a whole).\n * Although enabling this option reduces image delivery time significantly, it may cause the image to appear in a wrong orientation\n * in the `Image` component (at the time of writing, it does not respect EXIF orientation of the images).\n * > **Note**: Enabling `skipProcessing` would cause orientation uncertainty. `Image` component does not respect EXIF\n * > stored orientation information, that means obtained image would be displayed wrongly (rotated by 90°, 180° or 270°).\n * > Different devices provide different orientations. For example some Sony Xperia or Samsung devices don't provide\n * > correctly oriented images by default. To always obtain correctly oriented image disable `skipProcessing` option.\n */\n skipProcessing?: boolean;\n /**\n * @platform web\n */\n scale?: number;\n /**\n * @platform web\n */\n imageType?: ImageType;\n /**\n * @platform web\n */\n isImageMirror?: boolean;\n /**\n * @hidden\n */\n id?: number;\n /**\n * @hidden\n */\n fastMode?: boolean;\n};\n\n// @needsAudit\nexport type CameraRecordingOptions = {\n /**\n * Maximum video duration in seconds.\n */\n maxDuration?: number;\n /**\n * Maximum video file size in bytes.\n */\n maxFileSize?: number;\n /**\n * Specify the quality of recorded video. Usage: `Camera.Constants.VideoQuality.<value>`,\n * possible values: for 16:9 resolution `2160p`, `1080p`, `720p`, `480p` : `Android only` and for 4:3 `4:3` (the size is 640x480).\n * If the chosen quality is not available for a device, the highest available is chosen.\n */\n quality?: number | string;\n /**\n * If present, video will be recorded with no sound.\n */\n mute?: boolean;\n /**\n * If `true`, the recorded video will be flipped along the vertical axis. iOS flips videos recorded with the front camera by default,\n * but you can reverse that back by setting this to `true`. On Android, this is handled in the user's device settings.\n * @platform ios\n */\n mirror?: boolean;\n /**\n * Only works if `useCamera2Api` is set to `true`. This option specifies a desired video bitrate. For example, `5*1000*1000` would be 5Mbps.\n * @platform android\n */\n videoBitrate?: number;\n /**\n * This option specifies what codec to use when recording the video. See [`Camera.Constants.VideoCodec`](#video-codec) for the possible values.\n * @platform ios\n */\n codec?: VideoCodec;\n};\n\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CameraCapturedPicture; id: number };\n}) => void;\n\nexport type CameraReadyListener = () => void;\n\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\nexport type CameraMountError = { message: string };\n\nexport type Point = {\n x: number;\n y: number;\n};\n\nexport type BarCodePoint = Point;\n\n// @needsAudit\nexport type BarCodeScanningResult = {\n /**\n * The barcode type.\n */\n type: string;\n /**\n * The information encoded in the bar code.\n */\n data: string;\n /**\n * Corner points of the bounding box.\n */\n cornerPoints?: BarCodePoint[];\n};\n\nexport type Face = {\n faceID: number;\n bounds: {\n origin: Point;\n size: {\n height: number;\n width: number;\n };\n };\n rollAngle: number;\n yawAngle: number;\n smilingProbability: number;\n leftEarPosition: Point;\n rightEarPosition: Point;\n leftEyePosition: Point;\n leftEyeOpenProbability: number;\n rightEyePosition: Point;\n rightEyeOpenProbability: number;\n leftCheekPosition: Point;\n rightCheekPosition: Point;\n mouthPosition: Point;\n leftMouthPosition: Point;\n rightMouthPosition: Point;\n noseBasePosition: Point;\n};\n\nexport type FaceDetectionResult = { faces: Face[] };\n\nexport type ConstantsType = {\n Type: CameraType;\n FlashMode: FlashMode;\n AutoFocus: AutoFocus;\n WhiteBalance: WhiteBalance;\n VideoQuality: VideoQuality;\n VideoStabilization: VideoStabilization;\n VideoCodec: VideoCodec;\n};\n\n// @needsAudit\nexport type CameraProps = ViewProps & {\n /**\n * Camera facing. Use one of `Camera.Constants.Type`. When `Type.front`, use the front-facing camera.\n * When `Type.back`, use the back-facing camera.\n * @default Type.back\n */\n type?: number | CameraType;\n /**\n * Camera flash mode. Use one of `Camera.Constants.FlashMode`. When `on`, the flash on your device will\n * turn on when taking a picture, when `off`, it won't. Setting to `auto` will fire flash if required,\n * `torch` turns on flash during the preview.\n * @default FlashMode.off\n */\n flashMode?: number | FlashMode;\n /**\n * Camera white balance. Use one of [`Camera.Constants.WhiteBalance`](#whitebalance). If a device does not support any of these values previous one is used.\n */\n whiteBalance?: number | WhiteBalance;\n /**\n * State of camera auto focus. Use one of [`Camera.Constants.AutoFocus`](#autofocus). When `on`,\n * auto focus will be enabled, when `off`, it won't and focus will lock as it was in the moment of change,\n * but it can be adjusted on some devices via `focusDepth` prop.\n */\n autoFocus?: boolean | number | AutoFocus;\n /**\n * A value between `0` and `1` being a percentage of device's max zoom. `0` - not zoomed, `1` - maximum zoom.\n * @default 0\n */\n zoom?: number;\n /**\n * A string representing aspect ratio of the preview, eg. `4:3`, `16:9`, `1:1`. To check if a ratio is supported\n * by the device use [`getSupportedRatiosAsync`](#getsupportedratiosasync).\n * @default 4:3.\n * @platform android\n */\n ratio?: string;\n /**\n * Distance to plane of the sharpest focus. A value between `0` and `1` where: `0` - infinity focus, `1` - focus as close as possible.\n * For Android this is available only for some devices and when `useCamera2Api` is set to `true`.\n * @default 0\n */\n focusDepth?: number;\n /**\n * Callback invoked when camera preview has been set.\n */\n onCameraReady?: () => void;\n /**\n * Whether to use Android's Camera2 API. See `Note` at the top of this page.\n * @platform android\n */\n useCamera2Api?: boolean;\n /**\n * A string representing the size of pictures [`takePictureAsync`](#takepictureasync) will take.\n * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).\n */\n pictureSize?: string;\n /**\n * The video stabilization mode used for a video recording. Use one of [`Camera.Constants.VideoStabilization`](#videostabilization).\n * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).\n * @platform ios\n */\n videoStabilizationMode?: number;\n /**\n * Callback invoked when camera preview could not been started.\n * @param event Error object that contains a `message`.\n */\n onMountError?: (event: CameraMountError) => void;\n /**\n * Settings exposed by [`BarCodeScanner`](bar-code-scanner) module. Supported settings: **barCodeTypes**.\n * @example\n * ```tsx\n * <Camera\n * barCodeScannerSettings={{\n * barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr],\n * }}\n * />\n * ```\n */\n barCodeScannerSettings?: object;\n /**\n * Callback that is invoked when a bar code has been successfully scanned. The callback is provided with\n * an object of the [`BarCodeScanningResult`](#barcodescanningresult) shape, where the `type`\n * refers to the bar code type that was scanned and the `data` is the information encoded in the bar code\n * (in this case of QR codes, this is often a URL). See [`BarCodeScanner.Constants.BarCodeType`](bar-code-scanner#supported-formats)\n * for supported values.\n * @param scanningResult\n */\n onBarCodeScanned?: (scanningResult: BarCodeScanningResult) => void;\n /**\n * A settings object passed directly to an underlying module providing face detection features.\n * See [`DetectionOptions`](facedetector/#detectionoptions) in FaceDetector documentation for details.\n */\n faceDetectorSettings?: object;\n /**\n * Callback invoked with results of face detection on the preview. See [FaceDetector documentation](facedetector/#detectionresult) for details.\n * @param faces\n */\n onFacesDetected?: (faces: FaceDetectionResult) => void;\n /**\n * A URL for an image to be shown while the camera is loading.\n * @platform web\n */\n poster?: string;\n};\n\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Function;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarCodeScanned?: (event: { nativeEvent: BarCodeScanningResult }) => void;\n onFacesDetected?: (event: { nativeEvent: FaceDetectionResult }) => void;\n onFaceDetectionError?: (event: { nativeEvent: Error }) => void;\n onPictureSaved?: PictureSavedListener;\n type?: number | string;\n flashMode?: number | string;\n autoFocus?: string | boolean | number;\n focusDepth?: number;\n zoom?: number;\n whiteBalance?: number | string;\n pictureSize?: string;\n barCodeScannerSettings?: BarCodeSettings;\n faceDetectorSettings?: object;\n barCodeScannerEnabled?: boolean;\n faceDetectorEnabled?: boolean;\n ratio?: string;\n useCamera2Api?: boolean;\n poster?: string;\n};\n\nexport type BarCodeSettings = {\n barCodeTypes: string[];\n interval?: number;\n};\n\nexport { PermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions };\n"]}
@@ -2,3 +2,4 @@ import * as React from 'react';
2
2
  import { CameraNativeProps } from './Camera.types';
3
3
  declare const ExponentCamera: React.ComponentType<CameraNativeProps>;
4
4
  export default ExponentCamera;
5
+ //# sourceMappingURL=ExponentCamera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentCamera.d.ts","sourceRoot":"","sources":["../src/ExponentCamera.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CACf,CAAC;AAE7C,eAAe,cAAc,CAAC"}
@@ -8,3 +8,4 @@ export interface ExponentCameraRef {
8
8
  }
9
9
  declare const ExponentCamera: React.ForwardRefExoticComponent<Pick<CameraNativeProps, "type" | "flashMode" | "autoFocus" | "whiteBalance" | "pointerEvents" | "style" | "zoom" | "ratio" | "focusDepth" | "onCameraReady" | "useCamera2Api" | "pictureSize" | "onMountError" | "barCodeScannerSettings" | "onBarCodeScanned" | "faceDetectorSettings" | "onFacesDetected" | "poster" | "onFaceDetectionError" | "onPictureSaved" | "barCodeScannerEnabled" | "faceDetectorEnabled"> & React.RefAttributes<ExponentCameraRef>>;
10
10
  export default ExponentCamera;
11
+ //# sourceMappingURL=ExponentCamera.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentCamera.web.d.ts","sourceRoot":"","sources":["../src/ExponentCamera.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EAErB,MAAM,gBAAgB,CAAC;AAOxB,MAAM,WAAW,iBAAiB;IAChC,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/D,WAAW,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC/E,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,cAAc,ieAiHnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,2 +1,3 @@
1
1
  declare const CameraManager: Record<string, any>;
2
2
  export default CameraManager;
3
+ //# sourceMappingURL=ExponentCameraManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentCameraManager.d.ts","sourceRoot":"","sources":["../src/ExponentCameraManager.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAC8C,CAAC;AAEtF,eAAe,aAAa,CAAC"}
@@ -39,3 +39,4 @@ declare const _default: {
39
39
  requestMicrophonePermissionsAsync(): Promise<PermissionResponse>;
40
40
  };
41
41
  export default _default;
42
+ //# sourceMappingURL=ExponentCameraManager.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentCameraManager.web.d.ts","sourceRoot":"","sources":["../src/ExponentCameraManager.web.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EAEpB,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgJ7B,QAAQ,OAAO,CAAC;yBAI/B,oBAAoB,UACrB,iBAAiB,GACxB,QAAQ,qBAAqB,CAAC;yBAGN,iBAAiB,GAAG,QAAQ,IAAI,CAAC;0BAGhC,iBAAiB,GAAG,QAAQ,IAAI,CAAC;oCAGvB,QAAQ,MAAM,EAAE,CAAC;oCAYjB,MAAM,UAAU,iBAAiB,GAAG,QAAQ,MAAM,EAAE,CAAC;2BAe9D,QAAQ,kBAAkB,CAAC;+BAGvB,QAAQ,kBAAkB,CAAC;iCAGzB,QAAQ,kBAAkB,CAAC;qCAGvB,QAAQ,kBAAkB,CAAC;qCAG3B,QAAQ,kBAAkB,CAAC;yCAGvB,QAAQ,kBAAkB,CAAC;;AAhGxE,wBA+GE"}