@funkit/connect 9.2.0 → 9.3.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 (42) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/__generated__/default_configs.d.ts +31 -2
  3. package/dist/__generated__/default_feature_gates.d.ts +1 -0
  4. package/dist/{chunk-XCM74QX2.js → chunk-FHIMKOGH.js} +24 -1
  5. package/dist/{chunk-WSCXOKCX.js → chunk-NKJYA7IM.js} +24 -1
  6. package/dist/{chunk-SC53AFEE.js → chunk-TWG76V3I.js} +26 -4
  7. package/dist/clients/fanatics.css +5448 -3919
  8. package/dist/clients/fanatics.js +3 -3
  9. package/dist/components/Box/Box.d.ts +44 -44
  10. package/dist/components/FunButton/FunButton.css.d.ts +1 -0
  11. package/dist/components/FunButton/FunLinkButton.d.ts +2 -2
  12. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
  13. package/dist/components/FunDivider/FunDivider.d.ts +2 -1
  14. package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
  15. package/dist/css/sprinkles.css.d.ts +120 -44
  16. package/dist/domains/relay.d.ts +2 -2
  17. package/dist/hooks/queries/useFops.d.ts +4 -198
  18. package/dist/hooks/statsig/useDynamicConfig.d.ts +3 -1
  19. package/dist/hooks/useCheckoutTransferInit.d.ts +5 -1
  20. package/dist/hooks/usePaymentSources.d.ts +6 -2
  21. package/dist/hooks/useScrollDivider.d.ts +1 -0
  22. package/dist/hooks/useSwappedPreload.d.ts +2 -3
  23. package/dist/index.css +5523 -3943
  24. package/dist/index.js +1127 -835
  25. package/dist/modals/CheckoutModal/SourceChange/SourceList.d.ts +4 -3
  26. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +6 -0
  27. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +2 -15
  28. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +15 -0
  29. package/dist/modals/CheckoutModal/SwappedIframe/index.d.ts +1 -1
  30. package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -5
  31. package/dist/providers/FunkitConfigContext.d.ts +2 -0
  32. package/dist/providers/FunkitThemeProvider.d.ts +114 -0
  33. package/dist/providers/SwappedProvider.d.ts +8 -8
  34. package/dist/themes/baseTheme.js +1 -1
  35. package/dist/themes/darkTheme.js +2 -2
  36. package/dist/themes/lightTheme.js +2 -2
  37. package/dist/utils/checkout.d.ts +4 -4
  38. package/dist/utils/swapped.d.ts +6 -3
  39. package/dist/wallets/walletConnectors/index.js +40 -40
  40. package/package.json +2 -2
  41. package/dist/hooks/useIframePool.d.ts +0 -38
  42. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframePool.d.ts +0 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 9.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c6f62c: feat(connect): use native icons for common Swapped payment methods
8
+
9
+ ### Patch Changes
10
+
11
+ - 3b3ae60: lighter swapped ui integration part 2
12
+ - d080351: Fix bottom bar layout thrash during checkout complete transition for themed customers
13
+ - 369e926: feat(connect): FOP native logos
14
+ - 50d6d54: chore: swapped file clean up and name change
15
+ - e7c3f9b: opinion theme feedback updates
16
+ - ef5102d: remove false alarm error logging for quote
17
+ - 76ffacf: fix(connect): swapped icon theme comparison
18
+ - 98167fb: feat(connect,api-base): preload single iframe vs iframe pool
19
+ - 6d05d1e: change stakingToken to finalizedToken
20
+ - ce0747d: fix(connect): update swapped icons based on active theme
21
+ - f85ec7b: opinion theme feedbacks second round
22
+ - Updated dependencies [98167fb]
23
+ - @funkit/api-base@3.0.1
24
+
25
+ ## 9.2.1
26
+
27
+ ### Patch Changes
28
+
29
+ - 2e118a1: opinion theme updates
30
+ - f991fe5: feat(connect): show Unavailable badge for geo-blocked payment methods
31
+ - f991fe5: feat(connect): swapped coming soon if enabled without uda params
32
+ - 48ad728: feat(connect): limit forms of payments, sticky top section
33
+ - 030b288: Make logger mandatory on BaseApiRequest and update all call sites
34
+ - 61cd479: feat: hide sepa if not in eu
35
+ - Updated dependencies [030b288]
36
+ - @funkit/api-base@3.0.0
37
+
3
38
  ## 9.2.0
4
39
 
5
40
  ### Minor Changes
@@ -283,6 +283,9 @@ declare const _default: {
283
283
  readonly enablemeldpayment: {
284
284
  readonly value: false;
285
285
  };
286
+ readonly enablesourcegrouplabels: {
287
+ readonly value: true;
288
+ };
286
289
  readonly enableswappeddeposit: {
287
290
  readonly value: false;
288
291
  };
@@ -303,6 +306,19 @@ declare const _default: {
303
306
  readonly value: true;
304
307
  };
305
308
  readonly foppriority: {
309
+ readonly variants: readonly [{
310
+ readonly condition: {
311
+ readonly type: "country";
312
+ readonly countryCodes: readonly ["BR"];
313
+ };
314
+ readonly value: readonly ["PIX", "CARDS", "APPLE_PAY", "GOOGLE_PAY", "REVOLUT_PAY", "PAYPAL", "BANK_TRANSFER", "SKRILL"];
315
+ }, {
316
+ readonly condition: {
317
+ readonly type: "country";
318
+ readonly countryCodes: readonly ["IN"];
319
+ };
320
+ readonly value: readonly ["GOOGLE_PAY", "APPLE_PAY", "REVOLUT_PAY", "PAYPAL", "BANK_TRANSFER", "PIX", "SKRILL", "CARDS"];
321
+ }];
306
322
  readonly value: readonly ["CARDS", "APPLE_PAY", "GOOGLE_PAY", "REVOLUT_PAY", "PAYPAL", "BANK_TRANSFER", "PIX", "SKRILL"];
307
323
  };
308
324
  readonly ischeckoutactivated: {
@@ -413,13 +429,26 @@ declare const _default: {
413
429
  };
414
430
  readonly tokentransferchaingroups: {
415
431
  readonly value: {
416
- readonly popular: readonly [1151111081099710, 1, 728126428];
432
+ readonly popular: readonly [];
433
+ };
434
+ };
435
+ readonly tokentransfertest: {
436
+ readonly value: {
437
+ readonly chains: {
438
+ readonly '1': readonly ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f", "0xdac17f958d2ee523a2206206994597c13d831ec7", "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"];
439
+ readonly '137': readonly ["0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"];
440
+ readonly '1151111081099710': readonly ["So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"];
441
+ };
442
+ readonly defaultChainId: 137;
443
+ readonly defaultTokens: readonly [];
444
+ readonly badges: {};
445
+ readonly chainSortOrder: readonly ["1", "1151111081099710", "56", "8453", "137", "42161", "10"];
417
446
  };
418
447
  };
419
448
  readonly tokentransfertokengroups: {
420
449
  readonly value: {
421
450
  readonly popular: readonly [];
422
- readonly stablecoins: readonly ["BUSD", "DAI", "USDC", "USDC.e", "USDe", "USDT"];
451
+ readonly stablecoins: readonly [];
423
452
  };
424
453
  };
425
454
  readonly uda_params: {
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ readonly 'exact-in': false;
2
3
  readonly 'test-testing-gate': false;
3
4
  };
4
5
  export default _default;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  baseTheme
4
- } from "./chunk-SC53AFEE.js";
4
+ } from "./chunk-TWG76V3I.js";
5
5
 
6
6
  // src/themes/lightTheme.ts
7
7
  var accentColors = {
@@ -20,6 +20,7 @@ var lightTheme = ({
20
20
  customColors,
21
21
  customShadows,
22
22
  ...baseThemeOptions
23
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: This is a theme file, it's fine to have a lot of properties
23
24
  } = {}) => ({
24
25
  ...baseTheme(baseThemeOptions),
25
26
  colors: {
@@ -67,8 +68,23 @@ var lightTheme = ({
67
68
  secondaryText: "#737373",
68
69
  tertiaryText: "rgba(0, 0, 0, 0.35)",
69
70
  textSelection: "rgba(0, 0, 0, 0.10)",
71
+ selectedDropdownItemText: customColors?.primaryText ?? "#000",
72
+ dropdownLabelColor: customColors?.primaryText ?? "#000",
73
+ copyButtonBackgroundBase: customColors?.offBackground ?? "#F7F7F7",
74
+ copyButtonBackgroundHover: customColors?.hoverState ?? "#F0F0F0",
75
+ copyButtonBackgroundActive: customColors?.inputBorderHover ?? "#E5E5E5",
76
+ copyButtonBorderBase: customColors?.mediumStroke ?? "#F0F0F0",
77
+ copyButtonBorderHover: customColors?.mediumStroke ?? "#F0F0F0",
78
+ funFeatureListBackgroundBase: customColors?.offBackground ?? "#F7F7F7",
79
+ funFeatureListBackgroundHover: customColors?.hoverState ?? "#F0F0F0",
80
+ funFeatureListBorderColor: "transparent",
81
+ funFeatureListBorderColorHover: "transparent",
82
+ selectedDropdownItemBackground: "transparent",
83
+ alwaysVisibleLabelBackgroundHover: "transparent",
70
84
  // input
85
+ inputLabel: customColors?.primaryText ?? "#000",
71
86
  inputBackground: "#FFFFFF",
87
+ inputBackgroundHover: customColors?.offBackground ?? "#F7F7F7",
72
88
  inputBorderBase: "#F0F0F0",
73
89
  inputBorderHover: "#E5E5E5",
74
90
  // tab
@@ -165,9 +181,16 @@ var lightTheme = ({
165
181
  optionBoxBackground: customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#FFF",
166
182
  // keeps gradient in SourcePaymentMethodItem if optionBoxBackground differs from modal background
167
183
  optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
184
+ optionBoxBorderBase: customColors?.optionBoxBorderBase ?? customColors?.mediumStroke ?? "#F0F0F0",
185
+ optionBoxBorderHover: customColors?.optionBoxBorderHover ?? customColors?.mediumStroke ?? "#F0F0F0",
186
+ optionBoxDefaultModeNotActiveBorderBase: customColors?.optionBoxDefaultModeNotActiveBorderBase ?? "transparent",
187
+ optionBoxDefaultModeNotActiveBorderHover: customColors?.optionBoxDefaultModeNotActiveBorderHover ?? "transparent",
168
188
  dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#FFF",
189
+ openDropdownBackgroundColor: customColors?.openDropdownBackgroundColor ?? customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#FFF",
169
190
  dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#F7F7F7",
170
191
  dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
192
+ dropdownActiveItemBorderBase: customColors?.dropdownActiveItemBorderBase ?? customColors?.mediumStroke ?? "#F0F0F0",
193
+ dropdownActiveItemBorderHover: customColors?.dropdownActiveItemBorderHover ?? customColors?.mediumStroke ?? "#F0F0F0",
171
194
  txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#FFF",
172
195
  txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#F7F7F7",
173
196
  counterRingColor: customColors?.counterRingColor ?? accentColor,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  baseTheme
4
- } from "./chunk-SC53AFEE.js";
4
+ } from "./chunk-TWG76V3I.js";
5
5
 
6
6
  // src/themes/darkTheme.ts
7
7
  var accentColors = {
@@ -20,6 +20,7 @@ var darkTheme = ({
20
20
  customColors,
21
21
  customShadows,
22
22
  ...baseThemeOptions
23
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: This is a theme file, it's fine to have a lot of properties
23
24
  } = {}) => ({
24
25
  ...baseTheme(baseThemeOptions),
25
26
  colors: {
@@ -67,8 +68,23 @@ var darkTheme = ({
67
68
  secondaryText: "#8C8C8C",
68
69
  tertiaryText: "rgba(255, 255, 255, 0.35)",
69
70
  textSelection: "rgba(255, 255, 255, 0.10)",
71
+ selectedDropdownItemText: customColors?.primaryText ?? "#FFF",
72
+ dropdownLabelColor: customColors?.primaryText ?? "#FFF",
73
+ copyButtonBackgroundBase: customColors?.offBackground ?? "#1F1F1F",
74
+ copyButtonBackgroundHover: customColors?.hoverState ?? "#333333",
75
+ copyButtonBackgroundActive: customColors?.inputBorderHover ?? "#525252",
76
+ copyButtonBorderBase: customColors?.mediumStroke ?? "#333333",
77
+ copyButtonBorderHover: customColors?.mediumStroke ?? "#333333",
78
+ funFeatureListBackgroundBase: customColors?.offBackground ?? "#1F1F1F",
79
+ funFeatureListBackgroundHover: customColors?.hoverState ?? "#333333",
80
+ funFeatureListBorderColor: "transparent",
81
+ funFeatureListBorderColorHover: "transparent",
82
+ selectedDropdownItemBackground: "transparent",
83
+ alwaysVisibleLabelBackgroundHover: "transparent",
70
84
  // input
85
+ inputLabel: customColors?.primaryText ?? "#FFF",
71
86
  inputBackground: "#000000",
87
+ inputBackgroundHover: customColors?.offBackground ?? "#1F1F1F",
72
88
  inputBorderBase: "#333333",
73
89
  inputBorderHover: "#525252",
74
90
  // tab
@@ -165,9 +181,16 @@ var darkTheme = ({
165
181
  optionBoxBackground: customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#000",
166
182
  // keeps gradient in SourcePaymentMethodItem if optionBoxBackground differs from modal background
167
183
  optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
184
+ optionBoxBorderBase: customColors?.optionBoxBorderBase ?? customColors?.mediumStroke ?? "#333333",
185
+ optionBoxBorderHover: customColors?.optionBoxBorderHover ?? customColors?.mediumStroke ?? "#333333",
186
+ optionBoxDefaultModeNotActiveBorderBase: customColors?.optionBoxDefaultModeNotActiveBorderBase ?? "transparent",
187
+ optionBoxDefaultModeNotActiveBorderHover: customColors?.optionBoxDefaultModeNotActiveBorderHover ?? "transparent",
168
188
  dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#000000",
189
+ openDropdownBackgroundColor: customColors?.openDropdownBackgroundColor ?? customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#000",
169
190
  dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#1F1F1F",
170
191
  dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
192
+ dropdownActiveItemBorderBase: customColors?.dropdownActiveItemBorderBase ?? customColors?.mediumStroke ?? "#333333",
193
+ dropdownActiveItemBorderHover: customColors?.dropdownActiveItemBorderHover ?? customColors?.mediumStroke ?? "#333333",
171
194
  txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#000",
172
195
  txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#333333",
173
196
  counterRingColor: customColors?.counterRingColor ?? accentColor,
@@ -24,7 +24,10 @@ var radiusScales = {
24
24
  skeleton: "4px",
25
25
  dropdown: "12px",
26
26
  dropdownItem: "4px",
27
- modalTopbarIcon: "9999px"
27
+ dropdownList: "12px",
28
+ modalTopbarIcon: "9999px",
29
+ withdrawalInput: "12px",
30
+ useConnected: "8px"
28
31
  },
29
32
  medium: {
30
33
  actionButton: "10px",
@@ -42,7 +45,10 @@ var radiusScales = {
42
45
  skeleton: "4px",
43
46
  dropdown: "10px",
44
47
  dropdownItem: "4px",
45
- modalTopbarIcon: "9999px"
48
+ dropdownList: "10px",
49
+ modalTopbarIcon: "9999px",
50
+ withdrawalInput: "10px",
51
+ useConnected: "8px"
46
52
  },
47
53
  none: {
48
54
  actionButton: "0px",
@@ -60,7 +66,10 @@ var radiusScales = {
60
66
  skeleton: "0px",
61
67
  dropdown: "0px",
62
68
  dropdownItem: "0px",
63
- modalTopbarIcon: "0px"
69
+ dropdownList: "0px",
70
+ modalTopbarIcon: "0px",
71
+ withdrawalInput: "0px",
72
+ useConnected: "0px"
64
73
  },
65
74
  small: {
66
75
  actionButton: "8px",
@@ -78,7 +87,10 @@ var radiusScales = {
78
87
  skeleton: "4px",
79
88
  dropdown: "8px",
80
89
  dropdownItem: "4px",
81
- modalTopbarIcon: "9999px"
90
+ dropdownList: "8px",
91
+ modalTopbarIcon: "9999px",
92
+ withdrawalInput: "8px",
93
+ useConnected: "8px"
82
94
  }
83
95
  };
84
96
  var blurs = {
@@ -174,6 +186,7 @@ var baseTheme = ({
174
186
  paymentAmountSkeletonCircleSize: "15px",
175
187
  paymentMethodItemIconSize: "20px",
176
188
  selectAssetItemIconSize: "24px",
189
+ sourceListGap: "4px",
177
190
  txBreakdownSkeletonWidth: "72px",
178
191
  txSummaryLineSkeletonHeight: "14px",
179
192
  txSummaryLineSkeletonWidth: "54px",
@@ -253,6 +266,8 @@ var baseTheme = ({
253
266
  dropdownItemFontSize: FONT_SIZINGS[fontSizing][12],
254
267
  sourceListSectionLabelFontSize: FONT_SIZINGS[fontSizing][12],
255
268
  formOfPaymentsListSectionLabelFontSize: FONT_SIZINGS[fontSizing][12],
269
+ quickOptionFontSize: FONT_SIZINGS[fontSizing][14],
270
+ useConnectedFontSize: FONT_SIZINGS[fontSizing][12],
256
271
  ...customFontSizings
257
272
  },
258
273
  radii: {
@@ -272,7 +287,10 @@ var baseTheme = ({
272
287
  tooltip: radiusScales[borderRadius].tooltip,
273
288
  dropdown: radiusScales[borderRadius].dropdown,
274
289
  dropdownItem: radiusScales[borderRadius].dropdownItem,
290
+ dropdownList: customBorderRadiuses?.dropdownList ?? customBorderRadiuses?.dropdown ?? radiusScales[borderRadius].dropdown,
275
291
  modalTopbarIcon: radiusScales[borderRadius].modalTopbarIcon,
292
+ withdrawalInput: radiusScales[borderRadius].withdrawalInput,
293
+ useConnected: radiusScales[borderRadius].useConnected,
276
294
  ...customBorderRadiuses
277
295
  },
278
296
  borderWidths: {
@@ -311,6 +329,10 @@ var baseTheme = ({
311
329
  youPayYouReceivePaddingLeft: "12px",
312
330
  youPayYouReceivePaddingRight: "16px",
313
331
  youPayYouReceivePaddingY: "8px",
332
+ inputPaddingX: "12px",
333
+ inputPaddingY: "12px",
334
+ dropdownActiveItemRegularSizePaddingY: "8px",
335
+ assetListDefaultGap: "4px",
314
336
  ...customSpacings
315
337
  },
316
338
  textTransforms: {