@ckeditor/ckeditor5-utils 47.6.1 → 48.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/LICENSE.md +1 -1
- package/{src → dist}/dom/global.d.ts +1 -1
- package/{src → dist}/dom/rect.d.ts +8 -0
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/{src → dist}/version.d.ts +1 -1
- package/package.json +20 -38
- package/src/abortabledebounce.js +0 -22
- package/src/areconnectedthroughproperties.js +0 -71
- package/src/ckeditorerror.js +0 -187
- package/src/collection.js +0 -620
- package/src/collectstylesheets.js +0 -52
- package/src/comparearrays.js +0 -47
- package/src/config.js +0 -167
- package/src/count.js +0 -25
- package/src/crc32.js +0 -61
- package/src/decodelicensekey.js +0 -30
- package/src/delay.js +0 -25
- package/src/diff.js +0 -115
- package/src/difftochanges.js +0 -79
- package/src/dom/createelement.js +0 -40
- package/src/dom/emittermixin.js +0 -237
- package/src/dom/findclosestscrollableancestor.js +0 -31
- package/src/dom/getancestors.js +0 -26
- package/src/dom/getborderwidths.js +0 -24
- package/src/dom/getcommonancestor.js +0 -25
- package/src/dom/getdatafromelement.js +0 -19
- package/src/dom/getpositionedancestor.js +0 -22
- package/src/dom/getrangefrommouseevent.js +0 -33
- package/src/dom/getvisualviewportoffset.js +0 -21
- package/src/dom/global.js +0 -35
- package/src/dom/indexof.js +0 -21
- package/src/dom/insertat.js +0 -17
- package/src/dom/iscomment.js +0 -13
- package/src/dom/isnode.js +0 -21
- package/src/dom/isrange.js +0 -13
- package/src/dom/istext.js +0 -13
- package/src/dom/isvalidattributename.js +0 -22
- package/src/dom/isvisible.js +0 -30
- package/src/dom/iswindow.js +0 -22
- package/src/dom/position.js +0 -322
- package/src/dom/rect.js +0 -498
- package/src/dom/remove.js +0 -18
- package/src/dom/resizeobserver.js +0 -134
- package/src/dom/scroll.js +0 -406
- package/src/dom/setdatainelement.js +0 -19
- package/src/dom/tounit.js +0 -16
- package/src/elementreplacer.js +0 -47
- package/src/emittermixin.js +0 -443
- package/src/env.js +0 -158
- package/src/eventinfo.js +0 -63
- package/src/fastdiff.js +0 -248
- package/src/first.js +0 -17
- package/src/focustracker.js +0 -329
- package/src/formathtml.js +0 -164
- package/src/index.js +0 -78
- package/src/inserttopriorityarray.js +0 -28
- package/src/isfeatureblockedbylicensekey.js +0 -17
- package/src/isiterable.js +0 -16
- package/src/keyboard.js +0 -256
- package/src/keystrokehandler.js +0 -126
- package/src/language.js +0 -21
- package/src/legacyerrors.js +0 -18
- package/src/locale.js +0 -135
- package/src/mapsequal.js +0 -27
- package/src/mix.js +0 -5
- package/src/nth.js +0 -24
- package/src/objecttomap.js +0 -27
- package/src/observablemixin.js +0 -575
- package/src/parsebase64encodedobject.js +0 -22
- package/src/priorities.js +0 -22
- package/src/retry.js +0 -48
- package/src/splicearray.js +0 -37
- package/src/spy.js +0 -21
- package/src/toarray.js +0 -7
- package/src/tomap.js +0 -29
- package/src/translation-service.js +0 -209
- package/src/uid.js +0 -45
- package/src/unicode.js +0 -85
- package/src/version.js +0 -177
- package/src/wait.js +0 -29
- /package/{src → dist}/abortabledebounce.d.ts +0 -0
- /package/{src → dist}/areconnectedthroughproperties.d.ts +0 -0
- /package/{src → dist}/ckeditorerror.d.ts +0 -0
- /package/{src → dist}/collection.d.ts +0 -0
- /package/{src → dist}/collectstylesheets.d.ts +0 -0
- /package/{src → dist}/comparearrays.d.ts +0 -0
- /package/{src → dist}/config.d.ts +0 -0
- /package/{src → dist}/count.d.ts +0 -0
- /package/{src → dist}/crc32.d.ts +0 -0
- /package/{src → dist}/decodelicensekey.d.ts +0 -0
- /package/{src → dist}/delay.d.ts +0 -0
- /package/{src → dist}/diff.d.ts +0 -0
- /package/{src → dist}/difftochanges.d.ts +0 -0
- /package/{src → dist}/dom/createelement.d.ts +0 -0
- /package/{src → dist}/dom/emittermixin.d.ts +0 -0
- /package/{src → dist}/dom/findclosestscrollableancestor.d.ts +0 -0
- /package/{src → dist}/dom/getancestors.d.ts +0 -0
- /package/{src → dist}/dom/getborderwidths.d.ts +0 -0
- /package/{src → dist}/dom/getcommonancestor.d.ts +0 -0
- /package/{src → dist}/dom/getdatafromelement.d.ts +0 -0
- /package/{src → dist}/dom/getpositionedancestor.d.ts +0 -0
- /package/{src → dist}/dom/getrangefrommouseevent.d.ts +0 -0
- /package/{src → dist}/dom/getvisualviewportoffset.d.ts +0 -0
- /package/{src → dist}/dom/indexof.d.ts +0 -0
- /package/{src → dist}/dom/insertat.d.ts +0 -0
- /package/{src → dist}/dom/iscomment.d.ts +0 -0
- /package/{src → dist}/dom/isnode.d.ts +0 -0
- /package/{src → dist}/dom/isrange.d.ts +0 -0
- /package/{src → dist}/dom/istext.d.ts +0 -0
- /package/{src → dist}/dom/isvalidattributename.d.ts +0 -0
- /package/{src → dist}/dom/isvisible.d.ts +0 -0
- /package/{src → dist}/dom/iswindow.d.ts +0 -0
- /package/{src → dist}/dom/position.d.ts +0 -0
- /package/{src → dist}/dom/remove.d.ts +0 -0
- /package/{src → dist}/dom/resizeobserver.d.ts +0 -0
- /package/{src → dist}/dom/scroll.d.ts +0 -0
- /package/{src → dist}/dom/setdatainelement.d.ts +0 -0
- /package/{src → dist}/dom/tounit.d.ts +0 -0
- /package/{src → dist}/elementreplacer.d.ts +0 -0
- /package/{src → dist}/emittermixin.d.ts +0 -0
- /package/{src → dist}/env.d.ts +0 -0
- /package/{src → dist}/eventinfo.d.ts +0 -0
- /package/{src → dist}/fastdiff.d.ts +0 -0
- /package/{src → dist}/first.d.ts +0 -0
- /package/{src → dist}/focustracker.d.ts +0 -0
- /package/{src → dist}/formathtml.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{src → dist}/inserttopriorityarray.d.ts +0 -0
- /package/{src → dist}/isfeatureblockedbylicensekey.d.ts +0 -0
- /package/{src → dist}/isiterable.d.ts +0 -0
- /package/{src → dist}/keyboard.d.ts +0 -0
- /package/{src → dist}/keystrokehandler.d.ts +0 -0
- /package/{src → dist}/language.d.ts +0 -0
- /package/{src → dist}/legacyerrors.d.ts +0 -0
- /package/{src → dist}/locale.d.ts +0 -0
- /package/{src → dist}/mapsequal.d.ts +0 -0
- /package/{src → dist}/mix.d.ts +0 -0
- /package/{src → dist}/nth.d.ts +0 -0
- /package/{src → dist}/objecttomap.d.ts +0 -0
- /package/{src → dist}/observablemixin.d.ts +0 -0
- /package/{src → dist}/parsebase64encodedobject.d.ts +0 -0
- /package/{src → dist}/priorities.d.ts +0 -0
- /package/{src → dist}/retry.d.ts +0 -0
- /package/{src → dist}/splicearray.d.ts +0 -0
- /package/{src → dist}/spy.d.ts +0 -0
- /package/{src → dist}/toarray.d.ts +0 -0
- /package/{src → dist}/tomap.d.ts +0 -0
- /package/{src → dist}/translation-service.d.ts +0 -0
- /package/{src → dist}/uid.d.ts +0 -0
- /package/{src → dist}/unicode.d.ts +0 -0
- /package/{src → dist}/wait.d.ts +0 -0
package/LICENSE.md
CHANGED
|
@@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor 5 content is authored by CKSour
|
|
|
18
18
|
|
|
19
19
|
The following libraries are included in CKEditor 5 under the [MIT license](https://opensource.org/licenses/MIT):
|
|
20
20
|
|
|
21
|
-
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
|
|
21
|
+
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc and Copyright OpenJS Foundation and other contributors.
|
|
22
22
|
|
|
23
23
|
Trademarks
|
|
24
24
|
----------
|
|
@@ -18,7 +18,7 @@ export interface GlobalType {
|
|
|
18
18
|
* testing, i.e. stubbing native properties:
|
|
19
19
|
*
|
|
20
20
|
* ```ts
|
|
21
|
-
* import { global } from 'ckeditor5
|
|
21
|
+
* import { global } from 'ckeditor5';
|
|
22
22
|
*
|
|
23
23
|
* // This stub will work for any code using global module.
|
|
24
24
|
* testUtils.sinon.stub( global, 'window', {
|
|
@@ -166,10 +166,18 @@ export declare class Rect {
|
|
|
166
166
|
/**
|
|
167
167
|
* Returns an array of rects of the given native DOM Range.
|
|
168
168
|
*
|
|
169
|
+
* Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
|
|
170
|
+
*
|
|
169
171
|
* @param range A native DOM range.
|
|
170
172
|
* @returns DOM Range rects.
|
|
171
173
|
*/
|
|
172
174
|
static getDomRangeRects(range: Range): Array<Rect>;
|
|
175
|
+
/**
|
|
176
|
+
* Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.
|
|
177
|
+
*
|
|
178
|
+
* Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.
|
|
179
|
+
*/
|
|
180
|
+
static getDomElementRects(element: HTMLElement): Array<Rect>;
|
|
173
181
|
/**
|
|
174
182
|
* Returns a bounding rectangle that contains all the given `rects`.
|
|
175
183
|
*
|
package/dist/index.css
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { isObject as isObject$1, isString, isPlainObject, cloneDeepWith, isEleme
|
|
|
18
18
|
* testing, i.e. stubbing native properties:
|
|
19
19
|
*
|
|
20
20
|
* ```ts
|
|
21
|
-
* import { global } from 'ckeditor5
|
|
21
|
+
* import { global } from 'ckeditor5';
|
|
22
22
|
*
|
|
23
23
|
* // This stub will work for any code using global module.
|
|
24
24
|
* testUtils.sinon.stub( global, 'window', {
|
|
@@ -987,9 +987,9 @@ function isObject(structure) {
|
|
|
987
987
|
];
|
|
988
988
|
}
|
|
989
989
|
|
|
990
|
-
const version = '
|
|
990
|
+
const version = '48.0.0-alpha.0';
|
|
991
991
|
// The second argument is not a month. It is `monthIndex` and starts from `0`.
|
|
992
|
-
const releaseDate = new Date(2026, 2,
|
|
992
|
+
const releaseDate = new Date(2026, 2, 19);
|
|
993
993
|
/* istanbul ignore next -- @preserve */ if (globalThis.CKEDITOR_VERSION) {
|
|
994
994
|
/**
|
|
995
995
|
* This error is thrown when, due to a mistake in the way CKEditor 5 was installed,
|
|
@@ -1097,7 +1097,7 @@ const releaseDate = new Date(2026, 2, 11);
|
|
|
1097
1097
|
* <details>
|
|
1098
1098
|
* <summary>(Legacy) Default imports and `src` imports</summary>
|
|
1099
1099
|
*
|
|
1100
|
-
* If you use the
|
|
1100
|
+
* If you use the legacy customized installation
|
|
1101
1101
|
* method, you should only import { code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code } from
|
|
1102
1102
|
* the `@ckeditor/ckeditor5-<NAME>/src/*` files, it is not recommended as it can make migration to the new installation
|
|
1103
1103
|
* methods more difficult.
|
|
@@ -1119,7 +1119,7 @@ const releaseDate = new Date(2026, 2, 11);
|
|
|
1119
1119
|
* <details>
|
|
1120
1120
|
* <summary>(Legacy) DLL builds</summary>
|
|
1121
1121
|
*
|
|
1122
|
-
* If you are using the {@glink
|
|
1122
|
+
* If you are using the {@glink updating/nim-migration/dll-builds legacy DLL builds},
|
|
1123
1123
|
* you should not import any non-DLL modules.
|
|
1124
1124
|
*
|
|
1125
1125
|
* Examples of valid and invalid import paths:
|
|
@@ -3204,6 +3204,8 @@ const POSITIONING_VALUES = new Set([
|
|
|
3204
3204
|
/**
|
|
3205
3205
|
* Returns an array of rects of the given native DOM Range.
|
|
3206
3206
|
*
|
|
3207
|
+
* Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
|
|
3208
|
+
*
|
|
3207
3209
|
* @param range A native DOM range.
|
|
3208
3210
|
* @returns DOM Range rects.
|
|
3209
3211
|
*/ static getDomRangeRects(range) {
|
|
@@ -3230,6 +3232,19 @@ const POSITIONING_VALUES = new Set([
|
|
|
3230
3232
|
}
|
|
3231
3233
|
return rects;
|
|
3232
3234
|
}
|
|
3235
|
+
/**
|
|
3236
|
+
* Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.
|
|
3237
|
+
*
|
|
3238
|
+
* Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.
|
|
3239
|
+
*/ static getDomElementRects(element) {
|
|
3240
|
+
return Array.from(element.getClientRects()).map((clientRect)=>{
|
|
3241
|
+
const rect = new Rect(clientRect);
|
|
3242
|
+
// Point the rect source to the DOM element instead of of the DOM client rect to allow proper clipping,
|
|
3243
|
+
// in `Rect#getVisible()` method.
|
|
3244
|
+
rect._source = element;
|
|
3245
|
+
return rect;
|
|
3246
|
+
});
|
|
3247
|
+
}
|
|
3233
3248
|
/**
|
|
3234
3249
|
* Returns a bounding rectangle that contains all the given `rects`.
|
|
3235
3250
|
*
|
|
@@ -6378,6 +6393,10 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
6378
6393
|
name: 'thead',
|
|
6379
6394
|
isVoid: false
|
|
6380
6395
|
},
|
|
6396
|
+
{
|
|
6397
|
+
name: 'tfoot',
|
|
6398
|
+
isVoid: false
|
|
6399
|
+
},
|
|
6381
6400
|
{
|
|
6382
6401
|
name: 'tr',
|
|
6383
6402
|
isVoid: false
|