expo-camera
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -1,2 +0,2 @@ | ||
import { UnavailabilityError } from 'expo-errors'; | ||
import { UnavailabilityError } from '@unimodules/core'; | ||
import mapValues from 'lodash.mapvalues'; | ||
@@ -3,0 +3,0 @@ import PropTypes from 'prop-types'; |
@@ -1,4 +0,4 @@ | ||
import { requireNativeViewManager } from 'expo-core'; | ||
import { requireNativeViewManager } from '@unimodules/core'; | ||
const ExponentCamera = requireNativeViewManager('ExponentCamera'); | ||
export default ExponentCamera; | ||
//# sourceMappingURL=ExponentCamera.js.map |
import React from 'react'; | ||
import { findNodeHandle, StyleSheet, View } from 'react-native'; | ||
import CameraModule from './CameraModule/CameraModule'; | ||
import CameraManager from './ExponentCameraManager.web'; | ||
let findNodeHandle = function (node) { }; | ||
let flatten = data => data; | ||
let View = props => <div {...props}/>; | ||
// Without react-native-web | ||
try { | ||
const ReactNative = require('react-native'); | ||
findNodeHandle = ReactNative.findNodeHandle; | ||
flatten = ReactNative.StyleSheet.flatten; | ||
View = ReactNative.View; | ||
} | ||
catch (error) { } | ||
export default class ExponentCamera extends React.Component { | ||
@@ -102,3 +92,3 @@ constructor() { | ||
const transform = this.state.type === CameraManager.Type.front ? 'rotateY(180deg)' : 'none'; | ||
const reactStyle = flatten(this.props.style); | ||
const reactStyle = StyleSheet.flatten(this.props.style); | ||
const style = { | ||
@@ -105,0 +95,0 @@ position: 'absolute', |
@@ -1,4 +0,4 @@ | ||
import { NativeModulesProxy } from 'expo-core'; | ||
import { NativeModulesProxy } from '@unimodules/core'; | ||
const CameraManager = NativeModulesProxy.ExponentCameraManager || NativeModulesProxy.ExponentCameraModule; | ||
export default CameraManager; | ||
//# sourceMappingURL=ExponentCameraManager.js.map |
@@ -1,2 +0,2 @@ | ||
export { default as Camera } from "./Camera"; | ||
export { Constants } from "./Camera"; | ||
export { default as Camera } from './Camera'; | ||
export { Constants } from './Camera'; |
@@ -1,3 +0,3 @@ | ||
export { default as Camera } from "./Camera"; | ||
export { Constants } from "./Camera"; | ||
export { default as Camera } from './Camera'; | ||
export { Constants } from './Camera'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "expo-camera", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"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.", | ||
"main": "build/index.js", | ||
"types": "build/index.d.ts", | ||
"sideEffects": false, | ||
"scripts": { | ||
@@ -34,9 +35,8 @@ "build": "expo-module build", | ||
"unimodulePeerDependencies": { | ||
"expo-core": "*", | ||
"expo-errors": "*", | ||
"expo-camera-interface": "*", | ||
"expo-barcode-scanner-interface": "*", | ||
"expo-file-system-interface": "*", | ||
"expo-face-detector-interface": "*", | ||
"expo-permissions-interface": "*" | ||
"@unimodules/core": "*", | ||
"unimodules-camera-interface": "*", | ||
"unimodules-barcode-scanner-interface": "*", | ||
"unimodules-file-system-interface": "*", | ||
"unimodules-face-detector-interface": "*", | ||
"unimodules-permissions-interface": "*" | ||
}, | ||
@@ -50,3 +50,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "d87c47ba13c7dde7a5d120caf873c98258a42710" | ||
"gitHead": "8413e821076a2eca36b302e68dd628ce2e1f591a" | ||
} |
@@ -44,5 +44,18 @@ # expo-camera | ||
3. In `MainApplication.java`, import the package and add it to the `ReactModuleRegistryProvider` list: | ||
3. Adjust the `android/build.gradle` to add the `maven` block as described below: | ||
```gradle | ||
allprojects { | ||
repositories { | ||
// * Your other repositories here * | ||
maven { | ||
// expo-camera bundles a custom com.google.android:cameraview | ||
url "$rootDir/../node_modules/expo-camera/android/maven" | ||
} | ||
} | ||
} | ||
``` | ||
4. In `MainApplication.java`, import the package and add it to the `ReactModuleRegistryProvider` list: | ||
```java | ||
import expo.modules.expo.modules.camera.CameraPackage; | ||
import expo.modules.camera.CameraPackage; | ||
``` | ||
@@ -49,0 +62,0 @@ ```java |
@@ -1,2 +0,2 @@ | ||
import { requireNativeViewManager } from 'expo-core'; | ||
import { requireNativeViewManager } from '@unimodules/core'; | ||
import * as React from 'react'; | ||
@@ -3,0 +3,0 @@ import { NativeProps } from './Camera.types'; |
@@ -1,2 +0,2 @@ | ||
import { NativeModulesProxy } from 'expo-core'; | ||
import { NativeModulesProxy } from '@unimodules/core'; | ||
@@ -3,0 +3,0 @@ const CameraManager: Object = |
@@ -1,2 +0,2 @@ | ||
export { default as Camera } from "./Camera"; | ||
export { Constants } from "./Camera"; | ||
export { default as Camera } from './Camera'; | ||
export { Constants } from './Camera'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
89
71
324327
3710