@camstack/addon-osd-manager 0.1.9 → 0.1.11

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 (22) hide show
  1. package/dist/MotionZonesSettings-Cq0OFaxs.mjs +310 -0
  2. package/dist/PrivacyMaskSettings-C0jj3SDp.mjs +370 -0
  3. package/dist/SceneMonitorEditor-B25bY2v0.mjs +828 -0
  4. package/dist/_stub.js +12899 -12924
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BLRTZ4RM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-U1DYRszQ.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-rUObp2Qg.mjs +26 -0
  7. package/dist/addon-osd-manager.css +1 -1
  8. package/dist/{hostInit-N1Y97Zzt.mjs → hostInit-UKaIppAV.mjs} +3 -3
  9. package/dist/index.js +2852 -97
  10. package/dist/index.mjs +2852 -97
  11. package/dist/player-overlays-Dfe_rxmA.mjs +44 -0
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/responsive-CWwNAY3j.mjs +122 -0
  14. package/dist/{trash-2-6DuTY6Z3.mjs → square-ax5XLFv8.mjs} +3 -24
  15. package/dist/trash-2-CWfC2FLD.mjs +25 -0
  16. package/dist/use-device-snapshot-Z9dNOZFk.mjs +149 -0
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Bzaw9YeG.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DEpr9uky.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/MotionZonesSettings-CvRjAHsj.mjs +0 -309
  20. package/dist/PrivacyMaskSettings-LV8_5mQk.mjs +0 -368
  21. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BHektQkr.mjs +0 -26
  22. package/dist/player-overlays-Cb0QIiJ0.mjs +0 -163
@@ -0,0 +1,44 @@
1
+ import { h as e, l as t, u as n, y as r } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
2
+ import { o as i, s as a } from "./responsive-CWwNAY3j.mjs";
3
+ import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
4
+ var l = a("chevron-down", [["path", {
5
+ d: "m6 9 6 6 6-6",
6
+ key: "qrunsl"
7
+ }]]), u = a("chevron-right", [["path", {
8
+ d: "m9 18 6-6-6-6",
9
+ key: "mthhwq"
10
+ }]]);
11
+ //#endregion
12
+ //#region ../ui-library/src/composites/widget-panel.tsx
13
+ r();
14
+ function d({ title: t, icon: n, headerRight: r, collapsible: i = !1, defaultOpen: a = !0, bodyClassName: d = "p-3", children: f }) {
15
+ let [p, m] = e(a), h = !i || p, g = /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ s("span", {
16
+ className: "flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-foreground",
17
+ children: [n, t]
18
+ }), i ? o(p ? l : u, { className: "h-3.5 w-3.5 text-foreground-subtle" }) : r] }), _ = `px-4 py-2 flex items-center justify-between ${h ? "border-b border-border" : ""}`;
19
+ return /* @__PURE__ */ s("div", {
20
+ className: "rounded-lg border border-border bg-surface overflow-hidden",
21
+ children: [i ? /* @__PURE__ */ o("button", {
22
+ type: "button",
23
+ onClick: () => m((e) => !e),
24
+ className: `w-full text-left ${_}`,
25
+ children: g
26
+ }) : /* @__PURE__ */ o("div", {
27
+ className: _,
28
+ children: g
29
+ }), h ? /* @__PURE__ */ o("div", {
30
+ className: d,
31
+ children: f
32
+ }) : null]
33
+ });
34
+ }
35
+ r(), i("camstack:player-overlays-state", null);
36
+ var f = i("camstack:player-overlays-actions", null);
37
+ function p(e) {
38
+ let r = t(f);
39
+ n(() => {
40
+ if (!(!r || !e)) return r.setLayer(e), () => r.removeLayer(e.id);
41
+ }, [r, e]);
42
+ }
43
+ //#endregion
44
+ export { d as n, l as r, p as t };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Bzaw9YeG.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DEpr9uky.mjs";
2
2
  export { t as get, e as init };
@@ -0,0 +1,122 @@
1
+ import { c as e, g as t, h as n, l as r, n as i, p as a, r as o, t as s, u as c, y as l } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
2
+ import "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
3
+ import { g as u } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-rUObp2Qg.mjs";
4
+ //#region ../ui-library/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
5
+ l();
6
+ var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), f = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), p = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), m = (e) => {
7
+ let t = p(e);
8
+ return t.charAt(0).toUpperCase() + t.slice(1);
9
+ }, h = {
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ width: 24,
12
+ height: 24,
13
+ viewBox: "0 0 24 24",
14
+ fill: "none",
15
+ stroke: "currentColor",
16
+ strokeWidth: 2,
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ }, g = (e) => {
20
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
21
+ return !1;
22
+ }, _ = o(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => i("svg", {
23
+ ref: l,
24
+ ...h,
25
+ width: t,
26
+ height: t,
27
+ stroke: e,
28
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
29
+ className: d("lucide", a),
30
+ ...!o && !g(c) && { "aria-hidden": "true" },
31
+ ...c
32
+ }, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]));
33
+ //#endregion
34
+ //#region ../ui-library/node_modules/lucide-react/dist/esm/createLucideIcon.js
35
+ l();
36
+ var v = (e, t) => {
37
+ let n = o(({ className: n, ...r }, a) => i(_, {
38
+ ref: a,
39
+ iconNode: t,
40
+ className: d(`lucide-${f(m(e))}`, `lucide-${e}`, n),
41
+ ...r
42
+ }));
43
+ return n.displayName = m(e), n;
44
+ };
45
+ //#endregion
46
+ //#region ../ui-library/src/lib/shared-context.ts
47
+ l();
48
+ function y(e, t) {
49
+ if (typeof globalThis > "u") return s(t);
50
+ let n = globalThis.__camstackSharedContexts, r = n ?? /* @__PURE__ */ new Map();
51
+ n || (globalThis.__camstackSharedContexts = r);
52
+ let i = r.get(e);
53
+ if (i) return i;
54
+ let a = s(t);
55
+ return r.set(e, a), a;
56
+ }
57
+ //#endregion
58
+ //#region ../ui-library/src/contexts/system-context.tsx
59
+ l();
60
+ var b = y("camstack:system", null);
61
+ function x() {
62
+ let e = r(b);
63
+ if (!e) throw Error("useSystem(): no <SystemProvider> in tree");
64
+ return e;
65
+ }
66
+ //#endregion
67
+ //#region ../ui-library/src/hooks/use-device-proxy.ts
68
+ l();
69
+ var S = "capability.binding-changed";
70
+ function C(e, t) {
71
+ let [r, i] = n(null);
72
+ return c(() => {
73
+ if (t === null) {
74
+ i(null);
75
+ return;
76
+ }
77
+ let n = !1, r = async () => {
78
+ try {
79
+ let r = await e.deviceManager.getBindings.query({ deviceId: t });
80
+ n || i(r);
81
+ } catch {
82
+ n || i((e) => e);
83
+ }
84
+ };
85
+ r();
86
+ let a = e.live?.onEvent.subscribe({ category: S }, { onData: (e) => {
87
+ let n = e.data?.source;
88
+ if (!n) {
89
+ r();
90
+ return;
91
+ }
92
+ n.type === "device" && n.id === t && r();
93
+ } });
94
+ return () => {
95
+ n = !0, a?.unsubscribe();
96
+ };
97
+ }, [e, t]), a(() => r ? u(e, r) : null, [e, r]);
98
+ }
99
+ function w(n) {
100
+ let r = e((e) => n ? n.subscribe(() => e()) : () => void 0, [n]), i = e(() => n?.value, [n]);
101
+ return t(r, i, i);
102
+ }
103
+ //#endregion
104
+ //#region ../ui-library/src/lib/cap-error.ts
105
+ function T(e) {
106
+ if (typeof e != "object" || !e) return null;
107
+ let t = Reflect.get(e, "data");
108
+ if (typeof t == "object" && t) {
109
+ let e = Reflect.get(t, "capRouteReason");
110
+ if (typeof e == "string") return e;
111
+ }
112
+ return null;
113
+ }
114
+ function E(e) {
115
+ let t = T(e);
116
+ return t === null ? (e instanceof Error ? e.message : String(e)).includes("provider not available") : t === "no-provider" || t === "node-offline";
117
+ }
118
+ //#endregion
119
+ //#region ../ui-library/src/lib/responsive.ts
120
+ var D = "text-[10px] text-foreground-subtle";
121
+ //#endregion
122
+ export { x as a, w as i, E as n, y as o, C as r, v as s, D as t };
@@ -1,4 +1,4 @@
1
- import { s as e } from "./player-overlays-Cb0QIiJ0.mjs";
1
+ import { s as e } from "./responsive-CWwNAY3j.mjs";
2
2
  var t = e("eye-off", [
3
3
  ["path", {
4
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",
@@ -40,27 +40,6 @@ var t = e("eye-off", [
40
40
  y: "3",
41
41
  rx: "2",
42
42
  key: "afitv7"
43
- }]]), i = e("trash-2", [
44
- ["path", {
45
- d: "M10 11v6",
46
- key: "nco0om"
47
- }],
48
- ["path", {
49
- d: "M14 11v6",
50
- key: "outv1u"
51
- }],
52
- ["path", {
53
- d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
54
- key: "miytrc"
55
- }],
56
- ["path", {
57
- d: "M3 6h18",
58
- key: "d0wm0j"
59
- }],
60
- ["path", {
61
- d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
62
- key: "e791ji"
63
- }]
64
- ]);
43
+ }]]);
65
44
  //#endregion
66
- export { t as i, r as n, n as r, i as t };
45
+ export { n, t as r, r as t };
@@ -0,0 +1,25 @@
1
+ import { s as e } from "./responsive-CWwNAY3j.mjs";
2
+ var t = e("trash-2", [
3
+ ["path", {
4
+ d: "M10 11v6",
5
+ key: "nco0om"
6
+ }],
7
+ ["path", {
8
+ d: "M14 11v6",
9
+ key: "outv1u"
10
+ }],
11
+ ["path", {
12
+ d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
13
+ key: "miytrc"
14
+ }],
15
+ ["path", {
16
+ d: "M3 6h18",
17
+ key: "d0wm0j"
18
+ }],
19
+ ["path", {
20
+ d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
21
+ key: "e791ji"
22
+ }]
23
+ ]);
24
+ //#endregion
25
+ export { t };
@@ -0,0 +1,149 @@
1
+ import { c as e, h as t, p as n, y as r } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
2
+ import { s as i } from "./responsive-CWwNAY3j.mjs";
3
+ var a = i("camera", [["path", {
4
+ d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
5
+ key: "18u6gg"
6
+ }], ["circle", {
7
+ cx: "12",
8
+ cy: "13",
9
+ r: "3",
10
+ key: "1vg3eu"
11
+ }]]), o = i("image-off", [
12
+ ["line", {
13
+ x1: "2",
14
+ x2: "22",
15
+ y1: "2",
16
+ y2: "22",
17
+ key: "a6p6uj"
18
+ }],
19
+ ["path", {
20
+ d: "M10.41 10.41a2 2 0 1 1-2.83-2.83",
21
+ key: "1bzlo9"
22
+ }],
23
+ ["line", {
24
+ x1: "13.5",
25
+ x2: "6",
26
+ y1: "13.5",
27
+ y2: "21",
28
+ key: "1q0aeu"
29
+ }],
30
+ ["line", {
31
+ x1: "18",
32
+ x2: "21",
33
+ y1: "12",
34
+ y2: "15",
35
+ key: "5mozeu"
36
+ }],
37
+ ["path", {
38
+ d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",
39
+ key: "mmje98"
40
+ }],
41
+ ["path", {
42
+ d: "M21 15V5a2 2 0 0 0-2-2H9",
43
+ key: "43el77"
44
+ }]
45
+ ]), s = i("rotate-ccw", [["path", {
46
+ d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
47
+ key: "1357e3"
48
+ }], ["path", {
49
+ d: "M3 3v5h5",
50
+ key: "1xhq8a"
51
+ }]]), c = ["day", "ir"], l = {
52
+ day: "Daylight",
53
+ ir: "Night (IR)",
54
+ night: "Night",
55
+ dawn: "Dawn",
56
+ dusk: "Dusk"
57
+ };
58
+ function u(e) {
59
+ return l[e] ?? e;
60
+ }
61
+ function d(e) {
62
+ let t = new Set(e.coveredConditions), n = c.map((e) => `${u(e)} ${t.has(e) ? "✓" : "✗"}`), r = [...t].filter((e) => !c.some((t) => t === e));
63
+ for (let e of r) n.push(`${u(e)} ✓`);
64
+ let i = c.filter((e) => !t.has(e));
65
+ if (i.length === 0) return n.join(" · ");
66
+ if (t.size === 0) return `${n.join(" · ")} — nothing captured yet, so this scene is not watching.`;
67
+ let a = i.map((e) => u(e).toLowerCase()).join(" and ");
68
+ return e.onUncoveredCondition === "judge-anyway" ? `${n.join(" · ")} — ${a} judged against the references you do have.` : `${n.join(" · ")} — optional; checks in ${a} are skipped.`;
69
+ }
70
+ function f(e) {
71
+ if (e.suspendedCondition === null) return null;
72
+ let t = u(e.suspendedCondition).toLowerCase();
73
+ return `Paused — nothing was captured in ${t}, so checks are on hold until the light changes back. Capture ${t} if you want it watched around the clock.`;
74
+ }
75
+ var p = {
76
+ "no-reference-for-condition": "can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like.",
77
+ "view-shifted": "can’t tell — the camera view has moved since the reference was captured. Re-capture it.",
78
+ "no-vision-profile": "can’t tell — the vision model is unreachable, so the change is on hold.",
79
+ "encoder-model-changed": "can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.",
80
+ "no-snapshot": "can’t tell — this camera did not return a frame."
81
+ };
82
+ function m(e, t) {
83
+ if (e.states.length === 0) return "Not armed yet — capture the initial state to start watching.";
84
+ if (e.verdict === "unknown") return e.unavailable === null ? "can’t tell right now." : p[e.unavailable];
85
+ let n = e.verdict === "diverged" ? e.divergedAt : e.armedAt, r = n === null ? "" : ` for ${v(Math.max(0, t - n))}`;
86
+ if (e.latched) return e.verdict === "diverged" ? `CHANGED${r} — press Reset when you have dealt with it.` : `Back to normal, but still flagged as changed${r}. Press Reset to clear it.`;
87
+ let i = f(e);
88
+ return i === null ? e.verdict === "diverged" ? `CHANGED${r}` : `Normal${r}` : i;
89
+ }
90
+ function h(e) {
91
+ return e.states.length === 0 ? {
92
+ text: "Not armed",
93
+ tone: "unknown"
94
+ } : e.latched ? {
95
+ text: "Changed",
96
+ tone: "alarm"
97
+ } : e.suspendedCondition === null ? e.verdict === "unknown" ? {
98
+ text: "Can’t tell",
99
+ tone: "unknown"
100
+ } : e.verdict === "diverged" ? {
101
+ text: "Changed",
102
+ tone: "alarm"
103
+ } : {
104
+ text: "Normal",
105
+ tone: "ok"
106
+ } : {
107
+ text: "Paused",
108
+ tone: "unknown"
109
+ };
110
+ }
111
+ var g = .4;
112
+ function _(e) {
113
+ return e.width * e.height > g;
114
+ }
115
+ function v(e) {
116
+ let t = Math.floor(e / 1e3);
117
+ if (t < 60) return `${t}s`;
118
+ let n = Math.floor(t / 60);
119
+ if (n < 60) return `${n}m`;
120
+ let r = Math.floor(n / 60);
121
+ return r < 48 ? `${r}h` : `${Math.floor(r / 24)}d`;
122
+ }
123
+ //#endregion
124
+ //#region ../ui-library/src/hooks/use-device-snapshot.ts
125
+ r();
126
+ var y = "/addon/snapshot/media";
127
+ function b(r, i = {}) {
128
+ let { width: a, baseUrl: o } = i, [s, c] = t(0);
129
+ return {
130
+ src: n(() => {
131
+ if (r === null || r <= 0) return null;
132
+ let e = o === void 0 ? "" : o.replace(/\/+$/, ""), t = new URLSearchParams();
133
+ a !== void 0 && Number.isInteger(a) && a > 0 && t.set("w", String(a)), s > 0 && (t.set("force", "1"), t.set("r", String(s)));
134
+ let n = t.toString();
135
+ return `${e}${y}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
136
+ }, [
137
+ r,
138
+ a,
139
+ o,
140
+ s
141
+ ]),
142
+ loading: !1,
143
+ refresh: e(() => {
144
+ c((e) => e + 1);
145
+ }, [])
146
+ };
147
+ }
148
+ //#endregion
149
+ export { _ as a, s as c, d as i, o as l, c as n, m as o, h as r, u as s, b as t, a as u };
@@ -2753,7 +2753,7 @@ async function rr(e) {
2753
2753
  }
2754
2754
  }
2755
2755
  async function ir() {
2756
- return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BLRTZ4RM.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-U1DYRszQ.mjs")).catch((e) => {
2757
2757
  throw tr = void 0, e;
2758
2758
  }), tr;
2759
2759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-osd-manager",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Binds camera on-screen-display slots to live state and recognitions",
5
5
  "keywords": [
6
6
  "camstack",