@coinbase/cdp-react 0.0.98 → 0.0.100

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 (199) hide show
  1. package/dist/components/AuthButton/index.d.ts +102 -0
  2. package/dist/components/CDPReactProvider/index.d.ts +114 -0
  3. package/dist/components/CopyAddress/index.d.ts +29 -0
  4. package/dist/components/CopyEvmKeyButton/index.d.ts +77 -0
  5. package/dist/components/CopySolanaKeyButton/index.d.ts +73 -0
  6. package/dist/components/EnrollMfa/EnrollMfaDescription.d.ts +21 -0
  7. package/dist/components/EnrollMfa/EnrollMfaFlow.d.ts +27 -0
  8. package/dist/components/EnrollMfa/EnrollMfaFlowBackButton.d.ts +19 -0
  9. package/dist/components/EnrollMfa/EnrollMfaFlowProvider.d.ts +52 -0
  10. package/dist/components/EnrollMfa/EnrollMfaFooter.d.ts +18 -0
  11. package/dist/components/EnrollMfa/EnrollMfaImage.d.ts +24 -0
  12. package/dist/components/EnrollMfa/EnrollMfaItem.d.ts +21 -0
  13. package/dist/components/EnrollMfa/EnrollMfaItems.d.ts +17 -0
  14. package/dist/components/EnrollMfa/EnrollMfaProvider.d.ts +35 -0
  15. package/dist/components/EnrollMfa/EnrollMfaTitle.d.ts +21 -0
  16. package/dist/components/EnrollMfa/index.d.ts +65 -0
  17. package/dist/components/EnrollMfa/methods/sms.d.ts +25 -0
  18. package/dist/components/EnrollMfa/methods/totp.d.ts +25 -0
  19. package/dist/components/EnrollMfa/types.d.ts +48 -0
  20. package/dist/components/EnrollMfa/useEnrollMfaReducer.d.ts +6 -0
  21. package/dist/components/EnrollMfaModal/index.d.ts +111 -0
  22. package/dist/components/ExportWallet/index.d.ts +163 -0
  23. package/dist/components/ExportWalletModal/index.d.ts +173 -0
  24. package/dist/components/Fund/FundForm.d.ts +18 -0
  25. package/dist/components/Fund/FundProvider.d.ts +17 -0
  26. package/dist/components/Fund/FundTitle.d.ts +12 -0
  27. package/dist/components/Fund/components/FundAmountInput.d.ts +13 -0
  28. package/dist/components/Fund/components/FundErrorScreen.d.ts +7 -0
  29. package/dist/components/Fund/components/FundPaymentMethods.d.ts +7 -0
  30. package/dist/components/Fund/components/FundPresetAmountInputs.d.ts +7 -0
  31. package/dist/components/Fund/components/FundTransactionStatus.d.ts +6 -0
  32. package/dist/components/Fund/hooks/useBuyUrl.d.ts +23 -0
  33. package/dist/components/Fund/hooks/useEmitLifecycleStatus.d.ts +12 -0
  34. package/dist/components/Fund/hooks/useExchangeRate.d.ts +17 -0
  35. package/dist/components/Fund/hooks/usePaymentMethods.d.ts +16 -0
  36. package/dist/components/Fund/hooks/usePopupMonitor.d.ts +9 -0
  37. package/dist/components/Fund/hooks/useSetupOnrampEventListeners.d.ts +6 -0
  38. package/dist/components/Fund/index.d.ts +87 -0
  39. package/dist/components/Fund/types.d.ts +137 -0
  40. package/dist/components/Fund/useFundReducer.d.ts +15 -0
  41. package/dist/components/Fund/utils/buildPaymentMethods.d.ts +15 -0
  42. package/dist/components/Fund/utils/setupOnrampEventListeners.d.ts +10 -0
  43. package/dist/components/Fund/utils/subscribeToWindowMessage.d.ts +27 -0
  44. package/dist/components/FundModal/index.d.ts +106 -0
  45. package/dist/components/LinkAuth/LinkAuthFlow.d.ts +25 -0
  46. package/dist/components/LinkAuth/LinkAuthFlowBackButton.d.ts +19 -0
  47. package/dist/components/LinkAuth/LinkAuthFlowProvider.d.ts +60 -0
  48. package/dist/components/LinkAuth/LinkAuthItem.d.ts +23 -0
  49. package/dist/components/LinkAuth/LinkAuthItems.d.ts +17 -0
  50. package/dist/components/LinkAuth/LinkAuthItems.js +30 -30
  51. package/dist/components/LinkAuth/LinkAuthProvider.d.ts +31 -0
  52. package/dist/components/LinkAuth/LinkAuthTitle.d.ts +17 -0
  53. package/dist/components/LinkAuth/index.d.ts +170 -0
  54. package/dist/components/LinkAuth/types.d.ts +31 -0
  55. package/dist/components/LinkAuth/utils.d.ts +12 -0
  56. package/dist/components/LinkAuthModal/index.d.ts +112 -0
  57. package/dist/components/OAuthStatusModal/index.d.ts +24 -0
  58. package/dist/components/SendEvmTransactionButton/index.d.ts +27 -0
  59. package/dist/components/SendSolanaTransactionButton/index.d.ts +27 -0
  60. package/dist/components/SignIn/SignInAuthMethodButtons.d.ts +26 -0
  61. package/dist/components/SignIn/SignInBackButton.d.ts +40 -0
  62. package/dist/components/SignIn/SignInCredentials.d.ts +13 -0
  63. package/dist/components/SignIn/SignInDescription.d.ts +35 -0
  64. package/dist/components/SignIn/SignInFooter.d.ts +27 -0
  65. package/dist/components/SignIn/SignInForm.d.ts +39 -0
  66. package/dist/components/SignIn/SignInImage.d.ts +38 -0
  67. package/dist/components/SignIn/SignInProvider.d.ts +54 -0
  68. package/dist/components/SignIn/SignInTitle.d.ts +35 -0
  69. package/dist/components/SignIn/flows/SignInWithEmail.d.ts +26 -0
  70. package/dist/components/SignIn/flows/SignInWithOAuth.d.ts +19 -0
  71. package/dist/components/SignIn/flows/SignInWithSms.d.ts +26 -0
  72. package/dist/components/SignIn/hooks/useEmailForm.d.ts +7 -0
  73. package/dist/components/SignIn/hooks/useOTPForm.d.ts +8 -0
  74. package/dist/components/SignIn/hooks/usePhoneNumberForm.d.ts +7 -0
  75. package/dist/components/SignIn/hooks/useSignInWithOAuth.d.ts +8 -0
  76. package/dist/components/SignIn/index.d.ts +124 -0
  77. package/dist/components/SignIn/types.d.ts +37 -0
  78. package/dist/components/SignIn/useSignInReducer.d.ts +9 -0
  79. package/dist/components/SignInModal/index.d.ts +123 -0
  80. package/dist/components/SignOutButton/index.d.ts +39 -0
  81. package/dist/components/ThemeProvider/index.d.ts +70 -0
  82. package/dist/components/VerifyMfa/VerifyMfaDescription.d.ts +24 -0
  83. package/dist/components/VerifyMfa/VerifyMfaFlow.d.ts +30 -0
  84. package/dist/components/VerifyMfa/VerifyMfaFlowBackButton.d.ts +19 -0
  85. package/dist/components/VerifyMfa/VerifyMfaFlowProvider.d.ts +51 -0
  86. package/dist/components/VerifyMfa/VerifyMfaFooter.d.ts +18 -0
  87. package/dist/components/VerifyMfa/VerifyMfaImage.d.ts +23 -0
  88. package/dist/components/VerifyMfa/VerifyMfaItem.d.ts +20 -0
  89. package/dist/components/VerifyMfa/VerifyMfaItems.d.ts +18 -0
  90. package/dist/components/VerifyMfa/VerifyMfaProvider.d.ts +40 -0
  91. package/dist/components/VerifyMfa/VerifyMfaTitle.d.ts +24 -0
  92. package/dist/components/VerifyMfa/index.d.ts +55 -0
  93. package/dist/components/VerifyMfa/methods/sms.d.ts +29 -0
  94. package/dist/components/VerifyMfa/methods/totp.d.ts +29 -0
  95. package/dist/components/VerifyMfa/types.d.ts +33 -0
  96. package/dist/components/VerifyMfa/useVerifyMfaReducer.d.ts +7 -0
  97. package/dist/components/VerifyMfaInline/index.d.ts +212 -0
  98. package/dist/components/VerifyMfaModal/index.d.ts +114 -0
  99. package/dist/components/forms/AmountInput/index.d.ts +16 -0
  100. package/dist/components/forms/AmountInput/types.d.ts +9 -0
  101. package/dist/components/forms/AmountInput/useAmountInput.d.ts +14 -0
  102. package/dist/components/forms/AmountInput/useInputScale.d.ts +12 -0
  103. package/dist/components/forms/AmountInput/useNumberParseAndFormat.d.ts +20 -0
  104. package/dist/components/forms/CountrySelect/index.d.ts +9 -0
  105. package/dist/components/forms/EmailForm/index.d.ts +17 -0
  106. package/dist/components/forms/ExchangeAmountInput/index.d.ts +19 -0
  107. package/dist/components/forms/ExchangeAmountInput/types.d.ts +12 -0
  108. package/dist/components/forms/ExchangeAmountInput/useExchangeAmountInput.d.ts +17 -0
  109. package/dist/components/forms/Field/index.d.ts +15 -0
  110. package/dist/components/forms/Input/index.d.ts +15 -0
  111. package/dist/components/forms/Label/index.d.ts +8 -0
  112. package/dist/components/forms/OTP/index.d.ts +6 -0
  113. package/dist/components/forms/OTPForm/index.d.ts +20 -0
  114. package/dist/components/forms/PhoneNumberForm/index.d.ts +27 -0
  115. package/dist/components/forms/PhoneNumberInput/index.d.ts +16 -0
  116. package/dist/components/forms/PhoneNumberInput/maskOverride.d.ts +6 -0
  117. package/dist/components/forms/PhoneNumberInput/usePhoneNumberFormatter.d.ts +7 -0
  118. package/dist/components/forms/Select/index.d.ts +30 -0
  119. package/dist/components/ui/Badge/index.d.ts +19 -0
  120. package/dist/components/ui/Banner/index.d.ts +25 -0
  121. package/dist/components/ui/Button/index.d.ts +50 -0
  122. package/dist/components/ui/ButtonBase/index.d.ts +20 -0
  123. package/dist/components/ui/CoinbaseFooter/index.d.ts +16 -0
  124. package/dist/components/ui/CopyTextField/index.d.ts +35 -0
  125. package/dist/components/ui/Error/index.d.ts +14 -0
  126. package/dist/components/ui/IframeButton/index.d.ts +17 -0
  127. package/dist/components/ui/LoadingSkeleton/index.d.ts +22 -0
  128. package/dist/components/ui/LoadingSpinner/index.d.ts +11 -0
  129. package/dist/components/ui/Modal/index.d.ts +82 -0
  130. package/dist/components/ui/QRCode/QRCodeSvg.d.ts +35 -0
  131. package/dist/components/ui/QRCode/index.d.ts +7 -0
  132. package/dist/components/ui/QRCode/useCorners.d.ts +9 -0
  133. package/dist/components/ui/QRCode/useDotsPath.d.ts +18 -0
  134. package/dist/components/ui/QRCode/useLogo.d.ts +18 -0
  135. package/dist/components/ui/QRCode/useMatrix.d.ts +7 -0
  136. package/dist/components/ui/ServerError/index.d.ts +6 -0
  137. package/dist/components/ui/SuccessMessage/index.d.ts +14 -0
  138. package/dist/components/ui/SwitchFadeTransition/index.d.ts +15 -0
  139. package/dist/components/ui/SwitchSlideTransition/index.d.ts +16 -0
  140. package/dist/components/ui/SwitchTransition/index.d.ts +42 -0
  141. package/dist/components/ui/ToggleListItem/index.d.ts +31 -0
  142. package/dist/components/ui/VisuallyHidden/index.d.ts +18 -0
  143. package/dist/data/countries.d.ts +15 -0
  144. package/dist/data/countryNames.d.ts +4 -0
  145. package/dist/hooks/useKeyExportPostMessage.d.ts +25 -0
  146. package/dist/hooks/usePhoneNumberState.d.ts +47 -0
  147. package/dist/hooks/usePhoneNumberValidators.d.ts +8 -0
  148. package/dist/hooks/useTimeout.d.ts +18 -0
  149. package/dist/hooks/useTimer.d.ts +6 -0
  150. package/dist/hooks/useTransitionMap.d.ts +22 -0
  151. package/dist/hooks/useVerifyMfaModal.d.ts +78 -0
  152. package/dist/icons/IconAppleLogo.d.ts +22 -0
  153. package/dist/icons/IconArrowLeft.d.ts +22 -0
  154. package/dist/icons/IconArrowsUpDown.d.ts +22 -0
  155. package/dist/icons/IconCheck.d.ts +22 -0
  156. package/dist/icons/IconCheckCircle.d.ts +21 -0
  157. package/dist/icons/IconChevronDown.d.ts +22 -0
  158. package/dist/icons/IconCoinbaseMark.d.ts +22 -0
  159. package/dist/icons/IconCoinbaseWordmark.d.ts +22 -0
  160. package/dist/icons/IconCopy.d.ts +22 -0
  161. package/dist/icons/IconCreditCard.d.ts +22 -0
  162. package/dist/icons/IconCurrencies.d.ts +22 -0
  163. package/dist/icons/IconEnvelope.d.ts +22 -0
  164. package/dist/icons/IconExclamationCircle.d.ts +22 -0
  165. package/dist/icons/IconExclamationTriangle.d.ts +22 -0
  166. package/dist/icons/IconGoogleColorLogo.d.ts +22 -0
  167. package/dist/icons/IconGoogleLogo.d.ts +22 -0
  168. package/dist/icons/IconLock.d.ts +22 -0
  169. package/dist/icons/IconMinus.d.ts +21 -0
  170. package/dist/icons/IconPhone.d.ts +22 -0
  171. package/dist/icons/IconPinCode.d.ts +22 -0
  172. package/dist/icons/IconPlus.d.ts +21 -0
  173. package/dist/icons/IconShield.d.ts +22 -0
  174. package/dist/icons/IconSmartPhone.d.ts +22 -0
  175. package/dist/icons/IconTelegramLogo.d.ts +22 -0
  176. package/dist/icons/IconXLogo.d.ts +22 -0
  177. package/dist/icons/IconXMark.d.ts +22 -0
  178. package/dist/icons/SvgIcon.d.ts +6 -0
  179. package/dist/theme/cssVariables.d.ts +10 -0
  180. package/dist/theme/theme.d.ts +246 -0
  181. package/dist/theme/tokens.d.ts +54 -0
  182. package/dist/theme/utils.d.ts +63 -0
  183. package/dist/types/secureIframe.d.ts +3 -0
  184. package/dist/utils/capitalize.d.ts +8 -0
  185. package/dist/utils/childrenHasComponent.d.ts +10 -0
  186. package/dist/utils/clamp.d.ts +10 -0
  187. package/dist/utils/formatFiat.d.ts +11 -0
  188. package/dist/utils/formatPhoneNumber.d.ts +8 -0
  189. package/dist/utils/getMessageFromUnknownError.d.ts +9 -0
  190. package/dist/utils/isApiError.d.ts +21 -0
  191. package/dist/utils/isEmailInvalid.d.ts +15 -0
  192. package/dist/utils/openPopup.d.ts +15 -0
  193. package/dist/utils/parseValuesFromPhoneNumber.d.ts +16 -0
  194. package/dist/utils/sendIframeMessage.d.ts +8 -0
  195. package/dist/utils/toOAuthProviderType.d.ts +8 -0
  196. package/dist/utils/transition.d.ts +41 -0
  197. package/dist/version.d.ts +5 -1
  198. package/dist/version.js +1 -1
  199. package/package.json +5 -5
@@ -1,32 +1,195 @@
1
1
  import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
2
  import { CopyAddressProps } from '../CopyAddress';
3
3
  import { CopyEvmKeyButtonProps } from '../CopyEvmKeyButton';
4
+ /**
5
+ * The props for the ExportWalletTitle component.
6
+ *
7
+ * @see {@link ExportWalletTitle}
8
+ */
4
9
  interface ExportWalletTitleProps extends HTMLAttributes<HTMLElement> {
10
+ /** The element type to render the title as. */
5
11
  as?: ElementType;
6
12
  }
13
+ /**
14
+ * The props for the ExportWallet component.
15
+ *
16
+ * @see {@link ExportWallet}
17
+ */
7
18
  interface ExportWalletProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
19
+ /** The children to render. If a function is provided, it will be called with the address type and isSessionExpired as props. */
8
20
  children?: ReactNode | ((props: {
9
21
  type: ExportWalletContext["type"];
10
22
  isSessionExpired: ExportWalletContext["isSessionExpired"];
11
23
  }) => ReactNode);
24
+ /** The address of the account to export. */
12
25
  address: string;
26
+ /** A function to call when the iframe UI is ready. */
13
27
  onIframeReady?: () => void;
28
+ /** A function to call when the key is copied successfully. */
14
29
  onCopySuccess?: () => void;
30
+ /** A function to call when there is an error in the secure iframe */
15
31
  onIframeError?: (error?: string) => void;
32
+ /** A function to call when the iframe session has expired. */
16
33
  onIframeSessionExpired?: () => void;
34
+ /**
35
+ * Skip the MFA verification flow. Set to true if you want to handle MFA
36
+ * verification separately or if you're using your own MFA UI.
37
+ *
38
+ * @default false
39
+ */
17
40
  skipMfa?: boolean;
18
41
  }
42
+ /**
43
+ * The context for the ExportWallet component.
44
+ */
19
45
  interface ExportWalletContext extends Pick<ExportWalletProps, "address" | "onIframeReady" | "onCopySuccess" | "onIframeError" | "onIframeSessionExpired"> {
46
+ /** The type of account to be exported. */
20
47
  type: "evm-eoa" | "evm-smart" | "solana";
48
+ /** Whether the iframe session has expired. */
21
49
  isSessionExpired: boolean;
22
50
  }
51
+ /**
52
+ * The props for the ExportWalletCopyAddress component.
53
+ *
54
+ * @see {@link ExportWalletCopyAddress}
55
+ * @see {@link CopyAddressProps}
56
+ */
23
57
  type ExportWalletCopyAddressProps = Omit<CopyAddressProps, "address">;
58
+ /**
59
+ * The props for the ExportWalletCopyKeyButton component.
60
+ *
61
+ * @see {@link ExportWalletCopyKeyButton}
62
+ * @see {@link CopyEvmKeyButtonProps}
63
+ */
24
64
  type ExportWalletCopyKeyButtonProps = Omit<CopyEvmKeyButtonProps, "address" | "onError" | "onReady" | "onSuccess">;
25
65
  declare const ExportWalletContext: import('react').Context<ExportWalletContext>;
66
+ /**
67
+ * A title for the ExportWalletTitle component.
68
+ *
69
+ * @param {ExportWalletTitleProps} props - The props for the ExportWalletTitle component.
70
+ * @returns {JSX.Element} The rendered component.
71
+ *
72
+ * @group Components
73
+ *
74
+ * @see {@link ExportWallet}
75
+ */
26
76
  declare const ExportWalletTitle: ({ children, className, as: Component, ...props }: ExportWalletTitleProps) => import("react/jsx-runtime").JSX.Element;
77
+ /**
78
+ * A warning message for the ExportWalletWarning component.
79
+ *
80
+ * @param {HTMLAttributes<HTMLDivElement>} props - The props for the ExportWalletWarning component.
81
+ * @returns {JSX.Element} The rendered component.
82
+ *
83
+ * @group Components
84
+ *
85
+ * @see {@link ExportWallet}
86
+ */
27
87
  declare const ExportWalletWarning: (props: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
88
+ /**
89
+ * Displays a truncated address with a copy button.
90
+ *
91
+ * @param {ExportWalletCopyAddressProps} props - The props for the ExportWalletCopyAddress component.
92
+ * @returns {JSX.Element} The rendered component.
93
+ *
94
+ * @group Components
95
+ *
96
+ * @see {@link ExportWallet}
97
+ * @see {@link CopyAddress}
98
+ *
99
+ * @example
100
+ * ```tsx lines
101
+ * // Render the ExportWalletCopyAddress component with a custom label
102
+ * function ExportWalletCopyKeyButtonExample() {
103
+ * const { evmAddress } = useEvmAddress();
104
+ * if (!evmAddress) return null;
105
+ * return (
106
+ * <ExportWallet address={evmAddress}>
107
+ * <ExportWalletCopyAddress label="My wallet address" />
108
+ * </ExportWallet>
109
+ * );
110
+ * }
111
+ * ```
112
+ */
28
113
  declare const ExportWalletCopyAddress: ({ label, ...props }: ExportWalletCopyAddressProps) => import("react/jsx-runtime").JSX.Element;
114
+ /**
115
+ * A button that copies the private key of an EVM or Solana account.
116
+ *
117
+ * Note that an EVM smart account's private key cannot be exported. If a smart account address is provided, the button will not be rendered.
118
+ *
119
+ * @param {ExportWalletCopyKeyButtonProps} props - The props for the ExportWalletCopyKeyButton component.
120
+ * @returns {JSX.Element} The rendered component.
121
+ *
122
+ * @group Components
123
+ *
124
+ * @see {@link ExportWallet}
125
+ * @see {@link CopyEvmKeyButton}
126
+ * @see {@link CopySolanaKeyButton}
127
+ *
128
+ * @example
129
+ * ```tsx lines
130
+ * // Render the ExportWalletCopyKeyButton component with custom labels
131
+ * function ExportWalletCopyKeyButtonExample() {
132
+ * const { evmAddress } = useEvmAddress();
133
+ * if (!evmAddress) return null;
134
+ * return (
135
+ * <ExportWallet address={evmAddress}>
136
+ * <ExportWalletCopyKeyButton label="Copy private key" copiedLabel="Private key copied" />
137
+ * </ExportWallet>
138
+ * );
139
+ * }
140
+ * ```
141
+ */
29
142
  declare const ExportWalletCopyKeyButton: ({ fullWidth, ...props }: ExportWalletCopyKeyButtonProps) => import("react/jsx-runtime").JSX.Element | null;
143
+ /**
144
+ * A footer for the key export component.
145
+ *
146
+ * @param {HTMLAttributes<HTMLDivElement>} props - The props for the component.
147
+ * @returns {JSX.Element} The key export footer.
148
+ *
149
+ * @group Components
150
+ *
151
+ * @see {@link ExportWallet}
152
+ */
30
153
  declare const ExportWalletFooter: (props: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
154
+ /**
155
+ * The ExportWallet component is used to export the private key of an EVM or Solana account.
156
+ *
157
+ * Note that an EVM smart account's private key cannot be exported. If a smart account address is provided, a warning message will be displayed explaining that the private key cannot be copied, and the copy key button will not be rendered.
158
+ *
159
+ * @param {ExportWalletProps} props - The props for the ExportWallet component.
160
+ * @returns {JSX.Element} The rendered component.
161
+ *
162
+ * @see {@link ExportWalletTitle}
163
+ * @see {@link ExportWalletWarning}
164
+ * @see {@link ExportWalletCopyAddress}
165
+ * @see {@link ExportWalletCopyKeyButton}
166
+ * @see {@link ExportWalletFooter}
167
+ *
168
+ * @group Components
169
+ *
170
+ * @document ./README.md
171
+ *
172
+ * @example
173
+ * ```tsx lines
174
+ * // Render the ExportWallet component with an EVM address
175
+ * function ExportWalletExample() {
176
+ * const { evmAddress } = useEvmAddress();
177
+ * return (
178
+ * <ExportWallet address={evmAddress} />
179
+ * );
180
+ * }
181
+ * ```
182
+ *
183
+ * @example
184
+ * ```tsx lines
185
+ * // Render the ExportWallet component with a Solana address
186
+ * function ExportWalletExample() {
187
+ * const { solanaAddress } = useSolanaAddress();
188
+ * return (
189
+ * <ExportWallet address={solanaAddress} />
190
+ * );
191
+ * }
192
+ * ```
193
+ */
31
194
  declare const ExportWallet: ({ address, children, className, onIframeError, onIframeReady, onIframeSessionExpired, onCopySuccess, skipMfa, ...props }: ExportWalletProps) => import("react/jsx-runtime").JSX.Element;
32
195
  export { ExportWallet, ExportWalletCopyAddress, ExportWalletCopyKeyButton, ExportWalletFooter, ExportWalletTitle, ExportWalletWarning, type ExportWalletProps, type ExportWalletCopyAddressProps, type ExportWalletCopyKeyButtonProps, type ExportWalletTitleProps, };
@@ -2,26 +2,199 @@ import { ReactNode } from 'react';
2
2
  import { ExportWalletProps, ExportWalletTitleProps } from '../ExportWallet';
3
3
  import { ButtonProps } from '../ui/Button';
4
4
  import { ModalContentProps } from '../ui/Modal';
5
+ /**
6
+ * Props for the export wallet modal trigger button
7
+ *
8
+ * @see {@link ExportWalletModalTrigger}
9
+ */
5
10
  interface ExportWalletModalTriggerProps extends Partial<Pick<ButtonProps, "className" | "fullWidth" | "size" | "style" | "variant">> {
11
+ /** If provided, will render the children instead of the default trigger button. */
6
12
  children?: ReactNode;
13
+ /** The label to display on the trigger button. */
7
14
  label?: ReactNode;
8
15
  }
16
+ /**
17
+ * Props for the export wallet modal content.
18
+ *
19
+ * @augments ModalContentProps
20
+ *
21
+ * @see {@link ExportWalletModalContent}
22
+ */
9
23
  type ExportWalletModalContentProps = Omit<ModalContentProps, "children"> & Pick<ExportWalletProps, "children"> & {
24
+ /** A title for the dialog element */
10
25
  title?: ReactNode;
11
26
  };
27
+ /**
28
+ * Props for the export wallet modal title.
29
+ *
30
+ * @see {@link ExportWalletModalTitle}
31
+ */
12
32
  type ExportWalletModalTitleProps = ExportWalletTitleProps;
33
+ /**
34
+ * Props for the export wallet modal close button.
35
+ *
36
+ * @see {@link ExportWalletModalClose}
37
+ */
13
38
  interface ExportWalletModalCloseProps {
39
+ /** If provided, will render the children instead of the default close button. */
14
40
  children?: ReactNode;
15
41
  }
42
+ /**
43
+ * Props for the ExportWalletModal component.
44
+ *
45
+ * @see {@link ExportWalletModal}
46
+ */
16
47
  interface ExportWalletModalProps extends Pick<ExportWalletProps, "address" | "onIframeReady" | "onCopySuccess" | "onIframeError" | "onIframeSessionExpired"> {
48
+ /** If provided, will render the children instead of the default trigger button. */
17
49
  children?: ReactNode;
50
+ /** Whether the modal is open. Note: if you set this, you must also set `setIsOpen`. */
18
51
  open?: boolean;
52
+ /** A function to set the modal's open state. Note: if you set this, you must also set `open`. */
19
53
  setIsOpen?: (value: boolean) => void;
54
+ /** Whether to skip the MFA verification flow. */
20
55
  skipMfa?: boolean;
21
56
  }
57
+ /**
58
+ * A trigger button that opens the export wallet modal.
59
+ *
60
+ * @param {ExportWalletModalTriggerProps} props - The props for the ExportWalletModalTrigger component.
61
+ * @param {ReactNode} [props.children] - The children to render inside the trigger button.
62
+ * @param {ReactNode} [props.label] - The label to display on the trigger button.
63
+ * @returns {JSX.Element} The ExportWalletModalTrigger component.
64
+ *
65
+ * @see {@link ExportWalletModal}
66
+ *
67
+ * @group Components
68
+ */
22
69
  declare const ExportWalletModalTrigger: ({ children, className, label, ...props }: ExportWalletModalTriggerProps) => import("react/jsx-runtime").JSX.Element;
70
+ /**
71
+ * The export wallet modal title.
72
+ *
73
+ * @augments ModalContentProps
74
+ * @param {ExportWalletModalContentProps} props - The props for the ExportWalletModalContent component.
75
+ * @returns {JSX.Element} The ExportWalletModalContent component.
76
+ *
77
+ * @see {@link ExportWalletModal}
78
+ *
79
+ * @group Components
80
+ */
23
81
  declare const ExportWalletModalTitle: ({ children, as: Component, className, ...props }: ExportWalletModalTitleProps) => import("react/jsx-runtime").JSX.Element;
82
+ /**
83
+ * The export wallet modal close button.
84
+ *
85
+ * @param {ExportWalletModalCloseProps} props - The props for the ExportWalletModalClose component.
86
+ * @returns {JSX.Element} The ExportWalletModalClose component.
87
+ *
88
+ * @see {@link ExportWalletModal}
89
+ *
90
+ * @group Components
91
+ */
24
92
  declare const ExportWalletModalClose: ({ children }: ExportWalletModalCloseProps) => import("react/jsx-runtime").JSX.Element;
93
+ /**
94
+ * The export wallet modal content.
95
+ *
96
+ * @augments ModalContentProps
97
+ * @param {ExportWalletModalContentProps} props - The props for the ExportWalletModalContent component.
98
+ * @returns {JSX.Element} The ExportWalletModalContent component.
99
+ *
100
+ * @see {@link ExportWalletModal}
101
+ *
102
+ * @group Components
103
+ */
25
104
  declare const ExportWalletModalContent: ({ children, className, title, ...props }: ExportWalletModalContentProps) => import("react/jsx-runtime").JSX.Element;
105
+ /**
106
+ * A export wallet modal component that wraps the {@link ExportWallet} component.
107
+ *
108
+ * @param {ExportWalletModalProps} props - The props for the ExportWalletModal component.
109
+ * @param {ReactNode} [props.children] - The children to render inside the modal.
110
+ * @param {boolean} [props.open] - Whether the modal is open.
111
+ * @param {() => void} [props.setIsOpen] - A function to set the modal's open state.
112
+ * @returns {JSX.Element} The ExportWalletModal component.
113
+ *
114
+ * @see {@link ExportWalletModalClose} for the modal close button.
115
+ * @see {@link ExportWalletModalContent} for the modal content.
116
+ * @see {@link ExportWalletModalTitle} for the modal title.
117
+ * @see {@link ExportWalletModalTrigger} for the trigger button.
118
+ *
119
+ * @group Components
120
+ *
121
+ * @example
122
+ * ```tsx lines
123
+ * // Render the ExportWalletModal component with an EVM address
124
+ * function ExportWalletModalExample() {
125
+ * const { evmAddress } = useEvmAddress();
126
+ * return (
127
+ * <ExportWalletModal address={evmAddress} />
128
+ * );
129
+ * }
130
+ * ```
131
+ *
132
+ * @example
133
+ * ```tsx lines
134
+ * // Render the ExportWalletModal component with a Solana address
135
+ * function ExportWalletModalExample() {
136
+ * const { solanaAddress } = useSolanaAddress();
137
+ * return (
138
+ * <ExportWalletModal address={solanaAddress} />
139
+ * );
140
+ * }
141
+ * ```
142
+ *
143
+ * @example
144
+ * ```tsx lines
145
+ * // Render the ExportWalletModal component with a custom label for the trigger button
146
+ * function ExportWalletModalExample() {
147
+ * const { solanaAddress } = useSolanaAddress();
148
+ * return (
149
+ * <ExportWalletModal address={solanaAddress}>
150
+ * <ExportWalletModalTrigger label="Export Solana wallet" />
151
+ * </ExportWalletModal>
152
+ * );
153
+ * }
154
+ * ```
155
+ *
156
+ * @example
157
+ * ```tsx lines
158
+ * // Render the ExportWalletModal component with a custom button as the trigger
159
+ * function ExportWalletModalExample() {
160
+ * const { solanaAddress } = useSolanaAddress();
161
+ * return (
162
+ * <ExportWalletModal address={solanaAddress}>
163
+ * <button type="button">Export Solana wallet</button>
164
+ * </ExportWalletModal>
165
+ * );
166
+ * }
167
+ * ```
168
+ *
169
+ * @example
170
+ * ```tsx lines
171
+ * // Render the ExportWalletModal component with customized content
172
+ * function ExportWalletModalExample() {
173
+ * const { solanaAddress } = useSolanaAddress();
174
+ * return (
175
+ * <ExportWalletModal address={solanaAddress}>
176
+ * <ExportWalletModalTrigger />
177
+ * <ExportWalletModalContent>
178
+ * <ExportWallet address={solanaAddress}>
179
+ * <div className="header">
180
+ * <ExportWalletModalTitle />
181
+ * <ExportWalletModalClose />
182
+ * </div>
183
+ * <div className="content">
184
+ * <ExportWalletWarning />
185
+ * <ExportWalletCopyAddress />
186
+ * <ExportWalletCopyKeyButton />
187
+ * <p className="help-text">
188
+ * Your private key gives full control of your wallet.
189
+ * Store it safely and never share it with anyone.
190
+ * </p>
191
+ * </div>
192
+ * </ExportWallet>
193
+ * </ExportWalletModalContent>
194
+ * </ExportWalletModal>
195
+ * );
196
+ * }
197
+ * ```
198
+ */
26
199
  declare const ExportWalletModal: ({ address, children, onIframeReady, onCopySuccess, onIframeError, onIframeSessionExpired, open, setIsOpen, skipMfa, }: ExportWalletModalProps) => import("react/jsx-runtime").JSX.Element;
27
200
  export { ExportWalletModal, ExportWalletModalClose, ExportWalletModalContent, ExportWalletModalTitle, ExportWalletModalTrigger, type ExportWalletModalProps, type ExportWalletModalCloseProps, type ExportWalletModalContentProps, type ExportWalletModalTitleProps, type ExportWalletModalTriggerProps, };
@@ -1,7 +1,10 @@
1
1
  import { FormHTMLAttributes, ReactNode } from 'react';
2
2
  import { FundProps } from './types';
3
+ /** The views that the FundForm component can render. */
3
4
  export declare const VIEWS: readonly ["form", "error", "transaction-status"];
5
+ /** Type for the views that the FundForm component can render. */
4
6
  export type View = (typeof VIEWS)[number];
7
+ /** The props for the FundForm component. */
5
8
  export interface FundFormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "children"> {
6
9
  children?: (params: {
7
10
  view: View;
@@ -15,4 +18,19 @@ export interface FundFormProps extends Omit<FormHTMLAttributes<HTMLFormElement>,
15
18
  unmountOnTransactionSuccess?: boolean;
16
19
  unmount?: () => void;
17
20
  }
21
+ /**
22
+ * The FundForm component is a form that allows the user to fund their wallet.
23
+ *
24
+ * @param {FundFormProps} props - The props for the FundForm component.
25
+ * @param {() => void} [props.onPopupClose] - The function to call when the popup is closed.
26
+ * @param {() => void} [props.onPopupOpen] - The function to call when the popup is opened.
27
+ * @param {FundProps["openIn"]} [props.openIn] - The type of popup to open.
28
+ * @param {ReactNode} [props.submitLabel] - The label for the submit button.
29
+ * @param {boolean} [props.unmountOnTransactionError] - Whether to unmount the form when a transaction error occurs.
30
+ * @param {boolean} [props.unmountOnTransactionSuccess] - Whether to unmount the form when the transaction is successful.
31
+ * @param {() => void} [props.unmount] - The function to call when the form is unmounted.
32
+ * @returns {JSX.Element} The FundForm component.
33
+ *
34
+ * @group Components
35
+ */
18
36
  export declare const FundForm: ({ className, children, onPopupClose, onPopupOpen, onSubmit, openIn, submitLabel, unmountOnTransactionError, unmountOnTransactionSuccess, unmount, ...props }: FundFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { FundContextType, FundProps } from './types';
3
+ /**
4
+ * A provider for the FundContext.
5
+ *
6
+ * @param {FundProps} props - The props for the FundProvider.
7
+ * @param {ReactNode} props.children - The children of the FundProvider.
8
+ * @param {GetBuyOptions} props.fetchBuyOptions - The function that handles interacting with the Buy Options API.
9
+ * @param {GetBuyQuote} props.fetchBuyQuote - The function that handles interacting with the Buy Quote API.
10
+ * @param {string} props.inputType - The input type for the FundProvider.
11
+ * @returns {JSX.Element} - The rendered component.
12
+ */
3
13
  export declare const FundProvider: ({ children, fetchBuyOptions, fetchBuyQuote, inputType, onError, onStatus, onSuccess, ...props }: Omit<FundProps, "children"> & {
4
14
  children: ReactNode;
5
15
  }) => import("react/jsx-runtime").JSX.Element;
16
+ /**
17
+ * Get the value of the FundContext.
18
+ *
19
+ * @returns {FundContextType} - The value of the FundContext.
20
+ *
21
+ * @group Hooks
22
+ */
6
23
  export declare const useFundContext: () => FundContextType;
@@ -1,5 +1,17 @@
1
1
  import { ElementType, HTMLAttributes } from 'react';
2
+ /**
3
+ * The props for the FundTitle component.
4
+ */
2
5
  export interface FundTitleProps extends HTMLAttributes<HTMLDivElement> {
3
6
  as?: ElementType;
4
7
  }
8
+ /**
9
+ * The FundTitle component is a component that displays the title of the Fund component.
10
+ *
11
+ * @param {FundTitleProps} props - The props for the FundTitle component.
12
+ * @param {ElementType} [props.as] - The element type of the FundTitle component.
13
+ * @returns {JSX.Element} The FundTitle component.
14
+ *
15
+ * @group Components
16
+ */
5
17
  export declare const FundTitle: ({ children, as: Component, className, ...props }: FundTitleProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,18 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
+ /**
3
+ * The props for the FundAmountInput component.
4
+ */
2
5
  export interface FundAmountInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "min" | "max" | "value"> {
3
6
  error?: string;
4
7
  }
8
+ /**
9
+ * The FundAmountInput component includes an input for the user to enter an amount in crypto or fiat.
10
+ * It displays the output value below the input, calculated from the provided exchange rate.
11
+ * There is also a toggle button to switch between crypto and fiat input.
12
+ * Regardless of which input is selected, the user will receive the crypto amount.
13
+ *
14
+ * @param {FundAmountInputProps} props - The props of the FundAmountInput component.
15
+ * @param {ElementType} [props.as] - The component to render. Defaults to "div".
16
+ * @returns {JSX.Element} The FundAmountInput component.
17
+ */
5
18
  export declare const FundAmountInput: import('react').ForwardRefExoticComponent<FundAmountInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -2,5 +2,12 @@ import { FundStateError } from '../types';
2
2
  interface FundErrorScreenProps {
3
3
  error: FundStateError | null;
4
4
  }
5
+ /**
6
+ * The FundTransactionStatus component
7
+ *
8
+ * @param {FundErrorScreenProps} props - The props for the FundErrorScreen component.
9
+ * @param {FundErrorScreenProps["error"]} props.error - The error to display.
10
+ * @returns {JSX.Element} The FundTransactionStatus component.
11
+ */
5
12
  export declare const FundErrorScreen: ({ error }: FundErrorScreenProps) => import("react/jsx-runtime").JSX.Element | null;
6
13
  export {};
@@ -2,5 +2,12 @@ import { ElementType, HTMLAttributes } from 'react';
2
2
  interface FundPaymentMethodsProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
3
3
  as?: ElementType;
4
4
  }
5
+ /**
6
+ * A select list of payment methods.
7
+ *
8
+ * @param {FundPaymentMethodsProps} props - The props of the FundPaymentMethods component.
9
+ * @param {ElementType} [props.as] - The component to render. Note it must not have a Fragment as the root element. Defaults to "div".
10
+ * @returns {JSX.Element} The FundPaymentMethods component.
11
+ */
5
12
  export declare const FundPaymentMethods: ({ as: Component, ...props }: FundPaymentMethodsProps) => import("react/jsx-runtime").JSX.Element;
6
13
  export {};
@@ -2,5 +2,12 @@ import { ElementType, HTMLAttributes } from 'react';
2
2
  interface FundPresetAmountInputsProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
3
3
  as?: ElementType;
4
4
  }
5
+ /**
6
+ * A select list of payment methods.
7
+ *
8
+ * @param {FundPaymentMethodsProps} props - The props of the FundPaymentMethods component.
9
+ * @param {ElementType} [props.as] - The component to render. Note it must not have a Fragment as the root element. Defaults to "div".
10
+ * @returns {JSX.Element} The FundPaymentMethods component.
11
+ */
5
12
  export declare const FundPresetAmountInputs: ({ as: Component, className, ...props }: FundPresetAmountInputsProps) => import("react/jsx-runtime").JSX.Element | null;
6
13
  export {};
@@ -4,5 +4,11 @@ type StatusComponentProps = {
4
4
  unmountOnSuccess?: boolean;
5
5
  unmountOnError?: boolean;
6
6
  };
7
+ /**
8
+ * The FundTransactionStatus component
9
+ *
10
+ * @param {StatusComponentProps} props - The props for the FundTransactionStatus component.
11
+ * @returns {JSX.Element} The FundTransactionStatus component.
12
+ */
7
13
  export declare const FundTransactionStatus: (props: StatusComponentProps) => import("react/jsx-runtime").JSX.Element;
8
14
  export {};
@@ -1,14 +1,37 @@
1
1
  import { OnrampError, FundProps, FundState } from '../types';
2
+ /**
3
+ * The params for the useBuyUrl hook.
4
+ */
2
5
  export type UseBuyUrlParams = Pick<FundState, "country" | "cryptoCurrency" | "fiatCurrency" | "network" | "subdivision" | "destinationAddress"> & {
3
6
  fetchBuyQuote: FundProps["fetchBuyQuote"];
4
7
  onError?: (e: OnrampError | undefined) => void;
5
8
  redirectUrl?: string;
6
9
  };
10
+ /**
11
+ * The params for the fetchBuyUrl function.
12
+ */
7
13
  export interface FetchBuyUrlParams {
8
14
  paymentMethod: NonNullable<FundState["selectedPaymentMethod"]>["id"];
9
15
  paymentAmount: number;
10
16
  }
17
+ /**
18
+ * The return type for the useExchangeRate hook.
19
+ */
11
20
  export type UseBuyUrlReturn = {
12
21
  fetchBuyUrl: (params: FetchBuyUrlParams) => Promise<string>;
13
22
  };
23
+ /**
24
+ * The useExchangeRate hook is used to fetch the exchange rate for a given fiat to crypto pair.
25
+ *
26
+ * @param {UseBuyUrlParams} params - The params for the useExchangeRate hook.
27
+ * @param {string} params.country - The country the user is in.
28
+ * @param {string} params.cryptoCurrency - The crypto currency.
29
+ * @param {GetBuyQuote} params.fetchBuyQuote - The function that handles interacting with the Buy Quote API.
30
+ * @param {string} params.fiatCurrency - The fiat currency.
31
+ * @param {(e: OnrampError | undefined) => void} params.onError - A function that handles the error.
32
+ * @param {(exchangeRate: number) => void} params.setExchangeRate - A function that sets the exchange rate.
33
+ * @param {(loading: boolean) => void} params.setIsExchangeRatePending - A function that sets the pending state.
34
+ * @param {string} params.subdivision - The subdivision of the country the user is in (e.g. state, province, etc.).
35
+ * @returns {UseBuyUrlReturn} - A function to fetch the exchange rate.
36
+ */
14
37
  export declare const useBuyUrl: ({ country, cryptoCurrency, destinationAddress, fetchBuyQuote, fiatCurrency, network, onError: onErrorProp, redirectUrl, subdivision, }: UseBuyUrlParams) => UseBuyUrlReturn;
@@ -1,5 +1,17 @@
1
1
  import { FundLifecycleEvents, FundLifecycleStatus } from '../types';
2
+ /**
3
+ * The props for the useEmitLifecycleStatus hook.
4
+ */
2
5
  export type UseEmitLifecycleStatusProps = FundLifecycleEvents & {
3
6
  lifecycleStatus: FundLifecycleStatus;
4
7
  };
8
+ /**
9
+ * A hook that emits lifecycle statuses.
10
+ *
11
+ * @param {UseEmitLifecycleStatusProps} params - The params for the useEmitLifecycleStatus hook.
12
+ * @param {LifecycleStatus} params.lifecycleStatus - The lifecycle status to emit.
13
+ * @param {LifecycleEvents["onError"]} params.onError - A function to call when an error occurs.
14
+ * @param {LifecycleEvents["onSuccess"]} params.onSuccess - A function to call when a success event occurs.
15
+ * @param {LifecycleEvents["onStatus"]} params.onStatus - A function to call when a status event occurs.
16
+ */
5
17
  export declare const useEmitLifecycleStatus: ({ lifecycleStatus, onError, onSuccess, onStatus, }: UseEmitLifecycleStatusProps) => void;
@@ -4,8 +4,25 @@ type UseExchangeRateParams = Pick<FundProps, "country" | "fetchBuyQuote" | "cryp
4
4
  dispatch: Dispatch<FundAction>;
5
5
  onError?: (e: OnrampError | undefined) => void;
6
6
  };
7
+ /**
8
+ * The return type for the useExchangeRate hook.
9
+ */
7
10
  type UseExchangeRateReturn = {
8
11
  fetchExchangeRate: () => Promise<void>;
9
12
  };
13
+ /**
14
+ * The useExchangeRate hook is used to fetch the exchange rate for a given fiat to crypto pair.
15
+ *
16
+ * @param {UseExchangeRateParams} params - The params for the useExchangeRate hook.
17
+ * @param {string} params.country - The country the user is in.
18
+ * @param {string} params.cryptoCurrency - The crypto currency.
19
+ * @param {GetBuyQuote} params.fetchBuyQuote - The function that handles interacting with the Buy Quote API.
20
+ * @param {string} params.fiatCurrency - The fiat currency.
21
+ * @param {(e: OnrampError | undefined) => void} params.onError - A function that handles the error.
22
+ * @param {(exchangeRate: number) => void} params.setExchangeRate - A function that sets the exchange rate.
23
+ * @param {(loading: boolean) => void} params.setIsExchangeRatePending - A function that sets the pending state.
24
+ * @param {string} params.subdivision - The subdivision of the country the user is in (e.g. state, province, etc.).
25
+ * @returns {UseExchangeRateReturn} - A function to fetch the exchange rate.
26
+ */
10
27
  export declare const useExchangeRate: ({ country, cryptoCurrency, fetchBuyQuote, fiatCurrency, network, onError, dispatch, subdivision, }: UseExchangeRateParams) => UseExchangeRateReturn;
11
28
  export {};
@@ -4,8 +4,24 @@ type UsePaymentMethodsParams = Pick<FundProps, "country" | "cryptoCurrency" | "f
4
4
  dispatch: Dispatch<FundAction>;
5
5
  onError?: (e: OnrampError | undefined) => void;
6
6
  };
7
+ /**
8
+ * The return type for the usePaymentMethods hook.
9
+ */
7
10
  type UsePaymentMethodsReturn = {
8
11
  fetchPaymentMethods: () => Promise<void>;
9
12
  };
13
+ /**
14
+ * The usePaymentMethods hook is used to fetch and prepare the payment methods for the given country and currency.
15
+ *
16
+ * @param {UsePaymentMethodsParams} params - The params for the usePaymentMethods hook.
17
+ * @param {string} params.country - The country.
18
+ * @param {GetBuyOptions} params.fetchBuyOptions - The function that handles interacting with the Buy Options API.
19
+ * @param {string} params.fiatCurrency - The fiat currency.
20
+ * @param {string} params.subdivision - The subdivision.
21
+ * @param {(paymentMethods: PaymentMethod[]) => void} params.setPaymentMethods - The function that sets the payment methods.
22
+ * @param {(loading: boolean) => void} params.setIsPaymentMethodsPending - The function that sets the pending state.
23
+ * @param {(e: OnrampError | undefined) => void} params.onError - The function that handles errors.
24
+ * @returns {UsePaymentMethodsReturn} A function to fetch the payment methods.
25
+ */
10
26
  export declare const usePaymentMethods: ({ country, cryptoCurrency, fetchBuyOptions, fiatCurrency, network, subdivision, dispatch, onError, }: UsePaymentMethodsParams) => UsePaymentMethodsReturn;
11
27
  export {};
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This code was copied and adapted from Coinbase Onchainkit (buy/hooks/usePopupMonitor.ts)
3
+ */
4
+ /**
5
+ * Monitor a popup window and call a callback when it closes
6
+ *
7
+ * @param {() => void} [onClose] - Callback to call when the popup window closes
8
+ * @returns {{ startPopupMonitor: (popupWindow: Window) => void }} An object with a startPopupMonitor function
9
+ */
1
10
  export declare const usePopupMonitor: (onClose?: () => void) => {
2
11
  startPopupMonitor: (popupWindow: Window) => void;
3
12
  };