@camstack/ui-library 1.2.245 → 1.2.246

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;
@@ -3,9 +3,8 @@ export { GateBadge, GateControl, type GateControlProps, type StepGate } from './
3
3
  export { LayeredSettingsForm, type LayeredSettingsFormProps, type LayerLabels, type SettingsTarget, stepFieldDomId, } from './layered-settings-form';
4
4
  export { bindsToModel, defaultOfField, formatSettingValue, isValueField, type ValueField, } from './setting-values';
5
5
  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';
6
+ export { BackToStepsButton, dockBox, STEP_DOCK_WIDTH_PX, StepDetailDock, type StepDetailDockProps, } from './step-detail-dock';
8
7
  export { type SaveBarState, StepInspectorPanel, type StepInspectorPanelProps, } from './step-inspector-panel';
9
- export { searchSteps, StepList, type StepListHandle, type StepListProps, type StepListRow, } from './step-list';
10
8
  export { modelRowsAreFoldable, StepModelList, type StepModelListItem, } from './step-model-list';
11
9
  export { type ModelRowSource, StepModelRow, type StepModelRowProps } from './step-model-row';
10
+ 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;
@@ -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[];
@@ -1395,14 +1395,6 @@ export declare const usePipelineExecutorGetGlobalPipelineConfig: typeof trpc.pip
1395
1395
  export declare const usePipelineExecutorGetOrchestratorConfigSchema: typeof trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery;
1396
1396
  /** Generated alias around `trpc.pipelineExecutor.validatePipeline.useQuery`. */
1397
1397
  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
1398
  /** Generated alias around `trpc.pipelineExecutor.getCapabilities.useQuery`. */
1407
1399
  export declare const usePipelineExecutorGetCapabilities: typeof trpc.pipelineExecutor.getCapabilities.useQuery;
1408
1400
  /** Generated alias around `trpc.pipelineExecutor.getAddonModels.useQuery`. */
@@ -1549,14 +1541,6 @@ export declare const usePipelineOrchestratorSetCameraSensors: typeof trpc.pipeli
1549
1541
  export declare const usePipelineOrchestratorReconcileFromDisk: typeof trpc.pipelineOrchestrator.reconcileFromDisk.useMutation;
1550
1542
  /** Generated alias around `trpc.pipelineOrchestrator.getReconcileFromDiskStatus.useQuery`. */
1551
1543
  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
1544
  /** Generated alias around `trpc.pipelineOrchestrator.getDeviceSettingsContribution.useQuery`. */
1561
1545
  export declare const usePipelineOrchestratorGetDeviceSettingsContribution: typeof trpc.pipelineOrchestrator.getDeviceSettingsContribution.useQuery;
1562
1546
  /** Generated alias around `trpc.pipelineOrchestrator.getDeviceLiveContribution.useQuery`. */