API Referencev1.0.2
@eigenpal/docx-editor-core/managers/types
Manager Types
Framework-agnostic interfaces for the editor's manager classes.
Interfaces(10)
interface
packages/core/src/managers/types.ts:42AutoSaveManagerOptions
Configuration for AutoSaveManager
interface AutoSaveManagerOptions| Member | Type | Summary |
|---|---|---|
| debounceDelay? | number | Debounce delay for saveOnChange in milliseconds (default: 2000) |
| interval? | number | Save interval in milliseconds (default: 30000 - 30 seconds) |
| maxAge? | number | Maximum age of auto-save before it's considered stale (default: 24 hours) |
| onError? | (error: Error) => void | Callback when save fails |
| onRecoveryAvailable? | (savedDocument: SavedDocumentData) => void | Callback when recovery data is found |
| onSave? | (timestamp: Date) => void | Callback when save succeeds |
| saveOnChange? | boolean | Whether to save on document change with debounce (default: true) |
| storageKey? | string | Storage key for localStorage (default: 'docx-editor-autosave') |
interface
packages/core/src/managers/types.ts:74AutoSaveSnapshot
AutoSaveManager snapshot for UI consumption
interface AutoSaveSnapshot| Member | Type | Summary |
|---|---|---|
| hasRecoveryData | boolean | |
| isEnabled | boolean | |
| lastSaveTime | Date | null | |
| status | AutoSaveStatus |
interface
packages/core/src/managers/types.ts:86CellCoordinates
Cell coordinates in a table
interface CellCoordinates| Member | Type | Summary |
|---|---|---|
| columnIndex | number | |
| rowIndex | number | |
| tableIndex | number |
interface
packages/core/src/managers/types.ts:23EditorHandle
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| Member | Type | Summary |
|---|---|---|
| destroy | — | Unmount the editor and clean up. |
| focus | — | Focus the editor. |
| getDocument | — | Get the current parsed document model. |
| save | — | Save the document and return the DOCX as a Blob. |
interface
packages/core/src/managers/types.ts:116ErrorManagerSnapshot
ErrorManager snapshot
interface ErrorManagerSnapshot| Member | Type | Summary |
|---|---|---|
| notifications | ErrorNotification[] |
interface
packages/core/src/managers/types.ts:106ErrorNotification
Error notification
interface ErrorNotification| Member | Type | Summary |
|---|---|---|
| details? | string | |
| dismissed? | boolean | |
| id | string | |
| message | string | |
| severity | ErrorSeverity | |
| timestamp | number |
interface
packages/core/src/managers/types.ts:125PluginLifecycleConfig
Plugin lifecycle configuration
interface PluginLifecycleConfig| Member | Type | Summary |
|---|---|---|
| destroy? | () => void | |
| id | string | |
| initialize? | (editorView: EditorView) => unknown | |
| onStateChange? | (editorView: EditorView) => unknown | |
| styles? | string |
interface
packages/core/src/managers/types.ts:134PluginLifecycleSnapshot
PluginLifecycleManager snapshot
interface PluginLifecycleSnapshot| Member | Type | Summary |
|---|---|---|
| states | Map<string, unknown> | Map of plugin ID to plugin state |
| version | number | Version counter (incremented on any state change) |
interface
packages/core/src/managers/types.ts:62SavedDocumentData
Saved document data structure
interface SavedDocumentData| Member | Type | Summary |
|---|---|---|
| document | Document | The document JSON |
| documentId? | string | Optional document identifier |
| savedAt | string | When the document was saved |
| version | number | Version for format compatibility |
interface
packages/core/src/managers/types.ts:93TableSelectionSnapshot
TableSelectionManager snapshot
interface TableSelectionSnapshot| Member | Type | Summary |
|---|---|---|
| selectedCell | CellCoordinates | null | Currently selected cell, or null if no selection |
Type aliases(2)
type
packages/core/src/managers/types.ts:39AutoSaveStatus
Auto-save status
type AutoSaveStatus = 'idle' | 'saving' | 'saved' | 'error';type
packages/core/src/managers/types.ts:103ErrorSeverity
Error severity levels
type ErrorSeverity = 'error' | 'warning' | 'info';