@ckeditor/ckeditor5-utils 45.2.1-alpha.9 → 46.0.0-alpha.0
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/index.js +191 -158
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- 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 +5 -4
- package/src/ckeditorerror.js +18 -14
- package/src/collection.d.ts +1 -1
- package/src/collection.js +5 -5
- package/src/collectstylesheets.d.ts +1 -1
- package/src/collectstylesheets.js +1 -1
- 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 +2 -3
- package/src/crc32.js +1 -1
- package/src/delay.d.ts +1 -1
- package/src/delay.js +1 -1
- package/src/diff.d.ts +3 -4
- package/src/diff.js +2 -2
- package/src/difftochanges.d.ts +1 -1
- package/src/difftochanges.js +1 -1
- package/src/dom/createelement.d.ts +5 -6
- package/src/dom/createelement.js +2 -2
- package/src/dom/emittermixin.d.ts +5 -5
- package/src/dom/emittermixin.js +6 -15
- package/src/dom/findclosestscrollableancestor.d.ts +1 -1
- package/src/dom/findclosestscrollableancestor.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/dom/getrangefrommouseevent.d.ts +1 -1
- package/src/dom/getrangefrommouseevent.js +1 -1
- package/src/dom/getvisualviewportoffset.d.ts +1 -1
- package/src/dom/getvisualviewportoffset.js +3 -3
- package/src/dom/global.d.ts +2 -2
- package/src/dom/global.js +4 -4
- 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 +2 -2
- package/src/dom/isvisible.d.ts +1 -1
- package/src/dom/isvisible.js +2 -2
- package/src/dom/iswindow.d.ts +1 -1
- package/src/dom/iswindow.js +1 -1
- package/src/dom/position.d.ts +5 -5
- package/src/dom/position.js +3 -3
- package/src/dom/rect.d.ts +3 -3
- package/src/dom/rect.js +7 -7
- 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 +2 -2
- package/src/dom/scroll.d.ts +1 -2
- package/src/dom/scroll.js +3 -3
- 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 +3 -3
- package/src/emittermixin.js +6 -14
- package/src/env.d.ts +16 -2
- package/src/env.js +17 -3
- package/src/eventinfo.d.ts +1 -1
- package/src/eventinfo.js +2 -2
- 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 +4 -4
- package/src/formathtml.d.ts +1 -1
- package/src/formathtml.js +1 -1
- package/src/index.d.ts +69 -62
- package/src/index.js +68 -61
- package/src/inserttopriorityarray.d.ts +1 -1
- package/src/inserttopriorityarray.js +2 -2
- package/src/isiterable.d.ts +1 -1
- package/src/isiterable.js +1 -1
- package/src/keyboard.d.ts +2 -2
- package/src/keyboard.js +4 -4
- package/src/keystrokehandler.d.ts +2 -2
- package/src/keystrokehandler.js +3 -3
- package/src/legacyerrors.d.ts +5 -0
- package/src/legacyerrors.js +18 -0
- package/src/locale.d.ts +1 -10
- package/src/locale.js +2 -23
- package/src/mapsequal.d.ts +1 -1
- package/src/mapsequal.js +1 -1
- package/src/mix.d.ts +0 -27
- package/src/mix.js +1 -46
- 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 +8 -9
- package/src/observablemixin.js +3 -12
- package/src/parsebase64encodedobject.d.ts +1 -1
- package/src/parsebase64encodedobject.js +1 -1
- package/src/priorities.d.ts +1 -2
- package/src/priorities.js +1 -2
- package/src/retry.d.ts +1 -1
- package/src/retry.js +2 -2
- package/src/splicearray.d.ts +1 -1
- package/src/splicearray.js +1 -1
- package/src/spy.d.ts +1 -2
- package/src/spy.js +1 -2
- package/src/toarray.d.ts +2 -2
- package/src/toarray.js +1 -1
- package/src/tomap.d.ts +1 -1
- package/src/tomap.js +3 -3
- package/src/translation-service.d.ts +1 -1
- package/src/translation-service.js +3 -3
- package/src/uid.d.ts +1 -1
- package/src/uid.js +1 -1
- package/src/version.d.ts +1 -2
- package/src/version.js +12 -13
- package/src/wait.d.ts +1 -1
- package/src/wait.js +1 -1
package/src/env.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Safely returns `userAgent` from browser's navigator API in a lower case.
|
|
7
7
|
* If navigator API is not available it will return an empty string.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
8
10
|
*/
|
|
9
11
|
export declare function getUserAgent(): string;
|
|
10
12
|
/**
|
|
@@ -69,11 +71,11 @@ export interface EnvFeaturesType {
|
|
|
69
71
|
/**
|
|
70
72
|
* A namespace containing environment and browser information.
|
|
71
73
|
*/
|
|
72
|
-
declare const env: EnvType;
|
|
73
|
-
export default env;
|
|
74
|
+
export declare const env: EnvType;
|
|
74
75
|
/**
|
|
75
76
|
* Checks if User Agent represented by the string is running on Macintosh.
|
|
76
77
|
*
|
|
78
|
+
* @internal
|
|
77
79
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
78
80
|
* @returns Whether User Agent is running on Macintosh or not.
|
|
79
81
|
*/
|
|
@@ -81,6 +83,7 @@ export declare function isMac(userAgent: string): boolean;
|
|
|
81
83
|
/**
|
|
82
84
|
* Checks if User Agent represented by the string is running on Windows.
|
|
83
85
|
*
|
|
86
|
+
* @internal
|
|
84
87
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
85
88
|
* @returns Whether User Agent is running on Windows or not.
|
|
86
89
|
*/
|
|
@@ -88,6 +91,7 @@ export declare function isWindows(userAgent: string): boolean;
|
|
|
88
91
|
/**
|
|
89
92
|
* Checks if User Agent represented by the string is Firefox (Gecko).
|
|
90
93
|
*
|
|
94
|
+
* @internal
|
|
91
95
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
92
96
|
* @returns Whether User Agent is Firefox or not.
|
|
93
97
|
*/
|
|
@@ -95,6 +99,7 @@ export declare function isGecko(userAgent: string): boolean;
|
|
|
95
99
|
/**
|
|
96
100
|
* Checks if User Agent represented by the string is Safari.
|
|
97
101
|
*
|
|
102
|
+
* @internal
|
|
98
103
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
99
104
|
* @returns Whether User Agent is Safari or not.
|
|
100
105
|
*/
|
|
@@ -102,6 +107,7 @@ export declare function isSafari(userAgent: string): boolean;
|
|
|
102
107
|
/**
|
|
103
108
|
* Checks if User Agent represented by the string is running in iOS.
|
|
104
109
|
*
|
|
110
|
+
* @internal
|
|
105
111
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
106
112
|
* @returns Whether User Agent is running in iOS or not.
|
|
107
113
|
*/
|
|
@@ -109,6 +115,7 @@ export declare function isiOS(userAgent: string): boolean;
|
|
|
109
115
|
/**
|
|
110
116
|
* Checks if User Agent represented by the string is Android mobile device.
|
|
111
117
|
*
|
|
118
|
+
* @internal
|
|
112
119
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
113
120
|
* @returns Whether User Agent is Safari or not.
|
|
114
121
|
*/
|
|
@@ -116,6 +123,7 @@ export declare function isAndroid(userAgent: string): boolean;
|
|
|
116
123
|
/**
|
|
117
124
|
* Checks if User Agent represented by the string is Blink engine.
|
|
118
125
|
*
|
|
126
|
+
* @internal
|
|
119
127
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
120
128
|
* @returns Whether User Agent is Blink engine or not.
|
|
121
129
|
*/
|
|
@@ -124,17 +132,23 @@ export declare function isBlink(userAgent: string): boolean;
|
|
|
124
132
|
* Checks if the current environment supports ES2018 Unicode properties like `\p{P}` or `\p{L}`.
|
|
125
133
|
* More information about unicode properties might be found
|
|
126
134
|
* [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
127
137
|
*/
|
|
128
138
|
export declare function isRegExpUnicodePropertySupported(): boolean;
|
|
129
139
|
/**
|
|
130
140
|
* Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).
|
|
131
141
|
*
|
|
132
142
|
* Returns `false` in environments where `window` global object is not available.
|
|
143
|
+
*
|
|
144
|
+
* @internal
|
|
133
145
|
*/
|
|
134
146
|
export declare function isMediaForcedColors(): boolean;
|
|
135
147
|
/**
|
|
136
148
|
* Checks if the user enabled "prefers reduced motion" setting in browser.
|
|
137
149
|
*
|
|
138
150
|
* Returns `false` in environments where `window` global object is not available.
|
|
151
|
+
*
|
|
152
|
+
* @internal
|
|
139
153
|
*/
|
|
140
154
|
export declare function isMotionReduced(): boolean;
|
package/src/env.js
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/env
|
|
7
7
|
*/
|
|
8
|
-
import global from './dom/global.js';
|
|
8
|
+
import { global } from './dom/global.js';
|
|
9
9
|
/**
|
|
10
10
|
* Safely returns `userAgent` from browser's navigator API in a lower case.
|
|
11
11
|
* If navigator API is not available it will return an empty string.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
12
14
|
*/
|
|
13
15
|
export function getUserAgent() {
|
|
14
16
|
// In some environments navigator API might not be available.
|
|
@@ -23,7 +25,7 @@ const userAgent = /* #__PURE__ */ getUserAgent();
|
|
|
23
25
|
/**
|
|
24
26
|
* A namespace containing environment and browser information.
|
|
25
27
|
*/
|
|
26
|
-
const env = {
|
|
28
|
+
export const env = {
|
|
27
29
|
isMac: /* #__PURE__ */ isMac(userAgent),
|
|
28
30
|
isWindows: /* #__PURE__ */ isWindows(userAgent),
|
|
29
31
|
isGecko: /* #__PURE__ */ isGecko(userAgent),
|
|
@@ -41,10 +43,10 @@ const env = {
|
|
|
41
43
|
isRegExpUnicodePropertySupported: /* #__PURE__ */ isRegExpUnicodePropertySupported()
|
|
42
44
|
}
|
|
43
45
|
};
|
|
44
|
-
export default env;
|
|
45
46
|
/**
|
|
46
47
|
* Checks if User Agent represented by the string is running on Macintosh.
|
|
47
48
|
*
|
|
49
|
+
* @internal
|
|
48
50
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
49
51
|
* @returns Whether User Agent is running on Macintosh or not.
|
|
50
52
|
*/
|
|
@@ -54,6 +56,7 @@ export function isMac(userAgent) {
|
|
|
54
56
|
/**
|
|
55
57
|
* Checks if User Agent represented by the string is running on Windows.
|
|
56
58
|
*
|
|
59
|
+
* @internal
|
|
57
60
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
58
61
|
* @returns Whether User Agent is running on Windows or not.
|
|
59
62
|
*/
|
|
@@ -63,6 +66,7 @@ export function isWindows(userAgent) {
|
|
|
63
66
|
/**
|
|
64
67
|
* Checks if User Agent represented by the string is Firefox (Gecko).
|
|
65
68
|
*
|
|
69
|
+
* @internal
|
|
66
70
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
67
71
|
* @returns Whether User Agent is Firefox or not.
|
|
68
72
|
*/
|
|
@@ -72,6 +76,7 @@ export function isGecko(userAgent) {
|
|
|
72
76
|
/**
|
|
73
77
|
* Checks if User Agent represented by the string is Safari.
|
|
74
78
|
*
|
|
79
|
+
* @internal
|
|
75
80
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
76
81
|
* @returns Whether User Agent is Safari or not.
|
|
77
82
|
*/
|
|
@@ -81,6 +86,7 @@ export function isSafari(userAgent) {
|
|
|
81
86
|
/**
|
|
82
87
|
* Checks if User Agent represented by the string is running in iOS.
|
|
83
88
|
*
|
|
89
|
+
* @internal
|
|
84
90
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
85
91
|
* @returns Whether User Agent is running in iOS or not.
|
|
86
92
|
*/
|
|
@@ -91,6 +97,7 @@ export function isiOS(userAgent) {
|
|
|
91
97
|
/**
|
|
92
98
|
* Checks if User Agent represented by the string is Android mobile device.
|
|
93
99
|
*
|
|
100
|
+
* @internal
|
|
94
101
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
95
102
|
* @returns Whether User Agent is Safari or not.
|
|
96
103
|
*/
|
|
@@ -100,6 +107,7 @@ export function isAndroid(userAgent) {
|
|
|
100
107
|
/**
|
|
101
108
|
* Checks if User Agent represented by the string is Blink engine.
|
|
102
109
|
*
|
|
110
|
+
* @internal
|
|
103
111
|
* @param userAgent **Lowercase** `navigator.userAgent` string.
|
|
104
112
|
* @returns Whether User Agent is Blink engine or not.
|
|
105
113
|
*/
|
|
@@ -112,6 +120,8 @@ export function isBlink(userAgent) {
|
|
|
112
120
|
* Checks if the current environment supports ES2018 Unicode properties like `\p{P}` or `\p{L}`.
|
|
113
121
|
* More information about unicode properties might be found
|
|
114
122
|
* [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).
|
|
123
|
+
*
|
|
124
|
+
* @internal
|
|
115
125
|
*/
|
|
116
126
|
export function isRegExpUnicodePropertySupported() {
|
|
117
127
|
let isSupported = false;
|
|
@@ -130,6 +140,8 @@ export function isRegExpUnicodePropertySupported() {
|
|
|
130
140
|
* Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).
|
|
131
141
|
*
|
|
132
142
|
* Returns `false` in environments where `window` global object is not available.
|
|
143
|
+
*
|
|
144
|
+
* @internal
|
|
133
145
|
*/
|
|
134
146
|
export function isMediaForcedColors() {
|
|
135
147
|
return global.window.matchMedia ? global.window.matchMedia('(forced-colors: active)').matches : false;
|
|
@@ -138,6 +150,8 @@ export function isMediaForcedColors() {
|
|
|
138
150
|
* Checks if the user enabled "prefers reduced motion" setting in browser.
|
|
139
151
|
*
|
|
140
152
|
* Returns `false` in environments where `window` global object is not available.
|
|
153
|
+
*
|
|
154
|
+
* @internal
|
|
141
155
|
*/
|
|
142
156
|
export function isMotionReduced() {
|
|
143
157
|
return global.window.matchMedia ? global.window.matchMedia('(prefers-reduced-motion)').matches : false;
|
package/src/eventinfo.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The event object passed to event callbacks. It is used to provide information about the event as well as a tool to
|
|
7
7
|
* manipulate it.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export declare class EventInfo<TName extends string = string, TReturn = unknown> {
|
|
10
10
|
/**
|
|
11
11
|
* The object that fired the event.
|
|
12
12
|
*/
|
package/src/eventinfo.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/eventinfo
|
|
7
7
|
*/
|
|
8
|
-
import spy from './spy.js';
|
|
8
|
+
import { spy } from './spy.js';
|
|
9
9
|
/**
|
|
10
10
|
* The event object passed to event callbacks. It is used to provide information about the event as well as a tool to
|
|
11
11
|
* manipulate it.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export class EventInfo {
|
|
14
14
|
/**
|
|
15
15
|
* The object that fired the event.
|
|
16
16
|
*/
|
package/src/fastdiff.d.ts
CHANGED
|
@@ -109,4 +109,4 @@ import type { Change } from './difftochanges.js';
|
|
|
109
109
|
* @returns Array of changes. The elements are either {@link module:utils/diff~DiffResult} or {@link module:utils/difftochanges~Change},
|
|
110
110
|
* depending on `atomicChanges` parameter.
|
|
111
111
|
*/
|
|
112
|
-
export
|
|
112
|
+
export declare function fastDiff<T, AtomicChanges extends boolean = false>(a: ArrayLike<T>, b: ArrayLike<T>, cmp?: (a: T, b: T) => boolean, atomicChanges?: AtomicChanges): Array<AtomicChanges extends true ? DiffResult : Change<T>>;
|
package/src/fastdiff.js
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
* @returns Array of changes. The elements are either {@link module:utils/diff~DiffResult} or {@link module:utils/difftochanges~Change},
|
|
108
108
|
* depending on `atomicChanges` parameter.
|
|
109
109
|
*/
|
|
110
|
-
export
|
|
110
|
+
export function fastDiff(a, b, cmp, atomicChanges) {
|
|
111
111
|
// Set the comparator function.
|
|
112
112
|
cmp = cmp || function (a, b) {
|
|
113
113
|
return a === b;
|
package/src/first.d.ts
CHANGED
package/src/first.js
CHANGED
package/src/focustracker.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare const FocusTracker_base: import("./mix.js").Mixed<{
|
|
|
20
20
|
*
|
|
21
21
|
* Check out the {@glink framework/deep-dive/ui/focus-tracking "Deep dive into focus tracking"} guide to learn more.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export declare class FocusTracker extends /* #__PURE__ */ FocusTracker_base {
|
|
24
24
|
/**
|
|
25
25
|
* True when one of the registered {@link #elements} or {@link #externalViews} is focused.
|
|
26
26
|
*
|
package/src/focustracker.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/focustracker
|
|
7
7
|
*/
|
|
8
|
-
import DomEmitterMixin from './dom/emittermixin.js';
|
|
9
|
-
import ObservableMixin from './observablemixin.js';
|
|
10
|
-
import CKEditorError from './ckeditorerror.js';
|
|
8
|
+
import { DomEmitterMixin } from './dom/emittermixin.js';
|
|
9
|
+
import { ObservableMixin } from './observablemixin.js';
|
|
10
|
+
import { CKEditorError } from './ckeditorerror.js';
|
|
11
11
|
import { isElement as _isElement } from 'es-toolkit/compat';
|
|
12
12
|
/**
|
|
13
13
|
* Allows observing a group of DOM `Element`s or {@link module:ui/view~View view instances} whether at least one of them (or their child)
|
|
@@ -22,7 +22,7 @@ import { isElement as _isElement } from 'es-toolkit/compat';
|
|
|
22
22
|
*
|
|
23
23
|
* Check out the {@glink framework/deep-dive/ui/focus-tracking "Deep dive into focus tracking"} guide to learn more.
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export class FocusTracker extends /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin()) {
|
|
26
26
|
/**
|
|
27
27
|
* List of registered DOM elements.
|
|
28
28
|
*
|
package/src/formathtml.d.ts
CHANGED
package/src/formathtml.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @param input An HTML string to format.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export function formatHtml(input) {
|
|
20
20
|
// A list of block-like elements around which the new lines should be inserted, and within which
|
|
21
21
|
// the indentation of their children should be increased.
|
|
22
22
|
// The list is partially based on https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements that contains
|
package/src/index.d.ts
CHANGED
|
@@ -5,66 +5,73 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/index
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
8
|
+
export { env, getUserAgent as _getUserAgent, isMac as _isMac, isWindows as _isWindows, isGecko as _isGecko, isSafari as _isSafari, isiOS as _isiOS, isAndroid as _isAndroid, isBlink as _isBlink, isRegExpUnicodePropertySupported as _isRegExpUnicodePropertySupported, isMediaForcedColors as _isMediaForcedColors, isMotionReduced as _isMotionReduced, type EnvType, type EnvFeaturesType } from './env.js';
|
|
9
|
+
export { diff, type DiffResult } from './diff.js';
|
|
10
|
+
export { fastDiff } from './fastdiff.js';
|
|
11
|
+
export { diffToChanges, type InsertChange, type DeleteChange, type Change } from './difftochanges.js';
|
|
12
|
+
export { areConnectedThroughProperties } from './areconnectedthroughproperties.js';
|
|
13
13
|
export type { Constructor, Mixed } from './mix.js';
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export {
|
|
60
|
-
export {
|
|
61
|
-
export {
|
|
62
|
-
export {
|
|
63
|
-
export {
|
|
64
|
-
export {
|
|
65
|
-
export {
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
68
|
-
export {
|
|
69
|
-
export
|
|
70
|
-
export {
|
|
14
|
+
export { _getEmitterListenedTo, _setEmitterId, _getEmitterId, EmitterMixin, type Emitter, type BaseEvent, type CallbackOptions, type EmitterMixinDelegateChain, type GetCallback, type GetCallbackOptions, type GetEventInfo, type GetNameOrEventInfo } from './emittermixin.js';
|
|
15
|
+
export { EventInfo } from './eventinfo.js';
|
|
16
|
+
export { ObservableMixin, type Observable, type DecoratedMethodEvent, type ObservableChangeEvent, type ObservableSetEvent, type ObservableSingleBindChain, type ObservableDualBindChain, type ObservableMultiBindChain, type ObservableWithProperty } from './observablemixin.js';
|
|
17
|
+
export { CKEditorError, logError, logWarning, DOCUMENTATION_URL } from './ckeditorerror.js';
|
|
18
|
+
export { ElementReplacer } from './elementreplacer.js';
|
|
19
|
+
export { abortableDebounce, type AbortableFunc } from './abortabledebounce.js';
|
|
20
|
+
export { count } from './count.js';
|
|
21
|
+
export { compareArrays, type ArrayRelation } from './comparearrays.js';
|
|
22
|
+
export { createElement, type HTMLElementAttributes, type SVGElementAttributes, type ChildrenElements } from './dom/createelement.js';
|
|
23
|
+
export { Config, type GetSubConfig, type OnlyObject } from './config.js';
|
|
24
|
+
export { isIterable } from './isiterable.js';
|
|
25
|
+
export { DomEmitterMixin, type DomEmitter, type DomEventMap } from './dom/emittermixin.js';
|
|
26
|
+
export { findClosestScrollableAncestor } from './dom/findclosestscrollableancestor.js';
|
|
27
|
+
export { global, type GlobalType } from './dom/global.js';
|
|
28
|
+
export { getAncestors } from './dom/getancestors.js';
|
|
29
|
+
export { getDataFromElement } from './dom/getdatafromelement.js';
|
|
30
|
+
export { getBorderWidths, type BorderWidths } from './dom/getborderwidths.js';
|
|
31
|
+
export { getRangeFromMouseEvent } from './dom/getrangefrommouseevent.js';
|
|
32
|
+
export { getCommonAncestor } from './dom/getcommonancestor.js';
|
|
33
|
+
export { getPositionedAncestor } from './dom/getpositionedancestor.js';
|
|
34
|
+
export { isText } from './dom/istext.js';
|
|
35
|
+
export { isWindow } from './dom/iswindow.js';
|
|
36
|
+
export { Rect, type RectSource, type DomRectLike } from './dom/rect.js';
|
|
37
|
+
export { ResizeObserver } from './dom/resizeobserver.js';
|
|
38
|
+
export { setDataInElement } from './dom/setdatainelement.js';
|
|
39
|
+
export { toUnit, type ToUnitHelper } from './dom/tounit.js';
|
|
40
|
+
export { indexOf } from './dom/indexof.js';
|
|
41
|
+
export { insertAt } from './dom/insertat.js';
|
|
42
|
+
export { isComment } from './dom/iscomment.js';
|
|
43
|
+
export { isNode } from './dom/isnode.js';
|
|
44
|
+
export { isRange } from './dom/isrange.js';
|
|
45
|
+
export { isValidAttributeName } from './dom/isvalidattributename.js';
|
|
46
|
+
export { isVisible } from './dom/isvisible.js';
|
|
47
|
+
export { getOptimalPosition, type DomOptimalPositionOptions, type PositioningFunction, type DomPoint, type DomPositioningFunctionResult } from './dom/position.js';
|
|
48
|
+
export { remove } from './dom/remove.js';
|
|
49
|
+
export { getVisualViewportOffset } from './dom/getvisualviewportoffset.js';
|
|
50
|
+
export { scrollAncestorsToShowTarget, scrollViewportToShowTarget, type IfTrue } from './dom/scroll.js';
|
|
51
|
+
export { type ArrowKeyCodeDirection, type KeystrokeInfo, keyCodes, getCode, parseKeystroke, getEnvKeystrokeText, isArrowKeyCode, getLocalizedArrowKeyCodeDirection, isForwardArrowKeyCode } from './keyboard.js';
|
|
52
|
+
export { type LanguageDirection, getLanguageDirection } from './language.js';
|
|
53
|
+
export { Locale, type LocaleTranslate, type Translations } from './locale.js';
|
|
54
|
+
export { Collection, type CollectionAddEvent, type CollectionChangeEvent, type CollectionRemoveEvent, type CollectionChangeEventData, type CollectionBindToChain } from './collection.js';
|
|
55
|
+
export { first } from './first.js';
|
|
56
|
+
export { nth } from './nth.js';
|
|
57
|
+
export { FocusTracker, type ViewWithFocusTracker, isViewWithFocusTracker } from './focustracker.js';
|
|
58
|
+
export { KeystrokeHandler, type KeystrokeHandlerOptions } from './keystrokehandler.js';
|
|
59
|
+
export { toArray, type ArrayOrItem, type ReadonlyArrayOrItem } from './toarray.js';
|
|
60
|
+
export { toMap } from './tomap.js';
|
|
61
|
+
export { mapsEqual } from './mapsequal.js';
|
|
62
|
+
export { objectToMap } from './objecttomap.js';
|
|
63
|
+
export { add, _translate, _clear as _clearTranslations, _unifyTranslations, type Message } from './translation-service.js';
|
|
64
|
+
export { priorities, type PriorityString, type PrioritiesType } from './priorities.js';
|
|
65
|
+
export { retry, exponentialDelay } from './retry.js';
|
|
66
|
+
export { insertToPriorityArray, type ObjectWithPriority } from './inserttopriorityarray.js';
|
|
67
|
+
export { spliceArray } from './splicearray.js';
|
|
68
|
+
export { uid } from './uid.js';
|
|
69
|
+
export { delay, type DelayedFunc } from './delay.js';
|
|
70
|
+
export { wait } from './wait.js';
|
|
71
|
+
export { parseBase64EncodedObject } from './parsebase64encodedobject.js';
|
|
72
|
+
export { crc32, type CRCData, type CRCValue } from './crc32.js';
|
|
73
|
+
export { collectStylesheets } from './collectstylesheets.js';
|
|
74
|
+
export { formatHtml } from './formathtml.js';
|
|
75
|
+
export { spy } from './spy.js';
|
|
76
|
+
export { isCombiningMark, isHighSurrogateHalf, isLowSurrogateHalf, isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence } from './unicode.js';
|
|
77
|
+
export { version, releaseDate } from './version.js';
|
package/src/index.js
CHANGED
|
@@ -5,65 +5,72 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module utils/index
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
8
|
+
export { env, getUserAgent as _getUserAgent, isMac as _isMac, isWindows as _isWindows, isGecko as _isGecko, isSafari as _isSafari, isiOS as _isiOS, isAndroid as _isAndroid, isBlink as _isBlink, isRegExpUnicodePropertySupported as _isRegExpUnicodePropertySupported, isMediaForcedColors as _isMediaForcedColors, isMotionReduced as _isMotionReduced } from './env.js';
|
|
9
|
+
export { diff } from './diff.js';
|
|
10
|
+
export { fastDiff } from './fastdiff.js';
|
|
11
|
+
export { diffToChanges } from './difftochanges.js';
|
|
12
|
+
export { areConnectedThroughProperties } from './areconnectedthroughproperties.js';
|
|
13
|
+
export { _getEmitterListenedTo, _setEmitterId, _getEmitterId, EmitterMixin } from './emittermixin.js';
|
|
14
|
+
export { EventInfo } from './eventinfo.js';
|
|
15
|
+
export { ObservableMixin } from './observablemixin.js';
|
|
16
|
+
export { CKEditorError, logError, logWarning, DOCUMENTATION_URL } from './ckeditorerror.js';
|
|
17
|
+
export { ElementReplacer } from './elementreplacer.js';
|
|
18
|
+
export { abortableDebounce } from './abortabledebounce.js';
|
|
19
|
+
export { count } from './count.js';
|
|
20
|
+
export { compareArrays } from './comparearrays.js';
|
|
21
|
+
export { createElement } from './dom/createelement.js';
|
|
22
|
+
export { Config } from './config.js';
|
|
23
|
+
export { isIterable } from './isiterable.js';
|
|
24
|
+
export { DomEmitterMixin } from './dom/emittermixin.js';
|
|
25
|
+
export { findClosestScrollableAncestor } from './dom/findclosestscrollableancestor.js';
|
|
26
|
+
export { global } from './dom/global.js';
|
|
27
|
+
export { getAncestors } from './dom/getancestors.js';
|
|
28
|
+
export { getDataFromElement } from './dom/getdatafromelement.js';
|
|
29
|
+
export { getBorderWidths } from './dom/getborderwidths.js';
|
|
30
|
+
export { getRangeFromMouseEvent } from './dom/getrangefrommouseevent.js';
|
|
31
|
+
export { getCommonAncestor } from './dom/getcommonancestor.js';
|
|
32
|
+
export { getPositionedAncestor } from './dom/getpositionedancestor.js';
|
|
33
|
+
export { isText } from './dom/istext.js';
|
|
34
|
+
export { isWindow } from './dom/iswindow.js';
|
|
35
|
+
export { Rect } from './dom/rect.js';
|
|
36
|
+
export { ResizeObserver } from './dom/resizeobserver.js';
|
|
37
|
+
export { setDataInElement } from './dom/setdatainelement.js';
|
|
38
|
+
export { toUnit } from './dom/tounit.js';
|
|
39
|
+
export { indexOf } from './dom/indexof.js';
|
|
40
|
+
export { insertAt } from './dom/insertat.js';
|
|
41
|
+
export { isComment } from './dom/iscomment.js';
|
|
42
|
+
export { isNode } from './dom/isnode.js';
|
|
43
|
+
export { isRange } from './dom/isrange.js';
|
|
44
|
+
export { isValidAttributeName } from './dom/isvalidattributename.js';
|
|
45
|
+
export { isVisible } from './dom/isvisible.js';
|
|
43
46
|
export { getOptimalPosition } from './dom/position.js';
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export {
|
|
60
|
-
export {
|
|
61
|
-
export {
|
|
62
|
-
export {
|
|
63
|
-
export {
|
|
64
|
-
export {
|
|
65
|
-
export {
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
68
|
-
export
|
|
69
|
-
export {
|
|
47
|
+
export { remove } from './dom/remove.js';
|
|
48
|
+
export { getVisualViewportOffset } from './dom/getvisualviewportoffset.js';
|
|
49
|
+
export { scrollAncestorsToShowTarget, scrollViewportToShowTarget } from './dom/scroll.js';
|
|
50
|
+
export { keyCodes, getCode, parseKeystroke, getEnvKeystrokeText, isArrowKeyCode, getLocalizedArrowKeyCodeDirection, isForwardArrowKeyCode } from './keyboard.js';
|
|
51
|
+
export { getLanguageDirection } from './language.js';
|
|
52
|
+
export { Locale } from './locale.js';
|
|
53
|
+
export { Collection } from './collection.js';
|
|
54
|
+
export { first } from './first.js';
|
|
55
|
+
export { nth } from './nth.js';
|
|
56
|
+
export { FocusTracker, isViewWithFocusTracker } from './focustracker.js';
|
|
57
|
+
export { KeystrokeHandler } from './keystrokehandler.js';
|
|
58
|
+
export { toArray } from './toarray.js';
|
|
59
|
+
export { toMap } from './tomap.js';
|
|
60
|
+
export { mapsEqual } from './mapsequal.js';
|
|
61
|
+
export { objectToMap } from './objecttomap.js';
|
|
62
|
+
export { add, _translate, _clear as _clearTranslations, _unifyTranslations } from './translation-service.js';
|
|
63
|
+
export { priorities } from './priorities.js';
|
|
64
|
+
export { retry, exponentialDelay } from './retry.js';
|
|
65
|
+
export { insertToPriorityArray } from './inserttopriorityarray.js';
|
|
66
|
+
export { spliceArray } from './splicearray.js';
|
|
67
|
+
export { uid } from './uid.js';
|
|
68
|
+
export { delay } from './delay.js';
|
|
69
|
+
export { wait } from './wait.js';
|
|
70
|
+
export { parseBase64EncodedObject } from './parsebase64encodedobject.js';
|
|
71
|
+
export { crc32 } from './crc32.js';
|
|
72
|
+
export { collectStylesheets } from './collectstylesheets.js';
|
|
73
|
+
export { formatHtml } from './formathtml.js';
|
|
74
|
+
export { spy } from './spy.js';
|
|
75
|
+
export { isCombiningMark, isHighSurrogateHalf, isLowSurrogateHalf, isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence } from './unicode.js';
|
|
76
|
+
export { version, releaseDate } from './version.js';
|
|
@@ -27,4 +27,4 @@ export interface ObjectWithPriority {
|
|
|
27
27
|
* @param objects Array of objects with priority to insert object to.
|
|
28
28
|
* @param objectToInsert Object with `priority` property.
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export declare function insertToPriorityArray<T extends ObjectWithPriority>(objects: Array<T>, objectToInsert: T): void;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import priorities from './priorities.js';
|
|
5
|
+
import { priorities } from './priorities.js';
|
|
6
6
|
/**
|
|
7
7
|
* Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.
|
|
8
8
|
*
|
|
9
9
|
* @param objects Array of objects with priority to insert object to.
|
|
10
10
|
* @param objectToInsert Object with `priority` property.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export function insertToPriorityArray(objects, objectToInsert) {
|
|
13
13
|
const priority = priorities.get(objectToInsert.priority);
|
|
14
14
|
// Binary search for better performance in large tables.
|
|
15
15
|
let left = 0;
|
package/src/isiterable.d.ts
CHANGED