@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.js CHANGED
@@ -747,7 +747,7 @@ var init_dataList_ui = __esm({
747
747
  };
748
748
  LiquidationTab = () => {
749
749
  const { t } = orderlyI18n.useTranslation();
750
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-space-x-1", children: [
750
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-gap-x-1", children: [
751
751
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("positions.liquidation") }),
752
752
  /* @__PURE__ */ jsxRuntime.jsx(
753
753
  orderlyUi.Tooltip,
@@ -1101,7 +1101,7 @@ var init_lastTrades_ui = __esm({
1101
1101
  ),
1102
1102
  style: props.style,
1103
1103
  children: [
1104
- /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Box, { className: "oui-pr-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1104
+ /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Box, { className: "oui-pe-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1105
1105
  Header,
1106
1106
  {
1107
1107
  base: props.base,
@@ -1136,7 +1136,7 @@ var init_lastTrades_ui = __esm({
1136
1136
  // >
1137
1137
  // <Box className={cn("oui-flex-1", classNames?.left)}>{left}</Box>
1138
1138
  // <Box className={cn("oui-flex-1", classNames?.mid)}>{mid}</Box>
1139
- // <Box className={cn("oui-flex-1 oui-text-right", classNames?.right)}>
1139
+ // <Box className={cn("oui-flex-1 oui-text-end", classNames?.right)}>
1140
1140
  // {right}
1141
1141
  // </Box>
1142
1142
  // </Flex>
@@ -1150,7 +1150,7 @@ var init_lastTrades_ui = __esm({
1150
1150
  children: [
1151
1151
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1", classNames?.left), children: left }),
1152
1152
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1", classNames?.mid), children: mid }),
1153
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-text-right", classNames?.right), children: right })
1153
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-text-end", classNames?.right), children: right })
1154
1154
  ]
1155
1155
  }
1156
1156
  )
@@ -1184,7 +1184,7 @@ var init_lastTrades_ui = __esm({
1184
1184
  props.className,
1185
1185
  "oui-overflow-auto"
1186
1186
  ),
1187
- contentClassName: "!oui-space-y-0 oui-pr-[-4px]",
1187
+ contentClassName: "!oui-space-y-0 -oui-me-[4px]",
1188
1188
  renderItem: (item, index) => {
1189
1189
  return /* @__PURE__ */ jsxRuntime.jsx(
1190
1190
  Row,
@@ -1492,7 +1492,7 @@ var init_assetView_ui = __esm({
1492
1492
  visible,
1493
1493
  size: "2xs",
1494
1494
  unit,
1495
- unitClassName: "oui-text-base-contrast-36 oui-ml-0.5",
1495
+ unitClassName: "oui-text-base-contrast-36 oui-ms-0.5",
1496
1496
  as: "div",
1497
1497
  rule,
1498
1498
  padding: false,
@@ -1961,16 +1961,16 @@ var init_assetView = __esm({
1961
1961
  init_assetView_widget();
1962
1962
  }
1963
1963
  });
1964
- var OrderBookContext, useOrderBookContext, ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY, OrderBookProvider;
1964
+ var OrderBookContext; exports.useOrderBookContext = void 0; var ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY; exports.OrderBookProvider = void 0;
1965
1965
  var init_orderContext = __esm({
1966
1966
  "src/components/base/orderBook/orderContext.tsx"() {
1967
1967
  OrderBookContext = React12.createContext({
1968
1968
  cellHeight: 22
1969
1969
  });
1970
- useOrderBookContext = () => React12.useContext(OrderBookContext);
1970
+ exports.useOrderBookContext = () => React12.useContext(OrderBookContext);
1971
1971
  ORDERBOOK_COIN_TYPE_KEY = "orderbook_coin_type";
1972
1972
  ORDERBOOK_MOBILE_COIN_TYPE_KEY = "orderbook_mobile_coin_unit";
1973
- OrderBookProvider = (props) => {
1973
+ exports.OrderBookProvider = (props) => {
1974
1974
  const [mode, setMode] = React12.useState("quantity");
1975
1975
  const [totalMode, setTotalMode] = React12.useState("quantity");
1976
1976
  const memoizedValue = React12__default.default.useMemo(() => {
@@ -2026,8 +2026,8 @@ var init_cellBar = __esm({
2026
2026
  "div",
2027
2027
  {
2028
2028
  className: orderlyUi.cn(
2029
- "oui-absolute oui-right-[-100%] oui-top-0 oui-h-full oui-w-full oui-transition-transform oui-pointer-events-none",
2030
- direction === 0 /* LEFT_TO_RIGHT */ && "oui-left-[-100%]",
2029
+ "oui-absolute oui-end-[-100%] oui-top-0 oui-h-full oui-w-full oui-transition-transform oui-pointer-events-none",
2030
+ direction === 0 /* LEFT_TO_RIGHT */ && "oui-start-[-100%]",
2031
2031
  props.className
2032
2032
  ),
2033
2033
  style: transform
@@ -2043,7 +2043,7 @@ var init_cell_desktop = __esm({
2043
2043
  init_orderContext();
2044
2044
  init_types();
2045
2045
  DesktopOrderBookCell = (props) => {
2046
- const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = useOrderBookContext();
2046
+ const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = exports.useOrderBookContext();
2047
2047
  const {
2048
2048
  symbolInfo,
2049
2049
  currentHover,
@@ -2071,7 +2071,7 @@ var init_cell_desktop = __esm({
2071
2071
  return /* @__PURE__ */ jsxRuntime.jsxs(
2072
2072
  "div",
2073
2073
  {
2074
- 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",
2074
+ 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",
2075
2075
  style: { height: `${cellHeight}px` },
2076
2076
  onClick: () => {
2077
2077
  if (Number.isNaN(price) || Number.isNaN(quantity)) {
@@ -2086,7 +2086,7 @@ var init_cell_desktop = __esm({
2086
2086
  "div",
2087
2087
  {
2088
2088
  className: orderlyUi.cn(
2089
- "oui-mr-2 oui-flex oui-basis-7/12 oui-flex-row oui-items-center",
2089
+ "oui-me-2 oui-flex oui-basis-7/12 oui-flex-row oui-items-center",
2090
2090
  showTotal && "oui-basis-5/12"
2091
2091
  ),
2092
2092
  children: [
@@ -2094,13 +2094,13 @@ var init_cell_desktop = __esm({
2094
2094
  "div",
2095
2095
  {
2096
2096
  className: orderlyUi.cn(
2097
- "oui-flex-1 oui-text-left",
2097
+ "oui-flex-1 oui-text-start",
2098
2098
  props.type === "ask" /* ASK */ ? "oui-text-trade-loss" : "oui-text-trade-profit"
2099
2099
  ),
2100
- children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp, children: price })
2100
+ children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp, dir: "ltr", children: price })
2101
2101
  }
2102
2102
  ),
2103
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex-1 oui-text-right oui-text-base-contrast-80", children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, children: quantity }) })
2103
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex-1 oui-text-end oui-text-base-contrast-80", children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, dir: "ltr", children: quantity }) })
2104
2104
  ]
2105
2105
  }
2106
2106
  ),
@@ -2113,11 +2113,11 @@ var init_cell_desktop = __esm({
2113
2113
  ),
2114
2114
  children: [
2115
2115
  showTotal ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2116
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-pr-3 oui-text-right"), children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, className: "oui-z-10", children: accumulated }) }),
2117
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-pr-3 oui-text-right"), children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: 0, className: "oui-z-10", children: totalAmount }) })
2118
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: orderlyUi.cn("oui-flex-1 oui-pr-3 oui-text-right"), children: [
2119
- coinType === base && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, className: "oui-z-10", children: accumulated }),
2120
- coinType === quote && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: 0, className: "oui-z-10", children: totalAmount })
2116
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }) }),
2117
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: orderlyUi.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount }) })
2118
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: orderlyUi.cn("oui-flex-1 oui-pe-3 oui-text-end"), children: [
2119
+ coinType === base && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: base_dp, className: "oui-z-10", dir: "ltr", children: accumulated }),
2120
+ coinType === quote && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text.numeral, { dp: 0, className: "oui-z-10", dir: "ltr", children: totalAmount })
2121
2121
  ] }),
2122
2122
  /* @__PURE__ */ jsxRuntime.jsx(
2123
2123
  CellBar,
@@ -2134,7 +2134,7 @@ var init_cell_desktop = __esm({
2134
2134
  "div",
2135
2135
  {
2136
2136
  className: orderlyUi.cn(
2137
- "oui-pointer-events-none oui-absolute oui-left-[4px] oui-size-[4px] oui-rounded-full",
2137
+ "oui-pointer-events-none oui-absolute oui-start-[4px] oui-size-[4px] oui-rounded-full",
2138
2138
  props.type === "ask" /* ASK */ && "oui-bg-trade-loss",
2139
2139
  props.type === "bid" /* BID */ && "oui-bg-trade-profit"
2140
2140
  ),
@@ -2190,7 +2190,7 @@ var init_listBox_desktop = __esm({
2190
2190
  };
2191
2191
  DesktopListBox = (props) => {
2192
2192
  const { data, type, countQty } = props;
2193
- const { symbolInfo, depth } = useOrderBookContext();
2193
+ const { symbolInfo, depth } = exports.useOrderBookContext();
2194
2194
  const findMaxItem = React12.useCallback(() => {
2195
2195
  if (!data?.length) {
2196
2196
  return null;
@@ -2349,7 +2349,7 @@ var init_listBox_desktop = __esm({
2349
2349
  };
2350
2350
  }
2351
2351
  });
2352
- var DesktopAsks;
2352
+ var DesktopAsks, InjectableDesktopAsks;
2353
2353
  var init_asks_desktop = __esm({
2354
2354
  "src/components/desktop/orderBook/asks.desktop.tsx"() {
2355
2355
  init_types();
@@ -2375,9 +2375,13 @@ var init_asks_desktop = __esm({
2375
2375
  }
2376
2376
  );
2377
2377
  };
2378
+ InjectableDesktopAsks = orderlyUi.injectable(
2379
+ DesktopAsks,
2380
+ "OrderBook.Desktop.Asks"
2381
+ );
2378
2382
  }
2379
2383
  });
2380
- var DesktopBids;
2384
+ var DesktopBids, InjectableDesktopBids;
2381
2385
  var init_bids_desktop = __esm({
2382
2386
  "src/components/desktop/orderBook/bids.desktop.tsx"() {
2383
2387
  init_types();
@@ -2402,6 +2406,10 @@ var init_bids_desktop = __esm({
2402
2406
  }
2403
2407
  );
2404
2408
  };
2409
+ InjectableDesktopBids = orderlyUi.injectable(
2410
+ DesktopBids,
2411
+ "OrderBook.Desktop.Bids"
2412
+ );
2405
2413
  }
2406
2414
  });
2407
2415
  var BuySellRatioSettings, MoreIcon;
@@ -2541,7 +2549,7 @@ var init_header_desktop = __esm({
2541
2549
  };
2542
2550
  DesktopHeader = (props) => {
2543
2551
  const { base, quote = "USDC" } = props;
2544
- const { showTotal } = useOrderBookContext();
2552
+ const { showTotal } = exports.useOrderBookContext();
2545
2553
  const { t } = orderlyI18n.useTranslation();
2546
2554
  const [popoverOpen, setOpen] = React12__default.default.useState(false);
2547
2555
  const [coinType] = orderlyHooks.useLocalStorage(ORDERBOOK_COIN_TYPE_KEY, base);
@@ -2893,13 +2901,13 @@ var init_markPrice_desktop = __esm({
2893
2901
  init_orderContext();
2894
2902
  DesktopMarkPrice = (props) => {
2895
2903
  const { markPrice = 0, lastPrice, asks, bids, symbolInfo } = props;
2896
- const { showTotal } = useOrderBookContext();
2897
- return /* @__PURE__ */ jsxRuntime.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: [
2904
+ const { showTotal } = exports.useOrderBookContext();
2905
+ 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: [
2898
2906
  /* @__PURE__ */ jsxRuntime.jsxs(
2899
2907
  "div",
2900
2908
  {
2901
2909
  className: orderlyUi.cn(
2902
- "oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-mr-2 oui-justify-between",
2910
+ "oui-basis-7/12 oui-flex oui-flex-row oui-items-center oui-me-2 oui-justify-between",
2903
2911
  showTotal && "oui-basis-5/12"
2904
2912
  ),
2905
2913
  children: [
@@ -2922,7 +2930,7 @@ var init_markPrice_desktop = __esm({
2922
2930
  className: orderlyUi.cn(
2923
2931
  "oui-basis-5/12 oui-flex oui-items-center oui-fex-row oui-overflow-hidden oui-relative oui-justify-end",
2924
2932
  showTotal && "oui-basis-7/12",
2925
- "oui-pr-3"
2933
+ "oui-pe-3"
2926
2934
  ),
2927
2935
  children: /* @__PURE__ */ jsxRuntime.jsx(Spread, { asks, bids })
2928
2936
  }
@@ -3024,7 +3032,7 @@ var init_index_desktop = __esm({
3024
3032
  };
3025
3033
  }, []);
3026
3034
  return /* @__PURE__ */ jsxRuntime.jsx(
3027
- OrderBookProvider,
3035
+ exports.OrderBookProvider,
3028
3036
  {
3029
3037
  cellHeight: props.cellHeight ?? 20,
3030
3038
  onItemClick: props.onItemClick,
@@ -3047,7 +3055,7 @@ var init_index_desktop = __esm({
3047
3055
  showBuySellRatio ? "oui-grid-rows-[auto,auto,1fr,auto,1fr,auto]" : "oui-grid-rows-[auto,auto,1fr,auto,1fr]"
3048
3056
  ),
3049
3057
  children: [
3050
- /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { justify: "between", itemAlign: "center", className: "oui-pr-3", children: [
3058
+ /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { justify: "between", itemAlign: "center", className: "oui-pe-3", children: [
3051
3059
  /* @__PURE__ */ jsxRuntime.jsx(
3052
3060
  DesktopDepthSelect,
3053
3061
  {
@@ -3065,7 +3073,14 @@ var init_index_desktop = __esm({
3065
3073
  )
3066
3074
  ] }),
3067
3075
  /* @__PURE__ */ jsxRuntime.jsx(DesktopHeader, { quote, base }),
3068
- /* @__PURE__ */ jsxRuntime.jsx(DesktopAsks, { data: [...props.asks] }),
3076
+ /* @__PURE__ */ jsxRuntime.jsx(
3077
+ InjectableDesktopAsks,
3078
+ {
3079
+ data: [...props.asks],
3080
+ symbolInfo: props.symbolInfo,
3081
+ depth: props.activeDepth
3082
+ }
3083
+ ),
3069
3084
  /* @__PURE__ */ jsxRuntime.jsx(
3070
3085
  DesktopMarkPrice,
3071
3086
  {
@@ -3076,7 +3091,14 @@ var init_index_desktop = __esm({
3076
3091
  symbolInfo: props.symbolInfo
3077
3092
  }
3078
3093
  ),
3079
- /* @__PURE__ */ jsxRuntime.jsx(DesktopBids, { data: [...props.bids] }),
3094
+ /* @__PURE__ */ jsxRuntime.jsx(
3095
+ InjectableDesktopBids,
3096
+ {
3097
+ data: [...props.bids],
3098
+ symbolInfo: props.symbolInfo,
3099
+ depth: props.activeDepth
3100
+ }
3101
+ ),
3080
3102
  showBuySellRatio && /* @__PURE__ */ jsxRuntime.jsx(
3081
3103
  exports.BuySellRatioBar,
3082
3104
  {
@@ -3418,7 +3440,7 @@ var init_listBox = __esm({
3418
3440
  init_cell();
3419
3441
  ListBox = (props) => {
3420
3442
  const { data } = props;
3421
- const { mode } = useOrderBookContext();
3443
+ const { mode } = exports.useOrderBookContext();
3422
3444
  return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Box, { className: "oui-orderBook-list oui-order-book-list oui-flex oui-w-full oui-flex-col oui-gap-px", children: data.map((item, index) => {
3423
3445
  return /* @__PURE__ */ jsxRuntime.jsx(
3424
3446
  OrderBookCell,
@@ -3597,7 +3619,7 @@ var init_markPrice2 = __esm({
3597
3619
  init_midPriceView();
3598
3620
  init_orderContext();
3599
3621
  MarkPrice = (props) => {
3600
- const { symbolInfo } = useOrderBookContext();
3622
+ const { symbolInfo } = exports.useOrderBookContext();
3601
3623
  const { quote_dp } = symbolInfo;
3602
3624
  return /* @__PURE__ */ jsxRuntime.jsxs(
3603
3625
  orderlyUi.Flex,
@@ -3658,13 +3680,12 @@ var init_orderBook = __esm({
3658
3680
  } = props;
3659
3681
  const { t } = orderlyI18n.useTranslation();
3660
3682
  const [settingsOpen, setSettingsOpen] = React12.useState(false);
3661
- const symbol = `PERP_${props.symbolInfo.base}_${props.symbolInfo.quote}`;
3662
3683
  const [coinUnit, setCoinUnit] = orderlyHooks.useLocalStorage(
3663
3684
  ORDERBOOK_MOBILE_COIN_TYPE_KEY,
3664
3685
  "qty"
3665
3686
  );
3666
3687
  return /* @__PURE__ */ jsxRuntime.jsx(
3667
- OrderBookProvider,
3688
+ exports.OrderBookProvider,
3668
3689
  {
3669
3690
  cellHeight: props.cellHeight ?? 20,
3670
3691
  onItemClick: props.onItemClick,
@@ -3688,7 +3709,7 @@ var init_orderBook = __esm({
3688
3709
  itemAlign: "start",
3689
3710
  children: [
3690
3711
  /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { justify: "between", itemAlign: "center", className: "oui-w-full", children: [
3691
- /* @__PURE__ */ jsxRuntime.jsx(exports.FundingRateWidget, { symbol }),
3712
+ /* @__PURE__ */ jsxRuntime.jsx(exports.FundingRateWidget, { symbol: props.symbol }),
3692
3713
  /* @__PURE__ */ jsxRuntime.jsx(
3693
3714
  BuySellRatioSettings,
3694
3715
  {
@@ -3747,6 +3768,7 @@ var init_orderBook_ui = __esm({
3747
3768
  lastPrice: props.lastPrice,
3748
3769
  depths: props.depths,
3749
3770
  activeDepth: props.selDepth,
3771
+ symbol: props.symbol,
3750
3772
  base: props.base,
3751
3773
  quote: props.quote,
3752
3774
  isLoading: props.isLoading,
@@ -3891,6 +3913,8 @@ var init_orderBook_script = __esm({
3891
3913
  lastPrice: data?.middlePrice,
3892
3914
  depths,
3893
3915
  selDepth,
3916
+ /** Canonical API / route symbol (do not reconstruct from base+quote). */
3917
+ symbol,
3894
3918
  base,
3895
3919
  quote,
3896
3920
  isLoading,
@@ -3976,10 +4000,10 @@ var init_buySellRatioBar = __esm({
3976
4000
  /* @__PURE__ */ jsxRuntime.jsx(
3977
4001
  "div",
3978
4002
  {
3979
- className: "oui-bg-trade-profit oui-mr-[2px] oui-rounded-sm",
4003
+ className: "oui-bg-trade-profit oui-me-[2px] oui-rounded-sm",
3980
4004
  style: {
3981
4005
  position: "absolute",
3982
- left: 0,
4006
+ insetInlineStart: 0,
3983
4007
  top: 0,
3984
4008
  width: `${buyPercentage}%`,
3985
4009
  height: "100%"
@@ -3989,10 +4013,10 @@ var init_buySellRatioBar = __esm({
3989
4013
  /* @__PURE__ */ jsxRuntime.jsx(
3990
4014
  "div",
3991
4015
  {
3992
- className: "oui-bg-trade-loss oui-ml-[2px] oui-rounded-sm",
4016
+ className: "oui-bg-trade-loss oui-ms-[2px] oui-rounded-sm",
3993
4017
  style: {
3994
4018
  position: "absolute",
3995
- left: `${buyPercentage}%`,
4019
+ insetInlineStart: `${buyPercentage}%`,
3996
4020
  top: 0,
3997
4021
  width: `${sellPercentage}%`,
3998
4022
  height: "100%"
@@ -4019,7 +4043,9 @@ var orderBook_exports = {};
4019
4043
  __export(orderBook_exports, {
4020
4044
  BuySellRatioBar: () => exports.BuySellRatioBar,
4021
4045
  OrderBook: () => exports.OrderBook,
4046
+ OrderBookProvider: () => exports.OrderBookProvider,
4022
4047
  OrderBookWidget: () => exports.OrderBookWidget,
4048
+ useOrderBookContext: () => exports.useOrderBookContext,
4023
4049
  useOrderBookScript: () => exports.useOrderBookScript
4024
4050
  });
4025
4051
  var init_orderBook2 = __esm({
@@ -4028,6 +4054,7 @@ var init_orderBook2 = __esm({
4028
4054
  init_orderBook_widget();
4029
4055
  init_orderBook_script();
4030
4056
  init_buySellRatioBar();
4057
+ init_orderContext();
4031
4058
  }
4032
4059
  });
4033
4060
  exports.RiskRate = void 0;
@@ -4211,7 +4238,7 @@ var init_orderBookAndTrades_ui = __esm({
4211
4238
  Title2,
4212
4239
  {
4213
4240
  title: t("trading.orderBook"),
4214
- className: "oui-pl-3 oui-text-sm"
4241
+ className: "oui-ps-3 oui-text-sm"
4215
4242
  }
4216
4243
  ),
4217
4244
  /* @__PURE__ */ jsxRuntime.jsx(React12__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4277,8 +4304,8 @@ var init_orderBookAndTrades_ui = __esm({
4277
4304
  props.setTab(tab);
4278
4305
  },
4279
4306
  classNames: {
4280
- tabsList: "oui-pl-3"
4281
- // tabsContent: props.tab === "lastTrades" ? 'oui-pl-3' : ''
4307
+ tabsList: "oui-ps-3"
4308
+ // tabsContent: props.tab === "lastTrades" ? 'oui-ps-3' : ''
4282
4309
  },
4283
4310
  size: "lg",
4284
4311
  children: [
@@ -5580,14 +5607,14 @@ var init_tradingview_ui = __esm({
5580
5607
  {
5581
5608
  ref: props.dragRef,
5582
5609
  className: orderlyUi.cn(
5583
- "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",
5610
+ "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",
5584
5611
  props.dragging && "oui-bg-primary "
5585
5612
  ),
5586
5613
  children: /* @__PURE__ */ jsxRuntime.jsx(
5587
5614
  KlineDragIcon,
5588
5615
  {
5589
5616
  className: orderlyUi.cn(
5590
- "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",
5617
+ "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",
5591
5618
  props.dragging && " oui-text-primary"
5592
5619
  )
5593
5620
  }
@@ -6706,7 +6733,7 @@ var AccountInfo = (props) => {
6706
6733
  {
6707
6734
  size: "2xs",
6708
6735
  intensity: 80,
6709
- prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-pr-1" }),
6736
+ prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-1 oui-w-1 oui-rounded-full oui-bg-success oui-pe-1" }),
6710
6737
  children: props.chainName
6711
6738
  }
6712
6739
  )
@@ -7084,17 +7111,10 @@ var Account = (props) => {
7084
7111
  }
7085
7112
  );
7086
7113
  };
7087
- orderlyUi.installExtension({
7088
- name: "mobile-account-menu",
7089
- scope: ["*"],
7090
- positions: [orderlyUi.ExtensionPositionEnum.MobileAccountMenu],
7091
- builder: useAccountScript,
7092
- __isInternal: true
7093
- })((props) => {
7094
- return /* @__PURE__ */ jsxRuntime.jsx(Account, { ...props });
7095
- });
7114
+ var InjectableAccount = orderlyUi.injectable(Account, "Account.MobileAccountMenu");
7096
7115
  var MobileAccountMenuExtension = () => {
7097
- return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.ExtensionSlot, { position: orderlyUi.ExtensionPositionEnum.MobileAccountMenu });
7116
+ const state = useAccountScript();
7117
+ return /* @__PURE__ */ jsxRuntime.jsx(InjectableAccount, { ...state });
7098
7118
  };
7099
7119
 
7100
7120
  // src/components/mobile/bottomNavBar/balance/balance.ui.tsx
@@ -7132,7 +7152,7 @@ var Chain = (props) => {
7132
7152
  },
7133
7153
  children: /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.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: [
7134
7154
  /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.ChainIcon, { chainId: props.currentChainId, size: "2xs" }),
7135
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-right-0 oui-bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
7155
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-end-0 oui-bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
7136
7156
  "svg",
7137
7157
  {
7138
7158
  width: "9",
@@ -7583,7 +7603,7 @@ var RiskIndicator = (props) => {
7583
7603
  "div",
7584
7604
  {
7585
7605
  className: orderlyUi.cn(
7586
- "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",
7606
+ "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",
7587
7607
  className
7588
7608
  // {
7589
7609
  // "oui-rotate-0": value > 1,
@@ -7989,7 +8009,7 @@ var SortablePanel = (props) => {
7989
8009
  {
7990
8010
  ...attributes,
7991
8011
  ...listeners,
7992
- className: "oui-absolute oui-right-0 oui-top-4 oui-cursor-move oui-py-1",
8012
+ className: "oui-absolute oui-end-0 oui-top-4 oui-cursor-move oui-py-1",
7993
8013
  style: { touchAction: "none" },
7994
8014
  ref: setActivatorNodeRef,
7995
8015
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -8058,7 +8078,7 @@ var RwaOutsideMarketHoursNotify = () => {
8058
8078
  /* @__PURE__ */ jsxRuntime.jsx(
8059
8079
  "button",
8060
8080
  {
8061
- 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",
8081
+ 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",
8062
8082
  onClick: closeNotify,
8063
8083
  children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.CloseIcon, { opacity: 1, className: "oui-text-base-contrast", size: 16 })
8064
8084
  }
@@ -8569,7 +8589,10 @@ var DesktopLayout4 = (props) => {
8569
8589
  }
8570
8590
  ];
8571
8591
  },
8572
- sideEffects: ({ active, dragOverlay }) => {
8592
+ sideEffects: ({
8593
+ active,
8594
+ dragOverlay
8595
+ }) => {
8573
8596
  active.node.style.opacity = "0";
8574
8597
  const innerElement = dragOverlay.node.querySelector(".inner-content");
8575
8598
  if (innerElement) {
@@ -8642,11 +8665,9 @@ var DesktopLayout4 = (props) => {
8642
8665
  const marketsWidget = /* @__PURE__ */ jsxRuntime.jsx(
8643
8666
  orderlyMarkets.SideMarketsWidget,
8644
8667
  {
8645
- resizeable,
8646
- panelSize,
8647
- onPanelSizeChange,
8648
8668
  symbol: props.symbol,
8649
- onSymbolChange: props.onSymbolChange
8669
+ onSymbolChange: props.onSymbolChange,
8670
+ panelSize
8650
8671
  }
8651
8672
  );
8652
8673
  const toggleButtoncls = orderlyUi.cn(
@@ -8688,13 +8709,13 @@ var DesktopLayout4 = (props) => {
8688
8709
  height: "100%",
8689
8710
  width: marketsWidth,
8690
8711
  style: { minWidth: marketsWidth },
8691
- className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8712
+ className: "oui-trading-markets-container oui-min-h-0 oui-min-w-0 oui-max-w-full oui-transition-all oui-duration-150",
8692
8713
  onTransitionEnd: () => setAnimating(false),
8693
8714
  children: /* @__PURE__ */ jsxRuntime.jsxs(
8694
8715
  orderlyUi.Flex,
8695
8716
  {
8696
8717
  id: "oui-side-markets",
8697
- className: "oui-relative oui-font-semibold",
8718
+ className: "oui-relative oui-min-h-0 oui-min-w-0 oui-font-semibold",
8698
8719
  direction: "column",
8699
8720
  gapY: 5,
8700
8721
  height: "100%",
@@ -8705,10 +8726,7 @@ var DesktopLayout4 = (props) => {
8705
8726
  orderlyUi.Box,
8706
8727
  {
8707
8728
  width: "100%",
8708
- className: orderlyUi.cn(
8709
- panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8710
- panelSize === "middle" && "oui-h-full"
8711
- ),
8729
+ className: "oui-min-h-0 oui-min-w-0 oui-max-w-full oui-flex-1 oui-overflow-hidden oui-rounded-b-2xl",
8712
8730
  children: marketsWidget
8713
8731
  }
8714
8732
  )
@@ -8752,10 +8770,10 @@ var DesktopLayout4 = (props) => {
8752
8770
  {
8753
8771
  classNames: {
8754
8772
  root: orderlyUi.cn(
8755
- 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"
8773
+ tradingViewFullScreen ? "!oui-absolute oui-inset-0 oui-z-40 oui-bg-base-10" : "oui-z-1"
8756
8774
  ),
8757
8775
  content: orderlyUi.cn(
8758
- tradingViewFullScreen ? "oui-top-3 oui-bottom-3 oui-left-3 oui-right-3 oui-bg-base-9 oui-rounded-[16px] oui-overflow-hidden" : ""
8776
+ tradingViewFullScreen ? "oui-inset-3 oui-overflow-hidden oui-rounded-[16px] oui-bg-base-9" : ""
8759
8777
  )
8760
8778
  },
8761
8779
  symbol: props.symbol,
@@ -8887,7 +8905,8 @@ var DesktopLayout4 = (props) => {
8887
8905
  orderlyUi.Flex,
8888
8906
  {
8889
8907
  gap: 2,
8890
- className: "oui-flex-1 oui-overflow-hidden",
8908
+ itemAlign: "stretch",
8909
+ className: "oui-min-h-0 oui-flex-1 oui-overflow-hidden",
8891
8910
  style: { minWidth: marketsWidth + tradingViewMinWidth + space },
8892
8911
  children: [
8893
8912
  marketLayout === "left" && marketsView,
@@ -8917,10 +8936,20 @@ var DesktopLayout4 = (props) => {
8917
8936
  );
8918
8937
  const renderTradingViewAndOrderbookView = () => {
8919
8938
  if (max4XL && layout === "left") {
8920
- return /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gapX: 2, style: { minHeight: orderbookMinHeight }, height: "100%", children: [
8921
- tradingViewAndOrderbookView,
8922
- marketLayout === "left" && marketsView
8923
- ] });
8939
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8940
+ orderlyUi.Flex,
8941
+ {
8942
+ gapX: 2,
8943
+ itemAlign: "stretch",
8944
+ className: "oui-min-h-0",
8945
+ style: { minHeight: orderbookMinHeight },
8946
+ height: "100%",
8947
+ children: [
8948
+ tradingViewAndOrderbookView,
8949
+ marketLayout === "left" && marketsView
8950
+ ]
8951
+ }
8952
+ );
8924
8953
  }
8925
8954
  return tradingViewAndOrderbookView;
8926
8955
  };
@@ -9049,6 +9078,7 @@ var DesktopLayout4 = (props) => {
9049
9078
  pt: 3,
9050
9079
  r: "2xl",
9051
9080
  width: marketsWidth,
9081
+ className: "oui-overflow-hidden",
9052
9082
  style: {
9053
9083
  minHeight: tradindviewMinHeight + orderbookMinHeight + space,
9054
9084
  maxHeight: tradindviewMaxHeight + orderbookMaxHeight + space
@@ -9226,8 +9256,9 @@ var DesktopLayout4 = (props) => {
9226
9256
  /* @__PURE__ */ jsxRuntime.jsxs(
9227
9257
  orderlyUi.Flex,
9228
9258
  {
9259
+ itemAlign: "stretch",
9229
9260
  className: orderlyUi.cn(
9230
- "oui-flex-1 oui-overflow-hidden",
9261
+ "oui-min-h-0 oui-flex-1 oui-overflow-hidden",
9231
9262
  layout === "left" && "oui-flex-row-reverse"
9232
9263
  ),
9233
9264
  gap: 2,
@@ -9275,6 +9306,12 @@ var DesktopLayout4 = (props) => {
9275
9306
  }
9276
9307
  );
9277
9308
  };
9309
+
9310
+ // src/pages/trading/trading.injectable.tsx
9311
+ var InjectableDesktopLayout = orderlyUi.injectable(
9312
+ DesktopLayout4,
9313
+ "Trading.Layout.Desktop"
9314
+ );
9278
9315
  var Countdown = ({
9279
9316
  timeInterval
9280
9317
  }) => {
@@ -9420,7 +9457,7 @@ var MobileLayout4 = (props) => {
9420
9457
  ]
9421
9458
  }
9422
9459
  );
9423
- }, [isRwa, open, closeTimeInterval]);
9460
+ }, [closeTimeInterval, isRwa, open, t]);
9424
9461
  const symbolInfoBar = /* @__PURE__ */ jsxRuntime.jsx(
9425
9462
  orderlyMarkets.SymbolInfoBarWidget,
9426
9463
  {
@@ -9538,7 +9575,7 @@ var Trading = (props) => {
9538
9575
  return /* @__PURE__ */ jsxRuntime.jsx(MobileLayout4, { ...props });
9539
9576
  }
9540
9577
  return /* @__PURE__ */ jsxRuntime.jsx(
9541
- DesktopLayout4,
9578
+ InjectableDesktopLayout,
9542
9579
  {
9543
9580
  className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
9544
9581
  ...props