@loafmarkets/ui 0.1.422 → 0.1.423

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.d.mts CHANGED
@@ -743,6 +743,12 @@ type LoginPopupProps = {
743
743
  * gate advances straight to sign-in.
744
744
  */
745
745
  initialCode?: string;
746
+ /**
747
+ * Seeds the "Claim your handle" input (e.g. from a linked X username). Fills
748
+ * only an untouched field — never clobbers typed text. Caller sanitizes;
749
+ * this component seeds verbatim.
750
+ */
751
+ defaultHandle?: string | null;
746
752
  /** Wallet address used for the receive funds view (bypasses Privy modal). */
747
753
  walletAddress?: string | null;
748
754
  /** Called when the user submits a referral code during onboarding. */
package/dist/index.d.ts CHANGED
@@ -743,6 +743,12 @@ type LoginPopupProps = {
743
743
  * gate advances straight to sign-in.
744
744
  */
745
745
  initialCode?: string;
746
+ /**
747
+ * Seeds the "Claim your handle" input (e.g. from a linked X username). Fills
748
+ * only an untouched field — never clobbers typed text. Caller sanitizes;
749
+ * this component seeds verbatim.
750
+ */
751
+ defaultHandle?: string | null;
746
752
  /** Wallet address used for the receive funds view (bypasses Privy modal). */
747
753
  walletAddress?: string | null;
748
754
  /** Called when the user submits a referral code during onboarding. */
package/dist/index.js CHANGED
@@ -7669,6 +7669,7 @@ var LoginPopup = ({
7669
7669
  onFundWallet,
7670
7670
  initialView,
7671
7671
  initialCode,
7672
+ defaultHandle,
7672
7673
  kycStatus: kycStatusProp,
7673
7674
  walletAddress,
7674
7675
  onSubmitReferralCode,
@@ -7679,6 +7680,12 @@ var LoginPopup = ({
7679
7680
  const [view, setView] = React9.useState(() => initialView ?? "main");
7680
7681
  const [email, setEmail] = React9.useState("");
7681
7682
  const [handle, setHandle] = React9.useState("");
7683
+ const seededDefaultHandleRef = React9__namespace.default.useRef(null);
7684
+ React9.useEffect(() => {
7685
+ if (!defaultHandle || seededDefaultHandleRef.current === defaultHandle) return;
7686
+ seededDefaultHandleRef.current = defaultHandle;
7687
+ setHandle((current) => current ? current : defaultHandle);
7688
+ }, [defaultHandle]);
7682
7689
  const [otp, setOtp] = React9.useState(Array(OTP_INPUT_LENGTH).fill(""));
7683
7690
  const [error, setError] = React9.useState("");
7684
7691
  const [copied, setCopied] = React9.useState(false);