@exige/web-scanner-sdk 0.2.24 → 0.2.26
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 +2 -2
- package/dist/{finder-B3kHQ2Jh.js → finder-Dcg3mVJM.js} +268 -198
- package/dist/finder-Dcg3mVJM.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/react/context.d.ts +1 -1
- package/dist/react/types.d.ts +13 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +381 -274
- package/dist/react.js.map +1 -1
- package/dist/scanner-sdk.js +239 -239
- package/dist/scanner-sdk.js.map +1 -1
- package/dist/sdk/camera.d.ts +44 -2
- package/dist/sdk/ocr.d.ts +1 -1
- package/dist/sdk/scan.d.ts +12 -0
- package/package.json +1 -1
- package/dist/finder-B3kHQ2Jh.js.map +0 -1
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ The demo hosts a trained checkpoint at `/models/id-fields-yolox-nano.onnx`. **Se
|
|
|
138
138
|
|
|
139
139
|
`detectDocument` runs DocAligner and returns an ordered `DocumentQuad` with `topLeft`, `topRight`, `bottomRight`, `bottomLeft`, plus typed `top`, `right`, `bottom`, and `left` line segments. Outcomes are `success`, `no-document`, `low-confidence`, or `low-quality`. `scanDocument` uses that same quad for a projective perspective warp and includes the quad in its result.
|
|
140
140
|
|
|
141
|
-
On touch/mobile-class devices, analysis defaults to a 560px working image (1280px on the long edge when the page is tall) and runs in a module Worker when supported. Perspective output is capped at
|
|
141
|
+
On touch/mobile-class devices, analysis defaults to a 560px working image (1280px on the long edge when the page is tall) and runs in a module Worker when supported. Perspective output is capped at 4096px by default, the same long-edge memory cap as `capturePhoto()`. Override `maxAnalysisDimension`, `maxOutputDimension`, or `useWorker` in `ScanOptions` when needed. Chrome `takePhoto()` cannot match the Android Camera app (no HDR+ / OEM ISP). On Android, `ScannerProvider` `captureMode="auto"` (the default) opens that Camera app through `pickNativeCameraStill()`, then `scanSystemCameraStill()` crops the most prominent document. Hosts that want the live overlay on Android pass `captureMode="live"`. Force the picker on any platform with `captureMode="system-camera"`.
|
|
142
142
|
|
|
143
143
|
## Live finder and auto-capture
|
|
144
144
|
|
|
@@ -215,7 +215,7 @@ await setLicenseKey(licenseKey)
|
|
|
215
215
|
</ScannerProvider>
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
`useScanner()` reads the session inside the provider. `useScannerRef()` gives the parent an imperative handle, passed as `apiRef`, the same idea as MUI's `useGridApiRef`. The camera covers the viewport, respects safe areas, shows finder/permission/error states, and keeps the existing auto-capture policies.
|
|
218
|
+
`useScanner()` reads the session inside the provider. `useScannerRef()` gives the parent an imperative handle, passed as `apiRef`, the same idea as MUI's `useGridApiRef`. The camera covers the viewport, respects safe areas, shows finder/permission/error states, and keeps the existing auto-capture policies. On Android, `captureMode="auto"` skips the live preview and opens the system Camera app; DocAligner then finds the most prominent document on that JPEG. A miss stays on screen with **Try again**. iOS keeps the live overlay and auto-capture. The live path requests an ideal 4K rear-camera stream (no 1080×1920 Android cap), shows that stream in the preview, and continuously mirrors the last non-black frame. Outside WebKit, live capture uses `ImageCapture.takePhoto()` at max photo size and keeps the still even when its aspect differs from the preview; a still longer than 4096px is scaled with high-quality smoothing. WebKit `takePhoto()` returns black stills, so iOS copies the live preview or the mirrored frame. A genuinely blank capture fails loudly instead of exporting black pixels. Finder analysis stays on a 520–1600 working copy. Render `ScannerDiagnostics` for a live diagnostics panel with engine/browser, video and track state, luminance, and the chosen capture path; **Copy report** pastes a shutter-time dump for support. Pass `theme` to `ScannerFrame` to recolor the camera. `primaryColorHex` replaces the yellowish-green accents (`#c8ff45`). `seekingColorHex` and `detectingColorHex` are the waiting box colors (both `#ef6a5b` unless set apart), `unstableColorHex` is `#ffbe40`, `readyColorHex` is `#8af25a`, and `capturedColorHex` is `#ffffff`. Omit `theme` or any field to keep that default. The [React camera guide](site/guide/react-camera-overlay.md#theme) lists what each field paints. The demo source screen chooses Default, Ocean, Violet, or Signal before the camera starts and passes that palette as `theme` on `ScannerFrame`. Capture results include the displayed quad and its bounded-analysis dimensions; use `mapDocumentCornersToFrame()` plus `cropDocument()` so the final crop matches what was on screen. The framework-free imperative APIs remain available from the root package.
|
|
219
219
|
|
|
220
220
|
## Run the demo
|
|
221
221
|
|