@embarkai/ui-kit 0.4.117 → 0.4.119

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.
@@ -15,7 +15,7 @@
15
15
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
16
16
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
17
17
 
18
- <title>EmbarkAI Secure Wallet - iframe version 0.4.117</title>
18
+ <title>EmbarkAI Secure Wallet - iframe version 0.4.119</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -135,7 +135,7 @@
135
135
  enableScrollIntoView: true
136
136
  })
137
137
  .withConf({
138
- lang: 'en',
138
+ lang: options.lang || 'en',
139
139
  theme: options.theme,
140
140
  customizationName: options.customizationName
141
141
  })
@@ -198,7 +198,8 @@
198
198
  launchSumsubSdk({
199
199
  accessToken: message.data.accessToken,
200
200
  theme: message.data.theme,
201
- customizationName: message.data.customizationName
201
+ customizationName: message.data.customizationName,
202
+ lang: message.data.lang
202
203
  })
203
204
  break
204
205
 
@@ -6342,7 +6342,7 @@ var SigningManager = class extends TokenRefreshApiClient {
6342
6342
  };
6343
6343
 
6344
6344
  // src/iframe/main.ts
6345
- var IFRAME_VERSION = "0.4.117";
6345
+ var IFRAME_VERSION = "0.4.119";
6346
6346
  var IframeWallet = class {
6347
6347
  // private finchpay: FinchPayRampAPI
6348
6348
  // private rampnow: RampnowOnrampAPI
package/dist/index.cjs CHANGED
@@ -7396,6 +7396,7 @@ var init_useExpandable = __esm({
7396
7396
  const resizeObs = new ResizeObserver(() => setExpandableHeight(minHeight, isExpanded));
7397
7397
  const domMutationObs = new MutationObserver(() => setExpandableHeight(minHeight, isExpanded));
7398
7398
  resizeObs.observe(expandableRef.current);
7399
+ resizeObs.observe(contentRef.current);
7399
7400
  domMutationObs.observe(expandableRef.current, { childList: true, subtree: true });
7400
7401
  return () => {
7401
7402
  resizeObs.disconnect();
@@ -7813,7 +7814,13 @@ var init_en = __esm({
7813
7814
  }
7814
7815
  },
7815
7816
  kycMenu: {
7816
- title: "KYC"
7817
+ title: "KYC",
7818
+ preparing: "Preparing verification...",
7819
+ authenticating: "Authenticating...",
7820
+ loadingForm: "Loading verification form...",
7821
+ loading: "Loading KYC verification...",
7822
+ comingSoon: "KYC verification coming soon\u2026",
7823
+ providerComingSoon: "KYC provider coming soon"
7817
7824
  },
7818
7825
  nicknameMenu: {
7819
7826
  title: "Nickname",
@@ -8407,7 +8414,13 @@ var init_ru = __esm({
8407
8414
  }
8408
8415
  },
8409
8416
  kycMenu: {
8410
- title: "KYC"
8417
+ title: "KYC",
8418
+ preparing: "\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043A\u0430 \u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8419
+ authenticating: "\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F...",
8420
+ loadingForm: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0444\u043E\u0440\u043C\u044B \u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8421
+ loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 KYC-\u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8422
+ comingSoon: "KYC-\u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F\u2026",
8423
+ providerComingSoon: "KYC-\u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F"
8411
8424
  },
8412
8425
  nicknameMenu: {
8413
8426
  title: "\u041D\u0438\u043A\u043D\u0435\u0439\u043C",
@@ -9001,7 +9014,13 @@ var init_zh = __esm({
9001
9014
  }
9002
9015
  },
9003
9016
  kycMenu: {
9004
- title: "KYC"
9017
+ title: "KYC",
9018
+ preparing: "\u6B63\u5728\u51C6\u5907\u9A8C\u8BC1...",
9019
+ authenticating: "\u6B63\u5728\u8BA4\u8BC1...",
9020
+ loadingForm: "\u6B63\u5728\u52A0\u8F7D\u9A8C\u8BC1\u8868\u5355...",
9021
+ loading: "\u6B63\u5728\u52A0\u8F7D KYC \u9A8C\u8BC1...",
9022
+ comingSoon: "KYC \u9A8C\u8BC1\u5373\u5C06\u63A8\u51FA\u2026",
9023
+ providerComingSoon: "KYC \u63D0\u4F9B\u5546\u5373\u5C06\u63A8\u51FA"
9005
9024
  },
9006
9025
  nicknameMenu: {
9007
9026
  title: "\u6635\u79F0",
@@ -21400,10 +21419,15 @@ var init_sumsub = __esm({
21400
21419
  });
21401
21420
 
21402
21421
  // src/internal/components/KYC/SumsubIframeManager.ts
21403
- var DEFAULT_THEME_NAME, SumsubIframeManager;
21422
+ function toSumsubLang(lang) {
21423
+ if (!lang) return "en";
21424
+ return SUMSUB_LANG_OVERRIDES[lang] ?? lang;
21425
+ }
21426
+ var DEFAULT_THEME_NAME, SUMSUB_LANG_OVERRIDES, SumsubIframeManager;
21404
21427
  var init_SumsubIframeManager = __esm({
21405
21428
  "src/internal/components/KYC/SumsubIframeManager.ts"() {
21406
- DEFAULT_THEME_NAME = "Lumia Hub KYC Preset V2";
21429
+ DEFAULT_THEME_NAME = "embarkAI Preset v1";
21430
+ SUMSUB_LANG_OVERRIDES = { tl: "fl" };
21407
21431
  SumsubIframeManager = class {
21408
21432
  config;
21409
21433
  boundMessageHandler;
@@ -21428,7 +21452,8 @@ var init_SumsubIframeManager = __esm({
21428
21452
  data: {
21429
21453
  accessToken: token,
21430
21454
  theme: this.config.options.theme,
21431
- customizationName: this.config.options.customizationName
21455
+ customizationName: this.config.options.customizationName,
21456
+ lang: this.config.options.lang
21432
21457
  }
21433
21458
  });
21434
21459
  } catch (err) {
@@ -21472,6 +21497,8 @@ var init_SumsubIframeManager = __esm({
21472
21497
  function useSumsubIframe({ iframeUrl }) {
21473
21498
  const config = useProviderConfig().config;
21474
21499
  const { colorMode } = useColorMode();
21500
+ const { t, i18n } = useT();
21501
+ const lang = toSumsubLang(i18n.resolvedLanguage);
21475
21502
  const iframeRef = (0, import_react64.useRef)(null);
21476
21503
  const [isLoading, setIsLoading] = (0, import_react64.useState)(true);
21477
21504
  const [error, setError] = (0, import_react64.useState)(null);
@@ -21481,20 +21508,21 @@ function useSumsubIframe({ iframeUrl }) {
21481
21508
  (0, import_react64.useEffect)(() => {
21482
21509
  setError(null);
21483
21510
  setIsLoading(true);
21484
- setStatus("Preparing verification...");
21511
+ setStatus(t("passport:kycMenu.preparing"));
21485
21512
  const iframeOrigin = new URL(iframeUrl).origin;
21486
21513
  const manager = new SumsubIframeManager({
21487
21514
  options: {
21488
21515
  theme: colorMode === "dark" ? "dark" : "light",
21489
- customizationName: DEFAULT_THEME_NAME
21516
+ customizationName: DEFAULT_THEME_NAME,
21517
+ lang
21490
21518
  },
21491
21519
  iframeOrigin,
21492
21520
  getToken: () => {
21493
- setStatus("Authenticating...");
21521
+ setStatus(t("passport:kycMenu.authenticating"));
21494
21522
  return fetchToken({ levelName });
21495
21523
  },
21496
21524
  refreshToken: () => fetchToken({ levelName }),
21497
- onSdkBuilt: () => setStatus("Loading verification form..."),
21525
+ onSdkBuilt: () => setStatus(t("passport:kycMenu.loadingForm")),
21498
21526
  sendMessage: (msg) => iframeRef.current?.contentWindow?.postMessage(msg, iframeOrigin),
21499
21527
  onReady: () => {
21500
21528
  setIsLoading(false);
@@ -21510,13 +21538,14 @@ function useSumsubIframe({ iframeUrl }) {
21510
21538
  return () => {
21511
21539
  manager.destroy();
21512
21540
  };
21513
- }, [iframeUrl, levelName]);
21541
+ }, [iframeUrl, levelName, lang]);
21514
21542
  return {
21515
21543
  iframeRef,
21516
21544
  isLoading,
21517
21545
  error,
21518
21546
  height,
21519
- status
21547
+ status,
21548
+ lang
21520
21549
  };
21521
21550
  }
21522
21551
  var import_react64;
@@ -21524,6 +21553,7 @@ var init_useSumsubIframe = __esm({
21524
21553
  "src/internal/components/KYC/useSumsubIframe.ts"() {
21525
21554
  init_ProviderContext();
21526
21555
  init_useColorMode();
21556
+ init_i18n();
21527
21557
  import_react64 = require("react");
21528
21558
  init_sumsub();
21529
21559
  init_SumsubIframeManager();
@@ -21535,17 +21565,19 @@ var import_lucide_react48, import_jsx_runtime89, SumsubIframe;
21535
21565
  var init_SumsubIframe = __esm({
21536
21566
  "src/internal/components/KYC/SumsubIframe.tsx"() {
21537
21567
  init_ProviderContext();
21568
+ init_i18n();
21538
21569
  import_lucide_react48 = require("lucide-react");
21539
21570
  init_useSumsubIframe();
21540
21571
  import_jsx_runtime89 = require("react/jsx-runtime");
21541
21572
  SumsubIframe = () => {
21542
21573
  const config = useProviderConfig().config;
21574
+ const { t } = useT();
21543
21575
  const iframeUrl = `${config.current.services.iframeUrl}/kyc/sumsub.html`;
21544
- const { iframeRef, isLoading, error, height, status } = useSumsubIframe({ iframeUrl });
21576
+ const { iframeRef, isLoading, error, height, status, lang } = useSumsubIframe({ iframeUrl });
21545
21577
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
21546
21578
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "rounded-[10px] p-6 text-center", children: [
21547
21579
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react48.LoaderIcon, { className: "w-4 h-4 animate-spin mx-auto" }),
21548
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-sm text-[var(--ui-kit-text-secondary)] mt-2", children: status || "Loading KYC verification..." })
21580
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-sm text-[var(--ui-kit-text-secondary)] mt-2", children: status || t("passport:kycMenu.loading") })
21549
21581
  ] }),
21550
21582
  error && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "rounded-[10px] p-4 text-center bg-[var(--ui-kit-bg-error)] border border-[var(--ui-kit-error)]", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "text-sm text-[var(--ui-kit-error)]", children: error }) }),
21551
21583
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: " w-full h-full relative", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
@@ -21558,7 +21590,8 @@ var init_SumsubIframe = __esm({
21558
21590
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups",
21559
21591
  allow: "camera; microphone; geolocation; clipboard-write",
21560
21592
  style: { height: isLoading || error ? 0 : height }
21561
- }
21593
+ },
21594
+ lang
21562
21595
  ) })
21563
21596
  ] });
21564
21597
  };
@@ -21568,10 +21601,11 @@ var init_SumsubIframe = __esm({
21568
21601
  // src/internal/components/KYC/KycMenu.tsx
21569
21602
  function KycMenu() {
21570
21603
  const setPage = useLayoutDataStore((st) => st.setPage);
21604
+ const { t } = useT();
21571
21605
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
21572
21606
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
21573
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react49.ArrowLeft, { className: "h-4 w-4" }) }),
21574
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-xl font-semibold", children: "KYC" })
21607
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { variant: "ghost", size: "icon", title: t("passport:common.back"), onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react49.ArrowLeft, { className: "h-4 w-4" }) }),
21608
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-xl font-semibold", children: t("passport:kycMenu.title") })
21575
21609
  ] }),
21576
21610
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(KycContent, {})
21577
21611
  ] });
@@ -21580,6 +21614,7 @@ var import_lucide_react49, import_jsx_runtime90, KycContent;
21580
21614
  var init_KycMenu = __esm({
21581
21615
  "src/internal/components/KYC/KycMenu.tsx"() {
21582
21616
  init_ProviderContext();
21617
+ init_i18n();
21583
21618
  import_lucide_react49 = require("lucide-react");
21584
21619
  init_useLayoutDataStore();
21585
21620
  init_Expandable2();
@@ -21588,12 +21623,13 @@ var init_KycMenu = __esm({
21588
21623
  import_jsx_runtime90 = require("react/jsx-runtime");
21589
21624
  KycContent = () => {
21590
21625
  const config = useProviderConfig().config;
21626
+ const { t } = useT();
21591
21627
  const provider = config.current.kyc?.provider;
21592
21628
  switch (provider) {
21593
21629
  case "sumsub":
21594
21630
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(SumsubIframe, {});
21595
21631
  default:
21596
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "rounded-xl p-[var(--ui-kit-pd)] text-center bg-[var(--ui-kit-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-sm", children: provider ? `KYC provider "${provider}" coming soon\u2026` : "KYC verification coming soon\u2026" }) });
21632
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "rounded-xl p-[var(--ui-kit-pd)] text-center bg-[var(--ui-kit-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-sm", children: provider ? `${t("passport:kycMenu.providerComingSoon")}: ${provider}` : t("passport:kycMenu.comingSoon") }) });
21597
21633
  }
21598
21634
  };
21599
21635
  }
@@ -30207,7 +30243,7 @@ var init_package = __esm({
30207
30243
  "package.json"() {
30208
30244
  package_default = {
30209
30245
  name: "@embarkai/ui-kit",
30210
- version: "0.4.117",
30246
+ version: "0.4.119",
30211
30247
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
30212
30248
  type: "module",
30213
30249
  main: "./dist/index.cjs",
package/dist/index.d.cts CHANGED
@@ -2952,6 +2952,12 @@ declare const PASSPORT_TRANSLATIONS: {
2952
2952
  };
2953
2953
  kycMenu: {
2954
2954
  title: string;
2955
+ preparing: string;
2956
+ authenticating: string;
2957
+ loadingForm: string;
2958
+ loading: string;
2959
+ comingSoon: string;
2960
+ providerComingSoon: string;
2955
2961
  };
2956
2962
  nicknameMenu: {
2957
2963
  title: string;
@@ -3541,6 +3547,12 @@ declare const PASSPORT_TRANSLATIONS: {
3541
3547
  };
3542
3548
  kycMenu: {
3543
3549
  title: string;
3550
+ preparing: string;
3551
+ authenticating: string;
3552
+ loadingForm: string;
3553
+ loading: string;
3554
+ comingSoon: string;
3555
+ providerComingSoon: string;
3544
3556
  };
3545
3557
  nicknameMenu: {
3546
3558
  title: string;
@@ -4130,6 +4142,12 @@ declare const PASSPORT_TRANSLATIONS: {
4130
4142
  };
4131
4143
  kycMenu: {
4132
4144
  title: string;
4145
+ preparing: string;
4146
+ authenticating: string;
4147
+ loadingForm: string;
4148
+ loading: string;
4149
+ comingSoon: string;
4150
+ providerComingSoon: string;
4133
4151
  };
4134
4152
  nicknameMenu: {
4135
4153
  title: string;
package/dist/index.d.ts CHANGED
@@ -2952,6 +2952,12 @@ declare const PASSPORT_TRANSLATIONS: {
2952
2952
  };
2953
2953
  kycMenu: {
2954
2954
  title: string;
2955
+ preparing: string;
2956
+ authenticating: string;
2957
+ loadingForm: string;
2958
+ loading: string;
2959
+ comingSoon: string;
2960
+ providerComingSoon: string;
2955
2961
  };
2956
2962
  nicknameMenu: {
2957
2963
  title: string;
@@ -3541,6 +3547,12 @@ declare const PASSPORT_TRANSLATIONS: {
3541
3547
  };
3542
3548
  kycMenu: {
3543
3549
  title: string;
3550
+ preparing: string;
3551
+ authenticating: string;
3552
+ loadingForm: string;
3553
+ loading: string;
3554
+ comingSoon: string;
3555
+ providerComingSoon: string;
3544
3556
  };
3545
3557
  nicknameMenu: {
3546
3558
  title: string;
@@ -4130,6 +4142,12 @@ declare const PASSPORT_TRANSLATIONS: {
4130
4142
  };
4131
4143
  kycMenu: {
4132
4144
  title: string;
4145
+ preparing: string;
4146
+ authenticating: string;
4147
+ loadingForm: string;
4148
+ loading: string;
4149
+ comingSoon: string;
4150
+ providerComingSoon: string;
4133
4151
  };
4134
4152
  nicknameMenu: {
4135
4153
  title: string;
package/dist/index.js CHANGED
@@ -7375,6 +7375,7 @@ var init_useExpandable = __esm({
7375
7375
  const resizeObs = new ResizeObserver(() => setExpandableHeight(minHeight, isExpanded));
7376
7376
  const domMutationObs = new MutationObserver(() => setExpandableHeight(minHeight, isExpanded));
7377
7377
  resizeObs.observe(expandableRef.current);
7378
+ resizeObs.observe(contentRef.current);
7378
7379
  domMutationObs.observe(expandableRef.current, { childList: true, subtree: true });
7379
7380
  return () => {
7380
7381
  resizeObs.disconnect();
@@ -7792,7 +7793,13 @@ var init_en = __esm({
7792
7793
  }
7793
7794
  },
7794
7795
  kycMenu: {
7795
- title: "KYC"
7796
+ title: "KYC",
7797
+ preparing: "Preparing verification...",
7798
+ authenticating: "Authenticating...",
7799
+ loadingForm: "Loading verification form...",
7800
+ loading: "Loading KYC verification...",
7801
+ comingSoon: "KYC verification coming soon\u2026",
7802
+ providerComingSoon: "KYC provider coming soon"
7796
7803
  },
7797
7804
  nicknameMenu: {
7798
7805
  title: "Nickname",
@@ -8386,7 +8393,13 @@ var init_ru = __esm({
8386
8393
  }
8387
8394
  },
8388
8395
  kycMenu: {
8389
- title: "KYC"
8396
+ title: "KYC",
8397
+ preparing: "\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043A\u0430 \u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8398
+ authenticating: "\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F...",
8399
+ loadingForm: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0444\u043E\u0440\u043C\u044B \u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8400
+ loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 KYC-\u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438...",
8401
+ comingSoon: "KYC-\u0432\u0435\u0440\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F\u2026",
8402
+ providerComingSoon: "KYC-\u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F"
8390
8403
  },
8391
8404
  nicknameMenu: {
8392
8405
  title: "\u041D\u0438\u043A\u043D\u0435\u0439\u043C",
@@ -8980,7 +8993,13 @@ var init_zh = __esm({
8980
8993
  }
8981
8994
  },
8982
8995
  kycMenu: {
8983
- title: "KYC"
8996
+ title: "KYC",
8997
+ preparing: "\u6B63\u5728\u51C6\u5907\u9A8C\u8BC1...",
8998
+ authenticating: "\u6B63\u5728\u8BA4\u8BC1...",
8999
+ loadingForm: "\u6B63\u5728\u52A0\u8F7D\u9A8C\u8BC1\u8868\u5355...",
9000
+ loading: "\u6B63\u5728\u52A0\u8F7D KYC \u9A8C\u8BC1...",
9001
+ comingSoon: "KYC \u9A8C\u8BC1\u5373\u5C06\u63A8\u51FA\u2026",
9002
+ providerComingSoon: "KYC \u63D0\u4F9B\u5546\u5373\u5C06\u63A8\u51FA"
8984
9003
  },
8985
9004
  nicknameMenu: {
8986
9005
  title: "\u6635\u79F0",
@@ -21346,10 +21365,15 @@ var init_sumsub = __esm({
21346
21365
  });
21347
21366
 
21348
21367
  // src/internal/components/KYC/SumsubIframeManager.ts
21349
- var DEFAULT_THEME_NAME, SumsubIframeManager;
21368
+ function toSumsubLang(lang) {
21369
+ if (!lang) return "en";
21370
+ return SUMSUB_LANG_OVERRIDES[lang] ?? lang;
21371
+ }
21372
+ var DEFAULT_THEME_NAME, SUMSUB_LANG_OVERRIDES, SumsubIframeManager;
21350
21373
  var init_SumsubIframeManager = __esm({
21351
21374
  "src/internal/components/KYC/SumsubIframeManager.ts"() {
21352
- DEFAULT_THEME_NAME = "Lumia Hub KYC Preset V2";
21375
+ DEFAULT_THEME_NAME = "embarkAI Preset v1";
21376
+ SUMSUB_LANG_OVERRIDES = { tl: "fl" };
21353
21377
  SumsubIframeManager = class {
21354
21378
  config;
21355
21379
  boundMessageHandler;
@@ -21374,7 +21398,8 @@ var init_SumsubIframeManager = __esm({
21374
21398
  data: {
21375
21399
  accessToken: token,
21376
21400
  theme: this.config.options.theme,
21377
- customizationName: this.config.options.customizationName
21401
+ customizationName: this.config.options.customizationName,
21402
+ lang: this.config.options.lang
21378
21403
  }
21379
21404
  });
21380
21405
  } catch (err) {
@@ -21419,6 +21444,8 @@ import { useEffect as useEffect35, useRef as useRef16, useState as useState21 }
21419
21444
  function useSumsubIframe({ iframeUrl }) {
21420
21445
  const config = useProviderConfig().config;
21421
21446
  const { colorMode } = useColorMode();
21447
+ const { t, i18n } = useT();
21448
+ const lang = toSumsubLang(i18n.resolvedLanguage);
21422
21449
  const iframeRef = useRef16(null);
21423
21450
  const [isLoading, setIsLoading] = useState21(true);
21424
21451
  const [error, setError] = useState21(null);
@@ -21428,20 +21455,21 @@ function useSumsubIframe({ iframeUrl }) {
21428
21455
  useEffect35(() => {
21429
21456
  setError(null);
21430
21457
  setIsLoading(true);
21431
- setStatus("Preparing verification...");
21458
+ setStatus(t("passport:kycMenu.preparing"));
21432
21459
  const iframeOrigin = new URL(iframeUrl).origin;
21433
21460
  const manager = new SumsubIframeManager({
21434
21461
  options: {
21435
21462
  theme: colorMode === "dark" ? "dark" : "light",
21436
- customizationName: DEFAULT_THEME_NAME
21463
+ customizationName: DEFAULT_THEME_NAME,
21464
+ lang
21437
21465
  },
21438
21466
  iframeOrigin,
21439
21467
  getToken: () => {
21440
- setStatus("Authenticating...");
21468
+ setStatus(t("passport:kycMenu.authenticating"));
21441
21469
  return fetchToken({ levelName });
21442
21470
  },
21443
21471
  refreshToken: () => fetchToken({ levelName }),
21444
- onSdkBuilt: () => setStatus("Loading verification form..."),
21472
+ onSdkBuilt: () => setStatus(t("passport:kycMenu.loadingForm")),
21445
21473
  sendMessage: (msg) => iframeRef.current?.contentWindow?.postMessage(msg, iframeOrigin),
21446
21474
  onReady: () => {
21447
21475
  setIsLoading(false);
@@ -21457,19 +21485,21 @@ function useSumsubIframe({ iframeUrl }) {
21457
21485
  return () => {
21458
21486
  manager.destroy();
21459
21487
  };
21460
- }, [iframeUrl, levelName]);
21488
+ }, [iframeUrl, levelName, lang]);
21461
21489
  return {
21462
21490
  iframeRef,
21463
21491
  isLoading,
21464
21492
  error,
21465
21493
  height,
21466
- status
21494
+ status,
21495
+ lang
21467
21496
  };
21468
21497
  }
21469
21498
  var init_useSumsubIframe = __esm({
21470
21499
  "src/internal/components/KYC/useSumsubIframe.ts"() {
21471
21500
  init_ProviderContext();
21472
21501
  init_useColorMode();
21502
+ init_i18n();
21473
21503
  init_sumsub();
21474
21504
  init_SumsubIframeManager();
21475
21505
  }
@@ -21482,15 +21512,17 @@ var SumsubIframe;
21482
21512
  var init_SumsubIframe = __esm({
21483
21513
  "src/internal/components/KYC/SumsubIframe.tsx"() {
21484
21514
  init_ProviderContext();
21515
+ init_i18n();
21485
21516
  init_useSumsubIframe();
21486
21517
  SumsubIframe = () => {
21487
21518
  const config = useProviderConfig().config;
21519
+ const { t } = useT();
21488
21520
  const iframeUrl = `${config.current.services.iframeUrl}/kyc/sumsub.html`;
21489
- const { iframeRef, isLoading, error, height, status } = useSumsubIframe({ iframeUrl });
21521
+ const { iframeRef, isLoading, error, height, status, lang } = useSumsubIframe({ iframeUrl });
21490
21522
  return /* @__PURE__ */ jsxs80(Fragment31, { children: [
21491
21523
  isLoading && /* @__PURE__ */ jsxs80("div", { className: "rounded-[10px] p-6 text-center", children: [
21492
21524
  /* @__PURE__ */ jsx89(LoaderIcon10, { className: "w-4 h-4 animate-spin mx-auto" }),
21493
- /* @__PURE__ */ jsx89("p", { className: "text-sm text-[var(--ui-kit-text-secondary)] mt-2", children: status || "Loading KYC verification..." })
21525
+ /* @__PURE__ */ jsx89("p", { className: "text-sm text-[var(--ui-kit-text-secondary)] mt-2", children: status || t("passport:kycMenu.loading") })
21494
21526
  ] }),
21495
21527
  error && /* @__PURE__ */ jsx89("div", { className: "rounded-[10px] p-4 text-center bg-[var(--ui-kit-bg-error)] border border-[var(--ui-kit-error)]", children: /* @__PURE__ */ jsx89("div", { className: "text-sm text-[var(--ui-kit-error)]", children: error }) }),
21496
21528
  /* @__PURE__ */ jsx89("div", { className: " w-full h-full relative", children: /* @__PURE__ */ jsx89(
@@ -21503,7 +21535,8 @@ var init_SumsubIframe = __esm({
21503
21535
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups",
21504
21536
  allow: "camera; microphone; geolocation; clipboard-write",
21505
21537
  style: { height: isLoading || error ? 0 : height }
21506
- }
21538
+ },
21539
+ lang
21507
21540
  ) })
21508
21541
  ] });
21509
21542
  };
@@ -21515,10 +21548,11 @@ import { ArrowLeft as ArrowLeft15 } from "lucide-react";
21515
21548
  import { jsx as jsx90, jsxs as jsxs81 } from "react/jsx-runtime";
21516
21549
  function KycMenu() {
21517
21550
  const setPage = useLayoutDataStore((st) => st.setPage);
21551
+ const { t } = useT();
21518
21552
  return /* @__PURE__ */ jsxs81(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
21519
21553
  /* @__PURE__ */ jsxs81("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
21520
- /* @__PURE__ */ jsx90(Button, { variant: "ghost", size: "icon", title: "Back", onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ jsx90(ArrowLeft15, { className: "h-4 w-4" }) }),
21521
- /* @__PURE__ */ jsx90("span", { className: "text-xl font-semibold", children: "KYC" })
21554
+ /* @__PURE__ */ jsx90(Button, { variant: "ghost", size: "icon", title: t("passport:common.back"), onClick: () => setPage("settings" /* SETTINGS */), children: /* @__PURE__ */ jsx90(ArrowLeft15, { className: "h-4 w-4" }) }),
21555
+ /* @__PURE__ */ jsx90("span", { className: "text-xl font-semibold", children: t("passport:kycMenu.title") })
21522
21556
  ] }),
21523
21557
  /* @__PURE__ */ jsx90(KycContent, {})
21524
21558
  ] });
@@ -21527,18 +21561,20 @@ var KycContent;
21527
21561
  var init_KycMenu = __esm({
21528
21562
  "src/internal/components/KYC/KycMenu.tsx"() {
21529
21563
  init_ProviderContext();
21564
+ init_i18n();
21530
21565
  init_useLayoutDataStore();
21531
21566
  init_Expandable2();
21532
21567
  init_button();
21533
21568
  init_SumsubIframe();
21534
21569
  KycContent = () => {
21535
21570
  const config = useProviderConfig().config;
21571
+ const { t } = useT();
21536
21572
  const provider = config.current.kyc?.provider;
21537
21573
  switch (provider) {
21538
21574
  case "sumsub":
21539
21575
  return /* @__PURE__ */ jsx90(SumsubIframe, {});
21540
21576
  default:
21541
- return /* @__PURE__ */ jsx90("div", { className: "rounded-xl p-[var(--ui-kit-pd)] text-center bg-[var(--ui-kit-secondary)]", children: /* @__PURE__ */ jsx90("div", { className: "text-sm", children: provider ? `KYC provider "${provider}" coming soon\u2026` : "KYC verification coming soon\u2026" }) });
21577
+ return /* @__PURE__ */ jsx90("div", { className: "rounded-xl p-[var(--ui-kit-pd)] text-center bg-[var(--ui-kit-secondary)]", children: /* @__PURE__ */ jsx90("div", { className: "text-sm", children: provider ? `${t("passport:kycMenu.providerComingSoon")}: ${provider}` : t("passport:kycMenu.comingSoon") }) });
21542
21578
  }
21543
21579
  };
21544
21580
  }
@@ -30112,7 +30148,7 @@ var init_package = __esm({
30112
30148
  "package.json"() {
30113
30149
  package_default = {
30114
30150
  name: "@embarkai/ui-kit",
30115
- version: "0.4.117",
30151
+ version: "0.4.119",
30116
30152
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
30117
30153
  type: "module",
30118
30154
  main: "./dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embarkai/ui-kit",
3
- "version": "0.4.117",
3
+ "version": "0.4.119",
4
4
  "description": "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",