expo-camera 56.0.3 → 56.0.4
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/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/build/Camera.types.d.ts +4 -2
- package/build/Camera.types.d.ts.map +1 -1
- package/build/Camera.types.js +3 -1
- package/build/Camera.types.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.module → 56.0.4/expo.modules.camera-56.0.4.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.pom → 56.0.4/expo.modules.camera-56.0.4.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.4/expo.modules.camera-56.0.4.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/prebuilds/output/debug/xcframeworks/ExpoCamera.tar.gz +0 -0
- package/prebuilds/output/debug/xcframeworks/ExpoCameraBarcodeScanning.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoCamera.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoCameraBarcodeScanning.tar.gz +0 -0
- package/src/Camera.types.ts +4 -3
- package/src/index.ts +1 -2
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.camera/56.0.3/expo.modules.camera-56.0.3.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3-sources.jar → 56.0.4/expo.modules.camera-56.0.4-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3-sources.jar.md5 → 56.0.4/expo.modules.camera-56.0.4-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3-sources.jar.sha1 → 56.0.4/expo.modules.camera-56.0.4-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3-sources.jar.sha256 → 56.0.4/expo.modules.camera-56.0.4-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3-sources.jar.sha512 → 56.0.4/expo.modules.camera-56.0.4-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.aar → 56.0.4/expo.modules.camera-56.0.4.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.aar.md5 → 56.0.4/expo.modules.camera-56.0.4.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.aar.sha1 → 56.0.4/expo.modules.camera-56.0.4.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.aar.sha256 → 56.0.4/expo.modules.camera-56.0.4.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{56.0.3/expo.modules.camera-56.0.3.aar.sha512 → 56.0.4/expo.modules.camera-56.0.4.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.4 — 2026-05-13
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- Updated permission hook imports to be imported from `expo` instead of `expo-modules-core` ([#45565](https://github.com/expo/expo/pull/45565) by [@Wenszel](https://github.com/Wenszel))
|
|
18
|
+
|
|
13
19
|
## 56.0.3 — 2026-05-06
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,7 +4,7 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '56.0.
|
|
7
|
+
version = '56.0.4'
|
|
8
8
|
|
|
9
9
|
def barcodeScannerEnabled = findProperty('expo.camera.barcode-scanner-enabled')
|
|
10
10
|
def isBarcodeScannerEnabled = (barcodeScannerEnabled ?: "true").toString() != "false"
|
|
@@ -13,7 +13,7 @@ android {
|
|
|
13
13
|
namespace "expo.modules.camera"
|
|
14
14
|
defaultConfig {
|
|
15
15
|
versionCode 32
|
|
16
|
-
versionName "56.0.
|
|
16
|
+
versionName "56.0.4"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
package/build/Camera.types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type PermissionResponse
|
|
1
|
+
import { type PermissionResponse } from 'expo';
|
|
2
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
3
|
import type { Ref } from 'react';
|
|
3
4
|
import type { ViewProps } from 'react-native';
|
|
4
5
|
import type { AndroidBarcode } from './AndroidBarcode.types';
|
|
@@ -533,7 +534,8 @@ export type ScanningOptions = {
|
|
|
533
534
|
* The available barcode types that can be scanned.
|
|
534
535
|
*/
|
|
535
536
|
export type BarcodeType = 'aztec' | 'ean13' | 'ean8' | 'qr' | 'pdf417' | 'upc_e' | 'datamatrix' | 'code39' | 'code93' | 'itf14' | 'codabar' | 'code128' | 'upc_a';
|
|
536
|
-
export { type PermissionResponse, PermissionStatus, type PermissionExpiration, type PermissionHookOptions,
|
|
537
|
+
export { type PermissionResponse, PermissionStatus, type PermissionExpiration, type PermissionHookOptions, } from 'expo';
|
|
538
|
+
export { type EventSubscription as Subscription } from 'expo-modules-core';
|
|
537
539
|
export type PhotoResult = {
|
|
538
540
|
/**
|
|
539
541
|
* A URI to the modified image (usable as the source for an `Image` or `Video` element).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.types.d.ts","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Camera.types.d.ts","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAA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AA6B,EAAE,OAAO,CAAC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,CACzB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,WAAW,EAAE,KACzB,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACtC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACtE,QAAQ,CAAC,6BAA6B,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,QAAQ,CAAC,6BAA6B,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,QAAQ,CAAC,iCAAiC,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9E,QAAQ,CAAC,4BAA4B,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,UAAU,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;CAC7E"}
|
package/build/Camera.types.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import {} from 'expo';
|
|
1
2
|
import { NativeModule } from 'expo-modules-core';
|
|
2
3
|
// TODO(@kitten): Remove re-exports from EMC
|
|
3
|
-
export { PermissionStatus, } from 'expo
|
|
4
|
+
export { PermissionStatus, } from 'expo';
|
|
5
|
+
export {} from 'expo-modules-core';
|
|
4
6
|
//# sourceMappingURL=Camera.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.types.js","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA0kB1E,4CAA4C;AAC5C,OAAO,EAEL,gBAAgB,GAIjB,MAAM,mBAAmB,CAAC","sourcesContent":["import { type PermissionResponse, NativeModule } from 'expo-modules-core';\nimport type { Ref } from 'react';\nimport type { ViewProps } from 'react-native';\n\nimport type { AndroidBarcode } from './AndroidBarcode.types';\nimport type { PictureRef } from './PictureRef';\n\nexport type CameraType = 'front' | 'back';\n\n/**\n * Flash mode for the camera.\n * - `off` - Flash is disabled.\n * - `on` - Flash will fire for every capture.\n * - `auto` - Flash will fire automatically when required.\n * - `screen` - Uses the device screen as a flash for front camera selfies.\n * On Android, this uses CameraX's dedicated screen flash mode.\n * On iOS, this maps to 'on' which triggers Retina Flash automatically.\n */\nexport type FlashMode = 'off' | 'on' | 'auto' | 'screen';\n\nexport type ImageType = 'png' | 'jpg';\n\nexport type CameraMode = 'picture' | 'video';\n\nexport type CameraRatio = '4:3' | '16:9' | '1:1';\n\n/**\n * This option specifies the mode of focus on the device.\n * - `on` - Indicates that the device should autofocus once and then lock the focus.\n * - `off` - Indicates that the device should automatically focus when needed.\n * @default off\n */\nexport type FocusMode = 'on' | 'off';\n\n/**\n * This option specifies what codec to use when recording a video.\n * @platform ios\n */\nexport type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';\n\n/**\n * This option specifies the stabilization mode to use when recording a video.\n * - `off` - No stabilization.\n * - `standard` - Standard stabilization.\n * - `cinematic` - Cinematic stabilization (provides more aggressive stabilization).\n * - `auto` - The system automatically chooses the best stabilization mode.\n *\n * On Android, `standard`, `cinematic`, and `auto` all enable video stabilization,\n * while `off` disables it. The specific stabilization method is determined by the device.\n */\nexport type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';\n\n// @docsMissing\nexport type VideoQuality = '2160p' | '1080p' | '720p' | '480p' | '4:3';\n\nexport type CameraOrientation =\n | 'portrait'\n | 'portraitUpsideDown'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type WebCameraSettings = {\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\n// @needsAudit\nexport type CameraCapturedPicture = {\n /**\n * Captured image width.\n */\n width: number;\n /**\n * Captured image height.\n */\n height: number;\n /**\n * The format of the captured image.\n */\n format: 'jpg' | 'png';\n /**\n * On web, the value of `uri` is the same as `base64` because file system URLs are not supported in the browser.\n */\n uri: string;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n /**\n * On Android and iOS this object may include various fields based on the device and operating system.\n * On web, it is a partial representation of the [`MediaTrackSettings`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings) dictionary.\n */\n exif?: Partial<MediaTrackSettings> | any;\n};\n\n// @needsAudit\nexport type CameraPictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n * @default 1\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 * Additional EXIF data to be included for the image. Only useful when `exif` option is set to `true`.\n * @platform android\n * @platform ios\n */\n additionalExif?: Record<string, any>;\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 * When set to `true`, the output image will be flipped along the vertical axis when using the front camera.\n * @default false\n * @platform ios\n * @platform android\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * @hidden\n */\n id?: number;\n /**\n * @hidden\n */\n fastMode?: boolean;\n /**\n * @hidden\n */\n maxDownsampling?: number;\n /**\n * To programmatically disable the camera shutter sound\n * @default true\n */\n shutterSound?: boolean;\n /**\n * Whether the camera should return an image ref that can be used directly in the `Image` component.\n */\n pictureRef?: 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 * 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 * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * This option specifies what codec to use when recording the video. See [`VideoCodec`](#videocodec) for the possible values.\n * @platform ios\n */\n codec?: VideoCodec;\n};\n\n/**\n * @hidden\n */\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CameraCapturedPicture; id: number };\n}) => void;\n\n/**\n * @hidden\n */\nexport type AvailableLensesChangedListener = (event: { nativeEvent: AvailableLenses }) => void;\n\n// @docsMissing\nexport type AvailableLenses = { lenses: string[] };\n\n/**\n * @hidden\n */\nexport type CameraReadyListener = () => void;\n\n/**\n * @hidden\n */\nexport type ResponsiveOrientationChangedListener = (event: {\n nativeEvent: ResponsiveOrientationChanged;\n}) => void;\n\nexport type ResponsiveOrientationChanged = { orientation: CameraOrientation };\n\n/**\n * @hidden\n */\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\n// @docsMissing\nexport type CameraMountError = { message: string };\n\n// @docsMissing\nexport type Point = {\n x: number;\n y: number;\n};\n\nexport type BarcodeSize = {\n /**\n * The height value.\n */\n height: number;\n /**\n * The width value.\n */\n width: number;\n};\n\n/**\n * These coordinates are represented in the coordinate space of the camera source (e.g. when you\n * are using the camera view, these values are adjusted to the dimensions of the view).\n */\nexport type BarcodePoint = Point;\n\nexport type BarcodeBounds = {\n /**\n * The origin point of the bounding box.\n */\n origin: BarcodePoint;\n /**\n * The size of the bounding box.\n */\n size: BarcodeSize;\n};\n\n// @needsAudit\nexport type BarcodeScanningResult = {\n /**\n * The barcode type.\n */\n type: string;\n /**\n * The parsed information encoded in the barcode.\n */\n data: string;\n /**\n * The raw information encoded in the barcode.\n * May be different from `data` depending on the barcode type.\n * @platform android\n * @hidden\n */\n raw?: string;\n /**\n * Corner points of the bounding box.\n * `cornerPoints` is not always available and may be empty. On iOS, for `code39` and `pdf417`\n * you don't get this value.\n *\n * **Note:** Corner points order is currently different across platforms. On Android,\n * [Google MLKit's native order](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode#getCornerPoints())\n * is used, which is `topLeft`, `topRight`, `bottomRight`, `bottomLeft`.\n * On iOS, the order is `bottomLeft`, `bottomRight`, `topLeft`, `topRight`. On Web, the order is\n * `topLeft`, `topRight`, `bottomRight`, `bottomLeft` (matching Android/BarcodeDetector order).\n *\n */\n cornerPoints: BarcodePoint[];\n /**\n * The [`BarcodeBounds`](#barcodebounds) object.\n * `bounds` in some case will be representing an empty rectangle.\n * Moreover, `bounds` doesn't have to bound the whole barcode.\n * For some types, they will represent the area used by the scanner.\n */\n bounds: BarcodeBounds;\n\n /**\n * Extra information returned by the specific type of barcode.\n * @platform android\n */\n extra?: AndroidBarcode;\n};\n\nexport type ScanningResult = Omit<BarcodeScanningResult, 'bounds' | 'cornerPoints'>;\n\n// @needsAudit\nexport type CameraViewProps = ViewProps & {\n /**\n * Camera facing. Use one of `CameraType`. When `front`, use the front-facing camera.\n * When `back`, use the back-facing camera.\n * @default 'back'\n */\n facing?: CameraType;\n /**\n * Camera flash mode. Use one of `FlashMode` values. When `on`, the flash on your device will\n * turn on when taking a picture. When `off`, it won't. Setting it to `auto` will fire flash if required.\n * @default 'off'\n */\n flash?: FlashMode;\n /**\n * A value between `0` and `1` being a percentage of device's max zoom, where `0` means not zoomed and `1` means maximum zoom.\n * @default 0\n */\n zoom?: number;\n /**\n * Used to select image or video output.\n * @default 'picture'\n */\n mode?: CameraMode;\n /**\n * If present, video will be recorded with no sound.\n * @default false\n */\n mute?: boolean;\n /**\n * A boolean that determines whether the camera should mirror the image when using the front camera.\n * @default false\n */\n mirror?: boolean;\n /**\n * Indicates the focus mode to use.\n * @default off\n * @platform ios\n */\n autofocus?: FocusMode;\n /**\n * A boolean that determines whether the camera should be active.\n * Useful in situations where the camera may not have unmounted but you still want to stop the camera session.\n * @default true\n * @platform ios\n */\n active?: boolean;\n /**\n * Specify the quality of the recorded video. Use one of `VideoQuality` possible values:\n * 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 videoQuality?: VideoQuality;\n /**\n * The bitrate of the video recording in bits per second.\n * Note: On iOS, you must specify the video codec when calling `recordAsync` to use this option.\n * @example 10_000_000\n */\n videoBitrate?: number;\n /**\n * A boolean that determines whether the camera shutter animation should be enabled.\n * @default true\n */\n animateShutter?: boolean;\n /**\n * A string representing the size of pictures [`takePictureAsync`](#takepictureasyncoptions) will take.\n * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).\n * Setting this prop will cause the `ratio` prop to be ignored as the aspect ratio is determined by the selected size.\n */\n pictureSize?: string;\n /**\n * Available lenses are emitted to the `onAvailableLensesChanged` callback whenever the currently selected camera changes or by calling [`getAvailableLensesAsync`](#getavailablelensesasync).\n * You can read more about the available lenses in the [Apple documentation](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct).\n * @platform ios\n * @default 'builtInWideAngleCamera'\n */\n selectedLens?: string;\n /**\n * A boolean to enable or disable the torch.\n * @default false\n */\n enableTorch?: boolean;\n /**\n * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).\n * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).\n * @default 'auto'\n */\n videoStabilizationMode?: VideoStabilization;\n /**\n * @example\n * ```tsx\n * <CameraView\n * barcodeScannerSettings={{\n * barcodeTypes: [\"qr\"],\n * }}\n * />\n * ```\n */\n barcodeScannerSettings?: BarcodeSettings;\n /**\n * A URL for an image to be shown while the camera is loading.\n * @platform web\n */\n poster?: string;\n /**\n * Whether to allow responsive orientation of the camera when the screen orientation is locked (that is, when set to `true`,\n * landscape photos will be taken if the device is turned that way, even if the app or device orientation is locked to portrait).\n * @platform ios\n */\n responsiveOrientationWhenOrientationLocked?: boolean;\n /**\n * A string representing the aspect ratio of the preview. For example, `4:3` and `16:9`.\n * Note: Setting the aspect ratio here will change the scaleType of the camera preview from `FILL` to `FIT`.\n * Also, when using 1:1, devices only support certain sizes. If you specify an unsupported size, the closest supported ratio will be used.\n * @platform android\n */\n ratio?: CameraRatio;\n /**\n * Callback invoked when camera preview has been set.\n */\n onCameraReady?: () => void;\n /**\n * Callback invoked when camera preview could not start.\n * @param event Error object that contains a `message`.\n */\n onMountError?: (event: CameraMountError) => void;\n /**\n * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with\n * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`\n * refers to the barcode type that was scanned, and the `data` is the information encoded in the barcode\n * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.\n * @param scanningResult\n */\n onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;\n /**\n * Callback invoked when responsive orientation changes. Only applicable if `responsiveOrientationWhenOrientationLocked` is `true`.\n * @param event result object that contains updated orientation of camera\n * @platform ios\n */\n onResponsiveOrientationChanged?: (event: ResponsiveOrientationChanged) => void;\n /**\n * Callback invoked when the cameras available lenses change.\n * @param event result object that contains a `lenses` property containing an array of available lenses.\n * @platform ios\n */\n onAvailableLensesChanged?: (event: AvailableLenses) => void;\n};\n\n/**\n * @hidden\n */\nexport interface CameraViewRef {\n readonly takePicture: (options: CameraPictureOptions) => Promise<CameraCapturedPicture>;\n readonly takePictureRef?: (options: CameraPictureOptions) => Promise<PictureRef>;\n readonly getAvailablePictureSizes: () => Promise<string[]>;\n readonly getAvailableLenses: () => Promise<string[]>;\n readonly record: (options?: CameraRecordingOptions) => Promise<{ uri: string }>;\n readonly toggleRecording: () => Promise<void>;\n readonly stopRecording: () => Promise<void>;\n readonly launchModernScanner: () => Promise<void>;\n readonly resumePreview: () => Promise<void>;\n readonly pausePreview: () => Promise<void>;\n}\n\n/**\n * @hidden\n */\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Ref<CameraViewRef>;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarcodeScanned?: (event: { nativeEvent: BarcodeScanningResult }) => void;\n onPictureSaved?: PictureSavedListener;\n onResponsiveOrientationChanged?: ResponsiveOrientationChangedListener;\n onAvailableLensesChanged?: AvailableLensesChangedListener;\n facing?: string;\n flashMode?: string;\n enableTorch?: boolean;\n animateShutter?: boolean;\n autoFocus?: FocusMode;\n mute?: boolean;\n zoom?: number;\n ratio?: CameraRatio;\n barcodeScannerSettings?: BarcodeSettings;\n barcodeScannerEnabled?: boolean;\n poster?: string;\n responsiveOrientationWhenOrientationLocked?: boolean;\n};\n\n// @docsMissing\nexport type BarcodeSettings = {\n barcodeTypes: BarcodeType[];\n};\n\n/**\n * @platform ios\n */\nexport type ScanningOptions = {\n /**\n * The type of codes to scan for.\n */\n barcodeTypes: BarcodeType[];\n /**\n * Indicates whether people can use a two-finger pinch-to-zoom gesture.\n * @platform ios\n * @default true\n */\n isPinchToZoomEnabled?: boolean;\n /**\n * Guidance text, such as “Slow Down,” appears over the live video.\n * @platform ios\n * @default true\n */\n isGuidanceEnabled?: boolean;\n /**\n * Indicates whether the scanner displays highlights around recognized items.\n * @platform ios\n * @default false\n */\n isHighlightingEnabled?: boolean;\n};\n\n/**\n * The available barcode types that can be scanned.\n */\nexport type BarcodeType =\n | 'aztec'\n | 'ean13'\n | 'ean8'\n | 'qr'\n | 'pdf417'\n | 'upc_e'\n | 'datamatrix'\n | 'code39'\n | 'code93'\n | 'itf14'\n | 'codabar'\n | 'code128'\n | 'upc_a';\n\n// TODO(@kitten): Remove re-exports from EMC\nexport {\n type PermissionResponse,\n PermissionStatus,\n type PermissionExpiration,\n type PermissionHookOptions,\n type EventSubscription as Subscription,\n} from 'expo-modules-core';\n\nexport type PhotoResult = {\n /**\n * A URI to the modified image (usable as the source for an `Image` or `Video` element).\n */\n uri: string;\n /**\n * Width of the image.\n */\n width: number;\n /**\n * Height of the image.\n */\n height: number;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n};\n\n// @needsAudit\n/**\n * A map defining how modified image should be saved.\n */\nexport type SavePictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n */\n quality?: number;\n /**\n * Additional metadata to be included for the image.\n */\n metadata?: Record<string, any>;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n};\n\nexport type CameraEvents = {\n onModernBarcodeScanned: (event: ScanningResult) => void;\n};\nexport declare class CameraNativeModule extends NativeModule<CameraEvents> {\n /**\n * @hidden\n */\n Picture: typeof PictureRef;\n\n readonly isModernBarcodeScannerAvailable: boolean;\n readonly toggleRecordingAsyncAvailable: boolean;\n readonly isAvailableAsync: () => Promise<boolean>;\n readonly launchScanner: (options?: ScanningOptions) => Promise<void>;\n readonly dismissScanner: () => Promise<void>;\n readonly scanFromURLAsync: (\n url: string,\n barcodeTypes?: BarcodeType[]\n ) => Promise<BarcodeScanningResult[]>;\n readonly getCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly getAvailableVideoCodecsAsync: () => Promise<VideoCodec[]>;\n\n readonly Type: Record<keyof CameraType, CameraNativeProps['facing']>;\n readonly FlashMode: Record<keyof FlashMode, CameraNativeProps['flashMode']>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Camera.types.js","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA0kBjD,4CAA4C;AAC5C,OAAO,EAEL,gBAAgB,GAGjB,MAAM,MAAM,CAAC;AACd,OAAO,EAA0C,MAAM,mBAAmB,CAAC","sourcesContent":["import { type PermissionResponse } from 'expo';\nimport { NativeModule } from 'expo-modules-core';\nimport type { Ref } from 'react';\nimport type { ViewProps } from 'react-native';\n\nimport type { AndroidBarcode } from './AndroidBarcode.types';\nimport type { PictureRef } from './PictureRef';\n\nexport type CameraType = 'front' | 'back';\n\n/**\n * Flash mode for the camera.\n * - `off` - Flash is disabled.\n * - `on` - Flash will fire for every capture.\n * - `auto` - Flash will fire automatically when required.\n * - `screen` - Uses the device screen as a flash for front camera selfies.\n * On Android, this uses CameraX's dedicated screen flash mode.\n * On iOS, this maps to 'on' which triggers Retina Flash automatically.\n */\nexport type FlashMode = 'off' | 'on' | 'auto' | 'screen';\n\nexport type ImageType = 'png' | 'jpg';\n\nexport type CameraMode = 'picture' | 'video';\n\nexport type CameraRatio = '4:3' | '16:9' | '1:1';\n\n/**\n * This option specifies the mode of focus on the device.\n * - `on` - Indicates that the device should autofocus once and then lock the focus.\n * - `off` - Indicates that the device should automatically focus when needed.\n * @default off\n */\nexport type FocusMode = 'on' | 'off';\n\n/**\n * This option specifies what codec to use when recording a video.\n * @platform ios\n */\nexport type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';\n\n/**\n * This option specifies the stabilization mode to use when recording a video.\n * - `off` - No stabilization.\n * - `standard` - Standard stabilization.\n * - `cinematic` - Cinematic stabilization (provides more aggressive stabilization).\n * - `auto` - The system automatically chooses the best stabilization mode.\n *\n * On Android, `standard`, `cinematic`, and `auto` all enable video stabilization,\n * while `off` disables it. The specific stabilization method is determined by the device.\n */\nexport type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';\n\n// @docsMissing\nexport type VideoQuality = '2160p' | '1080p' | '720p' | '480p' | '4:3';\n\nexport type CameraOrientation =\n | 'portrait'\n | 'portraitUpsideDown'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type WebCameraSettings = {\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\n// @needsAudit\nexport type CameraCapturedPicture = {\n /**\n * Captured image width.\n */\n width: number;\n /**\n * Captured image height.\n */\n height: number;\n /**\n * The format of the captured image.\n */\n format: 'jpg' | 'png';\n /**\n * On web, the value of `uri` is the same as `base64` because file system URLs are not supported in the browser.\n */\n uri: string;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n /**\n * On Android and iOS this object may include various fields based on the device and operating system.\n * On web, it is a partial representation of the [`MediaTrackSettings`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings) dictionary.\n */\n exif?: Partial<MediaTrackSettings> | any;\n};\n\n// @needsAudit\nexport type CameraPictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n * @default 1\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 * Additional EXIF data to be included for the image. Only useful when `exif` option is set to `true`.\n * @platform android\n * @platform ios\n */\n additionalExif?: Record<string, any>;\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 * When set to `true`, the output image will be flipped along the vertical axis when using the front camera.\n * @default false\n * @platform ios\n * @platform android\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * @hidden\n */\n id?: number;\n /**\n * @hidden\n */\n fastMode?: boolean;\n /**\n * @hidden\n */\n maxDownsampling?: number;\n /**\n * To programmatically disable the camera shutter sound\n * @default true\n */\n shutterSound?: boolean;\n /**\n * Whether the camera should return an image ref that can be used directly in the `Image` component.\n */\n pictureRef?: 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 * 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 * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * This option specifies what codec to use when recording the video. See [`VideoCodec`](#videocodec) for the possible values.\n * @platform ios\n */\n codec?: VideoCodec;\n};\n\n/**\n * @hidden\n */\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CameraCapturedPicture; id: number };\n}) => void;\n\n/**\n * @hidden\n */\nexport type AvailableLensesChangedListener = (event: { nativeEvent: AvailableLenses }) => void;\n\n// @docsMissing\nexport type AvailableLenses = { lenses: string[] };\n\n/**\n * @hidden\n */\nexport type CameraReadyListener = () => void;\n\n/**\n * @hidden\n */\nexport type ResponsiveOrientationChangedListener = (event: {\n nativeEvent: ResponsiveOrientationChanged;\n}) => void;\n\nexport type ResponsiveOrientationChanged = { orientation: CameraOrientation };\n\n/**\n * @hidden\n */\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\n// @docsMissing\nexport type CameraMountError = { message: string };\n\n// @docsMissing\nexport type Point = {\n x: number;\n y: number;\n};\n\nexport type BarcodeSize = {\n /**\n * The height value.\n */\n height: number;\n /**\n * The width value.\n */\n width: number;\n};\n\n/**\n * These coordinates are represented in the coordinate space of the camera source (e.g. when you\n * are using the camera view, these values are adjusted to the dimensions of the view).\n */\nexport type BarcodePoint = Point;\n\nexport type BarcodeBounds = {\n /**\n * The origin point of the bounding box.\n */\n origin: BarcodePoint;\n /**\n * The size of the bounding box.\n */\n size: BarcodeSize;\n};\n\n// @needsAudit\nexport type BarcodeScanningResult = {\n /**\n * The barcode type.\n */\n type: string;\n /**\n * The parsed information encoded in the barcode.\n */\n data: string;\n /**\n * The raw information encoded in the barcode.\n * May be different from `data` depending on the barcode type.\n * @platform android\n * @hidden\n */\n raw?: string;\n /**\n * Corner points of the bounding box.\n * `cornerPoints` is not always available and may be empty. On iOS, for `code39` and `pdf417`\n * you don't get this value.\n *\n * **Note:** Corner points order is currently different across platforms. On Android,\n * [Google MLKit's native order](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode#getCornerPoints())\n * is used, which is `topLeft`, `topRight`, `bottomRight`, `bottomLeft`.\n * On iOS, the order is `bottomLeft`, `bottomRight`, `topLeft`, `topRight`. On Web, the order is\n * `topLeft`, `topRight`, `bottomRight`, `bottomLeft` (matching Android/BarcodeDetector order).\n *\n */\n cornerPoints: BarcodePoint[];\n /**\n * The [`BarcodeBounds`](#barcodebounds) object.\n * `bounds` in some case will be representing an empty rectangle.\n * Moreover, `bounds` doesn't have to bound the whole barcode.\n * For some types, they will represent the area used by the scanner.\n */\n bounds: BarcodeBounds;\n\n /**\n * Extra information returned by the specific type of barcode.\n * @platform android\n */\n extra?: AndroidBarcode;\n};\n\nexport type ScanningResult = Omit<BarcodeScanningResult, 'bounds' | 'cornerPoints'>;\n\n// @needsAudit\nexport type CameraViewProps = ViewProps & {\n /**\n * Camera facing. Use one of `CameraType`. When `front`, use the front-facing camera.\n * When `back`, use the back-facing camera.\n * @default 'back'\n */\n facing?: CameraType;\n /**\n * Camera flash mode. Use one of `FlashMode` values. When `on`, the flash on your device will\n * turn on when taking a picture. When `off`, it won't. Setting it to `auto` will fire flash if required.\n * @default 'off'\n */\n flash?: FlashMode;\n /**\n * A value between `0` and `1` being a percentage of device's max zoom, where `0` means not zoomed and `1` means maximum zoom.\n * @default 0\n */\n zoom?: number;\n /**\n * Used to select image or video output.\n * @default 'picture'\n */\n mode?: CameraMode;\n /**\n * If present, video will be recorded with no sound.\n * @default false\n */\n mute?: boolean;\n /**\n * A boolean that determines whether the camera should mirror the image when using the front camera.\n * @default false\n */\n mirror?: boolean;\n /**\n * Indicates the focus mode to use.\n * @default off\n * @platform ios\n */\n autofocus?: FocusMode;\n /**\n * A boolean that determines whether the camera should be active.\n * Useful in situations where the camera may not have unmounted but you still want to stop the camera session.\n * @default true\n * @platform ios\n */\n active?: boolean;\n /**\n * Specify the quality of the recorded video. Use one of `VideoQuality` possible values:\n * 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 videoQuality?: VideoQuality;\n /**\n * The bitrate of the video recording in bits per second.\n * Note: On iOS, you must specify the video codec when calling `recordAsync` to use this option.\n * @example 10_000_000\n */\n videoBitrate?: number;\n /**\n * A boolean that determines whether the camera shutter animation should be enabled.\n * @default true\n */\n animateShutter?: boolean;\n /**\n * A string representing the size of pictures [`takePictureAsync`](#takepictureasyncoptions) will take.\n * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).\n * Setting this prop will cause the `ratio` prop to be ignored as the aspect ratio is determined by the selected size.\n */\n pictureSize?: string;\n /**\n * Available lenses are emitted to the `onAvailableLensesChanged` callback whenever the currently selected camera changes or by calling [`getAvailableLensesAsync`](#getavailablelensesasync).\n * You can read more about the available lenses in the [Apple documentation](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct).\n * @platform ios\n * @default 'builtInWideAngleCamera'\n */\n selectedLens?: string;\n /**\n * A boolean to enable or disable the torch.\n * @default false\n */\n enableTorch?: boolean;\n /**\n * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).\n * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).\n * @default 'auto'\n */\n videoStabilizationMode?: VideoStabilization;\n /**\n * @example\n * ```tsx\n * <CameraView\n * barcodeScannerSettings={{\n * barcodeTypes: [\"qr\"],\n * }}\n * />\n * ```\n */\n barcodeScannerSettings?: BarcodeSettings;\n /**\n * A URL for an image to be shown while the camera is loading.\n * @platform web\n */\n poster?: string;\n /**\n * Whether to allow responsive orientation of the camera when the screen orientation is locked (that is, when set to `true`,\n * landscape photos will be taken if the device is turned that way, even if the app or device orientation is locked to portrait).\n * @platform ios\n */\n responsiveOrientationWhenOrientationLocked?: boolean;\n /**\n * A string representing the aspect ratio of the preview. For example, `4:3` and `16:9`.\n * Note: Setting the aspect ratio here will change the scaleType of the camera preview from `FILL` to `FIT`.\n * Also, when using 1:1, devices only support certain sizes. If you specify an unsupported size, the closest supported ratio will be used.\n * @platform android\n */\n ratio?: CameraRatio;\n /**\n * Callback invoked when camera preview has been set.\n */\n onCameraReady?: () => void;\n /**\n * Callback invoked when camera preview could not start.\n * @param event Error object that contains a `message`.\n */\n onMountError?: (event: CameraMountError) => void;\n /**\n * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with\n * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`\n * refers to the barcode type that was scanned, and the `data` is the information encoded in the barcode\n * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.\n * @param scanningResult\n */\n onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;\n /**\n * Callback invoked when responsive orientation changes. Only applicable if `responsiveOrientationWhenOrientationLocked` is `true`.\n * @param event result object that contains updated orientation of camera\n * @platform ios\n */\n onResponsiveOrientationChanged?: (event: ResponsiveOrientationChanged) => void;\n /**\n * Callback invoked when the cameras available lenses change.\n * @param event result object that contains a `lenses` property containing an array of available lenses.\n * @platform ios\n */\n onAvailableLensesChanged?: (event: AvailableLenses) => void;\n};\n\n/**\n * @hidden\n */\nexport interface CameraViewRef {\n readonly takePicture: (options: CameraPictureOptions) => Promise<CameraCapturedPicture>;\n readonly takePictureRef?: (options: CameraPictureOptions) => Promise<PictureRef>;\n readonly getAvailablePictureSizes: () => Promise<string[]>;\n readonly getAvailableLenses: () => Promise<string[]>;\n readonly record: (options?: CameraRecordingOptions) => Promise<{ uri: string }>;\n readonly toggleRecording: () => Promise<void>;\n readonly stopRecording: () => Promise<void>;\n readonly launchModernScanner: () => Promise<void>;\n readonly resumePreview: () => Promise<void>;\n readonly pausePreview: () => Promise<void>;\n}\n\n/**\n * @hidden\n */\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Ref<CameraViewRef>;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarcodeScanned?: (event: { nativeEvent: BarcodeScanningResult }) => void;\n onPictureSaved?: PictureSavedListener;\n onResponsiveOrientationChanged?: ResponsiveOrientationChangedListener;\n onAvailableLensesChanged?: AvailableLensesChangedListener;\n facing?: string;\n flashMode?: string;\n enableTorch?: boolean;\n animateShutter?: boolean;\n autoFocus?: FocusMode;\n mute?: boolean;\n zoom?: number;\n ratio?: CameraRatio;\n barcodeScannerSettings?: BarcodeSettings;\n barcodeScannerEnabled?: boolean;\n poster?: string;\n responsiveOrientationWhenOrientationLocked?: boolean;\n};\n\n// @docsMissing\nexport type BarcodeSettings = {\n barcodeTypes: BarcodeType[];\n};\n\n/**\n * @platform ios\n */\nexport type ScanningOptions = {\n /**\n * The type of codes to scan for.\n */\n barcodeTypes: BarcodeType[];\n /**\n * Indicates whether people can use a two-finger pinch-to-zoom gesture.\n * @platform ios\n * @default true\n */\n isPinchToZoomEnabled?: boolean;\n /**\n * Guidance text, such as “Slow Down,” appears over the live video.\n * @platform ios\n * @default true\n */\n isGuidanceEnabled?: boolean;\n /**\n * Indicates whether the scanner displays highlights around recognized items.\n * @platform ios\n * @default false\n */\n isHighlightingEnabled?: boolean;\n};\n\n/**\n * The available barcode types that can be scanned.\n */\nexport type BarcodeType =\n | 'aztec'\n | 'ean13'\n | 'ean8'\n | 'qr'\n | 'pdf417'\n | 'upc_e'\n | 'datamatrix'\n | 'code39'\n | 'code93'\n | 'itf14'\n | 'codabar'\n | 'code128'\n | 'upc_a';\n\n// TODO(@kitten): Remove re-exports from EMC\nexport {\n type PermissionResponse,\n PermissionStatus,\n type PermissionExpiration,\n type PermissionHookOptions,\n} from 'expo';\nexport { type EventSubscription as Subscription } from 'expo-modules-core';\n\nexport type PhotoResult = {\n /**\n * A URI to the modified image (usable as the source for an `Image` or `Video` element).\n */\n uri: string;\n /**\n * Width of the image.\n */\n width: number;\n /**\n * Height of the image.\n */\n height: number;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n};\n\n// @needsAudit\n/**\n * A map defining how modified image should be saved.\n */\nexport type SavePictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n */\n quality?: number;\n /**\n * Additional metadata to be included for the image.\n */\n metadata?: Record<string, any>;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n};\n\nexport type CameraEvents = {\n onModernBarcodeScanned: (event: ScanningResult) => void;\n};\nexport declare class CameraNativeModule extends NativeModule<CameraEvents> {\n /**\n * @hidden\n */\n Picture: typeof PictureRef;\n\n readonly isModernBarcodeScannerAvailable: boolean;\n readonly toggleRecordingAsyncAvailable: boolean;\n readonly isAvailableAsync: () => Promise<boolean>;\n readonly launchScanner: (options?: ScanningOptions) => Promise<void>;\n readonly dismissScanner: () => Promise<void>;\n readonly scanFromURLAsync: (\n url: string,\n barcodeTypes?: BarcodeType[]\n ) => Promise<BarcodeScanningResult[]>;\n readonly getCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly getAvailableVideoCodecsAsync: () => Promise<VideoCodec[]>;\n\n readonly Type: Record<keyof CameraType, CameraNativeProps['facing']>;\n readonly FlashMode: Record<keyof FlashMode, CameraNativeProps['flashMode']>;\n}\n"]}
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAGrD;;;GAGG;AACH,iBAAe,yBAAyB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEtE;AAGD;;;;GAIG;AACH,iBAAe,6BAA6B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAE1E;AAGD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,wLAG/B,CAAC;AAGH;;;GAGG;AACH,iBAAe,6BAA6B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAE1E;AAGD;;;;GAIG;AACH,iBAAe,iCAAiC,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAE9E;AAGD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,wLAGnC,CAAC;AAEH;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,WAAW,EAAW,GACnC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAElC;AAED,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA2B,MAAM,MAAM,CAAC;AAGrE,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,cAAc;AACd;;;GAGG;AACH,KAAK,UAAU,yBAAyB;IACtC,OAAO,aAAa,CAAC,yBAAyB,EAAE,CAAC;AACnD,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,KAAK,UAAU,6BAA6B;IAC1C,OAAO,aAAa,CAAC,6BAA6B,EAAE,CAAC;AACvD,CAAC;AAED,cAAc;AACd;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;IACvD,SAAS,EAAE,yBAAyB;IACpC,aAAa,EAAE,6BAA6B;CAC7C,CAAC,CAAC;AAEH,cAAc;AACd;;;GAGG;AACH,KAAK,UAAU,6BAA6B;IAC1C,OAAO,aAAa,CAAC,6BAA6B,EAAE,CAAC;AACvD,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,KAAK,UAAU,iCAAiC;IAC9C,OAAO,aAAa,CAAC,iCAAiC,EAAE,CAAC;AAC3D,CAAC;AAED,cAAc;AACd;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;IAC3D,SAAS,EAAE,6BAA6B;IACxC,aAAa,EAAE,iCAAiC;CACjD,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,GAAW,EACX,eAA8B,CAAC,IAAI,CAAC;IAEpC,OAAO,aAAa,CAAC,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC3D,CAAC;AAED,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,yBAAyB;IACzB,6BAA6B;IAC7B,6BAA6B;IAC7B,iCAAiC;IACjC,gBAAgB;CACjB,CAAC","sourcesContent":["import { createPermissionHook, type PermissionResponse } from 'expo';\n\nimport type { BarcodeScanningResult, BarcodeType } from './Camera.types';\nimport CameraManager from './ExpoCameraManager';\n\nexport { default as CameraView } from './CameraView';\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing camera.\n * @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).\n */\nasync function getCameraPermissionsAsync(): Promise<PermissionResponse> {\n return CameraManager.getCameraPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing camera.\n * On iOS this will require apps to specify an `NSCameraUsageDescription` entry in the **Info.plist**.\n * @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).\n */\nasync function requestCameraPermissionsAsync(): Promise<PermissionResponse> {\n return CameraManager.requestCameraPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the camera.\n * This uses both `requestCameraPermissionsAsync` and `getCameraPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = useCameraPermissions();\n * ```\n */\nexport const useCameraPermissions = createPermissionHook({\n getMethod: getCameraPermissionsAsync,\n requestMethod: requestCameraPermissionsAsync,\n});\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing microphone.\n * @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).\n */\nasync function getMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n return CameraManager.getMicrophonePermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing the microphone.\n * On iOS this will require apps to specify an `NSMicrophoneUsageDescription` entry in the **Info.plist**.\n * @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).\n */\nasync function requestMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n return CameraManager.requestMicrophonePermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the microphone.\n * This uses both `requestMicrophonePermissionsAsync` and `getMicrophonePermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = Camera.useMicrophonePermissions();\n * ```\n */\nexport const useMicrophonePermissions = createPermissionHook({\n getMethod: getMicrophonePermissionsAsync,\n requestMethod: requestMicrophonePermissionsAsync,\n});\n\n/**\n * Scan bar codes from the image at the given URL.\n * @param url URL to get the image from.\n * @param barcodeTypes An array of bar code types. Defaults to all supported bar code types on\n * the platform.\n * > __Note:__ Only QR codes are supported on iOS.\n * On android, the barcode should take up the majority of the image for best results.\n * @return A possibly empty array of objects of the `BarcodeScanningResult` shape, where the type\n * refers to the barcode type that was scanned and the data is the information encoded in the barcode.\n */\nexport async function scanFromURLAsync(\n url: string,\n barcodeTypes: BarcodeType[] = ['qr']\n): Promise<BarcodeScanningResult[]> {\n return CameraManager.scanFromURLAsync(url, barcodeTypes);\n}\n\nexport * from './Camera.types';\nexport * from './PictureRef';\n\n/**\n * @hidden\n */\nexport const Camera = {\n getCameraPermissionsAsync,\n requestCameraPermissionsAsync,\n getMicrophonePermissionsAsync,\n requestMicrophonePermissionsAsync,\n scanFromURLAsync,\n};\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.camera",
|
|
6
|
-
"version": "56.0.
|
|
6
|
+
"version": "56.0.4",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
],
|
|
41
41
|
"files": [
|
|
42
42
|
{
|
|
43
|
-
"name": "expo.modules.camera-56.0.
|
|
44
|
-
"url": "expo.modules.camera-56.0.
|
|
43
|
+
"name": "expo.modules.camera-56.0.4.aar",
|
|
44
|
+
"url": "expo.modules.camera-56.0.4.aar",
|
|
45
45
|
"size": 270633,
|
|
46
46
|
"sha512": "637c03d540b89884662202f29d475469ed5ee0b807134c899289652c9ae03ef5fca3d69c0eb15da09d8b13765b12b21bbb7bdf41a234aace6c7cd546b9ed427b",
|
|
47
47
|
"sha256": "fe2ac229ce3e52d901327cb9ac77de52dd63c2d7cb60776006ce9c8db390006a",
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
],
|
|
168
168
|
"files": [
|
|
169
169
|
{
|
|
170
|
-
"name": "expo.modules.camera-56.0.
|
|
171
|
-
"url": "expo.modules.camera-56.0.
|
|
170
|
+
"name": "expo.modules.camera-56.0.4.aar",
|
|
171
|
+
"url": "expo.modules.camera-56.0.4.aar",
|
|
172
172
|
"size": 270633,
|
|
173
173
|
"sha512": "637c03d540b89884662202f29d475469ed5ee0b807134c899289652c9ae03ef5fca3d69c0eb15da09d8b13765b12b21bbb7bdf41a234aace6c7cd546b9ed427b",
|
|
174
174
|
"sha256": "fe2ac229ce3e52d901327cb9ac77de52dd63c2d7cb60776006ce9c8db390006a",
|
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
},
|
|
188
188
|
"files": [
|
|
189
189
|
{
|
|
190
|
-
"name": "expo.modules.camera-56.0.
|
|
191
|
-
"url": "expo.modules.camera-56.0.
|
|
190
|
+
"name": "expo.modules.camera-56.0.4-sources.jar",
|
|
191
|
+
"url": "expo.modules.camera-56.0.4-sources.jar",
|
|
192
192
|
"size": 28209,
|
|
193
193
|
"sha512": "9ed0d19dd71703067089542f01795ddf07b581cd745cda6bd89d4125c3a31e19fd283f9e7ce47d83a2ee13470ef37ca0a3ff688796ad9970e7805a3e0c1fb42c",
|
|
194
194
|
"sha256": "a200687bd96e181fe03a9b208c5fcd35d98e8924c9e170f242c8048be21bc21e",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e9452ad4709d0852e55ed24070d23e25
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
632882034e0af259219b103c742ea17ddb54948e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e9805cd5804b8404c82bdadf2dfc4f313ce123a75f1da08e23f078d3522a0d8d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
360bb40e0dfa65c31806f8882a42184383c52aa21c8f8309bab55bf216a7c447ce0316e6688298e8212c3a0c6aa6cfadd406b23d412d97f65b0a1e2ae2fb34e7
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.camera</artifactId>
|
|
12
|
-
<version>56.0.
|
|
12
|
+
<version>56.0.4</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.camera</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9141992d15589c91d8b98037f63a6eb0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f77f58a1bae2e8faaedccbd094d849dde58b394e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f846d01412a9c150f7429f5e6d2604e2ba9fcc0bc29d5d91dd4669c563d469dd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0fb7a2c9ae6ec38cdd81d8ef5fd1d8a138aaeffc22a3bfd8818d03c9341f9d854beed403c53dd3fa09786b059d4469ff950ba0dcb6a75bfb90fa6d959db4e0a7
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.camera</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0.
|
|
7
|
-
<release>56.0.
|
|
6
|
+
<latest>56.0.4</latest>
|
|
7
|
+
<release>56.0.4</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0.
|
|
9
|
+
<version>56.0.4</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260513103324</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
29f8842625222c6daafbad824c523f2c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9ebb4e4388d3a08ec713d5381446d4f567b59eb8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7dc0c6377fd7f837733f68f22044349344ea57fad299647dafe2c09bae137cf1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0db1aee9fd7b94c53f3dfacfc04a513b6488488a0afe4694366733b0253efc61c6c774b722bfe42934178ca69d8d0140ff4bc0021f9c9b6f8c7c63ae347a48fc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-camera",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.4",
|
|
4
4
|
"description": "A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/react": "~19.2.0",
|
|
32
32
|
"@types/node": "^22.14.0",
|
|
33
|
-
"expo": "56.0.0-preview.
|
|
33
|
+
"expo": "56.0.0-preview.10",
|
|
34
34
|
"expo-module-scripts": "56.0.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"optional": true
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "40f0a6f6711d93762e0506b37e6e077e4bd9a541",
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "expo-module build",
|
|
50
50
|
"clean": "expo-module clean",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/Camera.types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type PermissionResponse
|
|
1
|
+
import { type PermissionResponse } from 'expo';
|
|
2
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
3
|
import type { Ref } from 'react';
|
|
3
4
|
import type { ViewProps } from 'react-native';
|
|
4
5
|
|
|
@@ -590,8 +591,8 @@ export {
|
|
|
590
591
|
PermissionStatus,
|
|
591
592
|
type PermissionExpiration,
|
|
592
593
|
type PermissionHookOptions,
|
|
593
|
-
|
|
594
|
-
} from 'expo-modules-core';
|
|
594
|
+
} from 'expo';
|
|
595
|
+
export { type EventSubscription as Subscription } from 'expo-modules-core';
|
|
595
596
|
|
|
596
597
|
export type PhotoResult = {
|
|
597
598
|
/**
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { createPermissionHook } from 'expo-modules-core';
|
|
1
|
+
import { createPermissionHook, type PermissionResponse } from 'expo';
|
|
3
2
|
|
|
4
3
|
import type { BarcodeScanningResult, BarcodeType } from './Camera.types';
|
|
5
4
|
import CameraManager from './ExpoCameraManager';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f40b716cbea50f03fc8dda481461fd84
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e849448f39ca5245825b7bb13d261e1575f118ee
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e95db5247cdf9d7a7fb0aa45cd2f9e22f232097c2e86a5005e09560fff36a745
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
42949ee45607da673940065868e7ece35297fd1687c7c5a31a48447492d586a88ba5a283bdd3f9b7a06b2c4ac949cfc49897f4b3d786cb8dde129c1cf16bde6f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
93d524ad25badb362753281cb76abd82
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4c45e0610d5a1f9da6a4873732437b754336e648
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0ef8bc3bdcdf9738aced6b71fe5f859b46e4488dce35f7477e26413ec78178ad
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d44048204466c3c2ff694a745ae24fc2dac4c8fe5812b0fc87587736ee509ec2131e47632d62594b7c2f27b9277b941b66d6ce943aebc5aa2c81f6ed7fad8870
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|