@opentiny/fluent-editor 3.20.3 → 3.20.4-alpha.0

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.
Files changed (147) hide show
  1. package/es/config/editor.utils.es.js +7 -0
  2. package/es/config/editor.utils.es.js.map +1 -1
  3. package/es/config/icons.config.es.js +6 -0
  4. package/es/config/icons.config.es.js.map +1 -1
  5. package/es/config/index.es.js +6 -3
  6. package/es/config/index.es.js.map +1 -1
  7. package/es/config/types/editor-toolbar.interface.es.js +2 -0
  8. package/es/config/types/editor-toolbar.interface.es.js.map +1 -0
  9. package/es/config/types/index.es.js +1 -0
  10. package/es/config/types/index.es.js.map +1 -1
  11. package/es/custom-image/BlotFormatter.es.js +0 -1
  12. package/es/custom-image/BlotFormatter.es.js.map +1 -1
  13. package/es/fluent-editor.es.js +7 -6
  14. package/es/fluent-editor.es.js.map +1 -1
  15. package/es/fullscreen/handler.es.js +51 -0
  16. package/es/fullscreen/handler.es.js.map +1 -0
  17. package/es/index.es.js +3 -2
  18. package/es/link/formats/link.es.js +11 -6
  19. package/es/link/formats/link.es.js.map +1 -1
  20. package/es/link/index.es.js +3 -3
  21. package/es/link/index.es.js.map +1 -1
  22. package/es/link/modules/tooltip.es.js +22 -7
  23. package/es/link/modules/tooltip.es.js.map +1 -1
  24. package/lib/config/editor.utils.cjs.js +7 -0
  25. package/lib/config/editor.utils.cjs.js.map +1 -1
  26. package/lib/config/icons.config.cjs.js +6 -0
  27. package/lib/config/icons.config.cjs.js.map +1 -1
  28. package/lib/config/index.cjs.js +4 -1
  29. package/lib/config/index.cjs.js.map +1 -1
  30. package/lib/config/types/editor-toolbar.interface.cjs.js +2 -0
  31. package/lib/config/types/editor-toolbar.interface.cjs.js.map +1 -0
  32. package/lib/config/types/index.cjs.js +1 -0
  33. package/lib/config/types/index.cjs.js.map +1 -1
  34. package/lib/custom-image/BlotFormatter.cjs.js +0 -1
  35. package/lib/custom-image/BlotFormatter.cjs.js.map +1 -1
  36. package/lib/fluent-editor.cjs.js +7 -6
  37. package/lib/fluent-editor.cjs.js.map +1 -1
  38. package/lib/fullscreen/handler.cjs.js +51 -0
  39. package/lib/fullscreen/handler.cjs.js.map +1 -0
  40. package/lib/index.cjs.js +1 -0
  41. package/lib/index.cjs.js.map +1 -1
  42. package/lib/link/formats/link.cjs.js +10 -5
  43. package/lib/link/formats/link.cjs.js.map +1 -1
  44. package/lib/link/index.cjs.js +3 -3
  45. package/lib/link/index.cjs.js.map +1 -1
  46. package/lib/link/modules/tooltip.cjs.js +24 -9
  47. package/lib/link/modules/tooltip.cjs.js.map +1 -1
  48. package/package.json +4 -2
  49. package/style.css +28 -0
  50. package/types/attributors/index.d.ts +4 -0
  51. package/types/config/base64-image.d.ts +3 -0
  52. package/types/config/editor.config.d.ts +95 -0
  53. package/types/config/editor.utils.d.ts +42 -0
  54. package/types/config/i18n/en-us.d.ts +86 -0
  55. package/types/config/i18n/zh-cn.d.ts +86 -0
  56. package/types/config/icons.config.d.ts +34 -0
  57. package/types/config/index.d.ts +49 -0
  58. package/types/config/types/additional-toolbar-item.interface.d.ts +8 -0
  59. package/types/config/types/content-change.interface.d.ts +13 -0
  60. package/types/config/types/content-save.interface.d.ts +6 -0
  61. package/types/config/types/counter-option.interface.d.ts +9 -0
  62. package/types/config/types/editor-config.interface.d.ts +21 -0
  63. package/types/config/types/editor-modules.interface.d.ts +31 -0
  64. package/types/config/types/editor-toolbar.interface.d.ts +6 -0
  65. package/types/config/types/file-operation.interface.d.ts +12 -0
  66. package/types/config/types/focus-change.interface.d.ts +4 -0
  67. package/types/config/types/fullscreen-module.interface.d.ts +4 -0
  68. package/types/config/types/help-panel-item.interface.d.ts +5 -0
  69. package/types/config/types/help-panel-option.interface.d.ts +7 -0
  70. package/types/config/types/image-module.interface.d.ts +3 -0
  71. package/types/config/types/image-upload.interface.d.ts +7 -0
  72. package/types/config/types/index.d.ts +23 -0
  73. package/types/config/types/load-on-demand-module.interface.d.ts +5 -0
  74. package/types/config/types/mention-module.interface.d.ts +8 -0
  75. package/types/config/types/paste-change.interface.d.ts +6 -0
  76. package/types/config/types/quick-menu-module.interface.d.ts +3 -0
  77. package/types/config/types/range.interface.d.ts +4 -0
  78. package/types/config/types/registry-options.interface.d.ts +5 -0
  79. package/types/config/types/selection-change.interface.d.ts +8 -0
  80. package/types/config/types/toolbar-item.interface.d.ts +13 -0
  81. package/types/config/types/type.d.ts +5 -0
  82. package/types/config/types/validate-error.interface.d.ts +13 -0
  83. package/types/counter/index.d.ts +12 -0
  84. package/types/custom-clipboard.d.ts +26 -0
  85. package/types/custom-image/BlotFormatter.d.ts +24 -0
  86. package/types/custom-image/Options.d.ts +36 -0
  87. package/types/custom-image/actions/Action.d.ts +7 -0
  88. package/types/custom-image/actions/CustomResizeAction.d.ts +24 -0
  89. package/types/custom-image/actions/DeleteAction.d.ts +7 -0
  90. package/types/custom-image/image.d.ts +28 -0
  91. package/types/custom-image/specs/BlotSpec.d.ts +13 -0
  92. package/types/custom-image/specs/CustomImageSpec.d.ts +21 -0
  93. package/types/custom-image/specs/ImageSpec.d.ts +10 -0
  94. package/types/custom-uploader.d.ts +30 -0
  95. package/types/emoji/emoji-list/index.d.ts +1 -0
  96. package/types/emoji/emoji-list/people.d.ts +1 -0
  97. package/types/emoji/emoji-list.d.ts +2 -0
  98. package/types/emoji/emoji-map.d.ts +2 -0
  99. package/types/emoji/formats/emoji-blot.d.ts +13 -0
  100. package/types/emoji/index.d.ts +10 -0
  101. package/types/emoji/modules/emoji.d.ts +38 -0
  102. package/types/emoji/modules/toolbar-emoji.d.ts +8 -0
  103. package/types/emoji/utils.d.ts +1 -0
  104. package/types/file/formats/file.d.ts +15 -0
  105. package/types/file/index.d.ts +11 -0
  106. package/types/file/modules/file-bar.d.ts +14 -0
  107. package/types/fluent-editor.d.ts +9 -0
  108. package/types/format-painter/index.d.ts +15 -0
  109. package/types/fullscreen/handler.d.ts +3 -0
  110. package/types/global-link/constants.d.ts +3 -0
  111. package/types/global-link/formats/customer-widget-link.d.ts +14 -0
  112. package/types/global-link/formats/doc-link.d.ts +17 -0
  113. package/types/global-link/formats/wiki-link.d.ts +16 -0
  114. package/types/global-link/formats/work-item-link.d.ts +16 -0
  115. package/types/global-link/global-link-panel.d.ts +19 -0
  116. package/types/global-link/index.d.ts +18 -0
  117. package/types/global-link/utils/createTable.d.ts +1 -0
  118. package/types/index.d.ts +4 -0
  119. package/types/link/formats/link.d.ts +16 -0
  120. package/types/link/index.d.ts +6 -0
  121. package/types/link/modules/tooltip.d.ts +32 -0
  122. package/types/mention/Mention.d.ts +56 -0
  123. package/types/mention/MentionLink.d.ts +18 -0
  124. package/types/mention/constants.d.ts +3 -0
  125. package/types/quick-menu/index.d.ts +22 -0
  126. package/types/screenshot/index.d.ts +20 -0
  127. package/types/soft-break/index.d.ts +14 -0
  128. package/types/strike/index.d.ts +7 -0
  129. package/types/syntax/index.d.ts +14 -0
  130. package/types/table/better-table.d.ts +27 -0
  131. package/types/table/formats/header.d.ts +22 -0
  132. package/types/table/formats/list.d.ts +34 -0
  133. package/types/table/formats/table.d.ts +147 -0
  134. package/types/table/modules/table-column-tool.d.ts +23 -0
  135. package/types/table/modules/table-operation-menu.d.ts +32 -0
  136. package/types/table/modules/table-scroll-bar.d.ts +33 -0
  137. package/types/table/modules/table-selection.d.ts +37 -0
  138. package/types/table/table-config.d.ts +38 -0
  139. package/types/table/utils/index.d.ts +17 -0
  140. package/types/table/utils/node-matchers.d.ts +9 -0
  141. package/types/toolbar/better-picker.d.ts +1 -0
  142. package/types/toolbar/index.d.ts +8 -0
  143. package/types/utils/debounce.d.ts +6 -0
  144. package/types/utils/image.d.ts +1 -0
  145. package/types/utils/method.d.ts +7 -0
  146. package/types/utils/scroll-lock.d.ts +6 -0
  147. package/types/video/index.d.ts +16 -0
@@ -0,0 +1,13 @@
1
+ export interface IContentChange {
2
+ content: any;
3
+ delta: any;
4
+ editor: any;
5
+ html: string | null;
6
+ oldDelta: any;
7
+ source: string;
8
+ text: string;
9
+ textCount: number;
10
+ wordCount: number;
11
+ htmlCount: number;
12
+ isChanged?: boolean;
13
+ }
@@ -0,0 +1,6 @@
1
+ export interface IContentSave {
2
+ editor: any;
3
+ content: any;
4
+ html: string | null;
5
+ text: string;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { AnyFunction } from './type';
2
+
3
+ export interface ICounterOption {
4
+ format?: 'text' | 'html';
5
+ unit?: 'word' | 'char';
6
+ count?: number;
7
+ template?: string | AnyFunction;
8
+ errorTemplate?: string | AnyFunction;
9
+ }
@@ -0,0 +1,21 @@
1
+ import { QuillOptions } from 'quill';
2
+ import { ScreenShotOptions } from '../../screenshot';
3
+ import { IEditorModules } from './editor-modules.interface';
4
+ import { EditorFormat } from './type';
5
+
6
+ export interface IEditorConfig extends QuillOptions {
7
+ format?: EditorFormat;
8
+ modules?: IEditorModules;
9
+ screenshotOnStaticPage?: boolean;
10
+ scrollingContainer?: HTMLElement | string | null;
11
+ trackChanges?: 'user' | 'all';
12
+ autoProtocol?: boolean | string;
13
+ editorPaste?: any;
14
+ uploadOption?: {
15
+ imageUploadToServer?: boolean;
16
+ imageAccept?: Array<string>[] | string;
17
+ fileAccept?: Array<string>[] | string;
18
+ isVideoPlay?: boolean;
19
+ };
20
+ screenshot?: Partial<ScreenShotOptions>;
21
+ }
@@ -0,0 +1,31 @@
1
+ import { ToolbarOption } from './type';
2
+
3
+ export interface IEditorModules {
4
+ [key: string]: any;
5
+ clipboard?: {
6
+ matchers?: any[];
7
+ matchVisual?: boolean;
8
+ } | boolean;
9
+ history?: {
10
+ delay?: number;
11
+ maxStack?: number;
12
+ userOnly?: boolean;
13
+ } | boolean;
14
+ keyboard?: {
15
+ bindings?: any;
16
+ } | boolean;
17
+ syntax?: {
18
+ interval?: number;
19
+ languages?: {
20
+ key: string;
21
+ label: string;
22
+ }[];
23
+ hljs?: any;
24
+ } | boolean;
25
+ toolbar?: (string | string[])[][] | ToolbarOption | string | {
26
+ container?: string | string[] | ToolbarOption;
27
+ handlers?: {
28
+ [key: string]: any;
29
+ };
30
+ } | boolean;
31
+ }
@@ -0,0 +1,6 @@
1
+ import { default as Toolbar } from 'quill/modules/toolbar';
2
+ import { FluentEditor } from '../../fluent-editor';
3
+
4
+ export interface FluentEditorToolbar extends Toolbar {
5
+ quill: FluentEditor;
6
+ }
@@ -0,0 +1,12 @@
1
+ import { AnyFunction } from './type';
2
+
3
+ export interface FileOperation {
4
+ operation: string;
5
+ hasRejectedFile?: boolean;
6
+ data: {
7
+ fileId?: string;
8
+ file?: File;
9
+ files?: Array<File>;
10
+ };
11
+ callback?: AnyFunction;
12
+ }
@@ -0,0 +1,4 @@
1
+ export interface IFocusChange {
2
+ editor: any;
3
+ source: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface IFullscreenModule {
2
+ mode?: 'normal' | 'immersive';
3
+ zIndex: number;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface IHelpPanelItem {
2
+ icon: string;
3
+ text: string;
4
+ hotkey: string[];
5
+ }
@@ -0,0 +1,7 @@
1
+ import { IHelpPanelItem } from './help-panel-item.interface';
2
+
3
+ export interface IHelpPanelOption {
4
+ id: string;
5
+ title: string;
6
+ content: IHelpPanelItem[];
7
+ }
@@ -0,0 +1,3 @@
1
+ export interface ImageModule {
2
+ zIndex: number;
3
+ }
@@ -0,0 +1,7 @@
1
+ import { AnyFunction } from './type';
2
+
3
+ export interface ImageUpload {
4
+ file: File;
5
+ hasRejectedImage?: boolean;
6
+ callback: AnyFunction;
7
+ }
@@ -0,0 +1,23 @@
1
+ export * from './additional-toolbar-item.interface';
2
+ export * from './content-change.interface';
3
+ export * from './content-save.interface';
4
+ export * from './counter-option.interface';
5
+ export * from './editor-config.interface';
6
+ export * from './editor-modules.interface';
7
+ export * from './editor-toolbar.interface';
8
+ export * from './file-operation.interface';
9
+ export * from './focus-change.interface';
10
+ export * from './fullscreen-module.interface';
11
+ export * from './help-panel-option.interface';
12
+ export * from './image-module.interface';
13
+ export * from './image-upload.interface';
14
+ export * from './load-on-demand-module.interface';
15
+ export * from './mention-module.interface';
16
+ export * from './paste-change.interface';
17
+ export * from './quick-menu-module.interface';
18
+ export * from './range.interface';
19
+ export * from './registry-options.interface';
20
+ export * from './selection-change.interface';
21
+ export * from './toolbar-item.interface';
22
+ export * from './type';
23
+ export * from './validate-error.interface';
@@ -0,0 +1,5 @@
1
+ export interface ILoadOnDemandModule {
2
+ mode?: 'line' | 'text';
3
+ limit?: number;
4
+ lazy?: boolean;
5
+ }
@@ -0,0 +1,8 @@
1
+ export interface IMentionModule {
2
+ data: object[];
3
+ itemKey: string;
4
+ searchKey: string;
5
+ mentionSearchFn?: (term: string) => Promise<any[]>;
6
+ mentionSelect?: any;
7
+ mentionRemove?: any;
8
+ }
@@ -0,0 +1,6 @@
1
+ import { AnyFunction } from './type';
2
+
3
+ export interface IPasteChange {
4
+ files: File[];
5
+ callback: AnyFunction;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface IQuickMenuModule {
2
+ zIndex: number;
3
+ }
@@ -0,0 +1,4 @@
1
+ export interface IRange {
2
+ index: number;
3
+ length: number;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface IRegistryOption {
2
+ importUrl?: string;
3
+ params?: any;
4
+ register?: any;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { IRange } from './range.interface';
2
+
3
+ export interface ISelectionChange {
4
+ editor: any;
5
+ oldRange: IRange | null;
6
+ range: IRange | null;
7
+ source: string;
8
+ }
@@ -0,0 +1,13 @@
1
+ export interface IToolbarItem {
2
+ indent?: string;
3
+ list?: string;
4
+ direction?: string;
5
+ header?: number | (boolean | number)[];
6
+ color?: string[];
7
+ background?: string[];
8
+ align?: string[];
9
+ script?: string;
10
+ font?: string[];
11
+ size?: boolean[] | string[];
12
+ lineheight?: number[];
13
+ }
@@ -0,0 +1,5 @@
1
+ import { IToolbarItem } from './toolbar-item.interface';
2
+
3
+ export type ToolbarOption = (string[] | IToolbarItem[] | string | IToolbarItem)[];
4
+ export type EditorFormat = 'object' | 'json' | 'html' | 'text';
5
+ export type AnyFunction = (...args: any[]) => any;
@@ -0,0 +1,13 @@
1
+ export interface IValidateError {
2
+ minLengthError?: {
3
+ given: number;
4
+ minLength: number;
5
+ };
6
+ maxLengthError?: {
7
+ given: number;
8
+ maxLength: number;
9
+ };
10
+ requiredError?: {
11
+ empty: boolean;
12
+ };
13
+ }
@@ -0,0 +1,12 @@
1
+ import { ICounterOption } from '../config/types';
2
+ import { default as Quill } from 'quill';
3
+
4
+ export default class Counter {
5
+ private quill;
6
+ container: HTMLDivElement;
7
+ options: ICounterOption;
8
+ defaultOptions: ICounterOption;
9
+ constructor(quill: Quill, options: ICounterOption);
10
+ renderCount: () => void;
11
+ getContentLength(format: any): number;
12
+ }
@@ -0,0 +1,26 @@
1
+ declare const Clipboard: unknown;
2
+ declare class CustomClipboard extends Clipboard {
3
+ quill: any;
4
+ convert: any;
5
+ onCopy: any;
6
+ matchers: any;
7
+ prepareMatching(container: any, nodeMatches: any): any[][];
8
+ onCaptureCopy(e: any, isCut?: boolean): void;
9
+ onCapturePaste(e: any): void;
10
+ onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
11
+ html: any;
12
+ text: any;
13
+ files: any;
14
+ rtf: any;
15
+ }): void;
16
+ files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
17
+ flipFilesArray(filesArr: any): any[][];
18
+ convertHexToBase64(hexString: any): string;
19
+ extractImageDataFromRtf(rtfData: any): any[];
20
+ extractFilesFromDelta(delta: any, clipboardFiles: any, hexImages?: any): Promise<any[]>;
21
+ getImgSelection(delta: any, imageIndex: any): {
22
+ index: number;
23
+ length: number;
24
+ };
25
+ }
26
+ export default CustomClipboard;
@@ -0,0 +1,24 @@
1
+ import { default as Action } from './actions/Action';
2
+ import { Options } from './Options';
3
+ import { default as BlotSpec } from './specs/BlotSpec';
4
+
5
+ export default class BlotFormatter {
6
+ quill: any;
7
+ options: Options;
8
+ currentSpec: BlotSpec;
9
+ specs: BlotSpec[];
10
+ overlay: HTMLElement;
11
+ actions: Action[];
12
+ observer: any;
13
+ static register(): void;
14
+ constructor(quill: any, options?: any);
15
+ show(spec: BlotSpec): void;
16
+ hide(): void;
17
+ update(): void;
18
+ createActions(spec: BlotSpec): void;
19
+ destroyActions(): void;
20
+ repositionOverlay(): void;
21
+ setUserSelect(value: string): void;
22
+ onClick: () => void;
23
+ hideImageOverlay: (event: any) => void;
24
+ }
@@ -0,0 +1,36 @@
1
+ export interface OverlayOptions {
2
+ className: string;
3
+ style: Record<string, string>;
4
+ }
5
+ export interface ResizeOptions {
6
+ handleClassName: string;
7
+ handleStyle: Record<string, string>;
8
+ }
9
+ export interface AlignOptions {
10
+ attribute: string;
11
+ aligner: {
12
+ applyStyle: boolean;
13
+ };
14
+ icons: {
15
+ left: string;
16
+ center: string;
17
+ right: string;
18
+ };
19
+ toolbar: {
20
+ allowDeselect: boolean;
21
+ mainClassName: string;
22
+ mainStyle: any;
23
+ buttonClassName: string;
24
+ addButtonSelectStyle: boolean;
25
+ buttonStyle: any;
26
+ svgStyle: any;
27
+ };
28
+ }
29
+ export interface Options {
30
+ specs: any;
31
+ overlay: OverlayOptions;
32
+ align: AlignOptions;
33
+ resize: ResizeOptions;
34
+ }
35
+ declare const DefaultOptions: Options;
36
+ export default DefaultOptions;
@@ -0,0 +1,7 @@
1
+ export default class Action {
2
+ formatter: any;
3
+ constructor(formatter: any);
4
+ onCreate(): void;
5
+ onDestroy(): void;
6
+ onUpdate(): void;
7
+ }
@@ -0,0 +1,24 @@
1
+ import { default as Action } from './Action';
2
+
3
+ export default class CustomResizeAction extends Action {
4
+ topLeftHandle: HTMLElement;
5
+ topRightHandle: HTMLElement;
6
+ bottomRightHandle: HTMLElement;
7
+ bottomLeftHandle: HTMLElement;
8
+ dragHandle: HTMLElement;
9
+ dragStartX: number;
10
+ preDragWidth: number;
11
+ targetRatio: number;
12
+ maxWidth: number;
13
+ minWidth: number;
14
+ constructor(formatter: any);
15
+ onCreate(): void;
16
+ onDestroy(): void;
17
+ createHandle(position: string, cursor: string): HTMLElement;
18
+ repositionHandles(handleStyle: any): void;
19
+ setCursor(value: string): void;
20
+ onMouseDown: (event: MouseEvent) => void;
21
+ findTd: (node: HTMLElement, level: number) => any;
22
+ onDrag: (event: MouseEvent) => void;
23
+ onMouseUp: () => void;
24
+ }
@@ -0,0 +1,7 @@
1
+ import { default as Action } from './Action';
2
+
3
+ export default class DeleteAction extends Action {
4
+ onCreate(): void;
5
+ onDestroy(): void;
6
+ onKeyUp: (event: any) => void;
7
+ }
@@ -0,0 +1,28 @@
1
+ declare const Embed: unknown;
2
+ declare const Inline: unknown;
3
+ declare class CustomImage extends Embed {
4
+ static ID_SEED: number;
5
+ static blotName: string;
6
+ static tagName: string;
7
+ domNode: any;
8
+ parent: any;
9
+ scroll: any;
10
+ next: any;
11
+ static create(value: any): any;
12
+ static formats(domNode: any): {};
13
+ static match(url: any): boolean;
14
+ static register(): void;
15
+ static sanitize(url: any): any;
16
+ static value(domNode: any): any;
17
+ format(name: any, value: any): void;
18
+ unWrap(): void;
19
+ wrap(name: any, value: any): any;
20
+ }
21
+ declare class CustomImageContainer extends Inline {
22
+ static tagName: string;
23
+ static className: string;
24
+ static blotName: string;
25
+ static allowedChildren: typeof CustomImage[];
26
+ constructor(scroll: any, domNode: any);
27
+ }
28
+ export { CustomImage as default, CustomImageContainer as ImageContainerBlot };
@@ -0,0 +1,13 @@
1
+ import { default as ResizeAction } from '../actions/CustomResizeAction';
2
+ import { default as DeleteAction } from '../actions/DeleteAction';
3
+
4
+ export default class BlotSpec {
5
+ formatter: any;
6
+ constructor(formatter: any);
7
+ init(): void;
8
+ getActions(): (typeof ResizeAction | typeof DeleteAction)[];
9
+ getTargetElement(): any;
10
+ getOverlayElement(): any;
11
+ setSelection(): void;
12
+ onHide(): void;
13
+ }
@@ -0,0 +1,21 @@
1
+ import { default as CustomResizeAction } from '../actions/CustomResizeAction';
2
+ import { default as DeleteAction } from '../actions/DeleteAction';
3
+ import { default as ImageSpec } from './ImageSpec';
4
+
5
+ export declare class CustomImageSpec extends ImageSpec {
6
+ formatter: any;
7
+ editorElem: HTMLElement | undefined;
8
+ observer: any;
9
+ oldRootScrollTop: any;
10
+ constructor(formatter: any);
11
+ handleQuillRootScroll(): void;
12
+ init(): void;
13
+ getActions(): (typeof CustomResizeAction | typeof DeleteAction)[];
14
+ imageMouseOver(event: any): void;
15
+ imageMouseout: (event: any) => void;
16
+ addImagePreviewOverlay(event: any): void;
17
+ removeImagePreviewOverlay(): void;
18
+ onHide(): void;
19
+ resetOverlayMarginTop(): void;
20
+ onClick: (event: MouseEvent) => void;
21
+ }
@@ -0,0 +1,10 @@
1
+ import { default as BlotSpec } from './BlotSpec';
2
+
3
+ export default class ImageSpec extends BlotSpec {
4
+ img: any;
5
+ constructor(formatter: any);
6
+ init(): void;
7
+ getTargetElement(): any;
8
+ onHide(): void;
9
+ onClick: (event: MouseEvent) => void;
10
+ }
@@ -0,0 +1,30 @@
1
+ import { Range } from 'quill/core/quill';
2
+
3
+ interface InsertFileData {
4
+ code: number;
5
+ message?: string;
6
+ data: {
7
+ title: string;
8
+ size: number;
9
+ src: string;
10
+ };
11
+ }
12
+ declare const Uploader: unknown;
13
+ declare class CustomUploader extends Uploader {
14
+ quill: any;
15
+ options: any;
16
+ upload(range: any, files: any, isFile?: any): void;
17
+ isAllowedFileType: (accept: Array<string> | string, file: File) => boolean;
18
+ handleUploadFile(range: any, files: any, _hasRejectedFile: any): void;
19
+ insertFileToEditor(range: Range, file: File, { code, message, data }: InsertFileData): void;
20
+ insertImageToEditor(range: any, { code, message, data }: {
21
+ code: any;
22
+ message: any;
23
+ data: any;
24
+ }): void;
25
+ handleUploadImage(range: any, { file, files }: {
26
+ file: any;
27
+ files: any;
28
+ }, hasRejectedImage: any): void;
29
+ }
30
+ export default CustomUploader;
@@ -0,0 +1 @@
1
+ export { peopleEmoji } from './people';
@@ -0,0 +1 @@
1
+ export declare const peopleEmoji: any[];
@@ -0,0 +1,2 @@
1
+ declare const emojiList: any[];
2
+ export default emojiList;
@@ -0,0 +1,2 @@
1
+ declare const emojiMap: {};
2
+ export default emojiMap;
@@ -0,0 +1,13 @@
1
+ declare const Embed: unknown;
2
+ declare class EmojiBlot extends Embed {
3
+ static emojiClass: string;
4
+ static emojiPrefix: any;
5
+ static tagName: string;
6
+ static blotName: string;
7
+ static className: string;
8
+ static create(value: any): any;
9
+ static value(node: any): any;
10
+ static buildSpan(value: any, node: any): void;
11
+ static parseUnicode(string: any): any;
12
+ }
13
+ export default EmojiBlot;
@@ -0,0 +1,10 @@
1
+ import { default as EmojiBlot } from './formats/emoji-blot';
2
+ import { default as ShortNameEmoji } from './modules/emoji';
3
+ import { default as ToolbarEmoji } from './modules/toolbar-emoji';
4
+
5
+ declare const _default: {
6
+ EmojiBlot: typeof EmojiBlot;
7
+ ShortNameEmoji: typeof ShortNameEmoji;
8
+ ToolbarEmoji: typeof ToolbarEmoji;
9
+ };
10
+ export default _default;
@@ -0,0 +1,38 @@
1
+ declare const Module: unknown;
2
+ declare class ShortNameEmoji extends Module {
3
+ static DEFAULTS: {
4
+ emojiList: any[];
5
+ fuse: {
6
+ shouldSort: boolean;
7
+ threshold: number;
8
+ location: number;
9
+ distance: number;
10
+ maxPatternLength: number;
11
+ minMatchCharLength: number;
12
+ keys: string[];
13
+ };
14
+ };
15
+ emojiList: any;
16
+ quill: any;
17
+ fuse: any;
18
+ onOpen: any;
19
+ onClose: any;
20
+ container: HTMLUListElement;
21
+ onSelectionChange: any;
22
+ onTextChange: any;
23
+ open: boolean;
24
+ atIndex: any;
25
+ focusedButton: any;
26
+ isWhiteSpace: (ch: any) => boolean;
27
+ query: any;
28
+ buttons: any;
29
+ options: any;
30
+ constructor(quill: any, options: any);
31
+ triggerPicker(range: any, _context: any): boolean;
32
+ handleArrow(): boolean;
33
+ update(event: any): void;
34
+ maybeUnfocus(): void;
35
+ renderCompletions(emojis: any, evt: any): void;
36
+ close(value: any, trailingDelete?: number): void;
37
+ }
38
+ export default ShortNameEmoji;
@@ -0,0 +1,8 @@
1
+ declare const Module: unknown;
2
+ declare class ToolbarEmoji extends Module {
3
+ quill: any;
4
+ toolbar: any;
5
+ constructor(quill: any, options: any);
6
+ checkPalatteExist(): void;
7
+ }
8
+ export default ToolbarEmoji;
@@ -0,0 +1 @@
1
+ export declare function createEmoji(emojiArr: any): any[];
@@ -0,0 +1,15 @@
1
+ declare const Embed: unknown;
2
+ declare class File extends Embed {
3
+ static blotName: string;
4
+ static tagName: string;
5
+ static className: string;
6
+ static PROTOCOL_WHITELIST: string[];
7
+ statics: any;
8
+ domNode: any;
9
+ static create(value: any): any;
10
+ static value(domNode: any): any;
11
+ static formats(domNode: any): any;
12
+ static getFormats(domNode: any): any;
13
+ static sanitize(url: any): any;
14
+ }
15
+ export default File;
@@ -0,0 +1,11 @@
1
+ import { default as FileBar } from './modules/file-bar';
2
+
3
+ declare const Module: unknown;
4
+ declare class FileModule extends Module {
5
+ quill: any;
6
+ fileBar: FileBar;
7
+ static register(): void;
8
+ constructor(quill: any, options: any);
9
+ clickEvent(event: any): void;
10
+ }
11
+ export default FileModule;
@@ -0,0 +1,14 @@
1
+ export default class FileBar {
2
+ quill: any;
3
+ file: any;
4
+ domNode: HTMLElement;
5
+ fileRange: any;
6
+ template: string;
7
+ constructor(quill: any, target: any);
8
+ createFileBar(): void;
9
+ destroy(): void;
10
+ operateFile(event: any, operate: any): void;
11
+ setPosition(): void;
12
+ css(domNode: any, rules: any): void;
13
+ formatDate(timestamp: any): string;
14
+ }