@camstack/ui-library 1.2.244 → 1.2.245
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.
- package/dist/composites/agent-step-editor.d.ts +41 -16
- package/dist/composites/device-step-matrix.d.ts +2 -25
- package/dist/composites/index.d.ts +8 -11
- package/dist/composites/model-bound-slider.d.ts +8 -1
- package/dist/composites/pipeline-builder.d.ts +1 -28
- package/dist/composites/pipeline-matrix-shared.d.ts +1 -1
- package/dist/composites/pipeline-step.d.ts +4 -44
- package/dist/composites/step-inspector/accelerator-tabs.d.ts +12 -0
- package/dist/composites/step-inspector/gate-control.d.ts +20 -0
- package/dist/composites/step-inspector/index.d.ts +11 -0
- package/dist/composites/step-inspector/layered-settings-form.d.ts +38 -0
- package/dist/composites/step-inspector/segmented-choice.d.ts +11 -0
- package/dist/composites/step-inspector/setting-values.d.ts +19 -0
- package/dist/composites/step-inspector/step-chips.d.ts +11 -0
- package/dist/composites/step-inspector/step-inspector-layout.d.ts +23 -0
- package/dist/composites/step-inspector/step-inspector-panel.d.ts +26 -0
- package/dist/composites/step-inspector/step-list.d.ts +39 -0
- package/dist/composites/step-inspector/step-model-list.d.ts +9 -0
- package/dist/composites/step-inspector/step-model-row.d.ts +27 -0
- package/dist/composites/{step-tree-master.d.ts → step-tree.d.ts} +0 -12
- package/dist/index.cjs +1336 -1016
- package/dist/index.js +1314 -1016
- package/package.json +1 -1
- package/dist/composites/pipeline-tree-matrix.d.ts +0 -18
- package/dist/composites/slide-over-panel.d.ts +0 -35
|
@@ -1,30 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentAddonConfig, ConfigField, PipelineAddonSchema } from '@camstack/types';
|
|
2
2
|
import { RootModelInfo } from './root-model-source';
|
|
3
|
-
|
|
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
|
-
/**
|
|
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
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
|
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
|
-
|
|
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 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.
|
|
54
|
+
*/
|
|
55
|
+
export declare function AgentStepEditor({ addon, agentDefault, onChangeAgentConfig, engineFormat, effectiveModelId, rootModel, }: AgentStepEditorProps): import("react").JSX.Element;
|
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
import { StepTreeNode } from './step-tree
|
|
1
|
+
import { StepTreeNode } from './step-tree';
|
|
2
2
|
import { AgentColumn, CellState, MatrixSelectedCell } from './pipeline-matrix-shared';
|
|
3
3
|
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
4
|
export interface DeviceStepMatrixProps {
|
|
17
5
|
readonly tree: readonly StepTreeNode[];
|
|
18
6
|
readonly agents: readonly AgentColumn[];
|
|
19
|
-
readonly gateFor: (addonId: string) => StepGate;
|
|
20
7
|
readonly getCellState: (addonId: string, agent: AgentColumn) => CellState;
|
|
21
8
|
readonly onCellClick: (addonId: string, agent: AgentColumn) => void;
|
|
22
9
|
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
10
|
/** Single-node fallback (B): which node the one column shows. */
|
|
27
11
|
readonly fallbackNodeId: string | null;
|
|
28
12
|
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;
|
|
36
13
|
}
|
|
37
|
-
export declare function DeviceStepMatrix({ tree, agents,
|
|
14
|
+
export declare function DeviceStepMatrix({ tree, agents, getCellState, onCellClick, selectedCell, fallbackNodeId, onFallbackNodeChange, }: DeviceStepMatrixProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AddonGlobalSettingsForm } from './addon-global-settings-form';
|
|
2
2
|
export type { AddonPageProps } from './addon-page-props';
|
|
3
|
-
export type { AgentStepEditorProps
|
|
4
|
-
export { AgentStepEditor } from './agent-step-editor';
|
|
3
|
+
export type { AgentStepEditorProps } from './agent-step-editor';
|
|
4
|
+
export { AgentStepEditor, RootSuppliedModelNote, settingsModelIdFor, stepLocalFields, } from './agent-step-editor';
|
|
5
5
|
export type { RootModelInfo } from './root-model-source';
|
|
6
|
-
export { rootSourceState } from './root-model-source';
|
|
6
|
+
export { RootModelSourceControl, rootSourceState, withUseRootModel } from './root-model-source';
|
|
7
7
|
export * from './app-shell';
|
|
8
8
|
export type { AudioClassification, AudioClassificationListProps } from './audio-classification-list';
|
|
9
9
|
export { AudioClassificationList } from './audio-classification-list';
|
|
@@ -102,7 +102,7 @@ export type { DeviceSelectCandidate, SuggestedPartition, SuggestionFleetDevice,
|
|
|
102
102
|
export { deviceMatchesFilter, deviceOptionLabel, devicesToOptions, filterDeviceOptions, partitionSuggested, sameLocationSuggestions, selectedDeviceOptions, } from './device-select-filter';
|
|
103
103
|
export type { DeviceSelectorTab, SelectorDevice } from './device-selector-picker';
|
|
104
104
|
export { DeviceSelectorPicker, describeDeviceSelector, deviceTypeLabel, tabForSelector, } from './device-selector-picker';
|
|
105
|
-
export type { DeviceStepMatrixProps
|
|
105
|
+
export type { DeviceStepMatrixProps } from './device-step-matrix';
|
|
106
106
|
export { DeviceStepMatrix } from './device-step-matrix';
|
|
107
107
|
export { DiscoveryPanel } from './discovery-panel';
|
|
108
108
|
export type { DoorbellRecentPanelProps } from './doorbell-recent-panel';
|
|
@@ -145,14 +145,12 @@ export type { PhaseIconProps } from './phase-icon';
|
|
|
145
145
|
export { PhaseIcon } from './phase-icon';
|
|
146
146
|
export type { PipelineBuilderProps } from './pipeline-builder';
|
|
147
147
|
export { PipelineBuilder } from './pipeline-builder';
|
|
148
|
-
export type { AgentColumnGroup, AgentColumnIdentity, MatrixSelectedCell, } from './pipeline-matrix-shared';
|
|
148
|
+
export type { AgentColumn, AgentColumnGroup, AgentColumnIdentity, CellState, MatrixSelectedCell, } from './pipeline-matrix-shared';
|
|
149
149
|
export { agentColumnKey, groupAgentColumns, shouldUseSingleNode } from './pipeline-matrix-shared';
|
|
150
150
|
export type { PipelineRuntimeOption } from './pipeline-runtime-selector';
|
|
151
151
|
export { PipelineRuntimeSelector } from './pipeline-runtime-selector';
|
|
152
152
|
export type { PipelineStepDisplayConfig, PipelineStepProps } from './pipeline-step';
|
|
153
153
|
export { ConfigSchemaField, PipelineStep } from './pipeline-step';
|
|
154
|
-
export type { AgentColumn, CellState, PipelineTreeMatrixProps } from './pipeline-tree-matrix';
|
|
155
|
-
export { PipelineTreeMatrix } from './pipeline-tree-matrix';
|
|
156
154
|
export * from './provider-badge';
|
|
157
155
|
export type { PTZOverlayProps } from './ptz-overlay';
|
|
158
156
|
export { PTZOverlay } from './ptz-overlay';
|
|
@@ -168,8 +166,6 @@ export type { ScopeAccess } from './scope-picker';
|
|
|
168
166
|
export { ScopePicker, validateScopes } from './scope-picker';
|
|
169
167
|
export type { SettingRowElements, SettingRowProps } from './setting-row';
|
|
170
168
|
export { SettingRow } from './setting-row';
|
|
171
|
-
export type { SlideOverPanelProps } from './slide-over-panel';
|
|
172
|
-
export { SlideOverPanel } from './slide-over-panel';
|
|
173
169
|
export type { SnapshotButtonProps, SnapshotButtonTrpc } from './snapshot-button';
|
|
174
170
|
export { SnapshotButton } from './snapshot-button';
|
|
175
171
|
export * from './stat-card';
|
|
@@ -178,8 +174,9 @@ export { StateValuesStream } from './state-values-stream';
|
|
|
178
174
|
export * from './status-badge';
|
|
179
175
|
export type { StepTimingsProps } from './step-timings';
|
|
180
176
|
export { StepTimings } from './step-timings';
|
|
181
|
-
export
|
|
182
|
-
export {
|
|
177
|
+
export * from './step-inspector';
|
|
178
|
+
export type { StepTreeNode } from './step-tree';
|
|
179
|
+
export { buildStepTreeFromSchema } from './step-tree';
|
|
183
180
|
export type { StreamBrokerSelectorProps } from './stream-broker-selector';
|
|
184
181
|
export { StreamBrokerSelector } from './stream-broker-selector';
|
|
185
182
|
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 {
|
|
@@ -19,32 +19,5 @@ export interface PipelineBuilderProps {
|
|
|
19
19
|
readonly showOnlyEnabled?: boolean;
|
|
20
20
|
/** Show "Slot: ..." labels above step groups (default: false) */
|
|
21
21
|
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
22
|
}
|
|
50
|
-
export declare function PipelineBuilder({ schema, steps, onChange, templates, selectedTemplateId, onSelectTemplate, onSaveTemplate, onUpdateTemplate, onDeleteTemplate, readOnly, excludeAddons, hideTemplates, showOnlyEnabled, showSlotLabels,
|
|
23
|
+
export declare function PipelineBuilder({ schema, steps, onChange, templates, selectedTemplateId, onSelectTemplate, onSaveTemplate, onUpdateTemplate, onDeleteTemplate, readOnly, excludeAddons, hideTemplates, 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
|
|
3
|
+
import { StepTreeNode } from './step-tree';
|
|
4
4
|
export interface AgentColumn {
|
|
5
5
|
readonly agentNodeId: string;
|
|
6
6
|
readonly engineLabel: string;
|
|
@@ -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,
|
|
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,11 @@
|
|
|
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 { type StepChip, StepChips } from './step-chips';
|
|
7
|
+
export { BackToStepsButton, fillHeightPx, StepInspectorLayout, type StepInspectorLayoutProps, } from './step-inspector-layout';
|
|
8
|
+
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
|
+
export { type ModelRowSource, StepModelRow, type StepModelRowProps } from './step-model-row';
|
|
@@ -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,11 @@
|
|
|
1
|
+
import { CellState } from '../pipeline-matrix-shared';
|
|
2
|
+
export interface StepChip {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
/** Accelerator short label, for the tooltip. */
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly state: CellState;
|
|
7
|
+
}
|
|
8
|
+
export declare function StepChips({ chips, selectedId, }: {
|
|
9
|
+
readonly chips: readonly StepChip[];
|
|
10
|
+
readonly selectedId?: string | null;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** The tallest the inspector block can be without making its scroll container scroll. */
|
|
3
|
+
export declare function fillHeightPx(input: {
|
|
4
|
+
readonly scrollerHeight: number;
|
|
5
|
+
readonly paddingBottom: number;
|
|
6
|
+
readonly offsetInScroller: number;
|
|
7
|
+
readonly minPx: number;
|
|
8
|
+
}): number;
|
|
9
|
+
export interface StepInspectorLayoutProps {
|
|
10
|
+
readonly list: ReactNode;
|
|
11
|
+
readonly detail: ReactNode;
|
|
12
|
+
/** On a phone the detail is a sheet: open while a step is being inspected. */
|
|
13
|
+
readonly mobileDetailOpen: boolean;
|
|
14
|
+
readonly onMobileClose: () => void;
|
|
15
|
+
/** The floor of the desktop block, so a short page still shows a usable pane. */
|
|
16
|
+
readonly minHeightPx?: number;
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function StepInspectorLayout({ list, detail, mobileDetailOpen, onMobileClose, minHeightPx, className, }: StepInspectorLayoutProps): import("react").JSX.Element;
|
|
20
|
+
/** "‹ Steps" — the phone sheet's way back to the list. */
|
|
21
|
+
export declare function BackToStepsButton({ onClick }: {
|
|
22
|
+
readonly onClick: () => void;
|
|
23
|
+
}): 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,39 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PipelineSlot } from '@camstack/types';
|
|
3
|
+
export interface StepListRow {
|
|
4
|
+
readonly addonId: string;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly slot: PipelineSlot;
|
|
7
|
+
/** Tree depth — children indent under their parent. */
|
|
8
|
+
readonly depth: number;
|
|
9
|
+
/** Every field label of the step, for the search (including cluster-owned ones). */
|
|
10
|
+
readonly fieldLabels: readonly string[];
|
|
11
|
+
/** Right-aligned status (the camera's gate). */
|
|
12
|
+
readonly status?: ReactNode;
|
|
13
|
+
/** Second line: one chip per accelerator. */
|
|
14
|
+
readonly detail?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface StepListProps {
|
|
17
|
+
readonly rows: readonly StepListRow[];
|
|
18
|
+
readonly selectedId: string | null;
|
|
19
|
+
/** `matchedField` = the field label a search hit matched (absent for a name match). */
|
|
20
|
+
readonly onSelect: (addonId: string, matchedField?: string) => void;
|
|
21
|
+
/** Enter / → on a row: move focus into the inspector. */
|
|
22
|
+
readonly onActivate: (addonId: string) => void;
|
|
23
|
+
/** A row was chosen — clicked, or the search hit Enter picked (on a phone: open the sheet). */
|
|
24
|
+
readonly onPick?: (addonId: string) => void;
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly className?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface StepListHandle {
|
|
29
|
+
/** Focus the selected row — how the inspector's Escape returns here. */
|
|
30
|
+
readonly focusSelected: () => void;
|
|
31
|
+
}
|
|
32
|
+
interface Hit {
|
|
33
|
+
readonly row: StepListRow;
|
|
34
|
+
readonly matchedField?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Rows matching `query` (all tokens in the name, or all in one field label). */
|
|
37
|
+
export declare function searchSteps(rows: readonly StepListRow[], query: string): readonly Hit[];
|
|
38
|
+
export declare const StepList: import('react').ForwardRefExoticComponent<StepListProps & import('react').RefAttributes<StepListHandle>>;
|
|
39
|
+
export {};
|
|
@@ -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;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PipelineSchema, PipelineSlot } from '@camstack/types';
|
|
2
|
-
export type StepDotState = 'inherit' | 'on' | 'off' | 'na';
|
|
3
2
|
export interface StepTreeNode {
|
|
4
3
|
readonly addonId: string;
|
|
5
4
|
readonly addonName: string;
|
|
@@ -8,17 +7,6 @@ export interface StepTreeNode {
|
|
|
8
7
|
readonly outputClasses: readonly string[];
|
|
9
8
|
readonly children: readonly StepTreeNode[];
|
|
10
9
|
}
|
|
11
|
-
export interface StepTreeMasterProps {
|
|
12
|
-
readonly tree: readonly StepTreeNode[];
|
|
13
|
-
readonly selectedAddonId: string | null;
|
|
14
|
-
readonly onSelect: (addonId: string) => void;
|
|
15
|
-
readonly agentDots?: Readonly<Record<string, readonly {
|
|
16
|
-
readonly agentNodeId: string;
|
|
17
|
-
readonly state: StepDotState;
|
|
18
|
-
}[]>>;
|
|
19
|
-
readonly className?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function StepTreeMaster({ tree, selectedAddonId, onSelect, agentDots, className, }: StepTreeMasterProps): import("react").JSX.Element;
|
|
22
10
|
/**
|
|
23
11
|
* Helper: build a StepTreeNode[] from a `PipelineSchema` by chaining on
|
|
24
12
|
* `inputClasses` ⇔ `outputClasses` compatibility. Mirrors the orchestrator
|