@microblink/blinkid-ux-manager 7.8.0 → 8000.0.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 +182 -4
- package/dist/blinkid-ux-manager.js +2147 -1820
- package/package.json +2 -2
- package/types/core/BlinkIdTimeoutConfiguration.d.ts +31 -0
- package/types/core/BlinkIdTimeoutConfiguration.d.ts.map +1 -0
- package/types/core/BlinkIdUxManager.d.ts +84 -58
- package/types/core/BlinkIdUxManager.d.ts.map +1 -1
- package/types/core/BlinkIdUxManager.session-status.test.d.ts +5 -0
- package/types/core/BlinkIdUxManager.session-status.test.d.ts.map +1 -0
- package/types/core/BlinkIdUxManager.timeout.test.d.ts +5 -0
- package/types/core/BlinkIdUxManager.timeout.test.d.ts.map +1 -0
- package/types/core/__testdata/blinkidTestFixtures.d.ts +1 -4
- package/types/core/__testdata/blinkidTestFixtures.d.ts.map +1 -1
- package/types/core/blinkid-ui-state.d.ts +4 -9
- package/types/core/blinkid-ui-state.d.ts.map +1 -1
- package/types/core/createBlinkIdUxManager.d.ts +8 -0
- package/types/core/createBlinkIdUxManager.d.ts.map +1 -1
- package/types/core/extractionMode.d.ts +41 -0
- package/types/core/extractionMode.d.ts.map +1 -0
- package/types/core/extractionMode.test.d.ts +5 -0
- package/types/core/extractionMode.test.d.ts.map +1 -0
- package/types/core/test-helpers.integration.d.ts +3 -3
- package/types/core/test-helpers.integration.d.ts.map +1 -1
- package/types/core/test-utils.d.ts +14 -0
- package/types/core/test-utils.d.ts.map +1 -0
- package/types/core/ui-state-utils.d.ts +2 -1
- package/types/core/ui-state-utils.d.ts.map +1 -1
- package/types/index.d.ts +3 -2
- package/types/index.d.ts.map +1 -1
- package/types/index.rollup.d.ts +315 -143
- package/types/ui/BlinkIdFeedbackUi.d.ts +2 -2
- package/types/ui/BlinkIdFeedbackUi.d.ts.map +1 -1
- package/types/ui/LocalizationContext.d.ts +22 -4
- package/types/ui/LocalizationContext.d.ts.map +1 -1
- package/types/ui/UiFeedbackOverlay.d.ts +2 -0
- package/types/ui/UiFeedbackOverlay.d.ts.map +1 -1
- package/types/ui/createBlinkIdFeedbackUi.d.ts +3 -14
- package/types/ui/createBlinkIdFeedbackUi.d.ts.map +1 -1
- package/types/ui/dialogs/HelpModal.d.ts +43 -0
- package/types/ui/dialogs/HelpModal.d.ts.map +1 -1
- package/types/ui/dialogs/OnboardingGuideModal.d.ts +25 -0
- package/types/ui/dialogs/OnboardingGuideModal.d.ts.map +1 -1
- package/types/ui/dialogs/modalExtractionMode.d.ts +7 -0
- package/types/ui/dialogs/modalExtractionMode.d.ts.map +1 -0
- package/types/ui/dialogs/modalExtractionMode.test.d.ts +5 -0
- package/types/ui/dialogs/modalExtractionMode.test.d.ts.map +1 -0
- package/types/ui/feedbackMessages.d.ts +2 -1
- package/types/ui/feedbackMessages.d.ts.map +1 -1
- package/types/ui/locales/ak.d.ts +156 -61
- package/types/ui/locales/ak.d.ts.map +1 -1
- package/types/ui/locales/am.d.ts +156 -61
- package/types/ui/locales/am.d.ts.map +1 -1
- package/types/ui/locales/ar.d.ts +156 -61
- package/types/ui/locales/ar.d.ts.map +1 -1
- package/types/ui/locales/bn.d.ts +156 -61
- package/types/ui/locales/bn.d.ts.map +1 -1
- package/types/ui/locales/cs.d.ts +156 -61
- package/types/ui/locales/cs.d.ts.map +1 -1
- package/types/ui/locales/da.d.ts +156 -61
- package/types/ui/locales/da.d.ts.map +1 -1
- package/types/ui/locales/de.d.ts +156 -61
- package/types/ui/locales/de.d.ts.map +1 -1
- package/types/ui/locales/el.d.ts +156 -61
- package/types/ui/locales/el.d.ts.map +1 -1
- package/types/ui/locales/en.d.ts +156 -61
- package/types/ui/locales/en.d.ts.map +1 -1
- package/types/ui/locales/en_GB.d.ts +156 -61
- package/types/ui/locales/en_GB.d.ts.map +1 -1
- package/types/ui/locales/es.d.ts +156 -61
- package/types/ui/locales/es.d.ts.map +1 -1
- package/types/ui/locales/es_MX.d.ts +156 -61
- package/types/ui/locales/es_MX.d.ts.map +1 -1
- package/types/ui/locales/fa-latn.d.ts +156 -61
- package/types/ui/locales/fa-latn.d.ts.map +1 -1
- package/types/ui/locales/fi.d.ts +156 -61
- package/types/ui/locales/fi.d.ts.map +1 -1
- package/types/ui/locales/fil.d.ts +156 -61
- package/types/ui/locales/fil.d.ts.map +1 -1
- package/types/ui/locales/fr.d.ts +156 -61
- package/types/ui/locales/fr.d.ts.map +1 -1
- package/types/ui/locales/fr_CA.d.ts +156 -61
- package/types/ui/locales/fr_CA.d.ts.map +1 -1
- package/types/ui/locales/ha.d.ts +156 -61
- package/types/ui/locales/ha.d.ts.map +1 -1
- package/types/ui/locales/he.d.ts +156 -61
- package/types/ui/locales/he.d.ts.map +1 -1
- package/types/ui/locales/hi.d.ts +156 -61
- package/types/ui/locales/hi.d.ts.map +1 -1
- package/types/ui/locales/hr.d.ts +156 -61
- package/types/ui/locales/hr.d.ts.map +1 -1
- package/types/ui/locales/hu.d.ts +156 -61
- package/types/ui/locales/hu.d.ts.map +1 -1
- package/types/ui/locales/id.d.ts +156 -61
- package/types/ui/locales/id.d.ts.map +1 -1
- package/types/ui/locales/is.d.ts +156 -61
- package/types/ui/locales/is.d.ts.map +1 -1
- package/types/ui/locales/it.d.ts +156 -61
- package/types/ui/locales/it.d.ts.map +1 -1
- package/types/ui/locales/ja.d.ts +156 -61
- package/types/ui/locales/ja.d.ts.map +1 -1
- package/types/ui/locales/ka_GE.d.ts +156 -61
- package/types/ui/locales/ka_GE.d.ts.map +1 -1
- package/types/ui/locales/kk.d.ts +156 -61
- package/types/ui/locales/kk.d.ts.map +1 -1
- package/types/ui/locales/km_KH.d.ts +156 -61
- package/types/ui/locales/km_KH.d.ts.map +1 -1
- package/types/ui/locales/ko.d.ts +156 -61
- package/types/ui/locales/ko.d.ts.map +1 -1
- package/types/ui/locales/lv.d.ts +156 -61
- package/types/ui/locales/lv.d.ts.map +1 -1
- package/types/ui/locales/ms.d.ts +156 -61
- package/types/ui/locales/ms.d.ts.map +1 -1
- package/types/ui/locales/ne.d.ts +156 -61
- package/types/ui/locales/ne.d.ts.map +1 -1
- package/types/ui/locales/nl.d.ts +156 -61
- package/types/ui/locales/nl.d.ts.map +1 -1
- package/types/ui/locales/no.d.ts +156 -61
- package/types/ui/locales/no.d.ts.map +1 -1
- package/types/ui/locales/pl.d.ts +156 -61
- package/types/ui/locales/pl.d.ts.map +1 -1
- package/types/ui/locales/ps_AF.d.ts +156 -61
- package/types/ui/locales/ps_AF.d.ts.map +1 -1
- package/types/ui/locales/pt.d.ts +156 -61
- package/types/ui/locales/pt.d.ts.map +1 -1
- package/types/ui/locales/pt_BR.d.ts +156 -61
- package/types/ui/locales/pt_BR.d.ts.map +1 -1
- package/types/ui/locales/ro.d.ts +156 -61
- package/types/ui/locales/ro.d.ts.map +1 -1
- package/types/ui/locales/ru.d.ts +156 -61
- package/types/ui/locales/ru.d.ts.map +1 -1
- package/types/ui/locales/si.d.ts +156 -61
- package/types/ui/locales/si.d.ts.map +1 -1
- package/types/ui/locales/sk.d.ts +156 -61
- package/types/ui/locales/sk.d.ts.map +1 -1
- package/types/ui/locales/sl.d.ts +156 -61
- package/types/ui/locales/sl.d.ts.map +1 -1
- package/types/ui/locales/sr.d.ts +156 -61
- package/types/ui/locales/sr.d.ts.map +1 -1
- package/types/ui/locales/sv.d.ts +156 -61
- package/types/ui/locales/sv.d.ts.map +1 -1
- package/types/ui/locales/sw.d.ts +156 -61
- package/types/ui/locales/sw.d.ts.map +1 -1
- package/types/ui/locales/th.d.ts +156 -61
- package/types/ui/locales/th.d.ts.map +1 -1
- package/types/ui/locales/tr.d.ts +156 -61
- package/types/ui/locales/tr.d.ts.map +1 -1
- package/types/ui/locales/uk.d.ts +156 -61
- package/types/ui/locales/uk.d.ts.map +1 -1
- package/types/ui/locales/ur.d.ts +156 -61
- package/types/ui/locales/ur.d.ts.map +1 -1
- package/types/ui/locales/uz.d.ts +156 -61
- package/types/ui/locales/uz.d.ts.map +1 -1
- package/types/ui/locales/vi.d.ts +156 -61
- package/types/ui/locales/vi.d.ts.map +1 -1
- package/types/ui/locales/yo.d.ts +156 -61
- package/types/ui/locales/yo.d.ts.map +1 -1
- package/types/ui/locales/zh_CN.d.ts +156 -61
- package/types/ui/locales/zh_CN.d.ts.map +1 -1
- package/types/ui/locales/zh_TW.d.ts +156 -61
- package/types/ui/locales/zh_TW.d.ts.map +1 -1
package/types/index.rollup.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnalyticService } from '@microblink/blinkid-core';
|
|
2
|
+
import { BlinkIdProcessResult } from '@microblink/blinkid-core';
|
|
2
3
|
import { BlinkIdScanningResult } from '@microblink/blinkid-core';
|
|
3
4
|
import { BlinkIdSessionSettings } from '@microblink/blinkid-core';
|
|
4
5
|
import { CameraManager } from '@microblink/camera-manager';
|
|
@@ -6,10 +7,45 @@ import { CameraManagerComponent } from '@microblink/camera-manager';
|
|
|
6
7
|
import { DeviceInfo } from '@microblink/blinkid-core';
|
|
7
8
|
import { DocumentClassInfo } from '@microblink/blinkid-core';
|
|
8
9
|
import { InputImageAnalysisResult } from '@microblink/blinkid-core';
|
|
9
|
-
import { ProcessResultWithBuffer } from '@microblink/blinkid-core';
|
|
10
10
|
import { RemoteScanningSession } from '@microblink/blinkid-core';
|
|
11
|
-
import { ResultCompleteness } from '@microblink/blinkid-core';
|
|
12
11
|
import { ScanningSettings } from '@microblink/blinkid-core';
|
|
12
|
+
import { ScanningStatus } from '@microblink/blinkid-core';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* UI-facing classification of how a BlinkID session extracts data.
|
|
16
|
+
*
|
|
17
|
+
* The UX manager uses this mode to choose feedback copy, help/onboarding locale
|
|
18
|
+
* groups, and extraction-specific modal illustrations.
|
|
19
|
+
*
|
|
20
|
+
* - `full-document` - Standard document flow for document capture, MRZ, VIZ, or
|
|
21
|
+
* mixed multi-side extraction.
|
|
22
|
+
* - `document-with-barcode` - Single-side document capture flow that requires
|
|
23
|
+
* the barcode side to be scanned.
|
|
24
|
+
* - `barcode-only` - Barcode extraction flow with no document capture, MRZ, or
|
|
25
|
+
* VIZ extraction.
|
|
26
|
+
*/
|
|
27
|
+
declare type BlinkIdExtractionMode = "full-document" | "document-with-barcode" | "barcode-only";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Callback invoked after BlinkID processes a camera frame.
|
|
31
|
+
*
|
|
32
|
+
* @param frameResult - Process result for the current frame. This contains the
|
|
33
|
+
* input image analysis and result completeness data that the UX manager uses to
|
|
34
|
+
* map feedback state; it does not include the final scanning result.
|
|
35
|
+
* @param advanceToNextStep - Advances the scanning session to the next required
|
|
36
|
+
* step. Use this for custom flows that decide, from the frame result, that the
|
|
37
|
+
* current side or step is complete before the default UX flow advances. For
|
|
38
|
+
* example, call this once `frameResult` contains all data your integration
|
|
39
|
+
* needs, even if the default flow would keep waiting for an optional barcode
|
|
40
|
+
* step that is hard to capture on a poor camera.
|
|
41
|
+
* @param triggerStepTimeout - Immediately triggers the scan-step timeout path
|
|
42
|
+
* for the active step. Use this when custom validation decides that the current
|
|
43
|
+
* step should fail or stop waiting for more frames.
|
|
44
|
+
* @param getLastFrame - Returns the raw `ArrayBuffer` for the frame that
|
|
45
|
+
* produced `frameResult`. The buffer is intended for diagnostics or custom
|
|
46
|
+
* tooling that needs the exact last processed frame.
|
|
47
|
+
*/
|
|
48
|
+
export declare type BlinkIdFrameProcessCallback = (frameResult: BlinkIdProcessResult, advanceToNextStep: () => Promise<void>, triggerStepTimeout: () => void, getLastFrame: () => ArrayBuffer) => void;
|
|
13
49
|
|
|
14
50
|
/**
|
|
15
51
|
* Union type of all page transition state keys.
|
|
@@ -58,11 +94,64 @@ export declare const blinkIdPageTransitionKeys: readonly ["FLIP_CARD", "MOVE_TOP
|
|
|
58
94
|
*/
|
|
59
95
|
export declare type BlinkIdProcessingError = "timeout" | "unsupported_document" | "result_retrieval_failed" | "unknown";
|
|
60
96
|
|
|
97
|
+
export declare type BlinkIdProgress = {
|
|
98
|
+
/** Currently stabilized BlinkID UI state key. */
|
|
99
|
+
uiStateKey: BlinkIdUiStateKey;
|
|
100
|
+
/** Remaining state for the inactivity timeout. */
|
|
101
|
+
inactivity: BlinkIdProgressTimerState;
|
|
102
|
+
/** Remaining state for the scan-step timeout. */
|
|
103
|
+
perSide: BlinkIdProgressTimerState;
|
|
104
|
+
/** Remaining state for partially supported barcode auto-resolution. */
|
|
105
|
+
partiallySupportedBarcodeResolve: BlinkIdProgressTimerState;
|
|
106
|
+
/** Whether BlinkID is currently timing an active scan step. */
|
|
107
|
+
isTimingActiveScanStep: boolean;
|
|
108
|
+
/** Current camera playback state that controls timer pause/resume. */
|
|
109
|
+
playbackState: "idle" | "playback" | "capturing";
|
|
110
|
+
/** Latest raw mapped BlinkID UI key. */
|
|
111
|
+
mappedUiStateKey: BlinkIdUiStateKey;
|
|
112
|
+
/** Stabilized UI state key that last reset the inactivity timeout. */
|
|
113
|
+
inactivityResetUiStateKey?: BlinkIdUiStateKey;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export declare type BlinkIdProgressTimerState = {
|
|
117
|
+
/** Configured timeout duration in milliseconds. */
|
|
118
|
+
configuredMs: number | null;
|
|
119
|
+
/** Remaining timeout duration in milliseconds. */
|
|
120
|
+
remainingMs: number | null;
|
|
121
|
+
/** Whether this timer is idle, actively counting down, or paused. */
|
|
122
|
+
status: BlinkIdProgressTimerStatus;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export declare type BlinkIdProgressTimerStatus = "disabled" | "idle" | "running" | "paused";
|
|
126
|
+
|
|
61
127
|
/**
|
|
62
128
|
* The type of reticle to display.
|
|
63
129
|
*/
|
|
64
130
|
export declare type BlinkIdReticleType = "searching" | "processing" | "error" | "done" | "flip" | "move_top" | "move_left" | "move_right";
|
|
65
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
134
|
+
*/
|
|
135
|
+
export declare type BlinkIdTimeoutConfiguration = {
|
|
136
|
+
/**
|
|
137
|
+
* Maximum allowed inactivity window in milliseconds. The inactivity timer is
|
|
138
|
+
* reset whenever the stabilized BlinkID UI state changes. Set to `null` to
|
|
139
|
+
* disable the inactivity timeout.
|
|
140
|
+
*/
|
|
141
|
+
inactivityTimeoutMs: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* Maximum allowed capture duration for a single BlinkID scan step in
|
|
144
|
+
* milliseconds. Set to `null` to disable the scan-step timeout.
|
|
145
|
+
*/
|
|
146
|
+
scanStepTimeoutMs: number | null;
|
|
147
|
+
/**
|
|
148
|
+
* Active-capture delay before resolving a barcode step once BlinkID reports a
|
|
149
|
+
* barcode whose parsing is not supported. Set to `null` to disable automatic
|
|
150
|
+
* resolution for partially supported barcodes.
|
|
151
|
+
*/
|
|
152
|
+
partiallySupportedBarcodeResolveTimeoutMs: number | null;
|
|
153
|
+
};
|
|
154
|
+
|
|
66
155
|
export declare type BlinkIdUiErrorStateKey = (typeof blinkIdUiErrorStateKeys)[number];
|
|
67
156
|
|
|
68
157
|
/**
|
|
@@ -198,28 +287,14 @@ export declare class BlinkIdUxManager {
|
|
|
198
287
|
get uiStateKey(): BlinkIdUiStateKey;
|
|
199
288
|
/** Latest mapped candidate key before stabilization. */
|
|
200
289
|
get mappedUiStateKey(): BlinkIdUiStateKey;
|
|
201
|
-
/**
|
|
202
|
-
|
|
203
|
-
*/
|
|
204
|
-
get rawUiStateKey(): BlinkIdUiStateKey;
|
|
290
|
+
/** Session-settings-derived extraction mode used by feedback and dialogs. */
|
|
291
|
+
get extractionMode(): BlinkIdExtractionMode;
|
|
205
292
|
startUiUpdateLoop(): void;
|
|
206
293
|
stopUiUpdateLoop(): void;
|
|
207
294
|
/**
|
|
208
|
-
* Returns the
|
|
209
|
-
*/
|
|
210
|
-
getTimeoutDuration(): number | null;
|
|
211
|
-
/**
|
|
212
|
-
* Returns the time in ms before the help tooltip is shown. Null if tooltip won't be auto shown.
|
|
213
|
-
*
|
|
214
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` in `FeedbackUiOptions` instead.
|
|
215
|
-
*/
|
|
216
|
-
getHelpTooltipShowDelay(): number | null;
|
|
217
|
-
/**
|
|
218
|
-
* Returns the time in ms before the help tooltip is hidden. Null if tooltip won't be auto hidden.
|
|
219
|
-
*
|
|
220
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipHideDelay` in `FeedbackUiOptions` instead.
|
|
295
|
+
* Returns the active BlinkID timeout configuration.
|
|
221
296
|
*/
|
|
222
|
-
|
|
297
|
+
getTimeoutConfiguration(): BlinkIdTimeoutConfiguration;
|
|
223
298
|
/**
|
|
224
299
|
* Gets the haptic feedback manager instance.
|
|
225
300
|
*
|
|
@@ -302,20 +377,24 @@ export declare class BlinkIdUxManager {
|
|
|
302
377
|
/**
|
|
303
378
|
* Registers a callback function to be called when a frame is processed.
|
|
304
379
|
*
|
|
305
|
-
* @param callback - A function that
|
|
306
|
-
*
|
|
380
|
+
* @param callback - A function that receives the processed frame result and
|
|
381
|
+
* controls for custom step advancement, step timeout triggering, and access to
|
|
382
|
+
* the last processed frame buffer.
|
|
307
383
|
* @returns A cleanup function that, when called, will remove the registered
|
|
308
384
|
* callback.
|
|
309
385
|
*
|
|
310
386
|
* @example
|
|
311
|
-
* const cleanup = manager.addOnFrameProcessCallback((frameResult) => {
|
|
387
|
+
* const cleanup = manager.addOnFrameProcessCallback((frameResult, advanceToNextStep) => {
|
|
312
388
|
* console.log('Frame processed:', frameResult);
|
|
389
|
+
* if (shouldAdvance(frameResult)) {
|
|
390
|
+
* void advanceToNextStep();
|
|
391
|
+
* }
|
|
313
392
|
* });
|
|
314
393
|
*
|
|
315
394
|
* // Later, to remove the callback:
|
|
316
395
|
* cleanup();
|
|
317
396
|
*/
|
|
318
|
-
addOnFrameProcessCallback(callback:
|
|
397
|
+
addOnFrameProcessCallback(callback: BlinkIdFrameProcessCallback): () => void;
|
|
319
398
|
/**
|
|
320
399
|
* Registers a callback function to be called when an error occurs during
|
|
321
400
|
* processing.
|
|
@@ -333,6 +412,23 @@ export declare class BlinkIdUxManager {
|
|
|
333
412
|
* cleanup();
|
|
334
413
|
*/
|
|
335
414
|
addOnErrorCallback(callback: (errorState: BlinkIdProcessingError) => void): () => void;
|
|
415
|
+
/**
|
|
416
|
+
* Registers a callback function to receive BlinkID progress snapshots.
|
|
417
|
+
*
|
|
418
|
+
* @param callback - A function that will be called with progress data from
|
|
419
|
+
* the internal 30 FPS RAF loop.
|
|
420
|
+
* @returns A cleanup function that, when called, will remove the registered
|
|
421
|
+
* callback.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* const cleanup = manager.addOnProgressCallback((progress) => {
|
|
425
|
+
* console.log('BlinkID progress:', progress);
|
|
426
|
+
* });
|
|
427
|
+
*
|
|
428
|
+
* // Later, to remove the callback:
|
|
429
|
+
* cleanup();
|
|
430
|
+
*/
|
|
431
|
+
addOnProgressCallback(callback: (progress: BlinkIdProgress) => void): () => void;
|
|
336
432
|
/**
|
|
337
433
|
* Registers a callback function to be called when a document is filtered.
|
|
338
434
|
*
|
|
@@ -351,42 +447,12 @@ export declare class BlinkIdUxManager {
|
|
|
351
447
|
*/
|
|
352
448
|
addOnDocumentFilteredCallback(callback: (documentClassInfo: DocumentClassInfo) => void): () => void;
|
|
353
449
|
/**
|
|
354
|
-
*
|
|
355
|
-
* timeout can occur in various scenarios and may be restarted by different
|
|
356
|
-
* scanning events.
|
|
357
|
-
*
|
|
358
|
-
* @param duration The timeout duration in milliseconds. If null, timeout won't
|
|
359
|
-
* be triggered ever.
|
|
360
|
-
* @param setHelpTooltipShowDelay If true, also sets the help tooltip show
|
|
361
|
-
* delay to half of the provided duration. If timeout duration is null, help
|
|
362
|
-
* tooltip show delay will be set to null. Defaults to true.
|
|
363
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when not null.
|
|
364
|
-
*/
|
|
365
|
-
setTimeoutDuration(duration: number | null, setHelpTooltipShowDelay?: boolean): void;
|
|
366
|
-
/**
|
|
367
|
-
* Sets the duration in milliseconds before the help tooltip is shown.
|
|
368
|
-
* A value of null means the help tooltip will not be auto shown.
|
|
369
|
-
*
|
|
370
|
-
* @param duration The duration in milliseconds before the help tooltip is
|
|
371
|
-
* shown. If null, tooltip won't be auto shown.
|
|
372
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when
|
|
373
|
-
* not null.
|
|
374
|
-
*
|
|
375
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` in `FeedbackUiOptions` instead.
|
|
376
|
-
*/
|
|
377
|
-
setHelpTooltipShowDelay(duration: number | null): void;
|
|
378
|
-
/**
|
|
379
|
-
* Sets the duration in milliseconds before the help tooltip is hidden.
|
|
380
|
-
* A value of null means the help tooltip will not be auto hidden.
|
|
381
|
-
*
|
|
382
|
-
* @param duration The duration in milliseconds before the help tooltip is
|
|
383
|
-
* hidden. If null, tooltip won't be auto hidden.
|
|
384
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when
|
|
385
|
-
* not null.
|
|
450
|
+
* Updates the BlinkID timeout configuration.
|
|
386
451
|
*
|
|
387
|
-
*
|
|
452
|
+
* Updating the configuration resets timeout tracking for the current scan
|
|
453
|
+
* step so the new durations take effect immediately.
|
|
388
454
|
*/
|
|
389
|
-
|
|
455
|
+
setTimeoutConfiguration(timeoutConfiguration: Partial<BlinkIdTimeoutConfiguration>): void;
|
|
390
456
|
handleCameraManagerError: (error: Error) => void;
|
|
391
457
|
/**
|
|
392
458
|
* Returns the initial UI state key used when resetting UX state.
|
|
@@ -433,12 +499,19 @@ export declare class BlinkIdUxManager {
|
|
|
433
499
|
destroy(): void;
|
|
434
500
|
}
|
|
435
501
|
|
|
502
|
+
/**
|
|
503
|
+
* Options for the BlinkIdUxManager.
|
|
504
|
+
*/
|
|
436
505
|
export declare type BlinkIdUxManagerOptions = {
|
|
437
506
|
/**
|
|
438
507
|
* Initial UI state key used by the manager/stabilizer reset flow.
|
|
439
508
|
* Defaults to `INTRO_FRONT_PAGE`.
|
|
440
509
|
*/
|
|
441
510
|
initialUiStateKey?: BlinkIdUiStateKey;
|
|
511
|
+
/**
|
|
512
|
+
* Configures BlinkID scanning timeout behavior.
|
|
513
|
+
*/
|
|
514
|
+
timeoutConfiguration?: Partial<BlinkIdTimeoutConfiguration>;
|
|
442
515
|
};
|
|
443
516
|
|
|
444
517
|
/**
|
|
@@ -461,71 +534,174 @@ export declare function createBlinkIdFeedbackUi(blinkIdUxManager: BlinkIdUxManag
|
|
|
461
534
|
*/
|
|
462
535
|
export declare const createBlinkIdUxManager: (cameraManager: CameraManager, scanningSession: RemoteScanningSession, options?: BlinkIdUxManagerOptions) => Promise<BlinkIdUxManager>;
|
|
463
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Deep partial type that allows any string to be assigned to override values.
|
|
539
|
+
* This type is permissive to allow any partial override structure.
|
|
540
|
+
*/
|
|
541
|
+
declare type DeepPartialLocalized<T> = T extends Record<string, unknown> ? {
|
|
542
|
+
-readonly [K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartialLocalized<T[K]> | string : string;
|
|
543
|
+
} : never;
|
|
544
|
+
|
|
464
545
|
/**
|
|
465
546
|
* Localization strings for en.
|
|
466
547
|
*/
|
|
467
548
|
declare const _default: {
|
|
468
|
-
readonly
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
readonly
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
readonly
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
readonly
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
readonly
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
readonly
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
549
|
+
readonly document_filtered_modal: {
|
|
550
|
+
readonly details: "Try scanning a different document.";
|
|
551
|
+
readonly title: "Document not accepted";
|
|
552
|
+
};
|
|
553
|
+
readonly document_not_recognized_modal: {
|
|
554
|
+
readonly details: "Scan the front side of a supported document.";
|
|
555
|
+
readonly title: "Document not recognized";
|
|
556
|
+
};
|
|
557
|
+
readonly error_modal: {
|
|
558
|
+
readonly cancel_btn: "Cancel";
|
|
559
|
+
readonly retry_btn: "Retry";
|
|
560
|
+
};
|
|
561
|
+
readonly feedback_messages: {
|
|
562
|
+
readonly blur_detected: "Keep document and phone still";
|
|
563
|
+
readonly camera_angle_too_steep: "Keep document parallel to phone";
|
|
564
|
+
readonly document_scanned_aria: "Success! Document scanned";
|
|
565
|
+
readonly document_too_close_to_edge: "Move farther";
|
|
566
|
+
readonly face_photo_not_fully_visible: "Keep face photo fully visible";
|
|
567
|
+
readonly flip_document: "Flip the document";
|
|
568
|
+
readonly flip_to_back_side: "Flip to the back side";
|
|
569
|
+
readonly front_side_scanned_aria: "Success! Front side scanned";
|
|
570
|
+
readonly glare_detected: "Tilt or move document to remove reflection";
|
|
571
|
+
readonly keep_document_parallel: "Keep document parallel with screen";
|
|
572
|
+
readonly keep_document_still: "Keep document and device still";
|
|
573
|
+
readonly keep_still: "Keep still";
|
|
574
|
+
readonly move_closer: "Move closer";
|
|
575
|
+
readonly move_farther: "Move farther";
|
|
576
|
+
readonly move_left: "Move to the page on the left";
|
|
577
|
+
readonly move_right: "Move to the page on the right";
|
|
578
|
+
readonly move_top: "Move to the page on top";
|
|
579
|
+
readonly occluded: "Keep the document fully visible";
|
|
580
|
+
readonly scan_data_page: "Scan the data page of a document";
|
|
581
|
+
readonly scan_last_page_barcode: "Scan barcode from the last page";
|
|
582
|
+
readonly scan_left_page: "Scan the left page";
|
|
583
|
+
readonly scan_right_page: "Scan the right page";
|
|
584
|
+
readonly scan_the_back_side: "Scan the back side of a document";
|
|
585
|
+
readonly scan_the_barcode: "Scan the barcode";
|
|
586
|
+
readonly scan_the_barcode_side: "Scan the barcode side of a document";
|
|
587
|
+
readonly scan_the_front_side: "Scan the front side of a document";
|
|
588
|
+
readonly scan_top_page: "Scan the top page";
|
|
589
|
+
readonly too_bright: "Move to spot with less lighting";
|
|
590
|
+
readonly too_dark: "Move to brighter spot";
|
|
591
|
+
readonly wrong_left: "Move to the left page";
|
|
592
|
+
readonly wrong_right: "Move to the right page";
|
|
593
|
+
readonly wrong_top: "Move to the top page";
|
|
594
|
+
};
|
|
595
|
+
readonly help_button: {
|
|
596
|
+
readonly aria_label: "Help";
|
|
597
|
+
readonly tooltip: "Need help?";
|
|
598
|
+
};
|
|
599
|
+
readonly help_modal: {
|
|
600
|
+
readonly aria: "Scanning help";
|
|
601
|
+
readonly back_btn: "Back";
|
|
602
|
+
readonly barcode_only: {
|
|
603
|
+
readonly blur: {
|
|
604
|
+
readonly details: "Try to keep the phone and the barcode still while scanning. Moving either can blur the image and make the barcode difficult to read.";
|
|
605
|
+
readonly details_desktop: "Try to keep still while scanning. Moving can blur the image and make the barcode difficult to read.";
|
|
606
|
+
readonly title: "Keep still while scanning";
|
|
607
|
+
readonly title_desktop: "Keep still while scanning";
|
|
608
|
+
};
|
|
609
|
+
readonly camera_lens: {
|
|
610
|
+
readonly details_desktop: "Check your camera lens for smudges or dust. A dirty lens causes the final image to blur, making the barcode unreadable and preventing successful scan of the data.";
|
|
611
|
+
readonly title_desktop: "Clean your camera lens";
|
|
612
|
+
};
|
|
613
|
+
readonly lighting: {
|
|
614
|
+
readonly details: "Avoid direct harsh light because it can create glare on the barcode and make it difficult to scan. If the barcode isn’t clearly visible to you, the camera may not be able to read it either.";
|
|
615
|
+
readonly details_desktop: "Avoid direct harsh light because it can create glare on the barcode and make it difficult to scan. If the barcode isn’t clearly visible to you, the camera may not be able to read it either.";
|
|
616
|
+
readonly title: "Watch out for harsh light";
|
|
617
|
+
readonly title_desktop: "Watch out for harsh light";
|
|
618
|
+
};
|
|
619
|
+
readonly visibility: {
|
|
620
|
+
readonly details: "Make sure you aren’t covering parts of the barcode with a finger. Also, watch out for reflections that go over the barcode and could make it unreadable.";
|
|
621
|
+
readonly details_desktop: "Make sure you aren’t covering parts of the barcode with a finger. Also, watch out for reflections that go over the barcode and could make it unreadable.";
|
|
622
|
+
readonly title: "Keep the barcode visible";
|
|
623
|
+
readonly title_desktop: "Keep the barcode visible";
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
readonly document_with_barcode: {
|
|
627
|
+
readonly blur: {
|
|
628
|
+
readonly details: "Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.";
|
|
629
|
+
readonly details_desktop: "Try to keep still while scanning. Moving can blur the image and make data on the document unreadable.";
|
|
630
|
+
readonly title: "Keep still while scanning";
|
|
631
|
+
readonly title_desktop: "Keep still while scanning";
|
|
632
|
+
};
|
|
633
|
+
readonly camera_lens: {
|
|
634
|
+
readonly details_desktop: "Check your camera lens for smudges or dust. A dirty lens causes the final image to blur, making the document details unreadable and preventing successful scan of the data.";
|
|
635
|
+
readonly title_desktop: "Clean your camera lens";
|
|
636
|
+
};
|
|
637
|
+
readonly lighting: {
|
|
638
|
+
readonly details: "Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.";
|
|
639
|
+
readonly details_desktop: "Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.";
|
|
640
|
+
readonly title: "Watch out for harsh light";
|
|
641
|
+
readonly title_desktop: "Watch out for harsh light";
|
|
642
|
+
};
|
|
643
|
+
readonly visibility: {
|
|
644
|
+
readonly details: "Make sure you aren’t covering parts of the barcode with a finger. Also, watch out for reflections that go over the barcode and could make it unreadable.";
|
|
645
|
+
readonly details_desktop: "Make sure you aren’t covering parts of the barcode with a finger. Also, watch out for reflections that go over the barcode and could make it unreadable.";
|
|
646
|
+
readonly title: "Keep the barcode visible";
|
|
647
|
+
readonly title_desktop: "Keep the barcode visible";
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
readonly done_btn: "Done";
|
|
651
|
+
readonly done_btn_aria: "Resume scanning";
|
|
652
|
+
readonly full_document: {
|
|
653
|
+
readonly blur: {
|
|
654
|
+
readonly details: "Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.";
|
|
655
|
+
readonly details_desktop: "Try to keep still while scanning. Moving can blur the image and make data on the document unreadable.";
|
|
656
|
+
readonly title: "Keep still while scanning";
|
|
657
|
+
readonly title_desktop: "Keep still while scanning";
|
|
658
|
+
};
|
|
659
|
+
readonly camera_lens: {
|
|
660
|
+
readonly details_desktop: "Check your camera lens for smudges or dust. A dirty lens causes the final image to blur, making the document details unreadable and preventing successful scan of the data.";
|
|
661
|
+
readonly title_desktop: "Clean your camera lens";
|
|
662
|
+
};
|
|
663
|
+
readonly lighting: {
|
|
664
|
+
readonly details: "Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.";
|
|
665
|
+
readonly details_desktop: "Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.";
|
|
666
|
+
readonly title: "Watch out for harsh light";
|
|
667
|
+
readonly title_desktop: "Watch out for harsh light";
|
|
668
|
+
};
|
|
669
|
+
readonly visibility: {
|
|
670
|
+
readonly details: "Make sure you aren’t covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields.";
|
|
671
|
+
readonly details_desktop: "Make sure you aren’t covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields.";
|
|
672
|
+
readonly title: "Keep all the fields visible";
|
|
673
|
+
readonly title_desktop: "Keep all the fields visible";
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
readonly next_btn: "Next";
|
|
677
|
+
};
|
|
678
|
+
readonly onboarding_modal: {
|
|
679
|
+
readonly aria: "Scanning Instructions";
|
|
680
|
+
readonly barcode_only: {
|
|
681
|
+
readonly details: "Look for a barcode (a series of black lines or a square code). Point your camera at it and hold still — scanning will happen automatically.";
|
|
682
|
+
readonly details_desktop: "Look for a barcode (a series of black lines or a square code). Make sure you keep your camera lens clean and the barcode well lit.";
|
|
683
|
+
readonly title: "Locate and scan the barcode";
|
|
684
|
+
readonly title_desktop: "Clean your lens and locate barcode";
|
|
685
|
+
};
|
|
686
|
+
readonly btn: "Start scanning";
|
|
687
|
+
readonly document_with_barcode: {
|
|
688
|
+
readonly details: "Different types of IDs may have different barcode formats and locations. Look at the front and back of the ID for a barcode.";
|
|
689
|
+
readonly details_desktop: "Check the front and back of the ID for a barcode. Make sure you keep your camera lens clean and the document well lit.";
|
|
690
|
+
readonly title: "Locate barcode on ID";
|
|
691
|
+
readonly title_desktop: "Clean your lens and locate barcode";
|
|
692
|
+
};
|
|
693
|
+
readonly full_document: {
|
|
694
|
+
readonly details: "Make sure you keep the document well lit. All document fields should be visible on the camera screen.";
|
|
695
|
+
readonly details_desktop: "Make sure you keep your camera lens clean and the document well lit. All document fields should be visible on the camera screen.";
|
|
696
|
+
readonly title: "Keep all the details visible";
|
|
697
|
+
readonly title_desktop: "Get ready to scan";
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
readonly sdk_aria: "Document scanning screen";
|
|
701
|
+
readonly timeout_modal: {
|
|
702
|
+
readonly details: "Unable to read the document. Please try again.";
|
|
703
|
+
readonly title: "Scan unsuccessful";
|
|
704
|
+
};
|
|
529
705
|
};
|
|
530
706
|
|
|
531
707
|
/**
|
|
@@ -693,7 +869,7 @@ export declare type FeedbackUiOptions = {
|
|
|
693
869
|
/**
|
|
694
870
|
* The localization strings.
|
|
695
871
|
*/
|
|
696
|
-
localizationStrings?:
|
|
872
|
+
localizationStrings?: PartialLocalizationStrings;
|
|
697
873
|
/**
|
|
698
874
|
* If set to `true`, the BlinkID instance will not be terminated when the
|
|
699
875
|
* feedback UI is unmounted.
|
|
@@ -713,18 +889,7 @@ export declare type FeedbackUiOptions = {
|
|
|
713
889
|
* @defaultValue true
|
|
714
890
|
*/
|
|
715
891
|
showHelpButton?: boolean;
|
|
716
|
-
/**
|
|
717
|
-
* The timeout for the help tooltip in ms.
|
|
718
|
-
*
|
|
719
|
-
* @defaultValue 3000
|
|
720
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` instead.
|
|
721
|
-
*/
|
|
722
|
-
showHelpTooltipTimeout?: number;
|
|
723
|
-
/**
|
|
724
|
-
* Time in ms before the help tooltip is shown. If null, tooltip won't be auto shown.
|
|
725
|
-
*
|
|
726
|
-
* @defaultValue 5000
|
|
727
|
-
*/
|
|
892
|
+
/** Time in ms before the help tooltip is shown. If null, tooltip won't be auto shown. */
|
|
728
893
|
helpTooltipShowDelay?: number | null;
|
|
729
894
|
/**
|
|
730
895
|
* Time in ms before the help tooltip is hidden. If null, tooltip won't be auto hidden.
|
|
@@ -766,7 +931,12 @@ export declare type FeedbackUiOptions = {
|
|
|
766
931
|
* selection.
|
|
767
932
|
* @returns The UI state key representing what should be shown to the user.
|
|
768
933
|
*/
|
|
769
|
-
export declare function getUiStateKey(
|
|
934
|
+
export declare function getUiStateKey(scanningStatus: ScanningStatus, inputImageAnalysisResult: InputImageAnalysisResult, scanningSettings: ScanningSettings): BlinkIdUiMappableKey | undefined;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Maps a session-level scanning status to a UI state key
|
|
938
|
+
*/
|
|
939
|
+
export declare function getUiStateKeyFromScanningStatus(scanningStatus: ScanningStatus): BlinkIdUiMappableKey | undefined;
|
|
770
940
|
|
|
771
941
|
/**
|
|
772
942
|
* Mapping of haptic feedback types to their durations.
|
|
@@ -834,20 +1004,22 @@ export declare type LocaleRecord = typeof _default;
|
|
|
834
1004
|
|
|
835
1005
|
/**
|
|
836
1006
|
* The localization strings type.
|
|
1007
|
+
* This allows for autocomplete for defaults, but also overriding with strings at any level.
|
|
1008
|
+
* https://twitter.com/mattpocockuk/status/1709281782325977101
|
|
837
1009
|
*/
|
|
838
|
-
export declare type LocalizationStrings =
|
|
839
|
-
[K in keyof LocaleRecord]: LocaleRecord[K] | (string & {});
|
|
840
|
-
};
|
|
1010
|
+
export declare type LocalizationStrings = LocalizedValue<LocaleRecord>;
|
|
841
1011
|
|
|
842
1012
|
/**
|
|
843
|
-
*
|
|
1013
|
+
* Recursively transforms a locale record to allow string overrides at any level.
|
|
844
1014
|
*/
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1015
|
+
declare type LocalizedValue<T> = T extends Record<string, unknown> ? {
|
|
1016
|
+
[K in keyof T]: LocalizedValue<T[K]>;
|
|
1017
|
+
} | (string & Record<string, never>) : T | (string & Record<string, never>);
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Partial version of LocalizationStrings that allows any string to be assigned.
|
|
1021
|
+
*/
|
|
1022
|
+
export declare type PartialLocalizationStrings = DeepPartialLocalized<LocaleRecord>;
|
|
851
1023
|
|
|
852
1024
|
/** Helper type to extract string keys from a state map */
|
|
853
1025
|
declare type StateKey<T extends UiStateMap> = keyof T & string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import type { Component } from "solid-js";
|
|
5
|
-
import {
|
|
5
|
+
import { PartialLocalizationStrings } from "./LocalizationContext";
|
|
6
6
|
import "virtual:uno.css";
|
|
7
7
|
/**
|
|
8
8
|
* The BlinkIdFeedbackUi component. This is the main component that renders the
|
|
@@ -13,6 +13,6 @@ import "virtual:uno.css";
|
|
|
13
13
|
* @returns The BlinkIdFeedbackUi component.
|
|
14
14
|
*/
|
|
15
15
|
export declare const BlinkIdFeedbackUi: Component<{
|
|
16
|
-
localization?:
|
|
16
|
+
localization?: PartialLocalizationStrings;
|
|
17
17
|
}>;
|
|
18
18
|
//# sourceMappingURL=BlinkIdFeedbackUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlinkIdFeedbackUi.d.ts","sourceRoot":"","sources":["../../src/ui/BlinkIdFeedbackUi.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAY1C,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"BlinkIdFeedbackUi.d.ts","sourceRoot":"","sources":["../../src/ui/BlinkIdFeedbackUi.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAY1C,OAAO,EAEL,0BAA0B,EAE3B,MAAM,uBAAuB,CAAC;AAI/B,OAAO,iBAAiB,CAAC;AASzB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC;IACxC,YAAY,CAAC,EAAE,0BAA0B,CAAC;CAC3C,CA0NA,CAAC"}
|