@opentiny/fluent-editor 4.0.0-alpha.9 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/README.md +88 -88
  2. package/es/attributors/line-height.es.js.map +1 -1
  3. package/es/config/base64-image.es.js.map +1 -1
  4. package/es/config/editor.config.es.js +27 -0
  5. package/es/config/editor.config.es.js.map +1 -1
  6. package/es/config/editor.utils.es.js.map +1 -1
  7. package/es/config/i18n/en-us.es.js +2 -0
  8. package/es/config/i18n/en-us.es.js.map +1 -1
  9. package/es/config/i18n/zh-cn.es.js +2 -0
  10. package/es/config/i18n/zh-cn.es.js.map +1 -1
  11. package/es/config/index.es.js +3 -1
  12. package/es/config/index.es.js.map +1 -1
  13. package/es/core/fluent-editor.es.js.map +1 -1
  14. package/es/fluent-editor.es.js +17 -13
  15. package/es/fluent-editor.es.js.map +1 -1
  16. package/es/formats/emoji.es.js.map +1 -1
  17. package/es/formats/soft-break.es.js.map +1 -1
  18. package/es/formats/strike.es.js.map +1 -1
  19. package/es/formats/video.es.js.map +1 -1
  20. package/es/index.es.js +35 -2
  21. package/es/index.es.js.map +1 -1
  22. package/es/modules/ai/constants.es.js.map +1 -1
  23. package/es/modules/ai/icons.es.js.map +1 -1
  24. package/es/modules/ai/index.es.js +1 -1
  25. package/es/modules/ai/index.es.js.map +1 -1
  26. package/es/modules/collaborative-editing/awareness/awareness.es.js +6 -7
  27. package/es/modules/collaborative-editing/awareness/awareness.es.js.map +1 -1
  28. package/es/modules/collaborative-editing/awareness/y-indexeddb.es.js +7 -3
  29. package/es/modules/collaborative-editing/awareness/y-indexeddb.es.js.map +1 -1
  30. package/es/modules/collaborative-editing/collaborative-editing.es.js +13 -8
  31. package/es/modules/collaborative-editing/collaborative-editing.es.js.map +1 -1
  32. package/es/modules/collaborative-editing/module.es.js.map +1 -1
  33. package/es/modules/collaborative-editing/provider/providerRegistry.es.js.map +1 -1
  34. package/es/modules/collaborative-editing/provider/webrtc.es.js +8 -4
  35. package/es/modules/collaborative-editing/provider/webrtc.es.js.map +1 -1
  36. package/es/modules/collaborative-editing/provider/websocket.es.js +6 -4
  37. package/es/modules/collaborative-editing/provider/websocket.es.js.map +1 -1
  38. package/es/modules/counter.es.js.map +1 -1
  39. package/es/modules/custom-clipboard.es.js.map +1 -1
  40. package/es/modules/custom-image/actions/action.es.js.map +1 -1
  41. package/es/modules/custom-image/actions/custom-resize-action.es.js.map +1 -1
  42. package/es/modules/custom-image/actions/delete-action.es.js.map +1 -1
  43. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js +1 -1
  44. package/es/modules/custom-image/actions/image-toolbar-buttons.es.js.map +1 -1
  45. package/es/modules/custom-image/actions/toolbar-action.es.js.map +1 -1
  46. package/es/modules/custom-image/actions/toolbar.es.js.map +1 -1
  47. package/es/modules/custom-image/blot-formatter.es.js +1 -1
  48. package/es/modules/custom-image/blot-formatter.es.js.map +1 -1
  49. package/es/modules/custom-image/image.es.js.map +1 -1
  50. package/es/modules/custom-image/options.es.js.map +1 -1
  51. package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -1
  52. package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -1
  53. package/es/modules/custom-image/specs/image-spec.es.js.map +1 -1
  54. package/es/modules/custom-uploader.es.js.map +1 -1
  55. package/es/modules/divider.es.js.map +1 -1
  56. package/es/modules/emoji.es.js +1 -1
  57. package/es/modules/emoji.es.js.map +1 -1
  58. package/es/modules/file/formats/file.es.js.map +1 -1
  59. package/es/modules/file/modules/file-bar.es.js.map +1 -1
  60. package/es/modules/file/modules/file-module.es.js.map +1 -1
  61. package/es/modules/flow-chart/config-utils.es.js +102 -0
  62. package/es/modules/flow-chart/config-utils.es.js.map +1 -0
  63. package/es/modules/flow-chart/formats/flow-chart-blot.es.js +369 -0
  64. package/es/modules/flow-chart/formats/flow-chart-blot.es.js.map +1 -0
  65. package/es/modules/flow-chart/i18n/en-us.es.js +30 -0
  66. package/es/modules/flow-chart/i18n/en-us.es.js.map +1 -0
  67. package/es/modules/flow-chart/i18n/index.es.js +12 -0
  68. package/es/modules/flow-chart/i18n/index.es.js.map +1 -0
  69. package/es/modules/flow-chart/i18n/zh-cn.es.js +30 -0
  70. package/es/modules/flow-chart/i18n/zh-cn.es.js.map +1 -0
  71. package/es/modules/flow-chart/icons.es.js +27 -0
  72. package/es/modules/flow-chart/icons.es.js.map +1 -0
  73. package/es/modules/flow-chart/index.es.js +45 -0
  74. package/es/modules/flow-chart/index.es.js.map +1 -0
  75. package/es/modules/flow-chart/modules/context-menu.es.js +184 -0
  76. package/es/modules/flow-chart/modules/context-menu.es.js.map +1 -0
  77. package/es/modules/flow-chart/modules/control-panel.es.js +286 -0
  78. package/es/modules/flow-chart/modules/control-panel.es.js.map +1 -0
  79. package/es/modules/flow-chart/modules/custom-resize-action.es.js +150 -0
  80. package/es/modules/flow-chart/modules/custom-resize-action.es.js.map +1 -0
  81. package/es/modules/i18n.es.js.map +1 -1
  82. package/es/modules/index.es.js +4 -0
  83. package/es/modules/index.es.js.map +1 -1
  84. package/es/modules/link/formats/link.es.js.map +1 -1
  85. package/es/modules/link/modules/tooltip.es.js.map +1 -1
  86. package/es/modules/mathlive/formats.es.js.map +1 -1
  87. package/es/modules/mathlive/module.es.js.map +1 -1
  88. package/es/modules/mathlive/tooltip.es.js.map +1 -1
  89. package/es/modules/mention/constants.es.js.map +1 -1
  90. package/es/modules/mention/mention-link.es.js.map +1 -1
  91. package/es/modules/mention/mention.es.js.map +1 -1
  92. package/es/modules/mind-map/config-utils.es.js +108 -0
  93. package/es/modules/mind-map/config-utils.es.js.map +1 -0
  94. package/es/modules/mind-map/formats/mind-map-blot.es.js +356 -0
  95. package/es/modules/mind-map/formats/mind-map-blot.es.js.map +1 -0
  96. package/es/modules/mind-map/i18n/en-us.es.js +29 -0
  97. package/es/modules/mind-map/i18n/en-us.es.js.map +1 -0
  98. package/es/modules/mind-map/i18n/index.es.js +12 -0
  99. package/es/modules/mind-map/i18n/index.es.js.map +1 -0
  100. package/es/modules/mind-map/i18n/zh-cn.es.js +29 -0
  101. package/es/modules/mind-map/i18n/zh-cn.es.js.map +1 -0
  102. package/es/modules/mind-map/icons.es.js +45 -0
  103. package/es/modules/mind-map/icons.es.js.map +1 -0
  104. package/es/modules/mind-map/index.es.js +56 -0
  105. package/es/modules/mind-map/index.es.js.map +1 -0
  106. package/es/modules/mind-map/modules/context-menu.es.js +128 -0
  107. package/es/modules/mind-map/modules/context-menu.es.js.map +1 -0
  108. package/es/modules/mind-map/modules/control-panel.es.js +425 -0
  109. package/es/modules/mind-map/modules/control-panel.es.js.map +1 -0
  110. package/es/modules/mind-map/modules/custom-resize-action.es.js +161 -0
  111. package/es/modules/mind-map/modules/custom-resize-action.es.js.map +1 -0
  112. package/es/modules/shortcut-key/index.es.js +16 -0
  113. package/es/modules/shortcut-key/index.es.js.map +1 -1
  114. package/es/modules/syntax.es.js.map +1 -1
  115. package/es/modules/table-up/index.es.js.map +1 -1
  116. package/es/modules/toolbar/better-picker.es.js.map +1 -1
  117. package/es/modules/toolbar/better-toolbar.es.js.map +1 -1
  118. package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
  119. package/es/themes/snow.es.js.map +1 -1
  120. package/es/tools/format-painter.es.js.map +1 -1
  121. package/es/tools/fullscreen.es.js.map +1 -1
  122. package/es/tools/screenshot.es.js.map +1 -1
  123. package/es/ui/icons.config.es.js +4 -0
  124. package/es/ui/icons.config.es.js.map +1 -1
  125. package/es/ui/icons.es.js +4 -2
  126. package/es/ui/icons.es.js.map +1 -1
  127. package/es/utils/debounce.es.js.map +1 -1
  128. package/es/utils/image.es.js.map +1 -1
  129. package/es/utils/is.es.js.map +1 -1
  130. package/es/utils/merge.es.js +27 -0
  131. package/es/utils/merge.es.js.map +1 -0
  132. package/es/utils/method.es.js.map +1 -1
  133. package/es/utils/scroll-lock.es.js.map +1 -1
  134. package/flow-chart.css +185 -0
  135. package/lib/attributors/line-height.cjs.js.map +1 -1
  136. package/lib/config/base64-image.cjs.js.map +1 -1
  137. package/lib/config/editor.config.cjs.js +27 -0
  138. package/lib/config/editor.config.cjs.js.map +1 -1
  139. package/lib/config/editor.utils.cjs.js.map +1 -1
  140. package/lib/config/i18n/en-us.cjs.js +2 -0
  141. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  142. package/lib/config/i18n/zh-cn.cjs.js +2 -0
  143. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  144. package/lib/config/index.cjs.js +2 -0
  145. package/lib/config/index.cjs.js.map +1 -1
  146. package/lib/core/fluent-editor.cjs.js.map +1 -1
  147. package/lib/fluent-editor.cjs.js +23 -19
  148. package/lib/fluent-editor.cjs.js.map +1 -1
  149. package/lib/formats/emoji.cjs.js.map +1 -1
  150. package/lib/formats/soft-break.cjs.js.map +1 -1
  151. package/lib/formats/strike.cjs.js.map +1 -1
  152. package/lib/formats/video.cjs.js.map +1 -1
  153. package/lib/index.cjs.js +39 -6
  154. package/lib/index.cjs.js.map +1 -1
  155. package/lib/modules/ai/constants.cjs.js.map +1 -1
  156. package/lib/modules/ai/icons.cjs.js.map +1 -1
  157. package/lib/modules/ai/index.cjs.js.map +1 -1
  158. package/lib/modules/collaborative-editing/awareness/awareness.cjs.js +6 -24
  159. package/lib/modules/collaborative-editing/awareness/awareness.cjs.js.map +1 -1
  160. package/lib/modules/collaborative-editing/awareness/y-indexeddb.cjs.js +7 -3
  161. package/lib/modules/collaborative-editing/awareness/y-indexeddb.cjs.js.map +1 -1
  162. package/lib/modules/collaborative-editing/collaborative-editing.cjs.js +19 -31
  163. package/lib/modules/collaborative-editing/collaborative-editing.cjs.js.map +1 -1
  164. package/lib/modules/collaborative-editing/module.cjs.js.map +1 -1
  165. package/lib/modules/collaborative-editing/provider/providerRegistry.cjs.js.map +1 -1
  166. package/lib/modules/collaborative-editing/provider/webrtc.cjs.js +10 -23
  167. package/lib/modules/collaborative-editing/provider/webrtc.cjs.js.map +1 -1
  168. package/lib/modules/collaborative-editing/provider/websocket.cjs.js +10 -25
  169. package/lib/modules/collaborative-editing/provider/websocket.cjs.js.map +1 -1
  170. package/lib/modules/counter.cjs.js.map +1 -1
  171. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  172. package/lib/modules/custom-image/actions/action.cjs.js.map +1 -1
  173. package/lib/modules/custom-image/actions/custom-resize-action.cjs.js.map +1 -1
  174. package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -1
  175. package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js.map +1 -1
  176. package/lib/modules/custom-image/actions/toolbar-action.cjs.js.map +1 -1
  177. package/lib/modules/custom-image/actions/toolbar.cjs.js.map +1 -1
  178. package/lib/modules/custom-image/blot-formatter.cjs.js +2 -2
  179. package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -1
  180. package/lib/modules/custom-image/image.cjs.js.map +1 -1
  181. package/lib/modules/custom-image/options.cjs.js.map +1 -1
  182. package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -1
  183. package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -1
  184. package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -1
  185. package/lib/modules/custom-uploader.cjs.js.map +1 -1
  186. package/lib/modules/divider.cjs.js.map +1 -1
  187. package/lib/modules/emoji.cjs.js +2 -2
  188. package/lib/modules/emoji.cjs.js.map +1 -1
  189. package/lib/modules/file/formats/file.cjs.js.map +1 -1
  190. package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
  191. package/lib/modules/file/modules/file-module.cjs.js.map +1 -1
  192. package/lib/modules/flow-chart/config-utils.cjs.js +102 -0
  193. package/lib/modules/flow-chart/config-utils.cjs.js.map +1 -0
  194. package/lib/modules/flow-chart/formats/flow-chart-blot.cjs.js +369 -0
  195. package/lib/modules/flow-chart/formats/flow-chart-blot.cjs.js.map +1 -0
  196. package/lib/modules/flow-chart/i18n/en-us.cjs.js +30 -0
  197. package/lib/modules/flow-chart/i18n/en-us.cjs.js.map +1 -0
  198. package/lib/modules/flow-chart/i18n/index.cjs.js +12 -0
  199. package/lib/modules/flow-chart/i18n/index.cjs.js.map +1 -0
  200. package/lib/modules/flow-chart/i18n/zh-cn.cjs.js +30 -0
  201. package/lib/modules/flow-chart/i18n/zh-cn.cjs.js.map +1 -0
  202. package/lib/modules/flow-chart/icons.cjs.js +27 -0
  203. package/lib/modules/flow-chart/icons.cjs.js.map +1 -0
  204. package/lib/modules/flow-chart/index.cjs.js +45 -0
  205. package/lib/modules/flow-chart/index.cjs.js.map +1 -0
  206. package/lib/modules/flow-chart/modules/context-menu.cjs.js +184 -0
  207. package/lib/modules/flow-chart/modules/context-menu.cjs.js.map +1 -0
  208. package/lib/modules/flow-chart/modules/control-panel.cjs.js +286 -0
  209. package/lib/modules/flow-chart/modules/control-panel.cjs.js.map +1 -0
  210. package/lib/modules/flow-chart/modules/custom-resize-action.cjs.js +150 -0
  211. package/lib/modules/flow-chart/modules/custom-resize-action.cjs.js.map +1 -0
  212. package/lib/modules/i18n.cjs.js.map +1 -1
  213. package/lib/modules/index.cjs.js +9 -5
  214. package/lib/modules/index.cjs.js.map +1 -1
  215. package/lib/modules/link/formats/link.cjs.js.map +1 -1
  216. package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
  217. package/lib/modules/mathlive/formats.cjs.js.map +1 -1
  218. package/lib/modules/mathlive/module.cjs.js.map +1 -1
  219. package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
  220. package/lib/modules/mention/constants.cjs.js.map +1 -1
  221. package/lib/modules/mention/mention-link.cjs.js.map +1 -1
  222. package/lib/modules/mention/mention.cjs.js.map +1 -1
  223. package/lib/modules/mind-map/config-utils.cjs.js +108 -0
  224. package/lib/modules/mind-map/config-utils.cjs.js.map +1 -0
  225. package/lib/modules/mind-map/formats/mind-map-blot.cjs.js +356 -0
  226. package/lib/modules/mind-map/formats/mind-map-blot.cjs.js.map +1 -0
  227. package/lib/modules/mind-map/i18n/en-us.cjs.js +29 -0
  228. package/lib/modules/mind-map/i18n/en-us.cjs.js.map +1 -0
  229. package/lib/modules/mind-map/i18n/index.cjs.js +12 -0
  230. package/lib/modules/mind-map/i18n/index.cjs.js.map +1 -0
  231. package/lib/modules/mind-map/i18n/zh-cn.cjs.js +29 -0
  232. package/lib/modules/mind-map/i18n/zh-cn.cjs.js.map +1 -0
  233. package/lib/modules/mind-map/icons.cjs.js +45 -0
  234. package/lib/modules/mind-map/icons.cjs.js.map +1 -0
  235. package/lib/modules/mind-map/index.cjs.js +56 -0
  236. package/lib/modules/mind-map/index.cjs.js.map +1 -0
  237. package/lib/modules/mind-map/modules/context-menu.cjs.js +128 -0
  238. package/lib/modules/mind-map/modules/context-menu.cjs.js.map +1 -0
  239. package/lib/modules/mind-map/modules/control-panel.cjs.js +425 -0
  240. package/lib/modules/mind-map/modules/control-panel.cjs.js.map +1 -0
  241. package/lib/modules/mind-map/modules/custom-resize-action.cjs.js +161 -0
  242. package/lib/modules/mind-map/modules/custom-resize-action.cjs.js.map +1 -0
  243. package/lib/modules/shortcut-key/index.cjs.js +16 -0
  244. package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
  245. package/lib/modules/syntax.cjs.js.map +1 -1
  246. package/lib/modules/table-up/index.cjs.js.map +1 -1
  247. package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
  248. package/lib/modules/toolbar/better-toolbar.cjs.js.map +1 -1
  249. package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
  250. package/lib/themes/snow.cjs.js.map +1 -1
  251. package/lib/tools/format-painter.cjs.js.map +1 -1
  252. package/lib/tools/fullscreen.cjs.js.map +1 -1
  253. package/lib/tools/screenshot.cjs.js.map +1 -1
  254. package/lib/ui/icons.cjs.js +3 -1
  255. package/lib/ui/icons.cjs.js.map +1 -1
  256. package/lib/ui/icons.config.cjs.js +4 -0
  257. package/lib/ui/icons.config.cjs.js.map +1 -1
  258. package/lib/utils/debounce.cjs.js.map +1 -1
  259. package/lib/utils/image.cjs.js.map +1 -1
  260. package/lib/utils/is.cjs.js.map +1 -1
  261. package/lib/utils/merge.cjs.js +27 -0
  262. package/lib/utils/merge.cjs.js.map +1 -0
  263. package/lib/utils/method.cjs.js.map +1 -1
  264. package/lib/utils/scroll-lock.cjs.js.map +1 -1
  265. package/mind-map.css +224 -0
  266. package/package.json +45 -67
  267. package/patches/quill@2.0.3.patch +33 -0
  268. package/scripts/apply-patches.cjs +248 -0
  269. package/style.css +4 -2
  270. package/types/attributors/font-size.d.ts +1 -1
  271. package/types/attributors/font-style.d.ts +1 -1
  272. package/types/attributors/index.d.ts +4 -4
  273. package/types/attributors/line-height.d.ts +1 -1
  274. package/types/attributors/text-indent.d.ts +1 -1
  275. package/types/config/base64-image.d.ts +2 -2
  276. package/types/config/editor.config.d.ts +55 -11
  277. package/types/config/editor.utils.d.ts +40 -40
  278. package/types/config/i18n/en-us.d.ts +125 -123
  279. package/types/config/i18n/zh-cn.d.ts +125 -123
  280. package/types/config/index.d.ts +7 -7
  281. package/types/config/types/editor-config.interface.d.ts +11 -12
  282. package/types/config/types/editor-modules.interface.d.ts +40 -37
  283. package/types/config/types/index.d.ts +3 -3
  284. package/types/config/types/type.d.ts +2 -2
  285. package/types/core/fluent-editor.d.ts +10 -11
  286. package/types/fluent-editor.d.ts +1 -2
  287. package/types/formats/emoji.d.ts +7 -8
  288. package/types/formats/index.d.ts +4 -4
  289. package/types/formats/soft-break.d.ts +11 -12
  290. package/types/formats/strike.d.ts +7 -8
  291. package/types/formats/video.d.ts +12 -13
  292. package/types/index.d.ts +7 -8
  293. package/types/modules/ai/constants.d.ts +30 -30
  294. package/types/modules/ai/icons.d.ts +21 -21
  295. package/types/modules/ai/index.d.ts +93 -94
  296. package/types/modules/ai/types.d.ts +16 -16
  297. package/types/modules/collaborative-editing/awareness/awareness.d.ts +25 -26
  298. package/types/modules/collaborative-editing/awareness/index.d.ts +2 -2
  299. package/types/modules/collaborative-editing/awareness/y-indexeddb.d.ts +3 -3
  300. package/types/modules/collaborative-editing/collaborative-editing.d.ts +22 -22
  301. package/types/modules/collaborative-editing/index.d.ts +2 -2
  302. package/types/modules/collaborative-editing/module.d.ts +10 -11
  303. package/types/modules/collaborative-editing/provider/index.d.ts +3 -3
  304. package/types/modules/collaborative-editing/provider/providerRegistry.d.ts +25 -25
  305. package/types/modules/collaborative-editing/provider/webrtc.d.ts +35 -35
  306. package/types/modules/collaborative-editing/provider/websocket.d.ts +39 -39
  307. package/types/modules/collaborative-editing/types.d.ts +51 -35
  308. package/types/modules/counter.d.ts +21 -22
  309. package/types/modules/custom-clipboard.d.ts +23 -24
  310. package/types/modules/custom-image/actions/action.d.ts +7 -8
  311. package/types/modules/custom-image/actions/custom-resize-action.d.ts +22 -23
  312. package/types/modules/custom-image/actions/delete-action.d.ts +5 -6
  313. package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +15 -16
  314. package/types/modules/custom-image/actions/index.d.ts +6 -6
  315. package/types/modules/custom-image/actions/toolbar-action.d.ts +7 -8
  316. package/types/modules/custom-image/actions/toolbar.d.ts +16 -17
  317. package/types/modules/custom-image/blot-formatter.d.ts +19 -20
  318. package/types/modules/custom-image/image.d.ts +26 -27
  319. package/types/modules/custom-image/index.d.ts +4 -4
  320. package/types/modules/custom-image/options.d.ts +45 -46
  321. package/types/modules/custom-image/specs/blot-spec.d.ts +10 -11
  322. package/types/modules/custom-image/specs/custom-image-spec.d.ts +15 -16
  323. package/types/modules/custom-image/specs/image-spec.d.ts +7 -8
  324. package/types/modules/custom-image/specs/index.d.ts +3 -3
  325. package/types/modules/custom-uploader.d.ts +37 -38
  326. package/types/modules/divider.d.ts +7 -8
  327. package/types/modules/emoji.d.ts +35 -36
  328. package/types/modules/file/formats/file.d.ts +17 -18
  329. package/types/modules/file/index.d.ts +3 -3
  330. package/types/modules/file/modules/file-bar.d.ts +14 -14
  331. package/types/modules/file/modules/file-module.d.ts +7 -8
  332. package/types/modules/flow-chart/config-utils.d.ts +10 -0
  333. package/types/modules/flow-chart/formats/flow-chart-blot.d.ts +43 -0
  334. package/types/modules/flow-chart/i18n/en-us.d.ts +26 -0
  335. package/types/modules/flow-chart/i18n/index.d.ts +1 -0
  336. package/types/modules/flow-chart/i18n/zh-cn.d.ts +26 -0
  337. package/types/modules/flow-chart/icons.d.ts +12 -0
  338. package/types/modules/flow-chart/index.d.ts +10 -0
  339. package/types/modules/flow-chart/modules/context-menu.d.ts +3 -0
  340. package/types/modules/flow-chart/modules/control-panel.d.ts +3 -0
  341. package/types/modules/flow-chart/modules/custom-resize-action.d.ts +22 -0
  342. package/types/modules/flow-chart/options.d.ts +29 -0
  343. package/types/modules/i18n.d.ts +13 -14
  344. package/types/modules/index.d.ts +18 -16
  345. package/types/modules/link/formats/link.d.ts +14 -15
  346. package/types/modules/link/index.d.ts +2 -2
  347. package/types/modules/link/modules/tooltip.d.ts +25 -26
  348. package/types/modules/mathlive/formats.d.ts +20 -21
  349. package/types/modules/mathlive/index.d.ts +3 -3
  350. package/types/modules/mathlive/module.d.ts +7 -8
  351. package/types/modules/mathlive/tooltip.d.ts +14 -15
  352. package/types/modules/mention/constants.d.ts +3 -3
  353. package/types/modules/mention/index.d.ts +2 -2
  354. package/types/modules/mention/mention-link.d.ts +14 -15
  355. package/types/modules/mention/mention.d.ts +52 -53
  356. package/types/modules/mind-map/config-utils.d.ts +12 -0
  357. package/types/modules/mind-map/formats/mind-map-blot.d.ts +44 -0
  358. package/types/modules/mind-map/i18n/en-us.d.ts +25 -0
  359. package/types/modules/mind-map/i18n/index.d.ts +1 -0
  360. package/types/modules/mind-map/i18n/zh-cn.d.ts +25 -0
  361. package/types/modules/mind-map/icons.d.ts +21 -0
  362. package/types/modules/mind-map/index.d.ts +10 -0
  363. package/types/modules/mind-map/modules/context-menu.d.ts +3 -0
  364. package/types/modules/mind-map/modules/control-panel.d.ts +3 -0
  365. package/types/modules/mind-map/modules/custom-resize-action.d.ts +23 -0
  366. package/types/modules/mind-map/options.d.ts +27 -0
  367. package/types/modules/shortcut-key/index.d.ts +67 -68
  368. package/types/modules/syntax.d.ts +12 -13
  369. package/types/modules/table-up/index.d.ts +32 -33
  370. package/types/modules/toolbar/better-picker.d.ts +13 -14
  371. package/types/modules/toolbar/better-toolbar.d.ts +6 -7
  372. package/types/modules/toolbar/index.d.ts +3 -3
  373. package/types/modules/toolbar/toolbar-tip.d.ts +7 -8
  374. package/types/themes/snow.d.ts +9 -10
  375. package/types/tools/format-painter.d.ts +12 -13
  376. package/types/tools/fullscreen.d.ts +4 -5
  377. package/types/tools/screenshot.d.ts +17 -18
  378. package/types/ui/icons.config.d.ts +40 -38
  379. package/types/ui/icons.d.ts +6 -6
  380. package/types/utils/debounce.d.ts +6 -6
  381. package/types/utils/image.d.ts +1 -1
  382. package/types/utils/is.d.ts +6 -6
  383. package/types/utils/merge.d.ts +7 -0
  384. package/types/utils/method.d.ts +6 -6
  385. package/types/utils/scroll-lock.d.ts +6 -6
@@ -3,7 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
- const lodashEs = require("lodash-es");
6
+ const debounce = require("../utils/debounce.cjs.js");
7
7
  const DEFAULT_OPTIONS = {
8
8
  // @ts-ignore
9
9
  emojiData: window.emojiData,
@@ -72,7 +72,7 @@ class EmojiModule {
72
72
  if (!container) {
73
73
  return null;
74
74
  }
75
- const debouncedUpdate = lodashEs.debounce(() => {
75
+ const debouncedUpdate = debounce.debounce(() => {
76
76
  this.updatePickerPosition();
77
77
  }, 100);
78
78
  const resizeObserver = new ResizeObserver(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"emoji.cjs.js","sources":["../../../src/modules/emoji.ts"],"sourcesContent":["import type { EmojiMartData } from '@emoji-mart/data'\r\nimport type { computePosition } from '@floating-ui/dom'\r\nimport type { Picker } from 'emoji-mart'\r\nimport type TypeToolbar from 'quill/modules/toolbar'\r\nimport type FluentEditor from '../fluent-editor'\r\nimport { debounce } from 'lodash-es'\r\n\r\nexport interface EmojiModuleOptions {\r\n emojiData?: EmojiMartData\r\n EmojiPicker?: new (props: any) => Picker\r\n emojiPickerPosition?: typeof computePosition\r\n theme?: string\r\n locale?: string\r\n set?: string\r\n skinTonePosition?: string\r\n previewPosition?: string\r\n searchPosition?: string\r\n categories?: string[]\r\n maxFrequentRows?: number\r\n perLine?: number\r\n navPosition?: string\r\n noCountryFlags?: boolean\r\n dynamicWidth?: boolean\r\n}\r\n\r\nconst DEFAULT_OPTIONS: EmojiModuleOptions = {\r\n // @ts-ignore\r\n emojiData: window.emojiData,\r\n // @ts-ignore\r\n EmojiPicker: window.EmojiPicker,\r\n // @ts-ignore\r\n emojiPickerPosition: window.emojiPickerPosition,\r\n theme: 'light',\r\n set: 'native',\r\n skinTonePosition: 'none',\r\n previewPosition: 'bottom',\r\n searchPosition: 'sticky',\r\n categories: ['frequent', 'people', 'nature', 'foods', 'activity', 'places', 'objects', 'symbols', 'flags'],\r\n maxFrequentRows: 2,\r\n perLine: 8,\r\n navPosition: 'top',\r\n noCountryFlags: false,\r\n dynamicWidth: false,\r\n}\r\n\r\nconst PICKER_DOM_ID = 'emoji-picker'\r\n\r\nconst LOCALE_MAP = {\r\n 'zh-CN': 'zh',\r\n 'en-US': 'en',\r\n} as const\r\n\r\nclass EmojiModule {\r\n private readonly quill: FluentEditor\r\n private readonly options: EmojiModuleOptions\r\n private picker: HTMLElement | null = null\r\n private isPickerVisible = false\r\n private cleanupResizeObserver: (() => void) | null = null\r\n\r\n constructor(quill: FluentEditor, options: EmojiModuleOptions = {}) {\r\n this.quill = quill\r\n\r\n this.options = { ...DEFAULT_OPTIONS, ...options }\r\n\r\n const toolbar = this.quill.getModule('toolbar') as TypeToolbar\r\n\r\n if (toolbar) {\r\n toolbar.addHandler('emoji', () => {\r\n if (this.isPickerVisible) {\r\n this.closeDialog()\r\n }\r\n else {\r\n this.openDialog()\r\n }\r\n })\r\n }\r\n }\r\n\r\n private getEmojiButton() {\r\n return document.querySelector('.ql-emoji') as HTMLElement | null\r\n }\r\n\r\n private async updatePickerPosition() {\r\n const button = this.getEmojiButton()\r\n const pickerElement = document.getElementById(PICKER_DOM_ID)\r\n\r\n if (!button || !this.picker || !pickerElement) {\r\n return\r\n }\r\n\r\n const { emojiPickerPosition } = this.options\r\n\r\n try {\r\n const { x, y } = await emojiPickerPosition(button, pickerElement)\r\n this.picker.style.top = `${y}px`\r\n this.picker.style.left = `${x}px`\r\n }\r\n catch (error) {\r\n console.warn('Failed to compute picker position:', error)\r\n }\r\n }\r\n\r\n // 监听容器大小变化,更新表情选择弹窗位置\r\n private setupContainerResizeObserver() {\r\n const container = this.quill.root.parentElement\r\n if (!container) {\r\n return null\r\n }\r\n\r\n const debouncedUpdate = debounce(() => {\r\n this.updatePickerPosition()\r\n }, 100)\r\n\r\n const resizeObserver = new ResizeObserver(() => {\r\n debouncedUpdate()\r\n })\r\n\r\n resizeObserver.observe(container)\r\n\r\n return () => {\r\n resizeObserver.disconnect()\r\n debouncedUpdate.cancel()\r\n }\r\n }\r\n\r\n // 创建表情选择弹窗\r\n private createPicker() {\r\n const { EmojiPicker, emojiData, ...options } = this.options\r\n\r\n const pickerConfig = {\r\n // emoji-mart 与 tiny-editor 国际化的的 locale 不一致使用 LOCALE_MAP 转换\r\n locale: LOCALE_MAP[this.quill.lang] ?? 'en',\r\n data: emojiData,\r\n ...options,\r\n onEmojiSelect: this.handleEmojiSelect.bind(this),\r\n onClickOutside: this.handleClickOutside.bind(this),\r\n }\r\n\r\n const picker = new EmojiPicker(pickerConfig) as unknown as HTMLElement\r\n\r\n // 设置样式和属性\r\n picker.id = PICKER_DOM_ID\r\n picker.style.position = 'absolute'\r\n picker.style.zIndex = '1000'\r\n\r\n return picker\r\n }\r\n\r\n // 打开表情弹窗\r\n public openDialog() {\r\n if (this.picker) {\r\n return\r\n }\r\n\r\n try {\r\n this.picker = this.createPicker()\r\n document.body.appendChild(this.picker)\r\n\r\n this.updatePickerPosition()\r\n this.cleanupResizeObserver = this.setupContainerResizeObserver()\r\n this.isPickerVisible = true\r\n }\r\n catch (error) {\r\n console.error('Failed to open emoji picker:', error)\r\n this.closeDialog()\r\n }\r\n }\r\n\r\n // 关闭表情弹窗\r\n public closeDialog() {\r\n if (!this.picker) {\r\n return\r\n }\r\n\r\n this.isPickerVisible = false\r\n this.picker.remove()\r\n this.picker = null\r\n\r\n this.cleanupResizeObserver?.()\r\n this.cleanupResizeObserver = null\r\n }\r\n\r\n // 处理表情选择事件\r\n private handleEmojiSelect(emoji: { native: string }) {\r\n const selection = this.quill.getSelection(true)\r\n if (!selection) {\r\n console.warn('No selection available for emoji insertion')\r\n return\r\n }\r\n\r\n try {\r\n // 记录插入位置\r\n const insertIndex = selection.index\r\n this.quill.insertText(insertIndex, emoji.native, 'user')\r\n\r\n this.closeDialog()\r\n\r\n // 设置光标到表情符号后面\r\n this.quill.setSelection(insertIndex + emoji.native.length)\r\n }\r\n catch (error) {\r\n console.error('Failed to insert emoji:', error)\r\n }\r\n }\r\n\r\n // 处理外部点击事件\r\n private handleClickOutside(event: MouseEvent) {\r\n const button = this.getEmojiButton()\r\n\r\n const target = event.target\r\n\r\n const isClickOnButton = target === button || (target instanceof Element && button?.contains(target))\r\n\r\n // 如果点击的是表情符号按钮或其子元素,则不关闭选择器\r\n if (isClickOnButton) {\r\n return\r\n }\r\n\r\n this.closeDialog()\r\n }\r\n\r\n // 销毁模块,清理资源\r\n public destroy() {\r\n this.cleanupResizeObserver?.()\r\n this.cleanupResizeObserver = null\r\n this.closeDialog()\r\n }\r\n}\r\n\r\nexport { EmojiModule }\r\n"],"names":["debounce"],"mappings":";;;;;;AAyBA,MAAM,kBAAsC;AAAA;AAAA,EAE1C,WAAW,OAAO;AAAA;AAAA,EAElB,aAAa,OAAO;AAAA;AAA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SAAK,kBAAkB;AACvB,SAAK,OAAO,OAAO;AACnB,SAAK,SAAS;AAEd,eAAK,0BAAL;AACA,SAAK,wBAAwB;AAAA,EAAA;AAAA;AAAA,EAIvB,kBAAkB,OAA2B;AACnD,UAAM,YAAY,KAAK,MAAM,aAAa,IAAI;AAC9C,QAAI,CAAC,WAAW;AACd,cAAQ,KAAK,4CAA4C;AACzD;AAAA,IAAA;AAGE,QAAA;AAEF,YAAM,cAAc,UAAU;AAC9B,WAAK,MAAM,WAAW,aAAa,MAAM,QAAQ,MAAM;AAEvD,WAAK,YAAY;AAGjB,WAAK,MAAM,aAAa,cAAc,MAAM,OAAO,MAAM;AAAA,aAEpD,OAAO;AACJ,cAAA,MAAM,2BAA2B,KAAK;AAAA,IAAA;AAAA,EAChD;AAAA;AAAA,EAIM,mBAAmB,OAAmB;AACtC,UAAA,SAAS,KAAK,eAAe;AAEnC,UAAM,SAAS,MAAM;AAErB,UAAM,kBAAkB,WAAW,UAAW,kBAAkB,YAAW,iCAAQ,SAAS;AAG5F,QAAI,iBAAiB;AACnB;AAAA,IAAA;AAGF,SAAK,YAAY;AAAA,EAAA;AAAA;AAAA,EAIZ,UAAU;;AACf,eAAK,0BAAL;AACA,SAAK,wBAAwB;AAC7B,SAAK,YAAY;AAAA,EAAA;AAErB;;"}
1
+ {"version":3,"file":"emoji.cjs.js","sources":["../../../src/modules/emoji.ts"],"sourcesContent":["import type { EmojiMartData } from '@emoji-mart/data'\nimport type { computePosition } from '@floating-ui/dom'\nimport type { Picker } from 'emoji-mart'\nimport type TypeToolbar from 'quill/modules/toolbar'\nimport type FluentEditor from '../fluent-editor'\nimport { debounce } from '../utils/debounce'\n\nexport interface EmojiModuleOptions {\n emojiData?: EmojiMartData\n EmojiPicker?: new (props: any) => Picker\n emojiPickerPosition?: typeof computePosition\n theme?: string\n locale?: string\n set?: string\n skinTonePosition?: string\n previewPosition?: string\n searchPosition?: string\n categories?: string[]\n maxFrequentRows?: number\n perLine?: number\n navPosition?: string\n noCountryFlags?: boolean\n dynamicWidth?: boolean\n}\n\nconst DEFAULT_OPTIONS: EmojiModuleOptions = {\n // @ts-ignore\n emojiData: window.emojiData,\n // @ts-ignore\n EmojiPicker: window.EmojiPicker,\n // @ts-ignore\n emojiPickerPosition: window.emojiPickerPosition,\n theme: 'light',\n set: 'native',\n skinTonePosition: 'none',\n previewPosition: 'bottom',\n searchPosition: 'sticky',\n categories: ['frequent', 'people', 'nature', 'foods', 'activity', 'places', 'objects', 'symbols', 'flags'],\n maxFrequentRows: 2,\n perLine: 8,\n navPosition: 'top',\n noCountryFlags: false,\n dynamicWidth: false,\n}\n\nconst PICKER_DOM_ID = 'emoji-picker'\n\nconst LOCALE_MAP = {\n 'zh-CN': 'zh',\n 'en-US': 'en',\n} as const\n\nclass EmojiModule {\n private readonly quill: FluentEditor\n private readonly options: EmojiModuleOptions\n private picker: HTMLElement | null = null\n private isPickerVisible = false\n private cleanupResizeObserver: (() => void) | null = null\n\n constructor(quill: FluentEditor, options: EmojiModuleOptions = {}) {\n this.quill = quill\n\n this.options = { ...DEFAULT_OPTIONS, ...options }\n\n const toolbar = this.quill.getModule('toolbar') as TypeToolbar\n\n if (toolbar) {\n toolbar.addHandler('emoji', () => {\n if (this.isPickerVisible) {\n this.closeDialog()\n }\n else {\n this.openDialog()\n }\n })\n }\n }\n\n private getEmojiButton() {\n return document.querySelector('.ql-emoji') as HTMLElement | null\n }\n\n private async updatePickerPosition() {\n const button = this.getEmojiButton()\n const pickerElement = document.getElementById(PICKER_DOM_ID)\n\n if (!button || !this.picker || !pickerElement) {\n return\n }\n\n const { emojiPickerPosition } = this.options\n\n try {\n const { x, y } = await emojiPickerPosition(button, pickerElement)\n this.picker.style.top = `${y}px`\n this.picker.style.left = `${x}px`\n }\n catch (error) {\n console.warn('Failed to compute picker position:', error)\n }\n }\n\n // 监听容器大小变化,更新表情选择弹窗位置\n private setupContainerResizeObserver() {\n const container = this.quill.root.parentElement\n if (!container) {\n return null\n }\n\n const debouncedUpdate = debounce(() => {\n this.updatePickerPosition()\n }, 100)\n\n const resizeObserver = new ResizeObserver(() => {\n debouncedUpdate()\n })\n\n resizeObserver.observe(container)\n\n return () => {\n resizeObserver.disconnect()\n debouncedUpdate.cancel()\n }\n }\n\n // 创建表情选择弹窗\n private createPicker() {\n const { EmojiPicker, emojiData, ...options } = this.options\n\n const pickerConfig = {\n // emoji-mart 与 tiny-editor 国际化的的 locale 不一致使用 LOCALE_MAP 转换\n locale: LOCALE_MAP[this.quill.lang] ?? 'en',\n data: emojiData,\n ...options,\n onEmojiSelect: this.handleEmojiSelect.bind(this),\n onClickOutside: this.handleClickOutside.bind(this),\n }\n\n const picker = new EmojiPicker(pickerConfig) as unknown as HTMLElement\n\n // 设置样式和属性\n picker.id = PICKER_DOM_ID\n picker.style.position = 'absolute'\n picker.style.zIndex = '1000'\n\n return picker\n }\n\n // 打开表情弹窗\n public openDialog() {\n if (this.picker) {\n return\n }\n\n try {\n this.picker = this.createPicker()\n document.body.appendChild(this.picker)\n\n this.updatePickerPosition()\n this.cleanupResizeObserver = this.setupContainerResizeObserver()\n this.isPickerVisible = true\n }\n catch (error) {\n console.error('Failed to open emoji picker:', error)\n this.closeDialog()\n }\n }\n\n // 关闭表情弹窗\n public closeDialog() {\n if (!this.picker) {\n return\n }\n\n this.isPickerVisible = false\n this.picker.remove()\n this.picker = null\n\n this.cleanupResizeObserver?.()\n this.cleanupResizeObserver = null\n }\n\n // 处理表情选择事件\n private handleEmojiSelect(emoji: { native: string }) {\n const selection = this.quill.getSelection(true)\n if (!selection) {\n console.warn('No selection available for emoji insertion')\n return\n }\n\n try {\n // 记录插入位置\n const insertIndex = selection.index\n this.quill.insertText(insertIndex, emoji.native, 'user')\n\n this.closeDialog()\n\n // 设置光标到表情符号后面\n this.quill.setSelection(insertIndex + emoji.native.length)\n }\n catch (error) {\n console.error('Failed to insert emoji:', error)\n }\n }\n\n // 处理外部点击事件\n private handleClickOutside(event: MouseEvent) {\n const button = this.getEmojiButton()\n\n const target = event.target\n\n const isClickOnButton = target === button || (target instanceof Element && button?.contains(target))\n\n // 如果点击的是表情符号按钮或其子元素,则不关闭选择器\n if (isClickOnButton) {\n return\n }\n\n this.closeDialog()\n }\n\n // 销毁模块,清理资源\n public destroy() {\n this.cleanupResizeObserver?.()\n this.cleanupResizeObserver = null\n this.closeDialog()\n }\n}\n\nexport { EmojiModule }\n"],"names":["debounce"],"mappings":";;;;;;AAyBA,MAAM,kBAAsC;AAAA;AAAA,EAE1C,WAAW,OAAO;AAAA;AAAA,EAElB,aAAa,OAAO;AAAA;AAAA,EAEpB,qBAAqB,OAAO;AAAA,EAC5B,OAAO;AAAA,EACP,KAAK;AAAA,EACL,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,YAAY,CAAC,YAAY,UAAU,UAAU,SAAS,YAAY,UAAU,WAAW,WAAW,OAAO;AAAA,EACzG,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,cAAc;AAChB;AAEA,MAAM,gBAAgB;AAEtB,MAAM,aAAa;AAAA,EACjB,SAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,YAAY;AAAA,EAOhB,YAAY,OAAqB,UAA8B,IAAI;AANlD;AACA;AACT,kCAA6B;AAC7B,2CAAkB;AAClB,iDAA6C;AAGnD,SAAK,QAAQ;AAEb,SAAK,UAAU,EAAE,GAAG,iBAAiB,GAAG,QAAA;AAExC,UAAM,UAAU,KAAK,MAAM,UAAU,SAAS;AAE9C,QAAI,SAAS;AACX,cAAQ,WAAW,SAAS,MAAM;AAChC,YAAI,KAAK,iBAAiB;AACxB,eAAK,YAAA;AAAA,QACP,OACK;AACH,eAAK,WAAA;AAAA,QACP;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEQ,iBAAiB;AACvB,WAAO,SAAS,cAAc,WAAW;AAAA,EAC3C;AAAA,EAEA,MAAc,uBAAuB;AAC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ats/file.ts"],"sourcesContent":["import type TypeEmbed from 'quill/blots/embed'\r\nimport Quill from 'quill'\r\nimport { sanitize } from '../../../config/editor.utils'\r\n\r\nconst Embed = Quill.import('blots/embed') as typeof TypeEmbed\r\nconst FILE_ATTRIBUTES = ['id', 'title', 'size', 'lastModified']\r\n\r\nexport interface FileValue {\r\n size: number\r\n src: string\r\n title: string\r\n}\r\nexport class File extends Embed {\r\n static blotName = 'file'\r\n static tagName = 'A'\r\n static className = 'ql-file-item'\r\n static PROTOCOL_WHITELIST = ['http', 'https', 'blob']\r\n\r\n static create(value: FileValue) {\r\n const node = super.create(value) as HTMLAnchorElement\r\n const size = value.size / 1024\r\n const fixSize = !size ? 0 : size < 1 ? 1 : size.toFixed(0)\r\n node.classList.add('icon-file')\r\n node.setAttribute('contenteditable', 'false')\r\n const fileSvg = '<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326z m1.8 562H232V136h302v216c0 23.2 18.8 42 42 42h216v494z\" p-id=\"2307\"></path></svg>'\r\n node.innerHTML = `${fileSvg} ${value.title} (${fixSize} KB)`\r\n const src = this.sanitize(value.src)\r\n if (src) {\r\n node.href = src\r\n node.target = '_blank'\r\n }\r\n FILE_ATTRIBUTES.forEach((key) => {\r\n if (value[key]) {\r\n node.dataset[key] = value[key]\r\n }\r\n })\r\n return node\r\n }\r\n\r\n static value(domNode: HTMLAnchorElement) {\r\n return this.getFormats(domNode)\r\n }\r\n\r\n static getFormats(domNode: HTMLAnchorElement) {\r\n const formats: Record<string, string> = {}\r\n const href = this.sanitize(domNode.href)\r\n if (href) {\r\n formats.src = href\r\n }\r\n FILE_ATTRIBUTES.forEach((key) => {\r\n if (domNode.dataset[key]) {\r\n formats[key] = domNode.dataset[key]\r\n }\r\n })\r\n return formats\r\n }\r\n\r\n static sanitize(url: string) {\r\n return (sanitize(url, this.PROTOCOL_WHITELIST) && url) || ''\r\n }\r\n}\r\n"],"names":["sanitize"],"mappings":";;;;;;;AAIA,MAAM,QAAQ,MAAM,OAAO,aAAa;AACxC,MAAM,kBAAkB,CAAC,MAAM,SAAS,QAAQ,cAAc;AAOvD,MAAM,aAAa,MAAM;AAAA,EAM9B,OAAO,OAAO,OAAkB;AACxB,UAAA,OAAO,MAAM,OAAO,KAAK;AACzB,UAAA,OAAO,MAAM,OAAO;AACpB,UAAA,UAAU,CAAC,OAAO,IAAI,OAAO,IAAI,IAAI,KAAK,QAAQ,CAAC;AACpD,SAAA,UAAU,IAAI,WAAW;AACzB,SAAA,aAAa,mBAAmB,OAAO;AAC5C,UAAM,UAAU;AAChB,SAAK,YAAY,GAAG,OAAO,IAAI,MAAM,KAAK,KAAK,OAAO;AACtD,UAAM,MAAM,KAAK,SAAS,MAAM,GAAG;AACnC,QAAI,KAAK;AACP,WAAK,OAAO;AACZ,WAAK,SAAS;AAAA,IAAA;AAEA,oBAAA,QAAQ,CAAC,QAAQ;AAC3B,UAAA,MAAM,GAAG,GAAG;AACd,aAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,MAAA;AAAA,IAC/B,CACD;AACM,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAA4B;AAChC,WAAA,KAAK,WAAW,OAAO;AAAA,EAAA;AAAA,EAGhC,OAAO,WAAW,SAA4B;AAC5C,UAAM,UAAkC,CAAC;AACzC,UAAM,OAAO,KAAK,SAAS,QAAQ,IAAI;AACvC,QAAI,MAAM;AACR,cAAQ,MAAM;AAAA,IAAA;AAEA,oBAAA,QAAQ,CAAC,QAAQ;AAC3B,UAAA,QAAQ,QAAQ,GAAG,GAAG;AACxB,gBAAQ,GAAG,IAAI,QAAQ,QAAQ,GAAG;AAAA,MAAA;AAAA,IACpC,CACD;AACM,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,SAAS,KAAa;AAC3B,WAAQA,aAAAA,SAAS,KAAK,KAAK,kBAAkB,KAAK,OAAQ;AAAA,EAAA;AAE9D;AA/CE,cADW,MACJ,YAAW;AAClB,cAFW,MAEJ,WAAU;AACjB,cAHW,MAGJ,aAAY;AACnB,cAJW,MAIJ,sBAAqB,CAAC,QAAQ,SAAS,MAAM;;"}
1
+ {"version":3,"file":"file.cjs.js","sources":["../../../../../src/modules/file/formats/file.ts"],"sourcesContent":["import type TypeEmbed from 'quill/blots/embed'\nimport Quill from 'quill'\nimport { sanitize } from '../../../config/editor.utils'\n\nconst Embed = Quill.import('blots/embed') as typeof TypeEmbed\nconst FILE_ATTRIBUTES = ['id', 'title', 'size', 'lastModified']\n\nexport interface FileValue {\n size: number\n src: string\n title: string\n}\nexport class File extends Embed {\n static blotName = 'file'\n static tagName = 'A'\n static className = 'ql-file-item'\n static PROTOCOL_WHITELIST = ['http', 'https', 'blob']\n\n static create(value: FileValue) {\n const node = super.create(value) as HTMLAnchorElement\n const size = value.size / 1024\n const fixSize = !size ? 0 : size < 1 ? 1 : size.toFixed(0)\n node.classList.add('icon-file')\n node.setAttribute('contenteditable', 'false')\n const fileSvg = '<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326z m1.8 562H232V136h302v216c0 23.2 18.8 42 42 42h216v494z\" p-id=\"2307\"></path></svg>'\n node.innerHTML = `${fileSvg} ${value.title} (${fixSize} KB)`\n const src = this.sanitize(value.src)\n if (src) {\n node.href = src\n node.target = '_blank'\n }\n FILE_ATTRIBUTES.forEach((key) => {\n if (value[key]) {\n node.dataset[key] = value[key]\n }\n })\n return node\n }\n\n static value(domNode: HTMLAnchorElement) {\n return this.getFormats(domNode)\n }\n\n static getFormats(domNode: HTMLAnchorElement) {\n const formats: Record<string, string> = {}\n const href = this.sanitize(domNode.href)\n if (href) {\n formats.src = href\n }\n FILE_ATTRIBUTES.forEach((key) => {\n if (domNode.dataset[key]) {\n formats[key] = domNode.dataset[key]\n }\n })\n return formats\n }\n\n static sanitize(url: string) {\n return (sanitize(url, this.PROTOCOL_WHITELIST) && url) || ''\n }\n}\n"],"names":["sanitize"],"mappings":";;;;;;;AAIA,MAAM,QAAQ,MAAM,OAAO,aAAa;AACxC,MAAM,kBAAkB,CAAC,MAAM,SAAS,QAAQ,cAAc;AAOvD,MAAM,aAAa,MAAM;AAAA,EAM9B,OAAO,OAAO,OAAkB;AAC9B,UAAM,OAAO,MAAM,OAAO,KAAK;AAC/B,UAAM,OAAO,MAAM,OAAO;AAC1B,UAAM,UAAU,CAAC,OAAO,IAAI,OAAO,IAAI,IAAI,KAAK,QAAQ,CAAC;AACzD,SAAK,UAAU,IAAI,WAAW;AAC9B,SAAK,aAAa,mBAAmB,OAAO;AAC5C,UAAM,UAAU;AAChB,SAAK,YAAY,GAAG,OAAO,IAAI,MAAM,KAAK,KAAK,OAAO;AACtD,UAAM,MAAM,KAAK,SAAS,MAAM,GAAG;AACnC,QAAI,KAAK;AACP,WAAK,OAAO;AACZ,WAAK,SAAS;AAAA,IAChB;AACA,oBAAgB,QAAQ,CAAC,QAAQ;AAC/B,UAAI,MAAM,GAAG,GAAG;AACd,aAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,MAC/B;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,MAAM,SAA4B;AACvC,WAAO,KAAK,WAAW,OAAO;AAAA,EAChC;AAAA,EAEA,OAAO,WAAW,SAA4B;AAC5C,UAAM,UAAkC,CAAA;AACxC,UAAM,OAAO,KAAK,SAAS,QAAQ,IAAI;AACvC,QAAI,MAAM;AACR,cAAQ,MAAM;AAAA,IAChB;AACA,oBAAgB,QAAQ,CAAC,QAAQ;AAC/B,UAAI,QAAQ,QAAQ,GAAG,GAAG;AACxB,gBAAQ,GAAG,IAAI,QAAQ,QAAQ,GAAG;AAAA,MACpC;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,SAAS,KAAa;AAC3B,WAAQA,aAAAA,SAAS,KAAK,KAAK,kBAAkB,KAAK,OAAQ;AAAA,EAC5D;AACF;AA/CE,cADW,MACJ,YAAW;AAClB,cAFW,MAEJ,WAAU;AACjB,cAHW,MAGJ,aAAY;AACnB,cAJW,MAIJ,sBAAqB,CAAC,QAAQ,SAAS,MAAM;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-bar.cjs.js","sources":["../../../../../src/modules/file/modules/file-bar.ts"],"sourcesContent":["import Quill from 'quill'\r\nimport { Range } from 'quill/core/selection'\r\nimport { unshiftString } from '../../../utils/method'\r\nimport { File } from '../formats/file'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\nexport class FileBar {\r\n quill: any\r\n file: any\r\n domNode: HTMLElement\r\n fileRange: any\r\n template: string\r\n\r\n constructor(quill, target) {\r\n this.quill = quill\r\n this.file = target\r\n const fileBlot = Quill.find(target)\r\n const index = this.quill.getIndex(fileBlot)\r\n const [fileItem, offset] = this.quill.scroll.descendant(File, index)\r\n const length = fileItem && fileItem.length()\r\n this.fileRange = new Range(index - offset, length)\r\n\r\n const timestamp = Number(this.file.dataset.lastModified)\r\n const _lastModifiedDate = this.formatDate(timestamp)\r\n this.template = [\r\n // `<a class=\"ql-last-modified-date\" href=\"${this.file.href}\" target=\"_blank\">${this.file.href}</a>`,\r\n // '<span class=\"ql-split\"></span>',\r\n // `<a class=\"ql-file-preview\"><i class=\"icon-preview\"></i></a>`,\r\n `<a class=\"ql-file-download\"><i class=\"icon-download\"></i></a>`,\r\n '<a class=\"ql-file-delete\"><i class=\"icon-delete\"></i></a>',\r\n ].join('')\r\n\r\n this.createFileBar()\r\n }\r\n\r\n createFileBar() {\r\n this.domNode = document.createElement('div')\r\n this.domNode.className = 'ql-file-bar'\r\n this.domNode.innerHTML = this.template\r\n // 查看文件\r\n const filePreview = this.domNode.querySelector('a.ql-file-preview')\r\n if (filePreview) {\r\n filePreview.addEventListener('click', (event) => {\r\n this.operateFile(event, 'view')\r\n })\r\n }\r\n // 下载文件\r\n const fileDownload = this.domNode.querySelector('a.ql-file-download')\r\n if (fileDownload) {\r\n fileDownload.addEventListener('click', (event) => {\r\n this.operateFile(event, 'download')\r\n })\r\n }\r\n // 删除文件\r\n const fileDelete = this.domNode.querySelector('a.ql-file-delete')\r\n if (fileDelete) {\r\n fileDelete.addEventListener('click', (event) => {\r\n this.operateFile(event, 'delete')\r\n const delta = new Delta()\r\n .retain(this.fileRange.index)\r\n .delete(this.fileRange.length)\r\n this.quill.updateContents(delta, Quill.sources.USER)\r\n this.quill.setSelection(this.fileRange.index)\r\n })\r\n }\r\n\r\n this.setPosition()\r\n this.quill.root.parentNode.appendChild(this.domNode)\r\n }\r\n\r\n destroy() {\r\n if (this.domNode) {\r\n this.domNode.remove()\r\n this.domNode = null\r\n this.file = null\r\n }\r\n }\r\n\r\n operateFile(event, operate) {\r\n event.preventDefault()\r\n const fileId = this.file.dataset.id || ''\r\n const fileName = this.file.dataset.title || ''\r\n const fileDownloadUrl = this.file.href || ''\r\n if (fileId) {\r\n this.quill.emitter.emit('file-change', {\r\n operation: operate,\r\n data: { fileId, fileDownloadUrl },\r\n })\r\n }\r\n if (operate === 'download') {\r\n const a = document.createElement('a')\r\n a.href = fileDownloadUrl\r\n a.target = '_blank'\r\n a.id = 'exppub'\r\n a.download = fileName\r\n document.body.appendChild(a)\r\n const alink = document.getElementById('exppub')\r\n alink.click()\r\n alink.parentNode.removeChild(a)\r\n }\r\n this.destroy()\r\n }\r\n\r\n setPosition() {\r\n if (this.domNode && this.file) {\r\n const parent = this.quill.root.parentNode\r\n const child = this.file.querySelector('span')\r\n const containerRect = parent.getBoundingClientRect()\r\n const fileRect = child.getBoundingClientRect()\r\n this.css(this.domNode, {\r\n left: `${fileRect.left - containerRect.left}px`,\r\n top: `${fileRect.top - containerRect.top + 10}px`,\r\n })\r\n }\r\n }\r\n\r\n css(domNode, rules) {\r\n if (typeof rules === 'object') {\r\n for (const prop in rules) {\r\n if (prop) {\r\n if (Array.isArray(rules[prop])) {\r\n // 兼容IE11浏览器\r\n rules[prop].forEach((val) => {\r\n domNode.style[prop] = val\r\n })\r\n }\r\n else {\r\n domNode.style[prop] = rules[prop]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n formatDate(timestamp) {\r\n const date = new Date(timestamp)\r\n const year = date.getFullYear()\r\n // TODO\r\n const month = unshiftString(`${date.getMonth() + 1}`, 2, '0')\r\n const day = unshiftString(`${date.getDate()}`, 2, '0')\r\n const hour = unshiftString(`${date.getHours()}`, 2, '0')\r\n const minute = unshiftString(`${date.getMinutes()}`, 2, '0')\r\n return Number.isNaN(year) ? '--' : `${year}/${month}/${day} ${hour}:${minute}`\r\n }\r\n}\r\n"],"names":["File","Range","unshiftString"],"mappings":";;;;;;;;;AAKA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAE3B,MAAM,QAAQ;AAAA,EAOnB,YAAY,OAAO,QAAQ;AAN3B;AACA;AACA;AACA;AACA;AAGE,SAAK,QAAQ;AACb,SAAK,OAAO;AACN,UAAA,WAAW,MAAM,KAAK,MAAM;AAClC,UAAM,QAAQ,KAAK,MAAM,SAAS,QAAQ;AACpC,UAAA,CAAC,UAAU,MAAM,IAAI,KAAK,MAAM,OAAO,WAAWA,KAAA,MAAM,KAAK;AAC7D,UAAA,SAAS,YAAY,SAAS,OAAO;AAC3C,SAAK,YAAY,IAAIC,UAAAA,MAAM,QAAQ,QAAQ,MAAM;AAEjD,UAAM,YAAY,OAAO,KAAK,KAAK,QAAQ,YAAY;AACjD,UAAA,oBAAoB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AAAA,IACF;AAAA,EACF;AAAA,EAGF,WAAW,WAAW;AACd,UAAA,OAAO,IAAI,KAAK,SAAS;AACzB,UAAA,OAAO,KAAK,YAAY;AAExB,UAAA,QAAQC,qBAAc,GAAG,KAAK,SAAa,IAAA,CAAC,IAAI,GAAG,GAAG;AACtD,UAAA,MAAMA,qBAAc,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG;AAC/C,UAAA,OAAOA,qBAAc,GAAG,KAAK,UAAU,IAAI,GAAG,GAAG;AACjD,UAAA,SAASA,qBAAc,GAAG,KAAK,YAAY,IAAI,GAAG,GAAG;AAC3D,WAAO,OAAO,MAAM,IAAI,IAAI,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,IAAI,IAAI,MAAM;AAAA,EAAA;AAEhF;;"}
1
+ {"version":3,"file":"file-bar.cjs.js","sources":["../../../../../src/modules/file/modules/file-bar.ts"],"sourcesContent":["import Quill from 'quill'\nimport { Range } from 'quill/core/selection'\nimport { unshiftString } from '../../../utils/method'\nimport { File } from '../formats/file'\n\nconst Delta = Quill.import('delta')\n\nexport class FileBar {\n quill: any\n file: any\n domNode: HTMLElement\n fileRange: any\n template: string\n\n constructor(quill, target) {\n this.quill = quill\n this.file = target\n const fileBlot = Quill.find(target)\n const index = this.quill.getIndex(fileBlot)\n const [fileItem, offset] = this.quill.scroll.descendant(File, index)\n const length = fileItem && fileItem.length()\n this.fileRange = new Range(index - offset, length)\n\n const timestamp = Number(this.file.dataset.lastModified)\n const _lastModifiedDate = this.formatDate(timestamp)\n this.template = [\n // `<a class=\"ql-last-modified-date\" href=\"${this.file.href}\" target=\"_blank\">${this.file.href}</a>`,\n // '<span class=\"ql-split\"></span>',\n // `<a class=\"ql-file-preview\"><i class=\"icon-preview\"></i></a>`,\n `<a class=\"ql-file-download\"><i class=\"icon-download\"></i></a>`,\n '<a class=\"ql-file-delete\"><i class=\"icon-delete\"></i></a>',\n ].join('')\n\n this.createFileBar()\n }\n\n createFileBar() {\n this.domNode = document.createElement('div')\n this.domNode.className = 'ql-file-bar'\n this.domNode.innerHTML = this.template\n // 查看文件\n const filePreview = this.domNode.querySelector('a.ql-file-preview')\n if (filePreview) {\n filePreview.addEventListener('click', (event) => {\n this.operateFile(event, 'view')\n })\n }\n // 下载文件\n const fileDownload = this.domNode.querySelector('a.ql-file-download')\n if (fileDownload) {\n fileDownload.addEventListener('click', (event) => {\n this.operateFile(event, 'download')\n })\n }\n // 删除文件\n const fileDelete = this.domNode.querySelector('a.ql-file-delete')\n if (fileDelete) {\n fileDelete.addEventListener('click', (event) => {\n this.operateFile(event, 'delete')\n const delta = new Delta()\n .retain(this.fileRange.index)\n .delete(this.fileRange.length)\n this.quill.updateContents(delta, Quill.sources.USER)\n this.quill.setSelection(this.fileRange.index)\n })\n }\n\n this.setPosition()\n this.quill.root.parentNode.appendChild(this.domNode)\n }\n\n destroy() {\n if (this.domNode) {\n this.domNode.remove()\n this.domNode = null\n this.file = null\n }\n }\n\n operateFile(event, operate) {\n event.preventDefault()\n const fileId = this.file.dataset.id || ''\n const fileName = this.file.dataset.title || ''\n const fileDownloadUrl = this.file.href || ''\n if (fileId) {\n this.quill.emitter.emit('file-change', {\n operation: operate,\n data: { fileId, fileDownloadUrl },\n })\n }\n if (operate === 'download') {\n const a = document.createElement('a')\n a.href = fileDownloadUrl\n a.target = '_blank'\n a.id = 'exppub'\n a.download = fileName\n document.body.appendChild(a)\n const alink = document.getElementById('exppub')\n alink.click()\n alink.parentNode.removeChild(a)\n }\n this.destroy()\n }\n\n setPosition() {\n if (this.domNode && this.file) {\n const parent = this.quill.root.parentNode\n const child = this.file.querySelector('span')\n const containerRect = parent.getBoundingClientRect()\n const fileRect = child.getBoundingClientRect()\n this.css(this.domNode, {\n left: `${fileRect.left - containerRect.left}px`,\n top: `${fileRect.top - containerRect.top + 10}px`,\n })\n }\n }\n\n css(domNode, rules) {\n if (typeof rules === 'object') {\n for (const prop in rules) {\n if (prop) {\n if (Array.isArray(rules[prop])) {\n // 兼容IE11浏览器\n rules[prop].forEach((val) => {\n domNode.style[prop] = val\n })\n }\n else {\n domNode.style[prop] = rules[prop]\n }\n }\n }\n }\n }\n\n formatDate(timestamp) {\n const date = new Date(timestamp)\n const year = date.getFullYear()\n // TODO\n const month = unshiftString(`${date.getMonth() + 1}`, 2, '0')\n const day = unshiftString(`${date.getDate()}`, 2, '0')\n const hour = unshiftString(`${date.getHours()}`, 2, '0')\n const minute = unshiftString(`${date.getMinutes()}`, 2, '0')\n return Number.isNaN(year) ? '--' : `${year}/${month}/${day} ${hour}:${minute}`\n }\n}\n"],"names":["File","Range","unshiftString"],"mappings":";;;;;;;;;AAKA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAE3B,MAAM,QAAQ;AAAA,EAOnB,YAAY,OAAO,QAAQ;AAN3B;AACA;AACA;AACA;AACA;AAGE,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,UAAM,WAAW,MAAM,KAAK,MAAM;AAClC,UAAM,QAAQ,KAAK,MAAM,SAAS,QAAQ;AAC1C,UAAM,CAAC,UAAU,MAAM,IAAI,KAAK,MAAM,OAAO,WAAWA,KAAAA,MAAM,KAAK;AACnE,UAAM,SAAS,YAAY,SAAS,OAAA;AACpC,SAAK,YAAY,IAAIC,UAAAA,MAAM,QAAQ,QAAQ,MAAM;AAEjD,UAAM,YAAY,OAAO,KAAK,KAAK,QAAQ,YAAY;AACvD,UAAM,oBAAoB,KAAK,WAAW,SAAS;AACnD,SAAK,WAAW;AAAA;AAAA;AAAA;AAAA,MAId;AAAA,MACA;AAAA,IAAA,EACA,KAAK,EAAE;AAET,SAAK,cAAA;AAAA,EACP;AAAA,EAEA,gBAAgB;AACd,SAAK,UAAU,SAAS,cAAc,KAAK;AAC3C,SAAK,QAAQ,YAAY;AACzB,SAAK,QAAQ,YAAY,KAAK;AAE9B,UAAM,cAAc,KAAK,QAAQ,cAAc,mBAAmB;AAClE,QAAI,aAAa;AACf,kBAAY,iBAAiB,SAAS,CAAC,UAA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AY,IAAI,GAAG,GAAG;AAC3D,WAAO,OAAO,MAAM,IAAI,IAAI,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,IAAI,IAAI,MAAM;AAAA,EAC9E;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-module.cjs.js","sources":["../../../../../src/modules/file/modules/file-module.ts"],"sourcesContent":["import type FluentEditor from '../../../core/fluent-editor'\r\nimport Quill from 'quill'\r\nimport { File } from '../formats/file'\r\nimport { FileBar } from './file-bar'\r\n\r\nexport class FileModule {\r\n fileBar: FileBar\r\n\r\n static register() {\r\n Quill.register('formats/file', File, true)\r\n }\r\n\r\n constructor(public quill: FluentEditor) {\r\n this.quill = quill\r\n quill.root.addEventListener('click', event => this.clickEvent(event), false)\r\n }\r\n\r\n clickEvent(event: MouseEvent) {\r\n event.preventDefault()\r\n const target = event.target as HTMLElement\r\n const fileDom = target.closest('a.ql-file-item')\r\n if (fileDom) {\r\n if (this.fileBar) {\r\n this.fileBar.destroy()\r\n }\r\n this.fileBar = new FileBar(this.quill, fileDom)\r\n }\r\n else if (this.fileBar && !target.closest('.ql-file-bar')) {\r\n this.fileBar.destroy()\r\n this.fileBar = null\r\n }\r\n }\r\n}\r\n"],"names":["File","FileBar"],"mappings":";;;;;;;;AAKO,MAAM,WAAW;AAAA,EAOtB,YAAmB,OAAqB;AANxC;AAMmB,SAAA,QAAA;AACjB,SAAK,QAAQ;AACP,UAAA,KAAK,iBAAiB,SAAS,CAAA,UAAS,KAAK,WAAW,KAAK,GAAG,KAAK;AAAA,EAAA;AAAA,EAN7E,OAAO,WAAW;AACV,UAAA,SAAS,gBAAgBA,KAAAA,MAAM,IAAI;AAAA,EAAA;AAAA,EAQ3C,WAAW,OAAmB;AAC5B,UAAM,eAAe;AACrB,UAAM,SAAS,MAAM;AACf,UAAA,UAAU,OAAO,QAAQ,gBAAgB;AAC/C,QAAI,SAAS;AACX,UAAI,KAAK,SAAS;AAChB,aAAK,QAAQ,QAAQ;AAAA,MAAA;AAEvB,WAAK,UAAU,IAAIC,QAAAA,QAAQ,KAAK,OAAO,OAAO;AAAA,IAAA,WAEvC,KAAK,WAAW,CAAC,OAAO,QAAQ,cAAc,GAAG;AACxD,WAAK,QAAQ,QAAQ;AACrB,WAAK,UAAU;AAAA,IAAA;AAAA,EACjB;AAEJ;;"}
1
+ {"version":3,"file":"file-module.cjs.js","sources":["../../../../../src/modules/file/modules/file-module.ts"],"sourcesContent":["import type FluentEditor from '../../../core/fluent-editor'\nimport Quill from 'quill'\nimport { File } from '../formats/file'\nimport { FileBar } from './file-bar'\n\nexport class FileModule {\n fileBar: FileBar\n\n static register() {\n Quill.register('formats/file', File, true)\n }\n\n constructor(public quill: FluentEditor) {\n this.quill = quill\n quill.root.addEventListener('click', event => this.clickEvent(event), false)\n }\n\n clickEvent(event: MouseEvent) {\n event.preventDefault()\n const target = event.target as HTMLElement\n const fileDom = target.closest('a.ql-file-item')\n if (fileDom) {\n if (this.fileBar) {\n this.fileBar.destroy()\n }\n this.fileBar = new FileBar(this.quill, fileDom)\n }\n else if (this.fileBar && !target.closest('.ql-file-bar')) {\n this.fileBar.destroy()\n this.fileBar = null\n }\n }\n}\n"],"names":["File","FileBar"],"mappings":";;;;;;;;AAKO,MAAM,WAAW;AAAA,EAOtB,YAAmB,OAAqB;AANxC;AAMmB,SAAA,QAAA;AACjB,SAAK,QAAQ;AACb,UAAM,KAAK,iBAAiB,SAAS,CAAA,UAAS,KAAK,WAAW,KAAK,GAAG,KAAK;AAAA,EAC7E;AAAA,EAPA,OAAO,WAAW;AAChB,UAAM,SAAS,gBAAgBA,KAAAA,MAAM,IAAI;AAAA,EAC3C;AAAA,EAOA,WAAW,OAAmB;AAC5B,UAAM,eAAA;AACN,UAAM,SAAS,MAAM;AACrB,UAAM,UAAU,OAAO,QAAQ,gBAAgB;AAC/C,QAAI,SAAS;AACX,UAAI,KAAK,SAAS;AAChB,aAAK,QAAQ,QAAA;AAAA,MACf;AACA,WAAK,UAAU,IAAIC,QAAAA,QAAQ,KAAK,OAAO,OAAO;AAAA,IAChD,WACS,KAAK,WAAW,CAAC,OAAO,QAAQ,cAAc,GAAG;AACxD,WAAK,QAAQ,QAAA;AACb,WAAK,UAAU;AAAA,IACjB;AAAA,EACF;AACF;;"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ function getGridConfig(quill) {
4
+ var _a, _b, _c;
5
+ const defaultGrid = {
6
+ size: 20,
7
+ visible: true,
8
+ type: "dot",
9
+ config: {
10
+ color: "#ababab",
11
+ thickness: 1
12
+ }
13
+ };
14
+ const flowChartModule = (_a = quill == null ? void 0 : quill.options.modules) == null ? void 0 : _a["flow-chart"];
15
+ if (!flowChartModule || typeof flowChartModule !== "object") {
16
+ return defaultGrid;
17
+ }
18
+ if ("grid" in flowChartModule) {
19
+ const grid = flowChartModule.grid;
20
+ if (grid === false || grid === void 0) {
21
+ return null;
22
+ }
23
+ if (typeof grid === "object" && grid !== null) {
24
+ const typedGrid = grid;
25
+ const gridConfig = {
26
+ size: typedGrid.size || defaultGrid.size,
27
+ visible: typedGrid.visible !== void 0 ? typedGrid.visible : defaultGrid.visible,
28
+ type: typedGrid.type || defaultGrid.type,
29
+ config: {
30
+ color: ((_b = typedGrid.config) == null ? void 0 : _b.color) || defaultGrid.config.color,
31
+ thickness: ((_c = typedGrid.config) == null ? void 0 : _c.thickness) || defaultGrid.config.thickness
32
+ }
33
+ };
34
+ return gridConfig;
35
+ }
36
+ }
37
+ return defaultGrid;
38
+ }
39
+ function getBackgroundConfig(quill) {
40
+ var _a;
41
+ const flowChartModule = (_a = quill == null ? void 0 : quill.options.modules) == null ? void 0 : _a["flow-chart"];
42
+ if (!flowChartModule || typeof flowChartModule !== "object") {
43
+ return false;
44
+ }
45
+ if ("background" in flowChartModule) {
46
+ const background = flowChartModule.background;
47
+ if (background === false || background === void 0) {
48
+ return false;
49
+ }
50
+ if (typeof background === "object" && background !== null) {
51
+ const typedBackground = background;
52
+ const backgroundConfig = {};
53
+ if (typedBackground.color) {
54
+ backgroundConfig.backgroundColor = typedBackground.color;
55
+ }
56
+ if (typedBackground.image) {
57
+ backgroundConfig.backgroundImage = typedBackground.image;
58
+ }
59
+ if (typedBackground.repeat) {
60
+ backgroundConfig.backgroundRepeat = typedBackground.repeat;
61
+ }
62
+ if (typedBackground.position) {
63
+ backgroundConfig.backgroundPosition = typedBackground.position;
64
+ }
65
+ if (typedBackground.size) {
66
+ backgroundConfig.backgroundSize = typedBackground.size;
67
+ }
68
+ if (typedBackground.opacity) {
69
+ backgroundConfig.opacity = typedBackground.opacity;
70
+ }
71
+ return backgroundConfig;
72
+ }
73
+ }
74
+ return false;
75
+ }
76
+ function getResizeConfig(quill) {
77
+ var _a;
78
+ const flowChartModule = (_a = quill == null ? void 0 : quill.options.modules) == null ? void 0 : _a["flow-chart"];
79
+ if (!flowChartModule || typeof flowChartModule !== "object") {
80
+ return false;
81
+ }
82
+ if ("resize" in flowChartModule) {
83
+ const resize = flowChartModule.resize;
84
+ return resize === true;
85
+ }
86
+ return false;
87
+ }
88
+ function getAllConfigs(quill) {
89
+ var _a, _b;
90
+ const deps = (_b = (_a = quill == null ? void 0 : quill.options.modules) == null ? void 0 : _a["flow-chart"]) == null ? void 0 : _b.deps;
91
+ return {
92
+ gridConfig: getGridConfig(quill),
93
+ backgroundConfig: getBackgroundConfig(quill),
94
+ resizeConfig: getResizeConfig(quill),
95
+ deps
96
+ };
97
+ }
98
+ exports.getAllConfigs = getAllConfigs;
99
+ exports.getBackgroundConfig = getBackgroundConfig;
100
+ exports.getGridConfig = getGridConfig;
101
+ exports.getResizeConfig = getResizeConfig;
102
+ //# sourceMappingURL=config-utils.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-utils.cjs.js","sources":["../../../../src/modules/flow-chart/config-utils.ts"],"sourcesContent":["import type Quill from 'quill'\nimport type { BackgroundConfig, GridOptions } from './options'\n\nexport function getGridConfig(quill: Quill | null): any {\n const defaultGrid = {\n size: 20,\n visible: true,\n type: 'dot',\n config: {\n color: '#ababab',\n thickness: 1,\n },\n }\n\n const flowChartModule = quill?.options.modules?.['flow-chart']\n if (!flowChartModule || typeof flowChartModule !== 'object') {\n return defaultGrid\n }\n\n if ('grid' in flowChartModule) {\n const grid = flowChartModule.grid as GridOptions | boolean | undefined\n if (grid === false || grid === undefined) {\n return null\n }\n\n if (typeof grid === 'object' && grid !== null) {\n const typedGrid = grid as GridOptions\n const gridConfig = {\n size: typedGrid.size || defaultGrid.size,\n visible: typedGrid.visible !== undefined ? typedGrid.visible : defaultGrid.visible,\n type: typedGrid.type || defaultGrid.type,\n config: {\n color: typedGrid.config?.color || defaultGrid.config.color,\n thickness: typedGrid.config?.thickness || defaultGrid.config.thickness,\n },\n }\n\n return gridConfig\n }\n }\n\n return defaultGrid\n}\n\nexport function getBackgroundConfig(quill: Quill | null): false | object {\n const flowChartModule = quill?.options.modules?.['flow-chart']\n if (!flowChartModule || typeof flowChartModule !== 'object') {\n return false\n }\n if ('background' in flowChartModule) {\n const background = flowChartModule.background as BackgroundConfig | boolean | undefined\n\n if (background === false || background === undefined) {\n return false\n }\n if (typeof background === 'object' && background !== null) {\n const typedBackground = background as BackgroundConfig\n const backgroundConfig: any = {}\n\n if (typedBackground.color) {\n backgroundConfig.backgroundColor = typedBackground.color\n }\n if (typedBackground.image) {\n backgroundConfig.backgroundImage = typedBackground.image\n }\n if (typedBackground.repeat) {\n backgroundConfig.backgroundRepeat = typedBackground.repeat\n }\n if (typedBackground.position) {\n backgroundConfig.backgroundPosition = typedBackground.position\n }\n if (typedBackground.size) {\n backgroundConfig.backgroundSize = typedBackground.size\n }\n if (typedBackground.opacity) {\n backgroundConfig.opacity = typedBackground.opacity\n }\n return backgroundConfig\n }\n }\n return false\n}\n\nexport function getResizeConfig(quill: Quill | null): boolean {\n const flowChartModule = quill?.options.modules?.['flow-chart']\n if (!flowChartModule || typeof flowChartModule !== 'object') {\n return false\n }\n if ('resize' in flowChartModule) {\n const resize = (flowChartModule as any).resize as boolean | undefined\n return resize === true\n }\n return false\n}\n\nexport function getAllConfigs(quill: Quill | null): {\n gridConfig: any\n backgroundConfig: false | object\n resizeConfig: boolean\n deps?: any\n} {\n const deps = (quill?.options.modules?.['flow-chart'] as any)?.deps\n return {\n gridConfig: getGridConfig(quill),\n backgroundConfig: getBackgroundConfig(quill),\n resizeConfig: getResizeConfig(quill),\n deps,\n }\n}\n"],"names":[],"mappings":";;AAGO,SAAS,cAAc,OAA0B;;AACtD,QAAM,cAAc;AAAA,IAClB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAGF,QAAM,mBAAkB,oCAAO,QAAQ,YAAf,mBAAyB;AACjD,MAAI,CAAC,mBAAmB,OAAO,oBAAoB,UAAU;AAC3D,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,iBAAiB;AAC7B,UAAM,OAAO,gBAAgB;AAC7B,QAAI,SAAS,SAAS,SAAS,QAAW;AACxC,aAAO;AAAA,IACT;AAEA,QAAI,OAAO,SAAS,YAAY,SAAS,MAAM;AAC7C,YAAM,YAAY;AAClB,YAAM,aAAa;AAAA,QACjB,MAAM,UAAU,QAAQ,YAAY;AAAA,QACpC,SAAS,UAAU,YAAY,SAAY,UAAU,UAAU,YAAY;AAAA,QAC3E,MAAM,UAAU,QAAQ,YAAY;AAAA,QACpC,QAAQ;AAAA,UACN,SAAO,eAAU,WAAV,mBAAkB,UAAS,YAAY,OAAO;AAAA,UACrD,aAAW,eAAU,WAAV,mBAAkB,cAAa,YAAY,OAAO;AAAA,QAAA;AAAA,MAC/D;AAGF,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,oBAAoB,OAAqC;;AACvE,QAAM,mBAAkB,oCAAO,QAAQ,YAAf,mBAAyB;AACjD,MAAI,CAAC,mB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 "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.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
6
+ const Quill = require("quill");
7
+ const configUtils = require("../config-utils.cjs.js");
8
+ const icons = require("../icons.cjs.js");
9
+ const contextMenu = require("../modules/context-menu.cjs.js");
10
+ const controlPanel = require("../modules/control-panel.cjs.js");
11
+ const customResizeAction = require("../modules/custom-resize-action.cjs.js");
12
+ ;/* empty css */
13
+ const BlockEmbed = Quill.import("blots/embed");
14
+ const _FlowChartPlaceholderBlot = class _FlowChartPlaceholderBlot extends BlockEmbed {
15
+ constructor(scroll, domNode) {
16
+ super(scroll, domNode);
17
+ __publicField(this, "quill", null);
18
+ __publicField(this, "flowChart", null);
19
+ __publicField(this, "data");
20
+ __publicField(this, "contextMenu", null);
21
+ __publicField(this, "currentElement", null);
22
+ __publicField(this, "width", 100);
23
+ __publicField(this, "height", 500);
24
+ __publicField(this, "parentObserver", null);
25
+ __publicField(this, "nextPObserver", null);
26
+ const data = _FlowChartPlaceholderBlot.value(domNode);
27
+ this.width = data.width || 100;
28
+ this.height = data.height || 500;
29
+ this.domNode.style.width = `${this.width}${data.width ? "px" : "%"}`;
30
+ this.domNode.style.height = `${this.height}px`;
31
+ this.domNode.style.maxWidth = "100%";
32
+ this.domNode.style.border = "1px solid #e8e8e8";
33
+ this.domNode.setAttribute("contenteditable", "false");
34
+ this.data = _FlowChartPlaceholderBlot.value(this.domNode);
35
+ this.initFlowChart();
36
+ }
37
+ static value(domNode) {
38
+ const dataStr = JSON.parse(domNode.getAttribute("data-flow-chart"));
39
+ const value = dataStr.root ? dataStr.root : dataStr;
40
+ if (domNode.hasAttribute("width")) {
41
+ value.width = Number.parseInt(domNode.getAttribute("width"), 10);
42
+ }
43
+ if (domNode.hasAttribute("height")) {
44
+ value.height = Number.parseInt(domNode.getAttribute("height"), 10);
45
+ }
46
+ return dataStr.root ? dataStr.root : dataStr;
47
+ }
48
+ static create(value) {
49
+ const node = super.create();
50
+ if (value) {
51
+ node.setAttribute("data-flow-chart", JSON.stringify(value));
52
+ }
53
+ if (value.width) {
54
+ node.setAttribute("width", String(value.width));
55
+ node.style.width = `${value.width}%`;
56
+ }
57
+ if (value.height) {
58
+ node.setAttribute("height", String(value.height));
59
+ node.style.height = `${value.height}px`;
60
+ }
61
+ node.setAttribute("contenteditable", "false");
62
+ return node;
63
+ }
64
+ static findQuill(el) {
65
+ let cur = el;
66
+ while (cur) {
67
+ const q = cur.__quillInstance;
68
+ if (q) return q;
69
+ cur = cur.parentElement;
70
+ }
71
+ return null;
72
+ }
73
+ attach() {
74
+ super.attach();
75
+ this.quill = _FlowChartPlaceholderBlot.findQuill(this.domNode);
76
+ }
77
+ initFlowChart() {
78
+ if (this.domNode.isConnected) {
79
+ this.insertFlowChartEditor();
80
+ } else {
81
+ const observer = new MutationObserver(() => {
82
+ if (this.domNode.isConnected) {
83
+ this.insertFlowChartEditor();
84
+ observer.disconnect();
85
+ }
86
+ });
87
+ observer.observe(document.body, { childList: true, subtree: true });
88
+ }
89
+ }
90
+ insertFlowChartEditor() {
91
+ this.domNode.style.width = `${this.width}${this.data.width ? "px" : "%"}`;
92
+ this.domNode.style.height = `${this.height}px`;
93
+ this.updateAlignmentStyle();
94
+ this.observeParentAlignment();
95
+ const { gridConfig, backgroundConfig, resizeConfig, deps } = configUtils.getAllConfigs(this.quill);
96
+ const { LogicFlow, DndPanel, SelectionSelect, Snapshot } = deps || window;
97
+ this.flowChart = new LogicFlow({
98
+ container: this.domNode,
99
+ stopScrollGraph: true,
100
+ stopZoomGraph: true,
101
+ allowResize: true,
102
+ allowRotate: true,
103
+ editable: true,
104
+ preventDefaultDoubleClick: true,
105
+ preventDefault: true,
106
+ grid: gridConfig,
107
+ background: backgroundConfig,
108
+ plugins: [DndPanel, SelectionSelect, Snapshot]
109
+ });
110
+ this.flowChart.setPatternItems([
111
+ {
112
+ className: "lf-shape-dashed",
113
+ callback: () => {
114
+ this.flowChart.openSelectionSelect();
115
+ this.flowChart.once("selection:selected", () => {
116
+ this.flowChart.closeSelectionSelect();
117
+ });
118
+ }
119
+ },
120
+ {
121
+ type: "rect",
122
+ text: "矩形",
123
+ className: "lf-shape-rect"
124
+ },
125
+ {
126
+ type: "circle",
127
+ text: "圆形",
128
+ className: "lf-shape-circle"
129
+ },
130
+ {
131
+ type: "ellipse",
132
+ text: "椭圆",
133
+ className: "lf-shape-ellipse"
134
+ },
135
+ {
136
+ type: "diamond",
137
+ text: "菱形",
138
+ className: "lf-shape-diamond"
139
+ }
140
+ ]);
141
+ if (resizeConfig) {
142
+ new customResizeAction.FlowChartResizeAction(this);
143
+ }
144
+ controlPanel.createControlPanel(this, this.quill);
145
+ contextMenu.initContextMenu(this, this.quill);
146
+ this.observeOwnParentChange();
147
+ this.observeNextPElement();
148
+ this.addMouseHoverEvents();
149
+ this.flowChart.render(this.data);
150
+ this.flowChart.on("graph:updated", () => {
151
+ this.data = this.flowChart.getGraphData();
152
+ this.domNode.setAttribute("data-flow-chart", JSON.stringify(this.data));
153
+ });
154
+ this.flowChart.on("history:change", () => {
155
+ this.data = this.flowChart.getGraphData();
156
+ this.domNode.setAttribute("data-flow-chart", JSON.stringify(this.data));
157
+ });
158
+ this.flowChart.on("node:dbclick", this.handleNodeDblClick.bind(this));
159
+ this.flowChart.on("edge:dbclick", this.handleNodeDblClick.bind(this));
160
+ this.domNode.addEventListener("click", (e) => {
161
+ if (this.quill) {
162
+ const flowChartBlot = Quill.find(this.domNode);
163
+ const index = this.quill.getIndex(flowChartBlot);
164
+ if (index && typeof index === "number") {
165
+ this.quill.setSelection(index + 1, 0);
166
+ }
167
+ }
168
+ });
169
+ }
170
+ addMouseHoverEvents() {
171
+ this.domNode.addEventListener("mouseenter", () => {
172
+ this.showControlPanel();
173
+ });
174
+ this.domNode.addEventListener("mouseleave", () => {
175
+ var _a;
176
+ (_a = this.flowChart) == null ? void 0 : _a.clearSelectElements();
177
+ this.hideControlPanel();
178
+ });
179
+ }
180
+ getControlElements() {
181
+ const leftUpControl = this.domNode.querySelector(".lf-dndpanel");
182
+ const control = this.domNode.querySelector(".ql-flow-chart-control");
183
+ const panelStatusIcon = this.domNode.querySelector('[data-control-type="panel-status"]');
184
+ return { leftUpControl, control, panelStatusIcon };
185
+ }
186
+ showControlPanel() {
187
+ const { leftUpControl, control, panelStatusIcon } = this.getControlElements();
188
+ if (!leftUpControl || !control) return;
189
+ leftUpControl.style.display = "block";
190
+ control.style.display = "flex";
191
+ if (panelStatusIcon) {
192
+ const iconElement = panelStatusIcon.querySelector("i") || panelStatusIcon;
193
+ iconElement.innerHTML = icons.expandIcon;
194
+ }
195
+ }
196
+ hideControlPanel() {
197
+ const { leftUpControl, control, panelStatusIcon } = this.getControlElements();
198
+ if (!leftUpControl || !control) return;
199
+ leftUpControl.style.display = "none";
200
+ control.style.display = "none";
201
+ if (panelStatusIcon) {
202
+ const iconElement = panelStatusIcon.querySelector("i") || panelStatusIcon;
203
+ iconElement.innerHTML = icons.contractIcon;
204
+ }
205
+ }
206
+ observeOwnParentChange() {
207
+ let currentParent = this.domNode.parentElement;
208
+ const observer = new MutationObserver(() => {
209
+ if (this.domNode.parentElement !== currentParent) {
210
+ currentParent = this.domNode.parentElement;
211
+ this.observeParentAlignment();
212
+ }
213
+ });
214
+ observer.observe(document.body, {
215
+ attributes: false,
216
+ childList: true,
217
+ subtree: true
218
+ });
219
+ }
220
+ observeParentAlignment() {
221
+ if (this.parentObserver) {
222
+ this.parentObserver.disconnect();
223
+ }
224
+ const observer = new MutationObserver((mutations) => {
225
+ mutations.forEach((mutation) => {
226
+ if (mutation.attributeName === "class") {
227
+ this.updateAlignmentStyle();
228
+ }
229
+ });
230
+ });
231
+ this.parentObserver = observer;
232
+ const parent = this.domNode.parentElement;
233
+ if (parent) {
234
+ observer.observe(parent, {
235
+ attributes: true,
236
+ attributeFilter: ["class"]
237
+ });
238
+ this.updateAlignmentStyle();
239
+ }
240
+ }
241
+ updateAlignmentStyle() {
242
+ const parent = this.domNode.parentElement;
243
+ if (!parent) return;
244
+ this.domNode.style.margin = "";
245
+ this.domNode.style.display = "block";
246
+ if (parent.classList.contains("ql-align-center")) {
247
+ this.domNode.style.margin = "0 auto";
248
+ } else if (parent.classList.contains("ql-align-right")) {
249
+ this.domNode.style.marginLeft = "auto";
250
+ this.domNode.style.marginRight = "0";
251
+ } else {
252
+ this.domNode.style.marginLeft = "0";
253
+ this.domNode.style.marginRight = "auto";
254
+ }
255
+ }
256
+ observeNextPElement() {
257
+ if (this.nextPObserver) {
258
+ this.nextPObserver.disconnect();
259
+ }
260
+ const parentElement = this.domNode.parentElement;
261
+ if (!parentElement) {
262
+ return;
263
+ }
264
+ const trackedParentElement = parentElement;
265
+ const parentElementId = parentElement.getAttribute("id") || `flow-chart-parent-${Date.now()}`;
266
+ parentElement.setAttribute("id", parentElementId);
267
+ const observer = new MutationObserver(() => {
268
+ if (!document.contains(trackedParentElement)) {
269
+ const elementById = document.getElementById(parentElementId);
270
+ if (!elementById) {
271
+ this.remove();
272
+ observer.disconnect();
273
+ }
274
+ }
275
+ });
276
+ observer.observe(document.body, {
277
+ childList: true,
278
+ subtree: true
279
+ });
280
+ this.nextPObserver = observer;
281
+ }
282
+ // 处理节点双击事件
283
+ handleNodeDblClick(event) {
284
+ const { data, position, e } = event;
285
+ if (data && data.id) {
286
+ this.createEditInput(data, position, e);
287
+ }
288
+ }
289
+ // 创建编辑输入框
290
+ createEditInput(nodeData, position, e) {
291
+ var _a;
292
+ const input = document.createElement("textarea");
293
+ input.className = "ql-flow-chart-edit-input";
294
+ input.value = ((_a = nodeData.text) == null ? void 0 : _a.value) || "";
295
+ const autoResize = () => {
296
+ input.style.height = "auto";
297
+ input.style.height = `${input.scrollHeight}px`;
298
+ };
299
+ Object.assign(input.style, {
300
+ position: "absolute",
301
+ boxSizing: "border-box",
302
+ width: "100px",
303
+ height: "35px",
304
+ padding: "5px",
305
+ lineHeight: "1.2",
306
+ whiteSpace: "pre",
307
+ textAlign: "center",
308
+ background: "#fff",
309
+ border: "1px solid #edefed",
310
+ borderRadius: "3px",
311
+ outline: "none",
312
+ transform: "translate(-50%, -50%)",
313
+ resize: "none",
314
+ zIndex: "1000",
315
+ left: `${e.pageX}px`,
316
+ top: `${e.pageY}px`,
317
+ overflow: "hidden"
318
+ });
319
+ document.body.appendChild(input);
320
+ autoResize();
321
+ input.addEventListener("input", autoResize);
322
+ input.addEventListener("keydown", (e2) => {
323
+ if (e2.key === "Enter" && !e2.shiftKey) {
324
+ this.flowChart.updateText(nodeData.id, input.value);
325
+ autoResize();
326
+ }
327
+ });
328
+ input.focus();
329
+ this.flowChart.on("blank:mousedown", () => {
330
+ this.flowChart.updateText(nodeData.id, input.value);
331
+ input.remove();
332
+ });
333
+ this.flowChart.on("node:click", () => {
334
+ this.flowChart.updateText(nodeData.id, input.value);
335
+ input.remove();
336
+ });
337
+ this.flowChart.on("edge:click", () => {
338
+ this.flowChart.updateText(nodeData.id, input.value);
339
+ input.remove();
340
+ });
341
+ }
342
+ updateText(nodeId, text) {
343
+ this.flowChart.updateNode(nodeId, {
344
+ text: { value: text }
345
+ });
346
+ }
347
+ destroyFlowChart() {
348
+ if (this.flowChart) {
349
+ this.flowChart.destroy();
350
+ this.flowChart = null;
351
+ }
352
+ const editInputs = document.querySelectorAll(".ql-flow-chart-edit-input");
353
+ editInputs.forEach((input) => input.remove());
354
+ if (this.nextPObserver) {
355
+ this.nextPObserver.disconnect();
356
+ this.nextPObserver = null;
357
+ }
358
+ }
359
+ remove() {
360
+ this.destroyFlowChart();
361
+ super.remove();
362
+ }
363
+ };
364
+ __publicField(_FlowChartPlaceholderBlot, "blotName", "flow-chart");
365
+ __publicField(_FlowChartPlaceholderBlot, "tagName", "div");
366
+ __publicField(_FlowChartPlaceholderBlot, "className", "ql-flow-chart-item");
367
+ let FlowChartPlaceholderBlot = _FlowChartPlaceholderBlot;
368
+ exports.default = FlowChartPlaceholderBlot;
369
+ //# sourceMappingURL=flow-chart-blot.cjs.js.map