@ckeditor/ckeditor5-emoji 45.2.1 → 46.0.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/build/emoji.js +1 -1
- package/dist/index-editor.css +62 -62
- package/dist/index.css +79 -79
- package/dist/index.css.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/emoji.d.ts +3 -3
- package/src/emoji.js +3 -3
- package/src/emojicommand.d.ts +1 -1
- package/src/emojicommand.js +1 -1
- package/src/emojiconfig.d.ts +2 -2
- package/src/emojimention.d.ts +3 -3
- package/src/emojimention.js +2 -2
- package/src/emojipicker.d.ts +6 -6
- package/src/emojipicker.js +5 -5
- package/src/emojirepository.d.ts +7 -7
- package/src/emojirepository.js +2 -2
- package/src/emojiutils.d.ts +1 -1
- package/src/emojiutils.js +2 -2
- package/src/index.d.ts +14 -7
- package/src/index.js +13 -6
- package/src/ui/emojicategoriesview.d.ts +1 -1
- package/src/ui/emojicategoriesview.js +1 -1
- package/src/ui/emojigridview.d.ts +4 -4
- package/src/ui/emojigridview.js +1 -1
- package/src/ui/emojipickerformview.d.ts +1 -1
- package/src/ui/emojipickerformview.js +1 -1
- package/src/ui/emojipickerview.d.ts +9 -9
- package/src/ui/emojipickerview.js +5 -5
- package/src/ui/emojisearchview.d.ts +2 -2
- package/src/ui/emojisearchview.js +1 -1
- package/src/ui/emojitoneview.d.ts +6 -6
- package/src/ui/emojitoneview.js +3 -3
- package/src/utils/isemojisupported.d.ts +3 -1
- package/src/utils/isemojisupported.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-emoji",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "46.0.0-alpha.0",
|
|
4
4
|
"description": "Emoji feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "
|
|
17
|
-
"@ckeditor/ckeditor5-icons": "
|
|
18
|
-
"@ckeditor/ckeditor5-mention": "
|
|
19
|
-
"@ckeditor/ckeditor5-typing": "
|
|
20
|
-
"@ckeditor/ckeditor5-ui": "
|
|
21
|
-
"@ckeditor/ckeditor5-utils": "
|
|
22
|
-
"ckeditor5": "
|
|
16
|
+
"@ckeditor/ckeditor5-core": "46.0.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-icons": "46.0.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-mention": "46.0.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-typing": "46.0.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-ui": "46.0.0-alpha.0",
|
|
21
|
+
"@ckeditor/ckeditor5-utils": "46.0.0-alpha.0",
|
|
22
|
+
"ckeditor5": "46.0.0-alpha.0",
|
|
23
23
|
"fuzzysort": "3.1.0",
|
|
24
|
-
"es-toolkit": "1.
|
|
24
|
+
"es-toolkit": "1.39.5"
|
|
25
25
|
},
|
|
26
26
|
"author": "CKSource (http://cksource.com/)",
|
|
27
27
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/emoji.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module emoji/emoji
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import EmojiMention from './emojimention.js';
|
|
10
|
-
import EmojiPicker from './emojipicker.js';
|
|
9
|
+
import { EmojiMention } from './emojimention.js';
|
|
10
|
+
import { EmojiPicker } from './emojipicker.js';
|
|
11
11
|
/**
|
|
12
12
|
* The emoji plugin.
|
|
13
13
|
*
|
|
@@ -16,7 +16,7 @@ import EmojiPicker from './emojipicker.js';
|
|
|
16
16
|
* * {@link module:emoji/emojimention~EmojiMention},
|
|
17
17
|
* * {@link module:emoji/emojipicker~EmojiPicker},
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export declare class Emoji extends Plugin {
|
|
20
20
|
/**
|
|
21
21
|
* @inheritDoc
|
|
22
22
|
*/
|
package/src/emoji.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module emoji/emoji
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import EmojiMention from './emojimention.js';
|
|
10
|
-
import EmojiPicker from './emojipicker.js';
|
|
9
|
+
import { EmojiMention } from './emojimention.js';
|
|
10
|
+
import { EmojiPicker } from './emojipicker.js';
|
|
11
11
|
/**
|
|
12
12
|
* The emoji plugin.
|
|
13
13
|
*
|
|
@@ -16,7 +16,7 @@ import EmojiPicker from './emojipicker.js';
|
|
|
16
16
|
* * {@link module:emoji/emojimention~EmojiMention},
|
|
17
17
|
* * {@link module:emoji/emojipicker~EmojiPicker},
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export class Emoji extends Plugin {
|
|
20
20
|
/**
|
|
21
21
|
* @inheritDoc
|
|
22
22
|
*/
|
package/src/emojicommand.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* Command that shows the emoji user interface.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export declare class EmojiCommand extends Command {
|
|
13
13
|
/**
|
|
14
14
|
* Updates the command's {@link #isEnabled} based on the current selection.
|
|
15
15
|
*/
|
package/src/emojicommand.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* Command that shows the emoji user interface.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export class EmojiCommand extends Command {
|
|
13
13
|
/**
|
|
14
14
|
* Updates the command's {@link #isEnabled} based on the current selection.
|
|
15
15
|
*/
|
package/src/emojiconfig.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface EmojiConfig {
|
|
|
57
57
|
*
|
|
58
58
|
* @default 'default'
|
|
59
59
|
*/
|
|
60
|
-
skinTone?:
|
|
60
|
+
skinTone?: EmojiSkinToneId;
|
|
61
61
|
/**
|
|
62
62
|
* The URL from which the emoji definitions should be loaded.
|
|
63
63
|
*
|
|
@@ -105,5 +105,5 @@ export interface EmojiConfig {
|
|
|
105
105
|
*/
|
|
106
106
|
useCustomFont?: boolean;
|
|
107
107
|
}
|
|
108
|
-
export type
|
|
108
|
+
export type EmojiSkinToneId = 'default' | 'light' | 'medium-light' | 'medium' | 'medium-dark' | 'dark';
|
|
109
109
|
export type EmojiVersion = 15 | 16;
|
package/src/emojimention.d.ts
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
6
|
import { Typing } from 'ckeditor5/src/typing.js';
|
|
7
|
-
import EmojiRepository from './emojirepository.js';
|
|
8
|
-
import type EmojiPicker from './emojipicker.js';
|
|
7
|
+
import { EmojiRepository } from './emojirepository.js';
|
|
8
|
+
import { type EmojiPicker } from './emojipicker.js';
|
|
9
9
|
/**
|
|
10
10
|
* The emoji mention plugin.
|
|
11
11
|
*
|
|
12
12
|
* Introduces the autocomplete of emojis while typing.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export declare class EmojiMention extends Plugin {
|
|
15
15
|
/**
|
|
16
16
|
* An instance of the {@link module:emoji/emojipicker~EmojiPicker} plugin if it is loaded in the editor.
|
|
17
17
|
*/
|
package/src/emojimention.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { logWarning } from 'ckeditor5/src/utils.js';
|
|
9
9
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
10
|
import { Typing } from 'ckeditor5/src/typing.js';
|
|
11
|
-
import EmojiRepository from './emojirepository.js';
|
|
11
|
+
import { EmojiRepository } from './emojirepository.js';
|
|
12
12
|
const EMOJI_MENTION_MARKER = ':';
|
|
13
13
|
const EMOJI_SHOW_ALL_OPTION_ID = ':__EMOJI_SHOW_ALL:';
|
|
14
14
|
const EMOJI_HINT_OPTION_ID = ':__EMOJI_HINT:';
|
|
@@ -17,7 +17,7 @@ const EMOJI_HINT_OPTION_ID = ':__EMOJI_HINT:';
|
|
|
17
17
|
*
|
|
18
18
|
* Introduces the autocomplete of emojis while typing.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export class EmojiMention extends Plugin {
|
|
21
21
|
/**
|
|
22
22
|
* Defines a number of displayed items in the auto complete dropdown.
|
|
23
23
|
*
|
package/src/emojipicker.d.ts
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
import { ContextualBalloon, Dialog } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
10
|
import { Typing } from 'ckeditor5/src/typing.js';
|
|
11
|
-
import EmojiRepository from './emojirepository.js';
|
|
12
|
-
import EmojiPickerView from './ui/emojipickerview.js';
|
|
13
|
-
import EmojiPickerFormView from './ui/emojipickerformview.js';
|
|
14
|
-
import type {
|
|
11
|
+
import { EmojiRepository } from './emojirepository.js';
|
|
12
|
+
import { EmojiPickerView } from './ui/emojipickerview.js';
|
|
13
|
+
import { EmojiPickerFormView } from './ui/emojipickerformview.js';
|
|
14
|
+
import type { EmojiSkinToneId } from './emojiconfig.js';
|
|
15
15
|
import '../theme/emojipicker.css';
|
|
16
16
|
/**
|
|
17
17
|
* The emoji picker plugin.
|
|
18
18
|
*
|
|
19
19
|
* Introduces the `'emoji'` dropdown.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export declare class EmojiPicker extends Plugin {
|
|
22
22
|
/**
|
|
23
23
|
* The actions view displayed inside the balloon.
|
|
24
24
|
*/
|
|
@@ -61,7 +61,7 @@ export default class EmojiPicker extends Plugin {
|
|
|
61
61
|
* Before opening the UI for the first time, the returned value is read from the editor configuration.
|
|
62
62
|
* Otherwise, it reflects the user's intention.
|
|
63
63
|
*/
|
|
64
|
-
get skinTone():
|
|
64
|
+
get skinTone(): EmojiSkinToneId;
|
|
65
65
|
/**
|
|
66
66
|
* Displays the balloon with the emoji picker.
|
|
67
67
|
*
|
package/src/emojipicker.js
CHANGED
|
@@ -9,10 +9,10 @@ import { ButtonView, clickOutsideHandler, ContextualBalloon, Dialog, MenuBarMenu
|
|
|
9
9
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
10
|
import { Typing } from 'ckeditor5/src/typing.js';
|
|
11
11
|
import { IconEmoji } from 'ckeditor5/src/icons.js';
|
|
12
|
-
import EmojiCommand from './emojicommand.js';
|
|
13
|
-
import EmojiRepository from './emojirepository.js';
|
|
14
|
-
import EmojiPickerView from './ui/emojipickerview.js';
|
|
15
|
-
import EmojiPickerFormView from './ui/emojipickerformview.js';
|
|
12
|
+
import { EmojiCommand } from './emojicommand.js';
|
|
13
|
+
import { EmojiRepository } from './emojirepository.js';
|
|
14
|
+
import { EmojiPickerView } from './ui/emojipickerview.js';
|
|
15
|
+
import { EmojiPickerFormView } from './ui/emojipickerformview.js';
|
|
16
16
|
import '../theme/emojipicker.css';
|
|
17
17
|
const VISUAL_SELECTION_MARKER_NAME = 'emoji-picker';
|
|
18
18
|
/**
|
|
@@ -20,7 +20,7 @@ const VISUAL_SELECTION_MARKER_NAME = 'emoji-picker';
|
|
|
20
20
|
*
|
|
21
21
|
* Introduces the `'emoji'` dropdown.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export class EmojiPicker extends Plugin {
|
|
24
24
|
/**
|
|
25
25
|
* @inheritDoc
|
|
26
26
|
*/
|
package/src/emojirepository.d.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
-
import EmojiUtils from './emojiutils.js';
|
|
7
|
-
import type {
|
|
6
|
+
import { EmojiUtils } from './emojiutils.js';
|
|
7
|
+
import type { EmojiSkinToneId } from './emojiconfig.js';
|
|
8
8
|
/**
|
|
9
9
|
* The emoji repository plugin.
|
|
10
10
|
*
|
|
11
11
|
* Loads the emoji repository from URL during plugin initialization and provides utility methods to search it.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export declare class EmojiRepository extends Plugin {
|
|
14
14
|
/**
|
|
15
15
|
* A callback to resolve the {@link #_repositoryPromise} to control the return value of this promise.
|
|
16
16
|
*/
|
|
@@ -66,7 +66,7 @@ export default class EmojiRepository extends Plugin {
|
|
|
66
66
|
/**
|
|
67
67
|
* Returns an array of available skin tones.
|
|
68
68
|
*/
|
|
69
|
-
getSkinTones(): Array<
|
|
69
|
+
getSkinTones(): Array<EmojiSkinTone>;
|
|
70
70
|
/**
|
|
71
71
|
* Indicates whether the emoji repository has been successfully downloaded and the plugin is operational.
|
|
72
72
|
*/
|
|
@@ -154,15 +154,15 @@ export type EmojiEntry = Omit<EmojiCdnResource, 'skins'> & {
|
|
|
154
154
|
* The `default` key is always present. Additional values are assigned only if an emoji supports skin tones.
|
|
155
155
|
*/
|
|
156
156
|
export type EmojiMap = {
|
|
157
|
-
[K in Exclude<
|
|
157
|
+
[K in Exclude<EmojiSkinToneId, 'default'>]?: string;
|
|
158
158
|
} & {
|
|
159
159
|
default: string;
|
|
160
160
|
};
|
|
161
161
|
/**
|
|
162
162
|
* Represents an emoji skin tone variant.
|
|
163
163
|
*/
|
|
164
|
-
export type
|
|
165
|
-
id:
|
|
164
|
+
export type EmojiSkinTone = {
|
|
165
|
+
id: EmojiSkinToneId;
|
|
166
166
|
icon: string;
|
|
167
167
|
tooltip: string;
|
|
168
168
|
};
|
package/src/emojirepository.js
CHANGED
|
@@ -9,7 +9,7 @@ import fuzzysort from 'fuzzysort';
|
|
|
9
9
|
import { groupBy } from 'es-toolkit/compat';
|
|
10
10
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
11
11
|
import { logWarning, version as editorVersion } from 'ckeditor5/src/utils.js';
|
|
12
|
-
import EmojiUtils from './emojiutils.js';
|
|
12
|
+
import { EmojiUtils } from './emojiutils.js';
|
|
13
13
|
// An endpoint from which the emoji data will be downloaded during plugin initialization.
|
|
14
14
|
// The `{version}` placeholder is replaced with the value from editor config.
|
|
15
15
|
const DEFAULT_EMOJI_DATABASE_URL = 'https://cdn.ckeditor.com/ckeditor5/data/emoji/{version}/en.json';
|
|
@@ -295,7 +295,7 @@ class EmojiRepository extends Plugin {
|
|
|
295
295
|
*/
|
|
296
296
|
static _results = {};
|
|
297
297
|
}
|
|
298
|
-
export
|
|
298
|
+
export { EmojiRepository };
|
|
299
299
|
/**
|
|
300
300
|
* Unable to load the emoji repository from the URL.
|
|
301
301
|
*
|
package/src/emojiutils.d.ts
CHANGED
package/src/emojiutils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
-
import isEmojiSupported from './utils/isemojisupported.js';
|
|
6
|
+
import { isEmojiSupported } from './utils/isemojisupported.js';
|
|
7
7
|
/**
|
|
8
8
|
* @module emoji/emojiutils
|
|
9
9
|
*/
|
|
@@ -149,4 +149,4 @@ class EmojiUtils extends Plugin {
|
|
|
149
149
|
*/
|
|
150
150
|
static _isEmojiSupported = isEmojiSupported;
|
|
151
151
|
}
|
|
152
|
-
export
|
|
152
|
+
export { EmojiUtils };
|
package/src/index.d.ts
CHANGED
|
@@ -5,11 +5,18 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module emoji
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export type { EmojiConfig } from './emojiconfig.js';
|
|
8
|
+
export { Emoji } from './emoji.js';
|
|
9
|
+
export { EmojiMention } from './emojimention.js';
|
|
10
|
+
export { EmojiPicker } from './emojipicker.js';
|
|
11
|
+
export { EmojiRepository, type EmojiCategory, type EmojiCdnResource, type EmojiEntry, type EmojiMap, type EmojiSkinTone } from './emojirepository.js';
|
|
12
|
+
export { EmojiUtils } from './emojiutils.js';
|
|
13
|
+
export { EmojiCommand } from './emojicommand.js';
|
|
14
|
+
export type { EmojiConfig, EmojiSkinToneId, EmojiVersion } from './emojiconfig.js';
|
|
15
|
+
export { EmojiCategoriesView } from './ui/emojicategoriesview.js';
|
|
16
|
+
export { EmojiGridView, type EmojiGridViewEventData, type EmojiGridViewExecuteEvent, type EmojiSearchQueryCallback } from './ui/emojigridview.js';
|
|
17
|
+
export { EmojiPickerFormView, type EmojiPickerFormViewCancelEvent } from './ui/emojipickerformview.js';
|
|
18
|
+
export { EmojiPickerView, type EmojiPickerViewUpdateEvent } from './ui/emojipickerview.js';
|
|
19
|
+
export { EmojiSearchView } from './ui/emojisearchview.js';
|
|
20
|
+
export { EmojiToneView } from './ui/emojitoneview.js';
|
|
21
|
+
export { isEmojiSupported as _isEmojiSupported } from './utils/isemojisupported.js';
|
|
15
22
|
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module emoji
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
8
|
+
export { Emoji } from './emoji.js';
|
|
9
|
+
export { EmojiMention } from './emojimention.js';
|
|
10
|
+
export { EmojiPicker } from './emojipicker.js';
|
|
11
|
+
export { EmojiRepository } from './emojirepository.js';
|
|
12
|
+
export { EmojiUtils } from './emojiutils.js';
|
|
13
|
+
export { EmojiCommand } from './emojicommand.js';
|
|
14
|
+
export { EmojiCategoriesView } from './ui/emojicategoriesview.js';
|
|
15
|
+
export { EmojiGridView } from './ui/emojigridview.js';
|
|
16
|
+
export { EmojiPickerFormView } from './ui/emojipickerformview.js';
|
|
17
|
+
export { EmojiPickerView } from './ui/emojipickerview.js';
|
|
18
|
+
export { EmojiSearchView } from './ui/emojisearchview.js';
|
|
19
|
+
export { EmojiToneView } from './ui/emojitoneview.js';
|
|
20
|
+
export { isEmojiSupported as _isEmojiSupported } from './utils/isemojisupported.js';
|
|
14
21
|
import './augmentation.js';
|
|
@@ -13,7 +13,7 @@ import '../../theme/emojicategories.css';
|
|
|
13
13
|
* A class representing the navigation part of the emoji UI.
|
|
14
14
|
* It is responsible allowing the user to select a particular emoji category.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare class EmojiCategoriesView extends View {
|
|
17
17
|
/**
|
|
18
18
|
* Currently selected emoji category name.
|
|
19
19
|
*/
|
|
@@ -12,7 +12,7 @@ import '../../theme/emojicategories.css';
|
|
|
12
12
|
* A class representing the navigation part of the emoji UI.
|
|
13
13
|
* It is responsible allowing the user to select a particular emoji category.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export class EmojiCategoriesView extends View {
|
|
16
16
|
/**
|
|
17
17
|
* Tracks information about the DOM focus in the grid.
|
|
18
18
|
*/
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import { ButtonView, type FilteredView, View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
10
10
|
import type { EmojiCategory, EmojiEntry } from '../emojirepository.js';
|
|
11
|
-
import type {
|
|
11
|
+
import type { EmojiSkinToneId } from '../emojiconfig.js';
|
|
12
12
|
import '../../theme/emojigrid.css';
|
|
13
13
|
/**
|
|
14
14
|
* A grid of emoji tiles. It allows browsing emojis and selecting them to be inserted into the content.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare class EmojiGridView extends View<HTMLDivElement> implements FilteredView {
|
|
17
17
|
/**
|
|
18
18
|
* Defines the active category name.
|
|
19
19
|
*
|
|
@@ -25,7 +25,7 @@ export default class EmojiGridView extends View<HTMLDivElement> implements Filte
|
|
|
25
25
|
*
|
|
26
26
|
* @observable
|
|
27
27
|
*/
|
|
28
|
-
skinTone:
|
|
28
|
+
skinTone: EmojiSkinToneId;
|
|
29
29
|
/**
|
|
30
30
|
* Set to `true` when the {@link #tiles} collection does not contain items to display.
|
|
31
31
|
*
|
|
@@ -65,7 +65,7 @@ export default class EmojiGridView extends View<HTMLDivElement> implements Filte
|
|
|
65
65
|
categoryName: string;
|
|
66
66
|
emojiCategories: Array<EmojiCategory>;
|
|
67
67
|
getEmojiByQuery: EmojiSearchQueryCallback;
|
|
68
|
-
skinTone:
|
|
68
|
+
skinTone: EmojiSkinToneId;
|
|
69
69
|
});
|
|
70
70
|
/**
|
|
71
71
|
* @inheritDoc
|
package/src/ui/emojigridview.js
CHANGED
|
@@ -11,7 +11,7 @@ import '../../theme/emojigrid.css';
|
|
|
11
11
|
/**
|
|
12
12
|
* A grid of emoji tiles. It allows browsing emojis and selecting them to be inserted into the content.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export class EmojiGridView extends View {
|
|
15
15
|
/**
|
|
16
16
|
* A collection of the child tile views. Each tile represents a particular emoji.
|
|
17
17
|
*/
|
|
@@ -13,7 +13,7 @@ import '../../theme/emojipickerform.css';
|
|
|
13
13
|
/**
|
|
14
14
|
* The emoji picker form view.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare class EmojiPickerFormView extends View {
|
|
17
17
|
/**
|
|
18
18
|
* The Back button view displayed in the header.
|
|
19
19
|
*/
|
|
@@ -17,7 +17,7 @@ import '../../theme/emojipickerform.css';
|
|
|
17
17
|
/**
|
|
18
18
|
* The emoji picker form view.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export class EmojiPickerFormView extends View {
|
|
21
21
|
/**
|
|
22
22
|
* The Back button view displayed in the header.
|
|
23
23
|
*/
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { FocusCycler, SearchInfoView, View, type FocusableView, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
-
import EmojiGridView,
|
|
11
|
-
import EmojiCategoriesView from './emojicategoriesview.js';
|
|
12
|
-
import EmojiSearchView from './emojisearchview.js';
|
|
13
|
-
import EmojiToneView from './emojitoneview.js';
|
|
14
|
-
import type {
|
|
15
|
-
import type { EmojiCategory,
|
|
10
|
+
import { EmojiGridView, type EmojiSearchQueryCallback } from './emojigridview.js';
|
|
11
|
+
import { EmojiCategoriesView } from './emojicategoriesview.js';
|
|
12
|
+
import { EmojiSearchView } from './emojisearchview.js';
|
|
13
|
+
import { EmojiToneView } from './emojitoneview.js';
|
|
14
|
+
import type { EmojiSkinToneId } from '../emojiconfig.js';
|
|
15
|
+
import type { EmojiCategory, EmojiSkinTone } from '../emojirepository.js';
|
|
16
16
|
/**
|
|
17
17
|
* A view that glues pieces of the emoji panel together.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export declare class EmojiPickerView extends View<HTMLDivElement> {
|
|
20
20
|
/**
|
|
21
21
|
* A collection of the focusable children of the view.
|
|
22
22
|
*/
|
|
@@ -59,8 +59,8 @@ export default class EmojiPickerView extends View<HTMLDivElement> {
|
|
|
59
59
|
constructor(locale: Locale, { emojiCategories, getEmojiByQuery, skinTone, skinTones }: {
|
|
60
60
|
emojiCategories: Array<EmojiCategory>;
|
|
61
61
|
getEmojiByQuery: EmojiSearchQueryCallback;
|
|
62
|
-
skinTone:
|
|
63
|
-
skinTones: Array<
|
|
62
|
+
skinTone: EmojiSkinToneId;
|
|
63
|
+
skinTones: Array<EmojiSkinTone>;
|
|
64
64
|
});
|
|
65
65
|
/**
|
|
66
66
|
* @inheritDoc
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { FocusCycler, SearchInfoView, View } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';
|
|
10
|
-
import EmojiGridView from './emojigridview.js';
|
|
11
|
-
import EmojiCategoriesView from './emojicategoriesview.js';
|
|
12
|
-
import EmojiSearchView from './emojisearchview.js';
|
|
13
|
-
import EmojiToneView from './emojitoneview.js';
|
|
10
|
+
import { EmojiGridView } from './emojigridview.js';
|
|
11
|
+
import { EmojiCategoriesView } from './emojicategoriesview.js';
|
|
12
|
+
import { EmojiSearchView } from './emojisearchview.js';
|
|
13
|
+
import { EmojiToneView } from './emojitoneview.js';
|
|
14
14
|
/**
|
|
15
15
|
* A view that glues pieces of the emoji panel together.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export class EmojiPickerView extends View {
|
|
18
18
|
/**
|
|
19
19
|
* A collection of the focusable children of the view.
|
|
20
20
|
*/
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { SearchTextView, View, type SearchInfoView } from 'ckeditor5/src/ui.js';
|
|
6
6
|
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
-
import type EmojiGridView from './emojigridview.js';
|
|
7
|
+
import { type EmojiGridView } from './emojigridview.js';
|
|
8
8
|
/**
|
|
9
9
|
* A view responsible for providing an input element that allows filtering emoji by the provided query.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export declare class EmojiSearchView extends View {
|
|
12
12
|
/**
|
|
13
13
|
* The find in text input view that stores the searched string.
|
|
14
14
|
*/
|
|
@@ -10,7 +10,7 @@ import { createLabeledInputText, SearchTextView, View } from 'ckeditor5/src/ui.j
|
|
|
10
10
|
/**
|
|
11
11
|
* A view responsible for providing an input element that allows filtering emoji by the provided query.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export class EmojiSearchView extends View {
|
|
14
14
|
/**
|
|
15
15
|
* The find in text input view that stores the searched string.
|
|
16
16
|
*/
|
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { View, type DropdownView } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
10
|
+
import type { EmojiSkinToneId } from '../emojiconfig.js';
|
|
11
|
+
import type { EmojiSkinTone } from '../emojirepository.js';
|
|
12
12
|
import '../../theme/emojitone.css';
|
|
13
13
|
/**
|
|
14
14
|
* A view responsible for selecting a skin tone for an emoji.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare class EmojiToneView extends View {
|
|
17
17
|
/**
|
|
18
18
|
* Active skin tone.
|
|
19
19
|
*
|
|
20
20
|
* @observable
|
|
21
21
|
*/
|
|
22
|
-
skinTone:
|
|
22
|
+
skinTone: EmojiSkinToneId;
|
|
23
23
|
/**
|
|
24
24
|
* A dropdown element for selecting an active skin tone.
|
|
25
25
|
*/
|
|
@@ -32,8 +32,8 @@ export default class EmojiToneView extends View {
|
|
|
32
32
|
* @inheritDoc
|
|
33
33
|
*/
|
|
34
34
|
constructor(locale: Locale, { skinTone, skinTones }: {
|
|
35
|
-
skinTone:
|
|
36
|
-
skinTones: Array<
|
|
35
|
+
skinTone: EmojiSkinToneId;
|
|
36
|
+
skinTones: Array<EmojiSkinTone>;
|
|
37
37
|
});
|
|
38
38
|
/**
|
|
39
39
|
* @inheritDoc
|
package/src/ui/emojitoneview.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module emoji/ui/emojitoneview
|
|
7
7
|
*/
|
|
8
|
-
import { createDropdown, addListToDropdown, View,
|
|
8
|
+
import { createDropdown, addListToDropdown, View, UIModel } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
10
|
import '../../theme/emojitone.css';
|
|
11
11
|
/**
|
|
12
12
|
* A view responsible for selecting a skin tone for an emoji.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export class EmojiToneView extends View {
|
|
15
15
|
/**
|
|
16
16
|
* A dropdown element for selecting an active skin tone.
|
|
17
17
|
*/
|
|
@@ -34,7 +34,7 @@ export default class EmojiToneView extends View {
|
|
|
34
34
|
for (const { id, icon, tooltip } of this._skinTones) {
|
|
35
35
|
const def = {
|
|
36
36
|
type: 'button',
|
|
37
|
-
model: new
|
|
37
|
+
model: new UIModel({
|
|
38
38
|
value: id,
|
|
39
39
|
label: icon,
|
|
40
40
|
ariaLabel: tooltip,
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Checks if the two pixels parts are the same using canvas.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
10
12
|
*/
|
|
11
|
-
export
|
|
13
|
+
export function isEmojiSupported(unicode) {
|
|
12
14
|
const ctx = getCanvas();
|
|
13
15
|
/* istanbul ignore next -- @preserve */
|
|
14
16
|
if (!ctx) {
|