/** * @license Copyright (c) 2003-2026, 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/balloon/aiactionsballoonview */ import { type ViewWithFocusCycler } from "@ckeditor/ckeditor5-ui"; import { type Locale } from "@ckeditor/ckeditor5-utils"; import { AIBalloonView, type AIBalloonViewConfig } from "../../../aiballoon/ui/aiballoonview.js"; /** * The AI Quick Actions balloon view. * * On top of the content, disclaimer and toolbars provided by {@link module:ai/aiballoon/ui/aiballoonview~AIBalloonView}, it adds * focus management, the loading skeleton and the interaction navigation in the mini toolbar. */ export declare class AIActionsBalloonView extends AIBalloonView implements ViewWithFocusCycler { /** * Observable property that indicates whether the view is busy. * * It is set to `true` while an AI response is being generated or rendered. */ isBusy: boolean; constructor(locale: Locale, config: AIBalloonViewConfig); /** * @inheritDoc */ override render(): void; /** * Focuses the balloon view. * * Forward focus lands on the primary action button so that accepting the suggestion is one keystroke away * once the balloon shows up. */ focus(direction?: 1 | -1): void; /** * Disables specific buttons (show changes) for error state. */ setErrorState(): void; /** * Re-enables specific buttons (show changes) after clearing error state. */ clearErrorState(): void; /** * Clears the error state, re-enabling the previously disabled buttons (apply, suggest, etc.). */ override hideError(): void; /** * Displays a blocking error message and disables the toolbar buttons. */ override showBlockingError(message: string): void; /** * Sets the view loading state. While loading, the skeleton covers the content and the interactive elements are disabled. */ setIsLoading(isLoading: boolean): void; /** * Cleans up the rendering artifacts (the `data-id` attributes carried over from the reply) once the content is rendered. */ finalizeContent(): void; /** * Sets the state of the show changes button. */ setShowChangesButton(isOn: boolean): void; /** * @inheritDoc */ override adjustWidthToEditable(domRoot: HTMLElement): void; } /** * Event fired when user clicks the try again button. */ export type AIActionsBalloonTryAgainEvent = { name: "tryAgain"; args: []; }; /** * Event fired when user toggles the suggestion display mode. */ export type AIActionsBalloonToggleSuggestionDisplayModeEvent = { name: "toggleSuggestionDisplayMode"; args: [{ showDiff: boolean; }]; };