@ckeditor/ckeditor5-utils 44.1.0 → 44.2.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 (213) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/index-content.css +2 -2
  3. package/dist/index-editor.css +2 -2
  4. package/dist/index.css +2 -2
  5. package/dist/index.js +194 -47
  6. package/dist/index.js.map +1 -1
  7. package/package.json +24 -4
  8. package/src/abortabledebounce.d.ts +1 -1
  9. package/src/abortabledebounce.js +1 -1
  10. package/src/areconnectedthroughproperties.d.ts +1 -1
  11. package/src/areconnectedthroughproperties.js +1 -1
  12. package/src/ckeditorerror.d.ts +1 -1
  13. package/src/ckeditorerror.js +1 -1
  14. package/src/collection.d.ts +1 -1
  15. package/src/collection.js +1 -1
  16. package/src/collectstylesheets.d.ts +13 -0
  17. package/src/collectstylesheets.js +52 -0
  18. package/src/comparearrays.d.ts +1 -1
  19. package/src/comparearrays.js +1 -1
  20. package/src/config.d.ts +1 -1
  21. package/src/config.js +1 -1
  22. package/src/count.d.ts +1 -1
  23. package/src/count.js +1 -1
  24. package/src/crc32.d.ts +1 -1
  25. package/src/crc32.js +1 -1
  26. package/src/delay.d.ts +1 -1
  27. package/src/delay.js +1 -1
  28. package/src/diff.d.ts +1 -1
  29. package/src/diff.js +1 -1
  30. package/src/difftochanges.d.ts +1 -1
  31. package/src/difftochanges.js +1 -1
  32. package/src/dom/createelement.d.ts +1 -1
  33. package/src/dom/createelement.js +1 -1
  34. package/src/dom/emittermixin.d.ts +1 -1
  35. package/src/dom/emittermixin.js +1 -1
  36. package/src/dom/findclosestscrollableancestor.d.ts +1 -1
  37. package/src/dom/findclosestscrollableancestor.js +1 -1
  38. package/src/dom/getancestors.d.ts +1 -1
  39. package/src/dom/getancestors.js +1 -1
  40. package/src/dom/getborderwidths.d.ts +1 -1
  41. package/src/dom/getborderwidths.js +1 -1
  42. package/src/dom/getcommonancestor.d.ts +1 -1
  43. package/src/dom/getcommonancestor.js +1 -1
  44. package/src/dom/getdatafromelement.d.ts +1 -1
  45. package/src/dom/getdatafromelement.js +1 -1
  46. package/src/dom/getpositionedancestor.d.ts +1 -1
  47. package/src/dom/getpositionedancestor.js +1 -1
  48. package/src/dom/getrangefrommouseevent.d.ts +1 -1
  49. package/src/dom/getrangefrommouseevent.js +1 -1
  50. package/src/dom/global.d.ts +1 -1
  51. package/src/dom/global.js +1 -1
  52. package/src/dom/indexof.d.ts +1 -1
  53. package/src/dom/indexof.js +1 -1
  54. package/src/dom/insertat.d.ts +1 -1
  55. package/src/dom/insertat.js +1 -1
  56. package/src/dom/iscomment.d.ts +1 -1
  57. package/src/dom/iscomment.js +1 -1
  58. package/src/dom/isnode.d.ts +1 -1
  59. package/src/dom/isnode.js +1 -1
  60. package/src/dom/isrange.d.ts +1 -1
  61. package/src/dom/isrange.js +1 -1
  62. package/src/dom/istext.d.ts +1 -1
  63. package/src/dom/istext.js +1 -1
  64. package/src/dom/isvalidattributename.d.ts +1 -1
  65. package/src/dom/isvalidattributename.js +1 -1
  66. package/src/dom/isvisible.d.ts +1 -1
  67. package/src/dom/isvisible.js +1 -1
  68. package/src/dom/iswindow.d.ts +1 -1
  69. package/src/dom/iswindow.js +1 -1
  70. package/src/dom/position.d.ts +1 -1
  71. package/src/dom/position.js +1 -1
  72. package/src/dom/rect.d.ts +1 -1
  73. package/src/dom/rect.js +1 -1
  74. package/src/dom/remove.d.ts +1 -1
  75. package/src/dom/remove.js +1 -1
  76. package/src/dom/resizeobserver.d.ts +1 -1
  77. package/src/dom/resizeobserver.js +1 -1
  78. package/src/dom/scroll.d.ts +1 -1
  79. package/src/dom/scroll.js +1 -1
  80. package/src/dom/setdatainelement.d.ts +1 -1
  81. package/src/dom/setdatainelement.js +1 -1
  82. package/src/dom/tounit.d.ts +1 -1
  83. package/src/dom/tounit.js +1 -1
  84. package/src/elementreplacer.d.ts +1 -1
  85. package/src/elementreplacer.js +1 -1
  86. package/src/emittermixin.d.ts +1 -1
  87. package/src/emittermixin.js +1 -1
  88. package/src/env.d.ts +1 -1
  89. package/src/env.js +1 -1
  90. package/src/eventinfo.d.ts +1 -1
  91. package/src/eventinfo.js +1 -1
  92. package/src/fastdiff.d.ts +1 -1
  93. package/src/fastdiff.js +1 -1
  94. package/src/first.d.ts +1 -1
  95. package/src/first.js +1 -1
  96. package/src/focustracker.d.ts +1 -1
  97. package/src/focustracker.js +1 -1
  98. package/src/index.d.ts +3 -1
  99. package/src/index.js +3 -1
  100. package/src/inserttopriorityarray.d.ts +1 -1
  101. package/src/inserttopriorityarray.js +1 -1
  102. package/src/isiterable.d.ts +1 -1
  103. package/src/isiterable.js +1 -1
  104. package/src/keyboard.d.ts +4 -3
  105. package/src/keyboard.js +8 -4
  106. package/src/keystrokehandler.d.ts +1 -1
  107. package/src/keystrokehandler.js +1 -1
  108. package/src/language.d.ts +1 -1
  109. package/src/language.js +1 -1
  110. package/src/locale.d.ts +1 -1
  111. package/src/locale.js +1 -1
  112. package/src/mapsequal.d.ts +1 -1
  113. package/src/mapsequal.js +1 -1
  114. package/src/mix.d.ts +1 -1
  115. package/src/mix.js +1 -1
  116. package/src/nth.d.ts +1 -1
  117. package/src/nth.js +1 -1
  118. package/src/objecttomap.d.ts +1 -1
  119. package/src/objecttomap.js +1 -1
  120. package/src/observablemixin.d.ts +1 -1
  121. package/src/observablemixin.js +1 -1
  122. package/src/parsebase64encodedobject.d.ts +1 -1
  123. package/src/parsebase64encodedobject.js +1 -1
  124. package/src/priorities.d.ts +1 -1
  125. package/src/priorities.js +1 -1
  126. package/src/retry.d.ts +1 -1
  127. package/src/retry.js +1 -1
  128. package/src/splicearray.d.ts +1 -1
  129. package/src/splicearray.js +1 -1
  130. package/src/spy.d.ts +1 -1
  131. package/src/spy.js +1 -1
  132. package/src/toarray.d.ts +1 -1
  133. package/src/toarray.js +1 -1
  134. package/src/tomap.d.ts +1 -1
  135. package/src/tomap.js +1 -1
  136. package/src/translation-service.d.ts +1 -1
  137. package/src/translation-service.js +1 -1
  138. package/src/uid.d.ts +1 -1
  139. package/src/uid.js +1 -1
  140. package/src/unicode.d.ts +1 -1
  141. package/src/unicode.js +1 -1
  142. package/src/version.d.ts +2 -2
  143. package/src/version.js +3 -3
  144. package/src/wait.d.ts +1 -1
  145. package/src/wait.js +1 -1
  146. package/dist/abortabledebounce.d.ts +0 -21
  147. package/dist/areconnectedthroughproperties.d.ts +0 -15
  148. package/dist/ckeditorerror.d.ts +0 -127
  149. package/dist/collection.d.ts +0 -437
  150. package/dist/comparearrays.d.ts +0 -34
  151. package/dist/config.d.ts +0 -167
  152. package/dist/count.d.ts +0 -22
  153. package/dist/crc32.d.ts +0 -30
  154. package/dist/delay.d.ts +0 -23
  155. package/dist/diff.d.ts +0 -35
  156. package/dist/difftochanges.d.ts +0 -63
  157. package/dist/dom/createelement.d.ts +0 -61
  158. package/dist/dom/emittermixin.d.ts +0 -146
  159. package/dist/dom/findclosestscrollableancestor.d.ts +0 -15
  160. package/dist/dom/getancestors.d.ts +0 -21
  161. package/dist/dom/getborderwidths.d.ts +0 -28
  162. package/dist/dom/getcommonancestor.d.ts +0 -16
  163. package/dist/dom/getdatafromelement.d.ts +0 -18
  164. package/dist/dom/getpositionedancestor.d.ts +0 -14
  165. package/dist/dom/getrangefrommouseevent.d.ts +0 -21
  166. package/dist/dom/global.d.ts +0 -36
  167. package/dist/dom/indexof.d.ts +0 -18
  168. package/dist/dom/insertat.d.ts +0 -19
  169. package/dist/dom/iscomment.d.ts +0 -15
  170. package/dist/dom/isnode.d.ts +0 -15
  171. package/dist/dom/isrange.d.ts +0 -15
  172. package/dist/dom/istext.d.ts +0 -15
  173. package/dist/dom/isvalidattributename.d.ts +0 -14
  174. package/dist/dom/isvisible.d.ts +0 -19
  175. package/dist/dom/iswindow.d.ts +0 -15
  176. package/dist/dom/position.d.ts +0 -215
  177. package/dist/dom/rect.d.ts +0 -199
  178. package/dist/dom/remove.d.ts +0 -17
  179. package/dist/dom/resizeobserver.d.ts +0 -78
  180. package/dist/dom/scroll.d.ts +0 -77
  181. package/dist/dom/setdatainelement.d.ts +0 -18
  182. package/dist/dom/tounit.d.ts +0 -26
  183. package/dist/elementreplacer.d.ts +0 -35
  184. package/dist/emittermixin.d.ts +0 -316
  185. package/dist/env.d.ts +0 -144
  186. package/dist/eventinfo.d.ts +0 -62
  187. package/dist/fastdiff.d.ts +0 -116
  188. package/dist/first.d.ts +0 -15
  189. package/dist/focustracker.d.ts +0 -144
  190. package/dist/index.d.ts +0 -70
  191. package/dist/inserttopriorityarray.d.ts +0 -34
  192. package/dist/isiterable.d.ts +0 -18
  193. package/dist/keyboard.d.ts +0 -130
  194. package/dist/keystrokehandler.d.ts +0 -101
  195. package/dist/language.d.ts +0 -21
  196. package/dist/locale.d.ts +0 -145
  197. package/dist/mapsequal.d.ts +0 -19
  198. package/dist/mix.d.ts +0 -89
  199. package/dist/nth.d.ts +0 -20
  200. package/dist/objecttomap.d.ts +0 -27
  201. package/dist/observablemixin.d.ts +0 -564
  202. package/dist/parsebase64encodedobject.d.ts +0 -15
  203. package/dist/priorities.d.ts +0 -37
  204. package/dist/retry.d.ts +0 -37
  205. package/dist/splicearray.d.ts +0 -31
  206. package/dist/spy.d.ts +0 -25
  207. package/dist/toarray.d.ts +0 -29
  208. package/dist/tomap.d.ts +0 -23
  209. package/dist/translation-service.d.ts +0 -178
  210. package/dist/uid.d.ts +0 -19
  211. package/dist/unicode.d.ts +0 -58
  212. package/dist/version.d.ts +0 -14
  213. package/dist/wait.d.ts +0 -20
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import CKEditorError from './ckeditorerror.js';
package/src/uid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
package/src/uid.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
package/src/unicode.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
package/src/unicode.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
package/src/version.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- declare const version = "44.1.0";
5
+ declare const version = "44.2.0-alpha.1";
6
6
  export default version;
7
7
  export declare const releaseDate: Date;
8
8
  declare global {
package/src/version.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/version
7
7
  */
8
8
  import CKEditorError from './ckeditorerror.js';
9
- const version = '44.1.0';
9
+ const version = '44.2.0-alpha.1';
10
10
  export default version;
11
11
  // The second argument is not a month. It is `monthIndex` and starts from `0`.
12
- export const releaseDate = new Date(2024, 11, 16);
12
+ export const releaseDate = new Date(2025, 0, 30);
13
13
  /* istanbul ignore next -- @preserve */
14
14
  if (globalThis.CKEDITOR_VERSION) {
15
15
  /**
package/src/wait.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
package/src/wait.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
@@ -1,21 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, 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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module utils/abortabledebounce
11
- */
12
- /**
13
- * Returns a function wrapper that will execute the provided function and abort any previous call that is still in progress.
14
- *
15
- * @param func The function to be called. It will be provided with `AbortSignal` as the first parameter.
16
- */
17
- export default function abortableDebounce<Args extends Array<any>, Ret>(func: (signal: AbortSignal, ...args: Args) => Ret): AbortableFunc<Args, Ret>;
18
- export interface AbortableFunc<Args extends Array<any>, Ret> {
19
- (...args: Args): Ret;
20
- abort(): void;
21
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, 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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module utils/areconnectedthroughproperties
11
- */
12
- /**
13
- * Traverses both structures to find out whether there is a reference that is shared between both structures.
14
- */
15
- export default function areConnectedThroughProperties(obj1: object, obj2: object): boolean;
@@ -1,127 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, 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
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module utils/ckeditorerror
11
- */
12
- /**
13
- * URL to the documentation with error codes.
14
- */
15
- export declare const DOCUMENTATION_URL = "https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";
16
- /**
17
- * The CKEditor error class.
18
- *
19
- * You should throw `CKEditorError` when:
20
- *
21
- * * An unexpected situation occurred and the editor (most probably) will not work properly. Such exception will be handled
22
- * by the {@link module:watchdog/watchdog~Watchdog watchdog} (if it is integrated),
23
- * * If the editor is incorrectly integrated or the editor API is used in the wrong way. This way you will give
24
- * feedback to the developer as soon as possible. Keep in mind that for common integration issues which should not
25
- * stop editor initialization (like missing upload adapter, wrong name of a toolbar component) we use
26
- * {@link module:utils/ckeditorerror~logWarning `logWarning()`} and
27
- * {@link module:utils/ckeditorerror~logError `logError()`}
28
- * to improve developers experience and let them see the a working editor as soon as possible.
29
- *
30
- * ```ts
31
- * /**
32
- * * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.
33
- * *
34
- * * @error plugin-load
35
- * * @param pluginName The name of the plugin that could not be loaded.
36
- * * @param moduleName The name of the module which tried to load this plugin.
37
- * *\/
38
- * throw new CKEditorError( 'plugin-load', {
39
- * pluginName: 'foo',
40
- * moduleName: 'bar'
41
- * } );
42
- * ```
43
- */
44
- export default class CKEditorError extends Error {
45
- /**
46
- * A context of the error by which the Watchdog is able to determine which editor crashed.
47
- */
48
- readonly context: object | null | undefined;
49
- /**
50
- * The additional error data passed to the constructor. Undefined if none was passed.
51
- */
52
- readonly data?: object;
53
- /**
54
- * Creates an instance of the CKEditorError class.
55
- *
56
- * @param errorName The error id in an `error-name` format. A link to this error documentation page will be added
57
- * to the thrown error's `message`.
58
- * @param context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}
59
- * is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also
60
- * a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).
61
- * The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility
62
- * to check if the object works as the context.
63
- * @param data Additional data describing the error. A stringified version of this object
64
- * will be appended to the error message, so the data are quickly visible in the console. The original
65
- * data object will also be later available under the {@link #data} property.
66
- */
67
- constructor(errorName: string, context?: object | null, data?: object);
68
- /**
69
- * Checks if the error is of the `CKEditorError` type.
70
- */
71
- is(type: string): boolean;
72
- /**
73
- * A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.
74
- * It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case
75
- * of a {@link module:utils/ckeditorerror~CKEditorError} error.
76
- *
77
- * @param err The error to rethrow.
78
- * @param context An object connected through properties with the editor instance. This context will be used
79
- * by the watchdog to verify which editor should be restarted.
80
- */
81
- static rethrowUnexpectedError(err: Error, context: object): never;
82
- }
83
- /**
84
- * Logs a warning to the console with a properly formatted message and adds a link to the documentation.
85
- * Use whenever you want to log a warning to the console.
86
- *
87
- * ```ts
88
- * /**
89
- * * There was a problem processing the configuration of the toolbar. The item with the given
90
- * * name does not exist, so it was omitted when rendering the toolbar.
91
- * *
92
- * * @error toolbarview-item-unavailable
93
- * * @param {String} name The name of the component.
94
- * *\/
95
- * logWarning( 'toolbarview-item-unavailable', { name } );
96
- * ```
97
- *
98
- * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to throw an error and when to log
99
- * a warning or an error to the console.
100
- *
101
- * @param errorName The error name to be logged.
102
- * @param data Additional data to be logged.
103
- */
104
- export declare function logWarning(errorName: string, data?: object): void;
105
- /**
106
- * Logs an error to the console with a properly formatted message and adds a link to the documentation.
107
- * Use whenever you want to log an error to the console.
108
- *
109
- * ```ts
110
- * /**
111
- * * There was a problem processing the configuration of the toolbar. The item with the given
112
- * * name does not exist, so it was omitted when rendering the toolbar.
113
- * *
114
- * * @error toolbarview-item-unavailable
115
- * * @param {String} name The name of the component.
116
- * *\/
117
- * logError( 'toolbarview-item-unavailable', { name } );
118
- * ```
119
- *
120
- * **Note**: In most cases logging a warning using {@link module:utils/ckeditorerror~logWarning} is enough.
121
- *
122
- * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to use each method.
123
- *
124
- * @param errorName The error name to be logged.
125
- * @param data Additional data to be logged.
126
- */
127
- export declare function logError(errorName: string, data?: object): void;