/** * @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 track-changes/utils/utils */ import type { Command } from '@ckeditor/ckeditor5-core'; import type { ModelDocumentSelection, Model } from '@ckeditor/ckeditor5-engine'; import { type Suggestion } from '../suggestion.js'; import type { SuggestionDescription } from '../suggestiondescriptionfactory.js'; /** * Used in tests for easy suggestion comparison. */ export declare function normalizeDescription(description: Array | SuggestionDescription): string; /** * Renders a rich HTML description out of primitive description string. */ export declare function renderDescription(description: string, color?: { value: string; title: string; }): string; export declare function sortSuggestions(suggestions: Array): Array; /** * From the list of passed `suggestions` returns those that are selected by given `selection`. */ export declare function getSelectedSuggestions(selection: ModelDocumentSelection, suggestions: Array): Set; /** * How many suggestion actions should be put into one batch when multiple suggestions are accepted or discarded. */ export declare const MAX_SUGGESTION_ACTIONS_IN_BATCH = 100; /** * Executes given `command` for given `suggestions`. If there is a lot of suggestions, the command executions is split into batches. * There is at most `MAX_SUGGESTION_ACTIONS_IN_BATCH` exeuctions in one batch. As a result, this limits number of actions to be done * in one undo step but may create multiple undo steps. */ export declare function executeCommandForSuggestions(model: Model, command: Command, suggestions: Array): void;