@lumiapassport/ui-kit 1.16.6 → 1.16.8

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>Lumia Passport Secure Wallet - iframe version 1.16.6</title>
18
+ <title>Lumia Passport Secure Wallet - iframe version 1.16.8</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -4411,7 +4411,7 @@ var SigningManager = class extends TokenRefreshApiClient {
4411
4411
  };
4412
4412
 
4413
4413
  // src/iframe/main.ts
4414
- var IFRAME_VERSION = "1.16.6";
4414
+ var IFRAME_VERSION = "1.16.8";
4415
4415
  var IframeWallet = class {
4416
4416
  constructor() {
4417
4417
  console.log("=".repeat(60));
package/dist/index.cjs CHANGED
@@ -3536,10 +3536,38 @@ var init_iframe_manager = __esm({
3536
3536
  if (projectId) {
3537
3537
  verifyUrl.searchParams.set("projectId", projectId);
3538
3538
  }
3539
- const response = await fetch(verifyUrl.toString(), {
3539
+ const { jwtTokenManager: jwtTokenManager4, ensureValidToken: ensureValidToken2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
3540
+ const hasValidToken = await ensureValidToken2();
3541
+ const headers = {
3542
+ "Content-Type": "application/json"
3543
+ };
3544
+ if (hasValidToken) {
3545
+ const accessToken = jwtTokenManager4.getAccessToken();
3546
+ if (accessToken) {
3547
+ headers["Authorization"] = `Bearer ${accessToken}`;
3548
+ }
3549
+ }
3550
+ let response = await fetch(verifyUrl.toString(), {
3540
3551
  method: "GET",
3552
+ headers,
3541
3553
  credentials: "include"
3542
3554
  });
3555
+ if (response.status === 401) {
3556
+ this.log("[IframeManager] X auth verify got 401, attempting token refresh...");
3557
+ const refreshSuccess = await jwtTokenManager4.refreshAccessToken();
3558
+ if (refreshSuccess) {
3559
+ const newAccessToken = jwtTokenManager4.getAccessToken();
3560
+ if (newAccessToken) {
3561
+ headers["Authorization"] = `Bearer ${newAccessToken}`;
3562
+ this.log("[IframeManager] Token refreshed, retrying verify...");
3563
+ response = await fetch(verifyUrl.toString(), {
3564
+ method: "GET",
3565
+ headers,
3566
+ credentials: "include"
3567
+ });
3568
+ }
3569
+ }
3570
+ }
3543
3571
  if (!response.ok) {
3544
3572
  this.log("[IframeManager] X auth fallback verify returned status:", response.status);
3545
3573
  this.recordProviderSession("x", null);
@@ -3832,24 +3860,24 @@ var init_useLayoutDataStore = __esm({
3832
3860
  "src/internal/hooks/useLayoutDataStore.ts"() {
3833
3861
  import_zustand = require("zustand");
3834
3862
  init_constants();
3835
- PageKey = /* @__PURE__ */ ((PageKey3) => {
3836
- PageKey3["AUTH"] = "auth";
3837
- PageKey3["TERMS_OF_SERVICE"] = "terms-of-service";
3838
- PageKey3["MAIN_MENU"] = "main-menu";
3839
- PageKey3["SETTINGS"] = "settings";
3840
- PageKey3["SEND"] = "send";
3841
- PageKey3["RECEIVE"] = "receive";
3842
- PageKey3["BUY"] = "buy";
3843
- PageKey3["KYC"] = "kyc";
3844
- PageKey3["TRANSACTIONS"] = "transactions";
3845
- PageKey3["ASSETS"] = "assets";
3846
- PageKey3["MANAGE_WALLET"] = "manage-wallet";
3847
- PageKey3["UNLINK_PROVIDER"] = "unlink-provider";
3848
- PageKey3["SECURITY"] = "security";
3849
- PageKey3["KEYSARE_BACKUP"] = "keysare-backup";
3850
- PageKey3["KEYSHARE_RESTORE"] = "keyshare-restore";
3851
- PageKey3["NICKNAME_SETTINGS"] = "nickname-settings";
3852
- return PageKey3;
3863
+ PageKey = /* @__PURE__ */ ((PageKey4) => {
3864
+ PageKey4["AUTH"] = "auth";
3865
+ PageKey4["TERMS_OF_SERVICE"] = "terms-of-service";
3866
+ PageKey4["MAIN_MENU"] = "main-menu";
3867
+ PageKey4["SETTINGS"] = "settings";
3868
+ PageKey4["SEND"] = "send";
3869
+ PageKey4["RECEIVE"] = "receive";
3870
+ PageKey4["BUY"] = "buy";
3871
+ PageKey4["KYC"] = "kyc";
3872
+ PageKey4["TRANSACTIONS"] = "transactions";
3873
+ PageKey4["ASSETS"] = "assets";
3874
+ PageKey4["MANAGE_WALLET"] = "manage-wallet";
3875
+ PageKey4["UNLINK_PROVIDER"] = "unlink-provider";
3876
+ PageKey4["SECURITY"] = "security";
3877
+ PageKey4["KEYSARE_BACKUP"] = "keysare-backup";
3878
+ PageKey4["KEYSHARE_RESTORE"] = "keyshare-restore";
3879
+ PageKey4["NICKNAME_SETTINGS"] = "nickname-settings";
3880
+ return PageKey4;
3853
3881
  })(PageKey || {});
3854
3882
  useLayoutDataStore = (0, import_zustand.create)((set) => ({
3855
3883
  page: null,
@@ -5799,7 +5827,7 @@ var init_package = __esm({
5799
5827
  "package.json"() {
5800
5828
  package_default = {
5801
5829
  name: "@lumiapassport/ui-kit",
5802
- version: "1.16.6",
5830
+ version: "1.16.8",
5803
5831
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
5804
5832
  type: "module",
5805
5833
  main: "./dist/index.cjs",
@@ -6474,13 +6502,12 @@ var init_useAuthStore = __esm({
6474
6502
  // src/internal/components/AuthMenu/AuthFailedStep.tsx
6475
6503
  function AuthFailedStep() {
6476
6504
  const setIsLoading = useLumiaPassportSession((st) => st.setIsLoading);
6477
- const { alert: alert2, failedType, setStep, setFailedType, setAlert } = useAuthStore();
6505
+ const { failedType, setStep, setFailedType, setAlert } = useAuthStore();
6478
6506
  const isCritical = failedType === "critical" || failedType === "config";
6479
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w-full p-[var(--l-pass-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col text-center gap-[var(--l-pass-gap)]", children: [
6507
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
6480
6508
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Highlight, { type: isCritical ? "error" : "warning", className: "flex flex-col gap-[var(--l-pass-gap)]", children: [
6481
6509
  isCritical ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.AlertTriangle, { className: "w-4 h-4 text-[var(--l-pass-error)]" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.Info, { className: "w-4 h-4 text-[var(--l-pass-warning)]" }),
6482
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-center block flex-1 text-lg font-semibold", children: failedType === "config" ? "Configuration Error" : failedType === "critical" ? "Critical Error" : alert2.title || "Failed" }),
6483
- alert2?.message && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-center block", children: alert2.message })
6510
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-center block flex-1 text-lg font-semibold", children: failedType === "config" ? "Configuration Error" : failedType === "critical" ? "Critical Error" : "Failed" })
6484
6511
  ] }),
6485
6512
  failedType === "config" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "p-2 rounded-[var(--l-pass-el-bdrs)] bg-[var(--l-pass-bg-info)]", children: [
6486
6513
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-sm font-medium text-[var(--l-pass-info)] mb-2", children: "To fix this issue:" }),
@@ -6513,14 +6540,13 @@ function AuthFailedStep() {
6513
6540
  children: "Back to Sign In"
6514
6541
  }
6515
6542
  )
6516
- ] }) });
6543
+ ] });
6517
6544
  }
6518
6545
  var import_lucide_react9, import_jsx_runtime17;
6519
6546
  var init_AuthFailedStep = __esm({
6520
6547
  "src/internal/components/AuthMenu/AuthFailedStep.tsx"() {
6521
6548
  import_lucide_react9 = require("lucide-react");
6522
6549
  init_LumiaPassportSessionContext();
6523
- init_Expandable2();
6524
6550
  init_button();
6525
6551
  init_highlight();
6526
6552
  init_useAuthStore();
@@ -6531,12 +6557,12 @@ var init_AuthFailedStep = __esm({
6531
6557
  // src/internal/components/AuthMenu/LoadingStep.tsx
6532
6558
  function LoadingStep() {
6533
6559
  const passportStatus = useLumiaPassportSession((st) => st.status);
6534
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w-full p-[var(--l-pass-pd)] flex flex-col items-center gap-[var(--l-pass-gap)]", children: [
6560
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
6535
6561
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex w-full items-center gap-[var(--l-pass-gap)] justify-center px-4 py-3", children: [
6536
6562
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react10.Loader, { className: "w-6 h-6 animate-spin" }),
6537
6563
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-bold text-xl leading-6", children: "Account" })
6538
6564
  ] }),
6539
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-[var(--l-pass-fg-muted)] leading-4 block pb-2", children: (passportStatus !== "idle" ? passportStatus : "Securing...").toUpperCase() })
6565
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w-full text-center text-xs text-[var(--l-pass-fg-muted)] leading-4 block pb-2", children: (passportStatus !== "idle" ? passportStatus : "Securing...").toUpperCase() })
6540
6566
  ] });
6541
6567
  }
6542
6568
  var import_lucide_react10, import_jsx_runtime18;
@@ -6743,46 +6769,42 @@ function PassKeyStep(props) {
6743
6769
  setIsLoading(false);
6744
6770
  }
6745
6771
  }, [onAuthSuccess, setPage, callbacks]);
6746
- return (
6747
- /* --------------------------------------------------------------------------------------------------------------- */
6748
- /* -------- EXPANDABLE is designed to adjust its height automatically whenever ANY 1ST LEVEL CHILD changes! ------ */
6749
- /* In order to ensure smooth expand animation consistency do not use 2nd (or 3rd etc) nested conditional rendering */
6750
- /* elements, cause it might outcome Expandable not reacting to deeply nested elements' height changes ---------- */
6751
- /* --------------------------------------------------------------------------------------------------------------- */
6752
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full p-[var(--l-pass-pd)] flex flex-col gap-[var(--l-pass-gap)]", children: [
6753
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative flex items-center justify-center gap-2 px-5 pt-3 pb-6", children: [
6754
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Key, { className: "w-6 h-6" }),
6755
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-bold text-xl leading-6", children: "Passkey" }),
6756
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6757
- Button,
6758
- {
6759
- style: { opacity: 0.5, transform: "translate(-4px, -4px)" },
6760
- title: "Back to SignIn",
6761
- variant: "ghost",
6762
- size: "icon",
6763
- className: "absolute left-0 top-0 w-5 h-5",
6764
- onClick: () => setStep("signin"),
6765
- children: [
6766
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.ArrowLeft, { className: "h-4 w-4" }),
6767
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: "Back to SignIn" })
6768
- ]
6769
- }
6770
- )
6771
- ] }),
6772
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { variant: "default", size: "large", className: "w-full", onClick: onPasskeyAuth, disabled: isLoading, children: [
6773
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Key, { className: "w-4 h-4" }),
6774
- "Sign in with existing Passkey"
6775
- ] }),
6776
- config.passkey.showCreateButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6777
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "block w-full text-center text-sm text-[var(--l-pass-fg-muted)]", children: "Don't have a passkey?" }),
6778
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { variant: "outline", size: "large", className: "w-full", onClick: onPasskeyRegister, disabled: isLoading, children: [
6779
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PasskeyAddIcon, { className: "w-4 h-4" }),
6780
- "Create Passkey"
6781
- ] })
6782
- ] }),
6783
- passkeyStatus !== "idle" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w-full p-[var(--l-pass-pd)] rounded-[var(--l-pass-el-bdrs)] bg-[var(--l-pass-bg-success)]", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w-full block text-sm text-[var(--l-pass-success)] break-words whitespace-pre-wrap text-center", children: passkeyStatus }) })
6772
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6773
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative flex items-center justify-center gap-2 px-5 pt-3 pb-6", children: [
6774
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Key, { className: "w-6 h-6" }),
6775
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-bold text-xl leading-6", children: "Passkey" }),
6776
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6777
+ Button,
6778
+ {
6779
+ style: { opacity: 0.5, transform: "translate(-4px, -4px)" },
6780
+ title: "Back to SignIn",
6781
+ variant: "ghost",
6782
+ size: "icon",
6783
+ className: "absolute left-0 top-0 w-5 h-5",
6784
+ onClick: () => setStep("signin"),
6785
+ children: [
6786
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.ArrowLeft, { className: "h-4 w-4" }),
6787
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: "Back to SignIn" })
6788
+ ]
6789
+ }
6790
+ )
6791
+ ] }),
6792
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { variant: "default", size: "large", className: "w-full", onClick: onPasskeyAuth, disabled: isLoading, children: [
6793
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Key, { className: "w-4 h-4" }),
6794
+ "Sign in with existing Passkey"
6795
+ ] }),
6796
+ !!config.passkey?.showCreateButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6797
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "block w-full text-center text-sm text-[var(--l-pass-fg-muted)]", children: "Don't have a passkey?" }),
6798
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { variant: "outline", size: "large", className: "w-full", onClick: onPasskeyRegister, disabled: isLoading, children: [
6799
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PasskeyAddIcon, { className: "w-4 h-4" }),
6800
+ "Create Passkey"
6801
+ ] })
6802
+ ] }),
6803
+ passkeyStatus !== "idle" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Highlight, { className: "flex gap-[var(--l-pass-gap)]", children: [
6804
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.Key, { className: "w-4 h-4" }),
6805
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w-full block text-sm break-words whitespace-pre-wrap text-center", children: passkeyStatus })
6784
6806
  ] })
6785
- );
6807
+ ] });
6786
6808
  }
6787
6809
  var import_lucide_react11, import_react12, import_jsx_runtime20;
6788
6810
  var init_PassKeyStep = __esm({
@@ -6794,8 +6816,8 @@ var init_PassKeyStep = __esm({
6794
6816
  init_PasskeyAddIcon();
6795
6817
  init_auth();
6796
6818
  init_useLayoutDataStore();
6797
- init_Expandable2();
6798
6819
  init_button();
6820
+ init_highlight();
6799
6821
  init_useAuthStore();
6800
6822
  import_jsx_runtime20 = require("react/jsx-runtime");
6801
6823
  }
@@ -7157,7 +7179,7 @@ function Social(props) {
7157
7179
  return;
7158
7180
  }
7159
7181
  console.log("[AuthModal] onAuthSuccess completed successfully");
7160
- onAuthSuccess?.();
7182
+ await onAuthSuccess?.();
7161
7183
  setStep("signin");
7162
7184
  setEmail("");
7163
7185
  setAlert(null);
@@ -7480,14 +7502,13 @@ function SignInStep(props) {
7480
7502
  const { pendingLoginResponseRef, onAuthSuccess } = props;
7481
7503
  const config = useLumiaPassportConfig().config;
7482
7504
  const setPage = useLayoutDataStore((st) => st.setPage);
7483
- const alert2 = useAuthStore((st) => st.alert);
7484
7505
  const enabledSigninMethods = getSignInEnabledMethods(config);
7485
7506
  const signInRenderComponents = {
7486
7507
  email: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Email, {}),
7487
7508
  social: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Social, { pendingLoginResponseRef, onAuthSuccess }),
7488
7509
  wallet: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Wallet, {})
7489
7510
  };
7490
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full p-[var(--l-pass-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--l-pass-gap)]", children: [
7511
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
7491
7512
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-center gap-2 px-5 pt-3 pb-6", children: [
7492
7513
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.UserCircle, { className: "w-6 h-6" }),
7493
7514
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-bold text-xl leading-6", children: "Sign In" })
@@ -7512,15 +7533,8 @@ function SignInStep(props) {
7512
7533
  children: "Terms of Service"
7513
7534
  }
7514
7535
  )
7515
- ] }),
7516
- alert2 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Highlight, { type: "error", className: "w-full flex gap-[var(--l-pass-gap)] ", children: [
7517
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.AlertTriangle, { className: "w-5 h-5 text-[var(--l-pass-error)]" }),
7518
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "block w-full flex flex-col gap-1 flex-1", children: [
7519
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "block font-bold leading-5", children: alert2.title }),
7520
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "block whitespace-pre-line", children: alert2.message || "Unknown error" })
7521
- ] })
7522
7536
  ] })
7523
- ] }) });
7537
+ ] });
7524
7538
  }
7525
7539
  var import_lucide_react13, import_react16, import_jsx_runtime25;
7526
7540
  var init_SignInStep = __esm({
@@ -7529,10 +7543,7 @@ var init_SignInStep = __esm({
7529
7543
  import_lucide_react13 = require("lucide-react");
7530
7544
  import_react16 = require("react");
7531
7545
  init_useLayoutDataStore();
7532
- init_Expandable2();
7533
7546
  init_button();
7534
- init_highlight();
7535
- init_useAuthStore();
7536
7547
  init_Email();
7537
7548
  init_Social();
7538
7549
  init_utils3();
@@ -7761,7 +7772,6 @@ var init_VerificationCodeInput = __esm({
7761
7772
  "src/internal/components/AuthMenu/VerifyStep/VerificationCodeInput.tsx"() {
7762
7773
  import_react18 = require("react");
7763
7774
  init_utils();
7764
- init_Expandable2();
7765
7775
  init_button();
7766
7776
  init_useAuthStore();
7767
7777
  import_jsx_runtime27 = require("react/jsx-runtime");
@@ -7837,7 +7847,7 @@ var init_VerificationCodeInput = __esm({
7837
7847
  };
7838
7848
  const mm = Math.floor(timeLeft / 60).toString();
7839
7849
  const ss = (timeLeft % 60).toString().padStart(2, "0");
7840
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Expandable, { isExpanded: true, contentClassName: "flex flex-col items-center gap-2 text-center", children: [
7850
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
7841
7851
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-center gap-2", children: digits.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7842
7852
  "input",
7843
7853
  {
@@ -7866,13 +7876,13 @@ var init_VerificationCodeInput = __esm({
7866
7876
  },
7867
7877
  i
7868
7878
  )) }),
7869
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "text-xs", children: [
7879
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "w-full text-center block text-xs", children: [
7870
7880
  "Code expires in ",
7871
7881
  mm,
7872
7882
  ":",
7873
7883
  ss
7874
7884
  ] }),
7875
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full flex items-center justify-center gap-2", children: [
7885
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full flex items-center justify-center gap-[var(--l-pass-gap)]", children: [
7876
7886
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs text-[var(--l-pass-fg-muted)]", children: "Didn't receive code?" }),
7877
7887
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7878
7888
  Button,
@@ -7905,7 +7915,6 @@ function VerifyStep(props) {
7905
7915
  const {
7906
7916
  email,
7907
7917
  expiresIn,
7908
- alert: alert2,
7909
7918
  setFailedType,
7910
7919
  setStep,
7911
7920
  setEmail,
@@ -8018,7 +8027,7 @@ function VerifyStep(props) {
8018
8027
  }
8019
8028
  });
8020
8029
  const isLoading = isSessionLoading || isCodeVerifying || isCodeResending;
8021
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full p-[var(--l-pass-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--l-pass-gap)]", children: [
8030
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
8022
8031
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative flex items-center justify-center gap-2 px-5 pt-3 pb-6", children: [
8023
8032
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(OtpIcon, { className: "w-6 h-6" }),
8024
8033
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-bold text-xl leading-6", children: "Verification code" }),
@@ -8052,15 +8061,8 @@ function VerifyStep(props) {
8052
8061
  isLoading,
8053
8062
  expiresIn
8054
8063
  }
8055
- ),
8056
- alert2 && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Highlight, { type: "error", className: "w-full flex gap-[var(--l-pass-gap)] ", children: [
8057
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react14.AlertTriangle, { className: "w-5 h-5 text-[var(--l-pass-error)]" }),
8058
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "block w-full flex flex-col gap-1 flex-1", children: [
8059
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "block font-bold leading-5", children: alert2.title }),
8060
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "block whitespace-pre-line", children: alert2.message || "Unknown error" })
8061
- ] })
8062
- ] })
8063
- ] }) });
8064
+ )
8065
+ ] });
8064
8066
  }
8065
8067
  var import_react_query9, import_lucide_react14, import_jsx_runtime28;
8066
8068
  var init_VerifyStep = __esm({
@@ -8072,9 +8074,7 @@ var init_VerifyStep = __esm({
8072
8074
  import_lucide_react14 = require("lucide-react");
8073
8075
  init_OtpIcon();
8074
8076
  init_projectId();
8075
- init_Expandable2();
8076
8077
  init_button();
8077
- init_highlight();
8078
8078
  init_useAuthStore();
8079
8079
  init_VerificationCodeInput();
8080
8080
  import_jsx_runtime28 = require("react/jsx-runtime");
@@ -8089,15 +8089,17 @@ var init_VerifyStep2 = __esm({
8089
8089
  });
8090
8090
 
8091
8091
  // src/internal/components/AuthMenu/AuthMenu.tsx
8092
- var import_framer_motion, import_lucide_react15, import_react19, import_jsx_runtime29, AuthMenu;
8092
+ var import_lucide_react15, import_react19, import_jsx_runtime29, AuthMenu;
8093
8093
  var init_AuthMenu = __esm({
8094
8094
  "src/internal/components/AuthMenu/AuthMenu.tsx"() {
8095
8095
  init_LumiaPassportSessionContext();
8096
- import_framer_motion = require("framer-motion");
8097
8096
  import_lucide_react15 = require("lucide-react");
8098
8097
  import_react19 = require("react");
8099
8098
  init_constants();
8100
8099
  init_useLayoutDataStore();
8100
+ init_useLayoutStore();
8101
+ init_Expandable2();
8102
+ init_highlight();
8101
8103
  init_AuthFailedStep();
8102
8104
  init_LoadingStep();
8103
8105
  init_PassKeyStep();
@@ -8108,9 +8110,9 @@ var init_AuthMenu = __esm({
8108
8110
  import_jsx_runtime29 = require("react/jsx-runtime");
8109
8111
  AuthMenu = () => {
8110
8112
  const isIframeReady = useLumiaPassportSession((st) => st.isIframeReady);
8111
- const mainPageHeight = useLayoutDataStore((st) => st.mainPageHeight);
8113
+ const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
8112
8114
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
8113
- const { step, setStep, setPasskeyStatus, setEmail, setAlert } = useAuthStore();
8115
+ const { step, alert: alert2, setStep, setPasskeyStatus, setEmail, setAlert } = useAuthStore();
8114
8116
  const { pendingLoginResponseRef, onAuthSuccess, goBackToSignIn } = useAuthMenuHandlers();
8115
8117
  (0, import_react19.useEffect)(() => {
8116
8118
  setMainPageHeight(DEFAULT_AUTH_MENU_HEIGHT);
@@ -8144,18 +8146,26 @@ var init_AuthMenu = __esm({
8144
8146
  }),
8145
8147
  [onAuthSuccess, goBackToSignIn]
8146
8148
  );
8147
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8148
- import_framer_motion.motion.div,
8149
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8150
+ "div",
8149
8151
  {
8150
- initial: { opacity: 0, height: mainPageHeight },
8151
- animate: { opacity: 1, height: "auto" },
8152
- exit: { opacity: 0, height: mainPageHeight },
8153
- style: { overflow: "hidden" },
8154
- transition: Y_ANIMATION_SETUP,
8155
- children: stepContent[step]
8156
- },
8157
- step
8158
- ) }) });
8152
+ style: {
8153
+ "--l-pass-scrollbar-mah": `${maxScrollHeight}px`,
8154
+ "--l-pass-list-scrollbar-pd-r": "var(--l-pass-pd)"
8155
+ },
8156
+ className: "list-scrollbar-y w-full p-[var(--l-pass-pd)]",
8157
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--l-pass-gap)]", children: [
8158
+ stepContent[step],
8159
+ alert2 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Highlight, { type: "error", className: "w-full flex gap-[var(--l-pass-gap)] ", children: [
8160
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.AlertTriangle, { className: "w-5 h-5 text-[var(--l-pass-error)]" }),
8161
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "block w-full flex flex-col gap-1 flex-1", children: [
8162
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "block font-bold leading-5", children: alert2.title }),
8163
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "block whitespace-pre-line", children: alert2.message || "Unknown error" })
8164
+ ] })
8165
+ ] })
8166
+ ] })
8167
+ }
8168
+ );
8159
8169
  };
8160
8170
  }
8161
8171
  });
@@ -9148,7 +9158,7 @@ function useOnRestoreSuccess() {
9148
9158
  setSession(sess);
9149
9159
  setAddress(addr);
9150
9160
  setStatus("ready");
9151
- setPage("main-menu" /* MAIN_MENU */);
9161
+ setPage(null);
9152
9162
  setTimeout(() => {
9153
9163
  setIsDialogForced(false);
9154
9164
  }, 375);
@@ -9757,7 +9767,7 @@ function PasswordPasskey(props) {
9757
9767
  mode === "backup" && onCreatePasskey && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
9758
9768
  Button,
9759
9769
  {
9760
- size: "medium",
9770
+ size: "large",
9761
9771
  variant: "outline",
9762
9772
  onClick: onCreatePasskey,
9763
9773
  disabled: isLoading || disabled,
@@ -11136,8 +11146,8 @@ function EmailNotConnectedWarning() {
11136
11146
  config: { current: config }
11137
11147
  } = useLumiaPassportConfig();
11138
11148
  const isShown = config.warnings?.emailNotConnectedWarning && !hasEmail;
11139
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_framer_motion2.AnimatePresence, { mode: "wait", initial: false, children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11140
- import_framer_motion2.motion.div,
11149
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11150
+ import_framer_motion.motion.div,
11141
11151
  {
11142
11152
  initial: { opacity: 0, height: 0 },
11143
11153
  animate: { opacity: 1, height: "auto" },
@@ -11153,11 +11163,11 @@ function EmailNotConnectedWarning() {
11153
11163
  }
11154
11164
  ) : null });
11155
11165
  }
11156
- var import_framer_motion2, import_lucide_react30, import_jsx_runtime50;
11166
+ var import_framer_motion, import_lucide_react30, import_jsx_runtime50;
11157
11167
  var init_EmailNotConnectedWarning = __esm({
11158
11168
  "src/internal/components/ManageWalletMenu/EmailNotConnectedWarning.tsx"() {
11159
11169
  init_LumiaPassportContext();
11160
- import_framer_motion2 = require("framer-motion");
11170
+ import_framer_motion = require("framer-motion");
11161
11171
  import_lucide_react30 = require("lucide-react");
11162
11172
  init_auth();
11163
11173
  init_constants();
@@ -15020,6 +15030,13 @@ var init_api3 = __esm({
15020
15030
  });
15021
15031
 
15022
15032
  // src/internal/components/TransactionsMenu/utils.ts
15033
+ function formatIntl(price, fractionDigits) {
15034
+ const formatter = Intl.NumberFormat("en-US", {
15035
+ minimumFractionDigits: fractionDigits,
15036
+ maximumFractionDigits: fractionDigits
15037
+ });
15038
+ return formatter.format(price);
15039
+ }
15023
15040
  var formatAddress2, parseValue, formatValue2, openInExplorer2, formatTimestamp;
15024
15041
  var init_utils6 = __esm({
15025
15042
  "src/internal/components/TransactionsMenu/utils.ts"() {
@@ -15048,11 +15065,11 @@ var init_utils6 = __esm({
15048
15065
  const whole = amount / scale;
15049
15066
  const fraction = amount % scale;
15050
15067
  if (fraction === 0n) {
15051
- return whole.toString();
15068
+ return formatIntl(Number(whole), 0);
15052
15069
  }
15053
15070
  const fractionStr = fraction.toString().padStart(decimals, "0").replace(/0+$/, "");
15054
15071
  const trimmed = fractionStr.slice(0, Math.min(6, fractionStr.length));
15055
- return `${whole.toString()}.${trimmed}`;
15072
+ return `${formatIntl(Number(whole), 0)}.${trimmed}`;
15056
15073
  };
15057
15074
  openInExplorer2 = (txHash) => {
15058
15075
  if (!txHash) {
@@ -15596,8 +15613,8 @@ function LumiaPassportDialog() {
15596
15613
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DialogTitle, { children: dialogTitle }) }),
15597
15614
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DialogDescription, { className: "sr-only", children: dialogDescription }),
15598
15615
  !isHeaderHidden && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header, {}),
15599
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_framer_motion3.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15600
- import_framer_motion3.motion.div,
15616
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_framer_motion2.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15617
+ import_framer_motion2.motion.div,
15601
15618
  {
15602
15619
  initial: { opacity: 0, height: mainPageHeight },
15603
15620
  animate: { opacity: 1, height: "auto" },
@@ -15613,12 +15630,12 @@ function LumiaPassportDialog() {
15613
15630
  }
15614
15631
  );
15615
15632
  }
15616
- var import_framer_motion3, import_react57, import_jsx_runtime78;
15633
+ var import_framer_motion2, import_react57, import_jsx_runtime78;
15617
15634
  var init_LumiaPassportDialog = __esm({
15618
15635
  "src/internal/components/Dialog/LumiaPassportDialog.tsx"() {
15619
15636
  init_LumiaPassportContext();
15620
15637
  init_LumiaPassportSessionContext();
15621
- import_framer_motion3 = require("framer-motion");
15638
+ import_framer_motion2 = require("framer-motion");
15622
15639
  import_react57 = require("react");
15623
15640
  init_Footer2();
15624
15641
  init_Header2();