@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.
Files changed (82) hide show
  1. package/dist/abortabledebounce.d.ts +19 -13
  2. package/dist/areconnectedthroughproperties.d.ts +7 -7
  3. package/dist/ckeditorerror.d.ts +113 -113
  4. package/dist/collection.d.ts +419 -415
  5. package/dist/collectstylesheets.d.ts +9 -9
  6. package/dist/comparearrays.d.ts +25 -25
  7. package/dist/config.d.ts +159 -156
  8. package/dist/count.d.ts +14 -14
  9. package/dist/crc32.d.ts +19 -19
  10. package/dist/decodelicensekey.d.ts +7 -7
  11. package/dist/delay.d.ts +13 -13
  12. package/dist/diff.d.ts +32 -27
  13. package/dist/difftochanges.d.ts +47 -47
  14. package/dist/dom/createelement.d.ts +43 -43
  15. package/dist/dom/emittermixin.d.ts +144 -135
  16. package/dist/dom/findclosestscrollableancestor.d.ts +8 -8
  17. package/dist/dom/getancestors.d.ts +13 -13
  18. package/dist/dom/getborderwidths.d.ts +16 -16
  19. package/dist/dom/getcommonancestor.d.ts +9 -9
  20. package/dist/dom/getdatafromelement.d.ts +10 -10
  21. package/dist/dom/getpositionedancestor.d.ts +7 -7
  22. package/dist/dom/getrangefrommouseevent.d.ts +12 -12
  23. package/dist/dom/getvisualviewportoffset.d.ts +7 -7
  24. package/dist/dom/global.d.ts +24 -24
  25. package/dist/dom/indexof.d.ts +10 -10
  26. package/dist/dom/insertat.d.ts +11 -11
  27. package/dist/dom/iscomment.d.ts +7 -7
  28. package/dist/dom/isnode.d.ts +7 -7
  29. package/dist/dom/isrange.d.ts +7 -7
  30. package/dist/dom/istext.d.ts +7 -7
  31. package/dist/dom/isvalidattributename.d.ts +7 -7
  32. package/dist/dom/isvisible.d.ts +12 -12
  33. package/dist/dom/iswindow.d.ts +7 -7
  34. package/dist/dom/position.d.ts +200 -200
  35. package/dist/dom/rect.d.ts +194 -194
  36. package/dist/dom/remove.d.ts +9 -9
  37. package/dist/dom/resizeobserver.d.ts +70 -70
  38. package/dist/dom/scroll.d.ts +75 -72
  39. package/dist/dom/setdatainelement.d.ts +10 -10
  40. package/dist/dom/tounit.d.ts +16 -16
  41. package/dist/elementreplacer.d.ts +26 -26
  42. package/dist/emittermixin.d.ts +290 -280
  43. package/dist/env.d.ts +124 -124
  44. package/dist/eventinfo.d.ts +58 -55
  45. package/dist/fastdiff.d.ts +112 -109
  46. package/dist/first.d.ts +7 -7
  47. package/dist/focustracker.d.ts +133 -131
  48. package/dist/formathtml.d.ts +15 -15
  49. package/dist/index-content.css +1 -0
  50. package/dist/index-editor.css +1 -0
  51. package/dist/index.css +0 -2
  52. package/dist/index.d.ts +78 -77
  53. package/dist/index.js +5695 -6360
  54. package/dist/index.js.map +1 -1
  55. package/dist/inserttopriorityarray.d.ts +23 -23
  56. package/dist/isfeatureblockedbylicensekey.d.ts +10 -10
  57. package/dist/isiterable.d.ts +10 -10
  58. package/dist/keyboard.d.ts +107 -109
  59. package/dist/keystrokehandler.d.ts +90 -90
  60. package/dist/language.d.ts +12 -12
  61. package/dist/legacyerrors.d.ts +0 -4
  62. package/dist/locale.d.ts +122 -122
  63. package/dist/mapsequal.d.ts +11 -11
  64. package/dist/mix.d.ts +54 -53
  65. package/dist/nth.d.ts +12 -12
  66. package/dist/objecttomap.d.ts +18 -18
  67. package/dist/observablemixin.d.ts +621 -539
  68. package/dist/parsebase64encodedobject.d.ts +7 -7
  69. package/dist/parsedimensionwithunit.d.ts +40 -0
  70. package/dist/priorities.d.ts +24 -24
  71. package/dist/retry.d.ts +27 -27
  72. package/dist/splicearray.d.ts +22 -22
  73. package/dist/spy.d.ts +15 -15
  74. package/dist/toarray.d.ts +17 -17
  75. package/dist/tomap.d.ts +15 -15
  76. package/dist/translation-service.d.ts +157 -157
  77. package/dist/uid.d.ts +12 -12
  78. package/dist/unicode.d.ts +42 -42
  79. package/dist/version.d.ts +5 -5
  80. package/dist/wait.d.ts +11 -11
  81. package/package.json +2 -2
  82. package/dist/index.css.map +0 -1
@@ -1,10 +1,10 @@
1
1
  /**
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
- */
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
- * 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
- */
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
- * @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
- */
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
- * @module utils/dom/getrangefrommouseevent
7
- */
6
+ * @module utils/dom/getrangefrommouseevent
7
+ */
8
8
  /**
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
- */
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
- rangeParent?: HTMLElement;
16
- rangeOffset?: number;
15
+ rangeParent?: HTMLElement;
16
+ rangeOffset?: number;
17
17
  }): Range | null;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * Returns the visual viewport offsets to adjust elements with `position: fixed` style.
7
- */
6
+ * Returns the visual viewport offsets to adjust elements with `position: fixed` style.
7
+ */
8
8
  export declare function getVisualViewportOffset(): {
9
- left: number;
10
- top: number;
9
+ left: number;
10
+ top: number;
11
11
  };
@@ -1,32 +1,32 @@
1
1
  /**
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
- */
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
- * @module utils/dom/global
7
- */
6
+ * @module utils/dom/global
7
+ */
8
8
  /**
9
- * A helper (module) giving an access to the global DOM objects such as `window` and `document`.
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
- readonly window: Window & typeof globalThis;
13
- readonly document: Document;
12
+ readonly window: Window & typeof globalThis;
13
+ readonly document: Document;
14
14
  }
15
15
  /**
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
- */
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 };
@@ -1,14 +1,14 @@
1
1
  /**
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
- */
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
- * @module utils/dom/indexof
7
- */
6
+ * @module utils/dom/indexof
7
+ */
8
8
  /**
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
- */
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;
@@ -1,15 +1,15 @@
1
1
  /**
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
- */
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
- * @module utils/dom/insertat
7
- */
6
+ * @module utils/dom/insertat
7
+ */
8
8
  /**
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
- */
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;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * @module utils/dom/iscomment
7
- */
6
+ * @module utils/dom/iscomment
7
+ */
8
8
  /**
9
- * Checks whether the object is a native DOM Comment node.
10
- */
9
+ * Checks whether the object is a native DOM Comment node.
10
+ */
11
11
  export declare function isComment(obj: any): obj is Comment;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * @module utils/dom/isnode
7
- */
6
+ * @module utils/dom/isnode
7
+ */
8
8
  /**
9
- * Checks if the object is a native DOM Node.
10
- */
9
+ * Checks if the object is a native DOM Node.
10
+ */
11
11
  export declare function isNode(obj: any): obj is Node;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * @module utils/dom/isrange
7
- */
6
+ * @module utils/dom/isrange
7
+ */
8
8
  /**
9
- * Checks if the object is a native DOM Range.
10
- */
9
+ * Checks if the object is a native DOM Range.
10
+ */
11
11
  export declare function isRange(obj: unknown): obj is Range;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * @module utils/dom/istext
7
- */
6
+ * @module utils/dom/istext
7
+ */
8
8
  /**
9
- * Checks if the object is a native DOM Text node.
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
- * @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
- */
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
- * Checks if the given attribute name is valid in terms of HTML.
7
- *
8
- * @param name Attribute name.
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;
@@ -1,15 +1,15 @@
1
1
  /**
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
- */
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
- * 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
- */
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;
@@ -1,11 +1,11 @@
1
1
  /**
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
- */
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
- * @module utils/dom/iswindow
7
- */
6
+ * @module utils/dom/iswindow
7
+ */
8
8
  /**
9
- * Checks if the object is a native DOM Window.
10
- */
9
+ * Checks if the object is a native DOM Window.
10
+ */
11
11
  export declare function isWindow(obj: unknown): obj is Window;