@incodetech/web 0.0.0-dev-20260708-19645226 → 0.0.0-dev-20260708-5f3cd48a

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.
@@ -5,18 +5,21 @@ import { t as Spinner } from "../spinner-BMeIEK1d.js";
5
5
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
6
6
  import { createCrossDocumentDataMatchManager } from "@incodetech/core/cross-document-data-match";
7
7
  //#region src/modules/cross-document-data-match/cross-document-data-match.tsx
8
- var CrossDocumentDataMatchContent = ({ onFinish }) => {
9
- const [state, manager] = useManager(() => createCrossDocumentDataMatchManager());
8
+ var CrossDocumentDataMatchContent = ({ manager: externalManager, onFinish }) => {
9
+ const [state, manager] = useManager(() => externalManager ?? createCrossDocumentDataMatchManager(), { manageLifecycle: !externalManager });
10
10
  y(() => {
11
- manager.load();
12
- }, [manager]);
11
+ if (!externalManager) manager.load();
12
+ }, [manager, externalManager]);
13
13
  useModuleTerminalCallbacks({
14
14
  status: state.status === "finished" ? "finished" : "loading",
15
15
  onFinish
16
16
  });
17
17
  return /* @__PURE__ */ u(Spinner, { fullScreen: true });
18
18
  };
19
- var CrossDocumentDataMatch = ({ onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(CrossDocumentDataMatchContent, { onFinish }) });
19
+ var CrossDocumentDataMatch = ({ manager, onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(CrossDocumentDataMatchContent, {
20
+ manager,
21
+ onFinish
22
+ }) });
20
23
  registerIncodeModuleElement(CrossDocumentDataMatch, "incode-cross-document-data-match");
21
24
  //#endregion
22
25
  export { CrossDocumentDataMatch };
@@ -1,2 +1,2 @@
1
- import { t as DocumentCapture } from "../documentCapture-DhbO-A-V.js";
1
+ import { t as DocumentCapture } from "../documentCapture-BRxX-KJn.js";
2
2
  export { DocumentCapture };
@@ -680,7 +680,8 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
680
680
  onChange: handleFileChange,
681
681
  "aria-hidden": true,
682
682
  tabIndex: -1,
683
- class: "IncodeDocumentCaptureFileInput"
683
+ class: "IncodeDocumentCaptureFileInput",
684
+ "data-testid": "document-capture-file-input"
684
685
  }),
685
686
  /* @__PURE__ */ u("div", {
686
687
  class: "IncodeDocumentCaptureTutorialContent",
@@ -817,8 +818,12 @@ var DocumentCaptureLoading = ({ title }) => {
817
818
  };
818
819
  //#endregion
819
820
  //#region src/modules/document-capture/documentCapture.tsx
820
- var DocumentCaptureContent = ({ config, onFinish, onError }) => {
821
- const [state, manager] = useManager(() => createDocumentCaptureManager({ config }));
821
+ var DocumentCaptureContent = ({ config, manager: externalManager, onFinish, onError }) => {
822
+ const [state, manager] = useManager(() => {
823
+ if (externalManager) return externalManager;
824
+ if (!config) throw new Error("DocumentCapture config is required when no manager is provided");
825
+ return createDocumentCaptureManager({ config });
826
+ }, { manageLifecycle: !externalManager });
822
827
  const [isCommonIssuesOpen, setIsCommonIssuesOpen] = d(false);
823
828
  const { t } = useTranslation();
824
829
  useModuleTerminalCallbacks({
@@ -843,8 +848,8 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
843
848
  });
844
849
  if (state.status === "capturing" && state.captureMode === "file") return /* @__PURE__ */ u(DocumentTutorial, {
845
850
  manager,
846
- title: config.title,
847
- text: config.text,
851
+ title: config?.title,
852
+ text: config?.text,
848
853
  allowSkipDocumentCapture: false,
849
854
  captureMode: "file",
850
855
  error: state.error,
@@ -870,9 +875,10 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
870
875
  });
871
876
  return null;
872
877
  };
873
- var DocumentCapture = ({ config, onFinish, onError }) => {
874
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(DocumentCaptureContent, {
878
+ var DocumentCapture = ({ config, manager, onFinish, onError }) => {
879
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(DocumentCaptureContent, {
875
880
  config,
881
+ manager,
876
882
  onFinish,
877
883
  onError
878
884
  }) : null });
@@ -0,0 +1,2 @@
1
+ import { t as DocumentCapture } from "./documentCapture-BRxX-KJn.js";
2
+ export { DocumentCapture };
@@ -1,2 +1,2 @@
1
- import { t as FaceMatch } from "../faceMatch-DyTBoMDm.js";
1
+ import { t as FaceMatch } from "../faceMatch-B3ntTV7_.js";
2
2
  export { FaceMatch };
@@ -218,14 +218,15 @@ var MatchResultDisplay = ({ matched, titleRef }) => {
218
218
  children: matched === true ? t("faceMatch.matched") : matched === false ? t("faceMatch.facesNoMatch") : ""
219
219
  })] });
220
220
  };
221
- var FaceMatchContent = ({ config, onFinish, onError }) => {
221
+ var FaceMatchContent = ({ config, manager: externalManager, onFinish, onError }) => {
222
222
  const { t } = useTranslation();
223
223
  const titleRef = A(null);
224
224
  const resultTitleRef = A(null);
225
225
  const [state, manager] = useManager(() => {
226
+ if (externalManager) return externalManager;
226
227
  if (!config) throw new Error("FaceMatch config is required");
227
228
  return createFaceMatchManager({ config });
228
- });
229
+ }, { manageLifecycle: !externalManager });
229
230
  const animationTimeoutRef = A(null);
230
231
  y(() => {
231
232
  if (state.status === "animating") animationTimeoutRef.current = window.setTimeout(() => {
@@ -247,7 +248,7 @@ var FaceMatchContent = ({ config, onFinish, onError }) => {
247
248
  });
248
249
  if (state.status === "loading") return /* @__PURE__ */ u(TransitionSpinner, {});
249
250
  if (state.status === "animating" || state.status === "result") {
250
- const isSecondId = config.matchingType === "secondId";
251
+ const isSecondId = config?.matchingType === "secondId";
251
252
  const matched = state.status === "animating" ? state.result?.matched ?? null : state.matched;
252
253
  const showResult = state.status === "result";
253
254
  const liveness = state.status === "result" ? state.result.liveness : null;
@@ -331,9 +332,10 @@ var FaceMatchContent = ({ config, onFinish, onError }) => {
331
332
  *
332
333
  * @see {@link createFaceMatchManager} for headless usage
333
334
  */
334
- var FaceMatch = ({ config, onFinish, onError }) => {
335
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(FaceMatchContent, {
335
+ var FaceMatch = ({ config, manager, onFinish, onError }) => {
336
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(FaceMatchContent, {
336
337
  config,
338
+ manager,
337
339
  onFinish,
338
340
  onError
339
341
  }) : null });
@@ -0,0 +1,2 @@
1
+ import { t as FaceMatch } from "./faceMatch-B3ntTV7_.js";
2
+ export { FaceMatch };
@@ -5,7 +5,7 @@ import { u as useManager } from "../hooks-CNu7o-v8.js";
5
5
  import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
6
6
  import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
7
7
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
8
- import { a as resolveApiKey, b as TerminalErrorPage, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, g as preloadRedirectToMobile, h as preloadHomeScreen, l as LAZY_UI_MODULES, m as preloadFirstModule, n as useModulePreloader, o as extractIncodeStatus, p as isDesktopOrEmulated, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, v as warmupWasmIfNeeded } from "../useModuleLoader-D_gAk6zI.js";
8
+ import { a as resolveApiKey, b as TerminalErrorPage, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, g as preloadRedirectToMobile, h as preloadHomeScreen, l as LAZY_UI_MODULES, m as preloadFirstModule, n as useModulePreloader, o as extractIncodeStatus, p as isDesktopOrEmulated, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, v as warmupWasmIfNeeded } from "../useModuleLoader-DhzDDkE5.js";
9
9
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
10
10
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
11
11
  //#region src/shared/processing/useDelayedFlag.ts
@@ -6,8 +6,12 @@ import { t as ExpiredId } from "../expiredId-BZXLrLk-.js";
6
6
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
7
7
  import { createIdVerificationManager } from "@incodetech/core/id-verification";
8
8
  //#region src/modules/id-verification/id-verification.tsx
9
- var IdVerificationContent = ({ config, onFinish }) => {
10
- const [state, manager] = useManager(() => createIdVerificationManager({ config }));
9
+ var IdVerificationContent = ({ config, manager: externalManager, onFinish }) => {
10
+ const [state, manager] = useManager(() => {
11
+ if (externalManager) return externalManager;
12
+ if (!config) throw new Error("IdVerification config is required");
13
+ return createIdVerificationManager({ config });
14
+ }, { manageLifecycle: !externalManager });
11
15
  useModuleTerminalCallbacks({
12
16
  status: state.status === "finished" ? "finished" : "loading",
13
17
  onFinish
@@ -15,8 +19,9 @@ var IdVerificationContent = ({ config, onFinish }) => {
15
19
  if (state.status === "expired") return /* @__PURE__ */ u(ExpiredId, { onContinue: () => manager.continue() });
16
20
  return /* @__PURE__ */ u(Spinner, { fullScreen: true });
17
21
  };
18
- var IdVerification = ({ config, onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IdVerificationContent, {
22
+ var IdVerification = ({ config, manager, onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(IdVerificationContent, {
19
23
  config,
24
+ manager,
20
25
  onFinish
21
26
  }) : null });
22
27
  registerIncodeModuleElement(IdVerification, "incode-id-verification");
@@ -120,7 +120,7 @@ var IdOcrContent = ({ config, manager: externalManager, onFinish }) => {
120
120
  className: "IncodeIdOcrPage",
121
121
  hideFooterBranding: true,
122
122
  children: /* @__PURE__ */ u(IdOcrForm, {
123
- fields: getOcrFields(config),
123
+ fields: getOcrFields(config ?? {}),
124
124
  data: state.formData,
125
125
  validationErrors: state.status === "inputting" ? state.validationErrors : void 0,
126
126
  isReadonly: state.status === "readonly",
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ import { t as setUiConfig } from "./uiConfig-D2_wawvr.js";
3
3
  import { DEFAULT_WASM_VERSION } from "@incodetech/core/wasm";
4
4
  import { setup as setup$1 } from "@incodetech/core";
5
5
  //#region src/setup.ts
6
- async function setup({ apiURL, token, customHeaders, timeout, wasm, ipLookup, devMode, i18n, uiConfig }) {
6
+ async function setup({ apiURL, token, customHeaders, timeout, wasm, ipLookup, fingerprint, devMode, i18n, uiConfig }) {
7
7
  if (uiConfig) setUiConfig(uiConfig);
8
8
  await setup$1({
9
9
  apiURL,
@@ -12,6 +12,7 @@ async function setup({ apiURL, token, customHeaders, timeout, wasm, ipLookup, de
12
12
  timeout,
13
13
  wasm,
14
14
  ipLookup,
15
+ fingerprint,
15
16
  devMode
16
17
  });
17
18
  setI18nInstance(createI18n(i18n));
@@ -1,9 +1,10 @@
1
1
  import { CrossDocumentDataMatchConfig } from '@incodetech/core/cross-document-data-match';
2
+ import { CrossDocumentDataMatchManager } from '@incodetech/core/cross-document-data-match';
2
3
  import { FC } from 'preact/compat';
3
4
 
4
5
  export declare const CrossDocumentDataMatch: FC<CrossDocumentDataMatchProps>;
5
6
 
6
- declare type CrossDocumentDataMatchProps = IncodeModuleProps<CrossDocumentDataMatchConfig>;
7
+ declare type CrossDocumentDataMatchProps = IncodeModuleProps<CrossDocumentDataMatchConfig, void, CrossDocumentDataMatchManager>;
7
8
 
8
9
  /**
9
10
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -1,9 +1,10 @@
1
1
  import { DocumentCaptureConfig } from '@incodetech/core/document-capture';
2
+ import { DocumentCaptureManager } from '@incodetech/core/document-capture';
2
3
  import { FC } from 'preact/compat';
3
4
 
4
5
  export declare const DocumentCapture: FC<DocumentCaptureProps>;
5
6
 
6
- declare type DocumentCaptureProps = IncodeModuleProps<DocumentCaptureConfig>;
7
+ declare type DocumentCaptureProps = IncodeModuleProps<DocumentCaptureConfig, void, DocumentCaptureManager>;
7
8
 
8
9
  /**
9
10
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -1,4 +1,5 @@
1
1
  import { FaceMatchConfig } from '@incodetech/core/face-match';
2
+ import { FaceMatchManager } from '@incodetech/core/face-match';
2
3
  import { FC } from 'preact/compat';
3
4
 
4
5
  /**
@@ -28,7 +29,7 @@ export declare const FaceMatch: FC<FaceMatchProps>;
28
29
  /**
29
30
  * Props for the FaceMatch component
30
31
  */
31
- declare type FaceMatchProps = IncodeModuleProps<FaceMatchConfig>;
32
+ declare type FaceMatchProps = IncodeModuleProps<FaceMatchConfig, void, FaceMatchManager>;
32
33
 
33
34
  /**
34
35
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -1,9 +1,10 @@
1
1
  import { FC } from 'preact/compat';
2
2
  import { IdVerificationConfig } from '@incodetech/core/id-verification';
3
+ import { IdVerificationManager } from '@incodetech/core/id-verification';
3
4
 
4
5
  export declare const IdVerification: FC<IdVerificationProps>;
5
6
 
6
- declare type IdVerificationProps = IncodeModuleProps<IdVerificationConfig>;
7
+ declare type IdVerificationProps = IncodeModuleProps<IdVerificationConfig, void, IdVerificationManager>;
7
8
 
8
9
  /**
9
10
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -60,6 +61,8 @@ export { }
60
61
 
61
62
  declare global {
62
63
  interface HTMLElementTagNameMap {
63
- 'incode-id-verification': HTMLElement & IncodeModuleProps<IdVerificationConfig>;
64
+ 'incode-id-verification': HTMLElement & IncodeModuleProps<IdVerificationConfig,
65
+ void,
66
+ IdVerificationManager>;
64
67
  }
65
68
  }
@@ -22,7 +22,7 @@ export declare function setI18nInstance(instance: i18n): void;
22
22
  */
23
23
  export declare function setUiConfig(next: UiConfig): void;
24
24
 
25
- export declare function setup({ apiURL, token, customHeaders, timeout, wasm, ipLookup, devMode, i18n, uiConfig, }: SetupOptions): Promise<void>;
25
+ export declare function setup({ apiURL, token, customHeaders, timeout, wasm, ipLookup, fingerprint, devMode, i18n, uiConfig, }: SetupOptions): Promise<void>;
26
26
 
27
27
  declare type SetupOptions = {
28
28
  apiURL: string;
@@ -31,6 +31,13 @@ declare type SetupOptions = {
31
31
  timeout?: number;
32
32
  wasm?: WasmConfig | false;
33
33
  ipLookup?: boolean;
34
+ /**
35
+ * Disables client-side device-fingerprint submission. Forwarded to core
36
+ * `setup()` — see the core `SetupOptions.fingerprint` docs for the full
37
+ * behavior (transition flag; also affects the Deepsight metadata bundle
38
+ * and mandatory-consent auto-injection).
39
+ */
40
+ fingerprint?: boolean;
34
41
  /**
35
42
  * Disables the browser devtools detector for local development. Forwarded to
36
43
  * core `setup()`. Leave `false` (default) in production — see the core
@@ -290,20 +290,20 @@ var LAZY_UI_MODULES = {
290
290
  ID_CAPTURE: lazyIdModule,
291
291
  TUTORIAL_ID: lazyIdModule,
292
292
  SECOND_ID: lazyIdModule,
293
- FACE_MATCH: () => import("./faceMatch-B_HvxLm_.js").then((m) => m.FaceMatch),
293
+ FACE_MATCH: () => import("./faceMatch-Zc7Hw7ss.js").then((m) => m.FaceMatch),
294
294
  CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((m) => m.CurpValidation),
295
295
  GOVT_VALIDATION_PROVISIONING: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
296
296
  INE_VALIDATION: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
297
297
  GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((m) => m.Geolocation),
298
298
  EXTERNAL_VERIFICATION: () => import("./ekycModule-CDIEjI6V.js").then((m) => m.EkycModule),
299
299
  EKYB: () => import("./ekybModule-C6Nttked.js").then((m) => m.EkybModule),
300
- DOCUMENT_CAPTURE: () => import("./documentCapture-DXYYyxZl.js").then((m) => m.DocumentCapture),
301
- ADDRESS: () => import("./documentCapture-DXYYyxZl.js").then((m) => m.DocumentCapture),
300
+ DOCUMENT_CAPTURE: () => import("./documentCapture-BcmtynYb.js").then((m) => m.DocumentCapture),
301
+ ADDRESS: () => import("./documentCapture-BcmtynYb.js").then((m) => m.DocumentCapture),
302
302
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((m) => m.Consent),
303
303
  MANDATORY_CONSENT: () => import("./mandatoryConsent-D0GTKu-H.js").then((m) => m.MandatoryConsent),
304
304
  ML_CONSENT: () => import("./mandatoryConsent-D0GTKu-H.js").then((m) => m.MandatoryConsent),
305
305
  SIGNATURE: () => import("./signature/signature.es.js").then((m) => m.Signature),
306
- ID_OCR: () => import("./idOcr-WFBvqy3b.js").then((m) => m.IdOcr),
306
+ ID_OCR: () => import("./idOcr-CbUkZ5Do.js").then((m) => m.IdOcr),
307
307
  CPF_OCR: () => import("./cpfOcr-B79245-3.js").then((m) => m.CpfOcr),
308
308
  ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((m) => m.Antifraud),
309
309
  CUSTOM_FIELDS: () => import("./customFields-BDsXR7A-.js").then((m) => m.CustomFields),
@@ -7,7 +7,7 @@ import { t as Page } from "../page-DidH_RkX.js";
7
7
  import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
8
8
  import { t as AutoFocusTitle } from "../autoFocusTitle-CuRu2lPg.js";
9
9
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
10
- import { _ as setupSDK, a as resolveApiKey, b as TerminalErrorPage, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, p as isDesktopOrEmulated, s as UnsupportedModule, t as useModuleLoader, y as fetchAndApplyTheme } from "../useModuleLoader-D_gAk6zI.js";
10
+ import { _ as setupSDK, a as resolveApiKey, b as TerminalErrorPage, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, p as isDesktopOrEmulated, s as UnsupportedModule, t as useModuleLoader, y as fetchAndApplyTheme } from "../useModuleLoader-DhzDDkE5.js";
11
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
12
  import { classifyScoreStatus } from "@incodetech/core/flow";
13
13
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260708-19645226",
3
+ "version": "0.0.0-dev-20260708-5f3cd48a",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -291,7 +291,7 @@
291
291
  "qrcode": "^1.5.4",
292
292
  "signature_pad": "^5.1.3",
293
293
  "tailwindcss": "^4.1.17",
294
- "@incodetech/core": "0.0.0-dev-20260708-19645226"
294
+ "@incodetech/core": "0.0.0-dev-20260708-5f3cd48a"
295
295
  },
296
296
  "devDependencies": {
297
297
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,2 +0,0 @@
1
- import { t as DocumentCapture } from "./documentCapture-DhbO-A-V.js";
2
- export { DocumentCapture };
@@ -1,2 +0,0 @@
1
- import { t as FaceMatch } from "./faceMatch-DyTBoMDm.js";
2
- export { FaceMatch };