@funkit/connect 10.4.0 → 10.6.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 (51) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/clients/{chunk-RCMAGKMG.js → chunk-3LJQTM37.js} +1 -2
  3. package/dist/clients/{chunk-APQYFP6X.js → chunk-A4WQS6QG.js} +1 -1
  4. package/dist/clients/{chunk-HOORQPSY.js → chunk-F6P4CN27.js} +24 -8
  5. package/dist/clients/{chunk-KNHO756P.js → chunk-FJ6GCMJ4.js} +1 -0
  6. package/dist/clients/{chunk-M6C7MBQN.js → chunk-TG2AACP2.js} +2 -2
  7. package/dist/clients/fanatics.js +1 -1
  8. package/dist/clients/internal/nado/hooks.js +2 -2
  9. package/dist/clients/internal/nado/products.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalConfig.d.ts +11 -0
  11. package/dist/clients/internal/nado/withdrawalConfig.js +18 -0
  12. package/dist/clients/internal/nado/withdrawalTypes.d.ts +30 -0
  13. package/dist/clients/internal/nado/withdrawalTypes.js +1 -0
  14. package/dist/clients/lighter.css +5 -1
  15. package/dist/clients/lighter.d.ts +1 -0
  16. package/dist/clients/lighter.js +88 -21
  17. package/dist/clients/mallard.js +2 -2
  18. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +5 -1
  19. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
  20. package/dist/clients/polymarket/index.css +5 -1
  21. package/dist/clients/polymarket/index.js +3 -3
  22. package/dist/components/BottomLinks/BottomLinks.d.ts +3 -1
  23. package/dist/consts/meld.d.ts +1 -1
  24. package/dist/hooks/queries/useSwappedDefaultCurrency.d.ts +3 -3
  25. package/dist/hooks/queries/useWithdrawFops.d.ts +0 -1
  26. package/dist/hooks/track/useTrack.d.ts +1 -0
  27. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +2 -1
  28. package/dist/index.css +5 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +2705 -2080
  31. package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +1 -2
  32. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +6 -9
  33. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +80 -19
  34. package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +1 -61
  35. package/dist/modals/WithdrawalModal/useFiatWithdrawal.d.ts +1 -1
  36. package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -15
  37. package/dist/modals/WithdrawalModal/withdrawalFormHelpers.d.ts +53 -0
  38. package/dist/modals/WithdrawalModal/withdrawalHooks.d.ts +38 -0
  39. package/dist/providers/FunkitCheckoutContext/types.d.ts +42 -4
  40. package/dist/providers/FunkitConfigContext.d.ts +9 -2
  41. package/dist/providers/GeneralWalletProvider.d.ts +1 -4
  42. package/dist/utils/consts.d.ts +1 -1
  43. package/dist/utils/customer.d.ts +18 -3
  44. package/dist/utils/lighter.d.ts +68 -1
  45. package/dist/utils/purifyCheckoutHistoryItem.d.ts +2 -41
  46. package/dist/utils/swapped.d.ts +1 -1
  47. package/dist/utils/userInfo.d.ts +8 -0
  48. package/dist/utils/withdrawal.d.ts +8 -1
  49. package/dist/wagmi/actions.d.ts +1 -1
  50. package/dist/wallets/walletConnectors/index.js +28 -28
  51. package/package.json +2 -2
@@ -1,14 +1,16 @@
1
1
  import React from 'react';
2
+ import { type BoxProps } from '../Box/Box';
2
3
  export interface BottomLink {
3
4
  text: string;
4
5
  href: string;
5
6
  }
6
7
  interface BottomLinksProps {
8
+ fontSize?: BoxProps['fontSize'];
7
9
  links: BottomLink[];
8
10
  }
9
11
  /**
10
12
  * A compact, centered footer row of text links separated by a dot
11
13
  * (e.g. `Terms • Help`). Each link opens in a new tab and brightens on hover.
12
14
  */
13
- export declare const BottomLinks: ({ links }: BottomLinksProps) => React.JSX.Element;
15
+ export declare const BottomLinks: ({ fontSize, links }: BottomLinksProps) => React.JSX.Element;
14
16
  export {};
@@ -1,4 +1,4 @@
1
- export declare const MELD_MIN_LIMIT_BUFFER = 5;
1
+ export { MELD_MIN_LIMIT_BUFFER } from '@funkit/connect-core';
2
2
  export declare const getMeldProviderIconUrl: (provider: string) => string;
3
3
  /** Utilizes locale formatting to get currency symbol out of a currency code */
4
4
  export declare const getCurrencySymbol: (currencyCode: string) => string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Fetches Swapped supported countries and maps the user's country (alpha2)
3
- * to get the currency code.
2
+ * Web wrapper for the shared Swapped country → default currency resolver:
3
+ * injects apiKey, IP country, and the browser logger.
4
4
  */
5
- export declare const useSwappedDefaultCurrency: () => import("@tanstack/react-query").UseQueryResult<string, Error>;
5
+ export declare const useSwappedDefaultCurrency: () => import("@tanstack/react-query").UseQueryResult<string>;
@@ -1,5 +1,4 @@
1
1
  import { type GetFopsResponse } from '@funkit/api-base';
2
- export declare const SWAPPED_MIN_SELL_EUR = 7;
3
2
  /**
4
3
  * Hook to fetch available withdrawal (off-ramp) forms of payment from /fops.
5
4
  * Sends a CRYPTO_TO_FIAT rail config to get sell/payout methods.
@@ -9,6 +9,7 @@ export interface TrackEventData {
9
9
  export declare const eventCounts: Partial<Record<CheckoutModalEvent | WithdrawModalEvent, number>>;
10
10
  export declare const useTrack: () => {
11
11
  logEvent: (eventNameOrTrackEventData: CheckoutModalEvent | TrackEventData) => void;
12
+ logEventV2: (type: string, metadata: Record<string, string>) => void;
12
13
  logMeasuredEvent: (trackEventData: Omit<TrackEventData, "value">) => void;
13
14
  startMeasuredEvent: (eventName: CheckoutModalEvent | WithdrawModalEvent) => void;
14
15
  updateUserAsync: (userInfo: FunkitUserInfo & {
@@ -1,6 +1,7 @@
1
1
  import { CheckoutRefundState, CheckoutState, type DirectExecution, RelayExecutionStatus } from '@funkit/api-base';
2
+ import { mapRelayExecutionStatusToCheckoutState } from '@funkit/connect-core';
2
3
  import type { MergedMultiStepDirectExecution } from '../domains/checkoutNotifications';
3
- export declare function mapRelayExecutionStatusToCheckoutState(status: RelayExecutionStatus): CheckoutState;
4
+ export { mapRelayExecutionStatusToCheckoutState };
4
5
  export declare function mapRelayExecutionStatusToRefundState(status: RelayExecutionStatus): CheckoutRefundState | undefined;
5
6
  export declare function useCheckoutDirectExecutionHistory({ initDirectExecution, disabled, }: {
6
7
  initDirectExecution?: DirectExecution;
package/dist/index.css CHANGED
@@ -14975,7 +14975,7 @@
14975
14975
  --_7rkubb1: 0.9;
14976
14976
  }
14977
14977
 
14978
- /* vanilla-extract-css-ns:src/components/Dialog/Dialog.css.ts.vanilla.css?source=Ll8xcjhmNTcxIHsKICBib3R0b206IC0yMDBweDsKICBsZWZ0OiAtMjAwcHg7CiAgcGFkZGluZzogMjAwcHg7CiAgcmlnaHQ6IC0yMDBweDsKICB0b3A6IC0yMDBweDsKICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVooMCk7CiAgei1pbmRleDogdmFyKC0tcmstbW9kYWxaSW5kZXgpOwp9Ci5fMXI4ZjU3MyB7CiAgbWF4LXdpZHRoOiAxMDB2dzsKfQouXzFyOGY1NzQgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgd2lkdGg6IDEwMCU7CiAgZmxleC1zaHJpbms6IDA7CiAgbWluLWhlaWdodDogdmFyKC0tcmstZGltZW5zaW9ucy1tb2RhbFRvcEJhckhlaWdodCk7Cn0KLl8xcjhmNTc2IHsKICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgbGVmdDogMDsKICByaWdodDogMDsKICB6LWluZGV4OiAxOwp9Ci5fMXI4ZjU3NyB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIHotaW5kZXg6IDI7Cn0KLl8xcjhmNTc5IHsKICBib3R0b206IDA7CiAgbGVmdDogMDsKICByaWdodDogMDsKICB0b3A6IDA7CiAgei1pbmRleDogLTE7Cn0KLl8xcjhmNTdhIHsKICBhbGlnbi1pdGVtczogY2VudGVyOwp9Ci5fMXI4ZjU3YiB7CiAgYWxpZ24taXRlbXM6IGZsZXgtZW5kOwp9 */
14978
+ /* vanilla-extract-css-ns:src/components/Dialog/Dialog.css.ts.vanilla.css?source=Ll8xcjhmNTcxIHsKICBib3R0b206IC0yMDBweDsKICBsZWZ0OiAtMjAwcHg7CiAgcGFkZGluZzogMjAwcHg7CiAgcmlnaHQ6IC0yMDBweDsKICB0b3A6IC0yMDBweDsKICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVooMCk7CiAgei1pbmRleDogdmFyKC0tcmstbW9kYWxaSW5kZXgpOwp9Cjp3aGVyZSguXzFyOGY1NzEpIDp3aGVyZShhdWRpbywgY2FudmFzLCBlbWJlZCwgaWZyYW1lLCBpbWcsIG9iamVjdCwgc3ZnLCB2aWRlbykgewogIGRpc3BsYXk6IGJsb2NrOwogIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7Cn0KLl8xcjhmNTczIHsKICBtYXgtd2lkdGg6IDEwMHZ3Owp9Ci5fMXI4ZjU3NCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICB3aWR0aDogMTAwJTsKICBmbGV4LXNocmluazogMDsKICBtaW4taGVpZ2h0OiB2YXIoLS1yay1kaW1lbnNpb25zLW1vZGFsVG9wQmFySGVpZ2h0KTsKfQouXzFyOGY1NzYgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBsZWZ0OiAwOwogIHJpZ2h0OiAwOwogIHotaW5kZXg6IDE7Cn0KLl8xcjhmNTc3IHsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgei1pbmRleDogMjsKfQouXzFyOGY1NzkgewogIGJvdHRvbTogMDsKICBsZWZ0OiAwOwogIHJpZ2h0OiAwOwogIHRvcDogMDsKICB6LWluZGV4OiAtMTsKfQouXzFyOGY1N2EgewogIGFsaWduLWl0ZW1zOiBjZW50ZXI7Cn0KLl8xcjhmNTdiIHsKICBhbGlnbi1pdGVtczogZmxleC1lbmQ7Cn0 */
14979
14979
  [data-rk] ._1r8f571 {
14980
14980
  bottom: -200px;
14981
14981
  left: -200px;
@@ -14985,6 +14985,10 @@
14985
14985
  transform: translateZ(0);
14986
14986
  z-index: var(--rk-modalZIndex);
14987
14987
  }
14988
+ [data-rk] :where(._1r8f571) :where(audio, canvas, embed, iframe, img, object, svg, video) {
14989
+ display: block;
14990
+ vertical-align: middle;
14991
+ }
14988
14992
  [data-rk] ._1r8f573 {
14989
14993
  max-width: 100vw;
14990
14994
  }
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { createAuthenticationAdapter, FunkitConnectAuthenticationProvider, } fro
20
20
  export type { AuthenticationAdapter, FunkitConnectAuthenticationProviderProps, } from './providers/AuthenticationContext';
21
21
  export type { AvatarComponent } from './providers/AvatarContext';
22
22
  export type { CheckoutBlockedReason } from './modals/CheckoutModal/CheckoutBlockedReason';
23
- export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, } from './providers/FunkitCheckoutContext';
23
+ export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalFormData, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, NadoWithdrawalCustomerData, WithdrawalCustomerConfig, NadoWithdrawalCustomerConfig, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, } from './providers/FunkitCheckoutContext';
24
24
  export { useFunkitCheckout, FunCheckoutStartingStep, } from './providers/FunkitCheckoutContext';
25
25
  export type { FunkitCheckoutQuoteResult } from './domains/quote';
26
26
  export type { FunkitConfig, FunkitUiCustomizationsConfig, FunkitTextCustomizationsConfig, } from './providers/FunkitConfigContext';