@loafmarkets/ui 0.1.350 → 0.1.351

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
@@ -6678,7 +6678,11 @@ var LoginPopup = ({
6678
6678
  try {
6679
6679
  await onVerifyEmailCode({ code, email });
6680
6680
  if (isSignUp) {
6681
- setView(onSubmitReferralCode ? "referral" : "funding");
6681
+ if (onSubmitReferralCode) {
6682
+ setView("referral");
6683
+ } else {
6684
+ onClose();
6685
+ }
6682
6686
  setLoading(false);
6683
6687
  return;
6684
6688
  }
@@ -6891,7 +6895,8 @@ var LoginPopup = ({
6891
6895
  loading ? /* @__PURE__ */ jsxs(AccountCreationLoader, { children: [
6892
6896
  /* @__PURE__ */ jsx(SpinnerRing, {}),
6893
6897
  /* @__PURE__ */ jsx(AccountCreationText, { children: isSignUp ? "Preparing your account\u2026" : "Signing you in\u2026" }),
6894
- /* @__PURE__ */ jsx(AccountCreationSubtext, { children: "This may take a few seconds" })
6898
+ /* @__PURE__ */ jsx(AccountCreationSubtext, { children: "This may take a few seconds" }),
6899
+ /* @__PURE__ */ jsx(PreparingFacts, {})
6895
6900
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6896
6901
  /* @__PURE__ */ jsxs(BackButton, { onClick: () => setView("email"), children: [
6897
6902
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
@@ -7094,7 +7099,7 @@ var LoginPopup = ({
7094
7099
  setReferralLoading(true);
7095
7100
  try {
7096
7101
  await onSubmitReferralCode?.(trimmed);
7097
- setView("funding");
7102
+ onClose();
7098
7103
  } catch (err) {
7099
7104
  setReferralError(err instanceof Error ? err.message : "Invalid referral code. Please try again.");
7100
7105
  } finally {
@@ -7121,7 +7126,7 @@ var LoginPopup = ({
7121
7126
  /* @__PURE__ */ jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
7122
7127
  ] }) }),
7123
7128
  /* @__PURE__ */ jsx(OnboardingHeading, { children: "Do you have a referral code?" }),
7124
- /* @__PURE__ */ jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter your code to unlock full access, or skip to continue." }),
7129
+ /* @__PURE__ */ jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter your code to unlock $100k in testnet USD, or skip to continue." }),
7125
7130
  /* @__PURE__ */ jsxs(EmailFormContainer, { style: { width: "100%", marginBottom: 0 }, children: [
7126
7131
  /* @__PURE__ */ jsx(
7127
7132
  EmailInput,
@@ -7154,7 +7159,7 @@ var LoginPopup = ({
7154
7159
  OnboardingSkipButton,
7155
7160
  {
7156
7161
  type: "button",
7157
- onClick: () => setView("funding"),
7162
+ onClick: onClose,
7158
7163
  style: { marginTop: "0.75rem" },
7159
7164
  children: "Skip for now"
7160
7165
  }
@@ -7996,6 +8001,59 @@ var SpinnerRing = styled9.div`
7996
8001
  to { transform: rotate(360deg); }
7997
8002
  }
7998
8003
  `;
8004
+ var PREPARING_FACTS = [
8005
+ "Property is the world's largest asset class \u2014 worth over US$300 trillion.",
8006
+ "Loaf settles trades in about 1 second. Traditional property takes ~90 days.",
8007
+ "Our matching engine processes orders in 30 microseconds.",
8008
+ "Every token is backed 1:1 by land-title-registered property.",
8009
+ "Own a slice of premium real estate \u2014 no mortgage, no paperwork.",
8010
+ "Buy and sell property as easily as a stock, on a live orderbook.",
8011
+ "Earn rental yield on the exact fraction of property you own.",
8012
+ "Title-backed by the NSW Land Registry \u2014 real ownership, on-chain.",
8013
+ "Loaf ran the world's first property IPO."
8014
+ ];
8015
+ var FactCard = styled9.div`
8016
+ margin-top: 1.5rem;
8017
+ max-width: 340px;
8018
+ padding: 0.85rem 1.1rem;
8019
+ border: 1px solid rgba(230, 198, 86, 0.18);
8020
+ border-radius: 12px;
8021
+ background: rgba(230, 198, 86, 0.05);
8022
+ text-align: center;
8023
+ `;
8024
+ var FactLabel = styled9.div`
8025
+ font-size: 0.6rem;
8026
+ letter-spacing: 0.12em;
8027
+ text-transform: uppercase;
8028
+ font-weight: 700;
8029
+ color: var(--color-accent, #e6c656);
8030
+ margin-bottom: 0.4rem;
8031
+ `;
8032
+ var FactText = styled9.p`
8033
+ margin: 0;
8034
+ font-size: 0.85rem;
8035
+ line-height: 1.5;
8036
+ color: var(--color-text, #eaecef);
8037
+ animation: factFade 0.5s ease;
8038
+
8039
+ @keyframes factFade {
8040
+ from { opacity: 0; transform: translateY(4px); }
8041
+ to { opacity: 1; transform: translateY(0); }
8042
+ }
8043
+ `;
8044
+ var PreparingFacts = () => {
8045
+ const [index, setIndex] = useState(() => Math.floor(Math.random() * PREPARING_FACTS.length));
8046
+ useEffect(() => {
8047
+ const id = setInterval(() => {
8048
+ setIndex((i) => (i + 1) % PREPARING_FACTS.length);
8049
+ }, 4e3);
8050
+ return () => clearInterval(id);
8051
+ }, []);
8052
+ return /* @__PURE__ */ jsxs(FactCard, { children: [
8053
+ /* @__PURE__ */ jsx(FactLabel, { children: "Did you know?" }),
8054
+ /* @__PURE__ */ jsx(FactText, { children: PREPARING_FACTS[index] }, index)
8055
+ ] });
8056
+ };
7999
8057
  LoginPopup.displayName = "LoginPopup";
8000
8058
  var PropertyCompareBar = React5.forwardRef(
8001
8059
  ({
@@ -18073,13 +18131,16 @@ function ToastItem({ toast, onDismiss }) {
18073
18131
  ] });
18074
18132
  }
18075
18133
  var ToastContext = createContext(null);
18076
- function ToastProvider({ children }) {
18134
+ function ToastProvider({ children, maxVisible }) {
18077
18135
  const [toasts, setToasts] = useState([]);
18078
18136
  const addToast = useCallback((data) => {
18079
18137
  const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
18080
- setToasts((prev) => [...prev, { ...data, id }]);
18138
+ setToasts((prev) => {
18139
+ const next = [...prev, { ...data, id }];
18140
+ return maxVisible && next.length > maxVisible ? next.slice(next.length - maxVisible) : next;
18141
+ });
18081
18142
  return id;
18082
- }, []);
18143
+ }, [maxVisible]);
18083
18144
  const update = useCallback((id, patch) => {
18084
18145
  setToasts((prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t));
18085
18146
  }, []);