@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.
Files changed (2) hide show
  1. package/dist/index.js +14 -14
  2. 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: ((o = t == null ? void 0 : t.x) == null ? void 0 : o.tickFormatter) ?? op
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: ((a = t == null ? void 0 : t.y) == null ? void 0 : a.tickFormatter) ?? ap(r)
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 u, p;
11004
- const n = Y.min(e, ({ items: g }) => Y.min(g, ({ value: b }) => b)) ?? 0, o = Y.max(e, ({ items: g }) => Y.max(g, ({ value: b }) => b)) ?? 0, a = t != null && t.nice ? Y.scaleLinear().domain([((u = t == null ? void 0 : t.scale) == null ? void 0 : u.min) ?? n, o]).nice((t == null ? void 0 : t.ticks) ?? 3) : Y.scaleLinear().domain([((p = t == null ? void 0 : t.scale) == null ? void 0 : p.min) ?? n, o]), c = a.ticks((t == null ? void 0 : t.ticks) ?? 3), s = Fl(c);
11005
- return { min: n, max: o, scale: a, labelFormatParams: s };
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 a;
11010
- const r = {
11008
+ function Fl(e, t, r = Qh) {
11009
+ var c;
11010
+ const n = {
11011
11011
  maximumFractionDigits: Jh,
11012
- maximumSignificantDigits: t,
11012
+ maximumSignificantDigits: r,
11013
11013
  notation: "compact"
11014
- }, n = vs(e.map((c) => c.toLocaleString(void 0, r))), o = ((a = _s(n, (c) => c.length)) == null ? void 0 : a.length) ?? tp;
11015
- return n.length === e.length || t === ep ? { ...r, maxLabelLength: o } : Fl(e, t + 1);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockscout/ui-toolkit",
3
- "version": "2.5.0-alpha.1",
3
+ "version": "2.5.0",
4
4
  "description": "A comprehensive collection of reusable Chakra UI components and theme system for Blockscout's projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",