@orderly.network/trading 3.0.4 → 3.1.0-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.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -742,7 +742,7 @@ var init_dataList_ui = __esm({
|
|
|
742
742
|
};
|
|
743
743
|
LiquidationTab = () => {
|
|
744
744
|
const { t } = i18n.useTranslation();
|
|
745
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-
|
|
745
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-gap-x-1", children: [
|
|
746
746
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("positions.liquidation") }),
|
|
747
747
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
748
748
|
ui.Tooltip,
|
|
@@ -882,7 +882,7 @@ var init_dataList_ui = __esm({
|
|
|
882
882
|
classNames: {
|
|
883
883
|
scrollRoot: "oui-h-full oui-mb-6 oui-mt-0 oui-p-0 oui-pt-3 oui-h-[calc(100%_-_40px)]",
|
|
884
884
|
root: "oui-gap-4 oui-h-full",
|
|
885
|
-
desc: "oui-
|
|
885
|
+
desc: "oui-ms-1"
|
|
886
886
|
},
|
|
887
887
|
dataTableClassNames: {
|
|
888
888
|
header: "oui-bg-base-9",
|
|
@@ -963,7 +963,7 @@ var init_lastTrades_ui = __esm({
|
|
|
963
963
|
),
|
|
964
964
|
style: props.style,
|
|
965
965
|
children: [
|
|
966
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "oui-
|
|
966
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "oui-pe-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
967
967
|
Header,
|
|
968
968
|
{
|
|
969
969
|
base: props.base,
|
|
@@ -998,7 +998,7 @@ var init_lastTrades_ui = __esm({
|
|
|
998
998
|
// >
|
|
999
999
|
// <Box className={cn("oui-flex-1", classNames?.left)}>{left}</Box>
|
|
1000
1000
|
// <Box className={cn("oui-flex-1", classNames?.mid)}>{mid}</Box>
|
|
1001
|
-
// <Box className={cn("oui-flex-1 oui-text-
|
|
1001
|
+
// <Box className={cn("oui-flex-1 oui-text-end", classNames?.right)}>
|
|
1002
1002
|
// {right}
|
|
1003
1003
|
// </Box>
|
|
1004
1004
|
// </Flex>
|
|
@@ -1012,7 +1012,7 @@ var init_lastTrades_ui = __esm({
|
|
|
1012
1012
|
children: [
|
|
1013
1013
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1", classNames?.left), children: left }),
|
|
1014
1014
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1", classNames?.mid), children: mid }),
|
|
1015
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-text-
|
|
1015
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-text-end", classNames?.right), children: right })
|
|
1016
1016
|
]
|
|
1017
1017
|
}
|
|
1018
1018
|
)
|
|
@@ -1046,7 +1046,7 @@ var init_lastTrades_ui = __esm({
|
|
|
1046
1046
|
props.className,
|
|
1047
1047
|
"oui-overflow-auto"
|
|
1048
1048
|
),
|
|
1049
|
-
contentClassName: "!oui-space-y-0 oui-
|
|
1049
|
+
contentClassName: "!oui-space-y-0 -oui-me-[4px]",
|
|
1050
1050
|
renderItem: (item, index) => {
|
|
1051
1051
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1052
1052
|
Row,
|
|
@@ -1354,7 +1354,7 @@ var init_assetView_ui = __esm({
|
|
|
1354
1354
|
visible,
|
|
1355
1355
|
size: "2xs",
|
|
1356
1356
|
unit,
|
|
1357
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
1357
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-0.5",
|
|
1358
1358
|
as: "div",
|
|
1359
1359
|
rule,
|
|
1360
1360
|
padding: false,
|
|
@@ -1888,8 +1888,8 @@ var init_cellBar = __esm({
|
|
|
1888
1888
|
"div",
|
|
1889
1889
|
{
|
|
1890
1890
|
className: ui.cn(
|
|
1891
|
-
"oui-absolute oui-
|
|
1892
|
-
direction === 0 /* LEFT_TO_RIGHT */ && "oui-
|
|
1891
|
+
"oui-absolute oui-end-[-100%] oui-top-0 oui-h-full oui-w-full oui-transition-transform oui-pointer-events-none",
|
|
1892
|
+
direction === 0 /* LEFT_TO_RIGHT */ && "oui-start-[-100%]",
|
|
1893
1893
|
props.className
|
|
1894
1894
|
),
|
|
1895
1895
|
style: transform
|
|
@@ -1933,7 +1933,7 @@ var init_cell_desktop = __esm({
|
|
|
1933
1933
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1934
1934
|
"div",
|
|
1935
1935
|
{
|
|
1936
|
-
className: "oui-relative oui-flex oui-cursor-pointer oui-flex-row oui-justify-between oui-
|
|
1936
|
+
className: "oui-relative oui-flex oui-cursor-pointer oui-flex-row oui-justify-between oui-ps-3 oui-text-xs oui-tabular-nums oui-text-base-contrast-80",
|
|
1937
1937
|
style: { height: `${cellHeight}px` },
|
|
1938
1938
|
onClick: () => {
|
|
1939
1939
|
if (Number.isNaN(price) || Number.isNaN(quantity)) {
|
|
@@ -1948,7 +1948,7 @@ var init_cell_desktop = __esm({
|
|
|
1948
1948
|
"div",
|
|
1949
1949
|
{
|
|
1950
1950
|
className: ui.cn(
|
|
1951
|
-
"oui-
|
|
1951
|
+
"oui-me-2 oui-flex oui-basis-7/12 oui-flex-row oui-items-center",
|
|
1952
1952
|
showTotal && "oui-basis-5/12"
|
|
1953
1953
|
),
|
|
1954
1954
|
children: [
|
|
@@ -1956,13 +1956,13 @@ var init_cell_desktop = __esm({
|
|
|
1956
1956
|
"div",
|
|
1957
1957
|
{
|
|
1958
1958
|
className: ui.cn(
|
|
1959
|
-
"oui-flex-1 oui-text-
|
|
1959
|
+
"oui-flex-1 oui-text-start",
|
|
1960
1960
|
props.type === "ask" /* ASK */ ? "oui-text-trade-loss" : "oui-text-trade-profit"
|
|
1961
1961
|
),
|
|
1962
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp, children: price })
|
|
1962
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp, dir: "ltr", children: price })
|
|
1963
1963
|
}
|
|
1964
1964
|
),
|
|
1965
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex-1 oui-text-
|
|
1965
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex-1 oui-text-end oui-text-base-contrast-80", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: base_dp, dir: "ltr", children: quantity }) })
|
|
1966
1966
|
]
|
|
1967
1967
|
}
|
|
1968
1968
|
),
|
|
@@ -1975,11 +1975,11 @@ var init_cell_desktop = __esm({
|
|
|
1975
1975
|
),
|
|
1976
1976
|
children: [
|
|
1977
1977
|
showTotal ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1978
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-
|
|
1979
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-
|
|
1980
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("oui-flex-1 oui-
|
|
1981
|
-
coinType === base && /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: base_dp, className: "oui-z-10", children: accumulated }),
|
|
1982
|
-
coinType === quote && /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: 0, className: "oui-z-10", children: totalAmount })
|
|
1978
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }) }),
|
|
1979
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount }) })
|
|
1980
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: [
|
|
1981
|
+
coinType === base && /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }),
|
|
1982
|
+
coinType === quote && /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount })
|
|
1983
1983
|
] }),
|
|
1984
1984
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
1985
|
CellBar,
|
|
@@ -1996,7 +1996,7 @@ var init_cell_desktop = __esm({
|
|
|
1996
1996
|
"div",
|
|
1997
1997
|
{
|
|
1998
1998
|
className: ui.cn(
|
|
1999
|
-
"oui-pointer-events-none oui-absolute oui-
|
|
1999
|
+
"oui-pointer-events-none oui-absolute oui-start-[4px] oui-size-[4px] oui-rounded-full",
|
|
2000
2000
|
props.type === "ask" /* ASK */ && "oui-bg-trade-loss",
|
|
2001
2001
|
props.type === "bid" /* BID */ && "oui-bg-trade-profit"
|
|
2002
2002
|
),
|
|
@@ -2764,12 +2764,12 @@ var init_markPrice_desktop = __esm({
|
|
|
2764
2764
|
DesktopMarkPrice = (props) => {
|
|
2765
2765
|
const { markPrice = 0, lastPrice, asks, bids, symbolInfo } = props;
|
|
2766
2766
|
const { showTotal } = exports.useOrderBookContext();
|
|
2767
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-flex-row oui-
|
|
2767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-flex-row oui-ps-3 oui-tabular-nums oui-justify-between oui-text-base-contrast-80 oui-text-xs oui-relative oui-cursor-pointer oui-py-[6px]", children: [
|
|
2768
2768
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2769
2769
|
"div",
|
|
2770
2770
|
{
|
|
2771
2771
|
className: ui.cn(
|
|
2772
|
-
"oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-
|
|
2772
|
+
"oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-me-2 oui-justify-between",
|
|
2773
2773
|
showTotal && "oui-basis-5/12"
|
|
2774
2774
|
),
|
|
2775
2775
|
children: [
|
|
@@ -2792,7 +2792,7 @@ var init_markPrice_desktop = __esm({
|
|
|
2792
2792
|
className: ui.cn(
|
|
2793
2793
|
"oui-basis-5/12 oui-flex oui-items-center oui-fex-row oui-overflow-hidden oui-relative oui-justify-end",
|
|
2794
2794
|
showTotal && "oui-basis-7/12",
|
|
2795
|
-
"oui-
|
|
2795
|
+
"oui-pe-3"
|
|
2796
2796
|
),
|
|
2797
2797
|
children: /* @__PURE__ */ jsxRuntime.jsx(Spread, { asks, bids })
|
|
2798
2798
|
}
|
|
@@ -2917,7 +2917,7 @@ var init_index_desktop = __esm({
|
|
|
2917
2917
|
showBuySellRatio ? "oui-grid-rows-[auto,auto,1fr,auto,1fr,auto]" : "oui-grid-rows-[auto,auto,1fr,auto,1fr]"
|
|
2918
2918
|
),
|
|
2919
2919
|
children: [
|
|
2920
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { justify: "between", itemAlign: "center", className: "oui-
|
|
2920
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { justify: "between", itemAlign: "center", className: "oui-pe-3", children: [
|
|
2921
2921
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2922
2922
|
DesktopDepthSelect,
|
|
2923
2923
|
{
|
|
@@ -3855,10 +3855,10 @@ var init_buySellRatioBar = __esm({
|
|
|
3855
3855
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3856
3856
|
"div",
|
|
3857
3857
|
{
|
|
3858
|
-
className: "oui-bg-trade-profit oui-
|
|
3858
|
+
className: "oui-bg-trade-profit oui-me-[2px] oui-rounded-sm",
|
|
3859
3859
|
style: {
|
|
3860
3860
|
position: "absolute",
|
|
3861
|
-
|
|
3861
|
+
insetInlineStart: 0,
|
|
3862
3862
|
top: 0,
|
|
3863
3863
|
width: `${buyPercentage}%`,
|
|
3864
3864
|
height: "100%"
|
|
@@ -3868,10 +3868,10 @@ var init_buySellRatioBar = __esm({
|
|
|
3868
3868
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3869
3869
|
"div",
|
|
3870
3870
|
{
|
|
3871
|
-
className: "oui-bg-trade-loss oui-
|
|
3871
|
+
className: "oui-bg-trade-loss oui-ms-[2px] oui-rounded-sm",
|
|
3872
3872
|
style: {
|
|
3873
3873
|
position: "absolute",
|
|
3874
|
-
|
|
3874
|
+
insetInlineStart: `${buyPercentage}%`,
|
|
3875
3875
|
top: 0,
|
|
3876
3876
|
width: `${sellPercentage}%`,
|
|
3877
3877
|
height: "100%"
|
|
@@ -4093,7 +4093,7 @@ var init_orderBookAndTrades_ui = __esm({
|
|
|
4093
4093
|
Title2,
|
|
4094
4094
|
{
|
|
4095
4095
|
title: t("trading.orderBook"),
|
|
4096
|
-
className: "oui-
|
|
4096
|
+
className: "oui-ps-3 oui-text-sm"
|
|
4097
4097
|
}
|
|
4098
4098
|
),
|
|
4099
4099
|
/* @__PURE__ */ jsxRuntime.jsx(React12__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4159,8 +4159,8 @@ var init_orderBookAndTrades_ui = __esm({
|
|
|
4159
4159
|
props.setTab(tab);
|
|
4160
4160
|
},
|
|
4161
4161
|
classNames: {
|
|
4162
|
-
tabsList: "oui-
|
|
4163
|
-
// tabsContent: props.tab === "lastTrades" ? 'oui-
|
|
4162
|
+
tabsList: "oui-ps-3"
|
|
4163
|
+
// tabsContent: props.tab === "lastTrades" ? 'oui-ps-3' : ''
|
|
4164
4164
|
},
|
|
4165
4165
|
size: "lg",
|
|
4166
4166
|
children: [
|
|
@@ -5462,14 +5462,14 @@ var init_tradingview_ui = __esm({
|
|
|
5462
5462
|
{
|
|
5463
5463
|
ref: props.dragRef,
|
|
5464
5464
|
className: ui.cn(
|
|
5465
|
-
"oui-h-[1px] oui-absolute oui-
|
|
5465
|
+
"oui-h-[1px] oui-absolute oui-start-0 oui-end-0 oui-bottom-0 oui-top-0 oui-z-10 oui-mt-[7px] oui-bg-base-contrast-12",
|
|
5466
5466
|
props.dragging && "oui-bg-primary "
|
|
5467
5467
|
),
|
|
5468
5468
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5469
5469
|
KlineDragIcon,
|
|
5470
5470
|
{
|
|
5471
5471
|
className: ui.cn(
|
|
5472
|
-
"oui-w-3 oui-h-3 oui-absolute oui-
|
|
5472
|
+
"oui-w-3 oui-h-3 oui-absolute oui-start-1/2 -oui-top-[5px] -oui-translate-y-[0.5px] oui-text-base-contrast-12",
|
|
5473
5473
|
props.dragging && " oui-text-primary"
|
|
5474
5474
|
)
|
|
5475
5475
|
}
|
|
@@ -6562,7 +6562,7 @@ var AccountInfo = (props) => {
|
|
|
6562
6562
|
{
|
|
6563
6563
|
size: "2xs",
|
|
6564
6564
|
intensity: 80,
|
|
6565
|
-
prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-
|
|
6565
|
+
prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-pe-1" }),
|
|
6566
6566
|
children: props.chainName
|
|
6567
6567
|
}
|
|
6568
6568
|
)
|
|
@@ -6981,7 +6981,7 @@ var Chain = (props) => {
|
|
|
6981
6981
|
},
|
|
6982
6982
|
children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "oui-relative oui-rounded-t-[6px] oui-rounded-bl-[6px] oui-rounded-br-[3px] oui-bg-base-5 oui-px-2 oui-h-7 oui-flex oui-items-center", children: [
|
|
6983
6983
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ChainIcon, { chainId: props.currentChainId, size: "2xs" }),
|
|
6984
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-
|
|
6984
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-end-0 oui-bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6985
6985
|
"svg",
|
|
6986
6986
|
{
|
|
6987
6987
|
width: "9",
|
|
@@ -7432,7 +7432,7 @@ var RiskIndicator = (props) => {
|
|
|
7432
7432
|
"div",
|
|
7433
7433
|
{
|
|
7434
7434
|
className: ui.cn(
|
|
7435
|
-
"oui-relative oui-w-[2px] oui-h-[2px] oui-rounded-full oui-bg-base-contrast after:oui-block after:oui-content-[''] after:oui-absolute after:oui-
|
|
7435
|
+
"oui-relative oui-w-[2px] oui-h-[2px] oui-rounded-full oui-bg-base-contrast after:oui-block after:oui-content-[''] after:oui-absolute after:oui-end-0 after:oui-w-[10px] after:oui-h-[2px] after:oui-bg-base-contrast-50",
|
|
7436
7436
|
className
|
|
7437
7437
|
// {
|
|
7438
7438
|
// "oui-rotate-0": value > 1,
|
|
@@ -7838,7 +7838,7 @@ var SortablePanel = (props) => {
|
|
|
7838
7838
|
{
|
|
7839
7839
|
...attributes,
|
|
7840
7840
|
...listeners,
|
|
7841
|
-
className: "oui-absolute oui-
|
|
7841
|
+
className: "oui-absolute oui-end-0 oui-top-4 oui-cursor-move oui-py-1",
|
|
7842
7842
|
style: { touchAction: "none" },
|
|
7843
7843
|
ref: setActivatorNodeRef,
|
|
7844
7844
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7907,7 +7907,7 @@ var RwaOutsideMarketHoursNotify = () => {
|
|
|
7907
7907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7908
7908
|
"button",
|
|
7909
7909
|
{
|
|
7910
|
-
className: "oui-w-6 oui-h-6 oui-
|
|
7910
|
+
className: "oui-w-6 oui-h-6 oui-end-0 oui-top-0 oui-absolute oui-bg-base-8 oui-rounded-tr-[10px] oui-rounded-bl-[10px] oui-inline-flex oui-justify-center oui-items-center oui-gap-2.5 oui-cursor-pointer",
|
|
7911
7911
|
onClick: closeNotify,
|
|
7912
7912
|
children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { opacity: 1, className: "oui-text-base-contrast", size: 16 })
|
|
7913
7913
|
}
|
|
@@ -9286,7 +9286,7 @@ var MobileLayout4 = (props) => {
|
|
|
9286
9286
|
]
|
|
9287
9287
|
}
|
|
9288
9288
|
);
|
|
9289
|
-
}, [isRwa, open,
|
|
9289
|
+
}, [closeTimeInterval, isRwa, open, t]);
|
|
9290
9290
|
const symbolInfoBar = /* @__PURE__ */ jsxRuntime.jsx(
|
|
9291
9291
|
markets.SymbolInfoBarWidget,
|
|
9292
9292
|
{
|