@funkit/connect 11.6.0 → 12.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 +60 -0
- package/dist/{chunk-67BKQQNG.js → chunk-2RND3WWH.js} +1 -1
- package/dist/{chunk-L67HP4HQ.js → chunk-53FF4ZHH.js} +1 -1
- package/dist/{chunk-4YEAUICE.js → chunk-DH3DS4FX.js} +1 -0
- package/dist/clients/chunk-27VBRE7W.js +4907 -0
- package/dist/clients/{chunk-UPB4JKJG.js → chunk-37Q6DUR7.js} +12 -7
- package/dist/clients/chunk-3DHSLLCU.js +331 -0
- package/dist/clients/{chunk-DUBZPIDN.js → chunk-3J2GOB5X.js} +1 -1
- package/dist/clients/{chunk-LYZLETOM.js → chunk-A5JW3UI6.js} +1 -1
- package/dist/clients/chunk-BCNE3ZKM.js +190 -0
- package/dist/clients/chunk-BWJC2WD7.js +4899 -0
- package/dist/clients/{chunk-ZQZDPRWC.js → chunk-DYV3LRSE.js} +1 -1
- package/dist/clients/{chunk-Y7WLUPTX.js → chunk-EQA5U4V6.js} +8 -8
- package/dist/clients/chunk-EYMFEWQL.js +30 -0
- package/dist/clients/chunk-FPOGADLJ.js +4899 -0
- package/dist/clients/chunk-HB7S3NDI.js +15 -0
- package/dist/clients/chunk-HDFCM5UL.js +15 -0
- package/dist/clients/{chunk-IYCZWLAF.js → chunk-IAIRECDV.js} +8 -37
- package/dist/clients/chunk-JVR4CX6N.js +296 -0
- package/dist/clients/chunk-NEKHTWTT.js +331 -0
- package/dist/clients/chunk-PA7WW6VC.js +296 -0
- package/dist/clients/chunk-R6UAC2TB.js +190 -0
- package/dist/clients/chunk-RHOSJED2.js +335 -0
- package/dist/clients/chunk-SKDFSMAO.js +30 -0
- package/dist/clients/chunk-TI2NG2Z6.js +30 -0
- package/dist/clients/chunk-TZFXFVDW.js +296 -0
- package/dist/clients/chunk-VE6QD5IM.js +149 -0
- package/dist/clients/chunk-VXX2XK5J.js +190 -0
- package/dist/clients/{chunk-WNZ6QV5Q.js → chunk-WXSFLUPZ.js} +79 -15
- package/dist/clients/chunk-XSRAZSYG.js +15 -0
- package/dist/clients/fanatics.css +4686 -4659
- package/dist/clients/fanatics.js +7 -9
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.css +4712 -4682
- package/dist/clients/internal/nado/withdrawalForm.js +37 -13
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.css +4712 -4682
- package/dist/clients/lighter.js +50 -30
- package/dist/clients/mallard.js +4 -4
- package/dist/clients/nado.js +3 -3
- package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +28 -19
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +5 -4
- package/dist/clients/polymarket/index.d.ts +0 -1
- package/dist/clients/polymarket/index.js +4 -17
- package/dist/clients/polymarket/polymarket.d.ts +12 -27
- package/dist/clients/polymarket/polymarket.js +1 -1
- package/dist/components/AsyncImage/useAsyncImage.d.ts +2 -0
- package/dist/components/Box/Box.d.ts +15 -15
- package/dist/components/Dialog/Dialog.d.ts +8 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +10 -0
- package/dist/components/ModalHeaderTabs/ModalHeaderTabs.d.ts +23 -0
- package/dist/consts/polymarket.d.ts +14 -0
- package/dist/css/sprinkles.css.d.ts +17 -15
- package/dist/domains/polymarketPerps.d.ts +14 -0
- package/dist/hooks/queries/useFops.d.ts +3 -1
- package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
- package/dist/hooks/track/analytics/checkout.d.ts +10 -0
- package/dist/hooks/track/analytics/events.d.ts +20 -1
- package/dist/hooks/track/analytics/quote.d.ts +3 -1
- package/dist/hooks/track/analytics/resolveExecutionProgressContext.d.ts +2 -1
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +0 -16
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +12 -1
- package/dist/hooks/useCheckoutTransferInit.d.ts +3 -1
- package/dist/hooks/useFittedText.d.ts +19 -0
- package/dist/hooks/usePolymarketAccountBalances.d.ts +13 -25
- package/dist/hooks/useTextMeasurer.d.ts +1 -1
- package/dist/hooks/useUpdateActiveFunkitCheckout.d.ts +10 -0
- package/dist/index.css +4712 -4682
- package/dist/index.js +5121 -3752
- package/dist/modals/CheckoutModal/CheckoutModalPrefetchedHooks.d.ts +2 -1
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -0
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +6 -1
- package/dist/modals/PolymarketPerpsTransfer/DirectionSwapButton.d.ts +1 -11
- package/dist/modals/PolymarketPerpsTransfer/PerpsHeaderTabs.d.ts +29 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferAmountInput.css.d.ts +9 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferAmountInput.d.ts +15 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferBody.d.ts +12 -0
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsPrefetch.d.ts +7 -0
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +16 -2
- package/dist/modals/PolymarketPerpsTransfer/TransferAccountsCard.d.ts +12 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferActionButton.d.ts +8 -1
- package/dist/modals/PolymarketPerpsTransfer/TransferPercentOptions.d.ts +13 -0
- package/dist/modals/PolymarketPerpsTransfer/usePerpsHeaderTabsState.d.ts +28 -0
- package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +31 -5
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +6 -0
- package/dist/modals/WithdrawalModal/useWithdrawalChainPreference.d.ts +17 -0
- package/dist/modals/WithdrawalModal/withdrawalHooks.d.ts +2 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +13 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +44 -20
- package/dist/providers/FunkitShadowHostProvider.d.ts +31 -0
- package/dist/providers/FunkitThemeProvider.d.ts +3 -0
- package/dist/providers/FunkitThemeStyle.d.ts +12 -0
- package/dist/shadow/loadShadowCss.d.ts +9 -0
- package/dist/shadow/useMountShadowHost.d.ts +18 -0
- package/dist/shadow/useShadowCss.d.ts +6 -0
- package/dist/shadow-css.js +1 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +70 -0
- package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +69 -0
- package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +96 -0
- package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +218 -0
- package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +99 -0
- package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +98 -0
- package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +92 -0
- package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +93 -0
- package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +66 -0
- package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +95 -0
- package/dist/wallets/walletConnectors/chunk-RVOY537T.js +100 -0
- package/dist/wallets/walletConnectors/chunk-STVVP43G.js +94 -0
- package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +87 -0
- package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +92 -0
- package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +110 -0
- package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +103 -0
- package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +96 -0
- package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +106 -0
- package/dist/wallets/walletConnectors/index.js +33 -33
- package/package.json +5 -5
- package/dist/clients/chunk-DSZHYQPX.js +0 -31
- package/dist/clients/chunk-FNB7OPJI.js +0 -1316
- package/dist/clients/chunk-HZP4DXIZ.js +0 -231
- package/dist/clients/chunk-LUHEVXPD.js +0 -109
- package/dist/clients/chunk-SX3CX34W.js +0 -1177
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +0 -17545
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +0 -30
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +0 -20
- package/dist/clients/polymarket/index.css +0 -17545
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferRows.d.ts +0 -10
- package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.css.d.ts +0 -13
- package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.d.ts +0 -27
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
useFunkitTranslation
|
|
4
|
+
} from "./chunk-XSRAZSYG.js";
|
|
5
|
+
|
|
6
|
+
// src/providers/FunkitConfigContext.tsx
|
|
7
|
+
import {
|
|
8
|
+
createContext,
|
|
9
|
+
useContext,
|
|
10
|
+
useMemo
|
|
11
|
+
} from "react";
|
|
12
|
+
var DEFAULT_TEXT_CUSTOMIZATIONS = {
|
|
13
|
+
virtualFiat: "Deposit with SEPA",
|
|
14
|
+
brokerageOrExchange: "Connect Exchange",
|
|
15
|
+
debitOrCredit: "Deposit with Card",
|
|
16
|
+
accountBalance: "Wallet",
|
|
17
|
+
selectAccount: "Select an exchange",
|
|
18
|
+
perpsTransferTitle: "Transfer",
|
|
19
|
+
sourceMethodTitle: "Your source",
|
|
20
|
+
tokensListTitle: "Your tokens",
|
|
21
|
+
transferTokens: "Transfer Crypto",
|
|
22
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
23
|
+
cashAppLightning: "Cash App",
|
|
24
|
+
receiveDropdownTitle: "",
|
|
25
|
+
// Default to empty
|
|
26
|
+
receiveDropdownLabel: "Asset to Receive",
|
|
27
|
+
confirmationScreen: {
|
|
28
|
+
payAmountLabel: "You send",
|
|
29
|
+
receiveAmountLabel: "You receive"
|
|
30
|
+
},
|
|
31
|
+
paymentMethodSubtitles: {}
|
|
32
|
+
};
|
|
33
|
+
var DEFAULT_UI_CUSTOMIZATIONS = {
|
|
34
|
+
alignTitle: "center",
|
|
35
|
+
alwaysShowTopDivider: false,
|
|
36
|
+
showModalTitle: true,
|
|
37
|
+
callToActionsUppercase: false,
|
|
38
|
+
enableCompactList: false,
|
|
39
|
+
checkoutHistory: {
|
|
40
|
+
showGetHelpAsAlert: true,
|
|
41
|
+
simplifiedUi: false
|
|
42
|
+
},
|
|
43
|
+
confirmationScreen: {
|
|
44
|
+
autoExpandFeesSummary: false,
|
|
45
|
+
preferDestinationWhenSame: false,
|
|
46
|
+
showAmountSummaryAbovePaymentMethod: false,
|
|
47
|
+
showDisclaimerAsAlert: true,
|
|
48
|
+
showInstantTimeEstimate: false,
|
|
49
|
+
showLeftAlignedDollarValueWithLabel: false,
|
|
50
|
+
showPaymentAmountUsd: false,
|
|
51
|
+
showReceiveAmountUsd: false,
|
|
52
|
+
showSelectedRoute: false,
|
|
53
|
+
stepIndicatorType: "spinner",
|
|
54
|
+
showTransactionDigest: "none"
|
|
55
|
+
},
|
|
56
|
+
sourceChangeScreen: {
|
|
57
|
+
bottomBarCloseButton: {
|
|
58
|
+
enabled: false,
|
|
59
|
+
labelKey: "common.close"
|
|
60
|
+
},
|
|
61
|
+
showTargetAssetSelection: false,
|
|
62
|
+
showWalletOnInsufficientBalance: false,
|
|
63
|
+
showWalletConnect: true,
|
|
64
|
+
showCustomTopComponentDivider: false,
|
|
65
|
+
paymentMethodIcons: {}
|
|
66
|
+
},
|
|
67
|
+
inputAmountScreen: {
|
|
68
|
+
allowTokenAmountInput: true
|
|
69
|
+
},
|
|
70
|
+
selectAssetScreen: {
|
|
71
|
+
isSecondaryTokenSymbolVisible: true,
|
|
72
|
+
navigateOnAssetClick: false
|
|
73
|
+
},
|
|
74
|
+
transferCryptoScreen: {
|
|
75
|
+
showYouSendYouReceive: false
|
|
76
|
+
},
|
|
77
|
+
withdrawalScreen: {
|
|
78
|
+
autoExpandFeesSummary: false
|
|
79
|
+
},
|
|
80
|
+
selectBrokerageScreen: {},
|
|
81
|
+
connectExchangeScreen: {},
|
|
82
|
+
customIcons: {},
|
|
83
|
+
customFontFamily: {
|
|
84
|
+
primary: "",
|
|
85
|
+
secondary: "",
|
|
86
|
+
tertiary: ""
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var DEFAULT_FUNKIT_CONFIG = {
|
|
90
|
+
apiKey: "",
|
|
91
|
+
appName: "",
|
|
92
|
+
textCustomizations: DEFAULT_TEXT_CUSTOMIZATIONS,
|
|
93
|
+
uiCustomizations: DEFAULT_UI_CUSTOMIZATIONS
|
|
94
|
+
};
|
|
95
|
+
var FunkitConfigContext = createContext(
|
|
96
|
+
DEFAULT_FUNKIT_CONFIG
|
|
97
|
+
);
|
|
98
|
+
function useFunkitConfig() {
|
|
99
|
+
const originalFunkitConfig = useContext(FunkitConfigContext);
|
|
100
|
+
const { t } = useFunkitTranslation();
|
|
101
|
+
const translatedDefaults = useMemo(() => {
|
|
102
|
+
return {
|
|
103
|
+
virtualFiat: t("textCustomizations.virtualFiat"),
|
|
104
|
+
brokerageOrExchange: t("textCustomizations.brokerageOrExchange"),
|
|
105
|
+
debitOrCredit: t("textCustomizations.debitOrCredit"),
|
|
106
|
+
accountBalance: t("textCustomizations.accountBalance"),
|
|
107
|
+
selectAccount: t("textCustomizations.selectAccount"),
|
|
108
|
+
perpsTransferTitle: t("perpsTransfer.title"),
|
|
109
|
+
sourceMethodTitle: t("textCustomizations.sourceMethodTitle"),
|
|
110
|
+
tokensListTitle: t("textCustomizations.tokensListTitle"),
|
|
111
|
+
transferTokens: t("textCustomizations.transferTokens"),
|
|
112
|
+
bitcoinLightning: t("textCustomizations.bitcoinLightning"),
|
|
113
|
+
cashAppLightning: t("textCustomizations.cashAppLightning"),
|
|
114
|
+
receiveDropdownTitle: t("textCustomizations.receiveDropdownTitle"),
|
|
115
|
+
receiveDropdownLabel: t("textCustomizations.receiveDropdownLabel"),
|
|
116
|
+
confirmationScreen: {
|
|
117
|
+
payAmountLabel: t("textCustomizations.payAmountLabel"),
|
|
118
|
+
receiveAmountLabel: t("textCustomizations.receiveAmountLabel")
|
|
119
|
+
},
|
|
120
|
+
paymentMethodSubtitles: {}
|
|
121
|
+
};
|
|
122
|
+
}, [t]);
|
|
123
|
+
const finalFunkitConfig = useMemo(() => {
|
|
124
|
+
return {
|
|
125
|
+
...DEFAULT_FUNKIT_CONFIG,
|
|
126
|
+
...originalFunkitConfig,
|
|
127
|
+
textCustomizations: {
|
|
128
|
+
...translatedDefaults,
|
|
129
|
+
...originalFunkitConfig.textCustomizations,
|
|
130
|
+
confirmationScreen: {
|
|
131
|
+
...translatedDefaults.confirmationScreen,
|
|
132
|
+
...originalFunkitConfig.textCustomizations?.confirmationScreen
|
|
133
|
+
},
|
|
134
|
+
paymentMethodSubtitles: {
|
|
135
|
+
...translatedDefaults.paymentMethodSubtitles,
|
|
136
|
+
...originalFunkitConfig.textCustomizations?.paymentMethodSubtitles
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
uiCustomizations: {
|
|
140
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations,
|
|
141
|
+
...originalFunkitConfig.uiCustomizations,
|
|
142
|
+
checkoutHistory: {
|
|
143
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.checkoutHistory,
|
|
144
|
+
...originalFunkitConfig.uiCustomizations?.checkoutHistory
|
|
145
|
+
},
|
|
146
|
+
confirmationScreen: {
|
|
147
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.confirmationScreen,
|
|
148
|
+
...originalFunkitConfig.uiCustomizations?.confirmationScreen
|
|
149
|
+
},
|
|
150
|
+
connectExchangeScreen: {
|
|
151
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.connectExchangeScreen,
|
|
152
|
+
...originalFunkitConfig.uiCustomizations?.connectExchangeScreen
|
|
153
|
+
},
|
|
154
|
+
inputAmountScreen: {
|
|
155
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.inputAmountScreen,
|
|
156
|
+
...originalFunkitConfig.uiCustomizations?.inputAmountScreen
|
|
157
|
+
},
|
|
158
|
+
selectAssetScreen: {
|
|
159
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.selectAssetScreen,
|
|
160
|
+
...originalFunkitConfig.uiCustomizations?.selectAssetScreen
|
|
161
|
+
},
|
|
162
|
+
selectBrokerageScreen: {
|
|
163
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.selectBrokerageScreen,
|
|
164
|
+
...originalFunkitConfig.uiCustomizations?.selectBrokerageScreen
|
|
165
|
+
},
|
|
166
|
+
sourceChangeScreen: {
|
|
167
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.sourceChangeScreen,
|
|
168
|
+
...originalFunkitConfig.uiCustomizations?.sourceChangeScreen,
|
|
169
|
+
bottomBarCloseButton: {
|
|
170
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.sourceChangeScreen.bottomBarCloseButton,
|
|
171
|
+
...originalFunkitConfig.uiCustomizations?.sourceChangeScreen?.bottomBarCloseButton
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
transferCryptoScreen: {
|
|
175
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.transferCryptoScreen,
|
|
176
|
+
...originalFunkitConfig.uiCustomizations?.transferCryptoScreen
|
|
177
|
+
},
|
|
178
|
+
withdrawalScreen: {
|
|
179
|
+
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.withdrawalScreen,
|
|
180
|
+
...originalFunkitConfig.uiCustomizations?.withdrawalScreen
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}, [originalFunkitConfig, translatedDefaults]);
|
|
185
|
+
return finalFunkitConfig;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export {
|
|
189
|
+
useFunkitConfig
|
|
190
|
+
};
|