@camstack/ui-library 1.2.290 → 1.2.292
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/{MaskShapeCanvas-DI4BY7W2.js → MaskShapeCanvas-C9cJlxvG.js} +3 -1
- package/dist/{MaskShapeCanvas-BByN3jvt.cjs → MaskShapeCanvas-NCNwu9_5.cjs} +3 -1
- package/dist/{MotionZonesSettings-CiYjd-yl.js → MotionZonesSettings-Bv8XzCa3.js} +45 -48
- package/dist/{MotionZonesSettings-BK9R9NIr.cjs → MotionZonesSettings-CPRH536-.cjs} +44 -47
- package/dist/{PrivacyMaskSettings-DuXUCUev.cjs → PrivacyMaskSettings-BUWvVF_n.cjs} +33 -42
- package/dist/{PrivacyMaskSettings-BmRdUrPp.js → PrivacyMaskSettings-BlkbESYj.js} +34 -43
- package/dist/{SceneMonitorEditor-COgAjtq5.cjs → SceneMonitorEditor-D_jkzQ2o.cjs} +189 -86
- package/dist/{SceneMonitorEditor-J4Ix_0tu.js → SceneMonitorEditor-i3-nXAEU.js} +190 -87
- package/dist/composites/addon-global-settings-form.d.ts +0 -12
- package/dist/composites/cap-settings/AutotrackSection.d.ts +0 -16
- package/dist/composites/cap-settings/CameraGridLayoutEditor.d.ts +0 -21
- package/dist/composites/cap-settings/ConsumablesPanel.d.ts +0 -18
- package/dist/composites/cap-settings/MaskShapeCanvas.d.ts +0 -102
- package/dist/composites/cap-settings/MotionZonesSettings.d.ts +0 -38
- package/dist/composites/cap-settings/SceneReferenceGallery.d.ts +0 -38
- package/dist/composites/cap-settings/scene-monitor-copy.d.ts +12 -6
- package/dist/composites/clips/clip-source-state.d.ts +3 -2
- package/dist/composites/clips/clip-thumbnail-fetch.d.ts +2 -1
- package/dist/composites/clips/clip-tile-media.d.ts +3 -2
- package/dist/composites/clips/clip-view-state.d.ts +2 -1
- package/dist/composites/confirm-dialog.d.ts +0 -62
- package/dist/composites/data-table.d.ts +2 -11
- package/dist/composites/detection-canvas.d.ts +0 -9
- package/dist/composites/detection-result-tree.d.ts +0 -12
- package/dist/composites/device-controls/container-primary-hero.d.ts +0 -17
- package/dist/composites/device-controls/humidifier-control.d.ts +0 -17
- package/dist/composites/device-controls/lawn-mower-control.d.ts +2 -1
- package/dist/composites/device-controls/pet-feeder-panel.d.ts +0 -18
- package/dist/composites/device-controls/script-automation-controls.d.ts +2 -1
- package/dist/composites/device-controls/sensor-hero-card.d.ts +0 -18
- package/dist/composites/device-controls/update-control.d.ts +0 -13
- package/dist/composites/device-controls/vacuum-control.d.ts +2 -1
- package/dist/composites/device-controls/valve-control.d.ts +2 -1
- package/dist/composites/device-controls/weather-control.d.ts +2 -1
- package/dist/composites/device-item/actions.d.ts +0 -22
- package/dist/composites/device-item/helpers.d.ts +2 -1
- package/dist/composites/device-item/index.d.ts +0 -9
- package/dist/composites/device-list/batch-actions-bar.d.ts +0 -11
- package/dist/composites/device-list/filter-chips.d.ts +0 -13
- package/dist/composites/device-list/page-size-select.d.ts +2 -1
- package/dist/composites/device-list/url-state.d.ts +2 -3
- package/dist/composites/device-meta.d.ts +14 -7
- package/dist/composites/device-picker/DevicePicker.d.ts +9 -1
- package/dist/composites/device-picker/device-filter-bar.d.ts +2 -1
- package/dist/composites/device-picker/device-parent.d.ts +2 -1
- package/dist/composites/device-picker/device-selection-rows.d.ts +6 -1
- package/dist/composites/device-selector-picker.d.ts +25 -1
- package/dist/composites/device-step-matrix.d.ts +0 -26
- package/dist/composites/error-box.d.ts +0 -15
- package/dist/composites/event-stream.d.ts +2 -1
- package/dist/composites/extensions/extensions-view-state.d.ts +2 -1
- package/dist/composites/hls-quality.d.ts +3 -2
- package/dist/composites/index.d.ts +0 -2
- package/dist/composites/notification-targets-field.d.ts +2 -2
- package/dist/composites/option-select/OptionSelect.d.ts +6 -0
- package/dist/composites/pipeline-matrix-shared.d.ts +2 -1
- package/dist/composites/provider-entries/AddProviderEntryDialog.d.ts +1 -1
- package/dist/composites/provider-entries/ProviderEntryPills.d.ts +1 -1
- package/dist/composites/ptz-overlay.d.ts +0 -19
- package/dist/composites/qr-code.d.ts +0 -14
- package/dist/composites/scope-picker.d.ts +2 -1
- package/dist/composites/step-inspector/layered-settings-form.d.ts +0 -11
- package/dist/composites/step-inspector/step-inspector-panel.d.ts +0 -6
- package/dist/composites/stream-broker-selector.d.ts +0 -21
- package/dist/composites/training/TrainingBaseModelPicker.d.ts +0 -10
- package/dist/composites/training/retrain-review-badge.d.ts +2 -1
- package/dist/composites/webrtc-diagnostics/endpoint-test.d.ts +2 -1
- package/dist/composites/webrtc-diagnostics/nat-mapping.d.ts +2 -1
- package/dist/composites/webrtc-diagnostics/session-run.d.ts +2 -1
- package/dist/composites/webrtc-diagnostics/session-verdict.d.ts +2 -1
- package/dist/contexts/ui-text.d.ts +49 -0
- package/dist/generated/system-hooks.d.ts +4 -0
- package/dist/i18n/addon-i18n.d.ts +46 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/use-addon-t.d.ts +57 -0
- package/dist/index.cjs +3309 -2368
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3297 -2368
- package/dist/lib/format-last-seen.d.ts +15 -1
- package/dist/lib/phase-config.d.ts +9 -3
- package/dist/lib/pipeline-mirror.d.ts +2 -1
- package/package.json +1 -1
- package/dist/composites/data-table/data-table-header.d.ts +0 -11
- package/dist/composites/data-table/data-table-pagination.d.ts +0 -10
- package/dist/composites/data-table/data-table-row.d.ts +0 -11
- package/dist/composites/data-table/data-table.d.ts +0 -3
- package/dist/composites/data-table/index.d.ts +0 -2
- package/dist/composites/data-table/types.d.ts +0 -34
- package/dist/composites/data-table-layout.d.ts +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as Hexagon, t as MicOff } from "./mic-off-C2VTYr91.js";
|
|
2
|
-
import { Ht as Mic, TEXT_HINT, V as Square, WidgetPanel, isAbsentProvider, jn as EyeOff, k as Trash2, useDeviceProxy, usePlayerOverlayLayer, useSystem } from "./index.js";
|
|
3
|
-
import { MaskShapeCanvas } from "./MaskShapeCanvas-
|
|
2
|
+
import { Ht as Mic, TEXT_HINT, UiTrans, V as Square, WidgetPanel, isAbsentProvider, jn as EyeOff, k as Trash2, useDeviceProxy, usePlayerOverlayLayer, useSystem, useUiText } from "./index.js";
|
|
3
|
+
import { MaskShapeCanvas } from "./MaskShapeCanvas-C9cJlxvG.js";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/composites/cap-settings/privacy-mask-audio.ts
|
|
@@ -53,6 +53,7 @@ function regionsEqual(a, b) {
|
|
|
53
53
|
return true;
|
|
54
54
|
}
|
|
55
55
|
function PrivacyMaskSettings({ deviceId }) {
|
|
56
|
+
const t = useUiText();
|
|
56
57
|
const dev = useDeviceProxy(useSystem().trpcClient, deviceId);
|
|
57
58
|
const [options, setOptions] = useState(null);
|
|
58
59
|
const [unsupported, setUnsupported] = useState(false);
|
|
@@ -144,8 +145,8 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
144
145
|
id: r.id,
|
|
145
146
|
shape: r.shape,
|
|
146
147
|
enabled: r.enabled,
|
|
147
|
-
label:
|
|
148
|
-
})) : [], [draft]);
|
|
148
|
+
label: t("uiLibrary.privacyMaskSettings.zoneN", "Zone {{id}}", { id: r.id })
|
|
149
|
+
})) : [], [draft, t]);
|
|
149
150
|
const onShapeChange = useCallback((id, shape) => {
|
|
150
151
|
const next = toPrivacyMaskShape(shape);
|
|
151
152
|
if (!next) return;
|
|
@@ -290,35 +291,27 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
290
291
|
const ready = !unsupported && !noShapes && !unreadable && options !== null && draft !== null;
|
|
291
292
|
if (!dev) return null;
|
|
292
293
|
return /* @__PURE__ */ jsx(WidgetPanel, {
|
|
293
|
-
title: "Privacy Mask",
|
|
294
|
+
title: t("uiLibrary.privacyMaskSettings.title", "Privacy Mask"),
|
|
294
295
|
icon: /* @__PURE__ */ jsx(EyeOff, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
295
296
|
children: /* @__PURE__ */ jsxs("div", {
|
|
296
297
|
className: "flex flex-col gap-3",
|
|
297
298
|
children: [unsupported || noShapes ? /* @__PURE__ */ jsx("p", {
|
|
298
299
|
className: `${TEXT_HINT} leading-relaxed`,
|
|
299
|
-
children: "This camera doesn't support an on-board privacy mask."
|
|
300
|
+
children: t("uiLibrary.privacyMaskSettings.unsupported", "This camera doesn't support an on-board privacy mask.")
|
|
300
301
|
}) : unreadable ? /* @__PURE__ */ jsx("p", {
|
|
301
302
|
className: `${TEXT_HINT} leading-relaxed`,
|
|
302
|
-
children: "This camera hasn't answered, so what it currently masks is unknown — the editor stays closed rather than showing an empty frame you could save over. A battery camera answers once it wakes; otherwise check that it is reachable."
|
|
303
|
+
children: t("uiLibrary.privacyMaskSettings.unreadable", "This camera hasn't answered, so what it currently masks is unknown — the editor stays closed rather than showing an empty frame you could save over. A battery camera answers once it wakes; otherwise check that it is reachable.")
|
|
303
304
|
}) : !ready ? /* @__PURE__ */ jsx("p", {
|
|
304
305
|
className: `${TEXT_HINT} leading-relaxed`,
|
|
305
|
-
children: "Loading the camera's privacy mask…"
|
|
306
|
+
children: t("uiLibrary.privacyMaskSettings.loading", "Loading the camera's privacy mask…")
|
|
306
307
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ jsx("p", {
|
|
308
309
|
className: `${TEXT_HINT} leading-relaxed`,
|
|
309
|
-
children:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}),
|
|
315
|
-
" to draw blanked-out zones on the live frame, then ",
|
|
316
|
-
/* @__PURE__ */ jsx("strong", {
|
|
317
|
-
className: "text-foreground",
|
|
318
|
-
children: "Save"
|
|
319
|
-
}),
|
|
320
|
-
" to push them to the camera. Drag a rectangle to move, its corner to resize; drag polygon vertices, click an edge midpoint to add one, or right-click a vertex to remove it."
|
|
321
|
-
]
|
|
310
|
+
children: /* @__PURE__ */ jsx(UiTrans, {
|
|
311
|
+
uiKey: "uiLibrary.privacyMaskSettings.help",
|
|
312
|
+
fallback: "Toggle <0>Edit mask</0> to draw blanked-out zones on the live frame, then <1>Save</1> to push them to the camera. Drag a rectangle to move, its corner to resize; drag polygon vertices, click an edge midpoint to add one, or right-click a vertex to remove it.",
|
|
313
|
+
components: [/* @__PURE__ */ jsx("strong", { className: "text-foreground" }, "edit"), /* @__PURE__ */ jsx("strong", { className: "text-foreground" }, "save")]
|
|
314
|
+
})
|
|
322
315
|
}),
|
|
323
316
|
/* @__PURE__ */ jsxs("div", {
|
|
324
317
|
className: "flex items-center gap-2 flex-wrap",
|
|
@@ -329,7 +322,7 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
329
322
|
disabled: saving,
|
|
330
323
|
"aria-pressed": editing,
|
|
331
324
|
className: editing ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
332
|
-
children: editing ? "Done editing" : "Edit mask"
|
|
325
|
+
children: editing ? t("uiLibrary.privacyMaskSettings.doneEditing", "Done editing") : t("uiLibrary.privacyMaskSettings.editMask", "Edit mask")
|
|
333
326
|
}),
|
|
334
327
|
/* @__PURE__ */ jsx("button", {
|
|
335
328
|
type: "button",
|
|
@@ -337,7 +330,7 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
337
330
|
disabled: saving,
|
|
338
331
|
"aria-pressed": draft.enabled,
|
|
339
332
|
className: draft.enabled ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
340
|
-
children: draft.enabled ? "Mask on" : "Mask off"
|
|
333
|
+
children: draft.enabled ? t("uiLibrary.privacyMaskSettings.maskOn", "Mask on") : t("uiLibrary.privacyMaskSettings.maskOff", "Mask off")
|
|
341
334
|
}),
|
|
342
335
|
supportsRect && /* @__PURE__ */ jsx("button", {
|
|
343
336
|
type: "button",
|
|
@@ -345,8 +338,8 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
345
338
|
disabled: saving || atCapacity,
|
|
346
339
|
"aria-pressed": drawingKind === "rect",
|
|
347
340
|
className: drawingKind === "rect" ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
348
|
-
title: atCapacity ? "Maximum zones reached" : "Add a rectangle zone",
|
|
349
|
-
children: "+ Rect"
|
|
341
|
+
title: atCapacity ? t("uiLibrary.privacyMaskSettings.maxZones", "Maximum zones reached") : t("uiLibrary.privacyMaskSettings.addRect", "Add a rectangle zone"),
|
|
342
|
+
children: t("uiLibrary.privacyMaskSettings.rectButton", "+ Rect")
|
|
350
343
|
}),
|
|
351
344
|
supportsPolygon && /* @__PURE__ */ jsx("button", {
|
|
352
345
|
type: "button",
|
|
@@ -354,17 +347,15 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
354
347
|
disabled: saving || atCapacity,
|
|
355
348
|
"aria-pressed": drawingKind === "polygon",
|
|
356
349
|
className: drawingKind === "polygon" ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
357
|
-
title: atCapacity ? "Maximum zones reached" : "Add a polygon zone",
|
|
358
|
-
children: "+ Polygon"
|
|
350
|
+
title: atCapacity ? t("uiLibrary.privacyMaskSettings.maxZones", "Maximum zones reached") : t("uiLibrary.privacyMaskSettings.addPolygon", "Add a polygon zone"),
|
|
351
|
+
children: t("uiLibrary.privacyMaskSettings.polygonButton", "+ Polygon")
|
|
359
352
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ jsx("span", {
|
|
361
354
|
className: `${TEXT_HINT} ml-1 tabular-nums`,
|
|
362
|
-
children:
|
|
363
|
-
activeCount,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
" zones"
|
|
367
|
-
]
|
|
355
|
+
children: t("uiLibrary.privacyMaskSettings.zoneCount", "{{active}} / {{max}} zones", {
|
|
356
|
+
active: activeCount,
|
|
357
|
+
max: maxRegions
|
|
358
|
+
})
|
|
368
359
|
}),
|
|
369
360
|
/* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
370
361
|
/* @__PURE__ */ jsx("button", {
|
|
@@ -372,14 +363,14 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
372
363
|
onClick: revert,
|
|
373
364
|
disabled: saving || !dirty,
|
|
374
365
|
className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
|
|
375
|
-
children: "Revert"
|
|
366
|
+
children: t("uiLibrary.privacyMaskSettings.revert", "Revert")
|
|
376
367
|
}),
|
|
377
368
|
/* @__PURE__ */ jsx("button", {
|
|
378
369
|
type: "button",
|
|
379
370
|
onClick: () => void save(),
|
|
380
371
|
disabled: saving || !dirty,
|
|
381
372
|
className: BTN_PRIMARY,
|
|
382
|
-
children: saving ? "Saving…" : "Save"
|
|
373
|
+
children: saving ? t("uiLibrary.privacyMaskSettings.saving", "Saving…") : t("uiLibrary.privacyMaskSettings.save", "Save")
|
|
383
374
|
})
|
|
384
375
|
]
|
|
385
376
|
}),
|
|
@@ -397,7 +388,7 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
397
388
|
className: "flex flex-1 items-center gap-2 text-left text-[11px] font-medium text-foreground-subtle hover:text-foreground disabled:opacity-40 transition-colors",
|
|
398
389
|
children: [
|
|
399
390
|
/* @__PURE__ */ jsx(ShapeIcon, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
400
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ jsx("span", { children: t("uiLibrary.privacyMaskSettings.zoneN", "Zone {{id}}", { id: r.id }) }),
|
|
401
392
|
/* @__PURE__ */ jsx("span", {
|
|
402
393
|
className: "text-foreground-faint capitalize",
|
|
403
394
|
children: r.shape.kind
|
|
@@ -407,8 +398,8 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
407
398
|
type: "button",
|
|
408
399
|
onClick: () => deleteRegion(r.id),
|
|
409
400
|
disabled: saving,
|
|
410
|
-
"aria-label":
|
|
411
|
-
title: "Delete zone",
|
|
401
|
+
"aria-label": t("uiLibrary.privacyMaskSettings.deleteZoneN", "Delete zone {{id}}", { id: r.id }),
|
|
402
|
+
title: t("uiLibrary.privacyMaskSettings.deleteZone", "Delete zone"),
|
|
412
403
|
className: "inline-flex h-6 w-6 items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:border-red-400/40 hover:bg-red-500/10 hover:text-red-400 disabled:opacity-40 transition-colors",
|
|
413
404
|
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3.5 w-3.5" })
|
|
414
405
|
})]
|
|
@@ -424,15 +415,15 @@ function PrivacyMaskSettings({ deviceId }) {
|
|
|
424
415
|
"aria-checked": microphone.on === true,
|
|
425
416
|
disabled: !microphone.available || pendingAudio !== null,
|
|
426
417
|
onClick: () => void toggleMicrophone(),
|
|
427
|
-
title: microphone.on === null ? "Microphone — state unknown; the camera did not answer." : microphone.on ?
|
|
418
|
+
title: microphone.on === null ? t("uiLibrary.privacyMaskSettings.micTitleUnknown", "Microphone — state unknown; the camera did not answer.") : microphone.on ? t("uiLibrary.privacyMaskSettings.micTitleOn", "The camera is capturing sound. Turning it off: {{cost}}", { cost: microphone.costWhenOff }) : t("uiLibrary.privacyMaskSettings.micTitleOff", "The camera is silent. {{cost}}", { cost: microphone.costWhenOff }),
|
|
428
419
|
className: microphone.on === false || microphone.on === null ? BTN_NEUTRAL : BTN_PRIMARY,
|
|
429
420
|
children: /* @__PURE__ */ jsxs("span", {
|
|
430
421
|
className: "inline-flex items-center gap-1.5",
|
|
431
|
-
children: [microphone.on === false ? /* @__PURE__ */ jsx(MicOff, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Mic, { className: "h-3.5 w-3.5" }), microphone.on === null ? "Microphone unknown" : microphone.on ? "Microphone on" : "Microphone off"]
|
|
422
|
+
children: [microphone.on === false ? /* @__PURE__ */ jsx(MicOff, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Mic, { className: "h-3.5 w-3.5" }), microphone.on === null ? t("uiLibrary.privacyMaskSettings.micUnknown", "Microphone unknown") : microphone.on ? t("uiLibrary.privacyMaskSettings.micOn", "Microphone on") : t("uiLibrary.privacyMaskSettings.micOff", "Microphone off")]
|
|
432
423
|
})
|
|
433
424
|
}), /* @__PURE__ */ jsx("p", {
|
|
434
425
|
className: `text-[10px] text-foreground-subtle flex-1 leading-relaxed`,
|
|
435
|
-
children: audioFailure !== null ?
|
|
426
|
+
children: audioFailure !== null ? t("uiLibrary.privacyMaskSettings.writeFailed", "Write failed: {{reason}}", { reason: audioFailure }) : microphone.on === null ? t("uiLibrary.privacyMaskSettings.micNotReported", "The camera did not report its microphone, so this state is unknown.") : microphone.costWhenOff
|
|
436
427
|
})]
|
|
437
428
|
})]
|
|
438
429
|
})
|