import type { WorkflowEditing } from '../editing.js'; import { type Flag, type Json } from './editorFields.js'; import type { ExpressionRef } from './expressionRefs.js'; /** An input a workflow expression can read, by its path under `inputs`. */ export interface InputRef { path: string[]; type: string; label: string; definition: Json; } /** Every input with a value, where a run reads it: groups nest unless flattened, lists hide their rows. */ export declare function inputRefs(editing: WorkflowEditing, inputs: Json | undefined): InputRef[]; export declare function refExpression(path: string[], suffix?: string): string; /** The input `value` reads when it is exactly `${{ inputs.PATH[.suffix] }}`. */ export declare function readRef(value: unknown, suffix?: string): string[] | null; export declare function flagExpression(path: string[], negated: boolean): string; export declare function equalsExpression(path: string[], value: string, negated?: boolean): string; /** Picks an existing input of the given types, or asks for a new one. */ export declare function InputRefSelect({ refs, types, value, onChange, onNew, newLabel, label, }: { refs: InputRef[]; types: string[]; value: string[] | null; onChange: (path: string[]) => void; onNew?: (() => void) | undefined; newLabel?: string; label: string; }): import("react").JSX.Element; /** Where fields find inputs to read, and how they ask for a new one. */ export interface InputSource { refs: InputRef[]; /** Outputs, matrix values, variables, sessions and env an expression here can read. */ extras?: ExpressionRef[] | undefined; /** Opens a dialog for a new input of `type`, then reports where it lives. */ create?: ((type: string, onCreated: (path: string[]) => void) => void) | undefined; } /** A switch, or an expression typed in its place, such as one that follows another input. */ export declare function FlagField({ label, yamlKey, description, value, original, fallback, onChange, source, }: { label: string; yamlKey?: string; description: string; value: Flag; original: unknown; fallback?: boolean; onChange: (value: Flag) => void; source?: InputSource | undefined; }): import("react").JSX.Element; /** When a job or step runs: any condition, typed, with the executor's status checks and the form's switches offered. */ export declare function ConditionField({ label, yamlKey, description, value, onChange, source, scope, }: { label: string; yamlKey?: string; description: string; value: string; onChange: (value: string) => void; source: InputSource; /** A job's status checks read the jobs it needs; a step's, the steps before it. */ scope: 'job' | 'step'; }): import("react").JSX.Element; /** A value typed in, with the form's inputs of the given types offered, or a new one made for it. */ export declare function ValueOrInputField({ label, yamlKey, description, value, onChange, source, types, suffix, literal, required, error, suggestions, placeholder, }: { label: string; yamlKey?: string; description: string; value: string; onChange: (value: string) => void; source: InputSource; types: string[]; /** A property of the input's value to read, such as a cluster's ip. */ suffix?: string; /** False when the schema takes only an expression here. */ literal?: boolean; required?: boolean; error?: string | undefined; suggestions?: string[]; placeholder?: string; }): import("react").JSX.Element; /** A script field with a menu that drops an input's reference at the cursor. */ export declare function ScriptField({ label, yamlKey, description, value, onChange, source, rows, error, placeholder, }: { label: string; yamlKey?: string; description: string; value: string; onChange: (value: string) => void; source: InputSource; /** Lines to show; without it the field starts one line tall and grows. */ rows?: number; error?: string | undefined; placeholder?: string; }): import("react").JSX.Element; /** References offered as suggestions on free-text values. */ export declare function refSuggestions(source: InputSource): string[];