import { ToolbarItemType } from "../../ImageViewer/Models/IImageViewer"; /** * Options for the PaintToolsPlugin. **/ export declare type PaintToolsPluginOptions = { /** * The position where the "Paint tools", "Text and Objects" and "Effects" buttons should be inserted in the main toolbar. * Use `false` or `-1` to skip insertion. * Undefined means the position will be determined automatically. */ buttonPosition?: number | false; /** * Array of available font names. * @default ['Arial', 'Verdana', 'Helvetica', 'Tahoma', 'Trebuchet MS', 'Times New Roman', 'Georgia', 'Garamond', 'Courier New', 'Brush Script MT'] **/ fontNames?: string[]; /** * Optional. Specifies the layout of the paint, effects and objects toolbar. * Defaults: * * paintTools: ["Apply", "Cancel", "Splitter", "Selection", "Pencil", "Brush", "CloneStamp", "Eraser", "Splitter", "Size", "Color", "UseOriginalImage", "Splitter", "Undo", "Redo"] * * effectsTools: ["Apply", "Cancel", "Splitter", "Selection", "Splitter", "BrightnessContrast", "Vibrance", "Blur", "Pixelate", "Splitter", "Eraser", "Size", "UseOriginalImage", "Splitter", "Undo", "Redo"] * * objectTools: ["Apply", "Cancel", "Text", "Rectangle", "Line", "Arrow", "Ellipse", "Brackets", "Image", "ImageGallery", "Splitter", "Splitter", "Undo", "Redo"] * @example * ```javascript * // Modify paint tools toolbar * viewer.addPlugin(new PaintToolsPlugin({ * toolbarLayout: { * paintTools: ["Pencil", "Size", "Color", "Splitter", "Apply", "Cancel"] * } * })); * ``` * @example * ```javascript * // Modify object tools toolbar * viewer.addPlugin(new PaintToolsPlugin({ * toolbarLayout: { * objectTools: ["Apply", "Cancel", "Rectangle", "Arrow"] * } * })); * ``` * @example * ```javascript * // Modify effects tools toolbar * viewer.addPlugin(new PaintToolsPlugin({ * toolbarLayout: { * effectsTools: ["Apply", "Cancel", "Splitter", "Brightness", "Pixelate" ] * } * })); * ``` */ toolbarLayout?: { /** * Array of items for the effects tools toolbar. * Set to `false` if you want to hide this toolbar item. * @default ["Apply", "Cancel", "Splitter", "Selection", "Splitter", "BrightnessContrast", "Vibrance", "Blur", "Pixelate", "Splitter", "Eraser", "Size", "UseOriginalImage", "Splitter", "Undo", "Redo"] */ effectsTools: ToolbarItemType[] | boolean; /** * Array of items for the paint tools toolbar. * Set to `false` if you want to hide this toolbar item. * @default ["Apply", "Cancel", "Splitter", "Selection", "Pencil", "Brush", "CloneStamp", "Eraser", "Splitter", "Size", "Color", "UseOriginalImage", "Splitter", "Undo", "Redo"] */ paintTools: ToolbarItemType[] | boolean; /** * Array of items for the text tools toolbar. * @default ["Apply", "Cancel" , "Splitter", "Text", "Splitter", "FontSize", "FontName", "FontBold", "FontItalic", "FontColor", "Splitter", "Undo", "Redo"] * @deprecated This option is deprecated in favor of the "Text and Objects" toolbar * where you can add text objects directly. */ textTools: ToolbarItemType[] | boolean; /** * Array of items for the insert objects toolbar. * Set to `false` if you want to hide this toolbar item. * @default ["Apply", "Cancel", "Text", "Rectangle", "Line", "Arrow", "Ellipse", "Brackets", "Image", "ImageGallery", "Splitter", "Undo", "Redo"] */ objectTools: ToolbarItemType[] | boolean; }; /** * Configuration for predefined images that can be inserted via the "ImageGallery" toolbar button. * * @example * ```javascript * // Simple array of image URLs * viewer.addPlugin(new PaintToolsPlugin({ * imageGallery: [ * 'https://example.com/images/checkmark.png', * 'https://example.com/images/cross.png', * 'https://example.com/images/arrow-up.png' * ] * })); * ``` * * @example * ```javascript * // Advanced configuration with labels and categories * viewer.addPlugin(new PaintToolsPlugin({ * imageGallery: { * categories: [ * { * name: "Annotations", * items: [ * { url: 'images/checkmark.png', label: 'Checkmark' }, * { url: 'images/cross.png', label: 'Cross mark' } * ] * }, * { * name: "Arrows", * items: [ * { url: 'images/arrow-up.png', label: 'Up arrow' }, * { url: 'images/arrow-down.png', label: 'Down arrow' } * ] * } * ] * } * })); * ``` */ imageGallery?: string[] | ImageGalleryConfig; }; /** * Configuration for predefined images */ export declare type ImageGalleryConfig = { /** * Array of image categories for organized presentation. * If not specified, all images will be shown in a single flat list. */ categories?: PresetImageCategory[]; /** * Whether to maintain aspect ratio when resizing images. * @default true */ maintainAspectRatio?: boolean; }; /** * Represents a category of preset images */ export declare type PresetImageCategory = { /** * Display name for the category */ name: string; /** * Array of images in this category */ items: PresetImageItem[]; /** * Optional icon URL for the category */ icon?: string; }; /** * Represents a single preset image item */ export declare type PresetImageItem = { /** * URL of the image */ url: string; /** * Display label for the image. If not specified, will be derived from the filename. */ label?: string; /** * Optional description for the image */ description?: string; /** * Optional tags for searching and filtering */ tags?: string[]; /** * Optional aspect ratio lock (e.g., "1:1", "16:9", "4:3") */ aspectRatio?: string; };