@wick-charts/vue 0.8.1 → 0.8.2
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/BandSeries.vue.js +25 -24
- package/dist/BarSeries.vue.js +27 -26
- package/dist/CandlestickSeries.vue.js +25 -24
- package/dist/HeatmapSeries.vue.js +21 -20
- package/dist/LineSeries.vue.js +24 -23
- package/dist/PieSeries.vue.js +25 -24
- package/dist/composables.js +63 -36
- package/dist/core/dist/axis/dom-labels.js +64 -53
- package/dist/core/dist/chart/options.js +1 -1
- package/dist/core/dist/chart/y-target.js +38 -32
- package/dist/core/dist/chart.js +475 -439
- package/dist/core/dist/data/decimation.js +52 -51
- package/dist/core/dist/data/store.js +38 -20
- package/dist/core/dist/data/sync.js +80 -69
- package/dist/core/dist/perf/perf-hud.js +3 -3
- package/dist/core/dist/scales/tick-tracker.js +2 -1
- package/dist/core/dist/series/band.js +1 -1
- package/dist/core/dist/series/bar.js +240 -211
- package/dist/core/dist/series/base-multi-layer.js +267 -249
- package/dist/core/dist/series/candlestick.js +116 -116
- package/dist/core/dist/series/line.js +540 -455
- package/dist/core/dist/snapshots.js +96 -77
- package/dist/index.d.ts +22 -4
- package/dist/ui/InfoBar.vue.js +68 -68
- package/dist/ui/NumberFlow.vue.js +36 -27
- package/dist/ui/Tooltip.vue.js +127 -130
- package/package.json +2 -2
- package/src/BandSeries.vue +5 -3
- package/src/BarSeries.vue +5 -3
- package/src/CandlestickSeries.vue +5 -4
- package/src/ChartContainer.vue +1 -1
- package/src/HeatmapSeries.vue +5 -4
- package/src/LineSeries.vue +5 -3
- package/src/PieSeries.vue +6 -5
- package/src/composables.ts +64 -1
- package/src/ui/InfoBar.vue +11 -3
- package/src/ui/NumberFlow.vue +17 -3
- package/src/ui/Tooltip.vue +23 -12
|
@@ -1,73 +1,74 @@
|
|
|
1
|
-
function
|
|
2
|
-
return t.length <=
|
|
1
|
+
function k(t, n) {
|
|
2
|
+
return t.length <= n ? t : D(
|
|
3
3
|
t,
|
|
4
|
-
|
|
5
|
-
(
|
|
6
|
-
(
|
|
4
|
+
n,
|
|
5
|
+
(h) => h.time,
|
|
6
|
+
(h) => h.value
|
|
7
7
|
);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
if (t.length <=
|
|
11
|
-
const
|
|
12
|
-
for (let
|
|
13
|
-
const
|
|
9
|
+
function x(t, n) {
|
|
10
|
+
if (t.length <= n) return t;
|
|
11
|
+
const h = Math.ceil(t.length / n), a = [];
|
|
12
|
+
for (let l = 0; l < t.length; l += h) {
|
|
13
|
+
const o = Math.min(l + h, t.length);
|
|
14
14
|
let s = -1 / 0, i = 1 / 0, c = 0;
|
|
15
|
-
for (let
|
|
16
|
-
t[
|
|
17
|
-
|
|
18
|
-
time: t[
|
|
19
|
-
open: t[
|
|
15
|
+
for (let e = l; e < o; e++)
|
|
16
|
+
t[e].high > s && (s = t[e].high), t[e].low < i && (i = t[e].low), c += t[e].volume ?? 0;
|
|
17
|
+
a.push({
|
|
18
|
+
time: t[l].time,
|
|
19
|
+
open: t[l].open,
|
|
20
20
|
high: s,
|
|
21
21
|
low: i,
|
|
22
|
-
close: t[
|
|
22
|
+
close: t[o - 1].close,
|
|
23
23
|
volume: c
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return a;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (t.length <=
|
|
30
|
-
const
|
|
31
|
-
for (let
|
|
32
|
-
const s = Math.min(
|
|
33
|
-
let i = 1 / 0, c = -1 / 0,
|
|
34
|
-
for (let
|
|
35
|
-
const
|
|
36
|
-
if (!Number.isFinite(
|
|
37
|
-
|
|
28
|
+
function L(t, n) {
|
|
29
|
+
if (t.length <= n || n < 3) return t;
|
|
30
|
+
const h = t.length - 1, a = Math.ceil((t.length - 2) / (n - 2)), l = [t[0]];
|
|
31
|
+
for (let o = 1; o < h; o += a) {
|
|
32
|
+
const s = Math.min(o + a, h);
|
|
33
|
+
let i = 1 / 0, c = -1 / 0, e = !1;
|
|
34
|
+
for (let m = o; m < s; m++) {
|
|
35
|
+
const r = t[m];
|
|
36
|
+
if (!Number.isFinite(r.low) || !Number.isFinite(r.high)) {
|
|
37
|
+
e = !0;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
r.low < i && (i = r.low), r.high > c && (c = r.high);
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
l.push(e ? { time: t[o].time, low: Number.NaN, high: Number.NaN } : { time: t[o].time, low: i, high: c });
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return l.push(t[h]), l;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
46
|
+
function D(t, n, h, a) {
|
|
47
|
+
if (n >= t.length || n < 3) return t;
|
|
48
|
+
const l = [t[0]], o = (t.length - 2) / (n - 2);
|
|
49
49
|
let s = 0;
|
|
50
|
-
for (let i = 0; i <
|
|
51
|
-
const c = Math.floor((i + 1) *
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
f /= g, a /= g;
|
|
50
|
+
for (let i = 0; i < n - 2; i++) {
|
|
51
|
+
const c = Math.floor((i + 1) * o) + 1, e = Math.min(Math.floor((i + 2) * o) + 1, t.length - 1), m = h(t[s]), r = a(t[s]), p = Number.isFinite(r);
|
|
52
|
+
let g = 0, N = 0, b = 0;
|
|
53
|
+
const d = e, v = Math.min(Math.floor((i + 3) * o) + 1, t.length);
|
|
54
|
+
for (let u = d; u < v; u++) {
|
|
55
|
+
const f = a(t[u]);
|
|
56
|
+
Number.isFinite(f) && (g += h(t[u]), N += f, b++);
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
for (let
|
|
62
|
-
const
|
|
63
|
-
|
|
58
|
+
b > 0 ? (g /= b, N /= b) : (g = m, N = p ? r : 0);
|
|
59
|
+
let w = -1, M = c;
|
|
60
|
+
for (let u = c; u < e; u++) {
|
|
61
|
+
const f = a(t[u]);
|
|
62
|
+
if (!Number.isFinite(f)) continue;
|
|
63
|
+
const F = p ? Math.abs((m - g) * (f - r) - (m - h(t[u])) * (N - r)) : 0;
|
|
64
|
+
F > w && (w = F, M = u);
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
+
l.push(t[M]), s = M;
|
|
66
67
|
}
|
|
67
|
-
return
|
|
68
|
+
return l.push(t[t.length - 1]), l;
|
|
68
69
|
}
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
L as decimateBandData,
|
|
72
|
+
k as decimateLineData,
|
|
73
|
+
x as decimateOHLCData
|
|
73
74
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { EventEmitter as
|
|
1
|
+
import { EventEmitter as l } from "../events.js";
|
|
2
2
|
import { binarySearch as n } from "../utils/math.js";
|
|
3
|
-
class u extends
|
|
3
|
+
class u extends l {
|
|
4
4
|
data = [];
|
|
5
5
|
_visible = !0;
|
|
6
6
|
cachedRange = null;
|
|
7
7
|
cachedResult = [];
|
|
8
|
+
// Points `trimStart` dropped, oldest first. A view whose left edge is older
|
|
9
|
+
// than the kept head still draws them, so a rolling window slides out of view.
|
|
10
|
+
exited = [];
|
|
11
|
+
// Leftmost `from` read since the last trim: older exited points are out of every view since then.
|
|
12
|
+
lowestReadFrom = Number.POSITIVE_INFINITY;
|
|
13
|
+
appendedSinceTrim = 0;
|
|
8
14
|
// Dev-only, warn-once-per-instance: these two conditions are almost always
|
|
9
15
|
// a persistent bug in the caller's feed (not a one-off), so a per-call
|
|
10
16
|
// warning would just spam the console on every tick.
|
|
@@ -25,7 +31,7 @@ class u extends d {
|
|
|
25
31
|
}
|
|
26
32
|
!a && process.env.NODE_ENV !== "production" && !this.warnedUnsorted && (this.warnedUnsorted = !0, console.warn(
|
|
27
33
|
"[wick-charts] data is not sorted by time — re-sorting on every setData() call is wasted work. Sort your feed by `time` ascending before passing it in."
|
|
28
|
-
)), this.data = a ? t.slice() : [...t].sort((e,
|
|
34
|
+
)), this.data = a ? t.slice() : [...t].sort((e, s) => e.time - s.time), this.exited = [], this.appendedSinceTrim = 0, this.cachedRange = null, this.emit("update");
|
|
29
35
|
}
|
|
30
36
|
append(t) {
|
|
31
37
|
if (this.data.length > 0 && t.time <= this.data[this.data.length - 1].time) {
|
|
@@ -34,7 +40,7 @@ class u extends d {
|
|
|
34
40
|
)), this.updateLast(t);
|
|
35
41
|
return;
|
|
36
42
|
}
|
|
37
|
-
this.data.push(t), this.cachedRange = null, this.emit("update");
|
|
43
|
+
this.data.push(t), this.appendedSinceTrim++, this.cachedRange = null, this.emit("update");
|
|
38
44
|
}
|
|
39
45
|
updateLast(t) {
|
|
40
46
|
this.data.length !== 0 && (this.data[this.data.length - 1] = t, this.cachedRange = null, this.emit("update"));
|
|
@@ -47,16 +53,22 @@ class u extends d {
|
|
|
47
53
|
* is already validated and no re-sort is needed here. No-op on empty input.
|
|
48
54
|
*/
|
|
49
55
|
prepend(t) {
|
|
50
|
-
t.length !== 0 && (this.data = t.concat(this.data), this.cachedRange = null, this.emit("update"));
|
|
56
|
+
t.length !== 0 && (this.data = t.concat(this.data), this.exited = [], this.cachedRange = null, this.emit("update"));
|
|
51
57
|
}
|
|
52
58
|
trimStart(t) {
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
if (t <= 0 || this.data.length === 0) return;
|
|
60
|
+
const a = this.data.slice(0, t), e = a.slice(Math.max(0, a.length - this.appendedSinceTrim)), s = e.length === a.length ? this.exited.concat(e) : e;
|
|
61
|
+
this.data = this.data.slice(t), this.exited = this.reachedByView(s), this.appendedSinceTrim = 0, this.lowestReadFrom = Number.POSITIVE_INFINITY, this.cachedRange = null, this.emit("update");
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The exited points the leftmost view read since the last trim needs to reach its left edge.
|
|
65
|
+
* None without a read, so a chart that does not paint (a hidden tab) does not pile them up.
|
|
66
|
+
*/
|
|
67
|
+
reachedByView(t) {
|
|
68
|
+
const a = this.lowestReadFrom, e = this.data[0];
|
|
69
|
+
if (e === void 0 || e.time <= a) return [];
|
|
70
|
+
const s = Math.max(0, n(t, a, (h) => h.time) - 1);
|
|
71
|
+
return t.slice(s);
|
|
60
72
|
}
|
|
61
73
|
getAll() {
|
|
62
74
|
return this.data;
|
|
@@ -64,8 +76,14 @@ class u extends d {
|
|
|
64
76
|
getVisibleData(t, a) {
|
|
65
77
|
if (this.data.length === 0) return [];
|
|
66
78
|
if (this.cachedRange && this.cachedRange.from === t && this.cachedRange.to === a) return this.cachedResult;
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
this.lowestReadFrom = Math.min(this.lowestReadFrom, t);
|
|
80
|
+
const e = Math.max(0, n(this.data, t, (i) => i.time) - 1), s = Math.min(this.data.length, n(this.data, a, (i) => i.time) + 1);
|
|
81
|
+
let h = this.data.slice(e, s);
|
|
82
|
+
if (e === 0 && this.data[0].time > t && this.exited.length > 0) {
|
|
83
|
+
const i = Math.max(0, n(this.exited, t, (r) => r.time) - 1), d = Math.min(this.exited.length, n(this.exited, a, (r) => r.time) + 1);
|
|
84
|
+
h = this.exited.slice(i, d).concat(h);
|
|
85
|
+
}
|
|
86
|
+
return this.cachedResult = h, this.cachedRange = { from: t, to: a }, h;
|
|
69
87
|
}
|
|
70
88
|
first() {
|
|
71
89
|
return this.data[0];
|
|
@@ -81,13 +99,13 @@ class u extends d {
|
|
|
81
99
|
}
|
|
82
100
|
findNearest(t, a) {
|
|
83
101
|
if (this.data.length === 0) return null;
|
|
84
|
-
const e = n(this.data, t, (
|
|
85
|
-
let
|
|
86
|
-
for (let
|
|
87
|
-
const
|
|
88
|
-
|
|
102
|
+
const e = n(this.data, t, (i) => i.time);
|
|
103
|
+
let s = null, h = a;
|
|
104
|
+
for (let i = Math.max(0, e - 1); i <= Math.min(this.data.length - 1, e + 1); i++) {
|
|
105
|
+
const d = Math.abs(this.data[i].time - t);
|
|
106
|
+
d <= h && (h = d, s = this.data[i]);
|
|
89
107
|
}
|
|
90
|
-
return
|
|
108
|
+
return s;
|
|
91
109
|
}
|
|
92
110
|
}
|
|
93
111
|
export {
|
|
@@ -1,102 +1,113 @@
|
|
|
1
|
-
import { normalizeTime as
|
|
2
|
-
function
|
|
3
|
-
return "x" in a ? a.x :
|
|
1
|
+
import { normalizeTime as A } from "../utils/time.js";
|
|
2
|
+
function i(a) {
|
|
3
|
+
return "x" in a ? a.x : A(a.time);
|
|
4
4
|
}
|
|
5
|
-
const
|
|
5
|
+
const S = { len: 0, firstTime: null, lastTime: null, data: null, last: null }, b = 20;
|
|
6
6
|
function o(a, t) {
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
9
|
-
return
|
|
7
|
+
if (i(a) !== i(t)) return !1;
|
|
8
|
+
const l = Object.keys(a), e = Object.keys(t);
|
|
9
|
+
return l.length !== e.length ? !1 : l.every((r) => r === "time" || a[r] === t[r]);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function p(a, t) {
|
|
12
12
|
if (!a || a.length !== t.length || a === t) return !1;
|
|
13
|
-
for (let
|
|
14
|
-
if (a[
|
|
13
|
+
for (let l = 0; l < t.length - 1; l++)
|
|
14
|
+
if (a[l] !== t[l] && !o(a[l], t[l]))
|
|
15
15
|
return !1;
|
|
16
16
|
return !0;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
if (!a || a.length === 0 ||
|
|
20
|
-
for (let e = 1; e <
|
|
21
|
-
if (
|
|
22
|
-
if (
|
|
18
|
+
function E(a, t, l) {
|
|
19
|
+
if (!a || a.length === 0 || l <= 0 || a.length !== t.length - l) return !1;
|
|
20
|
+
for (let e = 1; e < l; e++)
|
|
21
|
+
if (i(t[e - 1]) >= i(t[e])) return !1;
|
|
22
|
+
if (i(t[l - 1]) >= i(a[0])) return !1;
|
|
23
23
|
for (let e = 0; e < a.length; e++)
|
|
24
|
-
if (!o(a[e], t[
|
|
24
|
+
if (!o(a[e], t[l + e])) return !1;
|
|
25
25
|
return !0;
|
|
26
26
|
}
|
|
27
|
-
function m(a, t,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (e
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
function m(a, t, l) {
|
|
28
|
+
const e = a.data;
|
|
29
|
+
if (!e) return "unchanged";
|
|
30
|
+
if (e === t) return T(a, t) ? "lastEdited" : "unchanged";
|
|
31
|
+
const r = e.length - l;
|
|
32
|
+
if (r <= 0 || r > t.length) return null;
|
|
33
|
+
for (let u = 0; u < r - 1; u++) {
|
|
34
|
+
const f = e[l + u];
|
|
35
|
+
if (f !== t[u] && !o(f, t[u]))
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
36
|
-
for (let
|
|
37
|
-
if (
|
|
38
|
-
const n =
|
|
39
|
-
return n ===
|
|
38
|
+
for (let u = r; u < t.length; u++)
|
|
39
|
+
if (i(t[u - 1]) >= i(t[u])) return null;
|
|
40
|
+
const n = e[e.length - 1], s = t[r - 1];
|
|
41
|
+
return n === s || o(n, s) ? "unchanged" : i(n) !== i(s) ? null : "lastEdited";
|
|
40
42
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
+
function T(a, t) {
|
|
44
|
+
const l = a.last ?? null, e = t[a.len - 1];
|
|
45
|
+
return l === null || e === void 0 ? !1 : i(l) === i(e) && !o(l, e);
|
|
46
|
+
}
|
|
47
|
+
function h(a) {
|
|
48
|
+
const t = a[a.length - 1];
|
|
49
|
+
return { len: a.length, firstTime: i(a[0]), lastTime: i(t), data: a, last: { ...t } };
|
|
43
50
|
}
|
|
44
51
|
function L(a) {
|
|
52
|
+
return typeof a == "object" && a !== null && !Array.isArray(a) && Array.isArray(a.data);
|
|
53
|
+
}
|
|
54
|
+
function v(a) {
|
|
45
55
|
if (!Array.isArray(a)) return [a];
|
|
46
56
|
if (a.length === 0) return [{ data: [] }];
|
|
47
57
|
const t = a[0];
|
|
48
|
-
return Array.isArray(t) ||
|
|
58
|
+
return Array.isArray(t) || L(t) ? a.map((l) => Array.isArray(l) ? { data: l } : l) : [{ data: a }];
|
|
49
59
|
}
|
|
50
|
-
function
|
|
51
|
-
const { chart: t, id:
|
|
52
|
-
t.setSeriesLabels(
|
|
53
|
-
|
|
54
|
-
e.map((
|
|
60
|
+
function j(a) {
|
|
61
|
+
const { chart: t, id: l } = a, e = v(a.data), r = e.length > 1 ? e.map((s, u) => s.label ?? `Series ${u + 1}`) : [e[0].label];
|
|
62
|
+
t.setSeriesLabels(l, r), t.setLayerColors(
|
|
63
|
+
l,
|
|
64
|
+
e.map((s) => s.color)
|
|
55
65
|
);
|
|
56
|
-
const
|
|
66
|
+
const n = [];
|
|
57
67
|
return t.batch(() => {
|
|
58
|
-
for (let
|
|
59
|
-
|
|
68
|
+
for (let s = 0; s < e.length; s++)
|
|
69
|
+
n[s] = x({
|
|
60
70
|
chart: t,
|
|
61
|
-
id:
|
|
62
|
-
data: e[
|
|
63
|
-
prev: a.prev[
|
|
64
|
-
layerIndex:
|
|
71
|
+
id: l,
|
|
72
|
+
data: e[s].data,
|
|
73
|
+
prev: a.prev[s] ?? S,
|
|
74
|
+
layerIndex: s
|
|
65
75
|
});
|
|
66
|
-
}),
|
|
76
|
+
}), n;
|
|
67
77
|
}
|
|
68
|
-
function
|
|
69
|
-
const { chart: t, id:
|
|
78
|
+
function x(a) {
|
|
79
|
+
const { chart: t, id: l, data: e, prev: r, layerIndex: n } = a;
|
|
70
80
|
if (e.length === 0)
|
|
71
|
-
return t.setSeriesData(
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
return t.setSeriesData(l, [], n), { len: 0, firstTime: null, lastTime: null, data: [], last: null };
|
|
82
|
+
if (r.data === e && r.len === e.length)
|
|
83
|
+
return T(r, e) ? (t.updateData(l, e[e.length - 1], n), h(e)) : r;
|
|
84
|
+
const s = i(e[0]), u = i(e[e.length - 1]);
|
|
85
|
+
if (typeof s == "string")
|
|
86
|
+
return e.length === r.len && p(r.data, e) ? t.updateData(l, e[e.length - 1], n) : t.setSeriesData(l, e, n), h(e);
|
|
87
|
+
const f = r.firstTime !== null && r.firstTime !== s, c = e.length - r.len, D = r.lastTime !== null && r.lastTime !== u, g = f && c === 0 && D ? m(r, e, 1) : null;
|
|
88
|
+
if (g !== null)
|
|
78
89
|
t.batch(() => {
|
|
79
|
-
|
|
90
|
+
g === "lastEdited" && t.updateData(l, e[e.length - 2], n), t.appendData(l, e[e.length - 1], n), t.keepLast(l, e.length, n);
|
|
80
91
|
});
|
|
81
|
-
else if (
|
|
82
|
-
t.prependData(
|
|
83
|
-
else if (
|
|
84
|
-
t.setSeriesData(
|
|
85
|
-
else if (e.length ===
|
|
86
|
-
|
|
92
|
+
else if (E(r.data, e, c))
|
|
93
|
+
t.prependData(l, e.slice(0, c), n);
|
|
94
|
+
else if (r.len === 0 || e.length < r.len || c > b || f)
|
|
95
|
+
t.setSeriesData(l, e, n);
|
|
96
|
+
else if (e.length === r.len)
|
|
97
|
+
p(r.data, e) ? t.updateData(l, e[e.length - 1], n) : t.setSeriesData(l, e, n);
|
|
87
98
|
else {
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
for (let
|
|
92
|
-
t.appendData(
|
|
99
|
+
const y = m(r, e, 0);
|
|
100
|
+
y === null ? t.setSeriesData(l, e, n) : t.batch(() => {
|
|
101
|
+
y === "lastEdited" && t.updateData(l, e[r.len - 1], n);
|
|
102
|
+
for (let d = r.len; d < e.length; d++)
|
|
103
|
+
t.appendData(l, e[d], n);
|
|
93
104
|
});
|
|
94
105
|
}
|
|
95
|
-
return
|
|
106
|
+
return h(e);
|
|
96
107
|
}
|
|
97
108
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
S as EMPTY_SYNC_STATE,
|
|
110
|
+
j as syncLayers,
|
|
111
|
+
x as syncSeriesLayer,
|
|
112
|
+
v as toLayers
|
|
102
113
|
};
|
|
@@ -20,7 +20,7 @@ function I(i) {
|
|
|
20
20
|
function O(i) {
|
|
21
21
|
return -I(i) / 12;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const V = "#9aa6b6", c = "#5d6877", C = "#e8eef7", x = "#cdd6e2", y = "#3fd68f", B = "#f5c451", $ = "#f4756a", Y = "#5d6877", X = {
|
|
24
24
|
position: "absolute",
|
|
25
25
|
top: "8px",
|
|
26
26
|
right: "8px",
|
|
@@ -34,7 +34,7 @@ const B = "#9aa6b6", c = "#5d6877", C = "#e8eef7", x = "#cdd6e2", y = "#3fd68f",
|
|
|
34
34
|
border: "1px solid rgba(255, 255, 255, 0.09)",
|
|
35
35
|
borderRadius: "10px",
|
|
36
36
|
boxShadow: "0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05)",
|
|
37
|
-
color:
|
|
37
|
+
color: V,
|
|
38
38
|
font: "10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
39
39
|
fontVariantNumeric: "tabular-nums",
|
|
40
40
|
letterSpacing: "0.02em",
|
|
@@ -50,7 +50,7 @@ function G(i) {
|
|
|
50
50
|
}`, i.head.appendChild(e);
|
|
51
51
|
}
|
|
52
52
|
function v(i) {
|
|
53
|
-
return i <= H ? y : i <= F ?
|
|
53
|
+
return i <= H ? y : i <= F ? B : $;
|
|
54
54
|
}
|
|
55
55
|
function A(i) {
|
|
56
56
|
return i >= 1e6 ? `${(i / 1e6).toFixed(1)}M` : i >= 1e4 ? `${(i / 1e3).toFixed(1)}k` : Math.round(i).toLocaleString("en-US");
|
|
@@ -74,8 +74,9 @@ class m {
|
|
|
74
74
|
const t = [];
|
|
75
75
|
let e = !1;
|
|
76
76
|
for (const [o, r] of this.#t) {
|
|
77
|
+
r.animating && (e = !0);
|
|
77
78
|
const i = r.current;
|
|
78
|
-
i <= 0 ||
|
|
79
|
+
i <= 0 || t.push({ value: o, opacity: i });
|
|
79
80
|
}
|
|
80
81
|
return { entries: t, isAnimating: e };
|
|
81
82
|
}
|
|
@@ -122,7 +122,7 @@ class nt {
|
|
|
122
122
|
const e = this.#t[i];
|
|
123
123
|
if (!e) return;
|
|
124
124
|
const o = this.#t.some((l) => l.store.length > 0), s = (t ?? []).map(S);
|
|
125
|
-
|
|
125
|
+
!o && s.length > 0 && this.#i.arm(this.#e.introMs), e.store.setData(s);
|
|
126
126
|
const n = e.store.last();
|
|
127
127
|
e.displayedLast = n ? x(n) : null, e.chase = null, e.pinned = null, e.morphs.clear(), e.entries.clear(), this.#o.finish(), this.#s = null;
|
|
128
128
|
}
|