import { StateField } from '@codemirror/state';
import { WidgetType } from '@codemirror/view';
import type { DecorationSet } from '@codemirror/view';
interface CodeBlockInfo {
    from: number;
    to: number;
    language: string | null;
    code: string;
}
declare class CodeBlockWidget extends WidgetType {
    readonly code: string;
    readonly language: string | null;
    readonly isIncomplete: boolean;
    private view;
    private static chunkCounter;
    constructor(code: string, language: string | null, isIncomplete?: boolean);
    eq(other: CodeBlockWidget): boolean;
    destroy(): void;
    toDOM(): HTMLElement;
}
declare const addCodeBlock: import("@codemirror/state").StateEffectType<CodeBlockInfo>;
declare const removeCodeBlocks: import("@codemirror/state").StateEffectType<null>;
declare const parseCodeBlocks: (text: string) => CodeBlockInfo[];
export declare const aiCodeBlockExtension: StateField<DecorationSet>[];
export { addCodeBlock, removeCodeBlocks, parseCodeBlocks, CodeBlockWidget };
export type { CodeBlockInfo };
