@orderly.network/markets 2.8.10 → 2.8.11-alpha.1
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 +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +89 -161
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -164
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React6, { createContext, useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React6, { memo, createContext, useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useSymbolsInfo, useMarkets, MarketsType, useFundingRateHistory, useFundingRates, useQuery, useMarketsStream, useLocalStorage, useGetRwaSymbolInfo, useTickerStream, useFundingRate, useMarketsStore, useFundingDetails, useSessionStorage, useFundingRateBySymbol, usePositionStream, isCurrentlyTrading } from '@orderly.network/hooks';
|
|
4
|
+
import { Flex, TokenIcon, Text, Box, cn, Marquee, Checkbox, Divider, useEmblaCarousel, useScreen, Badge, Tooltip, CloseIcon, CheckedSquareFillIcon, CheckSquareEmptyIcon, Button, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Input, CloseCircleFillIcon, PlusIcon, DataTable, usePagination, Tabs, TabPanel, EmptyDataState, NewsFillIcon, modal, GradientText, EmptyStateIcon, Picker, Select } from '@orderly.network/ui';
|
|
3
5
|
import { useTranslation, Trans, i18n } from '@orderly.network/i18n';
|
|
4
|
-
import { Box, cn, Flex, Marquee, Checkbox, Divider, Text, TokenIcon, useEmblaCarousel, useScreen, Badge, Tooltip, CloseIcon, CheckedSquareFillIcon, CheckSquareEmptyIcon, Button, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Input, CloseCircleFillIcon, PlusIcon, DataTable, usePagination, Tabs, TabPanel, EmptyDataState, NewsFillIcon, modal, GradientText, EmptyStateIcon, Picker, Select } from '@orderly.network/ui';
|
|
5
6
|
import { Decimal, formatSymbol } from '@orderly.network/utils';
|
|
6
|
-
import { useMarkets, MarketsType, useFundingRateHistory, useFundingRates, useQuery, useMarketsStream, useLocalStorage, useGetRwaSymbolInfo, useTickerStream, useSymbolsInfo, useFundingRate, useMarketsStore, useFundingDetails, useSessionStorage, useFundingRateBySymbol, usePositionStream, isCurrentlyTrading } from '@orderly.network/hooks';
|
|
7
7
|
import { pick } from 'ramda';
|
|
8
8
|
import { LeftNavUI } from '@orderly.network/ui-scaffold';
|
|
9
9
|
|
|
@@ -43,6 +43,32 @@ var init_marketsProvider = __esm({
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
+
var SymbolDisplay;
|
|
47
|
+
var init_symbolDisplay = __esm({
|
|
48
|
+
"src/components/symbolDisplay.tsx"() {
|
|
49
|
+
SymbolDisplay = memo((props) => {
|
|
50
|
+
const { children, size = "xs", ...rest } = props;
|
|
51
|
+
const symbol = children;
|
|
52
|
+
const symbolsInfo = useSymbolsInfo();
|
|
53
|
+
const displayName = symbolsInfo[symbol]("displayName");
|
|
54
|
+
if (displayName) {
|
|
55
|
+
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, className: props.className, children: [
|
|
56
|
+
props.showIcon && /* @__PURE__ */ jsx(TokenIcon, { size, symbol }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Text,
|
|
59
|
+
{
|
|
60
|
+
size: "xs",
|
|
61
|
+
weight: "semibold",
|
|
62
|
+
className: "oui-whitespace-nowrap oui-break-normal",
|
|
63
|
+
children: displayName
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsx(Text.formatted, { size: "xs", rule: "symbol", weight: "semibold", ...rest, children: symbol });
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
46
72
|
var EditIcon, TrashIcon, AllMarketsIcon, NewListingsIcon, FavoritesIcon, UnFavoritesIcon, SearchIcon, MoveToTopIcon, OrderlyIcon, FavoritesIcon2, UnFavoritesIcon2, TopIcon, DeleteIcon, AddIcon, ActiveAddIcon, ExpandIcon, CollapseIcon, FilterIcon, TriangleDownIcon, ArrowLeftIcon;
|
|
47
73
|
var init_icons = __esm({
|
|
48
74
|
"src/icons.tsx"() {
|
|
@@ -396,6 +422,7 @@ var MarketsHeader, BlockList, BlockItem, CardItem, ListItem, ScrollIndicator;
|
|
|
396
422
|
var init_marketsHeader_ui = __esm({
|
|
397
423
|
"src/pages/home/marketsHeader/marketsHeader.ui.tsx"() {
|
|
398
424
|
init_marketsProvider();
|
|
425
|
+
init_symbolDisplay();
|
|
399
426
|
init_icons();
|
|
400
427
|
MarketsHeader = (props) => {
|
|
401
428
|
const {
|
|
@@ -568,17 +595,7 @@ var init_marketsHeader_ui = __esm({
|
|
|
568
595
|
props.onSymbol(item);
|
|
569
596
|
},
|
|
570
597
|
children: [
|
|
571
|
-
/* @__PURE__ */ jsx(
|
|
572
|
-
Text.formatted,
|
|
573
|
-
{
|
|
574
|
-
rule: "symbol",
|
|
575
|
-
formatString: "base",
|
|
576
|
-
size: "xs",
|
|
577
|
-
weight: "semibold",
|
|
578
|
-
showIcon: true,
|
|
579
|
-
children: item.symbol
|
|
580
|
-
}
|
|
581
|
-
) }),
|
|
598
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", showIcon: true, className: "oui-w-full", children: item.symbol }),
|
|
582
599
|
/* @__PURE__ */ jsx(Flex, { width: "100%", justify: "end", children: /* @__PURE__ */ jsx(
|
|
583
600
|
Text.numeral,
|
|
584
601
|
{
|
|
@@ -684,10 +701,15 @@ function searchBySymbol(list, searchValue = "", formatString) {
|
|
|
684
701
|
list?.forEach((item) => {
|
|
685
702
|
const formattedSymbol = formatSymbol(item.symbol, formatString);
|
|
686
703
|
const symbolLower = formattedSymbol.toLowerCase();
|
|
687
|
-
|
|
688
|
-
|
|
704
|
+
const displayName = item.displayName;
|
|
705
|
+
const displayNameLower = displayName ? String(displayName).toLowerCase() : null;
|
|
706
|
+
const matchesSymbol = reg.test(formattedSymbol);
|
|
707
|
+
const matchesDisplayName = displayNameLower ? reg.test(displayNameLower) : false;
|
|
708
|
+
if (matchesSymbol || matchesDisplayName) {
|
|
709
|
+
const searchText = displayNameLower || symbolLower;
|
|
710
|
+
if (searchText === searchValueLower) {
|
|
689
711
|
exactMatches.push(item);
|
|
690
|
-
} else if (
|
|
712
|
+
} else if (searchText.startsWith(searchValueLower)) {
|
|
691
713
|
startsWithMatches.push(item);
|
|
692
714
|
} else {
|
|
693
715
|
otherMatches.push(item);
|
|
@@ -695,12 +717,10 @@ function searchBySymbol(list, searchValue = "", formatString) {
|
|
|
695
717
|
}
|
|
696
718
|
});
|
|
697
719
|
const compareSymbols = (a, b) => {
|
|
698
|
-
const
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
|
|
702
|
-
if (symbolA > symbolB)
|
|
703
|
-
return 1;
|
|
720
|
+
const textA = a.displayName || formatSymbol(a.symbol, formatString);
|
|
721
|
+
const textB = b.displayName || formatSymbol(b.symbol, formatString);
|
|
722
|
+
if (textA < textB) return -1;
|
|
723
|
+
if (textA > textB) return 1;
|
|
704
724
|
return 0;
|
|
705
725
|
};
|
|
706
726
|
startsWithMatches.sort(compareSymbols);
|
|
@@ -731,12 +751,9 @@ var compareValues;
|
|
|
731
751
|
var init_utils = __esm({
|
|
732
752
|
"src/utils.ts"() {
|
|
733
753
|
compareValues = (aValue, bValue) => {
|
|
734
|
-
if (aValue == null && bValue == null)
|
|
735
|
-
|
|
736
|
-
if (
|
|
737
|
-
return 1;
|
|
738
|
-
if (bValue == null)
|
|
739
|
-
return -1;
|
|
754
|
+
if (aValue == null && bValue == null) return 0;
|
|
755
|
+
if (aValue == null) return 1;
|
|
756
|
+
if (bValue == null) return -1;
|
|
740
757
|
const aStr = String(aValue).trim();
|
|
741
758
|
const bStr = String(bValue).trim();
|
|
742
759
|
const aNum = Number(aStr);
|
|
@@ -795,8 +812,7 @@ function useDataSource() {
|
|
|
795
812
|
[markets]
|
|
796
813
|
);
|
|
797
814
|
const tvl = useMemo(() => {
|
|
798
|
-
if (!balance)
|
|
799
|
-
return 0;
|
|
815
|
+
if (!balance) return 0;
|
|
800
816
|
const { total_holding = 0 } = balance;
|
|
801
817
|
return new Decimal(total_holding).toNumber();
|
|
802
818
|
}, [balance]);
|
|
@@ -844,6 +860,7 @@ var MobileMarketsHeader, BlockList2, BlockItem2, CardItem2, ListItem2;
|
|
|
844
860
|
var init_marketsHeader_mobile_ui = __esm({
|
|
845
861
|
"src/pages/home/marketsHeader/marketsHeader.mobile.ui.tsx"() {
|
|
846
862
|
init_marketsProvider();
|
|
863
|
+
init_symbolDisplay();
|
|
847
864
|
init_icons();
|
|
848
865
|
MobileMarketsHeader = (props) => {
|
|
849
866
|
const {
|
|
@@ -1002,17 +1019,7 @@ var init_marketsHeader_mobile_ui = __esm({
|
|
|
1002
1019
|
props.onSymbol(item);
|
|
1003
1020
|
},
|
|
1004
1021
|
children: [
|
|
1005
|
-
/* @__PURE__ */ jsx(
|
|
1006
|
-
Text.formatted,
|
|
1007
|
-
{
|
|
1008
|
-
rule: "symbol",
|
|
1009
|
-
formatString: "base",
|
|
1010
|
-
size: "xs",
|
|
1011
|
-
weight: "semibold",
|
|
1012
|
-
showIcon: true,
|
|
1013
|
-
children: item.symbol
|
|
1014
|
-
}
|
|
1015
|
-
) }),
|
|
1022
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", showIcon: true, className: "oui-w-full", children: item.symbol }),
|
|
1016
1023
|
/* @__PURE__ */ jsx(Flex, { width: "100%", justify: "end", children: /* @__PURE__ */ jsx(
|
|
1017
1024
|
Text.numeral,
|
|
1018
1025
|
{
|
|
@@ -1063,6 +1070,7 @@ var CollapseMarkets;
|
|
|
1063
1070
|
var init_collapseMarkets = __esm({
|
|
1064
1071
|
"src/components/collapseMarkets/index.tsx"() {
|
|
1065
1072
|
init_marketsProvider();
|
|
1073
|
+
init_symbolDisplay();
|
|
1066
1074
|
CollapseMarkets = (props) => {
|
|
1067
1075
|
const { symbol, onSymbolChange } = useMarketsContext();
|
|
1068
1076
|
const { t } = useTranslation();
|
|
@@ -1074,16 +1082,7 @@ var init_collapseMarkets = __esm({
|
|
|
1074
1082
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gapY: 1, children: [
|
|
1075
1083
|
/* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
1076
1084
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: item.symbol, className: "oui-size-[18px]" }),
|
|
1077
|
-
/* @__PURE__ */ jsx(
|
|
1078
|
-
Text.formatted,
|
|
1079
|
-
{
|
|
1080
|
-
rule: "symbol",
|
|
1081
|
-
formatString: "base",
|
|
1082
|
-
size: "2xs",
|
|
1083
|
-
weight: "semibold",
|
|
1084
|
-
children: item.symbol
|
|
1085
|
-
}
|
|
1086
|
-
)
|
|
1085
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: item.symbol })
|
|
1087
1086
|
] }),
|
|
1088
1087
|
/* @__PURE__ */ jsx(Text, { size: "2xs", intensity: 36, children: t("markets.column.last") }),
|
|
1089
1088
|
/* @__PURE__ */ jsx(Text, { size: "2xs", intensity: 36, children: t("markets.column.24hPercentage") })
|
|
@@ -1528,6 +1527,7 @@ var init_column = __esm({
|
|
|
1528
1527
|
init_icons();
|
|
1529
1528
|
init_favoritesDropdownMenu();
|
|
1530
1529
|
init_rwaDotTooltip();
|
|
1530
|
+
init_symbolDisplay();
|
|
1531
1531
|
useSideMarketsColumns = (favorite, isFavoriteList = false) => {
|
|
1532
1532
|
const { t } = useTranslation();
|
|
1533
1533
|
return [
|
|
@@ -1567,16 +1567,7 @@ var init_column = __esm({
|
|
|
1567
1567
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gapY: 1, children: [
|
|
1568
1568
|
/* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
1569
1569
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: record.symbol, className: "oui-size-[18px]" }),
|
|
1570
|
-
/* @__PURE__ */ jsx(
|
|
1571
|
-
Text.formatted,
|
|
1572
|
-
{
|
|
1573
|
-
rule: "symbol",
|
|
1574
|
-
formatString: "base",
|
|
1575
|
-
size: "2xs",
|
|
1576
|
-
weight: "semibold",
|
|
1577
|
-
children: record.symbol
|
|
1578
|
-
}
|
|
1579
|
-
),
|
|
1570
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: record.symbol }),
|
|
1580
1571
|
/* @__PURE__ */ jsx(RwaDotTooltip, { record }),
|
|
1581
1572
|
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1582
1573
|
record.leverage,
|
|
@@ -1959,16 +1950,7 @@ function getSymbolColumn(favorite, isFavoriteList = false) {
|
|
|
1959
1950
|
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
1960
1951
|
favoritesIcon,
|
|
1961
1952
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: value, className: "oui-size-[18px]" }),
|
|
1962
|
-
/* @__PURE__ */ jsx(
|
|
1963
|
-
Text.formatted,
|
|
1964
|
-
{
|
|
1965
|
-
rule: "symbol",
|
|
1966
|
-
formatString: "base",
|
|
1967
|
-
size: "2xs",
|
|
1968
|
-
weight: "semibold",
|
|
1969
|
-
children: value
|
|
1970
|
-
}
|
|
1971
|
-
),
|
|
1953
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: value }),
|
|
1972
1954
|
/* @__PURE__ */ jsx(RwaDotTooltip, { record }),
|
|
1973
1955
|
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1974
1956
|
record.leverage,
|
|
@@ -2017,6 +1999,7 @@ var init_column2 = __esm({
|
|
|
2017
1999
|
init_icons();
|
|
2018
2000
|
init_favoritesDropdownMenu();
|
|
2019
2001
|
init_rwaDotTooltip();
|
|
2002
|
+
init_symbolDisplay();
|
|
2020
2003
|
}
|
|
2021
2004
|
});
|
|
2022
2005
|
var FavoritesEmpty;
|
|
@@ -2614,6 +2597,7 @@ var init_column3 = __esm({
|
|
|
2614
2597
|
"src/components/marketsListFull/column.tsx"() {
|
|
2615
2598
|
init_icons();
|
|
2616
2599
|
init_favoritesDropdownMenu();
|
|
2600
|
+
init_symbolDisplay();
|
|
2617
2601
|
useMarketsListFullColumns = (favorite, isFavoriteList = false) => {
|
|
2618
2602
|
const { t } = useTranslation();
|
|
2619
2603
|
const columns = useMemo(() => {
|
|
@@ -2657,17 +2641,7 @@ var init_column3 = __esm({
|
|
|
2657
2641
|
width: 90,
|
|
2658
2642
|
onSort: true,
|
|
2659
2643
|
render: (value) => {
|
|
2660
|
-
return /* @__PURE__ */ jsx(
|
|
2661
|
-
Text.formatted,
|
|
2662
|
-
{
|
|
2663
|
-
rule: "symbol",
|
|
2664
|
-
formatString: "base-type",
|
|
2665
|
-
size: "xs",
|
|
2666
|
-
weight: "semibold",
|
|
2667
|
-
showIcon: true,
|
|
2668
|
-
children: value
|
|
2669
|
-
}
|
|
2670
|
-
);
|
|
2644
|
+
return /* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", showIcon: true, children: value });
|
|
2671
2645
|
}
|
|
2672
2646
|
},
|
|
2673
2647
|
{
|
|
@@ -3312,6 +3286,7 @@ var init_expandMarkets = __esm({
|
|
|
3312
3286
|
var createFundingRenderer, useFundingOverviewColumns, FundingPeriodSelect;
|
|
3313
3287
|
var init_columns = __esm({
|
|
3314
3288
|
"src/components/fundingOverview/columns.tsx"() {
|
|
3289
|
+
init_symbolDisplay();
|
|
3315
3290
|
createFundingRenderer = (dp = 5) => (value) => {
|
|
3316
3291
|
if (value === 0) {
|
|
3317
3292
|
return /* @__PURE__ */ jsx(Text, { children: " - " });
|
|
@@ -3347,15 +3322,7 @@ var init_columns = __esm({
|
|
|
3347
3322
|
className: isMobile ? "oui-size-[18px]" : "oui-size-5"
|
|
3348
3323
|
}
|
|
3349
3324
|
),
|
|
3350
|
-
/* @__PURE__ */ jsx(
|
|
3351
|
-
Text.formatted,
|
|
3352
|
-
{
|
|
3353
|
-
rule: "symbol",
|
|
3354
|
-
formatString: "base-type",
|
|
3355
|
-
weight: "semibold",
|
|
3356
|
-
children: value
|
|
3357
|
-
}
|
|
3358
|
-
)
|
|
3325
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "xs", children: value })
|
|
3359
3326
|
] })
|
|
3360
3327
|
},
|
|
3361
3328
|
{
|
|
@@ -3534,8 +3501,7 @@ var init_fundingOverview_ui = __esm({
|
|
|
3534
3501
|
}
|
|
3535
3502
|
});
|
|
3536
3503
|
function getFundingInterval(next_funding_time, last_funding_rate_timestamp) {
|
|
3537
|
-
if (!next_funding_time || !last_funding_rate_timestamp)
|
|
3538
|
-
return 8;
|
|
3504
|
+
if (!next_funding_time || !last_funding_rate_timestamp) return 8;
|
|
3539
3505
|
const diff = next_funding_time - last_funding_rate_timestamp;
|
|
3540
3506
|
return Math.round(diff / 36e5);
|
|
3541
3507
|
}
|
|
@@ -3702,6 +3668,7 @@ var CDN_PREFIX, useFundingColumns;
|
|
|
3702
3668
|
var init_columns2 = __esm({
|
|
3703
3669
|
"src/components/fundingComparison/columns.tsx"() {
|
|
3704
3670
|
init_icons();
|
|
3671
|
+
init_symbolDisplay();
|
|
3705
3672
|
init_useEXchanges();
|
|
3706
3673
|
CDN_PREFIX = "https://oss.orderly.network/static/exchange_logo";
|
|
3707
3674
|
useFundingColumns = () => {
|
|
@@ -3733,16 +3700,7 @@ var init_columns2 = __esm({
|
|
|
3733
3700
|
className: isMobile ? "oui-size-[18px]" : "oui-size-5"
|
|
3734
3701
|
}
|
|
3735
3702
|
),
|
|
3736
|
-
/* @__PURE__ */ jsx(
|
|
3737
|
-
Text.formatted,
|
|
3738
|
-
{
|
|
3739
|
-
rule: "symbol",
|
|
3740
|
-
formatString: "base-type",
|
|
3741
|
-
size: "xs",
|
|
3742
|
-
weight: "semibold",
|
|
3743
|
-
children: value
|
|
3744
|
-
}
|
|
3745
|
-
)
|
|
3703
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "xs", children: value })
|
|
3746
3704
|
] })
|
|
3747
3705
|
},
|
|
3748
3706
|
{
|
|
@@ -4397,6 +4355,7 @@ var init_dataItem_ui = __esm({
|
|
|
4397
4355
|
var MarketItemComponent, MarketItem;
|
|
4398
4356
|
var init_marketItem_ui = __esm({
|
|
4399
4357
|
"src/components/horizontalMarkets/marketItem.ui.tsx"() {
|
|
4358
|
+
init_symbolDisplay();
|
|
4400
4359
|
MarketItemComponent = (props) => {
|
|
4401
4360
|
const { symbol, tickerData, isActive, onSymbolClick } = props;
|
|
4402
4361
|
const handleClick = React6.useCallback(() => {
|
|
@@ -4407,7 +4366,7 @@ var init_marketItem_ui = __esm({
|
|
|
4407
4366
|
{
|
|
4408
4367
|
direction: "row",
|
|
4409
4368
|
className: cn(
|
|
4410
|
-
"oui-
|
|
4369
|
+
"oui-mr-3 oui-h-[18px] oui-shrink-0 oui-cursor-pointer oui-items-center oui-rounded",
|
|
4411
4370
|
"oui-transition-all oui-duration-200"
|
|
4412
4371
|
),
|
|
4413
4372
|
onClick: handleClick,
|
|
@@ -4415,12 +4374,10 @@ var init_marketItem_ui = __esm({
|
|
|
4415
4374
|
/* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", className: "oui-mr-[6px]", children: [
|
|
4416
4375
|
/* @__PURE__ */ jsx(TokenIcon, { symbol, className: "oui-size-[18px]" }),
|
|
4417
4376
|
/* @__PURE__ */ jsx(
|
|
4418
|
-
|
|
4377
|
+
SymbolDisplay,
|
|
4419
4378
|
{
|
|
4420
|
-
rule: "symbol",
|
|
4421
4379
|
formatString: "base",
|
|
4422
|
-
size: "
|
|
4423
|
-
weight: "semibold",
|
|
4380
|
+
size: "2xs",
|
|
4424
4381
|
className: "oui-text-base-contrast-80",
|
|
4425
4382
|
children: symbol
|
|
4426
4383
|
}
|
|
@@ -4936,6 +4893,7 @@ init_favoritesTabs();
|
|
|
4936
4893
|
init_marketsList();
|
|
4937
4894
|
init_rwaTab();
|
|
4938
4895
|
init_useFavoritesExtraProps();
|
|
4896
|
+
init_symbolDisplay();
|
|
4939
4897
|
var LIST_ROW_COMPACT = "oui-h-auto";
|
|
4940
4898
|
var TABLE_CLASSNAMES = {
|
|
4941
4899
|
scroll: "oui-px-0",
|
|
@@ -4982,16 +4940,7 @@ var SubMenuMarkets = (props) => {
|
|
|
4982
4940
|
render: (_, record) => {
|
|
4983
4941
|
return /* @__PURE__ */ jsx("div", { className: "oui-mx-[-8px]", children: /* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
4984
4942
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: record.symbol, className: "oui-size-[18px]" }),
|
|
4985
|
-
/* @__PURE__ */ jsx(
|
|
4986
|
-
Text.formatted,
|
|
4987
|
-
{
|
|
4988
|
-
rule: "symbol",
|
|
4989
|
-
formatString: "base",
|
|
4990
|
-
size: "2xs",
|
|
4991
|
-
weight: "semibold",
|
|
4992
|
-
children: record.symbol
|
|
4993
|
-
}
|
|
4994
|
-
),
|
|
4943
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: record.symbol }),
|
|
4995
4944
|
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
4996
4945
|
record.leverage,
|
|
4997
4946
|
"x"
|
|
@@ -5231,6 +5180,7 @@ init_useFavoritesExtraProps();
|
|
|
5231
5180
|
// src/components/marketsSheet/column.tsx
|
|
5232
5181
|
init_icons();
|
|
5233
5182
|
init_favoritesDropdownMenu();
|
|
5183
|
+
init_symbolDisplay();
|
|
5234
5184
|
var getMarketsSheetColumns = (favorite, isFavoriteList = false) => {
|
|
5235
5185
|
return [
|
|
5236
5186
|
{
|
|
@@ -5269,16 +5219,7 @@ var getMarketsSheetColumns = (favorite, isFavoriteList = false) => {
|
|
|
5269
5219
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gapY: 1, children: [
|
|
5270
5220
|
/* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
5271
5221
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: record.symbol, className: "oui-size-[18px]" }),
|
|
5272
|
-
/* @__PURE__ */ jsx(
|
|
5273
|
-
Text.formatted,
|
|
5274
|
-
{
|
|
5275
|
-
rule: "symbol",
|
|
5276
|
-
formatString: "base",
|
|
5277
|
-
size: "2xs",
|
|
5278
|
-
weight: "semibold",
|
|
5279
|
-
children: record.symbol
|
|
5280
|
-
}
|
|
5281
|
-
),
|
|
5222
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: record.symbol }),
|
|
5282
5223
|
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
5283
5224
|
record.leverage,
|
|
5284
5225
|
"x"
|
|
@@ -5477,6 +5418,7 @@ var MarketsSheetWidget = (props) => {
|
|
|
5477
5418
|
|
|
5478
5419
|
// src/components/symbolInfoBar/symbolInfoBar.ui.tsx
|
|
5479
5420
|
init_icons();
|
|
5421
|
+
init_symbolDisplay();
|
|
5480
5422
|
var RwaTooltip = (props) => {
|
|
5481
5423
|
const { isRwa, open, closeTimeInterval, openTimeInterval } = props;
|
|
5482
5424
|
const { isMobile } = useScreen();
|
|
@@ -5629,21 +5571,11 @@ var SymbolInfoBar = (props) => {
|
|
|
5629
5571
|
const symbolView = /* @__PURE__ */ jsxs(
|
|
5630
5572
|
Flex,
|
|
5631
5573
|
{
|
|
5632
|
-
className: "oui-cursor-pointer oui-gap-x-[6px]
|
|
5574
|
+
className: "oui-h-5 oui-cursor-pointer oui-gap-x-[6px]",
|
|
5633
5575
|
onClick: onSymbol,
|
|
5634
5576
|
children: [
|
|
5635
|
-
/* @__PURE__ */ jsx(
|
|
5636
|
-
|
|
5637
|
-
{
|
|
5638
|
-
className: "oui-break-normal oui-whitespace-nowrap",
|
|
5639
|
-
rule: "symbol",
|
|
5640
|
-
formatString: "base-type",
|
|
5641
|
-
size: "sm",
|
|
5642
|
-
weight: "semibold",
|
|
5643
|
-
children: symbol
|
|
5644
|
-
}
|
|
5645
|
-
),
|
|
5646
|
-
/* @__PURE__ */ jsx(TriangleDownIcon, { className: "oui-text-base-contrast-54 oui-w-[14px] oui-h-[14px]" })
|
|
5577
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "sm", children: symbol }),
|
|
5578
|
+
/* @__PURE__ */ jsx(TriangleDownIcon, { className: "oui-size-[14px] oui-text-base-contrast-54" })
|
|
5647
5579
|
]
|
|
5648
5580
|
}
|
|
5649
5581
|
);
|
|
@@ -5652,11 +5584,11 @@ var SymbolInfoBar = (props) => {
|
|
|
5652
5584
|
{
|
|
5653
5585
|
className: cn(
|
|
5654
5586
|
"oui-symbol-info-bar-mobile",
|
|
5655
|
-
"oui-
|
|
5587
|
+
"oui-h-full oui-font-semibold",
|
|
5656
5588
|
props.className
|
|
5657
5589
|
),
|
|
5658
5590
|
children: [
|
|
5659
|
-
/* @__PURE__ */ jsxs(Flex, { gapX: 3, className: "oui-flex-1 oui-overflow-hidden
|
|
5591
|
+
/* @__PURE__ */ jsxs(Flex, { gapX: 3, className: "oui-h-full oui-flex-1 oui-overflow-hidden", children: [
|
|
5660
5592
|
/* @__PURE__ */ jsxs(Flex, { gapX: 3, children: [
|
|
5661
5593
|
/* @__PURE__ */ jsx(TokenIcon, { symbol, size: "xs" }),
|
|
5662
5594
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", children: [
|
|
@@ -5818,8 +5750,7 @@ var useFundingRateHintScript = (symbol) => {
|
|
|
5818
5750
|
return `${new Decimal(est_funding_rate).mul(notional).todp(4).toNumber()}`;
|
|
5819
5751
|
}, [est_funding_rate, notional, rows]);
|
|
5820
5752
|
const calculateAnnualizedRate = (rate, intervalHours) => {
|
|
5821
|
-
if (!rate || !intervalHours)
|
|
5822
|
-
return void 0;
|
|
5753
|
+
if (!rate || !intervalHours) return void 0;
|
|
5823
5754
|
const annualizedRate = new Decimal(rate).mul(24).div(intervalHours).mul(365);
|
|
5824
5755
|
return annualizedRate.todp(2, Decimal.ROUND_DOWN).toNumber();
|
|
5825
5756
|
};
|
|
@@ -5872,6 +5803,9 @@ var FundingRateHintWidget = (props) => {
|
|
|
5872
5803
|
const state = useFundingRateHintScript(props.symbol);
|
|
5873
5804
|
return /* @__PURE__ */ jsx(FundingRateHint, { ...state, ...props });
|
|
5874
5805
|
};
|
|
5806
|
+
|
|
5807
|
+
// src/components/symbolInfoBarFull/symbolInfoBarFull.ui.tsx
|
|
5808
|
+
init_symbolDisplay();
|
|
5875
5809
|
var LazyDropDownMarketsWidget = React6.lazy(
|
|
5876
5810
|
() => Promise.resolve().then(() => (init_dropDownMarkets(), dropDownMarkets_exports)).then((mod) => {
|
|
5877
5811
|
return { default: mod.DropDownMarketsWidget };
|
|
@@ -5928,7 +5862,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
5928
5862
|
{
|
|
5929
5863
|
direction: "column",
|
|
5930
5864
|
itemAlign: "start",
|
|
5931
|
-
className: "oui-gap-y-[2px]
|
|
5865
|
+
className: "oui-shrink-0 oui-gap-y-[2px]",
|
|
5932
5866
|
children: [
|
|
5933
5867
|
/* @__PURE__ */ jsx(
|
|
5934
5868
|
LazyDropDownMarketsWidget,
|
|
@@ -5939,14 +5873,11 @@ var SymbolInfoBarFull = (props) => {
|
|
|
5939
5873
|
children: /* @__PURE__ */ jsxs(Flex, { gapX: 1, className: "oui-cursor-pointer", children: [
|
|
5940
5874
|
/* @__PURE__ */ jsx(TokenIcon, { symbol, className: "oui-size-4" }),
|
|
5941
5875
|
/* @__PURE__ */ jsx(
|
|
5942
|
-
|
|
5876
|
+
SymbolDisplay,
|
|
5943
5877
|
{
|
|
5944
|
-
|
|
5945
|
-
rule: "symbol",
|
|
5946
|
-
formatString: "base-type",
|
|
5878
|
+
formatString: "base",
|
|
5947
5879
|
size: "xs",
|
|
5948
|
-
|
|
5949
|
-
intensity: 98,
|
|
5880
|
+
className: "oui-text-base-contrast",
|
|
5950
5881
|
children: symbol
|
|
5951
5882
|
}
|
|
5952
5883
|
),
|
|
@@ -6341,15 +6272,13 @@ var useHorizontalMarketsScript = (options) => {
|
|
|
6341
6272
|
(fav) => fav.tabs?.some((tab) => tab.id === selectedFavoriteTab.id)
|
|
6342
6273
|
)?.map((fav) => fav.name);
|
|
6343
6274
|
const map = /* @__PURE__ */ Object.create(null);
|
|
6344
|
-
for (const m of markets)
|
|
6345
|
-
map[m.symbol] = m;
|
|
6275
|
+
for (const m of markets) map[m.symbol] = m;
|
|
6346
6276
|
return (symbolsInTab || []).map((s) => map[s]).filter(Boolean);
|
|
6347
6277
|
}
|
|
6348
6278
|
if (selectedMarketType === "recent") {
|
|
6349
6279
|
const symbolsInRecent = favorite.recent?.map((r) => r.name) || [];
|
|
6350
6280
|
const map = /* @__PURE__ */ Object.create(null);
|
|
6351
|
-
for (const m of markets)
|
|
6352
|
-
map[m.symbol] = m;
|
|
6281
|
+
for (const m of markets) map[m.symbol] = m;
|
|
6353
6282
|
return symbolsInRecent.map((s) => map[s]).filter(Boolean);
|
|
6354
6283
|
}
|
|
6355
6284
|
return markets;
|
|
@@ -6371,10 +6300,8 @@ var useHorizontalMarketsScript = (options) => {
|
|
|
6371
6300
|
const list = optionSymbols ? optionSymbols : sortedMarkets.map((m) => m.symbol);
|
|
6372
6301
|
const max = optionMaxItems;
|
|
6373
6302
|
if (typeof max === "number") {
|
|
6374
|
-
if (max === -1)
|
|
6375
|
-
|
|
6376
|
-
if (max >= 0)
|
|
6377
|
-
return list.slice(0, max);
|
|
6303
|
+
if (max === -1) return list;
|
|
6304
|
+
if (max >= 0) return list.slice(0, max);
|
|
6378
6305
|
}
|
|
6379
6306
|
return list;
|
|
6380
6307
|
}, [sortedMarkets, optionSymbols, optionMaxItems]);
|
|
@@ -6827,7 +6754,8 @@ var MarketsMobileContent = (props) => {
|
|
|
6827
6754
|
|
|
6828
6755
|
// src/index.ts
|
|
6829
6756
|
init_marketsProvider();
|
|
6757
|
+
init_symbolDisplay();
|
|
6830
6758
|
|
|
6831
|
-
export { CollapseMarkets, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, HorizontalMarkets, HorizontalMarketsWidget, MarketItem, MarketTypeFilter, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, SubMenuMarkets, SubMenuMarketsWidget, SymbolInfoBar, SymbolInfoBarFull, SymbolInfoBarFullWidget, SymbolInfoBarWidget, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
|
6832
|
-
//# sourceMappingURL=
|
|
6759
|
+
export { CollapseMarkets, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, HorizontalMarkets, HorizontalMarketsWidget, MarketItem, MarketTypeFilter, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, SubMenuMarkets, SubMenuMarketsWidget, SymbolDisplay, SymbolInfoBar, SymbolInfoBarFull, SymbolInfoBarFullWidget, SymbolInfoBarWidget, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
|
6760
|
+
//# sourceMappingURL=index.mjs.map
|
|
6833
6761
|
//# sourceMappingURL=index.mjs.map
|