@camstack/ui-library 1.2.244 → 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.
Files changed (27) hide show
  1. package/dist/composites/accelerator-label.d.ts +17 -0
  2. package/dist/composites/agent-step-editor.d.ts +41 -16
  3. package/dist/composites/device-step-matrix.d.ts +26 -26
  4. package/dist/composites/index.d.ts +10 -12
  5. package/dist/composites/model-bound-slider.d.ts +8 -1
  6. package/dist/composites/pipeline-builder.d.ts +2 -37
  7. package/dist/composites/pipeline-matrix-shared.d.ts +11 -1
  8. package/dist/composites/pipeline-step.d.ts +4 -44
  9. package/dist/composites/step-inspector/accelerator-tabs.d.ts +12 -0
  10. package/dist/composites/step-inspector/gate-control.d.ts +20 -0
  11. package/dist/composites/step-inspector/index.d.ts +10 -0
  12. package/dist/composites/step-inspector/layered-settings-form.d.ts +38 -0
  13. package/dist/composites/step-inspector/segmented-choice.d.ts +11 -0
  14. package/dist/composites/step-inspector/setting-values.d.ts +19 -0
  15. package/dist/composites/step-inspector/step-detail-dock.d.ts +33 -0
  16. package/dist/composites/step-inspector/step-inspector-panel.d.ts +26 -0
  17. package/dist/composites/step-inspector/step-model-list.d.ts +9 -0
  18. package/dist/composites/step-inspector/step-model-row.d.ts +27 -0
  19. package/dist/composites/step-inspector/step-search.d.ts +18 -0
  20. package/dist/composites/{step-tree-master.d.ts → step-tree.d.ts} +0 -12
  21. package/dist/generated/system-hooks.d.ts +0 -16
  22. package/dist/index.cjs +1431 -1286
  23. package/dist/index.js +1407 -1278
  24. package/package.json +1 -1
  25. package/dist/composites/pipeline-tree-matrix.d.ts +0 -18
  26. package/dist/composites/slide-over-panel.d.ts +0 -35
  27. package/dist/lib/validate-template.d.ts +0 -2
@@ -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;
@@ -1,30 +1,55 @@
1
- import { PipelineAddonSchema, AgentAddonConfig, CameraStepOverridePatch } from '@camstack/types';
1
+ import { AgentAddonConfig, ConfigField, PipelineAddonSchema } from '@camstack/types';
2
2
  import { RootModelInfo } from './root-model-source';
3
- export type EditorMode = 'agent' | 'device';
3
+ /**
4
+ * A step's node-local fields: the catalog schema minus the knobs the CLUSTER
5
+ * owns (`clusterStepSettingFieldsFor`). Those still exist on the schema so the
6
+ * runner can hydrate `child.settings`, but writing them per node or per camera
7
+ * would be a second store the overlay silently ignores.
8
+ */
9
+ export declare function stepLocalFields(addon: PipelineAddonSchema): readonly ConfigField[];
10
+ /**
11
+ * The model a step's settings are read and written for — what a model-bound
12
+ * field (D738) binds to. While the ROOT supplies the step's fine label (D741),
13
+ * that is the root model: the step's threshold then gates the root's label, on
14
+ * the root's score scale. Otherwise the step's own model: its pin, else the
15
+ * model the row really runs (`effectiveModelId` — the device's hardware-aware
16
+ * default when unpinned), else the step's flat catalog default.
17
+ */
18
+ export declare function settingsModelIdFor(addon: PipelineAddonSchema, modelId: string | undefined, settings: Readonly<Record<string, unknown>> | undefined, rootModel: RootModelInfo | undefined): string;
19
+ /**
20
+ * Shown in place of the model picker while the root model supplies the step:
21
+ * the step's own model is kept, not changed, for when the root cannot.
22
+ */
23
+ export declare function RootSuppliedModelNote({ rootModel, stepModelId, }: {
24
+ readonly rootModel: RootModelInfo;
25
+ readonly stepModelId: string | undefined;
26
+ }): import("react").JSX.Element;
4
27
  export interface AgentStepEditorProps {
5
- readonly mode: EditorMode;
6
28
  readonly addon: PipelineAddonSchema;
7
- /** L1 base — always visible as the "inherited" baseline. */
29
+ /** The node's base for the step — the controlled value. */
8
30
  readonly agentDefault: AgentAddonConfig;
9
- readonly agentNodeId: string;
10
- /** Device mode only — current L2.5 patch for (agent, addon). */
11
- readonly currentPatch?: CameraStepOverridePatch | null;
12
31
  readonly onChangeAgentConfig?: (next: AgentAddonConfig) => void;
13
- readonly onChangePatch?: (next: CameraStepOverridePatch | null) => void;
14
32
  readonly engineFormat: string;
15
33
  /**
16
34
  * The model this step would ACTUALLY run when nothing is explicitly pinned —
17
- * the tail of the effective-model chain AFTER base/override (detector row:
18
- * device.defaultModelId; else the step's catalog format-default). Used ONLY as
19
- * the picker's DISPLAY seed so an un-pinned cell pre-selects the same
20
- * family/size/resolution/variant the cell shows — it is NEVER written into the
21
- * draft, so opening + saving an un-pinned cell still leaves it inheriting.
35
+ * the tail of the effective-model chain (detector row: device.defaultModelId;
36
+ * else the step's catalog format-default). Used ONLY as the picker's DISPLAY
37
+ * seed so an un-pinned row pre-selects the model it runs — it is NEVER
38
+ * written into the draft, so opening + saving an un-pinned row still leaves
39
+ * it inheriting.
22
40
  */
23
41
  readonly effectiveModelId?: string;
24
42
  /**
25
- * The ROOT detection model this column runs (D730). When it can supply the
26
- * edited step, the editor offers "Use the root model"; absent ⇒ no offer.
43
+ * The ROOT detection model this accelerator runs (D730). When it can supply
44
+ * the edited step, the editor offers "Use the root model"; absent ⇒ no offer.
27
45
  */
28
46
  readonly rootModel?: RootModelInfo;
29
47
  }
30
- export declare function AgentStepEditor(props: AgentStepEditorProps): import("react").JSX.Element;
48
+ /**
49
+ * AgentStepEditor — one step on ONE accelerator: its model and its settings,
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 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
+ */
55
+ export declare function AgentStepEditor({ addon, agentDefault, onChangeAgentConfig, engineFormat, effectiveModelId, rootModel, }: AgentStepEditorProps): import("react").JSX.Element;
@@ -1,37 +1,37 @@
1
- import { StepTreeNode } from './step-tree-master';
1
+ import { ReactNode } from 'react';
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';
4
- /**
5
- * Per-camera gate state for a step (node-independent). `zone-driven` steps
6
- * (package-detection) sit OUTSIDE the gate — a badge, never a switch.
7
- */
8
- export type StepGate = {
9
- readonly kind: 'gate';
10
- readonly effectiveOn: boolean;
11
- readonly defaultOn: boolean;
12
- readonly explicit: boolean;
13
- } | {
14
- readonly kind: 'zone-driven';
15
- };
16
5
  export interface DeviceStepMatrixProps {
17
6
  readonly tree: readonly StepTreeNode[];
18
7
  readonly agents: readonly AgentColumn[];
19
- readonly gateFor: (addonId: string) => StepGate;
20
8
  readonly getCellState: (addonId: string, agent: AgentColumn) => CellState;
21
- 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;
22
11
  readonly selectedCell: MatrixSelectedCell | null;
23
- /** `next: null` resets the gate to the catalog default (inherit). */
24
- readonly onSetGate: (addonId: string, next: boolean | null) => void;
25
- readonly gateBusy?: boolean;
26
12
  /** Single-node fallback (B): which node the one column shows. */
27
13
  readonly fallbackNodeId: string | null;
28
14
  readonly onFallbackNodeChange: (nodeId: string) => void;
29
- /**
30
- * Hide the col-1 gate entirely (per-node BASE view). When set, col-1 renders
31
- * ONLY the step label — no gate/zone control — and its header reads "Step"
32
- * instead of "Step · gate". Enablement in that view is per-camera, so the
33
- * node-level matrix carries no gate. Default (absent/false) is unchanged.
34
- */
35
- readonly hideGate?: boolean;
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;
36
23
  }
37
- export declare function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange, hideGate, }: 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,9 +1,10 @@
1
1
  export { AddonGlobalSettingsForm } from './addon-global-settings-form';
2
2
  export type { AddonPageProps } from './addon-page-props';
3
- export type { AgentStepEditorProps, EditorMode } from './agent-step-editor';
4
- export { AgentStepEditor } from './agent-step-editor';
3
+ export { type AcceleratorIdentity, acceleratorLabel, acceleratorShortLabel, } from './accelerator-label';
4
+ export type { AgentStepEditorProps } from './agent-step-editor';
5
+ export { AgentStepEditor, RootSuppliedModelNote, settingsModelIdFor, stepLocalFields, } from './agent-step-editor';
5
6
  export type { RootModelInfo } from './root-model-source';
6
- export { rootSourceState } from './root-model-source';
7
+ export { RootModelSourceControl, rootSourceState, withUseRootModel } from './root-model-source';
7
8
  export * from './app-shell';
8
9
  export type { AudioClassification, AudioClassificationListProps } from './audio-classification-list';
9
10
  export { AudioClassificationList } from './audio-classification-list';
@@ -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, StepGate } 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';
@@ -145,14 +146,12 @@ export type { PhaseIconProps } from './phase-icon';
145
146
  export { PhaseIcon } from './phase-icon';
146
147
  export type { PipelineBuilderProps } from './pipeline-builder';
147
148
  export { PipelineBuilder } from './pipeline-builder';
148
- export type { AgentColumnGroup, AgentColumnIdentity, MatrixSelectedCell, } from './pipeline-matrix-shared';
149
+ export type { AgentColumn, AgentColumnGroup, AgentColumnIdentity, CellState, MatrixSelectedCell, } from './pipeline-matrix-shared';
149
150
  export { agentColumnKey, groupAgentColumns, shouldUseSingleNode } from './pipeline-matrix-shared';
150
151
  export type { PipelineRuntimeOption } from './pipeline-runtime-selector';
151
152
  export { PipelineRuntimeSelector } from './pipeline-runtime-selector';
152
153
  export type { PipelineStepDisplayConfig, PipelineStepProps } from './pipeline-step';
153
154
  export { ConfigSchemaField, PipelineStep } from './pipeline-step';
154
- export type { AgentColumn, CellState, PipelineTreeMatrixProps } from './pipeline-tree-matrix';
155
- export { PipelineTreeMatrix } from './pipeline-tree-matrix';
156
155
  export * from './provider-badge';
157
156
  export type { PTZOverlayProps } from './ptz-overlay';
158
157
  export { PTZOverlay } from './ptz-overlay';
@@ -168,8 +167,6 @@ export type { ScopeAccess } from './scope-picker';
168
167
  export { ScopePicker, validateScopes } from './scope-picker';
169
168
  export type { SettingRowElements, SettingRowProps } from './setting-row';
170
169
  export { SettingRow } from './setting-row';
171
- export type { SlideOverPanelProps } from './slide-over-panel';
172
- export { SlideOverPanel } from './slide-over-panel';
173
170
  export type { SnapshotButtonProps, SnapshotButtonTrpc } from './snapshot-button';
174
171
  export { SnapshotButton } from './snapshot-button';
175
172
  export * from './stat-card';
@@ -178,8 +175,9 @@ export { StateValuesStream } from './state-values-stream';
178
175
  export * from './status-badge';
179
176
  export type { StepTimingsProps } from './step-timings';
180
177
  export { StepTimings } from './step-timings';
181
- export type { StepDotState, StepTreeMasterProps, StepTreeNode } from './step-tree-master';
182
- export { buildStepTreeFromSchema, StepTreeMaster } from './step-tree-master';
178
+ export * from './step-inspector';
179
+ export type { StepTreeNode } from './step-tree';
180
+ export { buildStepTreeFromSchema } from './step-tree';
183
181
  export type { StreamBrokerSelectorProps } from './stream-broker-selector';
184
182
  export { StreamBrokerSelector } from './stream-broker-selector';
185
183
  export type { StreamChoice, StreamPanelProps, StreamStats } from './stream-panel';
@@ -8,8 +8,15 @@ export interface ModelBoundSliderProps {
8
8
  readonly settings: Readonly<Record<string, unknown>> | undefined;
9
9
  readonly disabled: boolean;
10
10
  readonly onChangeSettings: (next: Record<string, unknown>) => void;
11
+ /**
12
+ * Hide the source label + "Reset to model default" row. A layered editor
13
+ * (the step inspector, D754) draws its own provenance line naming every
14
+ * layer — this row could only name the model's, and its reset would remove
15
+ * the value from the merged view, not from the layer being edited.
16
+ */
17
+ readonly hideSourceRow?: boolean;
11
18
  }
12
- export declare function ModelBoundSlider({ field, modelId, settings, disabled, onChangeSettings, }: ModelBoundSliderProps): import("react").JSX.Element;
19
+ export declare function ModelBoundSlider({ field, modelId, settings, disabled, onChangeSettings, hideSourceRow, }: ModelBoundSliderProps): import("react").JSX.Element;
13
20
  /** The keys of the model-bound fields of a schema, groups flattened. */
14
21
  export declare function modelBoundKeysOf(fields: readonly ConfigField[]): string[];
15
22
  export interface ResetModelDefaultsButtonProps {
@@ -1,50 +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
- /**
23
- * Toggle mode passed through to every `PipelineStep`:
24
- * - `'simple'` (default) — single on/off switch, edits `step.enabled` directly.
25
- * - `'threeState'` — segmented `[Inherit | On | Off]` control that emits
26
- * override changes via `onOverrideChange` (per addonId). `step.enabled`
27
- * still reflects the effective state (agent default OR override).
28
- */
29
- readonly toggleMode?: 'simple' | 'threeState';
30
- /** Current override map keyed on `addonId` when `toggleMode === 'threeState'`. */
31
- readonly overrides?: Readonly<Record<string, boolean>>;
32
- /** Fires when the user flips a per-addon 3-state toggle. `null` = inherit. */
33
- readonly onOverrideChange?: (addonId: string, next: boolean | null) => void;
34
- /** Agent default enabled state per addonId, shown as annotation in `'threeState'` mode. */
35
- readonly inheritedEnabledByAddon?: Readonly<Record<string, boolean>>;
36
- /**
37
- * Hide the Model dropdown + dynamic configSchema controls on every
38
- * step (passes through to `PipelineStep.hideModelAndSettings`). Used
39
- * on the camera page where these knobs are agent-level.
40
- */
41
- readonly hideModelAndSettings?: boolean;
42
- /**
43
- * Adds an "Auto (node default)" option to every step's Model dropdown
44
- * and preserves an absent/sentinel selection instead of auto-correcting
45
- * it to a concrete model. Passed through to `PipelineStep.allowAutoModel`
46
- * — see that prop's doc for why this defaults to `false`.
47
- */
48
- readonly allowAutoModel?: boolean;
49
14
  }
50
- export declare function PipelineBuilder({ schema, steps, onChange, templates, selectedTemplateId, onSelectTemplate, onSaveTemplate, onUpdateTemplate, onDeleteTemplate, readOnly, excludeAddons, hideTemplates, showOnlyEnabled, showSlotLabels, toggleMode, overrides, onOverrideChange, inheritedEnabledByAddon, hideModelAndSettings, allowAutoModel, }: PipelineBuilderProps): import("react").JSX.Element;
15
+ export declare function PipelineBuilder({ schema, steps, onChange, readOnly, excludeAddons, showOnlyEnabled, showSlotLabels, }: PipelineBuilderProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PipelineSlot } from '@camstack/types';
3
- import { StepTreeNode } from './step-tree-master';
3
+ import { StepTreeNode } from './step-tree';
4
4
  export interface AgentColumn {
5
5
  readonly agentNodeId: string;
6
6
  readonly engineLabel: string;
@@ -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;
@@ -22,54 +22,14 @@ export interface PipelineStepProps {
22
22
  readonly onChange: (updated: PipelineStepDisplayConfig) => void;
23
23
  readonly onDelete?: (addonId: string) => void;
24
24
  readonly readOnly?: boolean;
25
- /**
26
- * Toggle mode:
27
- * - `'simple'` (default) — header shows a single on/off switch that drives
28
- * `step.enabled` directly. Used on the agent page (`NodePipelineTab`)
29
- * where toggling IS the final state.
30
- * - `'threeState'` — header shows a 3-button segmented control
31
- * `[Inherit | On | Off]`. `overrideState` is the current override value
32
- * (`true` / `false` / `null` for inherit). When the override changes,
33
- * `onOverrideChange` fires. `step.enabled` still renders the effective
34
- * state (inherited agent default OR override). Used on the camera page
35
- * where the user edits a SPARSE override over the agent baseline.
36
- */
37
- readonly toggleMode?: 'simple' | 'threeState';
38
- /**
39
- * 3-state override value when `toggleMode === 'threeState'`. `null` or
40
- * `undefined` means "inherit" (no override active). Ignored in `'simple'` mode.
41
- */
42
- readonly overrideState?: boolean | null;
43
- /** Fired when the user flips the 3-state toggle in `'threeState'` mode. */
44
- readonly onOverrideChange?: (next: boolean | null) => void;
45
- /** Agent's default enabled value, shown as an annotation in `'threeState'` mode. */
46
- readonly inheritedEnabled?: boolean;
47
- /**
48
- * Hide the Model dropdown + dynamic configSchema controls inside the
49
- * expanded config panel. Used on the camera page where the step's
50
- * model + settings are agent-level — a camera can land on any agent,
51
- * so exposing agent-level knobs here would be misleading. Agent I/O
52
- * tags and the step name stay visible.
53
- */
54
- readonly hideModelAndSettings?: boolean;
55
- /**
56
- * Adds an "Auto (node default)" option (sentinel value `''`) to the
57
- * Model dropdown, and skips the auto-correct-to-a-concrete-model effect
58
- * for that sentinel. Off by default — only the wholesale per-agent
59
- * override editor (`PipelineEditorField`) opts in, since that's the
60
- * only place an absent `modelId` is a meaningful, persistable "Auto"
61
- * selection (steps loaded from `CameraPipelineConfig['steps']`, whose
62
- * wire schema allows an absent `modelId`). Other `PipelineBuilder`
63
- * consumers (e.g. the benchmark tab) always work with concrete model
64
- * ids and are unaffected by leaving this off.
65
- */
66
- readonly allowAutoModel?: boolean;
67
25
  }
68
- export declare function PipelineStep({ step, schema, allSchemas: _allSchemas, depth: _depth, onChange, onDelete: _onDelete, readOnly, toggleMode, overrideState, onOverrideChange, inheritedEnabled, hideModelAndSettings, allowAutoModel, }: PipelineStepProps): import("react").JSX.Element;
69
- export declare function ConfigSchemaField({ field, allFields, step, disabled, onChange, }: {
26
+ export declare function PipelineStep({ step, schema, allSchemas: _allSchemas, depth: _depth, onChange, onDelete: _onDelete, readOnly, }: PipelineStepProps): import("react").JSX.Element;
27
+ export declare function ConfigSchemaField({ field, allFields, step, disabled, onChange, hideModelBoundSourceRow, }: {
70
28
  field: ConfigField;
71
29
  allFields: readonly ConfigField[];
72
30
  step: PipelineStepDisplayConfig;
73
31
  disabled: boolean;
74
32
  onChange: (updated: PipelineStepDisplayConfig) => void;
33
+ /** A layered editor draws its own provenance (D754) — see `ModelBoundSlider.hideSourceRow`. */
34
+ hideModelBoundSourceRow?: boolean;
75
35
  }): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ export interface AcceleratorTabItem {
2
+ readonly id: string;
3
+ readonly label: string;
4
+ /** The camera overrides something on this accelerator. */
5
+ readonly marked?: boolean;
6
+ }
7
+ export interface AcceleratorTabsProps {
8
+ readonly items: readonly AcceleratorTabItem[];
9
+ readonly selectedId: string | null;
10
+ readonly onSelect: (id: string) => void;
11
+ }
12
+ export declare function AcceleratorTabs({ items, selectedId, onSelect }: AcceleratorTabsProps): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ /** The per-camera gate of a step. */
2
+ export type StepGate = {
3
+ readonly kind: 'gate';
4
+ readonly effectiveOn: boolean;
5
+ readonly defaultOn: boolean;
6
+ readonly explicit: boolean;
7
+ } | {
8
+ readonly kind: 'zone-driven';
9
+ };
10
+ export interface GateControlProps {
11
+ readonly gate: StepGate;
12
+ readonly busy?: boolean;
13
+ /** `null` = back to the catalog default. */
14
+ readonly onSet: (next: boolean | null) => void;
15
+ }
16
+ export declare function GateControl({ gate, busy, onSet }: GateControlProps): import("react").JSX.Element;
17
+ /** The gate as a short list-row badge. */
18
+ export declare function GateBadge({ gate }: {
19
+ readonly gate: StepGate;
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export { AcceleratorTabs, type AcceleratorTabItem, type AcceleratorTabsProps, } from './accelerator-tabs';
2
+ export { GateBadge, GateControl, type GateControlProps, type StepGate } from './gate-control';
3
+ export { LayeredSettingsForm, type LayeredSettingsFormProps, type LayerLabels, type SettingsTarget, stepFieldDomId, } from './layered-settings-form';
4
+ export { bindsToModel, defaultOfField, formatSettingValue, isValueField, type ValueField, } from './setting-values';
5
+ export { SegmentedChoice, type SegmentedChoiceOption, type SegmentedChoiceProps, } from './segmented-choice';
6
+ export { BackToStepsButton, dockBox, STEP_DOCK_WIDTH_PX, StepDetailDock, type StepDetailDockProps, } from './step-detail-dock';
7
+ export { type SaveBarState, StepInspectorPanel, type StepInspectorPanelProps, } from './step-inspector-panel';
8
+ export { modelRowsAreFoldable, StepModelList, type StepModelListItem, } from './step-model-list';
9
+ export { type ModelRowSource, StepModelRow, type StepModelRowProps } from './step-model-row';
10
+ export { searchSteps, type StepSearchHit, type StepSearchRow } from './step-search';
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { ConfigField, PipelineAddonSchema, StepSettingSource, StepSettingsLayers } from '@camstack/types';
3
+ import { RootModelInfo } from '../root-model-source';
4
+ /** The layer an inspector edits. */
5
+ export type SettingsTarget = Exclude<StepSettingSource, 'default'>;
6
+ /** How each stored layer is named on screen. A layer without a label is not shown. */
7
+ export interface LayerLabels {
8
+ readonly accelerator?: string;
9
+ readonly camera?: string;
10
+ readonly node: string;
11
+ }
12
+ export interface LayeredSettingsFormProps {
13
+ readonly addon: PipelineAddonSchema;
14
+ /** The step's node-local fields (cluster-owned knobs already removed). */
15
+ readonly fields: readonly ConfigField[];
16
+ /** The stored layers as they apply on the viewed accelerator. */
17
+ readonly layers: StepSettingsLayers;
18
+ readonly target: SettingsTarget;
19
+ readonly labels: LayerLabels;
20
+ /** The model a model-bound value is judged against and bound to (D738/D741). */
21
+ readonly modelId: string;
22
+ /** The edited layer's next bag. */
23
+ readonly onChangeLayer: (next: Record<string, unknown>) => void;
24
+ /** The root model of the viewed accelerator — offers "Use the root model" (D730). */
25
+ readonly rootModel?: RootModelInfo;
26
+ /** Fields the edited layer stores at exactly the value below it (a legacy full copy). */
27
+ readonly pinnedKeys?: readonly string[];
28
+ /** An extra control under one field ("Apply to all accelerators"). */
29
+ readonly fieldActions?: (key: string, source: StepSettingSource) => ReactNode;
30
+ /** Controls on the section header ("Follow the node", a scope switch). */
31
+ readonly headerActions?: ReactNode;
32
+ /** A field to bring into view and highlight (a search hit). */
33
+ readonly highlightKey?: string | null;
34
+ readonly disabled?: boolean;
35
+ }
36
+ /** DOM id of a field's box — the target of a search hit. */
37
+ export declare function stepFieldDomId(key: string): string;
38
+ export declare function LayeredSettingsForm({ addon, fields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys, fieldActions, headerActions, highlightKey, disabled, }: LayeredSettingsFormProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export interface SegmentedChoiceOption<T extends string> {
2
+ readonly value: T;
3
+ readonly label: string;
4
+ }
5
+ export interface SegmentedChoiceProps<T extends string> {
6
+ readonly label: string;
7
+ readonly options: readonly SegmentedChoiceOption<T>[];
8
+ readonly value: T;
9
+ readonly onChange: (next: T) => void;
10
+ }
11
+ export declare function SegmentedChoice<T extends string>({ label, options, value, onChange, }: SegmentedChoiceProps<T>): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { ConfigField } from '@camstack/types';
2
+ /** A field that stores a value (not a separator, an info block or a group). */
3
+ export type ValueField = Exclude<ConfigField, {
4
+ readonly type: 'separator' | 'info' | 'group';
5
+ }>;
6
+ export declare function isValueField(field: ConfigField): field is ValueField;
7
+ /** True for a D738 field whose value is stored with the model it was made for. */
8
+ export declare function bindsToModel(field: ConfigField): boolean;
9
+ /**
10
+ * What runs when no layer stores the field: the running model's default for a
11
+ * model-bound field that the model declares one for (D738), else the field's
12
+ * own default. `fromModel` says which.
13
+ */
14
+ export declare function defaultOfField(field: ValueField, modelId: string): {
15
+ readonly value: unknown;
16
+ readonly fromModel: boolean;
17
+ };
18
+ /** One stored value as the operator reads it (`0.65`, `on`, `Person, Vehicle`, `—`). */
19
+ export declare function formatSettingValue(field: ValueField, value: unknown): string;
@@ -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,26 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SaveBarState {
3
+ readonly dirtyCount: number;
4
+ readonly saving: boolean;
5
+ /** The last save's outcome, cleared by the next edit. */
6
+ readonly status: 'saved' | 'error' | null;
7
+ readonly error?: string;
8
+ readonly onSave: () => void;
9
+ readonly onDiscard: () => void;
10
+ }
11
+ export interface StepInspectorPanelProps {
12
+ readonly title: string;
13
+ readonly subtitle?: ReactNode;
14
+ /** Right of the title (the gate). */
15
+ readonly headerActions?: ReactNode;
16
+ /** Under the title (the accelerator tabs). */
17
+ readonly headerExtra?: ReactNode;
18
+ /** Left of the title (the phone's "‹ Steps"). */
19
+ readonly leading?: ReactNode;
20
+ readonly saveBar?: SaveBarState;
21
+ /** Escape inside the panel — the host returns focus to the step list. */
22
+ readonly onEscape?: () => void;
23
+ readonly children: ReactNode;
24
+ readonly className?: string;
25
+ }
26
+ export declare const StepInspectorPanel: import('react').ForwardRefExoticComponent<StepInspectorPanelProps & import('react').RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,9 @@
1
+ import { StepModelRowProps } from './step-model-row';
2
+ export interface StepModelListItem extends StepModelRowProps {
3
+ readonly id: string;
4
+ }
5
+ /** True when the rows can be summarised: nothing pinned here, edited, or noted. */
6
+ export declare function modelRowsAreFoldable(rows: readonly StepModelListItem[]): boolean;
7
+ export declare function StepModelList({ rows }: {
8
+ readonly rows: readonly StepModelListItem[];
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { PipelineAddonSchema } from '@camstack/types';
3
+ /** Where the row's model is decided. */
4
+ export type ModelRowSource = 'camera' | 'node' | 'default' | 'cluster';
5
+ export interface StepModelRowProps {
6
+ readonly label: string;
7
+ readonly format: string;
8
+ /** The model this accelerator runs (`undefined` = nothing runs here). */
9
+ readonly modelId: string | undefined;
10
+ readonly source: ModelRowSource;
11
+ readonly sourceLabel: string;
12
+ readonly models: PipelineAddonSchema['models'];
13
+ readonly defaultModelId?: string;
14
+ readonly expanded: boolean;
15
+ readonly onToggle: () => void;
16
+ readonly onChangeModel: (modelId: string) => void;
17
+ /** Present only when the edited layer pins a model here. */
18
+ readonly onReset?: () => void;
19
+ readonly resetLabel?: string;
20
+ /** Why the step does not run its own model here (no build, root-supplied, jump). */
21
+ readonly note?: ReactNode;
22
+ /** Extra control shown with the picker ("Run on"). */
23
+ readonly extra?: ReactNode;
24
+ readonly changed?: boolean;
25
+ readonly disabled?: boolean;
26
+ }
27
+ export declare function StepModelRow({ label, format, modelId, source, sourceLabel, models, defaultModelId, expanded, onToggle, onChangeModel, onReset, resetLabel, note, extra, changed, disabled, }: StepModelRowProps): 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[];