@orderly.network/trading 2.0.1 → 2.0.2
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 +22 -21
- package/dist/index.d.ts +22 -21
- package/dist/index.js +35 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -20
package/dist/index.d.mts
CHANGED
|
@@ -97,8 +97,6 @@ interface TradingPageState extends TradingPageProps {
|
|
|
97
97
|
quote: string;
|
|
98
98
|
symbol: string;
|
|
99
99
|
};
|
|
100
|
-
/** default is `(max-width: 768px)`*/
|
|
101
|
-
tabletMediaQuery?: string;
|
|
102
100
|
}
|
|
103
101
|
interface TradingViewConfigInterface {
|
|
104
102
|
scriptSRC?: string;
|
|
@@ -153,7 +151,6 @@ declare enum DataListTabType {
|
|
|
153
151
|
}
|
|
154
152
|
declare const useDataListScript: (props: {
|
|
155
153
|
current?: DataListTabType;
|
|
156
|
-
tabletMediaQuery: string;
|
|
157
154
|
} & PositionsProps) => {
|
|
158
155
|
positionCount: number;
|
|
159
156
|
pendingOrderCount: number;
|
|
@@ -168,7 +165,6 @@ declare const useDataListScript: (props: {
|
|
|
168
165
|
hideAssets: any;
|
|
169
166
|
setHideAssets: (value: boolean) => void;
|
|
170
167
|
current: DataListTabType | undefined;
|
|
171
|
-
tabletMediaQuery: string;
|
|
172
168
|
sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
|
|
173
169
|
symbol: string | undefined;
|
|
174
170
|
calcMode: any;
|
|
@@ -180,7 +176,6 @@ declare const DataList: FC<DataListState>;
|
|
|
180
176
|
|
|
181
177
|
declare const DataListWidget: (props: {
|
|
182
178
|
current?: DataListTabType;
|
|
183
|
-
tabletMediaQuery: string;
|
|
184
179
|
} & PositionsProps) => react_jsx_runtime.JSX.Element;
|
|
185
180
|
|
|
186
181
|
declare const useLastTradesScript: (symbol: string) => {
|
|
@@ -245,7 +240,6 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
245
240
|
|
|
246
241
|
declare const useOrderBookScript: (props: {
|
|
247
242
|
symbol: string;
|
|
248
|
-
tabletMediaQuery?: string;
|
|
249
243
|
height?: number;
|
|
250
244
|
}) => {
|
|
251
245
|
level: number;
|
|
@@ -263,20 +257,18 @@ declare const useOrderBookScript: (props: {
|
|
|
263
257
|
onDepthChange: ((depth: number) => void) | undefined;
|
|
264
258
|
pendingOrders: number[];
|
|
265
259
|
symbolInfo: BasicSymbolInfo;
|
|
266
|
-
|
|
260
|
+
isMobile: boolean;
|
|
267
261
|
};
|
|
268
262
|
type OrderBookState = ReturnType<typeof useOrderBookScript>;
|
|
269
263
|
|
|
270
264
|
declare const OrderBook: FC<OrderBookState & {
|
|
271
265
|
className?: string;
|
|
272
|
-
tabletMediaQuery: string;
|
|
273
266
|
}>;
|
|
274
267
|
|
|
275
268
|
declare const OrderBookWidget: (props: {
|
|
276
269
|
className?: string;
|
|
277
270
|
symbol: string;
|
|
278
271
|
height?: number;
|
|
279
|
-
tabletMediaQuery: string;
|
|
280
272
|
}) => react_jsx_runtime.JSX.Element;
|
|
281
273
|
|
|
282
274
|
declare const useRiskRateScript: () => {
|
|
@@ -309,13 +301,10 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
|
|
|
309
301
|
};
|
|
310
302
|
type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
|
|
311
303
|
|
|
312
|
-
declare const OrderBookAndTrades: FC<OrderBookAndTradesState
|
|
313
|
-
tabletMediaQuery: string;
|
|
314
|
-
}>;
|
|
304
|
+
declare const OrderBookAndTrades: FC<OrderBookAndTradesState>;
|
|
315
305
|
|
|
316
306
|
declare const OrderBookAndTradesWidget: (props: {
|
|
317
307
|
symbol: string;
|
|
318
|
-
tabletMediaQuery: string;
|
|
319
308
|
}) => react_jsx_runtime.JSX.Element;
|
|
320
309
|
|
|
321
310
|
type SplitLayoutProps = PropsWithChildren<SplitProps> & {
|
|
@@ -325,6 +314,8 @@ declare const SplitLayout: react__default.FC<SplitLayoutProps>;
|
|
|
325
314
|
|
|
326
315
|
declare const useBottomNavBarScript: () => {
|
|
327
316
|
wrongNetwork: boolean;
|
|
317
|
+
status: _orderly_network_types.AccountStatusEnum;
|
|
318
|
+
onDisconnect: () => Promise<void>;
|
|
328
319
|
};
|
|
329
320
|
type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
|
|
330
321
|
|
|
@@ -388,25 +379,35 @@ declare const PortfolioSheetWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
388
379
|
|
|
389
380
|
type TradingState = ReturnType<typeof useTradingScript>;
|
|
390
381
|
declare const useTradingScript: () => TradingPageState & {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
layout: any;
|
|
394
|
-
onLayout: (value: string) => void;
|
|
382
|
+
orderEntryViewRef: react.RefObject<HTMLDivElement>;
|
|
383
|
+
orderEntryHeight: number;
|
|
395
384
|
orderBookSplitSize: string | undefined;
|
|
396
385
|
setOrderbookSplitSize: (size: string) => void;
|
|
397
386
|
dataListSplitSize: string | undefined;
|
|
398
387
|
setDataListSplitSize: (size: string) => void;
|
|
399
388
|
mainSplitSize: string | undefined;
|
|
400
389
|
setMainSplitSize: (size: string) => void;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
390
|
+
dataListSplitHeightSM: string | undefined;
|
|
391
|
+
setDataListSplitHeightSM: (size: string) => void;
|
|
392
|
+
orderBookSplitHeightSM: string | undefined;
|
|
393
|
+
setOrderbookSplitHeightSM: (size: string) => void;
|
|
404
394
|
positions: number[];
|
|
395
|
+
showPositionIcon: boolean;
|
|
405
396
|
updatePositions: (currentIdx: number, targetIdx: number) => void;
|
|
397
|
+
collapsable: boolean;
|
|
398
|
+
collapsed: any;
|
|
399
|
+
onCollapse: (collapsed: boolean) => void;
|
|
400
|
+
animating: boolean;
|
|
401
|
+
setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
|
|
402
|
+
layout: any;
|
|
403
|
+
onLayout: (value: string) => void;
|
|
404
|
+
max2XL: boolean;
|
|
405
|
+
min3XL: boolean;
|
|
406
|
+
max4XL: boolean;
|
|
406
407
|
canTrading: boolean;
|
|
407
|
-
showPositionIcon: boolean;
|
|
408
408
|
openMarketsSheet: boolean;
|
|
409
409
|
onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
410
|
+
horizontalDraggable: boolean;
|
|
410
411
|
};
|
|
411
412
|
|
|
412
413
|
declare const Trading: FC<TradingState>;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,8 +97,6 @@ interface TradingPageState extends TradingPageProps {
|
|
|
97
97
|
quote: string;
|
|
98
98
|
symbol: string;
|
|
99
99
|
};
|
|
100
|
-
/** default is `(max-width: 768px)`*/
|
|
101
|
-
tabletMediaQuery?: string;
|
|
102
100
|
}
|
|
103
101
|
interface TradingViewConfigInterface {
|
|
104
102
|
scriptSRC?: string;
|
|
@@ -153,7 +151,6 @@ declare enum DataListTabType {
|
|
|
153
151
|
}
|
|
154
152
|
declare const useDataListScript: (props: {
|
|
155
153
|
current?: DataListTabType;
|
|
156
|
-
tabletMediaQuery: string;
|
|
157
154
|
} & PositionsProps) => {
|
|
158
155
|
positionCount: number;
|
|
159
156
|
pendingOrderCount: number;
|
|
@@ -168,7 +165,6 @@ declare const useDataListScript: (props: {
|
|
|
168
165
|
hideAssets: any;
|
|
169
166
|
setHideAssets: (value: boolean) => void;
|
|
170
167
|
current: DataListTabType | undefined;
|
|
171
|
-
tabletMediaQuery: string;
|
|
172
168
|
sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
|
|
173
169
|
symbol: string | undefined;
|
|
174
170
|
calcMode: any;
|
|
@@ -180,7 +176,6 @@ declare const DataList: FC<DataListState>;
|
|
|
180
176
|
|
|
181
177
|
declare const DataListWidget: (props: {
|
|
182
178
|
current?: DataListTabType;
|
|
183
|
-
tabletMediaQuery: string;
|
|
184
179
|
} & PositionsProps) => react_jsx_runtime.JSX.Element;
|
|
185
180
|
|
|
186
181
|
declare const useLastTradesScript: (symbol: string) => {
|
|
@@ -245,7 +240,6 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
245
240
|
|
|
246
241
|
declare const useOrderBookScript: (props: {
|
|
247
242
|
symbol: string;
|
|
248
|
-
tabletMediaQuery?: string;
|
|
249
243
|
height?: number;
|
|
250
244
|
}) => {
|
|
251
245
|
level: number;
|
|
@@ -263,20 +257,18 @@ declare const useOrderBookScript: (props: {
|
|
|
263
257
|
onDepthChange: ((depth: number) => void) | undefined;
|
|
264
258
|
pendingOrders: number[];
|
|
265
259
|
symbolInfo: BasicSymbolInfo;
|
|
266
|
-
|
|
260
|
+
isMobile: boolean;
|
|
267
261
|
};
|
|
268
262
|
type OrderBookState = ReturnType<typeof useOrderBookScript>;
|
|
269
263
|
|
|
270
264
|
declare const OrderBook: FC<OrderBookState & {
|
|
271
265
|
className?: string;
|
|
272
|
-
tabletMediaQuery: string;
|
|
273
266
|
}>;
|
|
274
267
|
|
|
275
268
|
declare const OrderBookWidget: (props: {
|
|
276
269
|
className?: string;
|
|
277
270
|
symbol: string;
|
|
278
271
|
height?: number;
|
|
279
|
-
tabletMediaQuery: string;
|
|
280
272
|
}) => react_jsx_runtime.JSX.Element;
|
|
281
273
|
|
|
282
274
|
declare const useRiskRateScript: () => {
|
|
@@ -309,13 +301,10 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
|
|
|
309
301
|
};
|
|
310
302
|
type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
|
|
311
303
|
|
|
312
|
-
declare const OrderBookAndTrades: FC<OrderBookAndTradesState
|
|
313
|
-
tabletMediaQuery: string;
|
|
314
|
-
}>;
|
|
304
|
+
declare const OrderBookAndTrades: FC<OrderBookAndTradesState>;
|
|
315
305
|
|
|
316
306
|
declare const OrderBookAndTradesWidget: (props: {
|
|
317
307
|
symbol: string;
|
|
318
|
-
tabletMediaQuery: string;
|
|
319
308
|
}) => react_jsx_runtime.JSX.Element;
|
|
320
309
|
|
|
321
310
|
type SplitLayoutProps = PropsWithChildren<SplitProps> & {
|
|
@@ -325,6 +314,8 @@ declare const SplitLayout: react__default.FC<SplitLayoutProps>;
|
|
|
325
314
|
|
|
326
315
|
declare const useBottomNavBarScript: () => {
|
|
327
316
|
wrongNetwork: boolean;
|
|
317
|
+
status: _orderly_network_types.AccountStatusEnum;
|
|
318
|
+
onDisconnect: () => Promise<void>;
|
|
328
319
|
};
|
|
329
320
|
type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
|
|
330
321
|
|
|
@@ -388,25 +379,35 @@ declare const PortfolioSheetWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
388
379
|
|
|
389
380
|
type TradingState = ReturnType<typeof useTradingScript>;
|
|
390
381
|
declare const useTradingScript: () => TradingPageState & {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
layout: any;
|
|
394
|
-
onLayout: (value: string) => void;
|
|
382
|
+
orderEntryViewRef: react.RefObject<HTMLDivElement>;
|
|
383
|
+
orderEntryHeight: number;
|
|
395
384
|
orderBookSplitSize: string | undefined;
|
|
396
385
|
setOrderbookSplitSize: (size: string) => void;
|
|
397
386
|
dataListSplitSize: string | undefined;
|
|
398
387
|
setDataListSplitSize: (size: string) => void;
|
|
399
388
|
mainSplitSize: string | undefined;
|
|
400
389
|
setMainSplitSize: (size: string) => void;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
390
|
+
dataListSplitHeightSM: string | undefined;
|
|
391
|
+
setDataListSplitHeightSM: (size: string) => void;
|
|
392
|
+
orderBookSplitHeightSM: string | undefined;
|
|
393
|
+
setOrderbookSplitHeightSM: (size: string) => void;
|
|
404
394
|
positions: number[];
|
|
395
|
+
showPositionIcon: boolean;
|
|
405
396
|
updatePositions: (currentIdx: number, targetIdx: number) => void;
|
|
397
|
+
collapsable: boolean;
|
|
398
|
+
collapsed: any;
|
|
399
|
+
onCollapse: (collapsed: boolean) => void;
|
|
400
|
+
animating: boolean;
|
|
401
|
+
setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
|
|
402
|
+
layout: any;
|
|
403
|
+
onLayout: (value: string) => void;
|
|
404
|
+
max2XL: boolean;
|
|
405
|
+
min3XL: boolean;
|
|
406
|
+
max4XL: boolean;
|
|
406
407
|
canTrading: boolean;
|
|
407
|
-
showPositionIcon: boolean;
|
|
408
408
|
openMarketsSheet: boolean;
|
|
409
409
|
onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
410
|
+
horizontalDraggable: boolean;
|
|
410
411
|
};
|
|
411
412
|
|
|
412
413
|
declare const Trading: FC<TradingState>;
|