@funkit/connect 6.15.13 → 7.0.2

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 +46 -0
  2. package/dist/components/Dialog/Dialog.d.ts +1 -1
  3. package/dist/components/Dialog/hooks.d.ts +2 -0
  4. package/dist/components/FunBottomBar/FunBottomBar.d.ts +2 -1
  5. package/dist/components/FunConnectOptions/FunConnectOptions.d.ts +4 -6
  6. package/dist/components/FunConnectOptions/FunSignInStep.d.ts +2 -8
  7. package/dist/components/FunPoweredTagline/FunPoweredTagline.css.d.ts +1 -0
  8. package/dist/components/FunPoweredTagline/FunPoweredTagline.d.ts +4 -1
  9. package/dist/components/Icons/FunTechnologyLogo.d.ts +2 -0
  10. package/dist/components/TransactionStatus/TransactionStatus.d.ts +5 -0
  11. package/dist/consts/funkit.d.ts +1 -26
  12. package/dist/domains/asset.d.ts +1 -1
  13. package/dist/domains/feeEstimate.d.ts +1 -1
  14. package/dist/hooks/useFunListeners.d.ts +0 -1
  15. package/dist/hooks/usePaymentSources.d.ts +1 -1
  16. package/dist/index.css +24 -15
  17. package/dist/index.d.ts +2 -3
  18. package/dist/index.js +4899 -6082
  19. package/dist/locales/index.d.ts +1 -1
  20. package/dist/modals/CheckoutModal/ConfirmationStep/useAccountBalanceTransfer.d.ts +1 -1
  21. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
  22. package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -0
  23. package/dist/modals/ConnectModal/ConnectModal.d.ts +1 -3
  24. package/dist/providers/FunkitConfigContext.d.ts +0 -16
  25. package/dist/providers/ModalContext.d.ts +1 -1
  26. package/dist/utils/checkout.d.ts +0 -34
  27. package/dist/utils/flags/config.d.ts +4 -26
  28. package/dist/wallets/walletConnectors/index.js +17 -17
  29. package/package.json +7 -10
  30. package/dist/components/FunConnectOptions/FunFarcasterConnectingStep.d.ts +0 -5
  31. package/dist/components/FunConnectOptions/FunWeb2ConnectingStep.d.ts +0 -6
  32. package/dist/components/FunSocials/FunSocials.d.ts +0 -10
  33. package/dist/farcaster-MF6WINBA.js +0 -7
  34. package/dist/funkitConnectWallet-U6JYSE3A.js +0 -7
  35. package/dist/providers/FunkitWeb2Provider.d.ts +0 -66
  36. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.d.ts +0 -2
  37. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +0 -31
  38. package/dist/wallets/walletConnectors/funkitConnectWallet-U6JYSE3A.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 7.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - df73659: chore: bump versions
8
+ - Updated dependencies [df73659]
9
+ - @funkit/api-base@1.12.21
10
+ - @funkit/chains@0.5.1
11
+ - @funkit/fun-relay@2.1.15
12
+ - @funkit/utils@1.1.21
13
+
14
+ ## 7.0.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 3518f7b: rename meld flow variable name and remove core deps
19
+ - 2b89d85: chore(connect): remove unused translations
20
+ - 96fd4d4: feat(connect): reduce L1 fee estimate to $1
21
+ - cf2b385: feat: add french locale
22
+ - b693f57: feat(connect): update withdrawal recipient address placeholder for solana
23
+ - eec5311: refactor(connect): deprecate remaining loginConfig types
24
+ - d22ffac: feat(connect): add border to modal footer (above fun technology logo)
25
+ - Updated dependencies [208bcd7]
26
+ - @funkit/api-base@1.12.20
27
+
28
+ ## 7.0.0
29
+
30
+ ### Major Changes
31
+
32
+ - 024dc7d: refactor: fully deprecate loginConfig - remove validation and internal usage
33
+ - 25ad857: chore(connect): deprecate FunkitWeb2Provider
34
+ - ab11818: refactor: deprecate wagmi-tools and funkitConnectWallet
35
+
36
+ ### Minor Changes
37
+
38
+ - 964cd34: chore(connect): mark loginConfig as deprecated
39
+
40
+ ### Patch Changes
41
+
42
+ - eea63f9: connect modal content injected to checkout modal
43
+ - bc5d921: revert(connect): redirect to select asset screen
44
+ - 1886ba6: fix(connect): fix status text animation triggering on mount
45
+ - 18883e1: feat(connect): update fun technology footer svg
46
+ - 6480138: chore(connect): deprecate @privy-io/js-sdk-core
47
+ - 6732eaf: feat(connect): update lighter usdc max slippage for CCTP chains
48
+
3
49
  ## 6.15.13
4
50
 
5
51
  ### Patch Changes
@@ -28,7 +28,7 @@ export declare namespace Dialog {
28
28
  var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
29
29
  var Content: ({ children, fullHeight, paddingLeft, paddingBottom, paddingTop, className, withTopDivider, withBottomDivider, id, withoutInternalPadding, ...boxProps }: DialogContentProps) => React.JSX.Element;
30
30
  var BottomSection: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
31
- var BottomBar: ({ topSection, actionButtonProps, onClose, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
31
+ var BottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
32
32
  }
33
33
  interface DialogContentProps extends BoxProps {
34
34
  children: ReactNode;
@@ -2,6 +2,7 @@ export declare const MODAL_BOTTOM_BAR_WRAPPER_ID = "fun-modal-bottom-bar-wrapper
2
2
  export declare const MODAL_BOTTOM_BAR_IDS: {
3
3
  readonly checkout: "checkout-modal-bottom-bar";
4
4
  readonly withdrawal: "withdrawal-modal-bottom-bar";
5
+ readonly connectwallet: "connect-wallet-modal-bottom-bar";
5
6
  };
6
7
  type ModalBottomBarIdType = keyof typeof MODAL_BOTTOM_BAR_IDS;
7
8
  export declare function useBottomSectionRef(modalBottomBarIdType?: ModalBottomBarIdType): HTMLElement | null;
@@ -10,6 +11,7 @@ export declare function useTitleCountdownRef(): HTMLElement | null;
10
11
  export declare function useGeneralBottomBarElement(): HTMLElement | null;
11
12
  export declare function useCheckoutBottomBarElement(): HTMLElement | null;
12
13
  export declare function useWithdrawalBottomBarElement(): HTMLElement | null;
14
+ export declare function useConnectWalletBottomBarElement(): HTMLElement | null;
13
15
  /**
14
16
  * Hook to observe if a ref's children are empty, with special handling for bottom bar nodes.
15
17
  * @param ref - React ref to the DOM node to observe
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { type FunButtonProps } from '../FunButton/FunButton';
3
3
  export interface FunBottomBarProps {
4
4
  topSection?: React.ReactNode;
5
+ topSectionVisible?: boolean;
5
6
  actionButtonProps?: FunButtonProps;
6
7
  onClose?: () => void;
7
8
  }
8
- export declare const FunBottomBar: ({ topSection, actionButtonProps, onClose, }: FunBottomBarProps) => React.JSX.Element | null;
9
+ export declare const FunBottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, }: FunBottomBarProps) => React.JSX.Element | null;
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
2
  export declare enum ConnectStep {
3
3
  SIGNIN_PRIMARY = 0,
4
- SIGNIN_SECONDARY = 1,
5
- PENDING_EMAIL = 2,
6
- PENDING_WALLET = 3,
7
- PENDING_FARCASTER = 4,
8
- ERROR_WEB3 = 5
4
+ PENDING_WALLET = 1,
5
+ ERROR_WEB3 = 2
9
6
  }
10
7
  interface FunConnectOptionsProps {
11
8
  onClose: () => void;
9
+ initialScreenOnBack?: () => void;
12
10
  walletsOnly?: boolean;
13
11
  }
14
- export declare function FunConnectOptions({ onClose, walletsOnly, }: FunConnectOptionsProps): React.JSX.Element;
12
+ export declare function FunConnectOptions({ onClose, initialScreenOnBack, }: FunConnectOptionsProps): React.JSX.Element;
15
13
  export {};
@@ -1,21 +1,15 @@
1
1
  import React from 'react';
2
- import { type SocialLoginOption } from '../../consts/funkit';
3
2
  import { type WalletConnector } from '../../wallets/useWalletConnectors';
4
3
  import { ConnectStep } from './FunConnectOptions';
5
- export declare function useEnabledSocialLogins(): SocialLoginOption[];
6
4
  /**
7
5
  * Modal content for a user that is not signed-in yet
8
- * Shows Web2 and Web3 sign in options
6
+ * Shows Web3 sign in options
9
7
  */
10
- export declare function FunSignInStep({ onClose, signInStep, changeStep, setSelectedWallet, connectToWallet, setQrCodeUri, emailInput, setEmailInput, onFarcasterSuccessInit, walletsOnly, }: {
8
+ export declare function FunSignInStep({ onClose, changeStep, setSelectedWallet, connectToWallet, setQrCodeUri, }: {
11
9
  onClose: () => void;
12
10
  signInStep: ConnectStep;
13
11
  changeStep: (p: ConnectStep) => void;
14
12
  setSelectedWallet: React.Dispatch<React.SetStateAction<WalletConnector | undefined>>;
15
13
  connectToWallet: (wallet: WalletConnector) => void;
16
14
  setQrCodeUri: React.Dispatch<React.SetStateAction<string>>;
17
- emailInput: string;
18
- setEmailInput: React.Dispatch<React.SetStateAction<string>>;
19
- onFarcasterSuccessInit: (channelToken: string, connectUri: string) => void;
20
- walletsOnly?: boolean;
21
15
  }): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const taglineBorderTop: string;
@@ -1,2 +1,5 @@
1
1
  import React from 'react';
2
- export declare function FunPoweredTagline(): React.JSX.Element;
2
+ export interface FunPoweredTaglineProps {
3
+ enableBorderTop?: boolean;
4
+ }
5
+ export declare function FunPoweredTagline({ enableBorderTop, }: FunPoweredTaglineProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FunTechnologyLogo: () => React.JSX.Element;
@@ -13,6 +13,11 @@ interface TransactionStatusProps {
13
13
  }
14
14
  export type TextConfig = {
15
15
  description: ReactNode;
16
+ descriptionKey: string;
17
+ title: string;
18
+ } | {
19
+ description: string;
20
+ descriptionKey?: never;
16
21
  title: string;
17
22
  };
18
23
  export type TextConfigContext = {
@@ -1,36 +1,11 @@
1
- import type { OAuthProviderType } from '@privy-io/js-sdk-core';
2
1
  import type { Address } from 'viem';
3
2
  /**
4
3
  * NATIVE_TOKEN is a special address in Fun to represent different native currency tokens on different chains
5
4
  * e.g. on Base it is ETH, but on Polygon it is MATIC/POL. It is not one specific real token address.
6
5
  **/
7
6
  export declare const NATIVE_TOKEN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
8
- export declare const FUNKIT_CONNECT_WALLET_ID = "funkitConnectWallet";
9
- export declare const RESERVED_GROUP_NAME = "funkit-web2";
10
- export declare const DEFAULT_FUNWALLET_INDEX = 0;
11
7
  export declare const FUN_ORG_NAME = "Fun.xyz";
12
8
  export declare const FUN_TERMS_URL = "https://fun.xyz/terms";
13
- export declare enum PrivyLoginMethod {
14
- email = "email",
15
- farcaster = "farcaster",
16
- google_oauth = "google_oauth",
17
- twitter_oauth = "twitter_oauth",
18
- apple_oauth = "apple_oauth"
19
- }
20
- export declare enum FunkitSocialLoginMethod {
21
- GOOGLE = "google_oauth",
22
- TWITTER = "twitter_oauth",
23
- APPLE = "apple_oauth",
24
- FARCASTER = "farcaster"
25
- }
26
- export type SocialLoginOption = {
27
- funkitKey: FunkitSocialLoginMethod;
28
- provider: OAuthProviderType | 'farcaster';
29
- getIcon: (size?: number) => React.ReactNode;
30
- name: string;
31
- };
32
- export type FunkitLoginType = 'web2' | 'web3';
33
- export type FunkitPrioritizedLoginType = 'none' | FunkitLoginType;
34
9
  export interface FunkitUserInfoBase {
35
10
  /** Unique identifier of the user **/
36
11
  id: string | Address;
@@ -39,7 +14,7 @@ export interface FunkitUserInfoBase {
39
14
  /** Friendly name of the user, truncated for display **/
40
15
  nameTruncated: string;
41
16
  /** The user's login type **/
42
- type: 'unknown' | 'eoa' | PrivyLoginMethod;
17
+ type: 'unknown' | 'eoa';
43
18
  /** Friendly name of the user's login type **/
44
19
  typeLabel: string;
45
20
  /** Profile picture url **/
@@ -4,7 +4,7 @@ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
4
4
  import type { AssetHoldingsItem } from '~/utils/assets';
5
5
  import { PaymentMethod } from '../domains/paymentMethods';
6
6
  export declare const isStablecoin: (symbol: string) => string | undefined;
7
- export declare function isPreferredChain(chainId: number): boolean;
7
+ export declare function isPreferredChain(chainId: number, additionalChains?: number[]): boolean;
8
8
  export declare function isNativeTokenAddress(address: Address): boolean;
9
9
  export declare function isDefaultToken(asset: AssetHoldingsItem, checkoutConfig: FunkitCheckoutConfig): boolean;
10
10
  export declare const isPolygonEcosystemToken: (chainId: string, tokenAddress: string) => boolean;
@@ -1,5 +1,5 @@
1
1
  import { PaymentMethod } from './paymentMethods';
2
- export declare const L1_FEES_ESTIMATE = 5;
2
+ export declare const L1_FEES_ESTIMATE = 1;
3
3
  export declare const L2_FEES_ESTIMATE = 1;
4
4
  export declare const BROKERAGE_FEES_ESTIMATE = 0;
5
5
  /**
@@ -4,4 +4,3 @@ import type { Address } from 'viem';
4
4
  * Each hook will store and track its own intervalId
5
5
  */
6
6
  export declare function useCheckoutHistoryListener(activate?: boolean, singleDepositAddr?: Address | undefined): void;
7
- export declare function useSIWFarcasterListener(channelToken: string): void;
@@ -5,7 +5,7 @@ export declare function usePaymentMethodEnablement({ checkoutConfig, }: {
5
5
  }): {
6
6
  isFiatEnabled: boolean;
7
7
  isTokenTransferEnabled: boolean;
8
- isCardEnabled: boolean;
8
+ isMeldEnabled: boolean;
9
9
  isBrokerageEnabled: boolean;
10
10
  };
11
11
  export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string, checkoutConfig?: FunkitCheckoutConfig) => {
package/dist/index.css CHANGED
@@ -9826,11 +9826,20 @@
9826
9826
  box-shadow: 0px -1px 1px 0px rgba(0, 0, 0, 0.09) inset;
9827
9827
  }
9828
9828
 
9829
- /* vanilla-extract-css-ns:src/components/FunBottomBar/FunBottomBar.css.ts.vanilla.css?source=Lm41cXdpMSB7CiAgJjpub3QoOmVtcHR5KSA+IDpmaXJzdC1jaGlsZCB7CiAgICBtYXJnaW4tdG9wOiAtNnB4OwogIH0KfQ== */
9830
- [data-rk] .n5qwi1 {
9831
- [data-rk] &:not(:empty) > :first-child {
9832
- margin-top: -6px;
9833
- }
9829
+ /* vanilla-extract-css-ns:src/components/FunPoweredTagline/FunPoweredTagline.css.ts.vanilla.css?source=Ll8xd2RnazZpMCB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIG1hcmdpbi10b3A6IDZweDsKICBwYWRkaW5nLXRvcDogdmFyKC0tcmstc3BhY2luZy1tb2RhbFBhZGRpbmdCb3R0b21Mb3dlcik7Cn0KLl8xd2RnazZpMDo6YmVmb3JlIHsKICBjb250ZW50OiAiIjsKICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1yay1jb2xvcnMtbGlnaHRTdHJva2UpOwogIGhlaWdodDogMXB4OwogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICB0b3A6IDA7CiAgbGVmdDogY2FsYygtMSAqICh2YXIoLS1yay1zcGFjaW5nLW1vZGFsQmFzZUhvcml6b250YWxQYWRkaW5nKSArIHZhcigtLXJrLXNwYWNpbmctbW9kYWxCb3R0b21Ib3Jpem9udGFsUGFkZGluZykpKTsKICByaWdodDogY2FsYygtMSAqICh2YXIoLS1yay1zcGFjaW5nLW1vZGFsQmFzZUhvcml6b250YWxQYWRkaW5nKSArIHZhcigtLXJrLXNwYWNpbmctbW9kYWxCb3R0b21Ib3Jpem9udGFsUGFkZGluZykpKTsKfQ== */
9830
+ [data-rk] ._1wdgk6i0 {
9831
+ position: relative;
9832
+ margin-top: 6px;
9833
+ padding-top: var(--rk-spacing-modalPaddingBottomLower);
9834
+ }
9835
+ [data-rk] ._1wdgk6i0::before {
9836
+ content: "";
9837
+ background-color: var(--rk-colors-lightStroke);
9838
+ height: 1px;
9839
+ position: absolute;
9840
+ top: 0;
9841
+ left: calc(-1 * (var(--rk-spacing-modalBaseHorizontalPadding) + var(--rk-spacing-modalBottomHorizontalPadding)));
9842
+ right: calc(-1 * (var(--rk-spacing-modalBaseHorizontalPadding) + var(--rk-spacing-modalBottomHorizontalPadding)));
9834
9843
  }
9835
9844
 
9836
9845
  /* vanilla-extract-css-ns:src/components/FunDivider/FunDivider.css.ts.vanilla.css?source=Ll8zZGtkc2MwIHsKICBib3JkZXItd2lkdGg6IDA7CiAgYm9yZGVyLXRvcC13aWR0aDogMXB4OwogIGJvcmRlci1zdHlsZTogc29saWQ7CiAgZmxleDogMTsKfQ== */
@@ -10615,16 +10624,6 @@
10615
10624
  display: none;
10616
10625
  }
10617
10626
 
10618
- /* vanilla-extract-css-ns:src/components/FunCheckoutBlocked/FunCheckoutBlocked.css.ts.vanilla.css?source=Lmhrano1azAgewogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgZGlzcGxheTogZmxleDsKICBmbGV4OiAxOwogIG1pbi1oZWlnaHQ6IDIwMHB4OwogIHBhZGRpbmctYm90dG9tOiAxOHB4Owp9 */
10619
- [data-rk] .hkjz5k0 {
10620
- align-items: center;
10621
- justify-content: center;
10622
- display: flex;
10623
- flex: 1;
10624
- min-height: 200px;
10625
- padding-bottom: 18px;
10626
- }
10627
-
10628
10627
  /* vanilla-extract-css-ns:src/components/GradientLoader/GradientLoader.css.ts.vanilla.css?source=QGtleWZyYW1lcyBtMTd1d28wIHsKICB0byB7CiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgxdHVybik7CiAgfQp9Ci5tMTd1d28xIHsKICBhbmltYXRpb246IG0xN3V3bzAgNHMgbGluZWFyIGluZmluaXRlOwogIG1hc2s6IGNvbmljLWdyYWRpZW50KCMwMDAwIDEwJSwjMDAwKSwgbGluZWFyLWdyYWRpZW50KCMwMDAgMCAwKSBjb250ZW50LWJveDsKICBtYXNrLWNvbXBvc2l0ZTogc3VidHJhY3Q7Cn0= */
10629
10628
  @keyframes m17uwo0 {
10630
10629
  to {
@@ -10638,3 +10637,13 @@
10638
10637
  -webkit-mask-composite: source-out;
10639
10638
  mask-composite: subtract;
10640
10639
  }
10640
+
10641
+ /* vanilla-extract-css-ns:src/components/FunCheckoutBlocked/FunCheckoutBlocked.css.ts.vanilla.css?source=Lmhrano1azAgewogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgZGlzcGxheTogZmxleDsKICBmbGV4OiAxOwogIG1pbi1oZWlnaHQ6IDIwMHB4OwogIHBhZGRpbmctYm90dG9tOiAxOHB4Owp9 */
10642
+ [data-rk] .hkjz5k0 {
10643
+ align-items: center;
10644
+ justify-content: center;
10645
+ display: flex;
10646
+ flex: 1;
10647
+ min-height: 200px;
10648
+ padding-bottom: 18px;
10649
+ }
package/dist/index.d.ts CHANGED
@@ -3,8 +3,7 @@ export { Avatar as FunkitAvatar } from './components/Avatar/Avatar';
3
3
  export { ConnectButton } from './components/ConnectButton/ConnectButton';
4
4
  export { FunkitPaymentsIconLine } from './components/Icons/FunkitPaymentsIconLine';
5
5
  export { createFunkitWagmiConfig, getDefaultChains, getDefaultTransports, } from './config/getDefaultConfig';
6
- export type { FunkitPrioritizedLoginType } from './consts/funkit';
7
- export { FunkitSocialLoginMethod, NATIVE_TOKEN } from './consts/funkit';
6
+ export { NATIVE_TOKEN } from './consts/funkit';
8
7
  export { cssObjectFromTheme } from './css/cssObjectFromTheme';
9
8
  export { cssStringFromTheme } from './css/cssStringFromTheme';
10
9
  export type { ThemeVars } from './css/sprinkles.css';
@@ -33,7 +32,7 @@ export type { Theme, ThemeSet } from './providers/FunkitThemeProvider';
33
32
  export { useActiveTheme } from './providers/FunkitThemeProvider';
34
33
  export { useFunkitUserInfo } from './providers/GeneralWalletProvider';
35
34
  export { useAccountModal, useChainModal, useConnectModal, } from './providers/ModalContext';
36
- export type { FunkitUserInfo, PrivyLoginMethod } from './consts/funkit';
35
+ export type { FunkitUserInfo } from './consts/funkit';
37
36
  export { systemFontStack, type ThemeOptions } from './themes/baseTheme';
38
37
  export { darkTheme } from './themes/darkTheme';
39
38
  export { lightTheme } from './themes/lightTheme';