@ckeditor/ckeditor5-mention 37.0.0-alpha.0 → 37.0.0-alpha.2
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/package.json +21 -21
- package/src/augmentation.d.ts +23 -0
- package/src/augmentation.js +5 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +1 -0
- package/src/mention.d.ts +0 -5
- package/src/mentioncommand.d.ts +0 -5
- package/src/mentionconfig.d.ts +3 -13
- package/src/mentionediting.d.ts +0 -5
- package/src/mentionui.d.ts +0 -9
- package/src/mentionui.js +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-mention",
|
|
3
|
-
"version": "37.0.0-alpha.
|
|
3
|
+
"version": "37.0.0-alpha.2",
|
|
4
4
|
"description": "Mention feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,28 +12,28 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^37.0.0-alpha.
|
|
15
|
+
"ckeditor5": "^37.0.0-alpha.2",
|
|
16
16
|
"lodash-es": "^4.17.15"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.
|
|
20
|
-
"@ckeditor/ckeditor5-block-quote": "^37.0.0-alpha.
|
|
21
|
-
"@ckeditor/ckeditor5-clipboard": "^37.0.0-alpha.
|
|
22
|
-
"@ckeditor/ckeditor5-cloud-services": "^37.0.0-alpha.
|
|
23
|
-
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.
|
|
24
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
25
|
-
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-font": "^37.0.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-link": "^37.0.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-table": "^37.0.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-typing": "^37.0.0-alpha.
|
|
33
|
-
"@ckeditor/ckeditor5-ui": "^37.0.0-alpha.
|
|
34
|
-
"@ckeditor/ckeditor5-undo": "^37.0.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-utils": "^37.0.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-widget": "^37.0.0-alpha.
|
|
19
|
+
"@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.2",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^37.0.0-alpha.2",
|
|
21
|
+
"@ckeditor/ckeditor5-clipboard": "^37.0.0-alpha.2",
|
|
22
|
+
"@ckeditor/ckeditor5-cloud-services": "^37.0.0-alpha.2",
|
|
23
|
+
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.2",
|
|
24
|
+
"@ckeditor/ckeditor5-dev-utils": "^35.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.2",
|
|
26
|
+
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.2",
|
|
27
|
+
"@ckeditor/ckeditor5-font": "^37.0.0-alpha.2",
|
|
28
|
+
"@ckeditor/ckeditor5-link": "^37.0.0-alpha.2",
|
|
29
|
+
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.2",
|
|
30
|
+
"@ckeditor/ckeditor5-table": "^37.0.0-alpha.2",
|
|
31
|
+
"@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.2",
|
|
32
|
+
"@ckeditor/ckeditor5-typing": "^37.0.0-alpha.2",
|
|
33
|
+
"@ckeditor/ckeditor5-ui": "^37.0.0-alpha.2",
|
|
34
|
+
"@ckeditor/ckeditor5-undo": "^37.0.0-alpha.2",
|
|
35
|
+
"@ckeditor/ckeditor5-utils": "^37.0.0-alpha.2",
|
|
36
|
+
"@ckeditor/ckeditor5-widget": "^37.0.0-alpha.2",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"typescript": "^4.8.4",
|
|
39
39
|
"webpack": "^5.58.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
],
|
|
64
64
|
"scripts": {
|
|
65
65
|
"dll:build": "webpack",
|
|
66
|
-
"build": "tsc -p ./tsconfig.
|
|
66
|
+
"build": "tsc -p ./tsconfig.json",
|
|
67
67
|
"postversion": "npm run build"
|
|
68
68
|
},
|
|
69
69
|
"types": "src/index.d.ts"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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
|
+
import type { MentionConfig, Mention, MentionEditing, MentionUI, MentionCommand } from './index';
|
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
+
interface EditorConfig {
|
|
8
|
+
/**
|
|
9
|
+
* The configuration of the {@link module:mention/mention~Mention} feature.
|
|
10
|
+
*
|
|
11
|
+
* Read more in {@link module:mention/mentionconfig~MentionConfig}.
|
|
12
|
+
*/
|
|
13
|
+
mention?: MentionConfig;
|
|
14
|
+
}
|
|
15
|
+
interface PluginsMap {
|
|
16
|
+
[Mention.pluginName]: Mention;
|
|
17
|
+
[MentionEditing.pluginName]: MentionEditing;
|
|
18
|
+
[MentionUI.pluginName]: MentionUI;
|
|
19
|
+
}
|
|
20
|
+
interface CommandsMap {
|
|
21
|
+
mention: MentionCommand;
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -8,3 +8,6 @@
|
|
|
8
8
|
export { default as Mention } from './mention';
|
|
9
9
|
export { default as MentionEditing } from './mentionediting';
|
|
10
10
|
export { default as MentionUI } from './mentionui';
|
|
11
|
+
export type { MentionConfig } from './mentionconfig';
|
|
12
|
+
export type { default as MentionCommand } from './mentioncommand';
|
|
13
|
+
import './augmentation';
|
package/src/index.js
CHANGED
package/src/mention.d.ts
CHANGED
package/src/mentioncommand.d.ts
CHANGED
package/src/mentionconfig.d.ts
CHANGED
|
@@ -195,9 +195,9 @@ export interface MentionFeed {
|
|
|
195
195
|
*/
|
|
196
196
|
export type FeedCallback = (searchString: string) => Array<MentionFeedItem> | Promise<Array<MentionFeedItem>>;
|
|
197
197
|
/**
|
|
198
|
-
* Function that takes renders a {@link module:mention/mentionconfig~
|
|
198
|
+
* Function that takes renders a {@link module:mention/mentionconfig~MentionFeedObjectItem} as HTMLElement.
|
|
199
199
|
*/
|
|
200
|
-
export type ItemRenderer = (item:
|
|
200
|
+
export type ItemRenderer = (item: MentionFeedObjectItem) => HTMLElement | string;
|
|
201
201
|
/**
|
|
202
202
|
* The mention feed item. It may be defined as a string or a plain object.
|
|
203
203
|
*
|
|
@@ -261,15 +261,5 @@ export type MentionFeedObjectItem = {
|
|
|
261
261
|
/**
|
|
262
262
|
* Text inserted into the editor when creating a mention.
|
|
263
263
|
*/
|
|
264
|
-
text
|
|
264
|
+
text?: string;
|
|
265
265
|
};
|
|
266
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
267
|
-
interface EditorConfig {
|
|
268
|
-
/**
|
|
269
|
-
* The configuration of the {@link module:mention/mention~Mention} feature.
|
|
270
|
-
*
|
|
271
|
-
* Read more in {@link module:mention/mentionconfig~MentionConfig}.
|
|
272
|
-
*/
|
|
273
|
-
mention?: MentionConfig;
|
|
274
|
-
}
|
|
275
|
-
}
|
package/src/mentionediting.d.ts
CHANGED
|
@@ -38,8 +38,3 @@ export declare function _addMentionAttributes(baseMentionData: MentionAttribute,
|
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export declare function _toMentionAttribute(viewElementOrMention: Element, data?: MentionAttribute): MentionAttribute | undefined;
|
|
41
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
42
|
-
interface PluginsMap {
|
|
43
|
-
[MentionEditing.pluginName]: MentionEditing;
|
|
44
|
-
}
|
|
45
|
-
}
|
package/src/mentionui.d.ts
CHANGED
|
@@ -63,10 +63,6 @@ export default class MentionUI extends Plugin {
|
|
|
63
63
|
private _getItemRenderer;
|
|
64
64
|
/**
|
|
65
65
|
* Requests a feed from a configured callbacks.
|
|
66
|
-
*
|
|
67
|
-
* @fires response
|
|
68
|
-
* @fires discarded
|
|
69
|
-
* @fires error
|
|
70
66
|
*/
|
|
71
67
|
private _requestFeed;
|
|
72
68
|
/**
|
|
@@ -103,8 +99,3 @@ export default class MentionUI extends Plugin {
|
|
|
103
99
|
* Function has to be exported to achieve 100% code coverage.
|
|
104
100
|
*/
|
|
105
101
|
export declare function createRegExp(marker: string, minimumCharacters: number): RegExp;
|
|
106
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
107
|
-
interface PluginsMap {
|
|
108
|
-
[MentionUI.pluginName]: MentionUI;
|
|
109
|
-
}
|
|
110
|
-
}
|
package/src/mentionui.js
CHANGED
|
@@ -195,10 +195,6 @@ export default class MentionUI extends Plugin {
|
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* Requests a feed from a configured callbacks.
|
|
198
|
-
*
|
|
199
|
-
* @fires response
|
|
200
|
-
* @fires discarded
|
|
201
|
-
* @fires error
|
|
202
198
|
*/
|
|
203
199
|
_requestFeed(marker, feedText) {
|
|
204
200
|
// @if CK_DEBUG_MENTION // console.log( '%c[Feed]%c Requesting for', 'color: blue', 'color: black', `"${ feedText }"` );
|