@llmnative/react 1.37.0 → 1.37.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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7011,7 +7011,7 @@ function qs({ columns: e, ariaLabel: t, color: n, format: r, markers: i = [], ax
|
|
|
7011
7011
|
right: 8,
|
|
7012
7012
|
bottom: 30,
|
|
7013
7013
|
left: 44
|
|
7014
|
-
}, v = Ns(Math.max(...e.map((e) => e.value)
|
|
7014
|
+
}, v = Ns(Math.max(...e.map((e) => e.value)) * 1.15), y = s - _.bottom, b = (e) => y - e / v * (y - _.top), x = (m - _.left - _.right) / Math.max(1, e.length), S = Math.min(64, x * .72), C = e.length <= 40, w = ks(n);
|
|
7015
7015
|
return /* @__PURE__ */ d.createElement("figure", {
|
|
7016
7016
|
ref: p,
|
|
7017
7017
|
className: Z("space-y-2", c)
|
|
@@ -7211,7 +7211,7 @@ function Ys({ bars: e, upLabel: t, downLabel: n, ariaLabel: r, upColor: i = 1, d
|
|
|
7211
7211
|
right: 8,
|
|
7212
7212
|
bottom: 26,
|
|
7213
7213
|
left: 64
|
|
7214
|
-
}, y = Ns(Math.max(
|
|
7214
|
+
}, y = Ns(Math.max(0, ...e.flatMap((e) => [e.up ?? 0, e.down ?? 0])) * 1.05), b = (v.top + l - v.bottom) / 2, x = b - v.top, S = (h - v.left - v.right) / g, C = Math.max(2, Math.min(40, S * .6)), w = (e) => v.left + S * e + S / 2, T = ks(i), E = ks(a, 2), D = g <= 40, O = (e) => e === null ? "—" : f(e);
|
|
7215
7215
|
return /* @__PURE__ */ d.createElement("figure", {
|
|
7216
7216
|
ref: m,
|
|
7217
7217
|
className: Z("space-y-2", u)
|
|
@@ -7310,7 +7310,7 @@ function Qs(e, t, n, r, i) {
|
|
|
7310
7310
|
return Math.max(0, Math.min(i - 1, Math.round((o - n) / (t - n - r) * (i - 1))));
|
|
7311
7311
|
}
|
|
7312
7312
|
function $s({ series: e, labels: t, ariaLabel: n, titles: r, labelEvery: i = 1, format: a, threshold: o, baseline: s, domain: c, height: l = 240, className: u }) {
|
|
7313
|
-
let f = Fs(a), p = Us(), [m, h] = Vs(520), [g, _] = T(null), v = t.length, y = e.flatMap((e) => t.map((t, n) => e.values[n] ?? NaN)), b = [...y.filter((e) => Number.isFinite(e)), ...e.flatMap((e) => [...e.band?.min ?? [], ...e.band?.max ?? []]).filter((e) => typeof e == "number")], x = c?.[0] ?? Math.min(0, ...b), S = c?.[1] ?? Ns(Math.max(...b, o?.value ?? 0
|
|
7313
|
+
let f = Fs(a), p = Us(), [m, h] = Vs(520), [g, _] = T(null), v = t.length, y = e.flatMap((e) => t.map((t, n) => e.values[n] ?? NaN)), b = [...y.filter((e) => Number.isFinite(e)), ...e.flatMap((e) => [...e.band?.min ?? [], ...e.band?.max ?? []]).filter((e) => typeof e == "number")], x = c?.[0] ?? Math.min(0, ...b), S = c?.[1] ?? Ns(Math.max(...b, o?.value ?? 0) * 1.1), C = Rs(y.map((e) => Number.isFinite(e) ? e : x), 650, 0), w = zs(t.join("|") + e.length, 800), E = d.useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
7314
7314
|
if (v === 0 || e.length === 0) return /* @__PURE__ */ d.createElement(Gs, { height: l });
|
|
7315
7315
|
let D = {
|
|
7316
7316
|
top: 14,
|
|
@@ -7461,7 +7461,7 @@ function ec({ series: e, labels: t, ariaLabel: n, titles: r, labelEvery: i = 1,
|
|
|
7461
7461
|
right: 12,
|
|
7462
7462
|
bottom: 28,
|
|
7463
7463
|
left: 50
|
|
7464
|
-
}, x = s - b.bottom, S = t.map((t, n) => e.reduce((e, t) => e + (t.values[n] ?? 0), 0)), C = Ns(Math.max(
|
|
7464
|
+
}, x = s - b.bottom, S = t.map((t, n) => e.reduce((e, t) => e + (t.values[n] ?? 0), 0)), C = Ns(Math.max(0, ...o ? S : v) * 1.05), w = (e) => b.left + (_ <= 1 ? (m - b.left - b.right) / 2 : e / (_ - 1) * (m - b.left - b.right)), E = (e) => x - e / C * (x - b.top), D = e.map((e, t) => ks(e.color, t + 1)), O = e.map((n, r) => t.map((t, n) => {
|
|
7465
7465
|
let i = y[r * _ + n] ?? 0, a = o ? e.slice(0, r).reduce((e, t, r) => e + (y[r * _ + n] ?? 0), 0) : 0;
|
|
7466
7466
|
return {
|
|
7467
7467
|
low: a,
|
|
@@ -7598,7 +7598,7 @@ function nc({ points: e, ariaLabel: t, series: n = [], xLabel: r, yLabel: i, siz
|
|
|
7598
7598
|
right: 16,
|
|
7599
7599
|
bottom: 40,
|
|
7600
7600
|
left: 56
|
|
7601
|
-
}, S = Ns(Math.max(...e.map((e) => e.x)
|
|
7601
|
+
}, S = Ns(Math.max(...e.map((e) => e.x)) * 1.05), C = Ns(Math.max(...e.map((e) => e.y)) * 1.05), w = Math.max(0, ...e.map((e) => e.size ?? 0)), T = u - x.bottom, E = (e) => x.left + e / S * (y - x.left - x.right), D = (e) => T - e / C * (T - x.top), O = (e) => w > 0 && e !== void 0 ? 4 + 10 * Math.sqrt(Math.max(0, e) / w) : 6, k = (e) => {
|
|
7602
7602
|
let t = n.findIndex((t) => t.id === e);
|
|
7603
7603
|
return ks(n[Math.max(0, t)]?.color, Math.max(0, t) + 1);
|
|
7604
7604
|
}, A = l ?? e.length <= 12, j = e.length <= 40, M = (e) => e.tooltip ?? [
|
|
@@ -7714,27 +7714,27 @@ var rc = {
|
|
|
7714
7714
|
function ic({ rows: e, ariaLabel: t, color: n, format: r, max: i, labelWidth: a = 150, legend: o = [], className: s, onRowClick: c }) {
|
|
7715
7715
|
let l = Fs(r), u = Us(), f = Rs(e.flatMap((e) => [e.value, e.background ?? 0]), 550, 22), [p, m] = Vs(520);
|
|
7716
7716
|
if (e.length === 0) return /* @__PURE__ */ d.createElement(Gs, { height: 80 });
|
|
7717
|
-
let h = i ?? Math.max(1, ...e.flatMap((e) => [e.value, e.background ?? 0])), g = e.
|
|
7717
|
+
let h = i ?? Math.max(1, ...e.flatMap((e) => [e.value, e.background ?? 0])), g = Math.max(40, ...e.map((e) => (e.valueText ?? l(e.value)).length * 6.5 + 12)), _ = Math.max(0, ...e.map((e) => e.trailing ? e.trailing.text.length * 6.5 + 10 : 0)), v = Math.max(40, m - a - _ - g), y = e.length * 34 + 4, b = Math.max(4, Math.floor((a - 10) / 7)), x = e.length <= 40;
|
|
7718
7718
|
return /* @__PURE__ */ d.createElement("figure", {
|
|
7719
7719
|
ref: p,
|
|
7720
7720
|
className: Z("space-y-2", s)
|
|
7721
7721
|
}, /* @__PURE__ */ d.createElement(Hs, { items: o }), /* @__PURE__ */ d.createElement("svg", {
|
|
7722
|
-
viewBox: `0 0 ${m} ${
|
|
7722
|
+
viewBox: `0 0 ${m} ${y}`,
|
|
7723
7723
|
className: "h-auto w-full",
|
|
7724
7724
|
role: "img",
|
|
7725
7725
|
"aria-label": t
|
|
7726
7726
|
}, e.map((e, r) => {
|
|
7727
|
-
let i = r * 34 + 4, o = f[r * 2] ?? 0, s = f[r * 2 + 1] ?? 0, p =
|
|
7727
|
+
let i = r * 34 + 4, o = f[r * 2] ?? 0, s = f[r * 2 + 1] ?? 0, p = v * o / h, g = ks(e.color ?? n);
|
|
7728
7728
|
return /* @__PURE__ */ d.createElement("g", { key: e.id }, /* @__PURE__ */ d.createElement("text", {
|
|
7729
7729
|
x: a - 10,
|
|
7730
7730
|
y: i + 17,
|
|
7731
7731
|
textAnchor: "end",
|
|
7732
7732
|
fontSize: "12",
|
|
7733
7733
|
fill: "hsl(var(--rf-foreground))"
|
|
7734
|
-
}, e.label.length >
|
|
7734
|
+
}, e.label.length > b ? `${e.label.slice(0, b - 1)}…` : e.label), e.background !== void 0 && /* @__PURE__ */ d.createElement("rect", {
|
|
7735
7735
|
x: a,
|
|
7736
7736
|
y: i + 4,
|
|
7737
|
-
width:
|
|
7737
|
+
width: v * s / h,
|
|
7738
7738
|
height: 20,
|
|
7739
7739
|
rx: 4,
|
|
7740
7740
|
fill: "hsl(var(--rf-muted))"
|
|
@@ -7746,7 +7746,7 @@ function ic({ rows: e, ariaLabel: t, color: n, format: r, max: i, labelWidth: a
|
|
|
7746
7746
|
rx: 4,
|
|
7747
7747
|
fill: As(g)
|
|
7748
7748
|
}), /* @__PURE__ */ d.createElement("text", {
|
|
7749
|
-
x: a + Math.max(p,
|
|
7749
|
+
x: a + Math.max(p, v * s / h) + 6,
|
|
7750
7750
|
y: i + 18,
|
|
7751
7751
|
fontSize: "11.5",
|
|
7752
7752
|
fill: "hsl(var(--rf-foreground))",
|
|
@@ -7770,7 +7770,7 @@ function ic({ rows: e, ariaLabel: t, color: n, format: r, max: i, labelWidth: a
|
|
|
7770
7770
|
label: t,
|
|
7771
7771
|
value: e.valueText ?? l(e.value),
|
|
7772
7772
|
token: g
|
|
7773
|
-
}],
|
|
7773
|
+
}], x)
|
|
7774
7774
|
}));
|
|
7775
7775
|
})), /* @__PURE__ */ d.createElement(Ws, {
|
|
7776
7776
|
caption: t,
|