UNPKG

1.06 kBTypeScriptView Raw
1import type Quill from '../core.js';
2import type Clipboard from '../modules/clipboard.js';
3import type History from '../modules/history.js';
4import type Keyboard from '../modules/keyboard.js';
5import type { ToolbarProps } from '../modules/toolbar.js';
6import type Uploader from '../modules/uploader.js';
7export interface ThemeOptions {
8 modules: Record<string, unknown> & {
9 toolbar?: null | ToolbarProps;
10 };
11}
12declare class Theme {
13 protected quill: Quill;
14 protected options: ThemeOptions;
15 static DEFAULTS: ThemeOptions;
16 static themes: {
17 default: typeof Theme;
18 };
19 modules: ThemeOptions['modules'];
20 constructor(quill: Quill, options: ThemeOptions);
21 init(): void;
22 addModule(name: 'clipboard'): Clipboard;
23 addModule(name: 'keyboard'): Keyboard;
24 addModule(name: 'uploader'): Uploader;
25 addModule(name: 'history'): History;
26 addModule(name: string): unknown;
27}
28export interface ThemeConstructor {
29 new (quill: Quill, options: unknown): Theme;
30 DEFAULTS: ThemeOptions;
31}
32export default Theme;