@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
51 lines (50 loc) • 2.11 kB
TypeScript
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module ai/aiquickactions/ui/aiquickactionsview
*/
import { type Editor } from 'ckeditor5/src/core.js';
import { View, type BodyCollection, type DropdownView, type ViewWithFocusCycler, FocusCycler } from 'ckeditor5/src/ui.js';
import { type AIQuickActionDefinition, type AIQuickActionsGroupDefinition } from '../aiquickactionsui.js';
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';
/**
* The content view for AI Quick Actions dropdown that renders a structured list of AI commands.
*
* This class manages the complete UI for AI Quick Actions, including:
* - Individual action buttons
* - Grouped actions with nested menus
* - Focus management and keyboard navigation
* - Hover-based menu interactions
* - Nested panel positioning and visibility
*
* The view supports both flat actions and hierarchical action groups with nested menus
* that appear on hover. It handles proper focus cycling, accessibility roles, and
* manages the lifecycle of nested balloon panels.
*/
export declare class AIQuickActionsDropdownContentView extends View implements ViewWithFocusCycler {
/**
* Tracks information about DOM focus in the form.
*/
readonly focusTracker: FocusTracker;
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*/
readonly keystrokes: KeystrokeHandler;
/**
* Helps cycling over {@link #_focusables} in the form.
*/
readonly focusCycler: FocusCycler;
constructor(editor: Editor, content: Array<AIQuickActionsGroupDefinition | AIQuickActionDefinition>, dropdownView: DropdownView, bodyCollection: BodyCollection, hasSearch?: boolean);
/**
* Resets the search input and restores all list items.
* Called when the dropdown is closed to ensure clean state on next open.
*/
resetSearch(): void;
/**
* @inheritDoc
*/
destroy(): void;
focus(): void;
}