@loafmarkets/ui 0.1.326 → 0.1.327

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
@@ -943,6 +943,29 @@ type AssetSelectorBarProps = {
943
943
  };
944
944
  declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
945
945
 
946
+ type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
947
+ type ToastData = {
948
+ id: string;
949
+ variant: ToastVariant;
950
+ title: string;
951
+ /** Human-readable amount e.g. "20,000 USDC" */
952
+ amount?: string;
953
+ /** On-chain tx hash — shown truncated with a block explorer link */
954
+ txHash?: string;
955
+ /** Explorer base URL, defaults to Base Sepolia */
956
+ explorerUrl?: string;
957
+ /** Auto-dismiss after ms. 0 = never. Default 6000 */
958
+ duration?: number;
959
+ };
960
+ type ToastContextValue = {
961
+ toast: (data: Omit<ToastData, 'id'>) => string;
962
+ dismiss: (id: string) => void;
963
+ };
964
+ declare function ToastProvider({ children }: {
965
+ children: React__default.ReactNode;
966
+ }): react_jsx_runtime.JSX.Element;
967
+ declare function useToast(): ToastContextValue;
968
+
946
969
  type IpoStatus = 'PENDING' | 'LIVE' | 'CLOSED' | 'CANCELLED';
947
970
  type SaleData = {
948
971
  loading: boolean;
@@ -1013,8 +1036,9 @@ type PropertyBuyProps = {
1013
1036
  };
1014
1037
  newsItems?: PropertyNewsItem[];
1015
1038
  newsConnectionStatus?: 'live' | 'connecting';
1039
+ toast: ReturnType<typeof useToast>['toast'];
1016
1040
  };
1017
- declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
1041
+ declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, toast, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
1018
1042
 
1019
1043
  type OfferingProgressCardProps = {
1020
1044
  ipoStarted: boolean;
@@ -1125,29 +1149,6 @@ type PropertyPhotoGalleryProps = {
1125
1149
  };
1126
1150
  declare function PropertyPhotoGallery({ isOpen, onClose, startIndex, title, subtitle, images, }: PropertyPhotoGalleryProps): react_jsx_runtime.JSX.Element | null;
1127
1151
 
1128
- type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
1129
- type ToastData = {
1130
- id: string;
1131
- variant: ToastVariant;
1132
- title: string;
1133
- /** Human-readable amount e.g. "20,000 USDC" */
1134
- amount?: string;
1135
- /** On-chain tx hash — shown truncated with a block explorer link */
1136
- txHash?: string;
1137
- /** Explorer base URL, defaults to Base Sepolia */
1138
- explorerUrl?: string;
1139
- /** Auto-dismiss after ms. 0 = never. Default 6000 */
1140
- duration?: number;
1141
- };
1142
- type ToastContextValue = {
1143
- toast: (data: Omit<ToastData, 'id'>) => string;
1144
- dismiss: (id: string) => void;
1145
- };
1146
- declare function ToastProvider({ children }: {
1147
- children: React__default.ReactNode;
1148
- }): react_jsx_runtime.JSX.Element;
1149
- declare function useToast(): ToastContextValue;
1150
-
1151
1152
  type UseAdaptivePollingOptions = {
1152
1153
  enabled: boolean;
1153
1154
  onPoll: () => void | Promise<void>;
package/dist/index.d.ts CHANGED
@@ -943,6 +943,29 @@ type AssetSelectorBarProps = {
943
943
  };
944
944
  declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
945
945
 
946
+ type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
947
+ type ToastData = {
948
+ id: string;
949
+ variant: ToastVariant;
950
+ title: string;
951
+ /** Human-readable amount e.g. "20,000 USDC" */
952
+ amount?: string;
953
+ /** On-chain tx hash — shown truncated with a block explorer link */
954
+ txHash?: string;
955
+ /** Explorer base URL, defaults to Base Sepolia */
956
+ explorerUrl?: string;
957
+ /** Auto-dismiss after ms. 0 = never. Default 6000 */
958
+ duration?: number;
959
+ };
960
+ type ToastContextValue = {
961
+ toast: (data: Omit<ToastData, 'id'>) => string;
962
+ dismiss: (id: string) => void;
963
+ };
964
+ declare function ToastProvider({ children }: {
965
+ children: React__default.ReactNode;
966
+ }): react_jsx_runtime.JSX.Element;
967
+ declare function useToast(): ToastContextValue;
968
+
946
969
  type IpoStatus = 'PENDING' | 'LIVE' | 'CLOSED' | 'CANCELLED';
947
970
  type SaleData = {
948
971
  loading: boolean;
@@ -1013,8 +1036,9 @@ type PropertyBuyProps = {
1013
1036
  };
1014
1037
  newsItems?: PropertyNewsItem[];
1015
1038
  newsConnectionStatus?: 'live' | 'connecting';
1039
+ toast: ReturnType<typeof useToast>['toast'];
1016
1040
  };
1017
- declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
1041
+ declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, onVerifyIdentity, portfolioActivity, newsItems, newsConnectionStatus, toast, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
1018
1042
 
1019
1043
  type OfferingProgressCardProps = {
1020
1044
  ipoStarted: boolean;
@@ -1125,29 +1149,6 @@ type PropertyPhotoGalleryProps = {
1125
1149
  };
1126
1150
  declare function PropertyPhotoGallery({ isOpen, onClose, startIndex, title, subtitle, images, }: PropertyPhotoGalleryProps): react_jsx_runtime.JSX.Element | null;
1127
1151
 
1128
- type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
1129
- type ToastData = {
1130
- id: string;
1131
- variant: ToastVariant;
1132
- title: string;
1133
- /** Human-readable amount e.g. "20,000 USDC" */
1134
- amount?: string;
1135
- /** On-chain tx hash — shown truncated with a block explorer link */
1136
- txHash?: string;
1137
- /** Explorer base URL, defaults to Base Sepolia */
1138
- explorerUrl?: string;
1139
- /** Auto-dismiss after ms. 0 = never. Default 6000 */
1140
- duration?: number;
1141
- };
1142
- type ToastContextValue = {
1143
- toast: (data: Omit<ToastData, 'id'>) => string;
1144
- dismiss: (id: string) => void;
1145
- };
1146
- declare function ToastProvider({ children }: {
1147
- children: React__default.ReactNode;
1148
- }): react_jsx_runtime.JSX.Element;
1149
- declare function useToast(): ToastContextValue;
1150
-
1151
1152
  type UseAdaptivePollingOptions = {
1152
1153
  enabled: boolean;
1153
1154
  onPoll: () => void | Promise<void>;
package/dist/index.js CHANGED
@@ -11593,192 +11593,6 @@ var SignInButton = styled9__default.default.button`
11593
11593
  background: rgba(240, 185, 11, 0.1);
11594
11594
  }
11595
11595
  `;
11596
- var slideIn = styled9.keyframes`
11597
- from { transform: translateX(110%); opacity: 0; }
11598
- to { transform: translateX(0); opacity: 1; }
11599
- `;
11600
- var slideOut = styled9.keyframes`
11601
- from { transform: translateX(0); opacity: 1; }
11602
- to { transform: translateX(110%); opacity: 0; }
11603
- `;
11604
- var progressShrink = styled9.keyframes`
11605
- from { width: 100%; }
11606
- to { width: 0%; }
11607
- `;
11608
- var VARIANT_COLORS = {
11609
- success: { accent: "#0ecb81", icon: "\u2713" },
11610
- error: { accent: "#f6465d", icon: "\u2715" },
11611
- sell: { accent: "#f6465d", icon: "\u2713" },
11612
- info: { accent: "#E6C656", icon: "\u2139" },
11613
- pending: { accent: "#7EB3E6", icon: "\u25CC" }
11614
- };
11615
- var Wrapper2 = styled9__default.default.div`
11616
- position: relative;
11617
- display: flex;
11618
- flex-direction: column;
11619
- gap: 0;
11620
- width: 340px;
11621
- background: #0d0f1a;
11622
- border: 1px solid rgba(255, 255, 255, 0.08);
11623
- border-radius: 10px;
11624
- overflow: hidden;
11625
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
11626
- animation: ${({ $exiting }) => $exiting ? styled9.css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : styled9.css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
11627
- pointer-events: all;
11628
- `;
11629
- var Body = styled9__default.default.div`
11630
- display: flex;
11631
- align-items: flex-start;
11632
- gap: 12px;
11633
- padding: 14px 16px 12px;
11634
- `;
11635
- var IconDot = styled9__default.default.div`
11636
- flex-shrink: 0;
11637
- width: 28px;
11638
- height: 28px;
11639
- border-radius: 50%;
11640
- background: ${({ $color }) => $color}1a;
11641
- border: 1px solid ${({ $color }) => $color}55;
11642
- display: flex;
11643
- align-items: center;
11644
- justify-content: center;
11645
- font-size: 0.75rem;
11646
- font-weight: 700;
11647
- color: ${({ $color }) => $color};
11648
- margin-top: 1px;
11649
- `;
11650
- var Content = styled9__default.default.div`
11651
- flex: 1;
11652
- min-width: 0;
11653
- `;
11654
- var Title2 = styled9__default.default.p`
11655
- margin: 0 0 2px;
11656
- font-size: 0.8rem;
11657
- font-weight: 600;
11658
- color: #fff;
11659
- letter-spacing: 0.01em;
11660
- `;
11661
- var Amount = styled9__default.default.p`
11662
- margin: 0 0 6px;
11663
- font-size: 1.05rem;
11664
- font-weight: 700;
11665
- color: #E6C656;
11666
- letter-spacing: -0.01em;
11667
- `;
11668
- var TxRow = styled9__default.default.a`
11669
- display: inline-flex;
11670
- align-items: center;
11671
- gap: 5px;
11672
- font-family: 'IBM Plex Mono', 'Space Mono', monospace;
11673
- font-size: 0.68rem;
11674
- color: rgba(255, 255, 255, 0.4);
11675
- text-decoration: none;
11676
- transition: color 0.15s;
11677
- &:hover {
11678
- color: #7EB3E6;
11679
- }
11680
- `;
11681
- var TxArrow = styled9__default.default.span`
11682
- font-size: 0.6rem;
11683
- opacity: 0.6;
11684
- `;
11685
- var CloseBtn = styled9__default.default.button`
11686
- flex-shrink: 0;
11687
- background: none;
11688
- border: none;
11689
- padding: 2px 4px;
11690
- cursor: pointer;
11691
- color: rgba(255, 255, 255, 0.25);
11692
- font-size: 0.9rem;
11693
- line-height: 1;
11694
- transition: color 0.15s;
11695
- &:hover { color: rgba(255, 255, 255, 0.7); }
11696
- `;
11697
- var ProgressBar = styled9__default.default.div`
11698
- height: 2px;
11699
- background: rgba(255, 255, 255, 0.06);
11700
- position: relative;
11701
- &::after {
11702
- content: '';
11703
- position: absolute;
11704
- left: 0;
11705
- top: 0;
11706
- height: 100%;
11707
- background: ${({ $color }) => $color};
11708
- animation: ${styled9.css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
11709
- }
11710
- `;
11711
- var Container = styled9__default.default.div`
11712
- position: fixed;
11713
- bottom: 24px;
11714
- right: 24px;
11715
- z-index: 9999;
11716
- display: flex;
11717
- flex-direction: column-reverse;
11718
- gap: 10px;
11719
- pointer-events: none;
11720
- `;
11721
- var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
11722
- function truncateHash(hash) {
11723
- return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
11724
- }
11725
- function ToastItem({ toast, onDismiss }) {
11726
- const [exiting, setExiting] = React5.useState(false);
11727
- const timerRef = React5.useRef(null);
11728
- const dismiss = React5.useCallback(() => {
11729
- setExiting(true);
11730
- setTimeout(() => onDismiss(toast.id), 280);
11731
- }, [onDismiss, toast.id]);
11732
- React5.useEffect(() => {
11733
- const duration2 = toast.duration ?? 6e3;
11734
- if (duration2 > 0) {
11735
- timerRef.current = setTimeout(dismiss, duration2);
11736
- }
11737
- return () => {
11738
- if (timerRef.current) clearTimeout(timerRef.current);
11739
- };
11740
- }, [dismiss, toast.duration]);
11741
- const { accent, icon } = VARIANT_COLORS[toast.variant];
11742
- const duration = toast.duration ?? 6e3;
11743
- const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
11744
- const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
11745
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper2, { $exiting: exiting, children: [
11746
- /* @__PURE__ */ jsxRuntime.jsxs(Body, { children: [
11747
- /* @__PURE__ */ jsxRuntime.jsx(IconDot, { $color: accent, children: icon }),
11748
- /* @__PURE__ */ jsxRuntime.jsxs(Content, { children: [
11749
- /* @__PURE__ */ jsxRuntime.jsx(Title2, { children: toast.title }),
11750
- toast.amount && /* @__PURE__ */ jsxRuntime.jsx(Amount, { children: toast.amount }),
11751
- toast.txHash && txUrl && /* @__PURE__ */ jsxRuntime.jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
11752
- truncateHash(toast.txHash),
11753
- /* @__PURE__ */ jsxRuntime.jsx(TxArrow, { children: "\u2197" })
11754
- ] })
11755
- ] }),
11756
- /* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
11757
- ] }),
11758
- duration > 0 && /* @__PURE__ */ jsxRuntime.jsx(ProgressBar, { $color: accent, $duration: duration })
11759
- ] });
11760
- }
11761
- var ToastContext = React5.createContext(null);
11762
- function ToastProvider({ children }) {
11763
- const [toasts, setToasts] = React5.useState([]);
11764
- const addToast = React5.useCallback((data) => {
11765
- const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
11766
- setToasts((prev) => [...prev, { ...data, id }]);
11767
- return id;
11768
- }, []);
11769
- const dismiss = React5.useCallback((id) => {
11770
- setToasts((prev) => prev.filter((t) => t.id !== id));
11771
- }, []);
11772
- return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
11773
- children,
11774
- /* @__PURE__ */ jsxRuntime.jsx(Container, { children: toasts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
11775
- ] });
11776
- }
11777
- function useToast() {
11778
- const ctx = React5.useContext(ToastContext);
11779
- if (!ctx) throw new Error("useToast must be used within a ToastProvider");
11780
- return ctx;
11781
- }
11782
11596
  function AssetSelectorBar({
11783
11597
  propertyName,
11784
11598
  tokenPrice,
@@ -12066,11 +11880,11 @@ var IPOOptionLocation = styled9__default.default.div`
12066
11880
  font-weight: 500;
12067
11881
  }
12068
11882
  `;
12069
- var slideOut2 = styled9.keyframes`
11883
+ var slideOut = styled9.keyframes`
12070
11884
  0% { transform: translateY(0); opacity: 1; }
12071
11885
  100% { transform: translateY(100%); opacity: 0; }
12072
11886
  `;
12073
- var slideIn2 = styled9.keyframes`
11887
+ var slideIn = styled9.keyframes`
12074
11888
  0% { transform: translateY(-100%); opacity: 0; }
12075
11889
  100% { transform: translateY(0); opacity: 1; }
12076
11890
  `;
@@ -12083,13 +11897,13 @@ var SlideWrap = styled9__default.default.span`
12083
11897
  `;
12084
11898
  var SlideNew = styled9__default.default.span`
12085
11899
  display: inline-block;
12086
- animation: ${(props) => props.$animate ? slideIn2 : "none"} 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
11900
+ animation: ${(props) => props.$animate ? slideIn : "none"} 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
12087
11901
  `;
12088
11902
  var SlideOld = styled9__default.default.span`
12089
11903
  position: absolute;
12090
11904
  top: 0;
12091
11905
  left: 0;
12092
- animation: ${slideOut2} 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
11906
+ animation: ${slideOut} 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
12093
11907
  `;
12094
11908
  function SlideDigit({ value }) {
12095
11909
  const prevRef = React5.useRef(value);
@@ -12181,7 +11995,7 @@ function OfferingProgressCard({
12181
11995
  }
12182
11996
  if (variant === "home") {
12183
11997
  const isPreLive = !ipoStarted && ipoStatus !== "CLOSED" && ipoStatus !== "CANCELLED";
12184
- return /* @__PURE__ */ jsxRuntime.jsxs(Container2, { style, className, children: [
11998
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { style, className, children: [
12185
11999
  /* @__PURE__ */ jsxRuntime.jsxs(Header2, { children: [
12186
12000
  /* @__PURE__ */ jsxRuntime.jsxs("h3", { children: [
12187
12001
  /* @__PURE__ */ jsxRuntime.jsx(fa.FaChartLine, {}),
@@ -12263,7 +12077,7 @@ function OfferingProgressCard({
12263
12077
  ] })
12264
12078
  ] });
12265
12079
  }
12266
- return /* @__PURE__ */ jsxRuntime.jsxs(Container2, { style, className, children: [
12080
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { style, className, children: [
12267
12081
  /* @__PURE__ */ jsxRuntime.jsxs(Header2, { children: [
12268
12082
  /* @__PURE__ */ jsxRuntime.jsxs("h3", { children: [
12269
12083
  /* @__PURE__ */ jsxRuntime.jsx(fa.FaChartLine, {}),
@@ -12364,7 +12178,7 @@ function OfferingProgressCard({
12364
12178
  ] })
12365
12179
  ] });
12366
12180
  }
12367
- var Container2 = styled9__default.default.div`
12181
+ var Container = styled9__default.default.div`
12368
12182
  background-color: var(--color-card-darker, #111);
12369
12183
  border-radius: 8px;
12370
12184
  padding: 1.5rem;
@@ -14166,7 +13980,7 @@ function PortfolioActivityPanel({
14166
13980
  const handleTabChange = (tab) => {
14167
13981
  setActiveTab(tab);
14168
13982
  };
14169
- return /* @__PURE__ */ jsxRuntime.jsxs(Container3, { className, style, children: [
13983
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container2, { className, style, children: [
14170
13984
  /* @__PURE__ */ jsxRuntime.jsx(PanelTitle, { children: "Activity" }),
14171
13985
  /* @__PURE__ */ jsxRuntime.jsxs(TabContainer, { children: [
14172
13986
  showPositionsTab && /* @__PURE__ */ jsxRuntime.jsxs(Tab, { $active: activeTab === "positions", onClick: () => handleTabChange("positions"), children: [
@@ -14349,11 +14163,11 @@ function PortfolioActivityPanel({
14349
14163
  ] })
14350
14164
  ] }),
14351
14165
  onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsxs(CloseActions, { children: [
14352
- /* @__PURE__ */ jsxRuntime.jsx(CloseBtn2, { onClick: (e) => {
14166
+ /* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
14353
14167
  e.stopPropagation();
14354
14168
  onClosePosition(pos.tokenName, "market", pos.quantity, pos.marketPrice);
14355
14169
  }, children: "Market Sell" }),
14356
- /* @__PURE__ */ jsxRuntime.jsx(CloseBtn2, { onClick: (e) => {
14170
+ /* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
14357
14171
  e.stopPropagation();
14358
14172
  onClosePosition(pos.tokenName, "limit", pos.quantity, pos.marketPrice);
14359
14173
  }, children: "Limit Sell" })
@@ -14590,7 +14404,7 @@ function PortfolioActivityPanel({
14590
14404
  ] }) })
14591
14405
  ] });
14592
14406
  }
14593
- var Container3 = styled9__default.default.div`
14407
+ var Container2 = styled9__default.default.div`
14594
14408
  display: flex;
14595
14409
  flex-direction: column;
14596
14410
  overflow: hidden;
@@ -15014,7 +14828,7 @@ var CloseActions = styled9__default.default.div`
15014
14828
  gap: 0.35rem;
15015
14829
  align-items: center;
15016
14830
  `;
15017
- var CloseBtn2 = styled9__default.default.button`
14831
+ var CloseBtn = styled9__default.default.button`
15018
14832
  background: transparent;
15019
14833
  border: 1px solid rgba(230, 200, 126, 0.25);
15020
14834
  border-radius: 4px;
@@ -15368,9 +15182,9 @@ function PropertyBuy({
15368
15182
  onVerifyIdentity,
15369
15183
  portfolioActivity,
15370
15184
  newsItems = [],
15371
- newsConnectionStatus
15185
+ newsConnectionStatus,
15186
+ toast
15372
15187
  }) {
15373
- const { toast } = useToast();
15374
15188
  const [sliderValue, setSliderValue] = React5.useState(0);
15375
15189
  const [availableBalance, setAvailableBalance] = React5.useState(walletUsdcBalance ?? 0);
15376
15190
  const [manualOrderAmount, setManualOrderAmount] = React5.useState(null);
@@ -18270,6 +18084,192 @@ function GalleryContent({ galleryImages, startIndex, title, subtitle, onClose })
18270
18084
  }
18271
18085
  );
18272
18086
  }
18087
+ var slideIn2 = styled9.keyframes`
18088
+ from { transform: translateX(110%); opacity: 0; }
18089
+ to { transform: translateX(0); opacity: 1; }
18090
+ `;
18091
+ var slideOut2 = styled9.keyframes`
18092
+ from { transform: translateX(0); opacity: 1; }
18093
+ to { transform: translateX(110%); opacity: 0; }
18094
+ `;
18095
+ var progressShrink = styled9.keyframes`
18096
+ from { width: 100%; }
18097
+ to { width: 0%; }
18098
+ `;
18099
+ var VARIANT_COLORS = {
18100
+ success: { accent: "#0ecb81", icon: "\u2713" },
18101
+ error: { accent: "#f6465d", icon: "\u2715" },
18102
+ sell: { accent: "#f6465d", icon: "\u2713" },
18103
+ info: { accent: "#E6C656", icon: "\u2139" },
18104
+ pending: { accent: "#7EB3E6", icon: "\u25CC" }
18105
+ };
18106
+ var Wrapper2 = styled9__default.default.div`
18107
+ position: relative;
18108
+ display: flex;
18109
+ flex-direction: column;
18110
+ gap: 0;
18111
+ width: 340px;
18112
+ background: #0d0f1a;
18113
+ border: 1px solid rgba(255, 255, 255, 0.08);
18114
+ border-radius: 10px;
18115
+ overflow: hidden;
18116
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
18117
+ animation: ${({ $exiting }) => $exiting ? styled9.css`${slideOut2} 0.28s cubic-bezier(0.4,0,1,1) forwards` : styled9.css`${slideIn2} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
18118
+ pointer-events: all;
18119
+ `;
18120
+ var Body = styled9__default.default.div`
18121
+ display: flex;
18122
+ align-items: flex-start;
18123
+ gap: 12px;
18124
+ padding: 14px 16px 12px;
18125
+ `;
18126
+ var IconDot = styled9__default.default.div`
18127
+ flex-shrink: 0;
18128
+ width: 28px;
18129
+ height: 28px;
18130
+ border-radius: 50%;
18131
+ background: ${({ $color }) => $color}1a;
18132
+ border: 1px solid ${({ $color }) => $color}55;
18133
+ display: flex;
18134
+ align-items: center;
18135
+ justify-content: center;
18136
+ font-size: 0.75rem;
18137
+ font-weight: 700;
18138
+ color: ${({ $color }) => $color};
18139
+ margin-top: 1px;
18140
+ `;
18141
+ var Content = styled9__default.default.div`
18142
+ flex: 1;
18143
+ min-width: 0;
18144
+ `;
18145
+ var Title2 = styled9__default.default.p`
18146
+ margin: 0 0 2px;
18147
+ font-size: 0.8rem;
18148
+ font-weight: 600;
18149
+ color: #fff;
18150
+ letter-spacing: 0.01em;
18151
+ `;
18152
+ var Amount = styled9__default.default.p`
18153
+ margin: 0 0 6px;
18154
+ font-size: 1.05rem;
18155
+ font-weight: 700;
18156
+ color: #E6C656;
18157
+ letter-spacing: -0.01em;
18158
+ `;
18159
+ var TxRow = styled9__default.default.a`
18160
+ display: inline-flex;
18161
+ align-items: center;
18162
+ gap: 5px;
18163
+ font-family: 'IBM Plex Mono', 'Space Mono', monospace;
18164
+ font-size: 0.68rem;
18165
+ color: rgba(255, 255, 255, 0.4);
18166
+ text-decoration: none;
18167
+ transition: color 0.15s;
18168
+ &:hover {
18169
+ color: #7EB3E6;
18170
+ }
18171
+ `;
18172
+ var TxArrow = styled9__default.default.span`
18173
+ font-size: 0.6rem;
18174
+ opacity: 0.6;
18175
+ `;
18176
+ var CloseBtn2 = styled9__default.default.button`
18177
+ flex-shrink: 0;
18178
+ background: none;
18179
+ border: none;
18180
+ padding: 2px 4px;
18181
+ cursor: pointer;
18182
+ color: rgba(255, 255, 255, 0.25);
18183
+ font-size: 0.9rem;
18184
+ line-height: 1;
18185
+ transition: color 0.15s;
18186
+ &:hover { color: rgba(255, 255, 255, 0.7); }
18187
+ `;
18188
+ var ProgressBar = styled9__default.default.div`
18189
+ height: 2px;
18190
+ background: rgba(255, 255, 255, 0.06);
18191
+ position: relative;
18192
+ &::after {
18193
+ content: '';
18194
+ position: absolute;
18195
+ left: 0;
18196
+ top: 0;
18197
+ height: 100%;
18198
+ background: ${({ $color }) => $color};
18199
+ animation: ${styled9.css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
18200
+ }
18201
+ `;
18202
+ var Container3 = styled9__default.default.div`
18203
+ position: fixed;
18204
+ bottom: 24px;
18205
+ right: 24px;
18206
+ z-index: 9999;
18207
+ display: flex;
18208
+ flex-direction: column-reverse;
18209
+ gap: 10px;
18210
+ pointer-events: none;
18211
+ `;
18212
+ var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
18213
+ function truncateHash(hash) {
18214
+ return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
18215
+ }
18216
+ function ToastItem({ toast, onDismiss }) {
18217
+ const [exiting, setExiting] = React5.useState(false);
18218
+ const timerRef = React5.useRef(null);
18219
+ const dismiss = React5.useCallback(() => {
18220
+ setExiting(true);
18221
+ setTimeout(() => onDismiss(toast.id), 280);
18222
+ }, [onDismiss, toast.id]);
18223
+ React5.useEffect(() => {
18224
+ const duration2 = toast.duration ?? 6e3;
18225
+ if (duration2 > 0) {
18226
+ timerRef.current = setTimeout(dismiss, duration2);
18227
+ }
18228
+ return () => {
18229
+ if (timerRef.current) clearTimeout(timerRef.current);
18230
+ };
18231
+ }, [dismiss, toast.duration]);
18232
+ const { accent, icon } = VARIANT_COLORS[toast.variant];
18233
+ const duration = toast.duration ?? 6e3;
18234
+ const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
18235
+ const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
18236
+ return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper2, { $exiting: exiting, children: [
18237
+ /* @__PURE__ */ jsxRuntime.jsxs(Body, { children: [
18238
+ /* @__PURE__ */ jsxRuntime.jsx(IconDot, { $color: accent, children: icon }),
18239
+ /* @__PURE__ */ jsxRuntime.jsxs(Content, { children: [
18240
+ /* @__PURE__ */ jsxRuntime.jsx(Title2, { children: toast.title }),
18241
+ toast.amount && /* @__PURE__ */ jsxRuntime.jsx(Amount, { children: toast.amount }),
18242
+ toast.txHash && txUrl && /* @__PURE__ */ jsxRuntime.jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
18243
+ truncateHash(toast.txHash),
18244
+ /* @__PURE__ */ jsxRuntime.jsx(TxArrow, { children: "\u2197" })
18245
+ ] })
18246
+ ] }),
18247
+ /* @__PURE__ */ jsxRuntime.jsx(CloseBtn2, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
18248
+ ] }),
18249
+ duration > 0 && /* @__PURE__ */ jsxRuntime.jsx(ProgressBar, { $color: accent, $duration: duration })
18250
+ ] });
18251
+ }
18252
+ var ToastContext = React5.createContext(null);
18253
+ function ToastProvider({ children }) {
18254
+ const [toasts, setToasts] = React5.useState([]);
18255
+ const addToast = React5.useCallback((data) => {
18256
+ const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
18257
+ setToasts((prev) => [...prev, { ...data, id }]);
18258
+ return id;
18259
+ }, []);
18260
+ const dismiss = React5.useCallback((id) => {
18261
+ setToasts((prev) => prev.filter((t) => t.id !== id));
18262
+ }, []);
18263
+ return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
18264
+ children,
18265
+ /* @__PURE__ */ jsxRuntime.jsx(Container3, { children: toasts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
18266
+ ] });
18267
+ }
18268
+ function useToast() {
18269
+ const ctx = React5.useContext(ToastContext);
18270
+ if (!ctx) throw new Error("useToast must be used within a ToastProvider");
18271
+ return ctx;
18272
+ }
18273
18273
  var INTERVALS = [1e3, 2e3, 4e3, 5e3, 7e3, 1e4, 12e3];
18274
18274
  function useAdaptivePolling({ enabled, onPoll }) {
18275
18275
  const onPollRef = React5.useRef(onPoll);