@camstack/ui-library 1.2.174 → 1.2.176

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.
@@ -21,6 +21,18 @@ export interface GridLayoutCell {
21
21
  /** Where it lands, normalized against the CANVAS. */
22
22
  readonly cell: GridNormalizedRect;
23
23
  }
24
+ /**
25
+ * Which profiles this grid can compose, and which sources stop it.
26
+ *
27
+ * Read-only in the editor. The operator does not choose what is on offer — the
28
+ * source cameras do, by what they have assigned — and a checkbox that pretended
29
+ * otherwise would publish a composition with a hole in it.
30
+ */
31
+ export interface GridProfileOffer {
32
+ readonly profile: 'high' | 'mid' | 'low';
33
+ readonly offered: boolean;
34
+ readonly missingSources: readonly number[];
35
+ }
24
36
  export interface GridLayoutView {
25
37
  readonly instanceId: string;
26
38
  readonly deviceId: number;
@@ -29,6 +41,7 @@ export interface GridLayoutView {
29
41
  readonly height: number;
30
42
  readonly fps: number;
31
43
  readonly cells: readonly GridLayoutCell[];
44
+ readonly profiles: readonly GridProfileOffer[];
32
45
  }
33
46
  /**
34
47
  * What a read of the grid can be.
@@ -39,7 +52,14 @@ export interface GridLayoutView {
39
52
  * which is exactly the failure D315 exists to stop.
40
53
  */
41
54
  export type GridLayoutReadOutcome = GridLayoutView | null | 'unreadable';
42
- /** Parse the `getGridForDevice` reply. See {@link GridLayoutReadOutcome}. */
55
+ /**
56
+ * Parse the `camera-grid-layout.getLayout` reply. See {@link GridLayoutReadOutcome}.
57
+ *
58
+ * The cap answers the view itself, or `null` — there is no envelope. It used to
59
+ * come back as `{ grid }` from `addons.custom`, which was the mechanism the
60
+ * widget reached the addon through before the geometry had a capability of its
61
+ * own; the widget now asks THE CAMERA and the envelope went with the bridge.
62
+ */
43
63
  export declare function parseGridView(raw: unknown): GridLayoutReadOutcome;
44
64
  /**
45
65
  * Keep a rectangle inside the unit square.
@@ -1549,10 +1549,10 @@ export declare const usePtzGetHomePreset: typeof trpc.ptz.getHomePreset.useQuery
1549
1549
  export declare const usePtzSetHomePreset: typeof trpc.ptz.setHomePreset.useMutation;
1550
1550
  /** Generated alias around `trpc.ptz.captureHomeHere.useMutation`. */
1551
1551
  export declare const usePtzCaptureHomeHere: typeof trpc.ptz.captureHomeHere.useMutation;
1552
- /** Generated alias around `trpc.ptz.getHomeReturnSeconds.useQuery`. */
1553
- export declare const usePtzGetHomeReturnSeconds: typeof trpc.ptz.getHomeReturnSeconds.useQuery;
1554
- /** Generated alias around `trpc.ptz.setHomeReturnSeconds.useMutation`. */
1555
- export declare const usePtzSetHomeReturnSeconds: typeof trpc.ptz.setHomeReturnSeconds.useMutation;
1552
+ /** Generated alias around `trpc.ptz.getHomeReturn.useQuery`. */
1553
+ export declare const usePtzGetHomeReturn: typeof trpc.ptz.getHomeReturn.useQuery;
1554
+ /** Generated alias around `trpc.ptz.setHomeReturn.useMutation`. */
1555
+ export declare const usePtzSetHomeReturn: typeof trpc.ptz.setHomeReturn.useMutation;
1556
1556
  /** Generated alias around `trpc.ptz.getPosition.useQuery`. */
1557
1557
  export declare const usePtzGetPosition: typeof trpc.ptz.getPosition.useQuery;
1558
1558
  /** Generated alias around `trpc.ptz.setAutofocus.useMutation`. */
@@ -5,6 +5,11 @@ import { UseDeviceProxyTrpc } from './use-device-proxy';
5
5
  * cap so the cap surface stays speed-vector-shaped.
6
6
  */
7
7
  export type PTZDirection = 'up' | 'down' | 'left' | 'right' | 'up-left' | 'up-right' | 'down-left' | 'down-right';
8
+ /** The camera's idle-return behaviour: whether, and after how long. */
9
+ interface PTZHomeReturn {
10
+ readonly enabled: boolean;
11
+ readonly seconds: number;
12
+ }
8
13
  /** Which preset `goHome` targets on this camera, and who decided it. */
9
14
  interface PTZHomePreset {
10
15
  readonly presetId: string | null;
@@ -82,9 +87,13 @@ export interface UsePTZResult {
82
87
  * not a preset can accept.
83
88
  */
84
89
  readonly captureHomeHere: () => Promise<void>;
85
- /** Idle seconds before the camera returns home by itself; `null` = no timer. */
86
- readonly homeReturnSeconds: number | null;
87
- readonly setHomeReturnSeconds: (seconds: number) => Promise<void>;
90
+ /**
91
+ * Whether the camera returns home by itself when left idle, and after how
92
+ * long. `null` = it has no such behaviour. The two are ONE fact on the
93
+ * camera and are read and written together.
94
+ */
95
+ readonly homeReturn: PTZHomeReturn | null;
96
+ readonly setHomeReturn: (enabled: boolean, seconds: number) => Promise<void>;
88
97
  /** Jump to a named preset. */
89
98
  readonly goToPreset: (presetId: string) => Promise<void>;
90
99
  /**