@ckeditor/ckeditor5-track-changes 44.1.0 → 44.2.0-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 (597) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +1 -1
  3. package/build/track-changes.js +3 -3
  4. package/build/translations/af.js +1 -1
  5. package/build/translations/ar.js +1 -1
  6. package/build/translations/ast.js +1 -1
  7. package/build/translations/az.js +1 -1
  8. package/build/translations/bg.js +1 -1
  9. package/build/translations/bn.js +1 -1
  10. package/build/translations/bs.js +1 -1
  11. package/build/translations/ca.js +1 -1
  12. package/build/translations/cs.js +1 -1
  13. package/build/translations/da.js +1 -1
  14. package/build/translations/de-ch.js +1 -1
  15. package/build/translations/de.js +1 -1
  16. package/build/translations/el.js +1 -1
  17. package/build/translations/en-au.js +1 -1
  18. package/build/translations/en-gb.js +1 -1
  19. package/build/translations/eo.js +1 -1
  20. package/build/translations/es-co.js +1 -1
  21. package/build/translations/es.js +1 -1
  22. package/build/translations/et.js +1 -1
  23. package/build/translations/eu.js +1 -1
  24. package/build/translations/fa.js +1 -1
  25. package/build/translations/fi.js +1 -1
  26. package/build/translations/fr.js +1 -1
  27. package/build/translations/gl.js +1 -1
  28. package/build/translations/gu.js +1 -1
  29. package/build/translations/he.js +1 -1
  30. package/build/translations/hi.js +1 -1
  31. package/build/translations/hr.js +1 -1
  32. package/build/translations/hu.js +1 -1
  33. package/build/translations/hy.js +1 -1
  34. package/build/translations/id.js +1 -1
  35. package/build/translations/it.js +1 -1
  36. package/build/translations/ja.js +1 -1
  37. package/build/translations/jv.js +1 -1
  38. package/build/translations/kk.js +1 -1
  39. package/build/translations/km.js +1 -1
  40. package/build/translations/kn.js +1 -1
  41. package/build/translations/ko.js +1 -1
  42. package/build/translations/ku.js +1 -1
  43. package/build/translations/lt.js +1 -1
  44. package/build/translations/lv.js +1 -1
  45. package/build/translations/ms.js +1 -1
  46. package/build/translations/nb.js +1 -1
  47. package/build/translations/ne.js +1 -1
  48. package/build/translations/nl.js +1 -1
  49. package/build/translations/no.js +1 -1
  50. package/build/translations/oc.js +1 -1
  51. package/build/translations/pl.js +1 -1
  52. package/build/translations/pt-br.js +1 -1
  53. package/build/translations/pt.js +1 -1
  54. package/build/translations/ro.js +1 -1
  55. package/build/translations/ru.js +1 -1
  56. package/build/translations/si.js +1 -1
  57. package/build/translations/sk.js +1 -1
  58. package/build/translations/sl.js +1 -1
  59. package/build/translations/sq.js +1 -1
  60. package/build/translations/sr-latn.js +1 -1
  61. package/build/translations/sr.js +1 -1
  62. package/build/translations/sv.js +1 -1
  63. package/build/translations/th.js +1 -1
  64. package/build/translations/ti.js +1 -1
  65. package/build/translations/tk.js +1 -1
  66. package/build/translations/tr.js +1 -1
  67. package/build/translations/tt.js +1 -1
  68. package/build/translations/ug.js +1 -1
  69. package/build/translations/uk.js +1 -1
  70. package/build/translations/ur.js +1 -1
  71. package/build/translations/uz.js +1 -1
  72. package/build/translations/vi.js +1 -1
  73. package/build/translations/zh-cn.js +1 -1
  74. package/build/translations/zh.js +1 -1
  75. package/ckeditor5-metadata.json +7 -0
  76. package/dist/index-content.css +3 -2
  77. package/dist/index-editor.css +13 -2
  78. package/dist/index.css +24 -2
  79. package/dist/index.js +4 -4
  80. package/dist/translations/af.d.ts +2 -2
  81. package/dist/translations/af.js +2 -2
  82. package/dist/translations/af.umd.js +2 -2
  83. package/dist/translations/ar.d.ts +2 -2
  84. package/dist/translations/ar.js +2 -2
  85. package/dist/translations/ar.umd.js +2 -2
  86. package/dist/translations/ast.d.ts +2 -2
  87. package/dist/translations/ast.js +2 -2
  88. package/dist/translations/ast.umd.js +2 -2
  89. package/dist/translations/az.d.ts +2 -2
  90. package/dist/translations/az.js +2 -2
  91. package/dist/translations/az.umd.js +2 -2
  92. package/dist/translations/bg.d.ts +2 -2
  93. package/dist/translations/bg.js +2 -2
  94. package/dist/translations/bg.umd.js +2 -2
  95. package/dist/translations/bn.d.ts +2 -2
  96. package/dist/translations/bn.js +2 -2
  97. package/dist/translations/bn.umd.js +2 -2
  98. package/dist/translations/bs.d.ts +2 -2
  99. package/dist/translations/bs.js +2 -2
  100. package/dist/translations/bs.umd.js +2 -2
  101. package/dist/translations/ca.d.ts +2 -2
  102. package/dist/translations/ca.js +2 -2
  103. package/dist/translations/ca.umd.js +2 -2
  104. package/dist/translations/cs.d.ts +2 -2
  105. package/dist/translations/cs.js +2 -2
  106. package/dist/translations/cs.umd.js +2 -2
  107. package/dist/translations/da.d.ts +2 -2
  108. package/dist/translations/da.js +2 -2
  109. package/dist/translations/da.umd.js +2 -2
  110. package/dist/translations/de-ch.d.ts +2 -2
  111. package/dist/translations/de-ch.js +2 -2
  112. package/dist/translations/de-ch.umd.js +2 -2
  113. package/dist/translations/de.d.ts +2 -2
  114. package/dist/translations/de.js +2 -2
  115. package/dist/translations/de.umd.js +2 -2
  116. package/dist/translations/el.d.ts +2 -2
  117. package/dist/translations/el.js +2 -2
  118. package/dist/translations/el.umd.js +2 -2
  119. package/dist/translations/en-au.d.ts +2 -2
  120. package/dist/translations/en-au.js +2 -2
  121. package/dist/translations/en-au.umd.js +2 -2
  122. package/dist/translations/en-gb.d.ts +2 -2
  123. package/dist/translations/en-gb.js +2 -2
  124. package/dist/translations/en-gb.umd.js +2 -2
  125. package/dist/translations/en.d.ts +2 -2
  126. package/dist/translations/en.js +2 -2
  127. package/dist/translations/en.umd.js +2 -2
  128. package/dist/translations/eo.d.ts +2 -2
  129. package/dist/translations/eo.js +2 -2
  130. package/dist/translations/eo.umd.js +2 -2
  131. package/dist/translations/es-co.d.ts +2 -2
  132. package/dist/translations/es-co.js +2 -2
  133. package/dist/translations/es-co.umd.js +2 -2
  134. package/dist/translations/es.d.ts +2 -2
  135. package/dist/translations/es.js +2 -2
  136. package/dist/translations/es.umd.js +2 -2
  137. package/dist/translations/et.d.ts +2 -2
  138. package/dist/translations/et.js +2 -2
  139. package/dist/translations/et.umd.js +2 -2
  140. package/dist/translations/eu.d.ts +2 -2
  141. package/dist/translations/eu.js +2 -2
  142. package/dist/translations/eu.umd.js +2 -2
  143. package/dist/translations/fa.d.ts +2 -2
  144. package/dist/translations/fa.js +2 -2
  145. package/dist/translations/fa.umd.js +2 -2
  146. package/dist/translations/fi.d.ts +2 -2
  147. package/dist/translations/fi.js +2 -2
  148. package/dist/translations/fi.umd.js +2 -2
  149. package/dist/translations/fr.d.ts +2 -2
  150. package/dist/translations/fr.js +2 -2
  151. package/dist/translations/fr.umd.js +2 -2
  152. package/dist/translations/gl.d.ts +2 -2
  153. package/dist/translations/gl.js +2 -2
  154. package/dist/translations/gl.umd.js +2 -2
  155. package/dist/translations/gu.d.ts +2 -2
  156. package/dist/translations/gu.js +2 -2
  157. package/dist/translations/gu.umd.js +2 -2
  158. package/dist/translations/he.d.ts +2 -2
  159. package/dist/translations/he.js +2 -2
  160. package/dist/translations/he.umd.js +2 -2
  161. package/dist/translations/hi.d.ts +2 -2
  162. package/dist/translations/hi.js +2 -2
  163. package/dist/translations/hi.umd.js +2 -2
  164. package/dist/translations/hr.d.ts +2 -2
  165. package/dist/translations/hr.js +2 -2
  166. package/dist/translations/hr.umd.js +2 -2
  167. package/dist/translations/hu.d.ts +2 -2
  168. package/dist/translations/hu.js +2 -2
  169. package/dist/translations/hu.umd.js +2 -2
  170. package/dist/translations/hy.d.ts +2 -2
  171. package/dist/translations/hy.js +2 -2
  172. package/dist/translations/hy.umd.js +2 -2
  173. package/dist/translations/id.d.ts +2 -2
  174. package/dist/translations/id.js +2 -2
  175. package/dist/translations/id.umd.js +2 -2
  176. package/dist/translations/it.d.ts +2 -2
  177. package/dist/translations/it.js +2 -2
  178. package/dist/translations/it.umd.js +2 -2
  179. package/dist/translations/ja.d.ts +2 -2
  180. package/dist/translations/ja.js +2 -2
  181. package/dist/translations/ja.umd.js +2 -2
  182. package/dist/translations/jv.d.ts +2 -2
  183. package/dist/translations/jv.js +2 -2
  184. package/dist/translations/jv.umd.js +2 -2
  185. package/dist/translations/kk.d.ts +2 -2
  186. package/dist/translations/kk.js +2 -2
  187. package/dist/translations/kk.umd.js +2 -2
  188. package/dist/translations/km.d.ts +2 -2
  189. package/dist/translations/km.js +2 -2
  190. package/dist/translations/km.umd.js +2 -2
  191. package/dist/translations/kn.d.ts +2 -2
  192. package/dist/translations/kn.js +2 -2
  193. package/dist/translations/kn.umd.js +2 -2
  194. package/dist/translations/ko.d.ts +2 -2
  195. package/dist/translations/ko.js +2 -2
  196. package/dist/translations/ko.umd.js +2 -2
  197. package/dist/translations/ku.d.ts +2 -2
  198. package/dist/translations/ku.js +2 -2
  199. package/dist/translations/ku.umd.js +2 -2
  200. package/dist/translations/lt.d.ts +2 -2
  201. package/dist/translations/lt.js +2 -2
  202. package/dist/translations/lt.umd.js +2 -2
  203. package/dist/translations/lv.d.ts +2 -2
  204. package/dist/translations/lv.js +2 -2
  205. package/dist/translations/lv.umd.js +2 -2
  206. package/dist/translations/ms.d.ts +2 -2
  207. package/dist/translations/ms.js +2 -2
  208. package/dist/translations/ms.umd.js +2 -2
  209. package/dist/translations/nb.d.ts +2 -2
  210. package/dist/translations/nb.js +2 -2
  211. package/dist/translations/nb.umd.js +2 -2
  212. package/dist/translations/ne.d.ts +2 -2
  213. package/dist/translations/ne.js +2 -2
  214. package/dist/translations/ne.umd.js +2 -2
  215. package/dist/translations/nl.d.ts +2 -2
  216. package/dist/translations/nl.js +2 -2
  217. package/dist/translations/nl.umd.js +2 -2
  218. package/dist/translations/no.d.ts +2 -2
  219. package/dist/translations/no.js +2 -2
  220. package/dist/translations/no.umd.js +2 -2
  221. package/dist/translations/oc.d.ts +2 -2
  222. package/dist/translations/oc.js +2 -2
  223. package/dist/translations/oc.umd.js +2 -2
  224. package/dist/translations/pl.d.ts +2 -2
  225. package/dist/translations/pl.js +2 -2
  226. package/dist/translations/pl.umd.js +2 -2
  227. package/dist/translations/pt-br.d.ts +2 -2
  228. package/dist/translations/pt-br.js +2 -2
  229. package/dist/translations/pt-br.umd.js +2 -2
  230. package/dist/translations/pt.d.ts +2 -2
  231. package/dist/translations/pt.js +2 -2
  232. package/dist/translations/pt.umd.js +2 -2
  233. package/dist/translations/ro.d.ts +2 -2
  234. package/dist/translations/ro.js +2 -2
  235. package/dist/translations/ro.umd.js +2 -2
  236. package/dist/translations/ru.d.ts +2 -2
  237. package/dist/translations/ru.js +2 -2
  238. package/dist/translations/ru.umd.js +2 -2
  239. package/dist/translations/si.d.ts +2 -2
  240. package/dist/translations/si.js +2 -2
  241. package/dist/translations/si.umd.js +2 -2
  242. package/dist/translations/sk.d.ts +2 -2
  243. package/dist/translations/sk.js +2 -2
  244. package/dist/translations/sk.umd.js +2 -2
  245. package/dist/translations/sl.d.ts +2 -2
  246. package/dist/translations/sl.js +2 -2
  247. package/dist/translations/sl.umd.js +2 -2
  248. package/dist/translations/sq.d.ts +2 -2
  249. package/dist/translations/sq.js +2 -2
  250. package/dist/translations/sq.umd.js +2 -2
  251. package/dist/translations/sr-latn.d.ts +2 -2
  252. package/dist/translations/sr-latn.js +2 -2
  253. package/dist/translations/sr-latn.umd.js +2 -2
  254. package/dist/translations/sr.d.ts +2 -2
  255. package/dist/translations/sr.js +2 -2
  256. package/dist/translations/sr.umd.js +2 -2
  257. package/dist/translations/sv.d.ts +2 -2
  258. package/dist/translations/sv.js +2 -2
  259. package/dist/translations/sv.umd.js +2 -2
  260. package/dist/translations/th.d.ts +2 -2
  261. package/dist/translations/th.js +2 -2
  262. package/dist/translations/th.umd.js +2 -2
  263. package/dist/translations/ti.d.ts +2 -2
  264. package/dist/translations/ti.js +2 -2
  265. package/dist/translations/ti.umd.js +2 -2
  266. package/dist/translations/tk.d.ts +2 -2
  267. package/dist/translations/tk.js +2 -2
  268. package/dist/translations/tk.umd.js +2 -2
  269. package/dist/translations/tr.d.ts +2 -2
  270. package/dist/translations/tr.js +2 -2
  271. package/dist/translations/tr.umd.js +2 -2
  272. package/dist/translations/tt.d.ts +2 -2
  273. package/dist/translations/tt.js +2 -2
  274. package/dist/translations/tt.umd.js +2 -2
  275. package/dist/translations/ug.d.ts +2 -2
  276. package/dist/translations/ug.js +2 -2
  277. package/dist/translations/ug.umd.js +2 -2
  278. package/dist/translations/uk.d.ts +2 -2
  279. package/dist/translations/uk.js +2 -2
  280. package/dist/translations/uk.umd.js +2 -2
  281. package/dist/translations/ur.d.ts +2 -2
  282. package/dist/translations/ur.js +2 -2
  283. package/dist/translations/ur.umd.js +2 -2
  284. package/dist/translations/uz.d.ts +2 -2
  285. package/dist/translations/uz.js +2 -2
  286. package/dist/translations/uz.umd.js +2 -2
  287. package/dist/translations/vi.d.ts +2 -2
  288. package/dist/translations/vi.js +2 -2
  289. package/dist/translations/vi.umd.js +2 -2
  290. package/dist/translations/zh-cn.d.ts +2 -2
  291. package/dist/translations/zh-cn.js +2 -2
  292. package/dist/translations/zh-cn.umd.js +2 -2
  293. package/dist/translations/zh.d.ts +2 -2
  294. package/dist/translations/zh.js +2 -2
  295. package/dist/translations/zh.umd.js +2 -2
  296. package/lang/contexts.json +3 -1
  297. package/lang/translations/af.po +13 -5
  298. package/lang/translations/ar.po +13 -5
  299. package/lang/translations/ast.po +13 -5
  300. package/lang/translations/az.po +13 -5
  301. package/lang/translations/bg.po +13 -5
  302. package/lang/translations/bn.po +13 -5
  303. package/lang/translations/bs.po +13 -5
  304. package/lang/translations/ca.po +13 -5
  305. package/lang/translations/cs.po +13 -5
  306. package/lang/translations/da.po +13 -5
  307. package/lang/translations/de-ch.po +13 -5
  308. package/lang/translations/de.po +13 -5
  309. package/lang/translations/el.po +13 -5
  310. package/lang/translations/en-au.po +13 -5
  311. package/lang/translations/en-gb.po +13 -5
  312. package/lang/translations/en.po +13 -5
  313. package/lang/translations/eo.po +13 -5
  314. package/lang/translations/es-co.po +13 -5
  315. package/lang/translations/es.po +13 -5
  316. package/lang/translations/et.po +13 -5
  317. package/lang/translations/eu.po +13 -5
  318. package/lang/translations/fa.po +13 -5
  319. package/lang/translations/fi.po +13 -5
  320. package/lang/translations/fr.po +13 -5
  321. package/lang/translations/gl.po +13 -5
  322. package/lang/translations/gu.po +13 -5
  323. package/lang/translations/he.po +13 -5
  324. package/lang/translations/hi.po +13 -5
  325. package/lang/translations/hr.po +13 -5
  326. package/lang/translations/hu.po +13 -5
  327. package/lang/translations/hy.po +13 -5
  328. package/lang/translations/id.po +13 -5
  329. package/lang/translations/it.po +13 -5
  330. package/lang/translations/ja.po +13 -5
  331. package/lang/translations/jv.po +13 -5
  332. package/lang/translations/kk.po +13 -5
  333. package/lang/translations/km.po +13 -5
  334. package/lang/translations/kn.po +13 -5
  335. package/lang/translations/ko.po +13 -5
  336. package/lang/translations/ku.po +13 -5
  337. package/lang/translations/lt.po +13 -5
  338. package/lang/translations/lv.po +13 -5
  339. package/lang/translations/ms.po +13 -5
  340. package/lang/translations/nb.po +13 -5
  341. package/lang/translations/ne.po +13 -5
  342. package/lang/translations/nl.po +13 -5
  343. package/lang/translations/no.po +13 -5
  344. package/lang/translations/oc.po +13 -5
  345. package/lang/translations/pl.po +13 -5
  346. package/lang/translations/pt-br.po +13 -5
  347. package/lang/translations/pt.po +13 -5
  348. package/lang/translations/ro.po +13 -5
  349. package/lang/translations/ru.po +13 -5
  350. package/lang/translations/si.po +13 -5
  351. package/lang/translations/sk.po +13 -5
  352. package/lang/translations/sl.po +13 -5
  353. package/lang/translations/sq.po +13 -5
  354. package/lang/translations/sr-latn.po +13 -5
  355. package/lang/translations/sr.po +13 -5
  356. package/lang/translations/sv.po +13 -5
  357. package/lang/translations/th.po +13 -5
  358. package/lang/translations/ti.po +13 -5
  359. package/lang/translations/tk.po +13 -5
  360. package/lang/translations/tr.po +13 -5
  361. package/lang/translations/tt.po +13 -5
  362. package/lang/translations/ug.po +13 -5
  363. package/lang/translations/uk.po +13 -5
  364. package/lang/translations/ur.po +13 -5
  365. package/lang/translations/uz.po +13 -5
  366. package/lang/translations/vi.po +13 -5
  367. package/lang/translations/zh-cn.po +13 -5
  368. package/lang/translations/zh.po +13 -5
  369. package/package.json +47 -10
  370. package/src/augmentation.d.ts +4 -2
  371. package/src/augmentation.js +1 -1
  372. package/src/commands/acceptsuggestioncommand.d.ts +1 -1
  373. package/src/commands/acceptsuggestioncommand.js +2 -2
  374. package/src/commands/discardsuggestioncommand.d.ts +1 -1
  375. package/src/commands/discardsuggestioncommand.js +2 -2
  376. package/src/commands/executeonallsuggestionscommand.d.ts +1 -1
  377. package/src/commands/executeonallsuggestionscommand.js +2 -2
  378. package/src/commands/executeonselectedsuggestionscommand.d.ts +1 -1
  379. package/src/commands/executeonselectedsuggestionscommand.js +2 -2
  380. package/src/commands/previewfinalcontentcommand.d.ts +26 -0
  381. package/src/commands/previewfinalcontentcommand.js +23 -0
  382. package/src/commands/trackchangescommand.d.ts +1 -1
  383. package/src/commands/trackchangescommand.js +2 -2
  384. package/src/index.d.ts +3 -1
  385. package/src/index.js +2 -2
  386. package/src/integrations/aiassistant.d.ts +1 -1
  387. package/src/integrations/aiassistant.js +2 -2
  388. package/src/integrations/alignment.d.ts +1 -1
  389. package/src/integrations/alignment.js +2 -2
  390. package/src/integrations/basicstyles.d.ts +1 -1
  391. package/src/integrations/basicstyles.js +2 -2
  392. package/src/integrations/blockquote.d.ts +1 -1
  393. package/src/integrations/blockquote.js +2 -2
  394. package/src/integrations/bookmark.d.ts +1 -1
  395. package/src/integrations/bookmark.js +2 -2
  396. package/src/integrations/casechange.d.ts +1 -1
  397. package/src/integrations/casechange.js +2 -2
  398. package/src/integrations/ckbox.d.ts +1 -1
  399. package/src/integrations/ckbox.js +2 -2
  400. package/src/integrations/codeblock.d.ts +1 -1
  401. package/src/integrations/codeblock.js +2 -2
  402. package/src/integrations/comments.d.ts +1 -1
  403. package/src/integrations/comments.js +2 -2
  404. package/src/integrations/deletecommand.d.ts +1 -1
  405. package/src/integrations/deletecommand.js +2 -2
  406. package/src/integrations/entercommand.d.ts +1 -1
  407. package/src/integrations/entercommand.js +2 -2
  408. package/src/integrations/findandreplace.d.ts +1 -1
  409. package/src/integrations/findandreplace.js +2 -2
  410. package/src/integrations/font.d.ts +1 -1
  411. package/src/integrations/font.js +2 -2
  412. package/src/integrations/formatpainter.d.ts +1 -1
  413. package/src/integrations/formatpainter.js +2 -2
  414. package/src/integrations/heading.d.ts +1 -1
  415. package/src/integrations/heading.js +2 -2
  416. package/src/integrations/highlight.d.ts +1 -1
  417. package/src/integrations/highlight.js +2 -2
  418. package/src/integrations/horizontalline.d.ts +1 -1
  419. package/src/integrations/horizontalline.js +2 -2
  420. package/src/integrations/htmlembed.d.ts +1 -1
  421. package/src/integrations/htmlembed.js +2 -2
  422. package/src/integrations/image.d.ts +1 -1
  423. package/src/integrations/image.js +2 -2
  424. package/src/integrations/imagereplace.d.ts +1 -1
  425. package/src/integrations/imagereplace.js +2 -2
  426. package/src/integrations/imagestyle.d.ts +1 -1
  427. package/src/integrations/imagestyle.js +2 -2
  428. package/src/integrations/importword.d.ts +1 -1
  429. package/src/integrations/importword.js +2 -2
  430. package/src/integrations/indent.d.ts +1 -1
  431. package/src/integrations/indent.js +2 -2
  432. package/src/integrations/inputcommand.d.ts +1 -1
  433. package/src/integrations/inputcommand.js +2 -2
  434. package/src/integrations/legacylist.d.ts +1 -1
  435. package/src/integrations/legacylist.js +2 -2
  436. package/src/integrations/legacylistproperties.d.ts +1 -1
  437. package/src/integrations/legacylistproperties.js +2 -2
  438. package/src/integrations/link.d.ts +1 -1
  439. package/src/integrations/link.js +2 -2
  440. package/src/integrations/list.d.ts +1 -1
  441. package/src/integrations/list.js +2 -2
  442. package/src/integrations/listproperties.d.ts +1 -1
  443. package/src/integrations/listproperties.js +2 -2
  444. package/src/integrations/mediaembed.d.ts +1 -1
  445. package/src/integrations/mediaembed.js +2 -2
  446. package/src/integrations/mention.d.ts +1 -1
  447. package/src/integrations/mention.js +2 -2
  448. package/src/integrations/mergefields.d.ts +1 -1
  449. package/src/integrations/mergefields.js +2 -2
  450. package/src/integrations/multilevellist.d.ts +1 -1
  451. package/src/integrations/multilevellist.js +2 -2
  452. package/src/integrations/pagebreak.d.ts +1 -1
  453. package/src/integrations/pagebreak.js +2 -2
  454. package/src/integrations/paragraph.d.ts +1 -1
  455. package/src/integrations/paragraph.js +2 -2
  456. package/src/integrations/removeformat.d.ts +1 -1
  457. package/src/integrations/removeformat.js +2 -2
  458. package/src/integrations/restrictededitingmode.d.ts +1 -1
  459. package/src/integrations/restrictededitingmode.js +2 -2
  460. package/src/integrations/shiftentercommand.d.ts +1 -1
  461. package/src/integrations/shiftentercommand.js +2 -2
  462. package/src/integrations/standardeditingmode.d.ts +1 -1
  463. package/src/integrations/standardeditingmode.js +2 -2
  464. package/src/integrations/style.d.ts +1 -1
  465. package/src/integrations/style.js +2 -2
  466. package/src/integrations/table.d.ts +1 -1
  467. package/src/integrations/table.js +2 -2
  468. package/src/integrations/tablecaption.d.ts +1 -1
  469. package/src/integrations/tablecaption.js +2 -2
  470. package/src/integrations/tableclipboard.d.ts +1 -1
  471. package/src/integrations/tableclipboard.js +2 -2
  472. package/src/integrations/tablecolumnresize.d.ts +1 -1
  473. package/src/integrations/tablecolumnresize.js +2 -2
  474. package/src/integrations/tableheadings.d.ts +1 -1
  475. package/src/integrations/tableheadings.js +2 -2
  476. package/src/integrations/tablemergesplit.d.ts +1 -1
  477. package/src/integrations/tablemergesplit.js +2 -2
  478. package/src/integrations/tableofcontents.d.ts +1 -1
  479. package/src/integrations/tableofcontents.js +2 -2
  480. package/src/integrations/tableproperties.d.ts +1 -1
  481. package/src/integrations/tableproperties.js +2 -2
  482. package/src/integrations/template.d.ts +1 -1
  483. package/src/integrations/template.js +2 -2
  484. package/src/integrations/title.d.ts +1 -1
  485. package/src/integrations/title.js +2 -2
  486. package/src/integrations/undo.d.ts +1 -1
  487. package/src/integrations/undo.js +2 -2
  488. package/src/integrations/uploadcare.d.ts +17 -0
  489. package/src/integrations/uploadcare.js +23 -0
  490. package/src/integrations/utils.d.ts +1 -1
  491. package/src/integrations/utils.js +2 -2
  492. package/src/suggestion.d.ts +1 -1
  493. package/src/suggestion.js +3 -3
  494. package/src/suggestiondescriptionfactory.d.ts +1 -1
  495. package/src/suggestiondescriptionfactory.js +2 -2
  496. package/src/trackchanges.d.ts +1 -1
  497. package/src/trackchanges.js +2 -2
  498. package/src/trackchangesconfig.d.ts +23 -1
  499. package/src/trackchangesconfig.js +1 -1
  500. package/src/trackchangesdata.d.ts +2 -2
  501. package/src/trackchangesdata.js +2 -2
  502. package/src/trackchangesediting.d.ts +3 -2
  503. package/src/trackchangesediting.js +2 -2
  504. package/src/trackchangespreview.d.ts +31 -0
  505. package/src/trackchangespreview.js +23 -0
  506. package/src/trackchangesui.d.ts +1 -1
  507. package/src/trackchangesui.js +2 -2
  508. package/src/ui/suggestioncontroller.d.ts +1 -1
  509. package/src/ui/suggestioncontroller.js +3 -3
  510. package/src/ui/view/basesuggestionthreadview.d.ts +1 -1
  511. package/src/ui/view/basesuggestionthreadview.js +2 -2
  512. package/src/ui/view/suggestionthreadview.d.ts +1 -1
  513. package/src/ui/view/suggestionthreadview.js +2 -2
  514. package/src/ui/view/suggestionview.d.ts +1 -1
  515. package/src/ui/view/suggestionview.js +2 -2
  516. package/src/ui/view/trackchangespreviewview.d.ts +48 -0
  517. package/src/ui/view/trackchangespreviewview.js +23 -0
  518. package/src/utils/common-translations.d.ts +1 -1
  519. package/src/utils/common-translations.js +2 -2
  520. package/src/utils/utils.d.ts +1 -1
  521. package/src/utils/utils.js +2 -2
  522. package/theme/icons/track-changes-accept.svg +1 -1
  523. package/theme/icons/track-changes-discard.svg +1 -1
  524. package/theme/icons/track-changes.svg +1 -1
  525. package/theme/trackchangespreview.css +22 -0
  526. package/dist/augmentation.d.ts +0 -46
  527. package/dist/commands/acceptsuggestioncommand.d.ts +0 -28
  528. package/dist/commands/discardsuggestioncommand.d.ts +0 -28
  529. package/dist/commands/executeonallsuggestionscommand.d.ts +0 -28
  530. package/dist/commands/executeonselectedsuggestionscommand.d.ts +0 -28
  531. package/dist/commands/trackchangescommand.d.ts +0 -30
  532. package/dist/index.d.ts +0 -23
  533. package/dist/integrations/aiassistant.d.ts +0 -21
  534. package/dist/integrations/alignment.d.ts +0 -21
  535. package/dist/integrations/basicstyles.d.ts +0 -21
  536. package/dist/integrations/blockquote.d.ts +0 -21
  537. package/dist/integrations/bookmark.d.ts +0 -21
  538. package/dist/integrations/casechange.d.ts +0 -21
  539. package/dist/integrations/ckbox.d.ts +0 -21
  540. package/dist/integrations/codeblock.d.ts +0 -21
  541. package/dist/integrations/comments.d.ts +0 -18
  542. package/dist/integrations/deletecommand.d.ts +0 -21
  543. package/dist/integrations/entercommand.d.ts +0 -20
  544. package/dist/integrations/findandreplace.d.ts +0 -25
  545. package/dist/integrations/font.d.ts +0 -21
  546. package/dist/integrations/formatpainter.d.ts +0 -21
  547. package/dist/integrations/heading.d.ts +0 -21
  548. package/dist/integrations/highlight.d.ts +0 -21
  549. package/dist/integrations/horizontalline.d.ts +0 -21
  550. package/dist/integrations/htmlembed.d.ts +0 -21
  551. package/dist/integrations/image.d.ts +0 -21
  552. package/dist/integrations/imagereplace.d.ts +0 -21
  553. package/dist/integrations/imagestyle.d.ts +0 -21
  554. package/dist/integrations/importword.d.ts +0 -22
  555. package/dist/integrations/indent.d.ts +0 -21
  556. package/dist/integrations/inputcommand.d.ts +0 -20
  557. package/dist/integrations/legacylist.d.ts +0 -21
  558. package/dist/integrations/legacylistproperties.d.ts +0 -33
  559. package/dist/integrations/link.d.ts +0 -21
  560. package/dist/integrations/list.d.ts +0 -21
  561. package/dist/integrations/listproperties.d.ts +0 -24
  562. package/dist/integrations/mediaembed.d.ts +0 -21
  563. package/dist/integrations/mention.d.ts +0 -21
  564. package/dist/integrations/mergefields.d.ts +0 -21
  565. package/dist/integrations/multilevellist.d.ts +0 -28
  566. package/dist/integrations/pagebreak.d.ts +0 -21
  567. package/dist/integrations/paragraph.d.ts +0 -21
  568. package/dist/integrations/removeformat.d.ts +0 -21
  569. package/dist/integrations/restrictededitingmode.d.ts +0 -21
  570. package/dist/integrations/shiftentercommand.d.ts +0 -20
  571. package/dist/integrations/standardeditingmode.d.ts +0 -21
  572. package/dist/integrations/style.d.ts +0 -21
  573. package/dist/integrations/table.d.ts +0 -46
  574. package/dist/integrations/tablecaption.d.ts +0 -26
  575. package/dist/integrations/tableclipboard.d.ts +0 -23
  576. package/dist/integrations/tablecolumnresize.d.ts +0 -30
  577. package/dist/integrations/tableheadings.d.ts +0 -26
  578. package/dist/integrations/tablemergesplit.d.ts +0 -26
  579. package/dist/integrations/tableofcontents.d.ts +0 -21
  580. package/dist/integrations/tableproperties.d.ts +0 -39
  581. package/dist/integrations/template.d.ts +0 -21
  582. package/dist/integrations/title.d.ts +0 -21
  583. package/dist/integrations/undo.d.ts +0 -21
  584. package/dist/integrations/utils.d.ts +0 -21
  585. package/dist/suggestion.d.ts +0 -295
  586. package/dist/suggestiondescriptionfactory.d.ts +0 -187
  587. package/dist/trackchanges.d.ts +0 -192
  588. package/dist/trackchangesconfig.d.ts +0 -89
  589. package/dist/trackchangesdata.d.ts +0 -53
  590. package/dist/trackchangesediting.d.ts +0 -563
  591. package/dist/trackchangesui.d.ts +0 -50
  592. package/dist/ui/suggestioncontroller.d.ts +0 -41
  593. package/dist/ui/view/basesuggestionthreadview.d.ts +0 -209
  594. package/dist/ui/view/suggestionthreadview.d.ts +0 -98
  595. package/dist/ui/view/suggestionview.d.ts +0 -194
  596. package/dist/utils/common-translations.d.ts +0 -13
  597. package/dist/utils/utils.d.ts +0 -41
@@ -1,563 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module track-changes/trackchangesediting
11
- * @publicApi
12
- */
13
- import { Plugin, PendingActions, type Editor } from 'ckeditor5/src/core.js';
14
- import { type Element, type Range } from 'ckeditor5/src/engine.js';
15
- import { Users } from 'ckeditor5-collaboration/src/collaboration-core.js';
16
- import TrackChangesCommand from './commands/trackchangescommand.js';
17
- import Suggestion, { type SuggestionJSON } from './suggestion.js';
18
- import SuggestionDescriptionFactory from './suggestiondescriptionfactory.js';
19
- import TrackChangesAIAssistant from './integrations/aiassistant.js';
20
- import TrackChangesAlignment from './integrations/alignment.js';
21
- import TrackChangesBasicStyles from './integrations/basicstyles.js';
22
- import TrackChangesBlockQuote from './integrations/blockquote.js';
23
- import TrackChangesBookmark from './integrations/bookmark.js';
24
- import TrackChangesCaseChange from './integrations/casechange.js';
25
- import TrackChangesCKBox from './integrations/ckbox.js';
26
- import TrackChangesCodeBlock from './integrations/codeblock.js';
27
- import TrackChangesComments from './integrations/comments.js';
28
- import TrackChangesDeleteCommand from './integrations/deletecommand.js';
29
- import TrackChangesList from './integrations/list.js';
30
- import TrackChangesListProperties from './integrations/listproperties.js';
31
- import TrackChangesEnterCommand from './integrations/entercommand.js';
32
- import TrackChangesFindAndReplace from './integrations/findandreplace.js';
33
- import TrackChangesFont from './integrations/font.js';
34
- import TrackChangesFormatPainter from './integrations/formatpainter.js';
35
- import TrackChangesHeading from './integrations/heading.js';
36
- import TrackChangesHighlight from './integrations/highlight.js';
37
- import TrackChangesHorizontalLine from './integrations/horizontalline.js';
38
- import TrackChangesHtmlEmbed from './integrations/htmlembed.js';
39
- import TrackChangesImage from './integrations/image.js';
40
- import TrackChangesImageReplace from './integrations/imagereplace.js';
41
- import TrackChangesImageStyle from './integrations/imagestyle.js';
42
- import TrackChangesImportWord from './integrations/importword.js';
43
- import TrackChangesIndent from './integrations/indent.js';
44
- import TrackChangesInputCommand from './integrations/inputcommand.js';
45
- import TrackChangesLink from './integrations/link.js';
46
- import TrackChangesLegacyList from './integrations/legacylist.js';
47
- import TrackChangesLegacyListProperties from './integrations/legacylistproperties.js';
48
- import TrackChangesMediaEmbed from './integrations/mediaembed.js';
49
- import TrackChangesMention from './integrations/mention.js';
50
- import TrackChangesMergeFields from './integrations/mergefields.js';
51
- import TrackChangesMultiLevelList from './integrations/multilevellist.js';
52
- import TrackChangesPageBreak from './integrations/pagebreak.js';
53
- import TrackChangesParagraph from './integrations/paragraph.js';
54
- import TrackChangesRemoveFormat from './integrations/removeformat.js';
55
- import TrackChangesRestrictedEditingMode from './integrations/restrictededitingmode.js';
56
- import TrackChangesShiftEnterCommand from './integrations/shiftentercommand.js';
57
- import TrackChangesStandardEditingMode from './integrations/standardeditingmode.js';
58
- import TrackChangesStylesDropdown from './integrations/style.js';
59
- import TrackChangesTable from './integrations/table.js';
60
- import TrackChangesTableMergeSplit from './integrations/tablemergesplit.js';
61
- import TrackChangesTableHeadings from './integrations/tableheadings.js';
62
- import TrackChangesTableClipboard from './integrations/tableclipboard.js';
63
- import TrackChangesTableColumnResize from './integrations/tablecolumnresize.js';
64
- import TrackChangesTemplate from './integrations/template.js';
65
- import TrackChangesTableOfContents from './integrations/tableofcontents.js';
66
- import TrackChangesTitle from './integrations/title.js';
67
- import TrackChangesUndo from './integrations/undo.js';
68
- import TrackChangesTableCaption from './integrations/tablecaption.js';
69
- import TrackChangesTableProperties from './integrations/tableproperties.js';
70
- import type { SuggestionData, TrackChangesAdapter } from './trackchanges.js';
71
- export declare const renameAttributeKey = "$elementName";
72
- /**
73
- * Provides editing part of the {@link module:track-changes/trackchanges~TrackChanges track changes plugin}.
74
- */
75
- export default class TrackChangesEditing extends Plugin {
76
- /**
77
- * List of names of active (highlighted) markers.
78
- *
79
- * @observable
80
- */
81
- activeMarkers: Array<string>;
82
- /**
83
- * Descriptions factory which generates descriptions for the suggestions created by the track changes plugin.
84
- */
85
- descriptionFactory: SuggestionDescriptionFactory;
86
- /**
87
- * Reference to command that turns the track changes mode on and off.
88
- */
89
- trackChangesCommand: TrackChangesCommand;
90
- static get requires(): readonly ["CommentsRepository", typeof Users, typeof PendingActions, typeof TrackChangesAIAssistant, typeof TrackChangesAlignment, typeof TrackChangesBasicStyles, typeof TrackChangesBlockQuote, typeof TrackChangesBookmark, typeof TrackChangesCKBox, typeof TrackChangesCaseChange, typeof TrackChangesCodeBlock, typeof TrackChangesComments, typeof TrackChangesDeleteCommand, typeof TrackChangesEnterCommand, typeof TrackChangesFindAndReplace, typeof TrackChangesFont, typeof TrackChangesFormatPainter, typeof TrackChangesHeading, typeof TrackChangesHighlight, typeof TrackChangesHorizontalLine, typeof TrackChangesHtmlEmbed, typeof TrackChangesImage, typeof TrackChangesImageStyle, typeof TrackChangesImageReplace, typeof TrackChangesImportWord, typeof TrackChangesIndent, typeof TrackChangesInputCommand, typeof TrackChangesLegacyList, typeof TrackChangesLegacyListProperties, typeof TrackChangesMultiLevelList, typeof TrackChangesLink, typeof TrackChangesList, typeof TrackChangesListProperties, typeof TrackChangesMediaEmbed, typeof TrackChangesMention, typeof TrackChangesMergeFields, typeof TrackChangesPageBreak, typeof TrackChangesParagraph, typeof TrackChangesRemoveFormat, typeof TrackChangesRestrictedEditingMode, typeof TrackChangesShiftEnterCommand, typeof TrackChangesStandardEditingMode, typeof TrackChangesStylesDropdown, typeof TrackChangesTable, typeof TrackChangesTableMergeSplit, typeof TrackChangesTableHeadings, typeof TrackChangesTableCaption, typeof TrackChangesTableClipboard, typeof TrackChangesTableColumnResize, typeof TrackChangesTableOfContents, typeof TrackChangesTableProperties, typeof TrackChangesTemplate, typeof TrackChangesTitle, typeof TrackChangesUndo];
91
- static get pluginName(): "TrackChangesEditing";
92
- /**
93
- * @inheritDoc
94
- */
95
- static get isOfficialPlugin(): true;
96
- /**
97
- * @inheritDoc
98
- */
99
- static get isPremiumPlugin(): true;
100
- /**
101
- * @inheritDoc
102
- */
103
- constructor(editor: Editor);
104
- /**
105
- * @inheritDoc
106
- */
107
- init(): void;
108
- /**
109
- * @inheritDoc
110
- */
111
- afterInit(): void;
112
- /**
113
- * An adapter object that should communicate with the data source to fetch or save the suggestion data.
114
- */
115
- set adapter(adapter: TrackChangesAdapter | null);
116
- get adapter(): TrackChangesAdapter | null;
117
- getSuggestions(options?: {
118
- skipNotAttached?: boolean;
119
- toJSON?: false;
120
- }): Array<Suggestion>;
121
- getSuggestions(options: {
122
- skipNotAttached?: boolean;
123
- toJSON: true;
124
- }): Array<SuggestionJSON>;
125
- getSuggestions(options: {
126
- skipNotAttached?: boolean;
127
- toJSON: boolean;
128
- }): Array<Suggestion> | Array<SuggestionJSON>;
129
- /**
130
- * Returns {@link module:track-changes/suggestion~Suggestion suggestion} for given `id`.
131
- */
132
- getSuggestion(id: string): Suggestion;
133
- /**
134
- * Checks if {@link module:track-changes/suggestion~Suggestion suggestion} of given `id` exist.
135
- */
136
- hasSuggestion(id: string): boolean;
137
- /**
138
- * Adds suggestion data.
139
- */
140
- addSuggestionData(data: SuggestionData): Suggestion;
141
- /**
142
- * Accept all adjacent suggestions.
143
- */
144
- acceptSuggestion(suggestion: Suggestion): void;
145
- /**
146
- * Discard all adjacent suggestions.
147
- */
148
- discardSuggestion(suggestion: Suggestion): void;
149
- /**
150
- * Enables command with given `commandName` in track changes mode.
151
- *
152
- * When a command gets enabled in track changes mode, its original `execute()` method is overwritten by provided `callback()`
153
- * function. The `callback()` should provide alternative logic to be executed instead.
154
- *
155
- * The `callback()` function is passed one or more parameters:
156
- *
157
- * * the first parameter is `executeCommand()`, a function that upon calling will fire the original `execute()` method,
158
- * * then, all the parameters passed to original `execute()` call are passed.
159
- *
160
- * Using those parameters it is possible to call the original command in the `callback()` (or skip it) and also do
161
- * something before and/or after that call.
162
- *
163
- * If `callback` is not set then the command will work the same both when track changes is on and off.
164
- *
165
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
166
- * features} guide to learn more about enabling your feature in the suggestion mode.
167
- */
168
- enableCommand(commandName: string, callback?: Function): void;
169
- /**
170
- * Temporarily disable track changes to accept or discard a suggestion without intercepting original calls.
171
- */
172
- forceDefaultExecution(callback: Function): unknown;
173
- /**
174
- * Marks a single-range insertion suggestion on the given `range`.
175
- *
176
- * It is expected that given `range` is a range on just-created content and does not intersect with any other suggestion ranges.
177
- *
178
- * ```ts
179
- * trackChangesPlugin.markInsertion( insertionRange );
180
- * trackChangesPlugin.markInsertion( insertionRange, 'customInsertion' );
181
- * ```
182
- *
183
- * This method should be used in `callback()` in
184
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
185
- * to inform the track changes plugin about a suggestion that happened.
186
- *
187
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
188
- * this method are bound with one undo step.
189
- *
190
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
191
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
192
- * the existing suggestion).
193
- *
194
- * See {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
195
- * features guide} to learn more about enabling your feature in the suggestion mode.
196
- *
197
- * @param range Range on content which got inserted.
198
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. If not set,
199
- * suggestion will be a generic insertion suggestion. Only suggestions with the same sub type will be joined.
200
- * @param attributes Custom suggestion attributes.
201
- * @returns Suggestion created or expanded as a result of execution of this
202
- * method. Returns `null` if given `range` was collapsed (so no suggestion was created or expanded).
203
- */
204
- markInsertion(range: Range, subType?: string | null, attributes?: Record<string, unknown>): Suggestion | null;
205
- /**
206
- * Marks a multi-range insertion suggestion spanning over given `ranges`.
207
- *
208
- * It is expected that given `ranges` are ranges on just-created content and do not intersect with any other suggestion ranges.
209
- *
210
- * Each range of a multi-range insertion suggestion should contain exactly one element and should not be created on a text content.
211
- *
212
- * ```ts
213
- * trackChangesPlugin.markMultiRangeInsertion( insertionRanges );
214
- * trackChangesPlugin.markMultiRangeInsertion( insertionRanges, 'customInsertion' );
215
- * ```
216
- *
217
- * This method should be used in `callback()` in
218
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
219
- * to inform the track changes plugin about a suggestion that happened.
220
- *
221
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
222
- * this method are bound with one undo step.
223
- *
224
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
225
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
226
- * the existing suggestion).
227
- *
228
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
229
- * features} guide to learn more about enabling your feature in the suggestion mode.
230
- *
231
- * @param ranges Ranges which got inserted.
232
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. Only suggestions
233
- * with the same subtype will be joined.
234
- * @param attributes Custom suggestion attributes.
235
- * @returns {module:track-changes/suggestion~Suggestion} Suggestion created or expanded as a result of execution of this method.
236
- */
237
- markMultiRangeInsertion(ranges: Array<Range>, subType?: string, attributes?: Record<string, unknown>): Suggestion;
238
- /**
239
- * Marks an inline format suggestion on the given `range`.
240
- *
241
- * This type of format suggestion is suitable for formatting (attribute) changes on inline elements and text.
242
- * Changes like adding bold or setting a link use this type of format suggestion.
243
- *
244
- * Inline format suggestions are directly coupled with editor commands and represent a command execution on given `range`.
245
- *
246
- * ```ts
247
- * trackChangesPlugin.markInlineFormat( formattedRange, {
248
- * commandName: 'bold',
249
- * commandParams: [ { forceValue: true } ]
250
- * } );
251
- *
252
- * trackChangesPlugin.markInlineFormat( formattedRange, formatData, 'customSubType' );
253
- * ```
254
- *
255
- * This method should be used in `callback()` in
256
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
257
- * to inform the track changes plugin about a suggestion that happened.
258
- *
259
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
260
- * this method are bound with one undo step.
261
- *
262
- * When a format suggestion is accepted the command is executed based on parameters passed in `formatData`.
263
- *
264
- * If an inline format suggestion is marked inside the local user's insertion suggestion, the change is applied directly
265
- * and no suggestion is created. This supports partial intersections with insertion suggestions.
266
- *
267
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
268
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
269
- * the existing suggestion).
270
- *
271
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
272
- * features} guide to learn more about enabling your feature in the suggestion mode.
273
- *
274
- * @param range Range on which the change happened.
275
- * @param formatData Command parameters.
276
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. If not set
277
- * (which is the default and recommended use) the sub type value is a string hash generated from `formatData`. This guarantees that
278
- * all inline format suggestions that perform the same changes have the same sub type (and can be properly handled).
279
- * @param attributes Custom suggestion attributes.
280
- */
281
- markInlineFormat(range: Range, formatData: FormatData, subType?: string | null, attributes?: Record<string, unknown>): null;
282
- /**
283
- * Marks a block format suggestion on the given `range`.
284
- *
285
- * Block format suggestions are directly coupled with editor commands and represent a command execution on the given range or element.
286
- *
287
- * This type of format suggestion is suitable for formatting (attribute) changes on block elements.
288
- * Changes like resizing image, applying block quote or changing header type use this type of format suggestion.
289
- *
290
- * Pass element if the suggestion should be marked exactly on that element. This is suitable if the command modifies exactly given
291
- * element (for example, changes an attribute of that element). If such element is split, an additional suggestion is
292
- * created for the new element:
293
- *
294
- * [<paragraph>Foobar]</paragraph> --> [<paragraph>Foo]</paragraph>[<paragraph>bar]</paragraph>
295
- *
296
- * Pass range for suggestions representing commands that can be executed on multiple blocks at once. This is suitable for commands
297
- * which modifies all the block elements found in given range (those commands usually operate on selection ranges). This creates
298
- * only one suggestion for the whole range and do not create additional suggestions if blocks in the range are split:
299
- *
300
- * [<paragraph>Foobar]</paragraph> --> [<paragraph>Foo</paragraph><paragraph>Bar]</paragraph>
301
- *
302
- * Example of marking block format suggestion on an element:
303
- *
304
- * ```ts
305
- * trackChangesPlugin.markBlockFormat( paragraphElement, {
306
- * commandName: 'heading',
307
- * commandParams: [ { value: 'heading1' } ],
308
- * formatGroupId: 'blockName'
309
- * } );
310
- * ```
311
- *
312
- * Example of marking block format suggestion on a range:
313
- *
314
- * ```ts
315
- * plugin.markBlockFormat( selectionRange, {
316
- * commandName: 'blockQuote',
317
- * commandParams: [ { forceValue: true } ]
318
- * } );
319
- * ```
320
- *
321
- * If you pass a range, it should start before the first element to change and end:
322
- *
323
- * * for blocks (like paragraph, list item, heading, etc.): at the end of the last element to change,
324
- * * for objects (like image, table, media embed, etc.): after the last element to change.
325
- *
326
- * ```xml
327
- * [<paragraph>Foo</paragraph><paragraph>Bar]</paragraph><paragraph>Xyz</paragraph>
328
- * [<paragraph>Foo</paragraph><imageBlock src="foo.jpg"></imageBlock>]<paragraph>Xyz</paragraph>
329
- * ```
330
- *
331
- * This method should be used in `callback()` in
332
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
333
- * to inform the track changes plugin about a suggestion that happened.
334
- *
335
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
336
- * this method are bound with one undo step.
337
- *
338
- * When a format suggestion is accepted the command is executed based on parameters passed in `formatData`.
339
- *
340
- * If a block format suggestion is marked inside the local user's insertion suggestion, the change is applied directly
341
- * and no suggestion is created. Note that this does not support partial intersections with insertion suggestions
342
- * (as opposed to inline format suggestions).
343
- *
344
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
345
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
346
- * the existing suggestion).
347
- *
348
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
349
- * features} guide to learn more about enabling your feature in the suggestion mode.
350
- *
351
- * @param elementOrRange Element or range on which the change happened.
352
- * @param formatData Command parameters and additional suggestion parameters.
353
- * @param affectedElements Elements (other than `elementOrRange`) that are
354
- * also affected by the command execution. This parameter is used when the effect of the command execution is larger than
355
- * `elementOrRange`. It is used when determining whether the change should be applied directly or if the suggestion should be created.
356
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. If not set
357
- * (which is the default and recommended use) the sub type value is a string hash generated from `formatData`. This guarantees that
358
- * all block format suggestions that perform the same changes have the same sub types (and can be properly handled).
359
- * @param attributes Custom suggestion attributes.
360
- */
361
- markBlockFormat(elementOrRange: Element | Range, formatData: FormatData, affectedElements?: Array<Element>, subType?: string | null, attributes?: Record<string, unknown>): Suggestion | null;
362
- /**
363
- * Marks a multi-range block format suggestion on given `elements`.
364
- *
365
- * See {@link module:track-changes/trackchangesediting~TrackChangesEditing#markBlockFormat `TrackChangesEditing#markBlockFormat()`}
366
- * to learn more about block format suggestions. Note that this method can be used only on elements (not on ranges).
367
- *
368
- * This method is useful for creating a format suggestion on multiple elements which are not siblings, so one range cannot be used.
369
- *
370
- * This method should be used in `callback()` in
371
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
372
- * to inform the track changes plugin about a suggestion that happened.
373
- *
374
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
375
- * this method are bound with one undo step.
376
- *
377
- * When a format suggestion is accepted the command is executed based on parameters passed in `formatData`.
378
- *
379
- * If a block format suggestion is marked inside the local user's insertion suggestion, the change is applied directly
380
- * and no suggestion is created. Note that this does not support partial intersections with insertion suggestions
381
- * (as opposed to inline format suggestions).
382
- *
383
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
384
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
385
- * the existing suggestion).
386
- *
387
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
388
- * features} guide to learn more about enabling your feature in the suggestion mode.
389
- *
390
- * @param elementsOrRanges Elements or ranges
391
- * on which the change happened.
392
- * @param formatData Command parameters and additional suggestion parameters.
393
- * @param affectedElements Elements (other than `elementOrRange`) that are
394
- * also affected by the command execution. This parameter is used when the effect of the command execution is larger than
395
- * `elementOrRange`. It is used when determining whether the change should be applied directly or if the suggestion should be created.
396
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. If not set
397
- * (which is the default and recommended use) the sub type value is a string hash generated from `formatData`. This guarantees that
398
- * all block format suggestions that perform the same changes have the same sub types (and can be properly handled).
399
- * @param attributes Custom suggestion attributes.
400
- */
401
- markMultiRangeBlockFormat(elementsOrRanges: Array<Element> | Array<Range>, formatData: FormatData, affectedElements?: Array<Element>, subType?: string | null, attributes?: Record<string, unknown>): Suggestion | null;
402
- /**
403
- * Marks a single-range deletion suggestion on given `range`.
404
- *
405
- * If the `range` to mark intersects with or contains insertion suggestions created by the local user,
406
- * those suggestions may be removed in a part or in the whole together with their content.
407
- *
408
- * ```ts
409
- * trackChangesPlugin.markDeletion( deletedRange );
410
- * trackChangesPlugin.markDeletion( deletedRange, 'customDeletion' );
411
- * ```
412
- *
413
- * This method should be used in `callback()` in
414
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
415
- * to inform the track changes plugin about a suggestion that happened.
416
- *
417
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
418
- * this method are bound with one undo step.
419
- *
420
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
421
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
422
- * the existing suggestion).
423
- *
424
- * See {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
425
- * features guide} to learn more about enabling your feature in the suggestion mode.
426
- *
427
- * @param range Range which should be marked as deletion suggestion.
428
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set. If not set,
429
- * suggestion will be a generic insertion suggestion. Only suggestions with the same sub type will be joined.
430
- * @param attributes Custom suggestion attributes.
431
- * @returns Suggestion created or expanded as a result of execution of this
432
- * method. Returns `null` if given `range` was collapsed or the deletion was in insertion (so no suggestion was created or expanded).
433
- */
434
- markDeletion(range: Range, subType?: string | null, attributes?: Record<string, unknown>): Suggestion | null;
435
- /**
436
- * Marks a multi-range deletion suggestion spanning over given `ranges`.
437
- *
438
- * Each range of a multi-range deletion suggestion should contain exactly one element and should not be created on a text content.
439
- *
440
- * If the `ranges` to mark contain or are contained in insertion suggestions created by the local user, those
441
- * insertion suggestions may be removed together with their content.
442
- *
443
- * ```ts
444
- * trackChangesPlugin.markMultiRangeDeletion( deletedRanges );
445
- * trackChangesPlugin.markMultiRangeDeletion( deletedRanges, 'customDeletion' );
446
- * ```
447
- *
448
- * This method should be used in `callback()` in
449
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
450
- * to inform the track changes plugin about a suggestion that happened.
451
- *
452
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
453
- * this method are bound with one undo step.
454
- *
455
- * If possible, the new suggestion will be joined with an existing suggestion (of the same type). This happens only if
456
- * the suggestions are created by the same user and have similar attributes (i.e. passed `attributes` do not conflict with
457
- * the existing suggestion).
458
- *
459
- * See the {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
460
- * features} guide to learn more about enabling your feature in the suggestion mode.
461
- *
462
- * @param ranges Ranges which should be marked as deletion suggestion.
463
- * @param subType Suggestion {@link module:track-changes/suggestion~Suggestion#subType} to set.
464
- * Only suggestions with the same sub type will be joined.
465
- * @param attributes Custom suggestion attributes.
466
- * @returns Suggestion created or expanded as a result of execution of this method.
467
- */
468
- markMultiRangeDeletion(ranges: Array<Range>, subType?: string, attributes?: Record<string, unknown>): Suggestion | null;
469
- /**
470
- * Marks a single-range attribute suggestion on the given `range`.
471
- *
472
- * Note: all nodes in the given `range` must have the same current value of `key` attribute.
473
- *
474
- * Note: if a block attribute is marked, `range` should include only a single model element.
475
- *
476
- * `attributes` is a required value and must include `groupId: string` property. The group id is used to group attribute suggestions
477
- * together. All suggestions with the same `groupId` will be put into one suggestion chain. By default, all attribute suggestions
478
- * created during the same batch have the same `groupId`.
479
- *
480
- * It's possible that more than one suggestion will be created by this method if there are already suggestions with the same
481
- * `key` but a different `oldValue` intersecting with the given `range`.
482
- *
483
- * It is guaranteed that there will be no "conflicting" suggestions, that is, there will be no two intersecting suggestions for
484
- * the same attribute `key`. If there is a conflicting suggestion, it will be partially or fully replaced by a new suggestion.
485
- *
486
- * This method should be used in `callback()` in
487
- * {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
488
- * to inform the track changes plugin about a suggestion that happened.
489
- *
490
- * Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
491
- * this method are bound with one undo step.
492
- *
493
- * See {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
494
- * features guide} to learn more about enabling your feature in the suggestion mode.
495
- *
496
- * @param range Range for which the attribute has changed.
497
- * @param key Key of the attribute that changed.
498
- * @param oldValue Previous value of the attribute.
499
- * @param newValue New value of the attribute.
500
- * @param attributes Suggestion attributes. Must include `groupId`.
501
- */
502
- markAttributeChange(range: Range, key: string, oldValue: unknown, newValue: unknown, attributes: {
503
- groupId: string;
504
- [key: string]: any;
505
- }): Array<Suggestion>;
506
- /**
507
- * Enables default attributes suggestions integration for given command.
508
- *
509
- * @param commandName Name of the command to integrate.
510
- */
511
- enableDefaultAttributesIntegration(commandName: string): void;
512
- /**
513
- * Registers given attribute key for tracking as a block attribute (i.e. an attribute made on a block element).
514
- */
515
- registerBlockAttribute(attributeKey: string): void;
516
- /**
517
- * Registers given attribute key for tracking as an inline attribute (i.e. an attribute made on an inline element).
518
- */
519
- registerInlineAttribute(attributeKey: string): void;
520
- }
521
- /**
522
- * Command parameters and additional suggestion parameters. Passed value is also saved in
523
- * {@link module:track-changes/suggestion~Suggestion#data `Suggestion#data`} property.
524
- */
525
- export type FormatData = {
526
- /**
527
- * Name of the command to execute when the suggestion is accepted.
528
- */
529
- commandName: string;
530
- /**
531
- * Parameters with which the command should be executed.
532
- */
533
- commandParams: Array<any>;
534
- /**
535
- * Additional grouping parameter for suggestions. If a suggestion
536
- * would be set on an element which already has a different suggestion with the same `formatGroupId`, the new suggestion will overwrite
537
- * the old one (the old one will be removed). Defaults to `commandName` parameter, so different suggestions of the same command
538
- * overwrite each other. Using this parameter you might expand this behavior so that multiple commands overwrite each other.
539
- */
540
- formatGroupId?: string;
541
- /**
542
- * True when format suggestion uses ranges.
543
- */
544
- multipleBlocks?: boolean;
545
- [i: string]: unknown;
546
- };
547
- /**
548
- * Attribute suggestion parameters.
549
- */
550
- export type AttributeData = {
551
- /**
552
- * Attribute key.
553
- */
554
- key: string;
555
- /**
556
- * Attribute's original value before the change happened.
557
- */
558
- oldValue: unknown;
559
- /**
560
- * Attribute's value after the change happened.
561
- */
562
- newValue: unknown;
563
- };
@@ -1,50 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module track-changes/trackchangesui
11
- */
12
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
13
- import { Users } from 'ckeditor5-collaboration/src/collaboration-core.js';
14
- import TrackChangesEditing from './trackchangesediting.js';
15
- /**
16
- * Provides UI for track changes plugin.
17
- *
18
- * This plugin displays {@link module:track-changes/suggestion~Suggestion suggestions} as a
19
- * {@link module:comments/annotations/annotations~Annotations}.
20
- */
21
- export default class TrackChangesUI extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof TrackChangesEditing, typeof Users, "CommentsRepository", "Annotations", "EditorAnnotations"];
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName(): "TrackChangesUI";
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isOfficialPlugin(): true;
34
- /**
35
- * @inheritDoc
36
- */
37
- static get isPremiumPlugin(): true;
38
- /**
39
- * @inheritDoc
40
- */
41
- constructor(editor: Editor);
42
- /**
43
- * @inheritDoc
44
- */
45
- init(): void;
46
- /**
47
- * @inheritDoc
48
- */
49
- destroy(): void;
50
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- import type { Editor } from 'ckeditor5/src/core.js';
10
- import type Suggestion from '../suggestion.js';
11
- import type { default as BaseSuggestionThreadView } from './view/basesuggestionthreadview.js';
12
- import type { CommentThreadController } from '@ckeditor/ckeditor5-comments';
13
- declare const SuggestionController_base: {
14
- new (): import("ckeditor5/src/utils.js").Observable;
15
- prototype: import("ckeditor5/src/utils.js").Observable;
16
- };
17
- /**
18
- * A controller for a suggestion.
19
- *
20
- * It takes a suggestion thread view, listens to events fired by that view and based on them performs actions
21
- * on the provided suggestion model.
22
- */
23
- export default class SuggestionController extends /* #__PURE__ -- @preserve */ SuggestionController_base {
24
- model: Suggestion;
25
- view: BaseSuggestionThreadView;
26
- commentThreadController: CommentThreadController;
27
- constructor(editor: Editor, model: Suggestion, view: BaseSuggestionThreadView, commentThreadController: CommentThreadController);
28
- /**
29
- * Accepts the suggestion that belongs to this controller.
30
- */
31
- acceptSuggestion(): void;
32
- /**
33
- * Discards the suggestion that belongs to this controller.
34
- */
35
- discardSuggestion(): void;
36
- /**
37
- * Destroys `SuggestionController` instance.
38
- */
39
- destroy(): void;
40
- }
41
- export {};