@orderly.network/trading 3.1.2-alpha.1 → 3.1.3-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 +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +60 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { injectable, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, Box, Flex, Text, NewsFillIcon, EyeIcon, EyeCloseIcon, SimpleSheet, TabPanel, toast as toast$1, useScreen, ExclamationFillIcon, CloseIcon, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber, Divider, ListView, Grid, ArrowDownShortIcon, gradientTextVariants, ChevronDownIcon, modal, Tooltip, Tabs, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Statistic, RefreshIcon, ArrowLeftRightIcon, ArrowUpShortIcon, InfoCircleIcon, SimpleDialog, ChainIcon, useModal, ArrowRightShortIcon, Switch, Checkbox, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker } from '@orderly.network/ui';
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useBadgeBySymbol, useGetRwaSymbolOpenStatus, useLocalStorage, useGetRwaSymbolInfo, useSymbolsInfo, useGetRwaSymbolCloseTimeInterval, usePositionStream, useOrderStream, useAccount, useFundingDetails, useFundingRateBySymbol, useFundingRate, useOrderbookStream, useEventEmitter, useCollateral, useMarginRatio, useLeverage, useDebouncedCallback, useMediaQuery, useAssetsHistory, useWalletConnector, useConfig, useMutation, useChains, useReferralInfo, useCurEpochEstimate, TWType, useEpochInfo, useMarketTradeStream, useAccountInstance, useComputedLTV, useTickerStream } from '@orderly.network/hooks';
|
|
2
4
|
import React12, { forwardRef, useMemo, createContext, useEffect, useState, useRef, useCallback, useContext, createElement } from 'react';
|
|
3
5
|
import { useDataTap, useAppContext } from '@orderly.network/react-app';
|
|
4
6
|
import { TradingviewFullscreenKey, OrderEntrySortKeys, AlgoOrderRootType, OrderStatus, OrderSide, AccountStatusEnum, AssetHistoryStatusEnum, AssetHistorySideEnum, ChainNamespace, EMPTY_LIST } from '@orderly.network/types';
|
|
5
7
|
import { i18n, useTranslation, Trans } from '@orderly.network/i18n';
|
|
6
|
-
import { injectable, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, Box, Flex, Text, toast as toast$1, useScreen, ExclamationFillIcon, CloseIcon, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber, Divider, ListView, Grid, ArrowDownShortIcon, gradientTextVariants, EyeIcon, EyeCloseIcon, ChevronDownIcon, modal, Tooltip, Tabs, TabPanel, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Statistic, RefreshIcon, ArrowLeftRightIcon, ArrowUpShortIcon, InfoCircleIcon, NewsFillIcon, SimpleSheet, SimpleDialog, ChainIcon, useModal, ArrowRightShortIcon, Switch, Checkbox, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker } from '@orderly.network/ui';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { PositionHistoryWidget, LiquidationWidget, PositionsWidget, CloseAllPositionsWidget, MobileLiquidationWidget, MobilePositionsWidget, MobilePositionHistoryWidget, useReversePositionEnabled } from '@orderly.network/ui-positions';
|
|
9
9
|
import { Decimal, getPrecisionByNumber, commifyOptional, removeTrailingZeros, isTestnet, formatSymbol, optimizeSymbolDisplay } from '@orderly.network/utils';
|
|
10
10
|
import { AssetsModule } from '@orderly.network/portfolio';
|
|
@@ -31,6 +31,17 @@ var __export = (target, all) => {
|
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
var DataListDesktopTabsTarget, DataListDesktopTabs, InjectableDataListDesktopTabs;
|
|
35
|
+
var init_dataList_injectable = __esm({
|
|
36
|
+
"src/components/desktop/dataList/dataList.injectable.tsx"() {
|
|
37
|
+
DataListDesktopTabsTarget = "Trading.DataList.Desktop.Tabs";
|
|
38
|
+
DataListDesktopTabs = ({ items }) => /* @__PURE__ */ jsx(Fragment, { children: items.map((tab) => /* @__PURE__ */ jsx(TabPanel, { value: tab.id, title: tab.title, children: tab.content }, tab.id)) });
|
|
39
|
+
InjectableDataListDesktopTabs = injectable(
|
|
40
|
+
DataListDesktopTabs,
|
|
41
|
+
DataListDesktopTabsTarget
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
34
45
|
var useTradingLocalStorage;
|
|
35
46
|
var init_useTradingLocalStorage = __esm({
|
|
36
47
|
"src/hooks/useTradingLocalStorage.ts"() {
|
|
@@ -696,6 +707,7 @@ var init_positionHeader = __esm({
|
|
|
696
707
|
var LazySettingWidget, LazyPositionHeaderWidget, PositionsView, LiquidationTab, DataList;
|
|
697
708
|
var init_dataList_ui = __esm({
|
|
698
709
|
"src/components/desktop/dataList/dataList.ui.tsx"() {
|
|
710
|
+
init_dataList_injectable();
|
|
699
711
|
init_dataList_script();
|
|
700
712
|
LazySettingWidget = React12.lazy(
|
|
701
713
|
() => Promise.resolve().then(() => (init_setting(), setting_exports)).then((mod) => {
|
|
@@ -887,7 +899,7 @@ var init_dataList_ui = __esm({
|
|
|
887
899
|
)
|
|
888
900
|
}
|
|
889
901
|
];
|
|
890
|
-
return /* @__PURE__ */
|
|
902
|
+
return /* @__PURE__ */ jsxs(
|
|
891
903
|
Tabs,
|
|
892
904
|
{
|
|
893
905
|
className: "oui-trading-dataList-tabs oui-h-full",
|
|
@@ -909,10 +921,13 @@ var init_dataList_ui = __esm({
|
|
|
909
921
|
trigger: "oui-group",
|
|
910
922
|
tabsContent: "oui-h-[calc(100%_-_32px)]"
|
|
911
923
|
},
|
|
912
|
-
children:
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
924
|
+
children: [
|
|
925
|
+
tabPanelItems.map((item) => {
|
|
926
|
+
const { content, ...rest } = item;
|
|
927
|
+
return /* @__PURE__ */ createElement(TabPanel, { ...rest, key: `item-${rest.value}` }, content);
|
|
928
|
+
}),
|
|
929
|
+
/* @__PURE__ */ jsx(InjectableDataListDesktopTabs, { items: [] })
|
|
930
|
+
]
|
|
916
931
|
}
|
|
917
932
|
);
|
|
918
933
|
};
|
|
@@ -934,12 +949,15 @@ var init_dataList_widget = __esm({
|
|
|
934
949
|
var dataList_exports = {};
|
|
935
950
|
__export(dataList_exports, {
|
|
936
951
|
DataList: () => DataList,
|
|
937
|
-
|
|
952
|
+
DataListDesktopTabsTarget: () => DataListDesktopTabsTarget,
|
|
953
|
+
DataListWidget: () => DataListWidget,
|
|
954
|
+
InjectableDataListDesktopTabs: () => InjectableDataListDesktopTabs
|
|
938
955
|
});
|
|
939
956
|
var init_dataList = __esm({
|
|
940
957
|
"src/components/desktop/dataList/index.ts"() {
|
|
941
958
|
init_dataList_ui();
|
|
942
959
|
init_dataList_widget();
|
|
960
|
+
init_dataList_injectable();
|
|
943
961
|
}
|
|
944
962
|
});
|
|
945
963
|
var LastTrades, Row, Header, List;
|
|
@@ -5872,6 +5890,17 @@ var init_orderBookAndEntry = __esm({
|
|
|
5872
5890
|
init_orderBookAndEntry_script();
|
|
5873
5891
|
}
|
|
5874
5892
|
});
|
|
5893
|
+
var DataListMobileTabsTarget, DataListMobileTabs, InjectableDataListMobileTabs;
|
|
5894
|
+
var init_dataList_injectable2 = __esm({
|
|
5895
|
+
"src/components/mobile/dataList/dataList.injectable.tsx"() {
|
|
5896
|
+
DataListMobileTabsTarget = "Trading.DataList.Mobile.Tabs";
|
|
5897
|
+
DataListMobileTabs = ({ items }) => /* @__PURE__ */ jsx(Fragment, { children: items.map((tab) => /* @__PURE__ */ jsx(TabPanel, { value: tab.id, title: tab.title, children: tab.content }, tab.id)) });
|
|
5898
|
+
InjectableDataListMobileTabs = injectable(
|
|
5899
|
+
DataListMobileTabs,
|
|
5900
|
+
DataListMobileTabsTarget
|
|
5901
|
+
);
|
|
5902
|
+
}
|
|
5903
|
+
});
|
|
5875
5904
|
var useDataListScript2, getDialogInfo;
|
|
5876
5905
|
var init_dataList_script2 = __esm({
|
|
5877
5906
|
"src/components/mobile/dataList/dataList.script.tsx"() {
|
|
@@ -5983,6 +6012,7 @@ var init_dataList_script2 = __esm({
|
|
|
5983
6012
|
var LazyPositionHeaderWidget2, SymbolControlHeader, OrdersView, PositionsView2, HistoryTab, DataList2;
|
|
5984
6013
|
var init_dataList_ui2 = __esm({
|
|
5985
6014
|
"src/components/mobile/dataList/dataList.ui.tsx"() {
|
|
6015
|
+
init_dataList_injectable2();
|
|
5986
6016
|
init_dataList_script2();
|
|
5987
6017
|
LazyPositionHeaderWidget2 = React12.lazy(
|
|
5988
6018
|
() => Promise.resolve().then(() => (init_positionHeader(), positionHeader_exports)).then((mod) => {
|
|
@@ -6199,7 +6229,7 @@ var init_dataList_ui2 = __esm({
|
|
|
6199
6229
|
content: /* @__PURE__ */ jsx(AssetsModule.AssetsWidget, {})
|
|
6200
6230
|
}
|
|
6201
6231
|
];
|
|
6202
|
-
return /* @__PURE__ */
|
|
6232
|
+
return /* @__PURE__ */ jsxs(
|
|
6203
6233
|
Tabs,
|
|
6204
6234
|
{
|
|
6205
6235
|
value: tab,
|
|
@@ -6210,10 +6240,13 @@ var init_dataList_ui2 = __esm({
|
|
|
6210
6240
|
classNames: {
|
|
6211
6241
|
tabsList: "oui-bg-base-9 oui-rounded-t-xl oui-p-2 oui-overflow-x-scroll oui-hide-scrollbar"
|
|
6212
6242
|
},
|
|
6213
|
-
children:
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6243
|
+
children: [
|
|
6244
|
+
tabPanelItems.map((item) => {
|
|
6245
|
+
const { content, ...rest } = item;
|
|
6246
|
+
return /* @__PURE__ */ createElement(TabPanel, { ...rest, key: `item-${rest.value}` }, content);
|
|
6247
|
+
}),
|
|
6248
|
+
/* @__PURE__ */ jsx(InjectableDataListMobileTabs, { items: [] })
|
|
6249
|
+
]
|
|
6217
6250
|
}
|
|
6218
6251
|
);
|
|
6219
6252
|
};
|
|
@@ -6235,7 +6268,9 @@ var init_dataList_widget2 = __esm({
|
|
|
6235
6268
|
var dataList_exports2 = {};
|
|
6236
6269
|
__export(dataList_exports2, {
|
|
6237
6270
|
DataList: () => DataList2,
|
|
6271
|
+
DataListMobileTabsTarget: () => DataListMobileTabsTarget,
|
|
6238
6272
|
DataListWidget: () => DataListWidget2,
|
|
6273
|
+
InjectableDataListMobileTabs: () => InjectableDataListMobileTabs,
|
|
6239
6274
|
useDataListScript: () => useDataListScript2
|
|
6240
6275
|
});
|
|
6241
6276
|
var init_dataList2 = __esm({
|
|
@@ -6243,6 +6278,7 @@ var init_dataList2 = __esm({
|
|
|
6243
6278
|
init_dataList_ui2();
|
|
6244
6279
|
init_dataList_widget2();
|
|
6245
6280
|
init_dataList_script2();
|
|
6281
|
+
init_dataList_injectable2();
|
|
6246
6282
|
}
|
|
6247
6283
|
});
|
|
6248
6284
|
|
|
@@ -9148,12 +9184,6 @@ var DesktopLayout4 = (props) => {
|
|
|
9148
9184
|
}
|
|
9149
9185
|
);
|
|
9150
9186
|
};
|
|
9151
|
-
|
|
9152
|
-
// src/pages/trading/trading.injectable.tsx
|
|
9153
|
-
var InjectableDesktopLayout = injectable(
|
|
9154
|
-
DesktopLayout4,
|
|
9155
|
-
"Trading.Layout.Desktop"
|
|
9156
|
-
);
|
|
9157
9187
|
var Countdown = ({
|
|
9158
9188
|
timeInterval
|
|
9159
9189
|
}) => {
|
|
@@ -9410,11 +9440,21 @@ var MobileLayout4 = (props) => {
|
|
|
9410
9440
|
) })
|
|
9411
9441
|
] }) });
|
|
9412
9442
|
};
|
|
9443
|
+
|
|
9444
|
+
// src/pages/trading/trading.injectable.tsx
|
|
9445
|
+
var InjectableDesktopLayout = injectable(
|
|
9446
|
+
DesktopLayout4,
|
|
9447
|
+
"Trading.Layout.Desktop"
|
|
9448
|
+
);
|
|
9449
|
+
var InjectableMobileLayout = injectable(
|
|
9450
|
+
MobileLayout4,
|
|
9451
|
+
"Trading.Layout.Mobile"
|
|
9452
|
+
);
|
|
9413
9453
|
var Trading = (props) => {
|
|
9414
9454
|
const { isMobile } = useScreen();
|
|
9415
9455
|
const { t } = useTranslation();
|
|
9416
9456
|
if (isMobile) {
|
|
9417
|
-
return /* @__PURE__ */ jsx(
|
|
9457
|
+
return /* @__PURE__ */ jsx(InjectableMobileLayout, { ...props });
|
|
9418
9458
|
}
|
|
9419
9459
|
return /* @__PURE__ */ jsx(
|
|
9420
9460
|
InjectableDesktopLayout,
|
|
@@ -9469,6 +9509,6 @@ var TradingPage = (props) => {
|
|
|
9469
9509
|
init_tradingPageContext();
|
|
9470
9510
|
init_hooks();
|
|
9471
9511
|
|
|
9472
|
-
export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook2 as OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, RiskRate, RiskRateWidget, SplitLayout, Trading, TradingPage, TradingPageContext, TradingPageProvider, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
|
|
9512
|
+
export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, BuySellRatioBar, DataList, DataListDesktopTabsTarget, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, InjectableDataListDesktopTabs, LastTrades, LastTradesWidget, OrderBook2 as OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, RiskRate, RiskRateWidget, SplitLayout, Trading, TradingPage, TradingPageContext, TradingPageProvider, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
|
|
9473
9513
|
//# sourceMappingURL=index.mjs.map
|
|
9474
9514
|
//# sourceMappingURL=index.mjs.map
|