import type { Text } from "@codemirror/state"; import { cmReplay, cmReplayMultiple } from "@lqv/codemirror"; import type { FakeSelectionConfig } from "@lqv/codemirror/fake-selection"; import { type Store } from "../store"; import { Editor } from "./Editor"; type CodeData = Parameters[0]["data"]; /** * Editor to replay recorded coding. */ export declare function Replay({ extensions, handle, replay, scrollBehavior, selectionConfig, didScroll, shouldScroll, start, ...props }: Pick[0], "didScroll" | "scrollBehavior" | "shouldScroll"> & React.ComponentProps & { /** * Callback to handle special commands. * @param useStore The CodeBooth store. * @param cmd The command to handle. * @param doc The CodeMirror document. */ handle?: (useStore: Store, cmd: string, doc: Text) => void; /** Coding data to replay. */ replay?: CodeData | Promise; /** Configuration for replaying the author's cursor and selection. */ selectionConfig?: FakeSelectionConfig; /** * Time to start replaying. * @default 0 */ start?: number; }): JSX.Element; /** * Replay coding to multiple editors. */ export declare function ReplayMultiple({ didScroll, group, handle: propsHandle, replay, scrollBehavior, shouldScroll, start, }: Pick[0], "didScroll" | "scrollBehavior" | "shouldScroll"> & { /** Editor group to replay. */ group?: string; /** * Callback to handle special commands. * @param store The CodeBooth store. * @param cmd The command to handle. * @param docs CodeMirror documents. */ handle?: (store: Store, cmd: string, docs: Record) => void; /** * Coding data to replay. */ replay: CodeData | Promise; /** * Time to start replaying. * @default 0 */ start?: number; }): null; export {};