@camera.ui/sdk 0.0.18 → 0.0.20
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.d.ts +3 -1
- package/dist/sensor/base.js +7 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -3135,7 +3135,7 @@ declare abstract class Sensor<TProperties extends object, TStorage extends objec
|
|
|
3135
3135
|
* Helper for `reportDetections(detected, detections?)` flows.
|
|
3136
3136
|
*
|
|
3137
3137
|
* - If `detected === false` → returns `[]` (clear).
|
|
3138
|
-
* - If `detected === true` and `detections` has items → returns them
|
|
3138
|
+
* - If `detected === true` and `detections` has items → returns them, substituting a full-frame box where missing.
|
|
3139
3139
|
* - If `detected === true` and `detections` is missing/empty → returns a single
|
|
3140
3140
|
* synthesized full-frame detection with the given `fallbackLabel` and any
|
|
3141
3141
|
* `fallbackExtra` fields (used for type-specific properties like `attribute`,
|
|
@@ -3350,6 +3350,8 @@ interface MotionDetectionSettings {
|
|
|
3350
3350
|
interface ObjectDetectionSettings {
|
|
3351
3351
|
/** Minimum confidence threshold (0-1) */
|
|
3352
3352
|
confidence: number;
|
|
3353
|
+
/** Suppress events from objects that stay stationary across events (e.g. parked cars). Defaults to true. */
|
|
3354
|
+
suppressStatic?: boolean;
|
|
3353
3355
|
}
|
|
3354
3356
|
/**
|
|
3355
3357
|
* Audio detection settings.
|
package/dist/sensor/base.js
CHANGED
|
@@ -233,7 +233,7 @@ export class Sensor {
|
|
|
233
233
|
* Helper for `reportDetections(detected, detections?)` flows.
|
|
234
234
|
*
|
|
235
235
|
* - If `detected === false` → returns `[]` (clear).
|
|
236
|
-
* - If `detected === true` and `detections` has items → returns them
|
|
236
|
+
* - If `detected === true` and `detections` has items → returns them, substituting a full-frame box where missing.
|
|
237
237
|
* - If `detected === true` and `detections` is missing/empty → returns a single
|
|
238
238
|
* synthesized full-frame detection with the given `fallbackLabel` and any
|
|
239
239
|
* `fallbackExtra` fields (used for type-specific properties like `attribute`,
|
|
@@ -257,8 +257,12 @@ export class Sensor {
|
|
|
257
257
|
_normalizeReportedDetections(detected, detections, fallbackLabel, fallbackExtra) {
|
|
258
258
|
if (!detected)
|
|
259
259
|
return [];
|
|
260
|
-
if (detections && detections.length > 0)
|
|
261
|
-
|
|
260
|
+
if (detections && detections.length > 0) {
|
|
261
|
+
// Smart-camera plugins (Ring, Reolink, ...) report labels without
|
|
262
|
+
// coordinates, while downstream consumers (detection coordinator, zone
|
|
263
|
+
// matching) require a box on every detection — substitute full-frame.
|
|
264
|
+
return detections.map((detection) => (detection.box ? detection : { ...detection, box: { x: 0, y: 0, width: 1, height: 1 } }));
|
|
265
|
+
}
|
|
262
266
|
return [
|
|
263
267
|
{
|
|
264
268
|
label: fallbackLabel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "camera.ui sdk",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
36
36
|
"@types/multicast-dns": "^7.2.4",
|
|
37
37
|
"@types/node": "26.1.1",
|
|
38
|
-
"@typescript-eslint/parser": "^8.
|
|
38
|
+
"@typescript-eslint/parser": "^8.64.0",
|
|
39
39
|
"cpy-cli": "^7.0.0",
|
|
40
40
|
"eslint": "9.39.2",
|
|
41
41
|
"eslint-plugin-jsdoc": "^63.0.13",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typedoc-plugin-markdown": "^4.12.0",
|
|
49
49
|
"typedoc-vitepress-theme": "^1.1.3",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
|
-
"typescript-eslint": "^8.
|
|
51
|
+
"typescript-eslint": "^8.64.0",
|
|
52
52
|
"vitepress": "^1.6.4",
|
|
53
53
|
"vitest": "^4.1.10",
|
|
54
54
|
"werift": "0.23.0",
|