@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 +1 @@
1
- {"version":3,"file":"zh-cn.cjs.js","sources":["../../../../src/config/i18n/zh-cn.ts"],"sourcesContent":["export const ZH_CN = {\r\n\r\n 'header': '段落格式',\r\n 'normal': '正文',\r\n 'h1': '标题1',\r\n 'h2': '标题2',\r\n 'h3': '标题3',\r\n 'h4': '标题4',\r\n 'h5': '标题5',\r\n 'h6': '标题6',\r\n\r\n 'line-height': '行距',\r\n 'songti': '宋体',\r\n 'yahei': '微软雅黑',\r\n 'kaiti': '楷体',\r\n 'heiti': '黑体',\r\n 'lishu': '隶书',\r\n\r\n 'left': '左对齐',\r\n 'center': '居中对齐',\r\n 'right': '右对齐',\r\n\r\n 'codeblock': '代码块',\r\n 'globallink': '全局链接',\r\n\r\n 'exit-fullscreen': '退出全屏',\r\n 'help': '帮助',\r\n 'more': '更多',\r\n\r\n 'help-format': '格式',\r\n 'help-insert': '插入',\r\n 'help-operation': '操作',\r\n 'mention': '提及某人',\r\n 'quick-menu': '快捷菜单',\r\n 'toggle-help-panel': '打开/关闭帮助面板',\r\n 'scroll-table': '水平滚动表格',\r\n 'mouse-wheel': '鼠标滚轮',\r\n 'save': '保存',\r\n\r\n 'copy-cells': '复制',\r\n 'copy-table': '复制表格',\r\n 'cut-cells': '剪切',\r\n 'empty-cells': '清空内容',\r\n\r\n 'insert-row-up': '上插入行',\r\n 'insert-row-down': '下插入行',\r\n 'insert-column-left': '左插入列',\r\n 'insert-column-right': '右插入列',\r\n\r\n 'merge-cells': '合并单元格',\r\n 'unmerge-cells': '拆分单元格',\r\n\r\n 'delete-row': '删除当前行',\r\n 'delete-column': '删除当前列',\r\n 'delete-table': '删除表格',\r\n\r\n 'default-link-text': '链接',\r\n 'basicblock': '卡片',\r\n 'linkplaceholder': '请输入链接地址,按回车键确认',\r\n 'counter-template': '{{count}}/{{totalCount}}',\r\n 'char': '字符',\r\n 'word': '单词',\r\n 'counter-limit-tips': '{{countUnit}}数超出最大允许值',\r\n 'ie-msg': '为了有更好的体验,推荐使用最新版Chrome浏览器。',\r\n\r\n 'loading': '正在加载中...',\r\n 'pasting': '您粘贴的内容较多,正在努力加载中,请耐心等待...',\r\n 'img-error': '图片复制出错',\r\n 'img-error-info':\r\n '此图片不支持复制,请将原图下载至本地后点击工具栏【插入图片】,重新上传。',\r\n\r\n 'last-modified': '最后修改时间:',\r\n 'screenshot': '截图',\r\n 'uploading': '上传中...',\r\n 'sub-title-bg-color': '背景颜色',\r\n\r\n // blot tip name\r\n 'emoji': '表情',\r\n 'fullscreen': '全屏',\r\n 'blockquote': '引用',\r\n 'undo': '撤销',\r\n 'redo': '重做',\r\n 'clean': '清除格式',\r\n 'bold': '粗体',\r\n 'italic': '斜体',\r\n 'underline': '下划线',\r\n 'strike': '删除线',\r\n 'image': '图片',\r\n 'file': '文件',\r\n 'link': '超链接',\r\n 'divider': '分割线',\r\n 'code': '行内代码',\r\n 'table': '表格',\r\n 'table-up': '表格',\r\n 'code-block': '代码块',\r\n 'formula': '公式',\r\n 'format-painter': '格式刷',\r\n 'video': '视频',\r\n 'color': '字体颜色',\r\n 'background': '背景色',\r\n 'font': '字体',\r\n 'size': '字号',\r\n 'list': '列表',\r\n 'list-ordered': '有序列表',\r\n 'list-bullet': '无序列表',\r\n 'list-check': '任务列表',\r\n 'align-left': '左对齐',\r\n 'align-center': '居中对齐',\r\n 'align-right': '右对齐',\r\n 'align-justify': '两端对齐',\r\n 'direction-ltr': '文本方向左到右',\r\n 'direction-rtl': '文本方向右到左',\r\n 'indent--1': '减少缩进',\r\n 'indent-+1': '增加缩进',\r\n 'script-super': '上标',\r\n 'script-sub': '下标',\r\n 'header-normal': '正文',\r\n 'header-1': '标题1',\r\n 'header-2': '标题2',\r\n 'header-3': '标题3',\r\n 'header-4': '标题4',\r\n 'header-5': '标题5',\r\n 'header-6': '标题6',\r\n 'header-list': '标题列表',\r\n 'input-recall-menu-placeholder': '输入 / 唤起菜单',\r\n 'clear-color': '清除颜色',\r\n 'custom-color': '选择颜色',\r\n // table-up texts\r\n 'fullCheckboxText': '插入满宽度表格',\r\n 'customBtnText': '自定义行列数',\r\n 'confirmText': '确认',\r\n 'cancelText': '取消',\r\n 'rowText': '行数',\r\n 'colText': '列数',\r\n 'notPositiveNumberError': '请输入正整数',\r\n 'custom': '自定义',\r\n 'clear': '清除',\r\n 'transparent': '透明',\r\n 'perWidthInsufficient': '百分比宽度不足, 如需完成操作需要转换表格为固定宽度,是否继续?',\r\n 'CopyCell': '复制单元格',\r\n 'CutCell': '剪切单元格',\r\n 'InsertTop': '向上插入一行',\r\n 'InsertRight': '向右插入一列',\r\n 'InsertBottom': '向下插入一行',\r\n 'InsertLeft': '向左插入一列',\r\n 'MergeCell': '合并单元格',\r\n 'SplitCell': '拆分单元格',\r\n 'DeleteRow': '删除当前行',\r\n 'DeleteColumn': '删除当前列',\r\n 'DeleteTable': '删除当前表格',\r\n 'BackgroundColor': '设置背景颜色',\r\n 'BorderColor': '设置边框颜色',\r\n}\r\n"],"names":[],"mappings":";;AAAO,MAAM,QAAQ;AAAA,EAEnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EAEN,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EAET,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EAET,aAAa;AAAA,EACb,cAAc;AAAA,EAEd,mBAAmB;AAAA,EACnB,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,eAAe;AAAA,EAEf,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EAEvB,eAAe;AAAA,EACf,iBAAiB;AAAA,EAEjB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAEhB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,sBAAsB;AAAA,EACtB,UAAU;AAAA,EAEV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBACE;AAAA,EAEF,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,sBAAsB;AAAA;AAAA,EAGtB,SAAS;AAAA,EACT,cAAc;AAAA,EACd,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,iCAAiC;AAAA,EACjC,eAAe;AAAA,EACf,gBAAgB;AAAA;AAAA,EAEhB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,SAAS;AAAA,EACT,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,eAAe;AACjB;;"}
1
+ {"version":3,"file":"zh-cn.cjs.js","sources":["../../../../src/config/i18n/zh-cn.ts"],"sourcesContent":["export const ZH_CN = {\r\n\r\n 'header': '段落格式',\r\n 'normal': '正文',\r\n 'h1': '标题1',\r\n 'h2': '标题2',\r\n 'h3': '标题3',\r\n 'h4': '标题4',\r\n 'h5': '标题5',\r\n 'h6': '标题6',\r\n\r\n 'line-height': '行距',\r\n 'songti': '宋体',\r\n 'yahei': '微软雅黑',\r\n 'kaiti': '楷体',\r\n 'heiti': '黑体',\r\n 'lishu': '隶书',\r\n\r\n 'left': '左对齐',\r\n 'center': '居中对齐',\r\n 'right': '右对齐',\r\n\r\n 'codeblock': '代码块',\r\n 'globallink': '全局链接',\r\n\r\n 'exit-fullscreen': '退出全屏',\r\n 'help': '帮助',\r\n 'more': '更多',\r\n\r\n 'help-format': '格式',\r\n 'help-insert': '插入',\r\n 'help-operation': '操作',\r\n 'mention': '提及某人',\r\n 'quick-menu': '快捷菜单',\r\n 'toggle-help-panel': '打开/关闭帮助面板',\r\n 'scroll-table': '水平滚动表格',\r\n 'mouse-wheel': '鼠标滚轮',\r\n 'save': '保存',\r\n\r\n 'default-link-text': '链接',\r\n 'basicblock': '卡片',\r\n 'linkplaceholder': '请输入链接地址,按回车键确认',\r\n 'counter-template': '{{count}}/{{totalCount}}',\r\n 'char': '字符',\r\n 'word': '单词',\r\n 'counter-limit-tips': '{{countUnit}}数超出最大允许值',\r\n 'ie-msg': '为了有更好的体验,推荐使用最新版Chrome浏览器。',\r\n\r\n 'loading': '正在加载中...',\r\n 'pasting': '您粘贴的内容较多,正在努力加载中,请耐心等待...',\r\n 'img-error': '图片复制出错',\r\n 'img-error-info':\r\n '此图片不支持复制,请将原图下载至本地后点击工具栏【插入图片】,重新上传。',\r\n\r\n 'last-modified': '最后修改时间:',\r\n 'screenshot': '截图',\r\n 'uploading': '上传中...',\r\n 'sub-title-bg-color': '背景颜色',\r\n\r\n // blot tip name\r\n 'emoji': '表情',\r\n 'fullscreen': '全屏',\r\n 'blockquote': '引用',\r\n 'undo': '撤销',\r\n 'redo': '重做',\r\n 'clean': '清除格式',\r\n 'bold': '粗体',\r\n 'italic': '斜体',\r\n 'underline': '下划线',\r\n 'strike': '删除线',\r\n 'image': '图片',\r\n 'file': '文件',\r\n 'link': '超链接',\r\n 'divider': '分割线',\r\n 'code': '行内代码',\r\n 'table': '表格',\r\n 'table-up': '表格',\r\n 'code-block': '代码块',\r\n 'formula': '公式',\r\n 'format-painter': '格式刷',\r\n 'video': '视频',\r\n 'color': '字体颜色',\r\n 'background': '背景色',\r\n 'font': '字体',\r\n 'size': '字号',\r\n 'list': '列表',\r\n 'list-ordered': '有序列表',\r\n 'list-bullet': '无序列表',\r\n 'list-check': '任务列表',\r\n 'align-left': '左对齐',\r\n 'align-center': '居中对齐',\r\n 'align-right': '右对齐',\r\n 'align-justify': '两端对齐',\r\n 'direction-ltr': '文本方向左到右',\r\n 'direction-rtl': '文本方向右到左',\r\n 'indent--1': '减少缩进',\r\n 'indent-+1': '增加缩进',\r\n 'script-super': '上标',\r\n 'script-sub': '下标',\r\n 'header-normal': '正文',\r\n 'header-1': '标题1',\r\n 'header-2': '标题2',\r\n 'header-3': '标题3',\r\n 'header-4': '标题4',\r\n 'header-5': '标题5',\r\n 'header-6': '标题6',\r\n 'header-list': '标题列表',\r\n 'input-recall-menu-placeholder': '输入 / 唤起菜单',\r\n 'clear-color': '清除颜色',\r\n 'custom-color': '选择颜色',\r\n // table-up texts\r\n 'fullCheckboxText': '插入满宽度表格',\r\n 'customBtnText': '自定义行列数',\r\n 'confirmText': '确认',\r\n 'cancelText': '取消',\r\n 'rowText': '行数',\r\n 'colText': '列数',\r\n 'notPositiveNumberError': '请输入正整数',\r\n 'custom': '自定义',\r\n 'clear': '清除',\r\n 'transparent': '透明',\r\n 'perWidthInsufficient': '百分比宽度不足, 如需完成操作需要转换表格为固定宽度,是否继续?',\r\n 'CopyCell': '复制单元格',\r\n 'CutCell': '剪切单元格',\r\n 'InsertTop': '向上插入一行',\r\n 'InsertRight': '向右插入一列',\r\n 'InsertBottom': '向下插入一行',\r\n 'InsertLeft': '向左插入一列',\r\n 'MergeCell': '合并单元格',\r\n 'SplitCell': '拆分单元格',\r\n 'DeleteRow': '删除当前行',\r\n 'DeleteColumn': '删除当前列',\r\n 'DeleteTable': '删除当前表格',\r\n 'BackgroundColor': '设置背景颜色',\r\n 'BorderColor': '设置边框颜色',\r\n\r\n}\r\n"],"names":[],"mappings":";;AAAO,MAAM,QAAQ;AAAA,EAEnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EAEN,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EAET,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EAET,aAAa;AAAA,EACb,cAAc;AAAA,EAEd,mBAAmB;AAAA,EACnB,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,sBAAsB;AAAA,EACtB,UAAU;AAAA,EAEV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBACE;AAAA,EAEF,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,sBAAsB;AAAA;AAAA,EAGtB,SAAS;AAAA,EACT,cAAc;AAAA,EACd,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,iCAAiC;AAAA,EACjC,eAAe;AAAA,EACf,gBAAgB;AAAA;AAAA,EAEhB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,SAAS;AAAA,EACT,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,eAAe;AAEjB;;"}
@@ -2,23 +2,20 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const editor_utils = require("./editor.utils.cjs.js");
4
4
  const editor_config = require("./editor.config.cjs.js");
5
+ require("./types/index.cjs.js");
5
6
  function inputFile(type, accept) {
6
- var _a, _b, _c;
7
- const defaultMIMETypes = this.quill.uploader.options[type].join(", ");
8
- const mimeTypes = accept || defaultMIMETypes;
7
+ if (accept.length <= 0) return;
9
8
  let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`);
10
- this.quill.uploader.options.enableMultiUpload = (_a = this.quill.options.uploadOption) == null ? void 0 : _a.multiple;
11
9
  if (editor_utils.isNullOrUndefined(fileInput)) {
12
10
  fileInput = document.createElement("input");
11
+ fileInput.style.display = "none";
13
12
  fileInput.classList.add(`ql-${type}`);
14
13
  fileInput.setAttribute("type", "file");
15
- fileInput.setAttribute("accept", mimeTypes);
16
- if (this.quill.uploader.options.enableMultiUpload === true || ((_b = this.quill.uploader.options.enableMultiUpload) == null ? void 0 : _b.file) && type === "file" || ((_c = this.quill.uploader.options.enableMultiUpload) == null ? void 0 : _c.image) && type === "image") {
17
- fileInput.setAttribute("multiple", "");
18
- }
14
+ fileInput.setAttribute("accept", accept.map((mime) => mime === "*" ? `${type}/*` : mime).join(","));
15
+ fileInput.setAttribute("multiple", "");
19
16
  fileInput.addEventListener("change", () => {
20
17
  const range = this.quill.getSelection(true);
21
- this.quill.uploader.upload(range, fileInput.files, type === "file");
18
+ this.quill.uploader.upload(range, fileInput.files);
22
19
  fileInput.value = "";
23
20
  });
24
21
  this.container.appendChild(fileInput);
@@ -46,7 +43,6 @@ exports.imageFileToUrl = editor_utils.imageFileToUrl;
46
43
  exports.imageUrlToFile = editor_utils.imageUrlToFile;
47
44
  exports.isInside = editor_utils.isInside;
48
45
  exports.isNullOrUndefined = editor_utils.isNullOrUndefined;
49
- exports.isPureIE = editor_utils.isPureIE;
50
46
  exports.omit = editor_utils.omit;
51
47
  exports.replaceDeltaImage = editor_utils.replaceDeltaImage;
52
48
  exports.sanitize = editor_utils.sanitize;
@@ -58,7 +54,6 @@ exports.COMPRESSED_UPLOADER_MIME_TYPES = editor_config.COMPRESSED_UPLOADER_MIME_
58
54
  exports.DOC_UPLOADER_MIME_TYPES = editor_config.DOC_UPLOADER_MIME_TYPES;
59
55
  exports.FILE_UPLOADER_MIME_TYPES = editor_config.FILE_UPLOADER_MIME_TYPES;
60
56
  exports.IMAGE_UPLOADER_MIME_TYPES = editor_config.IMAGE_UPLOADER_MIME_TYPES;
61
- exports.LANG_CONF = editor_config.LANG_CONF;
62
57
  exports.OTHER_FILE_UPLOADER_MIME_TYPES = editor_config.OTHER_FILE_UPLOADER_MIME_TYPES;
63
58
  exports.PPT_UPLOADER_MIME_TYPES = editor_config.PPT_UPLOADER_MIME_TYPES;
64
59
  exports.XSL_UPLOADER_MIME_TYPES = editor_config.XSL_UPLOADER_MIME_TYPES;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.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, accept) {\r\n const defaultMIMETypes = this.quill.uploader.options[type].join(', ')\r\n const mimeTypes = accept || defaultMIMETypes\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n this.quill.uploader.options.enableMultiUpload = this.quill.options.uploadOption?.multiple\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', mimeTypes)\r\n if (\r\n this.quill.uploader.options.enableMultiUpload === true\r\n || (this.quill.uploader.options.enableMultiUpload?.file && type === 'file')\r\n || (this.quill.uploader.options.enableMultiUpload?.image && type === 'image')\r\n ) {\r\n fileInput.setAttribute('multiple', '')\r\n }\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files, type === 'file')\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":["isNullOrUndefined"],"mappings":";;;;AAMgB,SAAA,UAAU,MAAM,QAAQ;;AAChC,QAAA,mBAAmB,KAAK,MAAM,SAAS,QAAQ,IAAI,EAAE,KAAK,IAAI;AACpE,QAAM,YAAY,UAAU;AAC5B,MAAI,YAAY,KAAK,UAAU,cAAc,YAAY,IAAI,aAAa;AAC1E,OAAK,MAAM,SAAS,QAAQ,qBAAoB,UAAK,MAAM,QAAQ,iBAAnB,mBAAiC;AAC7E,MAAAA,aAAAA,kBAAkB,SAAS,GAAG;AACpB,gBAAA,SAAS,cAAc,OAAO;AAC1C,cAAU,UAAU,IAAI,MAAM,IAAI,EAAE;AAC1B,cAAA,aAAa,QAAQ,MAAM;AAC3B,cAAA,aAAa,UAAU,SAAS;AAExC,QAAA,KAAK,MAAM,SAAS,QAAQ,sBAAsB,UAC9C,UAAK,MAAM,SAAS,QAAQ,sBAA5B,mBAA+C,SAAQ,SAAS,YAChE,UAAK,MAAM,SAAS,QAAQ,sBAA5B,mBAA+C,UAAS,SAAS,SACrE;AACU,gBAAA,aAAa,YAAY,EAAE;AAAA,IAAA;AAE7B,cAAA,iBAAiB,UAAU,MAAM;AACzC,YAAM,QAAQ,KAAK,MAAM,aAAa,IAAI;AAC1C,WAAK,MAAM,SAAS,OAAO,OAAO,UAAU,OAAO,SAAS,MAAM;AAClE,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.cjs.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":["isNullOrUndefined"],"mappings":";;;;;AAOgB,SAAA,UAAU,MAAkC,QAAkB;AACxE,MAAA,OAAO,UAAU,EAAG;AACxB,MAAI,YAAY,KAAK,UAAU,cAAc,YAAY,IAAI,aAAa;AACtE,MAAAA,aAAAA,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,25 +1,5 @@
1
1
  "use strict";
2
- require("./additional-toolbar-item.interface.cjs.js");
3
- require("./content-change.interface.cjs.js");
4
- require("./content-save.interface.cjs.js");
5
- require("./counter-option.interface.cjs.js");
6
2
  require("./editor-config.interface.cjs.js");
7
3
  require("./editor-modules.interface.cjs.js");
8
- require("./editor-toolbar.interface.cjs.js");
9
- require("./file-operation.interface.cjs.js");
10
- require("./focus-change.interface.cjs.js");
11
- require("./fullscreen-module.interface.cjs.js");
12
- require("./help-panel-option.interface.cjs.js");
13
- require("./image-module.interface.cjs.js");
14
- require("./image-upload.interface.cjs.js");
15
- require("./load-on-demand-module.interface.cjs.js");
16
- require("./mention-module.interface.cjs.js");
17
- require("./paste-change.interface.cjs.js");
18
- require("./quick-menu-module.interface.cjs.js");
19
- require("./range.interface.cjs.js");
20
- require("./registry-options.interface.cjs.js");
21
- require("./selection-change.interface.cjs.js");
22
- require("./toolbar-item.interface.cjs.js");
23
4
  require("./type.cjs.js");
24
- require("./validate-error.interface.cjs.js");
25
5
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
2
5
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
6
  const Quill = require("quill");
4
7
  require("../config/index.cjs.js");
8
+ const i18n = require("../modules/i18n.cjs.js");
5
9
  const editor_config = require("../config/editor.config.cjs.js");
6
10
  class FluentEditor extends Quill {
7
11
  constructor(container, options = {}) {
8
12
  super(container, options);
9
- this.isFullscreen = false;
13
+ __publicField(this, "isFullscreen", false);
10
14
  }
11
15
  static register(...args) {
12
16
  super.register(...args);
@@ -16,9 +20,7 @@ class FluentEditor extends Quill {
16
20
  return i18nModule ? i18nModule.options.lang : editor_config.defaultLanguage;
17
21
  }
18
22
  getLangText(name) {
19
- const i18nModule = this.getModule("i18n");
20
- if (!i18nModule) return editor_config.LANG_CONF[editor_config.defaultLanguage][name];
21
- return i18nModule.options.langText[name];
23
+ return i18n.I18N.parserText(name, this.lang);
22
24
  }
23
25
  }
24
26
  exports.default = FluentEditor;
@@ -1 +1 @@
1
- {"version":3,"file":"fluent-editor.cjs.js","sources":["../../../src/core/fluent-editor.ts"],"sourcesContent":["import type { ExpandedQuillOptions } from 'quill'\r\nimport type { IEditorConfig } from '../config/types'\r\nimport type I18N from '../modules/i18n'\r\nimport Quill from 'quill'\r\nimport { defaultLanguage, LANG_CONF } from '../config'\r\n\r\nclass FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n options: IEditorConfig & ExpandedQuillOptions\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 const i18nModule = this.getModule('i18n') as I18N\r\n if (!i18nModule) return LANG_CONF[defaultLanguage][name]\r\n return i18nModule.options.langText[name]\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":["defaultLanguage","LANG_CONF"],"mappings":";;;;;AAMA,MAAM,qBAAqB,MAAM;AAAA,EAa/B,YAAY,WAAiC,UAAyB,IAAI;AACxE,UAAM,WAAW,OAAO;AAbF,SAAA,eAAA;AAAA,EAAA;AAAA,EAGxB,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,OAAOA,cAAA;AAAA,EAAA;AAAA,EAOhD,YAAY,MAAc;AAClB,UAAA,aAAa,KAAK,UAAU,MAAM;AACxC,QAAI,CAAC,WAAY,QAAOC,cAAU,UAAAD,cAAe,eAAA,EAAE,IAAI;AAChD,WAAA,WAAW,QAAQ,SAAS,IAAI;AAAA,EAAA;AAE3C;;"}
1
+ {"version":3,"file":"fluent-editor.cjs.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":["defaultLanguage","I18N"],"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,OAAOA,cAAA;AAAA,EAAA;AAAA,EAOhD,YAAY,MAAc;AACxB,WAAOC,KAAK,KAAA,WAAW,MAAM,KAAK,IAAI;AAAA,EAAA;AAE1C;;"}
@@ -1,32 +1,48 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  require("./attributors/index.cjs.js");
4
+ const enUs = require("./config/i18n/en-us.cjs.js");
5
+ const zhCn = require("./config/i18n/zh-cn.cjs.js");
4
6
  const fluentEditor = require("./core/fluent-editor.cjs.js");
5
- const softBreak = require("./formats/soft-break.cjs.js");
6
- const strike = require("./formats/strike.cjs.js");
7
- const video = require("./formats/video.cjs.js");
7
+ require("./formats/index.cjs.js");
8
8
  const counter = require("./modules/counter.cjs.js");
9
9
  const customClipboard = require("./modules/custom-clipboard.cjs.js");
10
- const BlotFormatter = require("./modules/custom-image/BlotFormatter.cjs.js");
10
+ require("./modules/custom-image/index.cjs.js");
11
11
  const customUploader = require("./modules/custom-uploader.cjs.js");
12
12
  const divider = require("./modules/divider.cjs.js");
13
- const index = require("./modules/emoji/index.cjs.js");
14
- const index$1 = require("./modules/file/index.cjs.js");
13
+ const emoji$1 = require("./modules/emoji.cjs.js");
14
+ require("./modules/file/index.cjs.js");
15
15
  const i18n = require("./modules/i18n.cjs.js");
16
- const index$2 = require("./modules/link/index.cjs.js");
17
- const index$3 = require("./modules/mathlive/index.cjs.js");
18
- const formats = require("./modules/mathlive/formats.cjs.js");
19
- const Mention = require("./modules/mention/Mention.cjs.js");
20
- const index$5 = require("./modules/shortcut-key/index.cjs.js");
16
+ require("./modules/link/index.cjs.js");
17
+ require("./modules/mathlive/index.cjs.js");
18
+ require("./modules/mention/index.cjs.js");
19
+ const index = require("./modules/shortcut-key/index.cjs.js");
21
20
  const syntax = require("./modules/syntax.cjs.js");
22
- const index$4 = require("./modules/toolbar/index.cjs.js");
21
+ require("./modules/toolbar/index.cjs.js");
23
22
  const betterPicker = require("./modules/toolbar/better-picker.cjs.js");
24
23
  const snow = require("./themes/snow.cjs.js");
25
24
  const icons = require("./ui/icons.cjs.js");
26
25
  const fontStyle = require("./attributors/font-style.cjs.js");
27
26
  const fontSize = require("./attributors/font-size.cjs.js");
28
27
  const lineHeight = require("./attributors/line-height.cjs.js");
28
+ const emoji = require("./formats/emoji.cjs.js");
29
+ const softBreak = require("./formats/soft-break.cjs.js");
30
+ const strike = require("./formats/strike.cjs.js");
29
31
  const textIndent = require("./attributors/text-indent.cjs.js");
32
+ const video = require("./formats/video.cjs.js");
33
+ const link = require("./modules/link/formats/link.cjs.js");
34
+ const fileModule = require("./modules/file/modules/file-module.cjs.js");
35
+ const blotFormatter = require("./modules/custom-image/blot-formatter.cjs.js");
36
+ const module$1 = require("./modules/mathlive/module.cjs.js");
37
+ const mention = require("./modules/mention/mention.cjs.js");
38
+ const betterToolbar = require("./modules/toolbar/better-toolbar.cjs.js");
39
+ i18n.I18N.register(
40
+ {
41
+ "en-US": enUs.EN_US,
42
+ "zh-CN": zhCn.ZH_CN
43
+ },
44
+ true
45
+ );
30
46
  fluentEditor.default.register(
31
47
  {
32
48
  "attributors/style/font": fontStyle.FontStyle,
@@ -35,27 +51,25 @@ fluentEditor.default.register(
35
51
  "formats/font": fontStyle.FontStyle,
36
52
  "formats/line-height": lineHeight.LineHeightStyle,
37
53
  "formats/size": fontSize.SizeStyle,
38
- "formats/emoji": index.default.EmojiBlot,
39
- [`formats/${formats.default.blotName}`]: formats.default,
40
- "formats/softBreak": softBreak.default,
41
- "formats/strike": strike.default,
54
+ "formats/emoji": emoji.EmojiBlot,
55
+ "formats/softBreak": softBreak.SoftBreak,
56
+ "formats/strike": strike.StrikeBlot,
42
57
  "formats/text-indent": textIndent.TextIndentStyle,
43
- "formats/video": video.default,
44
- "modules/clipboard": customClipboard.default,
58
+ "formats/video": video.Video,
59
+ "formats/divider": divider.DividerBlot,
60
+ "formats/link": link.LinkBlot,
61
+ "modules/clipboard": customClipboard.CustomClipboard,
45
62
  "modules/counter": counter.default,
46
- "modules/divider": divider.default,
47
- "modules/emoji-shortname": index.default.ShortNameEmoji,
48
- "modules/emoji-toolbar": index.default.ToolbarEmoji,
49
- "modules/file": index$1.default,
50
- "modules/i18n": i18n.default,
51
- "modules/image": BlotFormatter.default,
52
- "modules/link": index$2.default,
53
- "modules/mathlive": index$3.default,
54
- "modules/mention": Mention.default,
63
+ "modules/emoji": emoji$1.EmojiModule,
64
+ "modules/file": fileModule.FileModule,
65
+ "modules/i18n": i18n.I18N,
66
+ "modules/image": blotFormatter.BlotFormatter,
67
+ "modules/mathlive": module$1.MathliveModule,
68
+ "modules/mention": mention.Mention,
55
69
  "modules/syntax": syntax.default,
56
- "modules/toolbar": index$4.default,
57
- "modules/uploader": customUploader.default,
58
- "modules/shortcut-key": index$5.ShortCutKey,
70
+ "modules/toolbar": betterToolbar.BetterToolbar,
71
+ "modules/uploader": customUploader.FileUploader,
72
+ "modules/shortcut-key": index.ShortCutKey,
59
73
  "themes/snow": snow.default,
60
74
  "ui/icons": icons.default,
61
75
  "ui/picker": betterPicker.Picker,
@@ -1 +1 @@
1
- {"version":3,"file":"fluent-editor.cjs.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\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 Uploader 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\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': Uploader,\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":["FluentEditor","FontStyle","SizeStyle","LineHeightStyle","Emoji","MathliveBlot","SoftBreak","Strike","TextIndentStyle","Video","CustomClipboard","Counter","DividerBlot","FileModule","I18N","Image","Link","MathliveModule","Mention","Syntax","Toolbar","Uploader","ShortCutKey","SnowTheme","Icons","Picker","ColorPicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBAA,aAAAA,QAAa;AAAA,EACX;AAAA,IACE,0BAA0BC,UAAA;AAAA,IAC1B,0BAA0BC,SAAA;AAAA,IAC1B,iCAAiCC,WAAA;AAAA,IAEjC,gBAAgBF,UAAA;AAAA,IAChB,uBAAuBE,WAAA;AAAA,IACvB,gBAAgBD,SAAA;AAAA,IAChB,iBAAiBE,MAAM,QAAA;AAAA,IACvB,CAAC,WAAWC,QAAAA,QAAa,QAAQ,EAAE,GAAGA,QAAA;AAAA,IACtC,qBAAqBC,UAAA;AAAA,IACrB,kBAAkBC,OAAA;AAAA,IAClB,uBAAuBC,WAAA;AAAA,IACvB,iBAAiBC,MAAA;AAAA,IAEjB,qBAAqBC,gBAAA;AAAA,IACrB,mBAAmBC,QAAA;AAAA,IACnB,mBAAmBC,QAAA;AAAA,IACnB,2BAA2BR,MAAM,QAAA;AAAA,IACjC,yBAAyBA,MAAM,QAAA;AAAA,IAC/B,gBAAgBS,QAAA;AAAA,IAChB,gBAAgBC,KAAA;AAAA,IAChB,iBAAiBC,cAAA;AAAA,IACjB,gBAAgBC,QAAA;AAAA,IAChB,oBAAoBC,QAAA;AAAA,IACpB,mBAAmBC,QAAA;AAAA,IACnB,kBAAkBC,OAAA;AAAA,IAClB,mBAAmBC,QAAA;AAAA,IACnB,oBAAoBC,eAAA;AAAA,IACpB,wBAAwBC,QAAA;AAAA,IAExB,eAAeC,KAAA;AAAA,IAEf,YAAYC,MAAA;AAAA,IACZ,aAAaC,aAAA;AAAA,IACb,mBAAmBC,aAAAA;AAAAA,EACrB;AAAA,EACA;AAAA;AACF;;"}
1
+ {"version":3,"file":"fluent-editor.cjs.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 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/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":["I18N","EN_US","ZH_CN","FluentEditor","FontStyle","SizeStyle","LineHeightStyle","EmojiBlot","SoftBreak","StrikeBlot","TextIndentStyle","Video","DividerBlot","LinkBlot","CustomClipboard","Counter","EmojiModule","FileModule","BlotFormatter","MathliveModule","Mention","Syntax","BetterToolbar","FileUploader","ShortCutKey","SnowTheme","Icons","Picker","ColorPicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBAA,KAAAA,KAAK;AAAA,EACH;AAAA,IACE,SAASC,KAAA;AAAA,IACT,SAASC,KAAAA;AAAAA,EACX;AAAA,EACA;AACF;AACAC,aAAAA,QAAa;AAAA,EACX;AAAA,IACE,0BAA0BC,UAAA;AAAA,IAC1B,0BAA0BC,SAAA;AAAA,IAC1B,iCAAiCC,WAAA;AAAA,IAEjC,gBAAgBF,UAAA;AAAA,IAChB,uBAAuBE,WAAA;AAAA,IACvB,gBAAgBD,SAAA;AAAA,IAChB,iBAAiBE,MAAA;AAAA,IACjB,qBAAqBC,UAAA;AAAA,IACrB,kBAAkBC,OAAA;AAAA,IAClB,uBAAuBC,WAAA;AAAA,IACvB,iBAAiBC,MAAA;AAAA,IACjB,mBAAmBC,QAAA;AAAA,IACnB,gBAAgBC,KAAA;AAAA,IAEhB,qBAAqBC,gBAAA;AAAA,IACrB,mBAAmBC,QAAA;AAAA,IACnB,iBAAiBC,QAAA;AAAA,IACjB,gBAAgBC,WAAA;AAAA,IAChB,gBAAgBjB,KAAA;AAAA,IAChB,iBAAiBkB,cAAA;AAAA,IACjB,oBAAoBC,SAAA;AAAA,IACpB,mBAAmBC,QAAA;AAAA,IACnB,kBAAkBC,OAAA;AAAA,IAClB,mBAAmBC,cAAA;AAAA,IACnB,oBAAoBC,eAAA;AAAA,IACpB,wBAAwBC,MAAA;AAAA,IAExB,eAAeC,KAAA;AAAA,IAEf,YAAYC,MAAA;AAAA,IACZ,aAAaC,aAAA;AAAA,IACb,mBAAmBC,aAAAA;AAAAA,EACrB;AAAA,EACA;AAAA;AACF;;"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const Quill = require("quill");
7
+ const Inline = Quill.import("blots/inline");
8
+ class EmojiBlot extends Inline {
9
+ }
10
+ __publicField(EmojiBlot, "blotName", "emoji");
11
+ __publicField(EmojiBlot, "tagName", "span");
12
+ __publicField(EmojiBlot, "className", "ql-emoji-format");
13
+ exports.EmojiBlot = EmojiBlot;
14
+ //# sourceMappingURL=emoji.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emoji.cjs.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
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const emoji = require("./emoji.cjs.js");
4
+ const softBreak = require("./soft-break.cjs.js");
5
+ const strike = require("./strike.cjs.js");
6
+ const video = require("./video.cjs.js");
7
+ exports.EmojiBlot = emoji.EmojiBlot;
8
+ exports.SoftBreak = softBreak.SoftBreak;
9
+ exports.StrikeBlot = strike.StrikeBlot;
10
+ exports.Video = video.Video;
11
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
6
  const Quill = require("quill");
4
- const Embed = Quill.imports["blots/embed"];
7
+ const Embed = Quill.import("blots/embed");
5
8
  class SoftBreak extends Embed {
9
+ constructor() {
10
+ super(...arguments);
11
+ __publicField(this, "remove");
12
+ }
6
13
  static create() {
7
14
  const node = super.create();
8
15
  return node;
@@ -16,8 +23,8 @@ class SoftBreak extends Embed {
16
23
  return 1;
17
24
  }
18
25
  }
19
- SoftBreak.blotName = "soft-break";
20
- SoftBreak.tagName = "BR";
21
- SoftBreak.className = "ql-soft-break";
22
- exports.default = SoftBreak;
26
+ __publicField(SoftBreak, "blotName", "soft-break");
27
+ __publicField(SoftBreak, "tagName", "BR");
28
+ __publicField(SoftBreak, "className", "ql-soft-break");
29
+ exports.SoftBreak = SoftBreak;
23
30
  //# sourceMappingURL=soft-break.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"soft-break.cjs.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.cjs.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
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
6
  const Quill = require("quill");
4
- const Inline = Quill.imports["blots/inline"];
7
+ const Inline = Quill.import("blots/inline");
5
8
  class StrikeBlot extends Inline {
6
9
  // 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法
7
10
  }
8
- StrikeBlot.blotName = "strike";
9
- StrikeBlot.tagName = "u";
10
- StrikeBlot.className = "ql-custom-strike";
11
- exports.default = StrikeBlot;
11
+ __publicField(StrikeBlot, "blotName", "strike");
12
+ __publicField(StrikeBlot, "tagName", "u");
13
+ __publicField(StrikeBlot, "className", "ql-custom-strike");
14
+ exports.StrikeBlot = StrikeBlot;
12
15
  //# sourceMappingURL=strike.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"strike.cjs.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.cjs.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,10 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
6
  const Quill = require("quill");
4
7
  const editor_utils = require("../config/editor.utils.cjs.js");
5
- const BlockEmbed = Quill.imports["blots/block/embed"];
8
+ const BlockEmbed = Quill.import("blots/block/embed");
6
9
  const VIDEO_ATTRIBUTES = ["id", "title", "src"];
7
- class Video extends BlockEmbed {
10
+ const _Video = class _Video extends BlockEmbed {
8
11
  static sanitize(url) {
9
12
  return editor_utils.sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
10
13
  }
@@ -16,7 +19,7 @@ class Video extends BlockEmbed {
16
19
  if (value[key]) {
17
20
  switch (key) {
18
21
  case "src": {
19
- const src = Video.sanitize(value[key]);
22
+ const src = _Video.sanitize(value[key]);
20
23
  node.setAttribute(key, src);
21
24
  break;
22
25
  }
@@ -42,11 +45,12 @@ class Video extends BlockEmbed {
42
45
  });
43
46
  return formats;
44
47
  }
45
- }
46
- Video.blotName = "video";
47
- Video.tagName = "VIDEO";
48
- Video.SANITIZED_URL = "about:blank";
49
- Video.PROTOCOL_WHITELIST = ["http", "https"];
50
- Video.className = "ql-video-item";
51
- exports.default = Video;
48
+ };
49
+ __publicField(_Video, "blotName", "video");
50
+ __publicField(_Video, "tagName", "VIDEO");
51
+ __publicField(_Video, "SANITIZED_URL", "about:blank");
52
+ __publicField(_Video, "PROTOCOL_WHITELIST", ["http", "https", "blob"]);
53
+ __publicField(_Video, "className", "ql-video");
54
+ let Video = _Video;
55
+ exports.Video = Video;
52
56
  //# sourceMappingURL=video.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"video.cjs.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']\r\nVideo.className = 'ql-video-item'\r\n\r\nexport default Video\r\n"],"names":["sanitize"],"mappings":";;;;AAIA,MAAM,aAAa,MAAM,QAAQ,mBAAmB;AACpD,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK;AAE9C,MAAM,cAAc,WAAW;AAAA,EAS7B,OAAO,SAAS,KAAK;AACnB,WAAOA,aAAAA,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,OAAO;AAC3C,MAAM,YAAY;;"}
1
+ {"version":3,"file":"video.cjs.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":["sanitize"],"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,WAAOA,aAAAA,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;;"}