@microblink/blinkid-ux-manager 7.6.4 → 7.7.1

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 (164) hide show
  1. package/README.md +48 -3
  2. package/dist/blinkid-ux-manager.js +2700 -2205
  3. package/package.json +3 -3
  4. package/types/core/BlinkIdProcessingError.d.ts +1 -1
  5. package/types/core/BlinkIdProcessingError.d.ts.map +1 -1
  6. package/types/core/BlinkIdUxManager.d.ts +71 -35
  7. package/types/core/BlinkIdUxManager.d.ts.map +1 -1
  8. package/types/core/BlinkIdUxManager.integration.test.d.ts +5 -0
  9. package/types/core/BlinkIdUxManager.integration.test.d.ts.map +1 -0
  10. package/types/core/__testdata/blankProcessResult.d.ts +2 -2
  11. package/types/core/__testdata/blankProcessResult.d.ts.map +1 -1
  12. package/types/core/__testdata/blinkidTestFixtures.d.ts +20 -0
  13. package/types/core/__testdata/blinkidTestFixtures.d.ts.map +1 -0
  14. package/types/core/blinkid-ui-state.d.ts +95 -8
  15. package/types/core/blinkid-ui-state.d.ts.map +1 -1
  16. package/types/core/createBlinkIdUxManager.d.ts +23 -0
  17. package/types/core/createBlinkIdUxManager.d.ts.map +1 -0
  18. package/types/core/getChainedUiStateKey.d.ts +18 -0
  19. package/types/core/getChainedUiStateKey.d.ts.map +1 -0
  20. package/types/core/getChainedUiStateKey.test.d.ts +5 -0
  21. package/types/core/getChainedUiStateKey.test.d.ts.map +1 -0
  22. package/types/core/test-helpers.integration.d.ts +65 -0
  23. package/types/core/test-helpers.integration.d.ts.map +1 -0
  24. package/types/core/ui-state-utils.d.ts +51 -0
  25. package/types/core/ui-state-utils.d.ts.map +1 -0
  26. package/types/core/uxAnalyticsMappers.d.ts +17 -0
  27. package/types/core/uxAnalyticsMappers.d.ts.map +1 -0
  28. package/types/index.d.ts +6 -5
  29. package/types/index.d.ts.map +1 -1
  30. package/types/index.rollup.d.ts +286 -60
  31. package/types/ui/BlinkIdFeedbackUi.d.ts.map +1 -1
  32. package/types/ui/BlinkIdUiStoreContext.d.ts +9 -4
  33. package/types/ui/BlinkIdUiStoreContext.d.ts.map +1 -1
  34. package/types/ui/UiFeedbackOverlay.d.ts +1 -0
  35. package/types/ui/UiFeedbackOverlay.d.ts.map +1 -1
  36. package/types/ui/createBlinkIdFeedbackUi.d.ts +15 -2
  37. package/types/ui/createBlinkIdFeedbackUi.d.ts.map +1 -1
  38. package/types/ui/dialogs/ErrorModal.d.ts.map +1 -1
  39. package/types/ui/dialogs/HelpModal.d.ts +3 -1
  40. package/types/ui/dialogs/HelpModal.d.ts.map +1 -1
  41. package/types/ui/dialogs/OnboardingGuideModal.d.ts +3 -1
  42. package/types/ui/dialogs/OnboardingGuideModal.d.ts.map +1 -1
  43. package/types/ui/feedbackMessages.d.ts +1 -1
  44. package/types/ui/feedbackMessages.d.ts.map +1 -1
  45. package/types/ui/locales/ak.d.ts +12 -1
  46. package/types/ui/locales/ak.d.ts.map +1 -1
  47. package/types/ui/locales/am.d.ts +12 -1
  48. package/types/ui/locales/am.d.ts.map +1 -1
  49. package/types/ui/locales/ar.d.ts +12 -1
  50. package/types/ui/locales/ar.d.ts.map +1 -1
  51. package/types/ui/locales/bn.d.ts +12 -1
  52. package/types/ui/locales/bn.d.ts.map +1 -1
  53. package/types/ui/locales/cs.d.ts +12 -1
  54. package/types/ui/locales/cs.d.ts.map +1 -1
  55. package/types/ui/locales/da.d.ts +12 -1
  56. package/types/ui/locales/da.d.ts.map +1 -1
  57. package/types/ui/locales/de.d.ts +12 -1
  58. package/types/ui/locales/de.d.ts.map +1 -1
  59. package/types/ui/locales/el.d.ts +12 -1
  60. package/types/ui/locales/el.d.ts.map +1 -1
  61. package/types/ui/locales/en.d.ts +12 -1
  62. package/types/ui/locales/en.d.ts.map +1 -1
  63. package/types/ui/locales/en_GB.d.ts +12 -1
  64. package/types/ui/locales/en_GB.d.ts.map +1 -1
  65. package/types/ui/locales/es.d.ts +12 -1
  66. package/types/ui/locales/es.d.ts.map +1 -1
  67. package/types/ui/locales/es_MX.d.ts +12 -1
  68. package/types/ui/locales/es_MX.d.ts.map +1 -1
  69. package/types/ui/locales/fa-latn.d.ts +12 -1
  70. package/types/ui/locales/fa-latn.d.ts.map +1 -1
  71. package/types/ui/locales/fi.d.ts +12 -1
  72. package/types/ui/locales/fi.d.ts.map +1 -1
  73. package/types/ui/locales/fil.d.ts +12 -1
  74. package/types/ui/locales/fil.d.ts.map +1 -1
  75. package/types/ui/locales/fr.d.ts +12 -1
  76. package/types/ui/locales/fr.d.ts.map +1 -1
  77. package/types/ui/locales/fr_CA.d.ts +12 -1
  78. package/types/ui/locales/fr_CA.d.ts.map +1 -1
  79. package/types/ui/locales/ha.d.ts +12 -1
  80. package/types/ui/locales/ha.d.ts.map +1 -1
  81. package/types/ui/locales/he.d.ts +12 -1
  82. package/types/ui/locales/he.d.ts.map +1 -1
  83. package/types/ui/locales/hi.d.ts +12 -1
  84. package/types/ui/locales/hi.d.ts.map +1 -1
  85. package/types/ui/locales/hr.d.ts +12 -1
  86. package/types/ui/locales/hr.d.ts.map +1 -1
  87. package/types/ui/locales/hu.d.ts +12 -1
  88. package/types/ui/locales/hu.d.ts.map +1 -1
  89. package/types/ui/locales/id.d.ts +12 -1
  90. package/types/ui/locales/id.d.ts.map +1 -1
  91. package/types/ui/locales/index.d.ts +2 -2
  92. package/types/ui/locales/index.d.ts.map +1 -1
  93. package/types/ui/locales/is.d.ts +12 -1
  94. package/types/ui/locales/is.d.ts.map +1 -1
  95. package/types/ui/locales/it.d.ts +12 -1
  96. package/types/ui/locales/it.d.ts.map +1 -1
  97. package/types/ui/locales/ja.d.ts +12 -1
  98. package/types/ui/locales/ja.d.ts.map +1 -1
  99. package/types/ui/locales/ka_GE.d.ts +12 -1
  100. package/types/ui/locales/ka_GE.d.ts.map +1 -1
  101. package/types/ui/locales/kk.d.ts +12 -1
  102. package/types/ui/locales/kk.d.ts.map +1 -1
  103. package/types/ui/locales/km_KH.d.ts +12 -1
  104. package/types/ui/locales/km_KH.d.ts.map +1 -1
  105. package/types/ui/locales/ko.d.ts +12 -1
  106. package/types/ui/locales/ko.d.ts.map +1 -1
  107. package/types/ui/locales/lv.d.ts +12 -1
  108. package/types/ui/locales/lv.d.ts.map +1 -1
  109. package/types/ui/locales/ms.d.ts +12 -1
  110. package/types/ui/locales/ms.d.ts.map +1 -1
  111. package/types/ui/locales/ne.d.ts +12 -1
  112. package/types/ui/locales/ne.d.ts.map +1 -1
  113. package/types/ui/locales/nl.d.ts +12 -1
  114. package/types/ui/locales/nl.d.ts.map +1 -1
  115. package/types/ui/locales/no.d.ts +12 -1
  116. package/types/ui/locales/no.d.ts.map +1 -1
  117. package/types/ui/locales/pl.d.ts +12 -1
  118. package/types/ui/locales/pl.d.ts.map +1 -1
  119. package/types/ui/locales/ps_AF.d.ts +12 -1
  120. package/types/ui/locales/ps_AF.d.ts.map +1 -1
  121. package/types/ui/locales/pt.d.ts +12 -1
  122. package/types/ui/locales/pt.d.ts.map +1 -1
  123. package/types/ui/locales/pt_BR.d.ts +12 -1
  124. package/types/ui/locales/pt_BR.d.ts.map +1 -1
  125. package/types/ui/locales/ro.d.ts +12 -1
  126. package/types/ui/locales/ro.d.ts.map +1 -1
  127. package/types/ui/locales/ru.d.ts +12 -1
  128. package/types/ui/locales/ru.d.ts.map +1 -1
  129. package/types/ui/locales/si.d.ts +12 -1
  130. package/types/ui/locales/si.d.ts.map +1 -1
  131. package/types/ui/locales/sk.d.ts +12 -1
  132. package/types/ui/locales/sk.d.ts.map +1 -1
  133. package/types/ui/locales/sl.d.ts +12 -1
  134. package/types/ui/locales/sl.d.ts.map +1 -1
  135. package/types/ui/locales/sr.d.ts +12 -1
  136. package/types/ui/locales/sr.d.ts.map +1 -1
  137. package/types/ui/locales/sv.d.ts +12 -1
  138. package/types/ui/locales/sv.d.ts.map +1 -1
  139. package/types/ui/locales/sw.d.ts +12 -1
  140. package/types/ui/locales/sw.d.ts.map +1 -1
  141. package/types/ui/locales/th.d.ts +12 -1
  142. package/types/ui/locales/th.d.ts.map +1 -1
  143. package/types/ui/locales/tr.d.ts +12 -1
  144. package/types/ui/locales/tr.d.ts.map +1 -1
  145. package/types/ui/locales/uk.d.ts +12 -1
  146. package/types/ui/locales/uk.d.ts.map +1 -1
  147. package/types/ui/locales/ur.d.ts +12 -1
  148. package/types/ui/locales/ur.d.ts.map +1 -1
  149. package/types/ui/locales/uz.d.ts +12 -1
  150. package/types/ui/locales/uz.d.ts.map +1 -1
  151. package/types/ui/locales/vi.d.ts +12 -1
  152. package/types/ui/locales/vi.d.ts.map +1 -1
  153. package/types/ui/locales/yo.d.ts +12 -1
  154. package/types/ui/locales/yo.d.ts.map +1 -1
  155. package/types/ui/locales/zh_CN.d.ts +12 -1
  156. package/types/ui/locales/zh_CN.d.ts.map +1 -1
  157. package/types/ui/locales/zh_TW.d.ts +12 -1
  158. package/types/ui/locales/zh_TW.d.ts.map +1 -1
  159. package/types/core/ping-camera-utils.d.ts +0 -16
  160. package/types/core/ping-camera-utils.d.ts.map +0 -1
  161. package/types/shared/ping-implementations.d.ts +0 -60
  162. package/types/shared/ping-implementations.d.ts.map +0 -1
  163. package/types/shared/uiEventFeedbackMapper.d.ts +0 -7
  164. package/types/shared/uiEventFeedbackMapper.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uxAnalyticsMappers.d.ts","sourceRoot":"","sources":["../../src/core/uxAnalyticsMappers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C,sBAAsB,EACtB,sBAAsB,CACvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,uBAAuB,GAChC,eAAe,CAAC,kBAAkB,CAAC,CA4BrC"}
package/types/index.d.ts CHANGED
@@ -7,14 +7,15 @@
7
7
  * This package includes feedback UI, localization support, and document scanning state management to create
8
8
  * an intuitive document scanning experience.
9
9
  */
10
+ export type * from "@microblink/feedback-stabilizer";
11
+ export type * from "@microblink/ux-common/hapticFeedback";
10
12
  export * from "./core/blinkid-ui-state";
11
- export * from "./core/BlinkIdUxManager";
13
+ export type { BlinkIdProcessingError } from "./core/BlinkIdProcessingError";
14
+ export type { BlinkIdUxManager } from "./core/BlinkIdUxManager";
15
+ export * from "./core/createBlinkIdUxManager";
16
+ export type { DocumentClassFilter } from "./core/DocumentClassFilter";
12
17
  export * from "./ui/createBlinkIdFeedbackUi";
13
18
  export type { LocaleRecord, LocalizationStrings, } from "./ui/LocalizationContext";
14
- export type { DocumentClassFilter } from "./core/DocumentClassFilter";
15
- export type * from "@microblink/ux-common/hapticFeedback";
16
- export type * from "@microblink/feedback-stabilizer";
17
- export type { BlinkIdProcessingError } from "./core/BlinkIdProcessingError";
18
19
  /**
19
20
  * The global interface.
20
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,YAAY,EACV,YAAY,EACZ,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,mBAAmB,sCAAsC,CAAC;AAC1D,mBAAmB,iCAAiC,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,QAAA,MAAM,UAAU,eAAW,CAAC;AAE5B;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE,OAAO,UAAU,CAAC;CAC/C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,sCAAsC,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,8BAA8B,CAAC;AAC7C,YAAY,EACV,YAAY,EACZ,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC;;;;GAIG;AACH,QAAA,MAAM,UAAU,eAAW,CAAC;AAE5B;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE,OAAO,UAAU,CAAC;CAC/C"}
@@ -1,14 +1,53 @@
1
+ import { AnalyticService } from '@microblink/analytics/AnalyticService';
1
2
  import { BlinkIdScanningResult } from '@microblink/blinkid-core';
2
3
  import { BlinkIdSessionSettings } from '@microblink/blinkid-core';
3
- import type { CameraManager } from '@microblink/camera-manager';
4
+ import { CameraManager } from '@microblink/camera-manager';
4
5
  import { CameraManagerComponent } from '@microblink/camera-manager';
6
+ import { DeviceInfo } from '@microblink/blinkid-core';
5
7
  import { DocumentClassInfo } from '@microblink/blinkid-core';
6
8
  import { InputImageAnalysisResult } from '@microblink/blinkid-core';
7
9
  import { ProcessResultWithBuffer } from '@microblink/blinkid-core';
8
10
  import { RemoteScanningSession } from '@microblink/blinkid-core';
9
11
  import { ResultCompleteness } from '@microblink/blinkid-core';
10
12
  import { ScanningSettings } from '@microblink/blinkid-core';
11
- import { StringKeyOf } from 'type-fest';
13
+
14
+ /**
15
+ * Union type of all page transition state keys.
16
+ *
17
+ * @see {@link blinkIdPageTransitionKeys} for detailed documentation on each state
18
+ */
19
+ export declare type BlinkIdPageTransitionKey = (typeof blinkIdPageTransitionKeys)[number];
20
+
21
+ /**
22
+ * Page transition state keys for BlinkID UI.
23
+ *
24
+ * @remarks
25
+ * These states display transition animations and instructions between scanning
26
+ * different document pages or sides. They are automatically triggered after
27
+ * successfully capturing a page (`PAGE_CAPTURED`) and cannot be manually set.
28
+ *
29
+ * Each transition state corresponds to a specific document type and guides the
30
+ * user to position the document for the next scan:
31
+ * - `FLIP_CARD` - Instructs user to flip ID card to scan the back side
32
+ * - `MOVE_LAST_PAGE` - Instructs user to move to passport's last page (barcode)
33
+ * - `MOVE_TOP` - Instructs user to rotate passport to top orientation (0°)
34
+ * - `MOVE_RIGHT` - Instructs user to rotate passport 90° clockwise
35
+ * - `MOVE_LEFT` - Instructs user to rotate passport 90° counter-clockwise
36
+ *
37
+ * **Automatic flow:**
38
+ * After a transition animation completes, the UI automatically advances to the
39
+ * corresponding intro state to begin scanning the next page:
40
+ * - `FLIP_CARD` → `INTRO_BACK_PAGE`
41
+ * - `MOVE_LAST_PAGE` → `INTRO_LAST_PAGE`
42
+ * - `MOVE_TOP` → `INTRO_TOP_PAGE`
43
+ * - `MOVE_RIGHT` → `INTRO_RIGHT_PAGE`
44
+ * - `MOVE_LEFT` → `INTRO_LEFT_PAGE`
45
+ *
46
+ * @see {@link BlinkIdPageTransitionKey} for the union type of these keys
47
+ * @see {@link getChainedUiStateKey} for the automatic state transition logic
48
+ * @see {@link blinkIdUiIntroStateKeys} for the intro states that follow transitions
49
+ */
50
+ export declare const blinkIdPageTransitionKeys: readonly ["FLIP_CARD", "MOVE_TOP", "MOVE_LEFT", "MOVE_RIGHT", "MOVE_LAST_PAGE"];
12
51
 
13
52
  /**
14
53
  * Copyright (c) 2026 Microblink Ltd. All rights reserved.
@@ -17,13 +56,70 @@ import { StringKeyOf } from 'type-fest';
17
56
  * BlinkID processing error. These errors are usually unrecoverable and require
18
57
  * the user to retry the scanning process.
19
58
  */
20
- export declare type BlinkIdProcessingError = "timeout" | "unsupported_document" | "unknown";
59
+ export declare type BlinkIdProcessingError = "timeout" | "unsupported_document" | "result_retrieval_failed" | "unknown";
21
60
 
22
61
  /**
23
62
  * The type of reticle to display.
24
63
  */
25
64
  export declare type BlinkIdReticleType = "searching" | "processing" | "error" | "done" | "flip" | "move_top" | "move_left" | "move_right";
26
65
 
66
+ export declare type BlinkIdUiErrorStateKey = (typeof blinkIdUiErrorStateKeys)[number];
67
+
68
+ /**
69
+ * The error states for BlinkID. Mappable from `ProcessResult`.
70
+ */
71
+ export declare const blinkIdUiErrorStateKeys: readonly ["FRONT_PAGE_NOT_IN_FRAME", "BACK_PAGE_NOT_IN_FRAME", "DATA_PAGE_NOT_IN_FRAME", "TOP_PAGE_NOT_IN_FRAME", "LEFT_PAGE_NOT_IN_FRAME", "RIGHT_PAGE_NOT_IN_FRAME", "LAST_PAGE_NOT_IN_FRAME", "BARCODE_NOT_IN_FRAME", "DOCUMENT_FRAMING_CAMERA_TOO_FAR", "DOCUMENT_FRAMING_CAMERA_TOO_CLOSE", "DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP", "DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE", "BLUR_DETECTED", "GLARE_DETECTED", "TOO_DARK", "TOO_BRIGHT", "OCCLUDED", "FACE_PHOTO_OCCLUDED", "WRONG_SIDE", "WRONG_TOP_PAGE", "WRONG_LEFT_PAGE", "WRONG_RIGHT_PAGE", "WRONG_LAST_PAGE", "UNSUPPORTED_DOCUMENT"];
72
+
73
+ /**
74
+ * Union type of all intro state keys.
75
+ *
76
+ * @see {@link blinkIdUiIntroStateKeys} for detailed documentation on each state
77
+ */
78
+ export declare type BlinkIdUiIntroStateKey = (typeof blinkIdUiIntroStateKeys)[number];
79
+
80
+ /**
81
+ * Intro state keys for BlinkID UI.
82
+ *
83
+ * @remarks
84
+ * These states display introductory screens that guide users to scan the correct
85
+ * side or page of their document. Most intro states are automatically reached
86
+ * during the scanning flow, but `INTRO_DATA_PAGE` requires manual initialization.
87
+ *
88
+ * **Default behavior:**
89
+ * The UX manager defaults to `INTRO_FRONT_PAGE`, assuming users will scan
90
+ * non-passport documents (ID cards, driver's licenses, etc.).
91
+ *
92
+ * **Automatically reachable states:**
93
+ * After capturing a page, the flow automatically transitions through appropriate
94
+ * intro states:
95
+ * - `INTRO_BACK_PAGE` - After flipping an ID card (`FLIP_CARD`)
96
+ * - `INTRO_TOP_PAGE` - After moving to passport top page (`MOVE_TOP`)
97
+ * - `INTRO_LEFT_PAGE` - After moving to passport left page (`MOVE_LEFT`)
98
+ * - `INTRO_RIGHT_PAGE` - After moving to passport right page (`MOVE_RIGHT`)
99
+ * - `INTRO_LAST_PAGE` - After moving to passport barcode page (`MOVE_LAST_PAGE`)
100
+ *
101
+ * **Manual initialization required:**
102
+ * - `INTRO_DATA_PAGE` - Only reachable by overriding the UX manager initial
103
+ * state. Use this when restricting scanning to passport documents only,
104
+ * as the SDK assumes non-passport documents by default.
105
+ *
106
+ * @example
107
+ * ```typescript
108
+ * // Limit scanning to passport documents only
109
+ * const uxManager = new BlinkIdUxManager(cameraManager, session);
110
+ * uxManager.setInitialUiStateKey("INTRO_DATA_PAGE", true);
111
+ * ```
112
+ *
113
+ * @see {@link BlinkIdUiIntroStateKey} for the union type of these keys
114
+ * @see {@link getChainedUiStateKey} for the automatic state transition logic
115
+ */
116
+ export declare const blinkIdUiIntroStateKeys: readonly ["INTRO_FRONT_PAGE", "INTRO_BACK_PAGE", "INTRO_DATA_PAGE", "INTRO_TOP_PAGE", "INTRO_LEFT_PAGE", "INTRO_RIGHT_PAGE", "INTRO_LAST_PAGE"];
117
+
118
+ /**
119
+ * These keys are directly mappable from a `ProcessResult`
120
+ */
121
+ export declare type BlinkIdUiMappableKey = BlinkIdUiErrorStateKey | BlinkIdUiStepSuccessKey | "PROCESSING_BARCODE";
122
+
27
123
  /**
28
124
  * The UI state of BlinkID.
29
125
  */
@@ -32,7 +128,7 @@ export declare type BlinkIdUiState = BlinkIdUiStateMap[keyof BlinkIdUiStateMap];
32
128
  /**
33
129
  * The key of the UI state.
34
130
  */
35
- export declare type BlinkIdUiStateKey = "FLIP_CARD" | "DOCUMENT_CAPTURED" | "SENSING_FRONT" | "SENSING_BACK" | "SENSING_DATA_PAGE" | "SENSING_TOP_PAGE" | "SENSING_LEFT_PAGE" | "SENSING_RIGHT_PAGE" | "SENSING_LAST_PAGE" | "MOVE_TOP" | "MOVE_LEFT" | "MOVE_RIGHT" | "MOVE_LAST_PAGE" | "DOCUMENT_FRAMING_CAMERA_TOO_FAR" | "DOCUMENT_FRAMING_CAMERA_TOO_CLOSE" | "DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP" | "DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE" | "BLUR_DETECTED" | "GLARE_DETECTED" | "TOO_DARK" | "TOO_BRIGHT" | "OCCLUDED" | "FACE_PHOTO_OCCLUDED" | "UNSUPPORTED_DOCUMENT" | "SCAN_BARCODE" | "WRONG_TOP_PAGE" | "WRONG_LEFT_PAGE" | "WRONG_RIGHT_PAGE" | "WRONG_LAST_PAGE" | "WRONG_SIDE";
131
+ export declare type BlinkIdUiStateKey = BlinkIdUiIntroStateKey | BlinkIdPageTransitionKey | BlinkIdUiMappableKey;
36
132
 
37
133
  /**
38
134
  * Extended UI state for BlinkID.
@@ -53,6 +149,13 @@ export declare type BlinkIdUiStateMap = {
53
149
  */
54
150
  export declare const blinkIdUiStateMap: BlinkIdUiStateMap;
55
151
 
152
+ export declare type BlinkIdUiStepSuccessKey = (typeof blinkIdUiStepSuccessKeys)[number];
153
+
154
+ /**
155
+ * These keys represent successful steps in the BlinkID scanning process.
156
+ */
157
+ export declare const blinkIdUiStepSuccessKeys: readonly ["PAGE_CAPTURED", "DOCUMENT_CAPTURED"];
158
+
56
159
  /**
57
160
  * The BlinkIdUxManager class. This is the main class that manages the UX of
58
161
  * the BlinkID SDK. It is responsible for handling the UI state, the timeout,
@@ -61,48 +164,60 @@ export declare const blinkIdUiStateMap: BlinkIdUiStateMap;
61
164
  export declare class BlinkIdUxManager {
62
165
  #private;
63
166
  /** The camera manager. */
64
- cameraManager: CameraManager;
167
+ readonly cameraManager: CameraManager;
65
168
  /** The scanning session. */
66
- scanningSession: RemoteScanningSession;
67
- /** Whether the demo overlay should be shown. */
68
- showDemoOverlay: boolean;
69
- /** Whether the production overlay should be shown. */
70
- showProductionOverlay: boolean;
71
- /** The current UI state. */
72
- uiState: BlinkIdUiState;
73
- /** The raw UI state key. */
74
- rawUiStateKey: BlinkIdUiStateKey;
75
- /** The feedback stabilizer. */
76
- feedbackStabilizer: FeedbackStabilizer<typeof blinkIdUiStateMap>;
77
- /** The session settings. */
78
- sessionSettings: BlinkIdSessionSettings;
169
+ readonly scanningSession: RemoteScanningSession;
170
+ /**
171
+ * The current UI state. Updated internally by the RAF update loop.
172
+ * Read externally once at UI mount to seed the initial Solid signal value;
173
+ * subsequent updates are delivered via {@link addOnUiStateChangedCallback}.
174
+ */
175
+ get uiState(): BlinkIdUiState;
176
+ /**
177
+ * The feedback stabilizer. Public to allow UI components to read scores,
178
+ * event queues, and call restartCurrentStateTimer() for help-tooltip resets.
179
+ */
180
+ readonly feedbackStabilizer: FeedbackStabilizer<BlinkIdUiStateMap>;
181
+ /** The session settings. Populated asynchronously from the scanning session. */
182
+ readonly sessionSettings: BlinkIdSessionSettings;
183
+ /** Whether the demo overlay should be shown. Populated asynchronously from the scanning session. */
184
+ readonly showDemoOverlay: boolean;
185
+ /** Whether the production overlay should be shown. Populated asynchronously from the scanning session. */
186
+ readonly showProductionOverlay: boolean;
187
+ /** The device info. */
188
+ readonly deviceInfo: DeviceInfo;
79
189
  /**
80
190
  * The constructor for the BlinkIdUxManager class.
81
191
  *
82
192
  * @param cameraManager - The camera manager.
83
193
  * @param scanningSession - The scanning session.
194
+ * @param options - Optional manager configuration.
84
195
  */
85
- constructor(cameraManager: CameraManager, scanningSession: RemoteScanningSession);
196
+ constructor(cameraManager: CameraManager, scanningSession: RemoteScanningSession, options: BlinkIdUxManagerOptions | undefined, sessionSettings: BlinkIdSessionSettings, showDemoOverlay: boolean, showProductionOverlay: boolean, deviceInfo: DeviceInfo);
197
+ /** The currently applied UI state key. */
198
+ get uiStateKey(): BlinkIdUiStateKey;
199
+ /** Latest mapped candidate key before stabilization. */
200
+ get mappedUiStateKey(): BlinkIdUiStateKey;
86
201
  /**
87
- * Indicates whether the UI should display the demo overlay. Controlled by the
88
- * license property.
202
+ * @deprecated Use `mappedUiStateKey` (internal/debug) or `uiStateKey` (displayed state).
89
203
  */
90
- getShowDemoOverlay(): boolean;
91
- /**
92
- * Indicates whether the UI should display the production overlay. Controlled by
93
- * the license property.
94
- */
95
- getShowProductionOverlay(): boolean;
204
+ get rawUiStateKey(): BlinkIdUiStateKey;
205
+ startUiUpdateLoop(): void;
206
+ stopUiUpdateLoop(): void;
96
207
  /**
97
208
  * Returns the timeout duration in ms. Null if timeout won't be triggered ever.
98
209
  */
99
210
  getTimeoutDuration(): number | null;
100
211
  /**
101
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.
102
215
  */
103
216
  getHelpTooltipShowDelay(): number | null;
104
217
  /**
105
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.
106
221
  */
107
222
  getHelpTooltipHideDelay(): number | null;
108
223
  /**
@@ -129,6 +244,12 @@ export declare class BlinkIdUxManager {
129
244
  * @returns true if haptic feedback is supported
130
245
  */
131
246
  isHapticFeedbackSupported(): boolean;
247
+ /**
248
+ * Gets the analytics service for tracking UX events.
249
+ *
250
+ * @returns The UX analytics service
251
+ */
252
+ get analytics(): AnalyticService;
132
253
  /**
133
254
  * Adds a callback function to be executed when the UI state changes.
134
255
  *
@@ -250,6 +371,8 @@ export declare class BlinkIdUxManager {
250
371
  * shown. If null, tooltip won't be auto shown.
251
372
  * @throws {Error} Throws an error if duration is less than or equal to 0 when
252
373
  * not null.
374
+ *
375
+ * @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` in `FeedbackUiOptions` instead.
253
376
  */
254
377
  setHelpTooltipShowDelay(duration: number | null): void;
255
378
  /**
@@ -260,25 +383,31 @@ export declare class BlinkIdUxManager {
260
383
  * hidden. If null, tooltip won't be auto hidden.
261
384
  * @throws {Error} Throws an error if duration is less than or equal to 0 when
262
385
  * not null.
386
+ *
387
+ * @deprecated This option will be removed in a future release. Use `helpTooltipHideDelay` in `FeedbackUiOptions` instead.
263
388
  */
264
389
  setHelpTooltipHideDelay(duration: number | null): void;
390
+ /**
391
+ * Returns the initial UI state key used when resetting UX state.
392
+ */
393
+ getInitialUiStateKey(): BlinkIdUiStateKey;
394
+ /**
395
+ * Overrides the initial UI state key.
396
+ *
397
+ * @param uiStateKey - The UI state key to use as manager initial state.
398
+ * @param applyImmediately - If true, immediately applies and emits this state.
399
+ */
400
+ setInitialUiStateKey(uiStateKey: BlinkIdUiStateKey, applyImmediately?: boolean): void;
265
401
  /**
266
402
  * Clears the scanning session timeout.
267
403
  */
268
- clearScanTimeout: () => void;
404
+ clearScanTimeout(): void;
269
405
  /**
270
406
  * Gets the result from the scanning session.
271
407
  *
272
- * @param deleteSession - Whether to delete the session after getting the result. Note that
273
- * it is not possible to get the result a second time after the document has been fully captured,
274
- * so in this case we should delete the scanning session since it is no longer needed.
275
408
  * @returns The result.
276
409
  */
277
- getSessionResult(deleteSession?: boolean): Promise<BlinkIdScanningResult>;
278
- /**
279
- * Safely deletes the scanning session.
280
- */
281
- safelyDeleteScanningSession(): Promise<void>;
410
+ getSessionResult(): Promise<BlinkIdScanningResult>;
282
411
  /**
283
412
  * Resets the scanning session.
284
413
  *
@@ -293,19 +422,44 @@ export declare class BlinkIdUxManager {
293
422
  * Does not reset the camera manager or the scanning session.
294
423
  */
295
424
  reset(): void;
425
+ /**
426
+ * Fully tears down the BlinkIdUxManager. Stops frame processing, cancels the
427
+ * scan timeout, removes all subscriptions and the RAF loop, and clears all
428
+ * registered callbacks. Should be called when the manager is no longer needed.
429
+ *
430
+ * Does not stop the camera stream or delete the scanning session.
431
+ */
432
+ destroy(): void;
296
433
  }
297
434
 
435
+ export declare type BlinkIdUxManagerOptions = {
436
+ /**
437
+ * Initial UI state key used by the manager/stabilizer reset flow.
438
+ * Defaults to `INTRO_FRONT_PAGE`.
439
+ */
440
+ initialUiStateKey?: BlinkIdUiStateKey;
441
+ };
442
+
298
443
  /**
299
444
  * Creates the BlinkID feedback UI.
300
445
  *
301
446
  * @param blinkIdUxManager - The BlinkID Ux Manager.
302
447
  * @param cameraManagerComponent - The Camera Manager Component.
303
- * @param feedbackUiOptions - The feedback UI options for the createBlinkIdFeedbackUi function.
448
+ * @param options - The feedback UI options for the createBlinkIdFeedbackUi function
304
449
  *
305
450
  * @returns The function to unmount the feedback UI.
306
451
  */
307
452
  export declare function createBlinkIdFeedbackUi(blinkIdUxManager: BlinkIdUxManager, cameraManagerComponent: CameraManagerComponent, feedbackUiOptions: Partial<FeedbackUiOptions>): () => void;
308
453
 
454
+ /**
455
+ * Creates a BlinkIdUxManager.
456
+ *
457
+ * @param cameraManager - The camera manager.
458
+ * @param scanningSession - The scanning session.
459
+ * @returns The BlinkIdUxManager instance.
460
+ */
461
+ export declare const createBlinkIdUxManager: (cameraManager: CameraManager, scanningSession: RemoteScanningSession, options?: BlinkIdUxManagerOptions) => Promise<BlinkIdUxManager>;
462
+
309
463
  /**
310
464
  * Localization strings for en.
311
465
  */
@@ -319,7 +473,7 @@ declare const _default: {
319
473
  readonly document_not_recognized: "Document not recognized";
320
474
  readonly document_not_recognized_details: "Scan the front side of a supported document.";
321
475
  readonly document_scanned: "Success! Document scanned";
322
- readonly document_too_close_to_edge: "Move the document from the edge";
476
+ readonly document_too_close_to_edge: "Move farther";
323
477
  readonly face_photo_not_fully_visible: "Keep face photo fully visible";
324
478
  readonly flip_document: "Flip the document";
325
479
  readonly flip_to_back_side: "Flip to the back side";
@@ -327,6 +481,9 @@ declare const _default: {
327
481
  readonly glare_detected: "Tilt or move document to remove reflection";
328
482
  readonly help_aria_label: "Help";
329
483
  readonly help_modal_back_btn: "Back";
484
+ 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.";
485
+ 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.";
486
+ readonly help_modal_camera_lens_title: "Clean your camera lens";
330
487
  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.";
331
488
  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.";
332
489
  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.";
@@ -336,6 +493,8 @@ declare const _default: {
336
493
  readonly help_modal_title_2: "Watch out for harsh light";
337
494
  readonly help_modal_title_3: "Keep still while scanning";
338
495
  readonly help_tooltip: "Need help?";
496
+ readonly keep_document_parallel: "Keep document parallel with screen";
497
+ readonly keep_document_still: "Keep document and device still";
339
498
  readonly move_closer: "Move closer";
340
499
  readonly move_farther: "Move farther";
341
500
  readonly move_left: "Move to the page on the left";
@@ -344,7 +503,10 @@ declare const _default: {
344
503
  readonly occluded: "Keep the document fully visible";
345
504
  readonly onboarding_modal_btn: "Start scanning";
346
505
  readonly onboarding_modal_details: "Make sure you keep the document well lit. All document fields should be visible on the camera screen.";
506
+ 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.";
347
507
  readonly onboarding_modal_title: "Keep all the details visible";
508
+ readonly onboarding_modal_title_desktop: "Get ready to scan";
509
+ readonly resume_scanning: "Resume scanning";
348
510
  readonly scan_data_page: "Scan the data page of the document";
349
511
  readonly scan_last_page_barcode: "Scan barcode from the last page";
350
512
  readonly scan_left_page: "Scan the left page";
@@ -355,6 +517,9 @@ declare const _default: {
355
517
  readonly scan_top_page: "Scan the top page";
356
518
  readonly scan_unsuccessful: "Scan unsuccessful";
357
519
  readonly scan_unsuccessful_details: "Unable to read the document. Please try again.";
520
+ readonly scanning_help: "Scanning help";
521
+ readonly scanning_instructions: "Scanning Instructions";
522
+ readonly scanning_screen: "Document scanning screen";
358
523
  readonly too_bright: "Move to spot with less lighting";
359
524
  readonly too_dark: "Move to brighter spot";
360
525
  readonly wrong_left: "Move to the left page";
@@ -378,9 +543,6 @@ declare const _default: {
378
543
  */
379
544
  export declare type DocumentClassFilter = (documentClassInfo: DocumentClassInfo) => boolean;
380
545
 
381
- /** The error UI state keys. */
382
- export declare const errorUiStateKeys: BlinkIdUiStateKey[];
383
-
384
546
  /**
385
547
  * FeedbackStabilizer provides UI state management with temporal smoothing.
386
548
  *
@@ -399,7 +561,6 @@ export declare class FeedbackStabilizer<SdkSpecificStateMap extends UiStateMap>
399
561
  private uiStateMap;
400
562
  /** Time window (in ms) for considering UI state events. */
401
563
  private timeWindow;
402
- /** The decay rate. */
403
564
  /** Rate at which event weights decay over time */
404
565
  private decayRate;
405
566
  /** Queue of regular UI state events within the time window */
@@ -419,13 +580,19 @@ export declare class FeedbackStabilizer<SdkSpecificStateMap extends UiStateMap>
419
580
  *
420
581
  * @returns The currently active UI state configuration.
421
582
  */
422
- get currentState(): SdkSpecificStateMap[`${Extract<keyof SdkSpecificStateMap, string | number>}`];
583
+ get currentState(): SdkSpecificStateMap[StateKey<SdkSpecificStateMap>];
423
584
  /**
424
585
  * Gets a copy of the current event queue for debugging.
425
586
  *
426
587
  * @returns A copy of the current event queue.
427
588
  */
428
- getEventQueue(): UiStateEvent[];
589
+ getEventQueue(): UiStateEvent<StateKey<SdkSpecificStateMap>>[];
590
+ /**
591
+ * Gets a copy of the single event queue for debugging.
592
+ *
593
+ * @returns A copy of the current event queue.
594
+ */
595
+ getSingleEventQueue(): UiStateEvent<StateKey<SdkSpecificStateMap>>[];
429
596
  /**
430
597
  * Gets the current summed scores for each state.
431
598
  *
@@ -452,19 +619,58 @@ export declare class FeedbackStabilizer<SdkSpecificStateMap extends UiStateMap>
452
619
  * @param timeWindow - Optional custom time window (in ms) for state averaging
453
620
  * @param decayRate - Optional custom decay rate for event weights
454
621
  */
455
- constructor(uiStateMap: SdkSpecificStateMap, initialKey: StringKeyOf<SdkSpecificStateMap>, timeWindow?: number, decayRate?: number);
622
+ constructor(uiStateMap: SdkSpecificStateMap, initialKey: StateKey<SdkSpecificStateMap>, timeWindow?: number, decayRate?: number);
456
623
  /**
457
624
  * Resets the stabilizer to its initial state.
458
625
  *
459
- * @returns The initial state.
626
+ * @param currentKey - resets the stabilizer with a different key
627
+ * than the one it was initialized with. Does not mutate `this.initialKey`
460
628
  */
461
- reset(): void;
629
+ reset(currentKey?: StateKey<SdkSpecificStateMap>): void;
630
+ /**
631
+ * Restarts the minimum-duration timer for the current state.
632
+ * Useful when a state should be timed from an external lifecycle point
633
+ * (e.g. actual capture start) instead of construction/reset time.
634
+ */
635
+ restartCurrentStateTimer(): void;
462
636
  /**
463
637
  * Checks if enough time has passed to show a new UI state
464
638
  *
465
639
  * @returns true if the current state's minimum duration has elapsed
466
640
  */
467
641
  canShowNewUiState: () => boolean;
642
+ /**
643
+ * Retrieves the remaining time for the current state to satisfy its minimum duration.
644
+ * @returns Remaining time in milliseconds.
645
+ */
646
+ getRemainingDuration(): number;
647
+ /**
648
+ * Creates a UI state event and enqueues it for later processing.
649
+ *
650
+ * Regular states go to `eventQueue` and take part in weighted stabilization.
651
+ * States marked with `singleEmit` go to `singleEventQueue` and are emitted
652
+ * once the current state satisfies its minimum duration.
653
+ *
654
+ * @param incomingUiStateKey - Key of the incoming UI state event.
655
+ */
656
+ private enqueueEvent;
657
+ /**
658
+ * Enqueues a new UI state event to be considered on the next `tick()`.
659
+ *
660
+ * @param incomingUiStateKey - Key of the new UI state event
661
+ */
662
+ ingest(incomingUiStateKey: StateKey<SdkSpecificStateMap>): void;
663
+ /**
664
+ * Advances stabilizer time and returns the state that should be displayed.
665
+ *
666
+ * This method:
667
+ * 1. Handles single-emit events that bypass normal stabilization
668
+ * 2. Maintains a time-windowed queue of regular events
669
+ * 3. Applies temporal averaging with decay to determine the winning state
670
+ *
671
+ * @returns The UI state that should be displayed.
672
+ */
673
+ tick(): SdkSpecificStateMap[StateKey<SdkSpecificStateMap>];
468
674
  /**
469
675
  * Processes a new UI state event and determines the state to display.
470
676
  *
@@ -476,7 +682,7 @@ export declare class FeedbackStabilizer<SdkSpecificStateMap extends UiStateMap>
476
682
  * @param incomingUiStateKey - Key of the new UI state event
477
683
  * @returns The UI state that should be displayed.
478
684
  */
479
- getNewUiState(incomingUiStateKey: StringKeyOf<SdkSpecificStateMap>): SdkSpecificStateMap[StringKeyOf<SdkSpecificStateMap>];
685
+ getNewUiState(incomingUiStateKey: StateKey<SdkSpecificStateMap>): SdkSpecificStateMap[StateKey<SdkSpecificStateMap>];
480
686
  }
481
687
 
482
688
  /**
@@ -507,11 +713,24 @@ export declare type FeedbackUiOptions = {
507
713
  */
508
714
  showHelpButton?: boolean;
509
715
  /**
510
- * The timeout for the help tooltip.
716
+ * The timeout for the help tooltip in ms.
511
717
  *
512
718
  * @defaultValue 3000
719
+ * @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` instead.
513
720
  */
514
721
  showHelpTooltipTimeout?: number;
722
+ /**
723
+ * Time in ms before the help tooltip is shown. If null, tooltip won't be auto shown.
724
+ *
725
+ * @defaultValue 5000
726
+ */
727
+ helpTooltipShowDelay?: number | null;
728
+ /**
729
+ * Time in ms before the help tooltip is hidden. If null, tooltip won't be auto hidden.
730
+ *
731
+ * @defaultValue 5000
732
+ */
733
+ helpTooltipHideDelay?: number | null;
515
734
  /**
516
735
  * If set to `true`, the document filtered modal will be shown.
517
736
  *
@@ -532,11 +751,6 @@ export declare type FeedbackUiOptions = {
532
751
  showUnsupportedDocumentModal?: boolean;
533
752
  };
534
753
 
535
- /**
536
- * The states that are captured when the first side is captured.
537
- */
538
- export declare const firstSideCapturedUiStateKeys: BlinkIdUiStateKey[];
539
-
540
754
  /**
541
755
  * Determines the appropriate UI state key based on the current frame processing
542
756
  * result and scanning settings.
@@ -551,7 +765,7 @@ export declare const firstSideCapturedUiStateKeys: BlinkIdUiStateKey[];
551
765
  * selection.
552
766
  * @returns The UI state key representing what should be shown to the user.
553
767
  */
554
- export declare function getUiStateKey(frameProcessResult: PartialProcessResult, settings?: Partial<ScanningSettings>): BlinkIdUiStateKey;
768
+ export declare function getUiStateKey(frameProcessResult: PartialProcessResult, settings?: Partial<ScanningSettings>): BlinkIdUiMappableKey | undefined;
555
769
 
556
770
  /**
557
771
  * Mapping of haptic feedback types to their durations.
@@ -634,13 +848,21 @@ export declare type PartialProcessResult = {
634
848
  resultCompleteness: Partial<ResultCompleteness>;
635
849
  };
636
850
 
851
+ /** Helper type to extract string keys from a state map */
852
+ declare type StateKey<T extends UiStateMap> = keyof T & string;
853
+
854
+ /**
855
+ * Copyright (c) 2026 Microblink Ltd. All rights reserved.
856
+ */
637
857
  /**
638
858
  * Represents a UI state configuration with timing and weight parameters.
639
859
  * Used to define how different UI states should behave in the stabilization process.
860
+ *
861
+ * @typeParam K - The specific key type for this UI state
640
862
  */
641
- export declare type UiState = {
863
+ export declare type UiState<K extends string = string> = {
642
864
  /** Unique identifier for the UI state */
643
- key: string;
865
+ key: K;
644
866
  /** Minimum duration (in milliseconds) this state should be displayed */
645
867
  minDuration: number;
646
868
  /**
@@ -658,10 +880,12 @@ export declare type UiState = {
658
880
  /**
659
881
  * Represents a UI state event in the stabilization queue.
660
882
  * These events are processed to determine which UI state should be displayed.
883
+ *
884
+ * @typeParam K - The key type for this event, matching a UI state key
661
885
  */
662
- export declare type UiStateEvent = {
886
+ export declare type UiStateEvent<K extends string = string> = {
663
887
  /** Identifier matching a UI state key */
664
- key: string;
888
+ key: K;
665
889
  /** High-resolution timestamp when the event occurred */
666
890
  timeStamp: DOMHighResTimeStamp;
667
891
  /** Current weight of this event in the stabilization process */
@@ -676,6 +900,8 @@ export declare type UiStateEvent = {
676
900
  /**
677
901
  * Maps state keys to their corresponding UI state configurations.
678
902
  */
679
- export declare type UiStateMap = Record<string, UiState>;
903
+ export declare type UiStateMap = {
904
+ [K in string]: UiState<K>;
905
+ };
680
906
 
681
907
  export { }
@@ -1 +1 @@
1
- {"version":3,"file":"BlinkIdFeedbackUi.d.ts","sourceRoot":"","sources":["../../src/ui/BlinkIdFeedbackUi.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAe1C,OAAO,EAEL,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,iBAAiB,CAAC;AAazB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAqLA,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;AAkB1C,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,CA6NA,CAAC"}
@@ -9,7 +9,7 @@ import type { BlinkIdUxManager } from "../core/BlinkIdUxManager";
9
9
  /**
10
10
  * The BlinkIdUiStore type.
11
11
  */
12
- export type BlinkIdUiStore = {
12
+ type BlinkIdUiStore = {
13
13
  /**
14
14
  * The BlinkIdUxManager instance.
15
15
  */
@@ -31,9 +31,13 @@ export type BlinkIdUiStore = {
31
31
  */
32
32
  showOnboardingGuide?: boolean;
33
33
  /**
34
- * The timeout for the help tooltip.
34
+ * Time in ms before the help tooltip is shown. If null, tooltip won't be auto shown.
35
35
  */
36
- showHelpTooltipTimeout?: number;
36
+ helpTooltipShowDelay?: number | null;
37
+ /**
38
+ * Time in ms before the help tooltip is hidden. If null, tooltip won't be auto hidden.
39
+ */
40
+ helpTooltipHideDelay?: number | null;
37
41
  /**
38
42
  * Whether the help modal should be shown.
39
43
  */
@@ -77,7 +81,8 @@ export declare const BlinkIdUiStoreProvider: ParentComponent<{
77
81
  cameraManagerComponent: CameraManagerComponent;
78
82
  showOnboardingGuide: boolean;
79
83
  showHelpButton: boolean;
80
- showHelpTooltipTimeout: number;
84
+ helpTooltipShowDelay: number | null;
85
+ helpTooltipHideDelay: number | null;
81
86
  showDocumentFilteredModal: boolean;
82
87
  showTimeoutModal: boolean;
83
88
  showUnsupportedDocumentModal: boolean;