@camstack/ui-library 1.2.12 → 1.2.14
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 +24 -0
- package/dist/hooks/use-device-webrtc.d.ts +0 -7
- package/dist/index.cjs +412 -443
- package/dist/index.js +402 -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[];
|
|
@@ -521,6 +521,8 @@ export declare const useDeviceManagerProviderDiscoveryParamsSchema: typeof trpc.
|
|
|
521
521
|
export declare const useDeviceManagerTestField: typeof trpc.deviceManager.testField.useMutation;
|
|
522
522
|
/** Generated alias around `trpc.deviceManager.getDeviceStatusAggregate.useQuery`. */
|
|
523
523
|
export declare const useDeviceManagerGetDeviceStatusAggregate: typeof trpc.deviceManager.getDeviceStatusAggregate.useQuery;
|
|
524
|
+
/** Generated alias around `trpc.deviceManager.getDeviceStatusAggregateBatch.useQuery`. */
|
|
525
|
+
export declare const useDeviceManagerGetDeviceStatusAggregateBatch: typeof trpc.deviceManager.getDeviceStatusAggregateBatch.useQuery;
|
|
524
526
|
/** Generated alias around `trpc.deviceManager.getDeviceSettingsContribution.useQuery`. */
|
|
525
527
|
export declare const useDeviceManagerGetDeviceSettingsContribution: typeof trpc.deviceManager.getDeviceSettingsContribution.useQuery;
|
|
526
528
|
/** Generated alias around `trpc.deviceManager.getDeviceLiveContribution.useQuery`. */
|
|
@@ -745,6 +747,10 @@ export declare const useLocalNetworkList: typeof trpc.localNetwork.list.useQuery
|
|
|
745
747
|
export declare const useLocalNetworkGetPreferred: typeof trpc.localNetwork.getPreferred.useQuery;
|
|
746
748
|
/** Generated alias around `trpc.localNetwork.getConnectionEndpoints.useQuery`. */
|
|
747
749
|
export declare const useLocalNetworkGetConnectionEndpoints: typeof trpc.localNetwork.getConnectionEndpoints.useQuery;
|
|
750
|
+
/** Generated alias around `trpc.localNetwork.getNotificationEndpoint.useQuery`. */
|
|
751
|
+
export declare const useLocalNetworkGetNotificationEndpoint: typeof trpc.localNetwork.getNotificationEndpoint.useQuery;
|
|
752
|
+
/** Generated alias around `trpc.localNetwork.setNotificationEndpoint.useMutation`. */
|
|
753
|
+
export declare const useLocalNetworkSetNotificationEndpoint: typeof trpc.localNetwork.setNotificationEndpoint.useMutation;
|
|
748
754
|
/** Generated alias around `trpc.localNetwork.getAllowedAddresses.useQuery`. */
|
|
749
755
|
export declare const useLocalNetworkGetAllowedAddresses: typeof trpc.localNetwork.getAllowedAddresses.useQuery;
|
|
750
756
|
/** Generated alias around `trpc.localNetwork.setAllowedAddresses.useMutation`. */
|
|
@@ -1017,6 +1023,12 @@ export declare const usePipelineAnalyticsGetEventStoreFootprint: typeof trpc.pip
|
|
|
1017
1023
|
export declare const usePipelineAnalyticsPruneEvents: typeof trpc.pipelineAnalytics.pruneEvents.useMutation;
|
|
1018
1024
|
/** Generated alias around `trpc.pipelineAnalytics.deleteDeviceEvents.useMutation`. */
|
|
1019
1025
|
export declare const usePipelineAnalyticsDeleteDeviceEvents: typeof trpc.pipelineAnalytics.deleteDeviceEvents.useMutation;
|
|
1026
|
+
/** Generated alias around `trpc.pipelineAnalytics.relocateMedia.useMutation`. */
|
|
1027
|
+
export declare const usePipelineAnalyticsRelocateMedia: typeof trpc.pipelineAnalytics.relocateMedia.useMutation;
|
|
1028
|
+
/** Generated alias around `trpc.pipelineAnalytics.getMediaRelocateStatus.useQuery`. */
|
|
1029
|
+
export declare const usePipelineAnalyticsGetMediaRelocateStatus: typeof trpc.pipelineAnalytics.getMediaRelocateStatus.useQuery;
|
|
1030
|
+
/** Generated alias around `trpc.pipelineAnalytics.cancelMediaRelocate.useMutation`. */
|
|
1031
|
+
export declare const usePipelineAnalyticsCancelMediaRelocate: typeof trpc.pipelineAnalytics.cancelMediaRelocate.useMutation;
|
|
1020
1032
|
/** Generated alias around `trpc.pipelineAnalytics.listOpsLog.useQuery`. */
|
|
1021
1033
|
export declare const usePipelineAnalyticsListOpsLog: typeof trpc.pipelineAnalytics.listOpsLog.useQuery;
|
|
1022
1034
|
/** Generated alias around `trpc.pipelineAnalytics.getEventMedia.useQuery`. */
|
|
@@ -1313,6 +1325,16 @@ export declare const useRecordingPruneFootage: typeof trpc.recording.pruneFootag
|
|
|
1313
1325
|
export declare const useRecordingDeleteFootprint: typeof trpc.recording.deleteFootprint.useMutation;
|
|
1314
1326
|
/** Generated alias around `trpc.recording.listOpsLog.useQuery`. */
|
|
1315
1327
|
export declare const useRecordingListOpsLog: typeof trpc.recording.listOpsLog.useQuery;
|
|
1328
|
+
/** Generated alias around `trpc.recording.renderGif.useMutation`. */
|
|
1329
|
+
export declare const useRecordingRenderGif: typeof trpc.recording.renderGif.useMutation;
|
|
1330
|
+
/** Generated alias around `trpc.recording.renderClip.useMutation`. */
|
|
1331
|
+
export declare const useRecordingRenderClip: typeof trpc.recording.renderClip.useMutation;
|
|
1332
|
+
/** Generated alias around `trpc.recording.relocateFootage.useMutation`. */
|
|
1333
|
+
export declare const useRecordingRelocateFootage: typeof trpc.recording.relocateFootage.useMutation;
|
|
1334
|
+
/** Generated alias around `trpc.recording.getRelocateStatus.useQuery`. */
|
|
1335
|
+
export declare const useRecordingGetRelocateStatus: typeof trpc.recording.getRelocateStatus.useQuery;
|
|
1336
|
+
/** Generated alias around `trpc.recording.cancelRelocate.useMutation`. */
|
|
1337
|
+
export declare const useRecordingCancelRelocate: typeof trpc.recording.cancelRelocate.useMutation;
|
|
1316
1338
|
/** Generated alias around `trpc.recording.getStatus.useQuery`. */
|
|
1317
1339
|
export declare const useRecordingGetStatus: typeof trpc.recording.getStatus.useQuery;
|
|
1318
1340
|
/** Generated alias around `trpc.recording.getDeviceSettingsContribution.useQuery`. */
|
|
@@ -1453,6 +1475,8 @@ export declare const useStreamBrokerRetractCameraStream: typeof trpc.streamBroke
|
|
|
1453
1475
|
export declare const useStreamBrokerAssignProfile: typeof trpc.streamBroker.assignProfile.useMutation;
|
|
1454
1476
|
/** Generated alias around `trpc.streamBroker.unassignProfile.useMutation`. */
|
|
1455
1477
|
export declare const useStreamBrokerUnassignProfile: typeof trpc.streamBroker.unassignProfile.useMutation;
|
|
1478
|
+
/** Generated alias around `trpc.streamBroker.renderPreBufferClip.useMutation`. */
|
|
1479
|
+
export declare const useStreamBrokerRenderPreBufferClip: typeof trpc.streamBroker.renderPreBufferClip.useMutation;
|
|
1456
1480
|
/** Generated alias around `trpc.streamBroker.listAllCameraStreams.useQuery`. */
|
|
1457
1481
|
export declare const useStreamBrokerListAllCameraStreams: typeof trpc.streamBroker.listAllCameraStreams.useQuery;
|
|
1458
1482
|
/** 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 {};
|