@orbs-network/spot-react 0.0.20 → 0.0.21

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.
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-JG9komnp.js";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-CTa7tQT1.js";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -2864,7 +2864,7 @@ const ch = (e) => {
2864
2864
  }
2865
2865
  });
2866
2866
  }
2867
- })), g3 = "0.0.20", x3 = {
2867
+ })), g3 = "0.0.21", x3 = {
2868
2868
  version: g3
2869
2869
  };
2870
2870
  var Po = class {
@@ -28367,7 +28367,7 @@ async function Mu(e, t) {
28367
28367
  });
28368
28368
  return W === "0x" ? { data: void 0 } : { data: W };
28369
28369
  } catch (S) {
28370
- const A = n_(S), { offchainLookup: D, offchainLookupSignature: z } = await import("./ccip-BsP3sOmP.js");
28370
+ const A = n_(S), { offchainLookup: D, offchainLookupSignature: z } = await import("./ccip-DCn7SCg6.js");
28371
28371
  if (e.ccipRead !== !1 && (A == null ? void 0 : A.slice(0, 10)) === z && O)
28372
28372
  return { data: await D(e, { data: A, to: O }) };
28373
28373
  throw E && (A == null ? void 0 : A.slice(0, 10)) === "0x101bb98d" ? new xS({ factory: h }) : f0(S, {
@@ -40264,17 +40264,50 @@ const Cm = () => {
40264
40264
  ),
40265
40265
  /* @__PURE__ */ M(Se.Container, { children: /* @__PURE__ */ xe("div", { className: "twap-orders__selected-order-bottom", children: [
40266
40266
  /* @__PURE__ */ xe("div", { className: "twap-orders__selected-order-accordions", children: [
40267
- /* @__PURE__ */ M(Z1, { title: n("excecutionSummary"), onClick: () => i("panel1"), expanded: r === "panel1", children: /* @__PURE__ */ M(RW, {}) }),
40268
- /* @__PURE__ */ M(Z1, { title: n("orderInfo"), expanded: r === "panel2", onClick: () => i("panel2"), children: /* @__PURE__ */ M(BW, {}) })
40267
+ /* @__PURE__ */ M(
40268
+ Z1,
40269
+ {
40270
+ title: n("excecutionSummary"),
40271
+ onClick: () => i("panel1"),
40272
+ expanded: r === "panel1",
40273
+ children: /* @__PURE__ */ M(RW, {})
40274
+ }
40275
+ ),
40276
+ /* @__PURE__ */ M(
40277
+ Z1,
40278
+ {
40279
+ title: n("orderInfo"),
40280
+ expanded: r === "panel2",
40281
+ onClick: () => i("panel2"),
40282
+ children: /* @__PURE__ */ M(BW, {})
40283
+ }
40284
+ )
40269
40285
  ] }),
40270
40286
  /* @__PURE__ */ M(LW, {})
40271
40287
  ] }) })
40272
40288
  ] }) }) : null;
40273
- }, Z1 = ({ expanded: e, onClick: t, children: n, title: r }) => /* @__PURE__ */ xe("div", { className: "twap-orders__selected-order-accordion", children: [
40274
- /* @__PURE__ */ xe("div", { onClick: t, className: "twap-orders__selected-order-accordion-trigger", children: [
40275
- /* @__PURE__ */ M("p", { children: r }),
40276
- /* @__PURE__ */ M(rL.IoIosArrowDown, { style: { transform: e ? "rotate(180deg)" : "rotate(0deg)" } })
40277
- ] }),
40289
+ }, Z1 = ({
40290
+ expanded: e,
40291
+ onClick: t,
40292
+ children: n,
40293
+ title: r
40294
+ }) => /* @__PURE__ */ xe("div", { className: "twap-orders__selected-order-accordion", children: [
40295
+ /* @__PURE__ */ xe(
40296
+ "div",
40297
+ {
40298
+ onClick: t,
40299
+ className: "twap-orders__selected-order-accordion-trigger",
40300
+ children: [
40301
+ /* @__PURE__ */ M("p", { children: r }),
40302
+ /* @__PURE__ */ M(
40303
+ rL.IoIosArrowDown,
40304
+ {
40305
+ style: { transform: e ? "rotate(180deg)" : "rotate(0deg)" }
40306
+ }
40307
+ )
40308
+ ]
40309
+ }
40310
+ ),
40278
40311
  e && /* @__PURE__ */ M("div", { className: "twap-orders__selected-order-accordion-details", children: n })
40279
40312
  ] }), BW = () => /* @__PURE__ */ xe(Se, { children: [
40280
40313
  /* @__PURE__ */ M(NW, {}),
@@ -40302,7 +40335,14 @@ const Cm = () => {
40302
40335
  );
40303
40336
  }, FW = () => {
40304
40337
  const { order: e } = Vt();
40305
- return /* @__PURE__ */ M(Se.TradesAmount, { trades: e.display.totalTrades.value, label: e.display.totalTrades.label, tooltip: e.display.totalTrades.tooltip });
40338
+ return /* @__PURE__ */ M(
40339
+ Se.TradesAmount,
40340
+ {
40341
+ trades: e.display.totalTrades.value,
40342
+ label: e.display.totalTrades.label,
40343
+ tooltip: e.display.totalTrades.tooltip
40344
+ }
40345
+ );
40306
40346
  }, UW = () => {
40307
40347
  const { order: e } = Vt();
40308
40348
  return /* @__PURE__ */ M(
@@ -40316,7 +40356,14 @@ const Cm = () => {
40316
40356
  );
40317
40357
  }, DW = () => {
40318
40358
  const { order: e } = Vt();
40319
- return /* @__PURE__ */ M(Se.Deadline, { deadline: e.display.deadline.value, label: e.display.deadline.label, tooltip: e.display.deadline.tooltip });
40359
+ return /* @__PURE__ */ M(
40360
+ Se.Deadline,
40361
+ {
40362
+ deadline: e.display.deadline.value,
40363
+ label: e.display.deadline.label,
40364
+ tooltip: e.display.deadline.tooltip
40365
+ }
40366
+ );
40320
40367
  }, _W = () => {
40321
40368
  const { order: e } = Vt();
40322
40369
  return /* @__PURE__ */ M(
@@ -40350,22 +40397,36 @@ const Cm = () => {
40350
40397
  /* @__PURE__ */ M(YW, {})
40351
40398
  ] }), zW = () => {
40352
40399
  var n;
40353
- const { order: e } = Vt(), t = Ye({ value: e.amountOutFilled.value, decimalScale: 3 });
40400
+ const { order: e } = Vt(), t = Ye({
40401
+ value: e.amountOutFilled.value,
40402
+ decimalScale: 3
40403
+ });
40354
40404
  return e.amountOutFilled.value ? /* @__PURE__ */ M(Se.DetailRow, { title: e.amountOutFilled.label, children: /* @__PURE__ */ xe("p", { children: [
40355
40405
  t || "-",
40356
40406
  " ",
40357
40407
  (n = e.data.dstToken) == null ? void 0 : n.symbol
40358
40408
  ] }) }) : null;
40359
40409
  }, LW = () => {
40360
- const { order: e } = Vt(), { mutateAsync: t, isPending: n } = Sm(), { components: r } = de(), a = r.Button, s = Be(async () => {
40361
- }, [t, e]);
40362
- return !e || e.original.status !== ut.Open || !a ? null : /* @__PURE__ */ M(a, { loading: n, onClick: s, disabled: n, className: "twap-cancel-order", children: "Cancel" });
40410
+ const { order: e } = Vt(), { mutateAsync: t, isPending: n } = Sm(), { components: r } = de(), a = r.Button, s = Be(async () => t({ orders: [e.original] }), [t, e]);
40411
+ return !e || e.original.status !== ut.Open || !a ? null : /* @__PURE__ */ M(
40412
+ a,
40413
+ {
40414
+ loading: n,
40415
+ onClick: s,
40416
+ disabled: n,
40417
+ className: "twap-cancel-order",
40418
+ children: "Cancel"
40419
+ }
40420
+ );
40363
40421
  }, $W = () => {
40364
40422
  const { order: e } = Vt(), t = $e(), n = Tm(e.createdAt.value);
40365
40423
  return /* @__PURE__ */ M(Se.DetailRow, { title: t("createdAt") || "", children: /* @__PURE__ */ M("p", { children: n }) });
40366
40424
  }, HW = () => {
40367
40425
  var r;
40368
- const { order: e } = Vt(), t = $e(), n = Ye({ value: e.display.srcAmount.value, decimalScale: 3 });
40426
+ const { order: e } = Vt(), t = $e(), n = Ye({
40427
+ value: e.display.srcAmount.value,
40428
+ decimalScale: 3
40429
+ });
40369
40430
  return /* @__PURE__ */ M(Se.DetailRow, { title: t("amountOut") || "", children: /* @__PURE__ */ xe("p", { children: [
40370
40431
  n || 0,
40371
40432
  " ",
@@ -40373,7 +40434,10 @@ const Cm = () => {
40373
40434
  ] }) });
40374
40435
  }, GW = () => {
40375
40436
  var n;
40376
- const { order: e } = Vt(), t = Ye({ value: e.amountInFilled.value, decimalScale: 3 });
40437
+ const { order: e } = Vt(), t = Ye({
40438
+ value: e.amountInFilled.value,
40439
+ decimalScale: 3
40440
+ });
40377
40441
  return /* @__PURE__ */ M(Se.DetailRow, { title: e.amountInFilled.label, children: /* @__PURE__ */ xe("p", { children: [
40378
40442
  t || "-",
40379
40443
  " ",
@@ -40397,18 +40461,42 @@ const Cm = () => {
40397
40461
  const e = $e(), t = jW();
40398
40462
  return /* @__PURE__ */ M(Se.DetailRow, { title: e("status") || "", children: /* @__PURE__ */ M("p", { children: t }) });
40399
40463
  }, WW = () => {
40400
- const { order: e } = Vt(), t = Ye({ value: e.progress.value, decimalScale: 2 });
40464
+ const { order: e } = Vt(), t = Ye({
40465
+ value: e.progress.value,
40466
+ decimalScale: 2
40467
+ });
40401
40468
  return /* @__PURE__ */ M(Se.DetailRow, { title: e.progress.label, children: /* @__PURE__ */ xe("p", { children: [
40402
40469
  t || 0,
40403
40470
  "%"
40404
40471
  ] }) });
40405
40472
  }, qW = () => {
40406
40473
  const { order: e } = Vt(), t = $e();
40407
- return e.display.limitPrice.value ? /* @__PURE__ */ M(vx, { title: t("limitPrice") || "", price: e.display.limitPrice.value, srcToken: e.data.srcToken, dstToken: e.data.dstToken }) : null;
40474
+ return e.display.limitPrice.value ? /* @__PURE__ */ M(
40475
+ vx,
40476
+ {
40477
+ title: t("limitPrice") || "",
40478
+ price: e.display.limitPrice.value,
40479
+ srcToken: e.data.srcToken,
40480
+ dstToken: e.data.dstToken
40481
+ }
40482
+ ) : null;
40408
40483
  }, YW = () => {
40409
40484
  const { order: e } = Vt();
40410
- return e.excecutionPrice.value ? /* @__PURE__ */ M(vx, { title: e.excecutionPrice.label, price: e.excecutionPrice.value, srcToken: e.data.srcToken, dstToken: e.data.dstToken }) : null;
40411
- }, vx = ({ price: e, srcToken: t, dstToken: n, title: r }) => {
40485
+ return e.excecutionPrice.value ? /* @__PURE__ */ M(
40486
+ vx,
40487
+ {
40488
+ title: e.excecutionPrice.label,
40489
+ price: e.excecutionPrice.value,
40490
+ srcToken: e.data.srcToken,
40491
+ dstToken: e.data.dstToken
40492
+ }
40493
+ ) : null;
40494
+ }, vx = ({
40495
+ price: e,
40496
+ srcToken: t,
40497
+ dstToken: n,
40498
+ title: r
40499
+ }) => {
40412
40500
  const a = Ye({ value: e, decimalScale: 3 });
40413
40501
  return /* @__PURE__ */ M(Se.DetailRow, { title: r, children: he(e || 0).isZero() ? /* @__PURE__ */ M("p", { children: "-" }) : /* @__PURE__ */ xe("p", { children: [
40414
40502
  "1 ",
@@ -43914,7 +44002,7 @@ const OY = () => {
43914
44002
  const { srcToken: e, dstToken: t, marketPriceLoading: n } = de(), r = X((l) => l.updateState), a = X((l) => l.state.isInvertedTrade), s = X((l) => l.state.typedTriggerPrice), o = X((l) => l.state.typedLimitPrice), i = X((l) => l.state.isMarketOrder);
43915
44003
  return {
43916
44004
  onInvert: Be(() => {
43917
- n || (s !== void 0 && r({ typedTriggerPrice: he(1).div(s).toFixed() }), o !== void 0 && r({ typedLimitPrice: he(1).div(o).toFixed() }), r({ isInvertedTrade: !a }));
44005
+ s !== void 0 && r({ typedTriggerPrice: he(1).div(s).toFixed() }), o !== void 0 && r({ typedLimitPrice: he(1).div(o).toFixed() }), r({ isInvertedTrade: !a });
43918
44006
  }, [r, a, s, o, n]),
43919
44007
  isInverted: a,
43920
44008
  fromToken: a ? t : e,
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@orbs-network/spot-react",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Spot React Components - React components for Spot SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/spot-react.umd.cjs",
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { C as r, $ as t, D as i, a9 as n, aa as E, ab as o, ac as _, ad as T, n as P, ae as l, af as A, ag as u, ah as I, ai as R, aj as L, I as S, ak as O, al as g, am as d, an as D, ao as m, ap as M, aq as C, O as U, J as p, ar as c, as as N, at as k, t as b, M as F, N as B, P as y, L as G, au as h, av as x, aw as Y, ax as f, ay as v, S as w, G as H, K as W, az as K, aA as Q, aB as V, aC as X, aD as z, aE as j, aF as q, R as J, a0 as Z, a6 as $, T as aa, W as sa, aG as ea, aH as ra, aI as ta, aJ as ia, aK as na, aL as Ea, aM as oa, aN as _a, aO as Ta, a8 as Pa, aP as la, aQ as Aa, aR as ua, aS as Ia, aT as Ra, Y as La, aU as Sa, aV as Oa, aW as ga, aX as da, Z as Da, aY as ma, _ as Ma, a3 as Ca, aZ as Ua, a_ as pa, a$ as ca, b0 as Na, b1 as ka, b2 as ba, b3 as Fa, b4 as Ba, b5 as ya, b6 as Ga, a7 as ha, X as xa, U as Ya, b7 as fa, a1 as va, a2 as wa, b8 as Ha, b9 as Wa, V as Ka, Q as Qa, ba as Va, bb as Xa, a5 as za, a4 as ja, bc as qa, A as Ja, w as Za, p as $a, h as as, j as ss, F as es, y as rs, x as ts, k as is, m as ns, r as Es, o as os, v as _s, z as Ts, u as Ps, q as ls, E as As, bd as us } from "./index-JG9komnp.js";
2
+ import { C as r, $ as t, D as i, a9 as n, aa as E, ab as o, ac as _, ad as T, n as P, ae as l, af as A, ag as u, ah as I, ai as R, aj as L, I as S, ak as O, al as g, am as d, an as D, ao as m, ap as M, aq as C, O as U, J as p, ar as c, as as N, at as k, t as b, M as F, N as B, P as y, L as G, au as h, av as x, aw as Y, ax as f, ay as v, S as w, G as H, K as W, az as K, aA as Q, aB as V, aC as X, aD as z, aE as j, aF as q, R as J, a0 as Z, a6 as $, T as aa, W as sa, aG as ea, aH as ra, aI as ta, aJ as ia, aK as na, aL as Ea, aM as oa, aN as _a, aO as Ta, a8 as Pa, aP as la, aQ as Aa, aR as ua, aS as Ia, aT as Ra, Y as La, aU as Sa, aV as Oa, aW as ga, aX as da, Z as Da, aY as ma, _ as Ma, a3 as Ca, aZ as Ua, a_ as pa, a$ as ca, b0 as Na, b1 as ka, b2 as ba, b3 as Fa, b4 as Ba, b5 as ya, b6 as Ga, a7 as ha, X as xa, U as Ya, b7 as fa, a1 as va, a2 as wa, b8 as Ha, b9 as Wa, V as Ka, Q as Qa, ba as Va, bb as Xa, a5 as za, a4 as ja, bc as qa, A as Ja, w as Za, p as $a, h as as, j as ss, F as es, y as rs, x as ts, k as is, m as ns, r as Es, o as os, v as _s, z as Ts, u as Ps, q as ls, E as As, bd as us } from "./index-CTa7tQT1.js";
3
3
  export {
4
4
  r as Components,
5
5
  t as Configs,