@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.
Files changed (160) hide show
  1. package/README.md +182 -4
  2. package/dist/blinkid-ux-manager.js +2147 -1820
  3. package/package.json +2 -2
  4. package/types/core/BlinkIdTimeoutConfiguration.d.ts +31 -0
  5. package/types/core/BlinkIdTimeoutConfiguration.d.ts.map +1 -0
  6. package/types/core/BlinkIdUxManager.d.ts +84 -58
  7. package/types/core/BlinkIdUxManager.d.ts.map +1 -1
  8. package/types/core/BlinkIdUxManager.session-status.test.d.ts +5 -0
  9. package/types/core/BlinkIdUxManager.session-status.test.d.ts.map +1 -0
  10. package/types/core/BlinkIdUxManager.timeout.test.d.ts +5 -0
  11. package/types/core/BlinkIdUxManager.timeout.test.d.ts.map +1 -0
  12. package/types/core/__testdata/blinkidTestFixtures.d.ts +1 -4
  13. package/types/core/__testdata/blinkidTestFixtures.d.ts.map +1 -1
  14. package/types/core/blinkid-ui-state.d.ts +4 -9
  15. package/types/core/blinkid-ui-state.d.ts.map +1 -1
  16. package/types/core/createBlinkIdUxManager.d.ts +8 -0
  17. package/types/core/createBlinkIdUxManager.d.ts.map +1 -1
  18. package/types/core/extractionMode.d.ts +41 -0
  19. package/types/core/extractionMode.d.ts.map +1 -0
  20. package/types/core/extractionMode.test.d.ts +5 -0
  21. package/types/core/extractionMode.test.d.ts.map +1 -0
  22. package/types/core/test-helpers.integration.d.ts +3 -3
  23. package/types/core/test-helpers.integration.d.ts.map +1 -1
  24. package/types/core/test-utils.d.ts +14 -0
  25. package/types/core/test-utils.d.ts.map +1 -0
  26. package/types/core/ui-state-utils.d.ts +2 -1
  27. package/types/core/ui-state-utils.d.ts.map +1 -1
  28. package/types/index.d.ts +3 -2
  29. package/types/index.d.ts.map +1 -1
  30. package/types/index.rollup.d.ts +315 -143
  31. package/types/ui/BlinkIdFeedbackUi.d.ts +2 -2
  32. package/types/ui/BlinkIdFeedbackUi.d.ts.map +1 -1
  33. package/types/ui/LocalizationContext.d.ts +22 -4
  34. package/types/ui/LocalizationContext.d.ts.map +1 -1
  35. package/types/ui/UiFeedbackOverlay.d.ts +2 -0
  36. package/types/ui/UiFeedbackOverlay.d.ts.map +1 -1
  37. package/types/ui/createBlinkIdFeedbackUi.d.ts +3 -14
  38. package/types/ui/createBlinkIdFeedbackUi.d.ts.map +1 -1
  39. package/types/ui/dialogs/HelpModal.d.ts +43 -0
  40. package/types/ui/dialogs/HelpModal.d.ts.map +1 -1
  41. package/types/ui/dialogs/OnboardingGuideModal.d.ts +25 -0
  42. package/types/ui/dialogs/OnboardingGuideModal.d.ts.map +1 -1
  43. package/types/ui/dialogs/modalExtractionMode.d.ts +7 -0
  44. package/types/ui/dialogs/modalExtractionMode.d.ts.map +1 -0
  45. package/types/ui/dialogs/modalExtractionMode.test.d.ts +5 -0
  46. package/types/ui/dialogs/modalExtractionMode.test.d.ts.map +1 -0
  47. package/types/ui/feedbackMessages.d.ts +2 -1
  48. package/types/ui/feedbackMessages.d.ts.map +1 -1
  49. package/types/ui/locales/ak.d.ts +156 -61
  50. package/types/ui/locales/ak.d.ts.map +1 -1
  51. package/types/ui/locales/am.d.ts +156 -61
  52. package/types/ui/locales/am.d.ts.map +1 -1
  53. package/types/ui/locales/ar.d.ts +156 -61
  54. package/types/ui/locales/ar.d.ts.map +1 -1
  55. package/types/ui/locales/bn.d.ts +156 -61
  56. package/types/ui/locales/bn.d.ts.map +1 -1
  57. package/types/ui/locales/cs.d.ts +156 -61
  58. package/types/ui/locales/cs.d.ts.map +1 -1
  59. package/types/ui/locales/da.d.ts +156 -61
  60. package/types/ui/locales/da.d.ts.map +1 -1
  61. package/types/ui/locales/de.d.ts +156 -61
  62. package/types/ui/locales/de.d.ts.map +1 -1
  63. package/types/ui/locales/el.d.ts +156 -61
  64. package/types/ui/locales/el.d.ts.map +1 -1
  65. package/types/ui/locales/en.d.ts +156 -61
  66. package/types/ui/locales/en.d.ts.map +1 -1
  67. package/types/ui/locales/en_GB.d.ts +156 -61
  68. package/types/ui/locales/en_GB.d.ts.map +1 -1
  69. package/types/ui/locales/es.d.ts +156 -61
  70. package/types/ui/locales/es.d.ts.map +1 -1
  71. package/types/ui/locales/es_MX.d.ts +156 -61
  72. package/types/ui/locales/es_MX.d.ts.map +1 -1
  73. package/types/ui/locales/fa-latn.d.ts +156 -61
  74. package/types/ui/locales/fa-latn.d.ts.map +1 -1
  75. package/types/ui/locales/fi.d.ts +156 -61
  76. package/types/ui/locales/fi.d.ts.map +1 -1
  77. package/types/ui/locales/fil.d.ts +156 -61
  78. package/types/ui/locales/fil.d.ts.map +1 -1
  79. package/types/ui/locales/fr.d.ts +156 -61
  80. package/types/ui/locales/fr.d.ts.map +1 -1
  81. package/types/ui/locales/fr_CA.d.ts +156 -61
  82. package/types/ui/locales/fr_CA.d.ts.map +1 -1
  83. package/types/ui/locales/ha.d.ts +156 -61
  84. package/types/ui/locales/ha.d.ts.map +1 -1
  85. package/types/ui/locales/he.d.ts +156 -61
  86. package/types/ui/locales/he.d.ts.map +1 -1
  87. package/types/ui/locales/hi.d.ts +156 -61
  88. package/types/ui/locales/hi.d.ts.map +1 -1
  89. package/types/ui/locales/hr.d.ts +156 -61
  90. package/types/ui/locales/hr.d.ts.map +1 -1
  91. package/types/ui/locales/hu.d.ts +156 -61
  92. package/types/ui/locales/hu.d.ts.map +1 -1
  93. package/types/ui/locales/id.d.ts +156 -61
  94. package/types/ui/locales/id.d.ts.map +1 -1
  95. package/types/ui/locales/is.d.ts +156 -61
  96. package/types/ui/locales/is.d.ts.map +1 -1
  97. package/types/ui/locales/it.d.ts +156 -61
  98. package/types/ui/locales/it.d.ts.map +1 -1
  99. package/types/ui/locales/ja.d.ts +156 -61
  100. package/types/ui/locales/ja.d.ts.map +1 -1
  101. package/types/ui/locales/ka_GE.d.ts +156 -61
  102. package/types/ui/locales/ka_GE.d.ts.map +1 -1
  103. package/types/ui/locales/kk.d.ts +156 -61
  104. package/types/ui/locales/kk.d.ts.map +1 -1
  105. package/types/ui/locales/km_KH.d.ts +156 -61
  106. package/types/ui/locales/km_KH.d.ts.map +1 -1
  107. package/types/ui/locales/ko.d.ts +156 -61
  108. package/types/ui/locales/ko.d.ts.map +1 -1
  109. package/types/ui/locales/lv.d.ts +156 -61
  110. package/types/ui/locales/lv.d.ts.map +1 -1
  111. package/types/ui/locales/ms.d.ts +156 -61
  112. package/types/ui/locales/ms.d.ts.map +1 -1
  113. package/types/ui/locales/ne.d.ts +156 -61
  114. package/types/ui/locales/ne.d.ts.map +1 -1
  115. package/types/ui/locales/nl.d.ts +156 -61
  116. package/types/ui/locales/nl.d.ts.map +1 -1
  117. package/types/ui/locales/no.d.ts +156 -61
  118. package/types/ui/locales/no.d.ts.map +1 -1
  119. package/types/ui/locales/pl.d.ts +156 -61
  120. package/types/ui/locales/pl.d.ts.map +1 -1
  121. package/types/ui/locales/ps_AF.d.ts +156 -61
  122. package/types/ui/locales/ps_AF.d.ts.map +1 -1
  123. package/types/ui/locales/pt.d.ts +156 -61
  124. package/types/ui/locales/pt.d.ts.map +1 -1
  125. package/types/ui/locales/pt_BR.d.ts +156 -61
  126. package/types/ui/locales/pt_BR.d.ts.map +1 -1
  127. package/types/ui/locales/ro.d.ts +156 -61
  128. package/types/ui/locales/ro.d.ts.map +1 -1
  129. package/types/ui/locales/ru.d.ts +156 -61
  130. package/types/ui/locales/ru.d.ts.map +1 -1
  131. package/types/ui/locales/si.d.ts +156 -61
  132. package/types/ui/locales/si.d.ts.map +1 -1
  133. package/types/ui/locales/sk.d.ts +156 -61
  134. package/types/ui/locales/sk.d.ts.map +1 -1
  135. package/types/ui/locales/sl.d.ts +156 -61
  136. package/types/ui/locales/sl.d.ts.map +1 -1
  137. package/types/ui/locales/sr.d.ts +156 -61
  138. package/types/ui/locales/sr.d.ts.map +1 -1
  139. package/types/ui/locales/sv.d.ts +156 -61
  140. package/types/ui/locales/sv.d.ts.map +1 -1
  141. package/types/ui/locales/sw.d.ts +156 -61
  142. package/types/ui/locales/sw.d.ts.map +1 -1
  143. package/types/ui/locales/th.d.ts +156 -61
  144. package/types/ui/locales/th.d.ts.map +1 -1
  145. package/types/ui/locales/tr.d.ts +156 -61
  146. package/types/ui/locales/tr.d.ts.map +1 -1
  147. package/types/ui/locales/uk.d.ts +156 -61
  148. package/types/ui/locales/uk.d.ts.map +1 -1
  149. package/types/ui/locales/ur.d.ts +156 -61
  150. package/types/ui/locales/ur.d.ts.map +1 -1
  151. package/types/ui/locales/uz.d.ts +156 -61
  152. package/types/ui/locales/uz.d.ts.map +1 -1
  153. package/types/ui/locales/vi.d.ts +156 -61
  154. package/types/ui/locales/vi.d.ts.map +1 -1
  155. package/types/ui/locales/yo.d.ts +156 -61
  156. package/types/ui/locales/yo.d.ts.map +1 -1
  157. package/types/ui/locales/zh_CN.d.ts +156 -61
  158. package/types/ui/locales/zh_CN.d.ts.map +1 -1
  159. package/types/ui/locales/zh_TW.d.ts +156 -61
  160. package/types/ui/locales/zh_TW.d.ts.map +1 -1
@@ -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
- * @deprecated Use `mappedUiStateKey` (internal/debug) or `uiStateKey` (displayed state).
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 timeout duration in ms. Null if timeout won't be triggered ever.
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
- getHelpTooltipHideDelay(): number | null;
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 will be called with the frame analysis
306
- * result.
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: (frameResult: ProcessResultWithBuffer) => void): () => void;
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
- * Sets the duration after which the scanning session will timeout. The
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
- * @deprecated This option will be removed in a future release. Use `helpTooltipHideDelay` in `FeedbackUiOptions` instead.
452
+ * Updating the configuration resets timeout tracking for the current scan
453
+ * step so the new durations take effect immediately.
388
454
  */
389
- setHelpTooltipHideDelay(duration: number | null): void;
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 alert_cancel_btn: "Cancel";
469
- readonly alert_retry_btn: "Retry";
470
- readonly blur_detected: "Keep document and phone still";
471
- readonly camera_angle_too_steep: "Keep document parallel to phone";
472
- readonly document_filtered: "Document not accepted";
473
- readonly document_filtered_details: "Try scanning a different document.";
474
- readonly document_not_recognized: "Document not recognized";
475
- readonly document_not_recognized_details: "Scan the front side of a supported document.";
476
- readonly document_scanned: "Success! Document scanned";
477
- readonly document_too_close_to_edge: "Move farther";
478
- readonly face_photo_not_fully_visible: "Keep face photo fully visible";
479
- readonly flip_document: "Flip the document";
480
- readonly flip_to_back_side: "Flip to the back side";
481
- readonly front_side_scanned: "Success! Front side scanned";
482
- readonly glare_detected: "Tilt or move document to remove reflection";
483
- readonly help_aria_label: "Help";
484
- readonly help_modal_back_btn: "Back";
485
- readonly help_modal_blur_details_desktop: "Try to keep the device and document still while scanning. Moving either can blur the image and make data on the document unreadable.";
486
- readonly help_modal_camera_lens_details: "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.";
487
- readonly help_modal_camera_lens_title: "Clean your camera lens";
488
- readonly help_modal_details_1: "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.";
489
- readonly help_modal_details_2: "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.";
490
- readonly help_modal_details_3: "Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.";
491
- readonly help_modal_done_btn: "Done";
492
- readonly help_modal_next_btn: "Next";
493
- readonly help_modal_title_1: "Keep all the fields visible";
494
- readonly help_modal_title_2: "Watch out for harsh light";
495
- readonly help_modal_title_3: "Keep still while scanning";
496
- readonly help_tooltip: "Need help?";
497
- readonly keep_document_parallel: "Keep document parallel with screen";
498
- readonly keep_document_still: "Keep document and device still";
499
- readonly move_closer: "Move closer";
500
- readonly move_farther: "Move farther";
501
- readonly move_left: "Move to the page on the left";
502
- readonly move_right: "Move to the page on the right";
503
- readonly move_top: "Move to the page on top";
504
- readonly occluded: "Keep the document fully visible";
505
- readonly onboarding_modal_btn: "Start scanning";
506
- readonly onboarding_modal_details: "Make sure you keep the document well lit. All document fields should be visible on the camera screen.";
507
- readonly onboarding_modal_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.";
508
- readonly onboarding_modal_title: "Keep all the details visible";
509
- readonly onboarding_modal_title_desktop: "Get ready to scan";
510
- readonly resume_scanning: "Resume scanning";
511
- readonly scan_data_page: "Scan the data page of the document";
512
- readonly scan_last_page_barcode: "Scan barcode from the last page";
513
- readonly scan_left_page: "Scan the left page";
514
- readonly scan_right_page: "Scan the right page";
515
- readonly scan_the_back_side: "Scan the back side of the document";
516
- readonly scan_the_barcode: "Scan the barcode";
517
- readonly scan_the_front_side: "Scan the front side of the document";
518
- readonly scan_top_page: "Scan the top page";
519
- readonly scan_unsuccessful: "Scan unsuccessful";
520
- readonly scan_unsuccessful_details: "Unable to read the document. Please try again.";
521
- readonly scanning_help: "Scanning help";
522
- readonly scanning_instructions: "Scanning Instructions";
523
- readonly scanning_screen: "Document scanning screen";
524
- readonly too_bright: "Move to spot with less lighting";
525
- readonly too_dark: "Move to brighter spot";
526
- readonly wrong_left: "Move to the left page";
527
- readonly wrong_right: "Move to the right page";
528
- readonly wrong_top: "Move to the top page";
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?: Partial<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(frameProcessResult: PartialProcessResult, settings?: Partial<ScanningSettings>): BlinkIdUiMappableKey | undefined;
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
- * The partial process result.
1013
+ * Recursively transforms a locale record to allow string overrides at any level.
844
1014
  */
845
- export declare type PartialProcessResult = {
846
- /** The input image analysis result. */
847
- inputImageAnalysisResult: Partial<InputImageAnalysisResult>;
848
- /** The result completeness. */
849
- resultCompleteness: Partial<ResultCompleteness>;
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 { LocalizationStrings } from "./LocalizationContext";
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?: Partial<LocalizationStrings>;
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,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,iBAAiB,CAAC;AASzB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAoNA,CAAC"}
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"}