@gearbox-protocol/ui-kit 3.14.0-next.34 → 3.14.0-next.35

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.
Files changed (93) hide show
  1. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  2. package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
  3. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
  4. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  5. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  6. package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
  7. package/dist/cjs/components/composites/credit-account-history/body.cjs +1 -0
  8. package/dist/cjs/components/composites/credit-account-history/cells/details.cjs +1 -0
  9. package/dist/cjs/components/composites/credit-account-history/cells/hash.cjs +1 -0
  10. package/dist/cjs/components/composites/credit-account-history/cells/index.cjs +1 -0
  11. package/dist/cjs/components/composites/credit-account-history/cells/protocol.cjs +1 -0
  12. package/dist/cjs/components/composites/credit-account-history/cells/token-list.cjs +1 -0
  13. package/dist/cjs/components/composites/credit-account-history/credit-account-history.cjs +1 -0
  14. package/dist/cjs/components/composites/credit-account-history/index.cjs +1 -0
  15. package/dist/cjs/components/composites/credit-account-history/line.cjs +1 -0
  16. package/dist/cjs/components/composites/credit-account-history/types.cjs +1 -0
  17. package/dist/cjs/components/composites/index.cjs +1 -1
  18. package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
  19. package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
  20. package/dist/cjs/components/composites/tx-preview/confirm/preview/OperationPreviewContent.cjs +1 -1
  21. package/dist/cjs/components/composites/tx-preview/operations/OperationsCard.cjs +1 -1
  22. package/dist/cjs/components/composites/tx-preview/operations/PoolDepositView.cjs +1 -1
  23. package/dist/cjs/components/composites/tx-preview/operations/PoolWithdrawView.cjs +1 -1
  24. package/dist/cjs/components/composites/tx-preview/state-change/BalanceChangeGroup.cjs +1 -1
  25. package/dist/cjs/components/composites/tx-preview/state-change/StateChangeCard.cjs +1 -1
  26. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  27. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  28. package/dist/cjs/components/graph/formatters.cjs +1 -1
  29. package/dist/cjs/components/graph/graph.cjs +1 -1
  30. package/dist/cjs/components/graph/index.cjs +1 -1
  31. package/dist/cjs/components/index.cjs +1 -1
  32. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  33. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  34. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  35. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  36. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  37. package/dist/cjs/index.cjs +1 -1
  38. package/dist/cjs/locale/en.json.cjs +1 -1
  39. package/dist/esm/components/assets-list-cell/assets-list-cell.js +3 -2
  40. package/dist/esm/components/block-sync/block-sync.js +3 -2
  41. package/dist/esm/components/block-sync-pill/block-sync-pill.js +3 -2
  42. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
  43. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
  44. package/dist/esm/components/complex-input/complex-input.js +3 -2
  45. package/dist/esm/components/composites/credit-account-history/body.js +73 -0
  46. package/dist/esm/components/composites/credit-account-history/cells/details.js +22 -0
  47. package/dist/esm/components/composites/credit-account-history/cells/hash.js +24 -0
  48. package/dist/esm/components/composites/credit-account-history/cells/index.js +10 -0
  49. package/dist/esm/components/composites/credit-account-history/cells/protocol.js +25 -0
  50. package/dist/esm/components/composites/credit-account-history/cells/token-list.js +43 -0
  51. package/dist/esm/components/composites/credit-account-history/credit-account-history.js +46 -0
  52. package/dist/esm/components/composites/credit-account-history/index.js +8 -0
  53. package/dist/esm/components/composites/credit-account-history/line.js +125 -0
  54. package/dist/esm/components/composites/credit-account-history/types.js +9 -0
  55. package/dist/esm/components/composites/index.js +85 -79
  56. package/dist/esm/components/composites/pool-table/columns.js +19 -18
  57. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +3 -2
  58. package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js +3 -2
  59. package/dist/esm/components/composites/tx-preview/operations/OperationsCard.js +3 -2
  60. package/dist/esm/components/composites/tx-preview/operations/PoolDepositView.js +3 -2
  61. package/dist/esm/components/composites/tx-preview/operations/PoolWithdrawView.js +3 -2
  62. package/dist/esm/components/composites/tx-preview/state-change/BalanceChangeGroup.js +3 -2
  63. package/dist/esm/components/composites/tx-preview/state-change/StateChangeCard.js +3 -2
  64. package/dist/esm/components/compound-apy/compound-apy.js +3 -2
  65. package/dist/esm/components/detailed-page-title/detailed-page-title.js +1 -0
  66. package/dist/esm/components/graph/formatters.js +48 -47
  67. package/dist/esm/components/graph/graph.js +491 -435
  68. package/dist/esm/components/graph/index.js +19 -18
  69. package/dist/esm/components/index.js +687 -680
  70. package/dist/esm/components/markdown-viewer/markdown-viewer.js +3 -2
  71. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +1 -0
  72. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +3 -2
  73. package/dist/esm/components/trading-view/trading-view.js +164 -147
  74. package/dist/esm/components/with-copy/with-copy.js +3 -2
  75. package/dist/esm/index.js +855 -848
  76. package/dist/esm/locale/en.json.js +3 -0
  77. package/dist/globals.css +1 -1
  78. package/dist/types/components/composites/credit-account-history/body.d.ts +14 -0
  79. package/dist/types/components/composites/credit-account-history/cells/details.d.ts +9 -0
  80. package/dist/types/components/composites/credit-account-history/cells/hash.d.ts +6 -0
  81. package/dist/types/components/composites/credit-account-history/cells/index.d.ts +4 -0
  82. package/dist/types/components/composites/credit-account-history/cells/protocol.d.ts +7 -0
  83. package/dist/types/components/composites/credit-account-history/cells/token-list.d.ts +9 -0
  84. package/dist/types/components/composites/credit-account-history/credit-account-history.d.ts +15 -0
  85. package/dist/types/components/composites/credit-account-history/index.d.ts +2 -0
  86. package/dist/types/components/composites/credit-account-history/line.d.ts +18 -0
  87. package/dist/types/components/composites/credit-account-history/types.d.ts +36 -0
  88. package/dist/types/components/composites/index.d.ts +1 -0
  89. package/dist/types/components/graph/graph.d.ts +40 -3
  90. package/dist/types/components/graph/index.d.ts +1 -1
  91. package/dist/types/components/trading-view/trading-view.d.ts +15 -1
  92. package/dist/types/locale/en.json.d.ts +4 -0
  93. package/package.json +2 -2
@@ -50,6 +50,7 @@ import "../../../input/input.js";
50
50
  import "../../../with-title/with-title.js";
51
51
  import "../../../smart-number-input/balance-indicator.js";
52
52
  import "../../../smart-number-input/smart-number-input.js";
53
+ import "../../credit-account-history/credit-account-history.js";
53
54
  import "../../../table/grid-table.js";
54
55
  import "../../../token-symbol/token-symbol.js";
55
56
  import "../../../typography/typography.js";
@@ -181,7 +182,7 @@ function l(o) {
181
182
  return o.operation;
182
183
  }
183
184
  }
184
- function Ct({
185
+ function Pt({
185
186
  sdk: o,
186
187
  transaction: r,
187
188
  wallet: i
@@ -189,6 +190,6 @@ function Ct({
189
190
  return n(r) ? /* @__PURE__ */ t(m, { value: "operations", title: l(r), children: /* @__PURE__ */ t(e, { sdk: o, operation: r, wallet: i }) }) : null;
190
191
  }
191
192
  export {
192
- Ct as OperationsCard,
193
+ Pt as OperationsCard,
193
194
  n as hasOperationView
194
195
  };
@@ -50,6 +50,7 @@ import "../../../input/input.js";
50
50
  import "../../../with-title/with-title.js";
51
51
  import "../../../smart-number-input/balance-indicator.js";
52
52
  import "../../../smart-number-input/smart-number-input.js";
53
+ import "../../credit-account-history/credit-account-history.js";
53
54
  import "../../../table/grid-table.js";
54
55
  import "../../../token-symbol/token-symbol.js";
55
56
  import "../../../typography/typography.js";
@@ -171,7 +172,7 @@ import { TransferList as u } from "../components/TransferList.js";
171
172
  import { buildPoolOperationLabels as v } from "../utils/addressLabels.js";
172
173
  import { resolveToken as m } from "../utils/poolTokenInfo.js";
173
174
  import { PoolRow as b } from "./PoolRow.js";
174
- function Vt({
175
+ function Dt({
175
176
  sdk: t,
176
177
  operation: r,
177
178
  wallet: i
@@ -199,5 +200,5 @@ function Vt({
199
200
  ] });
200
201
  }
201
202
  export {
202
- Vt as PoolDepositView
203
+ Dt as PoolDepositView
203
204
  };
@@ -49,6 +49,7 @@ import "../../../input/input.js";
49
49
  import "../../../with-title/with-title.js";
50
50
  import "../../../smart-number-input/balance-indicator.js";
51
51
  import "../../../smart-number-input/smart-number-input.js";
52
+ import "../../credit-account-history/credit-account-history.js";
52
53
  import "../../../table/grid-table.js";
53
54
  import "../../../token-symbol/token-symbol.js";
54
55
  import "../../../typography/typography.js";
@@ -171,7 +172,7 @@ import { TransferList as d } from "../components/TransferList.js";
171
172
  import { buildPoolOperationLabels as w } from "../utils/addressLabels.js";
172
173
  import { resolveToken as p } from "../utils/poolTokenInfo.js";
173
174
  import { PoolRow as c } from "./PoolRow.js";
174
- function gm({
175
+ function km({
175
176
  sdk: m,
176
177
  operation: r,
177
178
  wallet: e
@@ -193,5 +194,5 @@ function gm({
193
194
  ] });
194
195
  }
195
196
  export {
196
- gm as PoolWithdrawView
197
+ km as PoolWithdrawView
197
198
  };
@@ -49,6 +49,7 @@ import "../../../input/input.js";
49
49
  import "../../../with-title/with-title.js";
50
50
  import "../../../smart-number-input/balance-indicator.js";
51
51
  import "../../../smart-number-input/smart-number-input.js";
52
+ import "../../credit-account-history/credit-account-history.js";
52
53
  import "../../../table/grid-table.js";
53
54
  import "../../../token-symbol/token-symbol.js";
54
55
  import "../../../typography/typography.js";
@@ -168,7 +169,7 @@ import "../../../with-filter-button/with-filter-button.js";
168
169
  import { getAddressLabel as a } from "../components/addressLabel.js";
169
170
  import { SectionDivider as l } from "../components/SectionDivider.js";
170
171
  import { BalanceChangeRow as n } from "./BalanceChangeRow.js";
171
- function vi({
172
+ function ji({
172
173
  sdk: m,
173
174
  group: o,
174
175
  labels: p
@@ -180,5 +181,5 @@ function vi({
180
181
  ] });
181
182
  }
182
183
  export {
183
- vi as BalanceChangeGroup
184
+ ji as BalanceChangeGroup
184
185
  };
@@ -51,6 +51,7 @@ import "../../../input/input.js";
51
51
  import "../../../with-title/with-title.js";
52
52
  import "../../../smart-number-input/balance-indicator.js";
53
53
  import "../../../smart-number-input/smart-number-input.js";
54
+ import "../../credit-account-history/credit-account-history.js";
54
55
  import "../../../table/grid-table.js";
55
56
  import "../../../token-symbol/token-symbol.js";
56
57
  import "../../../typography/typography.js";
@@ -170,7 +171,7 @@ import "../../../with-filter-button/with-filter-button.js";
170
171
  import { CollapsibleCard as p } from "../components/CollapsibleCard.js";
171
172
  import { PoolStateChangeCard as f } from "./PoolStateChangeCard.js";
172
173
  const m = "state-change", e = "State changes", h = "Transaction will revert";
173
- function xo({
174
+ function Ao({
174
175
  sdk: n,
175
176
  data: o,
176
177
  simulation: t,
@@ -195,5 +196,5 @@ function xo({
195
196
  ) }) : null;
196
197
  }
197
198
  export {
198
- xo as StateChangeCard
199
+ Ao as StateChangeCard
199
200
  };
@@ -53,6 +53,7 @@ import "../input/input.js";
53
53
  import "../with-title/with-title.js";
54
54
  import "../smart-number-input/balance-indicator.js";
55
55
  import "../smart-number-input/smart-number-input.js";
56
+ import "../composites/credit-account-history/credit-account-history.js";
56
57
  import "../table/grid-table.js";
57
58
  import { getSymbolOrIcon as R } from "../token-symbol/token-symbol.js";
58
59
  import "../typography/typography.js";
@@ -174,7 +175,7 @@ function O(r, m) {
174
175
  const n = r?.symbol || m;
175
176
  return n === "GEAR" ? { icon: Z("/logo/logo_symbol.png") } : R(r) || n;
176
177
  }
177
- function Kr({
178
+ function Qr({
178
179
  totalAPY: r,
179
180
  totalAPYLoading: m,
180
181
  baseAPY: n,
@@ -276,6 +277,6 @@ function Kr({
276
277
  ) : v();
277
278
  }
278
279
  export {
279
- Kr as CompoundAPY,
280
+ Qr as CompoundAPY,
280
281
  O as getRewardTokenSymbol
281
282
  };
@@ -48,6 +48,7 @@ import "../input/input.js";
48
48
  import "../with-title/with-title.js";
49
49
  import "../smart-number-input/balance-indicator.js";
50
50
  import "../smart-number-input/smart-number-input.js";
51
+ import "../composites/credit-account-history/credit-account-history.js";
51
52
  import "../table/grid-table.js";
52
53
  import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
53
54
  import "../typography/typography.js";
@@ -1,12 +1,12 @@
1
1
  import { TickMarkType as g } from "lightweight-charts";
2
2
  import { DateTime as S } from "luxon";
3
- import { isBelowDisplayThreshold as x, FORMAT_CONSTANTS as X, toSignificantDigits as k, formatNumberWithSuffix as L } from "../../utils/format-number.js";
4
- const { MIN_DISPLAY_THRESHOLD: h, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e, o = "full") => {
3
+ import { isBelowDisplayThreshold as x, FORMAT_CONSTANTS as X, toSignificantDigits as L, formatNumberWithSuffix as k } from "../../utils/format-number.js";
4
+ const { MIN_DISPLAY_THRESHOLD: M, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e, o = "full") => {
5
5
  if (x(t))
6
- return e ? `<${h}${e}` : `<${h}`;
6
+ return e ? `<${M}${e}` : `<${M}`;
7
7
  if (t === 0)
8
8
  return e ? `0${e}` : "0";
9
- const r = L(t, {
9
+ const r = k(t, {
10
10
  maxExponentialThreshold: I,
11
11
  minimumFractionDigits: 0,
12
12
  maximumFractionDigits: o === "short" ? 1 : 0,
@@ -16,34 +16,34 @@ const { MIN_DISPLAY_THRESHOLD: h, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e,
16
16
  return e ? `${r}${e}` : r;
17
17
  }, U = 2, p = (t, e) => {
18
18
  if (x(t))
19
- return e ? `<${h}${e}` : `<${h}`;
19
+ return e ? `<${M}${e}` : `<${M}`;
20
20
  if (t === 0)
21
21
  return e ? `0${e}` : "0";
22
- const o = k(t, U);
22
+ const o = L(t, U);
23
23
  return e ? `${o}${e}` : o;
24
24
  }, C = 4, w = (t) => {
25
25
  if (x(t))
26
- return `<${h}`;
26
+ return `<${M}`;
27
27
  if (t === 0)
28
28
  return "0";
29
29
  const e = Math.round(t), o = Math.abs(t - e);
30
- return o > 0 && o < 0.01 ? t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "") : k(t, C);
30
+ return o > 0 && o < 0.01 ? t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "") : L(t, C);
31
31
  }, G = (t, e) => {
32
32
  if (x(t))
33
- return e ? `<${h} ${e}` : `<${h}`;
33
+ return e ? `<${M} ${e}` : `<${M}`;
34
34
  if (t === 0)
35
35
  return e ? `0 ${e}` : "0";
36
- const o = Number.isInteger(t), r = Math.abs(t), s = o && r >= 1e3, i = Math.round(t), a = Math.abs(t - i);
37
- if (a > 0 && a < 0.01 && !s) {
36
+ const o = Number.isInteger(t), r = Math.abs(t), i = o && r >= 1e3, s = Math.round(t), a = Math.abs(t - s);
37
+ if (a > 0 && a < 0.01 && !i) {
38
38
  const $ = t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
39
39
  return e ? `${$} ${e}` : $;
40
40
  }
41
- const F = L(t, {
41
+ const F = k(t, {
42
42
  maxExponentialThreshold: I,
43
43
  minimumFractionDigits: o ? 0 : 2,
44
- maximumFractionDigits: s ? 1 : o ? 0 : 2,
45
- format: s ? "short" : "full",
46
- adaptiveDecimals: s
44
+ maximumFractionDigits: i ? 1 : o ? 0 : 2,
45
+ format: i ? "short" : "full",
46
+ adaptiveDecimals: i
47
47
  });
48
48
  return e ? `${F} ${e}` : F;
49
49
  }, N = {
@@ -55,41 +55,41 @@ const { MIN_DISPLAY_THRESHOLD: h, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e,
55
55
  function Z(t, e, o = 4) {
56
56
  if (t === 0)
57
57
  return e ? `0 ${e}` : "0";
58
- const r = e && Math.abs(t) >= 1e3 ? 0 : o, s = t.toLocaleString("en-US", {
58
+ const r = e && Math.abs(t) >= 1e3 ? 0 : o, i = t.toLocaleString("en-US", {
59
59
  minimumFractionDigits: 0,
60
60
  maximumFractionDigits: r
61
61
  });
62
- return e ? `${s} ${e}` : s;
62
+ return e ? `${i} ${e}` : i;
63
63
  }
64
64
  function v(t, e, o) {
65
65
  const r = o?.yScaleMin;
66
- let s = t.length > 0 ? Math.min(...t) : 0, i = t.length > 0 ? Math.max(...t) : 0, a = [];
66
+ let i = t.length > 0 ? Math.min(...t) : 0, s = t.length > 0 ? Math.max(...t) : 0, a = [];
67
67
  const u = () => {
68
- const n = (s + i) / 2;
68
+ const n = (i + s) / 2;
69
69
  let c = 1, m = "";
70
70
  return n >= 1e9 ? (c = 1e9, m = "B") : n >= 1e6 ? (c = 1e6, m = "M") : n >= 1e3 && (c = 1e3, m = "K"), { scale: c, suffix: m };
71
71
  }, F = 8, $ = 0.02;
72
72
  let A = 0;
73
73
  const E = (n, c, m, d) => {
74
- const M = (c > 1 ? n / c : n).toLocaleString("en-US", {
74
+ const h = (c > 1 ? n / c : n).toLocaleString("en-US", {
75
75
  minimumFractionDigits: 0,
76
76
  maximumFractionDigits: d,
77
77
  useGrouping: !1
78
78
  });
79
- return c > 1 ? `${M}${m}` : M;
79
+ return c > 1 ? `${h}${m}` : h;
80
80
  }, R = (n, c, m) => {
81
81
  for (let d = 0; d <= F; d++) {
82
82
  const l = /* @__PURE__ */ new Set();
83
- let M = !0;
83
+ let h = !0;
84
84
  for (const D of n) {
85
85
  const f = E(D, c, m, d);
86
86
  if (l.has(f)) {
87
- M = !1;
87
+ h = !1;
88
88
  break;
89
89
  }
90
90
  l.add(f);
91
91
  }
92
- if (M) return d;
92
+ if (h) return d;
93
93
  }
94
94
  return F;
95
95
  }, O = (n) => {
@@ -101,13 +101,13 @@ function v(t, e, o) {
101
101
  return {
102
102
  formatter: (n) => O(n),
103
103
  tickmarksFormatter: (n) => {
104
- const { scale: c, suffix: m } = u(), d = i - s, l = d > 0 ? a.filter(
104
+ const { scale: c, suffix: m } = u(), d = s - i, l = d > 0 ? a.filter(
105
105
  (f) => Math.abs(f) >= d * $
106
- ) : a, M = n.filter(
106
+ ) : a, h = n.filter(
107
107
  (f) => f !== 0 && !(r !== void 0 && f < r)
108
108
  );
109
109
  A = R(
110
- [...M, ...l],
110
+ [...h, ...l],
111
111
  c,
112
112
  m
113
113
  );
@@ -119,54 +119,55 @@ function v(t, e, o) {
119
119
  });
120
120
  },
121
121
  updateVisibleRange: (n) => {
122
- n.length > 0 && (s = Math.min(...n), i = Math.max(...n));
122
+ n.length > 0 && (i = Math.min(...n), s = Math.max(...n));
123
123
  },
124
124
  updateLastValues: (n) => {
125
125
  a = [...n];
126
126
  }
127
127
  };
128
128
  }
129
- const H = (t) => S.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"), Y = (t) => S.fromSeconds(Number(t)).toFormat("HH:mm"), b = (t, e) => p(Number(t), e), _ = {
129
+ const H = (t) => S.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"), Y = (t) => S.fromSeconds(Number(t)).toFormat("HH:mm"), V = (t, e) => p(Number(t), e), _ = {
130
130
  time: H,
131
- "%": b
131
+ "%": V
132
132
  };
133
- function V(t) {
133
+ function W(t) {
134
134
  const e = /* @__PURE__ */ new Map();
135
- return (o, r, s) => {
136
- const i = S.fromSeconds(Number(o));
135
+ return (o, r, i) => {
136
+ const s = S.fromSeconds(Number(o));
137
137
  let a;
138
138
  if (t === 0)
139
- a = i.toFormat("HH:mm");
139
+ a = s.toFormat("HH:mm");
140
140
  else
141
141
  switch (r) {
142
142
  case g.Year:
143
- a = i.toFormat("yyyy");
143
+ a = s.toFormat("yyyy");
144
144
  break;
145
+ // Month boundaries (1st of a month) are reported as `Month` ticks by
146
+ // lightweight-charts. Render them the same way as regular day ticks so
147
+ // the axis reads uniformly ("01 Jul") instead of a stray "Jul 2026".
145
148
  case g.Month:
146
- a = i.toFormat("MMM yy");
147
- break;
148
149
  case g.DayOfMonth:
149
- a = t > 365 ? i.toFormat("dd MMM yy") : i.toFormat("dd MMM");
150
+ a = t > 365 ? s.toFormat("dd MMM yyyy") : s.toFormat("dd MMM");
150
151
  break;
151
152
  case g.Time:
152
153
  case g.TimeWithSeconds:
153
- a = i.toFormat("HH:mm");
154
+ a = s.toFormat("HH:mm");
154
155
  break;
155
156
  default:
156
- a = i.toFormat("dd MMM");
157
+ a = s.toFormat("dd MMM");
157
158
  }
158
159
  let u = e.get(r);
159
160
  return u || (u = /* @__PURE__ */ new Set(), e.set(r, u)), u.has(a) ? " " : (u.add(a), a);
160
161
  };
161
162
  }
162
- const W = (t, e) => {
163
+ const b = (t, e) => {
163
164
  if (t === "time" && e && e.length > 0) {
164
- const r = S.fromSeconds(Number(e[0].time)), s = S.fromSeconds(
165
+ const r = S.fromSeconds(Number(e[0].time)), i = S.fromSeconds(
165
166
  Number(e[e.length - 1].time)
166
- ), i = r.hasSame(s, "day"), a = i ? 0 : Math.ceil(s.diff(r, "days").days);
167
+ ), s = r.hasSame(i, "day"), a = s ? 0 : Math.ceil(i.diff(r, "days").days);
167
168
  return {
168
- timeFormatter: i ? Y : H,
169
- tickMarkFormatter: V(a)
169
+ timeFormatter: s ? Y : H,
170
+ tickMarkFormatter: W(a)
170
171
  };
171
172
  }
172
173
  const o = _[t] || _.time;
@@ -174,11 +175,11 @@ const W = (t, e) => {
174
175
  timeFormatter: o,
175
176
  tickMarkFormatter: (r) => o(r, void 0)
176
177
  };
177
- }, tt = (t, e) => W(t, e).timeFormatter;
178
+ }, tt = (t, e) => b(t, e).timeFormatter;
178
179
  export {
179
180
  v as createAdaptiveYAxisFormatter,
180
181
  Z as formatExactValue,
181
182
  tt as getXFormatter,
182
- W as getXFormatters,
183
+ b as getXFormatters,
183
184
  J as getYFormatter
184
185
  };