@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,203 +1,203 @@
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
- * A helper class representing a `ClientRect` object, e.g. value returned by
7
- * the native `object.getBoundingClientRect()` method. Provides a set of methods
8
- * to manipulate the rect and compare it against other rect instances.
9
- */
6
+ * A helper class representing a `ClientRect` object, e.g. value returned by
7
+ * the native `object.getBoundingClientRect()` method. Provides a set of methods
8
+ * to manipulate the rect and compare it against other rect instances.
9
+ */
10
10
  export declare class Rect {
11
- /**
12
- * The "top" value of the rect.
13
- *
14
- * @readonly
15
- */
16
- top: number;
17
- /**
18
- * The "right" value of the rect.
19
- *
20
- * @readonly
21
- */
22
- right: number;
23
- /**
24
- * The "bottom" value of the rect.
25
- *
26
- * @readonly
27
- */
28
- bottom: number;
29
- /**
30
- * The "left" value of the rect.
31
- *
32
- * @readonly
33
- */
34
- left: number;
35
- /**
36
- * The "width" value of the rect.
37
- *
38
- * @readonly
39
- */
40
- width: number;
41
- /**
42
- * The "height" value of the rect.
43
- *
44
- * @readonly
45
- */
46
- height: number;
47
- /**
48
- * The object this rect is for.
49
- *
50
- * @readonly
51
- */
52
- private _source;
53
- /**
54
- * Creates an instance of rect.
55
- *
56
- * ```ts
57
- * // Rect of an HTMLElement.
58
- * const rectA = new Rect( document.body );
59
- *
60
- * // Rect of a DOM Range.
61
- * const rectB = new Rect( document.getSelection().getRangeAt( 0 ) );
62
- *
63
- * // Rect of a window (web browser viewport).
64
- * const rectC = new Rect( window );
65
- *
66
- * // Rect out of an object.
67
- * const rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );
68
- *
69
- * // Rect out of another Rect instance.
70
- * const rectE = new Rect( rectD );
71
- *
72
- * // Rect out of a ClientRect.
73
- * const rectF = new Rect( document.body.getClientRects().item( 0 ) );
74
- * ```
75
- *
76
- * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)
77
- * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}
78
- * to get the inner part of the rect.
79
- *
80
- * @param source A source object to create the rect.
81
- */
82
- constructor(source: RectSource);
83
- /**
84
- * Returns a clone of the rect.
85
- *
86
- * @returns A cloned rect.
87
- */
88
- clone(): Rect;
89
- /**
90
- * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.
91
- *
92
- * @param x Desired horizontal location.
93
- * @param y Desired vertical location.
94
- * @returns A rect which has been moved.
95
- */
96
- moveTo(x: number, y: number): this;
97
- /**
98
- * Moves the rect in–place by a dedicated offset.
99
- *
100
- * @param x A horizontal offset.
101
- * @param y A vertical offset
102
- * @returns A rect which has been moved.
103
- */
104
- moveBy(x: number, y: number): this;
105
- /**
106
- * Returns a new rect a a result of intersection with another rect.
107
- */
108
- getIntersection(anotherRect: Rect): Rect | null;
109
- /**
110
- * Returns the area of intersection with another rect.
111
- *
112
- * @returns Area of intersection.
113
- */
114
- getIntersectionArea(anotherRect: Rect): number;
115
- /**
116
- * Returns the area of the rect.
117
- */
118
- getArea(): number;
119
- /**
120
- * Returns a new rect, a part of the original rect, which is actually visible to the user and is relative to the,`body`,
121
- * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS
122
- * other than `"visible"`.
123
- *
124
- * If there's no such visible rect, which is when the rect is limited by one or many of
125
- * the ancestors, `null` is returned.
126
- *
127
- * **Note**: This method does not consider the boundaries of the viewport (window).
128
- * To get a rect cropped by all ancestors and the viewport, use an intersection such as:
129
- *
130
- * ```ts
131
- * const visibleInViewportRect = new Rect( window ).getIntersection( new Rect( source ).getVisible() );
132
- * ```
133
- *
134
- * @returns A visible rect instance or `null`, if there's none.
135
- */
136
- getVisible(): Rect | null;
137
- /**
138
- * Checks if all property values ({@link #top}, {@link #left}, {@link #right},
139
- * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect
140
- * instances.
141
- *
142
- * @param anotherRect A rect instance to compare with.
143
- * @returns `true` when Rects are equal. `false` otherwise.
144
- */
145
- isEqual(anotherRect: Rect): boolean;
146
- /**
147
- * Checks whether a rect fully contains another rect instance.
148
- *
149
- * @param anotherRect
150
- * @returns `true` if contains, `false` otherwise.
151
- */
152
- contains(anotherRect: Rect): boolean;
153
- /**
154
- * Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.
155
- */
156
- toAbsoluteRect(): Rect;
157
- /**
158
- * Excludes scrollbars and CSS borders from the rect.
159
- *
160
- * * Borders are removed when {@link #_source} is an HTML element.
161
- * * Scrollbars are excluded from HTML elements and the `window`.
162
- *
163
- * @returns A rect which has been updated.
164
- */
165
- excludeScrollbarsAndBorders(): this;
166
- /**
167
- * Returns an array of rects of the given native DOM Range.
168
- *
169
- * Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
170
- *
171
- * @param range A native DOM range.
172
- * @returns DOM Range rects.
173
- */
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>;
181
- /**
182
- * Returns a bounding rectangle that contains all the given `rects`.
183
- *
184
- * @param rects A list of rectangles that should be contained in the result rectangle.
185
- * @returns Bounding rectangle or `null` if no `rects` were given.
186
- */
187
- static getBoundingRect(rects: Iterable<Rect>): Rect | null;
11
+ /**
12
+ * The "top" value of the rect.
13
+ *
14
+ * @readonly
15
+ */
16
+ top: number;
17
+ /**
18
+ * The "right" value of the rect.
19
+ *
20
+ * @readonly
21
+ */
22
+ right: number;
23
+ /**
24
+ * The "bottom" value of the rect.
25
+ *
26
+ * @readonly
27
+ */
28
+ bottom: number;
29
+ /**
30
+ * The "left" value of the rect.
31
+ *
32
+ * @readonly
33
+ */
34
+ left: number;
35
+ /**
36
+ * The "width" value of the rect.
37
+ *
38
+ * @readonly
39
+ */
40
+ width: number;
41
+ /**
42
+ * The "height" value of the rect.
43
+ *
44
+ * @readonly
45
+ */
46
+ height: number;
47
+ /**
48
+ * The object this rect is for.
49
+ *
50
+ * @readonly
51
+ */
52
+ private _source;
53
+ /**
54
+ * Creates an instance of rect.
55
+ *
56
+ * ```ts
57
+ * // Rect of an HTMLElement.
58
+ * const rectA = new Rect( document.body );
59
+ *
60
+ * // Rect of a DOM Range.
61
+ * const rectB = new Rect( document.getSelection().getRangeAt( 0 ) );
62
+ *
63
+ * // Rect of a window (web browser viewport).
64
+ * const rectC = new Rect( window );
65
+ *
66
+ * // Rect out of an object.
67
+ * const rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );
68
+ *
69
+ * // Rect out of another Rect instance.
70
+ * const rectE = new Rect( rectD );
71
+ *
72
+ * // Rect out of a ClientRect.
73
+ * const rectF = new Rect( document.body.getClientRects().item( 0 ) );
74
+ * ```
75
+ *
76
+ * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)
77
+ * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}
78
+ * to get the inner part of the rect.
79
+ *
80
+ * @param source A source object to create the rect.
81
+ */
82
+ constructor(source: RectSource);
83
+ /**
84
+ * Returns a clone of the rect.
85
+ *
86
+ * @returns A cloned rect.
87
+ */
88
+ clone(): Rect;
89
+ /**
90
+ * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.
91
+ *
92
+ * @param x Desired horizontal location.
93
+ * @param y Desired vertical location.
94
+ * @returns A rect which has been moved.
95
+ */
96
+ moveTo(x: number, y: number): this;
97
+ /**
98
+ * Moves the rect in–place by a dedicated offset.
99
+ *
100
+ * @param x A horizontal offset.
101
+ * @param y A vertical offset
102
+ * @returns A rect which has been moved.
103
+ */
104
+ moveBy(x: number, y: number): this;
105
+ /**
106
+ * Returns a new rect a a result of intersection with another rect.
107
+ */
108
+ getIntersection(anotherRect: Rect): Rect | null;
109
+ /**
110
+ * Returns the area of intersection with another rect.
111
+ *
112
+ * @returns Area of intersection.
113
+ */
114
+ getIntersectionArea(anotherRect: Rect): number;
115
+ /**
116
+ * Returns the area of the rect.
117
+ */
118
+ getArea(): number;
119
+ /**
120
+ * Returns a new rect, a part of the original rect, which is actually visible to the user and is relative to the,`body`,
121
+ * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS
122
+ * other than `"visible"`.
123
+ *
124
+ * If there's no such visible rect, which is when the rect is limited by one or many of
125
+ * the ancestors, `null` is returned.
126
+ *
127
+ * **Note**: This method does not consider the boundaries of the viewport (window).
128
+ * To get a rect cropped by all ancestors and the viewport, use an intersection such as:
129
+ *
130
+ * ```ts
131
+ * const visibleInViewportRect = new Rect( window ).getIntersection( new Rect( source ).getVisible() );
132
+ * ```
133
+ *
134
+ * @returns A visible rect instance or `null`, if there's none.
135
+ */
136
+ getVisible(): Rect | null;
137
+ /**
138
+ * Checks if all property values ({@link #top}, {@link #left}, {@link #right},
139
+ * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect
140
+ * instances.
141
+ *
142
+ * @param anotherRect A rect instance to compare with.
143
+ * @returns `true` when Rects are equal. `false` otherwise.
144
+ */
145
+ isEqual(anotherRect: Rect): boolean;
146
+ /**
147
+ * Checks whether a rect fully contains another rect instance.
148
+ *
149
+ * @param anotherRect
150
+ * @returns `true` if contains, `false` otherwise.
151
+ */
152
+ contains(anotherRect: Rect): boolean;
153
+ /**
154
+ * Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.
155
+ */
156
+ toAbsoluteRect(): Rect;
157
+ /**
158
+ * Excludes scrollbars and CSS borders from the rect.
159
+ *
160
+ * * Borders are removed when {@link #_source} is an HTML element.
161
+ * * Scrollbars are excluded from HTML elements and the `window`.
162
+ *
163
+ * @returns A rect which has been updated.
164
+ */
165
+ excludeScrollbarsAndBorders(): this;
166
+ /**
167
+ * Returns an array of rects of the given native DOM Range.
168
+ *
169
+ * Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
170
+ *
171
+ * @param range A native DOM range.
172
+ * @returns DOM Range rects.
173
+ */
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>;
181
+ /**
182
+ * Returns a bounding rectangle that contains all the given `rects`.
183
+ *
184
+ * @param rects A list of rectangles that should be contained in the result rectangle.
185
+ * @returns Bounding rectangle or `null` if no `rects` were given.
186
+ */
187
+ static getBoundingRect(rects: Iterable<Rect>): Rect | null;
188
188
  }
189
189
  /**
190
- * A source of {@link module:utils/dom/rect~Rect}.
191
- */
190
+ * A source of {@link module:utils/dom/rect~Rect}.
191
+ */
192
192
  export type RectSource = HTMLElement | Range | Window | DomRectLike;
193
193
  /**
194
- * An object that describes properties of `ClientRect` object.
195
- */
194
+ * An object that describes properties of `ClientRect` object.
195
+ */
196
196
  export interface DomRectLike {
197
- readonly top: number;
198
- readonly right: number;
199
- readonly bottom: number;
200
- readonly left: number;
201
- readonly width: number;
202
- readonly height: number;
197
+ readonly top: number;
198
+ readonly right: number;
199
+ readonly bottom: number;
200
+ readonly left: number;
201
+ readonly width: number;
202
+ readonly height: number;
203
203
  }
@@ -1,13 +1,13 @@
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/remove
7
- */
6
+ * @module utils/dom/remove
7
+ */
8
8
  /**
9
- * Removes given node from parent.
10
- *
11
- * @param node Node to remove.
12
- */
9
+ * Removes given node from parent.
10
+ *
11
+ * @param node Node to remove.
12
+ */
13
13
  export declare function remove(node: Node): void;
@@ -1,74 +1,74 @@
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
- * A helper class which instances allow performing custom actions when native DOM elements are resized.
7
- *
8
- * ```ts
9
- * const editableElement = editor.editing.view.getDomRoot();
10
- *
11
- * const observer = new ResizeObserver( editableElement, entry => {
12
- * console.log( 'The editable element has been resized in DOM.' );
13
- * console.log( entry.target ); // -> editableElement
14
- * console.log( entry.contentRect.width ); // -> e.g. '423px'
15
- * } );
16
- * ```
17
- *
18
- * It uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
19
- * under the hood.
20
- */
6
+ * A helper class which instances allow performing custom actions when native DOM elements are resized.
7
+ *
8
+ * ```ts
9
+ * const editableElement = editor.editing.view.getDomRoot();
10
+ *
11
+ * const observer = new ResizeObserver( editableElement, entry => {
12
+ * console.log( 'The editable element has been resized in DOM.' );
13
+ * console.log( entry.target ); // -> editableElement
14
+ * console.log( entry.contentRect.width ); // -> e.g. '423px'
15
+ * } );
16
+ * ```
17
+ *
18
+ * It uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
19
+ * under the hood.
20
+ */
21
21
  export declare class ResizeObserver {
22
- /**
23
- * The element observed by this observer.
24
- */
25
- private readonly _element;
26
- /**
27
- * The callback executed each time {@link #_element} is resized.
28
- */
29
- private readonly _callback;
30
- /**
31
- * The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
32
- */
33
- private static _observerInstance;
34
- /**
35
- * A mapping of native DOM elements and their callbacks shared across all
36
- * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
37
- */
38
- private static _elementCallbacks;
39
- /**
40
- * Creates an instance of the `ResizeObserver` class.
41
- *
42
- * @param element A DOM element that is to be observed for resizing. Note that
43
- * the element must be visible (i.e. not detached from DOM) for the observer to work.
44
- * @param callback A function called when the observed element was resized. It passes
45
- * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
46
- * object with information about the resize event.
47
- */
48
- constructor(element: Element, callback: (entry: ResizeObserverEntry) => void);
49
- /**
50
- * The element observed by this observer.
51
- */
52
- get element(): Element;
53
- /**
54
- * Destroys the observer which disables the `callback` passed to the {@link #constructor}.
55
- */
56
- destroy(): void;
57
- /**
58
- * Registers a new resize callback for the DOM element.
59
- */
60
- private static _addElementCallback;
61
- /**
62
- * Removes a resize callback from the DOM element. If no callbacks are left
63
- * for the element, it removes the element from the native observer.
64
- */
65
- private static _deleteElementCallback;
66
- /**
67
- * Returns are registered resize callbacks for the DOM element.
68
- */
69
- private static _getElementCallbacks;
70
- /**
71
- * Creates the single native observer shared across all `ResizeObserver` instances.
72
- */
73
- private static _createObserver;
22
+ /**
23
+ * The element observed by this observer.
24
+ */
25
+ private readonly _element;
26
+ /**
27
+ * The callback executed each time {@link #_element} is resized.
28
+ */
29
+ private readonly _callback;
30
+ /**
31
+ * The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
32
+ */
33
+ private static _observerInstance;
34
+ /**
35
+ * A mapping of native DOM elements and their callbacks shared across all
36
+ * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
37
+ */
38
+ private static _elementCallbacks;
39
+ /**
40
+ * Creates an instance of the `ResizeObserver` class.
41
+ *
42
+ * @param element A DOM element that is to be observed for resizing. Note that
43
+ * the element must be visible (i.e. not detached from DOM) for the observer to work.
44
+ * @param callback A function called when the observed element was resized. It passes
45
+ * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
46
+ * object with information about the resize event.
47
+ */
48
+ constructor(element: Element, callback: (entry: ResizeObserverEntry) => void);
49
+ /**
50
+ * The element observed by this observer.
51
+ */
52
+ get element(): Element;
53
+ /**
54
+ * Destroys the observer which disables the `callback` passed to the {@link #constructor}.
55
+ */
56
+ destroy(): void;
57
+ /**
58
+ * Registers a new resize callback for the DOM element.
59
+ */
60
+ private static _addElementCallback;
61
+ /**
62
+ * Removes a resize callback from the DOM element. If no callbacks are left
63
+ * for the element, it removes the element from the native observer.
64
+ */
65
+ private static _deleteElementCallback;
66
+ /**
67
+ * Returns are registered resize callbacks for the DOM element.
68
+ */
69
+ private static _getElementCallbacks;
70
+ /**
71
+ * Creates the single native observer shared across all `ResizeObserver` instances.
72
+ */
73
+ private static _createObserver;
74
74
  }