@funkit/connect 8.3.1-next.0 → 8.4.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/dist/{chunk-5JRQC2VM.js → chunk-4WY7FNYP.js} +14 -0
  3. package/dist/{chunk-CUWQELX3.js → chunk-UUHLEWAL.js} +4 -2
  4. package/dist/{chunk-VWSYBHAK.js → chunk-Z4QDKBBG.js} +4 -2
  5. package/dist/clients/fanatics.css +4064 -3651
  6. package/dist/clients/fanatics.d.ts +6 -0
  7. package/dist/clients/fanatics.js +118 -43
  8. package/dist/components/Box/Box.d.ts +45 -45
  9. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -0
  10. package/dist/components/FunCheckoutHistory/FunTxSummarySections.d.ts +7 -0
  11. package/dist/components/FunCheckoutHistory/TotalTimeItem.d.ts +6 -0
  12. package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +6 -0
  13. package/dist/components/FunCheckoutHistory/useCustomStatusAnimationAboveTopbar.d.ts +1 -3
  14. package/dist/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.d.ts +3 -1
  15. package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
  16. package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +1 -0
  17. package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
  18. package/dist/components/Icons/New/CircleBitcoinIcon.d.ts +4 -0
  19. package/dist/components/Icons/New/DollarIcon.d.ts +3 -1
  20. package/dist/components/Tabs/Tabs.d.ts +1 -0
  21. package/dist/consts/customers.d.ts +1 -1
  22. package/dist/consts/layout.d.ts +0 -1
  23. package/dist/css/sprinkles.css.d.ts +91 -45
  24. package/dist/domains/asset.d.ts +1 -1
  25. package/dist/domains/meld.d.ts +0 -6
  26. package/dist/hooks/queries/useFops.d.ts +4 -2
  27. package/dist/hooks/queries/useSwappedDefaultCurrency.d.ts +5 -0
  28. package/dist/hooks/track/CheckoutModalEvent.d.ts +7 -0
  29. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -0
  30. package/dist/hooks/useStepQueryReadiness.d.ts +32 -0
  31. package/dist/index.css +4090 -3671
  32. package/dist/index.js +3894 -3058
  33. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -0
  34. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
  35. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -1
  36. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
  37. package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +5 -1
  38. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +10 -0
  39. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +10 -0
  40. package/dist/modals/CheckoutModal/SourceChange/SourceChangeLoading.d.ts +4 -0
  41. package/dist/modals/CheckoutModal/SourceChange/{DefaultSourceList.d.ts → SourceList.d.ts} +3 -3
  42. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +2 -1
  43. package/dist/modals/CheckoutModal/stepTransition.d.ts +7 -0
  44. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -0
  45. package/dist/providers/FunkitConfigContext.d.ts +14 -0
  46. package/dist/providers/FunkitProvider.d.ts +1 -0
  47. package/dist/providers/FunkitThemeProvider.d.ts +69 -0
  48. package/dist/themes/baseTheme.js +1 -1
  49. package/dist/themes/darkTheme.js +2 -2
  50. package/dist/themes/lightTheme.js +2 -2
  51. package/dist/utils/across.d.ts +5 -0
  52. package/dist/utils/depositCutoff.d.ts +9 -0
  53. package/dist/utils/directExecution.d.ts +16 -0
  54. package/dist/utils/flags/config.d.ts +2 -2
  55. package/dist/utils/lighter.d.ts +1 -1
  56. package/dist/utils/sanitizeHtml.d.ts +7 -0
  57. package/dist/utils/sanitizeUrl.d.ts +10 -0
  58. package/dist/utils/tokenIconUrl.d.ts +1 -1
  59. package/dist/utils/transfer.d.ts +2 -1
  60. package/dist/wallets/walletConnectors/index.js +24 -24
  61. package/package.json +4 -4
  62. package/dist/atoms/activeCheckout.d.ts +0 -183
  63. package/dist/atoms/activeWithdrawal.d.ts +0 -21
  64. package/dist/atoms/bridgeProviders/acrossAdapter.d.ts +0 -109
  65. package/dist/atoms/bridgeProviders/index.d.ts +0 -25
  66. package/dist/atoms/bridgeProviders/registry.d.ts +0 -12
  67. package/dist/atoms/bridgeProviders/relayAdapter.d.ts +0 -60
  68. package/dist/atoms/bridgeProviders/types.d.ts +0 -182
  69. package/dist/atoms/checkoutProgress.d.ts +0 -22
  70. package/dist/atoms/directExecution.d.ts +0 -70
  71. package/dist/atoms/funkitCheckout.d.ts +0 -18
  72. package/dist/atoms/funkitProvider/index.d.ts +0 -24
  73. package/dist/atoms/generalWallet.d.ts +0 -45
  74. package/dist/atoms/i18n.d.ts +0 -6
  75. package/dist/atoms/modalState.d.ts +0 -30
  76. package/dist/atoms/quote.d.ts +0 -98
  77. package/dist/atoms/stepTransition.d.ts +0 -6
  78. package/dist/atoms/store.d.ts +0 -1
  79. package/dist/atoms/track/index.d.ts +0 -10
  80. package/dist/atoms/utils.d.ts +0 -2
  81. package/dist/atoms/wagmi.d.ts +0 -4
  82. package/dist/atoms/walletClient.d.ts +0 -15391
  83. package/dist/chunk-A24XIU2M.js +0 -299
  84. package/dist/chunk-CMS4F5PL.js +0 -209
  85. package/dist/chunk-FBCU3TQA.js +0 -204
  86. package/dist/chunk-GRQP5R23.js +0 -209
  87. package/dist/chunk-MGQZMUZ2.js +0 -288
  88. package/dist/chunk-OTMBU2BL.js +0 -204
  89. package/dist/domains/across.d.ts +0 -29
  90. package/dist/domains/track.d.ts +0 -14
  91. package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
  92. package/dist/modals/CheckoutModal/SelectAsset.d.ts +0 -14
  93. package/dist/modals/CheckoutModal/SourceChange/FanaticsSourceList.d.ts +0 -15
  94. package/dist/wallets/walletConnectors/chunk-3ZWIUCOI.js +0 -96
  95. package/dist/wallets/walletConnectors/chunk-4SC3PZVM.js +0 -70
  96. package/dist/wallets/walletConnectors/chunk-5AV2NSL3.js +0 -98
  97. package/dist/wallets/walletConnectors/chunk-5FWURLPF.js +0 -218
  98. package/dist/wallets/walletConnectors/chunk-6677RKVT.js +0 -69
  99. package/dist/wallets/walletConnectors/chunk-75A4Q5E5.js +0 -92
  100. package/dist/wallets/walletConnectors/chunk-ENLR4LXN.js +0 -94
  101. package/dist/wallets/walletConnectors/chunk-FT5BX7TL.js +0 -103
  102. package/dist/wallets/walletConnectors/chunk-GEMN6DM5.js +0 -106
  103. package/dist/wallets/walletConnectors/chunk-GXTI2PZD.js +0 -100
  104. package/dist/wallets/walletConnectors/chunk-LGT6IAXI.js +0 -93
  105. package/dist/wallets/walletConnectors/chunk-N7475PGA.js +0 -110
  106. package/dist/wallets/walletConnectors/chunk-O6YFVGVQ.js +0 -99
  107. package/dist/wallets/walletConnectors/chunk-OCM5YHT5.js +0 -92
  108. package/dist/wallets/walletConnectors/chunk-PRGCIJ7Y.js +0 -87
  109. package/dist/wallets/walletConnectors/chunk-RNIMZDHW.js +0 -95
  110. package/dist/wallets/walletConnectors/chunk-TLOROKED.js +0 -96
  111. package/dist/wallets/walletConnectors/chunk-WNQ3NPHX.js +0 -66
@@ -1,288 +0,0 @@
1
- "use client";
2
-
3
- // src/themes/baseTheme.ts
4
- var systemFontStack = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
5
- var fontStacks = {
6
- rounded: `SFRounded, ui-rounded, "SF Pro Rounded", ${systemFontStack}`,
7
- system: systemFontStack,
8
- fun: `SF Pro, ${systemFontStack}`
9
- };
10
- var radiusScales = {
11
- large: {
12
- actionButton: "12px",
13
- actionButtonInner: "10px",
14
- connectButton: "12px",
15
- modal: "24px",
16
- modalMobile: "28px",
17
- modalActionButton: "24px",
18
- modalActionButtonMobile: "28px",
19
- summaryBox: "12px",
20
- youPayYouReceive: "24px",
21
- inputAmountSwitcher: "24px",
22
- qrCode: "12px",
23
- tooltip: "4px",
24
- skeleton: "4px",
25
- dropdown: "12px",
26
- dropdownItem: "4px",
27
- modalTopbarIcon: "9999px"
28
- },
29
- medium: {
30
- actionButton: "10px",
31
- actionButtonInner: "8px",
32
- connectButton: "10px",
33
- modal: "16px",
34
- modalMobile: "18px",
35
- modalActionButton: "16px",
36
- modalActionButtonMobile: "18px",
37
- summaryBox: "10px",
38
- youPayYouReceive: "24px",
39
- inputAmountSwitcher: "24px",
40
- qrCode: "10px",
41
- tooltip: "4px",
42
- skeleton: "4px",
43
- dropdown: "10px",
44
- dropdownItem: "4px",
45
- modalTopbarIcon: "9999px"
46
- },
47
- none: {
48
- actionButton: "0px",
49
- actionButtonInner: "0px",
50
- connectButton: "0px",
51
- modal: "0px",
52
- modalMobile: "0px",
53
- modalActionButton: "0px",
54
- modalActionButtonMobile: "0px",
55
- summaryBox: "0px",
56
- youPayYouReceive: "0px",
57
- inputAmountSwitcher: "0px",
58
- qrCode: "0px",
59
- tooltip: "0px",
60
- skeleton: "0px",
61
- dropdown: "0px",
62
- dropdownItem: "0px",
63
- modalTopbarIcon: "0px"
64
- },
65
- small: {
66
- actionButton: "8px",
67
- actionButtonInner: "6px",
68
- connectButton: "8px",
69
- modal: "8px",
70
- modalMobile: "8px",
71
- modalActionButton: "8px",
72
- modalActionButtonMobile: "8px",
73
- summaryBox: "8px",
74
- youPayYouReceive: "24px",
75
- inputAmountSwitcher: "24px",
76
- qrCode: "8px",
77
- tooltip: "4px",
78
- skeleton: "4px",
79
- dropdown: "8px",
80
- dropdownItem: "4px",
81
- modalTopbarIcon: "9999px"
82
- }
83
- };
84
- var blurs = {
85
- large: {
86
- modalOverlay: "blur(20px)"
87
- },
88
- none: {
89
- modalOverlay: "blur(0px)"
90
- },
91
- small: {
92
- modalOverlay: "blur(8px)"
93
- },
94
- tiny: {
95
- modalOverlay: "blur(4px)"
96
- }
97
- };
98
- var DEFAULT_FONT_WEIGHTS = {
99
- regular: "400",
100
- medium: "500",
101
- // 510 in figma, but chrome no longer supports 510 - lowered to 500
102
- semibold: "600",
103
- // 590 in figma, but chrome no longer supports 590 - raised to 600
104
- bold: "700",
105
- heavy: "800"
106
- };
107
- var DEFAULT_FONT_SIZES = {
108
- "10": { fontSize: "10px", lineHeight: "15px" },
109
- "12": { fontSize: "12px", lineHeight: "14px" },
110
- "13": { fontSize: "13px", lineHeight: "18px" },
111
- "14": { fontSize: "14px", lineHeight: "18px" },
112
- "16": { fontSize: "16px", lineHeight: "20px" },
113
- "18": { fontSize: "18px", lineHeight: "24px" },
114
- "20": { fontSize: "20px", lineHeight: "20px" },
115
- "21": { fontSize: "21px", lineHeight: "21px" },
116
- "40": { fontSize: "40px", lineHeight: "48px" },
117
- "57": { fontSize: "57px", lineHeight: "68px" }
118
- };
119
- var FONT_SIZINGS = {
120
- regular: DEFAULT_FONT_SIZES,
121
- small: {
122
- "8": { fontSize: "8px", lineHeight: "16px" },
123
- "10": { fontSize: "8px", lineHeight: "16px" },
124
- "12": { fontSize: "10px", lineHeight: "16px" },
125
- "13": { fontSize: "10px", lineHeight: "16px" },
126
- "14": { fontSize: "12px", lineHeight: "16px" },
127
- "16": { fontSize: "14px", lineHeight: "18px" },
128
- "18": { fontSize: "14px", lineHeight: "20px" },
129
- "20": { fontSize: "18px", lineHeight: "20px" },
130
- "21": { fontSize: "19px", lineHeight: "19px" },
131
- "23": { fontSize: "20px", lineHeight: "28px" },
132
- "40": { fontSize: "34px", lineHeight: "40px" },
133
- "57": { fontSize: "50px", lineHeight: "60px" }
134
- }
135
- };
136
- var baseTheme = ({
137
- borderRadius = "large",
138
- fontStack = "fun",
139
- fontSizing = "regular",
140
- customFontFamily,
141
- customFontWeights = DEFAULT_FONT_WEIGHTS,
142
- customFontSizings = FONT_SIZINGS[fontSizing],
143
- customBorderWidths,
144
- customBorderRadiuses = radiusScales[borderRadius],
145
- customDimensions,
146
- customSpacings,
147
- customTextTransforms,
148
- overlayBlur = "small"
149
- }) => ({
150
- blurs: {
151
- modalOverlay: blurs[overlayBlur].modalOverlay
152
- },
153
- dimensions: {
154
- connectExchangeIconSize: "48px",
155
- dollarValueSkeletonHeight: "60px",
156
- inputAmountQuickOptionButtonHeight: "36px",
157
- inputAmountMinHeight: "76px",
158
- modalBottomBarButtonHeight: "34px",
159
- modalTopBarHeight: "56px",
160
- selectAssetItemIconSize: "24px",
161
- ...customDimensions
162
- },
163
- fonts: typeof customFontFamily === "string" ? {
164
- body: customFontFamily,
165
- buttonTextPrimary: customFontFamily,
166
- buttonTextSecondary: customFontFamily,
167
- buttonTextTertiary: customFontFamily,
168
- header: customFontFamily,
169
- inputAmount: customFontFamily,
170
- txStatusDescription: customFontFamily,
171
- txStatusTitle: customFontFamily
172
- } : {
173
- body: fontStacks[fontStack],
174
- buttonTextPrimary: fontStacks[fontStack],
175
- buttonTextSecondary: fontStacks[fontStack],
176
- buttonTextTertiary: fontStacks[fontStack],
177
- header: fontStacks[fontStack],
178
- inputAmount: fontStacks[fontStack],
179
- txStatusDescription: fontStacks[fontStack],
180
- txStatusTitle: fontStacks[fontStack],
181
- ...customFontFamily
182
- },
183
- fontWeight: {
184
- ...DEFAULT_FONT_WEIGHTS,
185
- inputAmount: DEFAULT_FONT_WEIGHTS.medium,
186
- modalTopbarTitle: DEFAULT_FONT_WEIGHTS.medium,
187
- modalBottomBarButtonText: DEFAULT_FONT_WEIGHTS.medium,
188
- paymentMethodItemSubtitle: DEFAULT_FONT_WEIGHTS.regular,
189
- paymentMethodItemTitle: DEFAULT_FONT_WEIGHTS.medium,
190
- selectAssetItemSubtitle: DEFAULT_FONT_WEIGHTS.regular,
191
- selectAssetItemTitle: DEFAULT_FONT_WEIGHTS.medium,
192
- transferTokenLabelFontWeight: DEFAULT_FONT_WEIGHTS.medium,
193
- txBreakdown: DEFAULT_FONT_WEIGHTS.regular,
194
- txStatusDescription: DEFAULT_FONT_WEIGHTS.regular,
195
- txStatusTitle: DEFAULT_FONT_WEIGHTS.medium,
196
- txSummaryLabel: DEFAULT_FONT_WEIGHTS.medium,
197
- txSummaryValue: DEFAULT_FONT_WEIGHTS.medium,
198
- ...customFontWeights
199
- },
200
- fontSize: {
201
- ...FONT_SIZINGS[fontSizing],
202
- body: FONT_SIZINGS[fontSizing][14],
203
- "header-14": { fontSize: "14px", lineHeight: "14px" },
204
- "header-36": { fontSize: "36px", lineHeight: "36px" },
205
- buttonTextPrimary: FONT_SIZINGS[fontSizing][12],
206
- buttonTextSecondary: FONT_SIZINGS[fontSizing][10],
207
- buttonTextTertiary: FONT_SIZINGS[fontSizing][12],
208
- dollarValue: FONT_SIZINGS[fontSizing][40],
209
- inputAmount: FONT_SIZINGS[fontSizing][57],
210
- modalTopbarSubtitle: FONT_SIZINGS[fontSizing][10],
211
- modalTopbarTitle: FONT_SIZINGS[fontSizing][13],
212
- modalBottomBarButtonText: FONT_SIZINGS[fontSizing][12],
213
- paymentMethodItemSubtitle: FONT_SIZINGS[fontSizing][12],
214
- paymentMethodItemTitle: FONT_SIZINGS[fontSizing][12],
215
- selectAssetItemSubtitle: FONT_SIZINGS[fontSizing][10],
216
- selectAssetItemTitle: FONT_SIZINGS[fontSizing][13],
217
- txBreakdown: FONT_SIZINGS[fontSizing][12],
218
- txStatusDescription: FONT_SIZINGS[fontSizing][13],
219
- txStatusTitle: FONT_SIZINGS[fontSizing][13],
220
- txSummaryLabel: FONT_SIZINGS[fontSizing][12],
221
- txSummaryValue: FONT_SIZINGS[fontSizing][12],
222
- youPayYouReceivePrimaryFontSize: FONT_SIZINGS[fontSizing][12],
223
- youPayYouReceiveSecondaryFontSize: FONT_SIZINGS[fontSizing][10],
224
- transferTokenLabelFontSize: FONT_SIZINGS[fontSizing][12],
225
- depositAddressFontSize: FONT_SIZINGS[fontSizing][10],
226
- funFeatureListItemFontSize: FONT_SIZINGS[fontSizing][12],
227
- ...customFontSizings
228
- },
229
- radii: {
230
- actionButton: radiusScales[borderRadius].actionButton,
231
- actionButtonInner: radiusScales[borderRadius].actionButtonInner,
232
- connectButton: radiusScales[borderRadius].connectButton,
233
- menuButton: radiusScales[borderRadius].connectButton,
234
- modal: radiusScales[borderRadius].modal,
235
- modalMobile: radiusScales[borderRadius].modalMobile,
236
- modalActionButton: radiusScales[borderRadius].modalActionButton,
237
- modalActionButtonMobile: radiusScales[borderRadius].modalActionButtonMobile,
238
- summaryBox: radiusScales[borderRadius].summaryBox,
239
- youPayYouReceive: radiusScales[borderRadius].youPayYouReceive,
240
- inputAmountSwitcher: radiusScales[borderRadius].inputAmountSwitcher,
241
- qrCode: radiusScales[borderRadius].qrCode,
242
- skeleton: radiusScales[borderRadius].skeleton,
243
- tooltip: radiusScales[borderRadius].tooltip,
244
- dropdown: radiusScales[borderRadius].dropdown,
245
- dropdownItem: radiusScales[borderRadius].dropdownItem,
246
- modalTopbarIcon: radiusScales[borderRadius].modalTopbarIcon,
247
- ...customBorderRadiuses
248
- },
249
- borderWidths: {
250
- activeOptionBorderWidth: "1px",
251
- buttonTertiaryBorderWidth: "0px",
252
- txSummaryBoxBorderWidth: "1px",
253
- ...customBorderWidths
254
- },
255
- spacing: {
256
- confirmationStepMarginTop: "6px",
257
- confirmationStepVerticalGap: "18px",
258
- modalBaseHorizontalPadding: "6px",
259
- modalBottomHorizontalPadding: "12px",
260
- modalPaddingBottomUpper: "16px",
261
- modalPaddingBottomLower: "16px",
262
- modalTopBarVerticalTextSpacing: "0px",
263
- selectAssetItemPaddingX: "12px",
264
- selectAssetItemPaddingY: "8px",
265
- selectAssetItemTextGap: "0px",
266
- selectBrokerageItemPaddingX: "12px",
267
- selectBrokerageItemPaddingY: "11px",
268
- txBreakdownMarginY: "18px",
269
- txBreakdownPaddingX: "12px",
270
- txSummaryBoxPaddingX: "12px",
271
- txSummaryBoxPaddingY: "12px",
272
- txSummaryLineItemPadding: "0px",
273
- txSummaryDividerMarginX: "12px",
274
- txSummaryDividerMarginY: "12px",
275
- youPayYouReceivePaddingY: "8px",
276
- ...customSpacings
277
- },
278
- textTransforms: {
279
- inputAmountQuickOptionButton: "none",
280
- txStatusTitle: "none",
281
- ...customTextTransforms
282
- }
283
- });
284
-
285
- export {
286
- systemFontStack,
287
- baseTheme
288
- };
@@ -1,204 +0,0 @@
1
- "use client";
2
- import {
3
- baseTheme
4
- } from "./chunk-MGQZMUZ2.js";
5
-
6
- // src/themes/darkTheme.ts
7
- var accentColors = {
8
- blue: { accentColor: "#3898FF", accentColorForeground: "#FFF" },
9
- green: { accentColor: "#66CC00", accentColorForeground: "#000" },
10
- orange: { accentColor: "#F6851B", accentColorForeground: "#000" },
11
- pink: { accentColor: "#FF7AB8", accentColorForeground: "#000" },
12
- purple: { accentColor: "#7A70FF", accentColorForeground: "#FFF" },
13
- red: { accentColor: "#F34126", accentColorForeground: "#FFF" },
14
- white: { accentColor: "#FFF", accentColorForeground: "#000" }
15
- };
16
- var defaultAccentColor = accentColors.white;
17
- var darkTheme = ({
18
- accentColor = defaultAccentColor.accentColor,
19
- accentColorForeground = defaultAccentColor.accentColorForeground,
20
- customColors,
21
- customShadows,
22
- ...baseThemeOptions
23
- } = {}) => ({
24
- ...baseTheme(baseThemeOptions),
25
- colors: {
26
- accentColor,
27
- accentColorForeground,
28
- actionButtonBorder: "rgba(255, 255, 255, 0.04)",
29
- connectButtonBackground: "#000",
30
- connectButtonBackgroundError: "#C60000",
31
- connectButtonText: "#FFF",
32
- connectButtonTextError: "#FFF",
33
- connectionIndicator: "#30E000",
34
- error: accentColors.red.accentColor,
35
- errorBackground: "#F2E6E4",
36
- errorBorder: "rgba(243, 65, 38, 0.2)",
37
- generalBorder: "#292929",
38
- // strokeColor in figma
39
- generalBorderDim: "rgba(255, 255, 255, 0.04)",
40
- menuItemBackground: "rgba(255, 255, 255, 0.03)",
41
- selectedOptionBorder: "rgba(224, 232, 255, 0.1)",
42
- focusedOptionBorder: "#8C8C8C",
43
- standby: "#F6851B",
44
- success: "#66CC00",
45
- delayedStatusIcon: customColors?.secondaryText ?? "#8C8C8C",
46
- // backward compatibility
47
- chainIconBorder: "#fff",
48
- // FUNKIT COLORS
49
- // modal backgrounds
50
- modalBackdrop: "rgba(0, 0, 0, 0.2)",
51
- modalBackground: "#000000",
52
- modalBorder: "#292929",
53
- modalTopbarIcon: "#FFF",
54
- offBackground: "#1F1F1F",
55
- offBackgroundInverse: "#F2F2F2",
56
- hoverState: "#333333",
57
- lightStroke: "#333333",
58
- mediumStroke: "#333333",
59
- heavyStroke: "rgba(117, 117, 117, 0.40)",
60
- strokeColor: "#333333",
61
- //Text
62
- primaryText: "#FFF",
63
- secondaryText: "#8C8C8C",
64
- tertiaryText: "rgba(255, 255, 255, 0.35)",
65
- textSelection: "rgba(255, 255, 255, 0.10)",
66
- // input
67
- inputBackground: "#000000",
68
- inputBorderBase: "#333333",
69
- inputBorderHover: "#525252",
70
- // tab
71
- activeTabBorderColor: "#333333",
72
- activeTabBackground: "#333333",
73
- // button
74
- actionColor: "#FFF",
75
- actionColorHover: "rgba(255, 255, 255, 0.8)",
76
- actionColorDisabled: "rgba(255, 255, 255, 0.65)",
77
- buttonPrimary: accentColor,
78
- buttonDisabled: "rgba(255, 255, 255, 0.20)",
79
- buttonTextPrimary: "#000000",
80
- buttonTextHover: "#000000",
81
- buttonTextDisabled: "#000000",
82
- buttonWarning: accentColors.red.accentColor,
83
- buttonSuccess: "#2EA200",
84
- transparent: "transparent",
85
- buttonBackgroundTertiary: "#333333",
86
- buttonBackgroundHoverTertiary: "#333333",
87
- buttonBackgroundDisabledTertiary: "transparent",
88
- buttonTextTertiary: "#FFF",
89
- buttonTextDisabledTertiary: "rgba(255, 255, 255, 0.65)",
90
- buttonBackground: "#FFF",
91
- buttonBackgroundHover: "#f2f2f2",
92
- buttonBackgroundPressed: "#FFF",
93
- buttonBackgroundDisabled: "rgba(255, 255, 255, 0.65)",
94
- buttonTextSecondaryDisabled: "rgba(255, 255, 255, 0.65)",
95
- buttonTextSecondary: "#FFFFFF",
96
- buttonIconBackgroundHover: "#333333",
97
- buttonIconBackgroundPressed: "#333333",
98
- buttonIconStroke: "rgba(255, 255, 255, 0.35)",
99
- buttonBorderTertiary: "transparent",
100
- buttonBorderFocusedTertiary: "rgba(255, 255, 255, 0.35)",
101
- buttonFocusedOutline: "none",
102
- buttonBorderGradient: "none",
103
- buttonHoverBorderGradient: "none",
104
- buttonDisabledBorderGradient: "none",
105
- // TODO: Make common colors when refactoring the design system
106
- inputAmountQuickOptionBaseBackground: "#1F1F1F",
107
- inputAmountQuickOptionHoverBackground: "#333333",
108
- inputAmountQuickOptionActiveBackground: "#333333",
109
- inputAmountQuickOptionDisabledBackground: "#333333",
110
- inputAmountQuickOptionBaseBorder: "#f2f2f2",
111
- inputAmountQuickOptionHoverBorder: "rgba(255, 255, 255, 0.35)",
112
- inputAmountQuickOptionActiveBorder: "rgba(255, 255, 255, 0.35)",
113
- inputAmountQuickOptionFocusedBorder: "rgba(255, 255, 255, 0.35)",
114
- inputAmountFiatDecimalsColor: customColors?.inputAmountFiatDecimalsColor ?? "none",
115
- youPayYouReceiveBackground: "#000000",
116
- // modalBackground
117
- youPayYouReceiveBorder: "#333333",
118
- // mediumStroke
119
- youPayYouReceivePrimaryText: "#FFF",
120
- // primaryText
121
- youPayYouReceiveSecondaryText: "#8C8C8C",
122
- // secondaryText
123
- // badges
124
- badgeBackgroundSuccess: "rgba(124, 242, 136, 0.1)",
125
- badgeBorderSuccess: "rgba(124, 242, 136, 0.2)",
126
- badgeTextSuccess: "rgb(124, 242, 136)",
127
- newBadgeBackground: "linear-gradient(180deg, rgba(57, 76, 56, 0.55) 0%, rgba(61, 81, 65, 0.55) 100%)",
128
- newBadgeBorder: "rgba(122, 221, 122, 0.3)",
129
- newBadgeText: "#A4FF9A",
130
- approvedBadgeBackground: "linear-gradient(180deg, rgba(236, 255, 234, 0.20) 0%, rgba(228, 255, 233, 0.20) 100%)",
131
- approvedBadgeBorder: "rgba(109, 216, 109, 0.08)",
132
- approvedBadgeText: "#8FFFA9",
133
- failedBadgeBackground: "rgba(255, 61, 61, 0.18)",
134
- failedBadgeBorder: "rgba(255, 255, 255, 0.10)",
135
- failedBadgeText: "#F88877",
136
- announceGradientFrom: "#AAAAAA",
137
- announceGradientTo: "#BEBEBE",
138
- fiatPendingGradientFrom: "#AAAAAA",
139
- fiatPendingGradientTo: "#BEBEBE",
140
- fiatSuccessBackgroundFill: "rgba(102, 204, 0, 0.30)",
141
- fiatFailedBackgroundFill: "rgba(255, 61, 61, 0.30)",
142
- fiatStatusIconBorder: "rgba(255, 255, 255, 0.06)",
143
- fiatAccountIconFill: "#002F5E",
144
- fiatAccountGradientFrom: "#3A82FE",
145
- fiatAccountGradientTo: "#73A7FF",
146
- modalHeaderDivider: "#333333",
147
- // lightStroke
148
- modalFooterDivider: "#333333",
149
- // lightStroke
150
- spinnerBackground: customColors?.mediumStroke ?? "rgba(0, 0, 0, 0.3)",
151
- // 30% buttonTextPrimary
152
- spinnerIndicator: customColors?.primaryText ?? "#000",
153
- // 100% buttonTextPrimary
154
- spinnerBackgroundVerifyAccount: "rgba(0, 0, 0, 0.3)",
155
- // 30% buttonTextPrimary
156
- spinnerIndicatorVerifyAccount: customColors?.primaryText ?? "#000",
157
- // 100% buttonTextPrimary
158
- // Override colors
159
- ...customColors || {},
160
- // option Boxes
161
- optionBoxBackground: customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#000",
162
- // keeps gradient in SourcePaymentMethodItem if optionBoxBackground differs from modal background
163
- optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
164
- dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#000000",
165
- dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#1F1F1F",
166
- dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
167
- txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#000",
168
- txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#333333"
169
- },
170
- shadows: {
171
- connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
172
- dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
173
- selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
174
- selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.24)",
175
- dropdown: "0px 0px 0px 1px rgba(255, 255, 255, 0.16), 0px 2px 6px rgba(0, 0, 0, 0.03), 0px 4px 42px rgba(0, 0, 0, 0.06)",
176
- notification: "0px 0px 0px 1px rgba(255, 255, 255, 0.20), 0px 2px 6px 0px rgba(0, 0, 0, 0.05), 0px 4px 42px 0px rgba(0, 0, 0, 0.06)",
177
- qrCode: "0px 0px 0px 1px rgba(255, 255, 255, 0.16)",
178
- buttonShadow: "none",
179
- buttonShadowTertiary: "none",
180
- buttonHoverShadow: "none",
181
- buttonHoverShadowTertiary: "none",
182
- buttonFocusedShadow: "0px 0px 0px 2px rgba(255, 255, 255, 0.25)",
183
- buttonFocusedShadowTertiary: "0px 0px 0px 2px rgba(255, 255, 255, 0.25)",
184
- buttonDisabledShadow: "none",
185
- buttonDisabledShadowTertiary: "none",
186
- buttonInnerShadow: "none",
187
- buttonInnerShadowTertiary: customShadows?.buttonInnerShadow ?? "none",
188
- buttonFocusedInnerShadow: "none",
189
- buttonFocusedInnerShadowTertiary: customShadows?.buttonFocusedInnerShadow ?? "none",
190
- buttonHoverInnerShadow: "none",
191
- buttonHoverInnerShadowTertiary: customShadows?.buttonHoverInnerShadow ?? "none",
192
- buttonDisabledInnerShadow: "none",
193
- buttonDisabledInnerShadowTertiary: customShadows?.buttonDisabledInnerShadow ?? "none",
194
- selectedDropdownItem: "none",
195
- // Override shadows
196
- ...customShadows || {}
197
- },
198
- moonpayTheme: "dark"
199
- });
200
- darkTheme.accentColors = accentColors;
201
-
202
- export {
203
- darkTheme
204
- };
@@ -1,29 +0,0 @@
1
- import { type Action } from '@across-protocol/app-sdk';
2
- import type { SwapApprovalApiResponse } from '@across-protocol/app-sdk/dist/api/swap-approval';
3
- import { type ApiFunkitCheckoutActionParams } from '@funkit/utils';
4
- import type { FunkitCheckoutActionParams } from '../providers/FunkitCheckoutContext';
5
- /** Fun.xyz integrator ID for Across */
6
- export declare const ACROSS_INTEGRATOR_ID = "0x007f";
7
- export declare const acrossClient: import("@across-protocol/app-sdk").AcrossClient;
8
- export type AcrossQuoteParams = Parameters<typeof acrossClient.getSwapQuote>[0];
9
- /**
10
- * Fetches a swap approval quote from Across Protocol.
11
- * Uses GET request with query params as per Across API spec.
12
- */
13
- export declare function getAcrossSwapApproval(params: AcrossQuoteParams): Promise<SwapApprovalApiResponse>;
14
- export declare const actionParamsToAcrossActions: (actionParams: FunkitCheckoutActionParams[]) => Action[];
15
- /**
16
- * Converts an Across swap/approval API response into actionParams
17
- * suitable for passing to the Relay no-op quote flow.
18
- *
19
- * Returns an array of action params: approval txs (if any) + the SpokePool deposit tx.
20
- */
21
- export declare function buildAcrossActionParams(acrossResponse: SwapApprovalApiResponse): ApiFunkitCheckoutActionParams[];
22
- export declare const getAcrossChainIdByRelayChainId: (relayChainId: string) => string;
23
- export declare const getAcrossTokenAddressByRelayTokenAddress: (relayTokenAddress: string) => string;
24
- export declare function isAcrossRoute(params: {
25
- fromChainId: string;
26
- toChainId: string;
27
- fromTokenAddress: string;
28
- toTokenAddress: string;
29
- }): boolean;
@@ -1,14 +0,0 @@
1
- import type { FunkitUserInfo } from '../consts/funkit';
2
- import type { CheckoutModalEvent } from '../hooks/track/CheckoutModalEvent';
3
- import type { WithdrawModalEvent } from '../hooks/track/WithdrawModalEvent';
4
- export interface TrackEventData {
5
- eventName: CheckoutModalEvent | WithdrawModalEvent;
6
- value?: string | number;
7
- metadata?: object;
8
- }
9
- export declare const logEvent: (eventNameOrTrackEventData: CheckoutModalEvent | TrackEventData) => void;
10
- export declare const logMeasuredEvent: (eventName: CheckoutModalEvent | WithdrawModalEvent) => void;
11
- export declare const startMeasuredEvent: (eventName: CheckoutModalEvent | WithdrawModalEvent) => void;
12
- export declare const updateUserAsync: (userInfo: FunkitUserInfo & {
13
- l2Address?: string;
14
- }, apiKey: string) => Promise<import("@statsig/react-bindings").StatsigUpdateDetails>;
@@ -1,2 +0,0 @@
1
- import { type WalletAssets } from './useWalletAssets';
2
- export declare function useUsableWalletAssetsForCheckout(): WalletAssets | undefined;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { TransferTokenDefault } from '../../hooks/useTokenChain';
3
- import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
5
- export type SelectAssetState = CheckoutModalCommonState & {
6
- paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
7
- };
8
- export type SelectAssetNext = {
9
- paymentMethodInfo?: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
10
- disconnectedBrokerage?: boolean;
11
- transferToken?: TransferTokenDefault;
12
- };
13
- export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>;
14
- export declare function SelectAsset({ modalState, onNext, onClose, }: ModalStepComponentProps<FunCheckoutStep.SELECT_ASSET>): React.JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { ConnectablePaymentMethodInfo, PaymentMethod } from '../../../domains/paymentMethods';
3
- import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
4
- interface FanaticsSourceListProps {
5
- preferred: (ConnectablePaymentMethodInfo | PaymentMethod)[];
6
- moreSources: (ConnectablePaymentMethodInfo | PaymentMethod)[];
7
- comingSoon: PaymentMethod[];
8
- isFallback: boolean;
9
- renderSource: (source: ConnectablePaymentMethodInfo | PaymentMethod) => React.ReactNode;
10
- renderComingSoon: (source: PaymentMethod) => React.ReactNode;
11
- cryptoCashTab: PaymentMethodType;
12
- onTabChange: (tab: PaymentMethodType) => void;
13
- }
14
- export declare function FanaticsSourceList({ cryptoCashTab, isFallback, onTabChange, preferred, moreSources, comingSoon, renderSource, renderComingSoon, }: FanaticsSourceListProps): React.JSX.Element;
15
- export {};
@@ -1,96 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-ARYAYQ7Z.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-23WIEY36.js";
9
-
10
- // src/wallets/walletConnectors/frontierWallet/frontierWallet.ts
11
- import { isAndroid } from "@funkit/utils";
12
- var frontierWallet = ({
13
- projectId,
14
- walletConnectParameters
15
- }) => {
16
- const isFrontierInjected = hasInjectedProvider({
17
- namespace: "frontier.ethereum",
18
- flag: "isFrontier"
19
- });
20
- const shouldUseWalletConnect = !isFrontierInjected;
21
- return {
22
- id: "frontier",
23
- name: "Frontier Wallet",
24
- rdns: "xyz.frontier.wallet",
25
- installed: isFrontierInjected,
26
- iconUrl: async () => (await import("./frontierWallet-5QV7ZACT.js")).default,
27
- iconBackground: "#CC703C",
28
- downloadUrls: {
29
- android: "https://play.google.com/store/apps/details?id=com.frontierwallet",
30
- ios: "https://apps.apple.com/us/app/frontier-crypto-defi-wallet/id1482380988",
31
- qrCode: "https://www.frontier.xyz/download",
32
- chrome: "https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd",
33
- browserExtension: "https://www.frontier.xyz/download"
34
- },
35
- mobile: {
36
- getUri: shouldUseWalletConnect ? (uri) => {
37
- return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
38
- } : void 0
39
- },
40
- qrCode: shouldUseWalletConnect ? {
41
- getUri: (uri) => {
42
- return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
43
- },
44
- instructions: {
45
- learnMoreUrl: "https://help.frontier.xyz/en/",
46
- steps: [
47
- {
48
- description: "wallet_connectors.im_token.qr_code.step1.description",
49
- step: "install",
50
- title: "wallet_connectors.im_token.qr_code.step1.title"
51
- },
52
- {
53
- description: "wallet_connectors.im_token.qr_code.step2.description",
54
- step: "create",
55
- title: "wallet_connectors.im_token.qr_code.step2.title"
56
- },
57
- {
58
- description: "wallet_connectors.im_token.qr_code.step3.description",
59
- step: "scan",
60
- title: "wallet_connectors.im_token.qr_code.step3.title"
61
- }
62
- ]
63
- }
64
- } : void 0,
65
- extension: {
66
- instructions: {
67
- learnMoreUrl: "https://help.frontier.xyz/en/articles/6967236-setting-up-frontier-on-your-device",
68
- steps: [
69
- {
70
- description: "wallet_connectors.frontier.extension.step1.description",
71
- step: "install",
72
- title: "wallet_connectors.frontier.extension.step1.title"
73
- },
74
- {
75
- description: "wallet_connectors.frontier.extension.step2.description",
76
- step: "create",
77
- title: "wallet_connectors.frontier.extension.step2.title"
78
- },
79
- {
80
- description: "wallet_connectors.frontier.extension.step3.description",
81
- step: "refresh",
82
- title: "wallet_connectors.frontier.extension.step3.title"
83
- }
84
- ]
85
- }
86
- },
87
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({ projectId, walletConnectParameters }) : getInjectedConnector({
88
- namespace: "frontier.ethereum",
89
- flag: "isFrontier"
90
- })
91
- };
92
- };
93
-
94
- export {
95
- frontierWallet
96
- };