UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

97 lines (96 loc) 2.9 kB
/** * @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/aitabs/aitabs * @publicApi */ import { type Context, ContextPlugin, Editor } from 'ckeditor5/src/core.js'; import { AITabsMainView } from './aitabsmainview.js'; import { type AIContainerSide, type AIContainerType } from '../aiconfig.js'; /** * The AI Tabs plugin. It delivers the tabs view that hosts AI-powered features in the editor * such as {@link module:ai/aichat/aichat~AIChat AI Chat}, {@link module:ai/aiquickactions/aiquickactions~AIQuickActions AI Quick Actions}, * and {@link module:ai/aireviewmode/aireviewmode~AIReviewMode AI Review Mode}. * * The feature is configured via the {@link module:ai/aiconfig~AIConfig#container `config.ai.container`} property. * * Learn more about AI features in CKEditor in the {@glink features/ai/ckeditor-ai-overview AI Overview} documentation. */ export declare class AITabs extends ContextPlugin { /** * The view that allows for hosting AI-powered features in the editor. */ view: AITabsMainView; /** * The container of the AI Tabs view. */ container: HTMLElement | null; /** * Indicates whether the resize button should be displayed. */ showResizeButton: boolean; /** * The type of the AI Tabs view as configured in {@link module:ai/aiconfig~AIConfig#container} * * See {@link #switchType} to learn how to switch between the UI types. */ type: AIContainerType; /** * The position of the AI Tabs view. * * @default 'right' */ side: AIContainerSide; /** * @inheritDoc */ static get pluginName(): "AITabs"; /** * @inheritDoc */ static get isOfficialPlugin(): true; /** * @inheritDoc */ static get isPremiumPlugin(): true; /** * @inheritDoc */ constructor(context: Context | Editor); /** * Switches between the UI type of the tabs. * * See {@link module:ai/aiconfig~AIConfig#container} to learn more about possible types. */ switchType(type: AIContainerType): void; /** * Switches between the side of the AI Tabs view. * * See {@link module:ai/aiconfig~AIConfig#container} to learn more about possible sides. */ switchSide(side: AIContainerSide): void; /** * Toggles the resizing of the tabs view. */ resize(): void; /** * @inheritDoc */ destroy(): void; } /** * An event fired when the user wants to toggle the chat resizing. */ export type AIResizedTabsEvent = { name: 'resizedTabs'; args: [isMaximized: boolean]; }; /** * An event fired when the user wants to resize the chat. */ export type AIResizeTabsEvent = { name: 'resizeTabs'; args: []; };