@opentiny/fluent-editor 4.0.0-alpha.1 → 4.0.0-alpha.3

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 (471) hide show
  1. package/README.md +7 -24
  2. package/es/config/editor.utils.es.js +0 -2
  3. package/es/config/editor.utils.es.js.map +1 -1
  4. package/es/config/index.es.js +2 -2
  5. package/es/config/index.es.js.map +1 -1
  6. package/es/config/types/index.es.js +0 -20
  7. package/es/config/types/index.es.js.map +1 -1
  8. package/es/core/fluent-editor.es.js +4 -1
  9. package/es/core/fluent-editor.es.js.map +1 -1
  10. package/es/fluent-editor.es.js +26 -19
  11. package/es/fluent-editor.es.js.map +1 -1
  12. package/es/formats/emoji.es.js +14 -0
  13. package/es/formats/emoji.es.js.map +1 -0
  14. package/es/formats/index.es.js +11 -0
  15. package/es/formats/index.es.js.map +1 -0
  16. package/es/formats/soft-break.es.js +12 -5
  17. package/es/formats/soft-break.es.js.map +1 -1
  18. package/es/formats/strike.es.js +8 -5
  19. package/es/formats/strike.es.js.map +1 -1
  20. package/es/formats/video.es.js +14 -10
  21. package/es/formats/video.es.js.map +1 -1
  22. package/es/index.es.js +90 -31
  23. package/es/index.es.js.map +1 -1
  24. package/es/modules/ai/index.es.js +238 -0
  25. package/es/modules/ai/index.es.js.map +1 -0
  26. package/es/modules/counter.es.js +8 -3
  27. package/es/modules/counter.es.js.map +1 -1
  28. package/es/modules/custom-clipboard.es.js +20 -22
  29. package/es/modules/custom-clipboard.es.js.map +1 -1
  30. package/es/modules/custom-image/actions/action.es.js +19 -0
  31. package/es/modules/custom-image/actions/action.es.js.map +1 -0
  32. package/es/modules/custom-image/actions/{CustomResizeAction.es.js → custom-resize-action.es.js} +24 -11
  33. package/es/modules/custom-image/actions/{CustomResizeAction.es.js.map → custom-resize-action.es.js.map} +1 -1
  34. package/es/modules/custom-image/actions/{DeleteAction.es.js → delete-action.es.js} +8 -5
  35. package/es/modules/custom-image/actions/delete-action.es.js.map +1 -0
  36. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js +137 -0
  37. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js.map +1 -0
  38. package/es/modules/custom-image/actions/index.es.js +18 -0
  39. package/es/modules/custom-image/actions/index.es.js.map +1 -0
  40. package/es/modules/custom-image/actions/toolbar-action.es.js +33 -0
  41. package/es/modules/custom-image/actions/toolbar-action.es.js.map +1 -0
  42. package/es/modules/custom-image/actions/toolbar.es.js +110 -0
  43. package/es/modules/custom-image/actions/toolbar.es.js.map +1 -0
  44. package/es/modules/custom-image/{BlotFormatter.es.js → blot-formatter.es.js} +23 -49
  45. package/es/modules/custom-image/blot-formatter.es.js.map +1 -0
  46. package/es/modules/custom-image/image.es.js +31 -6
  47. package/es/modules/custom-image/image.es.js.map +1 -1
  48. package/es/modules/custom-image/index.es.js +9 -0
  49. package/es/modules/custom-image/index.es.js.map +1 -0
  50. package/es/modules/custom-image/options.es.js +85 -0
  51. package/es/modules/custom-image/options.es.js.map +1 -0
  52. package/es/modules/custom-image/specs/blot-spec.es.js +33 -0
  53. package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -0
  54. package/es/modules/custom-image/specs/{CustomImageSpec.es.js → custom-image-spec.es.js} +13 -14
  55. package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -0
  56. package/es/modules/custom-image/specs/image-spec.es.js +32 -0
  57. package/es/modules/custom-image/specs/image-spec.es.js.map +1 -0
  58. package/es/modules/custom-image/specs/index.es.js +9 -0
  59. package/es/modules/custom-image/specs/index.es.js.map +1 -0
  60. package/es/modules/custom-uploader.es.js +6 -4
  61. package/es/modules/custom-uploader.es.js.map +1 -1
  62. package/es/modules/divider.es.js +8 -7
  63. package/es/modules/divider.es.js.map +1 -1
  64. package/es/modules/emoji.es.js +175 -0
  65. package/es/modules/emoji.es.js.map +1 -0
  66. package/es/modules/file/formats/file.es.js +10 -8
  67. package/es/modules/file/formats/file.es.js.map +1 -1
  68. package/es/modules/file/index.es.js +6 -28
  69. package/es/modules/file/index.es.js.map +1 -1
  70. package/es/modules/file/modules/file-bar.es.js +11 -3
  71. package/es/modules/file/modules/file-bar.es.js.map +1 -1
  72. package/es/modules/file/modules/file-module.es.js +35 -0
  73. package/es/modules/file/modules/file-module.es.js.map +1 -0
  74. package/es/modules/i18n.es.js +6 -3
  75. package/es/modules/i18n.es.js.map +1 -1
  76. package/es/modules/index.es.js +26 -0
  77. package/es/modules/index.es.js.map +1 -0
  78. package/es/modules/link/formats/link.es.js +14 -10
  79. package/es/modules/link/formats/link.es.js.map +1 -1
  80. package/es/modules/link/index.es.js +4 -12
  81. package/es/modules/link/index.es.js.map +1 -1
  82. package/es/modules/link/modules/tooltip.es.js +28 -19
  83. package/es/modules/link/modules/tooltip.es.js.map +1 -1
  84. package/es/modules/mathlive/formats.es.js +10 -7
  85. package/es/modules/mathlive/formats.es.js.map +1 -1
  86. package/es/modules/mathlive/index.es.js +6 -30
  87. package/es/modules/mathlive/index.es.js.map +1 -1
  88. package/es/modules/mathlive/module.es.js +40 -0
  89. package/es/modules/mathlive/module.es.js.map +1 -0
  90. package/es/modules/mathlive/tooltip.es.js +9 -5
  91. package/es/modules/mathlive/tooltip.es.js.map +1 -1
  92. package/es/modules/mention/index.es.js +7 -0
  93. package/es/modules/{emoji/emoji-list → mention}/index.es.js.map +1 -1
  94. package/es/modules/mention/{MentionLink.es.js → mention-link.es.js} +14 -6
  95. package/es/modules/mention/mention-link.es.js.map +1 -0
  96. package/es/modules/mention/{Mention.es.js → mention.es.js} +28 -20
  97. package/es/modules/mention/mention.es.js.map +1 -0
  98. package/es/modules/shortcut-key/index.es.js.map +1 -1
  99. package/es/modules/syntax.es.js +4 -0
  100. package/es/modules/syntax.es.js.map +1 -1
  101. package/es/modules/table-up/index.es.js +4 -0
  102. package/es/modules/table-up/index.es.js.map +1 -1
  103. package/es/modules/toolbar/better-picker.es.js +5 -0
  104. package/es/modules/toolbar/better-picker.es.js.map +1 -1
  105. package/es/modules/toolbar/better-toolbar.es.js +138 -0
  106. package/es/modules/toolbar/better-toolbar.es.js.map +1 -0
  107. package/es/modules/toolbar/index.es.js +5 -135
  108. package/es/modules/toolbar/index.es.js.map +1 -1
  109. package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js +40145 -0
  110. 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
  111. package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +938 -0
  112. 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
  113. package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +624 -0
  114. 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
  115. 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
  116. 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
  117. package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +159 -0
  118. 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
  119. package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js +2849 -0
  120. package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js.map +1 -0
  121. package/es/themes/snow.es.js +6 -10
  122. package/es/themes/snow.es.js.map +1 -1
  123. package/es/tools/fullscreen.es.js.map +1 -1
  124. package/es/ui/icons.config.es.js +23 -0
  125. package/es/ui/icons.config.es.js.map +1 -1
  126. package/es/ui/icons.es.js +2 -1
  127. package/es/ui/icons.es.js.map +1 -1
  128. package/es/utils/is.es.js.map +1 -1
  129. package/lib/config/editor.utils.cjs.js +0 -2
  130. package/lib/config/editor.utils.cjs.js.map +1 -1
  131. package/lib/config/index.cjs.js +1 -1
  132. package/lib/config/index.cjs.js.map +1 -1
  133. package/lib/config/types/index.cjs.js +0 -20
  134. package/lib/config/types/index.cjs.js.map +1 -1
  135. package/lib/core/fluent-editor.cjs.js +4 -1
  136. package/lib/core/fluent-editor.cjs.js.map +1 -1
  137. package/lib/fluent-editor.cjs.js +35 -28
  138. package/lib/fluent-editor.cjs.js.map +1 -1
  139. package/lib/formats/emoji.cjs.js +14 -0
  140. package/lib/formats/emoji.cjs.js.map +1 -0
  141. package/lib/formats/index.cjs.js +11 -0
  142. package/lib/formats/index.cjs.js.map +1 -0
  143. package/lib/formats/soft-break.cjs.js +13 -6
  144. package/lib/formats/soft-break.cjs.js.map +1 -1
  145. package/lib/formats/strike.cjs.js +9 -6
  146. package/lib/formats/strike.cjs.js.map +1 -1
  147. package/lib/formats/video.cjs.js +15 -11
  148. package/lib/formats/video.cjs.js.map +1 -1
  149. package/lib/index.cjs.js +111 -34
  150. package/lib/index.cjs.js.map +1 -1
  151. package/lib/modules/ai/index.cjs.js +238 -0
  152. package/lib/modules/ai/index.cjs.js.map +1 -0
  153. package/lib/modules/counter.cjs.js +8 -3
  154. package/lib/modules/counter.cjs.js.map +1 -1
  155. package/lib/modules/custom-clipboard.cjs.js +21 -23
  156. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  157. package/lib/modules/custom-image/actions/action.cjs.js +19 -0
  158. package/lib/modules/custom-image/actions/action.cjs.js.map +1 -0
  159. package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js → custom-resize-action.cjs.js} +26 -13
  160. package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js.map → custom-resize-action.cjs.js.map} +1 -1
  161. package/lib/modules/custom-image/actions/{DeleteAction.cjs.js → delete-action.cjs.js} +10 -7
  162. package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -0
  163. package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js +137 -0
  164. package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js.map +1 -0
  165. package/lib/modules/custom-image/actions/index.cjs.js +18 -0
  166. package/lib/modules/custom-image/actions/index.cjs.js.map +1 -0
  167. package/lib/modules/custom-image/actions/toolbar-action.cjs.js +33 -0
  168. package/lib/modules/custom-image/actions/toolbar-action.cjs.js.map +1 -0
  169. package/lib/modules/custom-image/actions/toolbar.cjs.js +110 -0
  170. package/lib/modules/custom-image/actions/toolbar.cjs.js.map +1 -0
  171. package/lib/modules/custom-image/{BlotFormatter.cjs.js → blot-formatter.cjs.js} +24 -50
  172. package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -0
  173. package/lib/modules/custom-image/image.cjs.js +32 -7
  174. package/lib/modules/custom-image/image.cjs.js.map +1 -1
  175. package/lib/modules/custom-image/index.cjs.js +9 -0
  176. package/lib/modules/custom-image/index.cjs.js.map +1 -0
  177. package/lib/modules/custom-image/options.cjs.js +85 -0
  178. package/lib/modules/custom-image/options.cjs.js.map +1 -0
  179. package/lib/modules/custom-image/specs/blot-spec.cjs.js +33 -0
  180. package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -0
  181. package/lib/modules/custom-image/specs/{CustomImageSpec.cjs.js → custom-image-spec.cjs.js} +14 -15
  182. package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -0
  183. package/lib/modules/custom-image/specs/image-spec.cjs.js +32 -0
  184. package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -0
  185. package/lib/modules/custom-image/specs/index.cjs.js +9 -0
  186. package/lib/modules/custom-image/specs/index.cjs.js.map +1 -0
  187. package/lib/modules/custom-uploader.cjs.js +6 -4
  188. package/lib/modules/custom-uploader.cjs.js.map +1 -1
  189. package/lib/modules/divider.cjs.js +9 -8
  190. package/lib/modules/divider.cjs.js.map +1 -1
  191. package/lib/modules/emoji.cjs.js +175 -0
  192. package/lib/modules/emoji.cjs.js.map +1 -0
  193. package/lib/modules/file/formats/file.cjs.js +11 -9
  194. package/lib/modules/file/formats/file.cjs.js.map +1 -1
  195. package/lib/modules/file/index.cjs.js +5 -27
  196. package/lib/modules/file/index.cjs.js.map +1 -1
  197. package/lib/modules/file/modules/file-bar.cjs.js +12 -4
  198. package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
  199. package/lib/modules/file/modules/file-module.cjs.js +35 -0
  200. package/lib/modules/file/modules/file-module.cjs.js.map +1 -0
  201. package/lib/modules/i18n.cjs.js +6 -3
  202. package/lib/modules/i18n.cjs.js.map +1 -1
  203. package/lib/modules/index.cjs.js +26 -0
  204. package/lib/modules/index.cjs.js.map +1 -0
  205. package/lib/modules/link/formats/link.cjs.js +15 -11
  206. package/lib/modules/link/formats/link.cjs.js.map +1 -1
  207. package/lib/modules/link/index.cjs.js +4 -12
  208. package/lib/modules/link/index.cjs.js.map +1 -1
  209. package/lib/modules/link/modules/tooltip.cjs.js +28 -19
  210. package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
  211. package/lib/modules/mathlive/formats.cjs.js +11 -8
  212. package/lib/modules/mathlive/formats.cjs.js.map +1 -1
  213. package/lib/modules/mathlive/index.cjs.js +5 -29
  214. package/lib/modules/mathlive/index.cjs.js.map +1 -1
  215. package/lib/modules/mathlive/module.cjs.js +40 -0
  216. package/lib/modules/mathlive/module.cjs.js.map +1 -0
  217. package/lib/modules/mathlive/tooltip.cjs.js +10 -6
  218. package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
  219. package/lib/modules/mention/index.cjs.js +7 -0
  220. package/lib/modules/{emoji/emoji-list → mention}/index.cjs.js.map +1 -1
  221. package/lib/modules/mention/{MentionLink.cjs.js → mention-link.cjs.js} +15 -7
  222. package/lib/modules/mention/mention-link.cjs.js.map +1 -0
  223. package/lib/modules/mention/{Mention.cjs.js → mention.cjs.js} +30 -22
  224. package/lib/modules/mention/mention.cjs.js.map +1 -0
  225. package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
  226. package/lib/modules/syntax.cjs.js +4 -0
  227. package/lib/modules/syntax.cjs.js.map +1 -1
  228. package/lib/modules/table-up/index.cjs.js +4 -0
  229. package/lib/modules/table-up/index.cjs.js.map +1 -1
  230. package/lib/modules/toolbar/better-picker.cjs.js +5 -0
  231. package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
  232. package/lib/modules/toolbar/better-toolbar.cjs.js +138 -0
  233. package/lib/modules/toolbar/better-toolbar.cjs.js.map +1 -0
  234. package/lib/modules/toolbar/index.cjs.js +6 -136
  235. package/lib/modules/toolbar/index.cjs.js.map +1 -1
  236. package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js +40145 -0
  237. 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
  238. package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js +938 -0
  239. 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
  240. package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js +624 -0
  241. 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
  242. package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js +159 -0
  243. 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
  244. 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
  245. 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
  246. package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js +2847 -0
  247. package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js.map +1 -0
  248. package/lib/themes/snow.cjs.js +7 -11
  249. package/lib/themes/snow.cjs.js.map +1 -1
  250. package/lib/tools/fullscreen.cjs.js.map +1 -1
  251. package/lib/ui/icons.cjs.js +1 -0
  252. package/lib/ui/icons.cjs.js.map +1 -1
  253. package/lib/ui/icons.config.cjs.js +23 -0
  254. package/lib/ui/icons.config.cjs.js.map +1 -1
  255. package/lib/utils/is.cjs.js.map +1 -1
  256. package/package.json +8 -7
  257. package/style.css +92 -933
  258. package/types/config/editor.utils.d.ts +0 -1
  259. package/types/config/index.d.ts +1 -0
  260. package/types/config/types/editor-config.interface.d.ts +0 -7
  261. package/types/config/types/editor-modules.interface.d.ts +21 -12
  262. package/types/config/types/index.d.ts +0 -20
  263. package/types/config/types/type.d.ts +0 -4
  264. package/types/core/fluent-editor.d.ts +0 -1
  265. package/types/formats/emoji.d.ts +9 -0
  266. package/types/formats/index.d.ts +4 -0
  267. package/types/formats/soft-break.d.ts +6 -7
  268. package/types/formats/strike.d.ts +6 -4
  269. package/types/formats/video.d.ts +4 -6
  270. package/types/index.d.ts +6 -5
  271. package/types/modules/ai/index.d.ts +39 -0
  272. package/types/modules/counter.d.ts +8 -1
  273. package/types/modules/custom-clipboard.d.ts +3 -6
  274. package/types/modules/custom-image/Options.d.ts +34 -23
  275. package/types/modules/custom-image/actions/Action.d.ts +5 -3
  276. package/types/modules/custom-image/actions/custom-resize-action.d.ts +24 -0
  277. package/types/modules/custom-image/actions/delete-action.d.ts +7 -0
  278. package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +17 -0
  279. package/types/modules/custom-image/actions/index.d.ts +6 -0
  280. package/types/modules/custom-image/actions/toolbar-action.d.ts +12 -0
  281. package/types/modules/custom-image/actions/toolbar.d.ts +20 -0
  282. package/types/modules/custom-image/blot-formatter.d.ts +24 -0
  283. package/types/modules/custom-image/image-bar.d.ts +9 -7
  284. package/types/modules/custom-image/image.d.ts +15 -13
  285. package/types/modules/custom-image/index.d.ts +4 -0
  286. package/types/modules/custom-image/specs/blot-spec.d.ts +13 -0
  287. package/types/modules/custom-image/specs/custom-image-spec.d.ts +18 -0
  288. package/types/modules/custom-image/specs/image-spec.d.ts +9 -0
  289. package/types/modules/custom-image/specs/index.d.ts +3 -0
  290. package/types/modules/custom-uploader.d.ts +41 -0
  291. package/types/modules/divider.d.ts +6 -4
  292. package/types/modules/emoji/formats/emoji-blot.d.ts +9 -7
  293. package/types/modules/emoji/index.d.ts +3 -10
  294. package/types/modules/emoji/modules/emoji.d.ts +6 -6
  295. package/types/modules/emoji/modules/toolbar-emoji.d.ts +7 -6
  296. package/types/modules/emoji.d.ts +35 -0
  297. package/types/modules/file/formats/file.d.ts +2 -2
  298. package/types/modules/file/index.d.ts +3 -11
  299. package/types/modules/file/modules/file-bar.d.ts +1 -1
  300. package/types/modules/file/modules/file-module.d.ts +10 -0
  301. package/types/modules/i18n.d.ts +1 -2
  302. package/types/modules/index.d.ts +15 -0
  303. package/types/modules/link/formats/link.d.ts +5 -5
  304. package/types/modules/link/index.d.ts +2 -6
  305. package/types/modules/link/modules/tooltip.d.ts +5 -10
  306. package/types/modules/mathlive/formats.d.ts +2 -2
  307. package/types/modules/mathlive/index.d.ts +3 -9
  308. package/types/modules/mathlive/module.d.ts +10 -0
  309. package/types/modules/mathlive/tooltip.d.ts +1 -1
  310. package/types/modules/mention/Mention.d.ts +3 -4
  311. package/types/modules/mention/index.d.ts +2 -0
  312. package/types/modules/mention/mention-link.d.ts +17 -0
  313. package/types/modules/shortcut-key/index.d.ts +12 -8
  314. package/types/modules/table-up/index.d.ts +3 -3
  315. package/types/modules/toolbar/better-toolbar.d.ts +8 -0
  316. package/types/modules/toolbar/index.d.ts +2 -8
  317. package/types/tools/fullscreen.d.ts +5 -1
  318. package/types/ui/icons.config.d.ts +2 -0
  319. package/types/utils/is.d.ts +1 -1
  320. package/es/config/types/additional-toolbar-item.interface.es.js +0 -2
  321. package/es/config/types/additional-toolbar-item.interface.es.js.map +0 -1
  322. package/es/config/types/content-change.interface.es.js +0 -2
  323. package/es/config/types/content-change.interface.es.js.map +0 -1
  324. package/es/config/types/content-save.interface.es.js +0 -2
  325. package/es/config/types/content-save.interface.es.js.map +0 -1
  326. package/es/config/types/counter-option.interface.es.js +0 -2
  327. package/es/config/types/counter-option.interface.es.js.map +0 -1
  328. package/es/config/types/editor-toolbar.interface.es.js +0 -2
  329. package/es/config/types/editor-toolbar.interface.es.js.map +0 -1
  330. package/es/config/types/file-operation.interface.es.js +0 -2
  331. package/es/config/types/file-operation.interface.es.js.map +0 -1
  332. package/es/config/types/focus-change.interface.es.js +0 -2
  333. package/es/config/types/focus-change.interface.es.js.map +0 -1
  334. package/es/config/types/fullscreen-module.interface.es.js +0 -2
  335. package/es/config/types/fullscreen-module.interface.es.js.map +0 -1
  336. package/es/config/types/help-panel-item.interface.es.js +0 -2
  337. package/es/config/types/help-panel-item.interface.es.js.map +0 -1
  338. package/es/config/types/help-panel-option.interface.es.js +0 -2
  339. package/es/config/types/help-panel-option.interface.es.js.map +0 -1
  340. package/es/config/types/image-module.interface.es.js +0 -2
  341. package/es/config/types/image-module.interface.es.js.map +0 -1
  342. package/es/config/types/image-upload.interface.es.js +0 -2
  343. package/es/config/types/image-upload.interface.es.js.map +0 -1
  344. package/es/config/types/load-on-demand-module.interface.es.js +0 -2
  345. package/es/config/types/load-on-demand-module.interface.es.js.map +0 -1
  346. package/es/config/types/mention-module.interface.es.js +0 -2
  347. package/es/config/types/mention-module.interface.es.js.map +0 -1
  348. package/es/config/types/paste-change.interface.es.js +0 -2
  349. package/es/config/types/paste-change.interface.es.js.map +0 -1
  350. package/es/config/types/quick-menu-module.interface.es.js +0 -2
  351. package/es/config/types/quick-menu-module.interface.es.js.map +0 -1
  352. package/es/config/types/range.interface.es.js +0 -2
  353. package/es/config/types/range.interface.es.js.map +0 -1
  354. package/es/config/types/registry-options.interface.es.js +0 -2
  355. package/es/config/types/registry-options.interface.es.js.map +0 -1
  356. package/es/config/types/selection-change.interface.es.js +0 -2
  357. package/es/config/types/selection-change.interface.es.js.map +0 -1
  358. package/es/config/types/toolbar-item.interface.es.js +0 -2
  359. package/es/config/types/toolbar-item.interface.es.js.map +0 -1
  360. package/es/config/types/validate-error.interface.es.js +0 -2
  361. package/es/config/types/validate-error.interface.es.js.map +0 -1
  362. package/es/modules/custom-image/BlotFormatter.es.js.map +0 -1
  363. package/es/modules/custom-image/Options.es.js +0 -95
  364. package/es/modules/custom-image/Options.es.js.map +0 -1
  365. package/es/modules/custom-image/actions/Action.es.js +0 -15
  366. package/es/modules/custom-image/actions/Action.es.js.map +0 -1
  367. package/es/modules/custom-image/actions/DeleteAction.es.js.map +0 -1
  368. package/es/modules/custom-image/image-bar.es.js +0 -127
  369. package/es/modules/custom-image/image-bar.es.js.map +0 -1
  370. package/es/modules/custom-image/specs/BlotSpec.es.js +0 -27
  371. package/es/modules/custom-image/specs/BlotSpec.es.js.map +0 -1
  372. package/es/modules/custom-image/specs/CustomImageSpec.es.js.map +0 -1
  373. package/es/modules/custom-image/specs/ImageSpec.es.js +0 -29
  374. package/es/modules/custom-image/specs/ImageSpec.es.js.map +0 -1
  375. package/es/modules/emoji/emoji-list/index.es.js +0 -5
  376. package/es/modules/emoji/emoji-list/people.es.js +0 -114
  377. package/es/modules/emoji/emoji-list/people.es.js.map +0 -1
  378. package/es/modules/emoji/emoji-list.es.js +0 -9
  379. package/es/modules/emoji/emoji-list.es.js.map +0 -1
  380. package/es/modules/emoji/emoji-map.es.js +0 -9
  381. package/es/modules/emoji/emoji-map.es.js.map +0 -1
  382. package/es/modules/emoji/emoji-sprite.es.js +0 -5
  383. package/es/modules/emoji/emoji-sprite.es.js.map +0 -1
  384. package/es/modules/emoji/formats/emoji-blot.es.js +0 -41
  385. package/es/modules/emoji/formats/emoji-blot.es.js.map +0 -1
  386. package/es/modules/emoji/index.es.js +0 -8
  387. package/es/modules/emoji/index.es.js.map +0 -1
  388. package/es/modules/emoji/modules/emoji.es.js +0 -248
  389. package/es/modules/emoji/modules/emoji.es.js.map +0 -1
  390. package/es/modules/emoji/modules/toolbar-emoji.es.js +0 -153
  391. package/es/modules/emoji/modules/toolbar-emoji.es.js.map +0 -1
  392. package/es/modules/emoji/utils.es.js +0 -19
  393. package/es/modules/emoji/utils.es.js.map +0 -1
  394. package/es/modules/mention/Mention.es.js.map +0 -1
  395. package/es/modules/mention/MentionLink.es.js.map +0 -1
  396. package/lib/config/types/additional-toolbar-item.interface.cjs.js +0 -2
  397. package/lib/config/types/additional-toolbar-item.interface.cjs.js.map +0 -1
  398. package/lib/config/types/content-change.interface.cjs.js +0 -2
  399. package/lib/config/types/content-change.interface.cjs.js.map +0 -1
  400. package/lib/config/types/content-save.interface.cjs.js +0 -2
  401. package/lib/config/types/content-save.interface.cjs.js.map +0 -1
  402. package/lib/config/types/counter-option.interface.cjs.js +0 -2
  403. package/lib/config/types/counter-option.interface.cjs.js.map +0 -1
  404. package/lib/config/types/editor-toolbar.interface.cjs.js +0 -2
  405. package/lib/config/types/editor-toolbar.interface.cjs.js.map +0 -1
  406. package/lib/config/types/file-operation.interface.cjs.js +0 -2
  407. package/lib/config/types/file-operation.interface.cjs.js.map +0 -1
  408. package/lib/config/types/focus-change.interface.cjs.js +0 -2
  409. package/lib/config/types/focus-change.interface.cjs.js.map +0 -1
  410. package/lib/config/types/fullscreen-module.interface.cjs.js +0 -2
  411. package/lib/config/types/fullscreen-module.interface.cjs.js.map +0 -1
  412. package/lib/config/types/help-panel-item.interface.cjs.js +0 -2
  413. package/lib/config/types/help-panel-item.interface.cjs.js.map +0 -1
  414. package/lib/config/types/help-panel-option.interface.cjs.js +0 -2
  415. package/lib/config/types/help-panel-option.interface.cjs.js.map +0 -1
  416. package/lib/config/types/image-module.interface.cjs.js +0 -2
  417. package/lib/config/types/image-module.interface.cjs.js.map +0 -1
  418. package/lib/config/types/image-upload.interface.cjs.js +0 -2
  419. package/lib/config/types/image-upload.interface.cjs.js.map +0 -1
  420. package/lib/config/types/load-on-demand-module.interface.cjs.js +0 -2
  421. package/lib/config/types/load-on-demand-module.interface.cjs.js.map +0 -1
  422. package/lib/config/types/mention-module.interface.cjs.js +0 -2
  423. package/lib/config/types/mention-module.interface.cjs.js.map +0 -1
  424. package/lib/config/types/paste-change.interface.cjs.js +0 -2
  425. package/lib/config/types/paste-change.interface.cjs.js.map +0 -1
  426. package/lib/config/types/quick-menu-module.interface.cjs.js +0 -2
  427. package/lib/config/types/quick-menu-module.interface.cjs.js.map +0 -1
  428. package/lib/config/types/range.interface.cjs.js +0 -2
  429. package/lib/config/types/range.interface.cjs.js.map +0 -1
  430. package/lib/config/types/registry-options.interface.cjs.js +0 -2
  431. package/lib/config/types/registry-options.interface.cjs.js.map +0 -1
  432. package/lib/config/types/selection-change.interface.cjs.js +0 -2
  433. package/lib/config/types/selection-change.interface.cjs.js.map +0 -1
  434. package/lib/config/types/toolbar-item.interface.cjs.js +0 -2
  435. package/lib/config/types/toolbar-item.interface.cjs.js.map +0 -1
  436. package/lib/config/types/validate-error.interface.cjs.js +0 -2
  437. package/lib/config/types/validate-error.interface.cjs.js.map +0 -1
  438. package/lib/modules/custom-image/BlotFormatter.cjs.js.map +0 -1
  439. package/lib/modules/custom-image/Options.cjs.js +0 -95
  440. package/lib/modules/custom-image/Options.cjs.js.map +0 -1
  441. package/lib/modules/custom-image/actions/Action.cjs.js +0 -15
  442. package/lib/modules/custom-image/actions/Action.cjs.js.map +0 -1
  443. package/lib/modules/custom-image/actions/DeleteAction.cjs.js.map +0 -1
  444. package/lib/modules/custom-image/image-bar.cjs.js +0 -127
  445. package/lib/modules/custom-image/image-bar.cjs.js.map +0 -1
  446. package/lib/modules/custom-image/specs/BlotSpec.cjs.js +0 -27
  447. package/lib/modules/custom-image/specs/BlotSpec.cjs.js.map +0 -1
  448. package/lib/modules/custom-image/specs/CustomImageSpec.cjs.js.map +0 -1
  449. package/lib/modules/custom-image/specs/ImageSpec.cjs.js +0 -29
  450. package/lib/modules/custom-image/specs/ImageSpec.cjs.js.map +0 -1
  451. package/lib/modules/emoji/emoji-list/index.cjs.js +0 -5
  452. package/lib/modules/emoji/emoji-list/people.cjs.js +0 -114
  453. package/lib/modules/emoji/emoji-list/people.cjs.js.map +0 -1
  454. package/lib/modules/emoji/emoji-list.cjs.js +0 -9
  455. package/lib/modules/emoji/emoji-list.cjs.js.map +0 -1
  456. package/lib/modules/emoji/emoji-map.cjs.js +0 -9
  457. package/lib/modules/emoji/emoji-map.cjs.js.map +0 -1
  458. package/lib/modules/emoji/emoji-sprite.cjs.js +0 -5
  459. package/lib/modules/emoji/emoji-sprite.cjs.js.map +0 -1
  460. package/lib/modules/emoji/formats/emoji-blot.cjs.js +0 -41
  461. package/lib/modules/emoji/formats/emoji-blot.cjs.js.map +0 -1
  462. package/lib/modules/emoji/index.cjs.js +0 -8
  463. package/lib/modules/emoji/index.cjs.js.map +0 -1
  464. package/lib/modules/emoji/modules/emoji.cjs.js +0 -248
  465. package/lib/modules/emoji/modules/emoji.cjs.js.map +0 -1
  466. package/lib/modules/emoji/modules/toolbar-emoji.cjs.js +0 -153
  467. package/lib/modules/emoji/modules/toolbar-emoji.cjs.js.map +0 -1
  468. package/lib/modules/emoji/utils.cjs.js +0 -19
  469. package/lib/modules/emoji/utils.cjs.js.map +0 -1
  470. package/lib/modules/mention/Mention.cjs.js.map +0 -1
  471. package/lib/modules/mention/MentionLink.cjs.js.map +0 -1
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
8
8
 
9
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/opentiny/tiny-editor)
10
+
9
11
  TinyEditor is a rich text editor based on Quill 2.0, which extends Quill with rich modules and formats such as table, image, link, clipboard, emoji, file, mention, and quick menu. It is framework-independent, compatible with Quill API, and compatible with Quill module ecosystem.
10
12
 
11
13
  English | [简体中文](README.zh-CN.md)
@@ -66,30 +68,11 @@ Open your browser and visit: [http://localhost:5173/tiny-editor/](http://localho
66
68
 
67
69
  ## Contributors ✨
68
70
 
69
- Contributors are community members who have 1 or more PR merged in OpenTiny.
70
-
71
- Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
72
-
73
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
74
- <!-- prettier-ignore-start -->
75
- <!-- markdownlint-disable -->
76
- <table>
77
- <tbody>
78
- <tr>
79
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/zzxming"><img src="https://avatars.githubusercontent.com/u/74341337?v=4?s=100" width="100px;" alt="zzxming"/><br /><sub><b>zzxming</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=zzxming" title="Code">💻</a></td>
80
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Janson1012"><img src="https://avatars.githubusercontent.com/u/60996238?v=4?s=100" width="100px;" alt="Janson1012"/><br /><sub><b>Janson1012</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=Janson1012" title="Code">💻</a></td>
81
- <td align="center" valign="top" width="14.28%"><a href="https://kagol.github.io/blogs"><img src="https://avatars.githubusercontent.com/u/9566362?v=4?s=100" width="100px;" alt="Kagol"/><br /><sub><b>Kagol</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=kagol" title="Code">💻</a></td>
82
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kiss-keray"><img src="https://avatars.githubusercontent.com/u/24504763?v=4?s=100" width="100px;" alt="keray"/><br /><sub><b>keray</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=kiss-keray" title="Code">💻</a></td>
83
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/qwangry"><img src="https://avatars.githubusercontent.com/u/58112936?v=4?s=100" width="100px;" alt="qwangry"/><br /><sub><b>qwangry</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=qwangry" title="Code">💻</a></td>
84
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/jany55555"><img src="https://avatars.githubusercontent.com/u/173228510?v=4?s=100" width="100px;" alt="jany55555"/><br /><sub><b>jany55555</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=jany55555" title="Code">💻</a></td>
85
- </tr>
86
- </tbody>
87
- </table>
88
-
89
- <!-- markdownlint-restore -->
90
- <!-- prettier-ignore-end -->
91
-
92
- <!-- ALL-CONTRIBUTORS-LIST:END -->
71
+ Contributors are community members who have made contributions in OpenTiny.
72
+
73
+ <a href="https://www.openomy.com/github/opentiny/tiny-editor" target="_blank" style="display: block; width: 100%;" align="center">
74
+ <img src="https://www.openomy.com/svg?repo=opentiny/tiny-editor&chart=bubble&latestMonth=99" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
75
+ </a>
93
76
 
94
77
  ## Credits ❤️
95
78
 
@@ -121,7 +121,6 @@ function isInside(position, dom) {
121
121
  const inside = left > areaLeft && left < areaLeft + areaWidth && top > areaTop && top < areaTop + areaHeight;
122
122
  return inside;
123
123
  }
124
- const isPureIE = !!document.documentMode;
125
124
  export {
126
125
  getEventComposedPath,
127
126
  hadProtocol,
@@ -130,7 +129,6 @@ export {
130
129
  imageUrlToFile,
131
130
  isInside,
132
131
  isNullOrUndefined,
133
- isPureIE,
134
132
  omit,
135
133
  replaceDeltaImage,
136
134
  sanitize,
@@ -1 +1 @@
1
- {"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function hadProtocol(url: string) {\r\n if (!url || !/^(?:f|ht)tps?\\:\\/\\//.test(url)) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n\r\n// Internet Explorer 6-11\r\nexport const isPureIE = !!document.documentMode\r\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function hadProtocol(url: string) {\r\n if (!url || !/^(?:f|ht)tps?\\:\\/\\//.test(url)) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n"],"names":[],"mappings":"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"}
@@ -1,6 +1,7 @@
1
1
  import { isNullOrUndefined } from "./editor.utils.es.js";
2
- import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside, isPureIE, omit, replaceDeltaImage, sanitize, splitWithBreak } from "./editor.utils.es.js";
2
+ import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside, omit, replaceDeltaImage, sanitize, splitWithBreak } from "./editor.utils.es.js";
3
3
  import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, CHANGE_LANGUAGE_EVENT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES, defaultLanguage } from "./editor.config.es.js";
4
+ import "./types/index.es.js";
4
5
  function inputFile(type, accept) {
5
6
  if (accept.length <= 0) return;
6
7
  let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`);
@@ -55,7 +56,6 @@ export {
55
56
  inputFile,
56
57
  isInside,
57
58
  isNullOrUndefined,
58
- isPureIE,
59
59
  namespace,
60
60
  omit,
61
61
  replaceDeltaImage,
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import { isNullOrUndefined } from './editor.utils'\r\n\r\nexport * from './editor.config'\r\nexport * from './editor.utils'\r\n\r\n// 触发上传\r\nexport function inputFile(type: 'image' | 'video' | 'file', accept: string[]) {\r\n if (accept.length <= 0) return\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.style.display = 'none'\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', accept.map(mime => mime === '*' ? `${type}/*` : mime).join(','))\r\n fileInput.setAttribute('multiple', '')\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files)\r\n fileInput.value = ''\r\n })\r\n this.container.appendChild(fileInput)\r\n }\r\n fileInput.click()\r\n}\r\n\r\nexport function getListValue(value, preListValue) {\r\n let curListValue = value\r\n if (preListValue && preListValue === value) {\r\n curListValue = false\r\n }\r\n else if (value === 'check') {\r\n if (preListValue === 'checked' || preListValue === 'unchecked') {\r\n curListValue = false\r\n }\r\n else {\r\n curListValue = 'unchecked'\r\n }\r\n }\r\n return curListValue\r\n}\r\n/** css namespace */\r\nexport const namespace = 'fe'\r\n"],"names":[],"mappings":";;;AAMgB,SAAA,UAAU,MAAkC,QAAkB;AACxE,MAAA,OAAO,UAAU,EAAG;AACxB,MAAI,YAAY,KAAK,UAAU,cAAc,YAAY,IAAI,aAAa;AACtE,MAAA,kBAAkB,SAAS,GAAG;AACpB,gBAAA,SAAS,cAAc,OAAO;AAC1C,cAAU,MAAM,UAAU;AAC1B,cAAU,UAAU,IAAI,MAAM,IAAI,EAAE;AAC1B,cAAA,aAAa,QAAQ,MAAM;AACrC,cAAU,aAAa,UAAU,OAAO,IAAI,UAAQ,SAAS,MAAM,GAAG,IAAI,OAAO,IAAI,EAAE,KAAK,GAAG,CAAC;AACtF,cAAA,aAAa,YAAY,EAAE;AAC3B,cAAA,iBAAiB,UAAU,MAAM;AACzC,YAAM,QAAQ,KAAK,MAAM,aAAa,IAAI;AAC1C,WAAK,MAAM,SAAS,OAAO,OAAO,UAAU,KAAK;AACjD,gBAAU,QAAQ;AAAA,IAAA,CACnB;AACI,SAAA,UAAU,YAAY,SAAS;AAAA,EAAA;AAEtC,YAAU,MAAM;AAClB;AAEgB,SAAA,aAAa,OAAO,cAAc;AAChD,MAAI,eAAe;AACf,MAAA,gBAAgB,iBAAiB,OAAO;AAC3B,mBAAA;AAAA,EAAA,WAER,UAAU,SAAS;AACtB,QAAA,iBAAiB,aAAa,iBAAiB,aAAa;AAC/C,qBAAA;AAAA,IAAA,OAEZ;AACY,qBAAA;AAAA,IAAA;AAAA,EACjB;AAEK,SAAA;AACT;AAEO,MAAM,YAAY;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import { isNullOrUndefined } from './editor.utils'\r\n\r\nexport * from './editor.config'\r\nexport * from './editor.utils'\r\nexport * from './types'\r\n\r\n// 触发上传\r\nexport function inputFile(type: 'image' | 'video' | 'file', accept: string[]) {\r\n if (accept.length <= 0) return\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.style.display = 'none'\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', accept.map(mime => mime === '*' ? `${type}/*` : mime).join(','))\r\n fileInput.setAttribute('multiple', '')\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files)\r\n fileInput.value = ''\r\n })\r\n this.container.appendChild(fileInput)\r\n }\r\n fileInput.click()\r\n}\r\n\r\nexport function getListValue(value, preListValue) {\r\n let curListValue = value\r\n if (preListValue && preListValue === value) {\r\n curListValue = false\r\n }\r\n else if (value === 'check') {\r\n if (preListValue === 'checked' || preListValue === 'unchecked') {\r\n curListValue = false\r\n }\r\n else {\r\n curListValue = 'unchecked'\r\n }\r\n }\r\n return curListValue\r\n}\r\n/** css namespace */\r\nexport const namespace = 'fe'\r\n"],"names":[],"mappings":";;;;AAOgB,SAAA,UAAU,MAAkC,QAAkB;AACxE,MAAA,OAAO,UAAU,EAAG;AACxB,MAAI,YAAY,KAAK,UAAU,cAAc,YAAY,IAAI,aAAa;AACtE,MAAA,kBAAkB,SAAS,GAAG;AACpB,gBAAA,SAAS,cAAc,OAAO;AAC1C,cAAU,MAAM,UAAU;AAC1B,cAAU,UAAU,IAAI,MAAM,IAAI,EAAE;AAC1B,cAAA,aAAa,QAAQ,MAAM;AACrC,cAAU,aAAa,UAAU,OAAO,IAAI,UAAQ,SAAS,MAAM,GAAG,IAAI,OAAO,IAAI,EAAE,KAAK,GAAG,CAAC;AACtF,cAAA,aAAa,YAAY,EAAE;AAC3B,cAAA,iBAAiB,UAAU,MAAM;AACzC,YAAM,QAAQ,KAAK,MAAM,aAAa,IAAI;AAC1C,WAAK,MAAM,SAAS,OAAO,OAAO,UAAU,KAAK;AACjD,gBAAU,QAAQ;AAAA,IAAA,CACnB;AACI,SAAA,UAAU,YAAY,SAAS;AAAA,EAAA;AAEtC,YAAU,MAAM;AAClB;AAEgB,SAAA,aAAa,OAAO,cAAc;AAChD,MAAI,eAAe;AACf,MAAA,gBAAgB,iBAAiB,OAAO;AAC3B,mBAAA;AAAA,EAAA,WAER,UAAU,SAAS;AACtB,QAAA,iBAAiB,aAAa,iBAAiB,aAAa;AAC/C,qBAAA;AAAA,IAAA,OAEZ;AACY,qBAAA;AAAA,IAAA;AAAA,EACjB;AAEK,SAAA;AACT;AAEO,MAAM,YAAY;"}
@@ -1,24 +1,4 @@
1
- import "./additional-toolbar-item.interface.es.js";
2
- import "./content-change.interface.es.js";
3
- import "./content-save.interface.es.js";
4
- import "./counter-option.interface.es.js";
5
1
  import "./editor-config.interface.es.js";
6
2
  import "./editor-modules.interface.es.js";
7
- import "./editor-toolbar.interface.es.js";
8
- import "./file-operation.interface.es.js";
9
- import "./focus-change.interface.es.js";
10
- import "./fullscreen-module.interface.es.js";
11
- import "./help-panel-option.interface.es.js";
12
- import "./image-module.interface.es.js";
13
- import "./image-upload.interface.es.js";
14
- import "./load-on-demand-module.interface.es.js";
15
- import "./mention-module.interface.es.js";
16
- import "./paste-change.interface.es.js";
17
- import "./quick-menu-module.interface.es.js";
18
- import "./range.interface.es.js";
19
- import "./registry-options.interface.es.js";
20
- import "./selection-change.interface.es.js";
21
- import "./toolbar-item.interface.es.js";
22
3
  import "./type.es.js";
23
- import "./validate-error.interface.es.js";
24
4
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import Quill from "quill";
2
5
  import "../config/index.es.js";
3
6
  import { I18N } from "../modules/i18n.es.js";
@@ -5,7 +8,7 @@ import { defaultLanguage } from "../config/editor.config.es.js";
5
8
  class FluentEditor extends Quill {
6
9
  constructor(container, options = {}) {
7
10
  super(container, options);
8
- this.isFullscreen = false;
11
+ __publicField(this, "isFullscreen", false);
9
12
  }
10
13
  static register(...args) {
11
14
  super.register(...args);
@@ -1 +1 @@
1
- {"version":3,"file":"fluent-editor.es.js","sources":["../../../src/core/fluent-editor.ts"],"sourcesContent":["import type { ExpandedQuillOptions } from 'quill'\r\nimport type { IEditorConfig } from '../config/types'\r\nimport type { FileUploader } from '../modules/custom-uploader'\r\nimport Quill from 'quill'\r\nimport { defaultLanguage } from '../config'\r\nimport I18N from '../modules/i18n'\r\n\r\nclass FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n options: IEditorConfig & ExpandedQuillOptions\r\n uploader: FileUploader\r\n\r\n static register(...args: any[]): void {\r\n super.register(...args as Parameters<typeof Quill.register>)\r\n }\r\n\r\n get lang() {\r\n const i18nModule = this.getModule('i18n') as I18N\r\n return i18nModule ? i18nModule.options.lang : defaultLanguage\r\n }\r\n\r\n constructor(container: HTMLElement | string, options: IEditorConfig = {}) {\r\n super(container, options)\r\n }\r\n\r\n getLangText(name: string) {\r\n return I18N.parserText(name, this.lang)\r\n }\r\n}\r\n\r\nexport type {\r\n Module,\r\n Parchment as TypeParchment,\r\n} from 'quill'\r\n\r\nexport default FluentEditor\r\n"],"names":[],"mappings":";;;;AAOA,MAAM,qBAAqB,MAAM;AAAA,EAc/B,YAAY,WAAiC,UAAyB,IAAI;AACxE,UAAM,WAAW,OAAO;AAdF,SAAA,eAAA;AAAA,EAAA;AAAA,EAIxB,OAAO,YAAY,MAAmB;AAC9B,UAAA,SAAS,GAAG,IAAyC;AAAA,EAAA;AAAA,EAG7D,IAAI,OAAO;AACH,UAAA,aAAa,KAAK,UAAU,MAAM;AACjC,WAAA,aAAa,WAAW,QAAQ,OAAO;AAAA,EAAA;AAAA,EAOhD,YAAY,MAAc;AACxB,WAAO,KAAK,WAAW,MAAM,KAAK,IAAI;AAAA,EAAA;AAE1C;"}
1
+ {"version":3,"file":"fluent-editor.es.js","sources":["../../../src/core/fluent-editor.ts"],"sourcesContent":["import type { ExpandedQuillOptions } from 'quill'\r\nimport type { IEditorConfig } from '../config/types'\r\nimport type { FileUploader } from '../modules/custom-uploader'\r\nimport Quill from 'quill'\r\nimport { defaultLanguage } from '../config'\r\nimport I18N from '../modules/i18n'\r\n\r\nclass FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n declare options: IEditorConfig & ExpandedQuillOptions\r\n declare uploader: FileUploader\r\n\r\n static register(...args: any[]): void {\r\n super.register(...args as Parameters<typeof Quill.register>)\r\n }\r\n\r\n get lang() {\r\n const i18nModule = this.getModule('i18n') as I18N\r\n return i18nModule ? i18nModule.options.lang : defaultLanguage\r\n }\r\n\r\n constructor(container: HTMLElement | string, options: IEditorConfig = {}) {\r\n super(container, options)\r\n }\r\n\r\n getLangText(name: string) {\r\n return I18N.parserText(name, this.lang)\r\n }\r\n}\r\n\r\nexport default FluentEditor\r\n"],"names":[],"mappings":";;;;;;;AAOA,MAAM,qBAAqB,MAAM;AAAA,EAc/B,YAAY,WAAiC,UAAyB,IAAI;AACxE,UAAM,WAAW,OAAO;AAd1B,wCAAwB;AAAA,EAcE;AAAA,EAV1B,OAAO,YAAY,MAAmB;AAC9B,UAAA,SAAS,GAAG,IAAyC;AAAA,EAAA;AAAA,EAG7D,IAAI,OAAO;AACH,UAAA,aAAa,KAAK,UAAU,MAAM;AACjC,WAAA,aAAa,WAAW,QAAQ,OAAO;AAAA,EAAA;AAAA,EAOhD,YAAY,MAAc;AACxB,WAAO,KAAK,WAAW,MAAM,KAAK,IAAI;AAAA,EAAA;AAE1C;"}
@@ -2,31 +2,39 @@ import "./attributors/index.es.js";
2
2
  import { EN_US } from "./config/i18n/en-us.es.js";
3
3
  import { ZH_CN } from "./config/i18n/zh-cn.es.js";
4
4
  import FluentEditor from "./core/fluent-editor.es.js";
5
- import SoftBreak from "./formats/soft-break.es.js";
6
- import StrikeBlot from "./formats/strike.es.js";
7
- import Video from "./formats/video.es.js";
5
+ import "./formats/index.es.js";
6
+ import { AI } from "./modules/ai/index.es.js";
8
7
  import Counter from "./modules/counter.es.js";
9
- import CustomClipboard from "./modules/custom-clipboard.es.js";
10
- import BlotFormatter from "./modules/custom-image/BlotFormatter.es.js";
8
+ import { CustomClipboard } from "./modules/custom-clipboard.es.js";
9
+ import "./modules/custom-image/index.es.js";
11
10
  import { FileUploader } from "./modules/custom-uploader.es.js";
12
- import DividerBlot from "./modules/divider.es.js";
13
- import Emoji from "./modules/emoji/index.es.js";
14
- import FileModule from "./modules/file/index.es.js";
11
+ import { DividerBlot } from "./modules/divider.es.js";
12
+ import { EmojiModule } from "./modules/emoji.es.js";
13
+ import "./modules/file/index.es.js";
15
14
  import { I18N } from "./modules/i18n.es.js";
16
- import Link from "./modules/link/index.es.js";
17
- import MathliveModule from "./modules/mathlive/index.es.js";
18
- import MathliveBlot from "./modules/mathlive/formats.es.js";
19
- import Mention from "./modules/mention/Mention.es.js";
15
+ import "./modules/link/index.es.js";
16
+ import "./modules/mathlive/index.es.js";
17
+ import "./modules/mention/index.es.js";
20
18
  import { ShortCutKey } from "./modules/shortcut-key/index.es.js";
21
19
  import CustomSyntax from "./modules/syntax.es.js";
22
- import BetterToolbar from "./modules/toolbar/index.es.js";
20
+ import "./modules/toolbar/index.es.js";
23
21
  import { Picker, ColorPicker } from "./modules/toolbar/better-picker.es.js";
24
22
  import SnowTheme from "./themes/snow.es.js";
25
23
  import Icons from "./ui/icons.es.js";
26
24
  import { FontStyle } from "./attributors/font-style.es.js";
27
25
  import { SizeStyle } from "./attributors/font-size.es.js";
28
26
  import { LineHeightStyle } from "./attributors/line-height.es.js";
27
+ import { EmojiBlot } from "./formats/emoji.es.js";
28
+ import { SoftBreak } from "./formats/soft-break.es.js";
29
+ import { StrikeBlot } from "./formats/strike.es.js";
29
30
  import { TextIndentStyle } from "./attributors/text-indent.es.js";
31
+ import { Video } from "./formats/video.es.js";
32
+ import { LinkBlot } from "./modules/link/formats/link.es.js";
33
+ import { FileModule } from "./modules/file/modules/file-module.es.js";
34
+ import { BlotFormatter } from "./modules/custom-image/blot-formatter.es.js";
35
+ import { MathliveModule } from "./modules/mathlive/module.es.js";
36
+ import { Mention } from "./modules/mention/mention.es.js";
37
+ import { BetterToolbar } from "./modules/toolbar/better-toolbar.es.js";
30
38
  I18N.register(
31
39
  {
32
40
  "en-US": EN_US,
@@ -42,22 +50,21 @@ FluentEditor.register(
42
50
  "formats/font": FontStyle,
43
51
  "formats/line-height": LineHeightStyle,
44
52
  "formats/size": SizeStyle,
45
- "formats/emoji": Emoji.EmojiBlot,
46
- [`formats/${MathliveBlot.blotName}`]: MathliveBlot,
53
+ "formats/emoji": EmojiBlot,
47
54
  "formats/softBreak": SoftBreak,
48
55
  "formats/strike": StrikeBlot,
49
56
  "formats/text-indent": TextIndentStyle,
50
57
  "formats/video": Video,
58
+ "formats/divider": DividerBlot,
59
+ "formats/link": LinkBlot,
51
60
  "modules/clipboard": CustomClipboard,
52
61
  "modules/counter": Counter,
53
- "modules/divider": DividerBlot,
54
- "modules/emoji-shortname": Emoji.ShortNameEmoji,
55
- "modules/emoji-toolbar": Emoji.ToolbarEmoji,
62
+ "modules/emoji": EmojiModule,
56
63
  "modules/file": FileModule,
57
64
  "modules/i18n": I18N,
58
65
  "modules/image": BlotFormatter,
59
- "modules/link": Link,
60
66
  "modules/mathlive": MathliveModule,
67
+ "modules/ai": AI,
61
68
  "modules/mention": Mention,
62
69
  "modules/syntax": CustomSyntax,
63
70
  "modules/toolbar": BetterToolbar,
@@ -1 +1 @@
1
- {"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { EN_US } from './config/i18n/en-us'\r\nimport { ZH_CN } from './config/i18n/zh-cn'\r\nimport FluentEditor from './core/fluent-editor'\r\nimport SoftBreak from './formats/soft-break' // 软回车\r\nimport Strike from './formats/strike' // 删除线\r\nimport Video from './formats/video' // 视频\r\nimport Counter from './modules/counter' // 字符统计\r\nimport CustomClipboard from './modules/custom-clipboard' // 粘贴板\r\nimport Image from './modules/custom-image/BlotFormatter' // 图片\r\nimport { FileUploader } from './modules/custom-uploader' // 上传\r\nimport DividerBlot from './modules/divider' // 分割线\r\nimport Emoji from './modules/emoji' // 表情\r\nimport FileModule from './modules/file' // 文件\r\nimport I18N from './modules/i18n'\r\nimport Link from './modules/link' // 超链接\r\nimport MathliveModule from './modules/mathlive' // latex公式\r\nimport MathliveBlot from './modules/mathlive/formats'\r\nimport Mention from './modules/mention/Mention' // @提醒\r\nimport { ShortCutKey } from './modules/shortcut-key'\r\nimport Syntax from './modules/syntax' // 代码块高亮\r\nimport Toolbar from './modules/toolbar' // 工具栏\r\nimport { ColorPicker, Picker } from './modules/toolbar/better-picker'\r\nimport SnowTheme from './themes/snow'\r\nimport Icons from './ui/icons'\r\n\r\nI18N.register(\r\n {\r\n 'en-US': EN_US,\r\n 'zh-CN': ZH_CN,\r\n },\r\n true,\r\n)\r\nFluentEditor.register(\r\n {\r\n 'attributors/style/font': FontStyle,\r\n 'attributors/style/size': SizeStyle,\r\n 'attributors/style/line-height': LineHeightStyle,\r\n\r\n 'formats/font': FontStyle,\r\n 'formats/line-height': LineHeightStyle,\r\n 'formats/size': SizeStyle,\r\n 'formats/emoji': Emoji.EmojiBlot,\r\n [`formats/${MathliveBlot.blotName}`]: MathliveBlot,\r\n 'formats/softBreak': SoftBreak,\r\n 'formats/strike': Strike,\r\n 'formats/text-indent': TextIndentStyle,\r\n 'formats/video': Video,\r\n\r\n 'modules/clipboard': CustomClipboard,\r\n 'modules/counter': Counter,\r\n 'modules/divider': DividerBlot,\r\n 'modules/emoji-shortname': Emoji.ShortNameEmoji,\r\n 'modules/emoji-toolbar': Emoji.ToolbarEmoji,\r\n 'modules/file': FileModule,\r\n 'modules/i18n': I18N,\r\n 'modules/image': Image,\r\n 'modules/link': Link,\r\n 'modules/mathlive': MathliveModule,\r\n 'modules/mention': Mention,\r\n 'modules/syntax': Syntax,\r\n 'modules/toolbar': Toolbar,\r\n 'modules/uploader': FileUploader,\r\n 'modules/shortcut-key': ShortCutKey,\r\n\r\n 'themes/snow': SnowTheme,\r\n\r\n 'ui/icons': Icons,\r\n 'ui/picker': Picker,\r\n 'ui/color-picker': ColorPicker,\r\n },\r\n true, // 覆盖内部模块\r\n)\r\n\r\nexport default FluentEditor\r\n"],"names":["Strike","Image","Syntax","Toolbar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,KAAK;AAAA,EACH;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AACF;AACA,aAAa;AAAA,EACX;AAAA,IACE,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,iCAAiC;AAAA,IAEjC,gBAAgB;AAAA,IAChB,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,iBAAiB,MAAM;AAAA,IACvB,CAAC,WAAW,aAAa,QAAQ,EAAE,GAAG;AAAA,IACtC,qBAAqB;AAAA,IACrB,kBAAkBA;AAAAA,IAClB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,IAEjB,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,2BAA2B,MAAM;AAAA,IACjC,yBAAyB,MAAM;AAAA,IAC/B,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,iBAAiBC;AAAAA,IACjB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,mBAAmB;AAAA,IACnB,kBAAkBC;AAAAA,IAClB,mBAAmBC;AAAAA,IACnB,oBAAoB;AAAA,IACpB,wBAAwB;AAAA,IAExB,eAAe;AAAA,IAEf,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB;AAAA,EACA;AAAA;AACF;"}
1
+ {"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { EN_US } from './config/i18n/en-us'\r\nimport { ZH_CN } from './config/i18n/zh-cn'\r\nimport FluentEditor from './core/fluent-editor'\r\nimport { EmojiBlot, SoftBreak, StrikeBlot, Video } from './formats'\r\nimport { AI } from './modules/ai' // AI\r\nimport Counter from './modules/counter' // 字符统计\r\nimport { CustomClipboard } from './modules/custom-clipboard' // 粘贴板\r\nimport { BlotFormatter } from './modules/custom-image' // 图片\r\nimport { FileUploader } from './modules/custom-uploader' // 上传\r\nimport { DividerBlot } from './modules/divider' // 分割线\r\nimport { EmojiModule } from './modules/emoji'\r\nimport { FileModule } from './modules/file' // 文件\r\nimport I18N from './modules/i18n'\r\nimport { LinkBlot } from './modules/link' // 超链接\r\nimport { MathliveModule } from './modules/mathlive' // latex公式\r\nimport { Mention } from './modules/mention' // @提醒\r\nimport { ShortCutKey } from './modules/shortcut-key'\r\nimport Syntax from './modules/syntax' // 代码块高亮\r\nimport { BetterToolbar } from './modules/toolbar' // 工具栏\r\nimport { ColorPicker, Picker } from './modules/toolbar/better-picker'\r\nimport SnowTheme from './themes/snow'\r\nimport Icons from './ui/icons'\r\n\r\nI18N.register(\r\n {\r\n 'en-US': EN_US,\r\n 'zh-CN': ZH_CN,\r\n },\r\n true,\r\n)\r\nFluentEditor.register(\r\n {\r\n 'attributors/style/font': FontStyle,\r\n 'attributors/style/size': SizeStyle,\r\n 'attributors/style/line-height': LineHeightStyle,\r\n\r\n 'formats/font': FontStyle,\r\n 'formats/line-height': LineHeightStyle,\r\n 'formats/size': SizeStyle,\r\n 'formats/emoji': EmojiBlot,\r\n 'formats/softBreak': SoftBreak,\r\n 'formats/strike': StrikeBlot,\r\n 'formats/text-indent': TextIndentStyle,\r\n 'formats/video': Video,\r\n 'formats/divider': DividerBlot,\r\n 'formats/link': LinkBlot,\r\n\r\n 'modules/clipboard': CustomClipboard,\r\n 'modules/counter': Counter,\r\n 'modules/emoji': EmojiModule,\r\n 'modules/file': FileModule,\r\n 'modules/i18n': I18N,\r\n 'modules/image': BlotFormatter,\r\n 'modules/mathlive': MathliveModule,\r\n 'modules/ai': AI,\r\n 'modules/mention': Mention,\r\n 'modules/syntax': Syntax,\r\n 'modules/toolbar': BetterToolbar,\r\n 'modules/uploader': FileUploader,\r\n 'modules/shortcut-key': ShortCutKey,\r\n\r\n 'themes/snow': SnowTheme,\r\n\r\n 'ui/icons': Icons,\r\n 'ui/picker': Picker,\r\n 'ui/color-picker': ColorPicker,\r\n },\r\n true, // 覆盖内部模块\r\n)\r\n\r\nexport default FluentEditor\r\n"],"names":["Syntax"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,KAAK;AAAA,EACH;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AACF;AACA,aAAa;AAAA,EACX;AAAA,IACE,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,iCAAiC;AAAA,IAEjC,gBAAgB;AAAA,IAChB,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAEhB,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,kBAAkBA;AAAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,wBAAwB;AAAA,IAExB,eAAe;AAAA,IAEf,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB;AAAA,EACA;AAAA;AACF;"}
@@ -0,0 +1,14 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import Quill from "quill";
5
+ const Inline = Quill.import("blots/inline");
6
+ class EmojiBlot extends Inline {
7
+ }
8
+ __publicField(EmojiBlot, "blotName", "emoji");
9
+ __publicField(EmojiBlot, "tagName", "span");
10
+ __publicField(EmojiBlot, "className", "ql-emoji-format");
11
+ export {
12
+ EmojiBlot
13
+ };
14
+ //# sourceMappingURL=emoji.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emoji.es.js","sources":["../../../src/formats/emoji.ts"],"sourcesContent":["import type TypeInline from 'quill/blots/inline'\r\nimport Quill from 'quill'\r\n\r\nconst Inline = Quill.import('blots/inline') as typeof TypeInline\r\n\r\nexport class EmojiBlot extends Inline {\r\n static blotName = 'emoji'\r\n static tagName = 'span'\r\n static className = 'ql-emoji-format'\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,SAAS,MAAM,OAAO,cAAc;AAEnC,MAAM,kBAAkB,OAAO;AAItC;AAHE,cADW,WACJ,YAAW;AAClB,cAFW,WAEJ,WAAU;AACjB,cAHW,WAGJ,aAAY;"}
@@ -0,0 +1,11 @@
1
+ import { EmojiBlot } from "./emoji.es.js";
2
+ import { SoftBreak } from "./soft-break.es.js";
3
+ import { StrikeBlot } from "./strike.es.js";
4
+ import { Video } from "./video.es.js";
5
+ export {
6
+ EmojiBlot,
7
+ SoftBreak,
8
+ StrikeBlot,
9
+ Video
10
+ };
11
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,6 +1,13 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import Quill from "quill";
2
- const Embed = Quill.imports["blots/embed"];
5
+ const Embed = Quill.import("blots/embed");
3
6
  class SoftBreak extends Embed {
7
+ constructor() {
8
+ super(...arguments);
9
+ __publicField(this, "remove");
10
+ }
4
11
  static create() {
5
12
  const node = super.create();
6
13
  return node;
@@ -14,10 +21,10 @@ class SoftBreak extends Embed {
14
21
  return 1;
15
22
  }
16
23
  }
17
- SoftBreak.blotName = "soft-break";
18
- SoftBreak.tagName = "BR";
19
- SoftBreak.className = "ql-soft-break";
24
+ __publicField(SoftBreak, "blotName", "soft-break");
25
+ __publicField(SoftBreak, "tagName", "BR");
26
+ __publicField(SoftBreak, "className", "ql-soft-break");
20
27
  export {
21
- SoftBreak as default
28
+ SoftBreak
22
29
  };
23
30
  //# sourceMappingURL=soft-break.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"soft-break.es.js","sources":["../../../src/formats/soft-break.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Embed = Quill.imports['blots/embed']\r\n\r\nclass SoftBreak extends Embed {\r\n static blotName: string\r\n static tagName: string\r\n static className: string\r\n domNode: any\r\n prev: any\r\n next: any\r\n remove: () => void\r\n\r\n static create() {\r\n const node = super.create()\r\n return node\r\n }\r\n\r\n optimize() {\r\n // li的开头结尾,移除软回车\r\n if (this.prev === null) {\r\n this.remove()\r\n }\r\n }\r\n\r\n length() {\r\n return 1\r\n }\r\n}\r\nSoftBreak.blotName = 'soft-break'\r\nSoftBreak.tagName = 'BR'\r\nSoftBreak.className = 'ql-soft-break'\r\n\r\nexport default SoftBreak\r\n"],"names":[],"mappings":";AAEA,MAAM,QAAQ,MAAM,QAAQ,aAAa;AAEzC,MAAM,kBAAkB,MAAM;AAAA,EAS5B,OAAO,SAAS;AACR,UAAA,OAAO,MAAM,OAAO;AACnB,WAAA;AAAA,EAAA;AAAA,EAGT,WAAW;AAEL,QAAA,KAAK,SAAS,MAAM;AACtB,WAAK,OAAO;AAAA,IAAA;AAAA,EACd;AAAA,EAGF,SAAS;AACA,WAAA;AAAA,EAAA;AAEX;AACA,UAAU,WAAW;AACrB,UAAU,UAAU;AACpB,UAAU,YAAY;"}
1
+ {"version":3,"file":"soft-break.es.js","sources":["../../../src/formats/soft-break.ts"],"sourcesContent":["import type TypeEmbed from 'quill/blots/embed'\r\nimport Quill from 'quill'\r\n\r\nconst Embed = Quill.import('blots/embed') as typeof TypeEmbed\r\n\r\nexport class SoftBreak extends Embed {\r\n static blotName = 'soft-break'\r\n static tagName = 'BR'\r\n static className = 'ql-soft-break'\r\n remove: () => void\r\n\r\n static create() {\r\n const node = super.create()\r\n return node\r\n }\r\n\r\n optimize() {\r\n // li的开头结尾,移除软回车\r\n if (this.prev === null) {\r\n this.remove()\r\n }\r\n }\r\n\r\n length() {\r\n return 1\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,QAAQ,MAAM,OAAO,aAAa;AAEjC,MAAM,kBAAkB,MAAM;AAAA,EAA9B;AAAA;AAIL;AAAA;AAAA,EAEA,OAAO,SAAS;AACR,UAAA,OAAO,MAAM,OAAO;AACnB,WAAA;AAAA,EAAA;AAAA,EAGT,WAAW;AAEL,QAAA,KAAK,SAAS,MAAM;AACtB,WAAK,OAAO;AAAA,IAAA;AAAA,EACd;AAAA,EAGF,SAAS;AACA,WAAA;AAAA,EAAA;AAEX;AApBE,cADW,WACJ,YAAW;AAClB,cAFW,WAEJ,WAAU;AACjB,cAHW,WAGJ,aAAY;"}
@@ -1,12 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import Quill from "quill";
2
- const Inline = Quill.imports["blots/inline"];
5
+ const Inline = Quill.import("blots/inline");
3
6
  class StrikeBlot extends Inline {
4
7
  // 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法
5
8
  }
6
- StrikeBlot.blotName = "strike";
7
- StrikeBlot.tagName = "u";
8
- StrikeBlot.className = "ql-custom-strike";
9
+ __publicField(StrikeBlot, "blotName", "strike");
10
+ __publicField(StrikeBlot, "tagName", "u");
11
+ __publicField(StrikeBlot, "className", "ql-custom-strike");
9
12
  export {
10
- StrikeBlot as default
13
+ StrikeBlot
11
14
  };
12
15
  //# sourceMappingURL=strike.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"strike.es.js","sources":["../../../src/formats/strike.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Inline = Quill.imports['blots/inline']\r\n\r\n// @dynamic\r\nclass StrikeBlot extends Inline {\r\n static blotName: string\r\n static className: string\r\n static tagName: string\r\n // 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法\r\n}\r\nStrikeBlot.blotName = 'strike'\r\nStrikeBlot.tagName = 'u'\r\nStrikeBlot.className = 'ql-custom-strike'\r\n\r\nexport default StrikeBlot\r\n"],"names":[],"mappings":";AAEA,MAAM,SAAS,MAAM,QAAQ,cAAc;AAG3C,MAAM,mBAAmB,OAAO;AAAA;AAKhC;AACA,WAAW,WAAW;AACtB,WAAW,UAAU;AACrB,WAAW,YAAY;"}
1
+ {"version":3,"file":"strike.es.js","sources":["../../../src/formats/strike.ts"],"sourcesContent":["import type TypeInline from 'quill/blots/inline'\r\nimport Quill from 'quill'\r\n\r\nconst Inline = Quill.import('blots/inline') as typeof TypeInline\r\n\r\nexport class StrikeBlot extends Inline {\r\n static blotName = 'strike'\r\n static tagName = 'u'\r\n static className = 'ql-custom-strike'\r\n // 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,SAAS,MAAM,OAAO,cAAc;AAEnC,MAAM,mBAAmB,OAAO;AAAA;AAKvC;AAJE,cADW,YACJ,YAAW;AAClB,cAFW,YAEJ,WAAU;AACjB,cAHW,YAGJ,aAAY;"}
@@ -1,8 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import Quill from "quill";
2
5
  import { sanitize } from "../config/editor.utils.es.js";
3
- const BlockEmbed = Quill.imports["blots/block/embed"];
6
+ const BlockEmbed = Quill.import("blots/block/embed");
4
7
  const VIDEO_ATTRIBUTES = ["id", "title", "src"];
5
- class Video extends BlockEmbed {
8
+ const _Video = class _Video extends BlockEmbed {
6
9
  static sanitize(url) {
7
10
  return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
8
11
  }
@@ -14,7 +17,7 @@ class Video extends BlockEmbed {
14
17
  if (value[key]) {
15
18
  switch (key) {
16
19
  case "src": {
17
- const src = Video.sanitize(value[key]);
20
+ const src = _Video.sanitize(value[key]);
18
21
  node.setAttribute(key, src);
19
22
  break;
20
23
  }
@@ -40,13 +43,14 @@ class Video extends BlockEmbed {
40
43
  });
41
44
  return formats;
42
45
  }
43
- }
44
- Video.blotName = "video";
45
- Video.tagName = "VIDEO";
46
- Video.SANITIZED_URL = "about:blank";
47
- Video.PROTOCOL_WHITELIST = ["http", "https", "blob"];
48
- Video.className = "ql-video";
46
+ };
47
+ __publicField(_Video, "blotName", "video");
48
+ __publicField(_Video, "tagName", "VIDEO");
49
+ __publicField(_Video, "SANITIZED_URL", "about:blank");
50
+ __publicField(_Video, "PROTOCOL_WHITELIST", ["http", "https", "blob"]);
51
+ __publicField(_Video, "className", "ql-video");
52
+ let Video = _Video;
49
53
  export {
50
- Video as default
54
+ Video
51
55
  };
52
56
  //# sourceMappingURL=video.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"video.es.js","sources":["../../../src/formats/video.ts"],"sourcesContent":["import type { Parchment as TypeParchment } from 'quill'\r\nimport Quill from 'quill'\r\nimport { sanitize } from '../config/editor.utils'\r\n\r\nconst BlockEmbed = Quill.imports['blots/block/embed'] as TypeParchment.BlotConstructor\r\nconst VIDEO_ATTRIBUTES = ['id', 'title', 'src']\r\n\r\nclass Video extends BlockEmbed {\r\n static blotName: string\r\n static tagName: string\r\n static SANITIZED_URL: string\r\n static PROTOCOL_WHITELIST: string[]\r\n static className: string\r\n statics: any\r\n domNode: any\r\n\r\n static sanitize(url) {\r\n return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL\r\n }\r\n\r\n static create(value) {\r\n const node = super.create(value) as HTMLElement\r\n node.setAttribute('contenteditable', 'false')\r\n node.setAttribute('controls', 'controls')\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n if (value[key]) {\r\n switch (key) {\r\n case 'src':{ const src = Video.sanitize(value[key])\r\n node.setAttribute(key, src)\r\n break\r\n }\r\n case 'title': {\r\n node.setAttribute(key, value[key])\r\n break\r\n }\r\n default: {\r\n node.dataset[key] = value[key]\r\n }\r\n }\r\n }\r\n })\r\n return node\r\n }\r\n\r\n static value(domNode) {\r\n const formats: any = {}\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n const value = domNode.getAttribute(key) || domNode.dataset[key]\r\n if (value) {\r\n formats[key] = value\r\n }\r\n })\r\n return formats\r\n }\r\n}\r\nVideo.blotName = 'video'\r\nVideo.tagName = 'VIDEO'\r\nVideo.SANITIZED_URL = 'about:blank'\r\nVideo.PROTOCOL_WHITELIST = ['http', 'https', 'blob']\r\nVideo.className = 'ql-video'\r\n\r\nexport default Video\r\n"],"names":[],"mappings":";;AAIA,MAAM,aAAa,MAAM,QAAQ,mBAAmB;AACpD,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK;AAE9C,MAAM,cAAc,WAAW;AAAA,EAS7B,OAAO,SAAS,KAAK;AACnB,WAAO,SAAS,KAAK,KAAK,kBAAkB,IAAI,MAAM,KAAK;AAAA,EAAA;AAAA,EAG7D,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,mBAAmB,OAAO;AACvC,SAAA,aAAa,YAAY,UAAU;AACvB,qBAAA,QAAQ,CAAC,QAAQ;AAC5B,UAAA,MAAM,GAAG,GAAG;AACd,gBAAQ,KAAK;AAAA,UACX,KAAK,OAAM;AAAE,kBAAM,MAAM,MAAM,SAAS,MAAM,GAAG,CAAC;AAC3C,iBAAA,aAAa,KAAK,GAAG;AAC1B;AAAA,UAAA;AAAA,UAEF,KAAK,SAAS;AACZ,iBAAK,aAAa,KAAK,MAAM,GAAG,CAAC;AACjC;AAAA,UAAA;AAAA,UAEF,SAAS;AACP,iBAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CACD;AACM,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAAS;AACpB,UAAM,UAAe,CAAC;AACL,qBAAA,QAAQ,CAAC,QAAQ;AAChC,YAAM,QAAQ,QAAQ,aAAa,GAAG,KAAK,QAAQ,QAAQ,GAAG;AAC9D,UAAI,OAAO;AACT,gBAAQ,GAAG,IAAI;AAAA,MAAA;AAAA,IACjB,CACD;AACM,WAAA;AAAA,EAAA;AAEX;AACA,MAAM,WAAW;AACjB,MAAM,UAAU;AAChB,MAAM,gBAAgB;AACtB,MAAM,qBAAqB,CAAC,QAAQ,SAAS,MAAM;AACnD,MAAM,YAAY;"}
1
+ {"version":3,"file":"video.es.js","sources":["../../../src/formats/video.ts"],"sourcesContent":["import type { BlockEmbed as TypeBlockEmbed } from 'quill/blots/block'\r\nimport Quill from 'quill'\r\nimport { sanitize } from '../config/editor.utils'\r\n\r\nconst BlockEmbed = Quill.import('blots/block/embed') as typeof TypeBlockEmbed\r\nconst VIDEO_ATTRIBUTES = ['id', 'title', 'src']\r\n\r\nexport class Video extends BlockEmbed {\r\n static blotName = 'video'\r\n static tagName = 'VIDEO'\r\n static SANITIZED_URL = 'about:blank'\r\n static PROTOCOL_WHITELIST = ['http', 'https', 'blob']\r\n static className = 'ql-video'\r\n\r\n static sanitize(url) {\r\n return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL\r\n }\r\n\r\n static create(value) {\r\n const node = super.create(value) as HTMLElement\r\n node.setAttribute('contenteditable', 'false')\r\n node.setAttribute('controls', 'controls')\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n if (value[key]) {\r\n switch (key) {\r\n case 'src':{ const src = Video.sanitize(value[key])\r\n node.setAttribute(key, src)\r\n break\r\n }\r\n case 'title': {\r\n node.setAttribute(key, value[key])\r\n break\r\n }\r\n default: {\r\n node.dataset[key] = value[key]\r\n }\r\n }\r\n }\r\n })\r\n return node\r\n }\r\n\r\n static value(domNode) {\r\n const formats: any = {}\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n const value = domNode.getAttribute(key) || domNode.dataset[key]\r\n if (value) {\r\n formats[key] = value\r\n }\r\n })\r\n return formats\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAIA,MAAM,aAAa,MAAM,OAAO,mBAAmB;AACnD,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK;AAEvC,MAAM,SAAN,MAAM,eAAc,WAAW;AAAA,EAOpC,OAAO,SAAS,KAAK;AACnB,WAAO,SAAS,KAAK,KAAK,kBAAkB,IAAI,MAAM,KAAK;AAAA,EAAA;AAAA,EAG7D,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,mBAAmB,OAAO;AACvC,SAAA,aAAa,YAAY,UAAU;AACvB,qBAAA,QAAQ,CAAC,QAAQ;AAC5B,UAAA,MAAM,GAAG,GAAG;AACd,gBAAQ,KAAK;AAAA,UACX,KAAK,OAAM;AAAE,kBAAM,MAAM,OAAM,SAAS,MAAM,GAAG,CAAC;AAC3C,iBAAA,aAAa,KAAK,GAAG;AAC1B;AAAA,UAAA;AAAA,UAEF,KAAK,SAAS;AACZ,iBAAK,aAAa,KAAK,MAAM,GAAG,CAAC;AACjC;AAAA,UAAA;AAAA,UAEF,SAAS;AACP,iBAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CACD;AACM,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAAS;AACpB,UAAM,UAAe,CAAC;AACL,qBAAA,QAAQ,CAAC,QAAQ;AAChC,YAAM,QAAQ,QAAQ,aAAa,GAAG,KAAK,QAAQ,QAAQ,GAAG;AAC9D,UAAI,OAAO;AACT,gBAAQ,GAAG,IAAI;AAAA,MAAA;AAAA,IACjB,CACD;AACM,WAAA;AAAA,EAAA;AAEX;AA5CE,cADW,QACJ,YAAW;AAClB,cAFW,QAEJ,WAAU;AACjB,cAHW,QAGJ,iBAAgB;AACvB,cAJW,QAIJ,sBAAqB,CAAC,QAAQ,SAAS,MAAM;AACpD,cALW,QAKJ,aAAY;AALd,IAAM,QAAN;"}
package/es/index.es.js CHANGED
@@ -1,43 +1,102 @@
1
1
  import "./fluent-editor.es.js";
2
- import { getListValue, inputFile, namespace } from "./config/index.es.js";
2
+ import "./attributors/index.es.js";
3
+ import "./config/types/index.es.js";
4
+ import "./formats/index.es.js";
5
+ import "./modules/index.es.js";
6
+ import { generateTableUpShortKeyMenu } from "quill-shortcut-key";
7
+ import { AttributeMap, Delta, Op, OpIterator, Parchment, Range } from "quill/core";
8
+ import FluentEditor from "./core/fluent-editor.es.js";
9
+ import { SizeStyle } from "./attributors/font-size.es.js";
10
+ import { FontStyle } from "./attributors/font-style.es.js";
11
+ import { LineHeightStyle } from "./attributors/line-height.es.js";
12
+ import { TextIndentStyle } from "./attributors/text-indent.es.js";
13
+ import { EmojiBlot } from "./formats/emoji.es.js";
14
+ import { SoftBreak } from "./formats/soft-break.es.js";
15
+ import { StrikeBlot } from "./formats/strike.es.js";
16
+ import { Video } from "./formats/video.es.js";
17
+ import { CustomClipboard } from "./modules/custom-clipboard.es.js";
18
+ import { Action } from "./modules/custom-image/actions/action.es.js";
19
+ import { CustomResizeAction } from "./modules/custom-image/actions/custom-resize-action.es.js";
20
+ import { DeleteAction } from "./modules/custom-image/actions/delete-action.es.js";
21
+ import { ALIGN_ATTR, ImageToolbarButtons, alignmentHandler, setAlignStyle } from "./modules/custom-image/actions/image-toolbar-buttons.es.js";
22
+ import { ImageToolbar } from "./modules/custom-image/actions/toolbar.es.js";
23
+ import { ImageToolbarAction } from "./modules/custom-image/actions/toolbar-action.es.js";
24
+ import { BlotFormatter } from "./modules/custom-image/blot-formatter.es.js";
25
+ import { CustomImage } from "./modules/custom-image/image.es.js";
26
+ import { BlotSpec } from "./modules/custom-image/specs/blot-spec.es.js";
27
+ import { CustomImageSpec } from "./modules/custom-image/specs/custom-image-spec.es.js";
28
+ import { ImageSpec } from "./modules/custom-image/specs/image-spec.es.js";
29
+ import { FileUploader } from "./modules/custom-uploader.es.js";
30
+ import { DividerBlot } from "./modules/divider.es.js";
31
+ import { EmojiModule } from "./modules/emoji.es.js";
32
+ import { File } from "./modules/file/formats/file.es.js";
33
+ import { FileBar } from "./modules/file/modules/file-bar.es.js";
34
+ import { FileModule } from "./modules/file/modules/file-module.es.js";
3
35
  import { I18N } from "./modules/i18n.es.js";
36
+ import { LinkBlot } from "./modules/link/formats/link.es.js";
37
+ import { LinkTooltip } from "./modules/link/modules/tooltip.es.js";
38
+ import { MathliveBlot } from "./modules/mathlive/formats.es.js";
39
+ import { MathliveModule } from "./modules/mathlive/module.es.js";
40
+ import { MathliveTooltip } from "./modules/mathlive/tooltip.es.js";
41
+ import { Mention } from "./modules/mention/mention.es.js";
42
+ import { MentionLink } from "./modules/mention/mention-link.es.js";
43
+ import { ShortCutKey, shortKey } from "./modules/shortcut-key/index.es.js";
4
44
  import { generateTableUp } from "./modules/table-up/index.es.js";
45
+ import { ColorPicker, Picker } from "./modules/toolbar/better-picker.es.js";
46
+ import { BetterToolbar } from "./modules/toolbar/better-toolbar.es.js";
5
47
  import { generateToolbarTip } from "./modules/toolbar/toolbar-tip.es.js";
6
- import { generateTableUpShortKeyMenu } from "quill-shortcut-key";
7
- import FluentEditor from "./core/fluent-editor.es.js";
8
- import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, CHANGE_LANGUAGE_EVENT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES, defaultLanguage } from "./config/editor.config.es.js";
9
- import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside, isNullOrUndefined, isPureIE, omit, replaceDeltaImage, sanitize, splitWithBreak } from "./config/editor.utils.es.js";
10
48
  export {
11
- AUDIO_VIDEO_UPLOADER_MIME_TYPES,
12
- BIG_DELTA_LIMIT,
13
- CHANGE_LANGUAGE_EVENT,
14
- COMPRESSED_UPLOADER_MIME_TYPES,
15
- DOC_UPLOADER_MIME_TYPES,
16
- FILE_UPLOADER_MIME_TYPES,
49
+ ALIGN_ATTR,
50
+ Action,
51
+ AttributeMap,
52
+ BetterToolbar,
53
+ BlotFormatter,
54
+ BlotSpec,
55
+ ColorPicker,
56
+ CustomClipboard,
57
+ CustomImage,
58
+ CustomImageSpec,
59
+ CustomResizeAction,
60
+ DeleteAction,
61
+ Delta,
62
+ DividerBlot,
63
+ EmojiBlot,
64
+ EmojiModule,
65
+ File,
66
+ FileBar,
67
+ FileModule,
68
+ FileUploader,
69
+ FontStyle,
17
70
  I18N,
18
- IMAGE_UPLOADER_MIME_TYPES,
19
- OTHER_FILE_UPLOADER_MIME_TYPES,
20
- PPT_UPLOADER_MIME_TYPES,
21
- XSL_UPLOADER_MIME_TYPES,
71
+ ImageSpec,
72
+ ImageToolbar,
73
+ ImageToolbarAction,
74
+ ImageToolbarButtons,
75
+ LineHeightStyle,
76
+ LinkBlot,
77
+ LinkTooltip,
78
+ MathliveBlot,
79
+ MathliveModule,
80
+ MathliveTooltip,
81
+ Mention,
82
+ MentionLink,
83
+ Op,
84
+ OpIterator,
85
+ Parchment,
86
+ Picker,
87
+ Range,
88
+ ShortCutKey,
89
+ SizeStyle,
90
+ SoftBreak,
91
+ StrikeBlot,
92
+ TextIndentStyle,
93
+ Video,
94
+ alignmentHandler,
22
95
  FluentEditor as default,
23
- defaultLanguage,
24
96
  generateTableUp,
25
97
  generateTableUpShortKeyMenu,
26
98
  generateToolbarTip,
27
- getEventComposedPath,
28
- getListValue,
29
- hadProtocol,
30
- hexToRgbA,
31
- imageFileToUrl,
32
- imageUrlToFile,
33
- inputFile,
34
- isInside,
35
- isNullOrUndefined,
36
- isPureIE,
37
- namespace,
38
- omit,
39
- replaceDeltaImage,
40
- sanitize,
41
- splitWithBreak
99
+ setAlignStyle,
100
+ shortKey
42
101
  };
43
102
  //# sourceMappingURL=index.es.js.map