react-native-rectangle-doc-scanner 3.120.0 → 3.121.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.
@@ -196,6 +196,11 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
196
196
  // Reset capture state when cropper fails or is cancelled
197
197
  captureInProgressRef.current = false;
198
198
  captureModeRef.current = null;
199
+ setRectangleDetected(false);
200
+ setRectangleHint(false);
201
+ if (docScannerRef.current?.reset) {
202
+ docScannerRef.current.reset();
203
+ }
199
204
  const errorCode = error?.code;
200
205
  const errorMessage = error?.message || String(error);
201
206
  if (errorCode === CROPPER_TIMEOUT_CODE || errorMessage === CROPPER_TIMEOUT_CODE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.120.0",
3
+ "version": "3.121.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -274,6 +274,11 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
274
274
  // Reset capture state when cropper fails or is cancelled
275
275
  captureInProgressRef.current = false;
276
276
  captureModeRef.current = null;
277
+ setRectangleDetected(false);
278
+ setRectangleHint(false);
279
+ if (docScannerRef.current?.reset) {
280
+ docScannerRef.current.reset();
281
+ }
277
282
 
278
283
  const errorCode = (error as any)?.code;
279
284
  const errorMessage = (error as any)?.message || String(error);