@funkit/connect 9.3.2 → 9.4.3

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 (64) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/__generated__/default_configs.d.ts +222 -12
  3. package/dist/__generated__/default_feature_gates.d.ts +1 -0
  4. package/dist/{chunk-MXNOQTKX.js → chunk-O35RTEEF.js} +17 -1
  5. package/dist/{chunk-RHUOOPDI.js → chunk-S65TG73G.js} +12 -1
  6. package/dist/{chunk-AGBRSMZ7.js → chunk-VLAOBEJN.js} +12 -1
  7. package/dist/clients/fanatics.css +5285 -4388
  8. package/dist/clients/fanatics.js +2 -2
  9. package/dist/clients/polymarket.d.ts +5 -1
  10. package/dist/clients/polymarket.js +11 -15
  11. package/dist/components/Box/Box.d.ts +40 -40
  12. package/dist/components/Dropdown/BaseDropdown.css.d.ts +2 -2
  13. package/dist/components/Dropdown/BaseDropdown.d.ts +50 -6
  14. package/dist/components/Dropdown/ChainDropdown.d.ts +5 -2
  15. package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +7 -1
  16. package/dist/components/Dropdown/TokenDropdown.d.ts +3 -1
  17. package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +2 -2
  18. package/dist/components/FunInput/FunInput.css.d.ts +1 -0
  19. package/dist/components/ModalHeightAnimationLayer/WithdrawalModalHeightAnimationWrapper.d.ts +1 -1
  20. package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
  21. package/dist/components/Tabs/Tabs.d.ts +1 -0
  22. package/dist/components/Tabs/tabs.css.d.ts +1 -1
  23. package/dist/config/getDefaultConfig.d.ts +1 -1
  24. package/dist/css/sprinkles.css.d.ts +108 -40
  25. package/dist/hooks/statsig/useFeatureGate.d.ts +3 -6
  26. package/dist/hooks/useBluvo.d.ts +1215 -5
  27. package/dist/hooks/useMainnetEnsAvatar.d.ts +1 -1
  28. package/dist/hooks/useScrollDivider.d.ts +10 -2
  29. package/dist/hooks/useSupportedAssets.d.ts +9 -0
  30. package/dist/hooks/{useTokenChain.d.ts → useTokenAndChainDropdown.d.ts} +8 -2
  31. package/dist/hooks/useTokenTransfer.d.ts +1 -0
  32. package/dist/hooks/useTokenTransferConfig.d.ts +2 -0
  33. package/dist/index.css +5390 -4440
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +2621 -1490
  36. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +1 -1
  37. package/dist/modals/CheckoutModal/CheckoutBlockedReason.d.ts +1 -0
  38. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
  39. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +1 -1
  40. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsListLoading.d.ts +6 -0
  41. package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +6 -0
  42. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +3 -1
  43. package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
  44. package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -1
  45. package/dist/modals/CheckoutModal/useCheckoutBlocked.d.ts +18 -0
  46. package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
  47. package/dist/providers/FunkitThemeProvider.d.ts +102 -0
  48. package/dist/providers/GeneralWalletProvider.d.ts +5 -5
  49. package/dist/themes/baseTheme.js +1 -1
  50. package/dist/themes/darkTheme.js +2 -2
  51. package/dist/themes/lightTheme.js +2 -2
  52. package/dist/utils/bluvo.d.ts +99 -1
  53. package/dist/utils/checkout.d.ts +1 -1
  54. package/dist/utils/swapped.d.ts +1 -0
  55. package/dist/utils/tokenTransfer/disabledList.d.ts +14 -0
  56. package/dist/utils/tokenTransfer/types.d.ts +26 -0
  57. package/dist/wallets/walletConnectors/index.js +42 -42
  58. package/package.json +10 -10
  59. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalCallbackSuccess.d.ts +0 -0
  60. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalContent.d.ts +0 -0
  61. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalModal.d.ts +0 -0
  62. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalSuccess.d.ts +0 -0
  63. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/types.d.ts +0 -0
  64. /package/dist/modals/{WithdrwalModal → WithdrawalModal}/useWithdrawal.d.ts +0 -0
@@ -1,5 +1,5 @@
1
+ export declare const SCROLL_GRADIENT_SIZE_PX = 48;
1
2
  export declare const BORDER_RADIUS = "dropdown";
2
- export declare const DROPDOWN_ANIMATION_DURATION = 150;
3
- export declare const dropdownBoxStyles: string;
4
3
  export declare const scrollableDropdownStyles: string;
4
+ export declare const scrollGradientWrapperStyles: string;
5
5
  export declare const baseDropdownItemWrapperStyles: string;
@@ -1,21 +1,65 @@
1
1
  import React from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
3
  import { type BaseActiveDropdownItemProps } from './BaseActiveDropdownItem';
4
+ import './BaseDropdownAnimation.css';
4
5
  /** gap between the icon and the label of the item */
5
6
  export declare const HORIZONTAL_ICON_GAP = "4";
6
7
  /** safe spacing, ie. padding, on the left & right of the active item and dropdown item */
7
8
  export declare const HORIZONTAL_OUTER_PADDING_X = "12";
8
- export interface BaseDropdownOption<T = string> {
9
+ export declare const NO_SELECTION_VALUE = "";
10
+ export interface BaseDropdownOption<T = string, G extends string = never> {
9
11
  label: string;
10
12
  value: T;
13
+ /**
14
+ * For grouped dropdowns, this is the {@link BaseDropdownGroup.key} of the group this option belongs to.
15
+ *
16
+ * If omitted, or if no group has the key, the option is treated as ungrouped.
17
+ *
18
+ * _See {@link BaseDropdownProps.groups} and {@link BaseDropdownProps.showOthersGroup}_
19
+ */
20
+ group?: G;
21
+ }
22
+ export interface BaseDropdownGroup<G extends string> {
23
+ key: G;
24
+ label: string;
11
25
  }
12
- export interface BaseDropdownProps {
26
+ export interface BaseDropdownProps<T = string, G extends string = never> {
13
27
  value: string;
14
28
  activeItemProps?: Partial<Pick<BaseActiveDropdownItemProps, 'iconComponent' | 'label' | 'color' | 'alwaysVisibleLabel' | 'tagComponent' | 'tagPosition' | 'background'>>;
15
- options: BaseDropdownOption[];
29
+ /**
30
+ * List of groups to show and the corresponding labels, in the expected order.
31
+ *
32
+ * _Defaults to ungrouped dropdown behavior_
33
+ */
34
+ groups?: BaseDropdownGroup<G>[];
35
+ /**
36
+ * Additional group displayed after configured groups (only if there are non-empty groups).
37
+ * - "all": display all options (grouped options will effectively be shown twice in total)
38
+ * - "others": display only ungrouped options
39
+ *
40
+ * _Defaults to "others"_
41
+ */
42
+ additionalGroup?: 'all' | 'others';
43
+ /**
44
+ * Label for the {@link additionalGroup}.
45
+ *
46
+ * Shows only if the additional group is not empty.
47
+ */
48
+ additionalGroupLabel?: string;
49
+ /**
50
+ * If specified, show an "Unselect" option with value {@link NO_SELECTION_VALUE} above other options/groups
51
+ *
52
+ * _Defaults to `false`_
53
+ */
54
+ allowUnselect?: boolean;
55
+ /**
56
+ * Label for {@link allowUnselect}
57
+ */
58
+ unselectLabel?: string;
59
+ options: BaseDropdownOption<T, G>[];
16
60
  onOpen?: () => void;
17
- onOptionSelected?: (item: BaseDropdownOption) => void;
18
- renderDropdownOption: (item: BaseDropdownOption, isSelected: boolean) => React.ReactNode;
61
+ onOptionSelected?: (item: BaseDropdownOption<T, G>) => void;
62
+ renderDropdownOption: (item: BaseDropdownOption<T, G>, isSelected: boolean) => React.ReactNode;
19
63
  searchableOptions?: boolean;
20
64
  searchPlaceholder?: string;
21
65
  placeholder?: string;
@@ -37,5 +81,5 @@ export interface BaseDropdownProps {
37
81
  maxDropdownHeight?: number;
38
82
  testId?: string;
39
83
  }
40
- declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, testId, }: BaseDropdownProps): React.JSX.Element;
84
+ declare function BaseDropdown<T extends string = string, G extends string = never>({ activeItemProps, value, options, groups, additionalGroup, additionalGroupLabel, allowUnselect, unselectLabel, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, testId, }: BaseDropdownProps<T, G>): React.JSX.Element;
41
85
  export default BaseDropdown;
@@ -4,7 +4,8 @@ import type { BaseActiveDropdownItemProps } from './BaseActiveDropdownItem';
4
4
  import { type BaseDropdownProps } from './BaseDropdown';
5
5
  interface ChainDropdownProps {
6
6
  assets: TokenTransferSourceChainsAndAssets;
7
- chainIds?: number[];
7
+ /** Chain IDs in display order. If provided, determines the dropdown order. */
8
+ chainIdSortOrder?: number[];
8
9
  selectedChainId?: number;
9
10
  selectedToken?: string;
10
11
  onChainSelected: (chainId: number | undefined,
@@ -23,6 +24,8 @@ interface ChainDropdownProps {
23
24
  maxDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
24
25
  tagComponent?: (value: string) => React.ReactNode;
25
26
  testId?: string;
27
+ /** Default chain ID — promoted to first position in the dropdown */
28
+ defaultChainId?: number;
26
29
  }
27
- export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, testId, }: ChainDropdownProps) => React.JSX.Element;
30
+ export declare const ChainDropdown: ({ assets, chainIdSortOrder, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, testId, defaultChainId, }: ChainDropdownProps) => React.JSX.Element;
28
31
  export {};
@@ -26,7 +26,13 @@ interface TokenAndChainDropdownProps {
26
26
  * Override to hide the new token badge
27
27
  */
28
28
  hideNewTokenBadge?: boolean;
29
+ /** Token symbols to prioritize at top of dropdown */
30
+ priorityTokenSymbols?: string[];
31
+ /** Determines the chain display order */
32
+ chainIdSortOrder?: number[];
33
+ /** Default chain ID — promoted to first position in chain dropdown */
34
+ defaultChainId?: number;
29
35
  }
30
36
  /** Combines together chain and token dropdowns */
31
- export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, chainLabelAddon, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, openChainDropdownFullWidth, chainTagComponent, hideNewTokenBadge, }: TokenAndChainDropdownProps) => React.JSX.Element;
37
+ export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, chainLabelAddon, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, openChainDropdownFullWidth, chainTagComponent, hideNewTokenBadge, priorityTokenSymbols, chainIdSortOrder, defaultChainId, }: TokenAndChainDropdownProps) => React.JSX.Element;
32
38
  export {};
@@ -17,10 +17,12 @@ interface TokenDropdownProps {
17
17
  * Override to hide the new token badge
18
18
  */
19
19
  hideNewTokenBadge?: boolean;
20
+ /** Token symbols to prioritize at top of dropdown */
21
+ priorityTokenSymbols?: string[];
20
22
  /**
21
23
  * Test ID for the token dropdown
22
24
  */
23
25
  testId?: string;
24
26
  }
25
- export declare const TokenDropdown: ({ assets, selectedChainId, selectedToken, onTokenSelected, isLoading, alwaysOpenToTop, maxDropdownHeight, hideNewTokenBadge, testId, }: TokenDropdownProps) => React.JSX.Element;
27
+ export declare const TokenDropdown: ({ assets, selectedChainId, selectedToken, onTokenSelected, isLoading, alwaysOpenToTop, maxDropdownHeight, hideNewTokenBadge, priorityTokenSymbols, testId, }: TokenDropdownProps) => React.JSX.Element;
26
28
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- type CheckoutBlockedReason = 'geoblock' | 'security' | 'unloggedin';
2
+ import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutBlockedReason';
3
3
  interface FunCheckoutBlockedProps {
4
4
  reason: CheckoutBlockedReason;
5
5
  }
6
- export declare const FunCheckoutBlocked: ({ reason }: FunCheckoutBlockedProps) => React.JSX.Element;
6
+ export declare const FunCheckoutBlocked: ({ reason }: FunCheckoutBlockedProps) => React.JSX.Element | null;
7
7
  export {};
@@ -6,4 +6,5 @@ export declare const inputClassNoTransition: string;
6
6
  export declare const inputClassDisabled: string;
7
7
  export declare const inputClassDisabledNoTransition: string;
8
8
  export declare const inputClassError: string;
9
+ export declare const hoverWithParentInput: string;
9
10
  export declare const inputClassErrorNoTransition: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { WithdrawalModalStep } from '../../modals/WithdrwalModal/types';
2
+ import { WithdrawalModalStep } from '../../modals/WithdrawalModal/types';
3
3
  interface WithdrawalModalHeightAnimationWrapperProps {
4
4
  children: React.ReactNode;
5
5
  withdrawalStep: WithdrawalModalStep;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { TransferTokenDefault } from '../../hooks/useTokenChain';
2
+ import type { TransferTokenDefault } from '../../hooks/useTokenAndChainDropdown';
3
3
  interface NewTokenDepositAlertProps {
4
4
  onClick: (value: TransferTokenDefault) => void;
5
5
  }
@@ -17,6 +17,7 @@ export type TabsProps = {
17
17
  fontWeight?: BoxProps['fontWeight'];
18
18
  fontSize?: BoxProps['fontSize'];
19
19
  activeTabStyles?: React.CSSProperties;
20
+ inactiveTabProps?: BoxProps;
20
21
  containerStyles?: React.CSSProperties;
21
22
  };
22
23
  export declare const Tabs: React.FC<TabsProps>;
@@ -2,4 +2,4 @@ export declare const tabSlideContentIn: string;
2
2
  export declare const tabSlideContentOut: string;
3
3
  export declare const tabSlideContentInReverse: string;
4
4
  export declare const tabSlideContentOutReverse: string;
5
- export declare const activeTabStyle: string;
5
+ export declare const baseTabStyle: string;
@@ -13,7 +13,7 @@ export interface CreateFunkitWagmiConfigParameters extends WagmiConfigParameters
13
13
  wallets?: WalletList;
14
14
  projectId: string;
15
15
  }
16
- export declare const createFunkitWagmiConfig: (rawWagmiConfig: CreateFunkitWagmiConfigParameters) => import("../wagmi/hooks").Config;
16
+ export declare const createFunkitWagmiConfig: (rawWagmiConfig: CreateFunkitWagmiConfigParameters) => import("wagmi").Config;
17
17
  /**
18
18
  * Get default funkit-supported checkout chains
19
19
  */