import { EditorAPI } from '../types/CommonTypes'; import { ColorUpdate, DocumentColor } from '../types/ColorStyleTypes'; /** * The ColorStyleController is responsible for all communication regarding color styles. * Methods inside this controller can be called by `window.SDK.colorStyle.{method-name}` */ export declare class ColorStyleController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method returns the list of colors * @returns list of all colors */ getAll: () => Promise>; /** * This method returns a color by id * @param id the id of a specific color * @returns color properties for given id */ getById: (id: string) => Promise>; /** * This method creates a new color * @returns the new created color id */ create: () => Promise>; /** * This method duplicates a color by the id * @param id the id of a specific color * @returns id of the duplicated color */ duplicate: (id: string) => Promise>; /** * This method changes positions of colors * @param order the position of the colors * @param ids the list of color IDs * @returns */ move: (order: number, ids: string[]) => Promise>; /** * This method renames a color * @param id the id of a specific color * @param newColorName the new name of the color * @returns */ rename: (id: string, newColorName: string) => Promise>; /** * This method updates a color * @param id the id of a specific color * @param newColorProperties the new color properties * @returns */ update: (id: string, newColorProperties: ColorUpdate) => Promise>; /** * This method removes a color * @param id the id of a specific color * @returns */ remove: (id: string) => Promise>; }