@gearbox-protocol/ui-kit 3.14.0-next.33 → 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 +18 -17
  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
@@ -60,6 +60,7 @@ import "../input/input.js";
60
60
  import "../with-title/with-title.js";
61
61
  import "../smart-number-input/balance-indicator.js";
62
62
  import "../smart-number-input/smart-number-input.js";
63
+ import "../composites/credit-account-history/credit-account-history.js";
63
64
  import "../table/grid-table.js";
64
65
  import "../token-symbol/token-symbol.js";
65
66
  import "../typography/typography.js";
@@ -184,7 +185,7 @@ function a(o) {
184
185
  }
185
186
  return { id: T(l), displayText: o };
186
187
  }
187
- function zr({
188
+ function Er({
188
189
  content: o,
189
190
  title: l,
190
191
  backButton: s,
@@ -396,5 +397,5 @@ function zr({
396
397
  return c ? d : /* @__PURE__ */ r(w, { title: l || "", backButton: s, children: d });
397
398
  }
398
399
  export {
399
- zr as MarkdownViewer
400
+ Er as MarkdownViewer
400
401
  };
@@ -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 "../token-symbol/token-symbol.js";
53
54
  import "../typography/typography.js";
@@ -47,6 +47,7 @@ import "../input/input.js";
47
47
  import "../with-title/with-title.js";
48
48
  import "../smart-number-input/balance-indicator.js";
49
49
  import "../smart-number-input/smart-number-input.js";
50
+ import "../composites/credit-account-history/credit-account-history.js";
50
51
  import "../table/grid-table.js";
51
52
  import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
52
53
  import "../typography/typography.js";
@@ -163,7 +164,7 @@ import "../theme-provider.js";
163
164
  import "../time-to-liquidation/time-to-liquidation.js";
164
165
  import "../toggle/toggle.js";
165
166
  import "../with-filter-button/with-filter-button.js";
166
- function Br({
167
+ function Dr({
167
168
  balances: a,
168
169
  tokensList: l,
169
170
  maxAssets: p = 3,
@@ -226,5 +227,5 @@ function Br({
226
227
  ] });
227
228
  }
228
229
  export {
229
- Br as TokensListCell
230
+ Dr as TokensListCell
230
231
  };
@@ -1,17 +1,17 @@
1
- import { jsxs as S, jsx as l } from "react/jsx-runtime";
2
- import { useMemo as y, useCallback as ne, useRef as E } from "react";
3
- import { toast as ie } from "sonner";
4
- import { useIsMobile as le } from "../../hooks/use-media-query.js";
1
+ import { jsxs as h, jsx as i } from "react/jsx-runtime";
2
+ import { useMemo as g, useCallback as ce, useRef as N } from "react";
3
+ import { toast as ue } from "sonner";
4
+ import { useIsMobile as me } from "../../hooks/use-media-query.js";
5
5
  import "@gearbox-protocol/sdk";
6
- import { cn as se } from "../../utils/cn.js";
6
+ import { cn as de } from "../../utils/cn.js";
7
7
  import "@gearbox-protocol/sdk/common-utils";
8
8
  import "luxon";
9
9
  import "../../utils/z-index.js";
10
- import { RangeButtons as ce } from "../buttons/range-buttons/range-buttons.js";
11
- import { DEFAULT_SERIES_COLORS as k, getSeriesColorPalette as ue } from "../graph/graph.js";
12
- import { GraphViewWithData as me } from "../graph/graph-view.js";
13
- import { GraphDropdown as fe } from "./graph-dropdown.js";
14
- const de = ({ size: e = 16 }) => /* @__PURE__ */ S(
10
+ import { RangeButtons as fe } from "../buttons/range-buttons/range-buttons.js";
11
+ import { DEFAULT_SERIES_COLORS as j, getSeriesColorPalette as ae, GraphLegend as we } from "../graph/graph.js";
12
+ import { GraphViewWithData as xe } from "../graph/graph-view.js";
13
+ import { GraphDropdown as ve } from "./graph-dropdown.js";
14
+ const pe = ({ size: e = 16 }) => /* @__PURE__ */ h(
15
15
  "svg",
16
16
  {
17
17
  width: e,
@@ -24,11 +24,11 @@ const de = ({ size: e = 16 }) => /* @__PURE__ */ S(
24
24
  strokeLinejoin: "round",
25
25
  "aria-label": "Expand fullscreen",
26
26
  children: [
27
- /* @__PURE__ */ l("title", { children: "Expand fullscreen" }),
28
- /* @__PURE__ */ l("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" })
27
+ /* @__PURE__ */ i("title", { children: "Expand fullscreen" }),
28
+ /* @__PURE__ */ i("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" })
29
29
  ]
30
30
  }
31
- ), ae = ({ size: e = 16 }) => /* @__PURE__ */ S(
31
+ ), be = ({ size: e = 16 }) => /* @__PURE__ */ h(
32
32
  "svg",
33
33
  {
34
34
  width: e,
@@ -41,177 +41,194 @@ const de = ({ size: e = 16 }) => /* @__PURE__ */ S(
41
41
  strokeLinejoin: "round",
42
42
  "aria-label": "Exit fullscreen",
43
43
  children: [
44
- /* @__PURE__ */ l("title", { children: "Exit fullscreen" }),
45
- /* @__PURE__ */ l("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" })
44
+ /* @__PURE__ */ i("title", { children: "Exit fullscreen" }),
45
+ /* @__PURE__ */ i("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" })
46
46
  ]
47
47
  }
48
- ), V = "ui-kit:tradingview-series-colors:";
49
- function j(e) {
48
+ ), $ = "ui-kit:tradingview-series-colors:";
49
+ function L(e) {
50
50
  if (typeof window > "u" || !window.localStorage)
51
51
  return /* @__PURE__ */ new Map();
52
52
  try {
53
- const t = window.localStorage.getItem(V + e);
54
- if (!t) return /* @__PURE__ */ new Map();
55
- const c = JSON.parse(t);
53
+ const o = window.localStorage.getItem($ + e);
54
+ if (!o) return /* @__PURE__ */ new Map();
55
+ const c = JSON.parse(o);
56
56
  return c == null || typeof c != "object" ? /* @__PURE__ */ new Map() : new Map(
57
57
  Object.entries(c).filter(
58
- ([, o]) => typeof o == "number" && o >= 0 && o < k.length
58
+ ([, r]) => typeof r == "number" && r >= 0 && r < j.length
59
59
  )
60
60
  );
61
61
  } catch {
62
62
  return /* @__PURE__ */ new Map();
63
63
  }
64
64
  }
65
- function we(e, t) {
65
+ function ye(e, o) {
66
66
  if (!(typeof window > "u" || !window.localStorage))
67
67
  try {
68
68
  window.localStorage.setItem(
69
- V + e,
70
- JSON.stringify(Object.fromEntries(t))
69
+ $ + e,
70
+ JSON.stringify(Object.fromEntries(o))
71
71
  );
72
72
  } catch {
73
73
  }
74
74
  }
75
- function F(e, t) {
76
- if (t.size === 0) return;
77
- const c = j(e);
78
- for (const [o, v] of t)
79
- c.set(o, v);
80
- we(e, c);
75
+ function J(e, o) {
76
+ if (o.size === 0) return;
77
+ const c = L(e);
78
+ for (const [r, v] of o)
79
+ c.set(r, v);
80
+ ye(e, c);
81
81
  }
82
- function Re({
82
+ function ze({
83
83
  data: e,
84
- yMeasureUnit: t,
84
+ yMeasureUnit: o,
85
85
  height: c = 306,
86
- defaultGraph: o,
86
+ defaultGraph: r,
87
87
  onGraphSelected: v,
88
- graphs: d,
89
- isMultipleSelect: B,
90
- range: T,
91
- rangeList: N,
92
- setRange: D,
93
- onGraphExpanded: A,
94
- isGraphExpanded: W,
95
- onUnselectSeries: H,
96
- graphsWithNoData: J,
97
- loadingGraphs: I,
98
- noDataMessage: R = "No data available for this graph",
99
- currentValueDecimals: $,
100
- containerClassName: X,
101
- useSharedPriceScale: q,
102
- showCurrentValue: Q,
103
- yScaleMin: Y,
104
- yScaleMinMultiple: Z,
88
+ graphs: f,
89
+ isMultipleSelect: X,
90
+ range: q,
91
+ rangeList: R,
92
+ setRange: Q,
93
+ onGraphExpanded: I,
94
+ isGraphExpanded: Y,
95
+ onUnselectSeries: O,
96
+ graphsWithNoData: Z,
97
+ loadingGraphs: A,
98
+ isLoading: T,
99
+ noDataMessage: _ = "No data available for this graph",
100
+ currentValueDecimals: D,
101
+ containerClassName: U,
102
+ useSharedPriceScale: K,
103
+ showCurrentValue: P,
104
+ yScaleMin: G,
105
+ yScaleMinMultiple: ee,
105
106
  seriesColorPersistenceKey: u,
106
- ...U
107
+ ...z
107
108
  }) {
108
- const b = y(() => Array.isArray(e) ? e : e ? [e] : [], [e]), L = y(() => Array.isArray(e) && e.length > 1, [e]), O = le(), K = ne(
109
- (w, g) => {
110
- ie.error(R);
109
+ const p = g(() => Array.isArray(e) ? e : e ? [e] : [], [e]), C = g(() => Array.isArray(e) && e.length > 1, [e]), F = me(), te = ce(
110
+ (w, y) => {
111
+ ue.error(_);
111
112
  },
112
- [R]
113
- ), P = y(() => {
114
- if (t)
115
- return Array.isArray(t) ? t[0] : t;
116
- }, [t]), G = (!O && A || N.length > 0 || v && d && o) && /* @__PURE__ */ S("div", { className: "z-10 w-full flex flex-row flex-wrap sm:flex-nowrap items-center gap-2", children: [
117
- /* @__PURE__ */ l("div", { children: v && d && o && /* @__PURE__ */ l(
118
- fe,
119
- {
120
- onSelected: v,
121
- items: d,
122
- defaultItem: o,
123
- multiple: B,
124
- graphsWithNoData: J,
125
- loadingGraphs: I,
126
- onNoDataSelected: K
127
- }
128
- ) }),
129
- /* @__PURE__ */ S("div", { className: "flex flex-row flex-nowrap justify-start sm:justify-end items-center flex-1", children: [
130
- /* @__PURE__ */ l(ce, { range: T, rangeList: N, setRange: D }),
131
- !O && A && /* @__PURE__ */ l(
132
- "button",
133
- {
134
- type: "button",
135
- className: "px-2.5 py-1.5 flex min-w-[44px] min-h-[26px] justify-center items-center text-xs leading-[14px] font-medium text-center rounded-md border cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-muted border-muted text-muted-foreground hover:border-secondary ml-1.5",
136
- onClick: A,
137
- children: W ? /* @__PURE__ */ l(ae, { size: 16 }) : /* @__PURE__ */ l(de, { size: 16 })
138
- }
139
- )
140
- ] })
141
- ] }), i = E(/* @__PURE__ */ new Map()), a = E(0), _ = E(!1);
142
- if (d && d.length > 0 && !_.current) {
143
- _.current = !0;
144
- const w = u ? j(u) : /* @__PURE__ */ new Map(), g = String(d[0].value);
145
- i.current.set(g, 0), a.current = 1;
146
- for (let r = 1; r < d.length; r++) {
147
- const m = String(d[r].value);
148
- if (i.current.has(m)) continue;
149
- const p = w.get(m) ?? r;
150
- i.current.set(m, p), a.current = Math.max(a.current, p + 1);
113
+ [_]
114
+ ), oe = g(() => {
115
+ if (o)
116
+ return Array.isArray(o) ? o[0] : o;
117
+ }, [o]), V = !!(v && f && r), l = N(/* @__PURE__ */ new Map()), a = N(0), B = N(!1);
118
+ if (f && f.length > 0 && !B.current) {
119
+ B.current = !0;
120
+ const w = u ? L(u) : /* @__PURE__ */ new Map(), y = String(f[0].value);
121
+ l.current.set(y, 0), a.current = 1;
122
+ for (let t = 1; t < f.length; t++) {
123
+ const m = String(f[t].value);
124
+ if (l.current.has(m)) continue;
125
+ const b = w.get(m) ?? t;
126
+ l.current.set(m, b), a.current = Math.max(a.current, b + 1);
151
127
  }
152
- u && F(
128
+ u && J(
153
129
  u,
154
- i.current
130
+ l.current
155
131
  );
156
132
  }
157
- const ee = y(() => {
158
- const w = Array.isArray(t) ? t : void 0;
133
+ const W = g(() => {
134
+ const w = Array.isArray(o) ? o : void 0;
159
135
  if (u) {
160
- const r = j(u);
161
- for (const [m, x] of r)
162
- i.current.has(m) || (i.current.set(m, x), a.current = Math.max(
136
+ const t = L(u);
137
+ for (const [m, x] of t)
138
+ l.current.has(m) || (l.current.set(m, x), a.current = Math.max(
163
139
  a.current,
164
140
  x + 1
165
141
  ));
166
142
  }
167
- const g = b.map((r, m) => {
168
- const x = r?.title || `Series ${m + 1}`, p = o != null ? Array.isArray(o) ? o[0]?.value ?? o[0] : typeof o == "object" && "value" in o ? o.value : o : null, C = b.length === 1 ? p != null ? String(p) : "single" : r?.id || x;
169
- if (!i.current.has(C)) {
143
+ const y = p.map((t, m) => {
144
+ const x = t?.title || `Series ${m + 1}`, b = r != null ? Array.isArray(r) ? r[0]?.value ?? r[0] : typeof r == "object" && "value" in r ? r.value : r : null, E = p.length === 1 ? b != null ? String(b) : "single" : t?.id || x;
145
+ if (!l.current.has(E)) {
170
146
  const n = new Set(
171
- Array.from(i.current.values())
147
+ Array.from(l.current.values())
172
148
  );
173
149
  let s = a.current;
174
- for (let f = 0; f < k.length; f++) {
175
- const h = (a.current + f) % k.length;
176
- if (!n.has(h)) {
177
- s = h;
150
+ for (let d = 0; d < j.length; d++) {
151
+ const S = (a.current + d) % j.length;
152
+ if (!n.has(S)) {
153
+ s = S;
178
154
  break;
179
155
  }
180
156
  }
181
- i.current.set(C, s), a.current = s + 1;
157
+ l.current.set(E, s), a.current = s + 1;
182
158
  }
183
- const oe = i.current.get(C) ?? 0, M = ue(oe), re = [...r?.data || []].sort((n, s) => {
184
- const f = typeof n.time == "number" ? n.time : Number(n.time), h = typeof s.time == "number" ? s.time : Number(s.time);
185
- return f - h;
159
+ const le = l.current.get(E) ?? 0, k = ae(le), se = [...t?.data || []].sort((n, s) => {
160
+ const d = typeof n.time == "number" ? n.time : Number(n.time), S = typeof s.time == "number" ? s.time : Number(s.time);
161
+ return d - S;
186
162
  }).reduce((n, s) => {
187
- const f = s.time;
188
- return n.length === 0 || n[n.length - 1].time !== f ? n.push({ time: f, value: s.value }) : n[n.length - 1] = { time: f, value: s.value }, n;
189
- }, []), z = r?.lineColor ?? r?.color ?? void 0;
163
+ const d = s.time;
164
+ return n.length === 0 || n[n.length - 1].time !== d ? n.push({ time: d, value: s.value }) : n[n.length - 1] = { time: d, value: s.value }, n;
165
+ }, []), H = t?.lineColor ?? t?.color ?? void 0;
190
166
  return {
191
- data: re,
167
+ data: se,
192
168
  label: x,
193
- yMeasureUnit: w?.[m] ?? (Array.isArray(t) ? void 0 : t),
194
- ...z != null ? {
195
- lineColor: z,
196
- ...r?.topColor != null && {
197
- topColor: r.topColor
169
+ yMeasureUnit: w?.[m] ?? (Array.isArray(o) ? void 0 : o),
170
+ ...t?.priceScaleId != null && {
171
+ priceScaleId: t.priceScaleId
172
+ },
173
+ ...t?.seriesType != null && {
174
+ seriesType: t.seriesType
175
+ },
176
+ ...t?.lineStyle != null && {
177
+ lineStyle: t.lineStyle
178
+ },
179
+ ...H != null ? {
180
+ lineColor: H,
181
+ ...t?.topColor != null && {
182
+ topColor: t.topColor
198
183
  },
199
- ...r?.bottomColor != null && {
200
- bottomColor: r.bottomColor
184
+ ...t?.bottomColor != null && {
185
+ bottomColor: t.bottomColor
201
186
  }
202
187
  } : {
203
- color: M.line,
204
- topColor: M.top,
205
- bottomColor: M.bottom
188
+ color: k.line,
189
+ topColor: k.top,
190
+ bottomColor: k.bottom
206
191
  }
207
192
  };
208
193
  });
209
- return u && i.current.size > 0 && F(
194
+ return u && l.current.size > 0 && J(
210
195
  u,
211
- i.current
212
- ), g;
213
- }, [b, o, t, u]), te = I !== void 0 ? I.size > 0 : L && b.length > 0 ? b.some((w) => !w) : !e;
214
- return /* @__PURE__ */ l(
196
+ l.current
197
+ ), y;
198
+ }, [p, r, o, u]), re = T !== void 0 ? T : A !== void 0 ? A.size > 0 : C && p.length > 0 ? p.some((w) => !w) : !e, ne = z.title, M = C && !V && !ne, ie = (!F && I || R.length > 0 || V || M) && /* @__PURE__ */ h("div", { className: "z-10 w-full flex flex-row flex-wrap sm:flex-nowrap items-center gap-2", children: [
199
+ /* @__PURE__ */ i("div", { className: "min-w-0", children: v && f && r ? /* @__PURE__ */ i(
200
+ ve,
201
+ {
202
+ onSelected: v,
203
+ items: f,
204
+ defaultItem: r,
205
+ multiple: X,
206
+ graphsWithNoData: Z,
207
+ loadingGraphs: A,
208
+ onNoDataSelected: te
209
+ }
210
+ ) : M ? /* @__PURE__ */ i(
211
+ we,
212
+ {
213
+ series: W,
214
+ onUnselect: O,
215
+ inline: !0
216
+ }
217
+ ) : null }),
218
+ /* @__PURE__ */ h("div", { className: "flex flex-row flex-nowrap justify-start sm:justify-end items-center flex-1", children: [
219
+ /* @__PURE__ */ i(fe, { range: q, rangeList: R, setRange: Q }),
220
+ !F && I && /* @__PURE__ */ i(
221
+ "button",
222
+ {
223
+ type: "button",
224
+ className: "px-2.5 py-1.5 flex min-w-[44px] min-h-[26px] justify-center items-center text-xs leading-[14px] font-medium text-center rounded-md border cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-muted border-muted text-muted-foreground hover:border-secondary ml-1.5",
225
+ onClick: I,
226
+ children: Y ? /* @__PURE__ */ i(be, { size: 16 }) : /* @__PURE__ */ i(pe, { size: 16 })
227
+ }
228
+ )
229
+ ] })
230
+ ] });
231
+ return /* @__PURE__ */ i(
215
232
  "div",
216
233
  {
217
234
  style: {
@@ -219,28 +236,28 @@ function Re({
219
236
  height: c ? `${c}px` : void 0
220
237
  },
221
238
  className: "w-full",
222
- children: /* @__PURE__ */ l(
223
- me,
239
+ children: /* @__PURE__ */ i(
240
+ xe,
224
241
  {
225
- series: ee,
226
- loading: te,
227
- toolbar: G,
242
+ series: W,
243
+ loading: re,
244
+ toolbar: ie,
228
245
  size: c ? "full" : "default",
229
- containerClassName: se("h-full", X),
230
- showLegend: L,
231
- onUnselectSeries: H,
232
- yMeasureUnit: P,
233
- currentValueDecimals: $,
234
- useSharedPriceScale: q,
235
- showCurrentValue: Q,
236
- yScaleMin: Y,
237
- yScaleMinMultiple: Z,
238
- ...U
246
+ containerClassName: de("h-full", U),
247
+ showLegend: C && !M,
248
+ onUnselectSeries: O,
249
+ yMeasureUnit: oe,
250
+ currentValueDecimals: D,
251
+ useSharedPriceScale: K,
252
+ showCurrentValue: P,
253
+ yScaleMin: G,
254
+ yScaleMinMultiple: ee,
255
+ ...z
239
256
  }
240
257
  )
241
258
  }
242
259
  );
243
260
  }
244
261
  export {
245
- Re as TradingView
262
+ ze as TradingView
246
263
  };
@@ -47,6 +47,7 @@ import "../input/input.js";
47
47
  import "../with-title/with-title.js";
48
48
  import "../smart-number-input/balance-indicator.js";
49
49
  import "../smart-number-input/smart-number-input.js";
50
+ import "../composites/credit-account-history/credit-account-history.js";
50
51
  import "../table/grid-table.js";
51
52
  import "../token-symbol/token-symbol.js";
52
53
  import "../typography/typography.js";
@@ -163,7 +164,7 @@ import "../theme-provider.js";
163
164
  import "../time-to-liquidation/time-to-liquidation.js";
164
165
  import "../toggle/toggle.js";
165
166
  import "../with-filter-button/with-filter-button.js";
166
- function Kr({
167
+ function Rr({
167
168
  toCopy: u,
168
169
  children: d,
169
170
  onCopySuccess: f,
@@ -245,5 +246,5 @@ function Kr({
245
246
  return a ? /* @__PURE__ */ t(T, { placement: "top", triangle: !0, title: c(), children: a }) : c();
246
247
  }
247
248
  export {
248
- Kr as WithCopy
249
+ Rr as WithCopy
249
250
  };