@ckeditor/ckeditor5-utils 45.2.1 → 46.0.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.
- package/dist/index.js +191 -158
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/abortabledebounce.d.ts +1 -1
- package/src/abortabledebounce.js +1 -1
- package/src/areconnectedthroughproperties.d.ts +1 -1
- package/src/areconnectedthroughproperties.js +1 -1
- package/src/ckeditorerror.d.ts +5 -4
- package/src/ckeditorerror.js +18 -14
- package/src/collection.d.ts +1 -1
- package/src/collection.js +5 -5
- package/src/collectstylesheets.d.ts +1 -1
- package/src/collectstylesheets.js +1 -1
- 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/crc32.d.ts +2 -3
- package/src/crc32.js +1 -1
- package/src/delay.d.ts +1 -1
- package/src/delay.js +1 -1
- package/src/diff.d.ts +3 -4
- package/src/diff.js +2 -2
- package/src/difftochanges.d.ts +1 -1
- package/src/difftochanges.js +1 -1
- package/src/dom/createelement.d.ts +5 -6
- package/src/dom/createelement.js +2 -2
- package/src/dom/emittermixin.d.ts +5 -5
- package/src/dom/emittermixin.js +6 -15
- 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/getrangefrommouseevent.d.ts +1 -1
- package/src/dom/getrangefrommouseevent.js +1 -1
- package/src/dom/getvisualviewportoffset.d.ts +1 -1
- package/src/dom/getvisualviewportoffset.js +3 -3
- package/src/dom/global.d.ts +2 -2
- package/src/dom/global.js +4 -4
- 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 +2 -2
- package/src/dom/iswindow.d.ts +1 -1
- package/src/dom/iswindow.js +1 -1
- package/src/dom/position.d.ts +5 -5
- package/src/dom/position.js +3 -3
- package/src/dom/rect.d.ts +3 -3
- 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 +2 -2
- package/src/dom/scroll.d.ts +1 -2
- package/src/dom/scroll.js +3 -3
- 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 +3 -3
- package/src/emittermixin.js +6 -14
- package/src/env.d.ts +16 -2
- package/src/env.js +17 -3
- package/src/eventinfo.d.ts +1 -1
- package/src/eventinfo.js +2 -2
- package/src/fastdiff.d.ts +1 -1
- package/src/fastdiff.js +1 -1
- package/src/first.d.ts +1 -1
- package/src/first.js +1 -1
- package/src/focustracker.d.ts +1 -1
- package/src/focustracker.js +4 -4
- package/src/formathtml.d.ts +1 -1
- package/src/formathtml.js +1 -1
- package/src/index.d.ts +69 -62
- package/src/index.js +68 -61
- package/src/inserttopriorityarray.d.ts +1 -1
- 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 +4 -4
- package/src/keystrokehandler.d.ts +2 -2
- package/src/keystrokehandler.js +3 -3
- package/src/legacyerrors.d.ts +5 -0
- package/src/legacyerrors.js +18 -0
- package/src/locale.d.ts +1 -10
- package/src/locale.js +2 -23
- package/src/mapsequal.d.ts +1 -1
- package/src/mapsequal.js +1 -1
- package/src/mix.d.ts +0 -27
- package/src/mix.js +1 -46
- 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 +8 -9
- package/src/observablemixin.js +3 -12
- package/src/parsebase64encodedobject.d.ts +1 -1
- package/src/parsebase64encodedobject.js +1 -1
- package/src/priorities.d.ts +1 -2
- package/src/priorities.js +1 -2
- package/src/retry.d.ts +1 -1
- package/src/retry.js +2 -2
- package/src/splicearray.d.ts +1 -1
- package/src/splicearray.js +1 -1
- package/src/spy.d.ts +1 -2
- package/src/spy.js +1 -2
- package/src/toarray.d.ts +2 -2
- 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/version.d.ts +1 -2
- package/src/version.js +12 -13
- package/src/wait.d.ts +1 -1
- package/src/wait.js +1 -1
package/src/uid.js
CHANGED
|
@@ -21,7 +21,7 @@ const HEX_NUMBERS = new Array(256).fill('')
|
|
|
21
21
|
*
|
|
22
22
|
* @returns An unique id string.
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export function uid() {
|
|
25
25
|
// Let's create some positive random 32bit integers first.
|
|
26
26
|
const [r1, r2, r3, r4] = crypto.getRandomValues(new Uint32Array(4));
|
|
27
27
|
// Make sure that id does not start with number.
|
package/src/version.d.ts
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
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 = "
|
|
6
|
-
export default version;
|
|
5
|
+
export declare const version = "46.0.0-alpha.1";
|
|
7
6
|
export declare const releaseDate: Date;
|
|
8
7
|
declare global {
|
|
9
8
|
var CKEDITOR_VERSION: string;
|
package/src/version.js
CHANGED
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/version
|
|
7
7
|
*/
|
|
8
|
-
import CKEditorError from './ckeditorerror.js';
|
|
9
|
-
const version = '
|
|
10
|
-
export default version;
|
|
8
|
+
import { CKEditorError } from './ckeditorerror.js';
|
|
9
|
+
export const version = '46.0.0-alpha.1';
|
|
11
10
|
// The second argument is not a month. It is `monthIndex` and starts from `0`.
|
|
12
|
-
export const releaseDate = new Date(2025,
|
|
11
|
+
export const releaseDate = new Date(2025, 6, 2);
|
|
13
12
|
/* istanbul ignore next -- @preserve */
|
|
14
13
|
if (globalThis.CKEDITOR_VERSION) {
|
|
15
14
|
/**
|
|
@@ -70,8 +69,8 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
70
69
|
* <summary>New installation methods and optimized builds</summary>
|
|
71
70
|
*
|
|
72
71
|
* If you use the {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods},
|
|
73
|
-
* you should only import code from the `ckeditor5` and `ckeditor5-premium-features` packages.
|
|
74
|
-
* Do not import code from the `@ckeditor/ckeditor5-<NAME>` packages unless you follow
|
|
72
|
+
* you should only import { code } from the `ckeditor5` and `ckeditor5-premium-features` packages.
|
|
73
|
+
* Do not import { code } from the `@ckeditor/ckeditor5-<NAME>` packages unless you follow
|
|
75
74
|
* the {@glink getting-started/setup/optimizing-build-size Optimizing build size} guide and the imports from
|
|
76
75
|
* the `@ckeditor/ckeditor5-<NAME>` packages end with `/dist/index.js`.
|
|
77
76
|
*
|
|
@@ -82,7 +81,7 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
82
81
|
* ```js
|
|
83
82
|
* import { ClassicEditor, Highlight } from 'ckeditor5'; // ✅
|
|
84
83
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ✅
|
|
85
|
-
* import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌
|
|
84
|
+
* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌
|
|
86
85
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌
|
|
87
86
|
* import '@ckeditor/ckeditor5-highlight/build/highlight.js'; // ❌
|
|
88
87
|
* ```
|
|
@@ -102,11 +101,11 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
102
101
|
* Examples of valid and invalid import paths:
|
|
103
102
|
*
|
|
104
103
|
* ```js
|
|
105
|
-
* import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; // ✅
|
|
104
|
+
* import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic'; // ✅
|
|
106
105
|
* import { Highlight } from 'ckeditor5'; // ❌
|
|
107
106
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌
|
|
108
107
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌
|
|
109
|
-
* import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight'; // ❌
|
|
108
|
+
* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight'; // ❌
|
|
110
109
|
* import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌
|
|
111
110
|
* ```
|
|
112
111
|
*
|
|
@@ -119,18 +118,18 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
119
118
|
* <summary>(Legacy) Default imports and `src` imports</summary>
|
|
120
119
|
*
|
|
121
120
|
* If you use the {@glink getting-started/legacy/installation-methods/quick-start-other legacy customized installation}
|
|
122
|
-
* method, you should only import code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code from
|
|
121
|
+
* method, you should only import { code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code } from
|
|
123
122
|
* the `@ckeditor/ckeditor5-<NAME>/src/*` files, it is not recommended as it can make migration to the new installation
|
|
124
123
|
* methods more difficult.
|
|
125
124
|
*
|
|
126
|
-
* If you use this installation method, you should not import code from the `ckeditor5` or `ckeditor5-premium-features` packages.
|
|
125
|
+
* If you use this installation method, you should not import { code } from the `ckeditor5` or `ckeditor5-premium-features` packages.
|
|
127
126
|
*
|
|
128
127
|
* Examples of valid and invalid import paths:
|
|
129
128
|
*
|
|
130
129
|
* ```js
|
|
131
130
|
* import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic'; // ✅
|
|
132
131
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ✅
|
|
133
|
-
* import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ✅ (not recommended)
|
|
132
|
+
* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ✅ (not recommended)
|
|
134
133
|
* import { Highlight } from 'ckeditor5'; // ❌
|
|
135
134
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌
|
|
136
135
|
* import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌
|
|
@@ -152,7 +151,7 @@ if (globalThis.CKEDITOR_VERSION) {
|
|
|
152
151
|
* import { Highlight } from 'ckeditor5'; // ❌
|
|
153
152
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌
|
|
154
153
|
* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌
|
|
155
|
-
* import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌
|
|
154
|
+
* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌
|
|
156
155
|
* ```
|
|
157
156
|
* </details>
|
|
158
157
|
*
|
package/src/wait.d.ts
CHANGED
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
* @param timeout The time in milliseconds to wait.
|
|
12
12
|
* @param options.signal A signal to abort the waiting.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export declare function wait(timeout: number, options?: {
|
|
15
15
|
signal?: AbortSignal;
|
|
16
16
|
}): Promise<void>;
|
package/src/wait.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @param timeout The time in milliseconds to wait.
|
|
12
12
|
* @param options.signal A signal to abort the waiting.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export function wait(timeout, options = {}) {
|
|
15
15
|
return new Promise((resolve, reject) => {
|
|
16
16
|
const signal = options.signal || (new AbortController()).signal;
|
|
17
17
|
signal.throwIfAborted();
|