react-native-rectangle-doc-scanner 3.51.0 → 3.52.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.
package/dist/FullDocScanner.d.ts
CHANGED
package/dist/FullDocScanner.js
CHANGED
|
@@ -53,7 +53,7 @@ const normalizeCapturedDocument = (document) => {
|
|
|
53
53
|
croppedPath: document.croppedPath ? stripFileUri(document.croppedPath) : null,
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3170f3', gridColor, gridLineWidth, showGrid, strings,
|
|
56
|
+
const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3170f3', gridColor, gridLineWidth, showGrid, strings, minStableFrames, onError, enableGallery = true, cropWidth = 1200, cropHeight = 1600, }) => {
|
|
57
57
|
const [processing, setProcessing] = (0, react_1.useState)(false);
|
|
58
58
|
const [croppedImageData, setCroppedImageData] = (0, react_1.useState)(null);
|
|
59
59
|
const [isGalleryOpen, setIsGalleryOpen] = (0, react_1.useState)(false);
|
|
@@ -243,7 +243,7 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
|
|
|
243
243
|
react_1.default.createElement(react_native_1.Text, { style: styles.confirmButtonText }, mergedStrings.retake)),
|
|
244
244
|
react_1.default.createElement(react_native_1.TouchableOpacity, { style: [styles.confirmButton, styles.confirmButtonPrimary], onPress: handleConfirm, accessibilityLabel: mergedStrings.confirm, accessibilityRole: "button" },
|
|
245
245
|
react_1.default.createElement(react_native_1.Text, { style: styles.confirmButtonText }, mergedStrings.confirm))))) : (react_1.default.createElement(react_native_1.View, { style: styles.flex },
|
|
246
|
-
react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture:
|
|
246
|
+
react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture: true, overlayColor: overlayColor, showGrid: showGrid, gridColor: resolvedGridColor, gridLineWidth: gridLineWidth, minStableFrames: minStableFrames ?? 6, detectionConfig: detectionConfig, onCapture: handleCapture, onRectangleDetect: handleRectangleDetect, showManualCaptureButton: false },
|
|
247
247
|
react_1.default.createElement(react_native_1.View, { style: styles.overlayTop, pointerEvents: "box-none" },
|
|
248
248
|
react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.closeButton, onPress: handleClose, accessibilityLabel: mergedStrings.cancel, accessibilityRole: "button" },
|
|
249
249
|
react_1.default.createElement(react_native_1.Text, { style: styles.closeButtonLabel }, "\u00D7"))),
|
package/package.json
CHANGED
package/src/FullDocScanner.tsx
CHANGED
|
@@ -55,7 +55,6 @@ export interface FullDocScannerProps {
|
|
|
55
55
|
gridLineWidth?: number;
|
|
56
56
|
showGrid?: boolean;
|
|
57
57
|
strings?: FullDocScannerStrings;
|
|
58
|
-
manualCapture?: boolean;
|
|
59
58
|
minStableFrames?: number;
|
|
60
59
|
onError?: (error: Error) => void;
|
|
61
60
|
enableGallery?: boolean;
|
|
@@ -72,7 +71,6 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
|
|
|
72
71
|
gridLineWidth,
|
|
73
72
|
showGrid,
|
|
74
73
|
strings,
|
|
75
|
-
manualCapture = false,
|
|
76
74
|
minStableFrames,
|
|
77
75
|
onError,
|
|
78
76
|
enableGallery = true,
|
|
@@ -341,7 +339,7 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
|
|
|
341
339
|
<View style={styles.flex}>
|
|
342
340
|
<DocScanner
|
|
343
341
|
ref={docScannerRef}
|
|
344
|
-
autoCapture={
|
|
342
|
+
autoCapture={true}
|
|
345
343
|
overlayColor={overlayColor}
|
|
346
344
|
showGrid={showGrid}
|
|
347
345
|
gridColor={resolvedGridColor}
|