/** * A named, per-tool toolbar-visibility toggle - "developers should be able * to hide tools they don't want their users to see" (e.g. Version History, * Review, Video, Audio), without wrapping/overriding the component or * patching it with CSS. This is a UI-visibility layer, distinct from and * composed with (never replacing) two existing, deeper mechanisms: * * - `EditorCapabilityPreset` (capabilityPresets.ts) controls real document * *capability* - which plugins the schema itself is built with (today, * only `table`). Excluding a plugin there already, correctly, hides its * toolbar entry (`tablesEnabled`) - this file does not duplicate that. * - Provider presence (`mediaProvider`, `versionProvider`, `commentProvider`, * `suggestionProvider`) already gates whether a feature can function at * all. `tools` never turns a tool ON when its required provider is * absent - see `resolveToolbarTools`'s own doc comment. * * `tools` is for the remaining, larger set of toolbar entries that have no * other on/off mechanism at all today (Bold, Italic, Video, Audio, Special * characters, Version history, ...) - a host that wants to hide any of * these previously had no supported way to do so. * * Deliberately NOT covered by individual keys (scoping decision, not an * oversight): purely contextual actions that only ever act on something * already selected - block move/indent, list-item indent/move/restart * numbering, table row/column/cell operations, and the selected-media * edit/resize/delete actions. None of these have independent product * meaning (there is no real case for "let people insert a table but hide * its 'Add row' action") - they stay governed solely by their owning * top-level tool (`insertTable`, `bulletedList`/`numberedList`/`checklist`, * `link`, `image`/`video`/`audio`). */ export interface ToolbarTools { bold: boolean; italic: boolean; underline: boolean; strikethrough: boolean; code: boolean; superscript: boolean; subscript: boolean; textColor: boolean; backgroundColor: boolean; fontSize: boolean; fontFamily: boolean; /** The Paragraph/Heading 1-6/Code block