@ckeditor/ckeditor5-bookmark 0.0.0-nightly-next-20250221.0 → 0.0.0-nightly-20250222.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-next-20250221.0",
3
+ "version": "0.0.0-nightly-20250222.0",
4
4
  "description": "Bookmark feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,13 +13,12 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "0.0.0-nightly-next-20250221.0",
17
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20250221.0",
18
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20250221.0",
19
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250221.0",
20
- "@ckeditor/ckeditor5-widget": "0.0.0-nightly-next-20250221.0",
21
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250221.0",
22
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250221.0"
16
+ "ckeditor5": "0.0.0-nightly-20250222.0",
17
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250222.0",
18
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250222.0",
19
+ "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20250222.0",
20
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250222.0",
21
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250222.0"
23
22
  },
24
23
  "author": "CKSource (http://cksource.com/)",
25
24
  "license": "SEE LICENSE IN LICENSE.md",
@@ -5,10 +5,9 @@
5
5
  /**
6
6
  * @module bookmark/bookmarkediting
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core.js';
8
+ import { Plugin, icons } 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';
12
11
  import InsertBookmarkCommand from './insertbookmarkcommand.js';
13
12
  import UpdateBookmarkCommand from './updatebookmarkcommand.js';
14
13
  import '../theme/bookmark.css';
@@ -16,10 +15,13 @@ import '../theme/bookmark.css';
16
15
  * The bookmark editing plugin.
17
16
  */
18
17
  export default class BookmarkEditing extends Plugin {
19
- /**
20
- * A collection of bookmarks elements in the document.
21
- */
22
- _bookmarkElements = new Map();
18
+ constructor() {
19
+ super(...arguments);
20
+ /**
21
+ * A collection of bookmarks elements in the document.
22
+ */
23
+ this._bookmarkElements = new Map();
24
+ }
23
25
  /**
24
26
  * @inheritDoc
25
27
  */
@@ -117,7 +119,7 @@ export default class BookmarkEditing extends Plugin {
117
119
  const domElement = this.toDomElement(domDocument);
118
120
  const icon = new IconView();
119
121
  icon.set({
120
- content: IconBookmarkInline,
122
+ content: icons.bookmarkInline,
121
123
  isColorInherited: false
122
124
  });
123
125
  icon.render();
package/src/bookmarkui.js CHANGED
@@ -5,9 +5,8 @@
5
5
  /**
6
6
  * @module bookmark/bookmarkui
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core.js';
8
+ import { Plugin, icons } 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';
11
10
  import { ClickObserver } from 'ckeditor5/src/engine.js';
12
11
  import BookmarkFormView from './ui/bookmarkformview.js';
13
12
  import BookmarkActionsView from './ui/bookmarkactionsview.js';
@@ -20,18 +19,17 @@ const VISUAL_SELECTION_MARKER_NAME = 'bookmark-ui';
20
19
  * which inserts the `bookmark` element upon selection.
21
20
  */
22
21
  export default class BookmarkUI extends Plugin {
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;
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
+ }
35
33
  /**
36
34
  * @inheritDoc
37
35
  */
@@ -197,7 +195,7 @@ export default class BookmarkUI extends Plugin {
197
195
  const t = locale.t;
198
196
  view.set({
199
197
  label: t('Bookmark'),
200
- icon: IconBookmark
198
+ icon: icons.bookmark
201
199
  });
202
200
  // Execute the command.
203
201
  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 { IconPencil, IconRemove } from 'ckeditor5/src/icons.js';
10
+ import { icons } from 'ckeditor5/src/core.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,43 +16,27 @@ 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;
47
19
  /**
48
20
  * @inheritDoc
49
21
  */
50
22
  constructor(locale) {
51
23
  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();
52
36
  const t = locale.t;
53
37
  this.bookmarkPreviewView = this._createBookmarkPreviewView();
54
- this.removeButtonView = this._createButton(t('Remove bookmark'), IconRemove, 'remove', this.bookmarkPreviewView);
55
- this.editButtonView = this._createButton(t('Edit bookmark'), IconPencil, 'edit', this.bookmarkPreviewView);
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);
56
40
  this.set('id', undefined);
57
41
  this._focusCycler = new FocusCycler({
58
42
  focusables: this._focusables,
@@ -17,38 +17,6 @@ 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;
52
20
  /**
53
21
  * Creates an instance of the {@link module:bookmark/ui/bookmarkformview~BookmarkFormView} class.
54
22
  *
@@ -59,6 +27,18 @@ export default class BookmarkFormView extends View {
59
27
  */
60
28
  constructor(locale, validators) {
61
29
  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();
62
42
  const t = locale.t;
63
43
  this._validators = validators;
64
44
  this.idInputView = this._createIdInput();