@ckeditor/ckeditor5-emoji 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.
@@ -1,25 +1,25 @@
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
- */
5
- import type { Emoji, EmojiConfig, EmojiMention, EmojiPicker, EmojiRepository, EmojiUtils, EmojiCommand } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the {@link module:emoji/emoji~Emoji} feature.
10
- *
11
- * Read more in {@link module:emoji/emojiconfig~EmojiConfig}.
12
- */
13
- emoji?: EmojiConfig;
14
- }
15
- interface PluginsMap {
16
- [Emoji.pluginName]: Emoji;
17
- [EmojiMention.pluginName]: EmojiMention;
18
- [EmojiPicker.pluginName]: EmojiPicker;
19
- [EmojiRepository.pluginName]: EmojiRepository;
20
- [EmojiUtils.pluginName]: EmojiUtils;
21
- }
22
- interface CommandsMap {
23
- emoji: EmojiCommand;
24
- }
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
+ import type { Emoji, EmojiConfig, EmojiMention, EmojiPicker, EmojiRepository, EmojiUtils, EmojiCommand } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the {@link module:emoji/emoji~Emoji} feature.
10
+ *
11
+ * Read more in {@link module:emoji/emojiconfig~EmojiConfig}.
12
+ */
13
+ emoji?: EmojiConfig;
14
+ }
15
+ interface PluginsMap {
16
+ [Emoji.pluginName]: Emoji;
17
+ [EmojiMention.pluginName]: EmojiMention;
18
+ [EmojiPicker.pluginName]: EmojiPicker;
19
+ [EmojiRepository.pluginName]: EmojiRepository;
20
+ [EmojiUtils.pluginName]: EmojiUtils;
21
+ }
22
+ interface CommandsMap {
23
+ emoji: EmojiCommand;
24
+ }
25
25
  }
package/dist/emoji.d.ts CHANGED
@@ -1,32 +1,32 @@
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 emoji/emoji
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { EmojiMention } from './emojimention.js';
10
- import { EmojiPicker } from './emojipicker.js';
6
+ * @module emoji/emoji
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { EmojiMention } from "./emojimention.js";
10
+ import { EmojiPicker } from "./emojipicker.js";
11
11
  /**
12
- * The emoji plugin.
13
- *
14
- * This is a "glue" plugin which loads the following plugins:
15
- *
16
- * * {@link module:emoji/emojimention~EmojiMention},
17
- * * {@link module:emoji/emojipicker~EmojiPicker},
18
- */
12
+ * The emoji plugin.
13
+ *
14
+ * This is a "glue" plugin which loads the following plugins:
15
+ *
16
+ * * {@link module:emoji/emojimention~EmojiMention},
17
+ * * {@link module:emoji/emojipicker~EmojiPicker},
18
+ */
19
19
  export declare class Emoji extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get requires(): readonly [typeof EmojiMention, typeof EmojiPicker];
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName(): "Emoji";
28
- /**
29
- * @inheritDoc
30
- */
31
- static get isOfficialPlugin(): true;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): PluginDependenciesOf<[EmojiMention, EmojiPicker]>;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "Emoji";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static override get isOfficialPlugin(): true;
32
32
  }
@@ -1,24 +1,26 @@
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 emoji/emojicommand
7
- */
8
- import { Command } from '@ckeditor/ckeditor5-core';
6
+ * @module emoji/emojicommand
7
+ */
8
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * Command that shows the emoji user interface.
11
- */
10
+ * Command that shows the emoji user interface.
11
+ */
12
12
  export declare class EmojiCommand extends Command {
13
- /**
14
- * Updates the command's {@link #isEnabled} based on the current selection.
15
- */
16
- refresh(): void;
17
- /**
18
- * Opens emoji user interface for the current document selection.
19
- *
20
- * @fires execute
21
- * @param [searchValue=''] A default query used to filer the grid when opening the UI.
22
- */
23
- execute(searchValue?: string): void;
13
+ constructor(editor: Editor);
14
+ /**
15
+ * Updates the command's {@link #isEnabled} based on the current selection
16
+ * and whether the emoji repository has been loaded.
17
+ */
18
+ override refresh(): void;
19
+ /**
20
+ * Opens emoji user interface for the current document selection.
21
+ *
22
+ * @fires execute
23
+ * @param [searchValue=''] A default query used to filer the grid when opening the UI.
24
+ */
25
+ override execute(searchValue?: string): void;
24
26
  }
@@ -1,109 +1,109 @@
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 emoji/emojiconfig
7
- */
6
+ * @module emoji/emojiconfig
7
+ */
8
8
  /**
9
- * The configuration of the Emoji feature.
10
- *
11
- * Read more about {@glink features/emoji#configuration configuring the Emoji feature}.
12
- *
13
- * ```ts
14
- * ClassicEditor
15
- * .create( {
16
- * emoji: ... // Emoji feature options.
17
- * } )
18
- * .then( ... )
19
- * .catch( ... );
20
- * ```
21
- *
22
- * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
23
- */
9
+ * The configuration of the Emoji feature.
10
+ *
11
+ * Read more about {@glink features/emoji#configuration configuring the Emoji feature}.
12
+ *
13
+ * ```ts
14
+ * ClassicEditor
15
+ * .create( {
16
+ * emoji: ... // Emoji feature options.
17
+ * } )
18
+ * .then( ... )
19
+ * .catch( ... );
20
+ * ```
21
+ *
22
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
23
+ */
24
24
  export interface EmojiConfig {
25
- /**
26
- * The maximum number of emojis displayed in the dropdown list.
27
- *
28
- * ```ts
29
- * ClassicEditor
30
- * .create( {
31
- * plugins: [ Emoji, ... ],
32
- * emoji: {
33
- * dropdownLimit: 4
34
- * }
35
- * } )
36
- * .then( ... )
37
- * .catch( ... );
38
- * ```
39
- *
40
- * @default 6
41
- */
42
- dropdownLimit?: number;
43
- /**
44
- * Initial skin tone for the emojis that support skin tones.
45
- *
46
- * ```ts
47
- * ClassicEditor
48
- * .create( {
49
- * plugins: [ Emoji, ... ],
50
- * emoji: {
51
- * skinTone: 'medium'
52
- * }
53
- * } )
54
- * .then( ... )
55
- * .catch( ... );
56
- * ```
57
- *
58
- * @default 'default'
59
- */
60
- skinTone?: EmojiSkinToneId;
61
- /**
62
- * The URL from which the emoji definitions should be loaded.
63
- *
64
- * ```ts
65
- * ClassicEditor
66
- * .create( {
67
- * plugins: [ Emoji, ... ],
68
- * emoji: {
69
- * definitionsUrl: ''
70
- * }
71
- * } )
72
- * .then( ... )
73
- * .catch( ... );
74
- * ```
75
- */
76
- definitionsUrl?: string;
77
- /**
78
- * The emoji database version.
79
- *
80
- * ```ts
81
- * ClassicEditor
82
- * .create( {
83
- * plugins: [ Emoji, ... ],
84
- * emoji: {
85
- * version: 15
86
- * }
87
- * } )
88
- * .then( ... )
89
- * .catch( ... );
90
- * ```
91
- *
92
- * If the {@link module:emoji/emojiconfig~EmojiConfig#definitionsUrl `emoji.definitionsUrl`}
93
- * option is provided, `version` is ignored as the defined URL takes precedence over the `version`.
94
- */
95
- version?: EmojiVersion;
96
- /**
97
- * The availability of the emoji depends on the operating system. Different systems will have different Unicode support.
98
- *
99
- * By default, the feature tries to filter out emojis not supported by your operating system.
100
- * This means that instead of previewing an emoji, the feature renders a black square.
101
- *
102
- * If you customize the {@glink features/emoji#emoji-availability-and-appearance emoji availability and appearance}, it is
103
- * highly recommended to disable the filtering mechanism because it uses a font built into your system
104
- * instead of the provided custom font.
105
- */
106
- useCustomFont?: boolean;
25
+ /**
26
+ * The maximum number of emojis displayed in the dropdown list.
27
+ *
28
+ * ```ts
29
+ * ClassicEditor
30
+ * .create( {
31
+ * plugins: [ Emoji, ... ],
32
+ * emoji: {
33
+ * dropdownLimit: 4
34
+ * }
35
+ * } )
36
+ * .then( ... )
37
+ * .catch( ... );
38
+ * ```
39
+ *
40
+ * @default 6
41
+ */
42
+ dropdownLimit?: number;
43
+ /**
44
+ * Initial skin tone for the emojis that support skin tones.
45
+ *
46
+ * ```ts
47
+ * ClassicEditor
48
+ * .create( {
49
+ * plugins: [ Emoji, ... ],
50
+ * emoji: {
51
+ * skinTone: 'medium'
52
+ * }
53
+ * } )
54
+ * .then( ... )
55
+ * .catch( ... );
56
+ * ```
57
+ *
58
+ * @default 'default'
59
+ */
60
+ skinTone?: EmojiSkinToneId;
61
+ /**
62
+ * The URL from which the emoji definitions should be loaded.
63
+ *
64
+ * ```ts
65
+ * ClassicEditor
66
+ * .create( {
67
+ * plugins: [ Emoji, ... ],
68
+ * emoji: {
69
+ * definitionsUrl: ''
70
+ * }
71
+ * } )
72
+ * .then( ... )
73
+ * .catch( ... );
74
+ * ```
75
+ */
76
+ definitionsUrl?: string;
77
+ /**
78
+ * The emoji database version.
79
+ *
80
+ * ```ts
81
+ * ClassicEditor
82
+ * .create( {
83
+ * plugins: [ Emoji, ... ],
84
+ * emoji: {
85
+ * version: 15
86
+ * }
87
+ * } )
88
+ * .then( ... )
89
+ * .catch( ... );
90
+ * ```
91
+ *
92
+ * If the {@link module:emoji/emojiconfig~EmojiConfig#definitionsUrl `emoji.definitionsUrl`}
93
+ * option is provided, `version` is ignored as the defined URL takes precedence over the `version`.
94
+ */
95
+ version?: EmojiVersion;
96
+ /**
97
+ * The availability of the emoji depends on the operating system. Different systems will have different Unicode support.
98
+ *
99
+ * By default, the feature tries to filter out emojis not supported by your operating system.
100
+ * This means that instead of previewing an emoji, the feature renders a black square.
101
+ *
102
+ * If you customize the {@glink features/emoji#emoji-availability-and-appearance emoji availability and appearance}, it is
103
+ * highly recommended to disable the filtering mechanism because it uses a font built into your system
104
+ * instead of the provided custom font.
105
+ */
106
+ useCustomFont?: boolean;
107
107
  }
108
- export type EmojiSkinToneId = 'default' | 'light' | 'medium-light' | 'medium' | 'medium-dark' | 'dark';
108
+ export type EmojiSkinToneId = "default" | "light" | "medium-light" | "medium" | "medium-dark" | "dark";
109
109
  export type EmojiVersion = 15 | 16 | 17;
@@ -1,76 +1,72 @@
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
- */
5
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
6
- import { Typing } from '@ckeditor/ckeditor5-typing';
7
- import { Mention } from '@ckeditor/ckeditor5-mention';
8
- import { EmojiRepository } from './emojirepository.js';
9
- import { type EmojiPicker } from './emojipicker.js';
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
+ import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
6
+ import { Typing } from "@ckeditor/ckeditor5-typing";
7
+ import { Mention } from "@ckeditor/ckeditor5-mention";
8
+ import { EmojiRepository } from "./emojirepository.js";
9
+ import { type EmojiPicker } from "./emojipicker.js";
10
10
  /**
11
- * The emoji mention plugin.
12
- *
13
- * Introduces the autocomplete of emojis while typing.
14
- */
11
+ * The emoji mention plugin.
12
+ *
13
+ * Introduces the autocomplete of emojis while typing.
14
+ */
15
15
  export declare class EmojiMention extends Plugin {
16
- /**
17
- * An instance of the {@link module:emoji/emojipicker~EmojiPicker} plugin if it is loaded in the editor.
18
- */
19
- emojiPickerPlugin: EmojiPicker | null;
20
- /**
21
- * An instance of the {@link module:emoji/emojirepository~EmojiRepository} plugin.
22
- */
23
- emojiRepositoryPlugin: EmojiRepository;
24
- /**
25
- * A flag that informs if the {@link module:emoji/emojirepository~EmojiRepository} plugin is loaded correctly.
26
- */
27
- private _isEmojiRepositoryAvailable;
28
- /**
29
- * Defines a number of displayed items in the auto complete dropdown.
30
- *
31
- * It includes the "Show all emoji..." option if the `EmojiPicker` plugin is loaded.
32
- */
33
- private readonly _emojiDropdownLimit;
34
- /**
35
- * Defines a skin tone that is set in the emoji config.
36
- */
37
- private readonly _skinTone;
38
- /**
39
- * @inheritDoc
40
- */
41
- static get requires(): readonly [typeof EmojiRepository, typeof Typing, typeof Mention];
42
- /**
43
- * @inheritDoc
44
- */
45
- static get pluginName(): "EmojiMention";
46
- /**
47
- * @inheritDoc
48
- */
49
- static get isOfficialPlugin(): true;
50
- /**
51
- * @inheritDoc
52
- */
53
- constructor(editor: Editor);
54
- /**
55
- * Initializes the configuration for emojis in the mention feature.
56
- * If the marker used by emoji mention is already registered, it displays a warning.
57
- * If emoji mention configuration is detected, it does not register it for a second time.
58
- */
59
- private _setupMentionConfiguration;
60
- /**
61
- * @inheritDoc
62
- */
63
- init(): Promise<void>;
64
- /**
65
- * Returns the `itemRenderer()` callback for mention config.
66
- */
67
- private _customItemRendererFactory;
68
- /**
69
- * Overrides the default mention execute listener to insert an emoji as plain text instead.
70
- */
71
- private _overrideMentionExecuteListener;
72
- /**
73
- * Returns the `feed()` callback for mention config.
74
- */
75
- private _queryEmojiCallbackFactory;
16
+ /**
17
+ * An instance of the {@link module:emoji/emojipicker~EmojiPicker} plugin if it is loaded in the editor.
18
+ */
19
+ emojiPickerPlugin: EmojiPicker | null;
20
+ /**
21
+ * An instance of the {@link module:emoji/emojirepository~EmojiRepository} plugin.
22
+ */
23
+ emojiRepositoryPlugin: EmojiRepository;
24
+ /**
25
+ * Defines a number of displayed items in the auto complete dropdown.
26
+ *
27
+ * It includes the "Show all emoji..." option if the `EmojiPicker` plugin is loaded.
28
+ */
29
+ private readonly _emojiDropdownLimit;
30
+ /**
31
+ * Defines a skin tone that is set in the emoji config.
32
+ */
33
+ private readonly _skinTone;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get requires(): PluginDependenciesOf<[EmojiRepository, Typing, Mention]>;
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ static get pluginName(): "EmojiMention";
42
+ /**
43
+ * @inheritDoc
44
+ */
45
+ static override get isOfficialPlugin(): true;
46
+ /**
47
+ * @inheritDoc
48
+ */
49
+ constructor(editor: Editor);
50
+ /**
51
+ * Initializes the configuration for emojis in the mention feature.
52
+ * If the marker used by emoji mention is already registered, it displays a warning.
53
+ * If emoji mention configuration is detected, it does not register it for a second time.
54
+ */
55
+ private _setupMentionConfiguration;
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ init(): void;
60
+ /**
61
+ * Returns the `itemRenderer()` callback for mention config.
62
+ */
63
+ private _customItemRendererFactory;
64
+ /**
65
+ * Overrides the default mention execute listener to insert an emoji as plain text instead.
66
+ */
67
+ private _overrideMentionExecuteListener;
68
+ /**
69
+ * Returns the `feed()` callback for mention config.
70
+ */
71
+ private _queryEmojiCallbackFactory;
76
72
  }