@loafmarkets/ui 0.1.349 → 0.1.350

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.
package/dist/index.mjs CHANGED
@@ -6419,6 +6419,7 @@ var LoginPopup = ({
6419
6419
  onClose,
6420
6420
  onOpenEarlyAccess,
6421
6421
  onWalletLogin,
6422
+ onPasskeyLogin,
6422
6423
  isAuthenticated,
6423
6424
  currentUser,
6424
6425
  onSendEmailCode,
@@ -6529,6 +6530,20 @@ var LoginPopup = ({
6529
6530
  onOpenEarlyAccess();
6530
6531
  }
6531
6532
  };
6533
+ const handlePasskeyLogin = async () => {
6534
+ if (!onPasskeyLogin) return;
6535
+ setError("");
6536
+ setLoading(true);
6537
+ try {
6538
+ await onPasskeyLogin();
6539
+ onClose();
6540
+ } catch (err) {
6541
+ const message = err instanceof Error ? err.message : "Passkey sign-in failed";
6542
+ setError(message);
6543
+ } finally {
6544
+ setLoading(false);
6545
+ }
6546
+ };
6532
6547
  const handleEmailClick = (signUp = false) => {
6533
6548
  setIsSignUp(signUp);
6534
6549
  setView("email");
@@ -6786,6 +6801,10 @@ var LoginPopup = ({
6786
6801
  /* @__PURE__ */ jsxs(LoginButton, { onClick: handleWalletLogin, children: [
6787
6802
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
6788
6803
  "Sign in with Wallet"
6804
+ ] }),
6805
+ onPasskeyLogin && /* @__PURE__ */ jsxs(LoginButton, { onClick: handlePasskeyLogin, disabled: loading, children: [
6806
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 2C9.79 2 8 3.79 8 6v4H6c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2h-2V6c0-2.21-1.79-4-4-4zm-2 4c0-1.1.9-2 2-2s2 .9 2 2v4h-4V6zm2 9a2 2 0 100 4 2 2 0 000-4z" }) }),
6807
+ "Sign in with Passkey"
6789
6808
  ] })
6790
6809
  ] }),
6791
6810
  /* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginTop: "0.5rem", marginBottom: "1rem" }, children: /* @__PURE__ */ jsx(