@loafmarkets/ui 0.1.384 → 0.1.386

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
@@ -83,6 +83,8 @@ interface OrderbookProps extends React$1.HTMLAttributes<HTMLDivElement> {
83
83
  amountPrecision?: number;
84
84
  defaultTab?: "orderbook" | "trades";
85
85
  onTabChange?: (tab: "orderbook" | "trades") => void;
86
+ /** When false, the "Trades" tab is hidden and only the orderbook shows (e.g. on mobile). Default true. */
87
+ showTradesTab?: boolean;
86
88
  rightHeader?: React$1.ReactNode;
87
89
  variant?: "auto" | "default" | "compact";
88
90
  /**
@@ -578,10 +580,29 @@ type LoginPopupProps = {
578
580
  onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
579
581
  /** Optional view to show immediately when the popup opens. */
580
582
  initialView?: LoginPopupView;
583
+ /**
584
+ * Gate-only: an access code supplied out-of-band (e.g. the `?code=` param on an
585
+ * invite link). Any form is accepted ("LOAF-M8TRP" / "loaf-m8trp" / "M8TRP").
586
+ * Pre-fills the code field and, when complete, auto-validates on open so the
587
+ * gate advances straight to sign-in.
588
+ */
589
+ initialCode?: string;
581
590
  /** Wallet address used for the receive funds view (bypasses Privy modal). */
582
591
  walletAddress?: string | null;
583
592
  /** Called when the user submits a referral code during onboarding. */
584
593
  onSubmitReferralCode?: (code: string) => Promise<void> | void;
594
+ /**
595
+ * Gate-only: validates the full access code (e.g. "LOAF-M8TRP") as the user types.
596
+ * Resolve true → bar turns green and the sign-in step is revealed; false → red.
597
+ */
598
+ onValidateCode?: (code: string) => Promise<boolean> | boolean;
599
+ /**
600
+ * Gate-only: after auth on the "Already have an account?" sign-in path (no
601
+ * code entered), reports whether the account ALREADY has access. True → enter;
602
+ * false → routed back to the access-code step (a code-less account must not
603
+ * bypass the gate). Defaults to allowing entry if not provided.
604
+ */
605
+ onCheckAccess?: () => Promise<boolean> | boolean;
585
606
  /** Called when the user skips the referral code and joins the waitlist. Receives their signup email. Resolves to a success message. */
586
607
  onJoinWaitlist?: (email: string) => Promise<string> | void;
587
608
  /**
@@ -600,6 +621,12 @@ type LoginPopupProps = {
600
621
  onPasskeyLogin?: () => Promise<void> | void;
601
622
  /** Current KYC status — used to show "Resume Verification" when previously started. */
602
623
  kycStatus?: 'NOT_STARTED' | 'PENDING' | 'ON_HOLD' | 'VERIFIED' | 'REJECTED';
624
+ /**
625
+ * Renders the access-code (referral) view as a full-screen, opaque, non-dismissible
626
+ * gate — no page visible behind it, no close affordance. Used when the popup opens
627
+ * directly into the code view as the private-beta entry gate.
628
+ */
629
+ gate?: boolean;
603
630
  };
604
631
  declare const LoginPopup: React__default.FC<LoginPopupProps>;
605
632
 
@@ -616,7 +643,7 @@ type HeaderPortfolioData = {
616
643
  pnl: number;
617
644
  pnlPercent: number;
618
645
  };
619
- type HeaderActiveTab = "home" | "trade" | "offerings" | "propertyMap" | "leaderboard" | "leaderboardPage" | "about" | "portfolio" | "learn" | "api";
646
+ type HeaderActiveTab = "home" | "trade" | "offerings" | "propertyMap" | "about" | "portfolio" | "learn" | "api";
620
647
  type HeaderLoginPopupComponentProps = {
621
648
  onClose: () => void;
622
649
  initialView?: LoginPopupView;
@@ -637,8 +664,6 @@ type HeaderProps = {
637
664
  apiPath?: string;
638
665
  offeringsPath?: string;
639
666
  propertyMapPath?: string;
640
- leaderboardPath?: string;
641
- leaderboardPagePath?: string;
642
667
  portfolioPath?: string;
643
668
  loafLiquidityPath?: string;
644
669
  /** Absolute URL for the auth/login surface (e.g. https://auth.loafmarkets.com/login). */
@@ -974,6 +999,8 @@ type PortfolioActivityPanelProps = {
974
999
  /** Click handler for the asset name in the Open Orders / Order History / Trade History rows — opens that asset. */
975
1000
  onAssetClick?: (tokenName: string) => void;
976
1001
  onClosePosition?: (tokenName: string, type: 'market' | 'limit', quantity: number, marketPrice: number) => void;
1002
+ /** Open the shareable position card for a held position. */
1003
+ onSharePosition?: (pos: PortfolioPosition) => void;
977
1004
  offeringOrders?: readonly OfferingOrder[];
978
1005
  openOrders?: readonly OrderHistoryItem[];
979
1006
  orderHistory?: readonly OrderHistoryItem[];
@@ -990,7 +1017,7 @@ type PortfolioActivityPanelProps = {
990
1017
  className?: string;
991
1018
  style?: React.CSSProperties;
992
1019
  };
993
- declare function PortfolioActivityPanel({ positions, showPositionsTab, showSubscriptionsTab, onPositionClick, onAssetClick, onClosePosition, offeringOrders, openOrders, orderHistory, tradeHistory, transfers, onCancelOrder, onCancelAllOrders, cancellingOrderId, compactPositions, defaultTab, onTabChange, pageSize, blockExplorerBaseUrl: _blockExplorerBaseUrl, className, style, }: PortfolioActivityPanelProps): react_jsx_runtime.JSX.Element;
1020
+ declare function PortfolioActivityPanel({ positions, showPositionsTab, showSubscriptionsTab, onPositionClick, onSharePosition, onAssetClick, onClosePosition, offeringOrders, openOrders, orderHistory, tradeHistory, transfers, onCancelOrder, onCancelAllOrders, cancellingOrderId, compactPositions, defaultTab, onTabChange, pageSize, blockExplorerBaseUrl: _blockExplorerBaseUrl, className, style, }: PortfolioActivityPanelProps): react_jsx_runtime.JSX.Element;
994
1021
 
995
1022
  type SelectorItem = {
996
1023
  readonly tokenName: string;
@@ -1021,8 +1048,10 @@ type AssetSelectorBarProps = {
1021
1048
  trailing?: ReactNode;
1022
1049
  imageUrl?: string;
1023
1050
  badgeLabel?: string;
1051
+ /** Stack the TICKER as the primary label with the asset name beneath (InstrumentTile-style), instead of "Name (TICKER)". */
1052
+ tickerPrimary?: boolean;
1024
1053
  };
1025
- declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
1054
+ declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, tickerPrimary, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
1026
1055
 
1027
1056
  type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
1028
1057
  type ToastData = {
package/dist/index.d.ts CHANGED
@@ -83,6 +83,8 @@ interface OrderbookProps extends React$1.HTMLAttributes<HTMLDivElement> {
83
83
  amountPrecision?: number;
84
84
  defaultTab?: "orderbook" | "trades";
85
85
  onTabChange?: (tab: "orderbook" | "trades") => void;
86
+ /** When false, the "Trades" tab is hidden and only the orderbook shows (e.g. on mobile). Default true. */
87
+ showTradesTab?: boolean;
86
88
  rightHeader?: React$1.ReactNode;
87
89
  variant?: "auto" | "default" | "compact";
88
90
  /**
@@ -578,10 +580,29 @@ type LoginPopupProps = {
578
580
  onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
579
581
  /** Optional view to show immediately when the popup opens. */
580
582
  initialView?: LoginPopupView;
583
+ /**
584
+ * Gate-only: an access code supplied out-of-band (e.g. the `?code=` param on an
585
+ * invite link). Any form is accepted ("LOAF-M8TRP" / "loaf-m8trp" / "M8TRP").
586
+ * Pre-fills the code field and, when complete, auto-validates on open so the
587
+ * gate advances straight to sign-in.
588
+ */
589
+ initialCode?: string;
581
590
  /** Wallet address used for the receive funds view (bypasses Privy modal). */
582
591
  walletAddress?: string | null;
583
592
  /** Called when the user submits a referral code during onboarding. */
584
593
  onSubmitReferralCode?: (code: string) => Promise<void> | void;
594
+ /**
595
+ * Gate-only: validates the full access code (e.g. "LOAF-M8TRP") as the user types.
596
+ * Resolve true → bar turns green and the sign-in step is revealed; false → red.
597
+ */
598
+ onValidateCode?: (code: string) => Promise<boolean> | boolean;
599
+ /**
600
+ * Gate-only: after auth on the "Already have an account?" sign-in path (no
601
+ * code entered), reports whether the account ALREADY has access. True → enter;
602
+ * false → routed back to the access-code step (a code-less account must not
603
+ * bypass the gate). Defaults to allowing entry if not provided.
604
+ */
605
+ onCheckAccess?: () => Promise<boolean> | boolean;
585
606
  /** Called when the user skips the referral code and joins the waitlist. Receives their signup email. Resolves to a success message. */
586
607
  onJoinWaitlist?: (email: string) => Promise<string> | void;
587
608
  /**
@@ -600,6 +621,12 @@ type LoginPopupProps = {
600
621
  onPasskeyLogin?: () => Promise<void> | void;
601
622
  /** Current KYC status — used to show "Resume Verification" when previously started. */
602
623
  kycStatus?: 'NOT_STARTED' | 'PENDING' | 'ON_HOLD' | 'VERIFIED' | 'REJECTED';
624
+ /**
625
+ * Renders the access-code (referral) view as a full-screen, opaque, non-dismissible
626
+ * gate — no page visible behind it, no close affordance. Used when the popup opens
627
+ * directly into the code view as the private-beta entry gate.
628
+ */
629
+ gate?: boolean;
603
630
  };
604
631
  declare const LoginPopup: React__default.FC<LoginPopupProps>;
605
632
 
@@ -616,7 +643,7 @@ type HeaderPortfolioData = {
616
643
  pnl: number;
617
644
  pnlPercent: number;
618
645
  };
619
- type HeaderActiveTab = "home" | "trade" | "offerings" | "propertyMap" | "leaderboard" | "leaderboardPage" | "about" | "portfolio" | "learn" | "api";
646
+ type HeaderActiveTab = "home" | "trade" | "offerings" | "propertyMap" | "about" | "portfolio" | "learn" | "api";
620
647
  type HeaderLoginPopupComponentProps = {
621
648
  onClose: () => void;
622
649
  initialView?: LoginPopupView;
@@ -637,8 +664,6 @@ type HeaderProps = {
637
664
  apiPath?: string;
638
665
  offeringsPath?: string;
639
666
  propertyMapPath?: string;
640
- leaderboardPath?: string;
641
- leaderboardPagePath?: string;
642
667
  portfolioPath?: string;
643
668
  loafLiquidityPath?: string;
644
669
  /** Absolute URL for the auth/login surface (e.g. https://auth.loafmarkets.com/login). */
@@ -974,6 +999,8 @@ type PortfolioActivityPanelProps = {
974
999
  /** Click handler for the asset name in the Open Orders / Order History / Trade History rows — opens that asset. */
975
1000
  onAssetClick?: (tokenName: string) => void;
976
1001
  onClosePosition?: (tokenName: string, type: 'market' | 'limit', quantity: number, marketPrice: number) => void;
1002
+ /** Open the shareable position card for a held position. */
1003
+ onSharePosition?: (pos: PortfolioPosition) => void;
977
1004
  offeringOrders?: readonly OfferingOrder[];
978
1005
  openOrders?: readonly OrderHistoryItem[];
979
1006
  orderHistory?: readonly OrderHistoryItem[];
@@ -990,7 +1017,7 @@ type PortfolioActivityPanelProps = {
990
1017
  className?: string;
991
1018
  style?: React.CSSProperties;
992
1019
  };
993
- declare function PortfolioActivityPanel({ positions, showPositionsTab, showSubscriptionsTab, onPositionClick, onAssetClick, onClosePosition, offeringOrders, openOrders, orderHistory, tradeHistory, transfers, onCancelOrder, onCancelAllOrders, cancellingOrderId, compactPositions, defaultTab, onTabChange, pageSize, blockExplorerBaseUrl: _blockExplorerBaseUrl, className, style, }: PortfolioActivityPanelProps): react_jsx_runtime.JSX.Element;
1020
+ declare function PortfolioActivityPanel({ positions, showPositionsTab, showSubscriptionsTab, onPositionClick, onSharePosition, onAssetClick, onClosePosition, offeringOrders, openOrders, orderHistory, tradeHistory, transfers, onCancelOrder, onCancelAllOrders, cancellingOrderId, compactPositions, defaultTab, onTabChange, pageSize, blockExplorerBaseUrl: _blockExplorerBaseUrl, className, style, }: PortfolioActivityPanelProps): react_jsx_runtime.JSX.Element;
994
1021
 
995
1022
  type SelectorItem = {
996
1023
  readonly tokenName: string;
@@ -1021,8 +1048,10 @@ type AssetSelectorBarProps = {
1021
1048
  trailing?: ReactNode;
1022
1049
  imageUrl?: string;
1023
1050
  badgeLabel?: string;
1051
+ /** Stack the TICKER as the primary label with the asset name beneath (InstrumentTile-style), instead of "Name (TICKER)". */
1052
+ tickerPrimary?: boolean;
1024
1053
  };
1025
- declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
1054
+ declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, tickerPrimary, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
1026
1055
 
1027
1056
  type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
1028
1057
  type ToastData = {