ados-rcm 1.1.507 → 1.1.508

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ import { Blot } from 'parchment';
2
+ import { default as Quill } from 'quill';
3
+ import { CSSProperties } from 'react';
4
+ export interface ImageResizeOptions {
5
+ alignments?: ToolbarAlignmentOption[];
6
+ displaySize?: boolean;
7
+ displayStyles?: CSSProperties;
8
+ handleEdit?: (image: HTMLImageElement) => void;
9
+ handleStyles?: CSSProperties;
10
+ modules?: string[];
11
+ overlayStyles?: CSSProperties;
12
+ parchment?: any;
13
+ toolbarButtonStyles?: CSSProperties;
14
+ toolbarButtonSvgStyles?: {
15
+ [key: string]: string | number;
16
+ };
17
+ toolbarStyles?: CSSProperties;
18
+ }
19
+ export interface ToolbarAlignmentOption {
20
+ apply: () => void;
21
+ icon: string;
22
+ isApplied: () => boolean;
23
+ title?: string;
24
+ }
25
+ export default class ImageResize {
26
+ quill: Quill;
27
+ options: ImageResizeOptions;
28
+ parchment: any;
29
+ overlay: HTMLDivElement;
30
+ img: HTMLImageElement | null;
31
+ blot: Blot | null;
32
+ private modules;
33
+ private moduleClasses;
34
+ private clickListener;
35
+ private keyupListener;
36
+ private inputListener;
37
+ private overlayClickListener;
38
+ constructor(quill: Quill, options?: ImageResizeOptions);
39
+ private initializeImageFormatClass;
40
+ private registerNewImageFormatClass;
41
+ private tryUseExistingImageFormatClass;
42
+ private initializeModuleClasses;
43
+ initializeModules: () => void;
44
+ onUpdate: () => void;
45
+ removeModules: () => void;
46
+ handleClick: (evt: MouseEvent) => void;
47
+ show: (img: HTMLImageElement) => void;
48
+ showOverlay: () => void;
49
+ hideOverlay: () => void;
50
+ repositionElements: () => void;
51
+ hide: () => void;
52
+ setUserSelect: (value: string) => void;
53
+ checkImage: (evt: KeyboardEvent) => void;
54
+ destroy: () => void;
55
+ private findBlotForImage;
56
+ private trySetSelection;
57
+ }