New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

API Referencev1.0.2

@eigenpal/docx-editor-core/managers/types

Manager Types

Framework-agnostic interfaces for the editor's manager classes.

Interfaces(10)

interface

AutoSaveManagerOptions

packages/core/src/managers/types.ts:42

Configuration for AutoSaveManager

interface AutoSaveManagerOptions
MemberTypeSummary
debounceDelay?numberDebounce delay for saveOnChange in milliseconds (default: 2000)
interval?numberSave interval in milliseconds (default: 30000 - 30 seconds)
maxAge?numberMaximum age of auto-save before it's considered stale (default: 24 hours)
onError?(error: Error) => voidCallback when save fails
onRecoveryAvailable?(savedDocument: SavedDocumentData) => voidCallback when recovery data is found
onSave?(timestamp: Date) => voidCallback when save succeeds
saveOnChange?booleanWhether to save on document change with debounce (default: true)
storageKey?stringStorage key for localStorage (default: 'docx-editor-autosave')

AutoSaveManager snapshot for UI consumption

interface AutoSaveSnapshot
MemberTypeSummary
hasRecoveryDataboolean
isEnabledboolean
lastSaveTimeDate | null
statusAutoSaveStatus

Cell coordinates in a table

interface CellCoordinates
MemberTypeSummary
columnIndexnumber
rowIndexnumber
tableIndexnumber

Framework-agnostic interface for an imperatively mounted editor instance.

Returned by `renderAsync()` implementations (React, Vue, etc.). Consumers use this to interact with the editor programmatically.

interface EditorHandle
MemberTypeSummary
destroyUnmount the editor and clean up.
focusFocus the editor.
getDocumentGet the current parsed document model.
saveSave the document and return the DOCX as a Blob.
interface

ErrorManagerSnapshot

packages/core/src/managers/types.ts:116

ErrorManager snapshot

interface ErrorManagerSnapshot
MemberTypeSummary
notificationsErrorNotification[]

Error notification

interface ErrorNotification
MemberTypeSummary
details?string
dismissed?boolean
idstring
messagestring
severityErrorSeverity
timestampnumber
interface

PluginLifecycleConfig

packages/core/src/managers/types.ts:125

Plugin lifecycle configuration

interface PluginLifecycleConfig
MemberTypeSummary
destroy?() => void
idstring
initialize?(editorView: EditorView) => unknown
onStateChange?(editorView: EditorView) => unknown
styles?string
interface

PluginLifecycleSnapshot

packages/core/src/managers/types.ts:134

PluginLifecycleManager snapshot

interface PluginLifecycleSnapshot
MemberTypeSummary
statesMap<string, unknown>Map of plugin ID to plugin state
versionnumberVersion counter (incremented on any state change)

Saved document data structure

interface SavedDocumentData
MemberTypeSummary
documentDocumentThe document JSON
documentId?stringOptional document identifier
savedAtstringWhen the document was saved
versionnumberVersion for format compatibility
interface

TableSelectionSnapshot

packages/core/src/managers/types.ts:93

TableSelectionManager snapshot

interface TableSelectionSnapshot
MemberTypeSummary
selectedCellCellCoordinates | nullCurrently selected cell, or null if no selection

Type aliases(2)

Auto-save status

type AutoSaveStatus = 'idle' | 'saving' | 'saved' | 'error';

Error severity levels

type ErrorSeverity = 'error' | 'warning' | 'info';