@funkit/connect 12.19.0 → 12.21.0

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.
Files changed (146) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/clients/{chunk-N46CL4ZT.js → chunk-4NWQR25X.js} +1 -1
  3. package/dist/clients/{chunk-AELXD5XA.js → chunk-6XJV626L.js} +1 -1
  4. package/dist/clients/chunk-B67ESBGC.js +108 -0
  5. package/dist/clients/{chunk-KH2HLTHP.js → chunk-DAMICUCH.js} +5 -5
  6. package/dist/clients/{chunk-FOXMRDKD.js → chunk-FIJU6HZM.js} +1 -1
  7. package/dist/clients/{chunk-L6JL2XJY.js → chunk-MTKOZB6U.js} +1 -1
  8. package/dist/clients/{chunk-R25GIAD5.js → chunk-PZSKO3BJ.js} +1 -0
  9. package/dist/clients/{chunk-5NYKSTGH.js → chunk-S4SMCBQ4.js} +1 -1
  10. package/dist/clients/{chunk-Y7ONHWCW.js → chunk-T4Q43DNC.js} +2 -2
  11. package/dist/clients/{chunk-YSAAJSWT.js → chunk-YSQX5Z3F.js} +49 -25
  12. package/dist/clients/fanatics.d.ts +5 -7
  13. package/dist/clients/fanatics.js +4 -4
  14. package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
  15. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  16. package/dist/clients/internal/nado/withdrawalForm.js +5 -5
  17. package/dist/clients/internal/nado/withdrawalStatus.js +4 -4
  18. package/dist/clients/lighter.css +8 -1
  19. package/dist/clients/lighter.js +6 -6
  20. package/dist/clients/lighterRh.d.ts +44 -0
  21. package/dist/clients/lighterRh.js +51 -0
  22. package/dist/clients/mallard.js +3 -3
  23. package/dist/clients/nado.js +6 -6
  24. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  25. package/dist/clients/polymarket/index.js +3 -3
  26. package/dist/clients/polymarket/polymarket.d.ts +22 -22
  27. package/dist/clients/polymarket/polymarket.js +2 -2
  28. package/dist/components/Avatar/emojiAvatarForAddress.d.ts +35 -35
  29. package/dist/components/Box/Box.d.ts +63 -63
  30. package/dist/components/ConnectButton/ConnectButton.d.ts +16 -15
  31. package/dist/components/Dialog/Dialog.d.ts +12 -4
  32. package/dist/components/Dialog/hooks.d.ts +3 -3
  33. package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +2 -2
  34. package/dist/components/FunBottomBar/FunBottomBar.d.ts +3 -1
  35. package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
  36. package/dist/components/FunInput/FunInput.d.ts +1 -1
  37. package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
  38. package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
  39. package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -1
  40. package/dist/components/HighPriceImpactAlert/HighPriceImpactAlert.d.ts +7 -0
  41. package/dist/components/Icons/GreenRoundCheckmark.d.ts +2 -1
  42. package/dist/components/Icons/StatusIcons.css.d.ts +2 -2
  43. package/dist/components/Icons/StatusIcons.d.ts +2 -2
  44. package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +3 -1
  45. package/dist/components/ModalSelection/ModalSelection.d.ts +4 -4
  46. package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +1 -1
  47. package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +17 -4
  48. package/dist/components/TokenSwapWidget/TokenSwapPercentOptions/TokenSwapPercentOptions.d.ts +9 -0
  49. package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +6 -2
  50. package/dist/components/TokenSwapWidget/TokenSwapWidgetSkeleton/TokenSwapWidgetSkeleton.d.ts +3 -0
  51. package/dist/consts/checkout.d.ts +8 -8
  52. package/dist/consts/customers.d.ts +5 -1
  53. package/dist/consts/polymarket.d.ts +2 -2
  54. package/dist/consts/quote.d.ts +25 -15
  55. package/dist/css/cssObjectFromTheme.d.ts +1 -1
  56. package/dist/css/sprinkles.css.d.ts +78 -78
  57. package/dist/domains/bridge.d.ts +1 -1
  58. package/dist/domains/convert/assets.d.ts +38 -0
  59. package/dist/domains/convert/inputAmount.d.ts +24 -21
  60. package/dist/domains/convert/reducer.d.ts +11 -6
  61. package/dist/domains/convert/screen.d.ts +10 -1
  62. package/dist/domains/convert/view.d.ts +4 -0
  63. package/dist/domains/priceImpact.d.ts +14 -0
  64. package/dist/hooks/queries/useMeldLimits.d.ts +45 -45
  65. package/dist/hooks/queries/useWithdrawalQuote.d.ts +62 -62
  66. package/dist/hooks/track/useTrack.d.ts +1 -1
  67. package/dist/hooks/useCheckoutQuoteNotification.d.ts +3 -3
  68. package/dist/hooks/useConvertBalances.d.ts +1 -1
  69. package/dist/hooks/useConvertQuote.d.ts +1 -1
  70. package/dist/hooks/useDynamicRoutes.d.ts +1 -1
  71. package/dist/hooks/useFrogAccount.d.ts +77 -77
  72. package/dist/hooks/useIsomorphicEffect.d.ts +2 -2
  73. package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
  74. package/dist/hooks/usePaymentSources.d.ts +1 -1
  75. package/dist/hooks/usePolymarketAccountBalances.d.ts +1 -1
  76. package/dist/index.css +8 -1
  77. package/dist/index.d.ts +2 -0
  78. package/dist/index.js +2149 -1697
  79. package/dist/modals/CheckoutModal/Convert/ConvertAssetList.d.ts +1 -1
  80. package/dist/modals/CheckoutModal/Convert/ConvertAssetRow.d.ts +1 -19
  81. package/dist/modals/CheckoutModal/Convert/ConvertChainRail.d.ts +13 -0
  82. package/dist/modals/CheckoutModal/Convert/ConvertSelectDestinationStep.d.ts +7 -5
  83. package/dist/modals/CheckoutModal/Convert/ConvertSelectSourceStep.d.ts +0 -12
  84. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +13 -2
  85. package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +6 -1
  86. package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +6 -1
  87. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
  88. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +1 -1
  89. package/dist/modals/WithdrawalModal/useMultiSourceWithdrawal.d.ts +1 -1
  90. package/dist/providers/ConvertProvider.d.ts +2 -0
  91. package/dist/providers/FunkitCheckoutContext/types.d.ts +3 -0
  92. package/dist/providers/FunkitStatsigProvider.d.ts +1 -1
  93. package/dist/providers/GeneralWalletProvider.d.ts +21 -21
  94. package/dist/providers/ModalSizeContext.d.ts +4 -4
  95. package/dist/shadow-css.js +1 -1
  96. package/dist/themes/baseTheme.d.ts +1 -1
  97. package/dist/themes/darkTheme.d.ts +6 -4
  98. package/dist/themes/lightTheme.d.ts +6 -4
  99. package/dist/utils/checkout.d.ts +1 -1
  100. package/dist/utils/customer.d.ts +96 -96
  101. package/dist/utils/datadogBrowserLogsTransport.d.ts +11 -5
  102. package/dist/utils/datadogPageExit.d.ts +5 -0
  103. package/dist/utils/funError.d.ts +26 -0
  104. package/dist/utils/funLogger.d.ts +2 -1
  105. package/dist/utils/shakeElement.d.ts +7 -0
  106. package/dist/wallets/computeWalletConnectMetaData.d.ts +1 -1
  107. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  108. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  109. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  110. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  111. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  112. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  113. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  114. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  115. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  116. package/dist/wallets/walletConnectors/index.js +51 -51
  117. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  118. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  119. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  120. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  121. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  122. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  123. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  124. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  125. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  126. package/package.json +9 -9
  127. package/dist/clients/chunk-GTPMJGCF.js +0 -52
  128. package/dist/modals/CheckoutModal/Convert/ConvertChainPills.d.ts +0 -14
  129. package/dist/wallets/walletConnectors/{chunk-OVDCDVFX.js → chunk-34B7OJNT.js} +3 -3
  130. package/dist/wallets/walletConnectors/{chunk-JJBLW4IU.js → chunk-4FHNLTR3.js} +3 -3
  131. package/dist/wallets/walletConnectors/{chunk-TM7UBV3Q.js → chunk-ALGPGI6V.js} +3 -3
  132. package/dist/wallets/walletConnectors/{chunk-MWB6LFSG.js → chunk-BBB2J3US.js} +3 -3
  133. package/dist/wallets/walletConnectors/{chunk-IWPW26AL.js → chunk-BBDNB5TQ.js} +3 -3
  134. package/dist/wallets/walletConnectors/{chunk-53MYTA42.js → chunk-CU5J53XR.js} +3 -3
  135. package/dist/wallets/walletConnectors/{chunk-USLZMUJ3.js → chunk-HOCKAU5H.js} +3 -3
  136. package/dist/wallets/walletConnectors/{chunk-RJF2YEZ5.js → chunk-IA5432IR.js} +3 -3
  137. package/dist/wallets/walletConnectors/{chunk-ASTCNVJC.js → chunk-IWOMSW64.js} +3 -3
  138. package/dist/wallets/walletConnectors/{chunk-KE4CWI3A.js → chunk-NXWG6FG2.js} +3 -3
  139. package/dist/wallets/walletConnectors/{chunk-RQYEGJKL.js → chunk-RFCZYLNR.js} +3 -3
  140. package/dist/wallets/walletConnectors/{chunk-ANODOMIN.js → chunk-RXRYHMRI.js} +3 -3
  141. package/dist/wallets/walletConnectors/{chunk-PPQ6L4K2.js → chunk-SR5CZR3L.js} +3 -3
  142. package/dist/wallets/walletConnectors/{chunk-TIHTQ3OB.js → chunk-TRZDAXCQ.js} +3 -3
  143. package/dist/wallets/walletConnectors/{chunk-F45CUFRR.js → chunk-U52QO5HF.js} +3 -3
  144. package/dist/wallets/walletConnectors/{chunk-A5POD5SV.js → chunk-XODA5ESL.js} +3 -3
  145. package/dist/wallets/walletConnectors/{chunk-FYPQ3HP4.js → chunk-YRMBR6NA.js} +3 -3
  146. package/dist/wallets/walletConnectors/{chunk-65ULY6OC.js → chunk-ZSSSLFQF.js} +3 -3
@@ -11,22 +11,23 @@ export interface ConnectButtonProps {
11
11
  showChainSelector?: boolean;
12
12
  suffixIcon?: React.ReactNode;
13
13
  }
14
+ declare const defaultProps: {
15
+ readonly accountStatus: 'full';
16
+ readonly chainStatus: {
17
+ readonly largeScreen: 'full';
18
+ readonly smallScreen: 'icon';
19
+ };
20
+ readonly label: 'Sign In';
21
+ readonly showBalance: {
22
+ readonly largeScreen: true;
23
+ readonly smallScreen: false;
24
+ };
25
+ readonly showChainSelector: true;
26
+ readonly suffixIcon: null;
27
+ };
14
28
  export declare function ConnectButton({ accountStatus, chainStatus, label, showBalance, showChainSelector, suffixIcon, }: ConnectButtonProps): React.JSX.Element;
15
29
  export declare namespace ConnectButton {
16
- var __defaultProps: {
17
- readonly accountStatus: "full";
18
- readonly chainStatus: {
19
- readonly largeScreen: "full";
20
- readonly smallScreen: "icon";
21
- };
22
- readonly label: "Sign In";
23
- readonly showBalance: {
24
- readonly largeScreen: true;
25
- readonly smallScreen: false;
26
- };
27
- readonly showChainSelector: true;
28
- readonly suffixIcon: null;
29
- };
30
- var Custom: typeof ConnectButtonRenderer;
30
+ export { defaultProps as __defaultProps };
31
+ export { ConnectButtonRenderer as Custom };
31
32
  }
32
33
  export {};
@@ -1,5 +1,6 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
+ import { FunBottomBar } from '../FunBottomBar/FunBottomBar';
3
4
  export { CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, MODAL_BOTTOM_BAR_IDS, type ModalBottomBarIdType, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
4
5
  interface DialogProps {
5
6
  open: boolean;
@@ -37,10 +38,10 @@ interface DialogProps {
37
38
  */
38
39
  export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withTransition, testId, isFanaticsBottomSheet, backgroundOverlay, withoutBorder, }: DialogProps): React.ReactPortal | null;
39
40
  export declare namespace Dialog {
40
- var Title: ({ title, titleMeta, customContent, background, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
41
- var Content: ({ children, fullHeight, className, id, paddingTop, withTopDivider, withBottomDivider, withoutBottomPadding, withoutSidePadding, extraContentTopPadding, withChildScrollArea, ...boxProps }: DialogContentProps) => React.JSX.Element;
42
- var BottomSection: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
43
- var BottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, onCloseLabel, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
41
+ export { DialogTitle as Title };
42
+ export { DialogContent as Content };
43
+ export { DialogBottom as BottomSection };
44
+ export { FunBottomBar as BottomBar };
44
45
  }
45
46
  interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'paddingY' | 'paddingLeft' | 'paddingRight' | 'paddingBottom'> {
46
47
  children: ReactNode;
@@ -62,6 +63,12 @@ interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'pa
62
63
  */
63
64
  withChildScrollArea?: boolean;
64
65
  }
66
+ declare const DialogContent: ({ children, fullHeight, className, id, paddingTop, withTopDivider, withBottomDivider, withoutBottomPadding, withoutSidePadding, extraContentTopPadding, withChildScrollArea, ...boxProps }: DialogContentProps) => React.JSX.Element;
67
+ /**
68
+ * Only use this component if modal has deeply nested components with complicated logic
69
+ * @returns a placeholder wrapper that should be used as an element into which the bottom bar is rendered (with a portal)
70
+ */
71
+ declare const DialogBottom: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
65
72
  export interface DialogTitleProps {
66
73
  title?: string;
67
74
  titleMeta?: string;
@@ -81,3 +88,4 @@ export interface DialogTitleProps {
81
88
  onBack?: () => void;
82
89
  className?: string;
83
90
  }
91
+ declare const DialogTitle: ({ title, titleMeta, customContent, background, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  export declare const MODAL_BOTTOM_BAR_WRAPPER_ID = "fun-modal-bottom-bar-wrapper";
2
2
  export declare const MODAL_BOTTOM_BAR_IDS: {
3
- readonly checkout: "checkout-modal-bottom-bar";
4
- readonly withdrawal: "withdrawal-modal-bottom-bar";
5
- readonly connectwallet: "connect-wallet-modal-bottom-bar";
3
+ readonly checkout: 'checkout-modal-bottom-bar';
4
+ readonly withdrawal: 'withdrawal-modal-bottom-bar';
5
+ readonly connectwallet: 'connect-wallet-modal-bottom-bar';
6
6
  };
7
7
  export type ModalBottomBarIdType = keyof typeof MODAL_BOTTOM_BAR_IDS;
8
8
  export declare function useBottomSectionRef(modalBottomBarIdType?: ModalBottomBarIdType): HTMLElement | null;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
- export declare const FreeUsdcBanner: ({ marginBottom, type, }: Pick<BoxProps, "marginBottom"> & {
4
- type: "deposit" | "withdrawal";
3
+ export declare const FreeUsdcBanner: ({ marginBottom, type, }: Pick<BoxProps, 'marginBottom'> & {
4
+ type: 'deposit' | 'withdrawal';
5
5
  }) => React.JSX.Element | null;
@@ -3,8 +3,10 @@ import { type FunButtonProps } from '../FunButton/FunButton';
3
3
  export interface FunBottomBarProps {
4
4
  topSection?: React.ReactNode;
5
5
  topSectionVisible?: boolean;
6
+ /** Allows for smooth height transition when toggling visibility of top section */
7
+ isTopSectionAnimated?: boolean;
6
8
  actionButtonProps?: FunButtonProps;
7
9
  onClose?: () => void;
8
10
  onCloseLabel?: string;
9
11
  }
10
- export declare const FunBottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, onCloseLabel, }: FunBottomBarProps) => React.JSX.Element | null;
12
+ export declare const FunBottomBar: ({ topSection, topSectionVisible, isTopSectionAnimated, actionButtonProps, onClose, onCloseLabel, }: FunBottomBarProps) => React.JSX.Element | null;
@@ -5,4 +5,4 @@ export type InfoBannerProps = {
5
5
  type: 'warning' | 'alert' | 'announcement';
6
6
  expireAtMs?: number;
7
7
  };
8
- export declare const InfoBanner: ({ message, type, }: Omit<InfoBannerProps, "expireAtMs">) => React.JSX.Element;
8
+ export declare const InfoBanner: ({ message, type, }: Omit<InfoBannerProps, 'expireAtMs'>) => React.JSX.Element;
@@ -42,4 +42,4 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
42
42
  testId?: string;
43
43
  }
44
44
  export type FunInputChangeEvent = ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
45
- export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLTextAreaElement | HTMLInputElement> & React.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
45
+ export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLInputElement | HTMLTextAreaElement> & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
@@ -1 +1 @@
1
- export declare const funOptionBoxStyle: Record<"baseStyle" | "compactListStyle" | "defaultBorder" | "defaultModeNotActiveBorder" | "activeBorder" | "disabledOptionBorder" | "defaultBackground" | "borderedBackground" | "activeBackground" | "uninteractiveBackground", string>;
1
+ export declare const funOptionBoxStyle: Record<"activeBackground" | "activeBorder" | "baseStyle" | "borderedBackground" | "compactListStyle" | "defaultBackground" | "defaultBorder" | "defaultModeNotActiveBorder" | "disabledOptionBorder" | "uninteractiveBackground", string>;
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
1
+ import React, { type ReactNode, type RefObject } from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
3
  export interface FunTooltipProps {
4
4
  content: ReactNode;
@@ -34,5 +34,5 @@ export interface FunTooltipProps {
34
34
  startDelay?: number;
35
35
  width?: BoxProps['width'];
36
36
  }
37
- export declare const TooltipAnchorRefContext: React.Context<React.RefObject<HTMLElement | null> | null>;
37
+ export declare const TooltipAnchorRefContext: React.Context<RefObject<HTMLElement | null> | null>;
38
38
  export declare const FunTooltip: ({ content, children, tooltipPosition, side, sideOffset, maxWidth, startDelay, width, }: FunTooltipProps) => React.JSX.Element;
@@ -22,8 +22,10 @@ interface PaymentFeesSummaryProps {
22
22
  extraFeeItems?: FeeItem[];
23
23
  /** Overrides `confirmationScreen.showTransactionDigest` for screens that always want the collapsed preview */
24
24
  isFeePreviewEnabled?: boolean;
25
+ /** Overrides `confirmationScreen.showSelectedRoute` for screens that always name the route */
26
+ isSelectedRouteEnabled?: boolean;
25
27
  }
26
- export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, extraFeeItems, isFeePreviewEnabled, }: PaymentFeesSummaryProps): React.JSX.Element;
28
+ export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, extraFeeItems, isFeePreviewEnabled, isSelectedRouteEnabled, }: PaymentFeesSummaryProps): React.JSX.Element;
27
29
  export interface FeeItem {
28
30
  label: string;
29
31
  value: string;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface HighPriceImpactAlertProps {
3
+ /** Expected loss on the quote, in percent. */
4
+ impactPercent: number;
5
+ }
6
+ export declare function HighPriceImpactAlert({ impactPercent, }: HighPriceImpactAlertProps): React.JSX.Element;
7
+ export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- export declare const GreenRoundCheckmark: ({ size }: {
2
+ export declare const GreenRoundCheckmark: ({ size, fill, }: {
3
3
  size?: number;
4
+ fill?: string;
4
5
  }) => React.JSX.Element;
@@ -9,8 +9,8 @@ declare const variants: {
9
9
  };
10
10
  export declare const slots: {
11
11
  container: string;
12
- icon: Record<"success" | "secondary", string>;
13
- background: Record<"success" | "secondary", string>;
12
+ icon: Record<"secondary" | "success", string>;
13
+ background: Record<"secondary" | "success", string>;
14
14
  innerShadow: string;
15
15
  };
16
16
  export {};
@@ -7,9 +7,9 @@ export type TransactionIconProps = {
7
7
  pathRef: RefObject<SVGPathElement>;
8
8
  } & SVGAttributes<SVGSVGElement>;
9
9
  export declare const TransactionIcon: React.ForwardRefExoticComponent<{
10
- type: "loading" | "success" | "merge";
10
+ type: 'loading' | 'success' | 'merge';
11
11
  pathRef: RefObject<SVGPathElement>;
12
- } & React.SVGAttributes<SVGSVGElement> & React.RefAttributes<unknown>>;
12
+ } & SVGAttributes<SVGSVGElement> & React.RefAttributes<unknown>>;
13
13
  export type StatusIconProps = {
14
14
  animateEntrance?: boolean;
15
15
  backgroundSize?: number;
@@ -13,6 +13,8 @@ export interface LargeAmountInputProps {
13
13
  suffix?: string;
14
14
  placeholder?: string;
15
15
  readOnly?: boolean;
16
+ /** A press anywhere on the amount, affixes included; fires on read-only fields too. */
17
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
16
18
  autoFocus?: boolean;
17
19
  /** Defaults to the theme `inputAmount` size. */
18
20
  maxFontSize?: number;
@@ -25,4 +27,4 @@ export interface LargeAmountInputProps {
25
27
  /**
26
28
  * Big "$<amount>" field that shrinks its font to fit the available width.
27
29
  */
28
- export declare function LargeAmountInput({ amount, onAmountChange, ariaLabel, align, prefix, suffix, placeholder, readOnly, autoFocus, maxFontSize: maxFontSizeProp, maxAvailableWidth, width, testId, }: LargeAmountInputProps): React.JSX.Element;
30
+ export declare function LargeAmountInput({ amount, onAmountChange, ariaLabel, align, prefix, suffix, placeholder, readOnly, onClick, autoFocus, maxFontSize: maxFontSizeProp, maxAvailableWidth, width, testId, }: LargeAmountInputProps): React.JSX.Element;
@@ -12,8 +12,8 @@ type Props = {
12
12
  testId?: string;
13
13
  isFunkitSdkConnector?: boolean;
14
14
  };
15
- export declare const ModalSelection: {
16
- ({ as, currentlySelected, iconBackground, iconUrl, icon, name, onClick, ready, recent, testId, isFunkitSdkConnector, ...urlProps }: Props): React.JSX.Element;
17
- displayName: string;
18
- };
15
+ export declare function ModalSelection({ as, currentlySelected, iconBackground, iconUrl, icon, name, onClick, ready, recent, testId, isFunkitSdkConnector, ...urlProps }: Props): React.JSX.Element;
16
+ export declare namespace ModalSelection {
17
+ var displayName: string;
18
+ }
19
19
  export {};
@@ -5,7 +5,7 @@ export interface TokenSwapToken {
5
5
  chainId?: string | number;
6
6
  }
7
7
  export interface TokenSelectButtonProps {
8
- /** Omit when nothing is picked yet; the button then reads "Select token". */
8
+ /** Omit when nothing is picked yet; the button then reads "Select token" as a primary button. */
9
9
  token?: TokenSwapToken;
10
10
  /** Omit to render the token without the picker affordance. */
11
11
  onClick?: () => void;
@@ -18,22 +18,35 @@ interface TokenSwapCardContentProps {
18
18
  amountPrefix?: string;
19
19
  /** Present only on the editable (source) card. */
20
20
  onAmountChange?: (next: string) => void;
21
+ /** To card only: a press on the read-only amount shakes its row and calls this; omit to leave it inert. */
22
+ onAmountClick?: () => void;
21
23
  /** The amount in the other unit, already formatted. */
22
24
  convertedAmount: string;
23
25
  onToggleUnit?: () => void;
24
26
  balance?: string;
25
- /** Makes the balance a button, e.g. to fill in Max. */
26
- onBalanceClick?: () => void;
27
+ /** Shows the percentage presets beside the label; 100 is Max. */
28
+ onPercentSelect?: (percent: number) => void;
27
29
  isLoading?: boolean;
28
30
  /** Keeps the layout but makes every control inert. */
29
31
  isDisabled?: boolean;
30
32
  testId: string;
31
33
  }
32
34
  export type TokenSwapCardProps = TokenSwapCardContentProps & TokenSwapDepositState;
35
+ /** A swap card's shell: `from` is outlined, `to` filled. Shared with the skeleton so both line up. */
36
+ export declare function TokenSwapCardFrame({ variant, testId, children, }: {
37
+ variant: 'from' | 'to';
38
+ testId?: string;
39
+ children: React.ReactNode;
40
+ }): React.JSX.Element;
41
+ /** One row of a swap card: content at the start, content at the end. */
42
+ export declare function TokenSwapCardRow({ children, ref, }: {
43
+ children: React.ReactNode;
44
+ ref?: React.Ref<HTMLElement>;
45
+ }): React.JSX.Element;
33
46
  /**
34
47
  * One card of the swap widget.
35
- * - `from`: outlined, unit toggle, highlighted balance; editable unless a deposit is required.
48
+ * - `from`: outlined, unit toggle, percentage presets; editable unless a deposit is required.
36
49
  * - `to`: filled background, read-only, amount comes from the quote.
37
50
  */
38
- export declare function TokenSwapCard({ variant, label, token, isDepositRequired, onDeposit, onTokenClick, amount, amountPrefix, onAmountChange, convertedAmount, onToggleUnit, balance, onBalanceClick, isLoading, isDisabled, testId, }: TokenSwapCardProps): React.JSX.Element;
51
+ export declare function TokenSwapCard({ variant, label, token, isDepositRequired, onDeposit, onTokenClick, amount, amountPrefix, onAmountChange, onAmountClick, convertedAmount, onToggleUnit, balance, onPercentSelect, isLoading, isDisabled, testId, }: TokenSwapCardProps): React.JSX.Element;
39
52
  export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface TokenSwapPercentOptionsProps {
3
+ /** Fired with the chosen share of the balance (100 = Max). */
4
+ onSelect: (percent: number) => void;
5
+ isDisabled?: boolean;
6
+ testId: string;
7
+ }
8
+ /** The 25% / 50% / 75% / Max row on the source card. */
9
+ export declare function TokenSwapPercentOptions({ onSelect, isDisabled, testId, }: TokenSwapPercentOptionsProps): React.JSX.Element;
@@ -16,12 +16,14 @@ export type TokenSwapFrom = TokenSwapAmounts & TokenSwapDepositState & {
16
16
  /** What the user typed, in `unit`. */
17
17
  inputValue: string;
18
18
  onInputChange: (next: string) => void;
19
- /** Omit while Max is unknown; the balance then stays plain text. */
20
- onBalanceClick?: () => void;
19
+ /** Omit to hide the percentage presets (e.g. nothing to take a share of); 100 is Max. */
20
+ onPercentSelect?: (percent: number) => void;
21
21
  };
22
22
  export interface TokenSwapTo extends TokenSwapAmounts {
23
23
  /** Shows a skeleton in place of the amount while the quote loads. */
24
24
  isLoading?: boolean;
25
+ /** A press on the read-only amount shakes its row and calls this, e.g. to point to From. */
26
+ onAmountClick?: () => void;
25
27
  }
26
28
  export interface TokenSwapWidgetProps {
27
29
  from: TokenSwapFrom;
@@ -41,3 +43,5 @@ export interface TokenSwapWidgetProps {
41
43
  * caller owns amounts, quotes and token selection.
42
44
  */
43
45
  export declare function TokenSwapWidget({ from, to, unit, onToggleUnit, onSwapDirection, isSwapDirectionDisabled, isDisabled, }: TokenSwapWidgetProps): React.JSX.Element;
46
+ /** The swap icon as decoration only, for a widget that can't swap. */
47
+ export declare function SwapDirectionIcon(): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ /** The swap widget's layout while there's nothing to show in it yet. */
3
+ export declare function TokenSwapWidgetSkeleton(): React.JSX.Element;
@@ -7,11 +7,11 @@ export declare enum CheckoutInitStepMessage {
7
7
  WAITING_FOR_CONFIRMATION = 4
8
8
  }
9
9
  export declare const getCheckoutStepMessage: (t: TFunction) => {
10
- 1: string;
11
- 0: string;
12
- 2: string;
13
- 3: string;
14
- 4: string;
10
+ [CheckoutInitStepMessage.PREPARING_DATA]: string;
11
+ [CheckoutInitStepMessage.CONFIRMING]: string;
12
+ [CheckoutInitStepMessage.SWITCH_CHAIN]: string;
13
+ [CheckoutInitStepMessage.WAITING_FOR_SIGNATURE]: string;
14
+ [CheckoutInitStepMessage.WAITING_FOR_CONFIRMATION]: string;
15
15
  };
16
16
  export declare enum Web3AccountBalanceMessage {
17
17
  SIGN_TX = 0,
@@ -19,7 +19,7 @@ export declare enum Web3AccountBalanceMessage {
19
19
  APPROVE_TRANSFER = 2
20
20
  }
21
21
  export declare const getWeb3AccountBalanceMessage: (t: TFunction) => {
22
- 0: string;
23
- 1: string;
24
- 2: (tokenSymbol: string) => string;
22
+ [Web3AccountBalanceMessage.SIGN_TX]: string;
23
+ [Web3AccountBalanceMessage.SWITCH_CHAIN]: string;
24
+ [Web3AccountBalanceMessage.APPROVE_TRANSFER]: (tokenSymbol: string) => string;
25
25
  };
@@ -24,7 +24,11 @@ export declare function isFanaticsCustomer(apiKey: string): apiKey is "lI7amueGK
24
24
  export declare function isAaveCustomer(apiKey: string): apiKey is "EWzSv8tWnQ7UcZ2IsDqFw1dYo3Df56FX6KBJ5ztS";
25
25
  export declare function isNadoCustomer(apiKey: string): apiKey is "iFwbI36PWs6egzqjemCVz8PRmDwaANr51WtaARhV";
26
26
  export declare function isMallardCustomer(apiKey: string): apiKey is "hxiC33LDFN9BekjyOXfYo597NQ6TdkBG9soUGyW2";
27
- /** Whether a wallet balance must be kept out of this customer's balance UI. */
27
+ /**
28
+ * Whether a wallet balance must be kept out of this customer's balance UI.
29
+ * Robinhood stock tokens show only where the customer's Relay key routes them:
30
+ * every stock for Lighter RH, Arcus's own eight for Mallard.
31
+ */
28
32
  export declare function isTokenHiddenForCustomer(apiKey: string, chainId: string, tokenAddress: string): boolean;
29
33
  /**
30
34
  * Gates the source-select "Native" fast-path: when the connected wallet
@@ -17,8 +17,8 @@ export declare const POLYMARKET_PERPS_ROUTING_ID = "POLYMARKET_PERPS";
17
17
  export declare const POLYGON_USDCE: Address;
18
18
  export declare const PUSD_TOKEN: {
19
19
  readonly address: `0x${string}`;
20
- readonly symbol: "pUSD";
21
- readonly iconSrc: "https://sdk-cdn.fun.xyz/images/pusd.svg";
20
+ readonly symbol: 'pUSD';
21
+ readonly iconSrc: 'https://sdk-cdn.fun.xyz/images/pusd.svg';
22
22
  };
23
23
  /**
24
24
  * Customer-scoped destination-token override for the token-transfer param
@@ -7,37 +7,46 @@ export declare enum PendingQuoteMessage {
7
7
  FINALIZING = 3
8
8
  }
9
9
  export declare const getPendingQuoteMessageGenerator: (t: TFunction) => {
10
- 0: () => string;
11
- 1: (provider: string) => string;
12
- 2: () => string;
13
- 3: () => string;
10
+ [PendingQuoteMessage.PREPARING]: () => string;
11
+ [PendingQuoteMessage.VERIFYING_PROVIDER]: (provider: string) => string;
12
+ [PendingQuoteMessage.ESTIMATING_GAS]: () => string;
13
+ [PendingQuoteMessage.FINALIZING]: () => string;
14
14
  };
15
+ declare enum QuoteApiErrorType {
16
+ NO_ROUTE_FOUND_1 = 0,
17
+ NO_ROUTE_FOUND_2 = 1,
18
+ INSUFFICIENT_AMOUNT_GENERAL_1 = 2,
19
+ INSUFFICIENT_AMOUNT_GENERAL_2 = 3,
20
+ INSUFFICIENT_AMOUNT_FOR_BRDIGE_1 = 4,
21
+ INSUFFICIENT_AMOUNT_FOR_BRDIGE_2 = 5,
22
+ NO_ROUTE_FOUND_RELAY = 6
23
+ }
15
24
  export declare const getQuoteApiErrorDisplayInfo: (t: TFunction) => {
16
- 0: {
25
+ [QuoteApiErrorType.NO_ROUTE_FOUND_1]: {
17
26
  check: string;
18
27
  display: ErrorNotification;
19
28
  };
20
- 1: {
29
+ [QuoteApiErrorType.NO_ROUTE_FOUND_2]: {
21
30
  check: string;
22
31
  display: ErrorNotification;
23
32
  };
24
- 6: {
33
+ [QuoteApiErrorType.NO_ROUTE_FOUND_RELAY]: {
25
34
  check: string;
26
35
  display: DisplayedError;
27
36
  };
28
- 2: {
37
+ [QuoteApiErrorType.INSUFFICIENT_AMOUNT_GENERAL_1]: {
29
38
  check: string;
30
39
  display: DisplayedError;
31
40
  };
32
- 3: {
41
+ [QuoteApiErrorType.INSUFFICIENT_AMOUNT_GENERAL_2]: {
33
42
  check: string;
34
43
  display: DisplayedError;
35
44
  };
36
- 4: {
45
+ [QuoteApiErrorType.INSUFFICIENT_AMOUNT_FOR_BRDIGE_1]: {
37
46
  check: string;
38
47
  display: DisplayedError;
39
48
  };
40
- 5: {
49
+ [QuoteApiErrorType.INSUFFICIENT_AMOUNT_FOR_BRDIGE_2]: {
41
50
  check: string;
42
51
  display: DisplayedError;
43
52
  };
@@ -49,21 +58,22 @@ export declare enum QuoteCustomErrorType {
49
58
  INSUFFICIENT_AMOUNT_POST_CHECK = 3
50
59
  }
51
60
  export declare const getQuoteCustomErrorDisplayInfo: (t: TFunction) => {
52
- 0: {
61
+ [QuoteCustomErrorType.INSUFFICIENT_BALANCE_PRE_CHECK]: {
53
62
  check: string;
54
63
  display: DisplayedError;
55
64
  };
56
- 1: {
65
+ [QuoteCustomErrorType.INSUFFICIENT_TOKEN_BALANCE_PRE_CHECK]: {
57
66
  check: string;
58
67
  display: DisplayedError;
59
68
  };
60
- 2: {
69
+ [QuoteCustomErrorType.INSUFFICIENT_BALANCE_POST_CHECK]: {
61
70
  check: string;
62
71
  display: DisplayedError;
63
72
  };
64
- 3: {
73
+ [QuoteCustomErrorType.INSUFFICIENT_AMOUNT_POST_CHECK]: {
65
74
  check: string;
66
75
  display: DisplayedError;
67
76
  };
68
77
  };
69
78
  export declare function generateQuoteApiErrorForDisplay(err: Error, t: TFunction): DisplayedError;
79
+ export {};
@@ -2,5 +2,5 @@ import { type ThemeVars } from './sprinkles.css';
2
2
  export declare function cssObjectFromTheme(theme: ThemeVars | (() => ThemeVars), { extends: baseTheme }?: {
3
3
  extends?: ThemeVars | (() => ThemeVars);
4
4
  }): {
5
- [cssVarName: string]: string;
5
+ [k: string]: string;
6
6
  };