@dhedge/trading-widget 0.1.0 → 1.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.
Files changed (41) hide show
  1. package/core-kit/hooks/trading/use-min-receive-text.d.ts +2 -2
  2. package/core-kit/types/state.types.d.ts +0 -1
  3. package/core-kit/types/web3.types.d.ts +2 -2
  4. package/index-024a2b37.cjs +207 -0
  5. package/index-31dc713a.js +37319 -0
  6. package/index.cjs +1 -1
  7. package/index.d.ts +1 -0
  8. package/index.js +51 -51
  9. package/package.json +1 -1
  10. package/{pyth-adapter-79492364.js → pyth-adapter-316fda1d.js} +1 -1
  11. package/{pyth-adapter-9e4e9132.cjs → pyth-adapter-c77b5d4e.cjs} +1 -1
  12. package/style.css +1 -1
  13. package/trading-widget/components/common/button/external-link-button/external-link-button.d.ts +9 -0
  14. package/trading-widget/components/common/index.d.ts +1 -0
  15. package/trading-widget/components/common/layout/overlay/overlay.d.ts +2 -0
  16. package/trading-widget/components/common/skeleton/skeleton.d.ts +1 -1
  17. package/trading-widget/components/common/tab/tab-button/tab-button.d.ts +1 -1
  18. package/trading-widget/components/widget/widget-input/asset-composition-table/asset-composition-table.d.ts +1 -1
  19. package/trading-widget/components/widget/widget-overlay/index.d.ts +3 -0
  20. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/network-header/network-header.d.ts +7 -0
  21. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.d.ts +3 -0
  22. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +31 -0
  23. package/trading-widget/components/widget/widget-overlay/token-select-overlay/multi-token-select-item/multi-token-select-item.d.ts +2 -0
  24. package/trading-widget/components/widget/widget-overlay/token-select-overlay/multi-token-select-item/multi-token-select-item.hooks.d.ts +8 -0
  25. package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-item/token-select-item.d.ts +2 -0
  26. package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-item/token-select-item.hooks.d.ts +10 -0
  27. package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-overlay.d.ts +3 -0
  28. package/trading-widget/components/widget/widget-overlay/token-select-overlay/token-select-overlay.hooks.d.ts +12 -0
  29. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.d.ts +3 -0
  30. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +9 -0
  31. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/trading-summary.d.ts +2 -0
  32. package/trading-widget/components/widget/widget-settings/widget-settings.d.ts +1 -1
  33. package/trading-widget/providers/config-provider/config-provider.types.d.ts +7 -2
  34. package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +170 -3
  35. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +8 -0
  36. package/trading-widget/types/overlay.types.d.ts +3 -0
  37. package/BPGFTGZB-28be5833.js +0 -9284
  38. package/BPGFTGZB-95339fd0.cjs +0 -1101
  39. package/core-kit/providers/wagmi-provider.d.ts +0 -2
  40. package/index-33af12bb.cjs +0 -217
  41. package/index-d3dc3d87.js +0 -39097
@@ -0,0 +1,2 @@
1
+ import type { FC } from 'react';
2
+ export declare const TradingSummary: FC;
@@ -1,5 +1,5 @@
1
- import type { TradingPanelType } from 'core-kit/types';
2
1
  import type { FC } from 'react';
2
+ import type { TradingPanelType } from 'core-kit/types';
3
3
  interface WidgetSettingsProps {
4
4
  tradingType: TradingPanelType;
5
5
  }
@@ -12,6 +12,11 @@ export interface ConfigProviderParams {
12
12
  defaultPrecision: number;
13
13
  stakingChainId: ChainId;
14
14
  termsOfUseAccepted: boolean;
15
+ standalone: boolean;
16
+ chainConfig: Partial<Record<ChainId, {
17
+ name: string;
18
+ iconPath: string;
19
+ }>>;
15
20
  }
16
21
  export interface ConfigProviderActions {
17
22
  onConnect: () => void;
@@ -19,8 +24,8 @@ export interface ConfigProviderActions {
19
24
  }
20
25
  export interface ConfigProviderProps {
21
26
  config?: {
22
- params: Partial<ConfigProviderParams>;
23
- actions: Partial<ConfigProviderActions>;
27
+ params?: Partial<ConfigProviderParams>;
28
+ actions?: Partial<ConfigProviderActions>;
24
29
  };
25
30
  }
26
31
  export type ConfigProviderState = {
@@ -17,6 +17,7 @@ export interface ThemeProviderConfigProps {
17
17
  colorTextLoading?: string;
18
18
  colorTextError?: string;
19
19
  colorTextWarning?: string;
20
+ colorIcon?: string;
20
21
  };
21
22
  size?: {
22
23
  gap?: string;
@@ -29,6 +30,12 @@ export interface ThemeProviderConfigProps {
29
30
  lineHeightSm?: string;
30
31
  fontSizeLg?: string;
31
32
  lineHeightLg?: string;
33
+ iconSize?: string;
34
+ iconSizeSm?: string;
35
+ iconSecondarySize?: string;
36
+ iconSecondarySizeSm?: string;
37
+ labelFontSize?: string;
38
+ labelLineHeight?: string;
32
39
  };
33
40
  style?: {
34
41
  radiusPrimary?: string;
@@ -41,9 +48,169 @@ export interface ThemeProviderConfigProps {
41
48
  };
42
49
  };
43
50
  component?: {
44
- color?: object;
45
- size?: object;
46
- style?: object;
51
+ popup?: {
52
+ color?: {
53
+ colorText?: string;
54
+ colorBg?: string;
55
+ colorBorder?: string;
56
+ };
57
+ size?: {
58
+ fontSize?: string;
59
+ };
60
+ style?: object;
61
+ };
62
+ popupList?: {
63
+ color?: {
64
+ itemBgEven?: string;
65
+ itemBgOdd?: string;
66
+ headerBg?: string;
67
+ };
68
+ size?: object;
69
+ style?: object;
70
+ };
71
+ tabGroup?: {
72
+ color?: object;
73
+ size?: {
74
+ px?: string;
75
+ };
76
+ style?: object;
77
+ };
78
+ tabContent?: {
79
+ color?: object;
80
+ size?: {
81
+ pt?: string;
82
+ px?: string;
83
+ pb?: string;
84
+ gap?: string;
85
+ };
86
+ style?: object;
87
+ };
88
+ tab?: {
89
+ color?: {
90
+ colorBg?: string;
91
+ colorText?: string;
92
+ selectColorText?: string;
93
+ colorTextHover?: string;
94
+ };
95
+ size?: {
96
+ px?: string;
97
+ py?: string;
98
+ fontSize?: string;
99
+ };
100
+ style?: {
101
+ fontWeight?: string;
102
+ lineHeight?: string;
103
+ };
104
+ };
105
+ balance?: {
106
+ color?: {
107
+ colorText?: string;
108
+ priceColorText?: string;
109
+ };
110
+ size?: {
111
+ px?: string;
112
+ gap?: string;
113
+ fontSize?: string;
114
+ lineHeight?: string;
115
+ priceFontSize?: string;
116
+ priceLineHeight?: string;
117
+ };
118
+ style?: object;
119
+ };
120
+ inputGroup?: {
121
+ color?: object;
122
+ size?: {
123
+ px?: string;
124
+ gap?: string;
125
+ };
126
+ style?: object;
127
+ };
128
+ input?: {
129
+ color?: {
130
+ textColor?: string;
131
+ loadingTextColor?: string;
132
+ bgColor?: string;
133
+ bgColorFocus?: string;
134
+ borderColor?: string;
135
+ borderColorFocus?: string;
136
+ placeholderColor?: string;
137
+ buttonBgColor?: string;
138
+ buttonBorderColor?: string;
139
+ buttonTextColor?: string;
140
+ };
141
+ size?: {
142
+ px?: string;
143
+ py?: string;
144
+ gap?: string;
145
+ priceGap?: string;
146
+ iconSize?: string;
147
+ iconSizeSm?: string;
148
+ labelFontSize?: string;
149
+ labelLineHeight?: string;
150
+ fontSize?: string;
151
+ lineHeight?: string;
152
+ fontSizeLg?: string;
153
+ lineHeightLg?: string;
154
+ tokenFontSize?: string;
155
+ tokenLineHeight?: string;
156
+ tokenFontSizeSm?: string;
157
+ tokenLineHeightSm?: string;
158
+ buttonPx?: string;
159
+ buttonPy?: string;
160
+ buttonFontSize?: string;
161
+ buttonLineHeight?: string;
162
+ };
163
+ style?: {
164
+ radius?: string;
165
+ labelFontWeight?: string;
166
+ fontWeight?: string;
167
+ tokenFontWeight?: string;
168
+ buttonRadius?: string;
169
+ };
170
+ };
171
+ actionButton?: {
172
+ color?: {
173
+ colorBgFrom?: string;
174
+ colorBgTo?: string;
175
+ colorBgFromHover?: string;
176
+ colorBgToHover?: string;
177
+ colorBorder?: string;
178
+ colorText?: string;
179
+ outlineColorBorder?: string;
180
+ outlineColorBorderHover?: string;
181
+ outlineColorText?: string;
182
+ };
183
+ size?: {
184
+ borderWidth?: string;
185
+ };
186
+ style?: object;
187
+ };
188
+ meta?: {
189
+ color?: {
190
+ linkTextColor?: string;
191
+ panelBgHover?: string;
192
+ };
193
+ size?: {
194
+ gap?: string;
195
+ px?: string;
196
+ };
197
+ style?: object;
198
+ };
199
+ tooltip?: {
200
+ color?: {
201
+ colorBg?: string;
202
+ };
203
+ size?: object;
204
+ style?: object;
205
+ };
206
+ switch?: {
207
+ color?: {
208
+ colorBgChecked?: string;
209
+ colorBg?: string;
210
+ };
211
+ size?: object;
212
+ style?: object;
213
+ };
47
214
  };
48
215
  }
49
216
  export interface ThemeProviderProps {
@@ -65,6 +65,14 @@ export type TranslationMap = {
65
65
  highSlippageQuoteDiff: string;
66
66
  highSlippageRisk: string;
67
67
  confirm: string;
68
+ selectToken: string;
69
+ sendingOrderToWallet: string;
70
+ settingUpTx: string;
71
+ updateSynthetixOracles: string;
72
+ approveSpending: string;
73
+ pay: string;
74
+ multiAssetFractions: string;
75
+ explorer: string;
68
76
  [key: string]: string;
69
77
  };
70
78
  export interface TranslationProviderProps {
@@ -2,6 +2,9 @@ export declare const OVERLAY: {
2
2
  readonly TERMS_OF_USE: "TERMS_OF_USE";
3
3
  readonly HIGH_SLIPPAGE: "HIGH_SLIPPAGE";
4
4
  readonly FMED_WITHDRAWAL: "FMED_WITHDRAWAL";
5
+ readonly TOKEN_SELECT: "TOKEN_SELECT";
6
+ readonly POOL_SELECT: "POOL_SELECT";
7
+ readonly TRADING: "TRADING";
5
8
  };
6
9
  export type OverlayType = (typeof OVERLAY)[keyof typeof OVERLAY];
7
10
  export interface OverlayProps {