@idmission/websdk-ui 0.2.0-rc.2 → 0.2.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 (101) hide show
  1. package/README.md +135 -56
  2. package/dist/DocumentCaptureView.d.ts +37 -0
  3. package/dist/DocumentCaptureView.d.ts.map +1 -1
  4. package/dist/DocumentCaptureView.js +489 -6
  5. package/dist/FaceLivenessView.d.ts +1 -1
  6. package/dist/FaceLivenessView.d.ts.map +1 -1
  7. package/dist/FaceLivenessView.js +37 -29
  8. package/dist/IdCaptureView.d.ts +6 -5
  9. package/dist/IdCaptureView.d.ts.map +1 -1
  10. package/dist/IdCaptureView.js +52 -12
  11. package/dist/SelfieCaptureView.d.ts +1 -1
  12. package/dist/SelfieCaptureView.d.ts.map +1 -1
  13. package/dist/SelfieCaptureView.js +6 -3
  14. package/dist/SignatureCaptureView.d.ts +9 -1
  15. package/dist/SignatureCaptureView.d.ts.map +1 -1
  16. package/dist/SignatureCaptureView.js +51 -10
  17. package/dist/VideoIdCaptureView.d.ts +1 -1
  18. package/dist/VideoIdCaptureView.d.ts.map +1 -1
  19. package/dist/VideoIdCaptureView.js +24 -4
  20. package/dist/components/CameraFeed.d.ts +11 -3
  21. package/dist/components/CameraFeed.d.ts.map +1 -1
  22. package/dist/components/CameraFeed.js +24 -4
  23. package/dist/components/barcode/BarcodeGuideOverlay.d.ts +7 -1
  24. package/dist/components/barcode/BarcodeGuideOverlay.d.ts.map +1 -1
  25. package/dist/components/barcode/BarcodeGuideOverlay.js +2 -2
  26. package/dist/components/debug/debug.d.ts +4 -4
  27. package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts +29 -0
  28. package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts.map +1 -0
  29. package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.js +274 -0
  30. package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts +56 -0
  31. package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts.map +1 -0
  32. package/dist/components/document/DocumentCaptureAutoCaptureGuidance.js +101 -0
  33. package/dist/components/document/DocumentCaptureGuideOverlay.d.ts +31 -1
  34. package/dist/components/document/DocumentCaptureGuideOverlay.d.ts.map +1 -1
  35. package/dist/components/document/DocumentCaptureGuideOverlay.js +121 -2
  36. package/dist/components/document/DocumentCaptureReviewScreen.d.ts +44 -0
  37. package/dist/components/document/DocumentCaptureReviewScreen.d.ts.map +1 -0
  38. package/dist/components/document/DocumentCaptureReviewScreen.js +40 -0
  39. package/dist/components/document/types.d.ts +25 -0
  40. package/dist/components/document/types.d.ts.map +1 -1
  41. package/dist/components/document/types.js +18 -1
  42. package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -1
  43. package/dist/components/guides/IdCaptureGuides.js +3 -4
  44. package/dist/components/review/ReviewScreen.d.ts.map +1 -1
  45. package/dist/components/review/ReviewScreen.js +1 -1
  46. package/dist/components/review/SignatureCaptureDiagnostics.d.ts +50 -0
  47. package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -0
  48. package/dist/components/review/SignatureCaptureDiagnostics.js +142 -0
  49. package/dist/components/selfie/SelfieCaptureSurface.d.ts +11 -2
  50. package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
  51. package/dist/components/selfie/SelfieCaptureSurface.js +5 -2
  52. package/dist/components/videoId/VideoIdCaptureGuides.d.ts +4 -1
  53. package/dist/components/videoId/VideoIdCaptureGuides.d.ts.map +1 -1
  54. package/dist/components/videoId/VideoIdCaptureGuides.js +2 -2
  55. package/dist/flows/CompositeWizard.d.ts +5 -0
  56. package/dist/flows/CompositeWizard.d.ts.map +1 -1
  57. package/dist/flows/CompositeWizard.js +2 -1
  58. package/dist/flows/DocumentCaptureFlow.d.ts +1 -1
  59. package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
  60. package/dist/flows/DocumentCaptureFlow.js +6 -6
  61. package/dist/flows/SubmissionProvider.d.ts.map +1 -1
  62. package/dist/flows/SubmissionProvider.js +2 -4
  63. package/dist/flows/approval.d.ts +15 -0
  64. package/dist/flows/approval.d.ts.map +1 -0
  65. package/dist/flows/approval.js +19 -0
  66. package/dist/flows/autoCaptureMountGuard.d.ts +22 -0
  67. package/dist/flows/autoCaptureMountGuard.d.ts.map +1 -0
  68. package/dist/flows/autoCaptureMountGuard.js +61 -0
  69. package/dist/flows/ringScreens.d.ts +0 -3
  70. package/dist/flows/ringScreens.d.ts.map +1 -1
  71. package/dist/flows/ringScreens.js +2 -3
  72. package/dist/guidance/selfieStrings.d.ts +9 -1
  73. package/dist/guidance/selfieStrings.d.ts.map +1 -1
  74. package/dist/guidance/selfieStrings.js +59 -20
  75. package/dist/i18n/index.d.ts +28 -1177
  76. package/dist/i18n/index.d.ts.map +1 -1
  77. package/dist/i18n/index.js +58 -22
  78. package/dist/i18n/locales/threeOh.d.ts +4 -0
  79. package/dist/i18n/locales/threeOh.d.ts.map +1 -0
  80. package/dist/i18n/locales/threeOh.js +105 -0
  81. package/dist/index.d.ts +3 -0
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +1 -0
  84. package/dist/testing/autoCaptureFrames.d.ts +23 -0
  85. package/dist/testing/autoCaptureFrames.d.ts.map +1 -0
  86. package/dist/testing/autoCaptureFrames.js +187 -0
  87. package/dist/testing/fakeDocumentController.d.ts +7 -1
  88. package/dist/testing/fakeDocumentController.d.ts.map +1 -1
  89. package/dist/testing/fakeDocumentController.js +10 -2
  90. package/dist/testing/index.d.ts +1 -0
  91. package/dist/testing/index.d.ts.map +1 -1
  92. package/dist/testing/index.js +1 -0
  93. package/dist/useIdmissionClient.d.ts +29 -0
  94. package/dist/useIdmissionClient.d.ts.map +1 -0
  95. package/dist/useIdmissionClient.js +44 -0
  96. package/dist/utils/canvas.d.ts.map +1 -1
  97. package/dist/utils/canvas.js +41 -0
  98. package/dist/version.d.ts +1 -1
  99. package/dist/version.d.ts.map +1 -1
  100. package/dist/version.js +1 -1
  101. package/package.json +3 -2
package/README.md CHANGED
@@ -10,13 +10,16 @@ owns rendered UI, theming, i18n, React bindings, and complete validation flows.
10
10
  pnpm add @idmission/websdk-core @idmission/websdk-ui
11
11
  ```
12
12
 
13
+ Migrating an existing `idmission-web-sdk` integration? Follow the
14
+ [compatibility-facade migration guide](https://github.com/Idmission-LLC/idmission-web-sdk-2.0/blob/develop/packages/websdk-ui/MIGRATION_FROM_COMPAT.md).
15
+
13
16
  ### Peer dependencies
14
17
 
15
- | Package | Version |
16
- | --- | --- |
17
- | `react` | `^18 \|\| ^19` |
18
- | `react-dom` | `^18 \|\| ^19` |
19
- | `styled-components` | `^6` |
18
+ | Package | Version |
19
+ | ------------------- | -------------- |
20
+ | `react` | `^18 \|\| ^19` |
21
+ | `react-dom` | `^18 \|\| ^19` |
22
+ | `styled-components` | `^6` |
20
23
 
21
24
  ## Quickstart
22
25
 
@@ -40,6 +43,56 @@ liveness check.
40
43
  No `useMemo`/`useCallback` is required, and none of this depends on the
41
44
  React Compiler.
42
45
 
46
+ Create the stateful network client with `useIdmissionClient`. The hook may run
47
+ before an asynchronously loaded session is available; the current committed
48
+ session and callback implementations are read when the client needs them.
49
+ Inline options are safe and do not require consumer memoization:
50
+
51
+ ```tsx
52
+ import { IdValidationFlow, useIdmissionClient } from "@idmission/websdk-ui";
53
+
54
+ function IdCaptureScreen({
55
+ sessionId,
56
+ onError,
57
+ }: {
58
+ sessionId?: string;
59
+ onError: (error: Error) => void;
60
+ }) {
61
+ const client = useIdmissionClient({
62
+ sessionId,
63
+ onRequestFailure: (error) => onError(error),
64
+ });
65
+
66
+ if (!sessionId) return null;
67
+
68
+ return (
69
+ <IdValidationFlow
70
+ client={client}
71
+ submission={{ jobID: "job-1" }}
72
+ geolocationEnabled={false}
73
+ />
74
+ );
75
+ }
76
+ ```
77
+
78
+ One hook mount owns one client and its validated session state. `sessionId`
79
+ is live for session resolution and can be a string, `null`/`undefined` while
80
+ loading, or an async resolver. It is read when validation or retry needs a
81
+ session; changing it does not silently replace an already validated session.
82
+ A later session also does not automatically retry a validation that has
83
+ already failed; call `client.retrySession()` (the standard flow error screen
84
+ does this) when retrying. `authUrl`, `submissionUrl`, `documentServiceUrl`,
85
+ and `timeoutMs` are mount-only.
86
+
87
+ Callback presence is mount-only too, while callbacks supplied at mount call
88
+ their latest committed defined implementation. This distinction matters for
89
+ `onSubmit`: supplying it selects customer handoff instead of SDK posting, so
90
+ adding or removing it during a capture cannot silently switch submission
91
+ modes. If a later render omits a mounted callback, the most recent defined
92
+ implementation remains active; a callback absent at mount is ignored if it
93
+ appears later. Remount the component that owns the hook with a React `key` to
94
+ intentionally replace the client or change any mount-only option.
95
+
43
96
  For enrolled-biometrics journeys, use `CustomerIdentificationFlow` (1:N face
44
97
  match), `CustomerVerificationFlow` (1:1 against one `submission.enrollmentId`),
45
98
  `CustomerBiometricsEnrollmentFlow`, or
@@ -54,40 +107,44 @@ The lower-level views remain available for custom assemblies:
54
107
  `IdCaptureView` is the whole ID-capture screen: it drives the camera, guide
55
108
  box, guidance messages, loading overlay, and review/error screens off a
56
109
  single headless `IdCaptureController` from `@idmission/websdk-core`. The host
57
- app owns creating the controller (and the `IdmissionClient`/session behind
58
- it) and wrapping the tree in `ThemeProvider` — `IdCaptureView` itself renders
59
- no theme, so it composes into whatever theme context the host already has.
60
- i18n init is likewise host-owned: unlike sdk2 (which calls it automatically
61
- at module scope), this package never calls `initializeI18n()` for you — call
62
- it once, at module scope, before rendering. `IdCaptureView`'s `lang` prop
63
- only switches the language afterward; it does not initialize react-i18next.
110
+ app owns creating the controller; `useIdmissionClient` owns the stateful
111
+ client/session behind it. The host also wraps the tree in `ThemeProvider` —
112
+ `IdCaptureView` itself renders no theme, so it composes into whatever theme
113
+ context the host already has. The package initializes its bundled translations
114
+ automatically in an SDK-owned i18n instance; `IdCaptureView`'s `lang` prop
115
+ selects the language from the first client or server render without requiring
116
+ application bootstrap code.
64
117
 
65
118
  ```tsx
66
- import { useMemo } from 'react'
67
- import { createIdmissionClient, SubmissionAction } from '@idmission/websdk-core/client'
68
- import { createIdCaptureController } from '@idmission/websdk-core/idCapture'
69
- import { IdCaptureView, ThemeProvider, initializeI18n } from '@idmission/websdk-ui'
70
-
71
- initializeI18n()
119
+ import { useMemo } from "react";
120
+ import { SubmissionAction } from "@idmission/websdk-core/client";
121
+ import { createIdCaptureController } from "@idmission/websdk-core/idCapture";
122
+ import {
123
+ IdCaptureView,
124
+ ThemeProvider,
125
+ useIdmissionClient,
126
+ } from "@idmission/websdk-ui";
72
127
 
73
128
  function IdCaptureScreen({ sessionId }: { sessionId: string }) {
74
- const controller = useMemo(() => {
75
- const client = createIdmissionClient({ sessionId })
76
- return createIdCaptureController({
77
- client,
78
- submission: { action: SubmissionAction.VERIFY },
79
- })
80
- }, [sessionId])
129
+ const client = useIdmissionClient({ sessionId });
130
+ const controller = useMemo(
131
+ () =>
132
+ createIdCaptureController({
133
+ client,
134
+ submission: { action: SubmissionAction.VERIFY },
135
+ }),
136
+ [client],
137
+ );
81
138
 
82
139
  return (
83
140
  <ThemeProvider theme="default">
84
141
  <IdCaptureView
85
142
  controller={controller}
86
- onExit={() => console.log('user exited capture')}
143
+ onExit={() => console.log("user exited capture")}
87
144
  onSubmitted={(response) => console.log(response.status.statusCode)}
88
145
  />
89
146
  </ThemeProvider>
90
- )
147
+ );
91
148
  }
92
149
  ```
93
150
 
@@ -108,27 +165,32 @@ passing the `IdmissionClient`'s own `checkLiveness` into the controller's
108
165
  step:
109
166
 
110
167
  ```tsx
111
- import { useMemo } from 'react'
112
- import { createIdmissionClient } from '@idmission/websdk-core/client'
113
- import { createSelfieCaptureController } from '@idmission/websdk-core/selfieCapture'
114
- import { FaceLivenessView, ThemeProvider } from '@idmission/websdk-ui'
168
+ import { useMemo } from "react";
169
+ import { createSelfieCaptureController } from "@idmission/websdk-core/selfieCapture";
170
+ import {
171
+ FaceLivenessView,
172
+ ThemeProvider,
173
+ useIdmissionClient,
174
+ } from "@idmission/websdk-ui";
115
175
 
116
176
  function FaceLivenessScreen({ sessionId }: { sessionId: string }) {
117
- const controller = useMemo(() => {
118
- const client = createIdmissionClient({ sessionId })
119
- return createSelfieCaptureController({
120
- liveness: { checkLiveness: (img) => client.checkLiveness(img) },
121
- })
122
- }, [sessionId])
177
+ const client = useIdmissionClient({ sessionId });
178
+ const controller = useMemo(
179
+ () =>
180
+ createSelfieCaptureController({
181
+ liveness: { checkLiveness: (img) => client.checkLiveness(img) },
182
+ }),
183
+ [client],
184
+ );
123
185
 
124
186
  return (
125
187
  <ThemeProvider theme="default">
126
188
  <FaceLivenessView
127
189
  controller={controller}
128
- onDone={(imageUrl) => console.log('liveness-checked selfie', imageUrl)}
190
+ onDone={(imageUrl) => console.log("liveness-checked selfie", imageUrl)}
129
191
  />
130
192
  </ThemeProvider>
131
- )
193
+ );
132
194
  }
133
195
  ```
134
196
 
@@ -147,16 +209,33 @@ permission prompt fires, instead of requesting the camera immediately on
147
209
 
148
210
  ## Exports
149
211
 
150
- | Import | Contents |
151
- | --- | --- |
152
- | `@idmission/websdk-ui` | Validation flows and chassis, capture views, React bindings, theme, i18n, overlays, and the curated components used to assemble them |
153
- | `@idmission/websdk-ui/testing` | Scriptable fake ID/selfie controllers and `createFakeIdmissionClient` for tests and Storybook stories |
212
+ | Import | Contents |
213
+ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
214
+ | `@idmission/websdk-ui` | `useIdmissionClient`, validation flows and chassis, capture views, React bindings, theme, i18n, overlays, and the curated components used to assemble them |
215
+ | `@idmission/websdk-ui/testing` | Scriptable fake ID/selfie controllers and `createFakeIdmissionClient` for tests and Storybook stories |
154
216
 
155
217
  `@idmission/websdk-ui`'s root export is a curated, named surface — never a
156
218
  blanket `export *` — mirroring `@idmission/websdk-core/idCapture`'s barrel
157
219
  policy. Internal helpers (e.g. the `useSyncExternalStore` listener-exception
158
220
  guard) are deliberately not exported.
159
221
 
222
+ ### Styling individual guidance messages
223
+
224
+ Every guidance message renders with a `data-guidance-code` attribute naming
225
+ which message it is, so a host can style one specific message from its own
226
+ stylesheet without the SDK shipping a severity opinion. "Guidance message"
227
+ means anything driven by one of the five guidance code enums, across every
228
+ layout that renders one — screen-level copy such as the upload-fallback step
229
+ instructions is not part of that vocabulary. The vocabulary is
230
+ append-only and enforced by `websdk-core`'s `guidanceCodeContract.test.ts` —
231
+ customer selectors are not type-checked against us, so renaming a code fails
232
+ silently in their production rather than in our build.
233
+
234
+ The customer-facing reference (every code for every flow, plus the CSS
235
+ specificity pattern that makes host rules win over the pill's
236
+ styled-components class) lives at
237
+ [apps/docs/content/other/styling-guidance-messages.mdx](../../apps/docs/content/other/styling-guidance-messages.mdx).
238
+
160
239
  ### Component surface (à la carte custom UI)
161
240
 
162
241
  Everything `IdCaptureView` composes is independently exported, so a host that
@@ -165,19 +244,19 @@ in between, a completely custom review step — can skip `IdCaptureView` and
165
244
  build its own tree from the same pieces, driven by the same
166
245
  `useIdCapture(controller)` state:
167
246
 
168
- | Area | Components |
169
- | --- | --- |
170
- | Flows | `IdValidationFlow`, `FaceValidationFlow`, `IdAndFaceValidationFlow`, `SignatureKYCFlow`, `VideoIdValidationFlow`, `CustomerIdentificationFlow`, `CustomerVerificationFlow`, `CustomerBiometricsEnrollmentFlow`, `CustomerIdAndBiometricsEnrollmentFlow`, `FlowChassis`, `CompositeWizard` |
171
- | Flow steps | `buildAdditionalDocumentsStep`, `buildSignatureStep`, `buildVideoIdSteps` — assemble a custom `CompositeWizard` step list |
172
- | Match outcomes | `CustomerMatchSuccess`, `CustomerMatchFailure` |
173
- | Camera | `CameraVideoTag`, `ScalingCameraFeed`, `CameraFeedWrapper`, `GuideLayoutProvider`/`useGuideLayout`, `GuideOrientationContextProvider`/`useGuideOrientationContext` |
174
- | Guides | `IdCaptureGuides` (fit/overlay router), `IdCaptureFitGuide`, `IdCaptureGuideOverlay`, `FlipIdPrompt`, `defaultIdCaptureGuideImages` |
175
- | Guidance | `GuidanceMessage`, `GuidanceMessageContainer` (portal), `guidanceMessageKey`/`instructionKey` |
176
- | Barcode | `BarcodeGuideOverlay`, `BarcodeSuccessOverlay` |
177
- | Loading | `IdCaptureLoadingOverlay`, `IdCaptureLoadingGraphic` |
178
- | Review / error | `ReviewScreen`, `ErrorScreen`, `CameraAccessDeniedOverlay`, `OverrideWrongDocumentTypeDialog` |
179
- | Other | `ExitCaptureButton`, `Card`/`FlexCard`, `ButtonsRow`, `LoaderButton`, `CapturedDocumentImg`, `LoadingListItemIndicator` |
180
- | Shared overlay primitives | `GrayOverlayContainer`, `OverlayInner`, `ButtonsColumn`, `WideButton`, `WideBorderButton` — the styled building blocks `ReviewScreen`/`ErrorScreen` compose |
247
+ | Area | Components |
248
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
249
+ | Flows | `IdValidationFlow`, `FaceValidationFlow`, `IdAndFaceValidationFlow`, `SignatureKYCFlow`, `VideoIdValidationFlow`, `CustomerIdentificationFlow`, `CustomerVerificationFlow`, `CustomerBiometricsEnrollmentFlow`, `CustomerIdAndBiometricsEnrollmentFlow`, `FlowChassis`, `CompositeWizard` |
250
+ | Flow steps | `buildAdditionalDocumentsStep`, `buildSignatureStep`, `buildVideoIdSteps` — assemble a custom `CompositeWizard` step list |
251
+ | Match outcomes | `CustomerMatchSuccess`, `CustomerMatchFailure` |
252
+ | Camera | `CameraVideoTag`, `ScalingCameraFeed`, `CameraFeedWrapper`, `GuideLayoutProvider`/`useGuideLayout`, `GuideOrientationContextProvider`/`useGuideOrientationContext` |
253
+ | Guides | `IdCaptureGuides` (fit/overlay router), `IdCaptureFitGuide`, `IdCaptureGuideOverlay`, `FlipIdPrompt`, `defaultIdCaptureGuideImages` |
254
+ | Guidance | `GuidanceMessage`, `GuidanceMessageContainer` (portal), `guidanceMessageKey`/`instructionKey` |
255
+ | Barcode | `BarcodeGuideOverlay`, `BarcodeSuccessOverlay` |
256
+ | Loading | `IdCaptureLoadingOverlay`, `IdCaptureLoadingGraphic` |
257
+ | Review / error | `ReviewScreen`, `ErrorScreen`, `CameraAccessDeniedOverlay`, `OverrideWrongDocumentTypeDialog` |
258
+ | Other | `ExitCaptureButton`, `Card`/`FlexCard`, `ButtonsRow`, `LoaderButton`, `CapturedDocumentImg`, `LoadingListItemIndicator` |
259
+ | Shared overlay primitives | `GrayOverlayContainer`, `OverlayInner`, `ButtonsColumn`, `WideButton`, `WideBorderButton` — the styled building blocks `ReviewScreen`/`ErrorScreen` compose |
181
260
 
182
261
  Every component takes plain props derived from `IdCaptureControllerState` (no
183
262
  store/context reads beyond the layout contexts above) — pass
@@ -21,6 +21,11 @@ export type DocumentCaptureViewClassNames = {
21
21
  uploadBtn?: string;
22
22
  uploadProgressBtn?: string;
23
23
  captureBtn?: string;
24
+ autoCaptureGuidance?: string;
25
+ manualCaptureHint?: string;
26
+ reviewContainer?: string;
27
+ reviewCard?: string;
28
+ reviewHeading?: string;
24
29
  };
25
30
  export type DocumentCaptureViewVerbiage = {
26
31
  headingText?: CustomerSuppliedVerbiage;
@@ -35,6 +40,15 @@ export type DocumentCaptureViewVerbiage = {
35
40
  uploadingBtnText?: CustomerSuppliedVerbiage;
36
41
  retryUploadBtnText?: CustomerSuppliedVerbiage;
37
42
  successBtnText?: CustomerSuppliedVerbiage;
43
+ autoCaptureNoDocumentText?: CustomerSuppliedVerbiage;
44
+ autoCaptureTooCloseText?: CustomerSuppliedVerbiage;
45
+ autoCaptureTooFarText?: CustomerSuppliedVerbiage;
46
+ autoCaptureNotStableText?: CustomerSuppliedVerbiage;
47
+ autoCaptureOutOfFocusText?: CustomerSuppliedVerbiage;
48
+ autoCaptureHoldStillText?: CustomerSuppliedVerbiage;
49
+ manualCaptureHintText?: CustomerSuppliedVerbiage;
50
+ reviewHeadingText?: CustomerSuppliedVerbiage;
51
+ reviewImageAltText?: CustomerSuppliedVerbiage;
38
52
  };
39
53
  export type DocumentCaptureViewProps = {
40
54
  controller: DocumentCaptureController;
@@ -75,6 +89,20 @@ export type DocumentCaptureViewProps = {
75
89
  aspectRatio?: number;
76
90
  /** Fallback instructions when the current document has none. */
77
91
  instructions?: ReactNode;
92
+ /**
93
+ * Renders the auto-capture tuning overlay: per-label detection boxes plus a
94
+ * stats pane carrying every gate's value, threshold and verdict, and the
95
+ * ~300-frame diagnostics ring buffer behind a COPY button (#341).
96
+ *
97
+ * Deliberately the SAME prop 2.x already exposes rather than a new one — the
98
+ * sheets and the applicants are in Mexico, so the instrument has to be
99
+ * reachable from a published build by the people holding the paper.
100
+ *
101
+ * Renders nothing until a document opts into `autoCapture`: with no engine
102
+ * there are no diagnostics, and an empty pane would read as a broken model
103
+ * rather than a flow that never asked for one.
104
+ */
105
+ debugMode?: boolean;
78
106
  classNames?: DocumentCaptureViewClassNames;
79
107
  verbiage?: DocumentCaptureViewVerbiage;
80
108
  };
@@ -93,6 +121,15 @@ export declare const DOCUMENT_CAPTURE_FALLBACK_VERBIAGE: {
93
121
  uploadingBtnText: string;
94
122
  retryUploadBtnText: string;
95
123
  successBtnText: string;
124
+ autoCaptureNoDocumentText: string;
125
+ autoCaptureTooCloseText: string;
126
+ autoCaptureTooFarText: string;
127
+ autoCaptureNotStableText: string;
128
+ autoCaptureOutOfFocusText: string;
129
+ autoCaptureHoldStillText: string;
130
+ manualCaptureHintText: string;
131
+ reviewHeadingText: string;
132
+ reviewImageAltText: string;
96
133
  };
97
134
  /**
98
135
  * Owns its own `GuideLayoutProvider`, matching IdCaptureView (:364). The guide
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentCaptureView.d.ts","sourceRoot":"","sources":["../src/DocumentCaptureView.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAEvF,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,mDAA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