@plotdb/quill 1.0.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 (287) hide show
  1. package/LICENSE +31 -0
  2. package/README.md +3 -0
  3. package/assets/base.styl +309 -0
  4. package/assets/bubble/toolbar.styl +14 -0
  5. package/assets/bubble/tooltip.styl +49 -0
  6. package/assets/bubble.styl +45 -0
  7. package/assets/core.styl +215 -0
  8. package/assets/favicon.png +0 -0
  9. package/assets/icons/align-center.svg +5 -0
  10. package/assets/icons/align-justify.svg +5 -0
  11. package/assets/icons/align-left.svg +5 -0
  12. package/assets/icons/align-right.svg +5 -0
  13. package/assets/icons/attachment.svg +3 -0
  14. package/assets/icons/audio.svg +5 -0
  15. package/assets/icons/authorship.svg +5 -0
  16. package/assets/icons/background.svg +52 -0
  17. package/assets/icons/blockquote.svg +6 -0
  18. package/assets/icons/bold.svg +4 -0
  19. package/assets/icons/clean.svg +7 -0
  20. package/assets/icons/code.svg +5 -0
  21. package/assets/icons/color.svg +5 -0
  22. package/assets/icons/comment.svg +3 -0
  23. package/assets/icons/direction-ltr.svg +7 -0
  24. package/assets/icons/direction-rtl.svg +7 -0
  25. package/assets/icons/dropdown.svg +4 -0
  26. package/assets/icons/embed.svg +3 -0
  27. package/assets/icons/emoji.svg +6 -0
  28. package/assets/icons/float-center.svg +5 -0
  29. package/assets/icons/float-full.svg +5 -0
  30. package/assets/icons/float-left.svg +7 -0
  31. package/assets/icons/float-right.svg +7 -0
  32. package/assets/icons/font.svg +5 -0
  33. package/assets/icons/formula.svg +5 -0
  34. package/assets/icons/hashtag.svg +6 -0
  35. package/assets/icons/header-2.svg +3 -0
  36. package/assets/icons/header-3.svg +3 -0
  37. package/assets/icons/header-4.svg +3 -0
  38. package/assets/icons/header-5.svg +3 -0
  39. package/assets/icons/header-6.svg +3 -0
  40. package/assets/icons/header.svg +3 -0
  41. package/assets/icons/horizontal-rule.svg +4 -0
  42. package/assets/icons/image.svg +5 -0
  43. package/assets/icons/indent.svg +6 -0
  44. package/assets/icons/italic.svg +5 -0
  45. package/assets/icons/link.svg +5 -0
  46. package/assets/icons/list-bullet.svg +8 -0
  47. package/assets/icons/list-check.svg +8 -0
  48. package/assets/icons/list-ordered.svg +9 -0
  49. package/assets/icons/map.svg +5 -0
  50. package/assets/icons/mention.svg +4 -0
  51. package/assets/icons/more.svg +3 -0
  52. package/assets/icons/outdent.svg +6 -0
  53. package/assets/icons/redo.svg +4 -0
  54. package/assets/icons/size-decrease.svg +5 -0
  55. package/assets/icons/size-increase.svg +6 -0
  56. package/assets/icons/size.svg +6 -0
  57. package/assets/icons/spacing.svg +9 -0
  58. package/assets/icons/speech.svg +6 -0
  59. package/assets/icons/strike.svg +5 -0
  60. package/assets/icons/subscript.svg +4 -0
  61. package/assets/icons/superscript.svg +4 -0
  62. package/assets/icons/table-border-all.svg +5 -0
  63. package/assets/icons/table-border-bottom.svg +28 -0
  64. package/assets/icons/table-border-left.svg +28 -0
  65. package/assets/icons/table-border-none.svg +25 -0
  66. package/assets/icons/table-border-outside.svg +35 -0
  67. package/assets/icons/table-border-right.svg +28 -0
  68. package/assets/icons/table-border-top.svg +28 -0
  69. package/assets/icons/table-delete-cells.svg +13 -0
  70. package/assets/icons/table-delete-columns.svg +8 -0
  71. package/assets/icons/table-delete-rows.svg +9 -0
  72. package/assets/icons/table-insert-cells.svg +13 -0
  73. package/assets/icons/table-insert-columns.svg +8 -0
  74. package/assets/icons/table-insert-rows.svg +9 -0
  75. package/assets/icons/table-merge-cells.svg +4 -0
  76. package/assets/icons/table-unmerge-cells.svg +7 -0
  77. package/assets/icons/table.svg +11 -0
  78. package/assets/icons/underline.svg +4 -0
  79. package/assets/icons/undo.svg +4 -0
  80. package/assets/icons/video.svg +14 -0
  81. package/assets/snow/toolbar.styl +26 -0
  82. package/assets/snow/tooltip.styl +53 -0
  83. package/assets/snow.styl +18 -0
  84. package/blots/block.d.ts +34 -0
  85. package/blots/block.js +182 -0
  86. package/blots/block.js.map +1 -0
  87. package/blots/break.d.ts +8 -0
  88. package/blots/break.js +21 -0
  89. package/blots/break.js.map +1 -0
  90. package/blots/container.d.ts +4 -0
  91. package/blots/container.js +4 -0
  92. package/blots/container.js.map +1 -0
  93. package/blots/cursor.d.ts +26 -0
  94. package/blots/cursor.js +170 -0
  95. package/blots/cursor.js.map +1 -0
  96. package/blots/embed.d.ts +18 -0
  97. package/blots/embed.js +72 -0
  98. package/blots/embed.js.map +1 -0
  99. package/blots/inline.d.ts +12 -0
  100. package/blots/inline.js +48 -0
  101. package/blots/inline.js.map +1 -0
  102. package/blots/scroll.d.ts +49 -0
  103. package/blots/scroll.js +349 -0
  104. package/blots/scroll.js.map +1 -0
  105. package/blots/text.d.ts +5 -0
  106. package/blots/text.js +16 -0
  107. package/blots/text.js.map +1 -0
  108. package/core/composition.d.ts +12 -0
  109. package/core/composition.js +44 -0
  110. package/core/composition.js.map +1 -0
  111. package/core/editor.d.ts +28 -0
  112. package/core/editor.js +404 -0
  113. package/core/editor.js.map +1 -0
  114. package/core/emitter.d.ts +33 -0
  115. package/core/emitter.js +78 -0
  116. package/core/emitter.js.map +1 -0
  117. package/core/instances.d.ts +3 -0
  118. package/core/instances.js +2 -0
  119. package/core/instances.js.map +1 -0
  120. package/core/logger.d.ts +7 -0
  121. package/core/logger.js +24 -0
  122. package/core/logger.js.map +1 -0
  123. package/core/module.d.ts +8 -0
  124. package/core/module.js +10 -0
  125. package/core/module.js.map +1 -0
  126. package/core/quill.d.ts +218 -0
  127. package/core/quill.js +630 -0
  128. package/core/quill.js.map +1 -0
  129. package/core/selection.d.ts +74 -0
  130. package/core/selection.js +374 -0
  131. package/core/selection.js.map +1 -0
  132. package/core/theme.d.ts +32 -0
  133. package/core/theme.js +28 -0
  134. package/core/theme.js.map +1 -0
  135. package/core/utils/createRegistryWithFormats.d.ts +5 -0
  136. package/core/utils/createRegistryWithFormats.js +29 -0
  137. package/core/utils/createRegistryWithFormats.js.map +1 -0
  138. package/core/utils/scrollRectIntoView.d.ts +11 -0
  139. package/core/utils/scrollRectIntoView.js +110 -0
  140. package/core/utils/scrollRectIntoView.js.map +1 -0
  141. package/core.d.ts +7 -0
  142. package/core.js +37 -0
  143. package/core.js.map +1 -0
  144. package/dist/quill.bubble.css +10 -0
  145. package/dist/quill.bubble.css.map +1 -0
  146. package/dist/quill.core.css +10 -0
  147. package/dist/quill.core.css.map +1 -0
  148. package/dist/quill.core.js +3 -0
  149. package/dist/quill.core.js.LICENSE.txt +7 -0
  150. package/dist/quill.core.js.map +1 -0
  151. package/dist/quill.js +3 -0
  152. package/dist/quill.js.LICENSE.txt +7 -0
  153. package/dist/quill.js.map +1 -0
  154. package/dist/quill.snow.css +10 -0
  155. package/dist/quill.snow.css.map +1 -0
  156. package/formats/align.d.ts +5 -0
  157. package/formats/align.js +10 -0
  158. package/formats/align.js.map +1 -0
  159. package/formats/background.d.ts +5 -0
  160. package/formats/background.js +10 -0
  161. package/formats/background.js.map +1 -0
  162. package/formats/blockquote.d.ts +6 -0
  163. package/formats/blockquote.js +7 -0
  164. package/formats/blockquote.js.map +1 -0
  165. package/formats/bold.d.ts +11 -0
  166. package/formats/bold.js +19 -0
  167. package/formats/bold.js.map +1 -0
  168. package/formats/code.d.ts +15 -0
  169. package/formats/code.js +44 -0
  170. package/formats/code.js.map +1 -0
  171. package/formats/color.d.ts +7 -0
  172. package/formats/color.js +18 -0
  173. package/formats/color.js.map +1 -0
  174. package/formats/direction.d.ts +5 -0
  175. package/formats/direction.js +10 -0
  176. package/formats/direction.js.map +1 -0
  177. package/formats/font.d.ts +7 -0
  178. package/formats/font.js +14 -0
  179. package/formats/font.js.map +1 -0
  180. package/formats/formula.d.ts +10 -0
  181. package/formats/formula.js +34 -0
  182. package/formats/formula.js.map +1 -0
  183. package/formats/header.d.ts +7 -0
  184. package/formats/header.js +10 -0
  185. package/formats/header.js.map +1 -0
  186. package/formats/image.d.ts +13 -0
  187. package/formats/image.js +44 -0
  188. package/formats/image.js.map +1 -0
  189. package/formats/indent.d.ts +8 -0
  190. package/formats/indent.js +30 -0
  191. package/formats/indent.js.map +1 -0
  192. package/formats/italic.d.ts +6 -0
  193. package/formats/italic.js +7 -0
  194. package/formats/italic.js.map +1 -0
  195. package/formats/link.d.ts +13 -0
  196. package/formats/link.js +36 -0
  197. package/formats/link.js.map +1 -0
  198. package/formats/list.d.ts +13 -0
  199. package/formats/list.js +50 -0
  200. package/formats/list.js.map +1 -0
  201. package/formats/script.d.ts +8 -0
  202. package/formats/script.js +21 -0
  203. package/formats/script.js.map +1 -0
  204. package/formats/size.d.ts +4 -0
  205. package/formats/size.js +11 -0
  206. package/formats/size.js.map +1 -0
  207. package/formats/strike.d.ts +6 -0
  208. package/formats/strike.js +7 -0
  209. package/formats/strike.js.map +1 -0
  210. package/formats/table.d.ts +45 -0
  211. package/formats/table.js +176 -0
  212. package/formats/table.js.map +1 -0
  213. package/formats/underline.d.ts +6 -0
  214. package/formats/underline.js +7 -0
  215. package/formats/underline.js.map +1 -0
  216. package/formats/video.d.ts +14 -0
  217. package/formats/video.js +49 -0
  218. package/formats/video.js.map +1 -0
  219. package/modules/clipboard.d.ts +43 -0
  220. package/modules/clipboard.js +477 -0
  221. package/modules/clipboard.js.map +1 -0
  222. package/modules/history.d.ts +36 -0
  223. package/modules/history.js +178 -0
  224. package/modules/history.js.map +1 -0
  225. package/modules/input.d.ts +10 -0
  226. package/modules/input.js +83 -0
  227. package/modules/input.js.map +1 -0
  228. package/modules/keyboard.d.ts +58 -0
  229. package/modules/keyboard.js +713 -0
  230. package/modules/keyboard.js.map +1 -0
  231. package/modules/normalizeExternalHTML/index.d.ts +2 -0
  232. package/modules/normalizeExternalHTML/index.js +12 -0
  233. package/modules/normalizeExternalHTML/index.js.map +1 -0
  234. package/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
  235. package/modules/normalizeExternalHTML/normalizers/googleDocs.js +24 -0
  236. package/modules/normalizeExternalHTML/normalizers/googleDocs.js.map +1 -0
  237. package/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
  238. package/modules/normalizeExternalHTML/normalizers/msWord.js +87 -0
  239. package/modules/normalizeExternalHTML/normalizers/msWord.js.map +1 -0
  240. package/modules/syntax.d.ts +50 -0
  241. package/modules/syntax.js +332 -0
  242. package/modules/syntax.js.map +1 -0
  243. package/modules/table.d.ts +20 -0
  244. package/modules/table.js +125 -0
  245. package/modules/table.js.map +1 -0
  246. package/modules/tableEmbed.d.ts +27 -0
  247. package/modules/tableEmbed.js +209 -0
  248. package/modules/tableEmbed.js.map +1 -0
  249. package/modules/toolbar.d.ts +24 -0
  250. package/modules/toolbar.js +265 -0
  251. package/modules/toolbar.js.map +1 -0
  252. package/modules/uiNode.d.ts +19 -0
  253. package/modules/uiNode.js +95 -0
  254. package/modules/uiNode.js.map +1 -0
  255. package/modules/uploader.d.ts +15 -0
  256. package/modules/uploader.js +69 -0
  257. package/modules/uploader.js.map +1 -0
  258. package/package.json +102 -0
  259. package/quill.d.ts +5 -0
  260. package/quill.js +82 -0
  261. package/quill.js.map +1 -0
  262. package/themes/base.d.ts +35 -0
  263. package/themes/base.js +257 -0
  264. package/themes/base.js.map +1 -0
  265. package/themes/bubble.d.ts +18 -0
  266. package/themes/bubble.js +114 -0
  267. package/themes/bubble.js.map +1 -0
  268. package/themes/snow.d.ts +9 -0
  269. package/themes/snow.js +122 -0
  270. package/themes/snow.js.map +1 -0
  271. package/types.d.js +2 -0
  272. package/types.d.js.map +1 -0
  273. package/ui/color-picker.d.ts +7 -0
  274. package/ui/color-picker.js +30 -0
  275. package/ui/color-picker.js.map +1 -0
  276. package/ui/icon-picker.d.ts +7 -0
  277. package/ui/icon-picker.js +22 -0
  278. package/ui/icon-picker.js.map +1 -0
  279. package/ui/icons.d.ts +49 -0
  280. package/ui/icons.js +82 -0
  281. package/ui/icons.js.map +1 -0
  282. package/ui/picker.d.ts +16 -0
  283. package/ui/picker.js +171 -0
  284. package/ui/picker.js.map +1 -0
  285. package/ui/tooltip.d.ts +12 -0
  286. package/ui/tooltip.js +56 -0
  287. package/ui/tooltip.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","names":["levels","level","debug","method","indexOf","_len","arguments","length","args","Array","_key","console","namespace","ns","reduce","logger","bind","newLevel"],"sources":["../../src/core/logger.ts"],"sourcesContent":["const levels = ['error', 'warn', 'log', 'info'] as const;\nexport type DebugLevel = (typeof levels)[number];\nlet level: DebugLevel | false = 'warn';\n\nfunction debug(method: DebugLevel, ...args: unknown[]) {\n if (level) {\n if (levels.indexOf(method) <= levels.indexOf(level)) {\n console[method](...args); // eslint-disable-line no-console\n }\n }\n}\n\nfunction namespace(\n ns: string,\n): Record<DebugLevel, (...args: unknown[]) => void> {\n return levels.reduce(\n (logger, method) => {\n logger[method] = debug.bind(console, method, ns);\n return logger;\n },\n {} as Record<DebugLevel, (...args: unknown[]) => void>,\n );\n}\n\nnamespace.level = (newLevel: DebugLevel | false) => {\n level = newLevel;\n};\ndebug.level = namespace.level;\n\nexport default namespace;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAU;AAExD,IAAIC,KAAyB,GAAG,MAAM;AAEtC,SAASC,KAAKA,CAACC,MAAkB,EAAsB;EACrD,IAAIF,KAAK,EAAE;IACT,IAAID,MAAM,CAACI,OAAO,CAACD,MAAM,CAAC,IAAIH,MAAM,CAACI,OAAO,CAACH,KAAK,CAAC,EAAE;MAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAFnBC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;QAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;MAAA;MAGpCC,OAAO,CAACR,MAAM,CAAC,CAAC,GAAGK,IAAI,CAAC,CAAC,CAAC;IAC5B;EACF;AACF;AAEA,SAASI,SAASA,CAChBC,EAAU,EACwC;EAClD,OAAOb,MAAM,CAACc,MAAM,CAClB,CAACC,MAAM,EAAEZ,MAAM,KAAK;IAClBY,MAAM,CAACZ,MAAM,CAAC,GAAGD,KAAK,CAACc,IAAI,CAACL,OAAO,EAAER,MAAM,EAAEU,EAAE,CAAC;IAChD,OAAOE,MAAM;EACf,CAAC,EACD,CAAC,CACH,CAAC;AACH;AAEAH,SAAS,CAACX,KAAK,GAAIgB,QAA4B,IAAK;EAClDhB,KAAK,GAAGgB,QAAQ;AAClB,CAAC;AACDf,KAAK,CAACD,KAAK,GAAGW,SAAS,CAACX,KAAK;AAE7B,eAAeW,SAAS","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import type Quill from './quill.js';
2
+ declare abstract class Module<T extends {} = {}> {
3
+ quill: Quill;
4
+ protected options: Partial<T>;
5
+ static DEFAULTS: {};
6
+ constructor(quill: Quill, options?: Partial<T>);
7
+ }
8
+ export default Module;
package/core/module.js ADDED
@@ -0,0 +1,10 @@
1
+ class Module {
2
+ static DEFAULTS = {};
3
+ constructor(quill) {
4
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
+ this.quill = quill;
6
+ this.options = options;
7
+ }
8
+ }
9
+ export default Module;
10
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","names":["Module","DEFAULTS","constructor","quill","options","arguments","length","undefined"],"sources":["../../src/core/module.ts"],"sourcesContent":["import type Quill from './quill.js';\n\nabstract class Module<T extends {} = {}> {\n static DEFAULTS = {};\n\n constructor(\n public quill: Quill,\n protected options: Partial<T> = {},\n ) {}\n}\n\nexport default Module;\n"],"mappings":"AAEA,MAAeA,MAAM,CAAoB;EACvC,OAAOC,QAAQ,GAAG,CAAC,CAAC;EAEpBC,WAAWA,CACFC,KAAY,EAEnB;IAAA,IADUC,OAAmB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAA,KAD3BF,KAAY,GAAZA,KAAY;IAAA,KACTC,OAAmB,GAAnBA,OAAmB;EAC5B;AACL;AAEA,eAAeJ,MAAM","ignoreList":[]}
@@ -0,0 +1,218 @@
1
+ import * as Parchment from 'parchment';
2
+ import type { Op } from 'quill-delta';
3
+ import Delta from 'quill-delta';
4
+ import type { BlockEmbed } from '../blots/block.js';
5
+ import type Block from '../blots/block.js';
6
+ import type Scroll from '../blots/scroll.js';
7
+ import type Clipboard from '../modules/clipboard.js';
8
+ import type History from '../modules/history.js';
9
+ import type Keyboard from '../modules/keyboard.js';
10
+ import type Uploader from '../modules/uploader.js';
11
+ import Editor from './editor.js';
12
+ import Emitter from './emitter.js';
13
+ import type { EmitterSource } from './emitter.js';
14
+ import type { DebugLevel } from './logger.js';
15
+ import Module from './module.js';
16
+ import Selection, { Range } from './selection.js';
17
+ import type { Bounds } from './selection.js';
18
+ import Composition from './composition.js';
19
+ import Theme from './theme.js';
20
+ import type { ThemeConstructor } from './theme.js';
21
+ import type { Rect, ScrollRectIntoViewOptions } from './utils/scrollRectIntoView.js';
22
+ declare const globalRegistry: Parchment.Registry;
23
+ /**
24
+ * Options for initializing a Quill instance
25
+ */
26
+ export interface QuillOptions {
27
+ theme?: string;
28
+ debug?: DebugLevel | boolean;
29
+ registry?: Parchment.Registry;
30
+ /**
31
+ * Whether to disable the editing
32
+ * @default false
33
+ */
34
+ readOnly?: boolean;
35
+ /**
36
+ * Placeholder text to display when the editor is empty
37
+ * @default ""
38
+ */
39
+ placeholder?: string;
40
+ bounds?: HTMLElement | string | null;
41
+ modules?: Record<string, unknown>;
42
+ /**
43
+ * A list of formats that are recognized and can exist within the editor contents.
44
+ * `null` means all formats are allowed.
45
+ * @default null
46
+ */
47
+ formats?: string[] | null;
48
+ }
49
+ /**
50
+ * Similar to QuillOptions, but with all properties expanded to their default values,
51
+ * and all selectors resolved to HTMLElements.
52
+ */
53
+ export interface ExpandedQuillOptions extends Omit<QuillOptions, 'theme' | 'formats'> {
54
+ theme: ThemeConstructor;
55
+ registry: Parchment.Registry;
56
+ container: HTMLElement;
57
+ modules: Record<string, unknown>;
58
+ bounds?: HTMLElement | null;
59
+ readOnly: boolean;
60
+ }
61
+ declare class Quill {
62
+ static DEFAULTS: {
63
+ bounds: null;
64
+ modules: {
65
+ clipboard: boolean;
66
+ keyboard: boolean;
67
+ history: boolean;
68
+ uploader: boolean;
69
+ };
70
+ placeholder: string;
71
+ readOnly: false;
72
+ registry: Parchment.Registry;
73
+ theme: string;
74
+ };
75
+ static events: {
76
+ readonly EDITOR_CHANGE: "editor-change";
77
+ readonly SCROLL_BEFORE_UPDATE: "scroll-before-update";
78
+ readonly SCROLL_BLOT_MOUNT: "scroll-blot-mount";
79
+ readonly SCROLL_BLOT_UNMOUNT: "scroll-blot-unmount";
80
+ readonly SCROLL_OPTIMIZE: "scroll-optimize";
81
+ readonly SCROLL_UPDATE: "scroll-update";
82
+ readonly SCROLL_EMBED_UPDATE: "scroll-embed-update";
83
+ readonly SELECTION_CHANGE: "selection-change";
84
+ readonly TEXT_CHANGE: "text-change";
85
+ readonly COMPOSITION_BEFORE_START: "composition-before-start";
86
+ readonly COMPOSITION_START: "composition-start";
87
+ readonly COMPOSITION_BEFORE_END: "composition-before-end";
88
+ readonly COMPOSITION_END: "composition-end";
89
+ };
90
+ static sources: {
91
+ readonly API: "api";
92
+ readonly SILENT: "silent";
93
+ readonly USER: "user";
94
+ };
95
+ static version: string;
96
+ static imports: Record<string, unknown>;
97
+ static debug(limit: DebugLevel | boolean): void;
98
+ static find(node: Node, bubble?: boolean): Parchment.Blot | Quill | null;
99
+ static import(name: 'core/module'): typeof Module;
100
+ static import(name: `themes/${string}`): typeof Theme;
101
+ static import(name: 'parchment'): typeof Parchment;
102
+ static import(name: 'delta'): typeof Delta;
103
+ static import(name: string): unknown;
104
+ static register(targets: Record<string, Parchment.RegistryDefinition | Record<string, unknown> | Theme | Module | Function>, overwrite?: boolean): void;
105
+ static register(target: Parchment.RegistryDefinition, overwrite?: boolean): void;
106
+ static register(path: string, target: any, overwrite?: boolean): void;
107
+ container: HTMLElement;
108
+ root: HTMLDivElement;
109
+ scroll: Scroll;
110
+ emitter: Emitter;
111
+ protected allowReadOnlyEdits: boolean;
112
+ editor: Editor;
113
+ composition: Composition;
114
+ selection: Selection;
115
+ theme: Theme;
116
+ keyboard: Keyboard;
117
+ clipboard: Clipboard;
118
+ history: History;
119
+ uploader: Uploader;
120
+ options: ExpandedQuillOptions;
121
+ constructor(container: HTMLElement | string, options?: QuillOptions);
122
+ addContainer(container: string, refNode?: Node | null): HTMLDivElement;
123
+ addContainer(container: HTMLElement, refNode?: Node | null): HTMLElement;
124
+ blur(): void;
125
+ deleteText(range: Range, source?: EmitterSource): Delta;
126
+ deleteText(index: number, length: number, source?: EmitterSource): Delta;
127
+ disable(): void;
128
+ editReadOnly<T>(modifier: () => T): T;
129
+ enable(enabled?: boolean): void;
130
+ focus(options?: {
131
+ preventScroll?: boolean;
132
+ }): void;
133
+ format(name: string, value: unknown, source?: EmitterSource): Delta;
134
+ formatLine(index: number, length: number, formats: Record<string, unknown>, source?: EmitterSource): Delta;
135
+ formatLine(index: number, length: number, name: string, value?: unknown, source?: EmitterSource): Delta;
136
+ formatText(range: Range, name: string, value: unknown, source?: EmitterSource): Delta;
137
+ formatText(index: number, length: number, name: string, value: unknown, source?: EmitterSource): Delta;
138
+ formatText(index: number, length: number, formats: Record<string, unknown>, source?: EmitterSource): Delta;
139
+ getBounds(index: number | Range, length?: number): Bounds | null;
140
+ getContents(index?: number, length?: number): Delta;
141
+ getFormat(index?: number, length?: number): {
142
+ [format: string]: unknown;
143
+ };
144
+ getFormat(range?: Range): {
145
+ [format: string]: unknown;
146
+ };
147
+ getIndex(blot: Parchment.Blot): number;
148
+ getLength(): number;
149
+ getLeaf(index: number): [Parchment.LeafBlot | null, number];
150
+ getLine(index: number): [Block | BlockEmbed | null, number];
151
+ getLines(range: Range): (Block | BlockEmbed)[];
152
+ getLines(index?: number, length?: number): (Block | BlockEmbed)[];
153
+ getModule(name: string): unknown;
154
+ getSelection(focus: true): Range;
155
+ getSelection(focus?: boolean): Range | null;
156
+ getSemanticHTML(range: Range): string;
157
+ getSemanticHTML(index?: number, length?: number): string;
158
+ getText(range?: Range): string;
159
+ getText(index?: number, length?: number): string;
160
+ hasFocus(): boolean;
161
+ insertEmbed(index: number, embed: string, value: unknown, source?: EmitterSource): Delta;
162
+ insertText(index: number, text: string, source?: EmitterSource): Delta;
163
+ insertText(index: number, text: string, formats: Record<string, unknown>, source?: EmitterSource): Delta;
164
+ insertText(index: number, text: string, name: string, value: unknown, source?: EmitterSource): Delta;
165
+ isEnabled(): boolean;
166
+ off(...args: Parameters<(typeof Emitter)['prototype']['off']>): Emitter;
167
+ on(event: (typeof Emitter)['events']['TEXT_CHANGE'], handler: (delta: Delta, oldContent: Delta, source: EmitterSource) => void): Emitter;
168
+ on(event: (typeof Emitter)['events']['SELECTION_CHANGE'], handler: (range: Range, oldRange: Range, source: EmitterSource) => void): Emitter;
169
+ on(event: (typeof Emitter)['events']['EDITOR_CHANGE'], handler: (...args: [
170
+ (typeof Emitter)['events']['TEXT_CHANGE'],
171
+ Delta,
172
+ Delta,
173
+ EmitterSource
174
+ ] | [
175
+ (typeof Emitter)['events']['SELECTION_CHANGE'],
176
+ Range,
177
+ Range,
178
+ EmitterSource
179
+ ]) => void): Emitter;
180
+ on(event: string, ...args: unknown[]): Emitter;
181
+ once(...args: Parameters<(typeof Emitter)['prototype']['once']>): Emitter;
182
+ removeFormat(index: number, length: number, source?: EmitterSource): Delta;
183
+ scrollRectIntoView(rect: Rect, options?: ScrollRectIntoViewOptions): void;
184
+ /**
185
+ * @deprecated Use Quill#scrollSelectionIntoView() instead.
186
+ */
187
+ scrollIntoView(): void;
188
+ /**
189
+ * Scroll the current selection into the visible area.
190
+ * If the selection is already visible, no scrolling will occur.
191
+ */
192
+ scrollSelectionIntoView(options?: ScrollRectIntoViewOptions): void;
193
+ setContents(delta: Delta | Op[], source?: EmitterSource): Delta;
194
+ setSelection(range: Range | null, source?: EmitterSource): void;
195
+ setSelection(index: number, source?: EmitterSource): void;
196
+ setSelection(index: number, length?: number, source?: EmitterSource): void;
197
+ setSelection(index: number, source?: EmitterSource): void;
198
+ setText(text: string, source?: EmitterSource): Delta;
199
+ update(source?: EmitterSource): void;
200
+ updateContents(delta: Delta | Op[], source?: EmitterSource): Delta;
201
+ }
202
+ declare function expandConfig(containerOrSelector: HTMLElement | string, options: QuillOptions): ExpandedQuillOptions;
203
+ type NormalizedIndexLength = [
204
+ number,
205
+ number,
206
+ Record<string, unknown>,
207
+ EmitterSource
208
+ ];
209
+ declare function overload(index: number, source?: EmitterSource): NormalizedIndexLength;
210
+ declare function overload(index: number, length: number, source?: EmitterSource): NormalizedIndexLength;
211
+ declare function overload(index: number, length: number, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
212
+ declare function overload(index: number, length: number, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
213
+ declare function overload(range: Range, source?: EmitterSource): NormalizedIndexLength;
214
+ declare function overload(range: Range, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
215
+ declare function overload(range: Range, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
216
+ export type { Bounds, DebugLevel, EmitterSource };
217
+ export { Parchment, Range };
218
+ export { globalRegistry, expandConfig, overload, Quill as default };