@camstack/addon-model-studio 1.1.97 → 1.1.99

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 (17) hide show
  1. package/dist/{MotionZonesSettings-DRNY3gjc.mjs → MotionZonesSettings-CHzP_EGm.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CZShuio4.mjs → PrivacyMaskSettings-KGEi9qw4.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-ChvcbpBu.mjs → SceneMonitorEditor-1D_WMpil.mjs} +254 -254
  4. package/dist/_stub.js +13 -13
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DsNDW2tP.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-D1bwVnRb.mjs} +4 -4
  6. package/dist/{_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-odws4W0h.mjs → _virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-b9-x2ism.mjs} +1 -1
  7. package/dist/{hostInit-Ic0uBpQ0.mjs → hostInit-47LnXjBD.mjs} +3 -3
  8. package/dist/model-studio.addon.js +87 -1
  9. package/dist/model-studio.addon.mjs +87 -1
  10. package/dist/{player-overlays-CxfLzphX.mjs → player-overlays-BOr8w0Xj.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-ykWObjYe.mjs → responsive-BCVxTUk-.mjs} +1 -1
  13. package/dist/{square-DRd2mk8z.mjs → square-ChTTgayi.mjs} +1 -1
  14. package/dist/{trash-2-B1e_7Yr-.mjs → trash-2-pFW9l6Ol.mjs} +1 -1
  15. package/dist/{use-device-snapshot-Dx2mS9rn.mjs → use-device-snapshot-COmvii-x.mjs} +65 -27
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-VnmpuDSf.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DCHPjFJ6.mjs} +1 -1
  17. package/package.json +1 -1
@@ -6948,6 +6948,21 @@ var CameraStreamSchema = object({
6948
6948
  */
6949
6949
  autoEligible: boolean().optional(),
6950
6950
  /**
6951
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6952
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6953
+ * stream. Consulted by the broker's automatic ranking
6954
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6955
+ * an operator's manual assignment still wins, and an absent hint is the
6956
+ * pixel-ranked default every camera had before this field existed.
6957
+ *
6958
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6959
+ * storage class is written for on its own (`recordings` is high|mid,
6960
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6961
+ * camera's single 720p relay is a `low` in every respect except the slot the
6962
+ * heuristic put it in.
6963
+ */
6964
+ profileHint: CamProfileSchema.optional(),
6965
+ /**
6951
6966
  * Transport-specific opaque metadata. The broker passes it through to
6952
6967
  * the source reader without inspecting it. Currently used by
6953
6968
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8440,7 +8455,22 @@ var RecordingTriggersSchema = object({
8440
8455
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8441
8456
  * registrare.
8442
8457
  */
8443
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8458
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8459
+ /**
8460
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
8461
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8462
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8463
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8464
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
8465
+ *
8466
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8467
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8468
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8469
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
8470
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8471
+ * (`holdTrigger` / `releaseTrigger`).
8472
+ */
8473
+ deviceSignal: boolean().optional()
8444
8474
  });
8445
8475
  /**
8446
8476
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11922,6 +11952,8 @@ method(object({
11922
11952
  label: string().optional(),
11923
11953
  deviceFeatures: array(string()).optional(),
11924
11954
  autoEligible: boolean().optional(),
11955
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11956
+ profileHint: CamProfileSchema.optional(),
11925
11957
  metadata: record(string(), unknown()).optional(),
11926
11958
  /** Required when kind === 'derived' — the source camStreamId the
11927
11959
  * derived broker reads its encoded plane from.
@@ -28275,6 +28307,47 @@ method(object({
28275
28307
  auth: "protected"
28276
28308
  });
28277
28309
  /**
28310
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
28311
+ * something it knows about is happening (a robot vacuum cleaning, a machine
28312
+ * running, a gate open) and lowers when it stops.
28313
+ *
28314
+ * It is a level, not an edge. The sensor triggers the recorder already listens
28315
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
28316
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
28317
+ * still happening" cannot be expressed as an edge plus a post-buffer without
28318
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
28319
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
28320
+ * which records the dock for that long after every short one. So the recorder
28321
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
28322
+ * own post-buffer once it falls.
28323
+ *
28324
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
28325
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
28326
+ * writes this slice on every change; consumers subscribe to the kernel's
28327
+ * `DeviceStateChanged` for it and read it back through
28328
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
28329
+ * against the device (D224, D8/D11).
28330
+ *
28331
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
28332
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
28333
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
28334
+ * about the camera, on the camera.
28335
+ */
28336
+ var RecordingSignalStatusSchema = object({
28337
+ /** True while the device asks to be recorded. */
28338
+ active: boolean(),
28339
+ /**
28340
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
28341
+ * …). Free text for the log line and the UI badge; the recorder never
28342
+ * branches on it.
28343
+ */
28344
+ reason: string(),
28345
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
28346
+ lastChangedAt: number()
28347
+ });
28348
+ RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
28349
+ DeviceType.Camera, method(object({ deviceId: number() }), RecordingSignalStatusSchema);
28350
+ /**
28278
28351
  * scene-monitor — device-scoped reference-region state cap. An operator marks
28279
28352
  * a rect ROI on a camera frame and names one or more states; the engine
28280
28353
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -28647,6 +28720,8 @@ var CamStreamDescriptorSchema = object({
28647
28720
  deviceFeatures: array(string()).optional(),
28648
28721
  /** Eligible for automatic profile assignment. Absent = `true`. */
28649
28722
  autoEligible: boolean().optional(),
28723
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
28724
+ profileHint: CamProfileSchema.optional(),
28650
28725
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
28651
28726
  metadata: record(string(), unknown()).optional()
28652
28727
  });
@@ -34592,6 +34667,12 @@ Object.freeze({
34592
34667
  addonId: null,
34593
34668
  access: "view"
34594
34669
  },
34670
+ "recordingSignal.getStatus": {
34671
+ capName: "recording-signal",
34672
+ capScope: "device",
34673
+ addonId: null,
34674
+ access: "view"
34675
+ },
34595
34676
  "sceneMonitor.captureReference": {
34596
34677
  capName: "scene-monitor",
34597
34678
  capScope: "device",
@@ -37584,6 +37665,11 @@ Object.freeze({
37584
37665
  form: "single",
37585
37666
  optional: true
37586
37667
  }],
37668
+ "recordingSignal.getStatus": [{
37669
+ name: "deviceId",
37670
+ form: "single",
37671
+ optional: false
37672
+ }],
37587
37673
  "sceneMonitor.captureReference": [{
37588
37674
  name: "deviceId",
37589
37675
  form: "single",
@@ -1,5 +1,5 @@
1
1
  import { h as e, l as t, u as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { o as i, s as a } from "./responsive-ykWObjYe.mjs";
2
+ import { o as i, s as a } from "./responsive-BCVxTUk-.mjs";
3
3
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
4
4
  var l = a("chevron-down", [["path", {
5
5
  d: "m6 9 6 6 6-6",
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-VnmpuDSf.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DCHPjFJ6.mjs";
2
2
  export { t as get, e as init };
@@ -1,6 +1,6 @@
1
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_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
2
  import "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
- import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-odws4W0h.mjs";
3
+ import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-b9-x2ism.mjs";
4
4
  //#region ../ui-library/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
5
5
  l();
6
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) => {
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-ykWObjYe.mjs";
1
+ import { s as e } from "./responsive-BCVxTUk-.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",
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-ykWObjYe.mjs";
1
+ import { s as e } from "./responsive-BCVxTUk-.mjs";
2
2
  var t = e("trash-2", [
3
3
  ["path", {
4
4
  d: "M10 11v6",
@@ -1,5 +1,5 @@
1
1
  import { c as e, h as t, p as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { s as i } from "./responsive-ykWObjYe.mjs";
2
+ import { s as i } from "./responsive-BCVxTUk-.mjs";
3
3
  var a = i("camera", [["path", {
4
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
5
  key: "18u6gg"
@@ -48,46 +48,85 @@ var a = i("camera", [["path", {
48
48
  }], ["path", {
49
49
  d: "M3 3v5h5",
50
50
  key: "1xhq8a"
51
- }]]), c = ["day", "ir"], l = {
51
+ }]]);
52
+ //#endregion
53
+ //#region ../ui-library/src/lib/hub-mount.ts
54
+ r();
55
+ var c = "camstack-mount", l = /^\/(?:[A-Za-z0-9_\-.]+\/)*$/, u = null;
56
+ function d(e) {
57
+ if (e == null || e === "") return null;
58
+ let t = e.endsWith("/") ? e : `${e}/`;
59
+ return !l.test(t) || t.includes("/../") || t.includes("/./") ? null : t;
60
+ }
61
+ function f() {
62
+ if (typeof document > "u") return "/";
63
+ let e = d(document.querySelector(`meta[name="${c}"]`)?.getAttribute("content"));
64
+ if (e !== null) return e;
65
+ if (document.querySelector("base[href]") !== null) try {
66
+ let e = new URL(document.baseURI);
67
+ if (e.origin === window.location.origin) {
68
+ let t = d(e.pathname);
69
+ if (t !== null) return t;
70
+ }
71
+ } catch {}
72
+ return "/";
73
+ }
74
+ function p() {
75
+ return u === null && (u = f()), u;
76
+ }
77
+ function m() {
78
+ return p().replace(/\/$/, "");
79
+ }
80
+ function h(e) {
81
+ return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//");
82
+ }
83
+ function g(e) {
84
+ if (h(e)) return e;
85
+ let t = p(), n = e.replace(/^\/+/, "");
86
+ return t !== "/" && (e === m() || e.startsWith(t)) ? e : `${t}${n}`;
87
+ }
88
+ //#endregion
89
+ //#region ../ui-library/src/composites/cap-settings/scene-monitor-copy.ts
90
+ var _ = ["day", "ir"], v = {
52
91
  day: "Daylight",
53
92
  ir: "Night (IR)",
54
93
  night: "Night",
55
94
  dawn: "Dawn",
56
95
  dusk: "Dusk"
57
96
  };
58
- function u(e) {
59
- return l[e] ?? e;
97
+ function y(e) {
98
+ return v[e] ?? e;
60
99
  }
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));
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));
65
104
  if (i.length === 0) return n.join(" · ");
66
105
  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 ");
106
+ let a = i.map((e) => y(e).toLowerCase()).join(" and ");
68
107
  return e.onUncoveredCondition === "judge-anyway" ? `${n.join(" · ")} — ${a} judged against the references you do have.` : `${n.join(" · ")} — optional; checks in ${a} are skipped.`;
69
108
  }
70
- function f(e) {
109
+ function x(e) {
71
110
  if (e.suspendedCondition === null) return null;
72
- let t = u(e.suspendedCondition).toLowerCase();
111
+ let t = y(e.suspendedCondition).toLowerCase();
73
112
  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
113
  }
75
- var p = {
114
+ var S = {
76
115
  "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
116
  "view-shifted": "can’t tell — the camera view has moved since the reference was captured. Re-capture it.",
78
117
  "no-vision-profile": "can’t tell — the vision model is unreachable, so the change is on hold.",
79
118
  "encoder-model-changed": "can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.",
80
119
  "no-snapshot": "can’t tell — this camera did not return a frame."
81
120
  };
82
- function m(e, t) {
121
+ function C(e, t) {
83
122
  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))}`;
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))}`;
86
125
  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);
126
+ let i = x(e);
88
127
  return i === null ? e.verdict === "diverged" ? `CHANGED${r}` : `Normal${r}` : i;
89
128
  }
90
- function h(e) {
129
+ function w(e) {
91
130
  return e.states.length === 0 ? {
92
131
  text: "Not armed",
93
132
  tone: "unknown"
@@ -108,11 +147,11 @@ function h(e) {
108
147
  tone: "unknown"
109
148
  };
110
149
  }
111
- var g = .4;
112
- function _(e) {
113
- return e.width * e.height > g;
150
+ var T = .4;
151
+ function E(e) {
152
+ return e.width * e.height > T;
114
153
  }
115
- function v(e) {
154
+ function D(e) {
116
155
  let t = Math.floor(e / 1e3);
117
156
  if (t < 60) return `${t}s`;
118
157
  let n = Math.floor(t / 60);
@@ -122,17 +161,16 @@ function v(e) {
122
161
  }
123
162
  //#endregion
124
163
  //#region ../ui-library/src/hooks/use-device-snapshot.ts
125
- r();
126
- var y = "/addon/snapshot/media";
127
- function b(r, i = {}) {
164
+ var O = "/addon/snapshot/media";
165
+ function k(r, i = {}) {
128
166
  let { width: a, baseUrl: o } = i, [s, c] = t(0);
129
167
  return {
130
168
  src: n(() => {
131
169
  if (r === null || r <= 0) return null;
132
- let e = o === void 0 ? "" : o.replace(/\/+$/, ""), t = new URLSearchParams();
170
+ let e = o === void 0 ? m() : o.replace(/\/+$/, ""), t = new URLSearchParams();
133
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)));
134
172
  let n = t.toString();
135
- return `${e}${y}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
173
+ return `${e}${O}/${String(r)}.jpg${n.length > 0 ? `?${n}` : ""}`;
136
174
  }, [
137
175
  r,
138
176
  a,
@@ -146,4 +184,4 @@ function b(r, i = {}) {
146
184
  };
147
185
  }
148
186
  //#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 };
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 };
@@ -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_model_studio_page-DsNDW2tP.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-D1bwVnRb.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-model-studio",
3
- "version": "1.1.97",
3
+ "version": "1.1.99",
4
4
  "description": "Custom detection model registry, conversion & distribution for CamStack",
5
5
  "keywords": [
6
6
  "camstack",