@jaak.ai/stamps 2.0.0 → 2.1.0-dev.2
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/README.md +11 -1
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +1 -1
- package/dist/cjs/jaak-stamps.cjs.entry.js +759 -623
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/my-component/my-component.css +178 -11
- package/dist/collection/components/my-component/my-component.js +566 -250
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/services/CameraService.js +156 -344
- package/dist/collection/services/CameraService.js.map +1 -1
- package/dist/collection/services/DetectionService.js +68 -38
- package/dist/collection/services/DetectionService.js.map +1 -1
- package/dist/collection/services/EventBusService.js +1 -1
- package/dist/collection/services/EventBusService.js.map +1 -1
- package/dist/collection/services/ServiceContainer.js +4 -13
- package/dist/collection/services/ServiceContainer.js.map +1 -1
- package/dist/collection/services/interfaces/ICameraService.js.map +1 -1
- package/dist/collection/types/component-types.js.map +1 -1
- package/dist/components/jaak-stamps.js +763 -626
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/jaak-stamps-webcomponent.js +1 -1
- package/dist/esm/jaak-stamps.entry.js +759 -623
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +68 -17
- package/dist/types/components.d.ts +14 -8
- package/dist/types/services/CameraService.d.ts +12 -14
- package/dist/types/services/DetectionService.d.ts +10 -3
- package/dist/types/services/ServiceContainer.d.ts +1 -2
- package/dist/types/services/interfaces/ICameraService.d.ts +3 -12
- package/dist/types/types/component-types.d.ts +3 -0
- package/package.json +2 -2
- package/dist/collection/services/LoggerService.js +0 -40
- package/dist/collection/services/LoggerService.js.map +0 -1
- package/dist/collection/services/interfaces/ILogger.js +0 -2
- package/dist/collection/services/interfaces/ILogger.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-2264b5b4.entry.js +0 -2
- package/dist/jaak-stamps-webcomponent/p-2264b5b4.entry.js.map +0 -1
- package/dist/types/services/LoggerService.d.ts +0 -12
- package/dist/types/services/interfaces/ILogger.d.ts +0 -8
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ yarn add @jaak.ai/stamps
|
|
|
65
65
|
| `crop-margin` | `number` | `20` | Margin in pixels around detected document for cropping |
|
|
66
66
|
| `preferred-camera` | `'auto' \| 'front' \| 'back'` | `'auto'` | Preferred camera selection |
|
|
67
67
|
| `use-document-classification` | `boolean` | `false` | Enable AI document classification |
|
|
68
|
+
| `use-document-detector` | `boolean` | `true` | Enable/disable AI document detection model |
|
|
68
69
|
| `enable-back-document-timer` | `boolean` | `false` | Enable timer for back document capture |
|
|
69
70
|
| `back-document-timer-duration` | `number` | `20` | Duration in seconds for back document capture timer |
|
|
70
71
|
|
|
@@ -207,6 +208,7 @@ interface StatusResponse {
|
|
|
207
208
|
id="documentScanner"
|
|
208
209
|
preferred-camera="auto"
|
|
209
210
|
capture-delay="1500"
|
|
211
|
+
use-document-detector="true"
|
|
210
212
|
debug="false">
|
|
211
213
|
</jaak-stamps>
|
|
212
214
|
|
|
@@ -319,6 +321,7 @@ const DocumentScanner: React.FC = () => {
|
|
|
319
321
|
preferred-camera="auto"
|
|
320
322
|
capture-delay={1500}
|
|
321
323
|
use-document-classification={true}
|
|
324
|
+
use-document-detector={true}
|
|
322
325
|
/>
|
|
323
326
|
|
|
324
327
|
<div style={{ marginTop: '20px' }}>
|
|
@@ -389,7 +392,8 @@ interface CapturedImages {
|
|
|
389
392
|
#scanner
|
|
390
393
|
preferred-camera="auto"
|
|
391
394
|
[capture-delay]="1500"
|
|
392
|
-
[use-document-classification]="true"
|
|
395
|
+
[use-document-classification]="true"
|
|
396
|
+
[use-document-detector]="true">
|
|
393
397
|
</jaak-stamps>
|
|
394
398
|
|
|
395
399
|
<div class="controls">
|
|
@@ -741,6 +745,12 @@ A: Enable document classification:
|
|
|
741
745
|
**Q: Can I customize the detection area?**
|
|
742
746
|
A: Yes, use the `mask-size` property to adjust the detection frame size.
|
|
743
747
|
|
|
748
|
+
**Q: Can I disable automatic document detection?**
|
|
749
|
+
A: Yes, set `use-document-detector="false"` to disable AI detection and enable manual capture mode:
|
|
750
|
+
```html
|
|
751
|
+
<jaak-stamps use-document-detector="false"></jaak-stamps>
|
|
752
|
+
```
|
|
753
|
+
|
|
744
754
|
**Q: How do I get only the cropped images?**
|
|
745
755
|
A: Access the `cropped` property from the captured images:
|
|
746
756
|
```javascript
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["jaak-stamps.cjs",[[1,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]
|
|
21
|
+
return index.bootstrapLazy([["jaak-stamps.cjs",[[1,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]}]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|