@ovalbee/reportifact 0.0.3 → 0.0.4

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 (106) hide show
  1. package/README.md +1 -1
  2. package/dist/Chart-Cmh3H_Wv.js +5634 -0
  3. package/dist/Chart-jF5jqxGZ.cjs +1 -0
  4. package/dist/ImageGallery-CPZM1tc_.cjs +1 -0
  5. package/dist/ImageGallery-DQzba-4p.js +163 -0
  6. package/dist/MetricCallout-C7SUQTrj.js +39 -0
  7. package/dist/MetricCallout-CxhVOiqg.cjs +1 -0
  8. package/dist/MetricCards-DW-_QLhI.cjs +1 -0
  9. package/dist/MetricCards-JR4hUW4_.js +61 -0
  10. package/dist/MetricsTable-CH8vIbWG.cjs +1 -0
  11. package/dist/MetricsTable-OXsVygq0.js +98 -0
  12. package/dist/Reportifact.vue.d.ts +3 -2
  13. package/dist/ReportifactWidgetHost-DIlz4TxO.js +13 -0
  14. package/dist/ReportifactWidgetHost-xDT1ykZc.cjs +1 -0
  15. package/dist/Timeline-DSGSvRjj.js +295 -0
  16. package/dist/Timeline-P3CpGmBD.cjs +1 -0
  17. package/dist/WidgetWrapper-AmnP99H8.js +62 -0
  18. package/dist/WidgetWrapper-C0lc1m0V.cjs +1 -0
  19. package/dist/components/TableOfContents.vue.d.ts +3 -4
  20. package/dist/dist-DBIuOmpr.cjs +27 -0
  21. package/dist/dist-DEKe39T1.js +23629 -0
  22. package/dist/markdownTable-BCLRoyPL.cjs +2 -0
  23. package/dist/markdownTable-DHdS_81b.js +40 -0
  24. package/dist/middleware.cjs +1 -1
  25. package/dist/middleware.js +146 -175
  26. package/dist/portable/ReportifactWidgetHost.vue.d.ts +7 -11
  27. package/dist/portable/usePortableSource.d.ts +18 -0
  28. package/dist/reportifact.cjs +63 -64
  29. package/dist/reportifact.d.ts +1 -1
  30. package/dist/reportifact.js +4909 -5228
  31. package/dist/rolldown-runtime-DF3sbh8G.cjs +1 -0
  32. package/dist/style.css +2 -13
  33. package/dist/usePortableSource--y_qMDXB.js +55 -0
  34. package/dist/usePortableSource-CN5URH4d.cjs +1 -0
  35. package/dist/utils/tfeventsParser.cjs +1 -1
  36. package/dist/utils/tfeventsParser.js +298 -327
  37. package/dist/widgets/Card.vue.d.ts +2 -1
  38. package/dist/widgets/Chart.vue.d.ts +9 -14
  39. package/dist/widgets/HelpTooltip.vue.d.ts +2 -1
  40. package/dist/widgets/ImageGallery.vue.d.ts +9 -15
  41. package/dist/widgets/Markdown.vue.d.ts +3 -2
  42. package/dist/widgets/MetricCallout.vue.d.ts +7 -13
  43. package/dist/widgets/MetricCards.vue.d.ts +7 -10
  44. package/dist/widgets/MetricTable.vue.d.ts +2 -1
  45. package/dist/widgets/MetricsTable.vue.d.ts +9 -14
  46. package/dist/widgets/ModelClassComparison.vue.d.ts +3 -2
  47. package/dist/widgets/ModelComparisonGallery.vue.d.ts +3 -2
  48. package/dist/widgets/Notice.vue.d.ts +2 -1
  49. package/dist/widgets/ReportifactWidget.vue.d.ts +3 -4
  50. package/dist/widgets/Scope.vue.d.ts +2 -3
  51. package/dist/widgets/Table.vue.d.ts +3 -2
  52. package/dist/widgets/Tensorboard.vue.d.ts +3 -2
  53. package/dist/widgets/Timeline.vue.d.ts +9 -14
  54. package/dist/widgets/WidgetWrapper.vue.d.ts +18 -20
  55. package/dist/widgets/chart-config/range.d.ts +2 -0
  56. package/dist/widgets/chart-config/shared.d.ts +25 -0
  57. package/dist/widgets/chart-config/types.d.ts +12 -3
  58. package/dist/widgets/chart.cjs +1 -1
  59. package/dist/widgets/chart.d.ts +3 -3
  60. package/dist/widgets/chart.js +2 -5
  61. package/dist/widgets/chartSizing.d.ts +10 -0
  62. package/dist/widgets/contracts.cjs +1 -1
  63. package/dist/widgets/contracts.d.ts +1 -1
  64. package/dist/widgets/contracts.js +0 -1
  65. package/dist/widgets/host.cjs +1 -1
  66. package/dist/widgets/host.d.ts +3 -3
  67. package/dist/widgets/host.js +2 -5
  68. package/dist/widgets/image-gallery.cjs +1 -1
  69. package/dist/widgets/image-gallery.d.ts +3 -3
  70. package/dist/widgets/image-gallery.js +2 -5
  71. package/dist/widgets/markdownTable.d.ts +1 -1
  72. package/dist/widgets/metric-callout.cjs +1 -1
  73. package/dist/widgets/metric-callout.d.ts +3 -3
  74. package/dist/widgets/metric-callout.js +2 -5
  75. package/dist/widgets/metric-cards.cjs +1 -1
  76. package/dist/widgets/metric-cards.d.ts +3 -3
  77. package/dist/widgets/metric-cards.js +2 -5
  78. package/dist/widgets/metrics-table.cjs +1 -1
  79. package/dist/widgets/metrics-table.d.ts +3 -3
  80. package/dist/widgets/metrics-table.js +2 -5
  81. package/dist/widgets/timeline.cjs +1 -1
  82. package/dist/widgets/timeline.d.ts +3 -3
  83. package/dist/widgets/timeline.js +2 -5
  84. package/package.json +5 -5
  85. package/dist/Chart.vue_vue_type_style_index_0_lang-Bxrsp8Oz.js +0 -5956
  86. package/dist/Chart.vue_vue_type_style_index_0_lang-mN1IaQ_U.cjs +0 -1
  87. package/dist/ImageGallery.vue_vue_type_style_index_0_lang-Ak_OUL_c.js +0 -197
  88. package/dist/ImageGallery.vue_vue_type_style_index_0_lang-Ch0UPxhs.cjs +0 -1
  89. package/dist/MetricCallout.vue_vue_type_style_index_0_lang-ANFFq7CE.js +0 -62
  90. package/dist/MetricCallout.vue_vue_type_style_index_0_lang-CT9lFI28.cjs +0 -1
  91. package/dist/MetricCards.vue_vue_type_style_index_0_lang-1hn2BMbU.js +0 -46
  92. package/dist/MetricCards.vue_vue_type_style_index_0_lang-BDU7pisC.cjs +0 -1
  93. package/dist/MetricsTable.vue_vue_type_style_index_0_lang-BfxK3vcz.js +0 -140
  94. package/dist/MetricsTable.vue_vue_type_style_index_0_lang-CS7xiHRk.cjs +0 -1
  95. package/dist/ReportifactWidgetHost-A73gQ3bT.cjs +0 -1
  96. package/dist/ReportifactWidgetHost-BjKBwCWI.js +0 -17
  97. package/dist/Timeline.vue_vue_type_style_index_0_lang-EmkZbKjQ.js +0 -2646
  98. package/dist/Timeline.vue_vue_type_style_index_0_lang-HOC43_F3.cjs +0 -2
  99. package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BY2t_Hvs.cjs +0 -1
  100. package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BbnW8GXT.js +0 -72
  101. package/dist/index-3DTuh2Dr.cjs +0 -47
  102. package/dist/index-DevYhXSC.js +0 -22104
  103. package/dist/markdownTable-B5207r3E.js +0 -32
  104. package/dist/markdownTable-Cbn1Du3L.cjs +0 -2
  105. package/dist/useFetch-BfOAq-Kg.cjs +0 -1
  106. package/dist/useFetch-CHQm_TmB.js +0 -35
@@ -1,62 +0,0 @@
1
- import { defineComponent as m, computed as l, createBlock as f, openBlock as s, withCtx as v, createElementVNode as a, createElementBlock as _, createCommentVNode as h, toDisplayString as i, normalizeClass as b } from "vue";
2
- import { m as g } from "./markdownTable-B5207r3E.js";
3
- import { _ as w } from "./WidgetWrapper.vue_vue_type_style_index_0_lang-BbnW8GXT.js";
4
- const k = { class: "reportifact-metric-callout" }, C = { class: "reportifact-metric-callout-header" }, H = { class: "reportifact-metric-callout-label" }, y = { class: "reportifact-metric-callout-description" }, L = ["innerHTML"], B = /* @__PURE__ */ m({
5
- __name: "MetricCallout",
6
- props: {
7
- caption: { default: void 0 },
8
- sourceHref: { default: void 0 },
9
- sourceLabel: { default: void 0 },
10
- widget: { default: void 0 },
11
- data: { default: void 0 },
12
- label: { default: void 0 },
13
- value: { default: void 0 },
14
- description: { default: void 0 },
15
- html: { default: void 0 }
16
- },
17
- setup(d) {
18
- const e = d, n = l(() => {
19
- var t, o;
20
- return String(e.label ?? ((t = e.data) == null ? void 0 : t.label) ?? ((o = e.widget) == null ? void 0 : o.options.label) ?? "Metric");
21
- }), c = l(() => {
22
- var t, o;
23
- return String(e.value ?? ((t = e.data) == null ? void 0 : t.value) ?? ((o = e.widget) == null ? void 0 : o.options.value) ?? "");
24
- }), u = l(() => {
25
- var t, o;
26
- return String(
27
- e.description ?? ((t = e.data) == null ? void 0 : t.description) ?? ((o = e.widget) == null ? void 0 : o.options.description) ?? ""
28
- );
29
- }), r = l(() => {
30
- var t, o;
31
- return e.html ?? ((t = e.data) == null ? void 0 : t.html) ?? ((o = e.widget) == null ? void 0 : o.html) ?? "";
32
- }), p = l(() => g(c.value));
33
- return (t, o) => (s(), f(w, {
34
- caption: e.caption,
35
- "source-href": e.sourceHref,
36
- "source-label": e.sourceLabel
37
- }, {
38
- default: v(() => [
39
- a("section", k, [
40
- a("header", C, [
41
- a("div", null, [
42
- a("div", H, i(n.value), 1),
43
- a("strong", {
44
- class: b(["reportifact-metric-callout-value", `reportifact-metric-callout-value--${p.value}`])
45
- }, i(c.value), 3)
46
- ]),
47
- a("div", y, i(u.value), 1)
48
- ]),
49
- r.value ? (s(), _("div", {
50
- key: 0,
51
- class: "reportifact-metric-callout-body reportifact-markdown",
52
- innerHTML: r.value
53
- }, null, 8, L)) : h("", !0)
54
- ])
55
- ]),
56
- _: 1
57
- }, 8, ["caption", "source-href", "source-label"]));
58
- }
59
- });
60
- export {
61
- B as _
62
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),s=require("./markdownTable-Cbn1Du3L.cjs"),u=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BY2t_Hvs.cjs"),p={class:"reportifact-metric-callout"},m={class:"reportifact-metric-callout-header"},v={class:"reportifact-metric-callout-label"},_={class:"reportifact-metric-callout-description"},f=["innerHTML"],h=e.defineComponent({__name:"MetricCallout",props:{caption:{default:void 0},sourceHref:{default:void 0},sourceLabel:{default:void 0},widget:{default:void 0},data:{default:void 0},label:{default:void 0},value:{default:void 0},description:{default:void 0},html:{default:void 0}},setup(i){const t=i,r=e.computed(()=>{var o,a;return String(t.label??((o=t.data)==null?void 0:o.label)??((a=t.widget)==null?void 0:a.options.label)??"Metric")}),l=e.computed(()=>{var o,a;return String(t.value??((o=t.data)==null?void 0:o.value)??((a=t.widget)==null?void 0:a.options.value)??"")}),n=e.computed(()=>{var o,a;return String(t.description??((o=t.data)==null?void 0:o.description)??((a=t.widget)==null?void 0:a.options.description)??"")}),c=e.computed(()=>{var o,a;return t.html??((o=t.data)==null?void 0:o.html)??((a=t.widget)==null?void 0:a.html)??""}),d=e.computed(()=>s.metricTone(l.value));return(o,a)=>(e.openBlock(),e.createBlock(u._sfc_main,{caption:t.caption,"source-href":t.sourceHref,"source-label":t.sourceLabel},{default:e.withCtx(()=>[e.createElementVNode("section",p,[e.createElementVNode("header",m,[e.createElementVNode("div",null,[e.createElementVNode("div",v,e.toDisplayString(r.value),1),e.createElementVNode("strong",{class:e.normalizeClass(["reportifact-metric-callout-value",`reportifact-metric-callout-value--${d.value}`])},e.toDisplayString(l.value),3)]),e.createElementVNode("div",_,e.toDisplayString(n.value),1)]),c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"reportifact-metric-callout-body reportifact-markdown",innerHTML:c.value},null,8,f)):e.createCommentVNode("",!0)])]),_:1},8,["caption","source-href","source-label"]))}});exports._sfc_main=h;
@@ -1,46 +0,0 @@
1
- import { defineComponent as u, computed as f, createBlock as m, openBlock as c, withCtx as _, createElementVNode as r, createElementBlock as s, Fragment as v, renderList as h, normalizeClass as b, unref as i, normalizeStyle as g, toDisplayString as o } from "vue";
2
- import { p as k, m as y, a as C } from "./markdownTable-B5207r3E.js";
3
- import { _ as x } from "./WidgetWrapper.vue_vue_type_style_index_0_lang-BbnW8GXT.js";
4
- const B = { class: "reportifact-metric-cards" }, L = { class: "reportifact-metric-card-label" }, $ = { class: "reportifact-metric-card-value" }, z = { class: "reportifact-metric-card-description" }, T = /* @__PURE__ */ u({
5
- __name: "MetricCards",
6
- props: {
7
- caption: { default: void 0 },
8
- sourceHref: { default: void 0 },
9
- sourceLabel: { default: void 0 },
10
- widget: { default: void 0 },
11
- content: { default: void 0 },
12
- data: { default: void 0 }
13
- },
14
- setup(l) {
15
- const e = l, n = f(() => {
16
- var a;
17
- return e.data ?? k(e.content ?? ((a = e.widget) == null ? void 0 : a.content) ?? "");
18
- }), d = y, p = C;
19
- return (a, E) => (c(), m(x, {
20
- caption: e.caption,
21
- "source-href": e.sourceHref,
22
- "source-label": e.sourceLabel
23
- }, {
24
- default: _(() => [
25
- r("div", B, [
26
- (c(!0), s(v, null, h(n.value, (t) => (c(), s("article", {
27
- key: t.label,
28
- class: b(["reportifact-metric-card", `reportifact-metric-card--${i(d)(t.value)}`])
29
- }, [
30
- r("span", {
31
- class: "reportifact-metric-card-fill",
32
- style: g({ height: `${i(p)(t.value)}%` })
33
- }, null, 4),
34
- r("span", L, o(t.label), 1),
35
- r("strong", $, o(t.value), 1),
36
- r("p", z, o(t.description), 1)
37
- ], 2))), 128))
38
- ])
39
- ]),
40
- _: 1
41
- }, 8, ["caption", "source-href", "source-label"]));
42
- }
43
- });
44
- export {
45
- T as _
46
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),a=require("./markdownTable-Cbn1Du3L.cjs"),s=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BY2t_Hvs.cjs"),d={class:"reportifact-metric-cards"},u={class:"reportifact-metric-card-label"},p={class:"reportifact-metric-card-value"},m={class:"reportifact-metric-card-description"},_=e.defineComponent({__name:"MetricCards",props:{caption:{default:void 0},sourceHref:{default:void 0},sourceLabel:{default:void 0},widget:{default:void 0},content:{default:void 0},data:{default:void 0}},setup(o){const t=o,n=e.computed(()=>{var c;return t.data??a.parseMarkdownTable(t.content??((c=t.widget)==null?void 0:c.content)??"")}),l=a.metricTone,i=a.metricPercent;return(c,f)=>(e.openBlock(),e.createBlock(s._sfc_main,{caption:t.caption,"source-href":t.sourceHref,"source-label":t.sourceLabel},{default:e.withCtx(()=>[e.createElementVNode("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,r=>(e.openBlock(),e.createElementBlock("article",{key:r.label,class:e.normalizeClass(["reportifact-metric-card",`reportifact-metric-card--${e.unref(l)(r.value)}`])},[e.createElementVNode("span",{class:"reportifact-metric-card-fill",style:e.normalizeStyle({height:`${e.unref(i)(r.value)}%`})},null,4),e.createElementVNode("span",u,e.toDisplayString(r.label),1),e.createElementVNode("strong",p,e.toDisplayString(r.value),1),e.createElementVNode("p",m,e.toDisplayString(r.description),1)],2))),128))])]),_:1},8,["caption","source-href","source-label"]))}});exports._sfc_main=_;
@@ -1,140 +0,0 @@
1
- import { defineComponent as j, computed as o, ref as z, watch as H, createBlock as N, openBlock as s, withCtx as y, createElementVNode as l, createElementBlock as r, createCommentVNode as m, toDisplayString as u, normalizeClass as P, Fragment as c, renderList as d, normalizeStyle as T } from "vue";
2
- import { u as W } from "./useFetch-CHQm_TmB.js";
3
- import { _ as $ } from "./WidgetWrapper.vue_vue_type_style_index_0_lang-BbnW8GXT.js";
4
- const q = { class: "rm-skeleton" }, G = { class: "rm-card" }, I = {
5
- key: 0,
6
- class: "rm-title"
7
- }, J = {
8
- key: 0,
9
- class: "rm-empty"
10
- }, K = { class: "rm-name" }, O = { class: "rm-value" }, Q = { class: "rm-bar-track" }, U = {
11
- key: 0,
12
- class: "rm-pct"
13
- }, X = {
14
- key: 2,
15
- class: "rm-table"
16
- }, te = /* @__PURE__ */ j({
17
- __name: "MetricsTable",
18
- props: {
19
- caption: { default: void 0 },
20
- sourceHref: { default: void 0 },
21
- sourceLabel: { default: void 0 },
22
- url: { default: void 0 },
23
- src: { default: void 0 },
24
- data: { default: void 0 },
25
- options: { default: void 0 }
26
- },
27
- setup(k, { expose: b }) {
28
- const t = k, f = o(() => {
29
- var e;
30
- return typeof ((e = t.options) == null ? void 0 : e.title) == "string" ? t.options.title : "";
31
- }), p = o(() => {
32
- var e;
33
- return ((e = t.options) == null ? void 0 : e.show_pct) === !0;
34
- }), n = z(null), w = o(() => t.data === void 0 ? t.src ?? t.url ?? "" : ""), { loading: x, error: g, fetchData: C } = W(w, {
35
- async onSuccess(e) {
36
- n.value = await e.json();
37
- }
38
- }), A = o(() => t.data === void 0 && x.value), F = o(() => t.data !== void 0 ? null : t.src || t.url ? g.value : "Resource not found in asset");
39
- H(
40
- () => t.data,
41
- (e) => {
42
- e !== void 0 && (n.value = e);
43
- },
44
- { immediate: !0, deep: !0 }
45
- );
46
- function L() {
47
- t.data !== void 0 ? n.value = t.data : C();
48
- }
49
- b({ refresh: L });
50
- const _ = o(() => {
51
- const e = n.value;
52
- if (!e || !Array.isArray(e.rows)) return !1;
53
- const i = e.rows[0];
54
- return i === void 0 || typeof i == "object" && "value" in i;
55
- }), v = o(() => {
56
- const e = n.value;
57
- return !!e && Array.isArray(e.columns);
58
- }), h = o(
59
- () => _.value ? n.value.rows : []
60
- ), M = o(
61
- () => v.value ? n.value.columns : []
62
- ), R = o(
63
- () => v.value ? n.value.rows : []
64
- );
65
- function B(e) {
66
- return e.toFixed(3);
67
- }
68
- function D(e, i) {
69
- return Math.min(100, Math.max(0, e / (i ?? 1) * 100));
70
- }
71
- return (e, i) => (s(), N($, {
72
- loading: A.value,
73
- error: F.value,
74
- caption: t.caption,
75
- "source-href": t.sourceHref,
76
- "source-label": t.sourceLabel
77
- }, {
78
- skeleton: y(() => [
79
- l("div", q, [
80
- (s(), r(c, null, d(4, (a) => l("div", {
81
- key: a,
82
- class: "rm-skeleton-row"
83
- }, [...i[0] || (i[0] = [
84
- l("div", {
85
- class: "reportifact-skeleton-line",
86
- style: { width: "80px" }
87
- }, null, -1),
88
- l("div", {
89
- class: "reportifact-skeleton-line",
90
- style: { width: "40px" }
91
- }, null, -1),
92
- l("div", {
93
- class: "reportifact-skeleton-line",
94
- style: { flex: "1" }
95
- }, null, -1)
96
- ])])), 64))
97
- ])
98
- ]),
99
- default: y(() => [
100
- l("div", G, [
101
- f.value ? (s(), r("div", I, u(f.value), 1)) : m("", !0),
102
- _.value ? (s(), r("div", {
103
- key: 1,
104
- class: P(["rm-metrics", { "rm-metrics--with-pct": p.value }])
105
- }, [
106
- h.value.length === 0 ? (s(), r("div", J, " Waiting for first evaluation… ")) : (s(!0), r(c, { key: 1 }, d(h.value, (a) => (s(), r("div", {
107
- key: a.name,
108
- class: "rm-row"
109
- }, [
110
- l("span", K, u(a.name), 1),
111
- l("span", O, u(B(a.value)), 1),
112
- l("div", Q, [
113
- l("div", {
114
- class: "rm-bar-fill",
115
- style: T({ width: D(a.value, a.max) + "%" })
116
- }, null, 4)
117
- ]),
118
- p.value ? (s(), r("span", U, u((a.value * 100).toFixed(1)) + "%", 1)) : m("", !0)
119
- ]))), 128))
120
- ], 2)) : v.value ? (s(), r("table", X, [
121
- l("thead", null, [
122
- l("tr", null, [
123
- (s(!0), r(c, null, d(M.value, (a) => (s(), r("th", { key: a }, u(a), 1))), 128))
124
- ])
125
- ]),
126
- l("tbody", null, [
127
- (s(!0), r(c, null, d(R.value, (a, E) => (s(), r("tr", { key: E }, [
128
- (s(!0), r(c, null, d(a, (S, V) => (s(), r("td", { key: V }, u(S), 1))), 128))
129
- ]))), 128))
130
- ])
131
- ])) : m("", !0)
132
- ])
133
- ]),
134
- _: 1
135
- }, 8, ["loading", "error", "caption", "source-href", "source-label"]));
136
- }
137
- });
138
- export {
139
- te as _
140
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),x=require("./useFetch-BfOAq-Kg.cjs"),F=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BY2t_Hvs.cjs"),C={class:"rm-skeleton"},D={class:"rm-card"},L={key:0,class:"rm-title"},S={key:0,class:"rm-empty"},A={class:"rm-name"},M={class:"rm-value"},R={class:"rm-bar-track"},q={key:0,class:"rm-pct"},W={key:2,class:"rm-table"},j=e.defineComponent({__name:"MetricsTable",props:{caption:{default:void 0},sourceHref:{default:void 0},sourceLabel:{default:void 0},url:{default:void 0},src:{default:void 0},data:{default:void 0},options:{default:void 0}},setup(d,{expose:m}){const o=d,c=e.computed(()=>{var t;return typeof((t=o.options)==null?void 0:t.title)=="string"?o.options.title:""}),s=e.computed(()=>{var t;return((t=o.options)==null?void 0:t.show_pct)===!0}),r=e.ref(null),p=e.computed(()=>o.data===void 0?o.src??o.url??"":""),{loading:v,error:k,fetchData:f}=x.useFetch(p,{async onSuccess(t){r.value=await t.json()}}),_=e.computed(()=>o.data===void 0&&v.value),y=e.computed(()=>o.data!==void 0?null:o.src||o.url?k.value:"Resource not found in asset");e.watch(()=>o.data,t=>{t!==void 0&&(r.value=t)},{immediate:!0,deep:!0});function B(){o.data!==void 0?r.value=o.data:f()}m({refresh:B});const i=e.computed(()=>{const t=r.value;if(!t||!Array.isArray(t.rows))return!1;const n=t.rows[0];return n===void 0||typeof n=="object"&&"value"in n}),a=e.computed(()=>{const t=r.value;return!!t&&Array.isArray(t.columns)}),u=e.computed(()=>i.value?r.value.rows:[]),h=e.computed(()=>a.value?r.value.columns:[]),E=e.computed(()=>a.value?r.value.rows:[]);function g(t){return t.toFixed(3)}function V(t,n){return Math.min(100,Math.max(0,t/(n??1)*100))}return(t,n)=>(e.openBlock(),e.createBlock(F._sfc_main,{loading:_.value,error:y.value,caption:o.caption,"source-href":o.sourceHref,"source-label":o.sourceLabel},{skeleton:e.withCtx(()=>[e.createElementVNode("div",C,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,l=>e.createElementVNode("div",{key:l,class:"rm-skeleton-row"},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"80px"}},null,-1),e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"40px"}},null,-1),e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{flex:"1"}},null,-1)])])),64))])]),default:e.withCtx(()=>[e.createElementVNode("div",D,[c.value?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rm-metrics",{"rm-metrics--with-pct":s.value}])},[u.value.length===0?(e.openBlock(),e.createElementBlock("div",S," Waiting for first evaluation… ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:"rm-row"},[e.createElementVNode("span",A,e.toDisplayString(l.name),1),e.createElementVNode("span",M,e.toDisplayString(g(l.value)),1),e.createElementVNode("div",R,[e.createElementVNode("div",{class:"rm-bar-fill",style:e.normalizeStyle({width:V(l.value,l.max)+"%"})},null,4)]),s.value?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString((l.value*100).toFixed(1))+"%",1)):e.createCommentVNode("",!0)]))),128))],2)):a.value?(e.openBlock(),e.createElementBlock("table",W,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("th",{key:l},e.toDisplayString(l),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,N)=>(e.openBlock(),e.createElementBlock("tr",{key:N},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,(b,w)=>(e.openBlock(),e.createElementBlock("td",{key:w},e.toDisplayString(b),1))),128))]))),128))])])):e.createCommentVNode("",!0)])]),_:1},8,["loading","error","caption","source-href","source-label"]))}});exports._sfc_main=j;
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),r=(t,o)=>{const c=t.__vccOpts||t;for(const[s,n]of o)c[s]=n;return c},i={},_={class:"reportifact reportifact-widget-host"};function a(t,o){return e.openBlock(),e.createElementBlock("div",_,[e.renderSlot(t.$slots,"default")])}const f=r(i,[["render",a]]);exports.ReportifactWidgetHost=f;exports._export_sfc=r;
@@ -1,17 +0,0 @@
1
- import { createElementBlock as s, openBlock as n, renderSlot as a } from "vue";
2
- const _ = (t, e) => {
3
- const o = t.__vccOpts || t;
4
- for (const [r, c] of e)
5
- o[r] = c;
6
- return o;
7
- }, f = {}, i = { class: "reportifact reportifact-widget-host" };
8
- function d(t, e) {
9
- return n(), s("div", i, [
10
- a(t.$slots, "default")
11
- ]);
12
- }
13
- const p = /* @__PURE__ */ _(f, [["render", d]]);
14
- export {
15
- p as R,
16
- _
17
- };