@microblink/blinkid-ux-manager 7.6.3 → 7.7.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 (176) hide show
  1. package/README.md +48 -3
  2. package/dist/blinkid-ux-manager.js +2704 -2209
  3. package/package.json +5 -5
  4. package/types/core/BlinkIdProcessingError.d.ts +2 -2
  5. package/types/core/BlinkIdProcessingError.d.ts.map +1 -1
  6. package/types/core/BlinkIdUxManager.d.ts +72 -36
  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/BlinkIdUxManager.test.d.ts +1 -1
  11. package/types/core/DocumentClassFilter.d.ts +1 -1
  12. package/types/core/__testdata/blankProcessResult.d.ts +3 -3
  13. package/types/core/__testdata/blankProcessResult.d.ts.map +1 -1
  14. package/types/core/__testdata/blinkidTestFixtures.d.ts +20 -0
  15. package/types/core/__testdata/blinkidTestFixtures.d.ts.map +1 -0
  16. package/types/core/blinkid-ui-state.d.ts +96 -9
  17. package/types/core/blinkid-ui-state.d.ts.map +1 -1
  18. package/types/core/blinkid-ui-state.test.d.ts +1 -1
  19. package/types/core/createBlinkIdUxManager.d.ts +23 -0
  20. package/types/core/createBlinkIdUxManager.d.ts.map +1 -0
  21. package/types/core/getChainedUiStateKey.d.ts +18 -0
  22. package/types/core/getChainedUiStateKey.d.ts.map +1 -0
  23. package/types/core/getChainedUiStateKey.test.d.ts +5 -0
  24. package/types/core/getChainedUiStateKey.test.d.ts.map +1 -0
  25. package/types/core/test-helpers.integration.d.ts +65 -0
  26. package/types/core/test-helpers.integration.d.ts.map +1 -0
  27. package/types/core/ui-state-utils.d.ts +51 -0
  28. package/types/core/ui-state-utils.d.ts.map +1 -0
  29. package/types/core/uxAnalyticsMappers.d.ts +17 -0
  30. package/types/core/uxAnalyticsMappers.d.ts.map +1 -0
  31. package/types/index.d.ts +7 -6
  32. package/types/index.d.ts.map +1 -1
  33. package/types/index.rollup.d.ts +292 -64
  34. package/types/ui/BlinkIdFeedbackUi.d.ts +1 -1
  35. package/types/ui/BlinkIdFeedbackUi.d.ts.map +1 -1
  36. package/types/ui/BlinkIdUiStoreContext.d.ts +10 -5
  37. package/types/ui/BlinkIdUiStoreContext.d.ts.map +1 -1
  38. package/types/ui/LocalizationContext.d.ts +1 -1
  39. package/types/ui/UiFeedbackOverlay.d.ts +2 -1
  40. package/types/ui/UiFeedbackOverlay.d.ts.map +1 -1
  41. package/types/ui/createBlinkIdFeedbackUi.d.ts +16 -3
  42. package/types/ui/createBlinkIdFeedbackUi.d.ts.map +1 -1
  43. package/types/ui/dialogs/ErrorModal.d.ts +1 -1
  44. package/types/ui/dialogs/ErrorModal.d.ts.map +1 -1
  45. package/types/ui/dialogs/HelpModal.d.ts +4 -2
  46. package/types/ui/dialogs/HelpModal.d.ts.map +1 -1
  47. package/types/ui/dialogs/OnboardingGuideModal.d.ts +4 -2
  48. package/types/ui/dialogs/OnboardingGuideModal.d.ts.map +1 -1
  49. package/types/ui/feedbackMessages.d.ts +2 -2
  50. package/types/ui/feedbackMessages.d.ts.map +1 -1
  51. package/types/ui/locales/ak.d.ts +18 -2
  52. package/types/ui/locales/ak.d.ts.map +1 -1
  53. package/types/ui/locales/am.d.ts +18 -2
  54. package/types/ui/locales/am.d.ts.map +1 -1
  55. package/types/ui/locales/ar.d.ts +21 -5
  56. package/types/ui/locales/ar.d.ts.map +1 -1
  57. package/types/ui/locales/bn.d.ts +18 -2
  58. package/types/ui/locales/bn.d.ts.map +1 -1
  59. package/types/ui/locales/cs.d.ts +19 -3
  60. package/types/ui/locales/cs.d.ts.map +1 -1
  61. package/types/ui/locales/da.d.ts +18 -2
  62. package/types/ui/locales/da.d.ts.map +1 -1
  63. package/types/ui/locales/de.d.ts +19 -3
  64. package/types/ui/locales/de.d.ts.map +1 -1
  65. package/types/ui/locales/el.d.ts +19 -3
  66. package/types/ui/locales/el.d.ts.map +1 -1
  67. package/types/ui/locales/en.d.ts +16 -3
  68. package/types/ui/locales/en.d.ts.map +1 -1
  69. package/types/ui/locales/en_GB.d.ts +18 -2
  70. package/types/ui/locales/en_GB.d.ts.map +1 -1
  71. package/types/ui/locales/es.d.ts +20 -4
  72. package/types/ui/locales/es.d.ts.map +1 -1
  73. package/types/ui/locales/es_MX.d.ts +18 -2
  74. package/types/ui/locales/es_MX.d.ts.map +1 -1
  75. package/types/ui/locales/fa-latn.d.ts +18 -2
  76. package/types/ui/locales/fa-latn.d.ts.map +1 -1
  77. package/types/ui/locales/fi.d.ts +18 -2
  78. package/types/ui/locales/fi.d.ts.map +1 -1
  79. package/types/ui/locales/fil.d.ts +18 -2
  80. package/types/ui/locales/fil.d.ts.map +1 -1
  81. package/types/ui/locales/fr.d.ts +19 -3
  82. package/types/ui/locales/fr.d.ts.map +1 -1
  83. package/types/ui/locales/fr_CA.d.ts +18 -2
  84. package/types/ui/locales/fr_CA.d.ts.map +1 -1
  85. package/types/ui/locales/ha.d.ts +18 -2
  86. package/types/ui/locales/ha.d.ts.map +1 -1
  87. package/types/ui/locales/he.d.ts +18 -2
  88. package/types/ui/locales/he.d.ts.map +1 -1
  89. package/types/ui/locales/hi.d.ts +18 -2
  90. package/types/ui/locales/hi.d.ts.map +1 -1
  91. package/types/ui/locales/hr.d.ts +25 -9
  92. package/types/ui/locales/hr.d.ts.map +1 -1
  93. package/types/ui/locales/hu.d.ts +19 -3
  94. package/types/ui/locales/hu.d.ts.map +1 -1
  95. package/types/ui/locales/id.d.ts +19 -3
  96. package/types/ui/locales/id.d.ts.map +1 -1
  97. package/types/ui/locales/index.d.ts +3 -3
  98. package/types/ui/locales/index.d.ts.map +1 -1
  99. package/types/ui/locales/is.d.ts +18 -2
  100. package/types/ui/locales/is.d.ts.map +1 -1
  101. package/types/ui/locales/it.d.ts +21 -5
  102. package/types/ui/locales/it.d.ts.map +1 -1
  103. package/types/ui/locales/ja.d.ts +18 -2
  104. package/types/ui/locales/ja.d.ts.map +1 -1
  105. package/types/ui/locales/ka_GE.d.ts +18 -2
  106. package/types/ui/locales/ka_GE.d.ts.map +1 -1
  107. package/types/ui/locales/kk.d.ts +18 -2
  108. package/types/ui/locales/kk.d.ts.map +1 -1
  109. package/types/ui/locales/km_KH.d.ts +18 -2
  110. package/types/ui/locales/km_KH.d.ts.map +1 -1
  111. package/types/ui/locales/ko.d.ts +18 -2
  112. package/types/ui/locales/ko.d.ts.map +1 -1
  113. package/types/ui/locales/lv.d.ts +18 -2
  114. package/types/ui/locales/lv.d.ts.map +1 -1
  115. package/types/ui/locales/ms.d.ts +22 -6
  116. package/types/ui/locales/ms.d.ts.map +1 -1
  117. package/types/ui/locales/ne.d.ts +18 -2
  118. package/types/ui/locales/ne.d.ts.map +1 -1
  119. package/types/ui/locales/nl.d.ts +19 -3
  120. package/types/ui/locales/nl.d.ts.map +1 -1
  121. package/types/ui/locales/no.d.ts +18 -2
  122. package/types/ui/locales/no.d.ts.map +1 -1
  123. package/types/ui/locales/pl.d.ts +18 -2
  124. package/types/ui/locales/pl.d.ts.map +1 -1
  125. package/types/ui/locales/ps_AF.d.ts +18 -2
  126. package/types/ui/locales/ps_AF.d.ts.map +1 -1
  127. package/types/ui/locales/pt.d.ts +21 -5
  128. package/types/ui/locales/pt.d.ts.map +1 -1
  129. package/types/ui/locales/pt_BR.d.ts +18 -2
  130. package/types/ui/locales/pt_BR.d.ts.map +1 -1
  131. package/types/ui/locales/ro.d.ts +19 -3
  132. package/types/ui/locales/ro.d.ts.map +1 -1
  133. package/types/ui/locales/ru.d.ts +18 -2
  134. package/types/ui/locales/ru.d.ts.map +1 -1
  135. package/types/ui/locales/si.d.ts +18 -2
  136. package/types/ui/locales/si.d.ts.map +1 -1
  137. package/types/ui/locales/sk.d.ts +19 -3
  138. package/types/ui/locales/sk.d.ts.map +1 -1
  139. package/types/ui/locales/sl.d.ts +20 -4
  140. package/types/ui/locales/sl.d.ts.map +1 -1
  141. package/types/ui/locales/sr.d.ts +19 -3
  142. package/types/ui/locales/sr.d.ts.map +1 -1
  143. package/types/ui/locales/sv.d.ts +19 -3
  144. package/types/ui/locales/sv.d.ts.map +1 -1
  145. package/types/ui/locales/sw.d.ts +18 -2
  146. package/types/ui/locales/sw.d.ts.map +1 -1
  147. package/types/ui/locales/th.d.ts +18 -2
  148. package/types/ui/locales/th.d.ts.map +1 -1
  149. package/types/ui/locales/tr.d.ts +19 -3
  150. package/types/ui/locales/tr.d.ts.map +1 -1
  151. package/types/ui/locales/uk.d.ts +18 -2
  152. package/types/ui/locales/uk.d.ts.map +1 -1
  153. package/types/ui/locales/ur.d.ts +19 -3
  154. package/types/ui/locales/ur.d.ts.map +1 -1
  155. package/types/ui/locales/uz.d.ts +18 -2
  156. package/types/ui/locales/uz.d.ts.map +1 -1
  157. package/types/ui/locales/vi.d.ts +19 -3
  158. package/types/ui/locales/vi.d.ts.map +1 -1
  159. package/types/ui/locales/yo.d.ts +18 -2
  160. package/types/ui/locales/yo.d.ts.map +1 -1
  161. package/types/ui/locales/zh_CN.d.ts +19 -3
  162. package/types/ui/locales/zh_CN.d.ts.map +1 -1
  163. package/types/ui/locales/zh_TW.d.ts +18 -2
  164. package/types/ui/locales/zh_TW.d.ts.map +1 -1
  165. package/types/core/HapticFeedback.d.ts +0 -57
  166. package/types/core/HapticFeedback.d.ts.map +0 -1
  167. package/types/core/HapticFeedback.test.d.ts +0 -5
  168. package/types/core/HapticFeedback.test.d.ts.map +0 -1
  169. package/types/core/ping-camera-utils.d.ts +0 -16
  170. package/types/core/ping-camera-utils.d.ts.map +0 -1
  171. package/types/core/utils.d.ts +0 -25
  172. package/types/core/utils.d.ts.map +0 -1
  173. package/types/shared/ping-implementations.d.ts +0 -60
  174. package/types/shared/ping-implementations.d.ts.map +0 -1
  175. package/types/shared/uiEventFeedbackMapper.d.ts +0 -7
  176. package/types/shared/uiEventFeedbackMapper.d.ts.map +0 -1
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright (c) 2026 Microblink Ltd. All rights reserved.
3
+ */
4
+ import { BlinkIdProcessResult, DocumentClassInfo } from "@microblink/blinkid-core";
5
+ /**
6
+ * Extracts the document class info from the process result.
7
+ *
8
+ * @param processResult - The process result.
9
+ * @returns The document class info.
10
+ */
11
+ export declare function extractDocumentClassInfo(processResult: BlinkIdProcessResult): DocumentClassInfo;
12
+ /**
13
+ * Checks if the document class is classified.
14
+ *
15
+ * @param documentClassInfo - The document class info.
16
+ * @returns Whether the document class is classified.
17
+ */
18
+ export declare function isDocumentClassified(documentClassInfo: DocumentClassInfo): boolean;
19
+ export declare function getDocumentRotation(processResult: BlinkIdProcessResult): import("@microblink/blinkid-wasm").DocumentRotation;
20
+ /**
21
+ * Checks if the document is a passport.
22
+ *
23
+ * @param docClass - The document class info.
24
+ * @returns True if the document is a passport, false otherwise.
25
+ */
26
+ export declare function isPassport(docClass: DocumentClassInfo | undefined): boolean;
27
+ /**
28
+ * Checks if the document is a passport and has a barcode on the last page (USA or India).
29
+ *
30
+ * @param docClass - The document class info.
31
+ * @returns True if the document is a passport and has a barcode on the last page (USA or India), false otherwise.
32
+ */
33
+ export declare function isPassportWithBarcode(docClass: DocumentClassInfo | undefined): boolean;
34
+ /**
35
+ * Checks if the document is a passport without a barcode on the last page (not USA or India).
36
+ *
37
+ * @param docClass - The document class info.
38
+ * @returns True if the document is a passport without a barcode on the last page (not USA or India), false otherwise.
39
+ */
40
+ export declare function isPassportWithoutBarcode(docClass: DocumentClassInfo | undefined): boolean; /**
41
+ * Utility type for document pagination types.
42
+ */
43
+ export type DocumentPagination = "passport-no-barcode" | "passport-with-barcode" | "other";
44
+ /**
45
+ * Determines the document pagination type based on the document class info.
46
+ *
47
+ * @param docClass - The document class info.
48
+ * @returns The document pagination type.
49
+ */
50
+ export declare function getDocumentPaginationType(docClass: DocumentClassInfo | undefined): DocumentPagination;
51
+ //# sourceMappingURL=ui-state-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-state-utils.d.ts","sourceRoot":"","sources":["../../src/core/ui-state-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,oBAAoB,qBAE3E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAKT;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,oBAAoB,uDAEtE;AAED;;;;;GAKG;AAEH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAEjE;AACD;;;;;GAKG;AAEH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAK5E;AACD;;;;;GAKG;AAEH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAOxC,CAAC;;GAEC;AAEH,MAAM,MAAM,kBAAkB,GAC1B,qBAAqB,GACrB,uBAAuB,GACvB,OAAO,CAAC;AACZ;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GACtC,kBAAkB,CAQpB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2026 Microblink Ltd. All rights reserved.
3
+ */
4
+ import type { PingUxEventData } from "@microblink/analytics/ping";
5
+ import type { BlinkIdUiErrorStateKey } from "./blinkid-ui-state";
6
+ /**
7
+ * Error state keys that produce a concrete analytics error message type.
8
+ * UNSUPPORTED_DOCUMENT is excluded because it is handled as a separate
9
+ * error callback rather than an analytics error message event.
10
+ */
11
+ export type PingableErrorUiStateKey = Exclude<BlinkIdUiErrorStateKey, "UNSUPPORTED_DOCUMENT">;
12
+ /**
13
+ * Maps a UI error state key to the analytics error message type used in
14
+ * the UX event ping.
15
+ */
16
+ export declare function mapErrorStateKeyToAnalyticsType(errorKey: PingableErrorUiStateKey): PingUxEventData["errorMessageType"];
17
+ //# sourceMappingURL=uxAnalyticsMappers.d.ts.map
@@ -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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025 Microblink Ltd. All rights reserved.
2
+ * Copyright (c) 2026 Microblink Ltd. All rights reserved.
3
3
  */
4
4
  /**
5
5
  * @packageDocumentation
@@ -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";
12
- export * from "./core/HapticFeedback";
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";
13
17
  export * from "./ui/createBlinkIdFeedbackUi";
14
18
  export type { LocaleRecord, LocalizationStrings, } from "./ui/LocalizationContext";
15
- export type { DocumentClassFilter } from "./core/DocumentClassFilter";
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,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,YAAY,EACV,YAAY,EACZ,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,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"}