@ckeditor/ckeditor5-ui 45.2.1 → 46.0.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.
- package/dist/index-editor.css +19 -19
- package/dist/index.css +34 -34
- package/dist/index.css.map +1 -1
- package/dist/index.js +4994 -4957
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/arialiveannouncer.d.ts +6 -7
- package/src/arialiveannouncer.js +2 -2
- package/src/autocomplete/autocompleteview.d.ts +4 -4
- package/src/autocomplete/autocompleteview.js +2 -2
- package/src/badge/badge.d.ts +2 -2
- package/src/badge/badge.js +2 -2
- package/src/bindings/addkeyboardhandlingforgrid.d.ts +2 -2
- package/src/bindings/addkeyboardhandlingforgrid.js +1 -1
- package/src/bindings/clickoutsidehandler.d.ts +1 -1
- package/src/bindings/clickoutsidehandler.js +1 -1
- package/src/bindings/csstransitiondisablermixin.d.ts +5 -4
- package/src/bindings/csstransitiondisablermixin.js +11 -8
- package/src/bindings/draggableviewmixin.d.ts +3 -3
- package/src/bindings/draggableviewmixin.js +2 -2
- package/src/bindings/preventdefault.d.ts +4 -3
- package/src/bindings/preventdefault.js +3 -2
- package/src/bindings/submithandler.d.ts +3 -3
- package/src/bindings/submithandler.js +2 -2
- package/src/button/button.d.ts +1 -1
- package/src/button/buttonlabel.d.ts +2 -2
- package/src/button/buttonlabelview.d.ts +3 -3
- package/src/button/buttonlabelview.js +2 -2
- package/src/button/buttonview.d.ts +6 -6
- package/src/button/buttonview.js +4 -4
- package/src/button/filedialogbuttonview.d.ts +17 -12
- package/src/button/filedialogbuttonview.js +5 -13
- package/src/button/listitembuttonview.d.ts +8 -5
- package/src/button/listitembuttonview.js +8 -5
- package/src/button/switchbuttonview.d.ts +3 -3
- package/src/button/switchbuttonview.js +3 -3
- package/src/collapsible/collapsibleview.d.ts +4 -4
- package/src/collapsible/collapsibleview.js +3 -3
- package/src/colorgrid/colorgridview.d.ts +5 -5
- package/src/colorgrid/colorgridview.js +4 -4
- package/src/colorgrid/colortileview.d.ts +2 -2
- package/src/colorgrid/colortileview.js +2 -2
- package/src/colorpicker/colorpickerview.d.ts +8 -8
- package/src/colorpicker/colorpickerview.js +6 -5
- package/src/colorpicker/utils.d.ts +3 -0
- package/src/colorpicker/utils.js +4 -4
- package/src/colorselector/colorgridsfragmentview.d.ts +6 -6
- package/src/colorselector/colorgridsfragmentview.js +7 -7
- package/src/colorselector/colorpickerfragmentview.d.ts +5 -5
- package/src/colorselector/colorpickerfragmentview.js +4 -4
- package/src/colorselector/colorselectorview.d.ts +6 -6
- package/src/colorselector/colorselectorview.js +6 -6
- package/src/colorselector/documentcolorcollection.d.ts +1 -1
- package/src/colorselector/documentcolorcollection.js +1 -1
- package/src/componentfactory.d.ts +2 -2
- package/src/componentfactory.js +1 -1
- package/src/dialog/dialog.d.ts +3 -3
- package/src/dialog/dialog.js +2 -2
- package/src/dialog/dialogactionsview.d.ts +6 -6
- package/src/dialog/dialogactionsview.js +5 -5
- package/src/dialog/dialogcontentview.d.ts +3 -3
- package/src/dialog/dialogcontentview.js +2 -2
- package/src/dialog/dialogview.d.ts +8 -8
- package/src/dialog/dialogview.js +9 -9
- package/src/dropdown/button/dropdownbutton.d.ts +3 -3
- package/src/dropdown/button/dropdownbuttonview.d.ts +4 -4
- package/src/dropdown/button/dropdownbuttonview.js +3 -3
- package/src/dropdown/button/splitbuttonview.d.ts +6 -6
- package/src/dropdown/button/splitbuttonview.js +3 -3
- package/src/dropdown/dropdownpanelfocusable.d.ts +1 -1
- package/src/dropdown/dropdownpanelview.d.ts +4 -4
- package/src/dropdown/dropdownpanelview.js +2 -2
- package/src/dropdown/dropdownview.d.ts +7 -7
- package/src/dropdown/dropdownview.js +2 -2
- package/src/dropdown/menu/dropdownmenubehaviors.d.ts +8 -2
- package/src/dropdown/menu/dropdownmenubehaviors.js +7 -1
- package/src/dropdown/menu/dropdownmenubuttonview.d.ts +3 -3
- package/src/dropdown/menu/dropdownmenubuttonview.js +3 -3
- package/src/dropdown/menu/dropdownmenulistitembuttonview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenulistitembuttonview.js +2 -2
- package/src/dropdown/menu/dropdownmenulistitemview.d.ts +4 -4
- package/src/dropdown/menu/dropdownmenulistitemview.js +3 -3
- package/src/dropdown/menu/dropdownmenulistview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenulistview.js +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.js +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenuview.d.ts +6 -6
- package/src/dropdown/menu/dropdownmenunestedmenuview.js +5 -5
- package/src/dropdown/menu/dropdownmenurootlistview.d.ts +5 -5
- package/src/dropdown/menu/dropdownmenurootlistview.js +5 -5
- package/src/dropdown/utils.d.ts +7 -7
- package/src/dropdown/utils.js +14 -14
- package/src/editableui/editableuiview.d.ts +2 -2
- package/src/editableui/editableuiview.js +2 -2
- package/src/editableui/inline/inlineeditableuiview.d.ts +3 -4
- package/src/editableui/inline/inlineeditableuiview.js +2 -2
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +3 -3
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +5 -5
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +2 -2
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.js +3 -3
- package/src/editorui/bodycollection.d.ts +3 -3
- package/src/editorui/bodycollection.js +3 -3
- package/src/editorui/boxed/boxededitoruiview.d.ts +3 -3
- package/src/editorui/boxed/boxededitoruiview.js +3 -3
- package/src/editorui/editorui.d.ts +10 -16
- package/src/editorui/editorui.js +6 -25
- package/src/editorui/editoruiview.d.ts +6 -6
- package/src/editorui/editoruiview.js +3 -3
- package/src/editorui/evaluationbadge.d.ts +3 -3
- package/src/editorui/evaluationbadge.js +3 -3
- package/src/editorui/poweredby.d.ts +4 -6
- package/src/editorui/poweredby.js +4 -4
- package/src/focuscycler.d.ts +3 -3
- package/src/focuscycler.js +1 -1
- package/src/formheader/formheaderview.d.ts +4 -4
- package/src/formheader/formheaderview.js +3 -3
- package/src/formrow/formrowview.d.ts +4 -4
- package/src/formrow/formrowview.js +2 -2
- package/src/highlightedtext/buttonlabelwithhighlightview.d.ts +3 -3
- package/src/highlightedtext/buttonlabelwithhighlightview.js +2 -2
- package/src/highlightedtext/highlightedtextview.d.ts +2 -2
- package/src/highlightedtext/highlightedtextview.js +2 -2
- package/src/highlightedtext/labelwithhighlightview.d.ts +3 -3
- package/src/highlightedtext/labelwithhighlightview.js +2 -2
- package/src/icon/iconview.d.ts +2 -2
- package/src/icon/iconview.js +2 -2
- package/src/iframe/iframeview.d.ts +2 -2
- package/src/iframe/iframeview.js +2 -2
- package/src/index.d.ts +128 -85
- package/src/index.js +122 -82
- package/src/input/inputbase.d.ts +2 -2
- package/src/input/inputbase.js +2 -2
- package/src/input/inputview.d.ts +2 -2
- package/src/input/inputview.js +2 -2
- package/src/inputnumber/inputnumberview.d.ts +2 -2
- package/src/inputnumber/inputnumberview.js +2 -2
- package/src/inputtext/inputtextview.d.ts +2 -2
- package/src/inputtext/inputtextview.js +2 -2
- package/src/label/labelview.d.ts +2 -2
- package/src/label/labelview.js +2 -2
- package/src/labeledfield/labeledfieldview.d.ts +4 -4
- package/src/labeledfield/labeledfieldview.js +3 -3
- package/src/labeledfield/utils.d.ts +4 -4
- package/src/labeledfield/utils.js +3 -3
- package/src/labeledinput/labeledinputview.d.ts +4 -4
- package/src/labeledinput/labeledinputview.js +3 -3
- package/src/legacyerrors.d.ts +5 -0
- package/src/legacyerrors.js +20 -0
- package/src/list/listitemgroupview.d.ts +5 -5
- package/src/list/listitemgroupview.js +5 -5
- package/src/list/listitemview.d.ts +3 -3
- package/src/list/listitemview.js +2 -2
- package/src/list/listseparatorview.d.ts +2 -2
- package/src/list/listseparatorview.js +2 -2
- package/src/list/listview.d.ts +7 -7
- package/src/list/listview.js +6 -6
- package/src/menubar/menubarmenubuttonview.d.ts +3 -3
- package/src/menubar/menubarmenubuttonview.js +3 -3
- package/src/menubar/menubarmenulistitembuttonview.d.ts +2 -2
- package/src/menubar/menubarmenulistitembuttonview.js +2 -2
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +1 -1
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +1 -1
- package/src/menubar/menubarmenulistitemview.d.ts +3 -3
- package/src/menubar/menubarmenulistitemview.js +2 -2
- package/src/menubar/menubarmenulistview.d.ts +2 -2
- package/src/menubar/menubarmenulistview.js +5 -5
- package/src/menubar/menubarmenupanelview.d.ts +3 -3
- package/src/menubar/menubarmenupanelview.js +2 -2
- package/src/menubar/menubarmenuview.d.ts +4 -4
- package/src/menubar/menubarmenuview.js +4 -4
- package/src/menubar/menubarview.d.ts +6 -7
- package/src/menubar/menubarview.js +9 -9
- package/src/menubar/utils.d.ts +10 -3
- package/src/menubar/utils.js +10 -2
- package/src/model.d.ts +2 -2
- package/src/model.js +1 -1
- package/src/notification/notification.d.ts +1 -1
- package/src/notification/notification.js +1 -1
- package/src/panel/balloon/balloonpanelview.d.ts +13 -13
- package/src/panel/balloon/balloonpanelview.js +9 -9
- package/src/panel/balloon/contextualballoon.d.ts +14 -13
- package/src/panel/balloon/contextualballoon.js +8 -7
- package/src/panel/sticky/stickypanelview.d.ts +3 -3
- package/src/panel/sticky/stickypanelview.js +3 -3
- package/src/search/filteredview.d.ts +1 -1
- package/src/search/filtergroupanditemnames.d.ts +5 -5
- package/src/search/filtergroupanditemnames.js +1 -1
- package/src/search/searchinfoview.d.ts +2 -2
- package/src/search/searchinfoview.js +2 -2
- package/src/search/searchresultsview.d.ts +4 -4
- package/src/search/searchresultsview.js +3 -3
- package/src/search/text/searchtextqueryview.d.ts +5 -5
- package/src/search/text/searchtextqueryview.js +4 -4
- package/src/search/text/searchtextview.d.ts +9 -9
- package/src/search/text/searchtextview.js +6 -6
- package/src/spinner/spinnerview.d.ts +2 -2
- package/src/spinner/spinnerview.js +2 -2
- package/src/template.d.ts +6 -5
- package/src/template.js +4 -4
- package/src/textarea/textareaview.d.ts +2 -2
- package/src/textarea/textareaview.js +2 -2
- package/src/toolbar/balloon/balloontoolbar.d.ts +3 -3
- package/src/toolbar/balloon/balloontoolbar.js +5 -5
- package/src/toolbar/block/blockbuttonview.d.ts +2 -2
- package/src/toolbar/block/blockbuttonview.js +2 -2
- package/src/toolbar/block/blocktoolbar.d.ts +6 -6
- package/src/toolbar/block/blocktoolbar.js +8 -8
- package/src/toolbar/normalizetoolbarconfig.d.ts +1 -1
- package/src/toolbar/normalizetoolbarconfig.js +1 -1
- package/src/toolbar/toolbarlinebreakview.d.ts +2 -2
- package/src/toolbar/toolbarlinebreakview.js +2 -2
- package/src/toolbar/toolbarseparatorview.d.ts +2 -2
- package/src/toolbar/toolbarseparatorview.js +2 -2
- package/src/toolbar/toolbarview.d.ts +10 -7
- package/src/toolbar/toolbarview.js +11 -8
- package/src/tooltipmanager.d.ts +3 -3
- package/src/tooltipmanager.js +3 -3
- package/src/view.d.ts +3 -3
- package/src/view.js +3 -3
- package/src/viewcollection.d.ts +2 -2
- package/src/viewcollection.js +1 -1
- package/src/bindings/injectcsstransitiondisabler.d.ts +0 -59
- package/src/bindings/injectcsstransitiondisabler.js +0 -71
@@ -5,7 +5,7 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/block/blockbuttonview
|
7
7
|
*/
|
8
|
-
import ButtonView from '../../button/buttonview.js';
|
8
|
+
import { ButtonView } from '../../button/buttonview.js';
|
9
9
|
import { type Locale } from '@ckeditor/ckeditor5-utils';
|
10
10
|
import '../../../theme/components/toolbar/blocktoolbar.css';
|
11
11
|
/**
|
@@ -15,7 +15,7 @@ import '../../../theme/components/toolbar/blocktoolbar.css';
|
|
15
15
|
*
|
16
16
|
* See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.
|
17
17
|
*/
|
18
|
-
export
|
18
|
+
export declare class BlockButtonView extends ButtonView {
|
19
19
|
/**
|
20
20
|
* Top offset.
|
21
21
|
*
|
@@ -5,7 +5,7 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/block/blockbuttonview
|
7
7
|
*/
|
8
|
-
import ButtonView from '../../button/buttonview.js';
|
8
|
+
import { ButtonView } from '../../button/buttonview.js';
|
9
9
|
import { toUnit } from '@ckeditor/ckeditor5-utils';
|
10
10
|
import '../../../theme/components/toolbar/blocktoolbar.css';
|
11
11
|
const toPx = /* #__PURE__ */ toUnit('px');
|
@@ -16,7 +16,7 @@ const toPx = /* #__PURE__ */ toUnit('px');
|
|
16
16
|
*
|
17
17
|
* See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.
|
18
18
|
*/
|
19
|
-
export
|
19
|
+
export class BlockButtonView extends ButtonView {
|
20
20
|
/**
|
21
21
|
* @inheritDoc
|
22
22
|
*/
|
@@ -6,9 +6,9 @@
|
|
6
6
|
* @module ui/toolbar/block/blocktoolbar
|
7
7
|
*/
|
8
8
|
import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
|
9
|
-
import BlockButtonView from './blockbuttonview.js';
|
10
|
-
import BalloonPanelView from '../../panel/balloon/balloonpanelview.js';
|
11
|
-
import ToolbarView from '../toolbarview.js';
|
9
|
+
import { BlockButtonView } from './blockbuttonview.js';
|
10
|
+
import { BalloonPanelView } from '../../panel/balloon/balloonpanelview.js';
|
11
|
+
import { ToolbarView } from '../toolbarview.js';
|
12
12
|
/**
|
13
13
|
* The block toolbar plugin.
|
14
14
|
*
|
@@ -16,11 +16,11 @@ import ToolbarView from '../toolbarview.js';
|
|
16
16
|
* Upon clicking the button, a dropdown providing access to editor features shows up, as configured in
|
17
17
|
* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.
|
18
18
|
*
|
19
|
-
* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~
|
19
|
+
* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~ModelSchema}
|
20
20
|
* as `$block` for which the toolbar provides at least one option.
|
21
21
|
*
|
22
22
|
* By default, the button is attached so its right boundary is touching the
|
23
|
-
* {@link module:engine/view/editableelement~
|
23
|
+
* {@link module:engine/view/editableelement~ViewEditableElement}:
|
24
24
|
*
|
25
25
|
* ```
|
26
26
|
* __ |
|
@@ -56,7 +56,7 @@ import ToolbarView from '../toolbarview.js';
|
|
56
56
|
* }
|
57
57
|
* ```
|
58
58
|
*/
|
59
|
-
export
|
59
|
+
export declare class BlockToolbar extends Plugin {
|
60
60
|
/**
|
61
61
|
* The toolbar view.
|
62
62
|
*/
|
@@ -7,11 +7,11 @@
|
|
7
7
|
*/
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
9
9
|
import { getAncestors, global, Rect, ResizeObserver, toUnit } from '@ckeditor/ckeditor5-utils';
|
10
|
-
import BlockButtonView from './blockbuttonview.js';
|
11
|
-
import BalloonPanelView from '../../panel/balloon/balloonpanelview.js';
|
12
|
-
import ToolbarView,
|
13
|
-
import clickOutsideHandler from '../../bindings/clickoutsidehandler.js';
|
14
|
-
import normalizeToolbarConfig from '../normalizetoolbarconfig.js';
|
10
|
+
import { BlockButtonView } from './blockbuttonview.js';
|
11
|
+
import { BalloonPanelView } from '../../panel/balloon/balloonpanelview.js';
|
12
|
+
import { ToolbarView, NESTED_TOOLBAR_ICONS } from '../toolbarview.js';
|
13
|
+
import { clickOutsideHandler } from '../../bindings/clickoutsidehandler.js';
|
14
|
+
import { normalizeToolbarConfig } from '../normalizetoolbarconfig.js';
|
15
15
|
const toPx = /* #__PURE__ */ toUnit('px');
|
16
16
|
/**
|
17
17
|
* The block toolbar plugin.
|
@@ -20,11 +20,11 @@ const toPx = /* #__PURE__ */ toUnit('px');
|
|
20
20
|
* Upon clicking the button, a dropdown providing access to editor features shows up, as configured in
|
21
21
|
* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.
|
22
22
|
*
|
23
|
-
* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~
|
23
|
+
* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~ModelSchema}
|
24
24
|
* as `$block` for which the toolbar provides at least one option.
|
25
25
|
*
|
26
26
|
* By default, the button is attached so its right boundary is touching the
|
27
|
-
* {@link module:engine/view/editableelement~
|
27
|
+
* {@link module:engine/view/editableelement~ViewEditableElement}:
|
28
28
|
*
|
29
29
|
* ```
|
30
30
|
* __ |
|
@@ -60,7 +60,7 @@ const toPx = /* #__PURE__ */ toUnit('px');
|
|
60
60
|
* }
|
61
61
|
* ```
|
62
62
|
*/
|
63
|
-
export
|
63
|
+
export class BlockToolbar extends Plugin {
|
64
64
|
/**
|
65
65
|
* The toolbar view.
|
66
66
|
*/
|
@@ -32,7 +32,7 @@ import type { ToolbarConfig, ToolbarConfigItem } from '@ckeditor/ckeditor5-core'
|
|
32
32
|
* @param config The value of `config.toolbar`.
|
33
33
|
* @returns A normalized toolbar config object.
|
34
34
|
*/
|
35
|
-
export
|
35
|
+
export declare function normalizeToolbarConfig(config: ToolbarConfig | undefined): {
|
36
36
|
items: Array<ToolbarConfigItem>;
|
37
37
|
removeItems: Array<string>;
|
38
38
|
shouldNotGroupWhenFull?: boolean;
|
@@ -31,7 +31,7 @@
|
|
31
31
|
* @param config The value of `config.toolbar`.
|
32
32
|
* @returns A normalized toolbar config object.
|
33
33
|
*/
|
34
|
-
export
|
34
|
+
export function normalizeToolbarConfig(config) {
|
35
35
|
if (Array.isArray(config)) {
|
36
36
|
return {
|
37
37
|
items: config,
|
@@ -5,12 +5,12 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarlinebreakview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
10
10
|
/**
|
11
11
|
* The toolbar line break view class.
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export declare class ToolbarLineBreakView extends View {
|
14
14
|
/**
|
15
15
|
* @inheritDoc
|
16
16
|
*/
|
@@ -5,11 +5,11 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarlinebreakview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
/**
|
10
10
|
* The toolbar line break view class.
|
11
11
|
*/
|
12
|
-
export
|
12
|
+
export class ToolbarLineBreakView extends View {
|
13
13
|
/**
|
14
14
|
* @inheritDoc
|
15
15
|
*/
|
@@ -5,12 +5,12 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarseparatorview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
10
10
|
/**
|
11
11
|
* The toolbar separator view class.
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export declare class ToolbarSeparatorView extends View {
|
14
14
|
/**
|
15
15
|
* @inheritDoc
|
16
16
|
*/
|
@@ -5,11 +5,11 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarseparatorview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
/**
|
10
10
|
* The toolbar separator view class.
|
11
11
|
*/
|
12
|
-
export
|
12
|
+
export class ToolbarSeparatorView extends View {
|
13
13
|
/**
|
14
14
|
* @inheritDoc
|
15
15
|
*/
|
@@ -5,19 +5,22 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
import { type FocusableView } from '../focuscycler.js';
|
10
|
-
import type ComponentFactory from '../componentfactory.js';
|
11
|
-
import type ViewCollection from '../viewcollection.js';
|
12
|
-
import type DropdownPanelFocusable from '../dropdown/dropdownpanelfocusable.js';
|
10
|
+
import { type ComponentFactory } from '../componentfactory.js';
|
11
|
+
import { type ViewCollection } from '../viewcollection.js';
|
12
|
+
import { type DropdownPanelFocusable } from '../dropdown/dropdownpanelfocusable.js';
|
13
13
|
import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
|
14
14
|
import type { ToolbarConfig } from '@ckeditor/ckeditor5-core';
|
15
15
|
import '../../theme/components/toolbar/toolbar.css';
|
16
|
+
/**
|
17
|
+
* @internal
|
18
|
+
*/
|
16
19
|
export declare const NESTED_TOOLBAR_ICONS: Record<string, string | undefined>;
|
17
20
|
/**
|
18
21
|
* The toolbar view class.
|
19
22
|
*/
|
20
|
-
export
|
23
|
+
export declare class ToolbarView extends View implements DropdownPanelFocusable {
|
21
24
|
/**
|
22
25
|
* A reference to the options object passed to the constructor.
|
23
26
|
*/
|
@@ -223,7 +226,7 @@ export type ToolbarViewGroupedItemsUpdateEvent = {
|
|
223
226
|
* An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its
|
224
227
|
* {@link module:ui/toolbar/toolbarview~ToolbarView#items}.
|
225
228
|
*/
|
226
|
-
declare class ItemsView extends View {
|
229
|
+
export declare class ItemsView extends View {
|
227
230
|
/**
|
228
231
|
* A collection of items (buttons, dropdowns, etc.).
|
229
232
|
*/
|
@@ -262,6 +265,7 @@ export interface ToolbarOptions {
|
|
262
265
|
* {@link module:ui/toolbar/toolbarview~ToolbarView#element} template or
|
263
266
|
* {@link module:ui/toolbar/toolbarview~ToolbarView#render rendering}. They can be enabled
|
264
267
|
* conditionally, e.g. depending on the configuration of the toolbar.
|
268
|
+
* @internal
|
265
269
|
*/
|
266
270
|
export interface ToolbarBehavior {
|
267
271
|
/**
|
@@ -284,4 +288,3 @@ export interface ToolbarBehavior {
|
|
284
288
|
*/
|
285
289
|
type: 'dynamic' | 'static';
|
286
290
|
}
|
287
|
-
export {};
|
@@ -5,17 +5,20 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/toolbar/toolbarview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import FocusCycler,
|
10
|
-
import ToolbarSeparatorView from './toolbarseparatorview.js';
|
11
|
-
import ToolbarLineBreakView from './toolbarlinebreakview.js';
|
12
|
-
import preventDefault from '../bindings/preventdefault.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { FocusCycler, isFocusable } from '../focuscycler.js';
|
10
|
+
import { ToolbarSeparatorView } from './toolbarseparatorview.js';
|
11
|
+
import { ToolbarLineBreakView } from './toolbarlinebreakview.js';
|
12
|
+
import { preventDefault } from '../bindings/preventdefault.js';
|
13
13
|
import { createDropdown, addToolbarToDropdown } from '../dropdown/utils.js';
|
14
|
-
import normalizeToolbarConfig from './normalizetoolbarconfig.js';
|
14
|
+
import { normalizeToolbarConfig } from './normalizetoolbarconfig.js';
|
15
15
|
import { FocusTracker, KeystrokeHandler, Rect, ResizeObserver, global, isVisible, logWarning } from '@ckeditor/ckeditor5-utils';
|
16
16
|
import { IconAlignLeft, IconBold, IconImportExport, IconParagraph, IconPlus, IconText, IconThreeVerticalDots, IconPilcrow, IconDragIndicator } from '@ckeditor/ckeditor5-icons';
|
17
17
|
import { isObject } from 'es-toolkit/compat';
|
18
18
|
import '../../theme/components/toolbar/toolbar.css';
|
19
|
+
/**
|
20
|
+
* @internal
|
21
|
+
*/
|
19
22
|
export const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (() => ({
|
20
23
|
alignLeft: IconAlignLeft,
|
21
24
|
bold: IconBold,
|
@@ -30,7 +33,7 @@ export const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (() => ({
|
|
30
33
|
/**
|
31
34
|
* The toolbar view class.
|
32
35
|
*/
|
33
|
-
export
|
36
|
+
export class ToolbarView extends View {
|
34
37
|
/**
|
35
38
|
* A reference to the options object passed to the constructor.
|
36
39
|
*/
|
@@ -429,7 +432,7 @@ export default class ToolbarView extends View {
|
|
429
432
|
* An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its
|
430
433
|
* {@link module:ui/toolbar/toolbarview~ToolbarView#items}.
|
431
434
|
*/
|
432
|
-
class ItemsView extends View {
|
435
|
+
export class ItemsView extends View {
|
433
436
|
/**
|
434
437
|
* A collection of items (buttons, dropdowns, etc.).
|
435
438
|
*/
|
package/src/tooltipmanager.d.ts
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/tooltipmanager
|
7
7
|
*/
|
8
|
-
import View from './view.js';
|
9
|
-
import BalloonPanelView from './panel/balloon/balloonpanelview.js';
|
8
|
+
import { View } from './view.js';
|
9
|
+
import { BalloonPanelView } from './panel/balloon/balloonpanelview.js';
|
10
10
|
import { type PositioningFunction } from '@ckeditor/ckeditor5-utils';
|
11
11
|
import type { Editor } from '@ckeditor/ckeditor5-core';
|
12
12
|
import '../theme/components/tooltip/tooltip.css';
|
@@ -76,7 +76,7 @@ declare const TooltipManager_base: {
|
|
76
76
|
* **Note**: This class is a singleton. All editor instances re-use the same instance loaded by
|
77
77
|
* {@link module:ui/editorui/editorui~EditorUI} of the first editor.
|
78
78
|
*/
|
79
|
-
export
|
79
|
+
export declare class TooltipManager extends /* #__PURE__ */ TooltipManager_base {
|
80
80
|
/**
|
81
81
|
* The view rendering text of the tooltip.
|
82
82
|
*/
|
package/src/tooltipmanager.js
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/tooltipmanager
|
7
7
|
*/
|
8
|
-
import View from './view.js';
|
9
|
-
import BalloonPanelView from './panel/balloon/balloonpanelview.js';
|
8
|
+
import { View } from './view.js';
|
9
|
+
import { BalloonPanelView } from './panel/balloon/balloonpanelview.js';
|
10
10
|
import { DomEmitterMixin, first, global, isVisible } from '@ckeditor/ckeditor5-utils';
|
11
11
|
import { isElement, debounce } from 'es-toolkit/compat';
|
12
12
|
import '../theme/components/tooltip/tooltip.css';
|
@@ -421,7 +421,7 @@ class TooltipManager extends /* #__PURE__ */ DomEmitterMixin() {
|
|
421
421
|
});
|
422
422
|
}
|
423
423
|
}
|
424
|
-
export
|
424
|
+
export { TooltipManager };
|
425
425
|
function getDescendantWithTooltip(element) {
|
426
426
|
if (!isElement(element)) {
|
427
427
|
return null;
|
package/src/view.d.ts
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/view
|
7
7
|
*/
|
8
|
-
import ViewCollection from './viewcollection.js';
|
9
|
-
import Template,
|
8
|
+
import { ViewCollection } from './viewcollection.js';
|
9
|
+
import { Template, type BindChain, type TemplateDefinition } from './template.js';
|
10
10
|
import { Collection, type DecoratedMethodEvent, type Locale, type LocaleTranslate } from '@ckeditor/ckeditor5-utils';
|
11
11
|
import '../theme/globals/globals.css';
|
12
12
|
declare const View_base: import("@ckeditor/ckeditor5-utils").Mixed<{
|
@@ -78,7 +78,7 @@ declare const View_base: import("@ckeditor/ckeditor5-utils").Mixed<{
|
|
78
78
|
* } );
|
79
79
|
* ```
|
80
80
|
*/
|
81
|
-
export
|
81
|
+
export declare class View<TElement extends HTMLElement = HTMLElement> extends /* #__PURE__ */ View_base {
|
82
82
|
/**
|
83
83
|
* An HTML element of the view. `null` until {@link #render rendered}
|
84
84
|
* from the {@link #template}.
|
package/src/view.js
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/view
|
7
7
|
*/
|
8
|
-
import ViewCollection from './viewcollection.js';
|
9
|
-
import Template from './template.js';
|
8
|
+
import { ViewCollection } from './viewcollection.js';
|
9
|
+
import { Template } from './template.js';
|
10
10
|
import { CKEditorError, Collection, DomEmitterMixin, ObservableMixin, isIterable } from '@ckeditor/ckeditor5-utils';
|
11
11
|
import '../theme/globals/globals.css';
|
12
12
|
/**
|
@@ -74,7 +74,7 @@ import '../theme/globals/globals.css';
|
|
74
74
|
* } );
|
75
75
|
* ```
|
76
76
|
*/
|
77
|
-
export
|
77
|
+
export class View extends /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin()) {
|
78
78
|
/**
|
79
79
|
* An HTML element of the view. `null` until {@link #render rendered}
|
80
80
|
* from the {@link #template}.
|
package/src/viewcollection.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/viewcollection
|
7
7
|
*/
|
8
8
|
import { Collection, type EmitterMixinDelegateChain } from '@ckeditor/ckeditor5-utils';
|
9
|
-
import type View from './view.js';
|
9
|
+
import { type View } from './view.js';
|
10
10
|
/**
|
11
11
|
* Collects {@link module:ui/view~View} instances.
|
12
12
|
*
|
@@ -47,7 +47,7 @@ import type View from './view.js';
|
|
47
47
|
* **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}
|
48
48
|
* of a {@link module:ui/template~Template template}.
|
49
49
|
*/
|
50
|
-
export
|
50
|
+
export declare class ViewCollection<TView extends View = View> extends Collection<TView> {
|
51
51
|
id?: string;
|
52
52
|
/**
|
53
53
|
* A parent element within which child views are rendered and managed in DOM.
|
package/src/viewcollection.js
CHANGED
@@ -46,7 +46,7 @@ import { CKEditorError, Collection } from '@ckeditor/ckeditor5-utils';
|
|
46
46
|
* **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}
|
47
47
|
* of a {@link module:ui/template~Template template}.
|
48
48
|
*/
|
49
|
-
export
|
49
|
+
export class ViewCollection extends Collection {
|
50
50
|
/**
|
51
51
|
* A parent element within which child views are rendered and managed in DOM.
|
52
52
|
*/
|
@@ -1,59 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2025, 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
|
-
/**
|
6
|
-
* @module ui/bindings/injectcsstransitiondisabler
|
7
|
-
*/
|
8
|
-
import type View from '../view.js';
|
9
|
-
/**
|
10
|
-
* A decorator that brings the possibility to temporarily disable CSS transitions using
|
11
|
-
* {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen
|
12
|
-
* when the view is first displayed but they should work normal in other cases.
|
13
|
-
*
|
14
|
-
* The methods to control the CSS transitions are:
|
15
|
-
* * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the
|
16
|
-
* {@link module:ui/view~View#element view element}.
|
17
|
-
* * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the
|
18
|
-
* {@link module:ui/view~View#element view element}.
|
19
|
-
*
|
20
|
-
* **Note**: This helper extends the {@link module:ui/view~View#template template} and must be used **after**
|
21
|
-
* {@link module:ui/view~View#setTemplate} is called:
|
22
|
-
*
|
23
|
-
* ```ts
|
24
|
-
* import injectCssTransitionDisabler from '@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler';
|
25
|
-
*
|
26
|
-
* class MyView extends View {
|
27
|
-
* constructor() {
|
28
|
-
* super();
|
29
|
-
*
|
30
|
-
* // ...
|
31
|
-
*
|
32
|
-
* this.setTemplate( { ... } );
|
33
|
-
*
|
34
|
-
* // ...
|
35
|
-
*
|
36
|
-
* injectCssTransitionDisabler( this );
|
37
|
-
*
|
38
|
-
* // ...
|
39
|
-
* }
|
40
|
-
* }
|
41
|
-
* ```
|
42
|
-
*
|
43
|
-
* The usage comes down to:
|
44
|
-
*
|
45
|
-
* ```ts
|
46
|
-
* const view = new MyView();
|
47
|
-
*
|
48
|
-
* // ...
|
49
|
-
*
|
50
|
-
* view.disableCssTransitions();
|
51
|
-
* view.show();
|
52
|
-
* view.enableCssTransitions();
|
53
|
-
* ```
|
54
|
-
*
|
55
|
-
* @deprecated
|
56
|
-
* @see module:ui/bindings/csstransitiondisablermixin~CssTransitionDisablerMixin
|
57
|
-
* @param view View instance that should get this functionality.
|
58
|
-
*/
|
59
|
-
export default function injectCssTransitionDisabler(view: View): void;
|
@@ -1,71 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2025, 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
|
-
/**
|
6
|
-
* A decorator that brings the possibility to temporarily disable CSS transitions using
|
7
|
-
* {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen
|
8
|
-
* when the view is first displayed but they should work normal in other cases.
|
9
|
-
*
|
10
|
-
* The methods to control the CSS transitions are:
|
11
|
-
* * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the
|
12
|
-
* {@link module:ui/view~View#element view element}.
|
13
|
-
* * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the
|
14
|
-
* {@link module:ui/view~View#element view element}.
|
15
|
-
*
|
16
|
-
* **Note**: This helper extends the {@link module:ui/view~View#template template} and must be used **after**
|
17
|
-
* {@link module:ui/view~View#setTemplate} is called:
|
18
|
-
*
|
19
|
-
* ```ts
|
20
|
-
* import injectCssTransitionDisabler from '@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler';
|
21
|
-
*
|
22
|
-
* class MyView extends View {
|
23
|
-
* constructor() {
|
24
|
-
* super();
|
25
|
-
*
|
26
|
-
* // ...
|
27
|
-
*
|
28
|
-
* this.setTemplate( { ... } );
|
29
|
-
*
|
30
|
-
* // ...
|
31
|
-
*
|
32
|
-
* injectCssTransitionDisabler( this );
|
33
|
-
*
|
34
|
-
* // ...
|
35
|
-
* }
|
36
|
-
* }
|
37
|
-
* ```
|
38
|
-
*
|
39
|
-
* The usage comes down to:
|
40
|
-
*
|
41
|
-
* ```ts
|
42
|
-
* const view = new MyView();
|
43
|
-
*
|
44
|
-
* // ...
|
45
|
-
*
|
46
|
-
* view.disableCssTransitions();
|
47
|
-
* view.show();
|
48
|
-
* view.enableCssTransitions();
|
49
|
-
* ```
|
50
|
-
*
|
51
|
-
* @deprecated
|
52
|
-
* @see module:ui/bindings/csstransitiondisablermixin~CssTransitionDisablerMixin
|
53
|
-
* @param view View instance that should get this functionality.
|
54
|
-
*/
|
55
|
-
export default function injectCssTransitionDisabler(view) {
|
56
|
-
const decorated = view;
|
57
|
-
decorated.set('_isCssTransitionsDisabled', false);
|
58
|
-
decorated.disableCssTransitions = () => {
|
59
|
-
decorated._isCssTransitionsDisabled = true;
|
60
|
-
};
|
61
|
-
decorated.enableCssTransitions = () => {
|
62
|
-
decorated._isCssTransitionsDisabled = false;
|
63
|
-
};
|
64
|
-
decorated.extendTemplate({
|
65
|
-
attributes: {
|
66
|
-
class: [
|
67
|
-
decorated.bindTemplate.if('_isCssTransitionsDisabled', 'ck-transitions-disabled')
|
68
|
-
]
|
69
|
-
}
|
70
|
-
});
|
71
|
-
}
|