@ckeditor/ckeditor5-utils
Advanced tools
Comparing version 35.1.0 to 35.2.0
{ | ||
"name": "@ckeditor/ckeditor5-utils", | ||
"version": "35.1.0", | ||
"version": "35.2.0", | ||
"description": "Miscellaneous utilities used by CKEditor 5.", | ||
@@ -17,6 +17,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-build-classic": "^35.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^35.1.0", | ||
"@ckeditor/ckeditor5-core": "^35.1.0", | ||
"@ckeditor/ckeditor5-engine": "^35.1.0", | ||
"@ckeditor/ckeditor5-build-classic": "^35.2.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^35.2.0", | ||
"@ckeditor/ckeditor5-core": "^35.2.0", | ||
"@ckeditor/ckeditor5-engine": "^35.2.0", | ||
"@types/lodash-es": "^4.17.6", | ||
@@ -23,0 +23,0 @@ "typescript": "^4.6.4" |
@@ -12,3 +12,2 @@ /** | ||
import isText from './istext'; | ||
import { isElement } from 'lodash-es'; | ||
const rectProperties = ['top', 'right', 'bottom', 'left', 'width', 'height']; | ||
@@ -356,6 +355,4 @@ /** | ||
} | ||
// Checks if provided object is a DOM Element. | ||
// Checks if provided object "looks like" a DOM Element and has API required by `Rect` class. | ||
// | ||
// It's just a wrapper for lodash `isElement` but with type guard. | ||
// | ||
// @private | ||
@@ -365,3 +362,5 @@ // @param {*} value | ||
function isDomElement(value) { | ||
return isElement(value); | ||
// Note: earlier we used `isElement()` from lodash library, however that function is less performant because | ||
// it makes complicated checks to make sure that given value is a DOM element. | ||
return value !== null && typeof value === 'object' && value.nodeType === 1 && typeof value.getBoundingClientRect === 'function'; | ||
} |
@@ -74,3 +74,3 @@ /** | ||
* {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object and | ||
* a helper funcion to call both `preventDefault()` and `stopPropagation()` on the underlying event. | ||
* a helper function to call both `preventDefault()` and `stopPropagation()` on the underlying event. | ||
* @param {Object} [options={}] Additional options. | ||
@@ -77,0 +77,0 @@ * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of the keystroke |
@@ -10,3 +10,3 @@ /** | ||
import CKEditorError from './ckeditorerror'; | ||
const version = '35.1.0'; | ||
const version = '35.2.0'; | ||
export default version; | ||
@@ -13,0 +13,0 @@ /* istanbul ignore next */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270771
63
6059