@ckeditor/ckeditor5-utils 39.0.2 → 40.0.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.
Files changed (131) hide show
  1. package/package.json +1 -1
  2. package/src/areconnectedthroughproperties.d.ts +11 -11
  3. package/src/areconnectedthroughproperties.js +73 -73
  4. package/src/ckeditorerror.d.ts +123 -123
  5. package/src/ckeditorerror.js +176 -176
  6. package/src/collection.d.ts +427 -427
  7. package/src/collection.js +575 -575
  8. package/src/comparearrays.d.ts +30 -30
  9. package/src/comparearrays.js +47 -47
  10. package/src/config.d.ts +163 -163
  11. package/src/config.js +162 -162
  12. package/src/count.d.ts +18 -18
  13. package/src/count.js +24 -24
  14. package/src/delay.d.ts +19 -19
  15. package/src/delay.js +26 -26
  16. package/src/diff.d.ts +31 -31
  17. package/src/diff.js +115 -115
  18. package/src/difftochanges.d.ts +59 -59
  19. package/src/difftochanges.js +79 -79
  20. package/src/dom/createelement.d.ts +57 -57
  21. package/src/dom/createelement.js +40 -40
  22. package/src/dom/emittermixin.d.ts +142 -142
  23. package/src/dom/emittermixin.js +239 -239
  24. package/src/dom/findclosestscrollableancestor.d.ts +11 -11
  25. package/src/dom/findclosestscrollableancestor.js +31 -31
  26. package/src/dom/getancestors.d.ts +17 -17
  27. package/src/dom/getancestors.js +27 -27
  28. package/src/dom/getborderwidths.d.ts +24 -24
  29. package/src/dom/getborderwidths.js +24 -24
  30. package/src/dom/getcommonancestor.d.ts +12 -12
  31. package/src/dom/getcommonancestor.js +25 -25
  32. package/src/dom/getdatafromelement.d.ts +14 -14
  33. package/src/dom/getdatafromelement.js +20 -20
  34. package/src/dom/getpositionedancestor.d.ts +10 -10
  35. package/src/dom/getpositionedancestor.js +22 -22
  36. package/src/dom/global.d.ts +32 -32
  37. package/src/dom/global.js +35 -35
  38. package/src/dom/indexof.d.ts +14 -14
  39. package/src/dom/indexof.js +21 -21
  40. package/src/dom/insertat.d.ts +15 -15
  41. package/src/dom/insertat.js +17 -17
  42. package/src/dom/iscomment.d.ts +11 -11
  43. package/src/dom/iscomment.js +14 -14
  44. package/src/dom/isnode.d.ts +11 -11
  45. package/src/dom/isnode.js +21 -21
  46. package/src/dom/isrange.d.ts +11 -11
  47. package/src/dom/isrange.js +13 -13
  48. package/src/dom/istext.d.ts +11 -11
  49. package/src/dom/istext.js +13 -13
  50. package/src/dom/isvalidattributename.d.ts +10 -10
  51. package/src/dom/isvalidattributename.js +22 -22
  52. package/src/dom/isvisible.d.ts +18 -18
  53. package/src/dom/isvisible.js +20 -20
  54. package/src/dom/iswindow.d.ts +11 -11
  55. package/src/dom/iswindow.js +22 -22
  56. package/src/dom/position.d.ts +211 -208
  57. package/src/dom/position.js +313 -305
  58. package/src/dom/rect.d.ts +195 -191
  59. package/src/dom/rect.js +474 -388
  60. package/src/dom/remove.d.ts +13 -13
  61. package/src/dom/remove.js +18 -18
  62. package/src/dom/resizeobserver.d.ts +74 -74
  63. package/src/dom/resizeobserver.js +126 -126
  64. package/src/dom/scroll.d.ts +73 -73
  65. package/src/dom/scroll.js +383 -383
  66. package/src/dom/setdatainelement.d.ts +14 -14
  67. package/src/dom/setdatainelement.js +20 -20
  68. package/src/dom/tounit.d.ts +22 -22
  69. package/src/dom/tounit.js +16 -16
  70. package/src/elementreplacer.d.ts +31 -31
  71. package/src/elementreplacer.js +43 -43
  72. package/src/emittermixin.d.ts +312 -312
  73. package/src/emittermixin.js +453 -453
  74. package/src/env.d.ts +117 -117
  75. package/src/env.js +122 -122
  76. package/src/eventinfo.d.ts +58 -58
  77. package/src/eventinfo.js +26 -26
  78. package/src/fastdiff.d.ts +112 -112
  79. package/src/fastdiff.js +248 -248
  80. package/src/first.d.ts +11 -11
  81. package/src/first.js +17 -17
  82. package/src/focustracker.d.ts +75 -75
  83. package/src/focustracker.js +95 -95
  84. package/src/index.d.ts +61 -62
  85. package/src/index.js +60 -61
  86. package/src/inserttopriorityarray.d.ts +30 -30
  87. package/src/inserttopriorityarray.js +21 -21
  88. package/src/isiterable.d.ts +14 -14
  89. package/src/isiterable.js +16 -16
  90. package/src/keyboard.d.ts +126 -126
  91. package/src/keyboard.js +221 -221
  92. package/src/keystrokehandler.d.ts +87 -87
  93. package/src/keystrokehandler.js +122 -122
  94. package/src/language.d.ts +17 -17
  95. package/src/language.js +19 -19
  96. package/src/locale.d.ts +120 -120
  97. package/src/locale.js +76 -76
  98. package/src/mapsequal.d.ts +15 -15
  99. package/src/mapsequal.js +27 -27
  100. package/src/mix.d.ts +85 -85
  101. package/src/mix.js +50 -50
  102. package/src/nth.d.ts +16 -16
  103. package/src/nth.js +24 -24
  104. package/src/objecttomap.d.ts +23 -23
  105. package/src/objecttomap.js +27 -27
  106. package/src/observablemixin.d.ts +560 -560
  107. package/src/observablemixin.js +580 -580
  108. package/src/priorities.d.ts +33 -33
  109. package/src/priorities.js +23 -23
  110. package/src/splicearray.d.ts +26 -26
  111. package/src/splicearray.js +40 -40
  112. package/src/spy.d.ts +21 -21
  113. package/src/spy.js +22 -22
  114. package/src/toarray.d.ts +25 -25
  115. package/src/toarray.js +7 -7
  116. package/src/tomap.d.ts +19 -19
  117. package/src/tomap.js +29 -29
  118. package/src/translation-service.d.ts +168 -168
  119. package/src/translation-service.js +198 -198
  120. package/src/uid.d.ts +15 -15
  121. package/src/uid.js +57 -57
  122. package/src/unicode.d.ts +54 -54
  123. package/src/unicode.js +85 -85
  124. package/src/verifylicense.d.ts +15 -15
  125. package/src/verifylicense.js +87 -87
  126. package/src/version.d.ts +10 -10
  127. package/src/version.js +153 -153
  128. package/src/dom/getelementsintersectionrect.d.ts +0 -14
  129. package/src/dom/getelementsintersectionrect.js +0 -43
  130. package/src/dom/getscrollableancestors.d.ts +0 -14
  131. package/src/dom/getscrollableancestors.js +0 -28
@@ -1,30 +1,30 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import { type PriorityString } from './priorities';
6
- /**
7
- * @module utils/inserttopriorityarray
8
- */
9
- /**
10
- * The priority object descriptor.
11
- *
12
- * ```ts
13
- * const objectWithPriority = {
14
- * priority: 'high'
15
- * }
16
- * ```
17
- */
18
- export interface ObjectWithPriority {
19
- /**
20
- * Priority of the object.
21
- */
22
- priority: PriorityString;
23
- }
24
- /**
25
- * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.
26
- *
27
- * @param objects Array of objects with priority to insert object to.
28
- * @param objectToInsert Object with `priority` property.
29
- */
30
- export default function insertToPriorityArray<T extends ObjectWithPriority>(objects: Array<T>, objectToInsert: T): void;
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { type PriorityString } from './priorities';
6
+ /**
7
+ * @module utils/inserttopriorityarray
8
+ */
9
+ /**
10
+ * The priority object descriptor.
11
+ *
12
+ * ```ts
13
+ * const objectWithPriority = {
14
+ * priority: 'high'
15
+ * }
16
+ * ```
17
+ */
18
+ export interface ObjectWithPriority {
19
+ /**
20
+ * Priority of the object.
21
+ */
22
+ priority: PriorityString;
23
+ }
24
+ /**
25
+ * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.
26
+ *
27
+ * @param objects Array of objects with priority to insert object to.
28
+ * @param objectToInsert Object with `priority` property.
29
+ */
30
+ export default function insertToPriorityArray<T extends ObjectWithPriority>(objects: Array<T>, objectToInsert: T): void;
@@ -1,21 +1,21 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import priorities from './priorities';
6
- /**
7
- * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.
8
- *
9
- * @param objects Array of objects with priority to insert object to.
10
- * @param objectToInsert Object with `priority` property.
11
- */
12
- export default function insertToPriorityArray(objects, objectToInsert) {
13
- const priority = priorities.get(objectToInsert.priority);
14
- for (let i = 0; i < objects.length; i++) {
15
- if (priorities.get(objects[i].priority) < priority) {
16
- objects.splice(i, 0, objectToInsert);
17
- return;
18
- }
19
- }
20
- objects.push(objectToInsert);
21
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import priorities from './priorities';
6
+ /**
7
+ * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.
8
+ *
9
+ * @param objects Array of objects with priority to insert object to.
10
+ * @param objectToInsert Object with `priority` property.
11
+ */
12
+ export default function insertToPriorityArray(objects, objectToInsert) {
13
+ const priority = priorities.get(objectToInsert.priority);
14
+ for (let i = 0; i < objects.length; i++) {
15
+ if (priorities.get(objects[i].priority) < priority) {
16
+ objects.splice(i, 0, objectToInsert);
17
+ return;
18
+ }
19
+ }
20
+ objects.push(objectToInsert);
21
+ }
@@ -1,14 +1,14 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module utils/isiterable
7
- */
8
- /**
9
- * Checks if value implements iterator interface.
10
- *
11
- * @param value The value to check.
12
- * @returns True if value implements iterator interface.
13
- */
14
- export default function isIterable(value: any): value is Iterable<any>;
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module utils/isiterable
7
+ */
8
+ /**
9
+ * Checks if value implements iterator interface.
10
+ *
11
+ * @param value The value to check.
12
+ * @returns True if value implements iterator interface.
13
+ */
14
+ export default function isIterable(value: any): value is Iterable<any>;
package/src/isiterable.js CHANGED
@@ -1,16 +1,16 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module utils/isiterable
7
- */
8
- /**
9
- * Checks if value implements iterator interface.
10
- *
11
- * @param value The value to check.
12
- * @returns True if value implements iterator interface.
13
- */
14
- export default function isIterable(value) {
15
- return !!(value && value[Symbol.iterator]);
16
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module utils/isiterable
7
+ */
8
+ /**
9
+ * Checks if value implements iterator interface.
10
+ *
11
+ * @param value The value to check.
12
+ * @returns True if value implements iterator interface.
13
+ */
14
+ export default function isIterable(value) {
15
+ return !!(value && value[Symbol.iterator]);
16
+ }
package/src/keyboard.d.ts CHANGED
@@ -1,126 +1,126 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * A set of utilities related to keyboard support.
7
- *
8
- * @module utils/keyboard
9
- */
10
- import type { LanguageDirection } from './language';
11
- /**
12
- * An object with `keyName => keyCode` pairs for a set of known keys.
13
- *
14
- * Contains:
15
- *
16
- * * `a-z`,
17
- * * `0-9`,
18
- * * `f1-f12`,
19
- * * `` ` ``, `-`, `=`, `[`, `]`, `;`, `'`, `,`, `.`, `/`, `\`,
20
- * * `arrow(left|up|right|bottom)`,
21
- * * `backspace`, `delete`, `enter`, `esc`, `tab`,
22
- * * `ctrl`, `cmd`, `shift`, `alt`.
23
- */
24
- export declare const keyCodes: {
25
- readonly [keyCode: string]: number;
26
- };
27
- /**
28
- * Converts a key name or {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.
29
- *
30
- * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.
31
- *
32
- * @param key A key name (see {@link module:utils/keyboard#keyCodes}) or a keystroke data object.
33
- * @returns Key or keystroke code.
34
- */
35
- export declare function getCode(key: string | Readonly<KeystrokeInfo>): number;
36
- /**
37
- * Parses the keystroke and returns a keystroke code that will match the code returned by
38
- * {@link module:utils/keyboard~getCode} for the corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.
39
- *
40
- * The keystroke can be passed in two formats:
41
- *
42
- * * as a single string – e.g. `ctrl + A`,
43
- * * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes – e.g.:
44
- * * `[ 'ctrl', 32 ]` (ctrl + space),
45
- * * `[ 'ctrl', 'a' ]` (ctrl + A).
46
- *
47
- * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.
48
- *
49
- * Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).
50
- *
51
- * Note: On macOS, keystroke handling is translating the `Ctrl` key to the `Cmd` key and handling only that keystroke.
52
- * For example, a registered keystroke `Ctrl+A` will be translated to `Cmd+A` on macOS. To disable the translation of some keystroke,
53
- * use the forced modifier: `Ctrl!+A` (note the exclamation mark).
54
- *
55
- * @param keystroke The keystroke definition.
56
- * @returns Keystroke code.
57
- */
58
- export declare function parseKeystroke(keystroke: string | ReadonlyArray<number | string>): number;
59
- /**
60
- * Translates any keystroke string text like `"Ctrl+A"` to an
61
- * environment–specific keystroke, i.e. `"⌘A"` on macOS.
62
- *
63
- * @param keystroke The keystroke text.
64
- * @returns The keystroke text specific for the environment.
65
- */
66
- export declare function getEnvKeystrokeText(keystroke: string): string;
67
- /**
68
- * Returns `true` if the provided key code represents one of the arrow keys.
69
- *
70
- * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
71
- */
72
- export declare function isArrowKeyCode(keyCode: number): boolean;
73
- /**
74
- * String representing a direction of an arrow key kode.
75
- */
76
- export type ArrowKeyCodeDirection = 'left' | 'up' | 'right' | 'down';
77
- /**
78
- * Returns the direction in which the {@link module:engine/model/documentselection~DocumentSelection selection}
79
- * will move when the provided arrow key code is pressed considering the language direction of the editor content.
80
- *
81
- * For instance, in right–to–left (RTL) content languages, pressing the left arrow means moving the selection right (forward)
82
- * in the model structure. Similarly, pressing the right arrow moves the selection left (backward).
83
- *
84
- * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
85
- * @param contentLanguageDirection The content language direction, corresponding to
86
- * {@link module:utils/locale~Locale#contentLanguageDirection}.
87
- * @returns Localized arrow direction or `undefined` for non-arrow key codes.
88
- */
89
- export declare function getLocalizedArrowKeyCodeDirection(keyCode: number, contentLanguageDirection: LanguageDirection): ArrowKeyCodeDirection | undefined;
90
- /**
91
- * Determines if the provided key code moves the {@link module:engine/model/documentselection~DocumentSelection selection}
92
- * forward or backward considering the language direction of the editor content.
93
- *
94
- * For instance, in right–to–left (RTL) languages, pressing the left arrow means moving forward
95
- * in the model structure. Similarly, pressing the right arrow moves the selection backward.
96
- *
97
- * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
98
- * @param contentLanguageDirection The content language direction, corresponding to
99
- * {@link module:utils/locale~Locale#contentLanguageDirection}.
100
- */
101
- export declare function isForwardArrowKeyCode(keyCode: number, contentLanguageDirection: LanguageDirection): boolean;
102
- /**
103
- * Information about the keystroke.
104
- */
105
- export interface KeystrokeInfo {
106
- /**
107
- * The [key code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).
108
- */
109
- keyCode: number;
110
- /**
111
- * Whether the <kbd>Alt</kbd> modifier was pressed.
112
- */
113
- altKey: boolean;
114
- /**
115
- * Whether the <kbd>Cmd</kbd> modifier was pressed.
116
- */
117
- metaKey: boolean;
118
- /**
119
- * Whether the <kbd>Ctrl</kbd> modifier was pressed.
120
- */
121
- ctrlKey: boolean;
122
- /**
123
- * Whether the <kbd>Shift</kbd> modifier was pressed.
124
- */
125
- shiftKey: boolean;
126
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * A set of utilities related to keyboard support.
7
+ *
8
+ * @module utils/keyboard
9
+ */
10
+ import type { LanguageDirection } from './language';
11
+ /**
12
+ * An object with `keyName => keyCode` pairs for a set of known keys.
13
+ *
14
+ * Contains:
15
+ *
16
+ * * `a-z`,
17
+ * * `0-9`,
18
+ * * `f1-f12`,
19
+ * * `` ` ``, `-`, `=`, `[`, `]`, `;`, `'`, `,`, `.`, `/`, `\`,
20
+ * * `arrow(left|up|right|bottom)`,
21
+ * * `backspace`, `delete`, `enter`, `esc`, `tab`,
22
+ * * `ctrl`, `cmd`, `shift`, `alt`.
23
+ */
24
+ export declare const keyCodes: {
25
+ readonly [keyCode: string]: number;
26
+ };
27
+ /**
28
+ * Converts a key name or {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.
29
+ *
30
+ * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.
31
+ *
32
+ * @param key A key name (see {@link module:utils/keyboard#keyCodes}) or a keystroke data object.
33
+ * @returns Key or keystroke code.
34
+ */
35
+ export declare function getCode(key: string | Readonly<KeystrokeInfo>): number;
36
+ /**
37
+ * Parses the keystroke and returns a keystroke code that will match the code returned by
38
+ * {@link module:utils/keyboard~getCode} for the corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.
39
+ *
40
+ * The keystroke can be passed in two formats:
41
+ *
42
+ * * as a single string – e.g. `ctrl + A`,
43
+ * * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes – e.g.:
44
+ * * `[ 'ctrl', 32 ]` (ctrl + space),
45
+ * * `[ 'ctrl', 'a' ]` (ctrl + A).
46
+ *
47
+ * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.
48
+ *
49
+ * Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).
50
+ *
51
+ * Note: On macOS, keystroke handling is translating the `Ctrl` key to the `Cmd` key and handling only that keystroke.
52
+ * For example, a registered keystroke `Ctrl+A` will be translated to `Cmd+A` on macOS. To disable the translation of some keystroke,
53
+ * use the forced modifier: `Ctrl!+A` (note the exclamation mark).
54
+ *
55
+ * @param keystroke The keystroke definition.
56
+ * @returns Keystroke code.
57
+ */
58
+ export declare function parseKeystroke(keystroke: string | ReadonlyArray<number | string>): number;
59
+ /**
60
+ * Translates any keystroke string text like `"Ctrl+A"` to an
61
+ * environment–specific keystroke, i.e. `"⌘A"` on macOS.
62
+ *
63
+ * @param keystroke The keystroke text.
64
+ * @returns The keystroke text specific for the environment.
65
+ */
66
+ export declare function getEnvKeystrokeText(keystroke: string): string;
67
+ /**
68
+ * Returns `true` if the provided key code represents one of the arrow keys.
69
+ *
70
+ * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
71
+ */
72
+ export declare function isArrowKeyCode(keyCode: number): boolean;
73
+ /**
74
+ * String representing a direction of an arrow key kode.
75
+ */
76
+ export type ArrowKeyCodeDirection = 'left' | 'up' | 'right' | 'down';
77
+ /**
78
+ * Returns the direction in which the {@link module:engine/model/documentselection~DocumentSelection selection}
79
+ * will move when the provided arrow key code is pressed considering the language direction of the editor content.
80
+ *
81
+ * For instance, in right–to–left (RTL) content languages, pressing the left arrow means moving the selection right (forward)
82
+ * in the model structure. Similarly, pressing the right arrow moves the selection left (backward).
83
+ *
84
+ * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
85
+ * @param contentLanguageDirection The content language direction, corresponding to
86
+ * {@link module:utils/locale~Locale#contentLanguageDirection}.
87
+ * @returns Localized arrow direction or `undefined` for non-arrow key codes.
88
+ */
89
+ export declare function getLocalizedArrowKeyCodeDirection(keyCode: number, contentLanguageDirection: LanguageDirection): ArrowKeyCodeDirection | undefined;
90
+ /**
91
+ * Determines if the provided key code moves the {@link module:engine/model/documentselection~DocumentSelection selection}
92
+ * forward or backward considering the language direction of the editor content.
93
+ *
94
+ * For instance, in right–to–left (RTL) languages, pressing the left arrow means moving forward
95
+ * in the model structure. Similarly, pressing the right arrow moves the selection backward.
96
+ *
97
+ * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.
98
+ * @param contentLanguageDirection The content language direction, corresponding to
99
+ * {@link module:utils/locale~Locale#contentLanguageDirection}.
100
+ */
101
+ export declare function isForwardArrowKeyCode(keyCode: number, contentLanguageDirection: LanguageDirection): boolean;
102
+ /**
103
+ * Information about the keystroke.
104
+ */
105
+ export interface KeystrokeInfo {
106
+ /**
107
+ * The [key code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).
108
+ */
109
+ keyCode: number;
110
+ /**
111
+ * Whether the <kbd>Alt</kbd> modifier was pressed.
112
+ */
113
+ altKey: boolean;
114
+ /**
115
+ * Whether the <kbd>Cmd</kbd> modifier was pressed.
116
+ */
117
+ metaKey: boolean;
118
+ /**
119
+ * Whether the <kbd>Ctrl</kbd> modifier was pressed.
120
+ */
121
+ ctrlKey: boolean;
122
+ /**
123
+ * Whether the <kbd>Shift</kbd> modifier was pressed.
124
+ */
125
+ shiftKey: boolean;
126
+ }