Files
smart-city-digital-twin-mar…/smart-app-city/frontend/node_modules/expo-camera/build/index.js
Eric FELIXINE e30ae8ed09 feat(smart-app): implement complete mobile app MVP
- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
2026-06-01 18:00:35 -04:00

90 lines
3.3 KiB
JavaScript

import { createPermissionHook } from 'expo-modules-core';
import CameraManager from './ExpoCameraManager';
export { default as CameraView } from './CameraView';
// @needsAudit
/**
* Checks user's permissions for accessing camera.
* @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).
*/
async function getCameraPermissionsAsync() {
return CameraManager.getCameraPermissionsAsync();
}
// @needsAudit
/**
* Asks the user to grant permissions for accessing camera.
* On iOS this will require apps to specify an `NSCameraUsageDescription` entry in the **Info.plist**.
* @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).
*/
async function requestCameraPermissionsAsync() {
return CameraManager.requestCameraPermissionsAsync();
}
// @needsAudit
/**
* Check or request permissions to access the camera.
* This uses both `requestCameraPermissionsAsync` and `getCameraPermissionsAsync` to interact with the permissions.
*
* @example
* ```ts
* const [status, requestPermission] = useCameraPermissions();
* ```
*/
export const useCameraPermissions = createPermissionHook({
getMethod: getCameraPermissionsAsync,
requestMethod: requestCameraPermissionsAsync,
});
// @needsAudit
/**
* Checks user's permissions for accessing microphone.
* @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).
*/
async function getMicrophonePermissionsAsync() {
return CameraManager.getMicrophonePermissionsAsync();
}
// @needsAudit
/**
* Asks the user to grant permissions for accessing the microphone.
* On iOS this will require apps to specify an `NSMicrophoneUsageDescription` entry in the **Info.plist**.
* @return A promise that resolves to an object of type [PermissionResponse](#permissionresponse).
*/
async function requestMicrophonePermissionsAsync() {
return CameraManager.requestMicrophonePermissionsAsync();
}
// @needsAudit
/**
* Check or request permissions to access the microphone.
* This uses both `requestMicrophonePermissionsAsync` and `getMicrophonePermissionsAsync` to interact with the permissions.
*
* @example
* ```ts
* const [status, requestPermission] = Camera.useMicrophonePermissions();
* ```
*/
export const useMicrophonePermissions = createPermissionHook({
getMethod: getMicrophonePermissionsAsync,
requestMethod: requestMicrophonePermissionsAsync,
});
/**
* Scan bar codes from the image at the given URL.
* @param url URL to get the image from.
* @param barcodeTypes An array of bar code types. Defaults to all supported bar code types on
* the platform.
* > __Note:__ Only QR codes are supported on iOS.
* On android, the barcode should take up the majority of the image for best results.
* @return A possibly empty array of objects of the `BarcodeScanningResult` shape, where the type
* refers to the barcode type that was scanned and the data is the information encoded in the barcode.
*/
export async function scanFromURLAsync(url, barcodeTypes = ['qr']) {
return CameraManager.scanFromURLAsync(url, barcodeTypes);
}
export * from './Camera.types';
/**
* @hidden
*/
export const Camera = {
getCameraPermissionsAsync,
requestCameraPermissionsAsync,
getMicrophonePermissionsAsync,
requestMicrophonePermissionsAsync,
scanFromURLAsync,
};
//# sourceMappingURL=index.js.map