@kodiak-finance/orderly-trading 2.9.1 → 2.9.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4396,6 +4396,53 @@ var init_orderBookAndTrades = __esm({
4396
4396
  init_orderBookAndTrades_script();
4397
4397
  }
4398
4398
  });
4399
+ var KlineDragIcon, CollapseIcon, ExpandIcon;
4400
+ var init_icons = __esm({
4401
+ "src/components/base/icons.tsx"() {
4402
+ KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4403
+ "svg",
4404
+ {
4405
+ width: "12",
4406
+ height: "12",
4407
+ viewBox: "0 0 12 12",
4408
+ fill: "currentColor",
4409
+ xmlns: "http://www.w3.org/2000/svg",
4410
+ ...props,
4411
+ children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
4412
+ "path",
4413
+ {
4414
+ id: "Vector",
4415
+ d: "M5.9989 1.00708C5.8709 1.00708 5.7369 1.05008 5.6394 1.14758L3.7959 3.00708L4.4989 3.71008L5.4989 2.72607V4.50708C5.4989 4.78308 5.7229 5.00708 5.9989 5.00708C6.2749 5.00708 6.4989 4.78308 6.4989 4.50708V2.72607L7.4989 3.71008L8.2019 3.00708L6.3584 1.14758C6.2604 1.05008 6.1269 1.00708 5.9989 1.00708ZM5.9989 7.00707C5.7229 7.00707 5.4989 7.23107 5.4989 7.50707V9.28808L4.4989 8.30407L3.7959 9.00707L5.6394 10.8666C5.8349 11.0616 6.1629 11.0616 6.3584 10.8666L8.2019 9.00707L7.4989 8.30407L6.4989 9.28808V7.50707C6.4989 7.23107 6.2749 7.00707 5.9989 7.00707Z"
4416
+ }
4417
+ ) })
4418
+ }
4419
+ );
4420
+ CollapseIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4421
+ "svg",
4422
+ {
4423
+ width: "16",
4424
+ height: "16",
4425
+ viewBox: "0 0 16 16",
4426
+ fill: "currentColor",
4427
+ xmlns: "http://www.w3.org/2000/svg",
4428
+ ...props,
4429
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.668.492a.85.85 0 0 0-.599.234l-3.567 3.568V2.159H8.835v4.167c0 .46.373.833.833.833h4.167V5.492H11.7l3.569-3.567a.86.86 0 0 0 0-1.199.85.85 0 0 0-.6-.234m-12.5 8.334v1.666h2.135L.736 14.06a.86.86 0 0 0 0 1.198.86.86 0 0 0 1.198 0l3.568-3.567v2.134h1.666V9.66a.834.834 0 0 0-.833-.833z" })
4430
+ }
4431
+ );
4432
+ ExpandIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4433
+ "svg",
4434
+ {
4435
+ width: "16",
4436
+ height: "16",
4437
+ viewBox: "0 0 16 16",
4438
+ fill: "currentColor",
4439
+ xmlns: "http://www.w3.org/2000/svg",
4440
+ ...props,
4441
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.326 8.826a.84.84 0 0 0-.6.234L2.16 12.627v-2.135H.492v4.167c0 .46.373.833.834.833h4.166v-1.667H3.357l3.567-3.567a.857.857 0 0 0 0-1.198.84.84 0 0 0-.598-.234M10.502.492V2.16h2.135L9.07 5.726a.857.857 0 0 0 0 1.199.86.86 0 0 0 1.197 0l3.568-3.568v2.135h1.667V1.326a.834.834 0 0 0-.834-.834z" })
4442
+ }
4443
+ );
4444
+ }
4445
+ });
4399
4446
 
4400
4447
  // src/components/desktop/layout/switchLayout.tsx
4401
4448
  var switchLayout_exports = {};
@@ -5505,29 +5552,6 @@ var init_tradingview_script = __esm({
5505
5552
  Key = "TRADINGVIEW_MOBILE_HEIGHT";
5506
5553
  }
5507
5554
  });
5508
- var KlineDragIcon;
5509
- var init_icons = __esm({
5510
- "src/components/base/icons.tsx"() {
5511
- KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
5512
- "svg",
5513
- {
5514
- width: "12",
5515
- height: "12",
5516
- viewBox: "0 0 12 12",
5517
- fill: "currentColor",
5518
- xmlns: "http://www.w3.org/2000/svg",
5519
- ...props,
5520
- children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
5521
- "path",
5522
- {
5523
- id: "Vector",
5524
- d: "M5.9989 1.00708C5.8709 1.00708 5.7369 1.05008 5.6394 1.14758L3.7959 3.00708L4.4989 3.71008L5.4989 2.72607V4.50708C5.4989 4.78308 5.7229 5.00708 5.9989 5.00708C6.2749 5.00708 6.4989 4.78308 6.4989 4.50708V2.72607L7.4989 3.71008L8.2019 3.00708L6.3584 1.14758C6.2604 1.05008 6.1269 1.00708 5.9989 1.00708ZM5.9989 7.00707C5.7229 7.00707 5.4989 7.23107 5.4989 7.50707V9.28808L4.4989 8.30407L3.7959 9.00707L5.6394 10.8666C5.8349 11.0616 6.1629 11.0616 6.3584 10.8666L8.2019 9.00707L7.4989 8.30407L6.4989 9.28808V7.50707C6.4989 7.23107 6.2749 7.00707 5.9989 7.00707Z"
5525
- }
5526
- ) })
5527
- }
5528
- );
5529
- }
5530
- });
5531
5555
  var TradingviewUI;
5532
5556
  var init_tradingview_ui = __esm({
5533
5557
  "src/components/mobile/tradingview/tradingview.ui.tsx"() {
@@ -7872,6 +7896,9 @@ init_fundingRate();
7872
7896
  init_fundingRateModal_script();
7873
7897
  init_fundingRateModal_ui();
7874
7898
  init_fundingRateModal_widget();
7899
+
7900
+ // src/pages/trading/trading.ui.desktop.tsx
7901
+ init_icons();
7875
7902
  var SortablePanel = (props) => {
7876
7903
  const { showIndicator, dragOverlay } = props;
7877
7904
  const nodeRef = React12.useRef(null);
@@ -8492,6 +8519,7 @@ var DesktopLayout4 = (props) => {
8492
8519
  } = props;
8493
8520
  const { showCountdown, closeCountdown } = useShowRwaCountdown(props.symbol);
8494
8521
  const { brokerName } = orderlyHooks.useBadgeBySymbol(props.symbol);
8522
+ const { t } = orderlyI18n.useTranslation();
8495
8523
  const symbolInfoBarHeight2 = React12.useMemo(() => {
8496
8524
  let height = 56;
8497
8525
  if (brokerName) {
@@ -8621,6 +8649,36 @@ var DesktopLayout4 = (props) => {
8621
8649
  onSymbolChange: props.onSymbolChange
8622
8650
  }
8623
8651
  );
8652
+ const toggleButtoncls = orderlyUi.cn(
8653
+ "oui-text-base-contrast-36",
8654
+ resizeable ? "oui-cursor-pointer hover:oui-text-base-contrast-80" : "oui-cursor-not-allowed"
8655
+ );
8656
+ const marketsHeader = /* @__PURE__ */ jsxRuntime.jsxs(
8657
+ orderlyUi.Flex,
8658
+ {
8659
+ className: panelSize === "small" ? "oui-absolute oui-end-[-20px] oui-z-50" : "oui-relative",
8660
+ justify: panelSize === "large" ? "between" : "center",
8661
+ width: "100%",
8662
+ px: 3,
8663
+ children: [
8664
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "base", intensity: 80, children: t("common.markets") }),
8665
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(
8666
+ "div",
8667
+ {
8668
+ onClick: resizeable ? () => onPanelSizeChange?.("middle") : void 0,
8669
+ children: /* @__PURE__ */ jsxRuntime.jsx(CollapseIcon, { className: toggleButtoncls })
8670
+ }
8671
+ ),
8672
+ (panelSize === "middle" || panelSize === "small") && /* @__PURE__ */ jsxRuntime.jsx(
8673
+ "div",
8674
+ {
8675
+ onClick: resizeable ? () => onPanelSizeChange?.("large") : void 0,
8676
+ children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { className: toggleButtoncls })
8677
+ }
8678
+ )
8679
+ ]
8680
+ }
8681
+ );
8624
8682
  const marketsView = /* @__PURE__ */ jsxRuntime.jsx(
8625
8683
  orderlyUi.Box,
8626
8684
  {
@@ -8632,7 +8690,31 @@ var DesktopLayout4 = (props) => {
8632
8690
  style: { minWidth: marketsWidth },
8633
8691
  className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8634
8692
  onTransitionEnd: () => setAnimating(false),
8635
- children: !animating && marketLayout === "left" && marketsWidget
8693
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8694
+ orderlyUi.Flex,
8695
+ {
8696
+ id: "oui-side-markets",
8697
+ className: "oui-relative oui-font-semibold",
8698
+ direction: "column",
8699
+ gapY: 5,
8700
+ height: "100%",
8701
+ width: "100%",
8702
+ children: [
8703
+ marketsHeader,
8704
+ !animating && marketLayout === "left" && /* @__PURE__ */ jsxRuntime.jsx(
8705
+ orderlyUi.Box,
8706
+ {
8707
+ width: "100%",
8708
+ className: orderlyUi.cn(
8709
+ panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8710
+ panelSize === "middle" && "oui-h-full"
8711
+ ),
8712
+ children: marketsWidget
8713
+ }
8714
+ )
8715
+ ]
8716
+ }
8717
+ )
8636
8718
  }
8637
8719
  );
8638
8720
  const symbolInfoBarView = /* @__PURE__ */ jsxRuntime.jsx(