@camstack/ui-library 1.2.11 → 1.2.13
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/composites/cap-settings/RecordingBandsEditor.d.ts +16 -0
- package/dist/composites/cap-settings/RecordingSettings.d.ts +5 -1
- package/dist/composites/cap-settings/index.d.ts +1 -1
- package/dist/composites/cap-settings/recording-config-form.d.ts +36 -20
- package/dist/generated/system-hooks.d.ts +28 -0
- package/dist/hooks/use-device-webrtc.d.ts +0 -7
- package/dist/index.cjs +418 -443
- package/dist/index.js +406 -445
- package/package.json +1 -1
- package/src/tailwind/camstack-theme.css +15 -0
- package/dist/composites/cap-settings/RecordingRulesEditor.d.ts +0 -7
- package/dist/composites/cap-settings/ScheduleBandsEditor.d.ts +0 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RecordingBand } from '@camstack/types';
|
|
2
|
+
interface RecordingBandsEditorProps {
|
|
3
|
+
readonly bands: readonly RecordingBand[];
|
|
4
|
+
readonly onChange: (bands: RecordingBand[]) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The band table — the ONLY authoring surface for recording intent since the
|
|
8
|
+
* legacy mode/schedules/triggers/rules model was retired (2026-07-30).
|
|
9
|
+
*
|
|
10
|
+
* Each row is one `RecordingBand`: when it applies (weekdays + `HH:MM` span,
|
|
11
|
+
* `end <= start` wraps past midnight) and how it records (continuous, or events
|
|
12
|
+
* with its own triggers and pre/post buffers). No band covering *now* = nothing
|
|
13
|
+
* is recorded then; "off" is the absence of a band, never a band value.
|
|
14
|
+
*/
|
|
15
|
+
export declare function RecordingBandsEditor({ bands, onChange }: RecordingBandsEditorProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -3,6 +3,10 @@ interface RecordingSettingsProps {
|
|
|
3
3
|
readonly initial: RecordingConfig;
|
|
4
4
|
readonly saving: boolean;
|
|
5
5
|
readonly onSave: (config: RecordingConfig) => void;
|
|
6
|
+
/** Regenerate the scrub strips for this camera (clear + rebuild from the
|
|
7
|
+
* recorded low segments). Absent → the button is hidden. */
|
|
8
|
+
readonly onRegenerateStrips?: () => void;
|
|
9
|
+
readonly regeneratingStrips?: boolean;
|
|
6
10
|
}
|
|
7
|
-
export declare function RecordingSettings({ initial, saving, onSave }: RecordingSettingsProps): import("react").JSX.Element;
|
|
11
|
+
export declare function RecordingSettings({ initial, saving, onSave, onRegenerateStrips, regeneratingStrips, }: RecordingSettingsProps): import("react").JSX.Element;
|
|
8
12
|
export {};
|
|
@@ -5,7 +5,7 @@ export { MotionZonesSettings } from './MotionZonesSettings';
|
|
|
5
5
|
export { PrivacyMaskSettings } from './PrivacyMaskSettings';
|
|
6
6
|
export { RecordingPanel } from './RecordingPanel';
|
|
7
7
|
export { RecordingSettings } from './RecordingSettings';
|
|
8
|
-
export {
|
|
8
|
+
export { RecordingBandsEditor } from './RecordingBandsEditor';
|
|
9
9
|
export { MaskShapeCanvas } from './MaskShapeCanvas';
|
|
10
10
|
export type { MaskShapeItem, MaskShapeCanvasProps } from './MaskShapeCanvas';
|
|
11
11
|
/**
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
export declare
|
|
1
|
+
import { RecordingBand, RecordingBandMode, RecordingConfig, RecordingStorageMode, RecordingTriggers, RecordingRetention, ScrubThumbnailPreset, CamProfile } from '@camstack/types';
|
|
2
|
+
/** Every weekday — the `days` of a band that covers the whole week. */
|
|
3
|
+
export declare const ALL_WEEKDAYS: readonly number[];
|
|
4
|
+
/** The full-day span of an always-on band (`HH:MM`, 23:59 = end of day). */
|
|
5
|
+
export declare const ALL_DAY_START = "00:00";
|
|
6
|
+
export declare const ALL_DAY_END = "23:59";
|
|
7
|
+
/** A band covering every day, all day, in `mode` — what the Base tab authors. */
|
|
8
|
+
export declare function alwaysBand(mode: RecordingBandMode, rest?: Partial<RecordingBand>): RecordingBand;
|
|
9
|
+
/** A fresh row for the Advanced band table: every day, office hours, continuous. */
|
|
10
|
+
export declare function emptyBand(): RecordingBand;
|
|
11
|
+
export declare function withBandAt(bands: readonly RecordingBand[], index: number, patch: Partial<RecordingBand>): RecordingBand[];
|
|
12
|
+
export declare function removeBandAt(bands: readonly RecordingBand[], index: number): RecordingBand[];
|
|
13
|
+
/** Does this band cover the whole week, all day? (the Base-tab shape) */
|
|
14
|
+
export declare function isAlwaysBand(band: RecordingBand): boolean;
|
|
6
15
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
16
|
+
* A config is "advanced" when its bands cannot be expressed by the Base tab —
|
|
17
|
+
* i.e. more than one band, or a single band restricted in time or weekday. Such
|
|
18
|
+
* a config opens directly in the Advanced band table so nothing is silently
|
|
19
|
+
* flattened by the simpler form.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isAdvancedConfig(cfg: RecordingConfig): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The editable shape of the Basic recording form: a storage mode plus the
|
|
24
|
+
* `events` parameters. It compiles to exactly ONE always-on band (or none, when
|
|
25
|
+
* `off`) — bands are the only thing that reaches the wire.
|
|
11
26
|
*/
|
|
12
27
|
export interface RecordingFormState {
|
|
13
28
|
readonly mode: RecordingStorageMode;
|
|
14
29
|
readonly profiles?: readonly CamProfile[];
|
|
15
30
|
readonly segmentSeconds?: number;
|
|
16
|
-
readonly schedules: readonly RecordingSchedule[];
|
|
17
31
|
readonly triggers: RecordingTriggers;
|
|
18
32
|
readonly preBufferSec?: number;
|
|
19
33
|
readonly postBufferSec?: number;
|
|
@@ -21,16 +35,18 @@ export interface RecordingFormState {
|
|
|
21
35
|
/** Per-camera scrub-thumbnail fidelity preset (absent = standard). */
|
|
22
36
|
readonly scrubThumbnails?: ScrubThumbnailPreset;
|
|
23
37
|
}
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
38
|
+
/**
|
|
39
|
+
* Read a persisted config into the Basic form state. `mode` is DERIVED from the
|
|
40
|
+
* bands by the same function the recorder stamps `config.mode` with; the
|
|
41
|
+
* `events` parameters come from the first events band, so re-opening the form
|
|
42
|
+
* shows what is actually recorded.
|
|
43
|
+
*/
|
|
26
44
|
export declare function formStateFromConfig(cfg: RecordingConfig): RecordingFormState;
|
|
27
|
-
/** Serialize the Basic form state back to the wire config. `enabled` is derived
|
|
28
|
-
* from `mode`; `rules`/singular `schedule` are never emitted. Schedules,
|
|
29
|
-
* triggers and buffers are preserved even when off so they survive a re-enable. */
|
|
30
|
-
export declare function configFromFormState(state: RecordingFormState): RecordingConfig;
|
|
31
45
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
46
|
+
* Serialize the Basic form state to the wire config: one always-on band of the
|
|
47
|
+
* chosen mode, none when `off`. `enabled` follows the mode; `mode` itself is
|
|
48
|
+
* NOT sent — the recorder stamps it as the derived summary of the bands.
|
|
35
49
|
*/
|
|
36
|
-
export declare function
|
|
50
|
+
export declare function configFromFormState(state: RecordingFormState): RecordingConfig;
|
|
51
|
+
/** The Base tab's bands: one always-on band of the chosen mode (none = off). */
|
|
52
|
+
export declare function bandsFromFormState(state: RecordingFormState): RecordingBand[];
|
|
@@ -179,6 +179,12 @@ export declare const useBackupListArchives: typeof trpc.backup.listArchives.useQ
|
|
|
179
179
|
export declare const useBackupUpsertDestinationPolicy: typeof trpc.backup.upsertDestinationPolicy.useMutation;
|
|
180
180
|
/** Generated alias around `trpc.backup.previewSchedule.useQuery`. */
|
|
181
181
|
export declare const useBackupPreviewSchedule: typeof trpc.backup.previewSchedule.useQuery;
|
|
182
|
+
/** Generated alias around `trpc.backup.listSchedules.useQuery`. */
|
|
183
|
+
export declare const useBackupListSchedules: typeof trpc.backup.listSchedules.useQuery;
|
|
184
|
+
/** Generated alias around `trpc.backup.upsertSchedule.useMutation`. */
|
|
185
|
+
export declare const useBackupUpsertSchedule: typeof trpc.backup.upsertSchedule.useMutation;
|
|
186
|
+
/** Generated alias around `trpc.backup.deleteSchedule.useMutation`. */
|
|
187
|
+
export declare const useBackupDeleteSchedule: typeof trpc.backup.deleteSchedule.useMutation;
|
|
182
188
|
/** Generated alias around `trpc.battery.wakeForStream.useMutation`. */
|
|
183
189
|
export declare const useBatteryWakeForStream: typeof trpc.battery.wakeForStream.useMutation;
|
|
184
190
|
/** Generated alias around `trpc.battery.getStatus.useQuery`. */
|
|
@@ -739,6 +745,10 @@ export declare const useLocalNetworkList: typeof trpc.localNetwork.list.useQuery
|
|
|
739
745
|
export declare const useLocalNetworkGetPreferred: typeof trpc.localNetwork.getPreferred.useQuery;
|
|
740
746
|
/** Generated alias around `trpc.localNetwork.getConnectionEndpoints.useQuery`. */
|
|
741
747
|
export declare const useLocalNetworkGetConnectionEndpoints: typeof trpc.localNetwork.getConnectionEndpoints.useQuery;
|
|
748
|
+
/** Generated alias around `trpc.localNetwork.getNotificationEndpoint.useQuery`. */
|
|
749
|
+
export declare const useLocalNetworkGetNotificationEndpoint: typeof trpc.localNetwork.getNotificationEndpoint.useQuery;
|
|
750
|
+
/** Generated alias around `trpc.localNetwork.setNotificationEndpoint.useMutation`. */
|
|
751
|
+
export declare const useLocalNetworkSetNotificationEndpoint: typeof trpc.localNetwork.setNotificationEndpoint.useMutation;
|
|
742
752
|
/** Generated alias around `trpc.localNetwork.getAllowedAddresses.useQuery`. */
|
|
743
753
|
export declare const useLocalNetworkGetAllowedAddresses: typeof trpc.localNetwork.getAllowedAddresses.useQuery;
|
|
744
754
|
/** Generated alias around `trpc.localNetwork.setAllowedAddresses.useMutation`. */
|
|
@@ -1011,6 +1021,12 @@ export declare const usePipelineAnalyticsGetEventStoreFootprint: typeof trpc.pip
|
|
|
1011
1021
|
export declare const usePipelineAnalyticsPruneEvents: typeof trpc.pipelineAnalytics.pruneEvents.useMutation;
|
|
1012
1022
|
/** Generated alias around `trpc.pipelineAnalytics.deleteDeviceEvents.useMutation`. */
|
|
1013
1023
|
export declare const usePipelineAnalyticsDeleteDeviceEvents: typeof trpc.pipelineAnalytics.deleteDeviceEvents.useMutation;
|
|
1024
|
+
/** Generated alias around `trpc.pipelineAnalytics.relocateMedia.useMutation`. */
|
|
1025
|
+
export declare const usePipelineAnalyticsRelocateMedia: typeof trpc.pipelineAnalytics.relocateMedia.useMutation;
|
|
1026
|
+
/** Generated alias around `trpc.pipelineAnalytics.getMediaRelocateStatus.useQuery`. */
|
|
1027
|
+
export declare const usePipelineAnalyticsGetMediaRelocateStatus: typeof trpc.pipelineAnalytics.getMediaRelocateStatus.useQuery;
|
|
1028
|
+
/** Generated alias around `trpc.pipelineAnalytics.cancelMediaRelocate.useMutation`. */
|
|
1029
|
+
export declare const usePipelineAnalyticsCancelMediaRelocate: typeof trpc.pipelineAnalytics.cancelMediaRelocate.useMutation;
|
|
1014
1030
|
/** Generated alias around `trpc.pipelineAnalytics.listOpsLog.useQuery`. */
|
|
1015
1031
|
export declare const usePipelineAnalyticsListOpsLog: typeof trpc.pipelineAnalytics.listOpsLog.useQuery;
|
|
1016
1032
|
/** Generated alias around `trpc.pipelineAnalytics.getEventMedia.useQuery`. */
|
|
@@ -1307,6 +1323,16 @@ export declare const useRecordingPruneFootage: typeof trpc.recording.pruneFootag
|
|
|
1307
1323
|
export declare const useRecordingDeleteFootprint: typeof trpc.recording.deleteFootprint.useMutation;
|
|
1308
1324
|
/** Generated alias around `trpc.recording.listOpsLog.useQuery`. */
|
|
1309
1325
|
export declare const useRecordingListOpsLog: typeof trpc.recording.listOpsLog.useQuery;
|
|
1326
|
+
/** Generated alias around `trpc.recording.renderGif.useMutation`. */
|
|
1327
|
+
export declare const useRecordingRenderGif: typeof trpc.recording.renderGif.useMutation;
|
|
1328
|
+
/** Generated alias around `trpc.recording.renderClip.useMutation`. */
|
|
1329
|
+
export declare const useRecordingRenderClip: typeof trpc.recording.renderClip.useMutation;
|
|
1330
|
+
/** Generated alias around `trpc.recording.relocateFootage.useMutation`. */
|
|
1331
|
+
export declare const useRecordingRelocateFootage: typeof trpc.recording.relocateFootage.useMutation;
|
|
1332
|
+
/** Generated alias around `trpc.recording.getRelocateStatus.useQuery`. */
|
|
1333
|
+
export declare const useRecordingGetRelocateStatus: typeof trpc.recording.getRelocateStatus.useQuery;
|
|
1334
|
+
/** Generated alias around `trpc.recording.cancelRelocate.useMutation`. */
|
|
1335
|
+
export declare const useRecordingCancelRelocate: typeof trpc.recording.cancelRelocate.useMutation;
|
|
1310
1336
|
/** Generated alias around `trpc.recording.getStatus.useQuery`. */
|
|
1311
1337
|
export declare const useRecordingGetStatus: typeof trpc.recording.getStatus.useQuery;
|
|
1312
1338
|
/** Generated alias around `trpc.recording.getDeviceSettingsContribution.useQuery`. */
|
|
@@ -1447,6 +1473,8 @@ export declare const useStreamBrokerRetractCameraStream: typeof trpc.streamBroke
|
|
|
1447
1473
|
export declare const useStreamBrokerAssignProfile: typeof trpc.streamBroker.assignProfile.useMutation;
|
|
1448
1474
|
/** Generated alias around `trpc.streamBroker.unassignProfile.useMutation`. */
|
|
1449
1475
|
export declare const useStreamBrokerUnassignProfile: typeof trpc.streamBroker.unassignProfile.useMutation;
|
|
1476
|
+
/** Generated alias around `trpc.streamBroker.renderPreBufferClip.useMutation`. */
|
|
1477
|
+
export declare const useStreamBrokerRenderPreBufferClip: typeof trpc.streamBroker.renderPreBufferClip.useMutation;
|
|
1450
1478
|
/** Generated alias around `trpc.streamBroker.listAllCameraStreams.useQuery`. */
|
|
1451
1479
|
export declare const useStreamBrokerListAllCameraStreams: typeof trpc.streamBroker.listAllCameraStreams.useQuery;
|
|
1452
1480
|
/** Generated alias around `trpc.streamBroker.listAllProfileSlots.useQuery`. */
|
|
@@ -195,12 +195,5 @@ export interface SessionRenegotiationState {
|
|
|
195
195
|
readonly epoch: number;
|
|
196
196
|
} | null;
|
|
197
197
|
}
|
|
198
|
-
/**
|
|
199
|
-
* Hook that provides WebRTC signaling callbacks and stream choices for a device.
|
|
200
|
-
*
|
|
201
|
-
* @param trpc - tRPC proxy (admin-ui BackendClient.trpc or addon page trpc)
|
|
202
|
-
* @param deviceId - numeric device ID (null = disabled)
|
|
203
|
-
* @param pollIntervalMs - how often to refresh profile slots (default: 5000)
|
|
204
|
-
*/
|
|
205
198
|
export declare function useDeviceWebrtc(trpc: UseDeviceWebrtcTrpc, deviceId: number | null, pollIntervalMs?: number): DeviceWebrtcResult;
|
|
206
199
|
export {};
|