react-native-rectangle-doc-scanner 3.158.0 → 3.160.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.158.0",
3
+ "version": "3.160.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -10,8 +10,17 @@ import {
10
10
  } from 'react-native';
11
11
  import PropTypes from 'prop-types';
12
12
 
13
- const RNPdfScanner = requireNativeComponent('RNPdfScanner', PdfScanner);
13
+ console.log('[PdfScanner] Attempting to require native component RNPdfScanner...');
14
+ let RNPdfScanner;
15
+ try {
16
+ RNPdfScanner = requireNativeComponent('RNPdfScanner', PdfScanner);
17
+ console.log('[PdfScanner] Native component RNPdfScanner loaded successfully:', RNPdfScanner);
18
+ } catch (error) {
19
+ console.error('[PdfScanner] Failed to load native component RNPdfScanner:', error);
20
+ throw error;
21
+ }
14
22
  const CameraManager = NativeModules.RNPdfScannerManager || {};
23
+ console.log('[PdfScanner] CameraManager:', CameraManager);
15
24
 
16
25
  class PdfScanner extends React.Component {
17
26
  constructor(props) {
@@ -199,13 +208,16 @@ class PdfScanner extends React.Component {
199
208
  }
200
209
  console.log('[PdfScanner] Rendering RNPdfScanner native component');
201
210
  const { onLayout, ...restProps } = this.props;
202
- return (
211
+ const component = (
203
212
  <RNPdfScanner
204
213
  ref={(ref) => {
214
+ console.log('[PdfScanner] ref callback called with:', ref);
205
215
  this.nativeRef = ref;
206
216
  this.nativeTag = ref ? findNodeHandle(ref) : null;
217
+ console.log('[PdfScanner] nativeTag set to:', this.nativeTag);
207
218
  }}
208
219
  onLayout={(event) => {
220
+ console.log('[PdfScanner] onLayout called with event:', event.nativeEvent);
209
221
  this.nativeTag = event?.nativeEvent?.target ?? this.nativeTag;
210
222
  if (onLayout) {
211
223
  onLayout(event);
@@ -223,6 +235,8 @@ class PdfScanner extends React.Component {
223
235
  detectionRefreshRateInMS={this.props.detectionRefreshRateInMS || 50}
224
236
  />
225
237
  );
238
+ console.log('[PdfScanner] Returning component:', component);
239
+ return component;
226
240
  }
227
241
  }
228
242