@camstack/addon-post-analysis 1.2.62 → 1.2.63

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.
@@ -5602,6 +5602,12 @@ function frozenOccupancy(rule, occ) {
5602
5602
  occupied: occ.occupied
5603
5603
  };
5604
5604
  }
5605
+ function notificationZones(rule, subject) {
5606
+ const configured = rule.conditions.zones?.ids;
5607
+ if (configured === void 0 || configured.length === 0) return subject.zones;
5608
+ const allowed = new Set(configured);
5609
+ return subject.zones.filter((zoneId) => allowed.has(zoneId));
5610
+ }
5605
5611
  /** Classify an object-event row as a package delivery / pick-up, or `null` when
5606
5612
  * it is an ordinary detection. */
5607
5613
  function packagePhaseOf(ev) {
@@ -6574,6 +6580,7 @@ var NotificationCenter = class NotificationCenter {
6574
6580
  const isTrackScoped = kind === "object-event" || kind === "track-end";
6575
6581
  const isSystemEvent = kind === "system-event";
6576
6582
  const direct = new Set(rule.targets.map((t) => t.targetId));
6583
+ const renderedZones = notificationZones(rule, subject);
6577
6584
  return [...rule.targets, ...userTargets.filter((t) => !direct.has(t.targetId))].filter((target) => !rule.disabledTargetIds.includes(target.targetId)).map((target) => {
6578
6585
  const payload = {
6579
6586
  ruleName: rule.name,
@@ -6599,7 +6606,7 @@ var NotificationCenter = class NotificationCenter {
6599
6606
  className: subject.classNames[0] ?? subject.sensorKind ?? "event",
6600
6607
  ...subject.label !== void 0 ? { label: subject.label } : {},
6601
6608
  ...subject.confidence !== void 0 ? { confidence: subject.confidence } : {},
6602
- zones: subject.zones,
6609
+ zones: renderedZones,
6603
6610
  timestamp: subject.timestamp,
6604
6611
  ...subject.occupancy !== void 0 ? { occupancy: frozenOccupancy(rule, subject.occupancy) } : {},
6605
6612
  ...subject.systemEvent !== void 0 ? { systemEvent: subject.systemEvent } : {}
@@ -5589,6 +5589,12 @@ function frozenOccupancy(rule, occ) {
5589
5589
  occupied: occ.occupied
5590
5590
  };
5591
5591
  }
5592
+ function notificationZones(rule, subject) {
5593
+ const configured = rule.conditions.zones?.ids;
5594
+ if (configured === void 0 || configured.length === 0) return subject.zones;
5595
+ const allowed = new Set(configured);
5596
+ return subject.zones.filter((zoneId) => allowed.has(zoneId));
5597
+ }
5592
5598
  /** Classify an object-event row as a package delivery / pick-up, or `null` when
5593
5599
  * it is an ordinary detection. */
5594
5600
  function packagePhaseOf(ev) {
@@ -6561,6 +6567,7 @@ var NotificationCenter = class NotificationCenter {
6561
6567
  const isTrackScoped = kind === "object-event" || kind === "track-end";
6562
6568
  const isSystemEvent = kind === "system-event";
6563
6569
  const direct = new Set(rule.targets.map((t) => t.targetId));
6570
+ const renderedZones = notificationZones(rule, subject);
6564
6571
  return [...rule.targets, ...userTargets.filter((t) => !direct.has(t.targetId))].filter((target) => !rule.disabledTargetIds.includes(target.targetId)).map((target) => {
6565
6572
  const payload = {
6566
6573
  ruleName: rule.name,
@@ -6586,7 +6593,7 @@ var NotificationCenter = class NotificationCenter {
6586
6593
  className: subject.classNames[0] ?? subject.sensorKind ?? "event",
6587
6594
  ...subject.label !== void 0 ? { label: subject.label } : {},
6588
6595
  ...subject.confidence !== void 0 ? { confidence: subject.confidence } : {},
6589
- zones: subject.zones,
6596
+ zones: renderedZones,
6590
6597
  timestamp: subject.timestamp,
6591
6598
  ...subject.occupancy !== void 0 ? { occupancy: frozenOccupancy(rule, subject.occupancy) } : {},
6592
6599
  ...subject.systemEvent !== void 0 ? { systemEvent: subject.systemEvent } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-post-analysis",
3
- "version": "1.2.62",
3
+ "version": "1.2.63",
4
4
  "description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
5
5
  "keywords": [
6
6
  "camstack",