@ckeditor/ckeditor5-utils 47.1.0 → 47.2.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/README.md +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/dom/position.d.ts +4 -0
- package/src/dom/position.js +4 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/version.d.ts +1 -1
- package/src/version.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-utils",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.2.0-alpha.0",
|
|
4
4
|
"description": "Miscellaneous utilities used by CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-ui": "47.
|
|
15
|
+
"@ckeditor/ckeditor5-ui": "47.2.0-alpha.0",
|
|
16
16
|
"es-toolkit": "1.39.5"
|
|
17
17
|
},
|
|
18
18
|
"author": "CKSource (http://cksource.com/)",
|
package/src/dom/position.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ import { Rect, type RectSource } from './rect.js';
|
|
|
72
72
|
* @param options The input data and configuration of the helper.
|
|
73
73
|
*/
|
|
74
74
|
export declare function getOptimalPosition({ element, target, positions, limiter, fitInViewport, viewportOffsetConfig }: DomOptimalPositionOptions): DomPoint | null;
|
|
75
|
+
/**
|
|
76
|
+
* Returns a viewport `Rect` shrunk by the viewport offset config from all sides.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getConstrainedViewportRect(viewportOffsetConfig: DomOptimalPositionOptions['viewportOffsetConfig']): Rect;
|
|
75
79
|
/**
|
|
76
80
|
* A position object which instances are created and used by the {@link module:utils/dom/position~getOptimalPosition} helper.
|
|
77
81
|
*
|
package/src/dom/position.js
CHANGED
|
@@ -174,13 +174,16 @@ function getVisibleViewportIntersectionRect(source, viewportRect) {
|
|
|
174
174
|
/**
|
|
175
175
|
* Returns a viewport `Rect` shrunk by the viewport offset config from all sides.
|
|
176
176
|
*/
|
|
177
|
-
function getConstrainedViewportRect(viewportOffsetConfig) {
|
|
177
|
+
export function getConstrainedViewportRect(viewportOffsetConfig) {
|
|
178
178
|
viewportOffsetConfig = Object.assign({ top: 0, bottom: 0, left: 0, right: 0 }, viewportOffsetConfig);
|
|
179
179
|
const viewportRect = new Rect(global.window);
|
|
180
180
|
viewportRect.top += viewportOffsetConfig.top;
|
|
181
181
|
viewportRect.height -= viewportOffsetConfig.top;
|
|
182
182
|
viewportRect.bottom -= viewportOffsetConfig.bottom;
|
|
183
183
|
viewportRect.height -= viewportOffsetConfig.bottom;
|
|
184
|
+
viewportRect.left += viewportOffsetConfig.left;
|
|
185
|
+
viewportRect.right -= viewportOffsetConfig.right;
|
|
186
|
+
viewportRect.width -= viewportOffsetConfig.left + viewportOffsetConfig.right;
|
|
184
187
|
return viewportRect;
|
|
185
188
|
}
|
|
186
189
|
/**
|
package/src/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export { isNode } from './dom/isnode.js';
|
|
|
44
44
|
export { isRange } from './dom/isrange.js';
|
|
45
45
|
export { isValidAttributeName } from './dom/isvalidattributename.js';
|
|
46
46
|
export { isVisible } from './dom/isvisible.js';
|
|
47
|
-
export { getOptimalPosition, type DomOptimalPositionOptions, type PositioningFunction, type DomPoint, type DomPositioningFunctionResult } from './dom/position.js';
|
|
47
|
+
export { getOptimalPosition, getConstrainedViewportRect, type DomOptimalPositionOptions, type PositioningFunction, type DomPoint, type DomPositioningFunctionResult } from './dom/position.js';
|
|
48
48
|
export { remove } from './dom/remove.js';
|
|
49
49
|
export { getVisualViewportOffset } from './dom/getvisualviewportoffset.js';
|
|
50
50
|
export { scrollAncestorsToShowTarget, scrollViewportToShowTarget, type IfTrue } from './dom/scroll.js';
|
package/src/index.js
CHANGED
|
@@ -43,7 +43,7 @@ export { isNode } from './dom/isnode.js';
|
|
|
43
43
|
export { isRange } from './dom/isrange.js';
|
|
44
44
|
export { isValidAttributeName } from './dom/isvalidattributename.js';
|
|
45
45
|
export { isVisible } from './dom/isvisible.js';
|
|
46
|
-
export { getOptimalPosition } from './dom/position.js';
|
|
46
|
+
export { getOptimalPosition, getConstrainedViewportRect } from './dom/position.js';
|
|
47
47
|
export { remove } from './dom/remove.js';
|
|
48
48
|
export { getVisualViewportOffset } from './dom/getvisualviewportoffset.js';
|
|
49
49
|
export { scrollAncestorsToShowTarget, scrollViewportToShowTarget } from './dom/scroll.js';
|
package/src/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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
|
-
export declare const version = "47.
|
|
5
|
+
export declare const version = "47.2.0-alpha.0";
|
|
6
6
|
export declare const releaseDate: Date;
|
|
7
7
|
declare global {
|
|
8
8
|
var CKEDITOR_VERSION: string;
|
package/src/version.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @module utils/version
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError } from './ckeditorerror.js';
|
|
9
|
-
export const version = '47.
|
|
9
|
+
export const version = '47.2.0-alpha.0';
|
|
10
10
|
// The second argument is not a month. It is `monthIndex` and starts from `0`.
|
|
11
|
-
export const releaseDate = new Date(2025, 9,
|
|
11
|
+
export const releaseDate = new Date(2025, 9, 29);
|
|
12
12
|
/* istanbul ignore next -- @preserve */
|
|
13
13
|
if (globalThis.CKEDITOR_VERSION) {
|
|
14
14
|
/**
|