@ckeditor/ckeditor5-utils
Advanced tools
Comparing version 19.0.0 to 19.0.1
Changelog | ||
========= | ||
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md. | ||
Changes for the past releases are available below. | ||
## [19.0.0](https://github.com/ckeditor/ckeditor5-utils/compare/v18.0.0...v19.0.0) (2020-04-29) | ||
@@ -5,0 +9,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-utils", | ||
"version": "19.0.0", | ||
"version": "19.0.1", | ||
"description": "Miscellaneous utils used by CKEditor 5.", | ||
@@ -15,14 +15,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-build-classic": "^19.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^19.0.0", | ||
"@ckeditor/ckeditor5-core": "^19.0.0", | ||
"@ckeditor/ckeditor5-engine": "^19.0.0", | ||
"@ckeditor/ckeditor5-build-classic": "^19.0.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^19.0.1", | ||
"@ckeditor/ckeditor5-core": "^19.0.1", | ||
"@ckeditor/ckeditor5-engine": "^19.0.1", | ||
"assertion-error": "^1.1.0", | ||
"eslint": "^5.5.0", | ||
"eslint-config-ckeditor5": "^2.0.0", | ||
"husky": "^1.3.1", | ||
"js-beautify": "^1.10.2", | ||
"lint-staged": "^7.0.0", | ||
"stylelint": "^11.1.1", | ||
"stylelint-config-ckeditor5": "^1.0.0" | ||
"js-beautify": "^1.10.2" | ||
}, | ||
@@ -39,3 +33,4 @@ "engines": { | ||
"type": "git", | ||
"url": "https://github.com/ckeditor/ckeditor5-utils.git" | ||
"url": "https://github.com/ckeditor/ckeditor5.git", | ||
"directory": "packages/ckeditor5-utils" | ||
}, | ||
@@ -46,24 +41,3 @@ "files": [ | ||
"theme" | ||
], | ||
"scripts": { | ||
"lint": "eslint --quiet '**/*.js'", | ||
"stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css' 'docs/**/*.css'" | ||
}, | ||
"lint-staged": { | ||
"**/*.js": [ | ||
"eslint --quiet" | ||
], | ||
"**/*.css": [ | ||
"stylelint --quiet --allow-empty-input" | ||
] | ||
}, | ||
"eslintIgnore": [ | ||
"src/lib/**", | ||
"packages/**" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
] | ||
} |
@@ -5,5 +5,2 @@ CKEditor 5 utilities | ||
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-utils.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-utils) | ||
[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-utils.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-utils) | ||
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-utils/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-utils?branch=master) | ||
<br> | ||
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-utils/status.svg)](https://david-dm.org/ckeditor/ckeditor5-utils) | ||
@@ -10,0 +7,0 @@ [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-utils/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-utils?type=dev) |
@@ -132,6 +132,12 @@ /** | ||
// @param {utils/dom/rect~Rect} elementRect A rect of positioned element. | ||
// @returns {Array} An array containing position name and its Rect. | ||
// @returns {Array|null} An array containing position name and its Rect (or null if position should be ignored). | ||
function getPositionNameAndRect( position, targetRect, elementRect ) { | ||
const { left, top, name } = position( targetRect, elementRect ); | ||
const positionData = position( targetRect, elementRect ); | ||
if ( !positionData ) { | ||
return null; | ||
} | ||
const { left, top, name } = positionData; | ||
return [ name, elementRect.clone().moveTo( left, top ) ]; | ||
@@ -209,3 +215,9 @@ } | ||
for ( const position of positions ) { | ||
const [ positionName, positionRect ] = getPositionNameAndRect( position, targetRect, elementRect ); | ||
const positionData = getPositionNameAndRect( position, targetRect, elementRect ); | ||
if ( !positionData ) { | ||
continue; | ||
} | ||
const [ positionName, positionRect ] = positionData; | ||
let limiterIntersectArea = 0; | ||
@@ -356,3 +368,3 @@ let viewportIntersectArea = 0; | ||
/** | ||
* The `getOptimalPosition` helper options. | ||
* The `getOptimalPosition()` helper options. | ||
* | ||
@@ -378,2 +390,4 @@ * @interface module:utils/dom/position~Options | ||
* | ||
* **Note**: If a function returns `null`, it is ignored by the `getOptimalPosition()`. | ||
* | ||
* @member {Array.<Function>} #positions | ||
@@ -380,0 +394,0 @@ */ |
@@ -14,3 +14,3 @@ /** | ||
const version = '19.0.0'; | ||
const version = '19.1.0'; | ||
@@ -17,0 +17,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
6
6370
261551
17