@funkit/connect 6.15.13 → 7.0.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.
- package/CHANGELOG.md +21 -0
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/hooks.d.ts +2 -0
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +2 -1
- package/dist/components/FunConnectOptions/FunConnectOptions.d.ts +4 -6
- package/dist/components/FunConnectOptions/FunSignInStep.d.ts +2 -8
- package/dist/components/Icons/FunTechnologyLogo.d.ts +2 -0
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +5 -0
- package/dist/consts/funkit.d.ts +1 -9
- package/dist/domains/asset.d.ts +1 -1
- package/dist/hooks/useFunListeners.d.ts +0 -1
- package/dist/index.css +10 -17
- package/dist/index.js +3902 -5478
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -0
- package/dist/modals/ConnectModal/ConnectModal.d.ts +1 -3
- package/dist/providers/FunkitConfigContext.d.ts +5 -3
- package/dist/providers/ModalContext.d.ts +1 -1
- package/dist/utils/flags/config.d.ts +3 -25
- package/dist/wallets/walletConnectors/index.js +22 -22
- package/package.json +4 -6
- package/dist/components/FunConnectOptions/FunFarcasterConnectingStep.d.ts +0 -5
- package/dist/components/FunConnectOptions/FunWeb2ConnectingStep.d.ts +0 -6
- package/dist/components/FunSocials/FunSocials.d.ts +0 -10
- package/dist/farcaster-MF6WINBA.js +0 -7
- package/dist/funkitConnectWallet-U6JYSE3A.js +0 -7
- package/dist/providers/FunkitWeb2Provider.d.ts +0 -66
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.d.ts +0 -2
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +0 -31
- package/dist/wallets/walletConnectors/funkitConnectWallet-U6JYSE3A.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 024dc7d: refactor: fully deprecate loginConfig - remove validation and internal usage
|
|
8
|
+
- 25ad857: chore(connect): deprecate FunkitWeb2Provider
|
|
9
|
+
- ab11818: refactor: deprecate wagmi-tools and funkitConnectWallet
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 964cd34: chore(connect): mark loginConfig as deprecated
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- eea63f9: connect modal content injected to checkout modal
|
|
18
|
+
- bc5d921: revert(connect): redirect to select asset screen
|
|
19
|
+
- 1886ba6: fix(connect): fix status text animation triggering on mount
|
|
20
|
+
- 18883e1: feat(connect): update fun technology footer svg
|
|
21
|
+
- 6480138: chore(connect): deprecate @privy-io/js-sdk-core
|
|
22
|
+
- 6732eaf: feat(connect): update lighter usdc max slippage for CCTP chains
|
|
23
|
+
|
|
3
24
|
## 6.15.13
|
|
4
25
|
|
|
5
26
|
### 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
|
-
|
|
5
|
-
|
|
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,
|
|
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
|
|
6
|
+
* Shows Web3 sign in options
|
|
9
7
|
*/
|
|
10
|
-
export declare function FunSignInStep({ onClose,
|
|
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;
|
|
@@ -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 = {
|
package/dist/consts/funkit.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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
|
|
@@ -6,7 +5,6 @@ import type { Address } from 'viem';
|
|
|
6
5
|
**/
|
|
7
6
|
export declare const NATIVE_TOKEN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
8
7
|
export declare const FUNKIT_CONNECT_WALLET_ID = "funkitConnectWallet";
|
|
9
|
-
export declare const RESERVED_GROUP_NAME = "funkit-web2";
|
|
10
8
|
export declare const DEFAULT_FUNWALLET_INDEX = 0;
|
|
11
9
|
export declare const FUN_ORG_NAME = "Fun.xyz";
|
|
12
10
|
export declare const FUN_TERMS_URL = "https://fun.xyz/terms";
|
|
@@ -23,12 +21,6 @@ export declare enum FunkitSocialLoginMethod {
|
|
|
23
21
|
APPLE = "apple_oauth",
|
|
24
22
|
FARCASTER = "farcaster"
|
|
25
23
|
}
|
|
26
|
-
export type SocialLoginOption = {
|
|
27
|
-
funkitKey: FunkitSocialLoginMethod;
|
|
28
|
-
provider: OAuthProviderType | 'farcaster';
|
|
29
|
-
getIcon: (size?: number) => React.ReactNode;
|
|
30
|
-
name: string;
|
|
31
|
-
};
|
|
32
24
|
export type FunkitLoginType = 'web2' | 'web3';
|
|
33
25
|
export type FunkitPrioritizedLoginType = 'none' | FunkitLoginType;
|
|
34
26
|
export interface FunkitUserInfoBase {
|
|
@@ -39,7 +31,7 @@ export interface FunkitUserInfoBase {
|
|
|
39
31
|
/** Friendly name of the user, truncated for display **/
|
|
40
32
|
nameTruncated: string;
|
|
41
33
|
/** The user's login type **/
|
|
42
|
-
type: 'unknown' | 'eoa'
|
|
34
|
+
type: 'unknown' | 'eoa';
|
|
43
35
|
/** Friendly name of the user's login type **/
|
|
44
36
|
typeLabel: string;
|
|
45
37
|
/** Profile picture url **/
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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;
|
package/dist/index.css
CHANGED
|
@@ -9826,13 +9826,6 @@
|
|
|
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
|
-
}
|
|
9834
|
-
}
|
|
9835
|
-
|
|
9836
9829
|
/* vanilla-extract-css-ns:src/components/FunDivider/FunDivider.css.ts.vanilla.css?source=Ll8zZGtkc2MwIHsKICBib3JkZXItd2lkdGg6IDA7CiAgYm9yZGVyLXRvcC13aWR0aDogMXB4OwogIGJvcmRlci1zdHlsZTogc29saWQ7CiAgZmxleDogMTsKfQ== */
|
|
9837
9830
|
[data-rk] ._3dkdsc0 {
|
|
9838
9831
|
border-width: 0;
|
|
@@ -10615,16 +10608,6 @@
|
|
|
10615
10608
|
display: none;
|
|
10616
10609
|
}
|
|
10617
10610
|
|
|
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
10611
|
/* vanilla-extract-css-ns:src/components/GradientLoader/GradientLoader.css.ts.vanilla.css?source=QGtleWZyYW1lcyBtMTd1d28wIHsKICB0byB7CiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgxdHVybik7CiAgfQp9Ci5tMTd1d28xIHsKICBhbmltYXRpb246IG0xN3V3bzAgNHMgbGluZWFyIGluZmluaXRlOwogIG1hc2s6IGNvbmljLWdyYWRpZW50KCMwMDAwIDEwJSwjMDAwKSwgbGluZWFyLWdyYWRpZW50KCMwMDAgMCAwKSBjb250ZW50LWJveDsKICBtYXNrLWNvbXBvc2l0ZTogc3VidHJhY3Q7Cn0= */
|
|
10629
10612
|
@keyframes m17uwo0 {
|
|
10630
10613
|
to {
|
|
@@ -10638,3 +10621,13 @@
|
|
|
10638
10621
|
-webkit-mask-composite: source-out;
|
|
10639
10622
|
mask-composite: subtract;
|
|
10640
10623
|
}
|
|
10624
|
+
|
|
10625
|
+
/* vanilla-extract-css-ns:src/components/FunCheckoutBlocked/FunCheckoutBlocked.css.ts.vanilla.css?source=Lmhrano1azAgewogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgZGlzcGxheTogZmxleDsKICBmbGV4OiAxOwogIG1pbi1oZWlnaHQ6IDIwMHB4OwogIHBhZGRpbmctYm90dG9tOiAxOHB4Owp9 */
|
|
10626
|
+
[data-rk] .hkjz5k0 {
|
|
10627
|
+
align-items: center;
|
|
10628
|
+
justify-content: center;
|
|
10629
|
+
display: flex;
|
|
10630
|
+
flex: 1;
|
|
10631
|
+
min-height: 200px;
|
|
10632
|
+
padding-bottom: 18px;
|
|
10633
|
+
}
|