@dhedge/trading-widget 4.0.0-canary.8 → 4.0.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.
- package/index.d.ts +6 -2
- package/package.json +1 -1
- package/theme/colors.d.ts +231 -3
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { TradingWidget } from './trading-widget/components';
|
|
2
2
|
export type { ProvidersProps } from './trading-widget/providers';
|
|
3
|
-
export { TradingPanelProvider } from './core-kit';
|
|
3
|
+
export { TradingPanelProvider } from './core-kit/index';
|
|
4
4
|
export { erc20Abi, AaveLendingPoolAbi, PoolFactoryAbi, PoolLogicAbi, PoolManagerLogicAbi, RewardDistributionAbi, EasySwapperV2Abi, } from './core-kit/abi';
|
|
5
5
|
export type { GmxMarketAsset } from './core-kit/const';
|
|
6
6
|
export { USDC_ARBITRUM, arbitrum, base, optimism, polygon, SETH_OPTIMISM, MULTI_ASSET_TOKEN, PAXG_POLYGON, USDC_OPTIMISM, USDC_POLYGON, MANAGER_FEE_DENOMINATOR, LINK_OPTIMISM, SIMULATION_TIMEOUT_ERROR, MAX_GAS_LIMIT_MAP, GAS_LIMIT_BUFFER_COEFF, GAS_ESTIMATION_ERROR, FACTORY_ADDRESS_OPTIMISM, FACTORY_ADDRESS_POLYGON, FACTORY_ADDRESS_ARBITRUM, FACTORY_ADDRESS_BASE, DEFAULT_SIMULATION_ERROR, DEFAULT_ERROR_MESSAGE, EMPTY_POOL_CONFIG, DEFAULT_DEPOSIT_SLIPPAGE, DEFAULT_WITHDRAW_SLIPPAGE, DEFAULT_MULTI_ASSET_WITHDRAW_METHOD, DEFAULT_DEPOSIT_SLIPPAGE_SCALE, DEFAULT_DEPOSIT_METHOD, DEFAULT_PROMISE_TIMEOUT_MS, DEFAULT_LOCK_TIME, DAI_POLYGON, DAI_OPTIMISM, BRIDGED_USDC_POLYGON, BRIDGED_USDC_OPTIMISM, BRIDGED_USDC_ARBITRUM, CURRENCY_SYMBOL_MAP, contractsAddressesMap, contractsAbisMap, CBETH_BASE, CBBTC_BASE, RETH_BASE, BRIDGED_TOKENS_SYMBOLS, CHAIN_NATIVE_TOKENS, ALCHEMY_RPC_URL_MAP, CHAIN_MAP, AAVE_LENDING_POOL_V3_ADDRESS_POLYGON, AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM, AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM, AAVE_LENDING_POOL_V2_ADDRESS_POLYGON, MaxUint256, DEFAULT_PRECISION, AddressZero, DEFAULT_POLLING_INTERVAL, SHORTEN_POLLING_INTERVAL, NATIVE_TOKEN_DEPOSIT_GAS_LIMIT, SUSD_OPTIMISM, PYTH_API_LINK, REWARD_DISTRIBUTION_ADDRESS_OPTIMISM, USDC_BASE, USDCBC_BASE, USDT_OPTIMISM, USDT_POLYGON, WBTC_OPTIMISM, WBTC_POLYGON, WETH_ARBITRUM, WETH_BASE, WETH_OPTIMISM, WETH_POLYGON, WETH_BY_CHAIN_ID, WBTC_BY_CHAIN_ID, WPOL_POLYGON, WBTC_ARBITRUM, TRADING_LOG_EVENT_PARAM, TRADING_PANEL_LOG_EVENT, TBTC_OPTIMISM, TBTC_ARBITRUM, TBTC_BASE, TBTC_POLYGON, WSTETH_ARBITRUM, WSTETH_BASE, WSTETH_OPTIMISM, EASY_SWAPPER_V2_ADDRESS_OPTIMISM, EASY_SWAPPER_V2_ADDRESS_BASE, EASY_SWAPPER_V2_ADDRESS_ARBITRUM, EASY_SWAPPER_V2_ADDRESS_POLYGON, AAVE_LENDING_POOL_V3_ADDRESS_BASE, USDT_ARBITRUM, WSOL_ARBITRUM, GMX_MARKET_ASSETS, GMX_MARKET_ASSETS_MAP, WETH_MAINNET, USDC_MAINNET, USDT_MAINNET, WBTC_MAINNET, } from './core-kit/const';
|
|
@@ -17,4 +17,8 @@ export { useIsCompleteWithdrawStep, useCompleteWithdrawSwapData, useCompleteWith
|
|
|
17
17
|
export { useIsInsufficientBalance, useUserTokenBalance, useIsDhedgeVaultConnected, useFlatmoneyPointsUserBalances, } from './core-kit/hooks/user';
|
|
18
18
|
export { useDebounce, useBrowserStorage } from './core-kit/hooks/utils';
|
|
19
19
|
export { useNetwork, useInvalidateTradingQueries, useInvalidateOnBlock, useBlockNumber, useBalance, useAccount, useDisconnect, useConnect, useIsWalletConnected, useWalletClient, usePublicClient, useContractFunction, useContractReadErrorLogging, useContractReadsErrorLogging, useGasPrice, useReadContract, useReadContracts, useStaticCallQuery, useWriteContract, useTokenAllowance, useSendTransaction, useWaitForTransactionReceipt, useIsBatchContractWritesSupported, } from './core-kit/hooks/web3';
|
|
20
|
-
export {
|
|
20
|
+
export type { ComponentProviderProps, ImageProps, ButtonProps, } from './trading-widget/providers/component-provider';
|
|
21
|
+
export type { ConfigProviderParams, ConfigProviderActions, ConfigProviderProps, } from './trading-widget/providers/config-provider';
|
|
22
|
+
export type { ThemeProviderConfigProps, ThemeProviderProps, } from './trading-widget/providers/theme-provider';
|
|
23
|
+
export type { TranslationMap, TranslationProviderProps, } from './trading-widget/providers/translation-provider';
|
|
24
|
+
export { LimitOrderModal, useUserLimitOrder } from './limit-orders/index';
|
package/package.json
CHANGED
package/theme/colors.d.ts
CHANGED
|
@@ -1,3 +1,231 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export namespace COLORS {
|
|
2
|
+
const SUCCESS: string;
|
|
3
|
+
const ERROR: string;
|
|
4
|
+
const WARNING: string;
|
|
5
|
+
const INFO: string;
|
|
6
|
+
namespace WHITE {
|
|
7
|
+
const DEFAULT: string;
|
|
8
|
+
}
|
|
9
|
+
const DARK: {
|
|
10
|
+
DEFAULT: string;
|
|
11
|
+
400: string;
|
|
12
|
+
600: string;
|
|
13
|
+
700: string;
|
|
14
|
+
800: string;
|
|
15
|
+
900: string;
|
|
16
|
+
};
|
|
17
|
+
const RED: {
|
|
18
|
+
DEFAULT: string;
|
|
19
|
+
500: string;
|
|
20
|
+
600: string;
|
|
21
|
+
700: string;
|
|
22
|
+
};
|
|
23
|
+
const GRAY: {
|
|
24
|
+
DEFAULT: string;
|
|
25
|
+
300: string;
|
|
26
|
+
400: string;
|
|
27
|
+
500: string;
|
|
28
|
+
600: string;
|
|
29
|
+
700: string;
|
|
30
|
+
800: string;
|
|
31
|
+
};
|
|
32
|
+
const GREEN: {
|
|
33
|
+
DEFAULT: string;
|
|
34
|
+
600: string;
|
|
35
|
+
700: string;
|
|
36
|
+
};
|
|
37
|
+
namespace BLUE {
|
|
38
|
+
const DEFAULT_1: string;
|
|
39
|
+
export { DEFAULT_1 as DEFAULT };
|
|
40
|
+
export const dark: string;
|
|
41
|
+
}
|
|
42
|
+
const AMBER: {
|
|
43
|
+
400: string;
|
|
44
|
+
};
|
|
45
|
+
namespace NETWORK {
|
|
46
|
+
const polygon: string;
|
|
47
|
+
const optimism: string;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export namespace BASE_COLORS {
|
|
51
|
+
export const BLACK: {
|
|
52
|
+
10: string;
|
|
53
|
+
20: string;
|
|
54
|
+
30: string;
|
|
55
|
+
};
|
|
56
|
+
const WHITE_1: {
|
|
57
|
+
2: string;
|
|
58
|
+
5: string;
|
|
59
|
+
10: string;
|
|
60
|
+
20: string;
|
|
61
|
+
30: string;
|
|
62
|
+
40: string;
|
|
63
|
+
50: string;
|
|
64
|
+
60: string;
|
|
65
|
+
70: string;
|
|
66
|
+
80: string;
|
|
67
|
+
90: string;
|
|
68
|
+
};
|
|
69
|
+
export { WHITE_1 as WHITE };
|
|
70
|
+
const GRAY_1: {
|
|
71
|
+
DEFAULT: string;
|
|
72
|
+
50: string;
|
|
73
|
+
100: string;
|
|
74
|
+
200: string;
|
|
75
|
+
300: string;
|
|
76
|
+
400: string;
|
|
77
|
+
500: string;
|
|
78
|
+
600: string;
|
|
79
|
+
700: string;
|
|
80
|
+
800: string;
|
|
81
|
+
900: string;
|
|
82
|
+
};
|
|
83
|
+
export { GRAY_1 as GRAY };
|
|
84
|
+
export const PRIMARY: {
|
|
85
|
+
50: string;
|
|
86
|
+
100: string;
|
|
87
|
+
200: string;
|
|
88
|
+
300: string;
|
|
89
|
+
400: string;
|
|
90
|
+
500: string;
|
|
91
|
+
600: string;
|
|
92
|
+
700: string;
|
|
93
|
+
800: string;
|
|
94
|
+
900: string;
|
|
95
|
+
};
|
|
96
|
+
const ERROR_1: {
|
|
97
|
+
50: string;
|
|
98
|
+
100: string;
|
|
99
|
+
200: string;
|
|
100
|
+
300: string;
|
|
101
|
+
400: string;
|
|
102
|
+
500: string;
|
|
103
|
+
600: string;
|
|
104
|
+
700: string;
|
|
105
|
+
800: string;
|
|
106
|
+
900: string;
|
|
107
|
+
};
|
|
108
|
+
export { ERROR_1 as ERROR };
|
|
109
|
+
const SUCCESS_1: {
|
|
110
|
+
50: string;
|
|
111
|
+
100: string;
|
|
112
|
+
200: string;
|
|
113
|
+
300: string;
|
|
114
|
+
400: string;
|
|
115
|
+
500: string;
|
|
116
|
+
600: string;
|
|
117
|
+
700: string;
|
|
118
|
+
800: string;
|
|
119
|
+
900: string;
|
|
120
|
+
};
|
|
121
|
+
export { SUCCESS_1 as SUCCESS };
|
|
122
|
+
const WARNING_1: {
|
|
123
|
+
50: string;
|
|
124
|
+
100: string;
|
|
125
|
+
200: string;
|
|
126
|
+
300: string;
|
|
127
|
+
400: string;
|
|
128
|
+
500: string;
|
|
129
|
+
600: string;
|
|
130
|
+
700: string;
|
|
131
|
+
800: string;
|
|
132
|
+
900: string;
|
|
133
|
+
};
|
|
134
|
+
export { WARNING_1 as WARNING };
|
|
135
|
+
}
|
|
136
|
+
export namespace TOROS {
|
|
137
|
+
namespace bg {
|
|
138
|
+
const primary: string;
|
|
139
|
+
const white: string;
|
|
140
|
+
const black: string;
|
|
141
|
+
const surface: string;
|
|
142
|
+
}
|
|
143
|
+
namespace shadow {
|
|
144
|
+
const primary_1: string;
|
|
145
|
+
export { primary_1 as primary };
|
|
146
|
+
}
|
|
147
|
+
const text: {
|
|
148
|
+
disabled: string;
|
|
149
|
+
primary: string;
|
|
150
|
+
'primary-hover': string;
|
|
151
|
+
secondary: string;
|
|
152
|
+
'secondary-hover': string;
|
|
153
|
+
success: string;
|
|
154
|
+
'success-hover': string;
|
|
155
|
+
error: string;
|
|
156
|
+
'error-hover': string;
|
|
157
|
+
warning: string;
|
|
158
|
+
'warning-hover': string;
|
|
159
|
+
link: string;
|
|
160
|
+
'link-hover': string;
|
|
161
|
+
};
|
|
162
|
+
namespace button {
|
|
163
|
+
const primary_2: {
|
|
164
|
+
text: string;
|
|
165
|
+
'text-hover': string;
|
|
166
|
+
bg: string;
|
|
167
|
+
'bg-hover': string;
|
|
168
|
+
border: string;
|
|
169
|
+
'border-hover': string;
|
|
170
|
+
};
|
|
171
|
+
export { primary_2 as primary };
|
|
172
|
+
export const secondary: {
|
|
173
|
+
text: string;
|
|
174
|
+
'text-hover': string;
|
|
175
|
+
bg: string;
|
|
176
|
+
'bg-hover': string;
|
|
177
|
+
border: string;
|
|
178
|
+
'border-hover': string;
|
|
179
|
+
};
|
|
180
|
+
export const success: {
|
|
181
|
+
text: string;
|
|
182
|
+
'text-hover': string;
|
|
183
|
+
bg: string;
|
|
184
|
+
'bg-hover': string;
|
|
185
|
+
border: string;
|
|
186
|
+
'border-hover': string;
|
|
187
|
+
};
|
|
188
|
+
export const error: {
|
|
189
|
+
text: string;
|
|
190
|
+
'text-hover': string;
|
|
191
|
+
bg: string;
|
|
192
|
+
'bg-hover': string;
|
|
193
|
+
border: string;
|
|
194
|
+
'border-hover': string;
|
|
195
|
+
};
|
|
196
|
+
export const warning: {
|
|
197
|
+
text: string;
|
|
198
|
+
'text-hover': string;
|
|
199
|
+
bg: string;
|
|
200
|
+
'bg-hover': string;
|
|
201
|
+
border: string;
|
|
202
|
+
'border-hover': string;
|
|
203
|
+
};
|
|
204
|
+
export namespace disabled {
|
|
205
|
+
const text_1: string;
|
|
206
|
+
export { text_1 as text };
|
|
207
|
+
export const border: string;
|
|
208
|
+
const bg_1: string;
|
|
209
|
+
export { bg_1 as bg };
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const card: {
|
|
213
|
+
bg: string;
|
|
214
|
+
'bg-hover': string;
|
|
215
|
+
'bg-disabled': string;
|
|
216
|
+
border: string;
|
|
217
|
+
};
|
|
218
|
+
const chip: {
|
|
219
|
+
text: string;
|
|
220
|
+
'text-hover': string;
|
|
221
|
+
bg: string;
|
|
222
|
+
'bg-hover': string;
|
|
223
|
+
border: string;
|
|
224
|
+
'border-hover': string;
|
|
225
|
+
};
|
|
226
|
+
const input: {
|
|
227
|
+
bg: string;
|
|
228
|
+
'bg-focus': string;
|
|
229
|
+
border: string;
|
|
230
|
+
};
|
|
231
|
+
}
|