@camstack/ui-library 1.2.206 → 1.2.208

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.
@@ -0,0 +1,28 @@
1
+ import { ExtensionSlotSource, ExtensionSlotState } from '@camstack/types';
2
+ import { TrackedOption } from './extensions-view-state.js';
3
+ export interface SlotSourceListProps {
4
+ readonly sources: readonly ExtensionSlotSource[];
5
+ /** The tracked-event opt-in, when the slot carries one. */
6
+ readonly tracked?: readonly number[] | undefined;
7
+ }
8
+ /** The saved sources, each with its health — a bad one is shown, never hidden. */
9
+ export declare function SlotSourceList({ sources, tracked }: SlotSourceListProps): import("react").JSX.Element;
10
+ export interface AssociationSlotCardProps {
11
+ readonly deviceId: number;
12
+ readonly row: ExtensionSlotState;
13
+ readonly onSaved: () => void;
14
+ }
15
+ export interface ActivationLineProps {
16
+ readonly row: ExtensionSlotState;
17
+ }
18
+ export interface ImpliedSourceListProps {
19
+ readonly sources: readonly ExtensionSlotSource[];
20
+ readonly tracked?: readonly number[] | undefined;
21
+ }
22
+ export interface TrackedTogglesProps {
23
+ readonly options: readonly TrackedOption[];
24
+ readonly tracked: readonly number[];
25
+ readonly nameOf: (id: number) => string;
26
+ readonly onToggle: (id: number) => void;
27
+ }
28
+ export declare function AssociationSlotCard({ deviceId, row, onSaved }: AssociationSlotCardProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface ExtensionsPanelProps {
2
+ readonly deviceId: number;
3
+ }
4
+ export declare function ExtensionsPanel({ deviceId }: ExtensionsPanelProps): import("react").JSX.Element;
@@ -0,0 +1,89 @@
1
+ import { ExtensionCandidate, ExtensionSlotCardinality, ExtensionSlotRow, ExtensionSlotState, ExtensionSlotUnreachable, ExtensionSlotValue } from '@camstack/types';
2
+ /** The one field of a query error this module reads. */
3
+ export interface ExtensionsQueryError {
4
+ readonly message: string;
5
+ }
6
+ /** The fields of a query result this module reads — nothing else. */
7
+ export interface ExtensionsQueryView {
8
+ readonly status: 'pending' | 'error' | 'success';
9
+ readonly data?: readonly ExtensionSlotRow[] | undefined;
10
+ readonly error?: ExtensionsQueryError | null;
11
+ }
12
+ /** Nobody has answered yet. */
13
+ export interface ExtensionsPendingView {
14
+ readonly kind: 'pending';
15
+ }
16
+ /** The read FAILED — not an answer, so not absence either. */
17
+ export interface ExtensionsUnknownView {
18
+ readonly kind: 'unknown';
19
+ readonly reason: string;
20
+ }
21
+ /** Answered with nothing — the only state that may say "no extensions". */
22
+ export interface ExtensionsNoneView {
23
+ readonly kind: 'none';
24
+ }
25
+ /** Cards in table order, and every owner that could not answer. */
26
+ export interface ExtensionsRowsView {
27
+ readonly kind: 'rows';
28
+ readonly slots: readonly ExtensionSlotState[];
29
+ readonly unreachable: readonly ExtensionSlotUnreachable[];
30
+ }
31
+ export type ExtensionsView = ExtensionsPendingView | ExtensionsUnknownView | ExtensionsNoneView | ExtensionsRowsView;
32
+ export declare function resolveExtensionsView(query: ExtensionsQueryView): ExtensionsView;
33
+ /** Add or remove one pick. `one` replaces; `many` toggles. */
34
+ export declare function togglePick(draft: readonly number[], deviceId: number, cardinality: ExtensionSlotCardinality): readonly number[];
35
+ /** Suggested candidates the operator has NOT picked — shown to confirm, never saved on their own (D356). */
36
+ export declare function pendingSuggestions(candidates: readonly ExtensionCandidate[], draft: readonly number[]): readonly ExtensionCandidate[];
37
+ /** Candidates matching a free-text search, not already picked. */
38
+ export declare function searchCandidates(candidates: readonly ExtensionCandidate[], draft: readonly number[], query: string): readonly ExtensionCandidate[];
39
+ /** Whether the draft differs from what the owner's store holds. */
40
+ export declare function isDirty(saved: readonly number[], draft: readonly number[]): boolean;
41
+ /**
42
+ * The tracked-event opt-in a slot's value carries, or `undefined` when it
43
+ * carries none — every slot but `linked-devices`, and a `linked-devices` row
44
+ * from a server older than D655. `undefined` is "this owner offers no
45
+ * opt-in", never "nothing is opted in": the card then shows no toggle rather
46
+ * than a row of unticked ones it could not save.
47
+ */
48
+ export declare function trackedOptInOf(value: ExtensionSlotValue): readonly number[] | undefined;
49
+ /** Flip one device's tracked-event opt-in. */
50
+ export declare function toggleTracked(tracked: readonly number[], deviceId: number): readonly number[];
51
+ /** Whether two opt-ins differ as SETS — the order carries no meaning. */
52
+ export declare function isTrackedDirty(saved: readonly number[], draft: readonly number[]): boolean;
53
+ /** Where a tracked-event toggle comes from — said next to it. */
54
+ export type TrackedOptionOrigin = 'pick' | 'implied' | 'not-linked';
55
+ /** One device the editor offers a tracked-event toggle for. */
56
+ export interface TrackedOption {
57
+ readonly deviceId: number;
58
+ readonly origin: TrackedOptionOrigin;
59
+ }
60
+ /** What `trackedOptions` builds the toggle list from. */
61
+ export interface TrackedOptionsInput {
62
+ /** The draft picks. */
63
+ readonly picks: readonly number[];
64
+ /** Saved picks that are not a valid source (a container, D356) — no toggle. */
65
+ readonly invalidPicks: readonly number[];
66
+ /** Linked by the owner's own structure (`impliedSources`). */
67
+ readonly implied: readonly number[];
68
+ /** The draft opt-in. */
69
+ readonly tracked: readonly number[];
70
+ }
71
+ /**
72
+ * One toggle per device the camera links — the old section's set (D655):
73
+ * the valid picks, then what the owner links by structure (tree children, a
74
+ * picked container's child — never the container itself, D356), then every
75
+ * opted-in device that is linked no more, so a stored opt-in is always
76
+ * visible and can always be removed.
77
+ */
78
+ export declare function trackedOptions(input: TrackedOptionsInput): readonly TrackedOption[];
79
+ /**
80
+ * The opt-in after one device is removed from the draft picks: its toggle
81
+ * goes with it, unless the camera still links it by structure.
82
+ */
83
+ export declare function untrackUnpicked(tracked: readonly number[], deviceId: number, implied: readonly number[]): readonly number[];
84
+ /**
85
+ * The value a Save sends. The opt-in travels only when the owner offered one,
86
+ * and then WHOLE: it replaces the stored one, and the owner accepts any id it
87
+ * already stored, so what was read can be sent back unchanged (D655).
88
+ */
89
+ export declare function slotWriteValue(saved: ExtensionSlotValue, deviceIds: readonly number[], tracked: readonly number[] | undefined): ExtensionSlotValue;
@@ -423,6 +423,14 @@ export declare const useDeviceExportGetDeviceSettingsContribution: typeof trpc.d
423
423
  export declare const useDeviceExportGetDeviceLiveContribution: typeof trpc.deviceExport.getDeviceLiveContribution.useQuery;
424
424
  /** Generated alias around `trpc.deviceExport.applyDeviceSettingsPatch.useMutation`. */
425
425
  export declare const useDeviceExportApplyDeviceSettingsPatch: typeof trpc.deviceExport.applyDeviceSettingsPatch.useMutation;
426
+ /** Generated alias around `trpc.deviceExtension.listSources.useQuery`. */
427
+ export declare const useDeviceExtensionListSources: typeof trpc.deviceExtension.listSources.useQuery;
428
+ /** Generated alias around `trpc.deviceExtension.listSlots.useQuery`. */
429
+ export declare const useDeviceExtensionListSlots: typeof trpc.deviceExtension.listSlots.useQuery;
430
+ /** Generated alias around `trpc.deviceExtension.listCandidates.useQuery`. */
431
+ export declare const useDeviceExtensionListCandidates: typeof trpc.deviceExtension.listCandidates.useQuery;
432
+ /** Generated alias around `trpc.deviceExtension.setSlot.useMutation`. */
433
+ export declare const useDeviceExtensionSetSlot: typeof trpc.deviceExtension.setSlot.useMutation;
426
434
  /** Generated alias around `trpc.deviceManager.allocateDeviceId.useMutation`. */
427
435
  export declare const useDeviceManagerAllocateDeviceId: typeof trpc.deviceManager.allocateDeviceId.useMutation;
428
436
  /** Generated alias around `trpc.deviceManager.migrateDevice.useMutation`. */
@@ -601,12 +609,6 @@ export declare const useDeviceManagerTestField: typeof trpc.deviceManager.testFi
601
609
  export declare const useDeviceManagerGetDeviceStatusAggregate: typeof trpc.deviceManager.getDeviceStatusAggregate.useQuery;
602
610
  /** Generated alias around `trpc.deviceManager.getDeviceStatusAggregateBatch.useQuery`. */
603
611
  export declare const useDeviceManagerGetDeviceStatusAggregateBatch: typeof trpc.deviceManager.getDeviceStatusAggregateBatch.useQuery;
604
- /** Generated alias around `trpc.deviceManager.getDeviceSettingsContribution.useQuery`. */
605
- export declare const useDeviceManagerGetDeviceSettingsContribution: typeof trpc.deviceManager.getDeviceSettingsContribution.useQuery;
606
- /** Generated alias around `trpc.deviceManager.getDeviceLiveContribution.useQuery`. */
607
- export declare const useDeviceManagerGetDeviceLiveContribution: typeof trpc.deviceManager.getDeviceLiveContribution.useQuery;
608
- /** Generated alias around `trpc.deviceManager.applyDeviceSettingsPatch.useMutation`. */
609
- export declare const useDeviceManagerApplyDeviceSettingsPatch: typeof trpc.deviceManager.applyDeviceSettingsPatch.useMutation;
610
612
  /** Generated alias around `trpc.deviceOps.getStreamSources.useQuery`. */
611
613
  export declare const useDeviceOpsGetStreamSources: typeof trpc.deviceOps.getStreamSources.useQuery;
612
614
  /** Generated alias around `trpc.deviceOps.getConfigEntries.useQuery`. */
@@ -661,12 +663,6 @@ export declare const useDeviceStateSetCapSlice: typeof trpc.deviceState.setCapSl
661
663
  export declare const useDeviceStatusGetStatus: typeof trpc.deviceStatus.getStatus.useQuery;
662
664
  /** Generated alias around `trpc.doorbell.getStatus.useQuery`. */
663
665
  export declare const useDoorbellGetStatus: typeof trpc.doorbell.getStatus.useQuery;
664
- /** Generated alias around `trpc.doorbell.getDeviceSettingsContribution.useQuery`. */
665
- export declare const useDoorbellGetDeviceSettingsContribution: typeof trpc.doorbell.getDeviceSettingsContribution.useQuery;
666
- /** Generated alias around `trpc.doorbell.getDeviceLiveContribution.useQuery`. */
667
- export declare const useDoorbellGetDeviceLiveContribution: typeof trpc.doorbell.getDeviceLiveContribution.useQuery;
668
- /** Generated alias around `trpc.doorbell.applyDeviceSettingsPatch.useMutation`. */
669
- export declare const useDoorbellApplyDeviceSettingsPatch: typeof trpc.doorbell.applyDeviceSettingsPatch.useMutation;
670
666
  /** Generated alias around `trpc.enumSensor.getStatus.useQuery`. */
671
667
  export declare const useEnumSensorGetStatus: typeof trpc.enumSensor.getStatus.useQuery;
672
668
  /** Generated alias around `trpc.eventEmitter.getStatus.useQuery`. */
@@ -1385,6 +1381,8 @@ export declare const usePipelineOrchestratorGetPipelineAssignments: typeof trpc.
1385
1381
  export declare const usePipelineOrchestratorGetPipelineAssignment: typeof trpc.pipelineOrchestrator.getPipelineAssignment.useQuery;
1386
1382
  /** Generated alias around `trpc.pipelineOrchestrator.getAgentLoad.useQuery`. */
1387
1383
  export declare const usePipelineOrchestratorGetAgentLoad: typeof trpc.pipelineOrchestrator.getAgentLoad.useQuery;
1384
+ /** Generated alias around `trpc.pipelineOrchestrator.getClusterModelChoice.useQuery`. */
1385
+ export declare const usePipelineOrchestratorGetClusterModelChoice: typeof trpc.pipelineOrchestrator.getClusterModelChoice.useQuery;
1388
1386
  /** Generated alias around `trpc.pipelineOrchestrator.getGlobalMetrics.useQuery`. */
1389
1387
  export declare const usePipelineOrchestratorGetGlobalMetrics: typeof trpc.pipelineOrchestrator.getGlobalMetrics.useQuery;
1390
1388
  /** Generated alias around `trpc.pipelineOrchestrator.getCameraMetrics.useQuery`. */