@orderly.network/trading 3.0.4-alpha.0 → 3.0.4-alpha.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 +157 -70
- package/dist/index.d.ts +157 -70
- package/dist/index.js +54 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -21
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React12, { forwardRef, useMemo, createContext,
|
|
1
|
+
import { useBadgeBySymbol, useGetRwaSymbolOpenStatus, useLocalStorage, useGetRwaSymbolCloseTimeInterval, usePositionStream, useOrderStream, useAccount, useFundingDetails, useFundingRateBySymbol, useFundingRate, useSymbolsInfo, useOrderbookStream, useEventEmitter, useCollateral, useMarginRatio, useLeverage, useDebouncedCallback, useMediaQuery, useAssetsHistory, useGetRwaSymbolInfo, useWalletConnector, useConfig, useMutation, useChains, useReferralInfo, useCurEpochEstimate, TWType, useEpochInfo, useMarketTradeStream, useAccountInstance, useComputedLTV, useTickerStream } from '@orderly.network/hooks';
|
|
2
|
+
import React12, { forwardRef, useMemo, createContext, useEffect, useState, useRef, useCallback, useContext, createElement } from 'react';
|
|
3
3
|
import { useDataTap, useAppContext } from '@orderly.network/react-app';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { TradingviewFullscreenKey, OrderEntrySortKeys, AlgoOrderRootType, OrderStatus, OrderSide, AccountStatusEnum, AssetHistoryStatusEnum, AssetHistorySideEnum, ChainNamespace, EMPTY_LIST } from '@orderly.network/types';
|
|
5
|
+
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
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
|
-
import {
|
|
9
|
+
import { Decimal, getPrecisionByNumber, commifyOptional, removeTrailingZeros, isTestnet, formatSymbol, optimizeSymbolDisplay } from '@orderly.network/utils';
|
|
10
10
|
import { AssetsModule } from '@orderly.network/portfolio';
|
|
11
11
|
import { DesktopOrderListWidget, TabType, MobileOrderListWidget } from '@orderly.network/ui-orders';
|
|
12
12
|
import { AuthGuard } from '@orderly.network/ui-connector';
|
|
13
13
|
import { OrderEntryWidget, LTVRiskTooltipWidget } from '@orderly.network/ui-order-entry';
|
|
14
|
-
import { DepositAndWithdrawWithSheetId, TransferSheetId,
|
|
14
|
+
import { DepositStatusWidget, DepositAndWithdrawWithSheetId, TransferSheetId, DepositAndWithdrawWithDialogId, TransferDialogId } from '@orderly.network/ui-transfer';
|
|
15
15
|
import { TradingviewWidget } from '@orderly.network/ui-tradingview';
|
|
16
16
|
import Split from '@uiw/react-split';
|
|
17
17
|
import { ScanQRCodeWidget } from '@orderly.network/ui-scaffold';
|
|
@@ -20,7 +20,7 @@ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, close
|
|
|
20
20
|
import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
21
21
|
import { sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy, useSortable, arrayMove } from '@dnd-kit/sortable';
|
|
22
22
|
import { CSS } from '@dnd-kit/utilities';
|
|
23
|
-
import {
|
|
23
|
+
import { HorizontalMarketsWidget, SideMarketsWidget, SymbolInfoBarFullWidget, SymbolInfoBarWidget, SymbolInfoBarRiskNotice, MarketsSheetWidget } from '@orderly.network/markets';
|
|
24
24
|
|
|
25
25
|
var __defProp = Object.defineProperty;
|
|
26
26
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -2204,7 +2204,7 @@ var init_listBox_desktop = __esm({
|
|
|
2204
2204
|
};
|
|
2205
2205
|
}
|
|
2206
2206
|
});
|
|
2207
|
-
var DesktopAsks;
|
|
2207
|
+
var DesktopAsks, InjectableDesktopAsks;
|
|
2208
2208
|
var init_asks_desktop = __esm({
|
|
2209
2209
|
"src/components/desktop/orderBook/asks.desktop.tsx"() {
|
|
2210
2210
|
init_types();
|
|
@@ -2230,9 +2230,13 @@ var init_asks_desktop = __esm({
|
|
|
2230
2230
|
}
|
|
2231
2231
|
);
|
|
2232
2232
|
};
|
|
2233
|
+
InjectableDesktopAsks = injectable(
|
|
2234
|
+
DesktopAsks,
|
|
2235
|
+
"OrderBook.Desktop.Asks"
|
|
2236
|
+
);
|
|
2233
2237
|
}
|
|
2234
2238
|
});
|
|
2235
|
-
var DesktopBids;
|
|
2239
|
+
var DesktopBids, InjectableDesktopBids;
|
|
2236
2240
|
var init_bids_desktop = __esm({
|
|
2237
2241
|
"src/components/desktop/orderBook/bids.desktop.tsx"() {
|
|
2238
2242
|
init_types();
|
|
@@ -2257,6 +2261,10 @@ var init_bids_desktop = __esm({
|
|
|
2257
2261
|
}
|
|
2258
2262
|
);
|
|
2259
2263
|
};
|
|
2264
|
+
InjectableDesktopBids = injectable(
|
|
2265
|
+
DesktopBids,
|
|
2266
|
+
"OrderBook.Desktop.Bids"
|
|
2267
|
+
);
|
|
2260
2268
|
}
|
|
2261
2269
|
});
|
|
2262
2270
|
var BuySellRatioSettings, MoreIcon;
|
|
@@ -2920,7 +2928,14 @@ var init_index_desktop = __esm({
|
|
|
2920
2928
|
)
|
|
2921
2929
|
] }),
|
|
2922
2930
|
/* @__PURE__ */ jsx(DesktopHeader, { quote, base }),
|
|
2923
|
-
/* @__PURE__ */ jsx(
|
|
2931
|
+
/* @__PURE__ */ jsx(
|
|
2932
|
+
InjectableDesktopAsks,
|
|
2933
|
+
{
|
|
2934
|
+
data: [...props.asks],
|
|
2935
|
+
symbolInfo: props.symbolInfo,
|
|
2936
|
+
depth: props.activeDepth
|
|
2937
|
+
}
|
|
2938
|
+
),
|
|
2924
2939
|
/* @__PURE__ */ jsx(
|
|
2925
2940
|
DesktopMarkPrice,
|
|
2926
2941
|
{
|
|
@@ -2931,7 +2946,14 @@ var init_index_desktop = __esm({
|
|
|
2931
2946
|
symbolInfo: props.symbolInfo
|
|
2932
2947
|
}
|
|
2933
2948
|
),
|
|
2934
|
-
/* @__PURE__ */ jsx(
|
|
2949
|
+
/* @__PURE__ */ jsx(
|
|
2950
|
+
InjectableDesktopBids,
|
|
2951
|
+
{
|
|
2952
|
+
data: [...props.bids],
|
|
2953
|
+
symbolInfo: props.symbolInfo,
|
|
2954
|
+
depth: props.activeDepth
|
|
2955
|
+
}
|
|
2956
|
+
),
|
|
2935
2957
|
showBuySellRatio && /* @__PURE__ */ jsx(
|
|
2936
2958
|
BuySellRatioBar,
|
|
2937
2959
|
{
|
|
@@ -3869,7 +3891,9 @@ var orderBook_exports = {};
|
|
|
3869
3891
|
__export(orderBook_exports, {
|
|
3870
3892
|
BuySellRatioBar: () => BuySellRatioBar,
|
|
3871
3893
|
OrderBook: () => OrderBook2,
|
|
3894
|
+
OrderBookProvider: () => OrderBookProvider,
|
|
3872
3895
|
OrderBookWidget: () => OrderBookWidget,
|
|
3896
|
+
useOrderBookContext: () => useOrderBookContext,
|
|
3873
3897
|
useOrderBookScript: () => useOrderBookScript
|
|
3874
3898
|
});
|
|
3875
3899
|
var init_orderBook2 = __esm({
|
|
@@ -3878,6 +3902,7 @@ var init_orderBook2 = __esm({
|
|
|
3878
3902
|
init_orderBook_widget();
|
|
3879
3903
|
init_orderBook_script();
|
|
3880
3904
|
init_buySellRatioBar();
|
|
3905
|
+
init_orderContext();
|
|
3881
3906
|
}
|
|
3882
3907
|
});
|
|
3883
3908
|
var RiskRate;
|
|
@@ -6908,17 +6933,10 @@ var Account = (props) => {
|
|
|
6908
6933
|
}
|
|
6909
6934
|
);
|
|
6910
6935
|
};
|
|
6911
|
-
|
|
6912
|
-
name: "mobile-account-menu",
|
|
6913
|
-
scope: ["*"],
|
|
6914
|
-
positions: [ExtensionPositionEnum.MobileAccountMenu],
|
|
6915
|
-
builder: useAccountScript,
|
|
6916
|
-
__isInternal: true
|
|
6917
|
-
})((props) => {
|
|
6918
|
-
return /* @__PURE__ */ jsx(Account, { ...props });
|
|
6919
|
-
});
|
|
6936
|
+
var InjectableAccount = injectable(Account, "Account.MobileAccountMenu");
|
|
6920
6937
|
var MobileAccountMenuExtension = () => {
|
|
6921
|
-
|
|
6938
|
+
const state = useAccountScript();
|
|
6939
|
+
return /* @__PURE__ */ jsx(InjectableAccount, { ...state });
|
|
6922
6940
|
};
|
|
6923
6941
|
|
|
6924
6942
|
// src/components/mobile/bottomNavBar/balance/balance.ui.tsx
|
|
@@ -8393,7 +8411,10 @@ var DesktopLayout4 = (props) => {
|
|
|
8393
8411
|
}
|
|
8394
8412
|
];
|
|
8395
8413
|
},
|
|
8396
|
-
sideEffects: ({
|
|
8414
|
+
sideEffects: ({
|
|
8415
|
+
active,
|
|
8416
|
+
dragOverlay
|
|
8417
|
+
}) => {
|
|
8397
8418
|
active.node.style.opacity = "0";
|
|
8398
8419
|
const innerElement = dragOverlay.node.querySelector(".inner-content");
|
|
8399
8420
|
if (innerElement) {
|
|
@@ -8466,9 +8487,6 @@ var DesktopLayout4 = (props) => {
|
|
|
8466
8487
|
const marketsWidget = /* @__PURE__ */ jsx(
|
|
8467
8488
|
SideMarketsWidget,
|
|
8468
8489
|
{
|
|
8469
|
-
resizeable,
|
|
8470
|
-
panelSize,
|
|
8471
|
-
onPanelSizeChange,
|
|
8472
8490
|
symbol: props.symbol,
|
|
8473
8491
|
onSymbolChange: props.onSymbolChange
|
|
8474
8492
|
}
|
|
@@ -9099,6 +9117,12 @@ var DesktopLayout4 = (props) => {
|
|
|
9099
9117
|
}
|
|
9100
9118
|
);
|
|
9101
9119
|
};
|
|
9120
|
+
|
|
9121
|
+
// src/pages/trading/trading.injectable.tsx
|
|
9122
|
+
var InjectableDesktopLayout = injectable(
|
|
9123
|
+
DesktopLayout4,
|
|
9124
|
+
"Trading.Layout.Desktop"
|
|
9125
|
+
);
|
|
9102
9126
|
var Countdown = ({
|
|
9103
9127
|
timeInterval
|
|
9104
9128
|
}) => {
|
|
@@ -9361,7 +9385,7 @@ var Trading = (props) => {
|
|
|
9361
9385
|
return /* @__PURE__ */ jsx(MobileLayout4, { ...props });
|
|
9362
9386
|
}
|
|
9363
9387
|
return /* @__PURE__ */ jsx(
|
|
9364
|
-
|
|
9388
|
+
InjectableDesktopLayout,
|
|
9365
9389
|
{
|
|
9366
9390
|
className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
|
|
9367
9391
|
...props
|
|
@@ -9413,6 +9437,6 @@ var TradingPage = (props) => {
|
|
|
9413
9437
|
init_tradingPageContext();
|
|
9414
9438
|
init_hooks();
|
|
9415
9439
|
|
|
9416
|
-
export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook2 as OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, RiskRate, RiskRateWidget, SplitLayout, Trading, TradingPage, TradingPageContext, TradingPageProvider, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
|
|
9440
|
+
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 };
|
|
9417
9441
|
//# sourceMappingURL=index.mjs.map
|
|
9418
9442
|
//# sourceMappingURL=index.mjs.map
|