@edgex-web/components 0.1.0-beta.3 → 0.1.0-beta.30
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.
- package/dist/components/Deposit/index.d.ts +4 -6
- package/dist/components/Deposit/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/DepositManager.d.ts +2 -0
- package/dist/components/Deposit/src/DepositManager.d.ts.map +1 -1
- package/dist/components/Deposit/src/{EVMWalletView.d.ts → evm/WalletView.d.ts} +4 -3
- package/dist/components/Deposit/src/evm/WalletView.d.ts.map +1 -0
- package/dist/components/Deposit/src/evm/index.d.ts +33 -0
- package/dist/components/Deposit/src/evm/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts +69 -0
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts.map +1 -0
- package/dist/components/Deposit/src/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/{MPCWalletView.d.ts → mpc/WalletView.d.ts} +3 -4
- package/dist/components/Deposit/src/mpc/WalletView.d.ts.map +1 -0
- package/dist/components/Deposit/src/mpc/index.d.ts +23 -0
- package/dist/components/Deposit/src/mpc/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/Asset.d.ts +19 -0
- package/dist/components/Deposit/src/selector/Asset.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/Chain.d.ts +16 -0
- package/dist/components/Deposit/src/selector/Chain.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/index.d.ts +14 -0
- package/dist/components/Deposit/src/selector/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/utils.d.ts +62 -1
- package/dist/components/Deposit/src/utils.d.ts.map +1 -1
- package/dist/components/Deposit/src/walletAdapters.d.ts.map +1 -1
- package/dist/components/Deposit/test-arbitrum-token-limits.d.ts +5 -0
- package/dist/components/Deposit/test-arbitrum-token-limits.d.ts.map +1 -0
- package/dist/components/Deposit/test-arbitrum-unlimited.d.ts +5 -0
- package/dist/components/Deposit/test-arbitrum-unlimited.d.ts.map +1 -0
- package/dist/components/Deposit/types/index.d.ts +63 -49
- package/dist/components/Deposit/types/index.d.ts.map +1 -1
- package/dist/components/Deposit/utils/migrateDepositData.d.ts +42 -0
- package/dist/components/Deposit/utils/migrateDepositData.d.ts.map +1 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/LoadingSpinner/index.d.ts +4 -0
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/components/Provider/index.d.ts +6 -1
- package/dist/components/Provider/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts +5 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts +5 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts.map +1 -0
- package/dist/components/Tooltip/src/index.d.ts +3 -0
- package/dist/components/Tooltip/src/index.d.ts.map +1 -0
- package/dist/components/Tooltip/types/index.d.ts +52 -0
- package/dist/components/Tooltip/types/index.d.ts.map +1 -0
- package/dist/components/Withdraw/constants/index.d.ts +7 -0
- package/dist/components/Withdraw/constants/index.d.ts.map +1 -0
- package/dist/components/Withdraw/index.d.ts +6 -10
- package/dist/components/Withdraw/index.d.ts.map +1 -1
- package/dist/components/Withdraw/src/Speed.d.ts +10 -0
- package/dist/components/Withdraw/src/Speed.d.ts.map +1 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts +12 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts.map +1 -0
- package/dist/components/Withdraw/src/constants.d.ts +24 -0
- package/dist/components/Withdraw/src/constants.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts +22 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/index.d.ts +34 -0
- package/dist/components/Withdraw/src/evm/index.d.ts.map +1 -0
- package/dist/components/Withdraw/src/index.d.ts +5 -0
- package/dist/components/Withdraw/src/index.d.ts.map +1 -0
- package/dist/components/Withdraw/types/index.d.ts +83 -0
- package/dist/components/Withdraw/types/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useTranslation.d.ts +131 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +9132 -6292
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +57 -60
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/en-US.d.ts +48 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/locales/index.d.ts +16 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/ja-JP.d.ts +48 -0
- package/dist/locales/ja-JP.d.ts.map +1 -0
- package/dist/locales/ru-RU.d.ts +48 -0
- package/dist/locales/ru-RU.d.ts.map +1 -0
- package/dist/locales/zh-CN.d.ts +49 -0
- package/dist/locales/zh-CN.d.ts.map +1 -0
- package/dist/locales/zh-TW.d.ts +48 -0
- package/dist/locales/zh-TW.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +22 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +10 -4
- package/dist/components/Deposit/src/ChainSelector.d.ts +0 -35
- package/dist/components/Deposit/src/ChainSelector.d.ts.map +0 -1
- package/dist/components/Deposit/src/ChainTokenSelector.d.ts +0 -25
- package/dist/components/Deposit/src/ChainTokenSelector.d.ts.map +0 -1
- package/dist/components/Deposit/src/Deposit.d.ts +0 -17
- package/dist/components/Deposit/src/Deposit.d.ts.map +0 -1
- package/dist/components/Deposit/src/EVMWalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/MPCWalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/components.d.ts +0 -89
- package/dist/components/Deposit/src/components.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrateDepositData.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/utils/migrateDepositData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAa,MAAM,SAAS,CAAA;AAG9C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,SAAS,CAAC,EAAE;QACV,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;CACF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,WAAW,EAAE,EAC3B,YAAY,EAAE,WAAW,EAAE,GAC1B,SAAS,EAAE,CAQb;AAgID;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG;IACzD,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CA8CA;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,EAAE,CA0CvD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type LoadingSpinnerColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
5
|
+
export interface LoadingSpinnerProps {
|
|
6
|
+
/** Size of the loading spinner */
|
|
7
|
+
size?: LoadingSpinnerSize;
|
|
8
|
+
/** Color variant of the loading spinner */
|
|
9
|
+
color?: LoadingSpinnerColor;
|
|
10
|
+
/** Additional CSS classes */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Accessible label for screen readers */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Whether to show the spinner inline with text */
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
18
|
+
export default LoadingSpinner;
|
|
19
|
+
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,sBAAsB,CAAA;AAE7B,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC1D,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,CAAA;AAEX,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkBxD,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1D,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ComponentConfig } from '../../types';
|
|
3
|
+
import { TranslationKeys, SupportedLocale } from '../../locales';
|
|
3
4
|
|
|
4
5
|
interface ComponentProviderProps {
|
|
5
6
|
config: ComponentConfig;
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
}
|
|
9
|
+
interface ComponentContextValue extends ComponentConfig {
|
|
10
|
+
translations: TranslationKeys;
|
|
11
|
+
currentLocale: SupportedLocale;
|
|
12
|
+
}
|
|
8
13
|
export declare const ComponentProvider: React.FC<ComponentProviderProps>;
|
|
9
|
-
export declare const useComponentConfig: () =>
|
|
14
|
+
export declare const useComponentConfig: () => ComponentContextValue;
|
|
10
15
|
export {};
|
|
11
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAW,MAAM,OAAO,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,WAAW,CAAA;AAElB,UAAU,sBAAsB;IAC9B,MAAM,EAAE,eAAe,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,UAAU,qBAAsB,SAAQ,eAAe;IACrD,YAAY,EAAE,eAAe,CAAA;IAC7B,aAAa,EAAE,eAAe,CAAA;CAC/B;AAID,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwB9D,CAAA;AAED,eAAO,MAAM,kBAAkB,6BAM9B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAgBvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA0F1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipArrow.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/TooltipArrow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,eAAO,MAAM,YAAY,0FA0DxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/**
|
|
6
|
+
* 触发 tooltip 的子元素
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip 显示的内容
|
|
11
|
+
*/
|
|
12
|
+
content: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Tooltip 相对于触发元素的位置
|
|
15
|
+
* @default 'top'
|
|
16
|
+
*/
|
|
17
|
+
placement?: Placement;
|
|
18
|
+
/**
|
|
19
|
+
* 鼠标悬停延迟时间(毫秒)
|
|
20
|
+
* @default 200
|
|
21
|
+
*/
|
|
22
|
+
delay?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 是否显示箭头
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 自定义 className
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 是否禁用 tooltip
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 最大宽度
|
|
39
|
+
* @default 'max-w-xs'
|
|
40
|
+
*/
|
|
41
|
+
maxWidth?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 触发方式
|
|
44
|
+
* @default ['hover', 'focus']
|
|
45
|
+
*/
|
|
46
|
+
trigger?: ('hover' | 'focus' | 'click')[];
|
|
47
|
+
}
|
|
48
|
+
export interface TooltipArrowProps {
|
|
49
|
+
placement: Placement;
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/constants/index.tsx"],"names":[],"mappings":"AAAA,qBAAa,KAAK;IAChB,MAAM,CAAC,IAAI,SAAI;IACf,MAAM,CAAC,MAAM,SAAI;IACjB,MAAM,CAAC,IAAI,SAAI;IACf,MAAM,CAAC,IAAI,SAAI;CAChB"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
config: WithdrawConfig;
|
|
8
|
-
}
|
|
9
|
-
export declare const Withdraw: React.FC<WithdrawProps>;
|
|
10
|
-
export {};
|
|
1
|
+
export { Withdraw } from './src/index';
|
|
2
|
+
export { WithdrawManager, openWithdraw, closeWithdraw, updateWithdrawOptions, setWithdrawLoading, isWithdrawLoading, useWithdraw, } from './src/WithdrawManager';
|
|
3
|
+
export { WithdrawView } from './src/evm/index';
|
|
4
|
+
export { WithdrawWalletView } from './src/evm/WalletView';
|
|
5
|
+
export { default as WithdrawSpeed } from './src/Speed';
|
|
6
|
+
export type { WithdrawProps, OpenWithdrawOptions, WithdrawAPI } from './types';
|
|
11
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AAGtD,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface WithdrawSpeedProps {
|
|
4
|
+
selectedLevel: number;
|
|
5
|
+
maxLevel: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const WithdrawSpeed: React.FC<WithdrawSpeedProps>;
|
|
9
|
+
export default WithdrawSpeed;
|
|
10
|
+
//# sourceMappingURL=Speed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Speed.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/Speed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4DD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiB/C,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OpenWithdrawOptions, WithdrawAPI } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare const WithdrawManager: React.ForwardRefExoticComponent<React.RefAttributes<WithdrawAPI>>;
|
|
5
|
+
export declare const openWithdraw: (options?: OpenWithdrawOptions) => void;
|
|
6
|
+
export declare const closeWithdraw: () => void;
|
|
7
|
+
export declare const updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
|
|
8
|
+
export declare const setWithdrawLoading: (loading: boolean) => void;
|
|
9
|
+
export declare const isWithdrawOpen: () => boolean;
|
|
10
|
+
export declare const isWithdrawLoading: () => boolean;
|
|
11
|
+
export declare const useWithdraw: () => WithdrawAPI;
|
|
12
|
+
//# sourceMappingURL=WithdrawManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawManager.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/WithdrawManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAA;AAEzE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAS3D,eAAO,MAAM,eAAe,mEAqG1B,CAAA;AAKF,eAAO,MAAM,YAAY,GAAI,UAAU,mBAAmB,SAQzD,CAAA;AAED,eAAO,MAAM,aAAa,YAQzB,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,SAAS,OAAO,CAAC,mBAAmB,CAAC,SAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO,SAQlD,CAAA;AAED,eAAO,MAAM,cAAc,eAK1B,CAAA;AAED,eAAO,MAAM,iBAAiB,eAK7B,CAAA;AAGD,eAAO,MAAM,WAAW,QAAO,WAS9B,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ETH_CHAIN_IDS: {
|
|
2
|
+
readonly MAINNET: 1;
|
|
3
|
+
readonly SEPOLIA: 11155111;
|
|
4
|
+
};
|
|
5
|
+
export declare const ETH_CHAIN_ID_LIST: (1 | 11155111)[];
|
|
6
|
+
export declare const isEthChain: (chainId: number | string) => boolean;
|
|
7
|
+
export declare const UNLIMITED_DEPOSIT_CHAIN_IDS: {
|
|
8
|
+
readonly MAINNET: 1;
|
|
9
|
+
readonly SEPOLIA: 11155111;
|
|
10
|
+
readonly ARBITRUM: 42161;
|
|
11
|
+
readonly ARBITRUM_SEPOLIA: 421614;
|
|
12
|
+
};
|
|
13
|
+
export declare const UNLIMITED_DEPOSIT_CHAIN_ID_LIST: (1 | 42161 | 421614 | 11155111)[];
|
|
14
|
+
export declare const isUnlimitedDepositChain: (chainId: number | string) => boolean;
|
|
15
|
+
export declare const ARBITRUM_UNLIMITED_TOKENS: {
|
|
16
|
+
readonly USDT: true;
|
|
17
|
+
};
|
|
18
|
+
export declare const shouldShowDepositLimit: (chainId: number | string, tokenSymbol?: string) => boolean;
|
|
19
|
+
export declare const OTHER_CHAIN_IDS: {
|
|
20
|
+
readonly BNB_CHAIN: 56;
|
|
21
|
+
readonly POLYGON: 137;
|
|
22
|
+
readonly OPTIMISM: 10;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;CAGhB,CAAA;AAGV,eAAO,MAAM,iBAAiB,kBAA+B,CAAA;AAG7D,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,GAAG,MAAM,KAAG,OAMrD,CAAA;AAGD,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAA;AAGV,eAAO,MAAM,+BAA+B,mCAE3C,CAAA;AAGD,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,GAAG,MAAM,KAAG,OAMlE,CAAA;AAGD,eAAO,MAAM,yBAAyB;;CAI5B,CAAA;AAGV,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,GAAG,MAAM,EACxB,cAAc,MAAM,KACnB,OA0BF,CAAA;AAGD,eAAO,MAAM,eAAe;;;;CAIlB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface WithdrawWalletViewProps {
|
|
4
|
+
withdrawAmount: string;
|
|
5
|
+
curSelectToken: string;
|
|
6
|
+
curSelectTokenData: any;
|
|
7
|
+
currentActiveChain: any;
|
|
8
|
+
currentEquity: number;
|
|
9
|
+
amount: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
tokenBalance?: string;
|
|
12
|
+
platformBalance?: string;
|
|
13
|
+
fee?: string;
|
|
14
|
+
walletType?: 'evm' | 'mpc';
|
|
15
|
+
receiverAddress?: string;
|
|
16
|
+
onWithdrawAmountChange: (amount: string) => void;
|
|
17
|
+
onReceiverAddressChange?: (address: string) => void;
|
|
18
|
+
onAmountChanged?: (amount: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const WithdrawWalletView: React.FC<WithdrawWalletViewProps>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=WalletView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/WalletView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAetC,UAAU,uBAAuB;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,GAAG,CAAA;IACvB,kBAAkB,EAAE,GAAG,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAEhB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,UAAU,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+OhE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChainInfo } from '../../../../types';
|
|
3
|
+
|
|
4
|
+
interface WithdrawViewProps {
|
|
5
|
+
chains: ChainInfo[];
|
|
6
|
+
defaultChainId?: number;
|
|
7
|
+
defaultTokenAddress?: string;
|
|
8
|
+
defaultAmount?: string;
|
|
9
|
+
walletAdapter: any;
|
|
10
|
+
metadata?: any;
|
|
11
|
+
currentEquity?: number;
|
|
12
|
+
platformBalance?: string;
|
|
13
|
+
fee?: string;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
wagmiHooks?: {
|
|
16
|
+
useBalance: any;
|
|
17
|
+
useReadContract: any;
|
|
18
|
+
useAccount: any;
|
|
19
|
+
};
|
|
20
|
+
onWithdraw?: (withdrawInfo: {
|
|
21
|
+
amount: string;
|
|
22
|
+
chainId: number;
|
|
23
|
+
tokenAddress: string;
|
|
24
|
+
tokenSymbol: string;
|
|
25
|
+
receiverAddress?: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
onChainChange?: (chainId: number) => void;
|
|
29
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
30
|
+
onAmountChanged?: (amount: string) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const WithdrawView: React.FC<WithdrawViewProps>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAK7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AASnC,UAAU,iBAAiB;IACzB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,aAAa,EAAE,GAAG,CAAA;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,GAAG,CAAA;QACf,eAAe,EAAE,GAAG,CAAA;QACpB,UAAU,EAAE,GAAG,CAAA;KAChB,CAAA;IAGD,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE;QAC1B,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB,KAAK,IAAI,CAAA;IACV,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoSpD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAKtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AASxC,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqG5C,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { WithdrawConfig, ChainInfo } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export interface WithdrawResult {
|
|
4
|
+
chainId: number;
|
|
5
|
+
tokenAddress: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
txHash?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WithdrawProps {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
config: WithdrawConfig;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
currentActiveAccount?: {
|
|
16
|
+
wallet: 'mpc' | 'evm';
|
|
17
|
+
ethAddress: string;
|
|
18
|
+
accountId: string;
|
|
19
|
+
l2Key: string;
|
|
20
|
+
};
|
|
21
|
+
smartWallet?: {
|
|
22
|
+
address: string;
|
|
23
|
+
};
|
|
24
|
+
chains: ChainInfo[];
|
|
25
|
+
defaultChainId?: number;
|
|
26
|
+
defaultTokenAddress?: string;
|
|
27
|
+
defaultAmount?: string;
|
|
28
|
+
metadata?: {
|
|
29
|
+
multiChain?: {
|
|
30
|
+
minWithdraw: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
currentEquity?: number;
|
|
34
|
+
platformBalance?: string;
|
|
35
|
+
fee?: string;
|
|
36
|
+
wagmiHooks?: {
|
|
37
|
+
useBalance: any;
|
|
38
|
+
useReadContract: any;
|
|
39
|
+
useAccount: any;
|
|
40
|
+
};
|
|
41
|
+
onWithdraw?: (withdrawInfo: {
|
|
42
|
+
amount: string;
|
|
43
|
+
chainId: number;
|
|
44
|
+
tokenAddress: string;
|
|
45
|
+
tokenSymbol: string;
|
|
46
|
+
receiverAddress?: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
onChainChange?: (chainId: number) => void;
|
|
49
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
50
|
+
onAmountChanged?: (amount: string) => void;
|
|
51
|
+
}
|
|
52
|
+
export interface OpenWithdrawOptions {
|
|
53
|
+
config?: WithdrawConfig;
|
|
54
|
+
isWalletConnected?: boolean;
|
|
55
|
+
currentActiveAccount?: WithdrawProps['currentActiveAccount'];
|
|
56
|
+
smartWallet?: WithdrawProps['smartWallet'];
|
|
57
|
+
chains: ChainInfo[];
|
|
58
|
+
defaultChainId?: number;
|
|
59
|
+
defaultTokenAddress?: string;
|
|
60
|
+
defaultAmount?: string;
|
|
61
|
+
metadata?: WithdrawProps['metadata'];
|
|
62
|
+
currentEquity?: number;
|
|
63
|
+
platformBalance?: string;
|
|
64
|
+
fee?: string;
|
|
65
|
+
wagmiHooks?: WithdrawProps['wagmiHooks'];
|
|
66
|
+
curSelectToken?: string;
|
|
67
|
+
currentActiveChain?: any;
|
|
68
|
+
withdrawAmount?: string;
|
|
69
|
+
onWithdraw?: WithdrawProps['onWithdraw'];
|
|
70
|
+
onChainChange?: (chainId: number) => void;
|
|
71
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
72
|
+
onAmountChanged?: (amount: string) => void;
|
|
73
|
+
onClose?: () => void;
|
|
74
|
+
}
|
|
75
|
+
export interface WithdrawAPI {
|
|
76
|
+
openWithdraw: (options?: OpenWithdrawOptions) => void;
|
|
77
|
+
closeWithdraw: () => void;
|
|
78
|
+
updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
|
|
79
|
+
setWithdrawLoading: (loading: boolean) => void;
|
|
80
|
+
isOpen: () => boolean;
|
|
81
|
+
isLoading: () => boolean;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/types/index.ts"],"names":[],"mappings":"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"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGvD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAS3E,eAAO,MAAM,UAAU;0BACoB,aAAa;CAKvD,CAAA;AAED,eAAO,MAAM,WAAW;2BACoB,cAAc;CAKzD,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 多语言翻译 Hook
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* const { t, locale } = useTranslation()
|
|
7
|
+
*
|
|
8
|
+
* // 基础用法
|
|
9
|
+
* const title = t('deposit.title') // "充值" 或 "Deposit"
|
|
10
|
+
*
|
|
11
|
+
* // 参数化翻译(字符串参数)
|
|
12
|
+
* const enableText = t('deposit.enableSystemProWithToken', {
|
|
13
|
+
* token: 'USDT',
|
|
14
|
+
* network: 'Ethereum'
|
|
15
|
+
* }) // "Enable USDT on Ethereum" 或 "在Ethereum上启用USDT"
|
|
16
|
+
*
|
|
17
|
+
* // 参数化翻译(数字参数)
|
|
18
|
+
* const arrivalText = t('deposit.arrivaltimeTooltip1', {
|
|
19
|
+
* v: 10, // 数字会自动转换为字符串
|
|
20
|
+
* v1: 12
|
|
21
|
+
* }) // "您可以在约 10 分钟 (达到 12 个区块确认后) 提走已到账的资金"
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const useTranslation: () => {
|
|
25
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
26
|
+
translations: {
|
|
27
|
+
deposit: {
|
|
28
|
+
title: string;
|
|
29
|
+
chain: string;
|
|
30
|
+
asset: string;
|
|
31
|
+
amount: string;
|
|
32
|
+
available: string;
|
|
33
|
+
equity: string;
|
|
34
|
+
confirmDeposit: string;
|
|
35
|
+
switchNetwork: string;
|
|
36
|
+
max: string;
|
|
37
|
+
arrivalTime: string;
|
|
38
|
+
minDeposit: string;
|
|
39
|
+
minDepositParsed: string;
|
|
40
|
+
maxDeposit: string;
|
|
41
|
+
depositTipFor25w: string;
|
|
42
|
+
depositAllTip: string;
|
|
43
|
+
enableSystemProWithToken: string;
|
|
44
|
+
enableTokenDesc: string;
|
|
45
|
+
enableWithToken: string;
|
|
46
|
+
arrivaltimeTooltip1: string;
|
|
47
|
+
arrivaltimeTooltip2: string;
|
|
48
|
+
arrivalEstimated: string;
|
|
49
|
+
availableDesc: string;
|
|
50
|
+
noPrivateKeyWalletWarning: string;
|
|
51
|
+
layerZeroDepositTip: string;
|
|
52
|
+
layerZeroDepositButton: string;
|
|
53
|
+
};
|
|
54
|
+
withdraw: {
|
|
55
|
+
noticeDesc: string;
|
|
56
|
+
crossChainTips: string;
|
|
57
|
+
commonWithdraw: string;
|
|
58
|
+
withdraw: string;
|
|
59
|
+
speed: string;
|
|
60
|
+
confirmWithdraw: string;
|
|
61
|
+
speedNote: string;
|
|
62
|
+
speedNoteSpeed1: string;
|
|
63
|
+
speedNoteSpeed2: string;
|
|
64
|
+
speedNoteSpeed3: string;
|
|
65
|
+
receiverAddress: string;
|
|
66
|
+
fee: string;
|
|
67
|
+
withdrawlAmount: string;
|
|
68
|
+
amountToReceive: string;
|
|
69
|
+
invalidReceiverAddress: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
locale: "en-US" | "ja-JP" | "ru-RU" | "zh-CN" | "zh-TW";
|
|
73
|
+
getTranslationObject: (key: string) => Record<string, any>;
|
|
74
|
+
hasTranslation: (key: string) => boolean;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* 用于局部覆盖语言的 Hook
|
|
78
|
+
* @param localLocale - 局部语言设置
|
|
79
|
+
*/
|
|
80
|
+
export declare const useTranslationWithLocale: (localLocale?: string) => {
|
|
81
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
82
|
+
translations: {
|
|
83
|
+
deposit: {
|
|
84
|
+
title: string;
|
|
85
|
+
chain: string;
|
|
86
|
+
asset: string;
|
|
87
|
+
amount: string;
|
|
88
|
+
available: string;
|
|
89
|
+
equity: string;
|
|
90
|
+
confirmDeposit: string;
|
|
91
|
+
switchNetwork: string;
|
|
92
|
+
max: string;
|
|
93
|
+
arrivalTime: string;
|
|
94
|
+
minDeposit: string;
|
|
95
|
+
minDepositParsed: string;
|
|
96
|
+
maxDeposit: string;
|
|
97
|
+
depositTipFor25w: string;
|
|
98
|
+
depositAllTip: string;
|
|
99
|
+
enableSystemProWithToken: string;
|
|
100
|
+
enableTokenDesc: string;
|
|
101
|
+
enableWithToken: string;
|
|
102
|
+
arrivaltimeTooltip1: string;
|
|
103
|
+
arrivaltimeTooltip2: string;
|
|
104
|
+
arrivalEstimated: string;
|
|
105
|
+
availableDesc: string;
|
|
106
|
+
noPrivateKeyWalletWarning: string;
|
|
107
|
+
layerZeroDepositTip: string;
|
|
108
|
+
layerZeroDepositButton: string;
|
|
109
|
+
};
|
|
110
|
+
withdraw: {
|
|
111
|
+
noticeDesc: string;
|
|
112
|
+
crossChainTips: string;
|
|
113
|
+
commonWithdraw: string;
|
|
114
|
+
withdraw: string;
|
|
115
|
+
speed: string;
|
|
116
|
+
confirmWithdraw: string;
|
|
117
|
+
speedNote: string;
|
|
118
|
+
speedNoteSpeed1: string;
|
|
119
|
+
speedNoteSpeed2: string;
|
|
120
|
+
speedNoteSpeed3: string;
|
|
121
|
+
receiverAddress: string;
|
|
122
|
+
fee: string;
|
|
123
|
+
withdrawlAmount: string;
|
|
124
|
+
amountToReceive: string;
|
|
125
|
+
invalidReceiverAddress: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
locale: string;
|
|
129
|
+
};
|
|
130
|
+
export default useTranslation;
|
|
131
|
+
//# sourceMappingURL=useTranslation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../src/hooks/useTranslation.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,cAAc;aAST,MAAM,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAyCtC,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;0BAyBlC,MAAM,KAAG,OAAO;CA0B9C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,cAAc,MAAM;aAW3C,MAAM,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC1E,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
export { ComponentProvider } from './components/Provider';
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
1
|
+
export { ComponentProvider, useComponentConfig } from './components/Provider';
|
|
2
|
+
export { formatThousands } from './utils';
|
|
3
|
+
export { useDeposit, useWithdraw, useTranslation } from './hooks';
|
|
4
|
+
export type { DepositConfig, WithdrawConfig, ComponentConfig, EventCallbacks, } from './types';
|
|
5
|
+
export { SUPPORTED_LOCALES, DEFAULT_LOCALE, LOCALE_NAMES, type SupportedLocale, type TranslationKeys, } from './locales';
|
|
4
6
|
export { Deposit } from './components/Deposit';
|
|
5
7
|
export { Withdraw } from './components/Withdraw';
|
|
6
|
-
export {
|
|
8
|
+
export { Tooltip } from './components/Tooltip';
|
|
9
|
+
export type { TooltipProps } from './components/Tooltip';
|
|
10
|
+
export { LoadingSpinner, ChromeLoader } from './components/LoadingSpinner';
|
|
11
|
+
export type { LoadingSpinnerProps, LoadingSpinnerSize, LoadingSpinnerColor, } from './components/LoadingSpinner';
|
|
12
|
+
export { DepositManager, openDeposit, closeDeposit, updateDepositOptions, setDepositLoading, isDepositLoading, useDeposit as useDepositManager, } from './components/Deposit/src/DepositManager';
|
|
13
|
+
export { WithdrawManager, openWithdraw, closeWithdraw, updateWithdrawOptions, setWithdrawLoading, isWithdrawLoading, useWithdraw as useWithdrawManager, } from './components/Withdraw/src/WithdrawManager';
|
|
7
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACjE,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1E,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,IAAI,iBAAiB,GAChC,MAAM,yCAAyC,CAAA;AAGhD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,IAAI,kBAAkB,GAClC,MAAM,2CAA2C,CAAA"}
|