@ckeditor/ckeditor5-utils 44.1.0 → 44.2.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/LICENSE.md +1 -1
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +2 -2
- package/dist/index.js +194 -47
- package/dist/index.js.map +1 -1
- package/package.json +24 -4
- 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 +1 -1
- package/src/ckeditorerror.js +1 -1
- package/src/collection.d.ts +1 -1
- package/src/collection.js +1 -1
- package/src/collectstylesheets.d.ts +13 -0
- package/src/collectstylesheets.js +52 -0
- 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 +1 -1
- package/src/crc32.js +1 -1
- package/src/delay.d.ts +1 -1
- package/src/delay.js +1 -1
- package/src/diff.d.ts +1 -1
- package/src/diff.js +1 -1
- package/src/difftochanges.d.ts +1 -1
- package/src/difftochanges.js +1 -1
- package/src/dom/createelement.d.ts +1 -1
- package/src/dom/createelement.js +1 -1
- package/src/dom/emittermixin.d.ts +1 -1
- package/src/dom/emittermixin.js +1 -1
- package/src/dom/findclosestscrollableancestor.d.ts +1 -1
- package/src/dom/findclosestscrollableancestor.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/dom/getrangefrommouseevent.d.ts +1 -1
- package/src/dom/getrangefrommouseevent.js +1 -1
- package/src/dom/global.d.ts +1 -1
- package/src/dom/global.js +1 -1
- 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 +1 -1
- package/src/dom/isvisible.d.ts +1 -1
- package/src/dom/isvisible.js +1 -1
- package/src/dom/iswindow.d.ts +1 -1
- package/src/dom/iswindow.js +1 -1
- package/src/dom/position.d.ts +1 -1
- package/src/dom/position.js +1 -1
- package/src/dom/rect.d.ts +1 -1
- package/src/dom/rect.js +1 -1
- 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 +1 -1
- package/src/dom/scroll.d.ts +1 -1
- package/src/dom/scroll.js +1 -1
- 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 +1 -1
- package/src/emittermixin.js +1 -1
- package/src/env.d.ts +1 -1
- package/src/env.js +1 -1
- package/src/eventinfo.d.ts +1 -1
- package/src/eventinfo.js +1 -1
- 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 +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.js +3 -1
- package/src/inserttopriorityarray.d.ts +1 -1
- package/src/inserttopriorityarray.js +1 -1
- package/src/isiterable.d.ts +1 -1
- package/src/isiterable.js +1 -1
- package/src/keyboard.d.ts +4 -3
- package/src/keyboard.js +8 -4
- package/src/keystrokehandler.d.ts +1 -1
- package/src/keystrokehandler.js +1 -1
- package/src/language.d.ts +1 -1
- package/src/language.js +1 -1
- package/src/locale.d.ts +1 -1
- package/src/locale.js +1 -1
- package/src/mapsequal.d.ts +1 -1
- package/src/mapsequal.js +1 -1
- package/src/mix.d.ts +1 -1
- package/src/mix.js +1 -1
- 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 +1 -1
- package/src/observablemixin.js +1 -1
- package/src/parsebase64encodedobject.d.ts +1 -1
- package/src/parsebase64encodedobject.js +1 -1
- package/src/priorities.d.ts +1 -1
- package/src/priorities.js +1 -1
- package/src/retry.d.ts +1 -1
- package/src/retry.js +1 -1
- package/src/splicearray.d.ts +1 -1
- package/src/splicearray.js +1 -1
- package/src/spy.d.ts +1 -1
- package/src/spy.js +1 -1
- package/src/toarray.d.ts +1 -1
- package/src/toarray.js +1 -1
- package/src/tomap.d.ts +1 -1
- package/src/tomap.js +1 -1
- package/src/translation-service.d.ts +1 -1
- package/src/translation-service.js +1 -1
- package/src/uid.d.ts +1 -1
- package/src/uid.js +1 -1
- package/src/unicode.d.ts +1 -1
- package/src/unicode.js +1 -1
- package/src/version.d.ts +2 -2
- package/src/version.js +3 -3
- package/src/wait.d.ts +1 -1
- package/src/wait.js +1 -1
- package/dist/abortabledebounce.d.ts +0 -21
- package/dist/areconnectedthroughproperties.d.ts +0 -15
- package/dist/ckeditorerror.d.ts +0 -127
- package/dist/collection.d.ts +0 -437
- package/dist/comparearrays.d.ts +0 -34
- package/dist/config.d.ts +0 -167
- package/dist/count.d.ts +0 -22
- package/dist/crc32.d.ts +0 -30
- package/dist/delay.d.ts +0 -23
- package/dist/diff.d.ts +0 -35
- package/dist/difftochanges.d.ts +0 -63
- package/dist/dom/createelement.d.ts +0 -61
- package/dist/dom/emittermixin.d.ts +0 -146
- package/dist/dom/findclosestscrollableancestor.d.ts +0 -15
- package/dist/dom/getancestors.d.ts +0 -21
- package/dist/dom/getborderwidths.d.ts +0 -28
- package/dist/dom/getcommonancestor.d.ts +0 -16
- package/dist/dom/getdatafromelement.d.ts +0 -18
- package/dist/dom/getpositionedancestor.d.ts +0 -14
- package/dist/dom/getrangefrommouseevent.d.ts +0 -21
- package/dist/dom/global.d.ts +0 -36
- package/dist/dom/indexof.d.ts +0 -18
- package/dist/dom/insertat.d.ts +0 -19
- package/dist/dom/iscomment.d.ts +0 -15
- package/dist/dom/isnode.d.ts +0 -15
- package/dist/dom/isrange.d.ts +0 -15
- package/dist/dom/istext.d.ts +0 -15
- package/dist/dom/isvalidattributename.d.ts +0 -14
- package/dist/dom/isvisible.d.ts +0 -19
- package/dist/dom/iswindow.d.ts +0 -15
- package/dist/dom/position.d.ts +0 -215
- package/dist/dom/rect.d.ts +0 -199
- package/dist/dom/remove.d.ts +0 -17
- package/dist/dom/resizeobserver.d.ts +0 -78
- package/dist/dom/scroll.d.ts +0 -77
- package/dist/dom/setdatainelement.d.ts +0 -18
- package/dist/dom/tounit.d.ts +0 -26
- package/dist/elementreplacer.d.ts +0 -35
- package/dist/emittermixin.d.ts +0 -316
- package/dist/env.d.ts +0 -144
- package/dist/eventinfo.d.ts +0 -62
- package/dist/fastdiff.d.ts +0 -116
- package/dist/first.d.ts +0 -15
- package/dist/focustracker.d.ts +0 -144
- package/dist/index.d.ts +0 -70
- package/dist/inserttopriorityarray.d.ts +0 -34
- package/dist/isiterable.d.ts +0 -18
- package/dist/keyboard.d.ts +0 -130
- package/dist/keystrokehandler.d.ts +0 -101
- package/dist/language.d.ts +0 -21
- package/dist/locale.d.ts +0 -145
- package/dist/mapsequal.d.ts +0 -19
- package/dist/mix.d.ts +0 -89
- package/dist/nth.d.ts +0 -20
- package/dist/objecttomap.d.ts +0 -27
- package/dist/observablemixin.d.ts +0 -564
- package/dist/parsebase64encodedobject.d.ts +0 -15
- package/dist/priorities.d.ts +0 -37
- package/dist/retry.d.ts +0 -37
- package/dist/splicearray.d.ts +0 -31
- package/dist/spy.d.ts +0 -25
- package/dist/toarray.d.ts +0 -29
- package/dist/tomap.d.ts +0 -23
- package/dist/translation-service.d.ts +0 -178
- package/dist/uid.d.ts +0 -19
- package/dist/unicode.d.ts +0 -58
- package/dist/version.d.ts +0 -14
- package/dist/wait.d.ts +0 -20
package/dist/delay.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/delay
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Returns a function wrapper that will trigger a function after a specified wait time.
|
|
14
|
-
* The timeout can be canceled by calling the cancel function on the returned wrapped function.
|
|
15
|
-
*
|
|
16
|
-
* @param func The function to wrap.
|
|
17
|
-
* @param wait The timeout in ms.
|
|
18
|
-
*/
|
|
19
|
-
export default function delay<T extends (...args: Array<any>) => any>(func: T, wait: number): DelayedFunc<T>;
|
|
20
|
-
export interface DelayedFunc<T extends (...args: Array<any>) => any> {
|
|
21
|
-
(...args: Parameters<T>): void;
|
|
22
|
-
cancel(): void;
|
|
23
|
-
}
|
package/dist/diff.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Calculates the difference between two arrays or strings producing an array containing a list of changes
|
|
11
|
-
* necessary to transform input into output.
|
|
12
|
-
*
|
|
13
|
-
* ```ts
|
|
14
|
-
* diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* This function is based on the "O(NP) Sequence Comparison Algorithm" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.
|
|
18
|
-
* Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).
|
|
19
|
-
* Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting
|
|
20
|
-
* such a scenario. The return formats of both functions are identical.
|
|
21
|
-
*
|
|
22
|
-
* @param a Input array or string.
|
|
23
|
-
* @param b Output array or string.
|
|
24
|
-
* @param cmp Optional function used to compare array values, by default === is used.
|
|
25
|
-
* @returns Array of changes.
|
|
26
|
-
*/
|
|
27
|
-
declare function diff<T>(a: ArrayLike<T>, b: ArrayLike<T>, cmp?: (a: T, b: T) => boolean): Array<DiffResult>;
|
|
28
|
-
declare namespace diff {
|
|
29
|
-
var fastDiff: typeof import("./fastdiff.js").default;
|
|
30
|
-
}
|
|
31
|
-
export default diff;
|
|
32
|
-
/**
|
|
33
|
-
* The element of the result of {@link module:utils/diff~diff} function.
|
|
34
|
-
*/
|
|
35
|
-
export type DiffResult = 'equal' | 'insert' | 'delete';
|
package/dist/difftochanges.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import type { DiffResult } from './diff.js';
|
|
10
|
-
/**
|
|
11
|
-
* @module utils/difftochanges
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Creates a set of changes which need to be applied to the input in order to transform
|
|
15
|
-
* it into the output. This function can be used with strings or arrays.
|
|
16
|
-
*
|
|
17
|
-
* ```ts
|
|
18
|
-
* const input = Array.from( 'abc' );
|
|
19
|
-
* const output = Array.from( 'xaby' );
|
|
20
|
-
* const changes = diffToChanges( diff( input, output ), output );
|
|
21
|
-
*
|
|
22
|
-
* changes.forEach( change => {
|
|
23
|
-
* if ( change.type == 'insert' ) {
|
|
24
|
-
* input.splice( change.index, 0, ...change.values );
|
|
25
|
-
* } else if ( change.type == 'delete' ) {
|
|
26
|
-
* input.splice( change.index, change.howMany );
|
|
27
|
-
* }
|
|
28
|
-
* } );
|
|
29
|
-
*
|
|
30
|
-
* input.join( '' ) == output.join( '' ); // -> true
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @typeParam T The type of output array element.
|
|
34
|
-
* @param diff Result of {@link module:utils/diff~diff}.
|
|
35
|
-
* @param output The string or array which was passed as diff's output.
|
|
36
|
-
* @returns Set of changes (insert or delete) which need to be applied to the input
|
|
37
|
-
* in order to transform it into the output.
|
|
38
|
-
*/
|
|
39
|
-
export default function diffToChanges<T>(diff: ReadonlyArray<DiffResult>, output: ArrayLike<T>): Array<Change<T>>;
|
|
40
|
-
/**
|
|
41
|
-
* An object describing insertion change.
|
|
42
|
-
*
|
|
43
|
-
* @typeParam T The type of output array element.
|
|
44
|
-
*/
|
|
45
|
-
export interface InsertChange<T> {
|
|
46
|
-
type: 'insert';
|
|
47
|
-
index: number;
|
|
48
|
-
values: Array<T>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* An object describing deletion change.
|
|
52
|
-
*/
|
|
53
|
-
export interface DeleteChange {
|
|
54
|
-
type: 'delete';
|
|
55
|
-
index: number;
|
|
56
|
-
howMany: number;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* The element of the result of {@link module:utils/difftochanges~diffToChanges} function.
|
|
60
|
-
*
|
|
61
|
-
* @typeParam T The type of output array element.
|
|
62
|
-
*/
|
|
63
|
-
export type Change<T> = InsertChange<T> | DeleteChange;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Attributes to be applied to the HTML element.
|
|
11
|
-
*/
|
|
12
|
-
type HTMLElementAttributes = {
|
|
13
|
-
readonly [key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Attributes to be applied to the SVG element.
|
|
17
|
-
*/
|
|
18
|
-
type SVGElementAttributes = HTMLElementAttributes & {
|
|
19
|
-
xmlns: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Element or elements that will be added to the created element as children. Strings will be automatically turned into Text nodes.
|
|
23
|
-
*/
|
|
24
|
-
type ChildrenElements = Node | string | Iterable<Node | string>;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an SVG element with attributes and children elements.
|
|
27
|
-
*
|
|
28
|
-
* ```ts
|
|
29
|
-
* createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' } ); // <mask>
|
|
30
|
-
* createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg', id: 'foo' } ); // <mask id="foo">
|
|
31
|
-
* createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' }, 'foo' ); // <mask>foo</mask>
|
|
32
|
-
* createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' }, [ createElement(...) ] ); // <mask><...></mask>
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @label SVG_ELEMENT
|
|
36
|
-
* @param doc Document used to create the element.
|
|
37
|
-
* @param name Name of the SVG element.
|
|
38
|
-
* @param attributes Object where keys represent attribute keys and values represent attribute values.
|
|
39
|
-
* @param children Child or any iterable of children. Strings will be automatically turned into Text nodes.
|
|
40
|
-
* @returns SVG element.
|
|
41
|
-
*/
|
|
42
|
-
export default function createElement<T extends keyof SVGElementTagNameMap>(doc: Document, name: T, attributes: SVGElementAttributes, children?: ChildrenElements): SVGElementTagNameMap[T];
|
|
43
|
-
/**
|
|
44
|
-
* Creates an HTML element with attributes and children elements.
|
|
45
|
-
*
|
|
46
|
-
* ```ts
|
|
47
|
-
* createElement( document, 'p' ); // <p>
|
|
48
|
-
* createElement( document, 'p', { class: 'foo' } ); // <p class="foo">
|
|
49
|
-
* createElement( document, 'p', null, 'foo' ); // <p>foo</p>
|
|
50
|
-
* createElement( document, 'p', null, [ createElement(...) ] ); // <p><...></p>
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* @label HTML_ELEMENT
|
|
54
|
-
* @param doc Document used to create the element.
|
|
55
|
-
* @param name Name of the HTML element.
|
|
56
|
-
* @param attributes Object where keys represent attribute keys and values represent attribute values.
|
|
57
|
-
* @param children Child or any iterable of children. Strings will be automatically turned into Text nodes.
|
|
58
|
-
* @returns HTML element.
|
|
59
|
-
*/
|
|
60
|
-
export default function createElement<T extends keyof HTMLElementTagNameMap>(doc: Document, name: T, attributes?: HTMLElementAttributes, children?: ChildrenElements): HTMLElementTagNameMap[T];
|
|
61
|
-
export {};
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/emittermixin
|
|
11
|
-
*/
|
|
12
|
-
import { type Emitter, type CallbackOptions, type BaseEvent, type GetCallback } from '../emittermixin.js';
|
|
13
|
-
import type EventInfo from '../eventinfo.js';
|
|
14
|
-
import type { Constructor, Mixed } from '../mix.js';
|
|
15
|
-
/**
|
|
16
|
-
* Mixin that injects the DOM events API into its host. It provides the API
|
|
17
|
-
* compatible with {@link module:utils/emittermixin~Emitter}.
|
|
18
|
-
*
|
|
19
|
-
* This function creates a class that inherits from the provided `base` and implements `Emitter` interface.
|
|
20
|
-
*
|
|
21
|
-
* DOM emitter mixin is by default available in the {@link module:ui/view~View} class,
|
|
22
|
-
* but it can also be mixed into any other class:
|
|
23
|
-
*
|
|
24
|
-
* ```ts
|
|
25
|
-
* import DomEmitterMixin from '../utils/dom/emittermixin.js';
|
|
26
|
-
*
|
|
27
|
-
* class BaseClass { ... }
|
|
28
|
-
*
|
|
29
|
-
* class SomeView extends DomEmitterMixin( BaseClass ) {}
|
|
30
|
-
*
|
|
31
|
-
* const view = new SomeView();
|
|
32
|
-
* view.listenTo( domElement, ( evt, domEvt ) => {
|
|
33
|
-
* console.log( evt, domEvt );
|
|
34
|
-
* } );
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @label EXTENDS
|
|
38
|
-
*/
|
|
39
|
-
export default function DomEmitterMixin<Base extends Constructor<Emitter>>(base: Base): Mixed<Base, DomEmitter>;
|
|
40
|
-
/**
|
|
41
|
-
* Mixin that injects the DOM events API into its host. It provides the API
|
|
42
|
-
* compatible with {@link module:utils/emittermixin~Emitter}.
|
|
43
|
-
*
|
|
44
|
-
* This function creates a class that implements `Emitter` interface.
|
|
45
|
-
*
|
|
46
|
-
* DOM emitter mixin is by default available in the {@link module:ui/view~View} class,
|
|
47
|
-
* but it can also be mixed into any other class:
|
|
48
|
-
*
|
|
49
|
-
* ```ts
|
|
50
|
-
* import DomEmitterMixin from '../utils/dom/emittermixin.js';
|
|
51
|
-
*
|
|
52
|
-
* class SomeView extends DomEmitterMixin() {}
|
|
53
|
-
*
|
|
54
|
-
* const view = new SomeView();
|
|
55
|
-
* view.listenTo( domElement, ( evt, domEvt ) => {
|
|
56
|
-
* console.log( evt, domEvt );
|
|
57
|
-
* } );
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* @label NO_ARGUMENTS
|
|
61
|
-
*/
|
|
62
|
-
export default function DomEmitterMixin(): {
|
|
63
|
-
new (): DomEmitter;
|
|
64
|
-
prototype: DomEmitter;
|
|
65
|
-
};
|
|
66
|
-
export interface DomEventMap extends HTMLElementEventMap, WindowEventMap {
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Interface representing classes which mix in {@link module:utils/dom/emittermixin~DomEmitterMixin}.
|
|
70
|
-
*
|
|
71
|
-
* Can be easily implemented by a class by mixing the {@link module:utils/dom/emittermixin~DomEmitterMixin} mixin.
|
|
72
|
-
*
|
|
73
|
-
* ```ts
|
|
74
|
-
* class MyClass extends DomEmitterMixin( OtherBaseClass ) {
|
|
75
|
-
* // This class now implements the `Emitter` interface.
|
|
76
|
-
* }
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export interface DomEmitter extends Emitter {
|
|
80
|
-
/**
|
|
81
|
-
* Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.
|
|
82
|
-
* It is backwards compatible with {@link module:utils/emittermixin~Emitter#listenTo}.
|
|
83
|
-
*
|
|
84
|
-
* @label HTML_EMITTER
|
|
85
|
-
* @param emitter The object that fires the event.
|
|
86
|
-
* @param event The name of the event.
|
|
87
|
-
* @param callback The function to be called on event.
|
|
88
|
-
* @param options Additional options.
|
|
89
|
-
* @param options.useCapture Indicates that events of this type will be dispatched to the registered
|
|
90
|
-
* listener before being dispatched to any EventTarget beneath it in the DOM tree.
|
|
91
|
-
* @param options.usePassive Indicates that the function specified by listener will never call preventDefault()
|
|
92
|
-
* and prevents blocking browser's main thread by this event handler.
|
|
93
|
-
*/
|
|
94
|
-
listenTo<K extends keyof DomEventMap>(emitter: Node | Window, event: K, callback: (this: this, ev: EventInfo, event: DomEventMap[K]) => void, options?: CallbackOptions & {
|
|
95
|
-
readonly useCapture?: boolean;
|
|
96
|
-
readonly usePassive?: boolean;
|
|
97
|
-
}): void;
|
|
98
|
-
/**
|
|
99
|
-
* Registers a callback function to be executed when an event is fired in a specific (emitter) object.
|
|
100
|
-
*
|
|
101
|
-
* Events can be grouped in namespaces using `:`.
|
|
102
|
-
* When namespaced event is fired, it additionally fires all callbacks for that namespace.
|
|
103
|
-
*
|
|
104
|
-
* ```ts
|
|
105
|
-
* // myEmitter.on( ... ) is a shorthand for myEmitter.listenTo( myEmitter, ... ).
|
|
106
|
-
* myEmitter.on( 'myGroup', genericCallback );
|
|
107
|
-
* myEmitter.on( 'myGroup:myEvent', specificCallback );
|
|
108
|
-
*
|
|
109
|
-
* // genericCallback is fired.
|
|
110
|
-
* myEmitter.fire( 'myGroup' );
|
|
111
|
-
* // both genericCallback and specificCallback are fired.
|
|
112
|
-
* myEmitter.fire( 'myGroup:myEvent' );
|
|
113
|
-
* // genericCallback is fired even though there are no callbacks for "foo".
|
|
114
|
-
* myEmitter.fire( 'myGroup:foo' );
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* An event callback can {@link module:utils/eventinfo~EventInfo#stop stop the event} and
|
|
118
|
-
* set the {@link module:utils/eventinfo~EventInfo#return return value} of the {@link #fire} method.
|
|
119
|
-
*
|
|
120
|
-
* @label DOM_EMITTER
|
|
121
|
-
* @typeParam TEvent The type describing the event. See {@link module:utils/emittermixin~BaseEvent}.
|
|
122
|
-
* @param emitter The object that fires the event.
|
|
123
|
-
* @param event The name of the event.
|
|
124
|
-
* @param callback The function to be called on event.
|
|
125
|
-
* @param options Additional options.
|
|
126
|
-
*/
|
|
127
|
-
listenTo<TEvent extends BaseEvent>(emitter: Emitter, event: TEvent['name'], callback: GetCallback<TEvent>, options?: CallbackOptions): void;
|
|
128
|
-
/**
|
|
129
|
-
* Stops listening for events. It can be used at different levels:
|
|
130
|
-
* It is backwards compatible with {@link module:utils/emittermixin~Emitter#listenTo}.
|
|
131
|
-
*
|
|
132
|
-
* * To stop listening to a specific callback.
|
|
133
|
-
* * To stop listening to a specific event.
|
|
134
|
-
* * To stop listening to all events fired by a specific object.
|
|
135
|
-
* * To stop listening to all events fired by all objects.
|
|
136
|
-
*
|
|
137
|
-
* @label DOM_STOP
|
|
138
|
-
* @param emitter The object to stop listening to.
|
|
139
|
-
* If omitted, stops it for all objects.
|
|
140
|
-
* @param event (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it
|
|
141
|
-
* for all events from `emitter`.
|
|
142
|
-
* @param callback (Requires the `event`) The function to be removed from the call list for the given
|
|
143
|
-
* `event`.
|
|
144
|
-
*/
|
|
145
|
-
stopListening(emitter?: Emitter | Node | Window, event?: string, callback?: Function): void;
|
|
146
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Returns the closest scrollable ancestor of a DOM element.
|
|
11
|
-
*
|
|
12
|
-
* @param domElement DOM element.
|
|
13
|
-
* @returns First ancestor of `domElement` that is scrollable or null if such ancestor doesn't exist.
|
|
14
|
-
*/
|
|
15
|
-
export default function findClosestScrollableAncestor(domElement: HTMLElement): HTMLElement | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/getancestors
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Returns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the
|
|
14
|
-
* node is a part of `DocumentFragment` that `DocumentFragment` will be returned. In contrary, if the node is
|
|
15
|
-
* appended to a `Document`, that `Document` will not be returned (algorithms operating on DOM tree care for `Document#documentElement`
|
|
16
|
-
* at most, which will be returned).
|
|
17
|
-
*
|
|
18
|
-
* @param node DOM node.
|
|
19
|
-
* @returns Array of given `node` parents.
|
|
20
|
-
*/
|
|
21
|
-
export default function getAncestors(node: Node): Array<Node>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/getborderwidths
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Returns an object containing CSS border widths of a specified HTML element.
|
|
14
|
-
*
|
|
15
|
-
* @param element An element which has CSS borders.
|
|
16
|
-
* @returns An object containing `top`, `left`, `right` and `bottom` properties
|
|
17
|
-
* with numerical values of the `border-[top,left,right,bottom]-width` CSS styles.
|
|
18
|
-
*/
|
|
19
|
-
export default function getBorderWidths(element: HTMLElement): BorderWidths;
|
|
20
|
-
/**
|
|
21
|
-
* An object describing widths of `HTMLElement` borders.
|
|
22
|
-
*/
|
|
23
|
-
export interface BorderWidths {
|
|
24
|
-
top: number;
|
|
25
|
-
right: number;
|
|
26
|
-
bottom: number;
|
|
27
|
-
left: number;
|
|
28
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Searches and returns the lowest common ancestor of two given nodes.
|
|
11
|
-
*
|
|
12
|
-
* @param nodeA First node.
|
|
13
|
-
* @param nodeB Second node.
|
|
14
|
-
* @returns Lowest common ancestor of both nodes or `null` if nodes do not have a common ancestor.
|
|
15
|
-
*/
|
|
16
|
-
export default function getCommonAncestor(nodeA: Node, nodeB: Node): Node | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/getdatafromelement
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Gets data from a given source element.
|
|
14
|
-
*
|
|
15
|
-
* @param el The element from which the data will be retrieved.
|
|
16
|
-
* @returns The data string.
|
|
17
|
-
*/
|
|
18
|
-
export default function getDataFromElement(el: HTMLElement): string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* For a given element, returns the nearest ancestor element which CSS position is not "static".
|
|
11
|
-
*
|
|
12
|
-
* @param element The native DOM element to be checked.
|
|
13
|
-
*/
|
|
14
|
-
export default function getPositionedAncestor(element?: HTMLElement): HTMLElement | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/getrangefrommouseevent
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Returns a DOM range from a given point specified by a mouse event.
|
|
14
|
-
*
|
|
15
|
-
* @param domEvent The mouse event.
|
|
16
|
-
* @returns The DOM range.
|
|
17
|
-
*/
|
|
18
|
-
export default function getRangeFromMouseEvent(domEvent: MouseEvent & {
|
|
19
|
-
rangeParent?: HTMLElement;
|
|
20
|
-
rangeOffset?: number;
|
|
21
|
-
}): Range | null;
|
package/dist/dom/global.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/global
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* A helper (module) giving an access to the global DOM objects such as `window` and `document`.
|
|
14
|
-
*/
|
|
15
|
-
export interface GlobalType {
|
|
16
|
-
readonly window: Window & typeof globalThis;
|
|
17
|
-
readonly document: Document;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* A helper (module) giving an access to the global DOM objects such as `window` and
|
|
21
|
-
* `document`. Accessing these objects using this helper allows easy and bulletproof
|
|
22
|
-
* testing, i.e. stubbing native properties:
|
|
23
|
-
*
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { global } from 'ckeditor5/utils';
|
|
26
|
-
*
|
|
27
|
-
* // This stub will work for any code using global module.
|
|
28
|
-
* testUtils.sinon.stub( global, 'window', {
|
|
29
|
-
* innerWidth: 10000
|
|
30
|
-
* } );
|
|
31
|
-
*
|
|
32
|
-
* console.log( global.window.innerWidth );
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
declare let globalVar: GlobalType;
|
|
36
|
-
export default globalVar;
|
package/dist/dom/indexof.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/indexof
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Returns index of the node in the parent element.
|
|
14
|
-
*
|
|
15
|
-
* @param node Node which index is tested.
|
|
16
|
-
* @returns Index of the node in the parent element. Returns 0 if node has no parent.
|
|
17
|
-
*/
|
|
18
|
-
export default function indexOf(node: Node): number;
|
package/dist/dom/insertat.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/insertat
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Inserts node to the parent at given index.
|
|
14
|
-
*
|
|
15
|
-
* @param parentElement Parent element.
|
|
16
|
-
* @param index Insertions index.
|
|
17
|
-
* @param nodeToInsert Node to insert.
|
|
18
|
-
*/
|
|
19
|
-
export default function insertAt(parentElement: Element, index: number, nodeToInsert: Node): void;
|
package/dist/dom/iscomment.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/iscomment
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Checks whether the object is a native DOM Comment node.
|
|
14
|
-
*/
|
|
15
|
-
export default function isComment(obj: any): obj is Comment;
|
package/dist/dom/isnode.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/isnode
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the object is a native DOM Node.
|
|
14
|
-
*/
|
|
15
|
-
export default function isNode(obj: any): obj is Node;
|
package/dist/dom/isrange.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/isrange
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the object is a native DOM Range.
|
|
14
|
-
*/
|
|
15
|
-
export default function isRange(obj: unknown): obj is Range;
|
package/dist/dom/istext.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module utils/dom/istext
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the object is a native DOM Text node.
|
|
14
|
-
*/
|
|
15
|
-
export default function isText(obj: unknown): obj is Text;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Checks if the given attribute name is valid in terms of HTML.
|
|
11
|
-
*
|
|
12
|
-
* @param name Attribute name.
|
|
13
|
-
*/
|
|
14
|
-
export default function isValidAttributeName(name: string): boolean;
|
package/dist/dom/isvisible.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Checks whether the element is visible to the user in DOM:
|
|
11
|
-
*
|
|
12
|
-
* * connected to the root of the document,
|
|
13
|
-
* * has no `display: none`,
|
|
14
|
-
* * has no ancestors with `display: none`.
|
|
15
|
-
*
|
|
16
|
-
* **Note**: This helper does not check whether the element is hidden by cropping, overflow, etc..
|
|
17
|
-
* To check that, use {@link module:utils/dom/rect~Rect} instead.
|
|
18
|
-
*/
|
|
19
|
-
export default function isVisible(element: Text | HTMLElement | null | undefined): boolean;
|