import type { SourceFileVersion } from '@remotion/studio-shared'; export type FileChangeMetadata = { skipSequencePropsUpdate: boolean; }; type WriteFileAndNotifyFileWatchersOptions = { file: string; content: string; originatorClientId: string | undefined; metadata: FileChangeMetadata | null; }; export type FileChangeEvent = { type: 'created'; content: string; originatorClientId: string | undefined; sourceVersion: SourceFileVersion | null; } | { type: 'deleted'; } | { type: 'changed'; content: string; originatorClientId: string | undefined; skipSequencePropsUpdate: boolean; sourceVersion: SourceFileVersion | null; }; type OnChange = (event: FileChangeEvent) => void; export declare const subscribeToExternalSourceChanges: (listener: (file: string, version: SourceFileVersion) => void) => () => boolean; export declare const subscribeToStudioSourceWrites: (listener: (file: string, contents: string) => void) => () => boolean; type CreateFileWatcherRegistryOptions = { platform?: NodeJS.Platform; }; export type FileWatcherRegistry = { readonly sourceVersionSessionId: string; getExternalSourceRevision: (file: string) => number; getExternalSourceRevisions: () => Record; recordSourceWrite: (file: string, contents: string | null) => void; installFileWatcher: (options: { file: string; onChange: OnChange; /** * When true, only created/deleted events are emitted (no reads on change). * Use for binary or very large files (e.g. render output) where subscribers * only need to know whether the path exists. * Pass false when subscribers need content (including `changed` events). */ existenceOnly: boolean; }) => { exists: boolean; unwatch: () => void; }; writeFileAndNotifyFileWatchers: (options: WriteFileAndNotifyFileWatchersOptions) => SourceFileVersion | null; }; export declare const createFileWatcherRegistry: (options?: CreateFileWatcherRegistryOptions) => FileWatcherRegistry; export declare const getSourceVersionSessionId: () => string | null; export declare const setFileWatcherRegistry: (registry: FileWatcherRegistry) => (() => void); export declare const getFileWatcherRegistry: () => FileWatcherRegistry; export declare const installFileWatcher: FileWatcherRegistry['installFileWatcher']; export declare const writeFileAndNotifyFileWatchers: FileWatcherRegistry['writeFileAndNotifyFileWatchers']; export {};