@camstack/addon-benchmark 1.0.2 → 1.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.
@@ -0,0 +1,188 @@
1
+ import { b as e, c as t, g as n, h as r, l as i, n as a, p as o, r as s, t as c, u as l } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-Bnj8XQnA.mjs";
2
+ import { n as u, r as d, t as f } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
3
+ import { d as p } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DUcQzS7t.mjs";
4
+ //#region ../ui-library/src/lib/cap-error.ts
5
+ function m(e) {
6
+ if (typeof e != "object" || !e) return null;
7
+ let t = Reflect.get(e, "data");
8
+ if (typeof t == "object" && t) {
9
+ let e = Reflect.get(t, "capRouteReason");
10
+ if (typeof e == "string") return e;
11
+ }
12
+ return null;
13
+ }
14
+ function h(e) {
15
+ let t = m(e);
16
+ return t === null ? (e instanceof Error ? e.message : String(e)).includes("provider not available") : t === "no-provider" || t === "node-offline";
17
+ }
18
+ //#endregion
19
+ //#region ../ui-library/src/lib/responsive.ts
20
+ var g = "text-[10px] text-foreground-subtle";
21
+ //#endregion
22
+ //#region ../ui-library/src/lib/shared-context.ts
23
+ e();
24
+ function _(e, t) {
25
+ if (typeof globalThis > "u") return c(t);
26
+ let n = globalThis.__camstackSharedContexts, r = n ?? /* @__PURE__ */ new Map();
27
+ n || (globalThis.__camstackSharedContexts = r);
28
+ let i = r.get(e);
29
+ if (i) return i;
30
+ let a = c(t);
31
+ return r.set(e, a), a;
32
+ }
33
+ //#endregion
34
+ //#region ../ui-library/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
35
+ var v = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), y = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), b = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), x = (e) => {
36
+ let t = b(e);
37
+ return t.charAt(0).toUpperCase() + t.slice(1);
38
+ }, S = {
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ width: 24,
41
+ height: 24,
42
+ viewBox: "0 0 24 24",
43
+ fill: "none",
44
+ stroke: "currentColor",
45
+ strokeWidth: 2,
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round"
48
+ }, C = (e) => {
49
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
50
+ return !1;
51
+ };
52
+ //#endregion
53
+ //#region ../ui-library/node_modules/lucide-react/dist/esm/Icon.js
54
+ e();
55
+ var w = s(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: o, iconNode: s, ...c }, l) => a("svg", {
56
+ ref: l,
57
+ ...S,
58
+ width: t,
59
+ height: t,
60
+ stroke: e,
61
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
62
+ className: v("lucide", i),
63
+ ...!o && !C(c) && { "aria-hidden": "true" },
64
+ ...c
65
+ }, [...s.map(([e, t]) => a(e, t)), ...Array.isArray(o) ? o : [o]]));
66
+ //#endregion
67
+ //#region ../ui-library/node_modules/lucide-react/dist/esm/createLucideIcon.js
68
+ e();
69
+ var T = (e, t) => {
70
+ let n = s(({ className: n, ...r }, i) => a(w, {
71
+ ref: i,
72
+ iconNode: t,
73
+ className: v(`lucide-${y(x(e))}`, `lucide-${e}`, n),
74
+ ...r
75
+ }));
76
+ return n.displayName = x(e), n;
77
+ }, E = T("chevron-down", [["path", {
78
+ d: "m6 9 6 6 6-6",
79
+ key: "qrunsl"
80
+ }]]), D = T("chevron-right", [["path", {
81
+ d: "m9 18 6-6-6-6",
82
+ key: "mthhwq"
83
+ }]]);
84
+ //#endregion
85
+ //#region ../ui-library/src/contexts/system-context.tsx
86
+ e();
87
+ var O = _("camstack:system", null);
88
+ function k() {
89
+ let e = i(O);
90
+ if (!e) throw Error("useSystem(): no <SystemProvider> in tree");
91
+ return e;
92
+ }
93
+ //#endregion
94
+ //#region ../ui-library/src/hooks/use-device-proxy.ts
95
+ e();
96
+ var A = "capability.binding-changed";
97
+ function j(e, t) {
98
+ let [n, i] = r(null);
99
+ return l(() => {
100
+ if (t === null) {
101
+ i(null);
102
+ return;
103
+ }
104
+ let n = !1, r = async () => {
105
+ try {
106
+ let r = await e.deviceManager.getBindings.query({ deviceId: t });
107
+ n || i(r);
108
+ } catch {
109
+ n || i((e) => e);
110
+ }
111
+ };
112
+ r();
113
+ let a = e.live?.onEvent.subscribe({ category: A }, { onData: (e) => {
114
+ let n = e.data?.source;
115
+ if (!n) {
116
+ r();
117
+ return;
118
+ }
119
+ n.type === "device" && n.id === t && r();
120
+ } });
121
+ return () => {
122
+ n = !0, a?.unsubscribe();
123
+ };
124
+ }, [e, t]), o(() => n ? p(e, n) : null, [e, n]);
125
+ }
126
+ function M(e) {
127
+ let r = t((t) => e ? e.subscribe(() => t()) : () => void 0, [e]), i = t(() => e?.value, [e]);
128
+ return n(r, i, i);
129
+ }
130
+ //#endregion
131
+ //#region ../ui-library/src/composites/widget-panel.tsx
132
+ e();
133
+ function N({ title: e, icon: t, headerRight: n, collapsible: i = !1, defaultOpen: a = !0, bodyClassName: o = "p-3", children: s }) {
134
+ let [c, l] = r(a), p = !i || c, m = /* @__PURE__ */ d(f, { children: [/* @__PURE__ */ d("span", {
135
+ className: "flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-foreground",
136
+ children: [t, e]
137
+ }), i ? u(c ? E : D, { className: "h-3.5 w-3.5 text-foreground-subtle" }) : n] }), h = `px-4 py-2 flex items-center justify-between ${p ? "border-b border-border" : ""}`;
138
+ return /* @__PURE__ */ d("div", {
139
+ className: "rounded-lg border border-border bg-surface overflow-hidden",
140
+ children: [i ? /* @__PURE__ */ u("button", {
141
+ type: "button",
142
+ onClick: () => l((e) => !e),
143
+ className: `w-full text-left ${h}`,
144
+ children: m
145
+ }) : /* @__PURE__ */ u("div", {
146
+ className: h,
147
+ children: m
148
+ }), p ? /* @__PURE__ */ u("div", {
149
+ className: o,
150
+ children: s
151
+ }) : null]
152
+ });
153
+ }
154
+ function P({ label: e, icon: t, children: n, footer: r }) {
155
+ return /* @__PURE__ */ d("div", {
156
+ className: "rounded-md border border-border/60 bg-background/40 px-3 py-2",
157
+ children: [
158
+ /* @__PURE__ */ d("div", {
159
+ className: "mb-1 flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-foreground-subtle",
160
+ children: [t, e]
161
+ }),
162
+ /* @__PURE__ */ u("div", {
163
+ className: "text-sm font-medium text-foreground",
164
+ children: n
165
+ }),
166
+ r ? /* @__PURE__ */ u("div", {
167
+ className: "mt-0.5 text-[10px] text-foreground-subtle",
168
+ children: r
169
+ }) : null
170
+ ]
171
+ });
172
+ }
173
+ //#endregion
174
+ //#region ../ui-library/src/contexts/player-overlays.tsx
175
+ e();
176
+ var F = _("camstack:player-overlays-state", null), I = _("camstack:player-overlays-actions", null);
177
+ function L() {
178
+ let e = i(F);
179
+ return o(() => e ? [...e.buttons.values()].toSorted((e, t) => e.order - t.order) : [], [e]);
180
+ }
181
+ function R(e) {
182
+ let t = i(I);
183
+ l(() => {
184
+ if (!(!t || !e)) return t.setLayer(e), () => t.removeLayer(e.id);
185
+ }, [t, e]);
186
+ }
187
+ //#endregion
188
+ export { j as a, D as c, _ as d, g as f, N as i, E as l, L as n, M as o, h as p, P as r, k as s, R as t, T as u };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CtFXNqc6.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-DpKPJ_MV.mjs";
2
2
  export { t as get, e as init };
@@ -0,0 +1,49 @@
1
+ import { u as e } from "./player-overlays-6kWAdeFH.mjs";
2
+ var t = e("eye-off", [
3
+ ["path", {
4
+ d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
5
+ key: "ct8e1f"
6
+ }],
7
+ ["path", {
8
+ d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
9
+ key: "151rxh"
10
+ }],
11
+ ["path", {
12
+ d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
13
+ key: "13bj9a"
14
+ }],
15
+ ["path", {
16
+ d: "m2 2 20 20",
17
+ key: "1ooewy"
18
+ }]
19
+ ]), n = e("square", [["rect", {
20
+ width: "18",
21
+ height: "18",
22
+ x: "3",
23
+ y: "3",
24
+ rx: "2",
25
+ key: "afitv7"
26
+ }]]), r = e("trash-2", [
27
+ ["path", {
28
+ d: "M10 11v6",
29
+ key: "nco0om"
30
+ }],
31
+ ["path", {
32
+ d: "M14 11v6",
33
+ key: "outv1u"
34
+ }],
35
+ ["path", {
36
+ d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
37
+ key: "miytrc"
38
+ }],
39
+ ["path", {
40
+ d: "M3 6h18",
41
+ key: "d0wm0j"
42
+ }],
43
+ ["path", {
44
+ d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
45
+ key: "e791ji"
46
+ }]
47
+ ]);
48
+ //#endregion
49
+ export { n, t as r, r as t };
@@ -2762,7 +2762,7 @@ async function or(e) {
2762
2762
  }
2763
2763
  }
2764
2764
  async function sr() {
2765
- return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-CAP5kXP6.mjs")).catch((e) => {
2765
+ return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-Caouvb_G.mjs")).catch((e) => {
2766
2766
  throw ir = void 0, e;
2767
2767
  }), ir;
2768
2768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-benchmark",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Detection addon benchmarking with reference images, accuracy metrics, and distributed execution",
5
5
  "keywords": [
6
6
  "camstack",
@@ -80,7 +80,8 @@
80
80
  "react-dom": ">=18"
81
81
  },
82
82
  "dependencies": {
83
- "lucide-react": "^0.511.0"
83
+ "lucide-react": "^0.511.0",
84
+ "sharp": "^0.35.2"
84
85
  },
85
86
  "devDependencies": {
86
87
  "@camstack/types": "*",