@orderly.network/trading 2.11.0 → 3.0.0-beta.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 CHANGED
@@ -1,5 +1,6 @@
1
+ import { AccountState as AccountState$1 } from '@orderly.network/core';
1
2
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, FC, RefObject, PropsWithChildren } from 'react';
3
+ import React__default, { ReactNode, FC, PropsWithChildren, RefObject } from 'react';
3
4
  import * as _orderly_network_types from '@orderly.network/types';
4
5
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
5
6
  import * as _orderly_network_ui_share from '@orderly.network/ui-share';
@@ -11,6 +12,35 @@ import Split, { SplitProps } from '@uiw/react-split';
11
12
  import { SliderMarks } from '@orderly.network/ui';
12
13
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
14
 
15
+ interface Props$1 {
16
+ data: number[][];
17
+ }
18
+
19
+ interface Props {
20
+ data: any[];
21
+ }
22
+
23
+ declare const useAccountScript: () => {
24
+ onShowAccountSheet: () => void;
25
+ address: string | undefined;
26
+ state: AccountState$1;
27
+ };
28
+ type AccountState = ReturnType<typeof useAccountScript>;
29
+
30
+ /**
31
+ * Module augmentation: maps interceptor target paths to their component props types.
32
+ * Import from @orderly.network/trading to enable typed props in
33
+ * createInterceptor('Account.MobileAccountMenu', ...) and createInterceptor('OrderBook.Desktop.Asks', ...).
34
+ */
35
+
36
+ declare module "@orderly.network/plugin-core" {
37
+ interface InterceptorTargetPropsMap {
38
+ "Account.MobileAccountMenu": AccountState;
39
+ "OrderBook.Desktop.Asks": Props$1;
40
+ "OrderBook.Desktop.Bids": Props;
41
+ }
42
+ }
43
+
14
44
  type layoutInfo = {
15
45
  width?: number;
16
46
  height?: number;
@@ -304,6 +334,36 @@ interface BuySellRatioBarProps {
304
334
  }
305
335
  declare const BuySellRatioBar: FC<BuySellRatioBarProps>;
306
336
 
337
+ type QtyMode = "quantity" | "amount";
338
+ type TotalMode = "quantity" | "amount";
339
+
340
+ interface OrderBookContextValue {
341
+ cellHeight: number;
342
+ mode: QtyMode;
343
+ depth?: string;
344
+ onModeChange?: (mode: QtyMode) => void;
345
+ onItemClick?: (item: number[]) => void;
346
+ showTotal: boolean;
347
+ totalMode: TotalMode;
348
+ pendingOrders: ReadonlyArray<number> | number[];
349
+ onTotalModeChange?: (mode: TotalMode) => void;
350
+ symbolInfo: BasicSymbolInfo;
351
+ showBuySellRatio: boolean;
352
+ onShowBuySellRatioChange?: (show: boolean) => void;
353
+ }
354
+ declare const useOrderBookContext: () => OrderBookContextValue;
355
+ interface OrderBookProviderProps {
356
+ cellHeight: number;
357
+ depth?: string;
358
+ showTotal: boolean;
359
+ pendingOrders: ReadonlyArray<number> | number[];
360
+ onItemClick?: (item: number[]) => void;
361
+ symbolInfo: BasicSymbolInfo;
362
+ showBuySellRatio?: boolean;
363
+ onShowBuySellRatioChange?: (show: boolean) => void;
364
+ }
365
+ declare const OrderBookProvider: FC<PropsWithChildren<OrderBookProviderProps>>;
366
+
307
367
  declare const useRiskRateScript: () => {
308
368
  riskRate: string | null;
309
369
  riskRateColor: {
@@ -369,7 +429,7 @@ declare const usePortfolioSheetScript: () => {
369
429
  hasSubAccount: boolean;
370
430
  aggregated: Omit<_orderly_network_types.API.PositionsTPSLExt, "rows">;
371
431
  totalUnrealizedROI: number;
372
- positionsInfo: Record<"unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
432
+ positionsInfo: Record<"notional" | "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "unrealPnlROI" | "unrealPnlROI_index", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
373
433
  isNil: boolean;
374
434
  };
375
435
  marginRatio: number;
@@ -546,4 +606,4 @@ declare const usePendingOrderCount: (symbol?: string) => {
546
606
  tpSlOrderCount: number;
547
607
  };
548
608
 
549
- export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
609
+ export { type AccountState, AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, type OrderBookContextValue, type Props$1 as OrderBookDesktopAsksProps, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { AccountState as AccountState$1 } from '@orderly.network/core';
1
2
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, FC, RefObject, PropsWithChildren } from 'react';
3
+ import React__default, { ReactNode, FC, PropsWithChildren, RefObject } from 'react';
3
4
  import * as _orderly_network_types from '@orderly.network/types';
4
5
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
5
6
  import * as _orderly_network_ui_share from '@orderly.network/ui-share';
@@ -11,6 +12,35 @@ import Split, { SplitProps } from '@uiw/react-split';
11
12
  import { SliderMarks } from '@orderly.network/ui';
12
13
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
14
 
15
+ interface Props$1 {
16
+ data: number[][];
17
+ }
18
+
19
+ interface Props {
20
+ data: any[];
21
+ }
22
+
23
+ declare const useAccountScript: () => {
24
+ onShowAccountSheet: () => void;
25
+ address: string | undefined;
26
+ state: AccountState$1;
27
+ };
28
+ type AccountState = ReturnType<typeof useAccountScript>;
29
+
30
+ /**
31
+ * Module augmentation: maps interceptor target paths to their component props types.
32
+ * Import from @orderly.network/trading to enable typed props in
33
+ * createInterceptor('Account.MobileAccountMenu', ...) and createInterceptor('OrderBook.Desktop.Asks', ...).
34
+ */
35
+
36
+ declare module "@orderly.network/plugin-core" {
37
+ interface InterceptorTargetPropsMap {
38
+ "Account.MobileAccountMenu": AccountState;
39
+ "OrderBook.Desktop.Asks": Props$1;
40
+ "OrderBook.Desktop.Bids": Props;
41
+ }
42
+ }
43
+
14
44
  type layoutInfo = {
15
45
  width?: number;
16
46
  height?: number;
@@ -304,6 +334,36 @@ interface BuySellRatioBarProps {
304
334
  }
305
335
  declare const BuySellRatioBar: FC<BuySellRatioBarProps>;
306
336
 
337
+ type QtyMode = "quantity" | "amount";
338
+ type TotalMode = "quantity" | "amount";
339
+
340
+ interface OrderBookContextValue {
341
+ cellHeight: number;
342
+ mode: QtyMode;
343
+ depth?: string;
344
+ onModeChange?: (mode: QtyMode) => void;
345
+ onItemClick?: (item: number[]) => void;
346
+ showTotal: boolean;
347
+ totalMode: TotalMode;
348
+ pendingOrders: ReadonlyArray<number> | number[];
349
+ onTotalModeChange?: (mode: TotalMode) => void;
350
+ symbolInfo: BasicSymbolInfo;
351
+ showBuySellRatio: boolean;
352
+ onShowBuySellRatioChange?: (show: boolean) => void;
353
+ }
354
+ declare const useOrderBookContext: () => OrderBookContextValue;
355
+ interface OrderBookProviderProps {
356
+ cellHeight: number;
357
+ depth?: string;
358
+ showTotal: boolean;
359
+ pendingOrders: ReadonlyArray<number> | number[];
360
+ onItemClick?: (item: number[]) => void;
361
+ symbolInfo: BasicSymbolInfo;
362
+ showBuySellRatio?: boolean;
363
+ onShowBuySellRatioChange?: (show: boolean) => void;
364
+ }
365
+ declare const OrderBookProvider: FC<PropsWithChildren<OrderBookProviderProps>>;
366
+
307
367
  declare const useRiskRateScript: () => {
308
368
  riskRate: string | null;
309
369
  riskRateColor: {
@@ -369,7 +429,7 @@ declare const usePortfolioSheetScript: () => {
369
429
  hasSubAccount: boolean;
370
430
  aggregated: Omit<_orderly_network_types.API.PositionsTPSLExt, "rows">;
371
431
  totalUnrealizedROI: number;
372
- positionsInfo: Record<"unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
432
+ positionsInfo: Record<"notional" | "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "unrealPnlROI" | "unrealPnlROI_index", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
373
433
  isNil: boolean;
374
434
  };
375
435
  marginRatio: number;
@@ -546,4 +606,4 @@ declare const usePendingOrderCount: (symbol?: string) => {
546
606
  tpSlOrderCount: number;
547
607
  };
548
608
 
549
- export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
609
+ export { type AccountState, AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, type OrderBookContextValue, type Props$1 as OrderBookDesktopAsksProps, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
package/dist/index.js CHANGED
@@ -1823,16 +1823,16 @@ var init_assetView = __esm({
1823
1823
  init_assetView_widget();
1824
1824
  }
1825
1825
  });
1826
- var OrderBookContext, useOrderBookContext, ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY, OrderBookProvider;
1826
+ var OrderBookContext; exports.useOrderBookContext = void 0; var ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY; exports.OrderBookProvider = void 0;
1827
1827
  var init_orderContext = __esm({
1828
1828
  "src/components/base/orderBook/orderContext.tsx"() {
1829
1829
  OrderBookContext = React12.createContext({
1830
1830
  cellHeight: 22
1831
1831
  });
1832
- useOrderBookContext = () => React12.useContext(OrderBookContext);
1832
+ exports.useOrderBookContext = () => React12.useContext(OrderBookContext);
1833
1833
  ORDERBOOK_COIN_TYPE_KEY = "orderbook_coin_type";
1834
1834
  ORDERBOOK_MOBILE_COIN_TYPE_KEY = "orderbook_mobile_coin_unit";
1835
- OrderBookProvider = (props) => {
1835
+ exports.OrderBookProvider = (props) => {
1836
1836
  const [mode, setMode] = React12.useState("quantity");
1837
1837
  const [totalMode, setTotalMode] = React12.useState("quantity");
1838
1838
  const memoizedValue = React12__default.default.useMemo(() => {
@@ -1905,7 +1905,7 @@ var init_cell_desktop = __esm({
1905
1905
  init_orderContext();
1906
1906
  init_types();
1907
1907
  DesktopOrderBookCell = (props) => {
1908
- const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = useOrderBookContext();
1908
+ const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = exports.useOrderBookContext();
1909
1909
  const {
1910
1910
  symbolInfo,
1911
1911
  currentHover,
@@ -2052,7 +2052,7 @@ var init_listBox_desktop = __esm({
2052
2052
  };
2053
2053
  DesktopListBox = (props) => {
2054
2054
  const { data, type, countQty } = props;
2055
- const { symbolInfo, depth } = useOrderBookContext();
2055
+ const { symbolInfo, depth } = exports.useOrderBookContext();
2056
2056
  const findMaxItem = React12.useCallback(() => {
2057
2057
  if (!data?.length) {
2058
2058
  return null;
@@ -2211,7 +2211,7 @@ var init_listBox_desktop = __esm({
2211
2211
  };
2212
2212
  }
2213
2213
  });
2214
- var DesktopAsks;
2214
+ var DesktopAsks, InjectableDesktopAsks;
2215
2215
  var init_asks_desktop = __esm({
2216
2216
  "src/components/desktop/orderBook/asks.desktop.tsx"() {
2217
2217
  init_types();
@@ -2237,9 +2237,13 @@ var init_asks_desktop = __esm({
2237
2237
  }
2238
2238
  );
2239
2239
  };
2240
+ InjectableDesktopAsks = ui.injectable(
2241
+ DesktopAsks,
2242
+ "OrderBook.Desktop.Asks"
2243
+ );
2240
2244
  }
2241
2245
  });
2242
- var DesktopBids;
2246
+ var DesktopBids, InjectableDesktopBids;
2243
2247
  var init_bids_desktop = __esm({
2244
2248
  "src/components/desktop/orderBook/bids.desktop.tsx"() {
2245
2249
  init_types();
@@ -2264,6 +2268,10 @@ var init_bids_desktop = __esm({
2264
2268
  }
2265
2269
  );
2266
2270
  };
2271
+ InjectableDesktopBids = ui.injectable(
2272
+ DesktopBids,
2273
+ "OrderBook.Desktop.Bids"
2274
+ );
2267
2275
  }
2268
2276
  });
2269
2277
  var BuySellRatioSettings, MoreIcon;
@@ -2403,7 +2411,7 @@ var init_header_desktop = __esm({
2403
2411
  };
2404
2412
  DesktopHeader = (props) => {
2405
2413
  const { base, quote = "USDC" } = props;
2406
- const { showTotal } = useOrderBookContext();
2414
+ const { showTotal } = exports.useOrderBookContext();
2407
2415
  const { t } = i18n.useTranslation();
2408
2416
  const [popoverOpen, setOpen] = React12__default.default.useState(false);
2409
2417
  const [coinType] = hooks.useLocalStorage(ORDERBOOK_COIN_TYPE_KEY, base);
@@ -2755,7 +2763,7 @@ var init_markPrice_desktop = __esm({
2755
2763
  init_orderContext();
2756
2764
  DesktopMarkPrice = (props) => {
2757
2765
  const { markPrice = 0, lastPrice, asks, bids, symbolInfo } = props;
2758
- const { showTotal } = useOrderBookContext();
2766
+ const { showTotal } = exports.useOrderBookContext();
2759
2767
  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: [
2760
2768
  /* @__PURE__ */ jsxRuntime.jsxs(
2761
2769
  "div",
@@ -2879,7 +2887,7 @@ var init_index_desktop = __esm({
2879
2887
  };
2880
2888
  }, []);
2881
2889
  return /* @__PURE__ */ jsxRuntime.jsx(
2882
- OrderBookProvider,
2890
+ exports.OrderBookProvider,
2883
2891
  {
2884
2892
  cellHeight: props.cellHeight ?? 20,
2885
2893
  onItemClick: props.onItemClick,
@@ -2920,7 +2928,7 @@ var init_index_desktop = __esm({
2920
2928
  )
2921
2929
  ] }),
2922
2930
  /* @__PURE__ */ jsxRuntime.jsx(DesktopHeader, { quote, base }),
2923
- /* @__PURE__ */ jsxRuntime.jsx(DesktopAsks, { data: [...props.asks] }),
2931
+ /* @__PURE__ */ jsxRuntime.jsx(InjectableDesktopAsks, { data: [...props.asks] }),
2924
2932
  /* @__PURE__ */ jsxRuntime.jsx(
2925
2933
  DesktopMarkPrice,
2926
2934
  {
@@ -2931,12 +2939,12 @@ var init_index_desktop = __esm({
2931
2939
  symbolInfo: props.symbolInfo
2932
2940
  }
2933
2941
  ),
2934
- /* @__PURE__ */ jsxRuntime.jsx(DesktopBids, { data: [...props.bids] }),
2942
+ /* @__PURE__ */ jsxRuntime.jsx(InjectableDesktopBids, { data: [...props.bids] }),
2935
2943
  showBuySellRatio && /* @__PURE__ */ jsxRuntime.jsx(
2936
2944
  exports.BuySellRatioBar,
2937
2945
  {
2938
2946
  ratio: buySellRatio || null,
2939
- className: "oui-text-2xs oui-px-3 oui-h-[38px]"
2947
+ className: "oui-h-[38px] oui-px-3 oui-text-2xs"
2940
2948
  }
2941
2949
  ),
2942
2950
  isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-bg-bg-8/70 oui-absolute oui-inset-0 oui-z-10 oui-flex oui-items-center oui-justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Spinner, {}) })
@@ -3266,7 +3274,7 @@ var init_listBox = __esm({
3266
3274
  init_cell();
3267
3275
  ListBox = (props) => {
3268
3276
  const { data } = props;
3269
- const { mode } = useOrderBookContext();
3277
+ const { mode } = exports.useOrderBookContext();
3270
3278
  return /* @__PURE__ */ jsxRuntime.jsx(ui.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) => {
3271
3279
  return /* @__PURE__ */ jsxRuntime.jsx(
3272
3280
  OrderBookCell,
@@ -3445,7 +3453,7 @@ var init_markPrice2 = __esm({
3445
3453
  init_midPriceView();
3446
3454
  init_orderContext();
3447
3455
  MarkPrice = (props) => {
3448
- const { symbolInfo } = useOrderBookContext();
3456
+ const { symbolInfo } = exports.useOrderBookContext();
3449
3457
  const { quote_dp } = symbolInfo;
3450
3458
  return /* @__PURE__ */ jsxRuntime.jsxs(
3451
3459
  ui.Flex,
@@ -3512,7 +3520,7 @@ var init_orderBook = __esm({
3512
3520
  "qty"
3513
3521
  );
3514
3522
  return /* @__PURE__ */ jsxRuntime.jsx(
3515
- OrderBookProvider,
3523
+ exports.OrderBookProvider,
3516
3524
  {
3517
3525
  cellHeight: props.cellHeight ?? 20,
3518
3526
  onItemClick: props.onItemClick,
@@ -3867,7 +3875,9 @@ var orderBook_exports = {};
3867
3875
  __export(orderBook_exports, {
3868
3876
  BuySellRatioBar: () => exports.BuySellRatioBar,
3869
3877
  OrderBook: () => exports.OrderBook,
3878
+ OrderBookProvider: () => exports.OrderBookProvider,
3870
3879
  OrderBookWidget: () => exports.OrderBookWidget,
3880
+ useOrderBookContext: () => exports.useOrderBookContext,
3871
3881
  useOrderBookScript: () => exports.useOrderBookScript
3872
3882
  });
3873
3883
  var init_orderBook2 = __esm({
@@ -3876,6 +3886,7 @@ var init_orderBook2 = __esm({
3876
3886
  init_orderBook_widget();
3877
3887
  init_orderBook_script();
3878
3888
  init_buySellRatioBar();
3889
+ init_orderContext();
3879
3890
  }
3880
3891
  });
3881
3892
  exports.RiskRate = void 0;
@@ -6882,17 +6893,10 @@ var Account = (props) => {
6882
6893
  }
6883
6894
  );
6884
6895
  };
6885
- ui.installExtension({
6886
- name: "mobile-account-menu",
6887
- scope: ["*"],
6888
- positions: [ui.ExtensionPositionEnum.MobileAccountMenu],
6889
- builder: useAccountScript,
6890
- __isInternal: true
6891
- })((props) => {
6892
- return /* @__PURE__ */ jsxRuntime.jsx(Account, { ...props });
6893
- });
6896
+ var InjectableAccount = ui.injectable(Account, "Account.MobileAccountMenu");
6894
6897
  var MobileAccountMenuExtension = () => {
6895
- return /* @__PURE__ */ jsxRuntime.jsx(ui.ExtensionSlot, { position: ui.ExtensionPositionEnum.MobileAccountMenu });
6898
+ const state = useAccountScript();
6899
+ return /* @__PURE__ */ jsxRuntime.jsx(InjectableAccount, { ...state });
6896
6900
  };
6897
6901
 
6898
6902
  // src/components/mobile/bottomNavBar/balance/balance.ui.tsx
@@ -9009,6 +9013,13 @@ var DesktopLayout4 = (props) => {
9009
9013
  }
9010
9014
  );
9011
9015
  };
9016
+ var InjectableTradingPage = ui.injectable(
9017
+ DesktopLayout4,
9018
+ "Trading.TradingPage"
9019
+ );
9020
+ var TradingPageExtension = (props) => {
9021
+ return /* @__PURE__ */ jsxRuntime.jsx(InjectableTradingPage, { ...props });
9022
+ };
9012
9023
  var Countdown = ({
9013
9024
  timeInterval
9014
9025
  }) => {
@@ -9254,7 +9265,7 @@ var Trading = (props) => {
9254
9265
  return /* @__PURE__ */ jsxRuntime.jsx(MobileLayout4, { ...props });
9255
9266
  }
9256
9267
  return /* @__PURE__ */ jsxRuntime.jsx(
9257
- DesktopLayout4,
9268
+ TradingPageExtension,
9258
9269
  {
9259
9270
  className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
9260
9271
  ...props