@camstack/ui-library 1.1.44 → 1.1.46

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.
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
+ export type StatusDotStatus = 'online' | 'offline' | 'disabled' | 'recording-continuous' | 'recording-events';
2
3
  export interface StatusDotProps {
3
- readonly status: 'online' | 'offline' | 'disabled';
4
+ readonly status: StatusDotStatus;
4
5
  /** Ms epoch of the last online→offline transition. Only used to enrich
5
6
  * the tooltip when `status === 'offline'`. */
6
7
  readonly lastChangedAt?: number | null;
@@ -1,6 +1,6 @@
1
1
  import { StepTreeNode } from './step-tree-master';
2
- import { AgentColumn, CellState } from './pipeline-matrix-shared';
3
- export type { AgentColumn, CellState } from './pipeline-matrix-shared';
2
+ import { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
3
+ export type { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
4
4
  /**
5
5
  * Per-camera gate state for a step (node-independent). `zone-driven` steps
6
6
  * (package-detection) sit OUTSIDE the gate — a badge, never a switch.
@@ -17,12 +17,9 @@ export interface DeviceStepMatrixProps {
17
17
  readonly tree: readonly StepTreeNode[];
18
18
  readonly agents: readonly AgentColumn[];
19
19
  readonly gateFor: (addonId: string) => StepGate;
20
- readonly getCellState: (addonId: string, agentNodeId: string) => CellState;
21
- readonly onCellClick: (addonId: string, agentNodeId: string) => void;
22
- readonly selectedCell: {
23
- readonly addonId: string;
24
- readonly agentNodeId: string;
25
- } | null;
20
+ readonly getCellState: (addonId: string, agent: AgentColumn) => CellState;
21
+ readonly onCellClick: (addonId: string, agent: AgentColumn) => void;
22
+ readonly selectedCell: MatrixSelectedCell | null;
26
23
  /** `next: null` resets the gate to the catalog default (inherit). */
27
24
  readonly onSetGate: (addonId: string, next: boolean | null) => void;
28
25
  readonly gateBusy?: boolean;
@@ -11,7 +11,8 @@ export { PipelineTreeMatrix } from './pipeline-tree-matrix';
11
11
  export type { PipelineTreeMatrixProps, AgentColumn, CellState } from './pipeline-tree-matrix';
12
12
  export { DeviceStepMatrix } from './device-step-matrix';
13
13
  export type { DeviceStepMatrixProps, StepGate } from './device-step-matrix';
14
- export { shouldUseSingleNode } from './pipeline-matrix-shared';
14
+ export { shouldUseSingleNode, agentColumnKey, groupAgentColumns } from './pipeline-matrix-shared';
15
+ export type { AgentColumnGroup, AgentColumnIdentity, MatrixSelectedCell } from './pipeline-matrix-shared';
15
16
  export { NodePicker } from './node-picker';
16
17
  export type { NodePickerProps } from './node-picker';
17
18
  export * from './status-badge';
@@ -135,3 +136,5 @@ export type { MaskShapeItem, MaskShapeCanvasProps } from './cap-settings/MaskSha
135
136
  export * from './widget-panel.js';
136
137
  export { GroupedModelSelector } from './grouped-model-selector';
137
138
  export type { GroupedModelSelectorProps } from './grouped-model-selector';
139
+ export { ModelPicker } from './model-picker';
140
+ export type { ModelOption } from './model-picker';
@@ -0,0 +1,25 @@
1
+ import { PipelineAddonSchema } from '@camstack/types';
2
+ export type ModelOption = PipelineAddonSchema['models'][number];
3
+ /**
4
+ * Shared model picker — the ONE model-selection control across the app.
5
+ *
6
+ * Renders the grouped Family→Tier→Resolution→Variant selector
7
+ * ({@link GroupedModelSelector}) when the step's models declare variant groups
8
+ * (yolo26 / yolov9 …), else a flat `<select>` (face / plate / classifier
9
+ * catalogs and operator-registered custom models). Custom / ungrouped ids stay
10
+ * selectable via an "Other models" flat select alongside the grouped picker, and
11
+ * a legacy/removed pin is surfaced with an explicit banner rather than a
12
+ * silently mis-highlighted chip.
13
+ *
14
+ * Used by the pipeline stepper (`PipelineStep`), the agent/device step editor
15
+ * (`AgentStepEditor`), and the benchmark — so the picker looks identical
16
+ * everywhere. `value === ''` renders nothing selected (callers that support an
17
+ * "Auto / node default" mode own that affordance and hide this picker while it
18
+ * is active).
19
+ */
20
+ export declare function ModelPicker({ models, value, onChange, disabled, }: {
21
+ readonly models: readonly ModelOption[];
22
+ readonly value: string;
23
+ readonly onChange: (id: string) => void;
24
+ readonly disabled?: boolean;
25
+ }): import("react").JSX.Element;
@@ -4,7 +4,60 @@ import { StepTreeNode } from './step-tree-master';
4
4
  export interface AgentColumn {
5
5
  readonly agentNodeId: string;
6
6
  readonly engineLabel: string;
7
+ /**
8
+ * When set, this column is a per-device sub-column of its node — one enabled
9
+ * inference accelerator (C7.4). MULTIPLE `AgentColumn`s with the SAME
10
+ * `agentNodeId` and distinct `deviceKey` expand a node into device columns.
11
+ * A column with `deviceKey` undefined is a plain per-node column (today's
12
+ * behaviour — rendered identically).
13
+ */
14
+ readonly deviceKey?: string;
15
+ /** Short human label for the device sub-column header (e.g. "Intel NPU"). */
16
+ readonly deviceLabel?: string;
7
17
  }
18
+ /**
19
+ * Stable column identity. Plain per-node columns key by `agentNodeId` (so the
20
+ * rendered `key` is byte-identical to the pre-C7.4 matrix); device sub-columns
21
+ * disambiguate with their `deviceKey`. MUST be used everywhere a React `key`,
22
+ * selection compare, or column identity is derived.
23
+ */
24
+ export declare function agentColumnKey(a: AgentColumnIdentity): string;
25
+ /** Minimal identity shape shared by `AgentColumn` and `MatrixSelectedCell`. */
26
+ export interface AgentColumnIdentity {
27
+ readonly agentNodeId: string;
28
+ readonly deviceKey?: string;
29
+ }
30
+ /**
31
+ * The currently-selected cell, identified by step addon + column identity.
32
+ * A plain per-node selection carries no `deviceKey` (so existing consumers pass
33
+ * their `{ addonId, agentNodeId }` state unchanged); a per-device selection adds
34
+ * the `deviceKey` of the picked sub-column.
35
+ */
36
+ export interface MatrixSelectedCell {
37
+ readonly addonId: string;
38
+ readonly agentNodeId: string;
39
+ readonly deviceKey?: string;
40
+ }
41
+ /**
42
+ * A node's header super-cell: one node grouping ONE or MORE consecutive
43
+ * `AgentColumn`s (device sub-columns) that share its `agentNodeId`.
44
+ * - `grouped: false` — a single plain column (no `deviceKey`): the header
45
+ * renders EXACTLY the pre-C7.4 single node header (node name + engineLabel).
46
+ * - `grouped: true` — 2+ device sub-columns: a node super-label spanning the
47
+ * sub-columns, with a per-device sub-label row beneath.
48
+ */
49
+ export interface AgentColumnGroup {
50
+ readonly agentNodeId: string;
51
+ readonly engineLabel: string;
52
+ readonly columns: readonly AgentColumn[];
53
+ readonly grouped: boolean;
54
+ }
55
+ /**
56
+ * Coalesce CONSECUTIVE columns that share an `agentNodeId` into node groups.
57
+ * Order-preserving: the flat column order is untouched, so body cells still map
58
+ * 1:1 to `agents`. A run of length 1 is a plain (ungrouped) node header.
59
+ */
60
+ export declare function groupAgentColumns(agents: readonly AgentColumn[]): readonly AgentColumnGroup[];
8
61
  /**
9
62
  * A single (step, node) cell's rendered state.
10
63
  * - `enabled` — the node runs a model for this step (chip + optional `ovr`).
@@ -56,6 +109,17 @@ export declare function ClassChips({ inputs, outputs, }: {
56
109
  readonly inputs: readonly string[];
57
110
  readonly outputs: readonly string[];
58
111
  }): import("react").JSX.Element | null;
112
+ /**
113
+ * Grouped node header (C7.4): a node super-label spanning its device
114
+ * sub-columns, with a per-device sub-label row beneath. Rendered ONLY for a
115
+ * node expanded into 2+ device sub-columns; a single plain column keeps each
116
+ * matrix's own byte-identical single-header markup. The spanning cell uses
117
+ * `gridColumn: span N` so it aligns to its N body columns; the inner flex row
118
+ * gives each device its own equal-width, padded sub-label slot.
119
+ */
120
+ export declare function GroupedAgentHeader({ group }: {
121
+ readonly group: AgentColumnGroup;
122
+ }): import("react").JSX.Element;
59
123
  /** Step label (slot heading + addon name + class chips), shared by both views. */
60
124
  export declare function StepLabel({ node }: {
61
125
  readonly node: StepTreeNode;
@@ -1,15 +1,12 @@
1
1
  import { StepTreeNode } from './step-tree-master';
2
- import { AgentColumn, CellState } from './pipeline-matrix-shared';
3
- export type { AgentColumn, CellState } from './pipeline-matrix-shared';
2
+ import { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
3
+ export type { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
4
4
  export interface PipelineTreeMatrixProps {
5
5
  readonly tree: readonly StepTreeNode[];
6
6
  readonly agents: readonly AgentColumn[];
7
- readonly getCellState: (addonId: string, agentNodeId: string) => CellState;
8
- readonly onCellClick: (addonId: string, agentNodeId: string) => void;
9
- readonly selectedCell: {
10
- readonly addonId: string;
11
- readonly agentNodeId: string;
12
- } | null;
7
+ readonly getCellState: (addonId: string, agent: AgentColumn) => CellState;
8
+ readonly onCellClick: (addonId: string, agent: AgentColumn) => void;
9
+ readonly selectedCell: MatrixSelectedCell | null;
13
10
  /**
14
11
  * Optional inline on/off toggle next to each step name. Only useful
15
12
  * in single-agent mode (per-node pipeline tab) where the row already
@@ -1013,8 +1013,6 @@ export declare const usePipelineExecutorGetAvailableEngines: typeof trpc.pipelin
1013
1013
  export declare const usePipelineExecutorGetSelectedEngine: typeof trpc.pipelineExecutor.getSelectedEngine.useQuery;
1014
1014
  /** Generated alias around `trpc.pipelineExecutor.getDefaultSteps.useQuery`. */
1015
1015
  export declare const usePipelineExecutorGetDefaultSteps: typeof trpc.pipelineExecutor.getDefaultSteps.useQuery;
1016
- /** Generated alias around `trpc.pipelineExecutor.reprobeEngine.useMutation`. */
1017
- export declare const usePipelineExecutorReprobeEngine: typeof trpc.pipelineExecutor.reprobeEngine.useMutation;
1018
1016
  /** Generated alias around `trpc.pipelineExecutor.getEngineProvisioning.useQuery`. */
1019
1017
  export declare const usePipelineExecutorGetEngineProvisioning: typeof trpc.pipelineExecutor.getEngineProvisioning.useQuery;
1020
1018
  /** Generated alias around `trpc.pipelineExecutor.getVideoPipelineSteps.useQuery`. */
@@ -1085,6 +1083,10 @@ export declare const usePipelineExecutorGetDetectionConfigSchema: typeof trpc.pi
1085
1083
  export declare const usePipelineOrchestratorAssignPipeline: typeof trpc.pipelineOrchestrator.assignPipeline.useMutation;
1086
1084
  /** Generated alias around `trpc.pipelineOrchestrator.unassignPipeline.useMutation`. */
1087
1085
  export declare const usePipelineOrchestratorUnassignPipeline: typeof trpc.pipelineOrchestrator.unassignPipeline.useMutation;
1086
+ /** Generated alias around `trpc.pipelineOrchestrator.setPipelineDevicePin.useMutation`. */
1087
+ export declare const usePipelineOrchestratorSetPipelineDevicePin: typeof trpc.pipelineOrchestrator.setPipelineDevicePin.useMutation;
1088
+ /** Generated alias around `trpc.pipelineOrchestrator.getPipelineDevicePin.useQuery`. */
1089
+ export declare const usePipelineOrchestratorGetPipelineDevicePin: typeof trpc.pipelineOrchestrator.getPipelineDevicePin.useQuery;
1088
1090
  /** Generated alias around `trpc.pipelineOrchestrator.rebalance.useMutation`. */
1089
1091
  export declare const usePipelineOrchestratorRebalance: typeof trpc.pipelineOrchestrator.rebalance.useMutation;
1090
1092
  /** Generated alias around `trpc.pipelineOrchestrator.getPipelineAssignments.useQuery`. */
@@ -1117,8 +1119,6 @@ export declare const usePipelineOrchestratorGetAudioAssignments: typeof trpc.pip
1117
1119
  export declare const usePipelineOrchestratorGetAgentSettings: typeof trpc.pipelineOrchestrator.getAgentSettings.useQuery;
1118
1120
  /** Generated alias around `trpc.pipelineOrchestrator.listAgentSettings.useQuery`. */
1119
1121
  export declare const usePipelineOrchestratorListAgentSettings: typeof trpc.pipelineOrchestrator.listAgentSettings.useQuery;
1120
- /** Generated alias around `trpc.pipelineOrchestrator.setAgentAddonDefaults.useMutation`. */
1121
- export declare const usePipelineOrchestratorSetAgentAddonDefaults: typeof trpc.pipelineOrchestrator.setAgentAddonDefaults.useMutation;
1122
1122
  /** Generated alias around `trpc.pipelineOrchestrator.removeAgentSettings.useMutation`. */
1123
1123
  export declare const usePipelineOrchestratorRemoveAgentSettings: typeof trpc.pipelineOrchestrator.removeAgentSettings.useMutation;
1124
1124
  /** Generated alias around `trpc.pipelineOrchestrator.setAgentMaxCameras.useMutation`. */
@@ -1129,6 +1129,10 @@ export declare const usePipelineOrchestratorSetAgentDetectWeight: typeof trpc.pi
1129
1129
  export declare const usePipelineOrchestratorSetAgentCapabilities: typeof trpc.pipelineOrchestrator.setAgentCapabilities.useMutation;
1130
1130
  /** Generated alias around `trpc.pipelineOrchestrator.setAgentReachableHost.useMutation`. */
1131
1131
  export declare const usePipelineOrchestratorSetAgentReachableHost: typeof trpc.pipelineOrchestrator.setAgentReachableHost.useMutation;
1132
+ /** Generated alias around `trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation`. */
1133
+ export declare const usePipelineOrchestratorSetAgentInferenceDevices: typeof trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation;
1134
+ /** Generated alias around `trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery`. */
1135
+ export declare const usePipelineOrchestratorGetNodeInferenceDevices: typeof trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery;
1132
1136
  /** Generated alias around `trpc.pipelineOrchestrator.resetNodePipelineDefaults.useMutation`. */
1133
1137
  export declare const usePipelineOrchestratorResetNodePipelineDefaults: typeof trpc.pipelineOrchestrator.resetNodePipelineDefaults.useMutation;
1134
1138
  /** Generated alias around `trpc.pipelineOrchestrator.getCameraSettings.useQuery`. */