@ckeditor/ckeditor5-collaboration-core 0.0.0-internal-20241017.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 (305) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +23 -0
  3. package/README.md +35 -0
  4. package/dist/augmentation.d.ts +42 -0
  5. package/dist/collaborationhistory.d.ts +25 -0
  6. package/dist/collaborationoperation.d.ts +32 -0
  7. package/dist/config.d.ts +106 -0
  8. package/dist/index-content.css +470 -0
  9. package/dist/index-editor.css +426 -0
  10. package/dist/index.css +1080 -0
  11. package/dist/index.d.ts +26 -0
  12. package/dist/index.js +23 -0
  13. package/dist/legacyerrors.d.ts +33 -0
  14. package/dist/permissions.d.ts +58 -0
  15. package/dist/suggestions/view/ariadescriptionview.d.ts +27 -0
  16. package/dist/suggestions/view/latefocusbuttonview.d.ts +41 -0
  17. package/dist/suggestionstyles.d.ts +18 -0
  18. package/dist/translations/af.d.ts +8 -0
  19. package/dist/translations/af.js +23 -0
  20. package/dist/translations/af.umd.js +23 -0
  21. package/dist/translations/ar.d.ts +8 -0
  22. package/dist/translations/ar.js +23 -0
  23. package/dist/translations/ar.umd.js +23 -0
  24. package/dist/translations/az.d.ts +8 -0
  25. package/dist/translations/az.js +23 -0
  26. package/dist/translations/az.umd.js +23 -0
  27. package/dist/translations/bg.d.ts +8 -0
  28. package/dist/translations/bg.js +23 -0
  29. package/dist/translations/bg.umd.js +23 -0
  30. package/dist/translations/bn.d.ts +8 -0
  31. package/dist/translations/bn.js +23 -0
  32. package/dist/translations/bn.umd.js +23 -0
  33. package/dist/translations/bs.d.ts +8 -0
  34. package/dist/translations/bs.js +23 -0
  35. package/dist/translations/bs.umd.js +23 -0
  36. package/dist/translations/ca.d.ts +8 -0
  37. package/dist/translations/ca.js +23 -0
  38. package/dist/translations/ca.umd.js +23 -0
  39. package/dist/translations/cs.d.ts +8 -0
  40. package/dist/translations/cs.js +23 -0
  41. package/dist/translations/cs.umd.js +23 -0
  42. package/dist/translations/da.d.ts +8 -0
  43. package/dist/translations/da.js +23 -0
  44. package/dist/translations/da.umd.js +23 -0
  45. package/dist/translations/de-ch.d.ts +8 -0
  46. package/dist/translations/de-ch.js +23 -0
  47. package/dist/translations/de-ch.umd.js +23 -0
  48. package/dist/translations/de.d.ts +8 -0
  49. package/dist/translations/de.js +23 -0
  50. package/dist/translations/de.umd.js +23 -0
  51. package/dist/translations/el.d.ts +8 -0
  52. package/dist/translations/el.js +23 -0
  53. package/dist/translations/el.umd.js +23 -0
  54. package/dist/translations/en-au.d.ts +8 -0
  55. package/dist/translations/en-au.js +23 -0
  56. package/dist/translations/en-au.umd.js +23 -0
  57. package/dist/translations/en.d.ts +8 -0
  58. package/dist/translations/en.js +23 -0
  59. package/dist/translations/en.umd.js +23 -0
  60. package/dist/translations/es-co.d.ts +8 -0
  61. package/dist/translations/es-co.js +23 -0
  62. package/dist/translations/es-co.umd.js +23 -0
  63. package/dist/translations/es.d.ts +8 -0
  64. package/dist/translations/es.js +23 -0
  65. package/dist/translations/es.umd.js +23 -0
  66. package/dist/translations/et.d.ts +8 -0
  67. package/dist/translations/et.js +23 -0
  68. package/dist/translations/et.umd.js +23 -0
  69. package/dist/translations/fa.d.ts +8 -0
  70. package/dist/translations/fa.js +23 -0
  71. package/dist/translations/fa.umd.js +23 -0
  72. package/dist/translations/fi.d.ts +8 -0
  73. package/dist/translations/fi.js +23 -0
  74. package/dist/translations/fi.umd.js +23 -0
  75. package/dist/translations/fr.d.ts +8 -0
  76. package/dist/translations/fr.js +23 -0
  77. package/dist/translations/fr.umd.js +23 -0
  78. package/dist/translations/gl.d.ts +8 -0
  79. package/dist/translations/gl.js +23 -0
  80. package/dist/translations/gl.umd.js +23 -0
  81. package/dist/translations/he.d.ts +8 -0
  82. package/dist/translations/he.js +23 -0
  83. package/dist/translations/he.umd.js +23 -0
  84. package/dist/translations/hi.d.ts +8 -0
  85. package/dist/translations/hi.js +23 -0
  86. package/dist/translations/hi.umd.js +23 -0
  87. package/dist/translations/hr.d.ts +8 -0
  88. package/dist/translations/hr.js +23 -0
  89. package/dist/translations/hr.umd.js +23 -0
  90. package/dist/translations/hu.d.ts +8 -0
  91. package/dist/translations/hu.js +23 -0
  92. package/dist/translations/hu.umd.js +23 -0
  93. package/dist/translations/id.d.ts +8 -0
  94. package/dist/translations/id.js +23 -0
  95. package/dist/translations/id.umd.js +23 -0
  96. package/dist/translations/it.d.ts +8 -0
  97. package/dist/translations/it.js +23 -0
  98. package/dist/translations/it.umd.js +23 -0
  99. package/dist/translations/ja.d.ts +8 -0
  100. package/dist/translations/ja.js +23 -0
  101. package/dist/translations/ja.umd.js +23 -0
  102. package/dist/translations/jv.d.ts +8 -0
  103. package/dist/translations/jv.js +23 -0
  104. package/dist/translations/jv.umd.js +23 -0
  105. package/dist/translations/ko.d.ts +8 -0
  106. package/dist/translations/ko.js +23 -0
  107. package/dist/translations/ko.umd.js +23 -0
  108. package/dist/translations/lt.d.ts +8 -0
  109. package/dist/translations/lt.js +23 -0
  110. package/dist/translations/lt.umd.js +23 -0
  111. package/dist/translations/lv.d.ts +8 -0
  112. package/dist/translations/lv.js +23 -0
  113. package/dist/translations/lv.umd.js +23 -0
  114. package/dist/translations/ms.d.ts +8 -0
  115. package/dist/translations/ms.js +23 -0
  116. package/dist/translations/ms.umd.js +23 -0
  117. package/dist/translations/nl.d.ts +8 -0
  118. package/dist/translations/nl.js +23 -0
  119. package/dist/translations/nl.umd.js +23 -0
  120. package/dist/translations/no.d.ts +8 -0
  121. package/dist/translations/no.js +23 -0
  122. package/dist/translations/no.umd.js +23 -0
  123. package/dist/translations/pl.d.ts +8 -0
  124. package/dist/translations/pl.js +23 -0
  125. package/dist/translations/pl.umd.js +23 -0
  126. package/dist/translations/pt-br.d.ts +8 -0
  127. package/dist/translations/pt-br.js +23 -0
  128. package/dist/translations/pt-br.umd.js +23 -0
  129. package/dist/translations/pt.d.ts +8 -0
  130. package/dist/translations/pt.js +23 -0
  131. package/dist/translations/pt.umd.js +23 -0
  132. package/dist/translations/ro.d.ts +8 -0
  133. package/dist/translations/ro.js +23 -0
  134. package/dist/translations/ro.umd.js +23 -0
  135. package/dist/translations/ru.d.ts +8 -0
  136. package/dist/translations/ru.js +23 -0
  137. package/dist/translations/ru.umd.js +23 -0
  138. package/dist/translations/sk.d.ts +8 -0
  139. package/dist/translations/sk.js +23 -0
  140. package/dist/translations/sk.umd.js +23 -0
  141. package/dist/translations/sr-latn.d.ts +8 -0
  142. package/dist/translations/sr-latn.js +23 -0
  143. package/dist/translations/sr-latn.umd.js +23 -0
  144. package/dist/translations/sr.d.ts +8 -0
  145. package/dist/translations/sr.js +23 -0
  146. package/dist/translations/sr.umd.js +23 -0
  147. package/dist/translations/sv.d.ts +8 -0
  148. package/dist/translations/sv.js +23 -0
  149. package/dist/translations/sv.umd.js +23 -0
  150. package/dist/translations/th.d.ts +8 -0
  151. package/dist/translations/th.js +23 -0
  152. package/dist/translations/th.umd.js +23 -0
  153. package/dist/translations/tk.d.ts +8 -0
  154. package/dist/translations/tk.js +23 -0
  155. package/dist/translations/tk.umd.js +23 -0
  156. package/dist/translations/tr.d.ts +8 -0
  157. package/dist/translations/tr.js +23 -0
  158. package/dist/translations/tr.umd.js +23 -0
  159. package/dist/translations/tt.d.ts +8 -0
  160. package/dist/translations/tt.js +23 -0
  161. package/dist/translations/tt.umd.js +23 -0
  162. package/dist/translations/ug.d.ts +8 -0
  163. package/dist/translations/ug.js +23 -0
  164. package/dist/translations/ug.umd.js +23 -0
  165. package/dist/translations/uk.d.ts +8 -0
  166. package/dist/translations/uk.js +23 -0
  167. package/dist/translations/uk.umd.js +23 -0
  168. package/dist/translations/ur.d.ts +8 -0
  169. package/dist/translations/ur.js +23 -0
  170. package/dist/translations/ur.umd.js +23 -0
  171. package/dist/translations/vi.d.ts +8 -0
  172. package/dist/translations/vi.js +23 -0
  173. package/dist/translations/vi.umd.js +23 -0
  174. package/dist/translations/zh-cn.d.ts +8 -0
  175. package/dist/translations/zh-cn.js +23 -0
  176. package/dist/translations/zh-cn.umd.js +23 -0
  177. package/dist/translations/zh.d.ts +8 -0
  178. package/dist/translations/zh.js +23 -0
  179. package/dist/translations/zh.umd.js +23 -0
  180. package/dist/users/view/userview.d.ts +20 -0
  181. package/dist/users.d.ts +172 -0
  182. package/dist/utils/common-translations.d.ts +13 -0
  183. package/dist/utils/confirmmixin.d.ts +28 -0
  184. package/dist/utils/confirmview.d.ts +33 -0
  185. package/dist/utils/getdatetimeformatter.d.ts +33 -0
  186. package/dist/utils/getmarkerdomelement.d.ts +26 -0
  187. package/dist/utils/hashobject.d.ts +12 -0
  188. package/dist/utils/sanitizeEditorConfig.d.ts +19 -0
  189. package/dist/utils/setupthreadkeyboardnavigation.d.ts +49 -0
  190. package/dist/utils/surroundingmarkersdetector.d.ts +20 -0
  191. package/dist/utils/trim-html.d.ts +23 -0
  192. package/lang/contexts.json +6 -0
  193. package/lang/translations/af.po +34 -0
  194. package/lang/translations/ar.po +34 -0
  195. package/lang/translations/az.po +34 -0
  196. package/lang/translations/bg.po +34 -0
  197. package/lang/translations/bn.po +34 -0
  198. package/lang/translations/bs.po +34 -0
  199. package/lang/translations/ca.po +34 -0
  200. package/lang/translations/cs.po +34 -0
  201. package/lang/translations/da.po +34 -0
  202. package/lang/translations/de-ch.po +34 -0
  203. package/lang/translations/de.po +34 -0
  204. package/lang/translations/el.po +34 -0
  205. package/lang/translations/en-au.po +34 -0
  206. package/lang/translations/en.po +34 -0
  207. package/lang/translations/es-co.po +34 -0
  208. package/lang/translations/es.po +34 -0
  209. package/lang/translations/et.po +34 -0
  210. package/lang/translations/fa.po +34 -0
  211. package/lang/translations/fi.po +34 -0
  212. package/lang/translations/fr.po +34 -0
  213. package/lang/translations/gl.po +34 -0
  214. package/lang/translations/he.po +34 -0
  215. package/lang/translations/hi.po +34 -0
  216. package/lang/translations/hr.po +34 -0
  217. package/lang/translations/hu.po +34 -0
  218. package/lang/translations/id.po +34 -0
  219. package/lang/translations/it.po +34 -0
  220. package/lang/translations/ja.po +34 -0
  221. package/lang/translations/jv.po +34 -0
  222. package/lang/translations/ko.po +34 -0
  223. package/lang/translations/lt.po +34 -0
  224. package/lang/translations/lv.po +34 -0
  225. package/lang/translations/ms.po +34 -0
  226. package/lang/translations/nl.po +34 -0
  227. package/lang/translations/no.po +34 -0
  228. package/lang/translations/pl.po +34 -0
  229. package/lang/translations/pt-br.po +34 -0
  230. package/lang/translations/pt.po +34 -0
  231. package/lang/translations/ro.po +34 -0
  232. package/lang/translations/ru.po +34 -0
  233. package/lang/translations/sk.po +34 -0
  234. package/lang/translations/sr-latn.po +34 -0
  235. package/lang/translations/sr.po +34 -0
  236. package/lang/translations/sv.po +34 -0
  237. package/lang/translations/th.po +34 -0
  238. package/lang/translations/tk.po +34 -0
  239. package/lang/translations/tr.po +34 -0
  240. package/lang/translations/tt.po +34 -0
  241. package/lang/translations/ug.po +34 -0
  242. package/lang/translations/uk.po +34 -0
  243. package/lang/translations/ur.po +34 -0
  244. package/lang/translations/vi.po +34 -0
  245. package/lang/translations/zh-cn.po +34 -0
  246. package/lang/translations/zh.po +34 -0
  247. package/package.json +52 -0
  248. package/src/augmentation.d.ts +38 -0
  249. package/src/augmentation.js +23 -0
  250. package/src/collaborationhistory.d.ts +21 -0
  251. package/src/collaborationhistory.js +23 -0
  252. package/src/collaborationoperation.d.ts +28 -0
  253. package/src/collaborationoperation.js +23 -0
  254. package/src/config.d.ts +102 -0
  255. package/src/config.js +23 -0
  256. package/src/index.d.ts +22 -0
  257. package/src/index.js +23 -0
  258. package/src/legacyerrors.d.ts +29 -0
  259. package/src/legacyerrors.js +23 -0
  260. package/src/permissions.d.ts +54 -0
  261. package/src/permissions.js +23 -0
  262. package/src/suggestions/view/ariadescriptionview.d.ts +23 -0
  263. package/src/suggestions/view/ariadescriptionview.js +23 -0
  264. package/src/suggestions/view/latefocusbuttonview.d.ts +37 -0
  265. package/src/suggestions/view/latefocusbuttonview.js +23 -0
  266. package/src/suggestionstyles.d.ts +14 -0
  267. package/src/suggestionstyles.js +23 -0
  268. package/src/users/view/userview.d.ts +16 -0
  269. package/src/users/view/userview.js +23 -0
  270. package/src/users.d.ts +168 -0
  271. package/src/users.js +23 -0
  272. package/src/utils/common-translations.d.ts +9 -0
  273. package/src/utils/common-translations.js +23 -0
  274. package/src/utils/confirmmixin.d.ts +24 -0
  275. package/src/utils/confirmmixin.js +23 -0
  276. package/src/utils/confirmview.d.ts +29 -0
  277. package/src/utils/confirmview.js +23 -0
  278. package/src/utils/getdatetimeformatter.d.ts +29 -0
  279. package/src/utils/getdatetimeformatter.js +23 -0
  280. package/src/utils/getmarkerdomelement.d.ts +22 -0
  281. package/src/utils/getmarkerdomelement.js +23 -0
  282. package/src/utils/hashobject.d.ts +8 -0
  283. package/src/utils/hashobject.js +23 -0
  284. package/src/utils/sanitizeEditorConfig.d.ts +15 -0
  285. package/src/utils/sanitizeEditorConfig.js +23 -0
  286. package/src/utils/setupthreadkeyboardnavigation.d.ts +45 -0
  287. package/src/utils/setupthreadkeyboardnavigation.js +23 -0
  288. package/src/utils/surroundingmarkersdetector.d.ts +16 -0
  289. package/src/utils/surroundingmarkersdetector.js +23 -0
  290. package/src/utils/trim-html.d.ts +19 -0
  291. package/src/utils/trim-html.js +23 -0
  292. package/theme/ariadescription.css +12 -0
  293. package/theme/icons/notification.svg +11 -0
  294. package/theme/integrations/codeblock.css +17 -0
  295. package/theme/integrations/horizontalline.css +24 -0
  296. package/theme/integrations/image.css +66 -0
  297. package/theme/integrations/mediaembed.css +28 -0
  298. package/theme/integrations/mergefields.css +67 -0
  299. package/theme/integrations/pagebreak.css +24 -0
  300. package/theme/integrations/table.css +200 -0
  301. package/theme/suggestion.css +131 -0
  302. package/theme/suggestionmarker.css +162 -0
  303. package/theme/usercolormixin.css +41 -0
  304. package/theme/usercolors.css +49 -0
  305. package/theme/users.css +110 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ Changelog
2
+ =========
3
+
4
+ All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
package/LICENSE.md ADDED
@@ -0,0 +1,23 @@
1
+ Software License Agreement
2
+ ==========================
3
+
4
+ **CKEditor&nbsp;5 collaboration core** (https://ckeditor.com/collaboration/)<br>
5
+ Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
+
7
+ CKEditor&nbsp;5 collaboration core is licensed under a commercial license and is protected by copyright law.
8
+ For more details about available licensing options please contact us at sales@cksource.com.
9
+
10
+ Sources of Intellectual Property Included in CKEditor&nbsp;5 collaboration core
11
+ -------------------------------------------------------------------------------
12
+
13
+ Where not otherwise indicated, all CKEditor&nbsp;5 collaboration core content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
14
+
15
+ The following libraries are included in CKEditor&nbsp;5 collaboration core under the [MIT license](https://opensource.org/licenses/MIT):
16
+
17
+ * date-fns - Copyright (c) 2021 Sasha Koss and Lesha Koss https://kossnocorp.mit-license.org.
18
+ * Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
19
+
20
+ Trademarks
21
+ ----------
22
+
23
+ **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # CKEditor&nbsp;5 collaboration core
2
+
3
+ [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-collaboration-core.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-collaboration-core)
4
+
5
+ CKEditor&nbsp;5 collaboration core is a low-level API that provides base features to support multiple users working together in a rich text editor. It is used in collaborative features such as [comments](https://ckeditor.com/collaboration/comments/), [track changes](https://ckeditor.com/collaboration/track-changes/) or [real-time collaboration](https://ckeditor.com/collaboration/real-time/) in CKEditor&nbsp;5.
6
+
7
+ ## Documentation
8
+
9
+ For more information about collaboration features visit [CKEditor&nbsp;5 collaboration features overview documentation](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/collaboration.html).
10
+
11
+ Also, make sure you visit the [CKEditor&nbsp;5 changelog](https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md) whenever a new version of the package is released.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install ckeditor5-premium-features
17
+ ```
18
+
19
+ ## Getting support
20
+
21
+ CKEditor&nbsp;5 collaboration core comes with outstanding support from a dedicated team of customer care specialists, QA engineers and CKEditor&nbsp;5 developers. The team will gladly assist you in all aspects from setting up your account to integrating CKEditor&nbsp;5 collaboration features with your application.
22
+
23
+ As a licensed CKEditor&nbsp;5 collaboration features user you can report bugs and request features directly through the CKEditor Ecosystem customer dashboard.
24
+
25
+ ## License
26
+
27
+ **CKEditor&nbsp;5 collaboration core**<br>
28
+ Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
29
+
30
+ CKEditor&nbsp;5 collaboration core is licensed under a commercial license and is protected by copyright law.
31
+ For more details about available licensing options please contact us at sales@cksource.com.
32
+
33
+ ### Trademarks
34
+
35
+ **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
@@ -0,0 +1,42 @@
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-oss-license
8
+ */
9
+ import type { LocaleConfig, Users } from './index.js';
10
+ import type { RealTimeCollaborationConfig } from './config.js';
11
+ declare module '@ckeditor/ckeditor5-core' {
12
+ interface EditorConfig {
13
+ /**
14
+ * The locale configuration of the editor.
15
+ */
16
+ locale?: LocaleConfig;
17
+ /**
18
+ * The users plugin configuration.
19
+ */
20
+ users?: {
21
+ /**
22
+ * User ID value that will be used for the anonymous user.
23
+ */
24
+ anonymousUserId?: string;
25
+ /**
26
+ * Number of defined colors that are randomly assigned to users.
27
+ */
28
+ colorsCount?: number;
29
+ };
30
+ /**
31
+ * The configuration of the real time collaboration feature.
32
+ *
33
+ * Read more in {@link module:collaboration-core/config~RealTimeCollaborationConfig}.
34
+ *
35
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
36
+ */
37
+ collaboration?: RealTimeCollaborationConfig;
38
+ }
39
+ interface PluginsMap {
40
+ [Users.pluginName]: Users;
41
+ }
42
+ }
@@ -0,0 +1,25 @@
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-oss-license
8
+ */
9
+ /**
10
+ * @module collaboration-core/collaborationhistory
11
+ * @publicApi
12
+ */
13
+ import type { default as CollaborationOperation } from './collaborationoperation.js';
14
+ /**
15
+ * Interface compatible with {@link module:engine/model/history~History} with the difference that it uses
16
+ * {@link module:collaboration-core/collaborationoperation~CollaborationOperation} instead of regular model operations.
17
+ */
18
+ export default interface CollaborationHistory {
19
+ _operations: Array<CollaborationOperation>;
20
+ version: number;
21
+ getOperations(fromBaseVersion?: number, toBaseVersion?: number): Array<CollaborationOperation>;
22
+ getOperation(baseVersion: number): CollaborationOperation | undefined;
23
+ addOperation(operation: CollaborationOperation): void;
24
+ reset(): void;
25
+ }
@@ -0,0 +1,32 @@
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-oss-license
8
+ */
9
+ /**
10
+ * @module collaboration-core/collaborationoperation
11
+ * @publicApi
12
+ */
13
+ import type { Operation, InsertOperation, MergeOperation, MoveOperation, SplitOperation, MarkerOperation, RootOperation, RootAttributeOperation } from 'ckeditor5/src/engine.js';
14
+ /**
15
+ * Extends the {@link module:engine/model/operation/operation operation}.
16
+ */
17
+ export default interface CollaborationOperation extends Operation {
18
+ _isInit?: boolean;
19
+ _authorId?: null | string;
20
+ _isDisconnection?: boolean;
21
+ createdAt?: Date;
22
+ wasUndone?: boolean;
23
+ affectsData?: Record<string, any>;
24
+ clone(): CollaborationOperation;
25
+ }
26
+ export type InsertCollaborationOperation = CollaborationOperation & InsertOperation;
27
+ export type MoveCollaborationOperation = CollaborationOperation & MoveOperation;
28
+ export type MergeCollaborationOperation = CollaborationOperation & MergeOperation;
29
+ export type SplitCollaborationOperation = CollaborationOperation & SplitOperation;
30
+ export type MarkerCollaborationOperation = CollaborationOperation & MarkerOperation;
31
+ export type RootCollaborationOperation = CollaborationOperation & RootOperation;
32
+ export type RootAttributeCollaborationOperation = CollaborationOperation & RootAttributeOperation;
@@ -0,0 +1,106 @@
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-oss-license
8
+ */
9
+ /**
10
+ * @module collaboration-core/config
11
+ * @publicApi
12
+ */
13
+ /**
14
+ * The locale configuration.
15
+ *
16
+ * ```ts
17
+ * ClassicEditor
18
+ * .create( {
19
+ * locale: {
20
+ * // The localization configuration.
21
+ * }
22
+ * } )
23
+ * .then( ... )
24
+ * .catch( ... );
25
+ * ```
26
+ *
27
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
28
+ */
29
+ export interface LocaleConfig {
30
+ /**
31
+ * A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying
32
+ * comments and suggestions details.
33
+ *
34
+ * The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
35
+ *
36
+ * ```ts
37
+ * import format from 'date-fns/format';
38
+ *
39
+ * ClassicEditor
40
+ * .create( document.querySelector( '#editor' ), {
41
+ * toolbar: {
42
+ * items: [ 'bold', 'italic', '|', 'comment' ]
43
+ * },
44
+ * sidebar: {
45
+ * container: document.querySelector( '#sidebar' )
46
+ * },
47
+ * locale: {
48
+ * dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
49
+ * }
50
+ * } )
51
+ * .catch( error => console.error( error ) );
52
+ * ```
53
+ *
54
+ * @returns The generated date.
55
+ */
56
+ dateTimeFormat?: (date: Date) => string;
57
+ }
58
+ /**
59
+ * The configuration of the real-time collaboration features.
60
+ *
61
+ * ```ts
62
+ * ClassicEditor
63
+ * .create( {
64
+ * collaboration: ... // Collaboration features configuration.
65
+ * } )
66
+ * .then( ... )
67
+ * .catch( ... );
68
+ * ```
69
+ *
70
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
71
+ */
72
+ export interface RealTimeCollaborationConfig {
73
+ /**
74
+ * The channel ID is a unique ID that identifies the data loaded in the editor instance or used by
75
+ * the context instance.
76
+ *
77
+ * If specified for the editor, it is the document ID.
78
+ *
79
+ * If you are using multiple editors instances at the same time, each of them should use a different
80
+ * channel ID to connect to a specific document.
81
+ *
82
+ * If specified for context, it is the ID for all the data related to context instance.
83
+ * This ID will be used for data that is not related to an editor instance, for example comments
84
+ * outside the editor.
85
+ *
86
+ * In the case of context, the ID can be an ID of a subpage or a form, or a different entity accordingly
87
+ * to your application.
88
+ *
89
+ * The channel ID can be used to recognize entity to which piece of data belongs in integrations that use `Context`
90
+ * and context plugins. For example, if you are preparing a custom integration using the comments API,
91
+ * you can use the channel ID to recognize whether the comment was added to an editor instance
92
+ * (and which one) or to the context.
93
+ *
94
+ * ```ts
95
+ * ClassicEditor
96
+ * .create( {
97
+ * collaboration: {
98
+ * channelId: 'your-channel-id'
99
+ * }
100
+ * } )
101
+ * .then( ... )
102
+ * .catch( ... );
103
+ * ```
104
+ */
105
+ channelId?: string;
106
+ }