/**
 * The current user of this superdoc
 */
export type User = {
    /**
     * The user's name
     */
    name: string;
    /**
     * The user's email
     */
    email: string;
    /**
     * The user's photo
     */
    image?: string | null;
};
/**
 * Telemetry configuration
 */
export type TelemetryConfig = {
    /**
     * Whether telemetry is enabled
     */
    enabled?: boolean;
    /**
     * The licence key for telemetry
     */
    licenseKey?: string;
    /**
     * The endpoint for telemetry
     */
    endpoint?: string;
    /**
     * The version of the superdoc
     */
    superdocVersion?: string;
};
export type Document = {
    /**
     * The ID of the document
     */
    id?: string;
    /**
     * The type of the document
     */
    type: string;
    /**
     * The initial data of the document (File, Blob, or null)
     */
    data?: File | Blob | null;
    /**
     * The name of the document
     */
    name?: string;
    /**
     * The URL of the document
     */
    url?: string;
    /**
     * Whether the document is a new file
     */
    isNewFile?: boolean;
    /**
     * The Yjs document for collaboration
     */
    ydoc?: import("yjs").Doc;
    /**
     * The provider for collaboration
     */
    provider?: import("@hocuspocus/provider").HocuspocusProvider;
};
export type Modules = {
    /**
     * Comments module configuration
     */
    comments?: {
        permissionResolver?: (params: {
            permission: string;
            role?: string;
            isInternal?: boolean;
            comment?: any | null;
            trackedChange?: any | null;
            currentUser?: User | null;
            superdoc?: SuperDoc | null;
        }) => boolean | undefined;
    };
    /**
     * AI module configuration
     */
    ai?: {
        apiKey?: string;
        endpoint?: string;
    };
    /**
     * Collaboration module configuration
     */
    collaboration?: any;
    /**
     * Toolbar module configuration
     */
    toolbar?: any;
    /**
     * Slash menu module configuration
     */
    slashMenu?: {
        customItems?: any[];
        menuProvider?: Function;
        includeDefaultItems?: boolean;
    };
};
export type Editor = {
    setHighContrastMode: (value: any) => void;
    get docChanged(): boolean;
    mount(el: any): void;
    unmount(): void;
    view: any;
    setToolbar(toolbar: any): void;
    toolbar: any;
    focus(): void;
    get state(): any;
    get storage(): any;
    readonly commands: any;
    readonly helpers: EditorHelpers;
    get isEditable(): boolean;
    get isDestroyed(): boolean;
    get element(): HTMLElement;
    get users(): Array<User>;
    chain(): any;
    can(): any;
    setDocumentMode(documentMode: string, caller: string): void;
    generateCollaborationUpdate(): Promise<Uint8Array>;
    initializeCollaborationData(): void;
    replaceContent(content: object): void;
    setOptions(options?: EditorOptions): void;
    options: any;
    setEditable(editable?: boolean, emitUpdate?: boolean): void;
    registerPlugin(plugin: any, handlePlugins: any): void;
    unregisterPlugin(nameOrPluginKey: string | any): void;
    createNodeViews(): void;
    getMaxContentSize(): any;
    updateEditorStyles(element: any, proseMirror: any, hasPaginationEnabled?: boolean): void;
    initDefaultStyles(element?: HTMLElement, isPaginationEnabled?: boolean): void;
    initMobileStyles(element: HTMLElement | void): void;
    getDocumentIdentifier(): Promise<string>;
    getDocumentGuid(): string | null;
    isDocumentModified(): boolean;
    getTelemetryData(): Promise<{
        documentId: string;
        isModified: boolean;
        isPermanentId: boolean;
        version: any;
    }>;
    getDocumentId(): string;
    getAttributes(nameOrType: string): any;
    isActive(nameOrAttributes: string | any, attributesOrUndefined?: any): boolean;
    getJSON(): any;
    getMetadata(): {
        documentGuid: string | null;
        isModified: boolean;
        version: string | null;
    };
    getHTML({ unflattenLists }?: {
        unflattenLists?: boolean;
    }): string;
    getMarkdown(): Promise<string>;
    getDocumentVersion(): string | null;
    createChildEditor(options: EditorOptions): {
        new (options: EditorOptions): /*elided*/ any;
        loadXmlData(fileSource: File | Blob | Buffer, isNode2?: boolean): Promise<any[]>;
        getDocumentVersion(doc2: any): string;
        setDocumentVersion(doc2: any, version2: any): string;
        getDocumentGuid(doc2: any): string | null;
        updateDocumentVersion(doc2: any, version2: any): string;
        checkIfMigrationsNeeded(): boolean;
    };
    getPageStyles(): any;
    updatePageStyle({ pageMargins }: {
        pageMargins: any;
    }): void;
    migrateListsToV2(): any[];
    getUpdatedJson(): any;
    exportDocx({ isFinalDoc, commentsType, exportJsonOnly, exportXmlOnly, comments, getUpdatedDocs, fieldsHighlightColor }?: {
        isFinalDoc?: boolean;
        commentsType?: string;
        comments?: any[];
        getUpdatedDocs?: boolean;
    }): Promise<Blob | ArrayBuffer | any>;
    destroy(): void;
    destroyHeaderFooterEditors(): void;
    processCollaborationMigrations(): any | void;
    replaceFile(newFile: any): Promise<void>;
    getInternalXmlFile(name: string, type?: string): any | string;
    updateInternalXmlFile(name: string, updatedContent: string): void;
    getNodesOfType(type: string): any[];
    replaceNodeWithHTML(targetNode: any, html: string): void;
    prepareForAnnotations(annotationValues?: FieldValue[]): void;
    migrateParagraphFields(annotationValues?: FieldValue[]): Promise<FieldValue[]>;
    annotate(annotationValues?: FieldValue[], hiddenIds?: string[], removeEmptyFields?: boolean): void;
    previewAnnotations(annotationValues?: any[], hiddenIds?: string[]): void;
    originalState: any;
    closePreview(): void;
    on(name: string, fn2: any): void;
    emit(name: string, ...args: any[]): void;
    off(name: string, fn2: any): void;
    once(name: string, fn2: any): void;
    removeAllListeners(): void;
};
export type SuperDoc = import("../SuperDoc.js").SuperDoc;
export type DocumentMode = "editing" | "viewing" | "suggesting";
export type ExportType = "docx" | "pdf" | "html";
/**
 * - 'external': Include only external comments (default)
 * - 'clean': Export without any comments
 */
export type CommentsType = "external" | "clean";
export type ExportParams = {
    /**
     * - File formats to export
     */
    exportType?: ExportType[];
    /**
     * - How to handle comments
     */
    commentsType?: CommentsType;
    /**
     * - Custom filename (without extension)
     */
    exportedName?: string;
    /**
     * - Auto-download or return blob
     */
    triggerDownload?: boolean;
    /**
     * - Color for field highlights
     */
    fieldsHighlightColor?: string;
};
export type Config = {
    /**
     * The ID of the SuperDoc
     */
    superdocId?: string;
    /**
     * The selector or element to mount the SuperDoc into
     */
    selector: string | HTMLElement;
    /**
     * The mode of the document
     */
    documentMode: DocumentMode;
    /**
     * The role of the user in this SuperDoc
     */
    role?: "editor" | "viewer" | "suggester";
    /**
     * The document to load. If a string, it will be treated as a URL. If a File or Blob, it will be used directly.
     */
    document?: any | string | File | Blob;
    /**
     * The documents to load -> Soon to be deprecated
     */
    documents?: Array<Document>;
    /**
     * The current user of this SuperDoc
     */
    user?: User;
    /**
     * All users of this SuperDoc (can be used for "@"-mentions)
     */
    users?: Array<User>;
    /**
     * Colors to use for user awareness
     */
    colors?: Array<string>;
    /**
     * Modules to load
     */
    modules?: Modules;
    /**
     * Top-level override for permission checks
     */
    permissionResolver?: (params: {
        permission: string;
        role?: string;
        isInternal?: boolean;
        comment?: any | null;
        trackedChange?: any | null;
        currentUser?: User | null;
        superdoc?: SuperDoc | null;
    }) => boolean | undefined;
    /**
     * Whether to show pagination in SuperEditors
     */
    pagination?: boolean;
    /**
     * Optional DOM element to render the toolbar in
     */
    toolbar?: string;
    /**
     * Toolbar groups to show
     */
    toolbarGroups?: Array<string>;
    /**
     * Icons to show in the toolbar
     */
    toolbarIcons?: any;
    /**
     * Texts to override in the toolbar
     */
    toolbarTexts?: any;
    /**
     * Whether the SuperDoc is in development mode
     */
    isDev?: boolean;
    /**
     * Telemetry configuration
     */
    telemetry?: TelemetryConfig;
    /**
     * Callback before an editor is created
     */
    onEditorBeforeCreate?: (editor: Editor) => void;
    /**
     * Callback after an editor is created
     */
    onEditorCreate?: (editor: Editor) => void;
    /**
     * Callback when a transaction is made
     */
    onTransaction?: (params: {
        editor: Editor;
        transaction: any;
        duration: number;
    }) => void;
    /**
     * Callback after an editor is destroyed
     */
    onEditorDestroy?: () => void;
    /**
     * Callback when there is an error in the content
     */
    onContentError?: (params: {
        error: object;
        editor: Editor;
        documentId: string;
        file: File;
    }) => void;
    /**
     * Callback when the SuperDoc is ready
     */
    onReady?: (editor: {
        superdoc: SuperDoc;
    }) => void;
    /**
     * Callback when comments are updated
     */
    onCommentsUpdate?: (params: {
        type: string;
        data: object;
    }) => void;
    /**
     * Callback when awareness is updated
     */
    onAwarenessUpdate?: (params: {
        context: SuperDoc;
        states: any[];
    }) => void;
    /**
     * Callback when the SuperDoc is locked
     */
    onLocked?: (params: {
        isLocked: boolean;
        lockedBy: User;
    }) => void;
    /**
     * Callback when the PDF document is ready
     */
    onPdfDocumentReady?: () => void;
    /**
     * Callback when the sidebar is toggled
     */
    onSidebarToggle?: (isOpened: boolean) => void;
    /**
     * Callback when collaboration is ready
     */
    onCollaborationReady?: (params: {
        editor: Editor;
    }) => void;
    /**
     * Callback when document is updated
     */
    onEditorUpdate?: (params: {
        editor: Editor;
    }) => void;
    /**
     * Callback when an exception is thrown
     */
    onException?: (params: {
        error: Error;
    }) => void;
    /**
     * Callback when the comments list is rendered
     */
    onCommentsListChange?: (params: {
        isRendered: boolean;
    }) => void;
    /**
     * Callback when the list definitions change
     */
    onListDefinitionsChange?: (params: {}) => any;
    /**
     * The format of the document (docx, pdf, html)
     */
    format?: string;
    /**
     * The extensions to load for the editor
     */
    editorExtensions?: any[];
    /**
     * Whether the SuperDoc is internal
     */
    isInternal?: boolean;
    /**
     * The title of the SuperDoc
     */
    title?: string;
    /**
     * The conversations to load
     */
    conversations?: any[];
    /**
     * Whether the SuperDoc is locked
     */
    isLocked?: boolean;
    /**
     * The function to handle image uploads
     */
    handleImageUpload?: (arg0: File) => Promise<string>;
    /**
     * The user who locked the SuperDoc
     */
    lockedBy?: User;
    /**
     * Whether to show the ruler in the editor
     */
    rulers?: boolean;
    /**
     * Whether to suppress default styles in docx mode
     */
    suppressDefaultDocxStyles?: boolean;
    /**
     * Provided JSON to override content with
     */
    jsonOverride?: any;
    /**
     * Whether to disable slash / right-click custom context menu
     */
    disableContextMenu?: boolean;
    /**
     * HTML content to initialize the editor with
     */
    html?: string;
    /**
     * Markdown content to initialize the editor with
     */
    markdown?: string;
    /**
     * Whether to enable debug mode
     */
    isDebug?: boolean;
};
//# sourceMappingURL=index.d.ts.map