@camstack/ui-library 1.2.231 → 1.2.233

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.
@@ -87,6 +87,13 @@ export type CellState = {
87
87
  * coincidence rather than as the same single row.
88
88
  */
89
89
  readonly clusterWide?: boolean;
90
+ /**
91
+ * The root model that already fills this step here (D715) — the step is
92
+ * skipped for every subject the detector names for it. Renders a
93
+ * "filled by <model>" chip: an enabled cell that will mostly NOT run must
94
+ * say so, or the operator reads its model as the one answering.
95
+ */
96
+ readonly filledBy?: string;
90
97
  } | {
91
98
  readonly kind: 'disabled';
92
99
  readonly overridden?: boolean;
package/dist/index.cjs CHANGED
@@ -36870,6 +36870,22 @@ var LIVE_NOISE_SET = new Set(LIVE_NOISE_CATEGORIES);
36870
36870
  /** Categories visible in the events tab by default. The "All" badge
36871
36871
  * reflects this set, not the raw enum. */
36872
36872
  var DEFAULT_EVENT_CATEGORIES = Object.freeze(ALL_EVENT_CATEGORIES.filter((c) => !LIVE_NOISE_SET.has(c)));
36873
+ /**
36874
+ * "Detection session started by …" — the motion the orchestrator dispatched the
36875
+ * session on (D672): an attached sensor by its name (or its device id when the
36876
+ * name was not known), otherwise the motion source. An attach with no trigger
36877
+ * (an occupancy burst, a standing always-on camera, an older orchestrator)
36878
+ * says only that a session started.
36879
+ */
36880
+ function describeSessionStart(source, triggeredBy, sensorName) {
36881
+ const suffix = " — phase active";
36882
+ if (typeof triggeredBy === "object" && triggeredBy !== null && "kind" in triggeredBy && triggeredBy.kind === "sensor") {
36883
+ const id = "deviceId" in triggeredBy ? triggeredBy.deviceId : void 0;
36884
+ return `Detection session started by ${typeof sensorName === "string" && sensorName.length > 0 ? sensorName : `sensor #${String(id ?? "?")}`} motion${suffix}`;
36885
+ }
36886
+ if (source !== null) return `Detection session started by ${source} motion${suffix}`;
36887
+ return `Detection session started${suffix}`;
36888
+ }
36873
36889
  function summarizeEvent(category, data) {
36874
36890
  if (category === _camstack_types.EventCategory.DetectionPhaseTransition) {
36875
36891
  const to = data["to"];
@@ -36877,6 +36893,9 @@ function summarizeEvent(category, data) {
36877
36893
  const source = typeof data["source"] === "string" ? data["source"] : null;
36878
36894
  const cooldownMs = typeof data["cooldownMs"] === "number" ? data["cooldownMs"] : null;
36879
36895
  const suffix = source ? ` (${source}${cooldownMs ? `, ${Math.round(cooldownMs / 1e3)}s cooldown` : ""})` : "";
36896
+ const cause = data["cause"];
36897
+ if (cause === "attach") return describeSessionStart(source, data["triggeredBy"], data["sensorName"]);
36898
+ if (cause === "detach") return "Detection session ended — phase watching";
36880
36899
  if (to === "active") return `Motion detected — phase active${suffix}`;
36881
36900
  if (to === "watching") return `Cooldown expired — phase watching${suffix}`;
36882
36901
  return `Phase: ${String(from)} → ${String(to)}${suffix}`;
@@ -53117,6 +53136,11 @@ function renderCellContent(state) {
53117
53136
  className: "font-mono text-foreground truncate",
53118
53137
  children: state.modelId
53119
53138
  }),
53139
+ state.filledBy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
53140
+ className: "ml-auto shrink-0 truncate rounded bg-primary/10 px-1 text-[8px] font-semibold text-primary",
53141
+ title: `The root model ${state.filledBy} already names this step's classes — the step is skipped for those subjects`,
53142
+ children: ["filled by ", state.filledBy]
53143
+ }),
53120
53144
  state.clusterWide === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
53121
53145
  className: "ml-auto shrink-0 text-[8px] font-semibold uppercase text-primary",
53122
53146
  title: "One value for the whole cluster — this step writes into a shared vector index",
package/dist/index.js CHANGED
@@ -36846,6 +36846,22 @@ var LIVE_NOISE_SET = new Set(LIVE_NOISE_CATEGORIES);
36846
36846
  /** Categories visible in the events tab by default. The "All" badge
36847
36847
  * reflects this set, not the raw enum. */
36848
36848
  var DEFAULT_EVENT_CATEGORIES = Object.freeze(ALL_EVENT_CATEGORIES.filter((c) => !LIVE_NOISE_SET.has(c)));
36849
+ /**
36850
+ * "Detection session started by …" — the motion the orchestrator dispatched the
36851
+ * session on (D672): an attached sensor by its name (or its device id when the
36852
+ * name was not known), otherwise the motion source. An attach with no trigger
36853
+ * (an occupancy burst, a standing always-on camera, an older orchestrator)
36854
+ * says only that a session started.
36855
+ */
36856
+ function describeSessionStart(source, triggeredBy, sensorName) {
36857
+ const suffix = " — phase active";
36858
+ if (typeof triggeredBy === "object" && triggeredBy !== null && "kind" in triggeredBy && triggeredBy.kind === "sensor") {
36859
+ const id = "deviceId" in triggeredBy ? triggeredBy.deviceId : void 0;
36860
+ return `Detection session started by ${typeof sensorName === "string" && sensorName.length > 0 ? sensorName : `sensor #${String(id ?? "?")}`} motion${suffix}`;
36861
+ }
36862
+ if (source !== null) return `Detection session started by ${source} motion${suffix}`;
36863
+ return `Detection session started${suffix}`;
36864
+ }
36849
36865
  function summarizeEvent(category, data) {
36850
36866
  if (category === EventCategory.DetectionPhaseTransition) {
36851
36867
  const to = data["to"];
@@ -36853,6 +36869,9 @@ function summarizeEvent(category, data) {
36853
36869
  const source = typeof data["source"] === "string" ? data["source"] : null;
36854
36870
  const cooldownMs = typeof data["cooldownMs"] === "number" ? data["cooldownMs"] : null;
36855
36871
  const suffix = source ? ` (${source}${cooldownMs ? `, ${Math.round(cooldownMs / 1e3)}s cooldown` : ""})` : "";
36872
+ const cause = data["cause"];
36873
+ if (cause === "attach") return describeSessionStart(source, data["triggeredBy"], data["sensorName"]);
36874
+ if (cause === "detach") return "Detection session ended — phase watching";
36856
36875
  if (to === "active") return `Motion detected — phase active${suffix}`;
36857
36876
  if (to === "watching") return `Cooldown expired — phase watching${suffix}`;
36858
36877
  return `Phase: ${String(from)} → ${String(to)}${suffix}`;
@@ -53093,6 +53112,11 @@ function renderCellContent(state) {
53093
53112
  className: "font-mono text-foreground truncate",
53094
53113
  children: state.modelId
53095
53114
  }),
53115
+ state.filledBy !== void 0 && /* @__PURE__ */ jsxs("span", {
53116
+ className: "ml-auto shrink-0 truncate rounded bg-primary/10 px-1 text-[8px] font-semibold text-primary",
53117
+ title: `The root model ${state.filledBy} already names this step's classes — the step is skipped for those subjects`,
53118
+ children: ["filled by ", state.filledBy]
53119
+ }),
53096
53120
  state.clusterWide === true && /* @__PURE__ */ jsx("span", {
53097
53121
  className: "ml-auto shrink-0 text-[8px] font-semibold uppercase text-primary",
53098
53122
  title: "One value for the whole cluster — this step writes into a shared vector index",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/ui-library",
3
- "version": "1.2.231",
3
+ "version": "1.2.233",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",