@ckeditor/ckeditor5-collaboration-core 41.3.1 → 41.4.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 (200) hide show
  1. package/dist/index-content.css +332 -0
  2. package/dist/index-editor.css +312 -0
  3. package/dist/index.css +935 -0
  4. package/dist/index.js +23 -0
  5. package/dist/translations/af.d.ts +8 -0
  6. package/dist/translations/af.js +23 -0
  7. package/dist/translations/af.umd.js +23 -0
  8. package/dist/translations/ar.d.ts +8 -0
  9. package/dist/translations/ar.js +23 -0
  10. package/dist/translations/ar.umd.js +23 -0
  11. package/dist/translations/az.d.ts +8 -0
  12. package/dist/translations/az.js +23 -0
  13. package/dist/translations/az.umd.js +23 -0
  14. package/dist/translations/bg.d.ts +8 -0
  15. package/dist/translations/bg.js +23 -0
  16. package/dist/translations/bg.umd.js +23 -0
  17. package/dist/translations/bn.d.ts +8 -0
  18. package/dist/translations/bn.js +23 -0
  19. package/dist/translations/bn.umd.js +23 -0
  20. package/dist/translations/bs.d.ts +8 -0
  21. package/dist/translations/bs.js +23 -0
  22. package/dist/translations/bs.umd.js +23 -0
  23. package/dist/translations/ca.d.ts +8 -0
  24. package/dist/translations/ca.js +23 -0
  25. package/dist/translations/ca.umd.js +23 -0
  26. package/dist/translations/cs.d.ts +8 -0
  27. package/dist/translations/cs.js +23 -0
  28. package/dist/translations/cs.umd.js +23 -0
  29. package/dist/translations/da.d.ts +8 -0
  30. package/dist/translations/da.js +23 -0
  31. package/dist/translations/da.umd.js +23 -0
  32. package/dist/translations/de-ch.d.ts +8 -0
  33. package/dist/translations/de-ch.js +23 -0
  34. package/dist/translations/de-ch.umd.js +23 -0
  35. package/dist/translations/de.d.ts +8 -0
  36. package/dist/translations/de.js +23 -0
  37. package/dist/translations/de.umd.js +23 -0
  38. package/dist/translations/el.d.ts +8 -0
  39. package/dist/translations/el.js +23 -0
  40. package/dist/translations/el.umd.js +23 -0
  41. package/dist/translations/en-au.d.ts +8 -0
  42. package/dist/translations/en-au.js +23 -0
  43. package/dist/translations/en-au.umd.js +23 -0
  44. package/dist/translations/en.d.ts +8 -0
  45. package/dist/translations/en.js +23 -0
  46. package/dist/translations/en.umd.js +23 -0
  47. package/dist/translations/es-co.d.ts +8 -0
  48. package/dist/translations/es-co.js +23 -0
  49. package/dist/translations/es-co.umd.js +23 -0
  50. package/dist/translations/es.d.ts +8 -0
  51. package/dist/translations/es.js +23 -0
  52. package/dist/translations/es.umd.js +23 -0
  53. package/dist/translations/et.d.ts +8 -0
  54. package/dist/translations/et.js +23 -0
  55. package/dist/translations/et.umd.js +23 -0
  56. package/dist/translations/fa.d.ts +8 -0
  57. package/dist/translations/fa.js +23 -0
  58. package/dist/translations/fa.umd.js +23 -0
  59. package/dist/translations/fi.d.ts +8 -0
  60. package/dist/translations/fi.js +23 -0
  61. package/dist/translations/fi.umd.js +23 -0
  62. package/dist/translations/fr.d.ts +8 -0
  63. package/dist/translations/fr.js +23 -0
  64. package/dist/translations/fr.umd.js +23 -0
  65. package/dist/translations/gl.d.ts +8 -0
  66. package/dist/translations/gl.js +23 -0
  67. package/dist/translations/gl.umd.js +23 -0
  68. package/dist/translations/he.d.ts +8 -0
  69. package/dist/translations/he.js +23 -0
  70. package/dist/translations/he.umd.js +23 -0
  71. package/dist/translations/hi.d.ts +8 -0
  72. package/dist/translations/hi.js +23 -0
  73. package/dist/translations/hi.umd.js +23 -0
  74. package/dist/translations/hr.d.ts +8 -0
  75. package/dist/translations/hr.js +23 -0
  76. package/dist/translations/hr.umd.js +23 -0
  77. package/dist/translations/hu.d.ts +8 -0
  78. package/dist/translations/hu.js +23 -0
  79. package/dist/translations/hu.umd.js +23 -0
  80. package/dist/translations/id.d.ts +8 -0
  81. package/dist/translations/id.js +23 -0
  82. package/dist/translations/id.umd.js +23 -0
  83. package/dist/translations/it.d.ts +8 -0
  84. package/dist/translations/it.js +23 -0
  85. package/dist/translations/it.umd.js +23 -0
  86. package/dist/translations/ja.d.ts +8 -0
  87. package/dist/translations/ja.js +23 -0
  88. package/dist/translations/ja.umd.js +23 -0
  89. package/dist/translations/jv.d.ts +8 -0
  90. package/dist/translations/jv.js +23 -0
  91. package/dist/translations/jv.umd.js +23 -0
  92. package/dist/translations/ko.d.ts +8 -0
  93. package/dist/translations/ko.js +23 -0
  94. package/dist/translations/ko.umd.js +23 -0
  95. package/dist/translations/lt.d.ts +8 -0
  96. package/dist/translations/lt.js +23 -0
  97. package/dist/translations/lt.umd.js +23 -0
  98. package/dist/translations/lv.d.ts +8 -0
  99. package/dist/translations/lv.js +23 -0
  100. package/dist/translations/lv.umd.js +23 -0
  101. package/dist/translations/ms.d.ts +8 -0
  102. package/dist/translations/ms.js +23 -0
  103. package/dist/translations/ms.umd.js +23 -0
  104. package/dist/translations/nl.d.ts +8 -0
  105. package/dist/translations/nl.js +23 -0
  106. package/dist/translations/nl.umd.js +23 -0
  107. package/dist/translations/no.d.ts +8 -0
  108. package/dist/translations/no.js +23 -0
  109. package/dist/translations/no.umd.js +23 -0
  110. package/dist/translations/pl.d.ts +8 -0
  111. package/dist/translations/pl.js +23 -0
  112. package/dist/translations/pl.umd.js +23 -0
  113. package/dist/translations/pt-br.d.ts +8 -0
  114. package/dist/translations/pt-br.js +23 -0
  115. package/dist/translations/pt-br.umd.js +23 -0
  116. package/dist/translations/pt.d.ts +8 -0
  117. package/dist/translations/pt.js +23 -0
  118. package/dist/translations/pt.umd.js +23 -0
  119. package/dist/translations/ro.d.ts +8 -0
  120. package/dist/translations/ro.js +23 -0
  121. package/dist/translations/ro.umd.js +23 -0
  122. package/dist/translations/ru.d.ts +8 -0
  123. package/dist/translations/ru.js +23 -0
  124. package/dist/translations/ru.umd.js +23 -0
  125. package/dist/translations/sk.d.ts +8 -0
  126. package/dist/translations/sk.js +23 -0
  127. package/dist/translations/sk.umd.js +23 -0
  128. package/dist/translations/sr-latn.d.ts +8 -0
  129. package/dist/translations/sr-latn.js +23 -0
  130. package/dist/translations/sr-latn.umd.js +23 -0
  131. package/dist/translations/sr.d.ts +8 -0
  132. package/dist/translations/sr.js +23 -0
  133. package/dist/translations/sr.umd.js +23 -0
  134. package/dist/translations/sv.d.ts +8 -0
  135. package/dist/translations/sv.js +23 -0
  136. package/dist/translations/sv.umd.js +23 -0
  137. package/dist/translations/th.d.ts +8 -0
  138. package/dist/translations/th.js +23 -0
  139. package/dist/translations/th.umd.js +23 -0
  140. package/dist/translations/tk.d.ts +8 -0
  141. package/dist/translations/tk.js +23 -0
  142. package/dist/translations/tk.umd.js +23 -0
  143. package/dist/translations/tr.d.ts +8 -0
  144. package/dist/translations/tr.js +23 -0
  145. package/dist/translations/tr.umd.js +23 -0
  146. package/dist/translations/tt.d.ts +8 -0
  147. package/dist/translations/tt.js +23 -0
  148. package/dist/translations/tt.umd.js +23 -0
  149. package/dist/translations/ug.d.ts +8 -0
  150. package/dist/translations/ug.js +23 -0
  151. package/dist/translations/ug.umd.js +23 -0
  152. package/dist/translations/uk.d.ts +8 -0
  153. package/dist/translations/uk.js +23 -0
  154. package/dist/translations/uk.umd.js +23 -0
  155. package/dist/translations/ur.d.ts +8 -0
  156. package/dist/translations/ur.js +23 -0
  157. package/dist/translations/ur.umd.js +23 -0
  158. package/dist/translations/vi.d.ts +8 -0
  159. package/dist/translations/vi.js +23 -0
  160. package/dist/translations/vi.umd.js +23 -0
  161. package/dist/translations/zh-cn.d.ts +8 -0
  162. package/dist/translations/zh-cn.js +23 -0
  163. package/dist/translations/zh-cn.umd.js +23 -0
  164. package/dist/translations/zh.d.ts +8 -0
  165. package/dist/translations/zh.js +23 -0
  166. package/dist/translations/zh.umd.js +23 -0
  167. package/dist/types/augmentation.d.ts +42 -0
  168. package/dist/types/collaborationhistory.d.ts +25 -0
  169. package/dist/types/collaborationoperation.d.ts +32 -0
  170. package/dist/types/config.d.ts +106 -0
  171. package/dist/types/index.d.ts +23 -0
  172. package/dist/types/permissions.d.ts +50 -0
  173. package/dist/types/suggestionstyles.d.ts +16 -0
  174. package/dist/types/users/view/userview.d.ts +20 -0
  175. package/dist/types/users.d.ts +169 -0
  176. package/dist/types/utils/common-translations.d.ts +13 -0
  177. package/dist/types/utils/confirmmixin.d.ts +24 -0
  178. package/dist/types/utils/confirmview.d.ts +17 -0
  179. package/dist/types/utils/getdatetimeformatter.d.ts +33 -0
  180. package/dist/types/utils/getmarkerdomelement.d.ts +26 -0
  181. package/dist/types/utils/hashobject.d.ts +12 -0
  182. package/dist/types/utils/sanitizeEditorConfig.d.ts +19 -0
  183. package/dist/types/utils/surroundingmarkersdetector.d.ts +20 -0
  184. package/dist/types/utils/trim-html.d.ts +20 -0
  185. package/package.json +3 -2
  186. package/src/index.d.ts +2 -2
  187. package/src/index.js +1 -1
  188. package/src/permissions.js +1 -1
  189. package/src/suggestionstyles.js +1 -1
  190. package/src/users/view/userview.js +1 -1
  191. package/src/users.js +1 -1
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/confirmmixin.js +1 -1
  194. package/src/utils/confirmview.js +1 -1
  195. package/src/utils/getdatetimeformatter.js +1 -1
  196. package/src/utils/getmarkerdomelement.js +1 -1
  197. package/src/utils/hashobject.js +1 -1
  198. package/src/utils/sanitizeEditorConfig.js +1 -1
  199. package/src/utils/surroundingmarkersdetector.js +1 -1
  200. package/src/utils/trim-html.js +1 -1
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (_0x79e3a2=>{const {ur:{dictionary:_0x43c127,getPluralForm:_0x15e73}}={'ur':{'dictionary':{'Anonymous':'بے\x20نام','Yes':'ہاں','No':'ناں','Are\x20you\x20sure?':'واقعی؟'},'getPluralForm':_0xd33347=>0x1!=_0xd33347}};_0x79e3a2['ur']||={'dictionary':{},'getPluralForm':null},_0x79e3a2['ur']['dictionary']=Object['assign'](_0x79e3a2['ur']['dictionary'],_0x43c127),_0x79e3a2['ur']['getPluralForm']=_0x15e73;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -0,0 +1,8 @@
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
+ import type { Translations } from 'ckeditor5';
7
+ declare const translations: Translations;
8
+ export default translations;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export default{'vi':{'dictionary':{'Anonymous':'Ẩn\x20danh','Yes':'Có','No':'Không','Are\x20you\x20sure?':'Bạn\x20có\x20chắc\x20chắn\x20không?'},'getPluralForm':_0x2e9ab5=>0x0}};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (_0x240310=>{const {vi:{dictionary:_0x625317,getPluralForm:_0x50ffe2}}={'vi':{'dictionary':{'Anonymous':'Ẩn\x20danh','Yes':'Có','No':'Không','Are\x20you\x20sure?':'Bạn\x20có\x20chắc\x20chắn\x20không?'},'getPluralForm':_0xbef068=>0x0}};_0x240310['vi']||={'dictionary':{},'getPluralForm':null},_0x240310['vi']['dictionary']=Object['assign'](_0x240310['vi']['dictionary'],_0x625317),_0x240310['vi']['getPluralForm']=_0x50ffe2;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -0,0 +1,8 @@
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
+ import type { Translations } from 'ckeditor5';
7
+ declare const translations: Translations;
8
+ export default translations;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export default{'zh-cn':{'dictionary':{'Anonymous':'匿名用户','Yes':'确定','No':'取消','Are\x20you\x20sure?':'你确定吗?'},'getPluralForm':_0x4c97bb=>0x0}};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (_0x112bfb=>{const {'zh-cn':{dictionary:_0x1886fa,getPluralForm:_0x59502e}}={'zh-cn':{'dictionary':{'Anonymous':'匿名用户','Yes':'确定','No':'取消','Are\x20you\x20sure?':'你确定吗?'},'getPluralForm':_0x212319=>0x0}};_0x112bfb['zh-cn']||={'dictionary':{},'getPluralForm':null},_0x112bfb['zh-cn']['dictionary']=Object['assign'](_0x112bfb['zh-cn']['dictionary'],_0x1886fa),_0x112bfb['zh-cn']['getPluralForm']=_0x59502e;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -0,0 +1,8 @@
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
+ import type { Translations } from 'ckeditor5';
7
+ declare const translations: Translations;
8
+ export default translations;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export default{'zh':{'dictionary':{'Anonymous':'匿名者','Yes':'好','No':'先不要','Are\x20you\x20sure?':'確定做此操作?'},'getPluralForm':_0x570ce3=>0x0}};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (_0x291632=>{const {zh:{dictionary:_0x896827,getPluralForm:_0x488c5f}}={'zh':{'dictionary':{'Anonymous':'匿名者','Yes':'好','No':'先不要','Are\x20you\x20sure?':'確定做此操作?'},'getPluralForm':_0x290b12=>0x0}};_0x291632['zh']||={'dictionary':{},'getPluralForm':null},_0x291632['zh']['dictionary']=Object['assign'](_0x291632['zh']['dictionary'],_0x896827),_0x291632['zh']['getPluralForm']=_0x488c5f;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -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
+ }
@@ -0,0 +1,23 @@
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
+ export { default as Permissions } from './permissions.js';
10
+ export { default as Users, type User } from './users.js';
11
+ export { default as UserView } from './users/view/userview.js';
12
+ export { default as getDateTimeFormatter } from './utils/getdatetimeformatter.js';
13
+ export { default as getMarkerDomElement, getAllMarkersDomElementsSorted } from './utils/getmarkerdomelement.js';
14
+ export { default as trimHtml } from './utils/trim-html.js';
15
+ export { default as ConfirmMixin } from './utils/confirmmixin.js';
16
+ export { default as hashObject } from './utils/hashobject.js';
17
+ export { default as sanitizeEditorConfig } from './utils/sanitizeEditorConfig.js';
18
+ export { default as surroundingMarkersDetector } from './utils/surroundingmarkersdetector.js';
19
+ export type { default as CollaborationOperation, InsertCollaborationOperation, SplitCollaborationOperation, MarkerCollaborationOperation, MoveCollaborationOperation, MergeCollaborationOperation, RootCollaborationOperation, RootAttributeCollaborationOperation } from './collaborationoperation.js';
20
+ export type { default as CollaborationHistory } from './collaborationhistory.js';
21
+ export type { LocaleConfig, RealTimeCollaborationConfig } from './config.js';
22
+ export * from './suggestionstyles.js';
23
+ import './augmentation.js';
@@ -0,0 +1,50 @@
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/permissions
11
+ * @publicApi
12
+ */
13
+ import { ContextPlugin } from 'ckeditor5/src/core.js';
14
+ /**
15
+ * The `Permissions` plugin manages permissions set for the local user.
16
+ *
17
+ * Following is the list of all defined permissions:
18
+ *
19
+ * * `document:write` - modify the content of the document, and resolve comment threads created by any user,
20
+ * * `comment:write` - create, edit and remove own comments and create, remove own comment threads,
21
+ * and resolve comment threads created by any user,
22
+ * * `comment:admin` - resolve and remove comment threads created by other users (enables `comment:write`).
23
+ * * `comment:modify_all` - edit and remove any comments created by other users.
24
+ *
25
+ * For example, a user with `comment:write` permission but with no `document:write` permission will be able to add
26
+ * comments but will not be able to change the document data (comments-only mode).
27
+ *
28
+ * By default, the following permissions are set: `document:write`, `comment:write`, `comment:admin`.
29
+ *
30
+ * Permissions are handled separately for each channel id (for each editor instance and context instance).
31
+ *
32
+ * See also the {@glink features/collaboration/users#user-permissions User permissions} guide to learn how to use this plugin.
33
+ */
34
+ export default class Permissions extends ContextPlugin {
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ static get pluginName(): "Permissions";
39
+ /**
40
+ * Sets permissions for editor/context instance with given `channelId`.
41
+ *
42
+ * If `channelId` is not set, the channel id of the editor/context to which the plugin was added will be used.
43
+ * This means that it is not required if the plugin is added to the editor configuration and {@link module:core/context~Context}
44
+ * is not used.
45
+ *
46
+ * @param permissions Permissions to set.
47
+ * @param channelId The channel ID.
48
+ */
49
+ setPermissions(permissions: Array<string>, channelId?: string): void;
50
+ }
@@ -0,0 +1,16 @@
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 '../theme/suggestion.css';
10
+ import '../theme/suggestionmarker.css';
11
+ import '../theme/integrations/image.css';
12
+ import '../theme/integrations/horizontalline.css';
13
+ import '../theme/integrations/mediaembed.css';
14
+ import '../theme/integrations/pagebreak.css';
15
+ import '../theme/integrations/table.css';
16
+ import '../theme/integrations/codeblock.css';
@@ -0,0 +1,20 @@
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/users/view/userview
11
+ */
12
+ import { View, type TemplateDefinition } from 'ckeditor5/src/ui.js';
13
+ import type { Locale } from 'ckeditor5/src/utils.js';
14
+ import type { User } from '../../users.js';
15
+ import '../../../theme/users.css';
16
+ export default class UserView extends View {
17
+ name: string;
18
+ notificationView: TemplateDefinition | null;
19
+ constructor(locale: Locale, user: User, notificationText?: null | string);
20
+ }