@orderly.network/trading 2.12.4-alpha.0 → 3.0.0-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
@@ -4251,6 +4251,53 @@ var init_orderBookAndTrades = __esm({
4251
4251
  init_orderBookAndTrades_script();
4252
4252
  }
4253
4253
  });
4254
+ var KlineDragIcon, CollapseIcon, ExpandIcon;
4255
+ var init_icons = __esm({
4256
+ "src/components/base/icons.tsx"() {
4257
+ KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4258
+ "svg",
4259
+ {
4260
+ width: "12",
4261
+ height: "12",
4262
+ viewBox: "0 0 12 12",
4263
+ fill: "currentColor",
4264
+ xmlns: "http://www.w3.org/2000/svg",
4265
+ ...props,
4266
+ children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
4267
+ "path",
4268
+ {
4269
+ id: "Vector",
4270
+ 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"
4271
+ }
4272
+ ) })
4273
+ }
4274
+ );
4275
+ CollapseIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4276
+ "svg",
4277
+ {
4278
+ width: "16",
4279
+ height: "16",
4280
+ viewBox: "0 0 16 16",
4281
+ fill: "currentColor",
4282
+ xmlns: "http://www.w3.org/2000/svg",
4283
+ ...props,
4284
+ 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" })
4285
+ }
4286
+ );
4287
+ ExpandIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4288
+ "svg",
4289
+ {
4290
+ width: "16",
4291
+ height: "16",
4292
+ viewBox: "0 0 16 16",
4293
+ fill: "currentColor",
4294
+ xmlns: "http://www.w3.org/2000/svg",
4295
+ ...props,
4296
+ 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" })
4297
+ }
4298
+ );
4299
+ }
4300
+ });
4254
4301
 
4255
4302
  // src/components/desktop/layout/switchLayout.tsx
4256
4303
  var switchLayout_exports = {};
@@ -5360,29 +5407,6 @@ var init_tradingview_script = __esm({
5360
5407
  Key = "TRADINGVIEW_MOBILE_HEIGHT";
5361
5408
  }
5362
5409
  });
5363
- var KlineDragIcon;
5364
- var init_icons = __esm({
5365
- "src/components/base/icons.tsx"() {
5366
- KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
5367
- "svg",
5368
- {
5369
- width: "12",
5370
- height: "12",
5371
- viewBox: "0 0 12 12",
5372
- fill: "currentColor",
5373
- xmlns: "http://www.w3.org/2000/svg",
5374
- ...props,
5375
- children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
5376
- "path",
5377
- {
5378
- id: "Vector",
5379
- 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"
5380
- }
5381
- ) })
5382
- }
5383
- );
5384
- }
5385
- });
5386
5410
  var TradingviewUI;
5387
5411
  var init_tradingview_ui = __esm({
5388
5412
  "src/components/mobile/tradingview/tradingview.ui.tsx"() {
@@ -7701,6 +7725,9 @@ init_fundingRate();
7701
7725
  init_fundingRateModal_script();
7702
7726
  init_fundingRateModal_ui();
7703
7727
  init_fundingRateModal_widget();
7728
+
7729
+ // src/pages/trading/trading.ui.desktop.tsx
7730
+ init_icons();
7704
7731
  var SortablePanel = (props) => {
7705
7732
  const { showIndicator, dragOverlay } = props;
7706
7733
  const nodeRef = React12.useRef(null);
@@ -8321,6 +8348,7 @@ var DesktopLayout4 = (props) => {
8321
8348
  } = props;
8322
8349
  const { showCountdown, closeCountdown } = useShowRwaCountdown(props.symbol);
8323
8350
  const { brokerName } = hooks.useBadgeBySymbol(props.symbol);
8351
+ const { t } = i18n.useTranslation();
8324
8352
  const symbolInfoBarHeight2 = React12.useMemo(() => {
8325
8353
  let height = 56;
8326
8354
  if (brokerName) {
@@ -8450,6 +8478,36 @@ var DesktopLayout4 = (props) => {
8450
8478
  onSymbolChange: props.onSymbolChange
8451
8479
  }
8452
8480
  );
8481
+ const toggleButtoncls = ui.cn(
8482
+ "oui-text-base-contrast-36",
8483
+ resizeable ? "oui-cursor-pointer hover:oui-text-base-contrast-80" : "oui-cursor-not-allowed"
8484
+ );
8485
+ const marketsHeader = /* @__PURE__ */ jsxRuntime.jsxs(
8486
+ ui.Flex,
8487
+ {
8488
+ className: panelSize === "small" ? "oui-absolute oui-end-[-20px] oui-z-50" : "oui-relative",
8489
+ justify: panelSize === "large" ? "between" : "center",
8490
+ width: "100%",
8491
+ px: 3,
8492
+ children: [
8493
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "base", intensity: 80, children: t("common.markets") }),
8494
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(
8495
+ "div",
8496
+ {
8497
+ onClick: resizeable ? () => onPanelSizeChange?.("middle") : void 0,
8498
+ children: /* @__PURE__ */ jsxRuntime.jsx(CollapseIcon, { className: toggleButtoncls })
8499
+ }
8500
+ ),
8501
+ (panelSize === "middle" || panelSize === "small") && /* @__PURE__ */ jsxRuntime.jsx(
8502
+ "div",
8503
+ {
8504
+ onClick: resizeable ? () => onPanelSizeChange?.("large") : void 0,
8505
+ children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { className: toggleButtoncls })
8506
+ }
8507
+ )
8508
+ ]
8509
+ }
8510
+ );
8453
8511
  const marketsView = /* @__PURE__ */ jsxRuntime.jsx(
8454
8512
  ui.Box,
8455
8513
  {
@@ -8461,7 +8519,31 @@ var DesktopLayout4 = (props) => {
8461
8519
  style: { minWidth: marketsWidth },
8462
8520
  className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8463
8521
  onTransitionEnd: () => setAnimating(false),
8464
- children: !animating && marketLayout === "left" && marketsWidget
8522
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8523
+ ui.Flex,
8524
+ {
8525
+ id: "oui-side-markets",
8526
+ className: "oui-relative oui-font-semibold",
8527
+ direction: "column",
8528
+ gapY: 5,
8529
+ height: "100%",
8530
+ width: "100%",
8531
+ children: [
8532
+ marketsHeader,
8533
+ !animating && marketLayout === "left" && /* @__PURE__ */ jsxRuntime.jsx(
8534
+ ui.Box,
8535
+ {
8536
+ width: "100%",
8537
+ className: ui.cn(
8538
+ panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8539
+ panelSize === "middle" && "oui-h-full"
8540
+ ),
8541
+ children: marketsWidget
8542
+ }
8543
+ )
8544
+ ]
8545
+ }
8546
+ )
8465
8547
  }
8466
8548
  );
8467
8549
  const symbolInfoBarView = /* @__PURE__ */ jsxRuntime.jsx(