react-native-rectangle-doc-scanner 3.35.0 → 3.36.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.
@@ -205,27 +205,16 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
205
205
  return;
206
206
  }
207
207
  const normalizedDoc = normalizeCapturedDocument(document);
208
- const wantsManualFlow = manualCapture || manualCapturePending.current || document.origin === 'manual';
209
- console.log('[FullDocScanner] wantsManualFlow:', wantsManualFlow, {
210
- manualCapture,
211
- manualCapturePending: manualCapturePending.current,
212
- origin: document.origin,
213
- });
214
- if (wantsManualFlow) {
215
- console.log('[FullDocScanner] Starting manual flow - showing crop editor');
216
- manualCapturePending.current = false;
217
- processingCaptureRef.current = false;
218
- cropInitializedRef.current = false;
219
- setCapturedDoc(normalizedDoc);
220
- setImageSize(null);
221
- setCropRectangle(null);
222
- setScreen('crop');
223
- return;
224
- }
225
- console.log('[FullDocScanner] Starting auto flow - processing capture');
226
- processingCaptureRef.current = true;
227
- processAutoCapture(document);
228
- }, [manualCapture, processAutoCapture]);
208
+ // 자동 촬영이든 수동 촬영이든 모두 crop 화면으로 이동
209
+ console.log('[FullDocScanner] Moving to crop/preview screen');
210
+ manualCapturePending.current = false;
211
+ processingCaptureRef.current = false;
212
+ cropInitializedRef.current = false;
213
+ setCapturedDoc(normalizedDoc);
214
+ setImageSize(null);
215
+ setCropRectangle(null);
216
+ setScreen('crop');
217
+ }, []);
229
218
  const handleCropChange = (0, react_1.useCallback)((rectangle) => {
230
219
  setCropRectangle(rectangle);
231
220
  }, []);
@@ -325,7 +314,7 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
325
314
  }, [onClose, resetState]);
326
315
  return (react_1.default.createElement(react_native_1.View, { style: styles.container },
327
316
  screen === 'scanner' && (react_1.default.createElement(react_native_1.View, { style: styles.flex },
328
- react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture: !manualCapture, overlayColor: overlayColor, showGrid: showGrid, gridColor: resolvedGridColor, gridLineWidth: gridLineWidth, minStableFrames: minStableFrames ?? 6, detectionConfig: detectionConfig, onCapture: handleCapture, showManualCaptureButton: true },
317
+ react_1.default.createElement(DocScanner_1.DocScanner, { ref: docScannerRef, autoCapture: !manualCapture, overlayColor: overlayColor, showGrid: showGrid, gridColor: resolvedGridColor, gridLineWidth: gridLineWidth, minStableFrames: minStableFrames ?? 6, detectionConfig: detectionConfig, onCapture: handleCapture, showManualCaptureButton: false },
329
318
  react_1.default.createElement(react_native_1.View, { style: styles.overlay, pointerEvents: "box-none" },
330
319
  react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.closeButton, onPress: handleClose, accessibilityLabel: mergedStrings.cancel, accessibilityRole: "button" },
331
320
  react_1.default.createElement(react_native_1.Text, { style: styles.closeButtonLabel }, "\u00D7")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.35.0",
3
+ "version": "3.36.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -323,32 +323,18 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
323
323
  }
324
324
 
325
325
  const normalizedDoc = normalizeCapturedDocument(document);
326
- const wantsManualFlow =
327
- manualCapture || manualCapturePending.current || document.origin === 'manual';
328
326
 
329
- console.log('[FullDocScanner] wantsManualFlow:', wantsManualFlow, {
330
- manualCapture,
331
- manualCapturePending: manualCapturePending.current,
332
- origin: document.origin,
333
- });
334
-
335
- if (wantsManualFlow) {
336
- console.log('[FullDocScanner] Starting manual flow - showing crop editor');
337
- manualCapturePending.current = false;
338
- processingCaptureRef.current = false;
339
- cropInitializedRef.current = false;
340
- setCapturedDoc(normalizedDoc);
341
- setImageSize(null);
342
- setCropRectangle(null);
343
- setScreen('crop');
344
- return;
345
- }
346
-
347
- console.log('[FullDocScanner] Starting auto flow - processing capture');
348
- processingCaptureRef.current = true;
349
- processAutoCapture(document);
327
+ // 자동 촬영이든 수동 촬영이든 모두 crop 화면으로 이동
328
+ console.log('[FullDocScanner] Moving to crop/preview screen');
329
+ manualCapturePending.current = false;
330
+ processingCaptureRef.current = false;
331
+ cropInitializedRef.current = false;
332
+ setCapturedDoc(normalizedDoc);
333
+ setImageSize(null);
334
+ setCropRectangle(null);
335
+ setScreen('crop');
350
336
  },
351
- [manualCapture, processAutoCapture],
337
+ [],
352
338
  );
353
339
 
354
340
  const handleCropChange = useCallback((rectangle: Rectangle) => {
@@ -491,7 +477,7 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
491
477
  minStableFrames={minStableFrames ?? 6}
492
478
  detectionConfig={detectionConfig}
493
479
  onCapture={handleCapture}
494
- showManualCaptureButton
480
+ showManualCaptureButton={false}
495
481
  >
496
482
  <View style={styles.overlay} pointerEvents="box-none">
497
483
  <TouchableOpacity