@funkit/connect 6.4.0 → 6.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 (44) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/{chunk-ZDHRMKMT.js → chunk-AYGZMDTC.js} +11 -0
  3. package/dist/{chunk-WDHT73AM.js → chunk-UOY5XFCR.js} +11 -0
  4. package/dist/components/Box/Box.d.ts +34 -34
  5. package/dist/components/Dropdown/BaseDropdownItem.d.ts +2 -1
  6. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +2 -2
  7. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryDetail.d.ts +2 -2
  8. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.d.ts +1 -1
  9. package/dist/components/FunCheckoutHistory/FunCheckoutStatus.d.ts +2 -1
  10. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +2 -2
  11. package/dist/components/FunCheckoutHistory/FunDirectExecutionStatus.d.ts +2 -1
  12. package/dist/components/FunCheckoutHistory/useCustomStatusAnimationAboveTopbar.d.ts +3 -1
  13. package/dist/components/FunInput/FunInput.d.ts +4 -4
  14. package/dist/components/Icons/SpinnerIcon.d.ts +4 -1
  15. package/dist/components/Icons/SpinnerIconWithBackground.d.ts +3 -2
  16. package/dist/components/Icons/StatusIcons.d.ts +9 -2
  17. package/dist/components/Icons/utils.d.ts +2 -0
  18. package/dist/components/MeldQuoteItem/MeldQuoteItem.d.ts +2 -1
  19. package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +4 -2
  20. package/dist/components/TransactionStatus/TransactionStatus.d.ts +3 -0
  21. package/dist/consts/customers.d.ts +1 -0
  22. package/dist/css/sprinkles.css.d.ts +48 -34
  23. package/dist/domains/meld.d.ts +2 -0
  24. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  25. package/dist/hooks/useGooeyFilter.d.ts +21 -0
  26. package/dist/hooks/usePathMorph.d.ts +16 -0
  27. package/dist/hooks/useTextMeasurer.d.ts +3 -0
  28. package/dist/index.css +2980 -2665
  29. package/dist/index.js +1785 -1274
  30. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -2
  31. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +8 -1
  32. package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +4 -1
  33. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +27 -0
  34. package/dist/modals/CheckoutModal/MeldCurrencySelect/currenciesWithMultipleCountries.d.ts +1 -0
  35. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
  36. package/dist/providers/FunkitCheckoutContext.d.ts +2 -8
  37. package/dist/providers/FunkitConfigContext.d.ts +0 -7
  38. package/dist/providers/FunkitThemeProvider.d.ts +21 -0
  39. package/dist/themes/darkTheme.js +1 -1
  40. package/dist/themes/lightTheme.js +1 -1
  41. package/dist/utils/checkout.d.ts +1 -1
  42. package/dist/utils/flags/config.d.ts +1 -25
  43. package/dist/wallets/walletConnectors/index.js +62 -62
  44. package/package.json +8 -8
@@ -1,4 +1,4 @@
1
- import type { CheckoutHistoryItem, CheckoutState } from '@funkit/api-base';
1
+ import { type CheckoutHistoryItem, CheckoutState } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  interface StatusTagProps {
4
4
  state: CheckoutState;
@@ -2,7 +2,8 @@ import type { CheckoutHistoryItem } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  interface FunCheckoutStatusProps {
4
4
  checkoutHistoryItem: CheckoutHistoryItem | undefined;
5
+ isActiveCheckout: boolean;
5
6
  onOrderDelayed?: () => void;
6
7
  }
7
- export declare function FunCheckoutStatus({ checkoutHistoryItem, onOrderDelayed, }: FunCheckoutStatusProps): React.JSX.Element;
8
+ export declare function FunCheckoutStatus({ checkoutHistoryItem, isActiveCheckout, onOrderDelayed, }: FunCheckoutStatusProps): React.JSX.Element;
8
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import type { DirectExecution } from '@funkit/api-base';
2
2
  import React from 'react';
3
- export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExecution, includeGenerateActionsParams, onClose, onAnimationComplete, }: {
3
+ export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExecution, isActiveCheckout, onClose, onAnimationComplete, }: {
4
4
  bottomBarId: string;
5
5
  directExecution: DirectExecution;
6
- includeGenerateActionsParams?: boolean;
6
+ isActiveCheckout: boolean;
7
7
  onClose: (options?: {
8
8
  isNewDeposit?: boolean;
9
9
  }) => void;
@@ -2,6 +2,7 @@ import type { DirectExecution } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  interface FunDirectExecutionStatusProps {
4
4
  directExecution: DirectExecution | undefined;
5
+ isActiveCheckout: boolean;
5
6
  }
6
- export declare function FunDirectExecutionStatus({ directExecution, }: FunDirectExecutionStatusProps): React.JSX.Element;
7
+ export declare function FunDirectExecutionStatus({ directExecution, isActiveCheckout, }: FunDirectExecutionStatusProps): React.JSX.Element;
7
8
  export {};
@@ -2,6 +2,8 @@ import React, { type ReactNode } from 'react';
2
2
  import type { Address } from 'viem';
3
3
  interface CustomStatusAnimationParams {
4
4
  depositAddress: Address | undefined;
5
+ /** Whether this is an active checkout (i.e. not history) */
6
+ isActiveCheckout: boolean;
5
7
  /** Whether status icon is currently shown */
6
8
  isCheckoutDetailView: boolean;
7
9
  /** Top padding of the scrolling container (required to set the correct position) */
@@ -25,5 +27,5 @@ interface CustomStatusAnimationReturn {
25
27
  * Hook for sharing the logic for the custom status icon animation in checkout details. This is very
26
28
  * much _not_ generic or intended to be reused anywhere, but the component itself is duplicated.
27
29
  */
28
- export declare function useCustomStatusAnimationAboveTopbar({ depositAddress, isCheckoutDetailView, paddingTop, topbar, withTopDivider, scrollableContent, }: CustomStatusAnimationParams): CustomStatusAnimationReturn;
30
+ export declare function useCustomStatusAnimationAboveTopbar({ depositAddress, isActiveCheckout, isCheckoutDetailView, paddingTop, topbar, withTopDivider, scrollableContent, }: CustomStatusAnimationParams): CustomStatusAnimationReturn;
29
31
  export {};
@@ -8,7 +8,7 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
8
8
  value: string | number | readonly string[] | undefined;
9
9
  label?: string;
10
10
  onChange: (value: React.ChangeEvent<T>) => void;
11
- onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLTextAreaElement>) => void;
11
+ onKeyDown?: (e: React.KeyboardEvent<T>) => void;
12
12
  onKeySubmit?: () => void;
13
13
  onPaste?: (e: React.ClipboardEvent<T>) => void;
14
14
  onMouseDown?: (e: React.MouseEvent<T>) => void;
@@ -23,12 +23,12 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
23
23
  /** Color meant for prefix & suffix elements. Defaults to secondaryText. */
24
24
  adornmentColor?: BoxProps['color'];
25
25
  textWeight?: BoxProps['fontWeight'];
26
- overrideBorderWidth?: undefined | BoxProps['borderWidth'];
26
+ overrideBorderWidth?: BoxProps['borderWidth'];
27
27
  overrideBackground?: BoxProps['background'];
28
28
  borderRadius?: BoxProps['borderRadius'];
29
29
  isLoading?: boolean;
30
30
  /** Allow multiline input. Defaults to false. This option replaces the internal `input` element with a `textarea` element. */
31
- allowMultiline?: boolean;
31
+ allowMultiline?: T extends HTMLInputElement ? false : true;
32
32
  }
33
33
  export type FunInputChangeEvent = ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
34
- export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLTextAreaElement | HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
34
+ export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLTextAreaElement | HTMLInputElement> & React.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import type { BoxProps } from '../Box/Box';
2
3
  interface SpinnerIconProps {
3
4
  size?: string | number;
5
+ backgroundColor?: BoxProps['color'];
6
+ indicatorColor?: BoxProps['color'];
4
7
  }
5
- export declare const SpinnerIcon: ({ size }: SpinnerIconProps) => React.JSX.Element;
8
+ export declare const SpinnerIcon: ({ size, backgroundColor: _, indicatorColor, }: SpinnerIconProps) => React.JSX.Element;
6
9
  export {};
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { type BoxProps } from '../Box/Box';
3
3
  interface SpinnerIconWithBackgroundProps {
4
4
  size?: BoxProps['width'];
5
- color?: BoxProps['borderColor'];
5
+ indicatorColor?: BoxProps['borderColor'];
6
+ backgroundColor?: BoxProps['borderColor'];
6
7
  }
7
- export declare const SpinnerIconWithBackground: ({ size, color, }: SpinnerIconWithBackgroundProps) => React.JSX.Element;
8
+ export declare const SpinnerIconWithBackground: ({ size, indicatorColor, backgroundColor, }: SpinnerIconWithBackgroundProps) => React.JSX.Element;
8
9
  export {};
@@ -1,8 +1,15 @@
1
- import React from 'react';
2
- export declare const CompletedGradientSvg: () => React.JSX.Element;
1
+ import React, { type SVGAttributes, type RefObject } from 'react';
3
2
  export declare function CompletedStatusIcon(props: StatusIconProps): React.JSX.Element;
4
3
  export declare function FailedStatusIcon(props: StatusIconProps): React.JSX.Element;
5
4
  export declare function DelayedStatusIcon(props: StatusIconProps): React.JSX.Element;
5
+ export type TransactionIconProps = {
6
+ type: 'loading' | 'success' | 'merge';
7
+ pathRef: RefObject<SVGPathElement>;
8
+ } & SVGAttributes<SVGSVGElement>;
9
+ export declare const TransactionIcon: React.ForwardRefExoticComponent<{
10
+ type: "loading" | "success" | "merge";
11
+ pathRef: RefObject<SVGPathElement>;
12
+ } & React.SVGAttributes<SVGSVGElement> & React.RefAttributes<unknown>>;
6
13
  export type StatusIconProps = {
7
14
  animateEntrance?: boolean;
8
15
  backgroundSize?: number;
@@ -0,0 +1,2 @@
1
+ import type { BoxProps } from '../Box/Box';
2
+ export declare function getCSSVariable(colorName?: BoxProps['color']): string | undefined;
@@ -3,10 +3,11 @@ import React from 'react';
3
3
  export declare const providerLabelMap: Record<MeldServiceProvider, string>;
4
4
  export interface MeldQuoteItemProps {
5
5
  isBestQuote?: boolean;
6
+ bestQuoteLabel?: string;
6
7
  quote: MeldQuote | undefined;
7
8
  onClick?: () => void;
8
9
  isError?: boolean;
9
10
  isDisabled?: boolean;
10
11
  isActive?: boolean;
11
12
  }
12
- export declare const MeldQuoteItem: ({ quote, isBestQuote, onClick, isDisabled, isActive, }: MeldQuoteItemProps) => React.JSX.Element;
13
+ export declare const MeldQuoteItem: ({ quote, isBestQuote, bestQuoteLabel, onClick, isDisabled, isActive, }: MeldQuoteItemProps) => React.JSX.Element;
@@ -5,16 +5,18 @@ interface SourceMeldQuoteItemProps {
5
5
  onClick?: () => void;
6
6
  isLoading?: boolean;
7
7
  isBestQuote?: boolean;
8
+ bestQuoteLabel?: string;
8
9
  isPreselected?: boolean;
9
10
  disabled?: boolean;
10
11
  error?: string;
11
12
  }
12
- export declare const SourceMeldQuoteItem: ({ quote, onClick, isLoading, isBestQuote, isPreselected, disabled, error, }: SourceMeldQuoteItemProps) => React.JSX.Element;
13
+ export declare const SourceMeldQuoteItem: ({ quote, onClick, isLoading, isBestQuote, bestQuoteLabel, isPreselected, disabled, error, }: SourceMeldQuoteItemProps) => React.JSX.Element;
13
14
  interface MeldProviderLabelProps {
14
15
  serviceProvider: MeldServiceProvider;
15
16
  isBest?: boolean;
17
+ bestQuoteLabel?: string;
16
18
  shouldBuyMore?: boolean;
17
19
  hasDocumentUpload?: boolean;
18
20
  }
19
- export declare const MeldProviderLabel: ({ serviceProvider, isBest, shouldBuyMore, hasDocumentUpload, }: MeldProviderLabelProps) => React.JSX.Element;
21
+ export declare const MeldProviderLabel: ({ serviceProvider, isBest, bestQuoteLabel, shouldBuyMore, hasDocumentUpload, }: MeldProviderLabelProps) => React.JSX.Element;
20
22
  export {};
@@ -7,5 +7,8 @@ interface TransactionStatusProps {
7
7
  step: CheckoutProgressStep;
8
8
  isWithdrawal: boolean;
9
9
  }
10
+ export declare function TransactionStatusLoading({ expectedStatus, }: {
11
+ expectedStatus: TransactionStatusProps['status'];
12
+ }): React.JSX.Element;
10
13
  export declare function TransactionStatus({ status, step, isWithdrawal, }: TransactionStatusProps): React.JSX.Element;
11
14
  export {};
@@ -5,3 +5,4 @@ export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZt
5
5
  export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
6
6
  export declare function isKatanaCustomer(apiKey: string): apiKey is "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4";
7
7
  export declare function isHyperbeatCustomer(apiKey: string): apiKey is "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau";
8
+ export declare function isMonkeyTiltCustomer(apiKey: string): apiKey is "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX";