scandoc-ai-components 0.0.18 → 0.0.20

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 +64 -42
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -11,49 +11,61 @@ An example HTML page integration:
11
11
  ```
12
12
  <!DOCTYPE html>
13
13
  <html>
14
- <head>
15
- <title>ScanDoc-AI</title>
16
- <meta charset="UTF-8" />
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
18
- <script src="node_modules/scandoc-ai-components/dist/index.js"></script>
19
- <body>
20
- <style>
21
- :root {
22
- display: flex;
23
- flex: 1;
24
- flex-direction: column;
25
- height: 100vh;
26
- width: 100vw;
27
- }
28
-
29
- html, body {
30
- display: flex;
31
- flex: 1;
32
- flex-direction: column;
33
- font-family: "Roboto", impact, condensed, sans-serif;
34
- background-color: #fefefe;
35
- box-sizing: border-box;
36
- font-size: 14px;
37
- align-items: center;
38
-
39
- }
40
- </style>
41
-
42
- <div id="test" style="width: 50%;height: auto;padding: 20px;"></div>
43
- <script>
44
- const key = ""; // Use the key provided by our team
45
- createScanDocAIConfig(key, "test");
46
- const extractionVideo = window.getExtractionVideo(function (data) {
47
- console.log("Extraction result:", data);
48
- // extractionVideo.stopVideo(); // Stop automatically after first result
49
- });
50
- //
51
- const html = extractionVideo.getHTML();
52
- document.getElementById('test').innerHTML = html;
53
- extractionVideo.startVideo();
54
- </script>
55
- </body>
14
+ <head>
15
+ <title>ScanDoc-AI Demo</title>
16
+ <meta charset="UTF-8" />
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
18
+ <style>
19
+ :root {
20
+ display: flex;
21
+ flex: 1;
22
+ flex-direction: column;
23
+ height: 100vh;
24
+ width: 100vw;
25
+ }
26
+
27
+ html, body {
28
+ display: flex;
29
+ flex: 1;
30
+ flex-direction: column;
31
+ font-family: "Roboto", impact, condensed, sans-serif;
32
+ background-color: #fefefe;
33
+ box-sizing: border-box;
34
+ font-size: 14px;
35
+ align-items: center;
36
+
37
+ }
38
+ </style>
39
+ </head>
40
+ <body>
41
+ <div id="test">Loading video...</div>
42
+
43
+ <script src="scandoc.js"></script>
44
+ <script>
45
+ const key = ''; // Use the key provided by our team
46
+ createScanDocAIConfig(key, "test");
47
+
48
+ setScanDocAIConfig({
49
+ SHOULD_RETURN_DOCUMENT_IMAGE: true,
50
+ SHOULD_RETURN_FACE_IF_DETECTED: true,
51
+ SHOULD_RETURN_SIGNATURE_IF_DETECTED: true,
52
+ SKIP_DOCUMENT_SIZE_CHECK: true,
53
+ DONT_USE_VALIDATION: true,
54
+ CAN_STORE_IMAGES: true,
55
+ });
56
+
57
+ const extractionVideo = getExtractionVideo(function (data) {
58
+ console.log("Extraction result:", data);
59
+ // extractionVideo.stopVideo();
60
+ });
61
+
62
+ const html = extractionVideo.getHTML();
63
+ document.getElementById("test").innerHTML = html;
64
+ extractionVideo.startVideo();
65
+ </script>
66
+ </body>
56
67
  </html>
68
+
57
69
  ```
58
70
 
59
71
  ## React integration
@@ -66,6 +78,16 @@ import "scandoc-ai-components/dist/index"
66
78
 
67
79
  const key = ""; // Use the key provided by our team
68
80
  window.createScanDocAIConfig(key, "test");
81
+ window.setScanDocAIConfig({
82
+ SCAN_APP_URL: "https://api.scandoc.ai/ss/",
83
+ SHOULD_RETURN_DOCUMENT_IMAGE: true,
84
+ SHOULD_RETURN_FACE_IF_DETECTED: true,
85
+ SHOULD_RETURN_SIGNATURE_IF_DETECTED: true,
86
+ SKIP_DOCUMENT_SIZE_CHECK: true,
87
+ DONT_USE_VALIDATION: true,
88
+ CAN_STORE_IMAGES: true,
89
+ });
90
+
69
91
  const extractionVideo = window.getExtractionVideo(data=>console.log(data));const extractionVideo = window.getExtractionVideo(data => {
70
92
  console.log("Extracted:", data);
71
93
  // extractionVideo.stopVideo(); // Stop automatically after first result
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scandoc-ai-components",
3
3
  "author": "ScanDoc-AI",
4
- "version": "0.0.18",
4
+ "version": "0.0.20",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [