@incodetech/welcome 1.85.0-20251106211942.0 → 1.85.0-20251106221029.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.
@@ -16,7 +16,7 @@ export declare const useSessionState: (initialState: unknown) => any[];
16
16
  export declare function usePermissions(): readonly [boolean, React.Dispatch<React.SetStateAction<boolean>>, boolean];
17
17
  export declare function useInterval(callback: () => unknown, delay: number): number;
18
18
  export declare function useTimeout(callback: () => unknown, delay: number): void;
19
- export declare const useResize: (isKiosk?: boolean) => void;
19
+ export declare const useResize: () => void;
20
20
  export declare const isPortrait: () => boolean;
21
21
  export declare function useOrientation(): {
22
22
  isRotated: boolean;
@@ -1,22 +1,21 @@
1
1
  import { IncodeOptions, IncodeTheme } from '../../types/src';
2
2
  import { AxiosRequestConfig } from 'axios';
3
3
 
4
+ export type Translations = {
5
+ [key: string]: string | Translations;
6
+ };
4
7
  export declare const initializeDetection: ({ forceProductionMode, disableIpify, sdkVersion, }?: {
5
8
  forceProductionMode?: boolean;
6
9
  sdkVersion?: string;
7
10
  disableIpify?: boolean;
8
11
  }) => Promise<void>;
9
- export declare const setupI18n: (lang: string, translations: {
10
- [key: string]: string;
11
- }) => Promise<void>;
12
+ export declare const setupI18n: (lang: string, translations: Translations) => Promise<void>;
12
13
  type SetupParams = {
13
14
  forceProductionMode?: boolean;
14
15
  theme?: IncodeTheme;
15
16
  clientId?: string;
16
17
  lang?: string;
17
- translations?: {
18
- [key: string]: string;
19
- };
18
+ translations?: Translations;
20
19
  apiKey?: string;
21
20
  apiURL?: string;
22
21
  /** @deprecated This parameter is no longer used. The apiKey is now received from backend responses */
@@ -2413,8 +2413,7 @@ const resize = async () => {
2413
2413
  await sleep(100);
2414
2414
  const Le = window.innerWidth * 0.01, Be = window.innerHeight * 0.01;
2415
2415
  document.documentElement.style.setProperty("--vw", `${Le}px`), document.documentElement.style.setProperty("--vh", `${Be}px`);
2416
- }, useResize = (Le) => {
2417
- const { isRotated: Be } = useOrientation();
2416
+ }, useResize = () => {
2418
2417
  useEventListener(
2419
2418
  "resize",
2420
2419
  () => {
@@ -2422,8 +2421,8 @@ const resize = async () => {
2422
2421
  },
2423
2422
  window
2424
2423
  ), useLayoutEffect(() => {
2425
- mobile.any() && Be && !Le || resize();
2426
- }, [Be, Le]);
2424
+ resize();
2425
+ }, []);
2427
2426
  }, isPortrait = () => {
2428
2427
  var Le;
2429
2428
  return ((Le = screen.orientation) == null ? void 0 : Le.type.includes("portrait")) || Math.abs(window.orientation) === 0;
@@ -8375,7 +8374,7 @@ class MlWasmJSApi {
8375
8374
  );
8376
8375
  }
8377
8376
  }
8378
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251106211942.0";
8377
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251106221029.0";
8379
8378
  function e$2(Le, Be) {
8380
8379
  return function(Ye, tt) {
8381
8380
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -173184,7 +173183,7 @@ const AppProvider = ({ children: Le }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
173184
173183
  disableUnsupportedBrowserScreen: ft = !1
173185
173184
  }) => {
173186
173185
  const { isRotated: ht } = useOrientation(), { ready: gt } = useTranslation$1(), { shouldShow: At, onContinue: xt } = useBrowserNotSupported();
173187
- return useResize(Be), useEffect(() => {
173186
+ return useResize(), useEffect(() => {
173188
173187
  tt && initialize(tt);
173189
173188
  }, [tt]), gt ? options.redirectFromUnsupportedBrowsers && At && !ft ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserNotSupported, { onContinue: xt, token: tt }) : /* @__PURE__ */ jsxRuntimeExports.jsx(AppProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ReadyToRenderProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationProvider, { initialValue: { isOpen: !1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
173190
173189
  Container$f,
@@ -373313,11 +373312,11 @@ onmessage = (ev) => { postMessage({isOpenBeat:true});
373313
373312
  }
373314
373313
  }
373315
373314
  }
373316
- const i18nSetup = async (Le, Be, Ye) => {
373317
- Be && await Le.changeLanguage(Be), Ye && Le.addResourceBundle(
373318
- Le.resolvedLanguage,
373315
+ const i18nSetup = async (Le, Be) => {
373316
+ Le && await i18n.changeLanguage(Le), Be && i18n.addResourceBundle(
373317
+ i18n.resolvedLanguage,
373319
373318
  "default",
373320
- Ye,
373319
+ Be,
373321
373320
  !0,
373322
373321
  !0
373323
373322
  );
@@ -373336,9 +373335,9 @@ const initializeDetection = async ({
373336
373335
  Be
373337
373336
  );
373338
373337
  }, setupI18n = async (Le, Be) => {
373339
- i18n.isInitialized ? await i18nSetup(i18n, Le, Be) : await new Promise((Ye) => {
373338
+ i18n.isInitialized ? await i18nSetup(Le, Be) : await new Promise((Ye) => {
373340
373339
  i18n.on("initialized", async () => {
373341
- await i18nSetup(i18n, Le, Be), Ye();
373340
+ await i18nSetup(Le, Be), Ye();
373342
373341
  });
373343
373342
  });
373344
373343
  }, setup = async ({