@opentiny/fluent-editor 3.20.2 → 3.20.4-alpha.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 (646) hide show
  1. package/{dist/es → es}/config/editor.utils.es.js +7 -0
  2. package/{dist/es → es}/config/editor.utils.es.js.map +1 -1
  3. package/{dist/es → es}/config/icons.config.es.js +6 -0
  4. package/{dist/es → es}/config/icons.config.es.js.map +1 -1
  5. package/{dist/es → es}/config/index.es.js +6 -3
  6. package/es/config/index.es.js.map +1 -0
  7. package/es/config/types/editor-toolbar.interface.es.js +2 -0
  8. package/es/config/types/editor-toolbar.interface.es.js.map +1 -0
  9. package/{dist/es → es}/config/types/index.es.js +1 -0
  10. package/{dist/es → es}/config/types/index.es.js.map +1 -1
  11. package/{dist/es → es}/custom-image/BlotFormatter.es.js +0 -1
  12. package/es/custom-image/BlotFormatter.es.js.map +1 -0
  13. package/{dist/es → es}/fluent-editor.es.js +7 -6
  14. package/es/fluent-editor.es.js.map +1 -0
  15. package/es/fullscreen/handler.es.js +51 -0
  16. package/es/fullscreen/handler.es.js.map +1 -0
  17. package/{dist/es → es}/index.es.js +3 -2
  18. package/{dist/es → es}/link/formats/link.es.js +11 -6
  19. package/es/link/formats/link.es.js.map +1 -0
  20. package/{dist/es → es}/link/index.es.js +3 -3
  21. package/es/link/index.es.js.map +1 -0
  22. package/{dist/es → es}/link/modules/tooltip.es.js +22 -7
  23. package/es/link/modules/tooltip.es.js.map +1 -0
  24. package/{dist/lib → lib}/config/editor.utils.cjs.js +7 -0
  25. package/{dist/lib → lib}/config/editor.utils.cjs.js.map +1 -1
  26. package/{dist/lib → lib}/config/icons.config.cjs.js +6 -0
  27. package/{dist/lib → lib}/config/icons.config.cjs.js.map +1 -1
  28. package/{dist/lib → lib}/config/index.cjs.js +4 -1
  29. package/lib/config/index.cjs.js.map +1 -0
  30. package/lib/config/types/editor-toolbar.interface.cjs.js +2 -0
  31. package/lib/config/types/editor-toolbar.interface.cjs.js.map +1 -0
  32. package/{dist/lib → lib}/config/types/index.cjs.js +1 -0
  33. package/{dist/lib → lib}/config/types/index.cjs.js.map +1 -1
  34. package/{dist/lib → lib}/custom-image/BlotFormatter.cjs.js +0 -1
  35. package/lib/custom-image/BlotFormatter.cjs.js.map +1 -0
  36. package/{dist/lib → lib}/fluent-editor.cjs.js +7 -6
  37. package/lib/fluent-editor.cjs.js.map +1 -0
  38. package/lib/fullscreen/handler.cjs.js +51 -0
  39. package/lib/fullscreen/handler.cjs.js.map +1 -0
  40. package/{dist/lib → lib}/index.cjs.js +1 -0
  41. package/{dist/lib → lib}/index.cjs.js.map +1 -1
  42. package/{dist/lib → lib}/link/formats/link.cjs.js +10 -5
  43. package/lib/link/formats/link.cjs.js.map +1 -0
  44. package/{dist/lib → lib}/link/index.cjs.js +3 -3
  45. package/lib/link/index.cjs.js.map +1 -0
  46. package/{dist/lib → lib}/link/modules/tooltip.cjs.js +24 -9
  47. package/lib/link/modules/tooltip.cjs.js.map +1 -0
  48. package/package.json +6 -4
  49. package/{dist/style.css → style.css} +28 -0
  50. package/types/attributors/index.d.ts +4 -0
  51. package/types/config/base64-image.d.ts +3 -0
  52. package/types/config/editor.config.d.ts +95 -0
  53. package/types/config/editor.utils.d.ts +42 -0
  54. package/types/config/i18n/en-us.d.ts +86 -0
  55. package/types/config/i18n/zh-cn.d.ts +86 -0
  56. package/types/config/icons.config.d.ts +34 -0
  57. package/types/config/index.d.ts +49 -0
  58. package/types/config/types/additional-toolbar-item.interface.d.ts +8 -0
  59. package/types/config/types/content-change.interface.d.ts +13 -0
  60. package/types/config/types/content-save.interface.d.ts +6 -0
  61. package/types/config/types/counter-option.interface.d.ts +9 -0
  62. package/types/config/types/editor-config.interface.d.ts +21 -0
  63. package/types/config/types/editor-modules.interface.d.ts +31 -0
  64. package/types/config/types/editor-toolbar.interface.d.ts +6 -0
  65. package/types/config/types/file-operation.interface.d.ts +12 -0
  66. package/types/config/types/focus-change.interface.d.ts +4 -0
  67. package/types/config/types/fullscreen-module.interface.d.ts +4 -0
  68. package/types/config/types/help-panel-item.interface.d.ts +5 -0
  69. package/types/config/types/help-panel-option.interface.d.ts +7 -0
  70. package/{src/config/types/image-module.interface.ts → types/config/types/image-module.interface.d.ts} +1 -1
  71. package/types/config/types/image-upload.interface.d.ts +7 -0
  72. package/types/config/types/index.d.ts +23 -0
  73. package/types/config/types/load-on-demand-module.interface.d.ts +5 -0
  74. package/types/config/types/mention-module.interface.d.ts +8 -0
  75. package/types/config/types/paste-change.interface.d.ts +6 -0
  76. package/{src/config/types/quick-menu-module.interface.ts → types/config/types/quick-menu-module.interface.d.ts} +1 -1
  77. package/types/config/types/range.interface.d.ts +4 -0
  78. package/types/config/types/registry-options.interface.d.ts +5 -0
  79. package/types/config/types/selection-change.interface.d.ts +8 -0
  80. package/types/config/types/toolbar-item.interface.d.ts +13 -0
  81. package/types/config/types/type.d.ts +5 -0
  82. package/types/config/types/validate-error.interface.d.ts +13 -0
  83. package/types/counter/index.d.ts +12 -0
  84. package/types/custom-clipboard.d.ts +26 -0
  85. package/types/custom-image/BlotFormatter.d.ts +24 -0
  86. package/types/custom-image/Options.d.ts +36 -0
  87. package/types/custom-image/actions/Action.d.ts +7 -0
  88. package/types/custom-image/actions/CustomResizeAction.d.ts +24 -0
  89. package/types/custom-image/actions/DeleteAction.d.ts +7 -0
  90. package/types/custom-image/image.d.ts +28 -0
  91. package/types/custom-image/specs/BlotSpec.d.ts +13 -0
  92. package/types/custom-image/specs/CustomImageSpec.d.ts +21 -0
  93. package/types/custom-image/specs/ImageSpec.d.ts +10 -0
  94. package/types/custom-uploader.d.ts +30 -0
  95. package/types/emoji/emoji-list/index.d.ts +1 -0
  96. package/types/emoji/emoji-list/people.d.ts +1 -0
  97. package/types/emoji/emoji-list.d.ts +2 -0
  98. package/types/emoji/emoji-map.d.ts +2 -0
  99. package/types/emoji/formats/emoji-blot.d.ts +13 -0
  100. package/types/emoji/index.d.ts +10 -0
  101. package/types/emoji/modules/emoji.d.ts +38 -0
  102. package/types/emoji/modules/toolbar-emoji.d.ts +8 -0
  103. package/types/emoji/utils.d.ts +1 -0
  104. package/types/file/formats/file.d.ts +15 -0
  105. package/types/file/index.d.ts +11 -0
  106. package/types/file/modules/file-bar.d.ts +14 -0
  107. package/types/fluent-editor.d.ts +9 -0
  108. package/types/format-painter/index.d.ts +15 -0
  109. package/types/fullscreen/handler.d.ts +3 -0
  110. package/types/global-link/constants.d.ts +3 -0
  111. package/types/global-link/formats/customer-widget-link.d.ts +14 -0
  112. package/types/global-link/formats/doc-link.d.ts +17 -0
  113. package/types/global-link/formats/wiki-link.d.ts +16 -0
  114. package/types/global-link/formats/work-item-link.d.ts +16 -0
  115. package/types/global-link/global-link-panel.d.ts +19 -0
  116. package/types/global-link/index.d.ts +18 -0
  117. package/types/global-link/utils/createTable.d.ts +1 -0
  118. package/types/index.d.ts +4 -0
  119. package/types/link/formats/link.d.ts +16 -0
  120. package/types/link/index.d.ts +6 -0
  121. package/types/link/modules/tooltip.d.ts +32 -0
  122. package/types/mention/Mention.d.ts +56 -0
  123. package/types/mention/MentionLink.d.ts +18 -0
  124. package/types/mention/constants.d.ts +3 -0
  125. package/types/quick-menu/index.d.ts +22 -0
  126. package/types/screenshot/index.d.ts +20 -0
  127. package/types/soft-break/index.d.ts +14 -0
  128. package/types/strike/index.d.ts +7 -0
  129. package/types/syntax/index.d.ts +14 -0
  130. package/types/table/better-table.d.ts +27 -0
  131. package/types/table/formats/header.d.ts +22 -0
  132. package/types/table/formats/list.d.ts +34 -0
  133. package/types/table/formats/table.d.ts +147 -0
  134. package/types/table/modules/table-column-tool.d.ts +23 -0
  135. package/types/table/modules/table-operation-menu.d.ts +32 -0
  136. package/types/table/modules/table-scroll-bar.d.ts +33 -0
  137. package/types/table/modules/table-selection.d.ts +37 -0
  138. package/types/table/table-config.d.ts +38 -0
  139. package/types/table/utils/index.d.ts +17 -0
  140. package/types/table/utils/node-matchers.d.ts +9 -0
  141. package/types/toolbar/better-picker.d.ts +1 -0
  142. package/types/toolbar/index.d.ts +8 -0
  143. package/types/utils/debounce.d.ts +6 -0
  144. package/types/utils/image.d.ts +1 -0
  145. package/types/utils/method.d.ts +7 -0
  146. package/types/utils/scroll-lock.d.ts +6 -0
  147. package/types/video/index.d.ts +16 -0
  148. package/dist/es/config/index.es.js.map +0 -1
  149. package/dist/es/custom-image/BlotFormatter.es.js.map +0 -1
  150. package/dist/es/fluent-editor.es.js.map +0 -1
  151. package/dist/es/link/formats/link.es.js.map +0 -1
  152. package/dist/es/link/index.es.js.map +0 -1
  153. package/dist/es/link/modules/tooltip.es.js.map +0 -1
  154. package/dist/lib/config/index.cjs.js.map +0 -1
  155. package/dist/lib/custom-image/BlotFormatter.cjs.js.map +0 -1
  156. package/dist/lib/fluent-editor.cjs.js.map +0 -1
  157. package/dist/lib/link/formats/link.cjs.js.map +0 -1
  158. package/dist/lib/link/index.cjs.js.map +0 -1
  159. package/dist/lib/link/modules/tooltip.cjs.js.map +0 -1
  160. package/dist/package.json +0 -52
  161. package/scripts/pre-release.js +0 -34
  162. package/src/assets/better-table.scss +0 -367
  163. package/src/assets/common.scss +0 -279
  164. package/src/assets/counter.scss +0 -19
  165. package/src/assets/custom-image.scss +0 -20
  166. package/src/assets/editor.scss +0 -365
  167. package/src/assets/emoji/emoji.scss +0 -461
  168. package/src/assets/emoji/style.scss +0 -252
  169. package/src/assets/fileBar.scss +0 -116
  170. package/src/assets/font.scss +0 -36
  171. package/src/assets/fullscreen.scss +0 -21
  172. package/src/assets/iconfont/iconfont.ttf +0 -0
  173. package/src/assets/iconfont/iconfont.woff +0 -0
  174. package/src/assets/iconfont/iconfont.woff2 +0 -0
  175. package/src/assets/image1.png +0 -0
  176. package/src/assets/lineHeight.scss +0 -16
  177. package/src/assets/link.scss +0 -130
  178. package/src/assets/mention.scss +0 -48
  179. package/src/assets/screenshot.scss +0 -78
  180. package/src/assets/size.scss +0 -13
  181. package/src/assets/style.scss +0 -39
  182. package/src/assets/tasklist.scss +0 -76
  183. package/src/assets/toolbar.scss +0 -416
  184. package/src/attributors/font-size.ts +0 -6
  185. package/src/attributors/font-style.ts +0 -6
  186. package/src/attributors/index.ts +0 -4
  187. package/src/attributors/line-height.ts +0 -6
  188. package/src/attributors/text-indent.ts +0 -6
  189. package/src/config/base64-image.ts +0 -8
  190. package/src/config/editor.config.ts +0 -88
  191. package/src/config/editor.utils.ts +0 -199
  192. package/src/config/i18n/en-us.ts +0 -106
  193. package/src/config/i18n/zh-cn.ts +0 -104
  194. package/src/config/icons.config.ts +0 -297
  195. package/src/config/index.ts +0 -171
  196. package/src/config/types/additional-toolbar-item.interface.ts +0 -8
  197. package/src/config/types/content-change.interface.ts +0 -13
  198. package/src/config/types/content-save.interface.ts +0 -6
  199. package/src/config/types/counter-option.interface.ts +0 -9
  200. package/src/config/types/editor-config.interface.ts +0 -22
  201. package/src/config/types/editor-modules.interface.ts +0 -41
  202. package/src/config/types/file-operation.interface.ts +0 -12
  203. package/src/config/types/focus-change.interface.ts +0 -4
  204. package/src/config/types/fullscreen-module.interface.ts +0 -4
  205. package/src/config/types/help-panel-item.interface.ts +0 -5
  206. package/src/config/types/help-panel-option.interface.ts +0 -7
  207. package/src/config/types/image-upload.interface.ts +0 -7
  208. package/src/config/types/index.ts +0 -22
  209. package/src/config/types/load-on-demand-module.interface.ts +0 -5
  210. package/src/config/types/mention-module.interface.ts +0 -8
  211. package/src/config/types/paste-change.interface.ts +0 -6
  212. package/src/config/types/range.interface.ts +0 -4
  213. package/src/config/types/registry-options.interface.ts +0 -5
  214. package/src/config/types/selection-change.interface.ts +0 -8
  215. package/src/config/types/toolbar-item.interface.ts +0 -13
  216. package/src/config/types/type.ts +0 -5
  217. package/src/config/types/validate-error.interface.ts +0 -11
  218. package/src/counter/index.ts +0 -69
  219. package/src/custom-clipboard.ts +0 -633
  220. package/src/custom-image/BlotFormatter.ts +0 -167
  221. package/src/custom-image/Options.ts +0 -150
  222. package/src/custom-image/actions/Action.ts +0 -13
  223. package/src/custom-image/actions/CustomResizeAction.ts +0 -207
  224. package/src/custom-image/actions/DeleteAction.ts +0 -29
  225. package/src/custom-image/image.ts +0 -118
  226. package/src/custom-image/specs/BlotSpec.ts +0 -30
  227. package/src/custom-image/specs/CustomImageSpec.ts +0 -139
  228. package/src/custom-image/specs/ImageSpec.ts +0 -33
  229. package/src/custom-uploader.ts +0 -199
  230. package/src/emoji/emoji-list/index.ts +0 -1
  231. package/src/emoji/emoji-list/people.ts +0 -111
  232. package/src/emoji/emoji-list.ts +0 -9
  233. package/src/emoji/emoji-map.ts +0 -9
  234. package/src/emoji/formats/emoji-blot.ts +0 -54
  235. package/src/emoji/index.ts +0 -5
  236. package/src/emoji/modules/emoji.ts +0 -318
  237. package/src/emoji/modules/toolbar-emoji.ts +0 -182
  238. package/src/emoji/utils.ts +0 -15
  239. package/src/file/formats/file.ts +0 -67
  240. package/src/file/index.ts +0 -38
  241. package/src/file/modules/file-bar.ts +0 -146
  242. package/src/fluent-editor.ts +0 -164
  243. package/src/format-painter/index.ts +0 -79
  244. package/src/global-link/constants.ts +0 -3
  245. package/src/global-link/formats/customer-widget-link.ts +0 -36
  246. package/src/global-link/formats/doc-link.ts +0 -55
  247. package/src/global-link/formats/wiki-link.ts +0 -45
  248. package/src/global-link/formats/work-item-link.ts +0 -47
  249. package/src/global-link/global-link-panel.ts +0 -20
  250. package/src/global-link/index.ts +0 -165
  251. package/src/global-link/utils/createTable.ts +0 -54
  252. package/src/index.ts +0 -5
  253. package/src/link/formats/link.ts +0 -44
  254. package/src/link/index.ts +0 -35
  255. package/src/link/modules/tooltip.ts +0 -318
  256. package/src/mention/Mention.ts +0 -406
  257. package/src/mention/MentionLink.ts +0 -51
  258. package/src/mention/constants.ts +0 -3
  259. package/src/quick-menu/index.ts +0 -100
  260. package/src/screenshot/index.ts +0 -231
  261. package/src/soft-break/index.ts +0 -34
  262. package/src/strike/index.ts +0 -16
  263. package/src/syntax/index.ts +0 -35
  264. package/src/table/better-table.ts +0 -553
  265. package/src/table/formats/header.ts +0 -129
  266. package/src/table/formats/list.ts +0 -229
  267. package/src/table/formats/table.ts +0 -1272
  268. package/src/table/modules/table-column-tool.ts +0 -492
  269. package/src/table/modules/table-operation-menu.ts +0 -584
  270. package/src/table/modules/table-scroll-bar.ts +0 -248
  271. package/src/table/modules/table-selection.ts +0 -387
  272. package/src/table/table-config.ts +0 -42
  273. package/src/table/utils/index.ts +0 -62
  274. package/src/table/utils/node-matchers.ts +0 -359
  275. package/src/toolbar/better-picker.ts +0 -370
  276. package/src/toolbar/index.ts +0 -180
  277. package/src/utils/debounce.ts +0 -149
  278. package/src/utils/image.ts +0 -22
  279. package/src/utils/method.ts +0 -82
  280. package/src/utils/scroll-lock.ts +0 -52
  281. package/src/video/index.ts +0 -62
  282. package/tsconfig.json +0 -26
  283. package/vite.config.theme.ts +0 -20
  284. package/vite.config.ts +0 -56
  285. /package/{dist/README.md → README.md} +0 -0
  286. /package/{dist/es → es}/attributors/font-size.es.js +0 -0
  287. /package/{dist/es → es}/attributors/font-size.es.js.map +0 -0
  288. /package/{dist/es → es}/attributors/font-style.es.js +0 -0
  289. /package/{dist/es → es}/attributors/font-style.es.js.map +0 -0
  290. /package/{dist/es → es}/attributors/index.es.js +0 -0
  291. /package/{dist/es → es}/attributors/index.es.js.map +0 -0
  292. /package/{dist/es → es}/attributors/line-height.es.js +0 -0
  293. /package/{dist/es → es}/attributors/line-height.es.js.map +0 -0
  294. /package/{dist/es → es}/attributors/text-indent.es.js +0 -0
  295. /package/{dist/es → es}/attributors/text-indent.es.js.map +0 -0
  296. /package/{dist/es → es}/config/base64-image.es.js +0 -0
  297. /package/{dist/es → es}/config/base64-image.es.js.map +0 -0
  298. /package/{dist/es → es}/config/editor.config.es.js +0 -0
  299. /package/{dist/es → es}/config/editor.config.es.js.map +0 -0
  300. /package/{dist/es → es}/config/i18n/en-us.es.js +0 -0
  301. /package/{dist/es → es}/config/i18n/en-us.es.js.map +0 -0
  302. /package/{dist/es → es}/config/i18n/zh-cn.es.js +0 -0
  303. /package/{dist/es → es}/config/i18n/zh-cn.es.js.map +0 -0
  304. /package/{dist/es → es}/config/types/additional-toolbar-item.interface.es.js +0 -0
  305. /package/{dist/es → es}/config/types/additional-toolbar-item.interface.es.js.map +0 -0
  306. /package/{dist/es → es}/config/types/content-change.interface.es.js +0 -0
  307. /package/{dist/es → es}/config/types/content-change.interface.es.js.map +0 -0
  308. /package/{dist/es → es}/config/types/content-save.interface.es.js +0 -0
  309. /package/{dist/es → es}/config/types/content-save.interface.es.js.map +0 -0
  310. /package/{dist/es → es}/config/types/counter-option.interface.es.js +0 -0
  311. /package/{dist/es → es}/config/types/counter-option.interface.es.js.map +0 -0
  312. /package/{dist/es → es}/config/types/editor-config.interface.es.js +0 -0
  313. /package/{dist/es → es}/config/types/editor-config.interface.es.js.map +0 -0
  314. /package/{dist/es → es}/config/types/editor-modules.interface.es.js +0 -0
  315. /package/{dist/es → es}/config/types/editor-modules.interface.es.js.map +0 -0
  316. /package/{dist/es → es}/config/types/file-operation.interface.es.js +0 -0
  317. /package/{dist/es → es}/config/types/file-operation.interface.es.js.map +0 -0
  318. /package/{dist/es → es}/config/types/focus-change.interface.es.js +0 -0
  319. /package/{dist/es → es}/config/types/focus-change.interface.es.js.map +0 -0
  320. /package/{dist/es → es}/config/types/fullscreen-module.interface.es.js +0 -0
  321. /package/{dist/es → es}/config/types/fullscreen-module.interface.es.js.map +0 -0
  322. /package/{dist/es → es}/config/types/help-panel-item.interface.es.js +0 -0
  323. /package/{dist/es → es}/config/types/help-panel-item.interface.es.js.map +0 -0
  324. /package/{dist/es → es}/config/types/help-panel-option.interface.es.js +0 -0
  325. /package/{dist/es → es}/config/types/help-panel-option.interface.es.js.map +0 -0
  326. /package/{dist/es → es}/config/types/image-module.interface.es.js +0 -0
  327. /package/{dist/es → es}/config/types/image-module.interface.es.js.map +0 -0
  328. /package/{dist/es → es}/config/types/image-upload.interface.es.js +0 -0
  329. /package/{dist/es → es}/config/types/image-upload.interface.es.js.map +0 -0
  330. /package/{dist/es → es}/config/types/load-on-demand-module.interface.es.js +0 -0
  331. /package/{dist/es → es}/config/types/load-on-demand-module.interface.es.js.map +0 -0
  332. /package/{dist/es → es}/config/types/mention-module.interface.es.js +0 -0
  333. /package/{dist/es → es}/config/types/mention-module.interface.es.js.map +0 -0
  334. /package/{dist/es → es}/config/types/paste-change.interface.es.js +0 -0
  335. /package/{dist/es → es}/config/types/paste-change.interface.es.js.map +0 -0
  336. /package/{dist/es → es}/config/types/quick-menu-module.interface.es.js +0 -0
  337. /package/{dist/es → es}/config/types/quick-menu-module.interface.es.js.map +0 -0
  338. /package/{dist/es → es}/config/types/range.interface.es.js +0 -0
  339. /package/{dist/es → es}/config/types/range.interface.es.js.map +0 -0
  340. /package/{dist/es → es}/config/types/registry-options.interface.es.js +0 -0
  341. /package/{dist/es → es}/config/types/registry-options.interface.es.js.map +0 -0
  342. /package/{dist/es → es}/config/types/selection-change.interface.es.js +0 -0
  343. /package/{dist/es → es}/config/types/selection-change.interface.es.js.map +0 -0
  344. /package/{dist/es → es}/config/types/toolbar-item.interface.es.js +0 -0
  345. /package/{dist/es → es}/config/types/toolbar-item.interface.es.js.map +0 -0
  346. /package/{dist/es → es}/config/types/type.es.js +0 -0
  347. /package/{dist/es → es}/config/types/type.es.js.map +0 -0
  348. /package/{dist/es → es}/config/types/validate-error.interface.es.js +0 -0
  349. /package/{dist/es → es}/config/types/validate-error.interface.es.js.map +0 -0
  350. /package/{dist/es → es}/counter/index.es.js +0 -0
  351. /package/{dist/es → es}/counter/index.es.js.map +0 -0
  352. /package/{dist/es → es}/custom-clipboard.es.js +0 -0
  353. /package/{dist/es → es}/custom-clipboard.es.js.map +0 -0
  354. /package/{dist/es → es}/custom-image/Options.es.js +0 -0
  355. /package/{dist/es → es}/custom-image/Options.es.js.map +0 -0
  356. /package/{dist/es → es}/custom-image/actions/Action.es.js +0 -0
  357. /package/{dist/es → es}/custom-image/actions/Action.es.js.map +0 -0
  358. /package/{dist/es → es}/custom-image/actions/CustomResizeAction.es.js +0 -0
  359. /package/{dist/es → es}/custom-image/actions/CustomResizeAction.es.js.map +0 -0
  360. /package/{dist/es → es}/custom-image/actions/DeleteAction.es.js +0 -0
  361. /package/{dist/es → es}/custom-image/actions/DeleteAction.es.js.map +0 -0
  362. /package/{dist/es → es}/custom-image/image.es.js +0 -0
  363. /package/{dist/es → es}/custom-image/image.es.js.map +0 -0
  364. /package/{dist/es → es}/custom-image/specs/BlotSpec.es.js +0 -0
  365. /package/{dist/es → es}/custom-image/specs/BlotSpec.es.js.map +0 -0
  366. /package/{dist/es → es}/custom-image/specs/CustomImageSpec.es.js +0 -0
  367. /package/{dist/es → es}/custom-image/specs/CustomImageSpec.es.js.map +0 -0
  368. /package/{dist/es → es}/custom-image/specs/ImageSpec.es.js +0 -0
  369. /package/{dist/es → es}/custom-image/specs/ImageSpec.es.js.map +0 -0
  370. /package/{dist/es → es}/custom-uploader.es.js +0 -0
  371. /package/{dist/es → es}/custom-uploader.es.js.map +0 -0
  372. /package/{dist/es → es}/emoji/emoji-list/index.es.js +0 -0
  373. /package/{dist/es → es}/emoji/emoji-list/index.es.js.map +0 -0
  374. /package/{dist/es → es}/emoji/emoji-list/people.es.js +0 -0
  375. /package/{dist/es → es}/emoji/emoji-list/people.es.js.map +0 -0
  376. /package/{dist/es → es}/emoji/emoji-list.es.js +0 -0
  377. /package/{dist/es → es}/emoji/emoji-list.es.js.map +0 -0
  378. /package/{dist/es → es}/emoji/emoji-map.es.js +0 -0
  379. /package/{dist/es → es}/emoji/emoji-map.es.js.map +0 -0
  380. /package/{dist/es → es}/emoji/formats/emoji-blot.es.js +0 -0
  381. /package/{dist/es → es}/emoji/formats/emoji-blot.es.js.map +0 -0
  382. /package/{dist/es → es}/emoji/index.es.js +0 -0
  383. /package/{dist/es → es}/emoji/index.es.js.map +0 -0
  384. /package/{dist/es → es}/emoji/modules/emoji.es.js +0 -0
  385. /package/{dist/es → es}/emoji/modules/emoji.es.js.map +0 -0
  386. /package/{dist/es → es}/emoji/modules/toolbar-emoji.es.js +0 -0
  387. /package/{dist/es → es}/emoji/modules/toolbar-emoji.es.js.map +0 -0
  388. /package/{dist/es → es}/emoji/utils.es.js +0 -0
  389. /package/{dist/es → es}/emoji/utils.es.js.map +0 -0
  390. /package/{dist/es → es}/file/formats/file.es.js +0 -0
  391. /package/{dist/es → es}/file/formats/file.es.js.map +0 -0
  392. /package/{dist/es → es}/file/index.es.js +0 -0
  393. /package/{dist/es → es}/file/index.es.js.map +0 -0
  394. /package/{dist/es → es}/file/modules/file-bar.es.js +0 -0
  395. /package/{dist/es → es}/file/modules/file-bar.es.js.map +0 -0
  396. /package/{dist/es → es}/format-painter/index.es.js +0 -0
  397. /package/{dist/es → es}/format-painter/index.es.js.map +0 -0
  398. /package/{dist/es → es}/global-link/constants.es.js +0 -0
  399. /package/{dist/es → es}/global-link/constants.es.js.map +0 -0
  400. /package/{dist/es → es}/global-link/formats/customer-widget-link.es.js +0 -0
  401. /package/{dist/es → es}/global-link/formats/customer-widget-link.es.js.map +0 -0
  402. /package/{dist/es → es}/global-link/formats/doc-link.es.js +0 -0
  403. /package/{dist/es → es}/global-link/formats/doc-link.es.js.map +0 -0
  404. /package/{dist/es → es}/global-link/formats/wiki-link.es.js +0 -0
  405. /package/{dist/es → es}/global-link/formats/wiki-link.es.js.map +0 -0
  406. /package/{dist/es → es}/global-link/formats/work-item-link.es.js +0 -0
  407. /package/{dist/es → es}/global-link/formats/work-item-link.es.js.map +0 -0
  408. /package/{dist/es → es}/global-link/global-link-panel.es.js +0 -0
  409. /package/{dist/es → es}/global-link/global-link-panel.es.js.map +0 -0
  410. /package/{dist/es → es}/global-link/index.es.js +0 -0
  411. /package/{dist/es → es}/global-link/index.es.js.map +0 -0
  412. /package/{dist/es → es}/global-link/utils/createTable.es.js +0 -0
  413. /package/{dist/es → es}/global-link/utils/createTable.es.js.map +0 -0
  414. /package/{dist/es → es}/index.es.js.map +0 -0
  415. /package/{dist/es → es}/mention/Mention.es.js +0 -0
  416. /package/{dist/es → es}/mention/Mention.es.js.map +0 -0
  417. /package/{dist/es → es}/mention/MentionLink.es.js +0 -0
  418. /package/{dist/es → es}/mention/MentionLink.es.js.map +0 -0
  419. /package/{dist/es → es}/mention/constants.es.js +0 -0
  420. /package/{dist/es → es}/mention/constants.es.js.map +0 -0
  421. /package/{dist/es → es}/quick-menu/index.es.js +0 -0
  422. /package/{dist/es → es}/quick-menu/index.es.js.map +0 -0
  423. /package/{dist/es → es}/screenshot/index.es.js +0 -0
  424. /package/{dist/es → es}/screenshot/index.es.js.map +0 -0
  425. /package/{dist/es → es}/soft-break/index.es.js +0 -0
  426. /package/{dist/es → es}/soft-break/index.es.js.map +0 -0
  427. /package/{dist/es → es}/strike/index.es.js +0 -0
  428. /package/{dist/es → es}/strike/index.es.js.map +0 -0
  429. /package/{dist/es → es}/syntax/index.es.js +0 -0
  430. /package/{dist/es → es}/syntax/index.es.js.map +0 -0
  431. /package/{dist/es → es}/table/better-table.es.js +0 -0
  432. /package/{dist/es → es}/table/better-table.es.js.map +0 -0
  433. /package/{dist/es → es}/table/formats/header.es.js +0 -0
  434. /package/{dist/es → es}/table/formats/header.es.js.map +0 -0
  435. /package/{dist/es → es}/table/formats/list.es.js +0 -0
  436. /package/{dist/es → es}/table/formats/list.es.js.map +0 -0
  437. /package/{dist/es → es}/table/formats/table.es.js +0 -0
  438. /package/{dist/es → es}/table/formats/table.es.js.map +0 -0
  439. /package/{dist/es → es}/table/modules/table-column-tool.es.js +0 -0
  440. /package/{dist/es → es}/table/modules/table-column-tool.es.js.map +0 -0
  441. /package/{dist/es → es}/table/modules/table-operation-menu.es.js +0 -0
  442. /package/{dist/es → es}/table/modules/table-operation-menu.es.js.map +0 -0
  443. /package/{dist/es → es}/table/modules/table-scroll-bar.es.js +0 -0
  444. /package/{dist/es → es}/table/modules/table-scroll-bar.es.js.map +0 -0
  445. /package/{dist/es → es}/table/modules/table-selection.es.js +0 -0
  446. /package/{dist/es → es}/table/modules/table-selection.es.js.map +0 -0
  447. /package/{dist/es → es}/table/table-config.es.js +0 -0
  448. /package/{dist/es → es}/table/table-config.es.js.map +0 -0
  449. /package/{dist/es → es}/table/utils/index.es.js +0 -0
  450. /package/{dist/es → es}/table/utils/index.es.js.map +0 -0
  451. /package/{dist/es → es}/table/utils/node-matchers.es.js +0 -0
  452. /package/{dist/es → es}/table/utils/node-matchers.es.js.map +0 -0
  453. /package/{dist/es → es}/toolbar/better-picker.es.js +0 -0
  454. /package/{dist/es → es}/toolbar/better-picker.es.js.map +0 -0
  455. /package/{dist/es → es}/toolbar/index.es.js +0 -0
  456. /package/{dist/es → es}/toolbar/index.es.js.map +0 -0
  457. /package/{dist/es → es}/utils/debounce.es.js +0 -0
  458. /package/{dist/es → es}/utils/debounce.es.js.map +0 -0
  459. /package/{dist/es → es}/utils/image.es.js +0 -0
  460. /package/{dist/es → es}/utils/image.es.js.map +0 -0
  461. /package/{dist/es → es}/utils/method.es.js +0 -0
  462. /package/{dist/es → es}/utils/method.es.js.map +0 -0
  463. /package/{dist/es → es}/utils/scroll-lock.es.js +0 -0
  464. /package/{dist/es → es}/utils/scroll-lock.es.js.map +0 -0
  465. /package/{dist/es → es}/video/index.es.js +0 -0
  466. /package/{dist/es → es}/video/index.es.js.map +0 -0
  467. /package/{dist/lib → lib}/attributors/font-size.cjs.js +0 -0
  468. /package/{dist/lib → lib}/attributors/font-size.cjs.js.map +0 -0
  469. /package/{dist/lib → lib}/attributors/font-style.cjs.js +0 -0
  470. /package/{dist/lib → lib}/attributors/font-style.cjs.js.map +0 -0
  471. /package/{dist/lib → lib}/attributors/index.cjs.js +0 -0
  472. /package/{dist/lib → lib}/attributors/index.cjs.js.map +0 -0
  473. /package/{dist/lib → lib}/attributors/line-height.cjs.js +0 -0
  474. /package/{dist/lib → lib}/attributors/line-height.cjs.js.map +0 -0
  475. /package/{dist/lib → lib}/attributors/text-indent.cjs.js +0 -0
  476. /package/{dist/lib → lib}/attributors/text-indent.cjs.js.map +0 -0
  477. /package/{dist/lib → lib}/config/base64-image.cjs.js +0 -0
  478. /package/{dist/lib → lib}/config/base64-image.cjs.js.map +0 -0
  479. /package/{dist/lib → lib}/config/editor.config.cjs.js +0 -0
  480. /package/{dist/lib → lib}/config/editor.config.cjs.js.map +0 -0
  481. /package/{dist/lib → lib}/config/i18n/en-us.cjs.js +0 -0
  482. /package/{dist/lib → lib}/config/i18n/en-us.cjs.js.map +0 -0
  483. /package/{dist/lib → lib}/config/i18n/zh-cn.cjs.js +0 -0
  484. /package/{dist/lib → lib}/config/i18n/zh-cn.cjs.js.map +0 -0
  485. /package/{dist/lib → lib}/config/types/additional-toolbar-item.interface.cjs.js +0 -0
  486. /package/{dist/lib → lib}/config/types/additional-toolbar-item.interface.cjs.js.map +0 -0
  487. /package/{dist/lib → lib}/config/types/content-change.interface.cjs.js +0 -0
  488. /package/{dist/lib → lib}/config/types/content-change.interface.cjs.js.map +0 -0
  489. /package/{dist/lib → lib}/config/types/content-save.interface.cjs.js +0 -0
  490. /package/{dist/lib → lib}/config/types/content-save.interface.cjs.js.map +0 -0
  491. /package/{dist/lib → lib}/config/types/counter-option.interface.cjs.js +0 -0
  492. /package/{dist/lib → lib}/config/types/counter-option.interface.cjs.js.map +0 -0
  493. /package/{dist/lib → lib}/config/types/editor-config.interface.cjs.js +0 -0
  494. /package/{dist/lib → lib}/config/types/editor-config.interface.cjs.js.map +0 -0
  495. /package/{dist/lib → lib}/config/types/editor-modules.interface.cjs.js +0 -0
  496. /package/{dist/lib → lib}/config/types/editor-modules.interface.cjs.js.map +0 -0
  497. /package/{dist/lib → lib}/config/types/file-operation.interface.cjs.js +0 -0
  498. /package/{dist/lib → lib}/config/types/file-operation.interface.cjs.js.map +0 -0
  499. /package/{dist/lib → lib}/config/types/focus-change.interface.cjs.js +0 -0
  500. /package/{dist/lib → lib}/config/types/focus-change.interface.cjs.js.map +0 -0
  501. /package/{dist/lib → lib}/config/types/fullscreen-module.interface.cjs.js +0 -0
  502. /package/{dist/lib → lib}/config/types/fullscreen-module.interface.cjs.js.map +0 -0
  503. /package/{dist/lib → lib}/config/types/help-panel-item.interface.cjs.js +0 -0
  504. /package/{dist/lib → lib}/config/types/help-panel-item.interface.cjs.js.map +0 -0
  505. /package/{dist/lib → lib}/config/types/help-panel-option.interface.cjs.js +0 -0
  506. /package/{dist/lib → lib}/config/types/help-panel-option.interface.cjs.js.map +0 -0
  507. /package/{dist/lib → lib}/config/types/image-module.interface.cjs.js +0 -0
  508. /package/{dist/lib → lib}/config/types/image-module.interface.cjs.js.map +0 -0
  509. /package/{dist/lib → lib}/config/types/image-upload.interface.cjs.js +0 -0
  510. /package/{dist/lib → lib}/config/types/image-upload.interface.cjs.js.map +0 -0
  511. /package/{dist/lib → lib}/config/types/load-on-demand-module.interface.cjs.js +0 -0
  512. /package/{dist/lib → lib}/config/types/load-on-demand-module.interface.cjs.js.map +0 -0
  513. /package/{dist/lib → lib}/config/types/mention-module.interface.cjs.js +0 -0
  514. /package/{dist/lib → lib}/config/types/mention-module.interface.cjs.js.map +0 -0
  515. /package/{dist/lib → lib}/config/types/paste-change.interface.cjs.js +0 -0
  516. /package/{dist/lib → lib}/config/types/paste-change.interface.cjs.js.map +0 -0
  517. /package/{dist/lib → lib}/config/types/quick-menu-module.interface.cjs.js +0 -0
  518. /package/{dist/lib → lib}/config/types/quick-menu-module.interface.cjs.js.map +0 -0
  519. /package/{dist/lib → lib}/config/types/range.interface.cjs.js +0 -0
  520. /package/{dist/lib → lib}/config/types/range.interface.cjs.js.map +0 -0
  521. /package/{dist/lib → lib}/config/types/registry-options.interface.cjs.js +0 -0
  522. /package/{dist/lib → lib}/config/types/registry-options.interface.cjs.js.map +0 -0
  523. /package/{dist/lib → lib}/config/types/selection-change.interface.cjs.js +0 -0
  524. /package/{dist/lib → lib}/config/types/selection-change.interface.cjs.js.map +0 -0
  525. /package/{dist/lib → lib}/config/types/toolbar-item.interface.cjs.js +0 -0
  526. /package/{dist/lib → lib}/config/types/toolbar-item.interface.cjs.js.map +0 -0
  527. /package/{dist/lib → lib}/config/types/type.cjs.js +0 -0
  528. /package/{dist/lib → lib}/config/types/type.cjs.js.map +0 -0
  529. /package/{dist/lib → lib}/config/types/validate-error.interface.cjs.js +0 -0
  530. /package/{dist/lib → lib}/config/types/validate-error.interface.cjs.js.map +0 -0
  531. /package/{dist/lib → lib}/counter/index.cjs.js +0 -0
  532. /package/{dist/lib → lib}/counter/index.cjs.js.map +0 -0
  533. /package/{dist/lib → lib}/custom-clipboard.cjs.js +0 -0
  534. /package/{dist/lib → lib}/custom-clipboard.cjs.js.map +0 -0
  535. /package/{dist/lib → lib}/custom-image/Options.cjs.js +0 -0
  536. /package/{dist/lib → lib}/custom-image/Options.cjs.js.map +0 -0
  537. /package/{dist/lib → lib}/custom-image/actions/Action.cjs.js +0 -0
  538. /package/{dist/lib → lib}/custom-image/actions/Action.cjs.js.map +0 -0
  539. /package/{dist/lib → lib}/custom-image/actions/CustomResizeAction.cjs.js +0 -0
  540. /package/{dist/lib → lib}/custom-image/actions/CustomResizeAction.cjs.js.map +0 -0
  541. /package/{dist/lib → lib}/custom-image/actions/DeleteAction.cjs.js +0 -0
  542. /package/{dist/lib → lib}/custom-image/actions/DeleteAction.cjs.js.map +0 -0
  543. /package/{dist/lib → lib}/custom-image/image.cjs.js +0 -0
  544. /package/{dist/lib → lib}/custom-image/image.cjs.js.map +0 -0
  545. /package/{dist/lib → lib}/custom-image/specs/BlotSpec.cjs.js +0 -0
  546. /package/{dist/lib → lib}/custom-image/specs/BlotSpec.cjs.js.map +0 -0
  547. /package/{dist/lib → lib}/custom-image/specs/CustomImageSpec.cjs.js +0 -0
  548. /package/{dist/lib → lib}/custom-image/specs/CustomImageSpec.cjs.js.map +0 -0
  549. /package/{dist/lib → lib}/custom-image/specs/ImageSpec.cjs.js +0 -0
  550. /package/{dist/lib → lib}/custom-image/specs/ImageSpec.cjs.js.map +0 -0
  551. /package/{dist/lib → lib}/custom-uploader.cjs.js +0 -0
  552. /package/{dist/lib → lib}/custom-uploader.cjs.js.map +0 -0
  553. /package/{dist/lib → lib}/emoji/emoji-list/index.cjs.js +0 -0
  554. /package/{dist/lib → lib}/emoji/emoji-list/index.cjs.js.map +0 -0
  555. /package/{dist/lib → lib}/emoji/emoji-list/people.cjs.js +0 -0
  556. /package/{dist/lib → lib}/emoji/emoji-list/people.cjs.js.map +0 -0
  557. /package/{dist/lib → lib}/emoji/emoji-list.cjs.js +0 -0
  558. /package/{dist/lib → lib}/emoji/emoji-list.cjs.js.map +0 -0
  559. /package/{dist/lib → lib}/emoji/emoji-map.cjs.js +0 -0
  560. /package/{dist/lib → lib}/emoji/emoji-map.cjs.js.map +0 -0
  561. /package/{dist/lib → lib}/emoji/formats/emoji-blot.cjs.js +0 -0
  562. /package/{dist/lib → lib}/emoji/formats/emoji-blot.cjs.js.map +0 -0
  563. /package/{dist/lib → lib}/emoji/index.cjs.js +0 -0
  564. /package/{dist/lib → lib}/emoji/index.cjs.js.map +0 -0
  565. /package/{dist/lib → lib}/emoji/modules/emoji.cjs.js +0 -0
  566. /package/{dist/lib → lib}/emoji/modules/emoji.cjs.js.map +0 -0
  567. /package/{dist/lib → lib}/emoji/modules/toolbar-emoji.cjs.js +0 -0
  568. /package/{dist/lib → lib}/emoji/modules/toolbar-emoji.cjs.js.map +0 -0
  569. /package/{dist/lib → lib}/emoji/utils.cjs.js +0 -0
  570. /package/{dist/lib → lib}/emoji/utils.cjs.js.map +0 -0
  571. /package/{dist/lib → lib}/file/formats/file.cjs.js +0 -0
  572. /package/{dist/lib → lib}/file/formats/file.cjs.js.map +0 -0
  573. /package/{dist/lib → lib}/file/index.cjs.js +0 -0
  574. /package/{dist/lib → lib}/file/index.cjs.js.map +0 -0
  575. /package/{dist/lib → lib}/file/modules/file-bar.cjs.js +0 -0
  576. /package/{dist/lib → lib}/file/modules/file-bar.cjs.js.map +0 -0
  577. /package/{dist/lib → lib}/format-painter/index.cjs.js +0 -0
  578. /package/{dist/lib → lib}/format-painter/index.cjs.js.map +0 -0
  579. /package/{dist/lib → lib}/global-link/constants.cjs.js +0 -0
  580. /package/{dist/lib → lib}/global-link/constants.cjs.js.map +0 -0
  581. /package/{dist/lib → lib}/global-link/formats/customer-widget-link.cjs.js +0 -0
  582. /package/{dist/lib → lib}/global-link/formats/customer-widget-link.cjs.js.map +0 -0
  583. /package/{dist/lib → lib}/global-link/formats/doc-link.cjs.js +0 -0
  584. /package/{dist/lib → lib}/global-link/formats/doc-link.cjs.js.map +0 -0
  585. /package/{dist/lib → lib}/global-link/formats/wiki-link.cjs.js +0 -0
  586. /package/{dist/lib → lib}/global-link/formats/wiki-link.cjs.js.map +0 -0
  587. /package/{dist/lib → lib}/global-link/formats/work-item-link.cjs.js +0 -0
  588. /package/{dist/lib → lib}/global-link/formats/work-item-link.cjs.js.map +0 -0
  589. /package/{dist/lib → lib}/global-link/global-link-panel.cjs.js +0 -0
  590. /package/{dist/lib → lib}/global-link/global-link-panel.cjs.js.map +0 -0
  591. /package/{dist/lib → lib}/global-link/index.cjs.js +0 -0
  592. /package/{dist/lib → lib}/global-link/index.cjs.js.map +0 -0
  593. /package/{dist/lib → lib}/global-link/utils/createTable.cjs.js +0 -0
  594. /package/{dist/lib → lib}/global-link/utils/createTable.cjs.js.map +0 -0
  595. /package/{dist/lib → lib}/mention/Mention.cjs.js +0 -0
  596. /package/{dist/lib → lib}/mention/Mention.cjs.js.map +0 -0
  597. /package/{dist/lib → lib}/mention/MentionLink.cjs.js +0 -0
  598. /package/{dist/lib → lib}/mention/MentionLink.cjs.js.map +0 -0
  599. /package/{dist/lib → lib}/mention/constants.cjs.js +0 -0
  600. /package/{dist/lib → lib}/mention/constants.cjs.js.map +0 -0
  601. /package/{dist/lib → lib}/quick-menu/index.cjs.js +0 -0
  602. /package/{dist/lib → lib}/quick-menu/index.cjs.js.map +0 -0
  603. /package/{dist/lib → lib}/screenshot/index.cjs.js +0 -0
  604. /package/{dist/lib → lib}/screenshot/index.cjs.js.map +0 -0
  605. /package/{dist/lib → lib}/soft-break/index.cjs.js +0 -0
  606. /package/{dist/lib → lib}/soft-break/index.cjs.js.map +0 -0
  607. /package/{dist/lib → lib}/strike/index.cjs.js +0 -0
  608. /package/{dist/lib → lib}/strike/index.cjs.js.map +0 -0
  609. /package/{dist/lib → lib}/syntax/index.cjs.js +0 -0
  610. /package/{dist/lib → lib}/syntax/index.cjs.js.map +0 -0
  611. /package/{dist/lib → lib}/table/better-table.cjs.js +0 -0
  612. /package/{dist/lib → lib}/table/better-table.cjs.js.map +0 -0
  613. /package/{dist/lib → lib}/table/formats/header.cjs.js +0 -0
  614. /package/{dist/lib → lib}/table/formats/header.cjs.js.map +0 -0
  615. /package/{dist/lib → lib}/table/formats/list.cjs.js +0 -0
  616. /package/{dist/lib → lib}/table/formats/list.cjs.js.map +0 -0
  617. /package/{dist/lib → lib}/table/formats/table.cjs.js +0 -0
  618. /package/{dist/lib → lib}/table/formats/table.cjs.js.map +0 -0
  619. /package/{dist/lib → lib}/table/modules/table-column-tool.cjs.js +0 -0
  620. /package/{dist/lib → lib}/table/modules/table-column-tool.cjs.js.map +0 -0
  621. /package/{dist/lib → lib}/table/modules/table-operation-menu.cjs.js +0 -0
  622. /package/{dist/lib → lib}/table/modules/table-operation-menu.cjs.js.map +0 -0
  623. /package/{dist/lib → lib}/table/modules/table-scroll-bar.cjs.js +0 -0
  624. /package/{dist/lib → lib}/table/modules/table-scroll-bar.cjs.js.map +0 -0
  625. /package/{dist/lib → lib}/table/modules/table-selection.cjs.js +0 -0
  626. /package/{dist/lib → lib}/table/modules/table-selection.cjs.js.map +0 -0
  627. /package/{dist/lib → lib}/table/table-config.cjs.js +0 -0
  628. /package/{dist/lib → lib}/table/table-config.cjs.js.map +0 -0
  629. /package/{dist/lib → lib}/table/utils/index.cjs.js +0 -0
  630. /package/{dist/lib → lib}/table/utils/index.cjs.js.map +0 -0
  631. /package/{dist/lib → lib}/table/utils/node-matchers.cjs.js +0 -0
  632. /package/{dist/lib → lib}/table/utils/node-matchers.cjs.js.map +0 -0
  633. /package/{dist/lib → lib}/toolbar/better-picker.cjs.js +0 -0
  634. /package/{dist/lib → lib}/toolbar/better-picker.cjs.js.map +0 -0
  635. /package/{dist/lib → lib}/toolbar/index.cjs.js +0 -0
  636. /package/{dist/lib → lib}/toolbar/index.cjs.js.map +0 -0
  637. /package/{dist/lib → lib}/utils/debounce.cjs.js +0 -0
  638. /package/{dist/lib → lib}/utils/debounce.cjs.js.map +0 -0
  639. /package/{dist/lib → lib}/utils/image.cjs.js +0 -0
  640. /package/{dist/lib → lib}/utils/image.cjs.js.map +0 -0
  641. /package/{dist/lib → lib}/utils/method.cjs.js +0 -0
  642. /package/{dist/lib → lib}/utils/method.cjs.js.map +0 -0
  643. /package/{dist/lib → lib}/utils/scroll-lock.cjs.js +0 -0
  644. /package/{dist/lib → lib}/utils/scroll-lock.cjs.js.map +0 -0
  645. /package/{dist/lib → lib}/video/index.cjs.js +0 -0
  646. /package/{dist/lib → lib}/video/index.cjs.js.map +0 -0
@@ -1,1272 +0,0 @@
1
- import Quill from 'quill'
2
- import { isNullOrUndefined } from '../../config/editor.utils'
3
- import { compare } from '../../utils/method'
4
- import {
5
- CELL_ATTRIBUTES,
6
- CELL_DEFAULT,
7
- CELL_IDENTITY_KEYS,
8
- CELL_MIN_HEIGHT,
9
- COL_ATTRIBUTES,
10
- COL_DEFAULT,
11
- ERROR_LIMIT,
12
- } from '../table-config'
13
- import { getRelativeRect } from '../utils'
14
- import Header from './header'
15
- import ListItem, { ListContainer } from './list'
16
-
17
- const Break = Quill.imports['blots/break']
18
- const Block = Quill.imports['blots/block']
19
- const Container = Quill.imports['blots/container']
20
-
21
- // @dynamic
22
- class TableCellLine extends Block {
23
- static requiredContainer: any
24
- static tagName: string
25
- static className: string
26
- static blotName: any
27
- domNode: any
28
- statics: any
29
- wrap: any
30
- parent: any
31
-
32
- static create(value) {
33
- const node = super.create(value)
34
-
35
- // fix: when td has background-color, quill can't set it to table-cell blot
36
- if (value.tdBgColor) {
37
- node.setAttribute(`data-parent-bg`, value.tdBgColor)
38
- delete value.tdBgColor
39
- }
40
-
41
- CELL_IDENTITY_KEYS.forEach((key) => {
42
- const identityMaker = key === 'row' ? rowId : cellId
43
- node.setAttribute(`data-${key}`, value[key] || identityMaker())
44
- })
45
-
46
- CELL_ATTRIBUTES.forEach((attrName) => {
47
- const keyValue = value[attrName] || CELL_DEFAULT[attrName]
48
- keyValue && node.setAttribute(`data-${attrName}`, keyValue)
49
- })
50
-
51
- if (value.height) {
52
- node.setAttribute('height', value.height)
53
- }
54
-
55
- return node
56
- }
57
-
58
- static formats(domNode) {
59
- const formats = {}
60
- if (formats.list) {
61
- formats.list = domNode.classList.item(0)
62
- }
63
- return reduceFormats(domNode, formats)
64
- }
65
-
66
- toggleAttribute(name, value) {
67
- if (value) {
68
- this.domNode.setAttribute(name, value)
69
- }
70
- else {
71
- this.domNode.removeAttribute(name)
72
- }
73
- }
74
-
75
- formatChildren(name, value) {
76
- this.children.forEach((child) => {
77
- child.format && child.format(name, value)
78
- if (!child.domNode.style) {
79
- return
80
- }
81
- if (child.domNode.tagName === 'SPAN' && value) {
82
- child.domNode.style.backgroundColor = value
83
- }
84
- else {
85
- child.domNode.style.backgroundColor = 'initial'
86
- }
87
- })
88
- }
89
-
90
- format(name, value) {
91
- if ([...CELL_ATTRIBUTES, ...CELL_IDENTITY_KEYS, 'parent-bg'].includes(name)) {
92
- if (value) {
93
- this.domNode.setAttribute(`data-${name}`, value)
94
- }
95
- else {
96
- this.domNode.removeAttribute(`data-${name}`)
97
- }
98
- }
99
- else if (name === 'header') {
100
- if (!value) {
101
- return
102
- }
103
- const { row, cell, rowspan, colspan }: any = TableCellLine.formats(this.domNode)
104
- super.format(name, {
105
- value,
106
- row,
107
- cell,
108
- rowspan,
109
- colspan,
110
- })
111
- }
112
- else {
113
- super.format(name, value)
114
- }
115
- switch (true) {
116
- case name === 'cell-bg': {
117
- this.toggleAttribute('data-cell-bg', value)
118
- }
119
- }
120
- }
121
-
122
- optimize(context) {
123
- super.optimize(context)
124
-
125
- // cover shadowBlot's wrap call, pass params parentBlot initialize
126
- // needed
127
- const { row, cell, rowspan, colspan, cellBg } = this.domNode.dataset
128
- const formats: Record<string, any> = TableCellLine.formats(this.domNode)
129
- const parentFormats = this.parent.formats()
130
- if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
131
- this.wrap(this.statics.requiredContainer.blotName, { row, cell, rowspan, colspan, cellBg })
132
- }
133
- else if (!compare(formats, parentFormats)) {
134
- this.parent.format('row', formats.row)
135
- this.parent.format('cell', formats.cell)
136
- this.parent.format('rowspan', formats.rowspan)
137
- this.parent.format('colspan', formats.colspan)
138
- formats['cell-bg'] && this.parent.setCellBg(formats['cell-bg'])
139
- }
140
-
141
- const parentHeight = this.domNode.getAttribute('height')
142
- if (parentHeight) {
143
- this.parent.domNode.style.height = parentHeight
144
- }
145
- }
146
-
147
- tableCell() {
148
- return this.parent
149
- }
150
- }
151
- TableCellLine.blotName = 'table-cell-line'
152
- TableCellLine.className = 'qlbt-cell-line'
153
- TableCellLine.tagName = 'DIV'
154
-
155
- // @dynamic
156
- class TableCell extends Container {
157
- static allowedChildren: any
158
- static blotName: any
159
- static requiredContainer: any
160
- static tagName: string
161
- next: any
162
- children: any
163
- parent: any
164
- domNode: any
165
- statics: any
166
- wrap: any
167
- splitAfter: any
168
- prev: any
169
- scroll: any
170
-
171
- static create(value = { row: rowId() }) {
172
- const node = super.create(value)
173
-
174
- CELL_IDENTITY_KEYS.forEach((key) => {
175
- node.setAttribute(`data-${key}`, value[key])
176
- })
177
-
178
- CELL_ATTRIBUTES.forEach((attrName) => {
179
- if (value[attrName]) {
180
- node.setAttribute(attrName, value[attrName])
181
- }
182
- })
183
-
184
- return node
185
- }
186
-
187
- static formats(domNode) {
188
- const formats = {
189
- height: undefined,
190
- row: undefined,
191
- }
192
-
193
- formats.height = domNode.getAttribute('height') || undefined
194
-
195
- if (domNode.hasAttribute('data-row')) {
196
- formats.row = domNode.getAttribute('data-row')
197
- }
198
-
199
- if (domNode.hasAttribute('data-cell-bg')) {
200
- formats['cell-bg'] = domNode.getAttribute('data-cell-bg') || undefined
201
- }
202
- return CELL_ATTRIBUTES.reduce((formats, attribute) => {
203
- if (domNode.hasAttribute(attribute)) {
204
- formats[attribute] = domNode.getAttribute(attribute)
205
- }
206
-
207
- return formats
208
- }, formats)
209
- }
210
-
211
- checkMerge() {
212
- if (super.checkMerge() && !isNullOrUndefined(this.next.children.head)) {
213
- const getCellId = (node) => {
214
- return (
215
- (node.formats && node.formats()[node.statics.blotName]) || {
216
- cell: node.domNode.getAttribute('data-cell'),
217
- }
218
- )
219
- }
220
- const thisHead = getCellId(this.children.head)
221
- const thisTail = getCellId(this.children.tail)
222
- const nextHead = getCellId(this.next.children.head)
223
- const nextTail = getCellId(this.next.children.tail)
224
- return thisHead.cell === thisTail.cell && thisHead.cell === nextHead.cell && thisHead.cell === nextTail.cell
225
- }
226
- return false
227
- }
228
-
229
- cellOffset() {
230
- if (this.parent) {
231
- return this.parent.children.indexOf(this)
232
- }
233
- return -1
234
- }
235
-
236
- formats() {
237
- const formats = {}
238
-
239
- if (this.domNode.hasAttribute('data-row')) {
240
- formats.row = this.domNode.getAttribute('data-row')
241
- }
242
- if (this.domNode.hasAttribute('data-cell')) {
243
- formats.cell = this.domNode.getAttribute('data-cell')
244
- }
245
-
246
- return CELL_ATTRIBUTES.reduce((tableFormats, attribute) => {
247
- if (this.domNode.hasAttribute(attribute)) {
248
- tableFormats[attribute] = this.domNode.getAttribute(attribute)
249
- }
250
-
251
- return tableFormats
252
- }, formats)
253
- }
254
-
255
- toggleAttribute(name, value) {
256
- if (value) {
257
- this.domNode.setAttribute(name, value)
258
- }
259
- else {
260
- this.domNode.removeAttribute(name)
261
- }
262
- }
263
-
264
- formatChildren(name, value) {
265
- this.children.forEach((child) => {
266
- child.format(name, value)
267
- })
268
- }
269
-
270
- /**
271
- * this method is for TableCellLine to change cell background color
272
- * if use `format('cell-bg', value)` will loop trigger
273
- * TableCellLine.optimize -> TableCell.format -> TableCellLine.optimize ...
274
- */
275
- setCellBg(value?: string) {
276
- if (value) {
277
- this.domNode.style.backgroundColor = value
278
- }
279
- else {
280
- this.domNode.style.backgroundColor = 'initial'
281
- }
282
- }
283
-
284
- format(name, value) {
285
- const quill = Quill.find(this.scroll.domNode.parentNode)
286
- switch (true) {
287
- case CELL_ATTRIBUTES.includes(name):
288
- this.toggleAttribute(name, value)
289
- break
290
- case ['row', 'cell'].includes(name):
291
- this.toggleAttribute(`data-${name}`, value)
292
- break
293
- case name === 'background': {
294
- const hasBgColor = this.domNode.querySelectorAll('div.qlbt-cell-line[data-parent-bg]')
295
- hasBgColor.forEach(child => child.removeAttribute('data-parent-bg'))
296
- this.domNode.style.background = ''
297
- this.domNode.style.backgroundColor = value
298
- this.children.head.format('parent-bg', value)
299
- break
300
- }
301
- // TODO: 其他格式可同理实现,但已有格式清除时会清除所有格式,待解决
302
- case name === 'size': {
303
- const start = quill.getIndex(this.children.head)
304
- const total = quill.getIndex(this.children.tail) + this.children.tail.length()
305
- const length = total - start > 0 ? total - start : 0
306
- quill.setSelection(start, length, Quill.sources.USER)
307
- quill.format(name, value, Quill.sources.USER)
308
- // 设置选区后需清除选区,否则会固定处理选区内容
309
- quill.setSelection(start)
310
- break
311
- }
312
- case name === 'cell-bg': {
313
- this.toggleAttribute('data-cell-bg', value)
314
- this.toggleAttribute('data-parent-bg', value)
315
- this.formatChildren(name, value)
316
- this.setCellBg(value)
317
- break
318
- }
319
- }
320
- }
321
-
322
- optimize(context) {
323
- // fix: when td has background-color, quill can't set it to table-cell bolt
324
- const hasBg: any = Array.from(this.domNode.childNodes).find((item: any) => item.getAttribute('data-parent-bg'))
325
- const bgColor = hasBg && hasBg.getAttribute('data-parent-bg')
326
- if (bgColor && bgColor !== this.domNode.style.backgroundColor) {
327
- this.domNode.style.backgroundColor = bgColor
328
- }
329
-
330
- const rId = this.domNode.getAttribute('data-row')
331
- if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
332
- this.wrap(this.statics.requiredContainer.blotName, {
333
- row: rId,
334
- })
335
- }
336
- else if (rId !== this.parent.formats().row) {
337
- this.parent.format('row', rId)
338
- }
339
-
340
- this.children.forEach((child) => {
341
- if (isNullOrUndefined(child.next)) {
342
- return
343
- }
344
- const childFormats: any = this.getFormat(child.domNode)
345
- const nextFormats: any = this.getFormat(child.next.domNode)
346
- if (childFormats.cell !== nextFormats.cell) {
347
- const next = this.splitAfter(child)
348
- if (next) {
349
- next.optimize()
350
- }
351
- // We might be able to merge with prev now
352
- if (this.prev) {
353
- this.prev.optimize()
354
- }
355
- }
356
- })
357
-
358
- super.optimize(context)
359
- }
360
-
361
- // 兼容读取TableCell中的子blot,包括table-cell-line、line、head
362
- getFormat(domNode) {
363
- const formats = {}
364
- const firstChild = domNode.childNodes[0]
365
- if (firstChild && domNode.tagName === 'OL') {
366
- formats.list = firstChild.classList.item(0)
367
- }
368
-
369
- return reduceFormats(domNode, formats)
370
- }
371
-
372
- row() {
373
- return this.parent
374
- }
375
-
376
- rowOffset() {
377
- if (this.row()) {
378
- return -1
379
- }
380
- return this.row().rowOffset()
381
- }
382
-
383
- table() {
384
- return this.row() && this.row().table()
385
- }
386
- }
387
- TableCell.blotName = 'table'
388
- TableCell.tagName = 'TD'
389
-
390
- // @dynamic
391
- class TableRow extends Container {
392
- static requiredContainer: any
393
- static allowedChildren: any
394
- static blotName: string
395
- static tagName: string
396
- next: any
397
- children: any
398
- domNode: any
399
- statics: any
400
- wrap: any
401
- splitAfter: any
402
- enforceAllowedChildren: any
403
- uiNode: any
404
- parent: any
405
- prev: any
406
-
407
- static create(value) {
408
- const node = super.create(value)
409
- if (value.row) {
410
- node.setAttribute('data-row', value.row)
411
- }
412
- return node
413
- }
414
-
415
- checkMerge() {
416
- if (super.checkMerge() && !isNullOrUndefined(this.next.children.head)) {
417
- const thisHead = this.children.head.formats()
418
- const thisTail = this.children.tail.formats()
419
- const nextHead = this.next.children.head.formats()
420
- const nextTail = this.next.children.tail.formats()
421
-
422
- return thisHead.row === thisTail.row && thisHead.row === nextHead.row && thisHead.row === nextTail.row
423
- }
424
- return false
425
- }
426
-
427
- formats() {
428
- return ['row'].reduce((formats, attrName) => {
429
- if (this.domNode.hasAttribute(`data-${attrName}`)) {
430
- formats[attrName] = this.domNode.getAttribute(`data-${attrName}`)
431
- }
432
- return formats
433
- }, {})
434
- }
435
-
436
- format(key, value) {
437
- this.domNode.setAttribute(`data-${key}`, value)
438
- }
439
-
440
- optimize(context) {
441
- // optimize function of ShadowBlot
442
- if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
443
- this.wrap(this.statics.requiredContainer.blotName)
444
- }
445
-
446
- this.children.forEach((child) => {
447
- if (isNullOrUndefined(child.next)) {
448
- return
449
- }
450
- const childFormats = child.formats()
451
- const nextFormats = child.next.formats()
452
- if (childFormats.row !== nextFormats.row) {
453
- const next = this.splitAfter(child)
454
- if (next) {
455
- next.optimize()
456
- }
457
- if (this.prev) {
458
- this.prev.optimize()
459
- }
460
- }
461
- })
462
-
463
- super.optimize(context)
464
- }
465
-
466
- rowOffset() {
467
- if (!this.parent) {
468
- return -1
469
- }
470
- return this.parent.children.indexOf(this)
471
- }
472
-
473
- table() {
474
- return this.parent && this.parent.parent
475
- }
476
- }
477
- TableRow.blotName = 'table-row'
478
- TableRow.tagName = 'TR'
479
-
480
- // @dynamic
481
- class TableBody extends Container {
482
- static requiredContainer: any
483
- static allowedChildren: any
484
- static blotName: string
485
- static tagName: string
486
- }
487
- TableBody.blotName = 'table-body'
488
- TableBody.tagName = 'TBODY'
489
-
490
- // @dynamic
491
- class TableCol extends Block {
492
- static requiredContainer: any
493
- static blotName: string
494
- static tagName: string
495
- domNode: any
496
-
497
- static create(value) {
498
- const node = super.create(value)
499
- COL_ATTRIBUTES.forEach((attrName) => {
500
- node.setAttribute(`${attrName}`, value[attrName] || COL_DEFAULT[attrName])
501
- })
502
- return node
503
- }
504
-
505
- static formats(domNode) {
506
- return COL_ATTRIBUTES.reduce((formats, attribute) => {
507
- if (domNode.hasAttribute(`${attribute}`)) {
508
- formats[attribute] = domNode.getAttribute(`${attribute}`) || undefined
509
- }
510
- return formats
511
- }, {})
512
- }
513
-
514
- format(name, value) {
515
- if (COL_ATTRIBUTES.includes(name)) {
516
- this.domNode.setAttribute(`${name}`, value || COL_DEFAULT[name])
517
- }
518
- else {
519
- super.format(name, value)
520
- }
521
- }
522
-
523
- html() {
524
- return this.domNode.outerHTML
525
- }
526
- }
527
- TableCol.blotName = 'table-col'
528
- TableCol.tagName = 'col'
529
-
530
- // @dynamic
531
- class TableColGroup extends Container {
532
- static requiredContainer: any
533
- static allowedChildren: any
534
- static blotName: string
535
- static tagName: string
536
- parent: any
537
- statics: any
538
-
539
- optimize(context) {
540
- super.optimize(context)
541
- // optimize 是当前slot更新后调用的callback方法,当TableBody更新后判断父容器的存在和类型相符则调用更新表格宽度方法更新宽度
542
- // 切记不要在当前slot内调用能改变当前slot的方法,会造成无限循环,一般通过子更新改变父较好
543
- if (this.parent && this.statics.requiredContainer && this.parent instanceof this.statics.requiredContainer) {
544
- this.parent.updateTableWidth()
545
- }
546
- // 此时colgroup创建完毕,检查colgroup的col数量是否正确
547
- // fix:colgroup的col数量不正确导致最后一列宽度为空
548
- if (this.parent.parent.domNode.className === 'quill-better-table-wrapper'
549
- && this.parent.parent.domNode.tagName === 'DIV'
550
- && this.parent.domNode.children.length >= 2
551
- && this.parent.domNode.children[0].tagName === 'COLGROUP'
552
- && this.parent.domNode.children[1].tagName === 'TBODY'
553
- ) {
554
- let trId = ''
555
- let colSpan = 0
556
- let colgroupNumber = 0
557
- for (let i = 0; i < this.parent.domNode.children.length; i++) {
558
- if (this.parent.domNode.children[i].tagName === 'TBODY') {
559
- if (trId === '') {
560
- trId = this.parent.domNode.children[i].children[0].getAttribute('data-row')
561
- }
562
- colSpan = this.findTdColspanInTbody(this.parent.domNode.children[i], trId)
563
- }
564
- else if (this.parent.domNode.children[i].tagName === 'COLGROUP') {
565
- colgroupNumber = this.parent.domNode.children[i].children.length
566
- }
567
- }
568
- let elementSibling = this.parent.domNode.nextElementSibling
569
-
570
- while (elementSibling && elementSibling.tagName === 'TABLE') {
571
- for (let i = 0; i < elementSibling.children.length; i++) {
572
- if (elementSibling.children[i].tagName === 'TBODY') {
573
- colSpan += this.findTdColspanInTbody(elementSibling.children[i], trId)
574
- }
575
- }
576
- elementSibling = elementSibling.nextElementSibling
577
- }
578
-
579
- if (colgroupNumber < colSpan) {
580
- const length = colSpan - colgroupNumber
581
-
582
- for (let i = 0; i < length; i++) {
583
- const newCol = document.createElement('col')
584
- newCol.width = this.parent.domNode.children[0].children[this.parent.domNode.children[0].children.length - 1].width
585
- const newBr = document.createElement('br')
586
- newCol.appendChild(newBr)
587
- this.parent.domNode.children[0].appendChild(newCol)
588
- this.parent.domNode.style.width += newCol.width
589
- }
590
- }
591
- }
592
- }
593
-
594
- // this.parent.domNode.children[1].children[0].children[0].colSpan
595
- findTdColspanInTbody(tbody, trId) {
596
- let colSpan = 0
597
- // let tbodyChildrenLength
598
- for (let i = 0; i < tbody.children.length; i++) {
599
- if (tbody.children[i].getAttribute('data-row') !== trId) {
600
- return colSpan
601
- }
602
- for (let j = 0; j < tbody.children[i].children.length; j++) {
603
- if (tbody.children[i].children[j].colSpan) {
604
- colSpan += tbody.children[i].children[j].colSpan
605
- }
606
- }
607
- }
608
- return colSpan
609
- }
610
- }
611
- TableColGroup.blotName = 'table-col-group'
612
- TableColGroup.tagName = 'colgroup'
613
-
614
- // @dynamic
615
- class TableContainer extends Container {
616
- static blotName: string
617
- static className: string
618
- static tagName: string
619
- static requiredContainer: any
620
- static allowedChildren: any
621
- domNode: any
622
- parent: any
623
- children: any
624
- descendants: any
625
- scroll: any
626
- remove: any
627
- static create() {
628
- const node = super.create()
629
- return node
630
- }
631
-
632
- constructor(scroll, domNode) {
633
- super(scroll, domNode)
634
- domNode.setAttribute('contenteditable', false)
635
- this.updateTableWidth()
636
- }
637
-
638
- updateTableWidth() {
639
- let colGroup = this.colGroup()
640
- if (!colGroup) {
641
- // undo时原表格dom被移除,因此colGroup和domNode都不对应当前新表格,需从父容器dom树重新获取
642
- // 如果表格有style属性则不为新添加表格,避免错误赋值
643
- if (this.parent && this.parent.children.head && this.domNode.hasAttribute('style')) {
644
- colGroup = this.parent.children.head.children.head
645
- this.domNode = this.parent.children.head.domNode
646
- }
647
- else if (this.domNode.tagName === 'TABLE') {
648
- // this.domNode.forEach
649
- return
650
- }
651
- else {
652
- return
653
- }
654
- }
655
- const tableWidth = colGroup.children.reduce((sumWidth, col) => {
656
- // 兼容 table-col 不存在的情况
657
- const tableCol = col.formats()[TableCol.blotName]
658
- let tableColWidth = COL_DEFAULT.width
659
- if (tableCol && tableCol.width) {
660
- tableColWidth = Number.parseInt(tableCol.width, 10)
661
- }
662
- sumWidth = sumWidth + tableColWidth
663
- return sumWidth
664
- }, 0)
665
- this.domNode.removeAttribute('style')
666
- this.domNode.style.width = `${tableWidth}px`
667
- // 当表格加载结束后修正width设定为auto的列宽度
668
- if (colGroup.next) {
669
- setTimeout(() => {
670
- let tdIndex = 0
671
- let maxTds
672
- const colNum = colGroup.children.length
673
- const tableRows = this.descendants(TableRow)
674
- // 查询单元格数等于列数的行作为宽度赋值依据
675
- for (let i = 0; i < tableRows.length; i++) {
676
- const tds = tableRows[i].domNode.querySelectorAll('td')
677
- if (tds.length === colNum) {
678
- maxTds = tds
679
- break
680
- }
681
- }
682
- colGroup.children.forEach((col) => {
683
- if (maxTds && col.domNode.width === 'auto') {
684
- const width = getComputedStyle(maxTds[tdIndex]).width
685
- const num = Number.parseInt(width, 10)
686
- col.domNode.width = (num < COL_DEFAULT.width && COL_DEFAULT.width) || num
687
- }
688
- tdIndex++
689
- })
690
- })
691
- }
692
- }
693
-
694
- cells(column) {
695
- return this.rows().map(row => row.children.at(column))
696
- }
697
-
698
- colGroup() {
699
- return this.children.head
700
- }
701
-
702
- deleteColumns(compareRect, delIndexes = [], editorWrapper) {
703
- const [body] = this.descendants(TableBody)
704
- if (isNullOrUndefined(body) || isNullOrUndefined(body.children.head)) {
705
- return
706
- }
707
-
708
- const tableCells = this.descendants(TableCell)
709
- const removedCells = []
710
- const modifiedCells = []
711
-
712
- tableCells.forEach((cell) => {
713
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
714
-
715
- if (cellRect.x + ERROR_LIMIT > compareRect.x && cellRect.x1 - ERROR_LIMIT < compareRect.x1) {
716
- removedCells.push(cell)
717
- }
718
- else if (cellRect.x < compareRect.x + ERROR_LIMIT && cellRect.x1 > compareRect.x1 - ERROR_LIMIT) {
719
- modifiedCells.push(cell)
720
- }
721
- })
722
-
723
- if (removedCells.length === tableCells.length) {
724
- this.tableDestroy()
725
- return true
726
- }
727
-
728
- // remove the matches column tool cell
729
- delIndexes.forEach(() => {
730
- const col = this.colGroup().children.at(delIndexes[0])
731
- if (!col || this.colGroup().children.at(delIndexes[0]).domNode !== this.colGroup().domNode.children[delIndexes[0]]) {
732
- this.colGroup().domNode.removeChild(this.colGroup().domNode.children[delIndexes[0]])
733
- }
734
- else {
735
- col.remove()
736
- }
737
- })
738
-
739
- removedCells.forEach((cell) => {
740
- cell.remove()
741
- })
742
-
743
- modifiedCells.forEach((cell) => {
744
- const cellColspan = Number.parseInt(cell.formats().colspan, 10)
745
- // const cellWidth = parseInt(cell.formats().width, 10);
746
- cell.format('colspan', cellColspan - delIndexes.length)
747
- })
748
-
749
- this.updateTableWidth()
750
- }
751
-
752
- deleteRow(compareRect, editorWrapper) {
753
- const [body] = this.descendants(TableBody)
754
- if (isNullOrUndefined(body) || isNullOrUndefined(body.children.head)) {
755
- return
756
- }
757
-
758
- const tableCells = this.descendants(TableCell)
759
- const tableRows = this.descendants(TableRow)
760
- const removedCells = [] // cells to be removed
761
- const modifiedCells = [] // cells to be modified
762
- const fallCells = [] // cells to fall into next row
763
-
764
- tableCells.forEach((cell) => {
765
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
766
-
767
- if (cellRect.y > compareRect.y - ERROR_LIMIT && cellRect.y1 < compareRect.y1 + ERROR_LIMIT) {
768
- removedCells.push(cell)
769
- }
770
- else if (cellRect.y < compareRect.y + ERROR_LIMIT && cellRect.y1 > compareRect.y1 - ERROR_LIMIT) {
771
- modifiedCells.push(cell)
772
-
773
- if (Math.abs(cellRect.y - compareRect.y) < ERROR_LIMIT) {
774
- fallCells.push(cell)
775
- }
776
- }
777
- })
778
-
779
- if (removedCells.length === tableCells.length) {
780
- this.tableDestroy()
781
- return
782
- }
783
-
784
- // compute length of removed rows
785
- const removedRowsLength = this.rows().reduce((sum, row) => {
786
- const rowRect = getRelativeRect(row.domNode.getBoundingClientRect(), editorWrapper)
787
-
788
- if (rowRect.y > compareRect.y - ERROR_LIMIT && rowRect.y1 < compareRect.y1 + ERROR_LIMIT) {
789
- sum += 1
790
- }
791
- return sum
792
- }, 0)
793
-
794
- // it must execute before the table layout changed with other operation
795
- fallCells.forEach((cell) => {
796
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
797
- const nextRow = cell.parent.next
798
- const cellsInNextRow = nextRow.children
799
-
800
- const refCell = cellsInNextRow.reduce((ref, compareCell) => {
801
- const compareCellRect = getRelativeRect(compareCell.domNode.getBoundingClientRect(), editorWrapper)
802
- if (cellRect.x1 - compareCellRect.x < ERROR_LIMIT) {
803
- ref = compareCell
804
- }
805
- return ref
806
- }, null)
807
-
808
- nextRow.insertBefore(cell, refCell)
809
- const curRowId = nextRow.formats().row
810
- cell.format('row', curRowId)
811
- cell.children.forEach((cellLine) => {
812
- cellLine.format('row', curRowId)
813
- })
814
- })
815
-
816
- modifiedCells.forEach((cell) => {
817
- const cellRowspan = Number.parseInt(cell.formats().rowspan, 10)
818
- const curRowspan = cellRowspan - removedRowsLength
819
- cell.domNode.removeAttribute('style')
820
- cell.format('rowspan', curRowspan)
821
- cell.children.forEach((cellLine) => {
822
- cellLine.format('rowspan', curRowspan)
823
- })
824
- })
825
-
826
- removedCells.forEach((cell) => {
827
- cell.remove()
828
- })
829
-
830
- // fix: There will be a empty tr left if i delete the last row of a table,
831
- // this will cause the bottom border of the table to disappear,
832
- // and the empty tr will execute the matchTableRow method.
833
- tableRows.forEach((row) => {
834
- if (row.children.length === 0) {
835
- row.remove()
836
- }
837
- })
838
- }
839
-
840
- tableDestroy() {
841
- const quill = Quill.find(this.scroll.domNode.parentNode)
842
- const tableModule = quill.getModule('better-table')
843
- this.remove()
844
- tableModule.hideTableTools()
845
- quill.update(Quill.sources.USER)
846
- }
847
-
848
- insertCell(tableRow, ref, bg = '') {
849
- const id = cellId()
850
- const rId = tableRow.formats().row
851
- const tableCell = this.scroll.create(
852
- TableCell.blotName,
853
- { ...CELL_DEFAULT, row: rId },
854
- )
855
- tableCell.domNode.style.backgroundColor = bg
856
- const cellLine = this.scroll.create(TableCellLine.blotName, {
857
- row: rId,
858
- cell: id,
859
- })
860
- tableCell.appendChild(cellLine)
861
-
862
- if (ref) {
863
- tableRow.insertBefore(tableCell, ref)
864
- }
865
- else {
866
- tableRow.appendChild(tableCell)
867
- }
868
- }
869
-
870
- insertColumn(compareRect, colIndex, isRight = true, editorWrapper) {
871
- const [body] = this.descendants(TableBody)
872
- const [tableColGroup] = this.descendants(TableColGroup)
873
- const tableCols = this.descendants(TableCol)
874
- const addAsideCells = []
875
- const modifiedCells = []
876
- const affectedCells = []
877
-
878
- if (isNullOrUndefined(body) || isNullOrUndefined(body.children.head)) {
879
- return
880
- }
881
- const tableCells = this.descendants(TableCell)
882
- tableCells.forEach((cell) => {
883
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
884
-
885
- if (isRight) {
886
- if (Math.abs(cellRect.x1 - compareRect.x1) < ERROR_LIMIT) {
887
- // the right of selected boundary equal to the right of table cell,
888
- // add a new table cell right aside this table cell
889
- addAsideCells.push(cell)
890
- }
891
- else if (compareRect.x1 - cellRect.x > ERROR_LIMIT && compareRect.x1 - cellRect.x1 < -ERROR_LIMIT) {
892
- // the right of selected boundary is inside this table cell
893
- // colspan of this table cell will increase 1
894
- modifiedCells.push(cell)
895
- }
896
- }
897
- else {
898
- if (Math.abs(cellRect.x - compareRect.x) < ERROR_LIMIT) {
899
- // left of selected boundary equal to left of table cell,
900
- // add a new table cell left aside this table cell
901
- addAsideCells.push(cell)
902
- }
903
- else if (compareRect.x - cellRect.x > ERROR_LIMIT && compareRect.x - cellRect.x1 < -ERROR_LIMIT) {
904
- // the left of selected boundary is inside this table cell
905
- // colspan of this table cell will increase 1
906
- modifiedCells.push(cell)
907
- }
908
- }
909
- })
910
-
911
- addAsideCells.forEach((cell) => {
912
- const ref = isRight ? cell.next : cell
913
- const id = cellId()
914
- const tableRow = cell.parent
915
- const rId = tableRow.formats().row
916
- const cellFormats = cell.formats()
917
- const tableCell = this.scroll.create(
918
- TableCell.blotName,
919
- { ...CELL_DEFAULT, row: rId, rowspan: cellFormats.rowspan },
920
- )
921
- const cellLine = this.scroll.create(TableCellLine.blotName, {
922
- row: rId,
923
- cell: id,
924
- rowspan: cellFormats.rowspan,
925
- })
926
- tableCell.appendChild(cellLine)
927
-
928
- if (ref) {
929
- tableRow.insertBefore(tableCell, ref)
930
- }
931
- else {
932
- tableRow.appendChild(tableCell)
933
- }
934
- affectedCells.push(tableCell)
935
- })
936
-
937
- // insert new tableCol
938
- const tableCol = this.scroll.create(TableCol.blotName, true)
939
- let colRef
940
- if (isRight) {
941
- colRef = tableCols[colIndex] && tableCols[colIndex].next
942
- }
943
- else {
944
- colRef = tableCols[colIndex]
945
- }
946
-
947
- if (colRef) {
948
- tableColGroup.insertBefore(tableCol, colRef)
949
- }
950
- else {
951
- tableColGroup.appendChild(tableCol)
952
- }
953
-
954
- modifiedCells.forEach((cell) => {
955
- const cellColspan = cell.formats().colspan
956
- cell.format('colspan', Number.parseInt(cellColspan, 10) + 1)
957
- affectedCells.push(cell)
958
- })
959
-
960
- affectedCells.sort((cellA, cellB) => {
961
- const y1 = cellA.domNode.getBoundingClientRect().y
962
- const y2 = cellB.domNode.getBoundingClientRect().y
963
- return y1 - y2
964
- })
965
-
966
- this.updateTableWidth()
967
- return affectedCells
968
- }
969
-
970
- insertRow(compareRect, isDown, editorWrapper) {
971
- const [body] = this.descendants(TableBody)
972
- if (isNullOrUndefined(body) || isNullOrUndefined(body.children.head)) {
973
- return
974
- }
975
-
976
- const tableCells = this.descendants(TableCell)
977
- const rId = rowId()
978
- const newRow = this.scroll.create(TableRow.blotName, {
979
- row: rId,
980
- })
981
- const addBelowCells = []
982
- const modifiedCells = []
983
- const affectedCells = []
984
-
985
- tableCells.forEach((cell) => {
986
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
987
-
988
- if (isDown) {
989
- if (Math.abs(cellRect.y1 - compareRect.y1) < ERROR_LIMIT) {
990
- addBelowCells.push(cell)
991
- }
992
- else if (compareRect.y1 - cellRect.y > ERROR_LIMIT && compareRect.y1 - cellRect.y1 < -ERROR_LIMIT) {
993
- modifiedCells.push(cell)
994
- }
995
- }
996
- else {
997
- if (Math.abs(cellRect.y - compareRect.y) < ERROR_LIMIT) {
998
- addBelowCells.push(cell)
999
- }
1000
- else if (compareRect.y - cellRect.y > ERROR_LIMIT && compareRect.y - cellRect.y1 < -ERROR_LIMIT) {
1001
- modifiedCells.push(cell)
1002
- }
1003
- }
1004
- })
1005
-
1006
- // ordered table cells with rect.x, fix error for inserting
1007
- // new table cell in complicated table with wrong order.
1008
- const sortFunc = (cellA, cellB) => {
1009
- const x1 = cellA.domNode.getBoundingClientRect().x
1010
- const x2 = cellB.domNode.getBoundingClientRect().x
1011
- return x1 - x2
1012
- }
1013
- addBelowCells.sort(sortFunc)
1014
-
1015
- addBelowCells.forEach((cell) => {
1016
- const cId = cellId()
1017
- const cellFormats = cell.formats()
1018
-
1019
- const tableCell = this.scroll.create(
1020
- TableCell.blotName,
1021
- { ...CELL_DEFAULT, row: rId, cell: cId, colspan: cellFormats.colspan },
1022
- )
1023
- const cellLine = this.scroll.create(TableCellLine.blotName, {
1024
- row: rId,
1025
- cell: cId,
1026
- colspan: cellFormats.colspan,
1027
- })
1028
- const empty = this.scroll.create(Break.blotName)
1029
- cellLine.appendChild(empty)
1030
- tableCell.appendChild(cellLine)
1031
- newRow.appendChild(tableCell)
1032
- affectedCells.push(tableCell)
1033
- })
1034
-
1035
- modifiedCells.forEach((cell) => {
1036
- const cellRowspan = Number.parseInt(cell.formats().rowspan, 10)
1037
- cell.format('rowspan', cellRowspan + 1)
1038
- affectedCells.push(cell)
1039
- })
1040
-
1041
- const refRow = this.rows().find((row) => {
1042
- const rowRect = getRelativeRect(row.domNode.getBoundingClientRect(), editorWrapper)
1043
- if (isDown) {
1044
- return Math.abs(rowRect.y - compareRect.y - compareRect.height) < ERROR_LIMIT
1045
- }
1046
- else {
1047
- return Math.abs(rowRect.y - compareRect.y) < ERROR_LIMIT
1048
- }
1049
- })
1050
- body.insertBefore(newRow, refRow)
1051
-
1052
- // reordering affectedCells
1053
- affectedCells.sort(sortFunc)
1054
- return affectedCells
1055
- }
1056
-
1057
- mergeCells(_compareRect, mergingCells, rowspan, colspan, _editorWrapper) {
1058
- const mergedCell = mergingCells.reduce((result, tableCell, index) => {
1059
- if (index !== 0) {
1060
- if (result) {
1061
- tableCell.moveChildren(result)
1062
- }
1063
- tableCell.remove()
1064
- }
1065
- else {
1066
- tableCell.format('colspan', colspan)
1067
- tableCell.format('rowspan', rowspan)
1068
- result = tableCell
1069
- if (rowspan > 1) {
1070
- // fix: 比较当前单元格高度样式与rowspan最小高度,小于则设置高度,不判断实际高度,因为合并时这一刻实际高度可能高于最小高度
1071
- const minHeight = CELL_MIN_HEIGHT * rowspan + rowspan - 1
1072
- const cellHeight = Number.parseInt(tableCell.domNode.style.height, 10) || 0
1073
- if (cellHeight < minHeight) {
1074
- tableCell.domNode.style.height = `${minHeight}px`
1075
- }
1076
- }
1077
- }
1078
-
1079
- return result
1080
- }, null)
1081
-
1082
- const rId = mergedCell.domNode.getAttribute('data-row')
1083
- const cId = mergedCell.children.head.domNode.getAttribute('data-cell')
1084
- mergedCell.children.forEach((cellLine) => {
1085
- cellLine.domNode.setAttribute('data-parent-bg', mergedCell.domNode.style.backgroundColor)
1086
- if (cellLine.children.head.domNode.style) {
1087
- cellLine.children.head.domNode.style.backgroundColor = mergedCell.domNode.style.backgroundColor
1088
- }
1089
-
1090
- if (!cellLine.prev || cellLine.domNode.textContent.trim()) {
1091
- cellLine.format('cell', cId)
1092
- cellLine.format('row', rId)
1093
- cellLine.format('colspan', colspan)
1094
- cellLine.format('rowspan', rowspan)
1095
- }
1096
- else {
1097
- cellLine.remove()
1098
- }
1099
- })
1100
-
1101
- return mergedCell
1102
- }
1103
-
1104
- unmergeCells(unmergingCells, editorWrapper) {
1105
- let cellFormats: any = {}
1106
- let cellRowspan = 1
1107
- let cellColspan = 1
1108
-
1109
- unmergingCells.forEach((tableCell) => {
1110
- const tableCellBgColor = tableCell.domNode.style.backgroundColor
1111
- cellFormats = tableCell.formats()
1112
- cellRowspan = cellFormats.rowspan
1113
- cellColspan = cellFormats.colspan
1114
-
1115
- if (cellColspan > 1) {
1116
- const ref = tableCell.next
1117
- const row = tableCell.row()
1118
- tableCell.format('colspan', 1)
1119
- if (tableCell.domNode.children && tableCell.domNode.children[0].tagName === 'DIV' && tableCell.domNode.children[0].getAttribute('data-colspan')) {
1120
- tableCell.domNode.children[0].setAttribute('data-colspan', 1)
1121
- }
1122
- for (let colspanIndex = cellColspan; colspanIndex > 1; colspanIndex--) {
1123
- this.insertCell(row, ref, tableCellBgColor)
1124
- }
1125
- }
1126
-
1127
- if (cellRowspan > 1) {
1128
- let rowspanIndex = cellRowspan
1129
- let nextRow = tableCell.row().next
1130
- while (rowspanIndex > 1) {
1131
- const refInNextRow = nextRow.children.reduce((result, cell) => {
1132
- const compareRect = getRelativeRect(tableCell.domNode.getBoundingClientRect(), editorWrapper)
1133
- const cellRect = getRelativeRect(cell.domNode.getBoundingClientRect(), editorWrapper)
1134
- if (Math.abs(compareRect.x1 - cellRect.x) < ERROR_LIMIT) {
1135
- result = cell
1136
- }
1137
- return result
1138
- }, null)
1139
-
1140
- for (let colspanIndex = cellColspan; colspanIndex > 0; colspanIndex--) {
1141
- this.insertCell(nextRow, refInNextRow, tableCellBgColor)
1142
- }
1143
-
1144
- rowspanIndex -= 1
1145
- nextRow = nextRow.next
1146
- }
1147
-
1148
- tableCell.domNode.removeAttribute('style')
1149
- if (tableCell.domNode.children && tableCell.domNode.children[0].tagName === 'DIV' && tableCell.domNode.children[0].getAttribute('data-rowspan')) {
1150
- tableCell.domNode.children[0].setAttribute('data-rowspan', 1)
1151
- }
1152
- tableCell.format('rowspan', 1)
1153
- }
1154
- })
1155
- }
1156
-
1157
- emptyCells(selectedTds) {
1158
- selectedTds.forEach((selectedTd) => {
1159
- // 构造空的table cell line, 优先使用单元格已有rowId和cellId,避免从table-cell-line向上层td提交id时不一致导致错位
1160
- const cellFormats = selectedTd.formats()
1161
- const cellLine = this.scroll.create(TableCellLine.blotName, {
1162
- row: cellFormats.row || rowId(),
1163
- cell: cellFormats.cell || cellId(),
1164
- rowspan: cellFormats.rowspan,
1165
- colspan: cellFormats.colspan,
1166
- })
1167
- const empty = this.scroll.create(Break.blotName)
1168
- cellLine.appendChild(empty)
1169
-
1170
- selectedTd.domNode.innerHTML = ''
1171
- selectedTd.appendChild(cellLine)
1172
- })
1173
- }
1174
-
1175
- rows() {
1176
- const body = this.children.tail
1177
- if (isNullOrUndefined(body)) {
1178
- return []
1179
- }
1180
- return body.children.map(row => row)
1181
- }
1182
- }
1183
- TableContainer.blotName = 'ql-table-container'
1184
- TableContainer.className = 'quill-better-table'
1185
- TableContainer.tagName = 'TABLE'
1186
-
1187
- // @dynamic
1188
- class TableViewWrapper extends Container {
1189
- static blotName: string
1190
- static tagName: string
1191
- static className: string
1192
- static allowedChildren: any
1193
- constructor(scroll, domNode) {
1194
- super(scroll, domNode)
1195
- const quill = Quill.find(scroll.domNode.parentNode)
1196
- // fix: 只读模式时超长表格默认包含滚动条
1197
- if (quill.options.readOnly) {
1198
- domNode.style.overflow = 'auto'
1199
- }
1200
- domNode.addEventListener(
1201
- 'scroll',
1202
- (e) => {
1203
- const tableModule = quill.getModule('better-table')
1204
- if (tableModule.columnTool) {
1205
- tableModule.columnTool.domNode.scrollLeft = e.target.scrollLeft
1206
- }
1207
-
1208
- if (tableModule.tableSelection && tableModule.tableSelection.selectedTds.length > 0) {
1209
- tableModule.tableSelection.repositionHelpLines()
1210
- }
1211
- },
1212
- false,
1213
- )
1214
- }
1215
- }
1216
- TableViewWrapper.blotName = 'table-view'
1217
- TableViewWrapper.className = 'quill-better-table-wrapper'
1218
- TableViewWrapper.tagName = 'DIV'
1219
-
1220
- TableViewWrapper.allowedChildren = [TableContainer]
1221
- TableContainer.requiredContainer = TableViewWrapper
1222
-
1223
- TableContainer.allowedChildren = [TableBody, TableColGroup]
1224
- TableBody.requiredContainer = TableContainer
1225
-
1226
- TableBody.allowedChildren = [TableRow]
1227
- TableRow.requiredContainer = TableBody
1228
-
1229
- TableRow.allowedChildren = [TableCell]
1230
- TableCell.requiredContainer = TableRow
1231
-
1232
- TableCell.allowedChildren = [TableCellLine, Header, ListItem, ListContainer]
1233
- TableCellLine.requiredContainer = TableCell
1234
-
1235
- TableColGroup.allowedChildren = [TableCol]
1236
- TableColGroup.requiredContainer = TableContainer
1237
-
1238
- TableCol.requiredContainer = TableColGroup
1239
-
1240
- function rowId() {
1241
- const id = Math.random().toString(36).slice(2, 6)
1242
- return `row-${id}`
1243
- }
1244
-
1245
- function cellId() {
1246
- const id = Math.random().toString(36).slice(2, 6)
1247
- return `cell-${id}`
1248
- }
1249
-
1250
- function reduceFormats(domNode: HTMLElement, formats: Record<string, any>) {
1251
- return [...CELL_ATTRIBUTES, ...CELL_IDENTITY_KEYS].reduce((tableFormats, attribute) => {
1252
- if (domNode.hasAttribute(`data-${attribute}`)) {
1253
- tableFormats[attribute] = domNode.getAttribute(`data-${attribute}`) || undefined
1254
- }
1255
- return tableFormats
1256
- }, formats)
1257
- }
1258
-
1259
- export {
1260
- CELL_ATTRIBUTES,
1261
- CELL_IDENTITY_KEYS,
1262
- cellId,
1263
- rowId,
1264
- TableBody,
1265
- TableCell,
1266
- TableCellLine,
1267
- TableCol,
1268
- TableColGroup,
1269
- TableContainer,
1270
- TableRow,
1271
- TableViewWrapper,
1272
- }