@ckeditor/ckeditor5-track-changes 48.2.0 → 48.3.0-alpha.1

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 (234) hide show
  1. package/dist/augmentation.d.ts +42 -42
  2. package/dist/commands/acceptsuggestioncommand.d.ts +19 -19
  3. package/dist/commands/discardsuggestioncommand.d.ts +19 -19
  4. package/dist/commands/executeonallsuggestionscommand.d.ts +19 -19
  5. package/dist/commands/executeonselectedsuggestionscommand.d.ts +19 -19
  6. package/dist/commands/previewfinalcontentcommand.d.ts +21 -21
  7. package/dist/commands/trackchangescommand.d.ts +21 -21
  8. package/dist/index.d.ts +23 -23
  9. package/dist/index.js +4 -4
  10. package/dist/integrations/ai.d.ts +12 -12
  11. package/dist/integrations/aiassistant.d.ts +12 -12
  12. package/dist/integrations/aiquickactions.d.ts +12 -12
  13. package/dist/integrations/alignment.d.ts +12 -12
  14. package/dist/integrations/basicstyles.d.ts +12 -12
  15. package/dist/integrations/blockquote.d.ts +12 -12
  16. package/dist/integrations/bookmark.d.ts +12 -12
  17. package/dist/integrations/casechange.d.ts +12 -12
  18. package/dist/integrations/ckbox.d.ts +12 -12
  19. package/dist/integrations/codeblock.d.ts +12 -12
  20. package/dist/integrations/comments.d.ts +9 -9
  21. package/dist/integrations/deletecommand.d.ts +12 -12
  22. package/dist/integrations/emoji.d.ts +12 -12
  23. package/dist/integrations/entercommand.d.ts +11 -11
  24. package/dist/integrations/findandreplace.d.ts +16 -16
  25. package/dist/integrations/font.d.ts +12 -12
  26. package/dist/integrations/footnotes.d.ts +12 -12
  27. package/dist/integrations/formatpainter.d.ts +12 -12
  28. package/dist/integrations/generalhtmlsupport.d.ts +24 -24
  29. package/dist/integrations/heading.d.ts +12 -12
  30. package/dist/integrations/highlight.d.ts +12 -12
  31. package/dist/integrations/horizontalline.d.ts +12 -12
  32. package/dist/integrations/htmlembed.d.ts +12 -12
  33. package/dist/integrations/image.d.ts +12 -12
  34. package/dist/integrations/imagereplace.d.ts +12 -12
  35. package/dist/integrations/imagestyle.d.ts +12 -12
  36. package/dist/integrations/importword.d.ts +13 -13
  37. package/dist/integrations/indent.d.ts +12 -12
  38. package/dist/integrations/inputcommand.d.ts +11 -11
  39. package/dist/integrations/legacylist.d.ts +12 -12
  40. package/dist/integrations/legacylistproperties.d.ts +24 -24
  41. package/dist/integrations/lineheight.d.ts +12 -12
  42. package/dist/integrations/link.d.ts +12 -12
  43. package/dist/integrations/list.d.ts +12 -12
  44. package/dist/integrations/listproperties.d.ts +15 -15
  45. package/dist/integrations/mediaembed.d.ts +12 -12
  46. package/dist/integrations/mediaembedstyle.d.ts +13 -13
  47. package/dist/integrations/mention.d.ts +12 -12
  48. package/dist/integrations/mergefields.d.ts +12 -12
  49. package/dist/integrations/multilevellist.d.ts +19 -19
  50. package/dist/integrations/pagebreak.d.ts +12 -12
  51. package/dist/integrations/paragraph.d.ts +12 -12
  52. package/dist/integrations/removeformat.d.ts +12 -12
  53. package/dist/integrations/replacesourcecommand.d.ts +13 -13
  54. package/dist/integrations/restrictededitingmode.d.ts +12 -12
  55. package/dist/integrations/shiftentercommand.d.ts +9 -9
  56. package/dist/integrations/standardeditingmode.d.ts +12 -12
  57. package/dist/integrations/style.d.ts +29 -29
  58. package/dist/integrations/table.d.ts +34 -34
  59. package/dist/integrations/tablecaption.d.ts +17 -17
  60. package/dist/integrations/tableclipboard.d.ts +15 -15
  61. package/dist/integrations/tablecolumnresize.d.ts +21 -21
  62. package/dist/integrations/tablefooters.d.ts +17 -17
  63. package/dist/integrations/tableheadings.d.ts +17 -17
  64. package/dist/integrations/tablelayout.d.ts +12 -12
  65. package/dist/integrations/tablemergesplit.d.ts +17 -17
  66. package/dist/integrations/tableofcontents.d.ts +12 -12
  67. package/dist/integrations/tableproperties.d.ts +30 -30
  68. package/dist/integrations/template.d.ts +12 -12
  69. package/dist/integrations/title.d.ts +12 -12
  70. package/dist/integrations/undo.d.ts +12 -12
  71. package/dist/integrations/uploadcare.d.ts +12 -12
  72. package/dist/integrations/utils.d.ts +8 -8
  73. package/dist/suggestion.d.ts +285 -283
  74. package/dist/suggestiondescriptionfactory.d.ts +165 -165
  75. package/dist/trackchanges.d.ts +178 -178
  76. package/dist/trackchangesconfig.d.ts +136 -103
  77. package/dist/trackchangesdata.d.ts +59 -59
  78. package/dist/trackchangesediting.d.ts +565 -565
  79. package/dist/trackchangespreview.d.ts +26 -26
  80. package/dist/trackchangesui.d.ts +52 -52
  81. package/dist/translations/af.js +1 -1
  82. package/dist/translations/af.umd.js +1 -1
  83. package/dist/translations/ar.js +1 -1
  84. package/dist/translations/ar.umd.js +1 -1
  85. package/dist/translations/ast.js +1 -1
  86. package/dist/translations/ast.umd.js +1 -1
  87. package/dist/translations/az.js +1 -1
  88. package/dist/translations/az.umd.js +1 -1
  89. package/dist/translations/be.js +1 -1
  90. package/dist/translations/be.umd.js +1 -1
  91. package/dist/translations/bg.js +1 -1
  92. package/dist/translations/bg.umd.js +1 -1
  93. package/dist/translations/bn.js +1 -1
  94. package/dist/translations/bn.umd.js +1 -1
  95. package/dist/translations/bs.js +1 -1
  96. package/dist/translations/bs.umd.js +1 -1
  97. package/dist/translations/ca.js +1 -1
  98. package/dist/translations/ca.umd.js +1 -1
  99. package/dist/translations/cs.js +1 -1
  100. package/dist/translations/cs.umd.js +1 -1
  101. package/dist/translations/da.js +1 -1
  102. package/dist/translations/da.umd.js +1 -1
  103. package/dist/translations/de-ch.js +1 -1
  104. package/dist/translations/de-ch.umd.js +1 -1
  105. package/dist/translations/de.js +1 -1
  106. package/dist/translations/de.umd.js +1 -1
  107. package/dist/translations/el.js +1 -1
  108. package/dist/translations/el.umd.js +1 -1
  109. package/dist/translations/en-au.js +1 -1
  110. package/dist/translations/en-au.umd.js +1 -1
  111. package/dist/translations/en-gb.js +1 -1
  112. package/dist/translations/en-gb.umd.js +1 -1
  113. package/dist/translations/en.js +1 -1
  114. package/dist/translations/en.umd.js +1 -1
  115. package/dist/translations/eo.js +1 -1
  116. package/dist/translations/eo.umd.js +1 -1
  117. package/dist/translations/es-co.js +1 -1
  118. package/dist/translations/es-co.umd.js +1 -1
  119. package/dist/translations/es.js +1 -1
  120. package/dist/translations/es.umd.js +1 -1
  121. package/dist/translations/et.js +1 -1
  122. package/dist/translations/et.umd.js +1 -1
  123. package/dist/translations/eu.js +1 -1
  124. package/dist/translations/eu.umd.js +1 -1
  125. package/dist/translations/fa.js +1 -1
  126. package/dist/translations/fa.umd.js +1 -1
  127. package/dist/translations/fi.js +1 -1
  128. package/dist/translations/fi.umd.js +1 -1
  129. package/dist/translations/fr.js +1 -1
  130. package/dist/translations/fr.umd.js +1 -1
  131. package/dist/translations/gl.js +1 -1
  132. package/dist/translations/gl.umd.js +1 -1
  133. package/dist/translations/gu.js +1 -1
  134. package/dist/translations/gu.umd.js +1 -1
  135. package/dist/translations/he.js +1 -1
  136. package/dist/translations/he.umd.js +1 -1
  137. package/dist/translations/hi.js +1 -1
  138. package/dist/translations/hi.umd.js +1 -1
  139. package/dist/translations/hr.js +1 -1
  140. package/dist/translations/hr.umd.js +1 -1
  141. package/dist/translations/hu.js +1 -1
  142. package/dist/translations/hu.umd.js +1 -1
  143. package/dist/translations/hy.js +1 -1
  144. package/dist/translations/hy.umd.js +1 -1
  145. package/dist/translations/id.js +1 -1
  146. package/dist/translations/id.umd.js +1 -1
  147. package/dist/translations/it.js +1 -1
  148. package/dist/translations/it.umd.js +1 -1
  149. package/dist/translations/ja.js +1 -1
  150. package/dist/translations/ja.umd.js +1 -1
  151. package/dist/translations/jv.js +1 -1
  152. package/dist/translations/jv.umd.js +1 -1
  153. package/dist/translations/kk.js +1 -1
  154. package/dist/translations/kk.umd.js +1 -1
  155. package/dist/translations/km.js +1 -1
  156. package/dist/translations/km.umd.js +1 -1
  157. package/dist/translations/kn.js +1 -1
  158. package/dist/translations/kn.umd.js +1 -1
  159. package/dist/translations/ko.js +1 -1
  160. package/dist/translations/ko.umd.js +1 -1
  161. package/dist/translations/ku.js +1 -1
  162. package/dist/translations/ku.umd.js +1 -1
  163. package/dist/translations/lt.js +1 -1
  164. package/dist/translations/lt.umd.js +1 -1
  165. package/dist/translations/lv.js +1 -1
  166. package/dist/translations/lv.umd.js +1 -1
  167. package/dist/translations/ms.js +1 -1
  168. package/dist/translations/ms.umd.js +1 -1
  169. package/dist/translations/nb.js +1 -1
  170. package/dist/translations/nb.umd.js +1 -1
  171. package/dist/translations/ne.js +1 -1
  172. package/dist/translations/ne.umd.js +1 -1
  173. package/dist/translations/nl.js +1 -1
  174. package/dist/translations/nl.umd.js +1 -1
  175. package/dist/translations/no.js +1 -1
  176. package/dist/translations/no.umd.js +1 -1
  177. package/dist/translations/oc.js +1 -1
  178. package/dist/translations/oc.umd.js +1 -1
  179. package/dist/translations/pl.js +1 -1
  180. package/dist/translations/pl.umd.js +1 -1
  181. package/dist/translations/pt-br.js +1 -1
  182. package/dist/translations/pt-br.umd.js +1 -1
  183. package/dist/translations/pt.js +1 -1
  184. package/dist/translations/pt.umd.js +1 -1
  185. package/dist/translations/ro.js +1 -1
  186. package/dist/translations/ro.umd.js +1 -1
  187. package/dist/translations/ru.js +1 -1
  188. package/dist/translations/ru.umd.js +1 -1
  189. package/dist/translations/si.js +1 -1
  190. package/dist/translations/si.umd.js +1 -1
  191. package/dist/translations/sk.js +1 -1
  192. package/dist/translations/sk.umd.js +1 -1
  193. package/dist/translations/sl.js +1 -1
  194. package/dist/translations/sl.umd.js +1 -1
  195. package/dist/translations/sq.js +1 -1
  196. package/dist/translations/sq.umd.js +1 -1
  197. package/dist/translations/sr-latn.js +1 -1
  198. package/dist/translations/sr-latn.umd.js +1 -1
  199. package/dist/translations/sr.js +1 -1
  200. package/dist/translations/sr.umd.js +1 -1
  201. package/dist/translations/sv.js +1 -1
  202. package/dist/translations/sv.umd.js +1 -1
  203. package/dist/translations/th.js +1 -1
  204. package/dist/translations/th.umd.js +1 -1
  205. package/dist/translations/ti.js +1 -1
  206. package/dist/translations/ti.umd.js +1 -1
  207. package/dist/translations/tk.js +1 -1
  208. package/dist/translations/tk.umd.js +1 -1
  209. package/dist/translations/tr.js +1 -1
  210. package/dist/translations/tr.umd.js +1 -1
  211. package/dist/translations/tt.js +1 -1
  212. package/dist/translations/tt.umd.js +1 -1
  213. package/dist/translations/ug.js +1 -1
  214. package/dist/translations/ug.umd.js +1 -1
  215. package/dist/translations/uk.js +1 -1
  216. package/dist/translations/uk.umd.js +1 -1
  217. package/dist/translations/ur.js +1 -1
  218. package/dist/translations/ur.umd.js +1 -1
  219. package/dist/translations/uz.js +1 -1
  220. package/dist/translations/uz.umd.js +1 -1
  221. package/dist/translations/vi.js +1 -1
  222. package/dist/translations/vi.umd.js +1 -1
  223. package/dist/translations/zh-cn.js +1 -1
  224. package/dist/translations/zh-cn.umd.js +1 -1
  225. package/dist/translations/zh.js +1 -1
  226. package/dist/translations/zh.umd.js +1 -1
  227. package/dist/ui/suggestioncontroller.d.ts +34 -33
  228. package/dist/ui/view/basesuggestionthreadview.d.ts +192 -191
  229. package/dist/ui/view/suggestionthreadview.d.ts +89 -89
  230. package/dist/ui/view/suggestionview.d.ts +219 -183
  231. package/dist/ui/view/trackchangespreviewview.d.ts +0 -4
  232. package/dist/utils/common-translations.d.ts +6 -6
  233. package/dist/utils/utils.d.ts +23 -23
  234. package/package.json +25 -25
@@ -1,205 +1,206 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module track-changes/ui/view/basesuggestionthreadview
7
- * @publicApi
8
- */
9
- import { FocusCycler, View, ViewCollection, type FocusableView } from '@ckeditor/ckeditor5-ui';
10
- import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
11
- import type { EditorConfig } from '@ckeditor/ckeditor5-core';
12
- import { type Suggestion } from '../../suggestion.js';
13
- import type { CommentsListView, CommentThreadInputView, CommentView } from '@ckeditor/ckeditor5-comments';
14
- import { AriaDescriptionView, type User } from '@ckeditor/ckeditor5-collaboration-core';
15
- import type { SuggestionDescription } from '../../suggestiondescriptionfactory.js';
16
- import { type SuggestionView } from './suggestionview.js';
6
+ * @module track-changes/ui/view/basesuggestionthreadview
7
+ * @publicApi
8
+ */
9
+ import { FocusCycler, View, ViewCollection, type FocusableView } from "@ckeditor/ckeditor5-ui";
10
+ import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
11
+ import type { EditorConfig } from "@ckeditor/ckeditor5-core";
12
+ import { type Suggestion } from "../../suggestion.js";
13
+ import type { CommentsListView, CommentThreadInputView, CommentView } from "@ckeditor/ckeditor5-comments";
14
+ import { AriaDescriptionView, type User } from "@ckeditor/ckeditor5-collaboration-core";
15
+ import type { SuggestionDescription } from "../../suggestiondescriptionfactory.js";
16
+ import { type SuggestionView } from "./suggestionview.js";
17
17
  /**
18
- * An abstract suggestion thread view class that should be used as a base for suggestion thread view implementations.
19
- * It provides some behaviors, flags and building blocks to use when creating a custom suggestion thread view class.
20
- *
21
- * All events fired by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}
22
- * are delegated to {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView}.
23
- * This means that {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView} can also fire these
24
- * events to communicate with CKEditor 5 collaboration features.
25
- *
26
- * For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view
27
- * Annotations custom view} guide.
28
- */
18
+ * An abstract suggestion thread view class that should be used as a base for suggestion thread view implementations.
19
+ * It provides some behaviors, flags and building blocks to use when creating a custom suggestion thread view class.
20
+ *
21
+ * All events fired by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}
22
+ * are delegated to {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView}.
23
+ * This means that {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView} can also fire these
24
+ * events to communicate with CKEditor 5 collaboration features.
25
+ *
26
+ * For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view
27
+ * Annotations custom view} guide.
28
+ */
29
29
  export declare abstract class BaseSuggestionThreadView extends View {
30
- /**
31
- * The list of comment views. It should be used as a part of the view template when present.
32
- */
33
- commentsListView: CommentsListView | null;
34
- /**
35
- * The comment input area view. It should be used as a part of the view template when present.
36
- */
37
- commentThreadInputView: CommentThreadInputView | null;
38
- /**
39
- * A helper view that provides an ARIA description for the comment thread used by
40
- * assistive technologies.
41
- */
42
- readonly ariaDescriptionView: AriaDescriptionView;
43
- /**
44
- * A boolean value that informs if the comment thread view is in the active state ("highlighted").
45
- * A comment thread view is in this state when it is focused or was activated by the user in any different way.
46
- *
47
- * @observable
48
- */
49
- isActive: boolean;
50
- /**
51
- * Suggestion creation date.
52
- *
53
- * @observable
54
- */
55
- authoredAt: Date | null;
56
- /**
57
- * Flag that indicates whether suggestion acceptation is possible.
58
- *
59
- * @observable
60
- */
61
- canAccept: boolean;
62
- /**
63
- * Flag that indicates whether suggestion discarding is possible.
64
- *
65
- * @observable
66
- */
67
- canDiscard: boolean;
68
- /**
69
- * Stores description entries generated for this suggestion that describe what is the suggested change.
70
- * They are used to create the final description presented in the suggestion view to the user.
71
- *
72
- * Note that one suggestion may include multiple changes.
73
- *
74
- * Most cases are simple and include just one description item:
75
- *
76
- * ```ts
77
- * [
78
- * { type: 'insertion', content: '*Insert:* "Foo"' }
79
- * ]
80
- * ```
81
- *
82
- * This description item represents a suggestion for inserting the "Foo" text. The `type` property describes the performed action
83
- * while the `content` property contains additional information about the action and is optional.
84
- *
85
- * A more complex example is presented below:
86
- *
87
- * ```ts
88
- * [
89
- * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
90
- * { type: 'insertion', content: '*Insert:* image' },
91
- * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
92
- * ]
93
- * ```
94
- *
95
- * In this example, there are three description instances (or lines). Two new (empty) paragraphs were added,
96
- * an image was added and then "Foo" text was replaced by "Bar". The above structure could be rendered as:
97
- *
98
- * ```html
99
- * <p><strong>Insert:</strong> 2 paragraphs</p>
100
- * <p><strong>Insert:</strong> image</p>
101
- * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
102
- * ```
103
- *
104
- * @observable
105
- */
106
- descriptionParts: Array<SuggestionDescription>;
107
- /**
108
- * Informs whether the suggestion thread has any changes that have not been saved.
109
- *
110
- * @observable
111
- */
112
- isDirty: boolean;
113
- /**
114
- * Informs whether the suggestion can be accepted or discarded.
115
- *
116
- * @observable
117
- */
118
- isEnabled: boolean;
119
- /**
120
- * The number of items in the view, where the suggestion itself counts as one.
121
- *
122
- * In other words, it is equal to the number of comments in the suggestion thread view plus one.
123
- *
124
- * @observable
125
- */
126
- readonly length: number;
127
- /**
128
- * An accessible thread label text exposed to assistive technologies.
129
- */
130
- ariaLabel: string;
131
- /**
132
- * A collection of focusable child views.
133
- */
134
- readonly focusables: ViewCollection<FocusableView>;
135
- /**
136
- * Tracks information about DOM focus in the thread.
137
- */
138
- readonly focusTracker: FocusTracker;
139
- /**
140
- * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
141
- */
142
- readonly keystrokes: KeystrokeHandler;
143
- /**
144
- * Helps cycling over focusable views in the thread.
145
- */
146
- readonly focusCycler: FocusCycler;
147
- constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
148
- /**
149
- * @inheritDoc
150
- */
151
- render(): void;
152
- /**
153
- * Focuses the view.
154
- */
155
- focus(): void;
156
- /**
157
- * @inheritDoc
158
- */
159
- destroy(): void;
30
+ /**
31
+ * The list of comment views. It should be used as a part of the view template when present.
32
+ */
33
+ commentsListView: CommentsListView | null;
34
+ /**
35
+ * The comment input area view. It should be used as a part of the view template when present.
36
+ */
37
+ commentThreadInputView: CommentThreadInputView | null;
38
+ /**
39
+ * A helper view that provides an ARIA description for the comment thread used by
40
+ * assistive technologies.
41
+ */
42
+ readonly ariaDescriptionView: AriaDescriptionView;
43
+ /**
44
+ * A boolean value that informs if the comment thread view is in the active state ("highlighted").
45
+ * A comment thread view is in this state when it is focused or was activated by the user in any different way.
46
+ *
47
+ * @observable
48
+ */
49
+ isActive: boolean;
50
+ /**
51
+ * Suggestion creation date.
52
+ *
53
+ * @observable
54
+ */
55
+ authoredAt: Date | null;
56
+ /**
57
+ * Flag that indicates whether suggestion acceptation is possible.
58
+ *
59
+ * @observable
60
+ */
61
+ canAccept: boolean;
62
+ /**
63
+ * Flag that indicates whether suggestion discarding is possible.
64
+ *
65
+ * @observable
66
+ */
67
+ canDiscard: boolean;
68
+ /**
69
+ * Stores description entries generated for this suggestion that describe what is the suggested change.
70
+ * They are used to create the final description presented in the suggestion view to the user.
71
+ *
72
+ * Note that one suggestion may include multiple changes.
73
+ *
74
+ * Most cases are simple and include just one description item:
75
+ *
76
+ * ```ts
77
+ * [
78
+ * { type: 'insertion', content: '*Insert:* "Foo"' }
79
+ * ]
80
+ * ```
81
+ *
82
+ * This description item represents a suggestion for inserting the "Foo" text. The `type` property describes the performed action
83
+ * while the `content` property contains additional information about the action and is optional.
84
+ *
85
+ * A more complex example is presented below:
86
+ *
87
+ * ```ts
88
+ * [
89
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
90
+ * { type: 'insertion', content: '*Insert:* image' },
91
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
92
+ * ]
93
+ * ```
94
+ *
95
+ * In this example, there are three description instances (or lines). Two new (empty) paragraphs were added,
96
+ * an image was added and then "Foo" text was replaced by "Bar". The above structure could be rendered as:
97
+ *
98
+ * ```html
99
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
100
+ * <p><strong>Insert:</strong> image</p>
101
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
102
+ * ```
103
+ *
104
+ * @observable
105
+ */
106
+ descriptionParts: Array<SuggestionDescription>;
107
+ /**
108
+ * Informs whether the suggestion thread has any changes that have not been saved.
109
+ *
110
+ * @observable
111
+ */
112
+ isDirty: boolean;
113
+ /**
114
+ * Informs whether the suggestion can be accepted or discarded.
115
+ *
116
+ * @observable
117
+ */
118
+ isEnabled: boolean;
119
+ /**
120
+ * The number of items in the view, where the suggestion itself counts as one.
121
+ *
122
+ * In other words, it is equal to the number of comments in the suggestion thread view plus one.
123
+ *
124
+ * @observable
125
+ */
126
+ readonly length: number;
127
+ /**
128
+ * An accessible thread label text exposed to assistive technologies.
129
+ */
130
+ ariaLabel: string;
131
+ /**
132
+ * A collection of focusable child views.
133
+ */
134
+ readonly focusables: ViewCollection<FocusableView>;
135
+ /**
136
+ * Tracks information about DOM focus in the thread.
137
+ */
138
+ readonly focusTracker: FocusTracker;
139
+ /**
140
+ * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
141
+ */
142
+ readonly keystrokes: KeystrokeHandler;
143
+ /**
144
+ * Helps cycling over focusable views in the thread.
145
+ */
146
+ readonly focusCycler: FocusCycler;
147
+ constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
148
+ /**
149
+ * @inheritDoc
150
+ */
151
+ override render(): void;
152
+ /**
153
+ * Focuses the view.
154
+ */
155
+ focus(): void;
156
+ /**
157
+ * @inheritDoc
158
+ */
159
+ override destroy(): void;
160
160
  }
161
161
  /**
162
- * Fired when a user performed an action that should lead to accepting the suggestion.
163
- *
164
- * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
165
- * If you create a view class extending `BaseSuggestionCommentView`, you should provide
166
- * a UI element that will fire this event.
167
- *
168
- * @eventName ~BaseSuggestionThreadView#acceptSuggestion
169
- */
162
+ * Fired when a user performed an action that should lead to accepting the suggestion.
163
+ *
164
+ * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
165
+ * If you create a view class extending `BaseSuggestionCommentView`, you should provide
166
+ * a UI element that will fire this event.
167
+ *
168
+ * @eventName ~BaseSuggestionThreadView#acceptSuggestion
169
+ */
170
170
  export type AcceptSuggestionEvent = {
171
- name: 'acceptSuggestion';
172
- args: [
173
- id: string
174
- ];
171
+ name: "acceptSuggestion";
172
+ args: [id: string];
175
173
  };
176
174
  /**
177
- * Fired when a user performed an action that should lead to discarding the suggestion.
178
- *
179
- * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
180
- * If you create a view class extending `BaseSuggestionCommentView`, you should provide
181
- * a UI element that will fire this event.
182
- *
183
- * @eventName ~BaseSuggestionThreadView#discardSuggestion
184
- */
175
+ * Fired when a user performed an action that should lead to discarding the suggestion.
176
+ *
177
+ * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
178
+ * If you create a view class extending `BaseSuggestionCommentView`, you should provide
179
+ * a UI element that will fire this event.
180
+ *
181
+ * @eventName ~BaseSuggestionThreadView#discardSuggestion
182
+ */
185
183
  export type DiscardSuggestionEvent = {
186
- name: 'discardSuggestion';
187
- args: [
188
- id: string
189
- ];
184
+ name: "discardSuggestion";
185
+ args: [id: string];
190
186
  };
191
187
  /**
192
- * Config used for suggestion thread views.
193
- */
188
+ * Config used for suggestion thread views.
189
+ */
194
190
  export interface SuggestionThreadConfig {
195
- disableComments: boolean;
196
- editorConfig: EditorConfig;
197
- maxCommentsWhenCollapsed: number;
198
- maxThreadTotalWeight: number;
199
- maxCommentCharsWhenCollapsed: number;
200
- formatDateTime: (date: Date | string) => string;
201
- CommentView: typeof CommentView;
202
- CommentsListView: typeof CommentsListView;
203
- CommentThreadInputView: typeof CommentThreadInputView;
204
- SuggestionView: typeof SuggestionView;
191
+ disableComments: boolean;
192
+ editorConfig: EditorConfig;
193
+ maxCommentsWhenCollapsed: number;
194
+ maxThreadTotalWeight: number;
195
+ maxCommentCharsWhenCollapsed: number;
196
+ formatDateTime: (date: Date | string) => string;
197
+ CommentView: typeof CommentView;
198
+ CommentsListView: typeof CommentsListView;
199
+ CommentThreadInputView: typeof CommentThreadInputView;
200
+ SuggestionView: typeof SuggestionView;
201
+ showAISource: "pill" | "author" | null;
202
+ aiAuthor: {
203
+ name: string;
204
+ avatar?: string;
205
+ };
205
206
  }
@@ -1,94 +1,94 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module track-changes/ui/view/suggestionthreadview
7
- * @publicApi
8
- */
9
- import { BaseSuggestionThreadView, type SuggestionThreadConfig } from './basesuggestionthreadview.js';
10
- import { type TemplateDefinition, type ViewWithFocusCycler } from '@ckeditor/ckeditor5-ui';
11
- import { type User } from '@ckeditor/ckeditor5-collaboration-core';
12
- import { type Locale } from '@ckeditor/ckeditor5-utils';
13
- import { type Suggestion } from '../../suggestion.js';
14
- import { type SuggestionView } from './suggestionview.js';
6
+ * @module track-changes/ui/view/suggestionthreadview
7
+ * @publicApi
8
+ */
9
+ import { BaseSuggestionThreadView, type SuggestionThreadConfig } from "./basesuggestionthreadview.js";
10
+ import { type TemplateDefinition, type ViewWithFocusCycler } from "@ckeditor/ckeditor5-ui";
11
+ import { type User } from "@ckeditor/ckeditor5-collaboration-core";
12
+ import { type Locale } from "@ckeditor/ckeditor5-utils";
13
+ import { type Suggestion } from "../../suggestion.js";
14
+ import { type SuggestionView } from "./suggestionview.js";
15
15
  /**
16
- * The default view for a suggestion thread.
17
- *
18
- * This view can be replaced by other view by overwriting the
19
- * {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionThreadView} configuration.
20
- */
16
+ * The default view for a suggestion thread.
17
+ *
18
+ * This view can be replaced by other view by overwriting the
19
+ * {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionThreadView} configuration.
20
+ */
21
21
  export declare class SuggestionThreadView extends BaseSuggestionThreadView implements ViewWithFocusCycler {
22
- /**
23
- * The suggestion thread view type.
24
- *
25
- * This value is not equal to the suggestion (model) type. It is evaluated based on the type of the first suggestion for
26
- * the suggestion thread view template purposes.
27
- *
28
- * @observable
29
- */
30
- type: 'format' | 'replace' | 'deletion' | 'insertion' | '';
31
- /**
32
- * A suggestion description explaining what has been changed. To be presented to the user.
33
- *
34
- * @observable
35
- */
36
- description: string;
37
- /**
38
- * A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
39
- */
40
- suggestionView: SuggestionView;
41
- constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
42
- /**
43
- * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
44
- *
45
- * Overwrite this method if you want to set a custom template for the suggestion thread view.
46
- *
47
- * The template looks as follows:
48
- *
49
- * ```ts
50
- * const bind = this.bindTemplate;
51
- * const suggestionThreadChildren = [
52
- * this.suggestionView
53
- * ];
54
- *
55
- * if ( this.commentsListView ) {
56
- * suggestionThreadChildren.push( this.commentsListView );
57
- * }
58
- *
59
- * if ( this.commentThreadInputView ) {
60
- * suggestionThreadChildren.push( this.commentThreadInputView );
61
- * }
62
- *
63
- * suggestionThreadChildren.push( this.ariaDescriptionView );
64
- *
65
- * return {
66
- * tag: 'div',
67
- * attributes: {
68
- * class: [
69
- * 'ck',
70
- * 'ck-rounded-corners',
71
- * 'ck-suggestion-wrapper',
72
- * bind.if( 'isActive', 'ck-suggestion-wrapper--active' ),
73
- * bind.to( 'type', value => `ck-suggestion-${ value }` ),
74
- * this._config.disableComments && 'ck-suggestion--disabled-comments'
75
- * ],
76
- * 'data-suggestion-id': this._model.id,
77
- * 'data-thread-id': this._model.commentThread!.id,
78
- * 'data-author-id': this._model.author.id,
79
- * // Needed for managing focus after adding new comment.
80
- * tabindex: 0,
81
- * role: 'listitem',
82
- * 'aria-label': bind.to( 'ariaLabel' ),
83
- * 'aria-describedby': this.ariaDescriptionView.id
84
- * },
85
- * children: suggestionThreadChildren
86
- * };
87
- * ```
88
- */
89
- getTemplate(): TemplateDefinition;
90
- /**
91
- * @inheritDoc
92
- */
93
- render(): void;
22
+ /**
23
+ * The suggestion thread view type.
24
+ *
25
+ * This value is not equal to the suggestion (model) type. It is evaluated based on the type of the first suggestion for
26
+ * the suggestion thread view template purposes.
27
+ *
28
+ * @observable
29
+ */
30
+ type: "format" | "replace" | "deletion" | "insertion" | "";
31
+ /**
32
+ * A suggestion description explaining what has been changed. To be presented to the user.
33
+ *
34
+ * @observable
35
+ */
36
+ description: string;
37
+ /**
38
+ * A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
39
+ */
40
+ suggestionView: SuggestionView;
41
+ constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
42
+ /**
43
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
44
+ *
45
+ * Overwrite this method if you want to set a custom template for the suggestion thread view.
46
+ *
47
+ * The template looks as follows:
48
+ *
49
+ * ```ts
50
+ * const bind = this.bindTemplate;
51
+ * const suggestionThreadChildren = [
52
+ * this.suggestionView
53
+ * ];
54
+ *
55
+ * if ( this.commentsListView ) {
56
+ * suggestionThreadChildren.push( this.commentsListView );
57
+ * }
58
+ *
59
+ * if ( this.commentThreadInputView ) {
60
+ * suggestionThreadChildren.push( this.commentThreadInputView );
61
+ * }
62
+ *
63
+ * suggestionThreadChildren.push( this.ariaDescriptionView );
64
+ *
65
+ * return {
66
+ * tag: 'div',
67
+ * attributes: {
68
+ * class: [
69
+ * 'ck',
70
+ * 'ck-rounded-corners',
71
+ * 'ck-suggestion-wrapper',
72
+ * bind.if( 'isActive', 'ck-suggestion-wrapper--active' ),
73
+ * bind.to( 'type', value => `ck-suggestion-${ value }` ),
74
+ * this._config.disableComments && 'ck-suggestion--disabled-comments'
75
+ * ],
76
+ * 'data-suggestion-id': this._model.id,
77
+ * 'data-thread-id': this._model.commentThread!.id,
78
+ * 'data-author-id': this._model.author.id,
79
+ * // Needed for managing focus after adding new comment.
80
+ * tabindex: 0,
81
+ * role: 'listitem',
82
+ * 'aria-label': bind.to( 'ariaLabel' ),
83
+ * 'aria-describedby': this.ariaDescriptionView.id
84
+ * },
85
+ * children: suggestionThreadChildren
86
+ * };
87
+ * ```
88
+ */
89
+ getTemplate(): TemplateDefinition;
90
+ /**
91
+ * @inheritDoc
92
+ */
93
+ override render(): void;
94
94
  }