@kodiak-finance/orderly-trading 2.9.2 → 2.9.3

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.mjs CHANGED
@@ -1,16 +1,16 @@
1
- import { formatSymbol, isTestnet, Decimal, commifyOptional, removeTrailingZeros, exportToCSVFile, getLiquidationExportColumns, getOrderExportColumns, getPositionHistoryExportColumns, getPositionExportColumns, optimizeSymbolDisplay, getPrecisionByNumber } from '@kodiak-finance/orderly-utils';
2
- import { useAccount, useLocalStorage, useConfig, useWalletConnector, useMutation, useChains, useReferralInfo, useCurEpochEstimate, TWType, useEpochInfo, usePositionStream, useOrderStream, useFundingDetails, useFundingRateBySymbol, useFundingRate, useSymbolsInfo, useOrderbookStream, useEventEmitter, useCollateral, useMarginRatio, useLeverage, useDebouncedCallback, useMediaQuery, useAssetsHistory, useGetRwaSymbolInfo, useBadgeBySymbol, useGetRwaSymbolOpenStatus, useGetRwaSymbolCloseTimeInterval, useMarketTradeStream, useAccountInstance, useComputedLTV, useTickerStream } from '@kodiak-finance/orderly-hooks';
3
- import React12, { forwardRef, useMemo, createContext, useContext, useState, useCallback, useEffect, useRef, createElement } from 'react';
1
+ import { formatSymbol, Decimal, getPrecisionByNumber, commifyOptional, removeTrailingZeros, exportToCSVFile, getLiquidationExportColumns, getOrderExportColumns, getPositionHistoryExportColumns, getPositionExportColumns, isTestnet, optimizeSymbolDisplay } from '@kodiak-finance/orderly-utils';
2
+ 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 '@kodiak-finance/orderly-hooks';
3
+ import React12, { forwardRef, useMemo, createContext, useEffect, useState, useRef, useCallback, useContext, createElement } from 'react';
4
4
  import { useDataTap, useAppContext } from '@kodiak-finance/orderly-react-app';
5
- import { AccountStatusEnum, ChainNamespace, AlgoOrderRootType, OrderStatus, OrderSide, AssetHistoryStatusEnum, AssetHistorySideEnum, TradingviewFullscreenKey, OrderEntrySortKeys, EMPTY_LIST } from '@kodiak-finance/orderly-types';
6
- import { useTranslation, i18n, Trans } from '@kodiak-finance/orderly-i18n';
7
- import { installExtension, ExtensionPositionEnum, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, modal, Flex, Divider, Checkbox, Text, useModal, toast as toast$1, ArrowRightShortIcon, Box, ListView, Grid, ArrowDownShortIcon, gradientTextVariants, EyeIcon, EyeCloseIcon, ChevronDownIcon, useScreen, Tooltip, Tabs, TabPanel, CloseIcon, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Statistic, RefreshIcon, ArrowLeftRightIcon, ArrowUpShortIcon, InfoCircleIcon, ExtensionSlot, NewsFillIcon, SimpleSheet, SimpleDialog, ChainIcon, ExclamationFillIcon, Switch, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber } from '@kodiak-finance/orderly-ui';
5
+ import { TradingviewFullscreenKey, OrderEntrySortKeys, AlgoOrderRootType, OrderStatus, OrderSide, AccountStatusEnum, AssetHistoryStatusEnum, AssetHistorySideEnum, ChainNamespace, EMPTY_LIST } from '@kodiak-finance/orderly-types';
6
+ import { i18n, useTranslation, Trans } from '@kodiak-finance/orderly-i18n';
7
+ import { injectable, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, Box, Flex, Text, toast as toast$1, Divider, Checkbox, useScreen, ExclamationFillIcon, CloseIcon, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber, 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, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker } from '@kodiak-finance/orderly-ui';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
  import { MobilePositionsWidget, PositionHistoryWidget, LiquidationWidget, PositionsWidget, CloseAllPositionsWidget, MobileLiquidationWidget, MobilePositionHistoryWidget, useReversePositionEnabled } from '@kodiak-finance/orderly-ui-positions';
10
10
  import { TabType, MobileOrderListWidget, DesktopOrderListWidget } from '@kodiak-finance/orderly-ui-orders';
11
11
  import { AuthGuard } from '@kodiak-finance/orderly-ui-connector';
12
12
  import { OrderEntryWidget, LTVRiskTooltipWidget } from '@kodiak-finance/orderly-ui-order-entry';
13
- import { DepositAndWithdrawWithSheetId, TransferSheetId, DepositStatusWidget, DepositAndWithdrawWithDialogId, TransferDialogId } from '@kodiak-finance/orderly-ui-transfer';
13
+ import { DepositStatusWidget, DepositAndWithdrawWithSheetId, TransferSheetId, DepositAndWithdrawWithDialogId, TransferDialogId } from '@kodiak-finance/orderly-ui-transfer';
14
14
  import { TradingviewWidget } from '@kodiak-finance/orderly-ui-tradingview';
15
15
  import { AssetsModule } from '@kodiak-finance/orderly-portfolio';
16
16
  import Split from '@uiw/react-split';
@@ -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 { SymbolInfoBarWidget, SymbolInfoBarRiskNotice, MarketsSheetWidget, HorizontalMarketsWidget, SideMarketsWidget, SymbolInfoBarFullWidget } from '@kodiak-finance/orderly-markets';
23
+ import { HorizontalMarketsWidget, SideMarketsWidget, SymbolInfoBarFullWidget, SymbolInfoBarWidget, SymbolInfoBarRiskNotice, MarketsSheetWidget } from '@kodiak-finance/orderly-markets';
24
24
 
25
25
  var __defProp = Object.defineProperty;
26
26
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -740,7 +740,7 @@ var init_dataList_ui = __esm({
740
740
  };
741
741
  LiquidationTab = () => {
742
742
  const { t } = useTranslation();
743
- return /* @__PURE__ */ jsxs("div", { className: "oui-flex oui-space-x-1", children: [
743
+ return /* @__PURE__ */ jsxs("div", { className: "oui-flex oui-gap-x-1", children: [
744
744
  /* @__PURE__ */ jsx("span", { children: t("positions.liquidation") }),
745
745
  /* @__PURE__ */ jsx(
746
746
  Tooltip,
@@ -1094,7 +1094,7 @@ var init_lastTrades_ui = __esm({
1094
1094
  ),
1095
1095
  style: props.style,
1096
1096
  children: [
1097
- /* @__PURE__ */ jsx(Box, { className: "oui-pr-1", children: /* @__PURE__ */ jsx(
1097
+ /* @__PURE__ */ jsx(Box, { className: "oui-pe-1", children: /* @__PURE__ */ jsx(
1098
1098
  Header,
1099
1099
  {
1100
1100
  base: props.base,
@@ -1129,7 +1129,7 @@ var init_lastTrades_ui = __esm({
1129
1129
  // >
1130
1130
  // <Box className={cn("oui-flex-1", classNames?.left)}>{left}</Box>
1131
1131
  // <Box className={cn("oui-flex-1", classNames?.mid)}>{mid}</Box>
1132
- // <Box className={cn("oui-flex-1 oui-text-right", classNames?.right)}>
1132
+ // <Box className={cn("oui-flex-1 oui-text-end", classNames?.right)}>
1133
1133
  // {right}
1134
1134
  // </Box>
1135
1135
  // </Flex>
@@ -1143,7 +1143,7 @@ var init_lastTrades_ui = __esm({
1143
1143
  children: [
1144
1144
  /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1", classNames?.left), children: left }),
1145
1145
  /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1", classNames?.mid), children: mid }),
1146
- /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-text-right", classNames?.right), children: right })
1146
+ /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-text-end", classNames?.right), children: right })
1147
1147
  ]
1148
1148
  }
1149
1149
  )
@@ -1177,7 +1177,7 @@ var init_lastTrades_ui = __esm({
1177
1177
  props.className,
1178
1178
  "oui-overflow-auto"
1179
1179
  ),
1180
- contentClassName: "!oui-space-y-0 oui-pr-[-4px]",
1180
+ contentClassName: "!oui-space-y-0 -oui-me-[4px]",
1181
1181
  renderItem: (item, index) => {
1182
1182
  return /* @__PURE__ */ jsx(
1183
1183
  Row,
@@ -1485,7 +1485,7 @@ var init_assetView_ui = __esm({
1485
1485
  visible,
1486
1486
  size: "2xs",
1487
1487
  unit,
1488
- unitClassName: "oui-text-base-contrast-36 oui-ml-0.5",
1488
+ unitClassName: "oui-text-base-contrast-36 oui-ms-0.5",
1489
1489
  as: "div",
1490
1490
  rule,
1491
1491
  padding: false,
@@ -2019,8 +2019,8 @@ var init_cellBar = __esm({
2019
2019
  "div",
2020
2020
  {
2021
2021
  className: cn(
2022
- "oui-absolute oui-right-[-100%] oui-top-0 oui-h-full oui-w-full oui-transition-transform oui-pointer-events-none",
2023
- direction === 0 /* LEFT_TO_RIGHT */ && "oui-left-[-100%]",
2022
+ "oui-absolute oui-end-[-100%] oui-top-0 oui-h-full oui-w-full oui-transition-transform oui-pointer-events-none",
2023
+ direction === 0 /* LEFT_TO_RIGHT */ && "oui-start-[-100%]",
2024
2024
  props.className
2025
2025
  ),
2026
2026
  style: transform
@@ -2064,7 +2064,7 @@ var init_cell_desktop = __esm({
2064
2064
  return /* @__PURE__ */ jsxs(
2065
2065
  "div",
2066
2066
  {
2067
- className: "oui-relative oui-flex oui-cursor-pointer oui-flex-row oui-justify-between oui-pl-3 oui-text-xs oui-tabular-nums oui-text-base-contrast-80",
2067
+ 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",
2068
2068
  style: { height: `${cellHeight}px` },
2069
2069
  onClick: () => {
2070
2070
  if (Number.isNaN(price) || Number.isNaN(quantity)) {
@@ -2079,7 +2079,7 @@ var init_cell_desktop = __esm({
2079
2079
  "div",
2080
2080
  {
2081
2081
  className: cn(
2082
- "oui-mr-2 oui-flex oui-basis-7/12 oui-flex-row oui-items-center",
2082
+ "oui-me-2 oui-flex oui-basis-7/12 oui-flex-row oui-items-center",
2083
2083
  showTotal && "oui-basis-5/12"
2084
2084
  ),
2085
2085
  children: [
@@ -2087,13 +2087,13 @@ var init_cell_desktop = __esm({
2087
2087
  "div",
2088
2088
  {
2089
2089
  className: cn(
2090
- "oui-flex-1 oui-text-left",
2090
+ "oui-flex-1 oui-text-start",
2091
2091
  props.type === "ask" /* ASK */ ? "oui-text-trade-loss" : "oui-text-trade-profit"
2092
2092
  ),
2093
- children: /* @__PURE__ */ jsx(Text.numeral, { dp, children: price })
2093
+ children: /* @__PURE__ */ jsx(Text.numeral, { dp, dir: "ltr", children: price })
2094
2094
  }
2095
2095
  ),
2096
- /* @__PURE__ */ jsx("div", { className: "oui-flex-1 oui-text-right oui-text-base-contrast-80", children: /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, children: quantity }) })
2096
+ /* @__PURE__ */ jsx("div", { className: "oui-flex-1 oui-text-end oui-text-base-contrast-80", children: /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, dir: "ltr", children: quantity }) })
2097
2097
  ]
2098
2098
  }
2099
2099
  ),
@@ -2106,11 +2106,11 @@ var init_cell_desktop = __esm({
2106
2106
  ),
2107
2107
  children: [
2108
2108
  showTotal ? /* @__PURE__ */ jsxs(Fragment, { children: [
2109
- /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-pr-3 oui-text-right"), children: /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, className: "oui-z-10", children: accumulated }) }),
2110
- /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-pr-3 oui-text-right"), children: /* @__PURE__ */ jsx(Text.numeral, { dp: 0, className: "oui-z-10", children: totalAmount }) })
2111
- ] }) : /* @__PURE__ */ jsxs("div", { className: cn("oui-flex-1 oui-pr-3 oui-text-right"), children: [
2112
- coinType === base && /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, className: "oui-z-10", children: accumulated }),
2113
- coinType === quote && /* @__PURE__ */ jsx(Text.numeral, { dp: 0, className: "oui-z-10", children: totalAmount })
2109
+ /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }) }),
2110
+ /* @__PURE__ */ jsx("div", { className: cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsx(Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount }) })
2111
+ ] }) : /* @__PURE__ */ jsxs("div", { className: cn("oui-flex-1 oui-pe-3 oui-text-end"), children: [
2112
+ coinType === base && /* @__PURE__ */ jsx(Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }),
2113
+ coinType === quote && /* @__PURE__ */ jsx(Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount })
2114
2114
  ] }),
2115
2115
  /* @__PURE__ */ jsx(
2116
2116
  CellBar,
@@ -2127,7 +2127,7 @@ var init_cell_desktop = __esm({
2127
2127
  "div",
2128
2128
  {
2129
2129
  className: cn(
2130
- "oui-pointer-events-none oui-absolute oui-left-[4px] oui-size-[4px] oui-rounded-full",
2130
+ "oui-pointer-events-none oui-absolute oui-start-[4px] oui-size-[4px] oui-rounded-full",
2131
2131
  props.type === "ask" /* ASK */ && "oui-bg-trade-loss",
2132
2132
  props.type === "bid" /* BID */ && "oui-bg-trade-profit"
2133
2133
  ),
@@ -2342,7 +2342,7 @@ var init_listBox_desktop = __esm({
2342
2342
  };
2343
2343
  }
2344
2344
  });
2345
- var DesktopAsks;
2345
+ var DesktopAsks, InjectableDesktopAsks;
2346
2346
  var init_asks_desktop = __esm({
2347
2347
  "src/components/desktop/orderBook/asks.desktop.tsx"() {
2348
2348
  init_types();
@@ -2368,9 +2368,13 @@ var init_asks_desktop = __esm({
2368
2368
  }
2369
2369
  );
2370
2370
  };
2371
+ InjectableDesktopAsks = injectable(
2372
+ DesktopAsks,
2373
+ "OrderBook.Desktop.Asks"
2374
+ );
2371
2375
  }
2372
2376
  });
2373
- var DesktopBids;
2377
+ var DesktopBids, InjectableDesktopBids;
2374
2378
  var init_bids_desktop = __esm({
2375
2379
  "src/components/desktop/orderBook/bids.desktop.tsx"() {
2376
2380
  init_types();
@@ -2395,6 +2399,10 @@ var init_bids_desktop = __esm({
2395
2399
  }
2396
2400
  );
2397
2401
  };
2402
+ InjectableDesktopBids = injectable(
2403
+ DesktopBids,
2404
+ "OrderBook.Desktop.Bids"
2405
+ );
2398
2406
  }
2399
2407
  });
2400
2408
  var BuySellRatioSettings, MoreIcon;
@@ -2887,12 +2895,12 @@ var init_markPrice_desktop = __esm({
2887
2895
  DesktopMarkPrice = (props) => {
2888
2896
  const { markPrice = 0, lastPrice, asks, bids, symbolInfo } = props;
2889
2897
  const { showTotal } = useOrderBookContext();
2890
- return /* @__PURE__ */ jsxs("div", { className: "oui-flex oui-flex-row oui-pl-3 oui-tabular-nums oui-justify-between oui-text-base-contrast-80 oui-text-xs oui-relative oui-cursor-pointer oui-py-[6px]", children: [
2898
+ return /* @__PURE__ */ 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: [
2891
2899
  /* @__PURE__ */ jsxs(
2892
2900
  "div",
2893
2901
  {
2894
2902
  className: cn(
2895
- "oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-mr-2 oui-justify-between",
2903
+ "oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-me-2 oui-justify-between",
2896
2904
  showTotal && "oui-basis-5/12"
2897
2905
  ),
2898
2906
  children: [
@@ -2915,7 +2923,7 @@ var init_markPrice_desktop = __esm({
2915
2923
  className: cn(
2916
2924
  "oui-basis-5/12 oui-flex oui-items-center oui-fex-row oui-overflow-hidden oui-relative oui-justify-end",
2917
2925
  showTotal && "oui-basis-7/12",
2918
- "oui-pr-3"
2926
+ "oui-pe-3"
2919
2927
  ),
2920
2928
  children: /* @__PURE__ */ jsx(Spread, { asks, bids })
2921
2929
  }
@@ -3040,7 +3048,7 @@ var init_index_desktop = __esm({
3040
3048
  showBuySellRatio ? "oui-grid-rows-[auto,auto,1fr,auto,1fr,auto]" : "oui-grid-rows-[auto,auto,1fr,auto,1fr]"
3041
3049
  ),
3042
3050
  children: [
3043
- /* @__PURE__ */ jsxs(Flex, { justify: "between", itemAlign: "center", className: "oui-pr-3", children: [
3051
+ /* @__PURE__ */ jsxs(Flex, { justify: "between", itemAlign: "center", className: "oui-pe-3", children: [
3044
3052
  /* @__PURE__ */ jsx(
3045
3053
  DesktopDepthSelect,
3046
3054
  {
@@ -3058,7 +3066,14 @@ var init_index_desktop = __esm({
3058
3066
  )
3059
3067
  ] }),
3060
3068
  /* @__PURE__ */ jsx(DesktopHeader, { quote, base }),
3061
- /* @__PURE__ */ jsx(DesktopAsks, { data: [...props.asks] }),
3069
+ /* @__PURE__ */ jsx(
3070
+ InjectableDesktopAsks,
3071
+ {
3072
+ data: [...props.asks],
3073
+ symbolInfo: props.symbolInfo,
3074
+ depth: props.activeDepth
3075
+ }
3076
+ ),
3062
3077
  /* @__PURE__ */ jsx(
3063
3078
  DesktopMarkPrice,
3064
3079
  {
@@ -3069,7 +3084,14 @@ var init_index_desktop = __esm({
3069
3084
  symbolInfo: props.symbolInfo
3070
3085
  }
3071
3086
  ),
3072
- /* @__PURE__ */ jsx(DesktopBids, { data: [...props.bids] }),
3087
+ /* @__PURE__ */ jsx(
3088
+ InjectableDesktopBids,
3089
+ {
3090
+ data: [...props.bids],
3091
+ symbolInfo: props.symbolInfo,
3092
+ depth: props.activeDepth
3093
+ }
3094
+ ),
3073
3095
  showBuySellRatio && /* @__PURE__ */ jsx(
3074
3096
  BuySellRatioBar,
3075
3097
  {
@@ -3651,7 +3673,6 @@ var init_orderBook = __esm({
3651
3673
  } = props;
3652
3674
  const { t } = useTranslation();
3653
3675
  const [settingsOpen, setSettingsOpen] = useState(false);
3654
- const symbol = `PERP_${props.symbolInfo.base}_${props.symbolInfo.quote}`;
3655
3676
  const [coinUnit, setCoinUnit] = useLocalStorage(
3656
3677
  ORDERBOOK_MOBILE_COIN_TYPE_KEY,
3657
3678
  "qty"
@@ -3681,7 +3702,7 @@ var init_orderBook = __esm({
3681
3702
  itemAlign: "start",
3682
3703
  children: [
3683
3704
  /* @__PURE__ */ jsxs(Flex, { justify: "between", itemAlign: "center", className: "oui-w-full", children: [
3684
- /* @__PURE__ */ jsx(FundingRateWidget, { symbol }),
3705
+ /* @__PURE__ */ jsx(FundingRateWidget, { symbol: props.symbol }),
3685
3706
  /* @__PURE__ */ jsx(
3686
3707
  BuySellRatioSettings,
3687
3708
  {
@@ -3740,6 +3761,7 @@ var init_orderBook_ui = __esm({
3740
3761
  lastPrice: props.lastPrice,
3741
3762
  depths: props.depths,
3742
3763
  activeDepth: props.selDepth,
3764
+ symbol: props.symbol,
3743
3765
  base: props.base,
3744
3766
  quote: props.quote,
3745
3767
  isLoading: props.isLoading,
@@ -3884,6 +3906,8 @@ var init_orderBook_script = __esm({
3884
3906
  lastPrice: data?.middlePrice,
3885
3907
  depths,
3886
3908
  selDepth,
3909
+ /** Canonical API / route symbol (do not reconstruct from base+quote). */
3910
+ symbol,
3887
3911
  base,
3888
3912
  quote,
3889
3913
  isLoading,
@@ -3969,10 +3993,10 @@ var init_buySellRatioBar = __esm({
3969
3993
  /* @__PURE__ */ jsx(
3970
3994
  "div",
3971
3995
  {
3972
- className: "oui-bg-trade-profit oui-mr-[2px] oui-rounded-sm",
3996
+ className: "oui-bg-trade-profit oui-me-[2px] oui-rounded-sm",
3973
3997
  style: {
3974
3998
  position: "absolute",
3975
- left: 0,
3999
+ insetInlineStart: 0,
3976
4000
  top: 0,
3977
4001
  width: `${buyPercentage}%`,
3978
4002
  height: "100%"
@@ -3982,10 +4006,10 @@ var init_buySellRatioBar = __esm({
3982
4006
  /* @__PURE__ */ jsx(
3983
4007
  "div",
3984
4008
  {
3985
- className: "oui-bg-trade-loss oui-ml-[2px] oui-rounded-sm",
4009
+ className: "oui-bg-trade-loss oui-ms-[2px] oui-rounded-sm",
3986
4010
  style: {
3987
4011
  position: "absolute",
3988
- left: `${buyPercentage}%`,
4012
+ insetInlineStart: `${buyPercentage}%`,
3989
4013
  top: 0,
3990
4014
  width: `${sellPercentage}%`,
3991
4015
  height: "100%"
@@ -4012,7 +4036,9 @@ var orderBook_exports = {};
4012
4036
  __export(orderBook_exports, {
4013
4037
  BuySellRatioBar: () => BuySellRatioBar,
4014
4038
  OrderBook: () => OrderBook2,
4039
+ OrderBookProvider: () => OrderBookProvider,
4015
4040
  OrderBookWidget: () => OrderBookWidget,
4041
+ useOrderBookContext: () => useOrderBookContext,
4016
4042
  useOrderBookScript: () => useOrderBookScript
4017
4043
  });
4018
4044
  var init_orderBook2 = __esm({
@@ -4021,6 +4047,7 @@ var init_orderBook2 = __esm({
4021
4047
  init_orderBook_widget();
4022
4048
  init_orderBook_script();
4023
4049
  init_buySellRatioBar();
4050
+ init_orderContext();
4024
4051
  }
4025
4052
  });
4026
4053
  var RiskRate;
@@ -4204,7 +4231,7 @@ var init_orderBookAndTrades_ui = __esm({
4204
4231
  Title2,
4205
4232
  {
4206
4233
  title: t("trading.orderBook"),
4207
- className: "oui-pl-3 oui-text-sm"
4234
+ className: "oui-ps-3 oui-text-sm"
4208
4235
  }
4209
4236
  ),
4210
4237
  /* @__PURE__ */ jsx(React12.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
@@ -4270,8 +4297,8 @@ var init_orderBookAndTrades_ui = __esm({
4270
4297
  props.setTab(tab);
4271
4298
  },
4272
4299
  classNames: {
4273
- tabsList: "oui-pl-3"
4274
- // tabsContent: props.tab === "lastTrades" ? 'oui-pl-3' : ''
4300
+ tabsList: "oui-ps-3"
4301
+ // tabsContent: props.tab === "lastTrades" ? 'oui-ps-3' : ''
4275
4302
  },
4276
4303
  size: "lg",
4277
4304
  children: [
@@ -5573,14 +5600,14 @@ var init_tradingview_ui = __esm({
5573
5600
  {
5574
5601
  ref: props.dragRef,
5575
5602
  className: cn(
5576
- "oui-h-[1px] oui-absolute oui-left-0 oui-right-0 oui-bottom-0 oui-top-0 oui-z-10 oui-mt-[7px] oui-bg-base-contrast-12",
5603
+ "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",
5577
5604
  props.dragging && "oui-bg-primary "
5578
5605
  ),
5579
5606
  children: /* @__PURE__ */ jsx(
5580
5607
  KlineDragIcon,
5581
5608
  {
5582
5609
  className: cn(
5583
- "oui-w-3 oui-h-3 oui-absolute oui-left-1/2 -oui-top-[5px] -oui-translate-y-[0.5px] oui-text-base-contrast-12",
5610
+ "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",
5584
5611
  props.dragging && " oui-text-primary"
5585
5612
  )
5586
5613
  }
@@ -6699,7 +6726,7 @@ var AccountInfo = (props) => {
6699
6726
  {
6700
6727
  size: "2xs",
6701
6728
  intensity: 80,
6702
- prefix: /* @__PURE__ */ jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-pr-1" }),
6729
+ prefix: /* @__PURE__ */ jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-pe-1" }),
6703
6730
  children: props.chainName
6704
6731
  }
6705
6732
  )
@@ -7077,17 +7104,10 @@ var Account = (props) => {
7077
7104
  }
7078
7105
  );
7079
7106
  };
7080
- installExtension({
7081
- name: "mobile-account-menu",
7082
- scope: ["*"],
7083
- positions: [ExtensionPositionEnum.MobileAccountMenu],
7084
- builder: useAccountScript,
7085
- __isInternal: true
7086
- })((props) => {
7087
- return /* @__PURE__ */ jsx(Account, { ...props });
7088
- });
7107
+ var InjectableAccount = injectable(Account, "Account.MobileAccountMenu");
7089
7108
  var MobileAccountMenuExtension = () => {
7090
- return /* @__PURE__ */ jsx(ExtensionSlot, { position: ExtensionPositionEnum.MobileAccountMenu });
7109
+ const state = useAccountScript();
7110
+ return /* @__PURE__ */ jsx(InjectableAccount, { ...state });
7091
7111
  };
7092
7112
 
7093
7113
  // src/components/mobile/bottomNavBar/balance/balance.ui.tsx
@@ -7125,7 +7145,7 @@ var Chain = (props) => {
7125
7145
  },
7126
7146
  children: /* @__PURE__ */ jsxs(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: [
7127
7147
  /* @__PURE__ */ jsx(ChainIcon, { chainId: props.currentChainId, size: "2xs" }),
7128
- /* @__PURE__ */ jsx("div", { className: "oui-absolute oui-right-0 oui-bottom-0", children: /* @__PURE__ */ jsxs(
7148
+ /* @__PURE__ */ jsx("div", { className: "oui-absolute oui-end-0 oui-bottom-0", children: /* @__PURE__ */ jsxs(
7129
7149
  "svg",
7130
7150
  {
7131
7151
  width: "9",
@@ -7576,7 +7596,7 @@ var RiskIndicator = (props) => {
7576
7596
  "div",
7577
7597
  {
7578
7598
  className: cn(
7579
- "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-right-0 after:oui-w-[10px] after:oui-h-[2px] after:oui-bg-base-contrast-50",
7599
+ "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",
7580
7600
  className
7581
7601
  // {
7582
7602
  // "oui-rotate-0": value > 1,
@@ -7982,7 +8002,7 @@ var SortablePanel = (props) => {
7982
8002
  {
7983
8003
  ...attributes,
7984
8004
  ...listeners,
7985
- className: "oui-absolute oui-right-0 oui-top-4 oui-cursor-move oui-py-1",
8005
+ className: "oui-absolute oui-end-0 oui-top-4 oui-cursor-move oui-py-1",
7986
8006
  style: { touchAction: "none" },
7987
8007
  ref: setActivatorNodeRef,
7988
8008
  children: /* @__PURE__ */ jsx(
@@ -8051,7 +8071,7 @@ var RwaOutsideMarketHoursNotify = () => {
8051
8071
  /* @__PURE__ */ jsx(
8052
8072
  "button",
8053
8073
  {
8054
- className: "oui-w-6 oui-h-6 oui-right-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",
8074
+ 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",
8055
8075
  onClick: closeNotify,
8056
8076
  children: /* @__PURE__ */ jsx(CloseIcon, { opacity: 1, className: "oui-text-base-contrast", size: 16 })
8057
8077
  }
@@ -8562,7 +8582,10 @@ var DesktopLayout4 = (props) => {
8562
8582
  }
8563
8583
  ];
8564
8584
  },
8565
- sideEffects: ({ active, dragOverlay }) => {
8585
+ sideEffects: ({
8586
+ active,
8587
+ dragOverlay
8588
+ }) => {
8566
8589
  active.node.style.opacity = "0";
8567
8590
  const innerElement = dragOverlay.node.querySelector(".inner-content");
8568
8591
  if (innerElement) {
@@ -8635,11 +8658,9 @@ var DesktopLayout4 = (props) => {
8635
8658
  const marketsWidget = /* @__PURE__ */ jsx(
8636
8659
  SideMarketsWidget,
8637
8660
  {
8638
- resizeable,
8639
- panelSize,
8640
- onPanelSizeChange,
8641
8661
  symbol: props.symbol,
8642
- onSymbolChange: props.onSymbolChange
8662
+ onSymbolChange: props.onSymbolChange,
8663
+ panelSize
8643
8664
  }
8644
8665
  );
8645
8666
  const toggleButtoncls = cn(
@@ -8681,13 +8702,13 @@ var DesktopLayout4 = (props) => {
8681
8702
  height: "100%",
8682
8703
  width: marketsWidth,
8683
8704
  style: { minWidth: marketsWidth },
8684
- className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8705
+ className: "oui-trading-markets-container oui-min-h-0 oui-min-w-0 oui-max-w-full oui-transition-all oui-duration-150",
8685
8706
  onTransitionEnd: () => setAnimating(false),
8686
8707
  children: /* @__PURE__ */ jsxs(
8687
8708
  Flex,
8688
8709
  {
8689
8710
  id: "oui-side-markets",
8690
- className: "oui-relative oui-font-semibold",
8711
+ className: "oui-relative oui-min-h-0 oui-min-w-0 oui-font-semibold",
8691
8712
  direction: "column",
8692
8713
  gapY: 5,
8693
8714
  height: "100%",
@@ -8698,10 +8719,7 @@ var DesktopLayout4 = (props) => {
8698
8719
  Box,
8699
8720
  {
8700
8721
  width: "100%",
8701
- className: cn(
8702
- panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8703
- panelSize === "middle" && "oui-h-full"
8704
- ),
8722
+ className: "oui-min-h-0 oui-min-w-0 oui-max-w-full oui-flex-1 oui-overflow-hidden oui-rounded-b-2xl",
8705
8723
  children: marketsWidget
8706
8724
  }
8707
8725
  )
@@ -8745,10 +8763,10 @@ var DesktopLayout4 = (props) => {
8745
8763
  {
8746
8764
  classNames: {
8747
8765
  root: cn(
8748
- tradingViewFullScreen ? "!oui-absolute oui-top-0 oui-left-0 oui-right-0 oui-bottom-0 oui-z-[40] oui-bg-base-10" : "oui-z-1"
8766
+ tradingViewFullScreen ? "!oui-absolute oui-inset-0 oui-z-40 oui-bg-base-10" : "oui-z-1"
8749
8767
  ),
8750
8768
  content: cn(
8751
- tradingViewFullScreen ? "oui-top-3 oui-bottom-3 oui-left-3 oui-right-3 oui-bg-base-9 oui-rounded-[16px] oui-overflow-hidden" : ""
8769
+ tradingViewFullScreen ? "oui-inset-3 oui-overflow-hidden oui-rounded-[16px] oui-bg-base-9" : ""
8752
8770
  )
8753
8771
  },
8754
8772
  symbol: props.symbol,
@@ -8880,7 +8898,8 @@ var DesktopLayout4 = (props) => {
8880
8898
  Flex,
8881
8899
  {
8882
8900
  gap: 2,
8883
- className: "oui-flex-1 oui-overflow-hidden",
8901
+ itemAlign: "stretch",
8902
+ className: "oui-min-h-0 oui-flex-1 oui-overflow-hidden",
8884
8903
  style: { minWidth: marketsWidth + tradingViewMinWidth + space },
8885
8904
  children: [
8886
8905
  marketLayout === "left" && marketsView,
@@ -8910,10 +8929,20 @@ var DesktopLayout4 = (props) => {
8910
8929
  );
8911
8930
  const renderTradingViewAndOrderbookView = () => {
8912
8931
  if (max4XL && layout === "left") {
8913
- return /* @__PURE__ */ jsxs(Flex, { gapX: 2, style: { minHeight: orderbookMinHeight }, height: "100%", children: [
8914
- tradingViewAndOrderbookView,
8915
- marketLayout === "left" && marketsView
8916
- ] });
8932
+ return /* @__PURE__ */ jsxs(
8933
+ Flex,
8934
+ {
8935
+ gapX: 2,
8936
+ itemAlign: "stretch",
8937
+ className: "oui-min-h-0",
8938
+ style: { minHeight: orderbookMinHeight },
8939
+ height: "100%",
8940
+ children: [
8941
+ tradingViewAndOrderbookView,
8942
+ marketLayout === "left" && marketsView
8943
+ ]
8944
+ }
8945
+ );
8917
8946
  }
8918
8947
  return tradingViewAndOrderbookView;
8919
8948
  };
@@ -9042,6 +9071,7 @@ var DesktopLayout4 = (props) => {
9042
9071
  pt: 3,
9043
9072
  r: "2xl",
9044
9073
  width: marketsWidth,
9074
+ className: "oui-overflow-hidden",
9045
9075
  style: {
9046
9076
  minHeight: tradindviewMinHeight + orderbookMinHeight + space,
9047
9077
  maxHeight: tradindviewMaxHeight + orderbookMaxHeight + space
@@ -9219,8 +9249,9 @@ var DesktopLayout4 = (props) => {
9219
9249
  /* @__PURE__ */ jsxs(
9220
9250
  Flex,
9221
9251
  {
9252
+ itemAlign: "stretch",
9222
9253
  className: cn(
9223
- "oui-flex-1 oui-overflow-hidden",
9254
+ "oui-min-h-0 oui-flex-1 oui-overflow-hidden",
9224
9255
  layout === "left" && "oui-flex-row-reverse"
9225
9256
  ),
9226
9257
  gap: 2,
@@ -9268,6 +9299,12 @@ var DesktopLayout4 = (props) => {
9268
9299
  }
9269
9300
  );
9270
9301
  };
9302
+
9303
+ // src/pages/trading/trading.injectable.tsx
9304
+ var InjectableDesktopLayout = injectable(
9305
+ DesktopLayout4,
9306
+ "Trading.Layout.Desktop"
9307
+ );
9271
9308
  var Countdown = ({
9272
9309
  timeInterval
9273
9310
  }) => {
@@ -9413,7 +9450,7 @@ var MobileLayout4 = (props) => {
9413
9450
  ]
9414
9451
  }
9415
9452
  );
9416
- }, [isRwa, open, closeTimeInterval]);
9453
+ }, [closeTimeInterval, isRwa, open, t]);
9417
9454
  const symbolInfoBar = /* @__PURE__ */ jsx(
9418
9455
  SymbolInfoBarWidget,
9419
9456
  {
@@ -9531,7 +9568,7 @@ var Trading = (props) => {
9531
9568
  return /* @__PURE__ */ jsx(MobileLayout4, { ...props });
9532
9569
  }
9533
9570
  return /* @__PURE__ */ jsx(
9534
- DesktopLayout4,
9571
+ InjectableDesktopLayout,
9535
9572
  {
9536
9573
  className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
9537
9574
  ...props
@@ -9583,6 +9620,6 @@ var TradingPage = (props) => {
9583
9620
  init_tradingPageContext();
9584
9621
  init_hooks();
9585
9622
 
9586
- 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 };
9623
+ 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 };
9587
9624
  //# sourceMappingURL=index.mjs.map
9588
9625
  //# sourceMappingURL=index.mjs.map