@ckeditor/ckeditor5-comments 48.2.0-alpha.7 → 48.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotations/annotation.d.ts +84 -87
- package/dist/annotations/annotationcollection.d.ts +83 -83
- package/dist/annotations/annotations.d.ts +148 -148
- package/dist/annotations/annotationsuis.d.ts +235 -235
- package/dist/annotations/editorannotations.d.ts +71 -71
- package/dist/annotations/inlineannotations.d.ts +93 -93
- package/dist/annotations/narrowsidebar.d.ts +88 -88
- package/dist/annotations/sidebar.d.ts +105 -105
- package/dist/annotations/view/annotationcounterbuttonview.d.ts +24 -24
- package/dist/annotations/view/annotationview.d.ts +83 -83
- package/dist/annotations/view/sidebaritemview.d.ts +54 -54
- package/dist/annotations/view/sidebarview.d.ts +48 -48
- package/dist/annotations/widesidebar.d.ts +80 -80
- package/dist/augmentation.d.ts +57 -57
- package/dist/comments/addcommentthreadcommand.d.ts +69 -69
- package/dist/comments/commentsarchive.d.ts +34 -34
- package/dist/comments/commentsarchiveui.d.ts +48 -48
- package/dist/comments/commentsediting.d.ts +90 -90
- package/dist/comments/commentsrepository.d.ts +1042 -1054
- package/dist/comments/commentsui.d.ts +40 -40
- package/dist/comments/integrations/clipboard.d.ts +21 -21
- package/dist/comments/integrations/commentsrestrictededitingmode.d.ts +12 -12
- package/dist/comments/integrations/importword.d.ts +16 -16
- package/dist/comments/integrations/showcommenthighlights.d.ts +14 -14
- package/dist/comments/ui/commenteditor/commenteditor.d.ts +33 -32
- package/dist/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/dist/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- package/dist/comments/ui/commentthreadcontroller.d.ts +62 -60
- package/dist/comments/ui/view/basecommentthreadview.d.ts +134 -134
- package/dist/comments/ui/view/basecommentview.d.ts +136 -136
- package/dist/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/dist/comments/ui/view/commentcontentview.d.ts +10 -10
- package/dist/comments/ui/view/commentinputview.d.ts +93 -93
- package/dist/comments/ui/view/commentsarchiveview.d.ts +41 -41
- package/dist/comments/ui/view/commentslistview.d.ts +107 -107
- package/dist/comments/ui/view/commentthreadheadercontextview.d.ts +19 -19
- package/dist/comments/ui/view/commentthreadheaderview.d.ts +67 -67
- package/dist/comments/ui/view/commentthreadinputview.d.ts +51 -51
- package/dist/comments/ui/view/commentthreadview.d.ts +116 -116
- package/dist/comments/ui/view/commentview.d.ts +225 -230
- package/dist/comments.d.ts +38 -38
- package/dist/commentsonly.d.ts +36 -36
- package/dist/config.d.ts +186 -186
- package/dist/index.d.ts +35 -35
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/createmutationobserver.d.ts +9 -9
- package/dist/utils/splitmarkername.d.ts +10 -10
- package/package.json +16 -16
|
@@ -1,162 +1,162 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { ContextPlugin, Editor, type Context } from
|
|
10
|
-
import type { View } from
|
|
11
|
-
import { type Locale } from
|
|
12
|
-
import { Annotation, type AnnotationTarget } from
|
|
13
|
-
import { AnnotationCollection } from
|
|
14
|
-
import { AnnotationView, type AnnotationMainView } from
|
|
6
|
+
* @module comments/annotations/annotations
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ContextPlugin, Editor, type Context } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import type { View } from "@ckeditor/ckeditor5-ui";
|
|
11
|
+
import { type Locale } from "@ckeditor/ckeditor5-utils";
|
|
12
|
+
import { Annotation, type AnnotationTarget } from "./annotation.js";
|
|
13
|
+
import { AnnotationCollection } from "./annotationcollection.js";
|
|
14
|
+
import { AnnotationView, type AnnotationMainView } from "./view/annotationview.js";
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
* Stores and manages all {@link module:comments/annotations/annotation~Annotation annotations} created
|
|
17
|
+
* for the entire {@link module:core/context~Context} or {@link module:core/editor/editor~Editor}.
|
|
18
|
+
*
|
|
19
|
+
* It allows for {@link module:comments/annotations/annotations~Annotations#add adding} and
|
|
20
|
+
* {@link module:comments/annotations/annotations~Annotations#remove removing} annotations.
|
|
21
|
+
*
|
|
22
|
+
* It manages {@link module:comments/annotations/annotations~Annotations#activate activating} and
|
|
23
|
+
* {@link module:comments/annotations/annotations~Annotations#deactivateAll deactivating} annotations. Using those methods will
|
|
24
|
+
* result in setting {@link module:comments/annotations/annotationsuis~AnnotationUI#activeAnnotation} in the appropriate
|
|
25
|
+
* {@link module:comments/annotations/annotationsuis~AnnotationsUI annotations UI} plugins.
|
|
26
|
+
*
|
|
27
|
+
* All active annotations are stored in {@link module:comments/annotations/annotations~Annotations#activeAnnotations}.
|
|
28
|
+
*
|
|
29
|
+
* `Annotations` is linked with {@link module:comments/annotations/annotationsuis~AnnotationsUIs}, which listens to events fired by
|
|
30
|
+
* `Annotations` and propagates information to and from annotations UI plugins.
|
|
31
|
+
*/
|
|
32
32
|
export declare class Annotations extends ContextPlugin {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
33
|
+
/**
|
|
34
|
+
* A set of currently active annotations.
|
|
35
|
+
*
|
|
36
|
+
* @observable
|
|
37
|
+
*/
|
|
38
|
+
activeAnnotations: Set<Annotation>;
|
|
39
|
+
/**
|
|
40
|
+
* A collection of all annotations. It should not be operated on directly.
|
|
41
|
+
*/
|
|
42
|
+
readonly collection: AnnotationCollection;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
static get pluginName(): "Annotations";
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
static override get isOfficialPlugin(): true;
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
static override get isPremiumPlugin(): true;
|
|
55
|
+
/**
|
|
56
|
+
* @inheritDoc
|
|
57
|
+
*/
|
|
58
|
+
constructor(context: Context | Editor);
|
|
59
|
+
/**
|
|
60
|
+
* Adds an annotation to the collection.
|
|
61
|
+
*/
|
|
62
|
+
add(annotation: Annotation): void;
|
|
63
|
+
/**
|
|
64
|
+
* Removes the given annotation from the collection.
|
|
65
|
+
*/
|
|
66
|
+
remove(annotation: Annotation): void;
|
|
67
|
+
/**
|
|
68
|
+
* Refreshes the visibility of annotations based on the visibility of their annotation targets.
|
|
69
|
+
*
|
|
70
|
+
* This method should be called when one or more annotations' targets changed their visibility,
|
|
71
|
+
* for example when one of the editors was shown or hidden.
|
|
72
|
+
*
|
|
73
|
+
* This method recalculates all annotations' {@link module:comments/annotations/annotation~Annotation#isVisible `isVisible`} property.
|
|
74
|
+
*/
|
|
75
|
+
refreshVisibility(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Refreshes the positioning of all visible annotations and sorts them topmost and leftmost.
|
|
78
|
+
*/
|
|
79
|
+
refreshPositioning(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the annotation that "contains" the given annotation view's inner view.
|
|
82
|
+
*/
|
|
83
|
+
getByInnerView(innerView: View): Annotation | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Deactivates all active annotations.
|
|
86
|
+
*
|
|
87
|
+
* @fires _deactivateAllAnnotations
|
|
88
|
+
*/
|
|
89
|
+
deactivateAll(): void;
|
|
90
|
+
/**
|
|
91
|
+
* @inheritDoc
|
|
92
|
+
*/
|
|
93
|
+
override destroy(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Activates the given annotation.
|
|
96
|
+
*
|
|
97
|
+
* If annotations UI that handles the given annotation already has an active annotation,
|
|
98
|
+
* then it deactivates it and activates the provided one.
|
|
99
|
+
*
|
|
100
|
+
* @fires _activateAnnotation
|
|
101
|
+
*/
|
|
102
|
+
activate(annotation: Annotation): void;
|
|
103
|
+
/**
|
|
104
|
+
* Creates an annotation.
|
|
105
|
+
*
|
|
106
|
+
* ```ts
|
|
107
|
+
* const annotationView = annotations.createAnnotationView( editor.locale, innerView );
|
|
108
|
+
*
|
|
109
|
+
* const annotation = annotations.createAnnotation( {
|
|
110
|
+
* view: annotationView,
|
|
111
|
+
* target: document.getElementById( 'target' ),
|
|
112
|
+
* type: 'comment'
|
|
113
|
+
* } );
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* @returns An annotation.
|
|
117
|
+
*/
|
|
118
|
+
createAnnotation(options: AnnotationOptions): Annotation;
|
|
119
|
+
/**
|
|
120
|
+
* Creates an annotation view wrapper for the annotation content.
|
|
121
|
+
*
|
|
122
|
+
* ```ts
|
|
123
|
+
* const innerView = createCustomView();
|
|
124
|
+
* const annotationView = annotations.createAnnotationView( editor.locale, innerView );
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @returns An annotation view.
|
|
128
|
+
*/
|
|
129
|
+
createAnnotationView(locale: Locale, view: AnnotationMainView): AnnotationView;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
* The configuration options which are used to create new {@link module:comments/annotations/annotation~Annotation annotations}.
|
|
133
|
+
*
|
|
134
|
+
* @param view The annotation view.
|
|
135
|
+
* @param target The annotation target.
|
|
136
|
+
* @param type The annotation type.
|
|
137
|
+
* @param isVisible The initial visibility of the annotation.
|
|
138
|
+
*/
|
|
139
139
|
export interface AnnotationOptions {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
view: AnnotationView;
|
|
141
|
+
target: AnnotationTarget;
|
|
142
|
+
type: string | (() => string);
|
|
143
|
+
isVisible?: boolean;
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
* An internal event that fires when the annotation should be activated.
|
|
147
|
+
*
|
|
148
|
+
* @eventName ~Annotations#_activateAnnotation
|
|
149
|
+
*/
|
|
150
150
|
export type ActivateAnnotationEvent = {
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
name: "_activateAnnotation";
|
|
152
|
+
args: [annotation: Annotation];
|
|
153
153
|
};
|
|
154
154
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
* An internal event that fires when all annotations should be deactivated.
|
|
156
|
+
*
|
|
157
|
+
* @eventName ~Annotations#_deactivateAllAnnotations
|
|
158
|
+
*/
|
|
159
159
|
export type DeactivateAllAnnotationsEvent = {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
name: "_deactivateAllAnnotations";
|
|
161
|
+
args: [];
|
|
162
162
|
};
|