@camstack/addon-osd-manager 0.1.211 → 0.1.212

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.
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.342",
39
+ version: "1.2.343",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.270",
84
+ version: "1.2.271",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
package/dist/index.js CHANGED
@@ -5380,7 +5380,7 @@ var ZodIssueCode = {
5380
5380
  var ZodFirstPartyTypeKind;
5381
5381
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5382
5382
  //#endregion
5383
- //#region ../types/dist/sleep-CI0n5D44.mjs
5383
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5384
5384
  /**
5385
5385
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5386
5386
  * window to float samples (D455).
@@ -43605,6 +43605,19 @@ var osdManagerCapability = {
43605
43605
  auth: "admin"
43606
43606
  }),
43607
43607
  /**
43608
+ * Toggle the camera firmware overlay on/off (`osd.setOverlay` `enabled`).
43609
+ * Distinct from the binding's own `enabled` flag — this is what the
43610
+ * operator sees on the live picture (e.g. Reolink camera name layer).
43611
+ */
43612
+ setSlotCameraEnabled: method(object({
43613
+ deviceId: number().int(),
43614
+ slotId: string().min(1),
43615
+ enabled: boolean()
43616
+ }), object({ success: literal(true) }), {
43617
+ kind: "mutation",
43618
+ auth: "admin"
43619
+ }),
43620
+ /**
43608
43621
  * Replace one camera's binding configuration from another. Writable source
43609
43622
  * slots are mapped by ordinal onto writable target slots so different
43610
43623
  * provider slot ids do not make the copied configuration disappear.
@@ -54433,6 +54446,12 @@ Object.freeze({
54433
54446
  addonId: null,
54434
54447
  access: "create"
54435
54448
  },
54449
+ "osdManager.setSlotCameraEnabled": {
54450
+ capName: "osd-manager",
54451
+ capScope: "system",
54452
+ addonId: null,
54453
+ access: "create"
54454
+ },
54436
54455
  "osdManager.upsertTemplate": {
54437
54456
  capName: "osd-manager",
54438
54457
  capScope: "system",
@@ -60927,6 +60946,11 @@ Object.freeze({
60927
60946
  form: "single",
60928
60947
  optional: false
60929
60948
  }],
60949
+ "osdManager.setSlotCameraEnabled": [{
60950
+ name: "deviceId",
60951
+ form: "single",
60952
+ optional: false
60953
+ }],
60930
60954
  "petFeeder.callPet": [{
60931
60955
  name: "deviceId",
60932
60956
  form: "single",
@@ -64501,6 +64525,18 @@ var OsdManager = class {
64501
64525
  });
64502
64526
  return { success: true };
64503
64527
  };
64528
+ setSlotCameraEnabled = async ({ deviceId, slotId, enabled }) => {
64529
+ await this.assertSlotExists(deviceId, slotId);
64530
+ await this.deps.writeOverlay(deviceId, slotId, { enabled });
64531
+ this.logger.info("osd-manager: camera overlay visibility set", {
64532
+ tags: { deviceId },
64533
+ meta: {
64534
+ slotId,
64535
+ enabled
64536
+ }
64537
+ });
64538
+ return { success: true };
64539
+ };
64504
64540
  copyDeviceConfiguration = async ({ sourceDeviceId, targetDeviceId }) => {
64505
64541
  if (sourceDeviceId === targetDeviceId) throw new Error("osd-manager: source and target camera must be different");
64506
64542
  const [sourceStatus, targetStatus, sourceBindings] = await Promise.all([
@@ -64610,10 +64646,7 @@ var OsdManager = class {
64610
64646
  if (result.outcome === "unchanged") continue;
64611
64647
  if (result.outcome === "unbound" || result.outcome === "disabled") continue;
64612
64648
  try {
64613
- await this.deps.writeOverlay(deviceId, slotId, {
64614
- enabled: result.text !== "",
64615
- ...result.text !== "" ? { text: result.text } : {}
64616
- });
64649
+ await this.deps.writeOverlay(deviceId, slotId, { text: result.text });
64617
64650
  this.lastWritten.set(key, result.text);
64618
64651
  this.logger.debug("osd-manager: slot written", {
64619
64652
  tags: { deviceId },
package/dist/index.mjs CHANGED
@@ -5376,7 +5376,7 @@ var ZodIssueCode = {
5376
5376
  var ZodFirstPartyTypeKind;
5377
5377
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5378
5378
  //#endregion
5379
- //#region ../types/dist/sleep-CI0n5D44.mjs
5379
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5380
5380
  /**
5381
5381
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5382
5382
  * window to float samples (D455).
@@ -43601,6 +43601,19 @@ var osdManagerCapability = {
43601
43601
  auth: "admin"
43602
43602
  }),
43603
43603
  /**
43604
+ * Toggle the camera firmware overlay on/off (`osd.setOverlay` `enabled`).
43605
+ * Distinct from the binding's own `enabled` flag — this is what the
43606
+ * operator sees on the live picture (e.g. Reolink camera name layer).
43607
+ */
43608
+ setSlotCameraEnabled: method(object({
43609
+ deviceId: number().int(),
43610
+ slotId: string().min(1),
43611
+ enabled: boolean()
43612
+ }), object({ success: literal(true) }), {
43613
+ kind: "mutation",
43614
+ auth: "admin"
43615
+ }),
43616
+ /**
43604
43617
  * Replace one camera's binding configuration from another. Writable source
43605
43618
  * slots are mapped by ordinal onto writable target slots so different
43606
43619
  * provider slot ids do not make the copied configuration disappear.
@@ -54429,6 +54442,12 @@ Object.freeze({
54429
54442
  addonId: null,
54430
54443
  access: "create"
54431
54444
  },
54445
+ "osdManager.setSlotCameraEnabled": {
54446
+ capName: "osd-manager",
54447
+ capScope: "system",
54448
+ addonId: null,
54449
+ access: "create"
54450
+ },
54432
54451
  "osdManager.upsertTemplate": {
54433
54452
  capName: "osd-manager",
54434
54453
  capScope: "system",
@@ -60923,6 +60942,11 @@ Object.freeze({
60923
60942
  form: "single",
60924
60943
  optional: false
60925
60944
  }],
60945
+ "osdManager.setSlotCameraEnabled": [{
60946
+ name: "deviceId",
60947
+ form: "single",
60948
+ optional: false
60949
+ }],
60926
60950
  "petFeeder.callPet": [{
60927
60951
  name: "deviceId",
60928
60952
  form: "single",
@@ -64497,6 +64521,18 @@ var OsdManager = class {
64497
64521
  });
64498
64522
  return { success: true };
64499
64523
  };
64524
+ setSlotCameraEnabled = async ({ deviceId, slotId, enabled }) => {
64525
+ await this.assertSlotExists(deviceId, slotId);
64526
+ await this.deps.writeOverlay(deviceId, slotId, { enabled });
64527
+ this.logger.info("osd-manager: camera overlay visibility set", {
64528
+ tags: { deviceId },
64529
+ meta: {
64530
+ slotId,
64531
+ enabled
64532
+ }
64533
+ });
64534
+ return { success: true };
64535
+ };
64500
64536
  copyDeviceConfiguration = async ({ sourceDeviceId, targetDeviceId }) => {
64501
64537
  if (sourceDeviceId === targetDeviceId) throw new Error("osd-manager: source and target camera must be different");
64502
64538
  const [sourceStatus, targetStatus, sourceBindings] = await Promise.all([
@@ -64606,10 +64642,7 @@ var OsdManager = class {
64606
64642
  if (result.outcome === "unchanged") continue;
64607
64643
  if (result.outcome === "unbound" || result.outcome === "disabled") continue;
64608
64644
  try {
64609
- await this.deps.writeOverlay(deviceId, slotId, {
64610
- enabled: result.text !== "",
64611
- ...result.text !== "" ? { text: result.text } : {}
64612
- });
64645
+ await this.deps.writeOverlay(deviceId, slotId, { text: result.text });
64613
64646
  this.lastWritten.set(key, result.text);
64614
64647
  this.logger.debug("osd-manager: slot written", {
64615
64648
  tags: { deviceId },
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-b9HMs56i.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-D1tZ89QQ.mjs";
2
2
  export { t as get, e as init };
@@ -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-rsVsD7rs.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-C7sJj9sD.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.211",
3
+ "version": "0.1.212",
4
4
  "description": "Binds camera on-screen-display slots to live state and recognitions",
5
5
  "keywords": [
6
6
  "camstack",