import type { CommandAttrs, CommandName } from './engine/commands'; /** * Toolbar configuration. The string form uses space-separated item names with * `|` as a group divider, e.g. `"bold italic | heading | link"`. A `>>` marker * moves every item after it into a collapsible 3-dot "more" menu, e.g. * `"bold italic | heading >> link image | sourceView"`. `"none"` hides the * toolbar entirely. */ export type ToolbarConfig = string; /** Pseudo-commands handled by the host chrome rather than the registry. */ export type UiCommandName = 'openLink' | 'openImage' | 'openEmbed' | 'openBookmark' | 'toggleSource' | 'togglePastePlainText' | 'toggleFullscreen' | 'toggleShowBlocks' | 'openShortcutHelp' | 'openSpecialChars' | 'openEmoji' | 'openFind' | 'exportPdf' | 'exportWord' | 'exportInlineHtml' | 'importWord' | 'toggleFormatPainter' | 'openMergeField' | 'openTemplate' | 'openMath' | 'openMarkdown'; /** Detail payload of the internal `wysiwyg-command` event (toolbar → host). */ export interface WysiwygCommandDetail { name: CommandName | UiCommandName; attrs?: CommandAttrs; } /** Mention configuration: trigger character → items. Same shape as the * legacy nile-rich-text-editor. */ export type MentionsConfig = Record; /** Reusable content snippet, offered through the "/" menu. */ export interface SnippetConfig { key: string; label: string; html: string; } /** A mail-merge / personalization placeholder offered in the merge-field picker. */ export interface MergeFieldConfig { /** Stable identifier substituted at render time (e.g. `first_name`). */ id: string; /** Human-readable label shown in the chip and picker. */ label: string; } /** A predefined content structure offered in the template picker. */ export interface TemplateConfig { label: string; /** Optional secondary line shown under the label in the picker. */ description?: string; /** HTML inserted at the cursor when chosen. */ html: string; } /** Detail payload of `nile-change` / `nile-input`. */ export interface WysiwygChangeDetail { value: string; json: Record; /** Alias of `value` for drop-in parity with nile-rich-text-editor. */ content: string; } export declare const DEFAULT_TOOLBAR: string;