/**
 * 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 | undefined;
};
export type Document = {
    /**
     * The ID of the document
     */
    id?: string | undefined;
    /**
     * The type of the document
     */
    type: string;
    /**
     * The initial data of the document (File, Blob, or null)
     */
    data?: File | Blob | null | undefined;
    /**
     * The name of the document
     */
    name?: string | undefined;
    /**
     * The URL of the document
     */
    url?: string | undefined;
    /**
     * Whether the document is a new file
     */
    isNewFile?: boolean | undefined;
    /**
     * The Yjs document for collaboration
     */
    ydoc?: import('yjs').Doc | undefined;
    /**
     * The provider for collaboration
     */
    provider?: import('@hocuspocus/provider').HocuspocusProvider | undefined;
};
/**
 * External collaboration provider interface
 * Accepts any Yjs-compatible provider (HocuspocusProvider, LiveblocksYjsProvider, TiptapCollabProvider, etc.)
 */
export type CollaborationProvider = {
    /**
     * The Yjs awareness instance (optional, may be null)
     */
    awareness?: Object | undefined;
    /**
     * Event listener
     */
    on?: ((event: string, handler: Function) => void) | undefined;
    /**
     * Event unsubscriber
     */
    off?: ((event: string, handler: Function) => void) | undefined;
    /**
     * Disconnect from the provider
     */
    disconnect?: (() => void) | undefined;
    /**
     * Destroy the provider
     */
    destroy?: (() => void) | undefined;
    /**
     * Whether the provider has synced
     */
    synced?: boolean | undefined;
    /**
     * Alternative sync property (used by some providers)
     */
    isSynced?: boolean | undefined;
};
/**
 * Collaboration module configuration
 */
export type CollaborationConfig = {
    /**
     * External Yjs document (provider-agnostic mode)
     */
    ydoc?: Object | undefined;
    /**
     * External collaboration provider (provider-agnostic mode)
     */
    provider?: CollaborationProvider | undefined;
    /**
     * Internal provider type (deprecated)
     */
    providerType?: "superdoc" | "hocuspocus" | undefined;
    /**
     * WebSocket URL for internal provider (deprecated)
     */
    url?: string | undefined;
    /**
     * Authentication token for internal provider (deprecated)
     */
    token?: string | undefined;
    /**
     * Additional params for internal provider (deprecated)
     */
    params?: Object | undefined;
};
export type Editor = import('../../../../super-editor/src/index.js').Editor;
export type SuperDoc = import('../SuperDoc.js').SuperDoc;
/**
 * Options for `upgradeToCollaboration()`
 */
export type UpgradeToCollaborationOptions = {
    /**
     * The target Yjs document to seed and connect to
     */
    ydoc: import('yjs').Doc;
    /**
     * The collaboration provider to use
     */
    provider: CollaborationProvider;
};
/**
 * Context passed to a link popover resolver when a link is clicked.
 */
export type LinkPopoverContext = {
    /**
     * The editor instance
     */
    editor: Editor;
    /**
     * The href attribute of the clicked link
     */
    href: string;
    /**
     * The target attribute of the clicked link
     */
    target: string | null;
    /**
     * The rel attribute of the clicked link
     */
    rel: string | null;
    /**
     * The title/tooltip attribute of the clicked link
     */
    tooltip: string | null;
    /**
     * The clicked anchor DOM element
     */
    element: HTMLAnchorElement;
    /**
     * X coordinate of the click
     */
    clientX: number;
    /**
     * Y coordinate of the click
     */
    clientY: number;
    /**
     * Whether this is an anchor link (href starts with #)
     */
    isAnchorLink: boolean;
    /**
     * Current document mode ('editing', 'viewing', 'suggesting')
     */
    documentMode: string;
    /**
     * Computed popover position relative to editor surface
     */
    position: {
        left: string;
        top: string;
    };
    /**
     * Close the popover programmatically
     */
    closePopover: () => void;
};
/**
 * Context passed to an external (framework-agnostic) popover renderer.
 */
export type ExternalPopoverRenderContext = {
    /**
     * Empty DOM container positioned where the popover should appear
     */
    container: HTMLElement;
    /**
     * Call to close the popover and clean up
     */
    closePopover: () => void;
    /**
     * The editor instance
     */
    editor: Editor;
    /**
     * The href of the clicked link
     */
    href: string;
};
/**
 * Resolution returned by a link popover resolver.
 */
export type LinkPopoverResolution = {
    type: "default";
} | {
    type: "none";
} | {
    type: "custom";
    component: unknown;
    props?: Record<string, unknown>;
} | {
    type: "external";
    render: (ctx: ExternalPopoverRenderContext) => ({
        destroy?: () => void;
    } | void);
};
/**
 * Resolver function for customizing the link click popover.
 * Must be synchronous — do not return a Promise.
 * Return null/undefined to use the default popover.
 */
export type LinkPopoverResolver = (ctx: LinkPopoverContext) => LinkPopoverResolution | null | undefined;
/**
 * Surface presentation mode.
 */
export type SurfaceMode = "dialog" | "floating";
export type SurfaceFloatingPlacement = "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center";
/**
 * Intent-based surface request — resolved by the resolver or built-in registry.
 */
export type IntentSurfaceRequest = {
    /**
     * Optional surface id (auto-generated if omitted)
     */
    id?: string | undefined;
    /**
     * Opaque intent identifier used by the resolver
     */
    kind: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
    /**
     * Optional title rendered in the surface chrome
     */
    title?: string | undefined;
    /**
     * Accessible name for the surface when no visible title is provided. Used as aria-label fallback when neither title nor ariaLabelledBy is set.
     */
    ariaLabel?: string | undefined;
    /**
     * ID of the element that labels the surface. Takes precedence over ariaLabel. Use this when the content component renders its own heading that should serve as the accessible name.
     */
    ariaLabelledBy?: string | undefined;
    /**
     * Whether Escape closes the surface (default: true)
     */
    closeOnEscape?: boolean | undefined;
    /**
     * Whether backdrop click closes a dialog (default: true)
     */
    closeOnBackdrop?: boolean | undefined;
    /**
     * Dialog-specific overrides
     */
    dialog?: {
        maxWidth?: string | number;
    } | undefined;
    /**
     * Floating-specific overrides
     */
    floating?: {
        /**
         * Position preset (default: 'top-right'). Ignored when explicit insets are provided.
         */
        placement?: SurfaceFloatingPlacement | undefined;
        /**
         * Exact top inset (overrides placement)
         */
        top?: string | number | undefined;
        /**
         * Exact right inset (overrides placement)
         */
        right?: string | number | undefined;
        /**
         * Exact bottom inset (overrides placement)
         */
        bottom?: string | number | undefined;
        /**
         * Exact left inset (overrides placement)
         */
        left?: string | number | undefined;
        /**
         * Surface width
         */
        width?: string | number | undefined;
        /**
         * Max width
         */
        maxWidth?: string | number | undefined;
        /**
         * Max height
         */
        maxHeight?: string | number | undefined;
        /**
         * Move focus into first focusable child on open (default: true)
         */
        autoFocus?: boolean | undefined;
        /**
         * Close when pointer down outside the surface (default: false)
         */
        closeOnOutsidePointerDown?: boolean | undefined;
    } | undefined;
    /**
     * Arbitrary data for the resolver or content
     */
    payload?: Record<string, unknown> | undefined;
};
/**
 * Direct-render surface request — provides its own component or external renderer.
 */
export type DirectSurfaceRequest = {
    /**
     * Optional surface id (auto-generated if omitted)
     */
    id?: string | undefined;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
    /**
     * Optional title rendered in the surface chrome
     */
    title?: string | undefined;
    /**
     * Accessible name for the surface when no visible title is provided. Used as aria-label fallback when neither title nor ariaLabelledBy is set.
     */
    ariaLabel?: string | undefined;
    /**
     * ID of the element that labels the surface. Takes precedence over ariaLabel. Use this when the content component renders its own heading that should serve as the accessible name.
     */
    ariaLabelledBy?: string | undefined;
    /**
     * Whether Escape closes the surface (default: true)
     */
    closeOnEscape?: boolean | undefined;
    /**
     * Whether backdrop click closes a dialog (default: true)
     */
    closeOnBackdrop?: boolean | undefined;
    /**
     * Dialog-specific overrides
     */
    dialog?: {
        maxWidth?: string | number;
    } | undefined;
    /**
     * Floating-specific overrides
     */
    floating?: {
        /**
         * Position preset (default: 'top-right'). Ignored when explicit insets are provided.
         */
        placement?: SurfaceFloatingPlacement | undefined;
        /**
         * Exact top inset (overrides placement)
         */
        top?: string | number | undefined;
        /**
         * Exact right inset (overrides placement)
         */
        right?: string | number | undefined;
        /**
         * Exact bottom inset (overrides placement)
         */
        bottom?: string | number | undefined;
        /**
         * Exact left inset (overrides placement)
         */
        left?: string | number | undefined;
        /**
         * Surface width
         */
        width?: string | number | undefined;
        /**
         * Max width
         */
        maxWidth?: string | number | undefined;
        /**
         * Max height
         */
        maxHeight?: string | number | undefined;
        /**
         * Move focus into first focusable child on open (default: true)
         */
        autoFocus?: boolean | undefined;
        /**
         * Close when pointer down outside the surface (default: false)
         */
        closeOnOutsidePointerDown?: boolean | undefined;
    } | undefined;
    /**
     * Vue component to render as the surface content
     */
    component?: unknown;
    /**
     * Extra props passed to the Vue component
     */
    props?: Record<string, unknown> | undefined;
    /**
     * External (framework-agnostic) renderer function
     */
    render?: ((ctx: ExternalSurfaceRenderContext) => ({
        destroy?: () => void;
    } | void)) | undefined;
};
/**
 * Combined surface request type (intent-based or direct-render).
 */
export type SurfaceRequest = IntentSurfaceRequest | DirectSurfaceRequest;
/**
 * Resolution returned by a surface resolver.
 */
export type SurfaceResolution = {
    type: "none";
} | {
    type: "custom";
    component: unknown;
    props?: Record<string, unknown>;
} | {
    type: "external";
    render: (ctx: ExternalSurfaceRenderContext) => ({
        destroy?: () => void;
    } | void);
};
/**
 * Resolver function for customizing surface rendering.
 * Must be synchronous — do not return a Promise.
 * Return null/undefined to fall through to built-in handling.
 * Return { type: 'none' } to explicitly suppress the surface.
 */
export type SurfaceResolver = (request: SurfaceRequest) => SurfaceResolution | null | undefined;
/**
 * Outcome of a surface lifecycle. The handle.result promise always resolves
 * with one of these — it never rejects for normal lifecycle events.
 */
export type SurfaceOutcome<TResult = unknown> = {
    status: "submitted" | "closed" | "replaced" | "destroyed";
    /**
     * Present when status is 'submitted'
     */
    data?: TResult | undefined;
    /**
     * Present when status is 'closed'
     */
    reason?: unknown;
    /**
     * Present when status is 'replaced'
     */
    replacedBy?: string | undefined;
};
/**
 * Handle returned by openSurface(). Callers use this to await the outcome
 * or close the surface programmatically.
 */
export type SurfaceHandle<TResult = unknown> = {
    /**
     * Resolved surface id
     */
    id: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
    /**
     * Close this surface programmatically
     */
    close: (reason?: unknown) => void;
    /**
     * Resolves when the surface settles
     */
    result: Promise<SurfaceOutcome<TResult>>;
};
/**
 * Props passed to a custom Vue component rendered inside a surface shell.
 * Reserved props (surfaceId, mode, request, resolve, close) always win over
 * caller-provided props to prevent accidental lifecycle override.
 */
export type SurfaceComponentProps = {
    /**
     * The surface id
     */
    surfaceId: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
    /**
     * The original (normalized) request
     */
    request: SurfaceRequest;
    /**
     * Resolves the handle with { status: 'submitted', data }
     */
    resolve: (data?: unknown) => void;
    /**
     * Resolves the handle with { status: 'closed', reason }
     */
    close: (reason?: unknown) => void;
};
/**
 * Context passed to an external (framework-agnostic) surface renderer.
 */
export type ExternalSurfaceRenderContext = {
    /**
     * Empty DOM container to render into
     */
    container: HTMLElement;
    /**
     * The surface id
     */
    surfaceId: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
    /**
     * The original (normalized) request
     */
    request: SurfaceRequest;
    /**
     * Resolves the handle with { status: 'submitted', data }
     */
    resolve: (data?: unknown) => void;
    /**
     * Resolves the handle with { status: 'closed', reason }
     */
    close: (reason?: unknown) => void;
};
/**
 * Module-level configuration for the surface system.
 */
export type SurfacesModuleConfig = {
    /**
     * Global surface resolver
     */
    resolver?: SurfaceResolver | undefined;
    /**
     * Default dialog options
     */
    dialog?: {
        /**
         * Default escape behavior for dialogs (default: true)
         */
        closeOnEscape?: boolean | undefined;
        /**
         * Default backdrop-click behavior for dialogs (default: true)
         */
        closeOnBackdrop?: boolean | undefined;
        /**
         * Default dialog max-width
         */
        maxWidth?: string | number | undefined;
    } | undefined;
    /**
     * Default floating options
     */
    floating?: {
        /**
         * Default placement preset (default: 'top-right')
         */
        placement?: SurfaceFloatingPlacement | undefined;
        /**
         * Default floating width
         */
        width?: string | number | undefined;
        /**
         * Default floating max-width
         */
        maxWidth?: string | number | undefined;
        /**
         * Default floating max-height
         */
        maxHeight?: string | number | undefined;
        /**
         * Default escape behavior for floating surfaces (default: true)
         */
        closeOnEscape?: boolean | undefined;
        /**
         * Default outside-pointer behavior (default: false)
         */
        closeOnOutsidePointerDown?: boolean | undefined;
        /**
         * Default auto-focus behavior (default: true)
         */
        autoFocus?: boolean | undefined;
    } | undefined;
    /**
     * Built-in find/replace popover for editor-backed documents.
     * Disabled by default. Set to `true` to intercept Cmd+F / Ctrl+F inside SuperDoc and open the built-in UI.
     * When an object, allows text customization, custom components, resolvers, and replace-disabling.
     */
    findReplace?: boolean | FindReplaceConfig | undefined;
    /**
     * Built-in password prompt dialog for encrypted DOCX files.
     * Enabled by default when omitted. Set to `false` to disable. When `true`, uses default titles/labels.
     * When an object, allows custom titles and labels.
     */
    passwordPrompt?: boolean | PasswordPromptConfig | undefined;
};
/**
 * All customizable text strings for the password prompt, resolved with defaults.
 */
export type ResolvedPasswordPromptTexts = {
    /**
     * Dialog title for first attempt
     */
    title: string;
    /**
     * Dialog title after wrong password
     */
    invalidTitle: string;
    /**
     * Explanatory text shown below the title
     */
    description: string;
    /**
     * Input placeholder text
     */
    placeholder: string;
    /**
     * Accessible label for the password input
     */
    inputAriaLabel: string;
    /**
     * Submit button text
     */
    submitLabel: string;
    /**
     * Cancel button text
     */
    cancelLabel: string;
    /**
     * Submit button text while decrypting
     */
    busyLabel: string;
    /**
     * Error message for wrong password
     */
    invalidMessage: string;
    /**
     * Error message for decryption timeout
     */
    timeoutMessage: string;
    /**
     * Error message for other failures
     */
    genericErrorMessage: string;
};
/**
 * Result of a password attempt via the `attemptPassword` function.
 */
export type PasswordPromptAttemptResult = {
    /**
     * Whether the password was accepted
     */
    success: boolean;
    /**
     * Error code when success is false (e.g. 'DOCX_PASSWORD_INVALID', 'timeout')
     */
    errorCode?: string | undefined;
};
/**
 * Handle object injected into custom password prompt UIs as the `passwordPrompt` prop/context field.
 * Provides document metadata, resolved texts, and the retry function.
 */
export type PasswordPromptHandle = {
    /**
     * The document ID requiring a password
     */
    documentId: string;
    /**
     * The current error code (e.g. 'DOCX_PASSWORD_REQUIRED', 'DOCX_PASSWORD_INVALID')
     */
    errorCode: string;
    /**
     * All text strings resolved with defaults
     */
    texts: ResolvedPasswordPromptTexts;
    /**
     * Submit a password attempt. Returns the outcome; do not mutate document state directly.
     */
    attemptPassword: (password: string) => Promise<PasswordPromptAttemptResult>;
};
/**
 * Read-only context passed to a password prompt resolver to decide how to render.
 * Does NOT include `attemptPassword` — the resolver decides, it does not act.
 */
export type PasswordPromptContext = {
    /**
     * The document ID requiring a password
     */
    documentId: string;
    /**
     * The current error code
     */
    errorCode: string;
    /**
     * Resolved text strings
     */
    texts: ResolvedPasswordPromptTexts;
};
/**
 * Context passed to an external (framework-agnostic) password prompt renderer.
 */
export type PasswordPromptRenderContext = {
    /**
     * Empty DOM container to render into
     */
    container: HTMLElement;
    /**
     * The password prompt handle
     */
    passwordPrompt: PasswordPromptHandle;
    /**
     * Resolves the surface with { status: 'submitted', data }
     */
    resolve: (data?: unknown) => void;
    /**
     * Resolves the surface with { status: 'closed', reason }
     */
    close: (reason?: unknown) => void;
    /**
     * The surface id
     */
    surfaceId: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
};
/**
 * Resolution returned by a password prompt resolver.
 */
export type PasswordPromptResolution = {
    type: "default";
} | {
    type: "none";
} | {
    type: "custom";
    component: unknown;
    props?: Record<string, unknown>;
} | {
    type: "external";
    render: (ctx: PasswordPromptRenderContext) => ({
        destroy?: () => void;
    } | void);
};
/**
 * Configuration for the password prompt surface.
 */
export type PasswordPromptConfig = {
    /**
     * Dialog title for first attempt (default: 'Password Required')
     */
    title?: string | undefined;
    /**
     * Dialog title after wrong password (default: 'Incorrect Password')
     */
    invalidTitle?: string | undefined;
    /**
     * Explanatory text (default: 'This document is password protected. Enter the password to open it.')
     */
    description?: string | undefined;
    /**
     * Input placeholder (default: 'Enter password')
     */
    placeholder?: string | undefined;
    /**
     * Accessible label for the input (default: 'Document password')
     */
    inputAriaLabel?: string | undefined;
    /**
     * Submit button text (default: 'Open')
     */
    submitLabel?: string | undefined;
    /**
     * Cancel button text (default: 'Cancel')
     */
    cancelLabel?: string | undefined;
    /**
     * Submit button text while decrypting (default: 'Decrypting\u2026')
     */
    busyLabel?: string | undefined;
    /**
     * Error for wrong password (default: 'Incorrect password. Please try again.')
     */
    invalidMessage?: string | undefined;
    /**
     * Error for timeout (default: 'Timed out while decrypting. Please try again.')
     */
    timeoutMessage?: string | undefined;
    /**
     * Error for other failures (default: 'Unable to decrypt this document.')
     */
    genericErrorMessage?: string | undefined;
    /**
     * Vue component to render as custom password prompt content. Mutually exclusive with `render`.
     */
    component?: unknown;
    /**
     * Extra props passed to the custom Vue component. Component-only; ignored for `render`.
     */
    props?: Record<string, unknown> | undefined;
    /**
     * External (framework-agnostic) renderer. Mutually exclusive with `component`.
     */
    render?: ((ctx: PasswordPromptRenderContext) => ({
        destroy?: () => void;
    } | void)) | undefined;
    /**
     * Conditional resolver for per-document customization. Can coexist with `component`/`render`.
     */
    resolver?: ((ctx: PasswordPromptContext) => PasswordPromptResolution | null | undefined) | undefined;
};
/**
 * All customizable text strings for the find/replace surface, resolved with defaults.
 */
export type ResolvedFindReplaceTexts = {
    /**
     * Input placeholder for the find field
     */
    findPlaceholder: string;
    /**
     * Accessible label for the find input
     */
    findAriaLabel: string;
    /**
     * Input placeholder for the replace field
     */
    replacePlaceholder: string;
    /**
     * Accessible label for the replace input
     */
    replaceAriaLabel: string;
    /**
     * Text shown when there are no matches
     */
    noResultsLabel: string;
    /**
     * Button label / title for previous match
     */
    previousMatchLabel: string;
    /**
     * Accessible label for previous match button
     */
    previousMatchAriaLabel: string;
    /**
     * Button label / title for next match
     */
    nextMatchLabel: string;
    /**
     * Accessible label for next match button
     */
    nextMatchAriaLabel: string;
    /**
     * Button label / title for close
     */
    closeLabel: string;
    /**
     * Accessible label for close button
     */
    closeAriaLabel: string;
    /**
     * Replace button text
     */
    replaceLabel: string;
    /**
     * Replace-all button text
     */
    replaceAllLabel: string;
    /**
     * Toggle replace row label
     */
    toggleReplaceLabel: string;
    /**
     * Accessible label for toggle replace button
     */
    toggleReplaceAriaLabel: string;
    /**
     * Match case toggle text
     */
    matchCaseLabel: string;
    /**
     * Accessible label for match case toggle
     */
    matchCaseAriaLabel: string;
    /**
     * Ignore diacritics toggle text
     */
    ignoreDiacriticsLabel: string;
    /**
     * Accessible label for ignore diacritics toggle
     */
    ignoreDiacriticsAriaLabel: string;
};
/**
 * Handle object injected into find/replace UIs as the `findReplace` prop/context field.
 * Provides reactive search state and all action functions.
 */
export type FindReplaceHandle = {
    /**
     * Current search query
     */
    findQuery: import('vue').Ref<string>;
    /**
     * Current replacement text
     */
    replaceText: import('vue').Ref<string>;
    /**
     * Case-sensitive toggle
     */
    caseSensitive: import('vue').Ref<boolean>;
    /**
     * Ignore diacritics toggle
     */
    ignoreDiacritics: import('vue').Ref<boolean>;
    /**
     * Whether replace row is expanded
     */
    showReplace: import('vue').Ref<boolean>;
    /**
     * Total match count (read-only by convention)
     */
    matchCount: import('vue').Ref<number>;
    /**
     * Active match index, -1 when none (read-only by convention)
     */
    activeMatchIndex: import('vue').Ref<number>;
    /**
     * Formatted match label e.g. "3 of 12" or "No results"
     */
    matchLabel: import('vue').ComputedRef<string>;
    /**
     * Whether there are any matches
     */
    hasMatches: import('vue').ComputedRef<boolean>;
    /**
     * Whether replace actions are available (false for find-only mode)
     */
    replaceEnabled: boolean;
    /**
     * All text strings resolved with defaults
     */
    texts: ResolvedFindReplaceTexts;
    /**
     * Navigate to the next match
     */
    goNext: () => void;
    /**
     * Navigate to the previous match
     */
    goPrev: () => void;
    /**
     * Replace the active match
     */
    replaceCurrent: () => void;
    /**
     * Replace all matches
     */
    replaceAll: () => void;
    /**
     * Register a function the composable calls to refocus the find input
     */
    registerFocusFn: (fn: () => void) => void;
    /**
     * Close the find/replace surface
     */
    close: (reason?: unknown) => void;
};
/**
 * Read-only context passed to a find/replace resolver to decide how to render.
 * Does NOT include action functions — the resolver decides, it does not act.
 */
export type FindReplaceContext = {
    /**
     * Resolved text strings
     */
    texts: ResolvedFindReplaceTexts;
    /**
     * Whether replace is available
     */
    replaceEnabled: boolean;
};
/**
 * Context passed to an external (framework-agnostic) find/replace renderer.
 * Vue refs are unwrapped as getter/setter properties for framework neutrality.
 */
export type FindReplaceRenderContext = {
    /**
     * Empty DOM container to render into
     */
    container: HTMLElement;
    /**
     * The find/replace handle with getters/setters instead of Vue refs
     */
    findReplace: Object;
    /**
     * Resolves the surface with { status: 'submitted', data }
     */
    resolve: (data?: unknown) => void;
    /**
     * Resolves the surface with { status: 'closed', reason }
     */
    close: (reason?: unknown) => void;
    /**
     * The surface id
     */
    surfaceId: string;
    /**
     * Presentation mode
     */
    mode: SurfaceMode;
};
/**
 * Resolution returned by a find/replace resolver.
 */
export type FindReplaceResolution = {
    type: "default";
} | {
    type: "none";
} | {
    type: "custom";
    component: unknown;
    props?: Record<string, unknown>;
} | {
    type: "external";
    render: (ctx: FindReplaceRenderContext) => ({
        destroy?: () => void;
    } | void);
};
/**
 * Configuration for the find/replace surface.
 */
export type FindReplaceConfig = {
    /**
     * Override find placeholder text
     */
    findPlaceholder?: string | undefined;
    /**
     * Override find input aria-label
     */
    findAriaLabel?: string | undefined;
    /**
     * Override replace placeholder text
     */
    replacePlaceholder?: string | undefined;
    /**
     * Override replace input aria-label
     */
    replaceAriaLabel?: string | undefined;
    /**
     * Override "No results" text
     */
    noResultsLabel?: string | undefined;
    /**
     * Override previous match button title
     */
    previousMatchLabel?: string | undefined;
    /**
     * Override previous match aria-label
     */
    previousMatchAriaLabel?: string | undefined;
    /**
     * Override next match button title
     */
    nextMatchLabel?: string | undefined;
    /**
     * Override next match aria-label
     */
    nextMatchAriaLabel?: string | undefined;
    /**
     * Override close button title
     */
    closeLabel?: string | undefined;
    /**
     * Override close button aria-label
     */
    closeAriaLabel?: string | undefined;
    /**
     * Override replace button text
     */
    replaceLabel?: string | undefined;
    /**
     * Override replace-all button text
     */
    replaceAllLabel?: string | undefined;
    /**
     * Override toggle replace button title
     */
    toggleReplaceLabel?: string | undefined;
    /**
     * Override toggle replace aria-label
     */
    toggleReplaceAriaLabel?: string | undefined;
    /**
     * Override match case toggle text
     */
    matchCaseLabel?: string | undefined;
    /**
     * Override match case aria-label
     */
    matchCaseAriaLabel?: string | undefined;
    /**
     * Override ignore diacritics toggle text
     */
    ignoreDiacriticsLabel?: string | undefined;
    /**
     * Override ignore diacritics aria-label
     */
    ignoreDiacriticsAriaLabel?: string | undefined;
    /**
     * Whether replace is available (default: true)
     */
    replaceEnabled?: boolean | undefined;
    /**
     * Vue component to render as custom find/replace content. Mutually exclusive with `render`.
     */
    component?: unknown;
    /**
     * Extra props passed to the custom Vue component.
     */
    props?: Record<string, unknown> | undefined;
    /**
     * External (framework-agnostic) renderer. Mutually exclusive with `component`.
     */
    render?: ((ctx: FindReplaceRenderContext) => ({
        destroy?: () => void;
    } | void)) | undefined;
    /**
     * Conditional resolver. Can coexist with `component`/`render`.
     */
    resolver?: ((ctx: FindReplaceContext) => FindReplaceResolution | null | undefined) | undefined;
};
export type Modules = {
    /**
     * Comments module configuration (false to disable)
     */
    comments?: false | Object | undefined;
    /**
     * Custom permission resolver for comment actions
     */
    permissionResolver?: ((params: {
        permission: string;
        role?: string;
        isInternal?: boolean;
        comment?: Object | null;
        trackedChange?: Object | null;
        currentUser?: User | null;
        superdoc?: SuperDoc | null;
    }) => boolean | undefined) | undefined;
    /**
     * Comment highlight colors (internal/external and active overrides)
     */
    highlightColors?: {
        /**
         * Base highlight color for internal comments
         */
        internal?: string | undefined;
        /**
         * Base highlight color for external comments
         */
        external?: string | undefined;
        /**
         * Active highlight color override for internal comments
         */
        activeInternal?: string | undefined;
        /**
         * Active highlight color override for external comments
         */
        activeExternal?: string | undefined;
    } | undefined;
    /**
     * Comment highlight opacity values (0-1)
     */
    highlightOpacity?: {
        /**
         * Opacity for active comment highlight
         */
        active?: number | undefined;
        /**
         * Opacity for inactive comment highlight
         */
        inactive?: number | undefined;
    } | undefined;
    /**
     * Hover highlight color for comment marks
     */
    highlightHoverColor?: string | undefined;
    /**
     * Track change highlight colors
     */
    trackChangeHighlightColors?: {
        /**
         * Border color for inserted text highlight
         */
        insertBorder?: string | undefined;
        /**
         * Background color for inserted text highlight
         */
        insertBackground?: string | undefined;
        /**
         * Border color for deleted text highlight
         */
        deleteBorder?: string | undefined;
        /**
         * Background color for deleted text highlight
         */
        deleteBackground?: string | undefined;
        /**
         * Border color for format change highlight
         */
        formatBorder?: string | undefined;
    } | undefined;
    /**
     * Active track change highlight colors (defaults to trackChangeHighlightColors)
     */
    trackChangeActiveHighlightColors?: {
        /**
         * Active border color for inserted text highlight
         */
        insertBorder?: string | undefined;
        /**
         * Active background color for inserted text highlight
         */
        insertBackground?: string | undefined;
        /**
         * Active border color for deleted text highlight
         */
        deleteBorder?: string | undefined;
        /**
         * Active background color for deleted text highlight
         */
        deleteBackground?: string | undefined;
        /**
         * Active border color for format change highlight
         */
        formatBorder?: string | undefined;
    } | undefined;
    /**
     * AI module configuration
     */
    ai?: {
        /**
         * Harbour API key for AI features
         */
        apiKey?: string | undefined;
        /**
         * Custom endpoint URL for AI services
         */
        endpoint?: string | undefined;
    } | undefined;
    /**
     * PDF module configuration
     */
    pdf?: {
        /**
         * Preloaded pdf.js library instance
         */
        pdfLib: Object;
        /**
         * PDF.js worker source URL (falls back to CDN when omitted)
         */
        workerSrc?: string | undefined;
        /**
         * Whether to auto-configure pdf.js worker
         */
        setWorker?: boolean | undefined;
        /**
         * Enable text layer rendering (default: false)
         */
        textLayer?: boolean | undefined;
        /**
         * Canvas render scale (quality)
         */
        outputScale?: number | undefined;
    } | undefined;
    /**
     * Collaboration module configuration
     */
    collaboration?: CollaborationConfig | undefined;
    /**
     * Toolbar module configuration
     */
    toolbar?: Object | undefined;
    /**
     * Link click popover configuration
     */
    links?: {
        /**
         * Custom resolver for the link click popover.
         */
        popoverResolver?: LinkPopoverResolver | undefined;
    } | undefined;
    /**
     * Context menu module configuration
     */
    contextMenu?: {
        /**
         * Array of custom menu sections with items
         */
        customItems?: any[] | undefined;
        /**
         * Function to customize menu items
         */
        menuProvider?: Function | undefined;
        /**
         * Whether to include default menu items
         */
        includeDefaultItems?: boolean | undefined;
    } | undefined;
    slashMenu?: Object | undefined;
};
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";
/**
 * Document view layout values - mirrors OOXML ST_View (ECMA-376 §17.18.102)
 * - 'print': Print Layout View - displays document as it prints (default)
 * - 'web': Web Page View - content reflows to fit container (mobile/accessibility)
 */
export type ViewLayout = "print" | "web";
/**
 * Document view options for controlling how the document is displayed.
 * Mirrors OOXML document view settings.
 */
export type ViewOptions = {
    /**
     * Document view layout (OOXML ST_View compatible)
     */
    layout?: ViewLayout | undefined;
};
export type ExportParams = {
    /**
     * - File formats to export
     */
    exportType?: ExportType[] | undefined;
    /**
     * - How to handle comments
     */
    commentsType?: CommentsType | undefined;
    /**
     * - Custom filename (without extension)
     */
    exportedName?: string | undefined;
    /**
     * - Extra files to include in the export zip
     */
    additionalFiles?: Blob[] | undefined;
    /**
     * - Filenames for the additional files
     */
    additionalFileNames?: string[] | undefined;
    /**
     * - Whether this is a final document export
     */
    isFinalDoc?: boolean | undefined;
    /**
     * - Auto-download or return blob
     */
    triggerDownload?: boolean | undefined;
    /**
     * - Color for field highlights
     */
    fieldsHighlightColor?: string | undefined;
};
/**
 * Surface where the edit originated.
 */
export type EditorSurface = "body" | "header" | "footer";
export type EditorUpdateEvent = {
    /**
     * The primary editor associated with the update. For header/footer edits, this is the main body editor.
     */
    editor: Editor;
    /**
     * The editor instance that emitted the update. For body edits, this matches `editor`.
     */
    sourceEditor: Editor;
    /**
     * The surface where the edit originated.
     */
    surface: EditorSurface;
    /**
     * Relationship ID for header/footer edits.
     */
    headerId?: string | null | undefined;
    /**
     * Header/footer variant (`default`, `first`, `even`, `odd`) when available.
     */
    sectionType?: string | null | undefined;
};
export type EditorTransactionEvent = {
    /**
     * The primary editor associated with the transaction. For header/footer edits, this is the main body editor.
     */
    editor: Editor;
    /**
     * The editor instance that emitted the transaction. For body edits, this matches `editor`.
     */
    sourceEditor: Editor;
    /**
     * The ProseMirror transaction or transaction-like payload emitted by the source editor.
     */
    transaction: any;
    /**
     * Time spent applying the transaction, in milliseconds.
     */
    duration?: number | undefined;
    /**
     * The surface where the transaction originated.
     */
    surface: EditorSurface;
    /**
     * Relationship ID for header/footer edits.
     */
    headerId?: string | null | undefined;
    /**
     * Header/footer variant (`default`, `first`, `even`, `odd`) when available.
     */
    sectionType?: string | null | undefined;
};
export type Config = {
    /**
     * The ID of the SuperDoc
     */
    superdocId?: string | undefined;
    /**
     * 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" | undefined;
    /**
     * 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?: string | Object | File | Blob | undefined;
    /**
     * Password for encrypted DOCX files. Forwarded during document load.
     */
    password?: string | undefined;
    /**
     * The documents to load -> Soon to be deprecated
     */
    documents?: Document[] | undefined;
    /**
     * The current user of this SuperDoc
     */
    user?: User | undefined;
    /**
     * All users of this SuperDoc (can be used for "@"-mentions)
     */
    users?: User[] | undefined;
    /**
     * Colors to use for user awareness
     */
    colors?: string[] | undefined;
    /**
     * Modules to load
     */
    modules?: Modules | undefined;
    /**
     * Top-level override for permission checks
     */
    permissionResolver?: ((params: {
        permission: string;
        role?: string;
        isInternal?: boolean;
        comment?: Object | null;
        trackedChange?: Object | null;
        currentUser?: User | null;
        superdoc?: SuperDoc | null;
    }) => boolean | undefined) | undefined;
    /**
     * Optional DOM element to render the toolbar in
     */
    toolbar?: string | undefined;
    /**
     * Toolbar groups to show
     */
    toolbarGroups?: string[] | undefined;
    /**
     * Icons to show in the toolbar
     */
    toolbarIcons?: Object | undefined;
    /**
     * Texts to override in the toolbar
     */
    toolbarTexts?: Object | undefined;
    /**
     * The font-family to use for all SuperDoc UI surfaces
     * (toolbar, comments UI, dropdowns, tooltips, etc.). This ensures consistent typography across the entire application
     * and helps match your application's design system. The value should be a valid CSS font-family string.
     * Example (system fonts):
     * uiDisplayFallbackFont: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
     * Example (custom font):
     * uiDisplayFallbackFont: '"Inter", Arial, sans-serif'
     */
    uiDisplayFallbackFont?: string | undefined;
    /**
     * Whether the SuperDoc is in development mode
     */
    isDev?: boolean | undefined;
    /**
     * Disable Pinia/Vue devtools plugin setup for this SuperDoc instance (useful in non-Vue hosts)
     */
    disablePiniaDevtools?: boolean | undefined;
    /**
     * Layout engine overrides passed through to PresentationEditor (page size, margins, virtualization, zoom, debug label, etc.)
     */
    layoutEngineOptions?: {
        /**
         * Layout engine flow mode.
         * - 'paginated': standard page-first layout (default)
         * - 'semantic': continuous semantic flow without visible pagination boundaries
         */
        flowMode?: "paginated" | "semantic" | undefined;
        /**
         * Internal-only semantic mode tuning options.
         * This shape is intentionally not a stable public API in v1.
         */
        semanticOptions?: Object | undefined;
        /**
         * Optional override for paginated track-changes rendering (e.g., `{ mode: 'final' }` to force final view or `{ enabled: false }` to strip metadata entirely)
         */
        trackedChanges?: Object | undefined;
    } | undefined;
    /**
     * Callback before an editor is created
     */
    onEditorBeforeCreate?: ((editor: Editor) => void) | undefined;
    /**
     * Callback after an editor is created
     */
    onEditorCreate?: ((editor: Editor) => void) | undefined;
    /**
     * Callback when a transaction is made
     */
    onTransaction?: ((params: EditorTransactionEvent) => void) | undefined;
    /**
     * Callback after an editor is destroyed
     */
    onEditorDestroy?: (() => void) | undefined;
    /**
     * Callback when there is an error in the content
     */
    onContentError?: ((params: {
        error: object;
        editor: Editor;
        documentId: string;
        file: File;
    }) => void) | undefined;
    /**
     * Callback when the SuperDoc is ready
     */
    onReady?: ((editor: {
        superdoc: SuperDoc;
    }) => void) | undefined;
    /**
     * Callback when comments are updated
     */
    onCommentsUpdate?: ((params: {
        type: string;
        data: object;
    }) => void) | undefined;
    /**
     * Callback when awareness is updated
     */
    onAwarenessUpdate?: ((params: {
        context: SuperDoc;
        states: any[];
    }) => void) | undefined;
    /**
     * Callback when the SuperDoc is locked
     */
    onLocked?: ((params: {
        isLocked: boolean;
        lockedBy: User;
    }) => void) | undefined;
    /**
     * Callback when the PDF document is ready
     */
    onPdfDocumentReady?: (() => void) | undefined;
    /**
     * Callback when the sidebar is toggled
     */
    onSidebarToggle?: ((isOpened: boolean) => void) | undefined;
    /**
     * Callback when collaboration is ready
     */
    onCollaborationReady?: ((params: {
        editor: Editor;
    }) => void) | undefined;
    /**
     * Callback when document is updated
     */
    onEditorUpdate?: ((params: EditorUpdateEvent) => void) | undefined;
    /**
     * Callback when an exception is thrown
     */
    onException?: ((params: {
        error: Error;
        editor?: Editor | null;
        code?: string;
    }) => void) | undefined;
    /**
     * Callback when the comments list is rendered
     */
    onCommentsListChange?: ((params: {
        isRendered: boolean;
    }) => void) | undefined;
    /**
     * Callback when pagination layout updates (fires after each layout pass with the current page count)
     */
    onPaginationUpdate?: ((params: {
        totalPages: number;
        superdoc: SuperDoc;
    }) => void) | undefined;
    /**
     * Callback when the list definitions change
     */
    onListDefinitionsChange?: ((params: {}) => any) | undefined;
    /**
     * The format of the document (docx, pdf, html)
     */
    format?: string | undefined;
    /**
     * The extensions to load for the editor
     */
    editorExtensions?: Object[] | undefined;
    /**
     * Whether the SuperDoc is internal
     */
    isInternal?: boolean | undefined;
    /**
     * The title of the SuperDoc
     */
    title?: string | undefined;
    /**
     * The conversations to load
     */
    conversations?: Object[] | undefined;
    /**
     * Toggle comment visibility when `documentMode` is `viewing` (default: false)
     */
    comments?: {
        visible?: boolean;
    } | undefined;
    /**
     * Toggle tracked-change visibility when `documentMode` is `viewing` (default: false)
     */
    trackChanges?: {
        visible?: boolean;
    } | undefined;
    /**
     * Whether the SuperDoc is locked
     */
    isLocked?: boolean | undefined;
    /**
     * The function to handle image uploads
     */
    handleImageUpload?: ((arg0: File) => Promise<string>) | undefined;
    /**
     * The user who locked the SuperDoc
     */
    lockedBy?: User | undefined;
    /**
     * Whether to show the ruler in the editor
     */
    rulers?: boolean | undefined;
    /**
     * Whether to suppress default styles in docx mode
     */
    suppressDefaultDocxStyles?: boolean | undefined;
    /**
     * Provided JSON to override content with
     */
    jsonOverride?: Object | undefined;
    /**
     * Whether to disable slash / right-click custom context menu
     */
    disableContextMenu?: boolean | undefined;
    /**
     * HTML content to initialize the editor with
     */
    html?: string | undefined;
    /**
     * Markdown content to initialize the editor with
     */
    markdown?: string | undefined;
    /**
     * Callback invoked with unsupported HTML elements dropped during import. When provided, console.warn is NOT emitted.
     */
    onUnsupportedContent?: ((items: Array<{
        tagName: string;
        outerHTML: string;
        count: number;
    }>) => void) | null | undefined;
    /**
     * When true and no onUnsupportedContent callback is provided, emits a console.warn with unsupported items
     */
    warnOnUnsupportedContent?: boolean | undefined;
    /**
     * Whether to enable debug mode
     */
    isDebug?: boolean | undefined;
    /**
     * Document view options (OOXML ST_View compatible)
     */
    viewOptions?: ViewOptions | undefined;
    /**
     * Content Security Policy nonce for dynamically injected styles
     */
    cspNonce?: string | undefined;
    /**
     * License key for organization identification
     */
    licenseKey?: string | undefined;
    /**
     * Telemetry configuration
     */
    telemetry?: {
        enabled: boolean;
        endpoint?: string;
        metadata?: Record<string, unknown>;
        licenseKey?: string;
    } | undefined;
    /**
     * Proofing / spellcheck configuration
     */
    proofing?: ProofingConfig | undefined;
};
export type ProofingStatus = "idle" | "checking" | "disabled" | "degraded";
export type ProofingError = {
    kind: "provider-error" | "validation-error" | "timeout";
    message: string;
    segmentIds?: string[] | undefined;
    cause?: any;
};
export type ProofingConfig = {
    /**
     * Enable or disable proofing (default: false)
     */
    enabled?: boolean | undefined;
    /**
     * Provider instance
     */
    provider?: import('../../../../super-editor/src/index.js').ProofingProvider | null;
    /**
     * Fallback language for segments without a resolved language
     */
    defaultLanguage?: string | null | undefined;
    /**
     * Debounce delay after edits before rechecking (default: 500)
     */
    debounceMs?: number | undefined;
    /**
     * Maximum replacement suggestions per issue
     */
    maxSuggestions?: number | undefined;
    /**
     * Prioritize checking visible pages first (default: true)
     */
    visibleFirst?: boolean | undefined;
    /**
     * Show "Ignore" in context menu (default: true)
     */
    allowIgnoreWord?: boolean | undefined;
    /**
     * Words to suppress from proofing results
     */
    ignoredWords?: string[] | undefined;
    /**
     * Provider call timeout in milliseconds (default: 10000)
     */
    timeoutMs?: number | undefined;
    /**
     * Max concurrent provider requests (default: 2)
     */
    maxConcurrentRequests?: number | undefined;
    /**
     * Max segments per provider call (default: 20)
     */
    maxSegmentsPerBatch?: number | undefined;
    /**
     * Error callback for provider failures
     */
    onProofingError?: ((error: ProofingError) => void) | undefined;
    /**
     * Status change callback
     */
    onStatusChange?: ((status: ProofingStatus) => void) | undefined;
};
//# sourceMappingURL=index.d.ts.map