@camstack/ui-library 1.2.245 → 1.2.247

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,17 @@
1
+ /**
2
+ * The ONE name of an inference accelerator, everywhere it is shown: the step
3
+ * matrix's column headers, the load-balancing rows, the camera assignments
4
+ * table, Model Studio's device chips. Four pages had drifted into four
5
+ * spellings of the same device — the Mac mini's Neural Engine read "Coreml All"
6
+ * in the step matrix and "Apple ANE" on Load balancing.
7
+ */
8
+ /** What naming needs from a device row (`NodeInferenceDevice` satisfies it). */
9
+ export interface AcceleratorIdentity {
10
+ readonly key: string;
11
+ readonly backend: string;
12
+ readonly device: string;
13
+ }
14
+ /** "Intel NPU", "Apple Neural Engine", "Coral Edge TPU", "CPU" — Auto tune's names too. */
15
+ export declare function acceleratorLabel(device: AcceleratorIdentity): string;
16
+ /** "NPU", "ANE", "Coral", "CPU" — chips and tabs. */
17
+ export declare function acceleratorShortLabel(device: AcceleratorIdentity): string;
@@ -48,8 +48,8 @@ export interface AgentStepEditorProps {
48
48
  /**
49
49
  * AgentStepEditor — one step on ONE accelerator: its model and its settings,
50
50
  * as a single node-level layer. Model Studio's "settings for this installed
51
- * model" dialog uses it. The pipeline pages use the step inspector, which lays
52
- * the same parts out across accelerators and layers (D754/D756); the settings
53
- * form here is that inspector's `LayeredSettingsForm` with one layer.
51
+ * model" dialog uses it. The pipeline pages use the step matrix's panel, which lays
52
+ * the same parts out across accelerators and layers (D754/D757); the settings
53
+ * form here is that panel's `LayeredSettingsForm` with one layer.
54
54
  */
55
55
  export declare function AgentStepEditor({ addon, agentDefault, onChangeAgentConfig, engineFormat, effectiveModelId, rootModel, }: AgentStepEditorProps): import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { StepTreeNode } from './step-tree';
2
3
  import { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
3
4
  export type { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
@@ -5,10 +6,32 @@ export interface DeviceStepMatrixProps {
5
6
  readonly tree: readonly StepTreeNode[];
6
7
  readonly agents: readonly AgentColumn[];
7
8
  readonly getCellState: (addonId: string, agent: AgentColumn) => CellState;
8
- readonly onCellClick: (addonId: string, agent: AgentColumn) => void;
9
+ /** `viaKeyboard`: opened with Enter / Space (a host moves focus into its panel). */
10
+ readonly onCellClick: (addonId: string, agent: AgentColumn, viaKeyboard?: boolean) => void;
9
11
  readonly selectedCell: MatrixSelectedCell | null;
10
12
  /** Single-node fallback (B): which node the one column shows. */
11
13
  readonly fallbackNodeId: string | null;
12
14
  readonly onFallbackNodeChange: (nodeId: string) => void;
15
+ /** A step's header was activated — open the step on the selected accelerator. */
16
+ readonly onStepClick?: (addonId: string, viaKeyboard?: boolean) => void;
17
+ /** A badge beside a step's name (the camera's gate). */
18
+ readonly stepBadge?: (addonId: string) => ReactNode;
19
+ /** Width a docked panel covers at the viewport's right edge; 0 = none. */
20
+ readonly reserveRightPx?: number;
21
+ /** Accessible name of the grid. */
22
+ readonly label?: string;
13
23
  }
14
- export declare function DeviceStepMatrix({ tree, agents, getCellState, onCellClick, selectedCell, fallbackNodeId, onFallbackNodeChange, }: DeviceStepMatrixProps): import("react").JSX.Element;
24
+ /** Imperative focus, so a closing panel can hand focus back to its cell. */
25
+ export interface DeviceStepMatrixHandle {
26
+ /** `columnKey` = `agentColumnKey(column)`; `null` = the step's header. */
27
+ readonly focusCell: (addonId: string, columnKey: string | null) => void;
28
+ }
29
+ /** Where a key press moves the roving focus in a `rows × cols` grid. */
30
+ export declare function nextGridPosition(key: string, pos: {
31
+ readonly r: number;
32
+ readonly c: number;
33
+ }, rows: number, cols: number): {
34
+ readonly r: number;
35
+ readonly c: number;
36
+ } | null;
37
+ export declare const DeviceStepMatrix: import('react').ForwardRefExoticComponent<DeviceStepMatrixProps & import('react').RefAttributes<DeviceStepMatrixHandle>>;
@@ -1,5 +1,6 @@
1
1
  export { AddonGlobalSettingsForm } from './addon-global-settings-form';
2
2
  export type { AddonPageProps } from './addon-page-props';
3
+ export { type AcceleratorIdentity, acceleratorLabel, acceleratorShortLabel, } from './accelerator-label';
3
4
  export type { AgentStepEditorProps } from './agent-step-editor';
4
5
  export { AgentStepEditor, RootSuppliedModelNote, settingsModelIdFor, stepLocalFields, } from './agent-step-editor';
5
6
  export type { RootModelInfo } from './root-model-source';
@@ -102,8 +103,8 @@ export type { DeviceSelectCandidate, SuggestedPartition, SuggestionFleetDevice,
102
103
  export { deviceMatchesFilter, deviceOptionLabel, devicesToOptions, filterDeviceOptions, partitionSuggested, sameLocationSuggestions, selectedDeviceOptions, } from './device-select-filter';
103
104
  export type { DeviceSelectorTab, SelectorDevice } from './device-selector-picker';
104
105
  export { DeviceSelectorPicker, describeDeviceSelector, deviceTypeLabel, tabForSelector, } from './device-selector-picker';
105
- export type { DeviceStepMatrixProps } from './device-step-matrix';
106
- export { DeviceStepMatrix } from './device-step-matrix';
106
+ export type { DeviceStepMatrixHandle, DeviceStepMatrixProps } from './device-step-matrix';
107
+ export { DeviceStepMatrix, nextGridPosition } from './device-step-matrix';
107
108
  export { DiscoveryPanel } from './discovery-panel';
108
109
  export type { DoorbellRecentPanelProps } from './doorbell-recent-panel';
109
110
  export { DoorbellRecentPanel } from './doorbell-recent-panel';
@@ -1,23 +1,15 @@
1
- import { PipelineSchema, PipelineTemplate } from '@camstack/types';
1
+ import { PipelineSchema } from '@camstack/types';
2
2
  import { PipelineStepDisplayConfig } from './pipeline-step';
3
3
  export interface PipelineBuilderProps {
4
4
  readonly schema: PipelineSchema;
5
5
  readonly steps: readonly PipelineStepDisplayConfig[];
6
6
  readonly onChange: (steps: readonly PipelineStepDisplayConfig[]) => void;
7
- readonly templates: readonly PipelineTemplate[];
8
- readonly selectedTemplateId: string | null;
9
- readonly onSelectTemplate: (id: string | null) => void;
10
- readonly onSaveTemplate: (name: string, steps: readonly PipelineStepDisplayConfig[]) => void;
11
- readonly onUpdateTemplate: (id: string, steps: readonly PipelineStepDisplayConfig[]) => void;
12
- readonly onDeleteTemplate: (id: string) => void;
13
7
  readonly readOnly?: boolean;
14
8
  /** Addon IDs to exclude from the pipeline (e.g. 'motion-detection' for benchmark) */
15
9
  readonly excludeAddons?: readonly string[];
16
- /** Hide the template bar (save/load/delete) */
17
- readonly hideTemplates?: boolean;
18
10
  /** Only show enabled steps (hide disabled addons and placeholders) */
19
11
  readonly showOnlyEnabled?: boolean;
20
12
  /** Show "Slot: ..." labels above step groups (default: false) */
21
13
  readonly showSlotLabels?: boolean;
22
14
  }
23
- export declare function PipelineBuilder({ schema, steps, onChange, templates, selectedTemplateId, onSelectTemplate, onSaveTemplate, onUpdateTemplate, onDeleteTemplate, readOnly, excludeAddons, hideTemplates, showOnlyEnabled, showSlotLabels, }: PipelineBuilderProps): import("react").JSX.Element;
15
+ export declare function PipelineBuilder({ schema, steps, onChange, readOnly, excludeAddons, showOnlyEnabled, showSlotLabels, }: PipelineBuilderProps): import("react").JSX.Element;
@@ -14,6 +14,12 @@ export interface AgentColumn {
14
14
  readonly deviceKey?: string;
15
15
  /** Short human label for the device sub-column header (e.g. "Intel NPU"). */
16
16
  readonly deviceLabel?: string;
17
+ /** The node's display name for the group header (defaults to `agentNodeId`). */
18
+ readonly nodeLabel?: string;
19
+ /** A third header line — the model this accelerator elects for detection. */
20
+ readonly detail?: string;
21
+ /** The accelerator is switched off: shown, marked, and never a dispatch target. */
22
+ readonly disabled?: boolean;
17
23
  }
18
24
  /**
19
25
  * Stable column identity. Plain per-node columns key by `agentNodeId` (so the
@@ -164,6 +170,10 @@ export declare function ClassChips({ inputs, outputs, }: {
164
170
  * the first column; each device's real format is shown per sub-column instead
165
171
  * ("Coral Edge TPU · tflite").
166
172
  */
173
+ /** The per-accelerator lines of a column header: name, format, model, off. */
174
+ export declare function AgentColumnLines({ column }: {
175
+ readonly column: AgentColumn;
176
+ }): import("react").JSX.Element;
167
177
  export declare function GroupedAgentHeader({ group }: {
168
178
  readonly group: AgentColumnGroup;
169
179
  }): import("react").JSX.Element;
@@ -1,11 +1,8 @@
1
- export { AcceleratorTabs, type AcceleratorTabItem, type AcceleratorTabsProps, } from './accelerator-tabs';
2
1
  export { GateBadge, GateControl, type GateControlProps, type StepGate } from './gate-control';
3
2
  export { LayeredSettingsForm, type LayeredSettingsFormProps, type LayerLabels, type SettingsTarget, stepFieldDomId, } from './layered-settings-form';
4
3
  export { bindsToModel, defaultOfField, formatSettingValue, isValueField, type ValueField, } from './setting-values';
5
4
  export { SegmentedChoice, type SegmentedChoiceOption, type SegmentedChoiceProps, } from './segmented-choice';
6
- export { type StepChip, StepChips } from './step-chips';
7
- export { BackToStepsButton, fillHeightPx, StepInspectorLayout, type StepInspectorLayoutProps, } from './step-inspector-layout';
5
+ export { BackToStepsButton, dockBox, STEP_DOCK_WIDTH_PX, StepDetailDock, type StepDetailDockProps, } from './step-detail-dock';
8
6
  export { type SaveBarState, StepInspectorPanel, type StepInspectorPanelProps, } from './step-inspector-panel';
9
- export { searchSteps, StepList, type StepListHandle, type StepListProps, type StepListRow, } from './step-list';
10
- export { modelRowsAreFoldable, StepModelList, type StepModelListItem, } from './step-model-list';
11
7
  export { type ModelRowSource, StepModelRow, type StepModelRowProps } from './step-model-row';
8
+ export { searchSteps, type StepSearchHit, type StepSearchRow } from './step-search';
@@ -0,0 +1,33 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ /** Width of the desktop dock — what the matrix keeps clear of it. */
3
+ export declare const STEP_DOCK_WIDTH_PX = 432;
4
+ /** The dock's viewport box, from its scroll container's box. */
5
+ export declare function dockBox(input: {
6
+ readonly scroller: {
7
+ readonly top: number;
8
+ readonly bottom: number;
9
+ readonly right: number;
10
+ };
11
+ readonly viewportWidth: number;
12
+ readonly widthPx: number;
13
+ }): {
14
+ readonly top: number;
15
+ readonly height: number;
16
+ readonly right: number;
17
+ readonly width: number;
18
+ };
19
+ export interface StepDetailDockProps {
20
+ readonly open: boolean;
21
+ /** An element inside the page's scroll container (the matrix) — the dock measures from it. */
22
+ readonly anchor: RefObject<HTMLElement | null>;
23
+ /** The phone sheet was dismissed (Escape, back). */
24
+ readonly onClose: () => void;
25
+ /** Accessible name of the dock region. */
26
+ readonly label: string;
27
+ readonly children: ReactNode;
28
+ }
29
+ export declare function StepDetailDock({ open, anchor, onClose, label, children }: StepDetailDockProps): import("react").JSX.Element | null;
30
+ /** "‹ Steps" — the phone sheet's way back to the matrix. */
31
+ export declare function BackToStepsButton({ onClick }: {
32
+ readonly onClick: () => void;
33
+ }): import("react").JSX.Element;
@@ -7,13 +7,19 @@ export interface SaveBarState {
7
7
  readonly error?: string;
8
8
  readonly onSave: () => void;
9
9
  readonly onDiscard: () => void;
10
+ /**
11
+ * A control that decides WHAT Save writes, drawn on its own row right above
12
+ * the buttons — on a camera, "Applies to: this accelerator / all
13
+ * accelerators". Next to Save, so it is read at the moment of saving.
14
+ */
15
+ readonly scope?: ReactNode;
10
16
  }
11
17
  export interface StepInspectorPanelProps {
12
18
  readonly title: string;
13
19
  readonly subtitle?: ReactNode;
14
20
  /** Right of the title (the gate). */
15
21
  readonly headerActions?: ReactNode;
16
- /** Under the title (the accelerator tabs). */
22
+ /** Under the title. */
17
23
  readonly headerExtra?: ReactNode;
18
24
  /** Left of the title (the phone's "‹ Steps"). */
19
25
  readonly leading?: ReactNode;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The step matrix's filter (`/`): a step matches by its name, or by any of its
3
+ * field labels — so a question about a knob ("face size", "person") finds the
4
+ * step that owns it, and says which field it matched.
5
+ */
6
+ export interface StepSearchRow {
7
+ readonly addonId: string;
8
+ readonly name: string;
9
+ /** Every field label of the step, cluster-owned ones included. */
10
+ readonly fieldLabels: readonly string[];
11
+ }
12
+ export interface StepSearchHit {
13
+ readonly addonId: string;
14
+ /** The field label the query matched; absent for a name match. */
15
+ readonly matchedField?: string;
16
+ }
17
+ /** Steps matching `query` (all tokens in the name, or all in one field label). Empty query = all. */
18
+ export declare function searchSteps(rows: readonly StepSearchRow[], query: string): readonly StepSearchHit[];
@@ -31,15 +31,12 @@ export interface StreamChoice {
31
31
  readonly status?: string | null;
32
32
  /** Input FPS from camera (null if unavailable). */
33
33
  readonly inputFps?: number | null;
34
- /** Decoded FPS (null if unavailable). */
35
- readonly decodeFps?: number | null;
36
34
  /** Bitrate in kbps (null if unavailable). */
37
35
  readonly bitrateKbps?: number | null;
38
36
  }
39
37
  export interface StreamStats {
40
38
  readonly status: string;
41
39
  readonly inputFps: number;
42
- readonly decodeFps: number;
43
40
  readonly uptimeMs: number;
44
41
  }
45
42
  export interface StreamPanelProps {
@@ -371,32 +371,8 @@ export declare const useDayNightGetOptions: typeof trpc.dayNight.getOptions.useQ
371
371
  export declare const useDayNightSetSettings: typeof trpc.dayNight.setSettings.useMutation;
372
372
  /** Generated alias around `trpc.dayNight.getStatus.useQuery`. */
373
373
  export declare const useDayNightGetStatus: typeof trpc.dayNight.getStatus.useQuery;
374
- /** Generated alias around `trpc.decoder.supportsCodec.useQuery`. */
375
- export declare const useDecoderSupportsCodec: typeof trpc.decoder.supportsCodec.useQuery;
376
374
  /** Generated alias around `trpc.decoder.getInfo.useQuery`. */
377
375
  export declare const useDecoderGetInfo: typeof trpc.decoder.getInfo.useQuery;
378
- /** Generated alias around `trpc.decoder.createSession.useQuery`. */
379
- export declare const useDecoderCreateSession: typeof trpc.decoder.createSession.useQuery;
380
- /** Generated alias around `trpc.decoder.destroySession.useQuery`. */
381
- export declare const useDecoderDestroySession: typeof trpc.decoder.destroySession.useQuery;
382
- /** Generated alias around `trpc.decoder.pushPacket.useQuery`. */
383
- export declare const useDecoderPushPacket: typeof trpc.decoder.pushPacket.useQuery;
384
- /** Generated alias around `trpc.decoder.openStream.useQuery`. */
385
- export declare const useDecoderOpenStream: typeof trpc.decoder.openStream.useQuery;
386
- /** Generated alias around `trpc.decoder.pullFrames.useQuery`. */
387
- export declare const useDecoderPullFrames: typeof trpc.decoder.pullFrames.useQuery;
388
- /** Generated alias around `trpc.decoder.pullHandles.useQuery`. */
389
- export declare const useDecoderPullHandles: typeof trpc.decoder.pullHandles.useQuery;
390
- /** Generated alias around `trpc.decoder.getFrame.useQuery`. */
391
- export declare const useDecoderGetFrame: typeof trpc.decoder.getFrame.useQuery;
392
- /** Generated alias around `trpc.decoder.getShmStats.useQuery`. */
393
- export declare const useDecoderGetShmStats: typeof trpc.decoder.getShmStats.useQuery;
394
- /** Generated alias around `trpc.decoder.updateConfig.useQuery`. */
395
- export declare const useDecoderUpdateConfig: typeof trpc.decoder.updateConfig.useQuery;
396
- /** Generated alias around `trpc.decoder.getStats.useQuery`. */
397
- export declare const useDecoderGetStats: typeof trpc.decoder.getStats.useQuery;
398
- /** Generated alias around `trpc.decoder.listActiveSessions.useQuery`. */
399
- export declare const useDecoderListActiveSessions: typeof trpc.decoder.listActiveSessions.useQuery;
400
376
  /** Generated alias around `trpc.decoder.reprobeHwaccel.useMutation`. */
401
377
  export declare const useDecoderReprobeHwaccel: typeof trpc.decoder.reprobeHwaccel.useMutation;
402
378
  /** Generated alias around `trpc.detectionPipeline.getDeviceSettingsContribution.useQuery`. */
@@ -1395,14 +1371,6 @@ export declare const usePipelineExecutorGetGlobalPipelineConfig: typeof trpc.pip
1395
1371
  export declare const usePipelineExecutorGetOrchestratorConfigSchema: typeof trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery;
1396
1372
  /** Generated alias around `trpc.pipelineExecutor.validatePipeline.useQuery`. */
1397
1373
  export declare const usePipelineExecutorValidatePipeline: typeof trpc.pipelineExecutor.validatePipeline.useQuery;
1398
- /** Generated alias around `trpc.pipelineExecutor.listTemplates.useQuery`. */
1399
- export declare const usePipelineExecutorListTemplates: typeof trpc.pipelineExecutor.listTemplates.useQuery;
1400
- /** Generated alias around `trpc.pipelineExecutor.saveTemplate.useMutation`. */
1401
- export declare const usePipelineExecutorSaveTemplate: typeof trpc.pipelineExecutor.saveTemplate.useMutation;
1402
- /** Generated alias around `trpc.pipelineExecutor.updateTemplate.useMutation`. */
1403
- export declare const usePipelineExecutorUpdateTemplate: typeof trpc.pipelineExecutor.updateTemplate.useMutation;
1404
- /** Generated alias around `trpc.pipelineExecutor.deleteTemplate.useMutation`. */
1405
- export declare const usePipelineExecutorDeleteTemplate: typeof trpc.pipelineExecutor.deleteTemplate.useMutation;
1406
1374
  /** Generated alias around `trpc.pipelineExecutor.getCapabilities.useQuery`. */
1407
1375
  export declare const usePipelineExecutorGetCapabilities: typeof trpc.pipelineExecutor.getCapabilities.useQuery;
1408
1376
  /** Generated alias around `trpc.pipelineExecutor.getAddonModels.useQuery`. */
@@ -1549,14 +1517,6 @@ export declare const usePipelineOrchestratorSetCameraSensors: typeof trpc.pipeli
1549
1517
  export declare const usePipelineOrchestratorReconcileFromDisk: typeof trpc.pipelineOrchestrator.reconcileFromDisk.useMutation;
1550
1518
  /** Generated alias around `trpc.pipelineOrchestrator.getReconcileFromDiskStatus.useQuery`. */
1551
1519
  export declare const usePipelineOrchestratorGetReconcileFromDiskStatus: typeof trpc.pipelineOrchestrator.getReconcileFromDiskStatus.useQuery;
1552
- /** Generated alias around `trpc.pipelineOrchestrator.listTemplates.useQuery`. */
1553
- export declare const usePipelineOrchestratorListTemplates: typeof trpc.pipelineOrchestrator.listTemplates.useQuery;
1554
- /** Generated alias around `trpc.pipelineOrchestrator.saveTemplate.useMutation`. */
1555
- export declare const usePipelineOrchestratorSaveTemplate: typeof trpc.pipelineOrchestrator.saveTemplate.useMutation;
1556
- /** Generated alias around `trpc.pipelineOrchestrator.updateTemplate.useMutation`. */
1557
- export declare const usePipelineOrchestratorUpdateTemplate: typeof trpc.pipelineOrchestrator.updateTemplate.useMutation;
1558
- /** Generated alias around `trpc.pipelineOrchestrator.deleteTemplate.useMutation`. */
1559
- export declare const usePipelineOrchestratorDeleteTemplate: typeof trpc.pipelineOrchestrator.deleteTemplate.useMutation;
1560
1520
  /** Generated alias around `trpc.pipelineOrchestrator.getDeviceSettingsContribution.useQuery`. */
1561
1521
  export declare const usePipelineOrchestratorGetDeviceSettingsContribution: typeof trpc.pipelineOrchestrator.getDeviceSettingsContribution.useQuery;
1562
1522
  /** Generated alias around `trpc.pipelineOrchestrator.getDeviceLiveContribution.useQuery`. */
@@ -1985,12 +1945,6 @@ export declare const useStreamBrokerSubscribeAudioChunks: typeof trpc.streamBrok
1985
1945
  export declare const useStreamBrokerPullAudioChunks: typeof trpc.streamBroker.pullAudioChunks.useQuery;
1986
1946
  /** Generated alias around `trpc.streamBroker.unsubscribeAudioChunks.useMutation`. */
1987
1947
  export declare const useStreamBrokerUnsubscribeAudioChunks: typeof trpc.streamBroker.unsubscribeAudioChunks.useMutation;
1988
- /** Generated alias around `trpc.streamBroker.subscribeFrames.useMutation`. */
1989
- export declare const useStreamBrokerSubscribeFrames: typeof trpc.streamBroker.subscribeFrames.useMutation;
1990
- /** Generated alias around `trpc.streamBroker.pullFrameHandles.useQuery`. */
1991
- export declare const useStreamBrokerPullFrameHandles: typeof trpc.streamBroker.pullFrameHandles.useQuery;
1992
- /** Generated alias around `trpc.streamBroker.unsubscribeFrames.useMutation`. */
1993
- export declare const useStreamBrokerUnsubscribeFrames: typeof trpc.streamBroker.unsubscribeFrames.useMutation;
1994
1948
  /** Generated alias around `trpc.streamBroker.setPreBufferDuration.useMutation`. */
1995
1949
  export declare const useStreamBrokerSetPreBufferDuration: typeof trpc.streamBroker.setPreBufferDuration.useMutation;
1996
1950
  /** Generated alias around `trpc.streamBroker.getPreBufferInfo.useQuery`. */
@@ -35,7 +35,6 @@ interface StreamChoiceRow {
35
35
  } | null;
36
36
  readonly status: string | null;
37
37
  readonly inputFps: number | null;
38
- readonly decodeFps: number | null;
39
38
  readonly bitrateKbps: number | null;
40
39
  }
41
40
  /**