@ckeditor/ckeditor5-bookmark 48.2.0 → 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,38 +1,38 @@
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 { Command } from '@ckeditor/ckeditor5-core';
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 { Command } from "@ckeditor/ckeditor5-core";
6
6
  /**
7
- * The insert bookmark command.
8
- *
9
- * The command is registered by {@link module:bookmark/bookmarkediting~BookmarkEditing} as `'insertBookmark'`.
10
- *
11
- * To insert a bookmark element at place where is the current collapsed selection or where is the beginning of document selection,
12
- * execute the command passing the bookmark id as a parameter:
13
- *
14
- * ```ts
15
- * editor.execute( 'insertBookmark', { bookmarkId: 'foo_bar' } );
16
- * ```
17
- */
7
+ * The insert bookmark command.
8
+ *
9
+ * The command is registered by {@link module:bookmark/bookmarkediting~BookmarkEditing} as `'insertBookmark'`.
10
+ *
11
+ * To insert a bookmark element at place where is the current collapsed selection or where is the beginning of document selection,
12
+ * execute the command passing the bookmark id as a parameter:
13
+ *
14
+ * ```ts
15
+ * editor.execute( 'insertBookmark', { bookmarkId: 'foo_bar' } );
16
+ * ```
17
+ */
18
18
  export declare class InsertBookmarkCommand extends Command {
19
- /**
20
- * @inheritDoc
21
- */
22
- refresh(): void;
23
- /**
24
- * Executes the command.
25
- *
26
- * @fires execute
27
- * @param options Command options.
28
- * @param options.bookmarkId The value of the `bookmarkId` attribute.
29
- */
30
- execute(options: {
31
- bookmarkId: string;
32
- }): void;
33
- /**
34
- * Returns the position where the bookmark can be inserted. And if it is not possible to insert a bookmark,
35
- * check if it is possible to insert a paragraph.
36
- */
37
- private _getPositionToInsertBookmark;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ override refresh(): void;
23
+ /**
24
+ * Executes the command.
25
+ *
26
+ * @fires execute
27
+ * @param options Command options.
28
+ * @param options.bookmarkId The value of the `bookmarkId` attribute.
29
+ */
30
+ override execute(options: {
31
+ bookmarkId: string;
32
+ }): void;
33
+ /**
34
+ * Returns the position where the bookmark can be inserted. And if it is not possible to insert a bookmark,
35
+ * check if it is possible to insert a paragraph.
36
+ */
37
+ private _getPositionToInsertBookmark;
38
38
  }
@@ -1,126 +1,126 @@
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 bookmark/ui/bookmarkformview
7
- */
8
- import { ButtonView, LabeledFieldView, View, ViewCollection, type InputTextView } from '@ckeditor/ckeditor5-ui';
9
- import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
10
- import '../../theme/bookmarkform.css';
6
+ * @module bookmark/ui/bookmarkformview
7
+ */
8
+ import { ButtonView, LabeledFieldView, View, ViewCollection, type InputTextView } from "@ckeditor/ckeditor5-ui";
9
+ import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
10
+ import "../../theme/bookmarkform.css";
11
11
  /**
12
- * The bookmark form view controller class.
13
- *
14
- * See {@link module:bookmark/ui/bookmarkformview~BookmarkFormView}.
15
- */
12
+ * The bookmark form view controller class.
13
+ *
14
+ * See {@link module:bookmark/ui/bookmarkformview~BookmarkFormView}.
15
+ */
16
16
  export declare class BookmarkFormView extends View {
17
- /**
18
- * Tracks information about DOM focus in the form.
19
- */
20
- readonly focusTracker: FocusTracker;
21
- /**
22
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
23
- */
24
- readonly keystrokes: KeystrokeHandler;
25
- /**
26
- * The ID input view.
27
- */
28
- idInputView: LabeledFieldView<InputTextView>;
29
- /**
30
- * The Back button view displayed in the header.
31
- */
32
- backButtonView: ButtonView;
33
- /**
34
- * A button used to submit the form.
35
- */
36
- saveButtonView: ButtonView;
37
- /**
38
- * A collection of form child views in the form.
39
- */
40
- readonly children: ViewCollection;
41
- /**
42
- * An array of form validators used by {@link #isValid}.
43
- */
44
- private readonly _validators;
45
- /**
46
- * A collection of views that can be focused in the form.
47
- */
48
- private readonly _focusables;
49
- /**
50
- * Helps cycling over {@link #_focusables} in the form.
51
- */
52
- private readonly _focusCycler;
53
- /**
54
- * Creates an instance of the {@link module:bookmark/ui/bookmarkformview~BookmarkFormView} class.
55
- *
56
- * Also see {@link #render}.
57
- *
58
- * @param locale The localization services instance.
59
- * @param validators Form validators used by {@link #isValid}.
60
- */
61
- constructor(locale: Locale, validators: Array<BookmarkFormValidatorCallback>);
62
- /**
63
- * @inheritDoc
64
- */
65
- render(): void;
66
- /**
67
- * @inheritDoc
68
- */
69
- destroy(): void;
70
- /**
71
- * Focuses the fist {@link #_focusables} in the form.
72
- */
73
- focus(): void;
74
- /**
75
- * Validates the form and returns `false` when some fields are invalid.
76
- */
77
- isValid(): boolean;
78
- /**
79
- * Cleans up the supplementary error and information text of the {@link #idInputView}
80
- * bringing them back to the state when the form has been displayed for the first time.
81
- *
82
- * See {@link #isValid}.
83
- */
84
- resetFormStatus(): void;
85
- /**
86
- * Creates a back button view that cancels the form.
87
- */
88
- private _createBackButton;
89
- /**
90
- * Creates a save button view that saves the bookmark.
91
- */
92
- private _createSaveButton;
93
- /**
94
- * Creates a header view for the form.
95
- */
96
- private _createHeaderView;
97
- /**
98
- * Creates a labeled input view.
99
- *
100
- * @returns Labeled field view instance.
101
- */
102
- private _createIdInput;
103
- /**
104
- * The native DOM `value` of the {@link #idInputView} element.
105
- *
106
- * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
107
- * which works one way only and may not represent the actual state of the component in the DOM.
108
- */
109
- get id(): string | null;
17
+ /**
18
+ * Tracks information about DOM focus in the form.
19
+ */
20
+ readonly focusTracker: FocusTracker;
21
+ /**
22
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
23
+ */
24
+ readonly keystrokes: KeystrokeHandler;
25
+ /**
26
+ * The ID input view.
27
+ */
28
+ idInputView: LabeledFieldView<InputTextView>;
29
+ /**
30
+ * The Back button view displayed in the header.
31
+ */
32
+ backButtonView: ButtonView;
33
+ /**
34
+ * A button used to submit the form.
35
+ */
36
+ saveButtonView: ButtonView;
37
+ /**
38
+ * A collection of form child views in the form.
39
+ */
40
+ readonly children: ViewCollection;
41
+ /**
42
+ * An array of form validators used by {@link #isValid}.
43
+ */
44
+ private readonly _validators;
45
+ /**
46
+ * A collection of views that can be focused in the form.
47
+ */
48
+ private readonly _focusables;
49
+ /**
50
+ * Helps cycling over {@link #_focusables} in the form.
51
+ */
52
+ private readonly _focusCycler;
53
+ /**
54
+ * Creates an instance of the {@link module:bookmark/ui/bookmarkformview~BookmarkFormView} class.
55
+ *
56
+ * Also see {@link #render}.
57
+ *
58
+ * @param locale The localization services instance.
59
+ * @param validators Form validators used by {@link #isValid}.
60
+ */
61
+ constructor(locale: Locale, validators: Array<BookmarkFormValidatorCallback>);
62
+ /**
63
+ * @inheritDoc
64
+ */
65
+ override render(): void;
66
+ /**
67
+ * @inheritDoc
68
+ */
69
+ override destroy(): void;
70
+ /**
71
+ * Focuses the fist {@link #_focusables} in the form.
72
+ */
73
+ focus(): void;
74
+ /**
75
+ * Validates the form and returns `false` when some fields are invalid.
76
+ */
77
+ isValid(): boolean;
78
+ /**
79
+ * Cleans up the supplementary error and information text of the {@link #idInputView}
80
+ * bringing them back to the state when the form has been displayed for the first time.
81
+ *
82
+ * See {@link #isValid}.
83
+ */
84
+ resetFormStatus(): void;
85
+ /**
86
+ * Creates a back button view that cancels the form.
87
+ */
88
+ private _createBackButton;
89
+ /**
90
+ * Creates a save button view that saves the bookmark.
91
+ */
92
+ private _createSaveButton;
93
+ /**
94
+ * Creates a header view for the form.
95
+ */
96
+ private _createHeaderView;
97
+ /**
98
+ * Creates a labeled input view.
99
+ *
100
+ * @returns Labeled field view instance.
101
+ */
102
+ private _createIdInput;
103
+ /**
104
+ * The native DOM `value` of the {@link #idInputView} element.
105
+ *
106
+ * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
107
+ * which works one way only and may not represent the actual state of the component in the DOM.
108
+ */
109
+ get id(): string | null;
110
110
  }
111
111
  /**
112
- * Callback used by {@link ~BookmarkFormView} to check if passed form value is valid.
113
- *
114
- * If `undefined` is returned, it is assumed that the form value is correct and there is no error.
115
- * If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label
116
- */
112
+ * Callback used by {@link ~BookmarkFormView} to check if passed form value is valid.
113
+ *
114
+ * If `undefined` is returned, it is assumed that the form value is correct and there is no error.
115
+ * If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label
116
+ */
117
117
  export type BookmarkFormValidatorCallback = (form: BookmarkFormView) => string | undefined;
118
118
  /**
119
- * Fired when the form view is canceled.
120
- *
121
- * @eventName ~BookmarkFormView#cancel
122
- */
119
+ * Fired when the form view is canceled.
120
+ *
121
+ * @eventName ~BookmarkFormView#cancel
122
+ */
123
123
  export type BookmarkFormViewCancelEvent = {
124
- name: 'cancel';
125
- args: [];
124
+ name: "cancel";
125
+ args: [];
126
126
  };
@@ -1,42 +1,42 @@
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 bookmark/updatebookmarkcommand
7
- */
8
- import { Command } from '@ckeditor/ckeditor5-core';
6
+ * @module bookmark/updatebookmarkcommand
7
+ */
8
+ import { Command } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The update bookmark command.
11
- *
12
- * The command is registered by {@link module:bookmark/bookmarkediting~BookmarkEditing} as `'updateBookmark'`.
13
- *
14
- * To update the `bookmarkId` of current selected bookmark element, execute the command passing the bookmark id as a parameter:
15
- *
16
- * ```ts
17
- * editor.execute( 'updateBookmark', { bookmarkId: 'newId' } );
18
- * ```
19
- */
10
+ * The update bookmark command.
11
+ *
12
+ * The command is registered by {@link module:bookmark/bookmarkediting~BookmarkEditing} as `'updateBookmark'`.
13
+ *
14
+ * To update the `bookmarkId` of current selected bookmark element, execute the command passing the bookmark id as a parameter:
15
+ *
16
+ * ```ts
17
+ * editor.execute( 'updateBookmark', { bookmarkId: 'newId' } );
18
+ * ```
19
+ */
20
20
  export declare class UpdateBookmarkCommand extends Command {
21
- /**
22
- * The value of the `'bookmarkId'` attribute.
23
- *
24
- * @observable
25
- * @readonly
26
- */
27
- value: string | undefined;
28
- /**
29
- * @inheritDoc
30
- */
31
- refresh(): void;
32
- /**
33
- * Executes the command.
34
- *
35
- * @fires execute
36
- * @param options Command options.
37
- * @param options.bookmarkId The new value of the `bookmarkId` attribute to set.
38
- */
39
- execute(options: {
40
- bookmarkId: string;
41
- }): void;
21
+ /**
22
+ * The value of the `'bookmarkId'` attribute.
23
+ *
24
+ * @observable
25
+ * @readonly
26
+ */
27
+ value: string | undefined;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ override refresh(): void;
32
+ /**
33
+ * Executes the command.
34
+ *
35
+ * @fires execute
36
+ * @param options Command options.
37
+ * @param options.bookmarkId The new value of the `bookmarkId` attribute to set.
38
+ */
39
+ override execute(options: {
40
+ bookmarkId: string;
41
+ }): void;
42
42
  }
package/dist/utils.d.ts CHANGED
@@ -1,13 +1,13 @@
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 bookmark/utils
7
- */
6
+ * @module bookmark/utils
7
+ */
8
8
  /**
9
- * Returns `true` if the bookmark id is valid; otherwise, returns `false`.
10
- *
11
- * @internal
12
- */
9
+ * Returns `true` if the bookmark id is valid; otherwise, returns `false`.
10
+ *
11
+ * @internal
12
+ */
13
13
  export declare function isBookmarkIdValid(id: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-bookmark",
3
- "version": "48.2.0",
3
+ "version": "48.3.0-alpha.0",
4
4
  "description": "Bookmark feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -26,14 +26,14 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.2.0",
30
- "@ckeditor/ckeditor5-engine": "48.2.0",
31
- "@ckeditor/ckeditor5-icons": "48.2.0",
32
- "@ckeditor/ckeditor5-link": "48.2.0",
33
- "@ckeditor/ckeditor5-typing": "48.2.0",
34
- "@ckeditor/ckeditor5-ui": "48.2.0",
35
- "@ckeditor/ckeditor5-utils": "48.2.0",
36
- "@ckeditor/ckeditor5-widget": "48.2.0"
29
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
30
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
31
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.0",
32
+ "@ckeditor/ckeditor5-link": "48.3.0-alpha.0",
33
+ "@ckeditor/ckeditor5-typing": "48.3.0-alpha.0",
34
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.0",
35
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0",
36
+ "@ckeditor/ckeditor5-widget": "48.3.0-alpha.0"
37
37
  },
38
38
  "files": [
39
39
  "dist",