gradio-leaderboard 0.0.13__py3-none-any.whl → 0.0.14__py3-none-any.whl
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.
- gradio_leaderboard/leaderboard.pyi +26 -9
- gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
- gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
- gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
- gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
- gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
- gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
- gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
- gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
- gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
- gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
- gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
- gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
- gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
- gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
- gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
- gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
- gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
- gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
- gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
- gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
- gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
- gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
- gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
- gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
- gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
- gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
- gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
- gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
- gradio_leaderboard/templates/component/index.js +2 -33755
- gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
- gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
- gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
- gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
- gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
- gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
- gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
- gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
- gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
- gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
- gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
- gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
- gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
- gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
- gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
- gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
- gradio_leaderboard/templates/component/style.css +1 -1
- gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
- gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
- gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +2 -2
- gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
- gradio_leaderboard-0.0.13.dist-info/RECORD +0 -10
@@ -0,0 +1,217 @@
|
|
1
|
+
import { p as k } from "./chunk-353BL4L5-D4dVjjbU.js";
|
2
|
+
import { C as R, _ as l, s as E, g as I, n as _, o as D, b as F, c as G, l as P, D as y, E as C, t as z, H, K as V } from "./mermaid.core-D36e06XD.js";
|
3
|
+
import { p as W } from "./treemap-FKARHQ26-2Ty0RcZX.js";
|
4
|
+
var x = {
|
5
|
+
showLegend: !0,
|
6
|
+
ticks: 5,
|
7
|
+
max: null,
|
8
|
+
min: 0,
|
9
|
+
graticule: "circle"
|
10
|
+
}, w = {
|
11
|
+
axes: [],
|
12
|
+
curves: [],
|
13
|
+
options: x
|
14
|
+
}, h = structuredClone(w), B = R.radar, j = /* @__PURE__ */ l(() => y({
|
15
|
+
...B,
|
16
|
+
...C().radar
|
17
|
+
}), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), K = /* @__PURE__ */ l(() => h.curves, "getCurves"), N = /* @__PURE__ */ l(() => h.options, "getOptions"), U = /* @__PURE__ */ l((a) => {
|
18
|
+
h.axes = a.map((t) => ({
|
19
|
+
name: t.name,
|
20
|
+
label: t.label ?? t.name
|
21
|
+
}));
|
22
|
+
}, "setAxes"), X = /* @__PURE__ */ l((a) => {
|
23
|
+
h.curves = a.map((t) => ({
|
24
|
+
name: t.name,
|
25
|
+
label: t.label ?? t.name,
|
26
|
+
entries: Y(t.entries)
|
27
|
+
}));
|
28
|
+
}, "setCurves"), Y = /* @__PURE__ */ l((a) => {
|
29
|
+
if (a[0].axis == null)
|
30
|
+
return a.map((e) => e.value);
|
31
|
+
const t = b();
|
32
|
+
if (t.length === 0)
|
33
|
+
throw new Error("Axes must be populated before curves for reference entries");
|
34
|
+
return t.map((e) => {
|
35
|
+
const r = a.find((s) => s.axis?.$refText === e.name);
|
36
|
+
if (r === void 0)
|
37
|
+
throw new Error("Missing entry for axis " + e.label);
|
38
|
+
return r.value;
|
39
|
+
});
|
40
|
+
}, "computeCurveEntries"), Z = /* @__PURE__ */ l((a) => {
|
41
|
+
const t = a.reduce(
|
42
|
+
(e, r) => (e[r.name] = r, e),
|
43
|
+
{}
|
44
|
+
);
|
45
|
+
h.options = {
|
46
|
+
showLegend: t.showLegend?.value ?? x.showLegend,
|
47
|
+
ticks: t.ticks?.value ?? x.ticks,
|
48
|
+
max: t.max?.value ?? x.max,
|
49
|
+
min: t.min?.value ?? x.min,
|
50
|
+
graticule: t.graticule?.value ?? x.graticule
|
51
|
+
};
|
52
|
+
}, "setOptions"), q = /* @__PURE__ */ l(() => {
|
53
|
+
z(), h = structuredClone(w);
|
54
|
+
}, "clear"), $ = {
|
55
|
+
getAxes: b,
|
56
|
+
getCurves: K,
|
57
|
+
getOptions: N,
|
58
|
+
setAxes: U,
|
59
|
+
setCurves: X,
|
60
|
+
setOptions: Z,
|
61
|
+
getConfig: j,
|
62
|
+
clear: q,
|
63
|
+
setAccTitle: E,
|
64
|
+
getAccTitle: I,
|
65
|
+
setDiagramTitle: _,
|
66
|
+
getDiagramTitle: D,
|
67
|
+
getAccDescription: F,
|
68
|
+
setAccDescription: G
|
69
|
+
}, J = /* @__PURE__ */ l((a) => {
|
70
|
+
k(a, $);
|
71
|
+
const { axes: t, curves: e, options: r } = a;
|
72
|
+
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
73
|
+
}, "populate"), Q = {
|
74
|
+
parse: /* @__PURE__ */ l(async (a) => {
|
75
|
+
const t = await W("radar", a);
|
76
|
+
P.debug(t), J(t);
|
77
|
+
}, "parse")
|
78
|
+
}, tt = /* @__PURE__ */ l((a, t, e, r) => {
|
79
|
+
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = H(t), u = et(p, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
|
80
|
+
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
81
|
+
}, "draw"), et = /* @__PURE__ */ l((a, t) => {
|
82
|
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
83
|
+
x: t.marginLeft + t.width / 2,
|
84
|
+
y: t.marginTop + t.height / 2
|
85
|
+
};
|
86
|
+
return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
87
|
+
}, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
|
88
|
+
if (s === "circle")
|
89
|
+
for (let o = 0; o < r; o++) {
|
90
|
+
const i = e * (o + 1) / r;
|
91
|
+
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
92
|
+
}
|
93
|
+
else if (s === "polygon") {
|
94
|
+
const o = t.length;
|
95
|
+
for (let i = 0; i < r; i++) {
|
96
|
+
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
97
|
+
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
98
|
+
return `${g},${m}`;
|
99
|
+
}).join(" ");
|
100
|
+
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
|
104
|
+
const s = t.length;
|
105
|
+
for (let o = 0; o < s; o++) {
|
106
|
+
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
107
|
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
|
108
|
+
}
|
109
|
+
}, "drawAxes");
|
110
|
+
function M(a, t, e, r, s, o, i) {
|
111
|
+
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
112
|
+
e.forEach((d, p) => {
|
113
|
+
if (d.entries.length !== n)
|
114
|
+
return;
|
115
|
+
const u = d.entries.map((g, m) => {
|
116
|
+
const v = 2 * Math.PI * m / n - Math.PI / 2, f = A(g, r, s, c), O = f * Math.cos(v), S = f * Math.sin(v);
|
117
|
+
return { x: O, y: S };
|
118
|
+
});
|
119
|
+
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
120
|
+
});
|
121
|
+
}
|
122
|
+
l(M, "drawCurves");
|
123
|
+
function A(a, t, e, r) {
|
124
|
+
const s = Math.min(Math.max(a, t), e);
|
125
|
+
return r * (s - t) / (e - t);
|
126
|
+
}
|
127
|
+
l(A, "relativeRadius");
|
128
|
+
function L(a, t) {
|
129
|
+
const e = a.length;
|
130
|
+
let r = `M${a[0].x},${a[0].y}`;
|
131
|
+
for (let s = 0; s < e; s++) {
|
132
|
+
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
133
|
+
x: i.x + (n.x - o.x) * t,
|
134
|
+
y: i.y + (n.y - o.y) * t
|
135
|
+
}, p = {
|
136
|
+
x: n.x - (c.x - i.x) * t,
|
137
|
+
y: n.y - (c.y - i.y) * t
|
138
|
+
};
|
139
|
+
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
140
|
+
}
|
141
|
+
return `${r} Z`;
|
142
|
+
}
|
143
|
+
l(L, "closedRoundCurve");
|
144
|
+
function T(a, t, e, r) {
|
145
|
+
if (!e)
|
146
|
+
return;
|
147
|
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
148
|
+
t.forEach((n, c) => {
|
149
|
+
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
150
|
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
151
|
+
});
|
152
|
+
}
|
153
|
+
l(T, "drawLegend");
|
154
|
+
var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
|
155
|
+
let e = "";
|
156
|
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
157
|
+
const s = a[`cScale${r}`];
|
158
|
+
e += `
|
159
|
+
.radarCurve-${r} {
|
160
|
+
color: ${s};
|
161
|
+
fill: ${s};
|
162
|
+
fill-opacity: ${t.curveOpacity};
|
163
|
+
stroke: ${s};
|
164
|
+
stroke-width: ${t.curveStrokeWidth};
|
165
|
+
}
|
166
|
+
.radarLegendBox-${r} {
|
167
|
+
fill: ${s};
|
168
|
+
fill-opacity: ${t.curveOpacity};
|
169
|
+
stroke: ${s};
|
170
|
+
}
|
171
|
+
`;
|
172
|
+
}
|
173
|
+
return e;
|
174
|
+
}, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
|
175
|
+
const t = V(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
|
176
|
+
return { themeVariables: r, radarOptions: s };
|
177
|
+
}, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
178
|
+
const { themeVariables: t, radarOptions: e } = ot(a);
|
179
|
+
return `
|
180
|
+
.radarTitle {
|
181
|
+
font-size: ${t.fontSize};
|
182
|
+
color: ${t.titleColor};
|
183
|
+
dominant-baseline: hanging;
|
184
|
+
text-anchor: middle;
|
185
|
+
}
|
186
|
+
.radarAxisLine {
|
187
|
+
stroke: ${e.axisColor};
|
188
|
+
stroke-width: ${e.axisStrokeWidth};
|
189
|
+
}
|
190
|
+
.radarAxisLabel {
|
191
|
+
dominant-baseline: middle;
|
192
|
+
text-anchor: middle;
|
193
|
+
font-size: ${e.axisLabelFontSize}px;
|
194
|
+
color: ${e.axisColor};
|
195
|
+
}
|
196
|
+
.radarGraticule {
|
197
|
+
fill: ${e.graticuleColor};
|
198
|
+
fill-opacity: ${e.graticuleOpacity};
|
199
|
+
stroke: ${e.graticuleColor};
|
200
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
201
|
+
}
|
202
|
+
.radarLegendText {
|
203
|
+
text-anchor: start;
|
204
|
+
font-size: ${e.legendFontSize}px;
|
205
|
+
dominant-baseline: hanging;
|
206
|
+
}
|
207
|
+
${nt(t, e)}
|
208
|
+
`;
|
209
|
+
}, "styles"), ut = {
|
210
|
+
parser: Q,
|
211
|
+
db: $,
|
212
|
+
renderer: st,
|
213
|
+
styles: it
|
214
|
+
};
|
215
|
+
export {
|
216
|
+
ut as diagram
|
217
|
+
};
|