gradio-leaderboard 0.0.12rc0__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 +102 -72
- 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 -29469
- 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/templates/example/index.js +201 -139
- {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +3 -3
- gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
- {gradio_leaderboard-0.0.12rc0.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
- gradio_leaderboard/templates/component/__vite-browser-external-2447137e.js +0 -4
- gradio_leaderboard/templates/component/wrapper-6f348d45-19fa94bf.js +0 -2453
- gradio_leaderboard-0.0.12rc0.dist-info/RECORD +0 -12
@@ -0,0 +1,61 @@
|
|
1
|
+
import { i as a } from "./init-DjUOC4st.js";
|
2
|
+
class o extends Map {
|
3
|
+
constructor(n, t = g) {
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
5
|
+
}
|
6
|
+
get(n) {
|
7
|
+
return super.get(c(this, n));
|
8
|
+
}
|
9
|
+
has(n) {
|
10
|
+
return super.has(c(this, n));
|
11
|
+
}
|
12
|
+
set(n, t) {
|
13
|
+
return super.set(l(this, n), t);
|
14
|
+
}
|
15
|
+
delete(n) {
|
16
|
+
return super.delete(p(this, n));
|
17
|
+
}
|
18
|
+
}
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
20
|
+
const r = n(t);
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
22
|
+
}
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
24
|
+
const r = n(t);
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
26
|
+
}
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
28
|
+
const r = n(t);
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
30
|
+
}
|
31
|
+
function g(e) {
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
33
|
+
}
|
34
|
+
const f = Symbol("implicit");
|
35
|
+
function h() {
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
37
|
+
function s(u) {
|
38
|
+
let i = e.get(u);
|
39
|
+
if (i === void 0) {
|
40
|
+
if (r !== f) return r;
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
42
|
+
}
|
43
|
+
return t[i % t.length];
|
44
|
+
}
|
45
|
+
return s.domain = function(u) {
|
46
|
+
if (!arguments.length) return n.slice();
|
47
|
+
n = [], e = new o();
|
48
|
+
for (const i of u)
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
50
|
+
return s;
|
51
|
+
}, s.range = function(u) {
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
53
|
+
}, s.unknown = function(u) {
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
55
|
+
}, s.copy = function() {
|
56
|
+
return h(n, t).unknown(r);
|
57
|
+
}, a.apply(s, arguments), s;
|
58
|
+
}
|
59
|
+
export {
|
60
|
+
h as o
|
61
|
+
};
|
@@ -0,0 +1,162 @@
|
|
1
|
+
import { p as U } from "./chunk-353BL4L5-D4dVjjbU.js";
|
2
|
+
import { ab as y, a3 as z, aG as j, C as H, n as Z, o as q, s as J, g as K, c as Q, b as X, _ as p, l as G, t as Y, d as tt, D as et, H as at, P as rt, k as nt } from "./mermaid.core-D36e06XD.js";
|
3
|
+
import { p as it } from "./treemap-FKARHQ26-2Ty0RcZX.js";
|
4
|
+
import { d as O } from "./arc-4UNMf6Jv.js";
|
5
|
+
import { o as st } from "./ordinal-DfAQgscy.js";
|
6
|
+
function ot(t, a) {
|
7
|
+
return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
|
8
|
+
}
|
9
|
+
function lt(t) {
|
10
|
+
return t;
|
11
|
+
}
|
12
|
+
function ct() {
|
13
|
+
var t = lt, a = ot, h = null, s = y(0), d = y(z), x = y(0);
|
14
|
+
function i(e) {
|
15
|
+
var r, l = (e = j(e)).length, c, A, m = 0, u = new Array(l), n = new Array(l), v = +s.apply(this, arguments), w = Math.min(z, Math.max(-z, d.apply(this, arguments) - v)), f, T = Math.min(Math.abs(w) / l, x.apply(this, arguments)), $ = T * (w < 0 ? -1 : 1), g;
|
16
|
+
for (r = 0; r < l; ++r)
|
17
|
+
(g = n[u[r] = r] = +t(e[r], r, e)) > 0 && (m += g);
|
18
|
+
for (a != null ? u.sort(function(S, C) {
|
19
|
+
return a(n[S], n[C]);
|
20
|
+
}) : h != null && u.sort(function(S, C) {
|
21
|
+
return h(e[S], e[C]);
|
22
|
+
}), r = 0, A = m ? (w - l * $) / m : 0; r < l; ++r, v = f)
|
23
|
+
c = u[r], g = n[c], f = v + (g > 0 ? g * A : 0) + $, n[c] = {
|
24
|
+
data: e[c],
|
25
|
+
index: r,
|
26
|
+
value: g,
|
27
|
+
startAngle: v,
|
28
|
+
endAngle: f,
|
29
|
+
padAngle: T
|
30
|
+
};
|
31
|
+
return n;
|
32
|
+
}
|
33
|
+
return i.value = function(e) {
|
34
|
+
return arguments.length ? (t = typeof e == "function" ? e : y(+e), i) : t;
|
35
|
+
}, i.sortValues = function(e) {
|
36
|
+
return arguments.length ? (a = e, h = null, i) : a;
|
37
|
+
}, i.sort = function(e) {
|
38
|
+
return arguments.length ? (h = e, a = null, i) : h;
|
39
|
+
}, i.startAngle = function(e) {
|
40
|
+
return arguments.length ? (s = typeof e == "function" ? e : y(+e), i) : s;
|
41
|
+
}, i.endAngle = function(e) {
|
42
|
+
return arguments.length ? (d = typeof e == "function" ? e : y(+e), i) : d;
|
43
|
+
}, i.padAngle = function(e) {
|
44
|
+
return arguments.length ? (x = typeof e == "function" ? e : y(+e), i) : x;
|
45
|
+
}, i;
|
46
|
+
}
|
47
|
+
var R = H.pie, F = {
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
49
|
+
showData: !1,
|
50
|
+
config: R
|
51
|
+
}, E = F.sections, P = F.showData, ut = structuredClone(R), pt = /* @__PURE__ */ p(() => structuredClone(ut), "getConfig"), dt = /* @__PURE__ */ p(() => {
|
52
|
+
E = /* @__PURE__ */ new Map(), P = F.showData, Y();
|
53
|
+
}, "clear"), gt = /* @__PURE__ */ p(({ label: t, value: a }) => {
|
54
|
+
E.has(t) || (E.set(t, a), G.debug(`added new section: ${t}, with value: ${a}`));
|
55
|
+
}, "addSection"), ft = /* @__PURE__ */ p(() => E, "getSections"), ht = /* @__PURE__ */ p((t) => {
|
56
|
+
P = t;
|
57
|
+
}, "setShowData"), mt = /* @__PURE__ */ p(() => P, "getShowData"), I = {
|
58
|
+
getConfig: pt,
|
59
|
+
clear: dt,
|
60
|
+
setDiagramTitle: Z,
|
61
|
+
getDiagramTitle: q,
|
62
|
+
setAccTitle: J,
|
63
|
+
getAccTitle: K,
|
64
|
+
setAccDescription: Q,
|
65
|
+
getAccDescription: X,
|
66
|
+
addSection: gt,
|
67
|
+
getSections: ft,
|
68
|
+
setShowData: ht,
|
69
|
+
getShowData: mt
|
70
|
+
}, vt = /* @__PURE__ */ p((t, a) => {
|
71
|
+
U(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
|
72
|
+
}, "populateDb"), St = {
|
73
|
+
parse: /* @__PURE__ */ p(async (t) => {
|
74
|
+
const a = await it("pie", t);
|
75
|
+
G.debug(a), vt(a, I);
|
76
|
+
}, "parse")
|
77
|
+
}, yt = /* @__PURE__ */ p((t) => `
|
78
|
+
.pieCircle{
|
79
|
+
stroke: ${t.pieStrokeColor};
|
80
|
+
stroke-width : ${t.pieStrokeWidth};
|
81
|
+
opacity : ${t.pieOpacity};
|
82
|
+
}
|
83
|
+
.pieOuterCircle{
|
84
|
+
stroke: ${t.pieOuterStrokeColor};
|
85
|
+
stroke-width: ${t.pieOuterStrokeWidth};
|
86
|
+
fill: none;
|
87
|
+
}
|
88
|
+
.pieTitleText {
|
89
|
+
text-anchor: middle;
|
90
|
+
font-size: ${t.pieTitleTextSize};
|
91
|
+
fill: ${t.pieTitleTextColor};
|
92
|
+
font-family: ${t.fontFamily};
|
93
|
+
}
|
94
|
+
.slice {
|
95
|
+
font-family: ${t.fontFamily};
|
96
|
+
fill: ${t.pieSectionTextColor};
|
97
|
+
font-size:${t.pieSectionTextSize};
|
98
|
+
// fill: white;
|
99
|
+
}
|
100
|
+
.legend text {
|
101
|
+
fill: ${t.pieLegendTextColor};
|
102
|
+
font-family: ${t.fontFamily};
|
103
|
+
font-size: ${t.pieLegendTextSize};
|
104
|
+
}
|
105
|
+
`, "getStyles"), xt = yt, At = /* @__PURE__ */ p((t) => {
|
106
|
+
const a = [...t.entries()].map((s) => ({
|
107
|
+
label: s[0],
|
108
|
+
value: s[1]
|
109
|
+
})).sort((s, d) => d.value - s.value);
|
110
|
+
return ct().value(
|
111
|
+
(s) => s.value
|
112
|
+
)(a);
|
113
|
+
}, "createPieArcs"), wt = /* @__PURE__ */ p((t, a, h, s) => {
|
114
|
+
G.debug(`rendering pie chart
|
115
|
+
` + t);
|
116
|
+
const d = s.db, x = tt(), i = et(d.getConfig(), x.pie), e = 40, r = 18, l = 4, c = 450, A = c, m = at(a), u = m.append("g");
|
117
|
+
u.attr("transform", "translate(" + A / 2 + "," + c / 2 + ")");
|
118
|
+
const { themeVariables: n } = x;
|
119
|
+
let [v] = rt(n.pieOuterStrokeWidth);
|
120
|
+
v ??= 2;
|
121
|
+
const w = i.textPosition, f = Math.min(A, c) / 2 - e, T = O().innerRadius(0).outerRadius(f), $ = O().innerRadius(f * w).outerRadius(f * w);
|
122
|
+
u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", f + v / 2).attr("class", "pieOuterCircle");
|
123
|
+
const g = d.getSections(), S = At(g), C = [
|
124
|
+
n.pie1,
|
125
|
+
n.pie2,
|
126
|
+
n.pie3,
|
127
|
+
n.pie4,
|
128
|
+
n.pie5,
|
129
|
+
n.pie6,
|
130
|
+
n.pie7,
|
131
|
+
n.pie8,
|
132
|
+
n.pie9,
|
133
|
+
n.pie10,
|
134
|
+
n.pie11,
|
135
|
+
n.pie12
|
136
|
+
], D = st(C);
|
137
|
+
u.selectAll("mySlices").data(S).enter().append("path").attr("d", T).attr("fill", (o) => D(o.data.label)).attr("class", "pieCircle");
|
138
|
+
let W = 0;
|
139
|
+
g.forEach((o) => {
|
140
|
+
W += o;
|
141
|
+
}), u.selectAll("mySlices").data(S).enter().append("text").text((o) => (o.data.value / W * 100).toFixed(0) + "%").attr("transform", (o) => "translate(" + $.centroid(o) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(d.getDiagramTitle()).attr("x", 0).attr("y", -(c - 50) / 2).attr("class", "pieTitleText");
|
142
|
+
const M = u.selectAll(".legend").data(D.domain()).enter().append("g").attr("class", "legend").attr("transform", (o, k) => {
|
143
|
+
const b = r + l, _ = b * D.domain().length / 2, B = 12 * r, V = k * b - _;
|
144
|
+
return "translate(" + B + "," + V + ")";
|
145
|
+
});
|
146
|
+
M.append("rect").attr("width", r).attr("height", r).style("fill", D).style("stroke", D), M.data(S).append("text").attr("x", r + l).attr("y", r - l).text((o) => {
|
147
|
+
const { label: k, value: b } = o.data;
|
148
|
+
return d.getShowData() ? `${k} [${b}]` : k;
|
149
|
+
});
|
150
|
+
const L = Math.max(
|
151
|
+
...M.selectAll("text").nodes().map((o) => o?.getBoundingClientRect().width ?? 0)
|
152
|
+
), N = A + e + r + l + L;
|
153
|
+
m.attr("viewBox", `0 0 ${N} ${c}`), nt(m, c, N, i.useMaxWidth);
|
154
|
+
}, "draw"), Ct = { draw: wt }, Et = {
|
155
|
+
parser: St,
|
156
|
+
db: I,
|
157
|
+
renderer: Ct,
|
158
|
+
styles: xt
|
159
|
+
};
|
160
|
+
export {
|
161
|
+
Et as diagram
|
162
|
+
};
|