react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
56 lines • 2.69 kB
TypeScript
/// <reference types="react" />
/// <reference types="react-native/types/modules/Codegen" />
import { type ColorValue, type HostComponent, ViewProps } from 'react-native';
import { DirectEventHandler, type Double, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
export type DocumentScannerEvent = Readonly<{
result: string;
}>;
interface NativeProps extends ViewProps {
onDocumentScannerResult?: DirectEventHandler<DocumentScannerEvent>;
onDetectionResult?: DirectEventHandler<DocumentScannerEvent>;
acceptedAngleScore?: WithDefault<Double, 75.0>;
acceptedBrightnessThreshold?: WithDefault<Double, 50.0>;
acceptedSizeScore?: WithDefault<Double, 80.0>;
autoSnappingEnabled?: WithDefault<boolean, true>;
autoSnappingSensitivity?: WithDefault<Double, 0.66>;
autoSnappingDelay?: WithDefault<Double, 1.0>;
cameraModule?: WithDefault<string, 'BACK'>;
cameraPreviewMode?: WithDefault<string, 'FILL_IN'>;
flashEnabled?: WithDefault<boolean, false>;
ignoreBadAspectRatio?: WithDefault<boolean, false>;
photoQualityPrioritization?: WithDefault<string, 'BALANCED'>;
touchToFocusEnabled?: WithDefault<boolean, true>;
requiredAspectRatios?: Array<{
width?: Double;
height?: Double;
}>;
finderEnabled?: WithDefault<boolean, false>;
finderLineColor?: ColorValue;
finderLineWidth?: WithDefault<Double, 2.0>;
finderOverlayColor?: ColorValue;
finderCornerRadius?: WithDefault<Double, 10.0>;
finderMinimumPadding?: WithDefault<Double, 20.0>;
finderAspectRatio?: {
width?: WithDefault<Double, 1.0>;
height?: WithDefault<Double, 1.4142>;
};
polygonEnabled?: WithDefault<boolean, true>;
polygonBackgroundColor?: ColorValue;
polygonBackgroundColorOK?: ColorValue;
polygonColor?: ColorValue;
polygonColorOK?: ColorValue;
polygonLineWidth?: WithDefault<Double, 3.0>;
polygonCornerRadius?: WithDefault<Double, 8.0>;
polygonAutoSnapProgressColor?: ColorValue;
polygonAutoSnapProgressLineWidth?: WithDefault<Double, 5.0>;
polygonAutoSnapProgressEnabled?: WithDefault<boolean, true>;
}
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
export default _default;
interface NativeCommands {
freezeCamera: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
unfreezeCamera: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
snapDocument: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
}
export declare const Commands: NativeCommands;
//# sourceMappingURL=ScanbotDocumentScannerViewNativeComponent.d.ts.map