@ckeditor/ckeditor5-ui 48.2.0 → 48.3.0-alpha.1

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.
Files changed (117) hide show
  1. package/dist/arialiveannouncer.d.ts +90 -90
  2. package/dist/augmentation.d.ts +86 -86
  3. package/dist/autocomplete/autocompleteview.d.ts +70 -70
  4. package/dist/badge/badge.d.ts +119 -121
  5. package/dist/bindings/addkeyboardhandlingforgrid.d.ts +22 -22
  6. package/dist/bindings/clickoutsidehandler.d.ts +25 -25
  7. package/dist/bindings/csstransitiondisablermixin.d.ts +47 -36
  8. package/dist/bindings/draggableviewmixin.d.ts +45 -37
  9. package/dist/bindings/preventdefault.d.ts +30 -30
  10. package/dist/bindings/submithandler.d.ts +49 -49
  11. package/dist/button/button.d.ts +167 -167
  12. package/dist/button/buttonlabel.d.ts +28 -28
  13. package/dist/button/buttonlabelview.d.ts +26 -26
  14. package/dist/button/buttonview.d.ts +192 -192
  15. package/dist/button/filedialogbuttonview.d.ts +107 -99
  16. package/dist/button/listitembuttonview.d.ts +73 -73
  17. package/dist/button/switchbuttonview.d.ts +40 -40
  18. package/dist/collapsible/collapsibleview.d.ts +63 -63
  19. package/dist/colorgrid/colorgridview.d.ts +117 -117
  20. package/dist/colorgrid/colortileview.d.ts +21 -21
  21. package/dist/colorgrid/utils.d.ts +35 -35
  22. package/dist/colorpicker/colorpickerview.d.ts +155 -157
  23. package/dist/colorpicker/utils.d.ts +37 -37
  24. package/dist/colorselector/colorgridsfragmentview.d.ts +191 -191
  25. package/dist/colorselector/colorpickerfragmentview.d.ts +129 -129
  26. package/dist/colorselector/colorselectorview.d.ts +227 -229
  27. package/dist/colorselector/documentcolorcollection.d.ts +52 -59
  28. package/dist/componentfactory.d.ts +76 -76
  29. package/dist/dialog/dialog.d.ts +311 -288
  30. package/dist/dialog/dialogactionsview.d.ts +62 -62
  31. package/dist/dialog/dialogcontentview.d.ts +22 -22
  32. package/dist/dialog/dialogview.d.ts +255 -251
  33. package/dist/dropdown/button/dropdownbutton.d.ts +17 -17
  34. package/dist/dropdown/button/dropdownbuttonview.d.ts +41 -41
  35. package/dist/dropdown/button/splitbuttonview.d.ts +155 -155
  36. package/dist/dropdown/dropdownpanelfocusable.d.ts +16 -16
  37. package/dist/dropdown/dropdownpanelview.d.ts +56 -56
  38. package/dist/dropdown/dropdownview.d.ts +326 -326
  39. package/dist/dropdown/menu/dropdownmenubehaviors.d.ts +43 -43
  40. package/dist/dropdown/menu/dropdownmenubuttonview.d.ts +29 -29
  41. package/dist/dropdown/menu/dropdownmenulistitembuttonview.d.ts +12 -12
  42. package/dist/dropdown/menu/dropdownmenulistitemview.d.ts +17 -17
  43. package/dist/dropdown/menu/dropdownmenulistview.d.ts +19 -19
  44. package/dist/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +28 -28
  45. package/dist/dropdown/menu/dropdownmenunestedmenuview.d.ts +126 -126
  46. package/dist/dropdown/menu/dropdownmenurootlistview.d.ts +132 -132
  47. package/dist/dropdown/menu/utils.d.ts +112 -112
  48. package/dist/dropdown/utils.d.ts +272 -272
  49. package/dist/editableui/editableuiview.d.ts +78 -78
  50. package/dist/editableui/inline/inlineeditableuiview.d.ts +38 -38
  51. package/dist/editorui/accessibilityhelp/accessibilityhelp.d.ts +50 -50
  52. package/dist/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +30 -30
  53. package/dist/editorui/bodycollection.d.ts +86 -86
  54. package/dist/editorui/boxed/boxededitoruiview.d.ts +35 -35
  55. package/dist/editorui/editorui.d.ts +348 -351
  56. package/dist/editorui/editoruiview.d.ts +53 -53
  57. package/dist/editorui/evaluationbadge.d.ts +28 -28
  58. package/dist/editorui/poweredby.d.ts +25 -25
  59. package/dist/focuscycler.d.ts +265 -270
  60. package/dist/formheader/formheaderview.d.ts +53 -53
  61. package/dist/formrow/formrowview.d.ts +52 -52
  62. package/dist/highlightedtext/buttonlabelwithhighlightview.d.ts +25 -25
  63. package/dist/highlightedtext/highlightedtextview.d.ts +33 -33
  64. package/dist/highlightedtext/labelwithhighlightview.d.ts +21 -21
  65. package/dist/icon/iconview.d.ts +83 -83
  66. package/dist/iframe/iframeview.d.ts +42 -42
  67. package/dist/index.css.map +1 -1
  68. package/dist/index.d.ts +136 -136
  69. package/dist/index.js +16467 -17751
  70. package/dist/index.js.map +1 -1
  71. package/dist/input/inputbase.d.ts +114 -114
  72. package/dist/input/inputview.d.ts +28 -28
  73. package/dist/inputnumber/inputnumberview.d.ts +44 -44
  74. package/dist/inputtext/inputtextview.d.ts +13 -13
  75. package/dist/label/labelview.d.ts +31 -31
  76. package/dist/labeledfield/labeledfieldview.d.ts +180 -180
  77. package/dist/labeledfield/utils.d.ts +112 -112
  78. package/dist/labeledinput/labeledinputview.d.ts +120 -120
  79. package/dist/legacyerrors.d.ts +0 -4
  80. package/dist/list/listitemgroupview.d.ts +54 -54
  81. package/dist/list/listitemview.d.ts +31 -31
  82. package/dist/list/listseparatorview.d.ts +13 -13
  83. package/dist/list/listview.d.ts +119 -119
  84. package/dist/menubar/menubarmenubuttonview.d.ts +28 -28
  85. package/dist/menubar/menubarmenulistitembuttonview.d.ts +16 -16
  86. package/dist/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +18 -18
  87. package/dist/menubar/menubarmenulistitemview.d.ts +20 -20
  88. package/dist/menubar/menubarmenulistview.d.ts +24 -24
  89. package/dist/menubar/menubarmenupanelview.d.ts +47 -47
  90. package/dist/menubar/menubarmenuview.d.ts +113 -113
  91. package/dist/menubar/menubarview.d.ts +145 -145
  92. package/dist/menubar/utils.d.ts +455 -455
  93. package/dist/model.d.ts +19 -18
  94. package/dist/notification/notification.d.ts +200 -200
  95. package/dist/panel/balloon/balloonpanelview.d.ts +692 -692
  96. package/dist/panel/balloon/contextualballoon.d.ts +298 -298
  97. package/dist/panel/sticky/stickypanelview.d.ts +151 -151
  98. package/dist/search/filteredview.d.ts +23 -23
  99. package/dist/search/filtergroupanditemnames.d.ts +11 -11
  100. package/dist/search/searchinfoview.d.ts +39 -39
  101. package/dist/search/searchresultsview.d.ts +49 -49
  102. package/dist/search/text/searchtextqueryview.d.ts +63 -63
  103. package/dist/search/text/searchtextview.d.ts +203 -203
  104. package/dist/spinner/spinnerview.d.ts +20 -20
  105. package/dist/template.d.ts +897 -902
  106. package/dist/textarea/textareaview.d.ts +96 -96
  107. package/dist/toolbar/balloon/balloontoolbar.d.ts +122 -122
  108. package/dist/toolbar/block/blockbuttonview.d.ts +30 -30
  109. package/dist/toolbar/block/blocktoolbar.d.ts +166 -166
  110. package/dist/toolbar/normalizetoolbarconfig.d.ts +35 -35
  111. package/dist/toolbar/toolbarlinebreakview.d.ts +13 -13
  112. package/dist/toolbar/toolbarseparatorview.d.ts +13 -13
  113. package/dist/toolbar/toolbarview.d.ts +271 -271
  114. package/dist/tooltipmanager.d.ts +190 -193
  115. package/dist/view.d.ts +385 -388
  116. package/dist/viewcollection.d.ts +134 -134
  117. package/package.json +6 -6
@@ -1,129 +1,127 @@
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 ui/badge/badge
7
- */
8
- import type { Editor } from '@ckeditor/ckeditor5-core';
9
- import { type View } from '../view.js';
10
- declare const Badge_base: {
11
- new (): import("@ckeditor/ckeditor5-utils").DomEmitter;
12
- prototype: import("@ckeditor/ckeditor5-utils").DomEmitter;
13
- };
6
+ * @module ui/badge/badge
7
+ */
8
+ import type { Editor } from "@ckeditor/ckeditor5-core";
9
+ import { type DomEmitterMixinConstructor } from "@ckeditor/ckeditor5-utils";
10
+ import { type View } from "../view.js";
11
+ declare const BadgeBase: DomEmitterMixinConstructor;
14
12
  /**
15
- * A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element
16
- * (editor root, source editing area, etc.) when the editor is focused.
17
- *
18
- * @private
19
- */
20
- export declare abstract class Badge extends /* #__PURE__ */ Badge_base {
21
- /**
22
- * Editor instance the helper was created for.
23
- */
24
- protected readonly editor: Editor;
25
- /**
26
- * A reference to the balloon panel hosting and positioning the badge content.
27
- */
28
- private _balloonView;
29
- /**
30
- * A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.
31
- */
32
- private _showBalloonThrottled;
33
- /**
34
- * A reference to the last editable element (root, source editing area, etc.) focused by the user.
35
- * Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the
36
- * right element whether the user is typing or using the UI.
37
- */
38
- private _lastFocusedEditableElement;
39
- /**
40
- * An additional CSS class added to the `BalloonView`.
41
- */
42
- private readonly _balloonClass;
43
- /**
44
- * Creates a badge for a given editor. The feature is initialized on Editor#ready
45
- * event.
46
- */
47
- protected constructor(editor: Editor, options?: {
48
- balloonClass?: string;
49
- });
50
- /**
51
- * Destroys the badge along with its view.
52
- */
53
- destroy(): void;
54
- /**
55
- * Enables badge label once the editor (ui) is ready.
56
- */
57
- protected _handleEditorReady(): void;
58
- /**
59
- * Returns normalized configuration for the badge.
60
- */
61
- protected _getNormalizedConfig(): BadgeConfig;
62
- /**
63
- * Creates the badge content.
64
- */
65
- protected abstract _createBadgeContent(): View<HTMLElement>;
66
- /**
67
- * Enables the badge feature.
68
- */
69
- protected abstract _isEnabled(): boolean;
70
- /**
71
- * Attempts to display the balloon with the badge view.
72
- */
73
- private _showBalloon;
74
- /**
75
- * Hides the badge balloon if already visible.
76
- */
77
- private _hideBalloon;
78
- /**
79
- * Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}
80
- * with the badge view inside ready for positioning.
81
- */
82
- private _createBalloonView;
83
- /**
84
- * Returns the options for attaching the balloon to the focused editable element.
85
- */
86
- private _getBalloonAttachOptions;
87
- /**
88
- * Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.
89
- */
90
- private _updateLastFocusedEditableElement;
13
+ * A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element
14
+ * (editor root, source editing area, etc.) when the editor is focused.
15
+ *
16
+ * @private
17
+ */
18
+ export declare abstract class Badge extends BadgeBase {
19
+ /**
20
+ * Editor instance the helper was created for.
21
+ */
22
+ protected readonly editor: Editor;
23
+ /**
24
+ * A reference to the balloon panel hosting and positioning the badge content.
25
+ */
26
+ private _balloonView;
27
+ /**
28
+ * A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.
29
+ */
30
+ private _showBalloonThrottled;
31
+ /**
32
+ * A reference to the last editable element (root, source editing area, etc.) focused by the user.
33
+ * Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the
34
+ * right element whether the user is typing or using the UI.
35
+ */
36
+ private _lastFocusedEditableElement;
37
+ /**
38
+ * An additional CSS class added to the `BalloonView`.
39
+ */
40
+ private readonly _balloonClass;
41
+ /**
42
+ * Creates a badge for a given editor. The feature is initialized on Editor#ready
43
+ * event.
44
+ */
45
+ protected constructor(editor: Editor, options?: {
46
+ balloonClass?: string;
47
+ });
48
+ /**
49
+ * Destroys the badge along with its view.
50
+ */
51
+ destroy(): void;
52
+ /**
53
+ * Enables badge label once the editor (ui) is ready.
54
+ */
55
+ protected _handleEditorReady(): void;
56
+ /**
57
+ * Returns normalized configuration for the badge.
58
+ */
59
+ protected _getNormalizedConfig(): BadgeConfig;
60
+ /**
61
+ * Creates the badge content.
62
+ */
63
+ protected abstract _createBadgeContent(): View<HTMLElement>;
64
+ /**
65
+ * Enables the badge feature.
66
+ */
67
+ protected abstract _isEnabled(): boolean;
68
+ /**
69
+ * Attempts to display the balloon with the badge view.
70
+ */
71
+ private _showBalloon;
72
+ /**
73
+ * Hides the badge balloon if already visible.
74
+ */
75
+ private _hideBalloon;
76
+ /**
77
+ * Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}
78
+ * with the badge view inside ready for positioning.
79
+ */
80
+ private _createBalloonView;
81
+ /**
82
+ * Returns the options for attaching the balloon to the focused editable element.
83
+ */
84
+ private _getBalloonAttachOptions;
85
+ /**
86
+ * Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.
87
+ */
88
+ private _updateLastFocusedEditableElement;
91
89
  }
92
90
  /**
93
- * The badge configuration options.
94
- **/
91
+ * The badge configuration options.
92
+ **/
95
93
  export interface BadgeConfig {
96
- /**
97
- * The position of the badge.
98
- *
99
- * * When `'inside'`, the badge will be displayed within the boundaries of the editing area.
100
- * * When `'border'`, the basge will be displayed over the bottom border of the editing area.
101
- *
102
- * @default 'border'
103
- */
104
- position: 'inside' | 'border';
105
- /**
106
- * Allows choosing the side of the editing area where the badge will be displayed.
107
- *
108
- * **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
109
- * language, the side switches to `'left'` by default.
110
- *
111
- * @default 'right'
112
- */
113
- side: 'left' | 'right';
114
- /**
115
- * The vertical distance the badge can be moved away from its default position.
116
- *
117
- * **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the badge.
118
- *
119
- * @default 5
120
- */
121
- verticalOffset: number;
122
- /**
123
- * The horizontal distance between the side of the editing root and the nearest side of the badge.
124
- *
125
- * @default 5
126
- */
127
- horizontalOffset: number;
94
+ /**
95
+ * The position of the badge.
96
+ *
97
+ * * When `'inside'`, the badge will be displayed within the boundaries of the editing area.
98
+ * * When `'border'`, the basge will be displayed over the bottom border of the editing area.
99
+ *
100
+ * @default 'border'
101
+ */
102
+ position: "inside" | "border";
103
+ /**
104
+ * Allows choosing the side of the editing area where the badge will be displayed.
105
+ *
106
+ * **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
107
+ * language, the side switches to `'left'` by default.
108
+ *
109
+ * @default 'right'
110
+ */
111
+ side: "left" | "right";
112
+ /**
113
+ * The vertical distance the badge can be moved away from its default position.
114
+ *
115
+ * **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the badge.
116
+ *
117
+ * @default 5
118
+ */
119
+ verticalOffset: number;
120
+ /**
121
+ * The horizontal distance between the side of the editing root and the nearest side of the badge.
122
+ *
123
+ * @default 5
124
+ */
125
+ horizontalOffset: number;
128
126
  }
129
127
  export {};
@@ -1,27 +1,27 @@
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 ui/bindings/addkeyboardhandlingforgrid
7
- */
8
- import type { FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
9
- import { type ViewCollection } from '../viewcollection.js';
6
+ * @module ui/bindings/addkeyboardhandlingforgrid
7
+ */
8
+ import type { FocusTracker, KeystrokeHandler } from "@ckeditor/ckeditor5-utils";
9
+ import { type ViewCollection } from "../viewcollection.js";
10
10
  /**
11
- * A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.
12
- *
13
- * @param options Configuration options.
14
- * @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.
15
- * @param options.focusTracker A focus tracker for grid elements.
16
- * @param options.gridItems A collection of grid items.
17
- * @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns
18
- * the number (e.g. for responsive grids).
19
- * @param options.uiLanguageDirection String of ui language direction.
20
- */
11
+ * A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.
12
+ *
13
+ * @param options Configuration options.
14
+ * @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.
15
+ * @param options.focusTracker A focus tracker for grid elements.
16
+ * @param options.gridItems A collection of grid items.
17
+ * @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns
18
+ * the number (e.g. for responsive grids).
19
+ * @param options.uiLanguageDirection String of ui language direction.
20
+ */
21
21
  export declare function addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }: {
22
- keystrokeHandler: KeystrokeHandler;
23
- focusTracker: FocusTracker;
24
- gridItems: ViewCollection;
25
- numberOfColumns: number | (() => number);
26
- uiLanguageDirection?: string;
22
+ keystrokeHandler: KeystrokeHandler;
23
+ focusTracker: FocusTracker;
24
+ gridItems: ViewCollection;
25
+ numberOfColumns: number | (() => number);
26
+ uiLanguageDirection?: string;
27
27
  }): void;
@@ -1,30 +1,30 @@
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 ui/bindings/clickoutsidehandler
7
- */
8
- import type { CallbackOptions, DomEmitter } from '@ckeditor/ckeditor5-utils';
6
+ * @module ui/bindings/clickoutsidehandler
7
+ */
8
+ import type { CallbackOptions, DomEmitter } from "@ckeditor/ckeditor5-utils";
9
9
  /**
10
- * Handles clicking **outside** of a specified set of elements, then fires an action.
11
- *
12
- * **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents
13
- * certain issues when the user keeps holding the mouse button and the UI cannot react
14
- * properly.
15
- *
16
- * @param options Configuration options.
17
- * @param options.emitter The emitter to which this behavior should be added.
18
- * @param options.activator Function returning a `Boolean`, to determine whether the handler is active.
19
- * @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements
20
- * that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.
21
- * @param options.callback An action executed by the handler.
22
- * @param options.listenerOptions Additional options for the listener (like priority).
23
- */
10
+ * Handles clicking **outside** of a specified set of elements, then fires an action.
11
+ *
12
+ * **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents
13
+ * certain issues when the user keeps holding the mouse button and the UI cannot react
14
+ * properly.
15
+ *
16
+ * @param options Configuration options.
17
+ * @param options.emitter The emitter to which this behavior should be added.
18
+ * @param options.activator Function returning a `Boolean`, to determine whether the handler is active.
19
+ * @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements
20
+ * that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.
21
+ * @param options.callback An action executed by the handler.
22
+ * @param options.listenerOptions Additional options for the listener (like priority).
23
+ */
24
24
  export declare function clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }: {
25
- emitter: DomEmitter;
26
- activator: () => boolean;
27
- contextElements: Array<Element> | (() => Array<Element>);
28
- callback: () => void;
29
- listenerOptions?: CallbackOptions;
25
+ emitter: DomEmitter;
26
+ activator: () => boolean;
27
+ contextElements: Array<Element> | (() => Array<Element>);
28
+ callback: () => void;
29
+ listenerOptions?: CallbackOptions;
30
30
  }): void;
@@ -1,41 +1,52 @@
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 ui/bindings/csstransitiondisablermixin
7
- */
8
- import type { Constructor, Mixed } from '@ckeditor/ckeditor5-utils';
9
- import { type View } from '../view.js';
6
+ * @module ui/bindings/csstransitiondisablermixin
7
+ */
8
+ import type { Constructor, Mixed } from "@ckeditor/ckeditor5-utils";
9
+ import { type View } from "../view.js";
10
10
  /**
11
- * A mixin that brings the possibility to temporarily disable CSS transitions using
12
- * {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen
13
- * when the view is first displayed but they should work normal in other cases.
14
- *
15
- * The methods to control the CSS transitions are:
16
- * * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the
17
- * {@link module:ui/view~View#element view element}.
18
- * * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the
19
- * {@link module:ui/view~View#element view element}.
20
- *
21
- * The usage comes down to:
22
- *
23
- * ```ts
24
- * const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );
25
- * const view = new MyViewWithCssTransitionDisabler();
26
- *
27
- * // ...
28
- *
29
- * view.disableCssTransitions();
30
- * view.show();
31
- * view.enableCssTransitions();
32
- * ```
33
- *
34
- * @param view View instance that should get this functionality.
35
- */
36
- export declare function CssTransitionDisablerMixin<Base extends Constructor<View>>(view: Base): Mixed<Base, ViewWithCssTransitionDisabler>;
11
+ * Constructor returned by {@link ~CssTransitionDisablerMixin}. Use it to name a mixin base class before extending it.
12
+ *
13
+ * ```ts
14
+ * const MyCssTransitionDisablerBase: CssTransitionDisablerMixinConstructor<typeof BaseClass> =
15
+ * CssTransitionDisablerMixin( BaseClass );
16
+ *
17
+ * class MyCssTransitionDisabler extends MyCssTransitionDisablerBase {}
18
+ * ```
19
+ */
20
+ export type CssTransitionDisablerMixinConstructor<Base extends Constructor<View>> = Mixed<Base, ViewWithCssTransitionDisabler>;
21
+ /**
22
+ * A mixin that brings the possibility to temporarily disable CSS transitions using
23
+ * {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen
24
+ * when the view is first displayed but they should work normal in other cases.
25
+ *
26
+ * The methods to control the CSS transitions are:
27
+ * * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the
28
+ * {@link module:ui/view~View#element view element}.
29
+ * * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the
30
+ * {@link module:ui/view~View#element view element}.
31
+ *
32
+ * The usage comes down to:
33
+ *
34
+ * ```ts
35
+ * const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );
36
+ * const view = new MyViewWithCssTransitionDisabler();
37
+ *
38
+ * // ...
39
+ *
40
+ * view.disableCssTransitions();
41
+ * view.show();
42
+ * view.enableCssTransitions();
43
+ * ```
44
+ *
45
+ * @param view View instance that should get this functionality.
46
+ */
47
+ export declare function CssTransitionDisablerMixin<Base extends Constructor<View>>(view: Base): CssTransitionDisablerMixinConstructor<Base>;
37
48
  export declare class ViewWithCssTransitionDisabler extends View {
38
- disableCssTransitions(): void;
39
- enableCssTransitions(): void;
40
- protected initializeCssTransitionDisablerMixin(): void;
49
+ disableCssTransitions(): void;
50
+ enableCssTransitions(): void;
51
+ protected initializeCssTransitionDisablerMixin(): void;
41
52
  }
@@ -1,46 +1,54 @@
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 ui/bindings/draggableviewmixin
7
- */
8
- import { type View } from '../view.js';
9
- import { type Constructor, type Mixed } from '@ckeditor/ckeditor5-utils';
6
+ * @module ui/bindings/draggableviewmixin
7
+ */
8
+ import { type View } from "../view.js";
9
+ import { type Constructor, type Mixed } from "@ckeditor/ckeditor5-utils";
10
10
  /**
11
- * A mixin that brings the possibility to observe dragging of the view element.
12
- * The view has to implement the {@link ~DraggableView} interface to use it:
13
- *
14
- * ```js
15
- * export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {
16
- * // ...
17
- * }
18
- * ```
19
- *
20
- * Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:
21
- * * `mousedown` and `touchstart` on the view element - starting the dragging.
22
- * * `mousemove` and `touchmove` on the document - updating the view coordinates.
23
- * * `mouseup` and `touchend` on the document - stopping the dragging.
24
- *
25
- * The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -
26
- * it is up to the developer to implement it.
27
- */
28
- export declare function DraggableViewMixin<Base extends Constructor<View>>(view: Base): Mixed<Base, DraggableView>;
11
+ * Constructor returned by {@link ~DraggableViewMixin}. Use it to name a mixin base class before extending it.
12
+ *
13
+ * ```ts
14
+ * const MyDraggableViewBase: DraggableViewMixinConstructor<typeof BaseClass> = DraggableViewMixin( BaseClass );
15
+ *
16
+ * class MyDraggableView extends MyDraggableViewBase {}
17
+ * ```
18
+ */
19
+ export type DraggableViewMixinConstructor<Base extends Constructor<View>> = Mixed<Base, DraggableView>;
29
20
  /**
30
- * An interface that should be implemented by views that want to be draggable.
31
- */
21
+ * A mixin that brings the possibility to observe dragging of the view element.
22
+ * The view has to implement the {@link ~DraggableView} interface to use it:
23
+ *
24
+ * ```js
25
+ * export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {
26
+ * // ...
27
+ * }
28
+ * ```
29
+ *
30
+ * Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:
31
+ * * `mousedown` and `touchstart` on the view element - starting the dragging.
32
+ * * `mousemove` and `touchmove` on the document - updating the view coordinates.
33
+ * * `mouseup` and `touchend` on the document - stopping the dragging.
34
+ *
35
+ * The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -
36
+ * it is up to the developer to implement it.
37
+ */
38
+ export declare function DraggableViewMixin<Base extends Constructor<View>>(view: Base): DraggableViewMixinConstructor<Base>;
39
+ /**
40
+ * An interface that should be implemented by views that want to be draggable.
41
+ */
32
42
  export interface DraggableView extends View {
33
- get dragHandleElement(): HTMLElement | null;
43
+ get dragHandleElement(): HTMLElement | null;
34
44
  }
35
45
  /**
36
- * An event data object for the {@link ~DraggableView} `drag` event. Fired when the view is dragged.
37
- */
46
+ * An event data object for the {@link ~DraggableView} `drag` event. Fired when the view is dragged.
47
+ */
38
48
  export type DraggableViewDragEvent = {
39
- name: 'drag';
40
- args: [
41
- {
42
- deltaX: number;
43
- deltaY: number;
44
- }
45
- ];
49
+ name: "drag";
50
+ args: [{
51
+ deltaX: number;
52
+ deltaY: number;
53
+ }];
46
54
  };
@@ -1,34 +1,34 @@
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 ui/bindings/preventdefault
7
- */
8
- import type { ListenerBinding } from '../template.js';
9
- import { type View } from '../view.js';
6
+ * @module ui/bindings/preventdefault
7
+ */
8
+ import type { ListenerBinding } from "../template.js";
9
+ import { type View } from "../view.js";
10
10
  /**
11
- * A helper which executes a native `Event.preventDefault()` if the target of an event equals the
12
- * {@link module:ui/view~View#element element of the view}. It shortens the definition of a
13
- * {@link module:ui/view~View#template template}.
14
- *
15
- * ```ts
16
- * // In a class extending View.
17
- * import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
18
- *
19
- * // ...
20
- *
21
- * this.setTemplate( {
22
- * tag: 'div',
23
- *
24
- * on: {
25
- * // Prevent the default mousedown action on this view.
26
- * mousedown: preventDefault( this )
27
- * }
28
- * } );
29
- * ```
30
- *
31
- * @param view View instance that defines the template.
32
- * @internal
33
- */
11
+ * A helper which executes a native `Event.preventDefault()` if the target of an event equals the
12
+ * {@link module:ui/view~View#element element of the view}. It shortens the definition of a
13
+ * {@link module:ui/view~View#template template}.
14
+ *
15
+ * ```ts
16
+ * // In a class extending View.
17
+ * import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
18
+ *
19
+ * // ...
20
+ *
21
+ * this.setTemplate( {
22
+ * tag: 'div',
23
+ *
24
+ * on: {
25
+ * // Prevent the default mousedown action on this view.
26
+ * mousedown: preventDefault( this )
27
+ * }
28
+ * } );
29
+ * ```
30
+ *
31
+ * @param view View instance that defines the template.
32
+ * @internal
33
+ */
34
34
  export declare function preventDefault(view: View): ListenerBinding;