@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,13 +1,13 @@
|
|
|
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/collectstylesheets
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
* A helper function for getting concatenated CSS rules from external stylesheets.
|
|
10
|
+
*
|
|
11
|
+
* @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
|
|
12
|
+
*/
|
|
13
13
|
export declare function collectStylesheets(stylesheets?: Array<string>): Promise<string>;
|
package/dist/comparearrays.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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/comparearrays
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
* Compares how given arrays relate to each other. One array can be: same as another array, prefix of another array
|
|
10
|
+
* or completely different. If arrays are different, first index at which they differ is returned. Otherwise,
|
|
11
|
+
* a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned
|
|
12
|
+
* it means that arrays differ.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* compareArrays( [ 0, 2 ], [ 0, 2 ] ); // 'same'
|
|
16
|
+
* compareArrays( [ 0, 2 ], [ 0, 2, 1 ] ); // 'prefix'
|
|
17
|
+
* compareArrays( [ 0, 2 ], [ 0 ] ); // 'extension'
|
|
18
|
+
* compareArrays( [ 0, 2 ], [ 1, 2 ] ); // 0
|
|
19
|
+
* compareArrays( [ 0, 2 ], [ 0, 1 ] ); // 1
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param a Array that is compared.
|
|
23
|
+
* @param b Array to compare with.
|
|
24
|
+
* @returns How array `a` is related to `b`.
|
|
25
|
+
*/
|
|
26
26
|
export declare function compareArrays(a: ReadonlyArray<unknown>, b: ReadonlyArray<unknown>): ArrayRelation | number;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export type ArrayRelation =
|
|
28
|
+
* Array relation.
|
|
29
|
+
*/
|
|
30
|
+
export type ArrayRelation = "extension" | "same" | "prefix";
|
package/dist/config.d.ts
CHANGED
|
@@ -1,163 +1,166 @@
|
|
|
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
|
+
* Handles a configuration dictionary.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam Cfg A type of the configuration dictionary.
|
|
9
|
+
*/
|
|
10
10
|
export declare class Config<Cfg> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Store for the whole configuration.
|
|
13
|
+
*/
|
|
14
|
+
private readonly _config;
|
|
15
|
+
/**
|
|
16
|
+
* Creates an instance of the {@link ~Config} class.
|
|
17
|
+
*
|
|
18
|
+
* @param configurations The initial configurations to be set. Usually, provided by the user.
|
|
19
|
+
* @param defaultConfigurations The default configurations. Usually, provided by the system.
|
|
20
|
+
*/
|
|
21
|
+
constructor(configurations?: Partial<Cfg>, defaultConfigurations?: Partial<Cfg>);
|
|
22
|
+
/**
|
|
23
|
+
* Set configuration values.
|
|
24
|
+
*
|
|
25
|
+
* It also accepts setting a "deep configuration" by using dots in the name. For example, `'resize.width'` sets
|
|
26
|
+
* the value for the `width` configuration in the `resize` subset.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* config.set( 'resize.width', 500 );
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* It accepts both a name/value pair or an object, which properties and values will be used to set
|
|
33
|
+
* configurations. See {@link #set:CONFIG_OBJECT}.
|
|
34
|
+
*
|
|
35
|
+
* @label KEY_VALUE
|
|
36
|
+
* @param name The configuration name. Configuration names are case-sensitive.
|
|
37
|
+
* @param value The configuration value.
|
|
38
|
+
*/
|
|
39
|
+
set<K extends string>(name: K, value: GetSubConfig<Cfg, K>): void;
|
|
40
|
+
/**
|
|
41
|
+
* Set configuration values.
|
|
42
|
+
*
|
|
43
|
+
* It accepts an object, which properties and values will be used to set configurations.
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* config.set( {
|
|
47
|
+
* width: 500
|
|
48
|
+
* toolbar: {
|
|
49
|
+
* collapsed: true
|
|
50
|
+
* }
|
|
51
|
+
* } );
|
|
52
|
+
*
|
|
53
|
+
* // Equivalent to:
|
|
54
|
+
* config.set( 'width', 500 );
|
|
55
|
+
* config.set( 'toolbar.collapsed', true );
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Passing an object as the value will amend the configuration, not replace it.
|
|
59
|
+
*
|
|
60
|
+
* ```ts
|
|
61
|
+
* config.set( 'toolbar', {
|
|
62
|
+
* collapsed: true,
|
|
63
|
+
* } );
|
|
64
|
+
*
|
|
65
|
+
* config.set( 'toolbar', {
|
|
66
|
+
* color: 'red',
|
|
67
|
+
* } );
|
|
68
|
+
*
|
|
69
|
+
* config.get( 'toolbar.collapsed' ); // true
|
|
70
|
+
* config.get( 'toolbar.color' ); // 'red'
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* It accepts both a name/value pair or an object, which properties and values will be used to set
|
|
74
|
+
* configurations. See {@link #set:KEY_VALUE}.
|
|
75
|
+
*
|
|
76
|
+
* @label CONFIG_OBJECT
|
|
77
|
+
* @param config The configuration object from which take properties as
|
|
78
|
+
* configuration entries. Configuration names are case-sensitive.
|
|
79
|
+
*/
|
|
80
|
+
set(config: Partial<Cfg>): void;
|
|
81
|
+
/**
|
|
82
|
+
* Does exactly the same as {@link #set:KEY_VALUE} with one exception – passed configuration extends
|
|
83
|
+
* existing one, but does not overwrite already defined values.
|
|
84
|
+
*
|
|
85
|
+
* This method is supposed to be called by plugin developers to setup plugin's configurations. It would be
|
|
86
|
+
* rarely used for other needs.
|
|
87
|
+
*
|
|
88
|
+
* @label KEY_VALUE
|
|
89
|
+
* @param name The configuration name. Configuration names are case-sensitive.
|
|
90
|
+
* @param value The configuration value.
|
|
91
|
+
*/
|
|
92
|
+
define<K extends string>(name: K, value: GetSubConfig<Cfg, K>): void;
|
|
93
|
+
/**
|
|
94
|
+
* Does exactly the same as {@link #set:CONFIG_OBJECT} with one exception – passed configuration extends
|
|
95
|
+
* existing one, but does not overwrite already defined values.
|
|
96
|
+
*
|
|
97
|
+
* This method is supposed to be called by plugin developers to setup plugin's configurations. It would be
|
|
98
|
+
* rarely used for other needs.
|
|
99
|
+
*
|
|
100
|
+
* @label CONFIG_OBJECT
|
|
101
|
+
* @param config The configuration object from which take properties as
|
|
102
|
+
* configuration entries. Configuration names are case-sensitive.
|
|
103
|
+
*/
|
|
104
|
+
define(config: Partial<Cfg>): void;
|
|
105
|
+
/**
|
|
106
|
+
* Gets the value for a configuration entry.
|
|
107
|
+
*
|
|
108
|
+
* ```ts
|
|
109
|
+
* config.get( 'name' );
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* Deep configurations can be retrieved by separating each part with a dot.
|
|
113
|
+
*
|
|
114
|
+
* ```ts
|
|
115
|
+
* config.get( 'toolbar.collapsed' );
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @param name The configuration name. Configuration names are case-sensitive.
|
|
119
|
+
* @returns The configuration value or `undefined` if the configuration entry was not found.
|
|
120
|
+
*/
|
|
121
|
+
get<K extends string>(name: K): GetSubConfig<Cfg, K> | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Iterates over all top level configuration names.
|
|
124
|
+
*/
|
|
125
|
+
names(): Iterable<string>;
|
|
126
|
+
/**
|
|
127
|
+
* Saves passed configuration to the specified target (nested object).
|
|
128
|
+
*
|
|
129
|
+
* @param target Nested config object.
|
|
130
|
+
* @param name The configuration name or an object from which take properties as
|
|
131
|
+
* configuration entries. Configuration names are case-sensitive.
|
|
132
|
+
* @param value The configuration value. Used if a name is passed.
|
|
133
|
+
* @param isDefine Define if passed configuration should overwrite existing one.
|
|
134
|
+
*/
|
|
135
|
+
private _setToTarget;
|
|
136
|
+
/**
|
|
137
|
+
* Get specified configuration from specified source (nested object).
|
|
138
|
+
*
|
|
139
|
+
* @param source level of nested object.
|
|
140
|
+
* @param name The configuration name. Configuration names are case-sensitive.
|
|
141
|
+
* @returns The configuration value or `undefined` if the configuration entry was not found.
|
|
142
|
+
*/
|
|
143
|
+
private _getFromSource;
|
|
144
|
+
/**
|
|
145
|
+
* Iterates through passed object and calls {@link #_setToTarget} method with object key and value for each property.
|
|
146
|
+
*
|
|
147
|
+
* @param target Nested config object.
|
|
148
|
+
* @param configuration Configuration data set
|
|
149
|
+
* @param isDefine Defines if passed configuration is default configuration or not.
|
|
150
|
+
*/
|
|
151
|
+
private _setObjectToTarget;
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
* An utility type excluding primitive values and arrays from the union.
|
|
155
|
+
*/
|
|
156
156
|
export type OnlyObject<T> = Exclude<T, undefined | null | string | number | boolean | Array<any>>;
|
|
157
157
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
export type GetSubConfig<
|
|
158
|
+
* An utility type extracting configuration value from the given name.
|
|
159
|
+
*
|
|
160
|
+
* @typeParam T The type of a configuration dictionary.
|
|
161
|
+
* @typeParam K The literal type of configuration name (dot-separated path).
|
|
162
|
+
*/
|
|
163
|
+
export type GetSubConfig<
|
|
164
|
+
T,
|
|
165
|
+
K
|
|
166
|
+
> = K extends keyof T ? T[K] : K extends `${infer K1}.${infer K2}` ? K1 extends keyof T ? GetSubConfig<OnlyObject<T[K1]>, K2> : unknown : unknown;
|
package/dist/count.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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/count
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
* Returns the number of items return by the iterator.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* count( [ 1, 2, 3, 4, 5 ] ); // 5;
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param iterable Any iterable.
|
|
16
|
+
* @returns Number of items returned by that iterable.
|
|
17
|
+
*/
|
|
18
18
|
export declare function count(iterable: Iterable<unknown>): number;
|
package/dist/crc32.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
* Calculates CRC-32 checksum for a given inputData to verify the integrity of data.
|
|
7
|
+
*
|
|
8
|
+
* @param inputData Accepts a single value (string, number, boolean), an array of strings, or an array of all of the above types.
|
|
9
|
+
* Non-string values are converted to strings before calculating the checksum.
|
|
10
|
+
* The checksum calculation is based on the concatenated string representation of the input values:
|
|
11
|
+
* * `crc32('foo')` is equivalent to `crc32(['foo'])`
|
|
12
|
+
* * `crc32(123)` is equivalent to `crc32(['123'])`
|
|
13
|
+
* * `crc32(true)` is equivalent to `crc32(['true'])`
|
|
14
|
+
* * `crc32(['foo', 123, true])` produces the same result as `crc32('foo123true')`
|
|
15
|
+
* * Nested arrays of strings are flattened, so `crc32([['foo', 'bar'], 'baz'])` is equivalent to `crc32(['foobar', 'baz'])`
|
|
16
|
+
*
|
|
17
|
+
* @returns The CRC-32 checksum, returned as a hexadecimal string.
|
|
18
|
+
*/
|
|
19
19
|
export declare function crc32(inputData: CRCData): string;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* The input data for the CRC-32 checksum calculation.
|
|
22
|
+
* Can be a single value (string, number, boolean), an array of strings, or an array of all of the above types.
|
|
23
|
+
*/
|
|
24
24
|
export type CRCData = CRCValue | Array<CRCValue>;
|
|
25
25
|
export type CRCValue = string | number | boolean | Array<string>;
|
|
@@ -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
|
+
* Parses the provided license key and returns the decoded object, or null if the decoding was unsuccessful.
|
|
7
|
+
*
|
|
8
|
+
* @param licenseKey The license key to decode.
|
|
9
|
+
*/
|
|
10
10
|
export declare function decodeLicenseKey(licenseKey?: string): Record<string, any> | null;
|
package/dist/delay.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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/delay
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
* Returns a function wrapper that will trigger a function after a specified wait time.
|
|
10
|
+
* The timeout can be canceled by calling the cancel function on the returned wrapped function.
|
|
11
|
+
*
|
|
12
|
+
* @param func The function to wrap.
|
|
13
|
+
* @param wait The timeout in ms.
|
|
14
|
+
*/
|
|
15
15
|
export declare function delay<T extends (...args: Array<any>) => any>(func: T, wait: number): DelayedFunc<T>;
|
|
16
16
|
export interface DelayedFunc<T extends (...args: Array<any>) => any> {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
(...args: Parameters<T>): void;
|
|
18
|
+
cancel(): void;
|
|
19
19
|
}
|
package/dist/diff.d.ts
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
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
|
-
* This function is based on the "O(NP) Sequence Comparison Algorithm" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.
|
|
14
|
-
* Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).
|
|
15
|
-
* Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting
|
|
16
|
-
* such a scenario. The return formats of both functions are identical.
|
|
17
|
-
*
|
|
18
|
-
* @param a Input array or string.
|
|
19
|
-
* @param b Output array or string.
|
|
20
|
-
* @param cmp Optional function used to compare array values, by default === is used.
|
|
21
|
-
* @returns Array of changes.
|
|
22
|
-
*/
|
|
23
|
-
export declare function diff<T>(a: ArrayLike<T>, b: ArrayLike<T>, cmp?: (a: T, b: T) => boolean): Array<DiffResult>;
|
|
24
|
-
export declare namespace diff {
|
|
25
|
-
var fastDiff: typeof import("./fastdiff.js").fastDiff;
|
|
26
|
-
}
|
|
6
|
+
* @module utils/diff
|
|
7
|
+
*/
|
|
8
|
+
import { fastDiff as fastDiffFunction } from "./fastdiff.js";
|
|
9
|
+
export type Diff = {
|
|
10
|
+
<T>(a: ArrayLike<T>, b: ArrayLike<T>, cmp?: (a: T, b: T) => boolean): Array<DiffResult>;
|
|
11
|
+
fastDiff: typeof fastDiffFunction;
|
|
12
|
+
};
|
|
27
13
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
* Calculates the difference between two arrays or strings producing an array containing a list of changes
|
|
15
|
+
* necessary to transform input into output.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* This function is based on the "O(NP) Sequence Comparison Algorithm" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.
|
|
22
|
+
* Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).
|
|
23
|
+
* Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting
|
|
24
|
+
* such a scenario. The return formats of both functions are identical.
|
|
25
|
+
*
|
|
26
|
+
* @param a Input array or string.
|
|
27
|
+
* @param b Output array or string.
|
|
28
|
+
* @param cmp Optional function used to compare array values, by default === is used.
|
|
29
|
+
* @returns Array of changes.
|
|
30
|
+
*/
|
|
31
|
+
export declare const diff: Diff;
|
|
32
|
+
/**
|
|
33
|
+
* The element of the result of {@link module:utils/diff~diff} function.
|
|
34
|
+
*/
|
|
35
|
+
export type DiffResult = "equal" | "insert" | "delete";
|