Enode — API Reference
    Preparing search index...
    type MetricKeyboardField = {
        insight?: (
            draft: string,
            setDraft: (next: string) => void,
        ) => React.ReactNode;
        onCommit: (draft: string) => void;
        optional?: boolean;
        spec: MetricKeyboardSpec;
        value: string;
    }
    Index

    Properties

    insight?: (draft: string, setDraft: (next: string) => void) => React.ReactNode

    Optional insight rendered above the keys, recomputed from the live draft (so e.g. the load → velocity-profile marker tracks typing). setDraft lets an interactive insight (e.g. a draggable VP marker) write the draft back, exactly as a keypress would.

    onCommit: (draft: string) => void

    Receives the typed draft (display units) to parse + persist.

    optional?: boolean

    The field's value may be removed: the × key on an untouched field enters an explicit cleared state, and confirming commits an empty draft (the call site's onCommit("") deletes the value). Off by default — for required fields an empty draft always means "keep".

    value: string

    The field's current display value, used as the initial draft.