@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
package/README.md CHANGED
@@ -10,6 +10,8 @@ This package provides user experience management and feedback UI for the BlinkID
10
10
  - **Document Filtering:** Advanced document class filtering capabilities
11
11
  - **Timeout Management:** Configurable scanning timeouts with automatic state management
12
12
  - **Localization Support:** Multi-language support with customizable strings
13
+ - **Explicit Teardown:** `destroy()` method for deterministic resource cleanup
14
+ - **UI State Inspection:** `uiStateKey` (stabilized, visible state) and `mappedUiStateKey` (latest raw candidate before stabilization) getters
13
15
 
14
16
  ## Overview
15
17
 
@@ -49,12 +51,12 @@ The UX Manager includes a comprehensive haptic feedback system that provides tac
49
51
 
50
52
  ```javascript
51
53
  import {
52
- BlinkIdUxManager,
54
+ createBlinkIdUxManager,
53
55
  HapticFeedbackManager,
54
56
  } from "@microblink/blinkid-ux-manager";
55
57
 
56
58
  // Create UX Manager (haptic feedback enabled by default)
57
- const uxManager = new BlinkIdUxManager(cameraManager, scanningSession);
59
+ const uxManager = await createBlinkIdUxManager(cameraManager, scanningSession);
58
60
 
59
61
  // Check if haptic feedback is supported
60
62
  if (uxManager.isHapticFeedbackSupported()) {
@@ -76,11 +78,54 @@ hapticManager.stop(); // Stop all vibration
76
78
 
77
79
  **⚠️ Important:** Haptic feedback uses the [Web Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API), which has **limited browser support**:
78
80
 
81
+ | Browser | Support |
82
+ | ------- | ------- |
83
+ | Chrome for Android | ✅ Supported |
84
+ | Firefox for Android | ✅ Supported |
85
+ | Safari (iOS) | ❌ Not supported |
86
+ | Desktop browsers | ❌ Not supported |
87
+
88
+ The API is designed primarily for **Android devices using Chrome**, where it works reliably. On unsupported platforms `isHapticFeedbackSupported()` returns `false` and vibration calls are silently ignored.
89
+
79
90
  ## Usage
80
91
 
81
92
  You can use `@microblink/blinkid-ux-manager` directly in your project for advanced or custom integrations. For most use cases, use [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid) for a simpler setup.
82
93
 
83
- See the example apps in the `apps/examples` directory in the GitHub repository for usage details.
94
+ ### Creating the UX Manager
95
+
96
+ Use the async `createBlinkIdUxManager` factory — direct constructor instantiation is not supported:
97
+
98
+ ```javascript
99
+ import { createBlinkIdUxManager } from "@microblink/blinkid-ux-manager";
100
+
101
+ const uxManager = await createBlinkIdUxManager(cameraManager, scanningSession);
102
+
103
+ // When done, release resources explicitly
104
+ uxManager.destroy();
105
+ ```
106
+
107
+ ### Inspecting UI State
108
+
109
+ Two getters provide visibility into the current UI state:
110
+
111
+ - `uxManager.uiStateKey` — the stabilized, visible state key (what the UI shows)
112
+ - `uxManager.mappedUiStateKey` — the latest raw candidate key from the detector before stabilization (useful for debugging)
113
+
114
+ > **Note:** Starting in v7.7.0, the manager automatically advances through intermediate transition states after `PAGE_CAPTURED` (e.g. `PAGE_CAPTURED → FLIP_CARD → INTRO_BACK_PAGE` for two-sided IDs). Integrations that depend on exact UI-state key sequences should account for these chained transitions.
115
+
116
+ ### Configuring Help Tooltip Delays
117
+
118
+ Tooltip delays can be configured via `FeedbackUiOptions` when creating the feedback UI:
119
+
120
+ ```javascript
121
+ createBlinkIdFeedbackUi(uxManager, cameraUi, {
122
+ showHelpTooltipTimeout: 15000, // ms before tooltip appears
123
+ });
124
+ ```
125
+
126
+ > **Deprecated:** The `setHelpTooltipShowDelay` and `setHelpTooltipHideDelay` methods on `BlinkIdUxManager` are deprecated. Prefer configuring delays through `FeedbackUiOptions` instead.
127
+
128
+ See the example apps in the `apps/examples` directory in the GitHub repository for full usage details.
84
129
 
85
130
  ## Development
86
131