@camstack/addon-osd-manager 0.1.108 → 0.1.109

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.
package/dist/index.js CHANGED
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
5363
5363
  var ZodFirstPartyTypeKind;
5364
5364
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5365
5365
  //#endregion
5366
- //#region ../types/dist/sleep-B1y0Fo1U.mjs
5366
+ //#region ../types/dist/sleep-vl6nBE8d.mjs
5367
5367
  /**
5368
5368
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5369
5369
  * window to float samples (D455).
@@ -36493,6 +36493,47 @@ var ptzCapability = {
36493
36493
  auth: "admin"
36494
36494
  }),
36495
36495
  /**
36496
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
36497
+ *
36498
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
36499
+ * the most natural thing an operator does: aim the camera, then say "here".
36500
+ * It is also the only shape a camera whose home is NOT a preset can accept
36501
+ * -- Reolink's home is a guard point, a stored position with no id at all,
36502
+ * and hiding the control for that case (as the UI briefly did) left the one
36503
+ * vendor with a native home unable to set it.
36504
+ *
36505
+ * Each provider does it its own way:
36506
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
36507
+ * hikvision / amcrest save a preset, then pin it as home
36508
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
36509
+ *
36510
+ * A provider that cannot honour it throws rather than silently doing
36511
+ * nothing: an operator who pressed "set home here" and saw no error would
36512
+ * believe it took.
36513
+ */
36514
+ captureHomeHere: method(object({ deviceId: number() }), _void(), {
36515
+ kind: "mutation",
36516
+ auth: "admin"
36517
+ }),
36518
+ /**
36519
+ * How long the camera waits, idle, before returning home on its own --
36520
+ * `null` when it has no such behaviour.
36521
+ *
36522
+ * Reolink's guard point carries one (`timeout`, freely settable in
36523
+ * seconds). It is a real function of the camera that we did not expose at
36524
+ * all, and it belongs next to the home it governs rather than in a vendor
36525
+ * settings page nobody associates with Home.
36526
+ */
36527
+ getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
36528
+ /** Set the idle-return delay. Refused by a camera that has no such timer. */
36529
+ setHomeReturnSeconds: method(object({
36530
+ deviceId: number(),
36531
+ seconds: number().int().min(0).max(3600)
36532
+ }), _void(), {
36533
+ kind: "mutation",
36534
+ auth: "admin"
36535
+ }),
36536
+ /**
36496
36537
  * Pull the current PTZ position. Redundant with the auto-injected
36497
36538
  * `getStatus` method (see `status` below); kept for callers that
36498
36539
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -44896,6 +44937,12 @@ Object.freeze({
44896
44937
  addonId: null,
44897
44938
  access: "create"
44898
44939
  },
44940
+ "ptz.captureHomeHere": {
44941
+ capName: "ptz",
44942
+ capScope: "device",
44943
+ addonId: null,
44944
+ access: "create"
44945
+ },
44899
44946
  "ptz.continuousMove": {
44900
44947
  capName: "ptz",
44901
44948
  capScope: "device",
@@ -44914,6 +44961,12 @@ Object.freeze({
44914
44961
  addonId: null,
44915
44962
  access: "view"
44916
44963
  },
44964
+ "ptz.getHomeReturnSeconds": {
44965
+ capName: "ptz",
44966
+ capScope: "device",
44967
+ addonId: null,
44968
+ access: "view"
44969
+ },
44917
44970
  "ptz.getOptions": {
44918
44971
  capName: "ptz",
44919
44972
  capScope: "device",
@@ -44968,6 +45021,12 @@ Object.freeze({
44968
45021
  addonId: null,
44969
45022
  access: "create"
44970
45023
  },
45024
+ "ptz.setHomeReturnSeconds": {
45025
+ capName: "ptz",
45026
+ capScope: "device",
45027
+ addonId: null,
45028
+ access: "create"
45029
+ },
44971
45030
  "ptz.stop": {
44972
45031
  capName: "ptz",
44973
45032
  capScope: "device",
@@ -48131,6 +48190,11 @@ Object.freeze({
48131
48190
  form: "single",
48132
48191
  optional: false
48133
48192
  }],
48193
+ "ptz.captureHomeHere": [{
48194
+ name: "deviceId",
48195
+ form: "single",
48196
+ optional: false
48197
+ }],
48134
48198
  "ptz.continuousMove": [{
48135
48199
  name: "deviceId",
48136
48200
  form: "single",
@@ -48146,6 +48210,11 @@ Object.freeze({
48146
48210
  form: "single",
48147
48211
  optional: false
48148
48212
  }],
48213
+ "ptz.getHomeReturnSeconds": [{
48214
+ name: "deviceId",
48215
+ form: "single",
48216
+ optional: false
48217
+ }],
48149
48218
  "ptz.getOptions": [{
48150
48219
  name: "deviceId",
48151
48220
  form: "single",
@@ -48191,6 +48260,11 @@ Object.freeze({
48191
48260
  form: "single",
48192
48261
  optional: false
48193
48262
  }],
48263
+ "ptz.setHomeReturnSeconds": [{
48264
+ name: "deviceId",
48265
+ form: "single",
48266
+ optional: false
48267
+ }],
48194
48268
  "ptz.stop": [{
48195
48269
  name: "deviceId",
48196
48270
  form: "single",
package/dist/index.mjs CHANGED
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-B1y0Fo1U.mjs
5362
+ //#region ../types/dist/sleep-vl6nBE8d.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -36489,6 +36489,47 @@ var ptzCapability = {
36489
36489
  auth: "admin"
36490
36490
  }),
36491
36491
  /**
36492
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
36493
+ *
36494
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
36495
+ * the most natural thing an operator does: aim the camera, then say "here".
36496
+ * It is also the only shape a camera whose home is NOT a preset can accept
36497
+ * -- Reolink's home is a guard point, a stored position with no id at all,
36498
+ * and hiding the control for that case (as the UI briefly did) left the one
36499
+ * vendor with a native home unable to set it.
36500
+ *
36501
+ * Each provider does it its own way:
36502
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
36503
+ * hikvision / amcrest save a preset, then pin it as home
36504
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
36505
+ *
36506
+ * A provider that cannot honour it throws rather than silently doing
36507
+ * nothing: an operator who pressed "set home here" and saw no error would
36508
+ * believe it took.
36509
+ */
36510
+ captureHomeHere: method(object({ deviceId: number() }), _void(), {
36511
+ kind: "mutation",
36512
+ auth: "admin"
36513
+ }),
36514
+ /**
36515
+ * How long the camera waits, idle, before returning home on its own --
36516
+ * `null` when it has no such behaviour.
36517
+ *
36518
+ * Reolink's guard point carries one (`timeout`, freely settable in
36519
+ * seconds). It is a real function of the camera that we did not expose at
36520
+ * all, and it belongs next to the home it governs rather than in a vendor
36521
+ * settings page nobody associates with Home.
36522
+ */
36523
+ getHomeReturnSeconds: method(object({ deviceId: number() }), number().int().nullable()),
36524
+ /** Set the idle-return delay. Refused by a camera that has no such timer. */
36525
+ setHomeReturnSeconds: method(object({
36526
+ deviceId: number(),
36527
+ seconds: number().int().min(0).max(3600)
36528
+ }), _void(), {
36529
+ kind: "mutation",
36530
+ auth: "admin"
36531
+ }),
36532
+ /**
36492
36533
  * Pull the current PTZ position. Redundant with the auto-injected
36493
36534
  * `getStatus` method (see `status` below); kept for callers that
36494
36535
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -44892,6 +44933,12 @@ Object.freeze({
44892
44933
  addonId: null,
44893
44934
  access: "create"
44894
44935
  },
44936
+ "ptz.captureHomeHere": {
44937
+ capName: "ptz",
44938
+ capScope: "device",
44939
+ addonId: null,
44940
+ access: "create"
44941
+ },
44895
44942
  "ptz.continuousMove": {
44896
44943
  capName: "ptz",
44897
44944
  capScope: "device",
@@ -44910,6 +44957,12 @@ Object.freeze({
44910
44957
  addonId: null,
44911
44958
  access: "view"
44912
44959
  },
44960
+ "ptz.getHomeReturnSeconds": {
44961
+ capName: "ptz",
44962
+ capScope: "device",
44963
+ addonId: null,
44964
+ access: "view"
44965
+ },
44913
44966
  "ptz.getOptions": {
44914
44967
  capName: "ptz",
44915
44968
  capScope: "device",
@@ -44964,6 +45017,12 @@ Object.freeze({
44964
45017
  addonId: null,
44965
45018
  access: "create"
44966
45019
  },
45020
+ "ptz.setHomeReturnSeconds": {
45021
+ capName: "ptz",
45022
+ capScope: "device",
45023
+ addonId: null,
45024
+ access: "create"
45025
+ },
44967
45026
  "ptz.stop": {
44968
45027
  capName: "ptz",
44969
45028
  capScope: "device",
@@ -48127,6 +48186,11 @@ Object.freeze({
48127
48186
  form: "single",
48128
48187
  optional: false
48129
48188
  }],
48189
+ "ptz.captureHomeHere": [{
48190
+ name: "deviceId",
48191
+ form: "single",
48192
+ optional: false
48193
+ }],
48130
48194
  "ptz.continuousMove": [{
48131
48195
  name: "deviceId",
48132
48196
  form: "single",
@@ -48142,6 +48206,11 @@ Object.freeze({
48142
48206
  form: "single",
48143
48207
  optional: false
48144
48208
  }],
48209
+ "ptz.getHomeReturnSeconds": [{
48210
+ name: "deviceId",
48211
+ form: "single",
48212
+ optional: false
48213
+ }],
48145
48214
  "ptz.getOptions": [{
48146
48215
  name: "deviceId",
48147
48216
  form: "single",
@@ -48187,6 +48256,11 @@ Object.freeze({
48187
48256
  form: "single",
48188
48257
  optional: false
48189
48258
  }],
48259
+ "ptz.setHomeReturnSeconds": [{
48260
+ name: "deviceId",
48261
+ form: "single",
48262
+ optional: false
48263
+ }],
48190
48264
  "ptz.stop": [{
48191
48265
  name: "deviceId",
48192
48266
  form: "single",
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-BJr1VAOO.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-YMUMbi0J.mjs";
2
2
  export { t as get, e as init };
@@ -86,47 +86,71 @@ function g(e) {
86
86
  return t !== "/" && (e === m() || e.startsWith(t)) ? e : `${t}${n}`;
87
87
  }
88
88
  //#endregion
89
+ //#region ../ui-library/src/hooks/use-device-snapshot.ts
90
+ var _ = "/addon/snapshot/media";
91
+ function v(r, i = {}) {
92
+ let { width: a, baseUrl: o } = i, [s, c] = t(0);
93
+ return {
94
+ src: n(() => {
95
+ if (r === null || r <= 0) return null;
96
+ let e = o === void 0 ? m() : o.replace(/\/+$/, ""), t = new URLSearchParams();
97
+ a !== void 0 && Number.isInteger(a) && a > 0 && t.set("w", String(a)), s > 0 && (t.set("force", "1"), t.set("r", String(s)));
98
+ let n = t.toString();
99
+ return `${e}${_}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
100
+ }, [
101
+ r,
102
+ a,
103
+ o,
104
+ s
105
+ ]),
106
+ loading: !1,
107
+ refresh: e(() => {
108
+ c((e) => e + 1);
109
+ }, [])
110
+ };
111
+ }
112
+ //#endregion
89
113
  //#region ../ui-library/src/composites/cap-settings/scene-monitor-copy.ts
90
- var _ = ["day", "ir"], v = {
114
+ var y = ["day", "ir"], b = {
91
115
  day: "Daylight",
92
116
  ir: "Night (IR)",
93
117
  night: "Night",
94
118
  dawn: "Dawn",
95
119
  dusk: "Dusk"
96
120
  };
97
- function y(e) {
98
- return v[e] ?? e;
121
+ function x(e) {
122
+ return b[e] ?? e;
99
123
  }
100
- function b(e) {
101
- let t = new Set(e.coveredConditions), n = _.map((e) => `${y(e)} ${t.has(e) ? "✓" : "✗"}`), r = [...t].filter((e) => !_.some((t) => t === e));
102
- for (let e of r) n.push(`${y(e)} ✓`);
103
- let i = _.filter((e) => !t.has(e));
124
+ function S(e) {
125
+ let t = new Set(e.coveredConditions), n = y.map((e) => `${x(e)} ${t.has(e) ? "✓" : "✗"}`), r = [...t].filter((e) => !y.some((t) => t === e));
126
+ for (let e of r) n.push(`${x(e)} ✓`);
127
+ let i = y.filter((e) => !t.has(e));
104
128
  if (i.length === 0) return n.join(" · ");
105
129
  if (t.size === 0) return `${n.join(" · ")} — nothing captured yet, so this scene is not watching.`;
106
- let a = i.map((e) => y(e).toLowerCase()).join(" and ");
130
+ let a = i.map((e) => x(e).toLowerCase()).join(" and ");
107
131
  return e.onUncoveredCondition === "judge-anyway" ? `${n.join(" · ")} — ${a} judged against the references you do have.` : `${n.join(" · ")} — optional; checks in ${a} are skipped.`;
108
132
  }
109
- function x(e) {
133
+ function C(e) {
110
134
  if (e.suspendedCondition === null) return null;
111
- let t = y(e.suspendedCondition).toLowerCase();
135
+ let t = x(e.suspendedCondition).toLowerCase();
112
136
  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.`;
113
137
  }
114
- var S = {
138
+ var w = {
115
139
  "no-reference-for-condition": "can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like.",
116
140
  "view-shifted": "can’t tell — the camera view has moved since the reference was captured. Re-capture it.",
117
141
  "no-vision-profile": "can’t tell — the vision model is unreachable, so the change is on hold.",
118
142
  "encoder-model-changed": "can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.",
119
143
  "no-snapshot": "can’t tell — this camera did not return a frame."
120
144
  };
121
- function C(e, t) {
145
+ function T(e, t) {
122
146
  if (e.states.length === 0) return "Not armed yet — capture the initial state to start watching.";
123
- if (e.verdict === "unknown") return e.unavailable === null ? "can’t tell right now." : S[e.unavailable];
124
- let n = e.verdict === "diverged" ? e.divergedAt : e.armedAt, r = n === null ? "" : ` for ${D(Math.max(0, t - n))}`;
147
+ if (e.verdict === "unknown") return e.unavailable === null ? "can’t tell right now." : w[e.unavailable];
148
+ let n = e.verdict === "diverged" ? e.divergedAt : e.armedAt, r = n === null ? "" : ` for ${k(Math.max(0, t - n))}`;
125
149
  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.`;
126
- let i = x(e);
150
+ let i = C(e);
127
151
  return i === null ? e.verdict === "diverged" ? `CHANGED${r}` : `Normal${r}` : i;
128
152
  }
129
- function w(e) {
153
+ function E(e) {
130
154
  return e.states.length === 0 ? {
131
155
  text: "Not armed",
132
156
  tone: "unknown"
@@ -147,11 +171,11 @@ function w(e) {
147
171
  tone: "unknown"
148
172
  };
149
173
  }
150
- var T = .4;
151
- function E(e) {
152
- return e.width * e.height > T;
174
+ var D = .4;
175
+ function O(e) {
176
+ return e.width * e.height > D;
153
177
  }
154
- function D(e) {
178
+ function k(e) {
155
179
  let t = Math.floor(e / 1e3);
156
180
  if (t < 60) return `${t}s`;
157
181
  let n = Math.floor(t / 60);
@@ -160,28 +184,4 @@ function D(e) {
160
184
  return r < 48 ? `${r}h` : `${Math.floor(r / 24)}d`;
161
185
  }
162
186
  //#endregion
163
- //#region ../ui-library/src/hooks/use-device-snapshot.ts
164
- var O = "/addon/snapshot/media";
165
- function k(r, i = {}) {
166
- let { width: a, baseUrl: o } = i, [s, c] = t(0);
167
- return {
168
- src: n(() => {
169
- if (r === null || r <= 0) return null;
170
- let e = o === void 0 ? m() : o.replace(/\/+$/, ""), t = new URLSearchParams();
171
- a !== void 0 && Number.isInteger(a) && a > 0 && t.set("w", String(a)), s > 0 && (t.set("force", "1"), t.set("r", String(s)));
172
- let n = t.toString();
173
- return `${e}${O}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
174
- }, [
175
- r,
176
- a,
177
- o,
178
- s
179
- ]),
180
- loading: !1,
181
- refresh: e(() => {
182
- c((e) => e + 1);
183
- }, [])
184
- };
185
- }
186
- //#endregion
187
- export { E as a, g as c, a as d, b as i, s as l, _ as n, C as o, w as r, y as s, k as t, o as u };
187
+ export { T as a, g as c, a as d, O as i, s as l, E as n, x as o, S as r, v as s, y as t, o 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-Gm3yQ5Si.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-G_SxKlXu.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.108",
3
+ "version": "0.1.109",
4
4
  "description": "Binds camera on-screen-display slots to live state and recognitions",
5
5
  "keywords": [
6
6
  "camstack",