import { WordEditor, type WordEditorOptions } from '@raazkhnl/rk-editor-core'; import { Modal } from './Modal'; import { icon, Icons, type IconName } from './icons'; import { showLinkDialog, showImageDialog, showTableDialog, showMathDialog, showFootnoteDialog, showCitationDialog, showPageLayoutDialog, showShortcutsDialog, showAboutDialog, showTocDialog, RK_EDITOR_VERSION } from './dialogs'; import { FindReplaceBar } from './FindReplaceBar'; import { StatusBar, type AutoSaveState } from './StatusBar'; import { Outline } from './Outline'; import { PropertyPanel } from './PropertyPanel'; import { CommandPalette } from './CommandPalette'; import { toast } from './toast'; import './styles.css'; export { Modal, icon, Icons, type IconName }; export { FindReplaceBar, StatusBar, Outline, PropertyPanel, CommandPalette, toast }; export type { AutoSaveState }; export { RK_EDITOR_VERSION }; export { showLinkDialog, showImageDialog, showTableDialog, showMathDialog, showFootnoteDialog, showCitationDialog, showPageLayoutDialog, showShortcutsDialog, showAboutDialog, showTocDialog, }; export interface WordToolbarOptions { /** Show the menubar (File / Edit / Insert / Format / View / Help). Defaults to `true`. */ menubar?: boolean; /** Show the formatting toolbar. Defaults to `true`. */ toolbar?: boolean; /** Show the status bar (page count, word count, zoom). Defaults to `true`. */ statusBar?: boolean; /** Show the document outline sidebar. Defaults to `false`. */ outline?: boolean; /** Show the right-side property panel. Defaults to `true`. */ propertyPanel?: boolean; /** Initial theme. Defaults to `'light'`. */ theme?: 'light' | 'dark' | 'auto'; /** Brand label / logo HTML. */ brandHtml?: string; } export declare class WordToolbar { editor: WordEditor; private container; private opts; private root; private findBar?; private _statusBar?; private outline?; private propertyPanel?; private surfaceWrap; private palette?; /** The status bar instance (if one was rendered). */ get statusBar(): StatusBar | undefined; constructor(editor: WordEditor, container: HTMLElement, opts?: WordToolbarOptions); private render; private handleDocClick; private buildMenubar; private buildMenu; private closeMenus; private buildToolbar; private toolbarGroup; private bindToolbarEvents; private handleAction; private bindGlobalKeys; /** Lazily build & open the command palette (Ctrl/⌘+/). */ private openCommandPalette; applyTheme(theme: 'light' | 'dark' | 'auto'): void; toggleTheme(): void; private updateActiveStates; /** Reflect auto-save progress in the status bar pill. */ setSaveState(state: AutoSaveState, message?: string): void; destroy(): void; } export interface EditorShellOptions extends Omit, WordToolbarOptions { /** Where to mount the editor. Either `container` or `element` is accepted. */ container?: HTMLElement; /** Same as `container` — kept for compatibility with the bare `WordEditor` API. */ element?: HTMLElement; } /** * One-shot constructor that mounts a fully-featured editor (engine + UI shell) * into a container. Returns both the engine and toolbar so consumers can wire * up their own buttons, listeners, or commands. */ export declare class EditorShell { editor: WordEditor; toolbar: WordToolbar; container: HTMLElement; constructor(opts: EditorShellOptions); /** Reflect auto-save progress in the status bar pill. */ setSaveState(state: AutoSaveState, message?: string): void; destroy(): void; } export * from './web-component';