@ckeditor/ckeditor5-mention 41.3.1 → 41.4.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module mention/ui/mentionsview
11
+ */
12
+ import { ListView } from 'ckeditor5/src/ui.js';
13
+ import { type Locale } from 'ckeditor5/src/utils.js';
14
+ import type MentionListItemView from './mentionlistitemview.js';
15
+ import '../../theme/mentionui.css';
16
+ /**
17
+ * The mention ui view.
18
+ */
19
+ export default class MentionsView extends ListView {
20
+ selected: MentionListItemView | undefined;
21
+ position: string | undefined;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(locale: Locale);
26
+ /**
27
+ * {@link #select Selects} the first item.
28
+ */
29
+ selectFirst(): void;
30
+ /**
31
+ * Selects next item to the currently {@link #select selected}.
32
+ *
33
+ * If the last item is already selected, it will select the first item.
34
+ */
35
+ selectNext(): void;
36
+ /**
37
+ * Selects previous item to the currently {@link #select selected}.
38
+ *
39
+ * If the first item is already selected, it will select the last item.
40
+ */
41
+ selectPrevious(): void;
42
+ /**
43
+ * Marks item at a given index as selected.
44
+ *
45
+ * Handles selection cycling when passed index is out of bounds:
46
+ * - if the index is lower than 0, it will select the last item,
47
+ * - if the index is higher than the last item index, it will select the first item.
48
+ *
49
+ * @param index Index of an item to be marked as selected.
50
+ */
51
+ select(index: number): void;
52
+ /**
53
+ * Triggers the `execute` event on the {@link #select selected} item.
54
+ */
55
+ executeSelected(): void;
56
+ /**
57
+ * Checks if an item is visible in the scrollable area.
58
+ *
59
+ * The item is considered visible when:
60
+ * - its top boundary is inside the scrollable rect
61
+ * - its bottom boundary is inside the scrollable rect (the whole item must be visible)
62
+ */
63
+ private _isItemVisibleInScrolledArea;
64
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-mention",
3
- "version": "41.3.1",
3
+ "version": "41.4.0-alpha.0",
4
4
  "description": "Mention feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,7 +13,7 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "41.3.1",
16
+ "ckeditor5": "41.4.0-alpha.0",
17
17
  "lodash-es": "4.17.21"
18
18
  },
19
19
  "author": "CKSource (http://cksource.com/)",
@@ -26,6 +26,7 @@
26
26
  "directory": "packages/ckeditor5-mention"
27
27
  },
28
28
  "files": [
29
+ "dist",
29
30
  "lang",
30
31
  "src/**/*.js",
31
32
  "src/**/*.d.ts",