@ckeditor/ckeditor5-comments 41.3.0-alpha.3 → 41.3.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 (201) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +3 -4
  3. package/src/annotations/annotation.js +1 -1
  4. package/src/annotations/annotationcollection.js +1 -1
  5. package/src/annotations/annotations.js +1 -1
  6. package/src/annotations/annotationsuis.js +1 -1
  7. package/src/annotations/editorannotations.js +1 -1
  8. package/src/annotations/inlineannotations.js +1 -1
  9. package/src/annotations/narrowsidebar.js +1 -1
  10. package/src/annotations/sidebar.js +1 -1
  11. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  12. package/src/annotations/view/annotationview.js +1 -1
  13. package/src/annotations/view/sidebaritemview.js +1 -1
  14. package/src/annotations/view/sidebarview.js +1 -1
  15. package/src/annotations/widesidebar.js +1 -1
  16. package/src/comments/addcommentthreadcommand.js +1 -1
  17. package/src/comments/commentsarchive.js +1 -1
  18. package/src/comments/commentsarchiveui.d.ts +2 -2
  19. package/src/comments/commentsarchiveui.js +1 -1
  20. package/src/comments/commentsediting.js +1 -1
  21. package/src/comments/commentsrepository.js +1 -1
  22. package/src/comments/commentsui.js +1 -1
  23. package/src/comments/integrations/clipboard.js +1 -1
  24. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  25. package/src/comments/integrations/importword.js +1 -1
  26. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  27. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  28. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  29. package/src/comments/ui/commentthreadcontroller.js +1 -1
  30. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  31. package/src/comments/ui/view/basecommentview.js +1 -1
  32. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  33. package/src/comments/ui/view/commentcontentview.js +1 -1
  34. package/src/comments/ui/view/commentinputview.js +1 -1
  35. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  36. package/src/comments/ui/view/commentslistview.js +1 -1
  37. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  38. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  39. package/src/comments/ui/view/commentthreadview.js +1 -1
  40. package/src/comments/ui/view/commentview.js +1 -1
  41. package/src/comments.js +1 -1
  42. package/src/commentsonly.js +1 -1
  43. package/src/index.js +1 -1
  44. package/src/utils/common-translations.js +1 -1
  45. package/src/utils/createmutationobserver.js +1 -1
  46. package/theme/commentsarchive.css +1 -1
  47. package/dist/content-index.css +0 -332
  48. package/dist/editor-index.css +0 -902
  49. package/dist/index.css +0 -1874
  50. package/dist/translations/af.d.ts +0 -8
  51. package/dist/translations/af.js +0 -23
  52. package/dist/translations/ar.d.ts +0 -8
  53. package/dist/translations/ar.js +0 -23
  54. package/dist/translations/bg.d.ts +0 -8
  55. package/dist/translations/bg.js +0 -23
  56. package/dist/translations/bn.d.ts +0 -8
  57. package/dist/translations/bn.js +0 -23
  58. package/dist/translations/bs.d.ts +0 -8
  59. package/dist/translations/bs.js +0 -23
  60. package/dist/translations/ca.d.ts +0 -8
  61. package/dist/translations/ca.js +0 -23
  62. package/dist/translations/cs.d.ts +0 -8
  63. package/dist/translations/cs.js +0 -23
  64. package/dist/translations/da.d.ts +0 -8
  65. package/dist/translations/da.js +0 -23
  66. package/dist/translations/de-ch.d.ts +0 -8
  67. package/dist/translations/de-ch.js +0 -23
  68. package/dist/translations/de.d.ts +0 -8
  69. package/dist/translations/de.js +0 -23
  70. package/dist/translations/el.d.ts +0 -8
  71. package/dist/translations/el.js +0 -23
  72. package/dist/translations/en-au.d.ts +0 -8
  73. package/dist/translations/en-au.js +0 -23
  74. package/dist/translations/en.d.ts +0 -8
  75. package/dist/translations/en.js +0 -23
  76. package/dist/translations/es-co.d.ts +0 -8
  77. package/dist/translations/es-co.js +0 -23
  78. package/dist/translations/es.d.ts +0 -8
  79. package/dist/translations/es.js +0 -23
  80. package/dist/translations/et.d.ts +0 -8
  81. package/dist/translations/et.js +0 -23
  82. package/dist/translations/fa.d.ts +0 -8
  83. package/dist/translations/fa.js +0 -23
  84. package/dist/translations/fi.d.ts +0 -8
  85. package/dist/translations/fi.js +0 -23
  86. package/dist/translations/fr.d.ts +0 -8
  87. package/dist/translations/fr.js +0 -23
  88. package/dist/translations/gl.d.ts +0 -8
  89. package/dist/translations/gl.js +0 -23
  90. package/dist/translations/he.d.ts +0 -8
  91. package/dist/translations/he.js +0 -23
  92. package/dist/translations/hi.d.ts +0 -8
  93. package/dist/translations/hi.js +0 -23
  94. package/dist/translations/hr.d.ts +0 -8
  95. package/dist/translations/hr.js +0 -23
  96. package/dist/translations/hu.d.ts +0 -8
  97. package/dist/translations/hu.js +0 -23
  98. package/dist/translations/id.d.ts +0 -8
  99. package/dist/translations/id.js +0 -23
  100. package/dist/translations/it.d.ts +0 -8
  101. package/dist/translations/it.js +0 -23
  102. package/dist/translations/ja.d.ts +0 -8
  103. package/dist/translations/ja.js +0 -23
  104. package/dist/translations/jv.d.ts +0 -8
  105. package/dist/translations/jv.js +0 -23
  106. package/dist/translations/ko.d.ts +0 -8
  107. package/dist/translations/ko.js +0 -23
  108. package/dist/translations/lt.d.ts +0 -8
  109. package/dist/translations/lt.js +0 -23
  110. package/dist/translations/lv.d.ts +0 -8
  111. package/dist/translations/lv.js +0 -23
  112. package/dist/translations/ms.d.ts +0 -8
  113. package/dist/translations/ms.js +0 -23
  114. package/dist/translations/nl.d.ts +0 -8
  115. package/dist/translations/nl.js +0 -23
  116. package/dist/translations/no.d.ts +0 -8
  117. package/dist/translations/no.js +0 -23
  118. package/dist/translations/pl.d.ts +0 -8
  119. package/dist/translations/pl.js +0 -23
  120. package/dist/translations/pt-br.d.ts +0 -8
  121. package/dist/translations/pt-br.js +0 -23
  122. package/dist/translations/pt.d.ts +0 -8
  123. package/dist/translations/pt.js +0 -23
  124. package/dist/translations/ro.d.ts +0 -8
  125. package/dist/translations/ro.js +0 -23
  126. package/dist/translations/ru.d.ts +0 -8
  127. package/dist/translations/ru.js +0 -23
  128. package/dist/translations/sk.d.ts +0 -8
  129. package/dist/translations/sk.js +0 -23
  130. package/dist/translations/sq.d.ts +0 -8
  131. package/dist/translations/sq.js +0 -23
  132. package/dist/translations/sr-latn.d.ts +0 -8
  133. package/dist/translations/sr-latn.js +0 -23
  134. package/dist/translations/sr.d.ts +0 -8
  135. package/dist/translations/sr.js +0 -23
  136. package/dist/translations/sv.d.ts +0 -8
  137. package/dist/translations/sv.js +0 -23
  138. package/dist/translations/th.d.ts +0 -8
  139. package/dist/translations/th.js +0 -23
  140. package/dist/translations/tk.d.ts +0 -8
  141. package/dist/translations/tk.js +0 -23
  142. package/dist/translations/tr.d.ts +0 -8
  143. package/dist/translations/tr.js +0 -23
  144. package/dist/translations/tt.d.ts +0 -8
  145. package/dist/translations/tt.js +0 -23
  146. package/dist/translations/ug.d.ts +0 -8
  147. package/dist/translations/ug.js +0 -23
  148. package/dist/translations/uk.d.ts +0 -8
  149. package/dist/translations/uk.js +0 -23
  150. package/dist/translations/ur.d.ts +0 -8
  151. package/dist/translations/ur.js +0 -23
  152. package/dist/translations/vi.d.ts +0 -8
  153. package/dist/translations/vi.js +0 -23
  154. package/dist/translations/zh-cn.d.ts +0 -8
  155. package/dist/translations/zh-cn.js +0 -23
  156. package/dist/translations/zh.d.ts +0 -8
  157. package/dist/translations/zh.js +0 -23
  158. package/dist/types/annotations/annotation.d.ts +0 -94
  159. package/dist/types/annotations/annotationcollection.d.ts +0 -102
  160. package/dist/types/annotations/annotations.d.ts +0 -158
  161. package/dist/types/annotations/annotationsuis.d.ts +0 -236
  162. package/dist/types/annotations/editorannotations.d.ts +0 -71
  163. package/dist/types/annotations/inlineannotations.d.ts +0 -94
  164. package/dist/types/annotations/narrowsidebar.d.ts +0 -89
  165. package/dist/types/annotations/sidebar.d.ts +0 -104
  166. package/dist/types/annotations/view/annotationcounterbuttonview.d.ts +0 -33
  167. package/dist/types/annotations/view/annotationview.d.ts +0 -94
  168. package/dist/types/annotations/view/sidebaritemview.d.ts +0 -59
  169. package/dist/types/annotations/view/sidebarview.d.ts +0 -36
  170. package/dist/types/annotations/widesidebar.d.ts +0 -81
  171. package/dist/types/augmentation.d.ts +0 -56
  172. package/dist/types/comments/addcommentthreadcommand.d.ts +0 -39
  173. package/dist/types/comments/commentsarchive.d.ts +0 -35
  174. package/dist/types/comments/commentsarchiveui.d.ts +0 -42
  175. package/dist/types/comments/commentsediting.d.ts +0 -84
  176. package/dist/types/comments/commentsrepository.d.ts +0 -1134
  177. package/dist/types/comments/commentsui.d.ts +0 -37
  178. package/dist/types/comments/integrations/clipboard.d.ts +0 -30
  179. package/dist/types/comments/integrations/commentsrestrictededitingmode.d.ts +0 -21
  180. package/dist/types/comments/integrations/importword.d.ts +0 -25
  181. package/dist/types/comments/ui/commenteditor/commenteditor.d.ts +0 -40
  182. package/dist/types/comments/ui/commenteditor/commenteditorui.d.ts +0 -35
  183. package/dist/types/comments/ui/commenteditor/commenteditoruiview.d.ts +0 -40
  184. package/dist/types/comments/ui/commentthreadcontroller.d.ts +0 -68
  185. package/dist/types/comments/ui/view/basecommentthreadview.d.ts +0 -123
  186. package/dist/types/comments/ui/view/basecommentview.d.ts +0 -116
  187. package/dist/types/comments/ui/view/collapsedcommentsview.d.ts +0 -17
  188. package/dist/types/comments/ui/view/commentcontentview.d.ts +0 -18
  189. package/dist/types/comments/ui/view/commentinputview.d.ts +0 -90
  190. package/dist/types/comments/ui/view/commentsarchiveview.d.ts +0 -42
  191. package/dist/types/comments/ui/view/commentslistview.d.ts +0 -104
  192. package/dist/types/comments/ui/view/commentthreadheaderview.d.ts +0 -54
  193. package/dist/types/comments/ui/view/commentthreadinputview.d.ts +0 -45
  194. package/dist/types/comments/ui/view/commentthreadview.d.ts +0 -122
  195. package/dist/types/comments/ui/view/commentview.d.ts +0 -247
  196. package/dist/types/comments.d.ts +0 -39
  197. package/dist/types/commentsonly.d.ts +0 -37
  198. package/dist/types/config.d.ts +0 -202
  199. package/dist/types/index.d.ts +0 -28
  200. package/dist/types/utils/common-translations.d.ts +0 -13
  201. package/dist/types/utils/createmutationobserver.d.ts +0 -18
@@ -1,202 +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-oss-license
8
- */
9
- /**
10
- * @module comments/config
11
- * @publicApi
12
- */
13
- import type { EditorConfig, PartialBy } from 'ckeditor5/src/core.js';
14
- import type CommentView from './comments/ui/view/commentview.js';
15
- import type BaseCommentThreadView from './comments/ui/view/basecommentthreadview.js';
16
- /**
17
- * The configuration of the comments feature.
18
- *
19
- * ```ts
20
- * ClassicEditor.create( {
21
- * comments: ... // Comments feature configuration.
22
- * } )
23
- * .then( ... )
24
- * .catch( ... );
25
- * ```
26
- *
27
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
28
- */
29
- export interface CommentsConfig {
30
- /**
31
- * Specifies whether comment markers should be preserved on copy-paste and cut-and-paste actions.
32
- *
33
- * The following values are available:
34
- *
35
- * * `'default'` - the comments will be preserved on cut-paste and drag and drop actions only.
36
- * * `'always'` - the markers will be preserved on all clipboard actions (cut, copy, drag and drop).
37
- * * `'never'` - the markers will be ignored by clipboard.
38
- *
39
- * Defaults to `'default'`.
40
- */
41
- copyMarkers?: CommentsClipboardCopyConfig;
42
- /**
43
- * The total number of comments shown when the thread view is collapsed.
44
- *
45
- * The comments are displayed in the following way:
46
- *
47
- * * The first comment is displayed.
48
- * * Some comments may be hidden (collapsed).
49
- * * An appropriate number of the most recent comments is displayed.
50
- *
51
- * For example, if this parameter is set to 3, when collapsed,
52
- * the thread view will display the first comment and two most recent comments.
53
- *
54
- * Defaults to `2`.
55
- */
56
- maxCommentsWhenCollapsed?: number;
57
- /**
58
- * The maximum total weight of a thread before the thread becomes collapsed when it is not active:
59
- *
60
- * * Thread weight is a sum of the weight of its comments.
61
- * * Comment weight is equal to the comment length.
62
- * * The minimal comment weight is 200.
63
- *
64
- * Defaults to `500`.
65
- */
66
- maxThreadTotalWeight?: number;
67
- /**
68
- * The maximum number of characters displayed in a comment when the thread view is collapsed.
69
- * Longer comments will be trimmed.
70
- *
71
- * Defaults to `140`.
72
- */
73
- maxCommentCharsWhenCollapsed?: number;
74
- /**
75
- * A view class to be used to create comment views.
76
- *
77
- * {@link module:comments/comments/ui/view/commentview~CommentView} is used by default when this property is not set.
78
- */
79
- CommentView?: typeof CommentView;
80
- /**
81
- * A view class to be used to create comment thread views
82
- * (used as annotations - in sidebar balloons or in inline annotations).
83
- *
84
- * {@link module:comments/comments/ui/view/commentthreadview~CommentThreadView} is used by default
85
- * when this property is not set.
86
- */
87
- CommentThreadView?: typeof BaseCommentThreadView;
88
- /**
89
- * Configuration for the comments editor.
90
- *
91
- * By using this property, you can customize the editor instance used in the comments
92
- * reply field (e.g. by adding plugins or changing features configuration).
93
- *
94
- * To use the default configuration (allows only for text input, no formatting), you can pass `{}`
95
- * to the comments editor configuration.
96
- *
97
- * ```ts
98
- * ClassicEditor.create( element, {
99
- * comments: {
100
- * editorConfig: {}
101
- * }
102
- * } );
103
- * ```
104
- *
105
- * To provide a better experience, you may add more plugins, that will extend the default editor configuration.
106
- *
107
- * ```ts
108
- * import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
109
- * import List from '@ckeditor/ckeditor5-list/src/list';
110
- * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
111
- * import Italic from '@ckeditor/ckeditor5-italic/src/italic';
112
- *
113
- * ClassicEditor
114
- * .create( {
115
- * comments: {
116
- * editorConfig: {
117
- * extraPlugins: [ Autoformat, Bold, Italic, List ]
118
- * }
119
- * }
120
- * } )
121
- * ```
122
- *
123
- * Importing plugins may not be possible in some scenarios (e.g. when using a build created by the online builder tool).
124
- * In that case, it is possible to get the plugin constructors from the editor builtin plugins.
125
- *
126
- * ```ts
127
- * const extraCommentsPlugins = ClassicEditor.builtinPlugins.filter( plugin => {
128
- * return [ 'Bold', 'Italic', Autoformat, List ].includes( plugin.pluginName );
129
- * } );
130
- *
131
- *
132
- * ClassicEditor
133
- * .create( {
134
- * comments: {
135
- * editorConfig: {
136
- * extraPlugins: extraCommentsPlugins
137
- * }
138
- * }
139
- * } )
140
- * .then( ... )
141
- * .catch( ... );
142
- * ```
143
- */
144
- editorConfig?: EditorConfig;
145
- /**
146
- * A function that takes a `Date` object, formats it to a desired string and returns it.
147
- * It should be used when displaying the comment creation date.
148
- */
149
- formatDateTime?: (date: Date) => string;
150
- }
151
- /**
152
- * The configuration of the sidebar feature.
153
- *
154
- * ```ts
155
- * ClassicEditor
156
- * .create( {
157
- * sidebar: {
158
- * // Sidebar feature configuration.
159
- * }
160
- * } )
161
- * .then( ... )
162
- * .catch( ... );
163
- * ```
164
- *
165
- * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
166
- */
167
- export interface SidebarConfig {
168
- /**
169
- * DOM element into which the sidebar will be inserted.
170
- */
171
- container?: HTMLElement;
172
- /**
173
- * Changes how the annotations are positioned inside the sidebar.
174
- *
175
- * If set to `true`, the top annotation in the sidebar will never be scrolled
176
- * above the top edge of the sidebar (which would make it hidden).
177
- *
178
- * On the other hand, with this setting enabled, if there is not enough space,
179
- * annotations will not be positioned exactly next to their linked elements
180
- * when selected.
181
- *
182
- * @default false
183
- */
184
- preventScrollOutOfView?: boolean;
185
- }
186
- export type CommentThreadConfig = PartialBy<Required<Omit<CommentsConfig, 'CommentThreadView'>>, 'copyMarkers'>;
187
- export type CommentViewConfig = Required<Pick<CommentsConfig, 'maxCommentCharsWhenCollapsed' | 'formatDateTime' | 'editorConfig'>> & {
188
- /**
189
- * Defines whether the comment is created by the system.
190
- */
191
- isSystemComment?: boolean;
192
- };
193
- /**
194
- * Specifies whether comment markers should be preserved on copy-paste and cut-paste actions.
195
- *
196
- * Following values are available:
197
- *
198
- * * `'default'` - the comments will be preserved on cut-paste and drag and drop actions only.
199
- * * `'always'` - the markers will be preserved on all clipboard actions (cut, copy, drag and drop).
200
- * * `'never'` - the markers will be ignored by clipboard.
201
- */
202
- export type CommentsClipboardCopyConfig = 'default' | 'always' | 'never';
@@ -1,28 +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-oss-license
8
- */
9
- export { default as Comments } from './comments.js';
10
- export { default as CommentsOnly } from './commentsonly.js';
11
- export { default as CommentsUI } from './comments/commentsui.js';
12
- export { default as CommentsRepository, CommentThread, Comment, type CommentDataJSON, type CommentThreadContext, type CommentThreadDataJSON } from './comments/commentsrepository.js';
13
- export { default as CommentThreadController } from './comments/ui/commentthreadcontroller.js';
14
- export { default as Annotations } from './annotations/annotations.js';
15
- export { default as AnnotationsUIs } from './annotations/annotationsuis.js';
16
- export { default as EditorAnnotations } from './annotations/editorannotations.js';
17
- export { default as InlineAnnotations } from './annotations/inlineannotations.js';
18
- export { default as WideSidebar } from './annotations/widesidebar.js';
19
- export { default as NarrowSidebar } from './annotations/narrowsidebar.js';
20
- export { default as AnnotationView } from './annotations/view/annotationview.js';
21
- export { default as BaseCommentView } from './comments/ui/view/basecommentview.js';
22
- export { default as BaseCommentThreadView } from './comments/ui/view/basecommentthreadview.js';
23
- export { default as CommentsListView } from './comments/ui/view/commentslistview.js';
24
- export { default as CommentView } from './comments/ui/view/commentview.js';
25
- export { default as CommentThreadInputView } from './comments/ui/view/commentthreadinputview.js';
26
- export type { CommentsConfig, SidebarConfig, CommentsClipboardCopyConfig } from './config.js';
27
- export type { default as CommentsEditing } from './comments/commentsediting.js';
28
- import './augmentation.js';
@@ -1,13 +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-oss-license
8
- */
9
- /**
10
- * @module comments/utils/common-translations
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
@@ -1,18 +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-oss-license
8
- */
9
- /**
10
- * Creates mutation observer to observe changes that might cause height change.
11
- *
12
- * @param callback Callback executed after throttled mutations.
13
- */
14
- export default function createMutationObserver(callback: (...args: Array<any>) => unknown): MutationObserver;
15
- export interface MutationObserver {
16
- attach: (element: Node) => void;
17
- detach: () => void;
18
- }