veryfi-lens-wasm 3.3.4 → 3.4.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/README.md +24 -11
- package/components/reviewGallery.js +815 -0
- package/core/api.js +17 -8
- package/core/camera.js +14 -9
- package/core/capture/document.js +6 -82
- package/core/capture/index.js +0 -1
- package/core/capture/prescription_label.js +57 -384
- package/core/capture-store.js +174 -0
- package/core/constants.js +8 -1
- package/core/crop-field-detection.js +60 -2
- package/core/lifecycle.js +4 -3
- package/core/overlay-controls.js +0 -4
- package/core/review-flow.js +251 -0
- package/core/state.js +31 -8
- package/core/ui-renderer.js +17 -10
- package/flavors/anydocs.js +9 -2
- package/flavors/document.js +7 -0
- package/flavors/prescription_label.js +12 -1
- package/package.json +1 -1
- package/veryfi-lens.js +14 -0
- package/components/anydocPageControls.js +0 -271
- package/components/gallery.js +0 -136
- package/components/multiCaptureModal.js +0 -23
- package/core/capture/anydoc.js +0 -100
- package/core/multi-submission.js +0 -90
package/README.md
CHANGED
|
@@ -195,18 +195,31 @@ VeryfiLens.onFailure((error) => { /* error occurred */ });
|
|
|
195
195
|
|---|---|---|---|
|
|
196
196
|
| `enableLongReceiptPreview` | `boolean` | `false` | Show stitching preview panel |
|
|
197
197
|
|
|
198
|
+
### Review Gallery Settings
|
|
199
|
+
|
|
200
|
+
After each accepted capture, the `document`, `anydocs`, and `prescription_label` flavors show a unified **review gallery** where the user can review, retake, delete, add pages/documents, and submit. For single-document/single-page captures it collapses to a simple Retake / Submit preview. On submit, one package (a zip of its pages) is uploaded per document via `/api/document`, then `finishBatch()` runs.
|
|
201
|
+
|
|
202
|
+
| Option | Type | Default | Description |
|
|
203
|
+
|---|---|---|---|
|
|
204
|
+
| `maxPagesPerDocument` | `number\|null` | flavor-specific | Max pages per document (`null` = unlimited). `1` hides "Add Page". Defaults: document `1`, anydocs `null`, prescription boxes = box max sides |
|
|
205
|
+
| `maxDocuments` | `number\|null` | `1` (or `null` when `multiSubmission`) | Max documents per session. `1` hides "Add Document" |
|
|
206
|
+
| `reviewGalleryTitle` | `string` | `"Review"` | Gallery title |
|
|
207
|
+
| `reviewAddPageText` | `string` | `"Add Page"` | Add page action text |
|
|
208
|
+
| `reviewAddDocumentText` | `string` | `"Add Document"` | Add document action text |
|
|
209
|
+
| `reviewSubmitText` | `string` | `"Submit"` | Submit action text |
|
|
210
|
+
| `reviewDoneText` | `string` | `"Done"` | Done action text |
|
|
211
|
+
| `reviewRetakeText` | `string` | `"Retake"` | Retake action text |
|
|
212
|
+
| `reviewDeleteText` | `string` | `"Delete"` | Delete action text |
|
|
213
|
+
|
|
198
214
|
### Anydocs Multi-Page Settings
|
|
199
215
|
|
|
200
216
|
| Option | Type | Default | Description |
|
|
201
217
|
|---|---|---|---|
|
|
202
218
|
| `enableBlueprintsModal` | `boolean` | `false` | Show blueprints selection modal |
|
|
203
219
|
| `selectedBlueprint` | `string` | — | Pre-selected blueprint (skips modal) |
|
|
204
|
-
| `anydocMaxPages` | `number\|null` | `null` |
|
|
205
|
-
| `anydocAddPageText` | `string` | `"Add Page"` |
|
|
206
|
-
| `anydocSubmitText` | `string` | `"Submit"` |
|
|
207
|
-
| `anydocShowFlipMessage` | `boolean` | `false` | Show flip document message between pages |
|
|
208
|
-
| `anydocFlipMessageText` | `string` | `"Please flip the document..."` | Flip message text |
|
|
209
|
-
| `anydocFlipContinueText` | `string` | `"Continue"` | Continue button text |
|
|
220
|
+
| `anydocMaxPages` | `number\|null` | `null` | _Deprecated:_ alias for `maxPagesPerDocument` |
|
|
221
|
+
| `anydocAddPageText` | `string` | `"Add Page"` | _Deprecated:_ alias for `reviewAddPageText` |
|
|
222
|
+
| `anydocSubmitText` | `string` | `"Submit"` | _Deprecated:_ alias for `reviewSubmitText` |
|
|
210
223
|
| `anydocShowGuide` | `boolean` | `false` | Show a dismissible on-screen text guide explaining how to capture. Auto-hides after each page capture and reappears when the camera restarts for the next page |
|
|
211
224
|
| `anydocGuideText` | `string` | `"Position the document within the frame..."` | Guide text shown for anydocs capture. Use `\n` for line breaks |
|
|
212
225
|
|
|
@@ -242,11 +255,11 @@ VeryfiLens.onFailure((error) => { /* error occurred */ });
|
|
|
242
255
|
| `prescriptionLabelShowOverlayToggle` | `boolean` | `true` | Show a toggle that lets the user switch between the bottle and box overlays during capture. The **bottle** overlay records a video; the **box** overlay captures a still image |
|
|
243
256
|
| `prescriptionLabelBottleLabel` | `string` | `"Bottle"` | Label for the bottle (video) segment of the overlay toggle |
|
|
244
257
|
| `prescriptionLabelBoxLabel` | `string` | `"Box"` | Label for the box (image) segment of the overlay toggle |
|
|
245
|
-
| `prescriptionLabelBoxMultiSide` | `boolean` | `true` | When capturing with the box overlay,
|
|
246
|
-
| `prescriptionLabelBoxMaxSides` | `number` | `4` | Maximum number of sides that can be captured for a single box
|
|
247
|
-
| `prescriptionLabelBoxSideMessage` | `string` | `"Capture another side of the box?"` |
|
|
248
|
-
| `prescriptionLabelBoxSideAddText` | `string` | `"Capture another side"` |
|
|
249
|
-
| `prescriptionLabelBoxSideSubmitText` | `string` | `"Submit"` |
|
|
258
|
+
| `prescriptionLabelBoxMultiSide` | `boolean` | `true` | When capturing with the box overlay, allow multiple sides of the same box. Sides become pages of one document, managed in the review gallery ("Add Page"). Sets the default `maxPagesPerDocument` to `prescriptionLabelBoxMaxSides` |
|
|
259
|
+
| `prescriptionLabelBoxMaxSides` | `number` | `4` | Maximum number of sides (pages) that can be captured for a single box (feeds `maxPagesPerDocument`) |
|
|
260
|
+
| `prescriptionLabelBoxSideMessage` | `string` | `"Capture another side of the box?"` | _Deprecated:_ the review gallery replaced the "another side" prompt |
|
|
261
|
+
| `prescriptionLabelBoxSideAddText` | `string` | `"Capture another side"` | _Deprecated:_ use `reviewAddPageText` |
|
|
262
|
+
| `prescriptionLabelBoxSideSubmitText` | `string` | `"Submit"` | _Deprecated:_ use `reviewSubmitText` |
|
|
250
263
|
| `prescriptionLabelMaxVideoDuration` | `number` | `12` | Maximum length, in seconds, of a bottle (video) capture. When reached, recording stops automatically. An on-screen countdown is shown while recording. Set to `0` to disable the limit |
|
|
251
264
|
|
|
252
265
|
### Upload Settings (`upload` flavor)
|