@orderly.network/trading 3.0.4-alpha.1 → 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 +127 -70
- package/dist/index.d.ts +127 -70
- package/dist/index.js +40 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -27
- 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
|
{
|
|
@@ -6911,17 +6933,10 @@ var Account = (props) => {
|
|
|
6911
6933
|
}
|
|
6912
6934
|
);
|
|
6913
6935
|
};
|
|
6914
|
-
|
|
6915
|
-
name: "mobile-account-menu",
|
|
6916
|
-
scope: ["*"],
|
|
6917
|
-
positions: [ExtensionPositionEnum.MobileAccountMenu],
|
|
6918
|
-
builder: useAccountScript,
|
|
6919
|
-
__isInternal: true
|
|
6920
|
-
})((props) => {
|
|
6921
|
-
return /* @__PURE__ */ jsx(Account, { ...props });
|
|
6922
|
-
});
|
|
6936
|
+
var InjectableAccount = injectable(Account, "Account.MobileAccountMenu");
|
|
6923
6937
|
var MobileAccountMenuExtension = () => {
|
|
6924
|
-
|
|
6938
|
+
const state = useAccountScript();
|
|
6939
|
+
return /* @__PURE__ */ jsx(InjectableAccount, { ...state });
|
|
6925
6940
|
};
|
|
6926
6941
|
|
|
6927
6942
|
// src/components/mobile/bottomNavBar/balance/balance.ui.tsx
|
|
@@ -8396,7 +8411,10 @@ var DesktopLayout4 = (props) => {
|
|
|
8396
8411
|
}
|
|
8397
8412
|
];
|
|
8398
8413
|
},
|
|
8399
|
-
sideEffects: ({
|
|
8414
|
+
sideEffects: ({
|
|
8415
|
+
active,
|
|
8416
|
+
dragOverlay
|
|
8417
|
+
}) => {
|
|
8400
8418
|
active.node.style.opacity = "0";
|
|
8401
8419
|
const innerElement = dragOverlay.node.querySelector(".inner-content");
|
|
8402
8420
|
if (innerElement) {
|
|
@@ -8469,9 +8487,6 @@ var DesktopLayout4 = (props) => {
|
|
|
8469
8487
|
const marketsWidget = /* @__PURE__ */ jsx(
|
|
8470
8488
|
SideMarketsWidget,
|
|
8471
8489
|
{
|
|
8472
|
-
resizeable,
|
|
8473
|
-
panelSize,
|
|
8474
|
-
onPanelSizeChange,
|
|
8475
8490
|
symbol: props.symbol,
|
|
8476
8491
|
onSymbolChange: props.onSymbolChange
|
|
8477
8492
|
}
|
|
@@ -9102,6 +9117,12 @@ var DesktopLayout4 = (props) => {
|
|
|
9102
9117
|
}
|
|
9103
9118
|
);
|
|
9104
9119
|
};
|
|
9120
|
+
|
|
9121
|
+
// src/pages/trading/trading.injectable.tsx
|
|
9122
|
+
var InjectableDesktopLayout = injectable(
|
|
9123
|
+
DesktopLayout4,
|
|
9124
|
+
"Trading.Layout.Desktop"
|
|
9125
|
+
);
|
|
9105
9126
|
var Countdown = ({
|
|
9106
9127
|
timeInterval
|
|
9107
9128
|
}) => {
|
|
@@ -9364,7 +9385,7 @@ var Trading = (props) => {
|
|
|
9364
9385
|
return /* @__PURE__ */ jsx(MobileLayout4, { ...props });
|
|
9365
9386
|
}
|
|
9366
9387
|
return /* @__PURE__ */ jsx(
|
|
9367
|
-
|
|
9388
|
+
InjectableDesktopLayout,
|
|
9368
9389
|
{
|
|
9369
9390
|
className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
|
|
9370
9391
|
...props
|