@incodetech/web 0.0.0-dev-20260630-ecf25d01 → 0.0.0-dev-20260701-bdeaa221

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,8 +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-6-Pw_VTz.js";
7
7
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
8
- import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as TerminalErrorPage } from "../useModuleLoader-bXzyrZ6b.js";
9
- import { getDeviceClass } from "@incodetech/core/device";
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-BeDlINB-.js";
10
9
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
11
10
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
12
11
  //#region src/shared/processing/useDelayedFlag.ts
@@ -160,7 +159,7 @@ function maybePreloadHomeScreen(flowManager) {
160
159
  if (flowManager.getState().presentation.shouldPrefetchHome) preloadHomeScreen();
161
160
  }
162
161
  function maybePreloadRedirectToMobile() {
163
- if (getDeviceClass() === "desktop") preloadRedirectToMobile();
162
+ if (isDesktopOrEmulated()) preloadRedirectToMobile();
164
163
  }
165
164
  function useFlowInitialization(options) {
166
165
  const { lang, disableDashboardTheme, enableHome, onError, useCPF } = options;
@@ -5,7 +5,7 @@ import { t as Page } from "./page-DidH_RkX.js";
5
5
  import { t as Button } from "./button-Dz6AsbmF.js";
6
6
  import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
7
7
  import { initializeWasmUtil, resolveWasmConfig, setWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
8
- import { getDeviceClass } from "@incodetech/core/device";
8
+ import { getDeviceClass, isBrowserSimulated } from "@incodetech/core/device";
9
9
  import { createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines } from "@incodetech/core/flow";
10
10
  import { getFinishStatus, initializeSession } from "@incodetech/core/session";
11
11
  import { api } from "@incodetech/core/http";
@@ -347,9 +347,22 @@ function preloadRedirectToMobile() {
347
347
  redirectToMobilePreloadPromise = void 0;
348
348
  });
349
349
  }
350
+ /**
351
+ * Whether the current browser should be treated as a desktop for the
352
+ * desktop-to-mobile redirect decision.
353
+ *
354
+ * A desktop browser emulating a phone (Chrome DevTools device toolbar) spoofs
355
+ * the user agent, so `getDeviceClass()` alone would report mobile and skip the
356
+ * dashboard-configured redirect. Treating a detected emulation as desktop keeps
357
+ * the redirect from being bypassed that way. Shared by the flow + workflow init
358
+ * paths so the "treat as desktop" rule lives in one place.
359
+ */
360
+ function isDesktopOrEmulated() {
361
+ return getDeviceClass() === "desktop" || isBrowserSimulated();
362
+ }
350
363
  function createFlowManager(options = {}) {
351
364
  const scopedLazyModules = {};
352
- const isDesktop = options.isDesktop ?? getDeviceClass() === "desktop";
365
+ const isDesktop = options.isDesktop ?? isDesktopOrEmulated();
353
366
  const { enableHome, ...flowFetchOptions } = options;
354
367
  let endScreen = {
355
368
  endScreenTitle: null,
@@ -673,4 +686,4 @@ function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLo
673
686
  ]);
674
687
  }
675
688
  //#endregion
676
- export { warmupWasmIfNeeded as _, resolveApiKey as a, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, fetchAndApplyTheme as v, TerminalErrorPage as y };
689
+ export { setupSDK as _, resolveApiKey as a, TerminalErrorPage as b, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, preloadRedirectToMobile as g, preloadHomeScreen as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadFirstModule as m, useModulePreloader as n, extractIncodeStatus as o, isDesktopOrEmulated as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, warmupWasmIfNeeded as v, fetchAndApplyTheme as y };
@@ -7,9 +7,8 @@ import { t as Page } from "../page-DidH_RkX.js";
7
7
  import { t as TransitionSpinner } from "../transitionSpinner-6-Pw_VTz.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 { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-bXzyrZ6b.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-BeDlINB-.js";
11
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
- import { getDeviceClass } from "@incodetech/core/device";
13
12
  import { classifyScoreStatus } from "@incodetech/core/flow";
14
13
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
15
14
  import { createWorkflowManager } from "@incodetech/core/workflow";
@@ -149,7 +148,7 @@ function createWorkflowUIManager(options = {}) {
149
148
  return createWorkflowManager({
150
149
  customModuleCallback: options.customModuleCallback,
151
150
  interviewId: options.interviewId,
152
- isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
151
+ isDesktop: options.isDesktop ?? isDesktopOrEmulated()
153
152
  });
154
153
  }
155
154
  function warmupWorkflowWasm(wasmConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260630-ecf25d01",
3
+ "version": "0.0.0-dev-20260701-bdeaa221",
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-20260630-ecf25d01"
294
+ "@incodetech/core": "0.0.0-dev-20260701-bdeaa221"
295
295
  },
296
296
  "devDependencies": {
297
297
  "@microsoft/api-extractor": "^7.53.3",