@funkit/connect 1.0.11 → 1.0.13

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 (29) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/FunButton/FunIconButton.d.ts +2 -1
  3. package/dist/components/FunCheckoutModal/FunCheckoutConfirmationStep.d.ts +0 -1
  4. package/dist/components/FunCheckoutModal/FunCheckoutInputAmountStep.d.ts +6 -0
  5. package/dist/components/FunCheckoutModal/FunCheckoutModal.d.ts +1 -0
  6. package/dist/components/FunKeyValue/FunKeyValue.d.ts +2 -1
  7. package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +1 -1
  8. package/dist/components/FunkitProvider/FunkitConfigContext.d.ts +3 -0
  9. package/dist/components/FunkitProvider/GeneralWalletProvider.d.ts +76 -0
  10. package/dist/index.css +10 -10
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +7875 -7718
  13. package/dist/wallets/walletConnectors/index.js +68 -68
  14. package/package.json +1 -1
  15. package/dist/wallets/walletConnectors/chunk-AJKRYTH2.js +0 -92
  16. package/dist/wallets/walletConnectors/chunk-CVGDYGHA.js +0 -60
  17. package/dist/wallets/walletConnectors/chunk-OKZSWAPF.js +0 -60
  18. package/dist/wallets/walletConnectors/chunk-OYKWP3N3.js +0 -60
  19. package/dist/wallets/walletConnectors/chunk-OYW4TIA3.js +0 -81
  20. package/dist/wallets/walletConnectors/{chunk-PPFSHJTA.js → chunk-2UXZAUWT.js} +3 -3
  21. package/dist/wallets/walletConnectors/{chunk-2XQJ2NQ4.js → chunk-3WZRNEZH.js} +3 -3
  22. package/dist/wallets/walletConnectors/{chunk-MU35GKP3.js → chunk-6LTLPR2Q.js} +3 -3
  23. package/dist/wallets/walletConnectors/{chunk-MCTPLICE.js → chunk-7CQPABJG.js} +3 -3
  24. package/dist/wallets/walletConnectors/{chunk-SPLW3CCH.js → chunk-AM4SSLAP.js} +3 -3
  25. package/dist/wallets/walletConnectors/{chunk-2LY3WMXK.js → chunk-NGXIHASN.js} +3 -3
  26. package/dist/wallets/walletConnectors/{chunk-DNOEX5NF.js → chunk-O5NKWWEG.js} +3 -3
  27. package/dist/wallets/walletConnectors/{chunk-HXYRONSJ.js → chunk-V45EXW7A.js} +3 -3
  28. package/dist/wallets/walletConnectors/{chunk-ZFXXHGAS.js → chunk-Z2DGDHHZ.js} +3 -3
  29. package/dist/wallets/walletConnectors/{chunk-RYO26XSK.js → chunk-ZNXQ4V6G.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 1.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - ccc8a97: feat: paymentTitleMaxWidth config
8
+
9
+ ## 1.0.12
10
+
11
+ ### Patch Changes
12
+
13
+ - a0be3b2: feat: new input step for non-action checkout flows
14
+ - b72e13a: feat: wagmi hook replacement - useFunkitDisconnect
15
+ - 6194aa9: fix: small screen compatability
16
+
3
17
  ## 1.0.11
4
18
 
5
19
  ### Patch Changes
@@ -3,7 +3,7 @@ import { BoxProps } from '../Box/Box';
3
3
  /**
4
4
  * Circular icon button with dynamic height and width
5
5
  */
6
- export declare const FunIconButton: ({ onClick, icon, size, showBorder, paddingX, paddingY, borderRadius, ariaLabel, color, background, }: {
6
+ export declare const FunIconButton: ({ onClick, icon, size, showBorder, paddingX, paddingY, borderRadius, ariaLabel, color, background, width, }: {
7
7
  onClick: () => void;
8
8
  icon: React.ReactNode;
9
9
  size?: BoxProps['height'];
@@ -14,4 +14,5 @@ export declare const FunIconButton: ({ onClick, icon, size, showBorder, paddingX
14
14
  ariaLabel?: string | undefined;
15
15
  color?: BoxProps['color'];
16
16
  background?: BoxProps['background'];
17
+ width?: BoxProps['width'];
17
18
  }) => React.JSX.Element;
@@ -7,4 +7,3 @@ export declare function FunCheckoutConfirmationStep({ checkoutId, checkoutStep,
7
7
  onFinish: (depositAddress: string) => void;
8
8
  animateOut: boolean;
9
9
  }): React.JSX.Element;
10
- export declare function roundUpTo5DecimalPlaces(inputNumber: string): string;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare function FunCheckoutInputAmountStep({ checkoutId, onContinue, animateOut, }: {
3
+ checkoutId: string;
4
+ onContinue: () => void;
5
+ animateOut: boolean;
6
+ }): React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare enum FunCheckoutStep {
3
+ INPUT_AMOUNT = "input_amount",
3
4
  SELECT_PAYMENT_METHOD = "select_payment",
4
5
  CONFIRMATION = "confirmation",
5
6
  PAYMENT_SETUP = "payment_setup",
@@ -12,6 +12,7 @@ export interface FunKeyValueProps {
12
12
  keyTextColor?: BoxProps['color'];
13
13
  keyTextSize?: TextProps['size'];
14
14
  keyTextWeight?: TextProps['weight'];
15
+ keySectionMaxWidth?: BoxProps['maxWidth'];
15
16
  valueTextColor?: BoxProps['color'];
16
17
  valueTextSize?: TextProps['size'];
17
18
  valueTextWeight?: TextProps['weight'];
@@ -25,4 +26,4 @@ export interface FunKeyValueProps {
25
26
  isDisabled?: boolean;
26
27
  }
27
28
  export declare function FunKeyValue({ keyIcon, keyText, valueIcon, valueText, disclaimerText, onClick, hasBorder, backgroundBaseColor, // 'actionButtonSecondaryBackground'
28
- keyTextColor, keyTextSize, keyTextWeight, valueTextColor, valueTextSize, valueTextWeight, valueGap, reverseValueItems, customValueComponent, disclaimerTextColor, paddingY, paddingX, isDisabled, }: FunKeyValueProps): React.JSX.Element;
29
+ keyTextColor, keyTextSize, keyTextWeight, keySectionMaxWidth, valueTextColor, valueTextSize, valueTextWeight, valueGap, reverseValueItems, customValueComponent, disclaimerTextColor, paddingY, paddingX, isDisabled, }: FunKeyValueProps): React.JSX.Element;
@@ -130,7 +130,7 @@ interface useFunkitPreCheckoutInternalReturn {
130
130
  checkoutItem: null | FunkitActiveCheckoutItem;
131
131
  reDraftSymbol: symbol;
132
132
  updateSourceAsset: (newSourceAsset: Address, newSourceAssetSymbol: string, newSourceAssetChainId: string) => void;
133
- updateTargetAssetAmount: (newTargetAssetAmount: number, isCheckoutCrFlow: boolean) => void;
133
+ updateTargetAssetAmount: (newTargetAssetAmount: number) => void;
134
134
  updateSelectedPaymentMethodInfo: (newPaymentMethodInfo: PaymentMethodInfo) => void;
135
135
  confirmCheckout: (shouldBatchOpBypassInit: boolean, stepMessageSetter: (m: string) => void) => Promise<Address>;
136
136
  getCheckoutDraftDollarValue: () => Promise<void>;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { PaymentMethod } from '../../consts/payment';
3
+ import { BoxProps } from '../Box/Box';
3
4
  export interface FunkitTextCustomizationsConfig {
4
5
  selectPaymentMethod: string;
5
6
  brokerageOrExchange: string;
@@ -25,6 +26,8 @@ interface FunkitPaymentsConfig {
25
26
  defaultPaymentMethod?: PaymentMethod | undefined;
26
27
  /** Whether end users are given the option to unlink a previously connected brokerage **/
27
28
  allowBrokerageUnlinking?: boolean;
29
+ /** Max width of the title of each payment method **/
30
+ paymentTitleMaxWidth?: BoxProps['maxWidth'];
28
31
  }
29
32
  export type FunkitConfig = {
30
33
  /** Funkit api key **/
@@ -23,4 +23,80 @@ interface GeneralWalletContextProps {
23
23
  }
24
24
  export declare function GeneralWalletProvider({ children }: any): React.JSX.Element;
25
25
  export declare const useGeneralWallet: () => GeneralWalletContextProps;
26
+ /**
27
+ * Replacement for wagmi's `disconnect` from `useDisconnect`
28
+ */
29
+ export declare const useFunkitDisconnect: () => {
30
+ disconnect: () => void;
31
+ disconnectAsync: () => void;
32
+ reset: () => void;
33
+ error: null;
34
+ status: "idle";
35
+ data: undefined;
36
+ isError: false;
37
+ isPending: false;
38
+ isSuccess: false;
39
+ failureCount: number;
40
+ failureReason: import("@wagmi/core").DisconnectErrorType | null;
41
+ isPaused: boolean;
42
+ variables: undefined;
43
+ isIdle: true;
44
+ context: unknown;
45
+ submittedAt: number;
46
+ connectors: readonly import("wagmi").Connector[];
47
+ } | {
48
+ disconnect: () => void;
49
+ disconnectAsync: () => void;
50
+ reset: () => void;
51
+ error: null;
52
+ status: "pending";
53
+ data: undefined;
54
+ isError: false;
55
+ isPending: true;
56
+ isSuccess: false;
57
+ failureCount: number;
58
+ failureReason: import("@wagmi/core").DisconnectErrorType | null;
59
+ isPaused: boolean;
60
+ variables: import("wagmi/query").DisconnectVariables;
61
+ isIdle: false;
62
+ context: unknown;
63
+ submittedAt: number;
64
+ connectors: readonly import("wagmi").Connector[];
65
+ } | {
66
+ disconnect: () => void;
67
+ disconnectAsync: () => void;
68
+ reset: () => void;
69
+ error: import("@wagmi/core").DisconnectErrorType;
70
+ status: "error";
71
+ data: undefined;
72
+ isError: true;
73
+ isPending: false;
74
+ isSuccess: false;
75
+ failureCount: number;
76
+ failureReason: import("@wagmi/core").DisconnectErrorType | null;
77
+ isPaused: boolean;
78
+ variables: import("wagmi/query").DisconnectVariables;
79
+ isIdle: false;
80
+ context: unknown;
81
+ submittedAt: number;
82
+ connectors: readonly import("wagmi").Connector[];
83
+ } | {
84
+ disconnect: () => void;
85
+ disconnectAsync: () => void;
86
+ reset: () => void;
87
+ error: null;
88
+ status: "success";
89
+ data: void;
90
+ isError: false;
91
+ isPending: false;
92
+ isSuccess: true;
93
+ failureCount: number;
94
+ failureReason: import("@wagmi/core").DisconnectErrorType | null;
95
+ isPaused: boolean;
96
+ variables: import("wagmi/query").DisconnectVariables;
97
+ isIdle: false;
98
+ context: unknown;
99
+ submittedAt: number;
100
+ connectors: readonly import("wagmi").Connector[];
101
+ };
26
102
  export {};
package/dist/index.css CHANGED
@@ -4565,16 +4565,6 @@
4565
4565
  width: 21px;
4566
4566
  }
4567
4567
 
4568
- /* vanilla-extract-css-ns:src/components/FunAssetAvatar/FunAssetAvatar.css.ts.vanilla.css?source=LnV3cmRjMjAgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKfQoudXdyZGMyMiB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGJvdHRvbTogMDsKICByaWdodDogMDsKfQ== */
4569
- [data-rk] .uwrdc20 {
4570
- position: relative;
4571
- }
4572
- [data-rk] .uwrdc22 {
4573
- position: absolute;
4574
- bottom: 0;
4575
- right: 0;
4576
- }
4577
-
4578
4568
  /* src/components/FunInput/FunInputBase.css */
4579
4569
  input::-webkit-outer-spin-button,
4580
4570
  input::-webkit-inner-spin-button {
@@ -4750,6 +4740,16 @@ input[type=number] {
4750
4740
  display: none;
4751
4741
  }
4752
4742
 
4743
+ /* vanilla-extract-css-ns:src/components/FunAssetAvatar/FunAssetAvatar.css.ts.vanilla.css?source=LnV3cmRjMjAgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKfQoudXdyZGMyMiB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGJvdHRvbTogMDsKICByaWdodDogMDsKfQ== */
4744
+ [data-rk] .uwrdc20 {
4745
+ position: relative;
4746
+ }
4747
+ [data-rk] .uwrdc22 {
4748
+ position: absolute;
4749
+ bottom: 0;
4750
+ right: 0;
4751
+ }
4752
+
4753
4753
  /* vanilla-extract-css-ns:src/components/MenuButton/MenuButton.css.ts.vanilla.css?source=Ll8xMHB3NXg2MDpob3ZlciB7CiAgYmFja2dyb3VuZDogdW5zZXQ7Cn0= */
4754
4754
  [data-rk] ._10pw5x60:hover {
4755
4755
  background: unset;
package/dist/index.d.ts CHANGED
@@ -22,3 +22,4 @@ export { darkTheme } from './themes/darkTheme';
22
22
  export { lightTheme } from './themes/lightTheme';
23
23
  export { useAddRecentTransaction } from './transactions/useAddRecentTransaction';
24
24
  export type { FunkitConnectWalletConnectParameters, Wallet, WalletDetailsParams, WalletList, } from './wallets/Wallet';
25
+ export { useFunkitDisconnect } from './components/FunkitProvider/GeneralWalletProvider';