@uziee/document-scanner 1.1.3 → 1.1.5

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.
Files changed (2) hide show
  1. package/README.md +33 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,4 +15,36 @@ A high-performance, lightweight React component for real-time document detection
15
15
  ## 📦 Installation
16
16
 
17
17
  ```bash
18
- npm install @uziee/document-scanner
18
+ npm install @uziee/document-scanner
19
+ ```
20
+
21
+ ## 📖 Usage
22
+
23
+ Import the `DocumentScanner` component into your React application and provide an `onCapture` callback to handle the scanned images.
24
+
25
+ ```jsx
26
+ import React, { useState } from 'react';
27
+ import DocumentScanner from '@uziee/document-scanner';
28
+
29
+ function App() {
30
+ const [showScanner, setShowScanner] = useState(false);
31
+
32
+ const handleCapture = (images) => {
33
+ images.forEach((image, index) => {
34
+ console.log(`Captured image ${index + 1}:`, image);
35
+ });
36
+ setShowScanner(false);
37
+ };
38
+
39
+ return (
40
+ <div>
41
+ <button onClick={() => setShowScanner(true)}>Scan Document</button>
42
+ {showScanner && <DocumentScanner onCapture={handleCapture} />}
43
+ </div>
44
+ );
45
+ }
46
+
47
+ export default App;
48
+ ```
49
+
50
+ The component renders a full-screen camera interface for document scanning. It detects documents in real-time, applies stability filtering, and captures high-resolution images with perspective correction. Ensure your application has camera permissions enabled for the component to function properly.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uziee/document-scanner",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "A lightweight, zero-dependency React document scanner with real-time edge detection, stability filtering, and perspective correction (bilinear warping) for high-resolution A4 captures.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",