@orderly.network/trading 2.0.0 → 2.0.1-alpha.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/dist/index.d.mts CHANGED
@@ -1,36 +1,13 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as _orderly_network_types from '@orderly.network/types';
3
2
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
4
- import { PositionsProps } from '@orderly.network/ui-positions';
5
3
  import * as react from 'react';
6
- import { ReactNode, FC, PropsWithChildren } from 'react';
4
+ import react__default, { ReactNode, FC, PropsWithChildren } from 'react';
5
+ import * as _orderly_network_ui_share from '@orderly.network/ui-share';
6
+ import { SharePnLConfig, SharePnLParams } from '@orderly.network/ui-share';
7
+ import { PositionsProps } from '@orderly.network/ui-positions';
8
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
9
  import * as _orderly_network_hooks from '@orderly.network/hooks';
8
-
9
- declare enum DataListTabType {
10
- positions = "Positions",
11
- pending = "Pending",
12
- tp_sl = "TP/SL",
13
- filled = "Filled",
14
- orderHistory = "Order history"
15
- }
16
- declare const useDataListScript: (props: {
17
- current?: DataListTabType;
18
- config: PositionsProps & {
19
- symbol?: string;
20
- };
21
- }) => {
22
- current: DataListTabType | undefined;
23
- config: PositionsProps & {
24
- symbol?: string | undefined;
25
- };
26
- unPnlPriceBasis: any;
27
- setUnPnlPriceBasic: (value: string) => void;
28
- pnlNotionalDecimalPrecision: any;
29
- setPnlNotionalDecimalPrecision: (value: number) => void;
30
- showAllSymbol: any;
31
- setShowAllSymbol: (value: boolean) => void;
32
- };
33
- type DataListState = ReturnType<typeof useDataListScript>;
10
+ import { SplitProps } from '@uiw/react-split';
34
11
 
35
12
  type layoutInfo = {
36
13
  width?: number;
@@ -110,7 +87,7 @@ type BasicSymbolInfo = {
110
87
  base: string;
111
88
  quote: string;
112
89
  };
113
- interface TradingPageState extends TradingPageV2Props {
90
+ interface TradingPageState extends TradingPageProps {
114
91
  symbolInfo: {
115
92
  base_dp: number;
116
93
  quote_dp: number;
@@ -119,6 +96,8 @@ interface TradingPageState extends TradingPageV2Props {
119
96
  quote: string;
120
97
  symbol: string;
121
98
  };
99
+ /** default is `(max-width: 768px)`*/
100
+ tabletMediaQuery: string;
122
101
  }
123
102
  interface TradingViewConfigInterface {
124
103
  scriptSRC?: string;
@@ -140,15 +119,13 @@ interface ColorConfigInterface {
140
119
  font?: string;
141
120
  closeIcon?: string;
142
121
  }
143
- type ReferralProps = {
122
+ type ReferralPropsV2 = {
144
123
  saveRefCode?: boolean;
145
124
  onClickReferral?: () => void;
146
125
  onBoundRefCode?: (success: boolean, error: any) => void;
147
- refLink?: string;
148
- slogan?: string;
149
126
  };
150
- type TradingRewardProps = {
151
- onClickTradingReward?: () => void;
127
+ type TradingRewardsProps = {
128
+ onClickTradingRewards?: () => void;
152
129
  };
153
130
  type BaseTradingPageProps = {
154
131
  symbol: string;
@@ -158,25 +135,52 @@ type BaseTradingPageProps = {
158
135
  overrideFeatures?: Record<TradingFeatures, ReactNode>;
159
136
  };
160
137
  type TradingPageProps = BaseTradingPageProps & {
161
- shareOptions: ShareOptions;
162
- referral: ReferralProps;
163
- tradingReward: TradingRewardProps;
164
- };
165
- type TradingPageV2Props = BaseTradingPageProps & {
166
- dataList: {
167
- current?: DataListTabType;
168
- config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
169
- };
138
+ sharePnLConfig?: SharePnLConfig & Partial<Omit<SharePnLParams, "position" | "refCode" | "leverage">>;
139
+ /** default is `(max-width: 768px)`*/
140
+ tabletMediaQuery?: string;
141
+ referral?: ReferralPropsV2;
142
+ tradingRewards?: TradingRewardsProps;
143
+ bottomSheetLeading?: React.ReactNode | string;
170
144
  };
171
145
 
172
- declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
146
+ declare enum DataListTabType {
147
+ positions = "Positions",
148
+ pending = "Pending",
149
+ tp_sl = "TP/SL",
150
+ filled = "Filled",
151
+ orderHistory = "Order history"
152
+ }
153
+ declare const useDataListScript: (props: {
154
+ current?: DataListTabType;
155
+ tabletMediaQuery: string;
156
+ } & PositionsProps) => {
157
+ positionCount: number;
158
+ pendingOrderCount: number;
159
+ tpSlOrderCount: number;
160
+ onSymbolChange: ((symbol: _orderly_network_types.API.Symbol) => void) | undefined;
161
+ unPnlPriceBasis: any;
162
+ setUnPnlPriceBasic: (value: string) => void;
163
+ pnlNotionalDecimalPrecision: any;
164
+ setPnlNotionalDecimalPrecision: (value: number) => void;
165
+ showAllSymbol: any;
166
+ setShowAllSymbol: (value: boolean) => void;
167
+ hideAssets: any;
168
+ setHideAssets: (value: boolean) => void;
169
+ current: DataListTabType | undefined;
170
+ tabletMediaQuery: string;
171
+ sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
172
+ symbol: string | undefined;
173
+ calcMode: any;
174
+ includedPendingOrder: boolean | undefined;
175
+ };
176
+ type DataListState = ReturnType<typeof useDataListScript>;
173
177
 
174
178
  declare const DataList: FC<DataListState>;
175
179
 
176
180
  declare const DataListWidget: (props: {
177
181
  current?: DataListTabType;
178
- config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
179
- }) => react_jsx_runtime.JSX.Element;
182
+ tabletMediaQuery: string;
183
+ } & PositionsProps) => react_jsx_runtime.JSX.Element;
180
184
 
181
185
  declare const useLastTradesScript: (symbol: string) => {
182
186
  base: any;
@@ -189,13 +193,31 @@ declare const useLastTradesScript: (symbol: string) => {
189
193
  type LastTradesState = ReturnType<typeof useLastTradesScript>;
190
194
 
191
195
  declare const LastTrades: FC<LastTradesState & {
192
- className?: string;
193
- style?: React.CSSProperties;
196
+ classNames?: {
197
+ root?: string;
198
+ list?: string;
199
+ listHeader?: string;
200
+ listItem?: {
201
+ left?: string;
202
+ mid?: string;
203
+ right?: string;
204
+ };
205
+ };
206
+ style?: react__default.CSSProperties;
194
207
  }>;
195
208
 
196
209
  declare const LastTradesWidget: (props: {
197
210
  symbol: string;
198
- className?: string;
211
+ classNames?: {
212
+ root?: string;
213
+ list?: string;
214
+ listHeader?: string;
215
+ listItem?: {
216
+ left?: string;
217
+ mid?: string;
218
+ right?: string;
219
+ };
220
+ };
199
221
  style?: React.CSSProperties;
200
222
  }) => react_jsx_runtime.JSX.Element;
201
223
 
@@ -207,11 +229,11 @@ declare const useAssetViewScript: () => {
207
229
  toggleVisible: () => void;
208
230
  networkId: NetworkId;
209
231
  isFirstTimeDeposit: boolean;
210
- totalValue: number;
232
+ totalValue: number | undefined;
211
233
  status: AccountStatusEnum;
212
- freeCollateral: number;
213
- marginRatioVal: number;
214
- renderMMR: string;
234
+ freeCollateral: number | undefined;
235
+ marginRatioVal: number | undefined;
236
+ renderMMR: number | undefined;
215
237
  isConnected: boolean;
216
238
  };
217
239
  type AssetViewState = ReturnType<typeof useAssetViewScript>;
@@ -222,6 +244,7 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
222
244
 
223
245
  declare const useOrderBookScript: (props: {
224
246
  symbol: string;
247
+ tabletMediaQuery?: string;
225
248
  height?: number;
226
249
  }) => {
227
250
  level: number;
@@ -245,16 +268,18 @@ type OrderBookState = ReturnType<typeof useOrderBookScript>;
245
268
 
246
269
  declare const OrderBook: FC<OrderBookState & {
247
270
  className?: string;
271
+ tabletMediaQuery: string;
248
272
  }>;
249
273
 
250
274
  declare const OrderBookWidget: (props: {
251
275
  className?: string;
252
276
  symbol: string;
253
277
  height?: number;
278
+ tabletMediaQuery: string;
254
279
  }) => react_jsx_runtime.JSX.Element;
255
280
 
256
281
  declare const useRiskRateScript: () => {
257
- riskRate: string;
282
+ riskRate: string | null;
258
283
  riskRateColor: {
259
284
  isHigh: boolean;
260
285
  isMedium: boolean;
@@ -262,7 +287,7 @@ declare const useRiskRateScript: () => {
262
287
  isDefault: boolean;
263
288
  };
264
289
  isConnected: boolean;
265
- currentLeverage: number;
290
+ currentLeverage: number | null;
266
291
  maxLeverage: any;
267
292
  };
268
293
  type RiskRateState = ReturnType<typeof useRiskRateScript>;
@@ -283,21 +308,82 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
283
308
  };
284
309
  type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
285
310
 
286
- declare const OrderBookAndTrades: FC<OrderBookAndTradesState>;
311
+ declare const OrderBookAndTrades: FC<OrderBookAndTradesState & {
312
+ tabletMediaQuery: string;
313
+ }>;
287
314
 
288
315
  declare const OrderBookAndTradesWidget: (props: {
289
316
  symbol: string;
317
+ tabletMediaQuery: string;
290
318
  }) => react_jsx_runtime.JSX.Element;
291
319
 
292
- declare const useTradingV2Script: () => TradingPageState;
293
- type TradingV2State = ReturnType<typeof useTradingV2Script>;
320
+ type SplitLayoutProps = PropsWithChildren<SplitProps> & {
321
+ onSizeChange?: (size: string) => void;
322
+ };
323
+ declare const SplitLayout: react__default.FC<SplitLayoutProps>;
294
324
 
295
- declare const TradingV2: FC<TradingV2State>;
325
+ declare const useBottomNavBarScript: () => {
326
+ wrongNetwork: boolean;
327
+ };
328
+ type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
296
329
 
297
- declare const TradingV2Widget: () => react_jsx_runtime.JSX.Element;
330
+ declare const BottomNavBar: FC<BottomNavBarState>;
298
331
 
299
- declare const TradingPageV2: (props: TradingPageV2Props) => react_jsx_runtime.JSX.Element;
332
+ declare const BottomNavBarWidget: () => react_jsx_runtime.JSX.Element;
300
333
 
301
- declare const TradingPageProvider: (props: PropsWithChildren<TradingPageV2Props>) => react_jsx_runtime.JSX.Element;
334
+ type TradingState = ReturnType<typeof useTradingScript>;
335
+ declare const useTradingScript: () => TradingPageState & {
336
+ collapsed: any;
337
+ onCollapse: (collapsed: boolean) => void;
338
+ layout: any;
339
+ onLayout: (value: string) => void;
340
+ orderBookSplitSize: string | undefined;
341
+ setOrderbookSplitSize: (size: string) => void;
342
+ dataListSplitSize: string | undefined;
343
+ setDataListSplitSize: (size: string) => void;
344
+ mainSplitSize: string | undefined;
345
+ setMainSplitSize: (size: string) => void;
346
+ isMedium: boolean;
347
+ animating: boolean;
348
+ setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
349
+ positions: number[];
350
+ updatePositions: (currentIdx: number, targetIdx: number) => void;
351
+ canTrading: boolean;
352
+ showPositionIcon: boolean;
353
+ openMarketsSheet: boolean;
354
+ onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
355
+ };
356
+
357
+ declare const Trading: FC<TradingState>;
358
+
359
+ declare const TradingWidget: () => react_jsx_runtime.JSX.Element;
360
+
361
+ declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
362
+
363
+ declare const TradingPageContext: react.Context<TradingPageState>;
364
+ declare const useTradingPageContext: () => TradingPageState;
365
+ declare const TradingPageProvider: (props: PropsWithChildren<TradingPageProps>) => react_jsx_runtime.JSX.Element;
366
+
367
+ declare const useTradingLocalStorage: (props?: {
368
+ pnlNotionalDecimalPrecision?: number;
369
+ }) => {
370
+ unPnlPriceBasis: any;
371
+ setUnPnlPriceBasic: (value: string) => void;
372
+ pnlNotionalDecimalPrecision: any;
373
+ setPnlNotionalDecimalPrecision: (value: number) => void;
374
+ showAllSymbol: any;
375
+ setShowAllSymbol: (value: boolean) => void;
376
+ hideAssets: any;
377
+ setHideAssets: (value: boolean) => void;
378
+ };
379
+
380
+ declare const usePositionsCount: (symbol?: string) => {
381
+ positionCount: number;
382
+ };
383
+
384
+ declare const usePendingOrderCount: (symbol?: string) => {
385
+ pendingOrderCount: number;
386
+ tpSlOrderCount: number;
387
+ };
302
388
 
303
- export { AssetView, AssetViewWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, TradingPage, TradingPageProvider, TradingPageV2, TradingV2, TradingV2Widget, useOrderBookAndTradesScript, useOrderBookScript };
389
+ export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, TradingWidget, useBottomNavBarScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePositionsCount, useTradingLocalStorage, useTradingPageContext };
package/dist/index.d.ts CHANGED
@@ -1,36 +1,13 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as _orderly_network_types from '@orderly.network/types';
3
2
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
4
- import { PositionsProps } from '@orderly.network/ui-positions';
5
3
  import * as react from 'react';
6
- import { ReactNode, FC, PropsWithChildren } from 'react';
4
+ import react__default, { ReactNode, FC, PropsWithChildren } from 'react';
5
+ import * as _orderly_network_ui_share from '@orderly.network/ui-share';
6
+ import { SharePnLConfig, SharePnLParams } from '@orderly.network/ui-share';
7
+ import { PositionsProps } from '@orderly.network/ui-positions';
8
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
9
  import * as _orderly_network_hooks from '@orderly.network/hooks';
8
-
9
- declare enum DataListTabType {
10
- positions = "Positions",
11
- pending = "Pending",
12
- tp_sl = "TP/SL",
13
- filled = "Filled",
14
- orderHistory = "Order history"
15
- }
16
- declare const useDataListScript: (props: {
17
- current?: DataListTabType;
18
- config: PositionsProps & {
19
- symbol?: string;
20
- };
21
- }) => {
22
- current: DataListTabType | undefined;
23
- config: PositionsProps & {
24
- symbol?: string | undefined;
25
- };
26
- unPnlPriceBasis: any;
27
- setUnPnlPriceBasic: (value: string) => void;
28
- pnlNotionalDecimalPrecision: any;
29
- setPnlNotionalDecimalPrecision: (value: number) => void;
30
- showAllSymbol: any;
31
- setShowAllSymbol: (value: boolean) => void;
32
- };
33
- type DataListState = ReturnType<typeof useDataListScript>;
10
+ import { SplitProps } from '@uiw/react-split';
34
11
 
35
12
  type layoutInfo = {
36
13
  width?: number;
@@ -110,7 +87,7 @@ type BasicSymbolInfo = {
110
87
  base: string;
111
88
  quote: string;
112
89
  };
113
- interface TradingPageState extends TradingPageV2Props {
90
+ interface TradingPageState extends TradingPageProps {
114
91
  symbolInfo: {
115
92
  base_dp: number;
116
93
  quote_dp: number;
@@ -119,6 +96,8 @@ interface TradingPageState extends TradingPageV2Props {
119
96
  quote: string;
120
97
  symbol: string;
121
98
  };
99
+ /** default is `(max-width: 768px)`*/
100
+ tabletMediaQuery: string;
122
101
  }
123
102
  interface TradingViewConfigInterface {
124
103
  scriptSRC?: string;
@@ -140,15 +119,13 @@ interface ColorConfigInterface {
140
119
  font?: string;
141
120
  closeIcon?: string;
142
121
  }
143
- type ReferralProps = {
122
+ type ReferralPropsV2 = {
144
123
  saveRefCode?: boolean;
145
124
  onClickReferral?: () => void;
146
125
  onBoundRefCode?: (success: boolean, error: any) => void;
147
- refLink?: string;
148
- slogan?: string;
149
126
  };
150
- type TradingRewardProps = {
151
- onClickTradingReward?: () => void;
127
+ type TradingRewardsProps = {
128
+ onClickTradingRewards?: () => void;
152
129
  };
153
130
  type BaseTradingPageProps = {
154
131
  symbol: string;
@@ -158,25 +135,52 @@ type BaseTradingPageProps = {
158
135
  overrideFeatures?: Record<TradingFeatures, ReactNode>;
159
136
  };
160
137
  type TradingPageProps = BaseTradingPageProps & {
161
- shareOptions: ShareOptions;
162
- referral: ReferralProps;
163
- tradingReward: TradingRewardProps;
164
- };
165
- type TradingPageV2Props = BaseTradingPageProps & {
166
- dataList: {
167
- current?: DataListTabType;
168
- config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
169
- };
138
+ sharePnLConfig?: SharePnLConfig & Partial<Omit<SharePnLParams, "position" | "refCode" | "leverage">>;
139
+ /** default is `(max-width: 768px)`*/
140
+ tabletMediaQuery?: string;
141
+ referral?: ReferralPropsV2;
142
+ tradingRewards?: TradingRewardsProps;
143
+ bottomSheetLeading?: React.ReactNode | string;
170
144
  };
171
145
 
172
- declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
146
+ declare enum DataListTabType {
147
+ positions = "Positions",
148
+ pending = "Pending",
149
+ tp_sl = "TP/SL",
150
+ filled = "Filled",
151
+ orderHistory = "Order history"
152
+ }
153
+ declare const useDataListScript: (props: {
154
+ current?: DataListTabType;
155
+ tabletMediaQuery: string;
156
+ } & PositionsProps) => {
157
+ positionCount: number;
158
+ pendingOrderCount: number;
159
+ tpSlOrderCount: number;
160
+ onSymbolChange: ((symbol: _orderly_network_types.API.Symbol) => void) | undefined;
161
+ unPnlPriceBasis: any;
162
+ setUnPnlPriceBasic: (value: string) => void;
163
+ pnlNotionalDecimalPrecision: any;
164
+ setPnlNotionalDecimalPrecision: (value: number) => void;
165
+ showAllSymbol: any;
166
+ setShowAllSymbol: (value: boolean) => void;
167
+ hideAssets: any;
168
+ setHideAssets: (value: boolean) => void;
169
+ current: DataListTabType | undefined;
170
+ tabletMediaQuery: string;
171
+ sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
172
+ symbol: string | undefined;
173
+ calcMode: any;
174
+ includedPendingOrder: boolean | undefined;
175
+ };
176
+ type DataListState = ReturnType<typeof useDataListScript>;
173
177
 
174
178
  declare const DataList: FC<DataListState>;
175
179
 
176
180
  declare const DataListWidget: (props: {
177
181
  current?: DataListTabType;
178
- config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
179
- }) => react_jsx_runtime.JSX.Element;
182
+ tabletMediaQuery: string;
183
+ } & PositionsProps) => react_jsx_runtime.JSX.Element;
180
184
 
181
185
  declare const useLastTradesScript: (symbol: string) => {
182
186
  base: any;
@@ -189,13 +193,31 @@ declare const useLastTradesScript: (symbol: string) => {
189
193
  type LastTradesState = ReturnType<typeof useLastTradesScript>;
190
194
 
191
195
  declare const LastTrades: FC<LastTradesState & {
192
- className?: string;
193
- style?: React.CSSProperties;
196
+ classNames?: {
197
+ root?: string;
198
+ list?: string;
199
+ listHeader?: string;
200
+ listItem?: {
201
+ left?: string;
202
+ mid?: string;
203
+ right?: string;
204
+ };
205
+ };
206
+ style?: react__default.CSSProperties;
194
207
  }>;
195
208
 
196
209
  declare const LastTradesWidget: (props: {
197
210
  symbol: string;
198
- className?: string;
211
+ classNames?: {
212
+ root?: string;
213
+ list?: string;
214
+ listHeader?: string;
215
+ listItem?: {
216
+ left?: string;
217
+ mid?: string;
218
+ right?: string;
219
+ };
220
+ };
199
221
  style?: React.CSSProperties;
200
222
  }) => react_jsx_runtime.JSX.Element;
201
223
 
@@ -207,11 +229,11 @@ declare const useAssetViewScript: () => {
207
229
  toggleVisible: () => void;
208
230
  networkId: NetworkId;
209
231
  isFirstTimeDeposit: boolean;
210
- totalValue: number;
232
+ totalValue: number | undefined;
211
233
  status: AccountStatusEnum;
212
- freeCollateral: number;
213
- marginRatioVal: number;
214
- renderMMR: string;
234
+ freeCollateral: number | undefined;
235
+ marginRatioVal: number | undefined;
236
+ renderMMR: number | undefined;
215
237
  isConnected: boolean;
216
238
  };
217
239
  type AssetViewState = ReturnType<typeof useAssetViewScript>;
@@ -222,6 +244,7 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
222
244
 
223
245
  declare const useOrderBookScript: (props: {
224
246
  symbol: string;
247
+ tabletMediaQuery?: string;
225
248
  height?: number;
226
249
  }) => {
227
250
  level: number;
@@ -245,16 +268,18 @@ type OrderBookState = ReturnType<typeof useOrderBookScript>;
245
268
 
246
269
  declare const OrderBook: FC<OrderBookState & {
247
270
  className?: string;
271
+ tabletMediaQuery: string;
248
272
  }>;
249
273
 
250
274
  declare const OrderBookWidget: (props: {
251
275
  className?: string;
252
276
  symbol: string;
253
277
  height?: number;
278
+ tabletMediaQuery: string;
254
279
  }) => react_jsx_runtime.JSX.Element;
255
280
 
256
281
  declare const useRiskRateScript: () => {
257
- riskRate: string;
282
+ riskRate: string | null;
258
283
  riskRateColor: {
259
284
  isHigh: boolean;
260
285
  isMedium: boolean;
@@ -262,7 +287,7 @@ declare const useRiskRateScript: () => {
262
287
  isDefault: boolean;
263
288
  };
264
289
  isConnected: boolean;
265
- currentLeverage: number;
290
+ currentLeverage: number | null;
266
291
  maxLeverage: any;
267
292
  };
268
293
  type RiskRateState = ReturnType<typeof useRiskRateScript>;
@@ -283,21 +308,82 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
283
308
  };
284
309
  type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
285
310
 
286
- declare const OrderBookAndTrades: FC<OrderBookAndTradesState>;
311
+ declare const OrderBookAndTrades: FC<OrderBookAndTradesState & {
312
+ tabletMediaQuery: string;
313
+ }>;
287
314
 
288
315
  declare const OrderBookAndTradesWidget: (props: {
289
316
  symbol: string;
317
+ tabletMediaQuery: string;
290
318
  }) => react_jsx_runtime.JSX.Element;
291
319
 
292
- declare const useTradingV2Script: () => TradingPageState;
293
- type TradingV2State = ReturnType<typeof useTradingV2Script>;
320
+ type SplitLayoutProps = PropsWithChildren<SplitProps> & {
321
+ onSizeChange?: (size: string) => void;
322
+ };
323
+ declare const SplitLayout: react__default.FC<SplitLayoutProps>;
294
324
 
295
- declare const TradingV2: FC<TradingV2State>;
325
+ declare const useBottomNavBarScript: () => {
326
+ wrongNetwork: boolean;
327
+ };
328
+ type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
296
329
 
297
- declare const TradingV2Widget: () => react_jsx_runtime.JSX.Element;
330
+ declare const BottomNavBar: FC<BottomNavBarState>;
298
331
 
299
- declare const TradingPageV2: (props: TradingPageV2Props) => react_jsx_runtime.JSX.Element;
332
+ declare const BottomNavBarWidget: () => react_jsx_runtime.JSX.Element;
300
333
 
301
- declare const TradingPageProvider: (props: PropsWithChildren<TradingPageV2Props>) => react_jsx_runtime.JSX.Element;
334
+ type TradingState = ReturnType<typeof useTradingScript>;
335
+ declare const useTradingScript: () => TradingPageState & {
336
+ collapsed: any;
337
+ onCollapse: (collapsed: boolean) => void;
338
+ layout: any;
339
+ onLayout: (value: string) => void;
340
+ orderBookSplitSize: string | undefined;
341
+ setOrderbookSplitSize: (size: string) => void;
342
+ dataListSplitSize: string | undefined;
343
+ setDataListSplitSize: (size: string) => void;
344
+ mainSplitSize: string | undefined;
345
+ setMainSplitSize: (size: string) => void;
346
+ isMedium: boolean;
347
+ animating: boolean;
348
+ setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
349
+ positions: number[];
350
+ updatePositions: (currentIdx: number, targetIdx: number) => void;
351
+ canTrading: boolean;
352
+ showPositionIcon: boolean;
353
+ openMarketsSheet: boolean;
354
+ onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
355
+ };
356
+
357
+ declare const Trading: FC<TradingState>;
358
+
359
+ declare const TradingWidget: () => react_jsx_runtime.JSX.Element;
360
+
361
+ declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
362
+
363
+ declare const TradingPageContext: react.Context<TradingPageState>;
364
+ declare const useTradingPageContext: () => TradingPageState;
365
+ declare const TradingPageProvider: (props: PropsWithChildren<TradingPageProps>) => react_jsx_runtime.JSX.Element;
366
+
367
+ declare const useTradingLocalStorage: (props?: {
368
+ pnlNotionalDecimalPrecision?: number;
369
+ }) => {
370
+ unPnlPriceBasis: any;
371
+ setUnPnlPriceBasic: (value: string) => void;
372
+ pnlNotionalDecimalPrecision: any;
373
+ setPnlNotionalDecimalPrecision: (value: number) => void;
374
+ showAllSymbol: any;
375
+ setShowAllSymbol: (value: boolean) => void;
376
+ hideAssets: any;
377
+ setHideAssets: (value: boolean) => void;
378
+ };
379
+
380
+ declare const usePositionsCount: (symbol?: string) => {
381
+ positionCount: number;
382
+ };
383
+
384
+ declare const usePendingOrderCount: (symbol?: string) => {
385
+ pendingOrderCount: number;
386
+ tpSlOrderCount: number;
387
+ };
302
388
 
303
- export { AssetView, AssetViewWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, TradingPage, TradingPageProvider, TradingPageV2, TradingV2, TradingV2Widget, useOrderBookAndTradesScript, useOrderBookScript };
389
+ export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, TradingWidget, useBottomNavBarScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePositionsCount, useTradingLocalStorage, useTradingPageContext };