@funkit/connect 9.3.1 → 9.4.1

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 (38) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/{chunk-JKGPN2BQ.js → chunk-BSF2AKBC.js} +17 -0
  3. package/dist/{chunk-VIJQ5A6W.js → chunk-DBRUJYOQ.js} +12 -1
  4. package/dist/{chunk-WXEL44DS.js → chunk-IZC4ZKKQ.js} +12 -1
  5. package/dist/clients/fanatics.css +5283 -4386
  6. package/dist/clients/fanatics.js +2 -2
  7. package/dist/clients/polymarket.d.ts +5 -1
  8. package/dist/clients/polymarket.js +11 -15
  9. package/dist/components/Box/Box.d.ts +40 -40
  10. package/dist/components/Dropdown/BaseDropdown.css.d.ts +2 -0
  11. package/dist/components/Dropdown/BaseDropdown.d.ts +49 -6
  12. package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +2 -2
  13. package/dist/components/FunInput/FunInput.css.d.ts +1 -0
  14. package/dist/components/Tabs/Tabs.d.ts +1 -0
  15. package/dist/components/Tabs/tabs.css.d.ts +1 -1
  16. package/dist/config/getDefaultConfig.d.ts +1 -1
  17. package/dist/css/sprinkles.css.d.ts +110 -40
  18. package/dist/domains/asset.d.ts +8 -3
  19. package/dist/hooks/track/CheckoutModalEvent.d.ts +3 -1
  20. package/dist/hooks/useMainnetEnsAvatar.d.ts +1 -1
  21. package/dist/hooks/useScrollDivider.d.ts +10 -2
  22. package/dist/index.css +5340 -4393
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +1077 -687
  25. package/dist/modals/CheckoutModal/CheckoutBlockedReason.d.ts +1 -0
  26. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +1 -1
  27. package/dist/modals/CheckoutModal/useCheckoutBlocked.d.ts +18 -0
  28. package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
  29. package/dist/providers/FunkitThemeProvider.d.ts +105 -0
  30. package/dist/providers/GeneralWalletProvider.d.ts +5 -5
  31. package/dist/providers/SwappedProvider.d.ts +3 -1
  32. package/dist/themes/baseTheme.js +1 -1
  33. package/dist/themes/darkTheme.js +2 -2
  34. package/dist/themes/lightTheme.js +2 -2
  35. package/dist/utils/checkout.d.ts +1 -1
  36. package/dist/utils/swapped.d.ts +4 -0
  37. package/dist/wallets/walletConnectors/index.js +35 -35
  38. package/package.json +5 -5
@@ -3,6 +3,11 @@ import type { Address } from 'viem';
3
3
  import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
4
4
  import type { AssetHoldingsItem } from '../utils/assets';
5
5
  import { PaymentMethod } from '../domains/paymentMethods';
6
+ /**
7
+ * Calculates the minimum USD value an asset must have to be considered usable for checkout.
8
+ * Accounts for the customer's configured minimum deposit and a global floor.
9
+ */
10
+ export declare function getMinValueThreshold(config: FunkitCheckoutConfig | undefined, minUsdRequired?: number): number;
6
11
  export declare const isStablecoin: (symbol: string) => boolean;
7
12
  export declare function isPreferredChain(chainId: number, additionalChains?: number[]): boolean;
8
13
  export declare function isNativeTokenAddress(address: Address): boolean;
@@ -18,14 +23,14 @@ interface AssetUsableToPayParms {
18
23
  assetTokenAddress: string;
19
24
  assetUsdAmount: number | null;
20
25
  isAllowedForCheckout: boolean;
21
- minUsdRequired?: number;
26
+ minValueThreshold: number;
22
27
  isDynamicRoutingEnabled: boolean;
23
28
  t: TFunction;
24
29
  }
25
- export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minUsdRequired, isDynamicRoutingEnabled, t, }: AssetUsableToPayParms) => {
30
+ export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold, isDynamicRoutingEnabled, t, }: AssetUsableToPayParms) => {
26
31
  isUsable: boolean;
27
32
  reason: string;
28
- minUsdRequired?: number;
33
+ minUsdWithFees?: number;
29
34
  };
30
35
  export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
31
36
  export {};
@@ -55,5 +55,7 @@ export declare enum CheckoutModalEvent {
55
55
  SWAPPED_IFRAME_ERROR = "fc::swapped_iframe::error",
56
56
  SWAPPED_IFRAME_BACK = "fc::swapped_iframe::back",
57
57
  SWAPPED_IFRAME_NEW_DEPOSIT_BACK = "fc::swapped_iframe::new_deposit_back",
58
- SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit"
58
+ SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit",
59
+ SWAPPED_IFRAME_ORDER_DATA = "fc::swapped_iframe::order_data",
60
+ SWAPPED_IFRAME_LOGOUT = "fc::swapped_iframe::logout"
59
61
  }
@@ -1,2 +1,2 @@
1
1
  import { type GetEnsNameReturnType } from 'viem/ens';
2
- export declare function useMainnetEnsAvatar(name: GetEnsNameReturnType | undefined): import("viem/ens").GetEnsAvatarReturnType | undefined;
2
+ export declare function useMainnetEnsAvatar(name: GetEnsNameReturnType | undefined): import("viem").GetEnsAvatarReturnType | undefined;
@@ -1,11 +1,19 @@
1
+ export type UseScrollDividerResult = {
2
+ hasBottomDivider: boolean;
3
+ hasTopDivider: boolean;
4
+ isAtBottom: boolean;
5
+ isScrollable: boolean;
6
+ isScrolling: boolean;
7
+ ref: (node: HTMLElement | null) => void;
8
+ };
1
9
  /**
2
10
  * @returns information about which dividers to display based on whether an observed content is scrolled to the top or bottom
3
11
  */
4
12
  export declare const useScrollDivider: () => {
5
- ref: import("react").RefObject<HTMLInputElement | null>;
13
+ ref: (node: HTMLElement | null) => void;
6
14
  hasTopDivider: boolean;
7
15
  hasBottomDivider: boolean;
16
+ isAtBottom: boolean;
8
17
  isScrolling: boolean;
9
18
  isScrollable: boolean;
10
- isAtBottom: boolean;
11
19
  };