@ckeditor/ckeditor5-utils 48.2.0 → 48.3.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/abortabledebounce.d.ts +19 -13
- package/dist/areconnectedthroughproperties.d.ts +7 -7
- package/dist/ckeditorerror.d.ts +113 -113
- package/dist/collection.d.ts +419 -415
- package/dist/collectstylesheets.d.ts +9 -9
- package/dist/comparearrays.d.ts +25 -25
- package/dist/config.d.ts +159 -156
- package/dist/count.d.ts +14 -14
- package/dist/crc32.d.ts +19 -19
- package/dist/decodelicensekey.d.ts +7 -7
- package/dist/delay.d.ts +13 -13
- package/dist/diff.d.ts +32 -27
- package/dist/difftochanges.d.ts +47 -47
- package/dist/dom/createelement.d.ts +43 -43
- package/dist/dom/emittermixin.d.ts +144 -135
- package/dist/dom/findclosestscrollableancestor.d.ts +8 -8
- package/dist/dom/getancestors.d.ts +13 -13
- package/dist/dom/getborderwidths.d.ts +16 -16
- package/dist/dom/getcommonancestor.d.ts +9 -9
- package/dist/dom/getdatafromelement.d.ts +10 -10
- package/dist/dom/getpositionedancestor.d.ts +7 -7
- package/dist/dom/getrangefrommouseevent.d.ts +12 -12
- package/dist/dom/getvisualviewportoffset.d.ts +7 -7
- package/dist/dom/global.d.ts +24 -24
- package/dist/dom/indexof.d.ts +10 -10
- package/dist/dom/insertat.d.ts +11 -11
- package/dist/dom/iscomment.d.ts +7 -7
- package/dist/dom/isnode.d.ts +7 -7
- package/dist/dom/isrange.d.ts +7 -7
- package/dist/dom/istext.d.ts +7 -7
- package/dist/dom/isvalidattributename.d.ts +7 -7
- package/dist/dom/isvisible.d.ts +12 -12
- package/dist/dom/iswindow.d.ts +7 -7
- package/dist/dom/position.d.ts +200 -200
- package/dist/dom/rect.d.ts +194 -194
- package/dist/dom/remove.d.ts +9 -9
- package/dist/dom/resizeobserver.d.ts +70 -70
- package/dist/dom/scroll.d.ts +75 -72
- package/dist/dom/setdatainelement.d.ts +10 -10
- package/dist/dom/tounit.d.ts +16 -16
- package/dist/elementreplacer.d.ts +26 -26
- package/dist/emittermixin.d.ts +290 -280
- package/dist/env.d.ts +124 -124
- package/dist/eventinfo.d.ts +58 -55
- package/dist/fastdiff.d.ts +112 -109
- package/dist/first.d.ts +7 -7
- package/dist/focustracker.d.ts +133 -131
- package/dist/formathtml.d.ts +15 -15
- package/dist/index-content.css +1 -0
- package/dist/index-editor.css +1 -0
- package/dist/index.css +0 -2
- package/dist/index.d.ts +78 -77
- package/dist/index.js +5695 -6360
- package/dist/index.js.map +1 -1
- package/dist/inserttopriorityarray.d.ts +23 -23
- package/dist/isfeatureblockedbylicensekey.d.ts +10 -10
- package/dist/isiterable.d.ts +10 -10
- package/dist/keyboard.d.ts +107 -109
- package/dist/keystrokehandler.d.ts +90 -90
- package/dist/language.d.ts +12 -12
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/locale.d.ts +122 -122
- package/dist/mapsequal.d.ts +11 -11
- package/dist/mix.d.ts +54 -53
- package/dist/nth.d.ts +12 -12
- package/dist/objecttomap.d.ts +18 -18
- package/dist/observablemixin.d.ts +621 -539
- package/dist/parsebase64encodedobject.d.ts +7 -7
- package/dist/parsedimensionwithunit.d.ts +40 -0
- package/dist/priorities.d.ts +24 -24
- package/dist/retry.d.ts +27 -27
- package/dist/splicearray.d.ts +22 -22
- package/dist/spy.d.ts +15 -15
- package/dist/toarray.d.ts +17 -17
- package/dist/tomap.d.ts +15 -15
- package/dist/translation-service.d.ts +157 -157
- package/dist/uid.d.ts +12 -12
- package/dist/unicode.d.ts +42 -42
- package/dist/version.d.ts +5 -5
- package/dist/wait.d.ts +11 -11
- package/package.json +2 -2
- package/dist/index.css.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
* For a given element, returns the nearest ancestor element which CSS position is not "static".
|
|
7
|
+
*
|
|
8
|
+
* @param element The native DOM element to be checked.
|
|
9
|
+
*/
|
|
10
10
|
export declare function getPositionedAncestor(element?: HTMLElement): HTMLElement | null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/getrangefrommouseevent
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* Returns a DOM range from a given point specified by a mouse event.
|
|
10
|
+
*
|
|
11
|
+
* @param domEvent The mouse event.
|
|
12
|
+
* @returns The DOM range.
|
|
13
|
+
*/
|
|
14
14
|
export declare function getRangeFromMouseEvent(domEvent: MouseEvent & {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
rangeParent?: HTMLElement;
|
|
16
|
+
rangeOffset?: number;
|
|
17
17
|
}): Range | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Returns the visual viewport offsets to adjust elements with `position: fixed` style.
|
|
7
|
+
*/
|
|
8
8
|
export declare function getVisualViewportOffset(): {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
left: number;
|
|
10
|
+
top: number;
|
|
11
11
|
};
|
package/dist/dom/global.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/global
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* A helper (module) giving an access to the global DOM objects such as `window` and `document`.
|
|
10
|
+
*/
|
|
11
11
|
export interface GlobalType {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
readonly window: Window & typeof globalThis;
|
|
13
|
+
readonly document: Document;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
* A helper (module) giving an access to the global DOM objects such as `window` and
|
|
17
|
+
* `document`. Accessing these objects using this helper allows easy and bulletproof
|
|
18
|
+
* testing, i.e. stubbing native properties:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { global } from 'ckeditor5';
|
|
22
|
+
*
|
|
23
|
+
* // This stub will work for any code using global module.
|
|
24
|
+
* testUtils.sinon.stub( global, 'window', {
|
|
25
|
+
* innerWidth: 10000
|
|
26
|
+
* } );
|
|
27
|
+
*
|
|
28
|
+
* console.log( global.window.innerWidth );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
31
|
declare let globalVar: GlobalType;
|
|
32
32
|
export { globalVar as global };
|
package/dist/dom/indexof.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/indexof
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* Returns index of the node in the parent element.
|
|
10
|
+
*
|
|
11
|
+
* @param node Node which index is tested.
|
|
12
|
+
* @returns Index of the node in the parent element. Returns 0 if node has no parent.
|
|
13
|
+
*/
|
|
14
14
|
export declare function indexOf(node: Node): number;
|
package/dist/dom/insertat.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/insertat
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
* Inserts node to the parent at given index.
|
|
10
|
+
*
|
|
11
|
+
* @param parentElement Parent element.
|
|
12
|
+
* @param index Insertions index.
|
|
13
|
+
* @param nodeToInsert Node to insert.
|
|
14
|
+
*/
|
|
15
15
|
export declare function insertAt(parentElement: Element, index: number, nodeToInsert: Node): void;
|
package/dist/dom/iscomment.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/iscomment
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Checks whether the object is a native DOM Comment node.
|
|
10
|
+
*/
|
|
11
11
|
export declare function isComment(obj: any): obj is Comment;
|
package/dist/dom/isnode.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/isnode
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Checks if the object is a native DOM Node.
|
|
10
|
+
*/
|
|
11
11
|
export declare function isNode(obj: any): obj is Node;
|
package/dist/dom/isrange.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/isrange
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Checks if the object is a native DOM Range.
|
|
10
|
+
*/
|
|
11
11
|
export declare function isRange(obj: unknown): obj is Range;
|
package/dist/dom/istext.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/istext
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Checks if the object is a native DOM Text node.
|
|
10
|
+
*/
|
|
11
11
|
export declare function isText(obj: unknown): obj is Text;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
* Checks if the given attribute name is valid in terms of HTML.
|
|
7
|
+
*
|
|
8
|
+
* @param name Attribute name.
|
|
9
|
+
*/
|
|
10
10
|
export declare function isValidAttributeName(name: string): boolean;
|
package/dist/dom/isvisible.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
* Checks whether the element is visible to the user in DOM:
|
|
7
|
+
*
|
|
8
|
+
* * connected to the root of the document,
|
|
9
|
+
* * has no `display: none`,
|
|
10
|
+
* * has no ancestors with `display: none`.
|
|
11
|
+
*
|
|
12
|
+
* **Note**: This helper does not check whether the element is hidden by cropping, overflow, etc..
|
|
13
|
+
* To check that, use {@link module:utils/dom/rect~Rect} instead.
|
|
14
|
+
*/
|
|
15
15
|
export declare function isVisible(element: Text | HTMLElement | null | undefined): boolean;
|
package/dist/dom/iswindow.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module utils/dom/iswindow
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Checks if the object is a native DOM Window.
|
|
10
|
+
*/
|
|
11
11
|
export declare function isWindow(obj: unknown): obj is Window;
|