@ckeditor/ckeditor5-bookmark 0.0.0-nightly-20250225.0 → 0.0.0-nightly-next-20250225.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-bookmark",
3
- "version": "0.0.0-nightly-20250225.0",
3
+ "version": "0.0.0-nightly-next-20250225.0",
4
4
  "description": "Bookmark feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,12 +13,13 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "0.0.0-nightly-20250225.0",
17
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250225.0",
18
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250225.0",
19
- "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20250225.0",
20
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250225.0",
21
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250225.0"
16
+ "ckeditor5": "0.0.0-nightly-next-20250225.0",
17
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20250225.0",
18
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20250225.0",
19
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250225.0",
20
+ "@ckeditor/ckeditor5-widget": "0.0.0-nightly-next-20250225.0",
21
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250225.0",
22
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250225.0"
22
23
  },
23
24
  "author": "CKSource (http://cksource.com/)",
24
25
  "license": "SEE LICENSE IN LICENSE.md",
@@ -5,9 +5,10 @@
5
5
  /**
6
6
  * @module bookmark/bookmarkediting
7
7
  */
8
- import { Plugin, icons } from 'ckeditor5/src/core.js';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { toWidget } from 'ckeditor5/src/widget.js';
10
10
  import { IconView } from 'ckeditor5/src/ui.js';
11
+ import { IconBookmarkInline } from 'ckeditor5/src/icons.js';
11
12
  import InsertBookmarkCommand from './insertbookmarkcommand.js';
12
13
  import UpdateBookmarkCommand from './updatebookmarkcommand.js';
13
14
  import '../theme/bookmark.css';
@@ -15,13 +16,10 @@ import '../theme/bookmark.css';
15
16
  * The bookmark editing plugin.
16
17
  */
17
18
  export default class BookmarkEditing extends Plugin {
18
- constructor() {
19
- super(...arguments);
20
- /**
21
- * A collection of bookmarks elements in the document.
22
- */
23
- this._bookmarkElements = new Map();
24
- }
19
+ /**
20
+ * A collection of bookmarks elements in the document.
21
+ */
22
+ _bookmarkElements = new Map();
25
23
  /**
26
24
  * @inheritDoc
27
25
  */
@@ -119,7 +117,7 @@ export default class BookmarkEditing extends Plugin {
119
117
  const domElement = this.toDomElement(domDocument);
120
118
  const icon = new IconView();
121
119
  icon.set({
122
- content: icons.bookmarkInline,
120
+ content: IconBookmarkInline,
123
121
  isColorInherited: false
124
122
  });
125
123
  icon.render();
package/src/bookmarkui.js CHANGED
@@ -5,8 +5,9 @@
5
5
  /**
6
6
  * @module bookmark/bookmarkui
7
7
  */
8
- import { Plugin, icons } from 'ckeditor5/src/core.js';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { ButtonView, ContextualBalloon, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, clickOutsideHandler } from 'ckeditor5/src/ui.js';
10
+ import { IconBookmark } from 'ckeditor5/src/icons.js';
10
11
  import { ClickObserver } from 'ckeditor5/src/engine.js';
11
12
  import BookmarkFormView from './ui/bookmarkformview.js';
12
13
  import BookmarkActionsView from './ui/bookmarkactionsview.js';
@@ -19,17 +20,18 @@ const VISUAL_SELECTION_MARKER_NAME = 'bookmark-ui';
19
20
  * which inserts the `bookmark` element upon selection.
20
21
  */
21
22
  export default class BookmarkUI extends Plugin {
22
- constructor() {
23
- super(...arguments);
24
- /**
25
- * The actions view displayed inside of the balloon.
26
- */
27
- this.actionsView = null;
28
- /**
29
- * The form view displayed inside the balloon.
30
- */
31
- this.formView = null;
32
- }
23
+ /**
24
+ * The actions view displayed inside of the balloon.
25
+ */
26
+ actionsView = null;
27
+ /**
28
+ * The form view displayed inside the balloon.
29
+ */
30
+ formView = null;
31
+ /**
32
+ * The contextual balloon plugin instance.
33
+ */
34
+ _balloon;
33
35
  /**
34
36
  * @inheritDoc
35
37
  */
@@ -195,7 +197,7 @@ export default class BookmarkUI extends Plugin {
195
197
  const t = locale.t;
196
198
  view.set({
197
199
  label: t('Bookmark'),
198
- icon: icons.bookmark
200
+ icon: IconBookmark
199
201
  });
200
202
  // Execute the command.
201
203
  this.listenTo(view, 'execute', () => this._showUI(true));
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { LabelView, ButtonView, View, ViewCollection, FocusCycler } from 'ckeditor5/src/ui.js';
9
9
  import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';
10
- import { icons } from 'ckeditor5/src/core.js';
10
+ import { IconPencil, IconRemove } from 'ckeditor5/src/icons.js';
11
11
  // eslint-disable-next-line ckeditor5-rules/ckeditor-imports
12
12
  import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
13
13
  import '../../theme/bookmarkactions.css';
@@ -16,27 +16,43 @@ import '../../theme/bookmarkactions.css';
16
16
  * removing or editing the bookmark.
17
17
  */
18
18
  export default class BookmarkActionsView extends View {
19
+ /**
20
+ * Tracks information about DOM focus in the actions.
21
+ */
22
+ focusTracker = new FocusTracker();
23
+ /**
24
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
25
+ */
26
+ keystrokes = new KeystrokeHandler();
27
+ /**
28
+ * The bookmark preview view.
29
+ */
30
+ bookmarkPreviewView;
31
+ /**
32
+ * The remove button view.
33
+ */
34
+ removeButtonView;
35
+ /**
36
+ * The edit bookmark button view.
37
+ */
38
+ editButtonView;
39
+ /**
40
+ * A collection of views that can be focused in the view.
41
+ */
42
+ _focusables = new ViewCollection();
43
+ /**
44
+ * Helps cycling over {@link #_focusables} in the view.
45
+ */
46
+ _focusCycler;
19
47
  /**
20
48
  * @inheritDoc
21
49
  */
22
50
  constructor(locale) {
23
51
  super(locale);
24
- /**
25
- * Tracks information about DOM focus in the actions.
26
- */
27
- this.focusTracker = new FocusTracker();
28
- /**
29
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
30
- */
31
- this.keystrokes = new KeystrokeHandler();
32
- /**
33
- * A collection of views that can be focused in the view.
34
- */
35
- this._focusables = new ViewCollection();
36
52
  const t = locale.t;
37
53
  this.bookmarkPreviewView = this._createBookmarkPreviewView();
38
- this.removeButtonView = this._createButton(t('Remove bookmark'), icons.remove, 'remove', this.bookmarkPreviewView);
39
- this.editButtonView = this._createButton(t('Edit bookmark'), icons.pencil, 'edit', this.bookmarkPreviewView);
54
+ this.removeButtonView = this._createButton(t('Remove bookmark'), IconRemove, 'remove', this.bookmarkPreviewView);
55
+ this.editButtonView = this._createButton(t('Edit bookmark'), IconPencil, 'edit', this.bookmarkPreviewView);
40
56
  this.set('id', undefined);
41
57
  this._focusCycler = new FocusCycler({
42
58
  focusables: this._focusables,
@@ -17,6 +17,38 @@ import '../../theme/bookmarkform.css';
17
17
  * See {@link module:bookmark/ui/bookmarkformview~BookmarkFormView}.
18
18
  */
19
19
  export default class BookmarkFormView extends View {
20
+ /**
21
+ * Tracks information about DOM focus in the form.
22
+ */
23
+ focusTracker = new FocusTracker();
24
+ /**
25
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
26
+ */
27
+ keystrokes = new KeystrokeHandler();
28
+ /**
29
+ * The ID input view.
30
+ */
31
+ idInputView;
32
+ /**
33
+ * The Submit button view.
34
+ */
35
+ buttonView;
36
+ /**
37
+ * A collection of form child views in the form.
38
+ */
39
+ children;
40
+ /**
41
+ * An array of form validators used by {@link #isValid}.
42
+ */
43
+ _validators;
44
+ /**
45
+ * A collection of views that can be focused in the form.
46
+ */
47
+ _focusables = new ViewCollection();
48
+ /**
49
+ * Helps cycling over {@link #_focusables} in the form.
50
+ */
51
+ _focusCycler;
20
52
  /**
21
53
  * Creates an instance of the {@link module:bookmark/ui/bookmarkformview~BookmarkFormView} class.
22
54
  *
@@ -27,18 +59,6 @@ export default class BookmarkFormView extends View {
27
59
  */
28
60
  constructor(locale, validators) {
29
61
  super(locale);
30
- /**
31
- * Tracks information about DOM focus in the form.
32
- */
33
- this.focusTracker = new FocusTracker();
34
- /**
35
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
36
- */
37
- this.keystrokes = new KeystrokeHandler();
38
- /**
39
- * A collection of views that can be focused in the form.
40
- */
41
- this._focusables = new ViewCollection();
42
62
  const t = locale.t;
43
63
  this._validators = validators;
44
64
  this.idInputView = this._createIdInput();