import type {} from '../../typedef'; export default CodeBlock; export type CodeBlockPluginOptions = { /** * - List of selectable programming languages for code blocks. * - Defaults to 21 common languages * - [javascript, typescript, html, css, json, python, java, c, cpp, csharp, go, rust, ruby, php, swift, kotlin, sql, bash, markdown, xml, yaml]. * - Set to empty array `[]` to disable language selection UI entirely. * ```js * { codeBlock: { langs: ['javascript', 'python', 'html', 'css'] } } * ``` */ langs?: Array; }; /** * @typedef {Object} CodeBlockPluginOptions * @property {Array} [langs] - List of selectable programming languages for code blocks. * - Defaults to 21 common languages * - [javascript, typescript, html, css, json, python, java, c, cpp, csharp, go, rust, ruby, php, swift, kotlin, sql, bash, markdown, xml, yaml]. * - Set to empty array `[]` to disable language selection UI entirely. * ```js * { codeBlock: { langs: ['javascript', 'python', 'html', 'css'] } } * ``` */ /** * @class * @implements {PluginDropdown} * @description Code block plugin — toggles `
` formatting with language selection.
 * - Toolbar: command button (toggle `
`) + optional dropdown (language list)
 * - Hover UI: shows language selector on `
` hover (Controller + SelectMenu)
 * - I/O conversion: `
` ↔ `
`
 */
declare class CodeBlock extends PluginCommand implements PluginDropdown {
	/**
	 * @constructor
	 * @param {SunEditor.Kernel} kernel - The Kernel instance
	 * @param {CodeBlockPluginOptions} pluginOptions - Configuration options for the CodeBlock plugin.
	 */
	constructor(kernel: SunEditor.Kernel, pluginOptions: CodeBlockPluginOptions);
	title: any;
	onMouseMove(params: SunEditor.HookParams.MouseEvent): void;
	active(element: HTMLElement | null, target: HTMLElement | null): boolean | void;
	on(target?: HTMLElement): void;
	/** @hook Module.Controller */
	controllerClose(): void;
	/**
	 * @description Cleans up resources.
	 */
	destroy(): void;
	#private;
}
import { PluginDropdown } from '../../interfaces';
import { PluginCommand } from '../../interfaces';