@ckeditor/ckeditor5-utils 40.1.0 → 41.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.
- package/CHANGELOG.md +31 -31
- package/LICENSE.md +1 -1
- package/package.json +2 -1
- package/src/abortabledebounce.d.ts +17 -0
- package/src/abortabledebounce.js +22 -0
- package/src/areconnectedthroughproperties.d.ts +1 -1
- package/src/areconnectedthroughproperties.js +1 -1
- package/src/ckeditorerror.d.ts +1 -1
- package/src/ckeditorerror.js +1 -1
- package/src/collection.d.ts +3 -3
- package/src/collection.js +5 -5
- package/src/comparearrays.d.ts +1 -1
- package/src/comparearrays.js +1 -1
- package/src/config.d.ts +1 -1
- package/src/config.js +1 -1
- package/src/count.d.ts +1 -1
- package/src/count.js +1 -1
- package/src/delay.d.ts +1 -1
- package/src/delay.js +1 -1
- package/src/diff.d.ts +2 -2
- package/src/diff.js +2 -2
- package/src/difftochanges.d.ts +2 -2
- package/src/difftochanges.js +1 -1
- package/src/dom/createelement.d.ts +1 -1
- package/src/dom/createelement.js +2 -2
- package/src/dom/emittermixin.d.ts +4 -4
- package/src/dom/emittermixin.js +5 -5
- package/src/dom/findclosestscrollableancestor.d.ts +1 -1
- package/src/dom/findclosestscrollableancestor.js +2 -2
- package/src/dom/getancestors.d.ts +1 -1
- package/src/dom/getancestors.js +1 -1
- package/src/dom/getborderwidths.d.ts +1 -1
- package/src/dom/getborderwidths.js +1 -1
- package/src/dom/getcommonancestor.d.ts +1 -1
- package/src/dom/getcommonancestor.js +2 -2
- package/src/dom/getdatafromelement.d.ts +1 -1
- package/src/dom/getdatafromelement.js +1 -1
- package/src/dom/getpositionedancestor.d.ts +1 -1
- package/src/dom/getpositionedancestor.js +2 -2
- package/src/dom/global.d.ts +1 -1
- package/src/dom/global.js +1 -1
- package/src/dom/indexof.d.ts +1 -1
- package/src/dom/indexof.js +1 -1
- package/src/dom/insertat.d.ts +1 -1
- package/src/dom/insertat.js +1 -1
- package/src/dom/iscomment.d.ts +1 -1
- package/src/dom/iscomment.js +1 -1
- package/src/dom/isnode.d.ts +1 -1
- package/src/dom/isnode.js +1 -1
- package/src/dom/isrange.d.ts +1 -1
- package/src/dom/isrange.js +1 -1
- package/src/dom/istext.d.ts +1 -1
- package/src/dom/istext.js +1 -1
- package/src/dom/isvalidattributename.d.ts +1 -1
- package/src/dom/isvalidattributename.js +2 -2
- package/src/dom/isvisible.d.ts +1 -1
- package/src/dom/isvisible.js +1 -1
- package/src/dom/iswindow.d.ts +1 -1
- package/src/dom/iswindow.js +1 -1
- package/src/dom/position.d.ts +7 -7
- package/src/dom/position.js +4 -4
- package/src/dom/rect.d.ts +1 -1
- package/src/dom/rect.js +7 -7
- package/src/dom/remove.d.ts +1 -1
- package/src/dom/remove.js +1 -1
- package/src/dom/resizeobserver.d.ts +1 -1
- package/src/dom/resizeobserver.js +4 -3
- package/src/dom/scroll.d.ts +1 -1
- package/src/dom/scroll.js +4 -4
- package/src/dom/setdatainelement.d.ts +1 -1
- package/src/dom/setdatainelement.js +1 -1
- package/src/dom/tounit.d.ts +1 -1
- package/src/dom/tounit.js +1 -1
- package/src/elementreplacer.d.ts +1 -1
- package/src/elementreplacer.js +1 -1
- package/src/emittermixin.d.ts +5 -5
- package/src/emittermixin.js +7 -7
- package/src/env.d.ts +1 -1
- package/src/env.js +1 -1
- package/src/eventinfo.d.ts +1 -1
- package/src/eventinfo.js +2 -2
- package/src/fastdiff.d.ts +3 -3
- package/src/fastdiff.js +1 -1
- package/src/first.d.ts +1 -1
- package/src/first.js +1 -1
- package/src/focustracker.d.ts +5 -5
- package/src/focustracker.js +4 -4
- package/src/index.d.ts +58 -55
- package/src/index.js +57 -54
- package/src/inserttopriorityarray.d.ts +2 -2
- package/src/inserttopriorityarray.js +2 -2
- package/src/isiterable.d.ts +1 -1
- package/src/isiterable.js +1 -1
- package/src/keyboard.d.ts +2 -2
- package/src/keyboard.js +3 -3
- package/src/keystrokehandler.d.ts +4 -4
- package/src/keystrokehandler.js +3 -3
- package/src/language.d.ts +1 -1
- package/src/language.js +1 -1
- package/src/locale.d.ts +3 -3
- package/src/locale.js +4 -4
- package/src/mapsequal.d.ts +1 -1
- package/src/mapsequal.js +1 -1
- package/src/mix.d.ts +1 -1
- package/src/mix.js +1 -1
- package/src/nth.d.ts +1 -1
- package/src/nth.js +1 -1
- package/src/objecttomap.d.ts +1 -1
- package/src/objecttomap.js +1 -1
- package/src/observablemixin.d.ts +3 -3
- package/src/observablemixin.js +3 -3
- package/src/priorities.d.ts +1 -1
- package/src/priorities.js +1 -1
- package/src/retry.d.ts +33 -0
- package/src/retry.js +47 -0
- package/src/splicearray.d.ts +1 -1
- package/src/splicearray.js +1 -1
- package/src/spy.d.ts +1 -1
- package/src/spy.js +1 -1
- package/src/toarray.d.ts +1 -1
- package/src/toarray.js +1 -1
- package/src/tomap.d.ts +1 -1
- package/src/tomap.js +3 -3
- package/src/translation-service.d.ts +1 -1
- package/src/translation-service.js +3 -3
- package/src/uid.d.ts +1 -1
- package/src/uid.js +1 -1
- package/src/unicode.d.ts +1 -1
- package/src/unicode.js +1 -1
- package/src/verifylicense.d.ts +1 -1
- package/src/verifylicense.js +2 -2
- package/src/version.d.ts +2 -2
- package/src/version.js +6 -6
- package/src/wait.d.ts +16 -0
- package/src/wait.js +29 -0
package/src/spy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/spy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/toarray.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/toarray.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export default function toArray(data) {
|
package/src/tomap.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/tomap.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/tomap
|
|
7
7
|
*/
|
|
8
|
-
import objectToMap from './objecttomap';
|
|
9
|
-
import isIterable from './isiterable';
|
|
8
|
+
import objectToMap from './objecttomap.js';
|
|
9
|
+
import isIterable from './isiterable.js';
|
|
10
10
|
/**
|
|
11
11
|
* Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.
|
|
12
12
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
declare global {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/* eslint-disable no-var */
|
|
6
6
|
/**
|
|
7
7
|
* @module utils/translation-service
|
|
8
8
|
*/
|
|
9
|
-
import CKEditorError from './ckeditorerror';
|
|
10
|
-
import global from './dom/global';
|
|
9
|
+
import CKEditorError from './ckeditorerror.js';
|
|
10
|
+
import global from './dom/global.js';
|
|
11
11
|
/* istanbul ignore else -- @preserve */
|
|
12
12
|
if (!global.window.CKEDITOR_TRANSLATIONS) {
|
|
13
13
|
global.window.CKEDITOR_TRANSLATIONS = {};
|
package/src/uid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/uid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/unicode.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/unicode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/verifylicense.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/verifylicense.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/verifylicense
|
|
7
7
|
*/
|
|
8
|
-
import { releaseDate } from './version';
|
|
8
|
+
import { releaseDate } from './version.js';
|
|
9
9
|
/**
|
|
10
10
|
* Checks whether the given string contains information that allows you to verify the license status.
|
|
11
11
|
*
|
package/src/version.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
declare const version = "
|
|
5
|
+
declare const version = "41.0.0";
|
|
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-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/version
|
|
7
7
|
*/
|
|
8
|
-
import CKEditorError from './ckeditorerror';
|
|
9
|
-
const version = '
|
|
8
|
+
import CKEditorError from './ckeditorerror.js';
|
|
9
|
+
const version = '41.0.0';
|
|
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(
|
|
12
|
+
export const releaseDate = new Date(2024, 0, 17);
|
|
13
13
|
/* istanbul ignore next -- @preserve */
|
|
14
14
|
if (globalThis.CKEDITOR_VERSION) {
|
|
15
15
|
/**
|
|
@@ -35,7 +35,7 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
35
35
|
* that it contains all the necessary code from e.g. `@ckeditor/ckeditor5-engine` and `@ckeditor/ckeditor5-utils`.
|
|
36
36
|
*
|
|
37
37
|
* However, the `Highlight` plugin imports some of the modules from these packages, too. If you ask webpack to
|
|
38
|
-
* build such a project, you will end up with the modules being included (and run) twice &
|
|
38
|
+
* build such a project, you will end up with the modules being included (and run) twice – first, because they are
|
|
39
39
|
* included inside the build package, and second, because they are required by the `Highlight` plugin.
|
|
40
40
|
*
|
|
41
41
|
* Therefore, **you must never add plugins to an existing build** unless your plugin has no dependencies.
|
|
@@ -120,7 +120,7 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
120
120
|
* asking the author of the third-party package to upgrade its depdendencies (or forking their project and doing this yourself).
|
|
121
121
|
*
|
|
122
122
|
* **Note:** All official CKEditor 5 packages (excluding integrations and `ckeditor5-dev-*` packages) are released in the
|
|
123
|
-
* same major version. This
|
|
123
|
+
* same major version. This means that in the `x.y.z` version, the `x` is the same for all packages. This is the simplest way to check
|
|
124
124
|
* whether you use packages coming from the same CKEditor 5 version. You can read more about versioning in the
|
|
125
125
|
* {@glink updating/versioning-policy Versioning policy} guide.
|
|
126
126
|
*
|
package/src/wait.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
* @module utils/wait
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Returns a promise that is resolved after the specified time.
|
|
10
|
+
*
|
|
11
|
+
* @param timeout The time in milliseconds to wait.
|
|
12
|
+
* @param options.signal A signal to abort the waiting.
|
|
13
|
+
*/
|
|
14
|
+
export default function wait(timeout: number, options?: {
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
}): Promise<void>;
|
package/src/wait.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* @module utils/wait
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Returns a promise that is resolved after the specified time.
|
|
10
|
+
*
|
|
11
|
+
* @param timeout The time in milliseconds to wait.
|
|
12
|
+
* @param options.signal A signal to abort the waiting.
|
|
13
|
+
*/
|
|
14
|
+
export default function wait(timeout, options = {}) {
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const signal = options.signal || (new AbortController()).signal;
|
|
17
|
+
signal.throwIfAborted();
|
|
18
|
+
const timer = setTimeout(timeoutHandler, timeout);
|
|
19
|
+
signal.addEventListener('abort', abortHandler, { once: true });
|
|
20
|
+
function timeoutHandler() {
|
|
21
|
+
signal.removeEventListener('abort', abortHandler);
|
|
22
|
+
resolve();
|
|
23
|
+
}
|
|
24
|
+
function abortHandler() {
|
|
25
|
+
clearTimeout(timer);
|
|
26
|
+
reject(signal.reason);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|