@ckeditor/ckeditor5-utils 41.4.0-alpha.0 → 41.4.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/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/types/env.d.ts +16 -0
- package/dist/types/locale.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/env.d.ts +16 -0
- package/src/env.js +16 -0
- package/src/locale.d.ts +1 -1
- package/src/version.d.ts +1 -1
- package/src/version.js +2 -2
package/dist/index.js
CHANGED
|
@@ -31,6 +31,10 @@ const userAgent = getUserAgent();
|
|
|
31
31
|
isiOS: isiOS(userAgent),
|
|
32
32
|
isAndroid: isAndroid(userAgent),
|
|
33
33
|
isBlink: isBlink(userAgent),
|
|
34
|
+
isMediaForcedColors: isMediaForcedColors(),
|
|
35
|
+
get isMotionReduced () {
|
|
36
|
+
return isMotionReduced();
|
|
37
|
+
},
|
|
34
38
|
features: {
|
|
35
39
|
isRegExpUnicodePropertySupported: isRegExpUnicodePropertySupported()
|
|
36
40
|
}
|
|
@@ -110,6 +114,16 @@ const userAgent = getUserAgent();
|
|
|
110
114
|
}
|
|
111
115
|
return isSupported;
|
|
112
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).
|
|
119
|
+
*/ function isMediaForcedColors() {
|
|
120
|
+
return window.matchMedia('(forced-colors: active)').matches;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Checks if user enabled "prefers reduced motion" setting in browser.
|
|
124
|
+
*/ function isMotionReduced() {
|
|
125
|
+
return window.matchMedia('(prefers-reduced-motion)').matches;
|
|
126
|
+
}
|
|
113
127
|
|
|
114
128
|
/**
|
|
115
129
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
@@ -836,9 +850,9 @@ class CKEditorError extends Error {
|
|
|
836
850
|
];
|
|
837
851
|
}
|
|
838
852
|
|
|
839
|
-
const version = '41.4.
|
|
853
|
+
const version = '41.4.1';
|
|
840
854
|
// The second argument is not a month. It is `monthIndex` and starts from `0`.
|
|
841
|
-
const releaseDate = new Date(2024,
|
|
855
|
+
const releaseDate = new Date(2024, 4, 16);
|
|
842
856
|
/* istanbul ignore next -- @preserve */ if (globalThis.CKEDITOR_VERSION) {
|
|
843
857
|
/**
|
|
844
858
|
* This error is thrown when due to a mistake in how CKEditor 5 was installed or initialized, some
|