// A File Input value is set whenever a file is selected in the Dashboard preview. // The value will be 'undefined' if the user has not yet selected a local file to preview // and 'null' if the user has cleared the file input. export type FileInputValue = | { // The URL of the file. Will be a local blob URL when a local file is selected. url: string; } | null | undefined; // Callback function to listen for 'file' messages. export type PreviewFileListener = ( file: FileInputValue, inputPath: string[] ) => void; // Preview listener function. Uses to listen for preview state updates. export type PreviewListener = (state: InputState) => void; // Public preview API. export interface Preview { subscribe( eventName: 'inputs', listener: (state: InputState) => void ): () => void; }