@opentiny/fluent-editor 4.0.0-alpha.0 → 4.0.0-alpha.2

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 (487) hide show
  1. package/README.md +7 -24
  2. package/es/config/editor.config.es.js +0 -7
  3. package/es/config/editor.config.es.js.map +1 -1
  4. package/es/config/editor.utils.es.js +0 -2
  5. package/es/config/editor.utils.es.js.map +1 -1
  6. package/es/config/i18n/en-us.es.js +0 -13
  7. package/es/config/i18n/en-us.es.js.map +1 -1
  8. package/es/config/i18n/zh-cn.es.js +0 -13
  9. package/es/config/i18n/zh-cn.es.js.map +1 -1
  10. package/es/config/index.es.js +8 -13
  11. package/es/config/index.es.js.map +1 -1
  12. package/es/config/types/index.es.js +0 -20
  13. package/es/config/types/index.es.js.map +1 -1
  14. package/es/core/fluent-editor.es.js +7 -5
  15. package/es/core/fluent-editor.es.js.map +1 -1
  16. package/es/fluent-editor.es.js +36 -22
  17. package/es/fluent-editor.es.js.map +1 -1
  18. package/es/formats/emoji.es.js +14 -0
  19. package/es/formats/emoji.es.js.map +1 -0
  20. package/es/formats/index.es.js +11 -0
  21. package/es/formats/index.es.js.map +1 -0
  22. package/es/formats/soft-break.es.js +12 -5
  23. package/es/formats/soft-break.es.js.map +1 -1
  24. package/es/formats/strike.es.js +8 -5
  25. package/es/formats/strike.es.js.map +1 -1
  26. package/es/formats/video.es.js +14 -10
  27. package/es/formats/video.es.js.map +1 -1
  28. package/es/index.es.js +92 -32
  29. package/es/index.es.js.map +1 -1
  30. package/es/modules/counter.es.js +8 -3
  31. package/es/modules/counter.es.js.map +1 -1
  32. package/es/modules/custom-clipboard.es.js +23 -27
  33. package/es/modules/custom-clipboard.es.js.map +1 -1
  34. package/es/modules/custom-image/actions/action.es.js +19 -0
  35. package/es/modules/custom-image/actions/action.es.js.map +1 -0
  36. package/es/modules/custom-image/actions/{CustomResizeAction.es.js → custom-resize-action.es.js} +24 -11
  37. package/es/modules/custom-image/actions/{CustomResizeAction.es.js.map → custom-resize-action.es.js.map} +1 -1
  38. package/es/modules/custom-image/actions/{DeleteAction.es.js → delete-action.es.js} +8 -5
  39. package/es/modules/custom-image/actions/delete-action.es.js.map +1 -0
  40. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js +137 -0
  41. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js.map +1 -0
  42. package/es/modules/custom-image/actions/index.es.js +18 -0
  43. package/es/modules/custom-image/actions/index.es.js.map +1 -0
  44. package/es/modules/custom-image/actions/toolbar-action.es.js +33 -0
  45. package/es/modules/custom-image/actions/toolbar-action.es.js.map +1 -0
  46. package/es/modules/custom-image/actions/toolbar.es.js +110 -0
  47. package/es/modules/custom-image/actions/toolbar.es.js.map +1 -0
  48. package/es/modules/custom-image/{BlotFormatter.es.js → blot-formatter.es.js} +23 -50
  49. package/es/modules/custom-image/blot-formatter.es.js.map +1 -0
  50. package/es/modules/custom-image/image.es.js +34 -21
  51. package/es/modules/custom-image/image.es.js.map +1 -1
  52. package/es/modules/custom-image/index.es.js +9 -0
  53. package/es/modules/custom-image/index.es.js.map +1 -0
  54. package/es/modules/custom-image/options.es.js +85 -0
  55. package/es/modules/custom-image/options.es.js.map +1 -0
  56. package/es/modules/custom-image/specs/blot-spec.es.js +33 -0
  57. package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -0
  58. package/es/modules/custom-image/specs/{CustomImageSpec.es.js → custom-image-spec.es.js} +13 -14
  59. package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -0
  60. package/es/modules/custom-image/specs/image-spec.es.js +32 -0
  61. package/es/modules/custom-image/specs/image-spec.es.js.map +1 -0
  62. package/es/modules/custom-image/specs/index.es.js +9 -0
  63. package/es/modules/custom-image/specs/index.es.js.map +1 -0
  64. package/es/modules/custom-uploader.es.js +63 -194
  65. package/es/modules/custom-uploader.es.js.map +1 -1
  66. package/es/modules/divider.es.js +8 -7
  67. package/es/modules/divider.es.js.map +1 -1
  68. package/es/modules/emoji.es.js +175 -0
  69. package/es/modules/emoji.es.js.map +1 -0
  70. package/es/modules/file/formats/file.es.js +13 -13
  71. package/es/modules/file/formats/file.es.js.map +1 -1
  72. package/es/modules/file/index.es.js +6 -29
  73. package/es/modules/file/index.es.js.map +1 -1
  74. package/es/modules/file/modules/file-bar.es.js +11 -3
  75. package/es/modules/file/modules/file-bar.es.js.map +1 -1
  76. package/es/modules/file/modules/file-module.es.js +35 -0
  77. package/es/modules/file/modules/file-module.es.js.map +1 -0
  78. package/es/modules/i18n.es.js +33 -11
  79. package/es/modules/i18n.es.js.map +1 -1
  80. package/es/modules/index.es.js +26 -0
  81. package/es/modules/index.es.js.map +1 -0
  82. package/es/modules/link/formats/link.es.js +14 -10
  83. package/es/modules/link/formats/link.es.js.map +1 -1
  84. package/es/modules/link/index.es.js +4 -12
  85. package/es/modules/link/index.es.js.map +1 -1
  86. package/es/modules/link/modules/tooltip.es.js +31 -21
  87. package/es/modules/link/modules/tooltip.es.js.map +1 -1
  88. package/es/modules/mathlive/formats.es.js +10 -7
  89. package/es/modules/mathlive/formats.es.js.map +1 -1
  90. package/es/modules/mathlive/index.es.js +6 -30
  91. package/es/modules/mathlive/index.es.js.map +1 -1
  92. package/es/modules/mathlive/module.es.js +40 -0
  93. package/es/modules/mathlive/module.es.js.map +1 -0
  94. package/es/modules/mathlive/tooltip.es.js +9 -5
  95. package/es/modules/mathlive/tooltip.es.js.map +1 -1
  96. package/es/modules/mention/index.es.js +7 -0
  97. package/es/modules/{emoji/emoji-list → mention}/index.es.js.map +1 -1
  98. package/es/modules/mention/{MentionLink.es.js → mention-link.es.js} +14 -6
  99. package/es/modules/mention/mention-link.es.js.map +1 -0
  100. package/es/modules/mention/{Mention.es.js → mention.es.js} +28 -20
  101. package/es/modules/mention/mention.es.js.map +1 -0
  102. package/es/modules/shortcut-key/index.es.js +17 -1
  103. package/es/modules/shortcut-key/index.es.js.map +1 -1
  104. package/es/modules/syntax.es.js +4 -0
  105. package/es/modules/syntax.es.js.map +1 -1
  106. package/es/modules/table-up/index.es.js +9 -2
  107. package/es/modules/table-up/index.es.js.map +1 -1
  108. package/es/modules/toolbar/better-picker.es.js +5 -0
  109. package/es/modules/toolbar/better-picker.es.js.map +1 -1
  110. package/es/modules/toolbar/better-toolbar.es.js +138 -0
  111. package/es/modules/toolbar/better-toolbar.es.js.map +1 -0
  112. package/es/modules/toolbar/index.es.js +5 -135
  113. package/es/modules/toolbar/index.es.js.map +1 -1
  114. package/es/modules/toolbar/toolbar-tip.es.js +6 -1
  115. package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
  116. package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js +40145 -0
  117. package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js.map +1 -0
  118. package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +938 -0
  119. package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
  120. package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +624 -0
  121. package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -0
  122. package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +174 -0
  123. package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -0
  124. package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +159 -0
  125. package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -0
  126. package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js +2849 -0
  127. package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js.map +1 -0
  128. package/es/themes/snow.es.js +18 -15
  129. package/es/themes/snow.es.js.map +1 -1
  130. package/es/tools/fullscreen.es.js.map +1 -1
  131. package/es/ui/icons.config.es.js +8 -0
  132. package/es/ui/icons.config.es.js.map +1 -1
  133. package/es/ui/icons.es.js.map +1 -1
  134. package/es/utils/is.es.js +4 -0
  135. package/es/utils/is.es.js.map +1 -1
  136. package/lib/config/editor.config.cjs.js +0 -7
  137. package/lib/config/editor.config.cjs.js.map +1 -1
  138. package/lib/config/editor.utils.cjs.js +0 -2
  139. package/lib/config/editor.utils.cjs.js.map +1 -1
  140. package/lib/config/i18n/en-us.cjs.js +0 -13
  141. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  142. package/lib/config/i18n/zh-cn.cjs.js +0 -13
  143. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  144. package/lib/config/index.cjs.js +6 -11
  145. package/lib/config/index.cjs.js.map +1 -1
  146. package/lib/config/types/index.cjs.js +0 -20
  147. package/lib/config/types/index.cjs.js.map +1 -1
  148. package/lib/core/fluent-editor.cjs.js +6 -4
  149. package/lib/core/fluent-editor.cjs.js.map +1 -1
  150. package/lib/fluent-editor.cjs.js +44 -30
  151. package/lib/fluent-editor.cjs.js.map +1 -1
  152. package/lib/formats/emoji.cjs.js +14 -0
  153. package/lib/formats/emoji.cjs.js.map +1 -0
  154. package/lib/formats/index.cjs.js +11 -0
  155. package/lib/formats/index.cjs.js.map +1 -0
  156. package/lib/formats/soft-break.cjs.js +13 -6
  157. package/lib/formats/soft-break.cjs.js.map +1 -1
  158. package/lib/formats/strike.cjs.js +9 -6
  159. package/lib/formats/strike.cjs.js.map +1 -1
  160. package/lib/formats/video.cjs.js +15 -11
  161. package/lib/formats/video.cjs.js.map +1 -1
  162. package/lib/index.cjs.js +112 -34
  163. package/lib/index.cjs.js.map +1 -1
  164. package/lib/modules/counter.cjs.js +8 -3
  165. package/lib/modules/counter.cjs.js.map +1 -1
  166. package/lib/modules/custom-clipboard.cjs.js +23 -27
  167. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  168. package/lib/modules/custom-image/actions/action.cjs.js +19 -0
  169. package/lib/modules/custom-image/actions/action.cjs.js.map +1 -0
  170. package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js → custom-resize-action.cjs.js} +26 -13
  171. package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js.map → custom-resize-action.cjs.js.map} +1 -1
  172. package/lib/modules/custom-image/actions/{DeleteAction.cjs.js → delete-action.cjs.js} +10 -7
  173. package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -0
  174. package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js +137 -0
  175. package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js.map +1 -0
  176. package/lib/modules/custom-image/actions/index.cjs.js +18 -0
  177. package/lib/modules/custom-image/actions/index.cjs.js.map +1 -0
  178. package/lib/modules/custom-image/actions/toolbar-action.cjs.js +33 -0
  179. package/lib/modules/custom-image/actions/toolbar-action.cjs.js.map +1 -0
  180. package/lib/modules/custom-image/actions/toolbar.cjs.js +110 -0
  181. package/lib/modules/custom-image/actions/toolbar.cjs.js.map +1 -0
  182. package/lib/modules/custom-image/{BlotFormatter.cjs.js → blot-formatter.cjs.js} +24 -51
  183. package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -0
  184. package/lib/modules/custom-image/image.cjs.js +35 -22
  185. package/lib/modules/custom-image/image.cjs.js.map +1 -1
  186. package/lib/modules/custom-image/index.cjs.js +9 -0
  187. package/lib/modules/custom-image/index.cjs.js.map +1 -0
  188. package/lib/modules/custom-image/options.cjs.js +85 -0
  189. package/lib/modules/custom-image/options.cjs.js.map +1 -0
  190. package/lib/modules/custom-image/specs/blot-spec.cjs.js +33 -0
  191. package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -0
  192. package/lib/modules/custom-image/specs/{CustomImageSpec.cjs.js → custom-image-spec.cjs.js} +14 -15
  193. package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -0
  194. package/lib/modules/custom-image/specs/image-spec.cjs.js +32 -0
  195. package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -0
  196. package/lib/modules/custom-image/specs/index.cjs.js +9 -0
  197. package/lib/modules/custom-image/specs/index.cjs.js.map +1 -0
  198. package/lib/modules/custom-uploader.cjs.js +64 -195
  199. package/lib/modules/custom-uploader.cjs.js.map +1 -1
  200. package/lib/modules/divider.cjs.js +9 -8
  201. package/lib/modules/divider.cjs.js.map +1 -1
  202. package/lib/modules/emoji.cjs.js +175 -0
  203. package/lib/modules/emoji.cjs.js.map +1 -0
  204. package/lib/modules/file/formats/file.cjs.js +14 -14
  205. package/lib/modules/file/formats/file.cjs.js.map +1 -1
  206. package/lib/modules/file/index.cjs.js +5 -28
  207. package/lib/modules/file/index.cjs.js.map +1 -1
  208. package/lib/modules/file/modules/file-bar.cjs.js +12 -4
  209. package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
  210. package/lib/modules/file/modules/file-module.cjs.js +35 -0
  211. package/lib/modules/file/modules/file-module.cjs.js.map +1 -0
  212. package/lib/modules/i18n.cjs.js +32 -10
  213. package/lib/modules/i18n.cjs.js.map +1 -1
  214. package/lib/modules/index.cjs.js +26 -0
  215. package/lib/modules/index.cjs.js.map +1 -0
  216. package/lib/modules/link/formats/link.cjs.js +15 -11
  217. package/lib/modules/link/formats/link.cjs.js.map +1 -1
  218. package/lib/modules/link/index.cjs.js +4 -12
  219. package/lib/modules/link/index.cjs.js.map +1 -1
  220. package/lib/modules/link/modules/tooltip.cjs.js +30 -20
  221. package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
  222. package/lib/modules/mathlive/formats.cjs.js +11 -8
  223. package/lib/modules/mathlive/formats.cjs.js.map +1 -1
  224. package/lib/modules/mathlive/index.cjs.js +5 -29
  225. package/lib/modules/mathlive/index.cjs.js.map +1 -1
  226. package/lib/modules/mathlive/module.cjs.js +40 -0
  227. package/lib/modules/mathlive/module.cjs.js.map +1 -0
  228. package/lib/modules/mathlive/tooltip.cjs.js +10 -6
  229. package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
  230. package/lib/modules/mention/index.cjs.js +7 -0
  231. package/lib/modules/{emoji/emoji-list → mention}/index.cjs.js.map +1 -1
  232. package/lib/modules/mention/{MentionLink.cjs.js → mention-link.cjs.js} +15 -7
  233. package/lib/modules/mention/mention-link.cjs.js.map +1 -0
  234. package/lib/modules/mention/{Mention.cjs.js → mention.cjs.js} +30 -22
  235. package/lib/modules/mention/mention.cjs.js.map +1 -0
  236. package/lib/modules/shortcut-key/index.cjs.js +16 -0
  237. package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
  238. package/lib/modules/syntax.cjs.js +4 -0
  239. package/lib/modules/syntax.cjs.js.map +1 -1
  240. package/lib/modules/table-up/index.cjs.js +9 -2
  241. package/lib/modules/table-up/index.cjs.js.map +1 -1
  242. package/lib/modules/toolbar/better-picker.cjs.js +5 -0
  243. package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
  244. package/lib/modules/toolbar/better-toolbar.cjs.js +138 -0
  245. package/lib/modules/toolbar/better-toolbar.cjs.js.map +1 -0
  246. package/lib/modules/toolbar/index.cjs.js +6 -136
  247. package/lib/modules/toolbar/index.cjs.js.map +1 -1
  248. package/lib/modules/toolbar/toolbar-tip.cjs.js +6 -1
  249. package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
  250. package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js +40145 -0
  251. package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js.map +1 -0
  252. package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js +938 -0
  253. package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js.map +1 -0
  254. package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js +624 -0
  255. package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js.map +1 -0
  256. package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js +159 -0
  257. package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js.map +1 -0
  258. package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +174 -0
  259. package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js.map +1 -0
  260. package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js +2847 -0
  261. package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js.map +1 -0
  262. package/lib/themes/snow.cjs.js +19 -16
  263. package/lib/themes/snow.cjs.js.map +1 -1
  264. package/lib/tools/fullscreen.cjs.js.map +1 -1
  265. package/lib/ui/icons.cjs.js.map +1 -1
  266. package/lib/ui/icons.config.cjs.js +8 -0
  267. package/lib/ui/icons.config.cjs.js.map +1 -1
  268. package/lib/utils/is.cjs.js +4 -0
  269. package/lib/utils/is.cjs.js.map +1 -1
  270. package/package.json +8 -7
  271. package/style.css +8 -952
  272. package/types/config/editor.config.d.ts +0 -274
  273. package/types/config/editor.utils.d.ts +0 -1
  274. package/types/config/i18n/en-us.d.ts +0 -13
  275. package/types/config/i18n/zh-cn.d.ts +0 -13
  276. package/types/config/index.d.ts +2 -1
  277. package/types/config/types/editor-config.interface.d.ts +0 -26
  278. package/types/config/types/editor-modules.interface.d.ts +22 -11
  279. package/types/config/types/index.d.ts +0 -20
  280. package/types/config/types/type.d.ts +0 -4
  281. package/types/core/fluent-editor.d.ts +3 -2
  282. package/types/formats/emoji.d.ts +9 -0
  283. package/types/formats/index.d.ts +4 -0
  284. package/types/formats/soft-break.d.ts +6 -7
  285. package/types/formats/strike.d.ts +6 -4
  286. package/types/formats/video.d.ts +4 -6
  287. package/types/index.d.ts +5 -3
  288. package/types/modules/counter.d.ts +9 -2
  289. package/types/modules/custom-clipboard.d.ts +4 -7
  290. package/types/modules/custom-image/Options.d.ts +34 -23
  291. package/types/modules/custom-image/actions/Action.d.ts +5 -3
  292. package/types/modules/custom-image/actions/custom-resize-action.d.ts +24 -0
  293. package/types/modules/custom-image/actions/delete-action.d.ts +7 -0
  294. package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +17 -0
  295. package/types/modules/custom-image/actions/index.d.ts +6 -0
  296. package/types/modules/custom-image/actions/toolbar-action.d.ts +12 -0
  297. package/types/modules/custom-image/actions/toolbar.d.ts +20 -0
  298. package/types/modules/custom-image/blot-formatter.d.ts +24 -0
  299. package/types/modules/custom-image/image-bar.d.ts +9 -7
  300. package/types/modules/custom-image/image.d.ts +22 -23
  301. package/types/modules/custom-image/index.d.ts +4 -0
  302. package/types/modules/custom-image/specs/blot-spec.d.ts +13 -0
  303. package/types/modules/custom-image/specs/custom-image-spec.d.ts +18 -0
  304. package/types/modules/custom-image/specs/image-spec.d.ts +9 -0
  305. package/types/modules/custom-image/specs/index.d.ts +3 -0
  306. package/types/modules/custom-uploader.d.ts +38 -28
  307. package/types/modules/divider.d.ts +6 -4
  308. package/types/modules/emoji/formats/emoji-blot.d.ts +9 -7
  309. package/types/modules/emoji/index.d.ts +3 -10
  310. package/types/modules/emoji/modules/emoji.d.ts +6 -6
  311. package/types/modules/emoji/modules/toolbar-emoji.d.ts +7 -6
  312. package/types/modules/emoji.d.ts +35 -0
  313. package/types/modules/file/formats/file.d.ts +14 -10
  314. package/types/modules/file/index.d.ts +3 -11
  315. package/types/modules/file/modules/file-bar.d.ts +1 -1
  316. package/types/modules/file/modules/file-module.d.ts +10 -0
  317. package/types/modules/i18n.d.ts +4 -5
  318. package/types/modules/index.d.ts +15 -0
  319. package/types/modules/link/formats/link.d.ts +5 -5
  320. package/types/modules/link/index.d.ts +2 -6
  321. package/types/modules/link/modules/tooltip.d.ts +5 -10
  322. package/types/modules/mathlive/formats.d.ts +2 -2
  323. package/types/modules/mathlive/index.d.ts +3 -9
  324. package/types/modules/mathlive/module.d.ts +10 -0
  325. package/types/modules/mathlive/tooltip.d.ts +1 -1
  326. package/types/modules/mention/Mention.d.ts +3 -4
  327. package/types/modules/mention/index.d.ts +2 -0
  328. package/types/modules/mention/mention-link.d.ts +17 -0
  329. package/types/modules/shortcut-key/index.d.ts +16 -41
  330. package/types/modules/table-up/index.d.ts +27 -27
  331. package/types/modules/toolbar/better-toolbar.d.ts +8 -0
  332. package/types/modules/toolbar/index.d.ts +2 -8
  333. package/types/tools/fullscreen.d.ts +5 -1
  334. package/types/ui/icons.config.d.ts +1 -0
  335. package/types/utils/is.d.ts +3 -1
  336. package/es/config/types/additional-toolbar-item.interface.es.js +0 -2
  337. package/es/config/types/additional-toolbar-item.interface.es.js.map +0 -1
  338. package/es/config/types/content-change.interface.es.js +0 -2
  339. package/es/config/types/content-change.interface.es.js.map +0 -1
  340. package/es/config/types/content-save.interface.es.js +0 -2
  341. package/es/config/types/content-save.interface.es.js.map +0 -1
  342. package/es/config/types/counter-option.interface.es.js +0 -2
  343. package/es/config/types/counter-option.interface.es.js.map +0 -1
  344. package/es/config/types/editor-toolbar.interface.es.js +0 -2
  345. package/es/config/types/editor-toolbar.interface.es.js.map +0 -1
  346. package/es/config/types/file-operation.interface.es.js +0 -2
  347. package/es/config/types/file-operation.interface.es.js.map +0 -1
  348. package/es/config/types/focus-change.interface.es.js +0 -2
  349. package/es/config/types/focus-change.interface.es.js.map +0 -1
  350. package/es/config/types/fullscreen-module.interface.es.js +0 -2
  351. package/es/config/types/fullscreen-module.interface.es.js.map +0 -1
  352. package/es/config/types/help-panel-item.interface.es.js +0 -2
  353. package/es/config/types/help-panel-item.interface.es.js.map +0 -1
  354. package/es/config/types/help-panel-option.interface.es.js +0 -2
  355. package/es/config/types/help-panel-option.interface.es.js.map +0 -1
  356. package/es/config/types/image-module.interface.es.js +0 -2
  357. package/es/config/types/image-module.interface.es.js.map +0 -1
  358. package/es/config/types/image-upload.interface.es.js +0 -2
  359. package/es/config/types/image-upload.interface.es.js.map +0 -1
  360. package/es/config/types/load-on-demand-module.interface.es.js +0 -2
  361. package/es/config/types/load-on-demand-module.interface.es.js.map +0 -1
  362. package/es/config/types/mention-module.interface.es.js +0 -2
  363. package/es/config/types/mention-module.interface.es.js.map +0 -1
  364. package/es/config/types/paste-change.interface.es.js +0 -2
  365. package/es/config/types/paste-change.interface.es.js.map +0 -1
  366. package/es/config/types/quick-menu-module.interface.es.js +0 -2
  367. package/es/config/types/quick-menu-module.interface.es.js.map +0 -1
  368. package/es/config/types/range.interface.es.js +0 -2
  369. package/es/config/types/range.interface.es.js.map +0 -1
  370. package/es/config/types/registry-options.interface.es.js +0 -2
  371. package/es/config/types/registry-options.interface.es.js.map +0 -1
  372. package/es/config/types/selection-change.interface.es.js +0 -2
  373. package/es/config/types/selection-change.interface.es.js.map +0 -1
  374. package/es/config/types/toolbar-item.interface.es.js +0 -2
  375. package/es/config/types/toolbar-item.interface.es.js.map +0 -1
  376. package/es/config/types/validate-error.interface.es.js +0 -2
  377. package/es/config/types/validate-error.interface.es.js.map +0 -1
  378. package/es/modules/custom-image/BlotFormatter.es.js.map +0 -1
  379. package/es/modules/custom-image/Options.es.js +0 -95
  380. package/es/modules/custom-image/Options.es.js.map +0 -1
  381. package/es/modules/custom-image/actions/Action.es.js +0 -15
  382. package/es/modules/custom-image/actions/Action.es.js.map +0 -1
  383. package/es/modules/custom-image/actions/DeleteAction.es.js.map +0 -1
  384. package/es/modules/custom-image/image-bar.es.js +0 -127
  385. package/es/modules/custom-image/image-bar.es.js.map +0 -1
  386. package/es/modules/custom-image/specs/BlotSpec.es.js +0 -27
  387. package/es/modules/custom-image/specs/BlotSpec.es.js.map +0 -1
  388. package/es/modules/custom-image/specs/CustomImageSpec.es.js.map +0 -1
  389. package/es/modules/custom-image/specs/ImageSpec.es.js +0 -29
  390. package/es/modules/custom-image/specs/ImageSpec.es.js.map +0 -1
  391. package/es/modules/emoji/emoji-list/index.es.js +0 -5
  392. package/es/modules/emoji/emoji-list/people.es.js +0 -114
  393. package/es/modules/emoji/emoji-list/people.es.js.map +0 -1
  394. package/es/modules/emoji/emoji-list.es.js +0 -9
  395. package/es/modules/emoji/emoji-list.es.js.map +0 -1
  396. package/es/modules/emoji/emoji-map.es.js +0 -9
  397. package/es/modules/emoji/emoji-map.es.js.map +0 -1
  398. package/es/modules/emoji/emoji-sprite.es.js +0 -5
  399. package/es/modules/emoji/emoji-sprite.es.js.map +0 -1
  400. package/es/modules/emoji/formats/emoji-blot.es.js +0 -41
  401. package/es/modules/emoji/formats/emoji-blot.es.js.map +0 -1
  402. package/es/modules/emoji/index.es.js +0 -8
  403. package/es/modules/emoji/index.es.js.map +0 -1
  404. package/es/modules/emoji/modules/emoji.es.js +0 -248
  405. package/es/modules/emoji/modules/emoji.es.js.map +0 -1
  406. package/es/modules/emoji/modules/toolbar-emoji.es.js +0 -153
  407. package/es/modules/emoji/modules/toolbar-emoji.es.js.map +0 -1
  408. package/es/modules/emoji/utils.es.js +0 -19
  409. package/es/modules/emoji/utils.es.js.map +0 -1
  410. package/es/modules/mention/Mention.es.js.map +0 -1
  411. package/es/modules/mention/MentionLink.es.js.map +0 -1
  412. package/lib/config/types/additional-toolbar-item.interface.cjs.js +0 -2
  413. package/lib/config/types/additional-toolbar-item.interface.cjs.js.map +0 -1
  414. package/lib/config/types/content-change.interface.cjs.js +0 -2
  415. package/lib/config/types/content-change.interface.cjs.js.map +0 -1
  416. package/lib/config/types/content-save.interface.cjs.js +0 -2
  417. package/lib/config/types/content-save.interface.cjs.js.map +0 -1
  418. package/lib/config/types/counter-option.interface.cjs.js +0 -2
  419. package/lib/config/types/counter-option.interface.cjs.js.map +0 -1
  420. package/lib/config/types/editor-toolbar.interface.cjs.js +0 -2
  421. package/lib/config/types/editor-toolbar.interface.cjs.js.map +0 -1
  422. package/lib/config/types/file-operation.interface.cjs.js +0 -2
  423. package/lib/config/types/file-operation.interface.cjs.js.map +0 -1
  424. package/lib/config/types/focus-change.interface.cjs.js +0 -2
  425. package/lib/config/types/focus-change.interface.cjs.js.map +0 -1
  426. package/lib/config/types/fullscreen-module.interface.cjs.js +0 -2
  427. package/lib/config/types/fullscreen-module.interface.cjs.js.map +0 -1
  428. package/lib/config/types/help-panel-item.interface.cjs.js +0 -2
  429. package/lib/config/types/help-panel-item.interface.cjs.js.map +0 -1
  430. package/lib/config/types/help-panel-option.interface.cjs.js +0 -2
  431. package/lib/config/types/help-panel-option.interface.cjs.js.map +0 -1
  432. package/lib/config/types/image-module.interface.cjs.js +0 -2
  433. package/lib/config/types/image-module.interface.cjs.js.map +0 -1
  434. package/lib/config/types/image-upload.interface.cjs.js +0 -2
  435. package/lib/config/types/image-upload.interface.cjs.js.map +0 -1
  436. package/lib/config/types/load-on-demand-module.interface.cjs.js +0 -2
  437. package/lib/config/types/load-on-demand-module.interface.cjs.js.map +0 -1
  438. package/lib/config/types/mention-module.interface.cjs.js +0 -2
  439. package/lib/config/types/mention-module.interface.cjs.js.map +0 -1
  440. package/lib/config/types/paste-change.interface.cjs.js +0 -2
  441. package/lib/config/types/paste-change.interface.cjs.js.map +0 -1
  442. package/lib/config/types/quick-menu-module.interface.cjs.js +0 -2
  443. package/lib/config/types/quick-menu-module.interface.cjs.js.map +0 -1
  444. package/lib/config/types/range.interface.cjs.js +0 -2
  445. package/lib/config/types/range.interface.cjs.js.map +0 -1
  446. package/lib/config/types/registry-options.interface.cjs.js +0 -2
  447. package/lib/config/types/registry-options.interface.cjs.js.map +0 -1
  448. package/lib/config/types/selection-change.interface.cjs.js +0 -2
  449. package/lib/config/types/selection-change.interface.cjs.js.map +0 -1
  450. package/lib/config/types/toolbar-item.interface.cjs.js +0 -2
  451. package/lib/config/types/toolbar-item.interface.cjs.js.map +0 -1
  452. package/lib/config/types/validate-error.interface.cjs.js +0 -2
  453. package/lib/config/types/validate-error.interface.cjs.js.map +0 -1
  454. package/lib/modules/custom-image/BlotFormatter.cjs.js.map +0 -1
  455. package/lib/modules/custom-image/Options.cjs.js +0 -95
  456. package/lib/modules/custom-image/Options.cjs.js.map +0 -1
  457. package/lib/modules/custom-image/actions/Action.cjs.js +0 -15
  458. package/lib/modules/custom-image/actions/Action.cjs.js.map +0 -1
  459. package/lib/modules/custom-image/actions/DeleteAction.cjs.js.map +0 -1
  460. package/lib/modules/custom-image/image-bar.cjs.js +0 -127
  461. package/lib/modules/custom-image/image-bar.cjs.js.map +0 -1
  462. package/lib/modules/custom-image/specs/BlotSpec.cjs.js +0 -27
  463. package/lib/modules/custom-image/specs/BlotSpec.cjs.js.map +0 -1
  464. package/lib/modules/custom-image/specs/CustomImageSpec.cjs.js.map +0 -1
  465. package/lib/modules/custom-image/specs/ImageSpec.cjs.js +0 -29
  466. package/lib/modules/custom-image/specs/ImageSpec.cjs.js.map +0 -1
  467. package/lib/modules/emoji/emoji-list/index.cjs.js +0 -5
  468. package/lib/modules/emoji/emoji-list/people.cjs.js +0 -114
  469. package/lib/modules/emoji/emoji-list/people.cjs.js.map +0 -1
  470. package/lib/modules/emoji/emoji-list.cjs.js +0 -9
  471. package/lib/modules/emoji/emoji-list.cjs.js.map +0 -1
  472. package/lib/modules/emoji/emoji-map.cjs.js +0 -9
  473. package/lib/modules/emoji/emoji-map.cjs.js.map +0 -1
  474. package/lib/modules/emoji/emoji-sprite.cjs.js +0 -5
  475. package/lib/modules/emoji/emoji-sprite.cjs.js.map +0 -1
  476. package/lib/modules/emoji/formats/emoji-blot.cjs.js +0 -41
  477. package/lib/modules/emoji/formats/emoji-blot.cjs.js.map +0 -1
  478. package/lib/modules/emoji/index.cjs.js +0 -8
  479. package/lib/modules/emoji/index.cjs.js.map +0 -1
  480. package/lib/modules/emoji/modules/emoji.cjs.js +0 -248
  481. package/lib/modules/emoji/modules/emoji.cjs.js.map +0 -1
  482. package/lib/modules/emoji/modules/toolbar-emoji.cjs.js +0 -153
  483. package/lib/modules/emoji/modules/toolbar-emoji.cjs.js.map +0 -1
  484. package/lib/modules/emoji/utils.cjs.js +0 -19
  485. package/lib/modules/emoji/utils.cjs.js.map +0 -1
  486. package/lib/modules/mention/Mention.cjs.js.map +0 -1
  487. package/lib/modules/mention/MentionLink.cjs.js.map +0 -1
@@ -1,278 +1,4 @@
1
1
  export declare const BIG_DELTA_LIMIT = 2000;
2
- export declare const LANG_CONF: {
3
- 'en-US': {
4
- header: string;
5
- normal: string;
6
- h1: string;
7
- h2: string;
8
- h3: string;
9
- h4: string;
10
- h5: string;
11
- h6: string;
12
- 'line-height': string;
13
- songti: string;
14
- yahei: string;
15
- kaiti: string;
16
- heiti: string;
17
- lishu: string;
18
- left: string;
19
- center: string;
20
- right: string;
21
- codeblock: string;
22
- globallink: string;
23
- 'exit-fullscreen': string;
24
- help: string;
25
- more: string;
26
- 'help-format': string;
27
- 'help-insert': string;
28
- 'help-operation': string;
29
- mention: string;
30
- 'quick-menu': string;
31
- 'toggle-help-panel': string;
32
- 'scroll-table': string;
33
- 'mouse-wheel': string;
34
- save: string;
35
- 'copy-cells': string;
36
- 'copy-table': string;
37
- 'cut-cells': string;
38
- 'empty-cells': string;
39
- 'insert-row-up': string;
40
- 'insert-row-down': string;
41
- 'insert-column-left': string;
42
- 'insert-column-right': string;
43
- 'merge-cells': string;
44
- 'unmerge-cells': string;
45
- 'delete-row': string;
46
- 'delete-column': string;
47
- 'delete-table': string;
48
- 'default-link-text': string;
49
- basicblock: string;
50
- linkplaceholder: string;
51
- 'counter-template': string;
52
- char: string;
53
- word: string;
54
- 'counter-limit-tips': string;
55
- 'ie-msg': string;
56
- loading: string;
57
- pasting: string;
58
- 'img-error': string;
59
- 'img-error-info': string;
60
- 'last-modified': string;
61
- screenshot: string;
62
- uploading: string;
63
- 'sub-title-bg-color': string;
64
- emoji: string;
65
- fullscreen: string;
66
- blockquote: string;
67
- undo: string;
68
- redo: string;
69
- clean: string;
70
- bold: string;
71
- italic: string;
72
- underline: string;
73
- strike: string;
74
- image: string;
75
- file: string;
76
- link: string;
77
- code: string;
78
- table: string;
79
- 'table-up': string;
80
- 'code-block': string;
81
- formula: string;
82
- 'format-painter': string;
83
- divider: string;
84
- video: string;
85
- color: string;
86
- background: string;
87
- font: string;
88
- size: string;
89
- list: string;
90
- 'list-ordered': string;
91
- 'list-bullet': string;
92
- 'list-check': string;
93
- 'align-left': string;
94
- 'align-center': string;
95
- 'align-right': string;
96
- 'align-justify': string;
97
- 'direction-ltr': string;
98
- 'direction-rtl': string;
99
- 'indent--1': string;
100
- 'indent-+1': string;
101
- 'script-super': string;
102
- 'script-sub': string;
103
- 'header-normal': string;
104
- 'header-1': string;
105
- 'header-2': string;
106
- 'header-3': string;
107
- 'header-4': string;
108
- 'header-5': string;
109
- 'header-6': string;
110
- 'header-list': string;
111
- 'input-recall-menu-placeholder': string;
112
- 'clear-color': string;
113
- 'custom-color': string;
114
- fullCheckboxText: string;
115
- customBtnText: string;
116
- confirmText: string;
117
- cancelText: string;
118
- rowText: string;
119
- colText: string;
120
- notPositiveNumberError: string;
121
- custom: string;
122
- clear: string;
123
- transparent: string;
124
- perWidthInsufficient: string;
125
- CopyCell: string;
126
- CutCell: string;
127
- InsertTop: string;
128
- InsertRight: string;
129
- InsertBottom: string;
130
- InsertLeft: string;
131
- MergeCell: string;
132
- SplitCell: string;
133
- DeleteRow: string;
134
- DeleteColumn: string;
135
- DeleteTable: string;
136
- BackgroundColor: string;
137
- BorderColor: string;
138
- };
139
- 'zh-CN': {
140
- header: string;
141
- normal: string;
142
- h1: string;
143
- h2: string;
144
- h3: string;
145
- h4: string;
146
- h5: string;
147
- h6: string;
148
- 'line-height': string;
149
- songti: string;
150
- yahei: string;
151
- kaiti: string;
152
- heiti: string;
153
- lishu: string;
154
- left: string;
155
- center: string;
156
- right: string;
157
- codeblock: string;
158
- globallink: string;
159
- 'exit-fullscreen': string;
160
- help: string;
161
- more: string;
162
- 'help-format': string;
163
- 'help-insert': string;
164
- 'help-operation': string;
165
- mention: string;
166
- 'quick-menu': string;
167
- 'toggle-help-panel': string;
168
- 'scroll-table': string;
169
- 'mouse-wheel': string;
170
- save: string;
171
- 'copy-cells': string;
172
- 'copy-table': string;
173
- 'cut-cells': string;
174
- 'empty-cells': string;
175
- 'insert-row-up': string;
176
- 'insert-row-down': string;
177
- 'insert-column-left': string;
178
- 'insert-column-right': string;
179
- 'merge-cells': string;
180
- 'unmerge-cells': string;
181
- 'delete-row': string;
182
- 'delete-column': string;
183
- 'delete-table': string;
184
- 'default-link-text': string;
185
- basicblock: string;
186
- linkplaceholder: string;
187
- 'counter-template': string;
188
- char: string;
189
- word: string;
190
- 'counter-limit-tips': string;
191
- 'ie-msg': string;
192
- loading: string;
193
- pasting: string;
194
- 'img-error': string;
195
- 'img-error-info': string;
196
- 'last-modified': string;
197
- screenshot: string;
198
- uploading: string;
199
- 'sub-title-bg-color': string;
200
- emoji: string;
201
- fullscreen: string;
202
- blockquote: string;
203
- undo: string;
204
- redo: string;
205
- clean: string;
206
- bold: string;
207
- italic: string;
208
- underline: string;
209
- strike: string;
210
- image: string;
211
- file: string;
212
- link: string;
213
- divider: string;
214
- code: string;
215
- table: string;
216
- 'table-up': string;
217
- 'code-block': string;
218
- formula: string;
219
- 'format-painter': string;
220
- video: string;
221
- color: string;
222
- background: string;
223
- font: string;
224
- size: string;
225
- list: string;
226
- 'list-ordered': string;
227
- 'list-bullet': string;
228
- 'list-check': string;
229
- 'align-left': string;
230
- 'align-center': string;
231
- 'align-right': string;
232
- 'align-justify': string;
233
- 'direction-ltr': string;
234
- 'direction-rtl': string;
235
- 'indent--1': string;
236
- 'indent-+1': string;
237
- 'script-super': string;
238
- 'script-sub': string;
239
- 'header-normal': string;
240
- 'header-1': string;
241
- 'header-2': string;
242
- 'header-3': string;
243
- 'header-4': string;
244
- 'header-5': string;
245
- 'header-6': string;
246
- 'header-list': string;
247
- 'input-recall-menu-placeholder': string;
248
- 'clear-color': string;
249
- 'custom-color': string;
250
- fullCheckboxText: string;
251
- customBtnText: string;
252
- confirmText: string;
253
- cancelText: string;
254
- rowText: string;
255
- colText: string;
256
- notPositiveNumberError: string;
257
- custom: string;
258
- clear: string;
259
- transparent: string;
260
- perWidthInsufficient: string;
261
- CopyCell: string;
262
- CutCell: string;
263
- InsertTop: string;
264
- InsertRight: string;
265
- InsertBottom: string;
266
- InsertLeft: string;
267
- MergeCell: string;
268
- SplitCell: string;
269
- DeleteRow: string;
270
- DeleteColumn: string;
271
- DeleteTable: string;
272
- BackgroundColor: string;
273
- BorderColor: string;
274
- };
275
- };
276
2
  export declare const CHANGE_LANGUAGE_EVENT = "change-language";
277
3
  export declare const defaultLanguage = "en-US";
278
4
  export declare const IMAGE_UPLOADER_MIME_TYPES: string[];
@@ -38,4 +38,3 @@ export declare function getEventComposedPath(evt: any): any;
38
38
  export declare function sanitize(url: any, protocols: any): any;
39
39
  export declare function hadProtocol(url: string): boolean;
40
40
  export declare function isInside(position: any, dom: any): boolean;
41
- export declare const isPureIE: boolean;
@@ -30,19 +30,6 @@ export declare const EN_US: {
30
30
  'scroll-table': string;
31
31
  'mouse-wheel': string;
32
32
  save: string;
33
- 'copy-cells': string;
34
- 'copy-table': string;
35
- 'cut-cells': string;
36
- 'empty-cells': string;
37
- 'insert-row-up': string;
38
- 'insert-row-down': string;
39
- 'insert-column-left': string;
40
- 'insert-column-right': string;
41
- 'merge-cells': string;
42
- 'unmerge-cells': string;
43
- 'delete-row': string;
44
- 'delete-column': string;
45
- 'delete-table': string;
46
33
  'default-link-text': string;
47
34
  basicblock: string;
48
35
  linkplaceholder: string;
@@ -30,19 +30,6 @@ export declare const ZH_CN: {
30
30
  'scroll-table': string;
31
31
  'mouse-wheel': string;
32
32
  save: string;
33
- 'copy-cells': string;
34
- 'copy-table': string;
35
- 'cut-cells': string;
36
- 'empty-cells': string;
37
- 'insert-row-up': string;
38
- 'insert-row-down': string;
39
- 'insert-column-left': string;
40
- 'insert-column-right': string;
41
- 'merge-cells': string;
42
- 'unmerge-cells': string;
43
- 'delete-row': string;
44
- 'delete-column': string;
45
- 'delete-table': string;
46
33
  'default-link-text': string;
47
34
  basicblock: string;
48
35
  linkplaceholder: string;
@@ -1,6 +1,7 @@
1
1
  export * from './editor.config';
2
2
  export * from './editor.utils';
3
- export declare function inputFile(type: any, accept: any): void;
3
+ export * from './types';
4
+ export declare function inputFile(type: 'image' | 'video' | 'file', accept: string[]): void;
4
5
  export declare function getListValue(value: any, preListValue: any): any;
5
6
  /** css namespace */
6
7
  export declare const namespace = "fe";
@@ -1,38 +1,12 @@
1
1
  import { QuillOptions } from 'quill';
2
2
  import { ScreenShotOptions } from '../../tools/screenshot';
3
3
  import { IEditorModules } from './editor-modules.interface';
4
- import { EditorFormat } from './type';
5
4
 
6
5
  export interface IEditorConfig extends QuillOptions {
7
- format?: EditorFormat;
8
6
  modules?: IEditorModules;
9
7
  screenshotOnStaticPage?: boolean;
10
8
  scrollingContainer?: HTMLElement | string | null;
11
- trackChanges?: 'user' | 'all';
12
9
  autoProtocol?: boolean | string;
13
10
  editorPaste?: any;
14
- uploadOption?: {
15
- imageUpload?: ({ file, callback, editor }: {
16
- file: any;
17
- callback: any;
18
- editor: any;
19
- }) => void;
20
- imageAccept?: Array<string>[] | string;
21
- fileAccept?: Array<string>[] | string;
22
- fileUpload: ({ file, callback, editor }: {
23
- file: any;
24
- callback: any;
25
- editor: any;
26
- }) => void;
27
- isVideoPlay?: boolean;
28
- maxSize?: number;
29
- success?: (file: File) => void;
30
- fail?: (file: File) => void;
31
- multiple?: boolean;
32
- };
33
11
  screenshot?: Partial<ScreenShotOptions>;
34
- i18n?: {
35
- lang?: string;
36
- langText?: Record<string, string>;
37
- };
38
12
  }
@@ -1,20 +1,27 @@
1
- import { ToolbarOption } from './type';
1
+ import { ToolbarProps } from 'quill/modules/toolbar';
2
+ import { I18NOptions, ICounterOption, MentionOption, ShortCutKeyInputOptions } from '../../modules';
3
+ import { BlotFormatterOptionsInput } from '../../modules/custom-image/options';
4
+ import { FileUploaderOptions } from '../../modules/custom-uploader';
5
+ import { EmojiModuleOptions } from '../../modules/emoji';
2
6
 
7
+ export type ToolbarOptions = {
8
+ container?: HTMLElement | (Record<string, any>[] | string[] | (string | Record<string, any>)[])[];
9
+ } & ToolbarProps;
3
10
  export interface IEditorModules {
4
11
  [key: string]: any;
5
- clipboard?: {
12
+ 'clipboard'?: {
6
13
  matchers?: any[];
7
14
  matchVisual?: boolean;
8
15
  } | boolean;
9
- history?: {
16
+ 'history'?: {
10
17
  delay?: number;
11
18
  maxStack?: number;
12
19
  userOnly?: boolean;
13
20
  } | boolean;
14
- keyboard?: {
21
+ 'keyboard'?: {
15
22
  bindings?: any;
16
23
  } | boolean;
17
- syntax?: {
24
+ 'syntax'?: {
18
25
  interval?: number;
19
26
  languages?: {
20
27
  key: string;
@@ -22,10 +29,14 @@ export interface IEditorModules {
22
29
  }[];
23
30
  hljs?: any;
24
31
  } | boolean;
25
- toolbar?: (string | string[])[][] | ToolbarOption | string | {
26
- container?: string | string[] | ToolbarOption;
27
- handlers?: {
28
- [key: string]: any;
29
- };
30
- } | boolean;
32
+ 'toolbar'?: boolean | ToolbarOptions | ToolbarOptions['container'] | string[];
33
+ 'uploader'?: boolean | Partial<FileUploaderOptions>;
34
+ 'shortcut-key'?: boolean | Partial<ShortCutKeyInputOptions>;
35
+ 'mention'?: boolean | MentionOption;
36
+ 'i18n'?: boolean | Partial<I18NOptions>;
37
+ 'counter'?: boolean | ICounterOption;
38
+ 'emoji'?: boolean | EmojiModuleOptions;
39
+ 'file'?: boolean;
40
+ 'mathlive'?: boolean;
41
+ 'image'?: boolean | Partial<BlotFormatterOptionsInput>;
31
42
  }
@@ -1,23 +1,3 @@
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
1
  export * from './editor-config.interface';
6
2
  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
3
  export * from './type';
23
- export * from './validate-error.interface';
@@ -1,6 +1,2 @@
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
1
  export type AnyFunction = (...args: any[]) => any;
6
2
  export type Constructor<T = any, U extends Array<any> = any[]> = new (...args: U) => T;
@@ -1,13 +1,14 @@
1
1
  import { ExpandedQuillOptions, default as Quill } from 'quill';
2
2
  import { IEditorConfig } from '../config/types';
3
+ import { FileUploader } from '../modules/custom-uploader';
3
4
 
4
5
  declare class FluentEditor extends Quill {
5
6
  isFullscreen: boolean;
6
7
  options: IEditorConfig & ExpandedQuillOptions;
8
+ uploader: FileUploader;
7
9
  static register(...args: any[]): void;
8
10
  get lang(): string;
9
11
  constructor(container: HTMLElement | string, options?: IEditorConfig);
10
- getLangText(name: string): any;
12
+ getLangText(name: string): string;
11
13
  }
12
- export type { Module, Parchment as TypeParchment, } from 'quill';
13
14
  export default FluentEditor;
@@ -0,0 +1,9 @@
1
+ import { default as TypeInline } from 'quill/blots/inline';
2
+
3
+ declare const Inline: typeof TypeInline;
4
+ export declare class EmojiBlot extends Inline {
5
+ static blotName: string;
6
+ static tagName: string;
7
+ static className: string;
8
+ }
9
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './emoji';
2
+ export * from './soft-break';
3
+ export * from './strike';
4
+ export * from './video';
@@ -1,14 +1,13 @@
1
- declare const Embed: unknown;
2
- declare class SoftBreak extends Embed {
1
+ import { default as TypeEmbed } from 'quill/blots/embed';
2
+
3
+ declare const Embed: typeof TypeEmbed;
4
+ export declare class SoftBreak extends Embed {
3
5
  static blotName: string;
4
6
  static tagName: string;
5
7
  static className: string;
6
- domNode: any;
7
- prev: any;
8
- next: any;
9
8
  remove: () => void;
10
- static create(): any;
9
+ static create(): Node;
11
10
  optimize(): void;
12
11
  length(): number;
13
12
  }
14
- export default SoftBreak;
13
+ export {};
@@ -1,7 +1,9 @@
1
- declare const Inline: unknown;
2
- declare class StrikeBlot extends Inline {
1
+ import { default as TypeInline } from 'quill/blots/inline';
2
+
3
+ declare const Inline: typeof TypeInline;
4
+ export declare class StrikeBlot extends Inline {
3
5
  static blotName: string;
4
- static className: string;
5
6
  static tagName: string;
7
+ static className: string;
6
8
  }
7
- export default StrikeBlot;
9
+ export {};
@@ -1,16 +1,14 @@
1
- import { Parchment as TypeParchment } from 'quill';
1
+ import { BlockEmbed as TypeBlockEmbed } from 'quill/blots/block';
2
2
 
3
- declare const BlockEmbed: TypeParchment.BlotConstructor;
4
- declare class Video extends BlockEmbed {
3
+ declare const BlockEmbed: typeof TypeBlockEmbed;
4
+ export declare class Video extends BlockEmbed {
5
5
  static blotName: string;
6
6
  static tagName: string;
7
7
  static SANITIZED_URL: string;
8
8
  static PROTOCOL_WHITELIST: string[];
9
9
  static className: string;
10
- statics: any;
11
- domNode: any;
12
10
  static sanitize(url: any): any;
13
11
  static create(value: any): HTMLElement;
14
12
  static value(domNode: any): any;
15
13
  }
16
- export default Video;
14
+ export {};
package/types/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { default as FluentEditor } from './fluent-editor';
2
2
 
3
- export * from './config';
4
- export * from './modules/table-up';
5
- export * from './modules/toolbar/toolbar-tip';
3
+ export * from './attributors';
4
+ export * from './config/types';
5
+ export * from './formats';
6
+ export * from './modules';
6
7
  export { generateTableUpShortKeyMenu } from 'quill-shortcut-key';
7
8
  export default FluentEditor;
9
+ export { AttributeMap, Delta, Op, OpIterator, Parchment, Range } from 'quill/core';
@@ -1,6 +1,13 @@
1
- import { ICounterOption } from '../config/types';
1
+ import { AnyFunction } from '../config';
2
2
  import { default as FluentEditor } from '../fluent-editor';
3
3
 
4
+ export interface ICounterOption {
5
+ format?: 'text' | 'html';
6
+ unit?: 'word' | 'char';
7
+ count?: number;
8
+ template?: string | AnyFunction;
9
+ errorTemplate?: string | AnyFunction;
10
+ }
4
11
  export default class Counter {
5
12
  quill: FluentEditor;
6
13
  container: HTMLDivElement;
@@ -9,7 +16,7 @@ export default class Counter {
9
16
  resolveOptions(options: ICounterOption): {
10
17
  format: string;
11
18
  unit: string;
12
- template: any;
19
+ template: string;
13
20
  count: number;
14
21
  } & ICounterOption;
15
22
  renderCount: () => void;
@@ -2,12 +2,9 @@ import { default as TypeClipboard } from 'quill/modules/clipboard';
2
2
  import { default as FluentEditor } from '../fluent-editor';
3
3
 
4
4
  declare const Clipboard: typeof TypeClipboard;
5
- declare class CustomClipboard extends Clipboard {
5
+ export declare class CustomClipboard extends Clipboard {
6
6
  quill: FluentEditor;
7
- convert: any;
8
- onCopy: any;
9
- matchers: any;
10
- prepareMatching(container: any, nodeMatches: any): any[][];
7
+ prepareMatching(container: HTMLElement, nodeMatches: any): any[][];
11
8
  onCaptureCopy(e: any, isCut?: boolean): void;
12
9
  onCapturePaste(e: ClipboardEvent): void;
13
10
  onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
@@ -16,7 +13,7 @@ declare class CustomClipboard extends Clipboard {
16
13
  files: any;
17
14
  rtf: any;
18
15
  }): void;
19
- files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
16
+ files2urls(files: File[], placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<unknown[]>;
20
17
  flipFilesArray(filesArr: any): any[][];
21
18
  convertHexToBase64(hexString: any): string;
22
19
  extractImageDataFromRtf(rtfData: any): any[];
@@ -26,4 +23,4 @@ declare class CustomClipboard extends Clipboard {
26
23
  length: number;
27
24
  };
28
25
  }
29
- export default CustomClipboard;
26
+ export {};