/** * Configuration accepted by the public base error. */ export interface AltEditorLiteErrorOptions { /** Human-readable message safe to present in the editor UI. */ readonly message: string; /** Stable machine-readable error code. */ readonly code?: string; /** Errors associated with configured field paths. */ readonly fieldErrors?: Readonly>; /** Whether retrying the same operation can be meaningful. */ readonly retryable?: boolean; /** Original value that caused this error. */ readonly cause?: unknown; } /** * Base error for recoverable editor failures. * * The error itself does not mutate Host state or transition editor state. * Callers decide whether it is shown in an open dialog and whether retry is * available. */ export declare class AltEditorLiteError extends Error { /** Stable machine-readable error code, when supplied. */ readonly code: string | undefined; /** Errors associated with configured field paths, when supplied. */ readonly fieldErrors: Readonly> | undefined; /** Whether retrying the failed operation can be meaningful. */ readonly retryable: boolean; /** * Creates an editor error without changing editor or Host state. * * @param options - Public error properties. */ constructor(options: AltEditorLiteErrorOptions); } /** * Indicates that an active editor already owns the requested Host identity. * * Construction fails before editor or Host state is changed. The * existing instance can continue to be used. */ export declare class EditorAlreadyInitializedError extends AltEditorLiteError { /** Creates the duplicate-instance error. */ constructor(); } /** * Indicates that editor options or a configured capability are invalid. * * Configuration failures do not mutate Host state. They are retryable only * after the consumer corrects the configuration. */ export declare class EditorConfigurationError extends AltEditorLiteError { /** * Creates a configuration error. * * @param message - Stable explanation of the invalid configuration. * @param cause - Optional original failure. */ constructor(message: string, cause?: unknown); } /** * Indicates that a second operation was requested while the editor was busy. * * The active operation and current editor state remain unchanged, and * Host state is not mutated. */ export declare class EditorOperationBusyError extends AltEditorLiteError { /** Creates a busy-operation error. */ constructor(); } /** * Indicates that selection-based targeting was requested without Host support. * * The editor remains ready and Host state is not mutated. Supplying an explicit * target or configuring Host selection support makes the request retryable. */ export declare class EditorSelectionUnavailableError extends AltEditorLiteError { /** * Creates a selection-capability error. * * @param message - Localized safe explanation. */ constructor(message?: string); } /** * Indicates that a selection or explicit target resolved the wrong record count. * * The editor remains ready and Host state is not mutated. The caller can correct * the explicit target or selection and retry. */ export declare class EditorSelectionCountError extends AltEditorLiteError { /** Number of records resolved by the failed request. */ readonly actualCount: number; /** Required selection cardinality. */ readonly expected: 'exactly-one' | 'one-or-more' | 'at-least-two'; /** * Creates a selection-count error. * * @param expected - Required cardinality. * @param actualCount - Number of records actually resolved. * @param message - Localized safe explanation. */ constructor(expected: 'exactly-one' | 'one-or-more' | 'at-least-two', actualCount: number, message: string); } /** * Indicates that an Edit or Remove target can no longer identify its records. * * The persistence callback is not invoked when detected before submission. * If detected after an asynchronous callback, AltEditorLite still performs no * Host mutation. Closing and opening a new dialog is required. */ export declare class EditorTargetUnavailableError extends AltEditorLiteError { /** * Creates a stale-target error. * * @param message - Localized safe explanation. */ constructor(message?: string); } /** * Indicates that a public method was called after the instance was destroyed. * * The destroyed state remains unchanged and Host state is not mutated. */ export declare class EditorDestroyedError extends AltEditorLiteError { /** Creates a destroyed-instance error. */ constructor(); } /** * Indicates that an editor language resource could not be loaded. */ export declare class EditorLanguageLoadError extends AltEditorLiteError { /** * Creates a language-load error without changing editor or Host state. * * @param message - Safe explanation of the failed language load. * @param cause - Optional original failure. * @param retryable - Whether another request may succeed. Defaults to true. */ constructor(message?: string, cause?: unknown, retryable?: boolean); } /** * Indicates that selected files exceed a configured size or count budget. * * The dialog stays open, no Host mutation occurs, and the user can retry * with a different file selection. */ export declare class EditorFileLimitError extends AltEditorLiteError { /** * Creates a file-budget error. * * @param message - Safe explanation of the exceeded limit. */ constructor(message: string); }