@blockscout/ui-toolkit 2.5.0-alpha.1 → 2.5.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 +14 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10976,17 +10976,17 @@ function Kh(e, t, r) {
|
|
|
10976
10976
|
}
|
|
10977
10977
|
const Qh = 2, Jh = 3, ep = 8, tp = 5;
|
|
10978
10978
|
function rp(e, t) {
|
|
10979
|
-
var o, a;
|
|
10980
|
-
const { labelFormatParams: r, scale: n } = ip(e, t == null ? void 0 : t.y);
|
|
10979
|
+
var o, a, c;
|
|
10980
|
+
const { labelFormatParams: r, scale: n } = ip(e, t == null ? void 0 : t.y, (o = t == null ? void 0 : t.y) == null ? void 0 : o.tickFormatter);
|
|
10981
10981
|
return {
|
|
10982
10982
|
x: {
|
|
10983
10983
|
scale: np(e).scale,
|
|
10984
|
-
tickFormatter: ((
|
|
10984
|
+
tickFormatter: ((a = t == null ? void 0 : t.x) == null ? void 0 : a.tickFormatter) ?? op
|
|
10985
10985
|
},
|
|
10986
10986
|
y: {
|
|
10987
10987
|
scale: n,
|
|
10988
10988
|
labelFormatParams: r,
|
|
10989
|
-
tickFormatter: ((
|
|
10989
|
+
tickFormatter: ((c = t == null ? void 0 : t.y) == null ? void 0 : c.tickFormatter) ?? ap(r)
|
|
10990
10990
|
}
|
|
10991
10991
|
};
|
|
10992
10992
|
}
|
|
@@ -10999,20 +10999,20 @@ const op = (e) => (t) => {
|
|
|
10999
10999
|
const o = e.scale().domain(), a = Number(o[1]) - Number(o[0]);
|
|
11000
11000
|
return a > 2 * Al ? r = Y.utcFormat("%Y") : a > 4 * Il ? r = Y.utcFormat("%b '%y") : a > 2 * Pt ? r = Y.utcFormat("%d %b") : r = Y.utcFormat("%H:%M"), r(t);
|
|
11001
11001
|
};
|
|
11002
|
-
function ip(e, t) {
|
|
11003
|
-
var
|
|
11004
|
-
const
|
|
11005
|
-
return { min:
|
|
11002
|
+
function ip(e, t, r) {
|
|
11003
|
+
var p, g;
|
|
11004
|
+
const o = Y.min(e, ({ items: b }) => Y.min(b, ({ value: S }) => S)) ?? 0, a = Y.max(e, ({ items: b }) => Y.max(b, ({ value: S }) => S)) ?? 0, c = t != null && t.nice ? Y.scaleLinear().domain([((p = t == null ? void 0 : t.scale) == null ? void 0 : p.min) ?? o, a]).nice((t == null ? void 0 : t.ticks) ?? 3) : Y.scaleLinear().domain([((g = t == null ? void 0 : t.scale) == null ? void 0 : g.min) ?? o, a]), s = c.ticks((t == null ? void 0 : t.ticks) ?? 3), u = Fl(s, r);
|
|
11005
|
+
return { min: o, max: a, scale: c, labelFormatParams: u };
|
|
11006
11006
|
}
|
|
11007
11007
|
const ap = (e) => () => (t) => Number(t).toLocaleString(void 0, e);
|
|
11008
|
-
function Fl(e, t = Qh) {
|
|
11009
|
-
var
|
|
11010
|
-
const
|
|
11008
|
+
function Fl(e, t, r = Qh) {
|
|
11009
|
+
var c;
|
|
11010
|
+
const n = {
|
|
11011
11011
|
maximumFractionDigits: Jh,
|
|
11012
|
-
maximumSignificantDigits:
|
|
11012
|
+
maximumSignificantDigits: r,
|
|
11013
11013
|
notation: "compact"
|
|
11014
|
-
},
|
|
11015
|
-
return
|
|
11014
|
+
}, o = vs(e.map((s) => t ? t()(s) : s.toLocaleString(void 0, n))), a = ((c = _s(o, (s) => s.length)) == null ? void 0 : c.length) ?? tp;
|
|
11015
|
+
return o.length === e.length || r === ep ? { ...n, maxLabelLength: a } : Fl(e, t, r + 1);
|
|
11016
11016
|
}
|
|
11017
11017
|
function lp({ data: e, margin: t, axesConfig: r }) {
|
|
11018
11018
|
var b;
|
package/package.json
CHANGED