@ckeditor/ckeditor5-ui 47.1.0 → 47.2.0-alpha.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/README.md CHANGED
@@ -2,7 +2,7 @@ CKEditor 5 UI framework
2
2
  ===========================================
3
3
 
4
4
  [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-ui.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-ui)
5
- [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
5
+ [![codecov](https://codecov.io/gh/ckeditor/ckeditor5/branch/master/graph/badge.svg)](https://codecov.io/gh/ckeditor/ckeditor5)
6
6
  [![CircleCI](https://circleci.com/gh/ckeditor/ckeditor5.svg?style=shield)](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
7
7
 
8
8
  This package implements a simple UI framework and CKEditor 5's standard UI library.
package/dist/index.js 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
- import { Collection, CKEditorError, EmitterMixin, isNode, toArray, DomEmitterMixin, ObservableMixin, isIterable, global, uid, createElement, env, getEnvKeystrokeText, delay, isVisible, KeystrokeHandler, FocusTracker, toUnit, Rect, isText, ResizeObserver, getOptimalPosition, isRange, parseBase64EncodedObject, getBorderWidths, logWarning, priorities, first, getVisualViewportOffset, getAncestors } from '@ckeditor/ckeditor5-utils/dist/index.js';
5
+ import { Collection, CKEditorError, EmitterMixin, isNode, toArray, DomEmitterMixin, ObservableMixin, isIterable, global, uid, createElement, env, getEnvKeystrokeText, delay, isVisible, KeystrokeHandler, FocusTracker, toUnit, Rect, getConstrainedViewportRect, isText, ResizeObserver, getOptimalPosition, isRange, parseBase64EncodedObject, getBorderWidths, logWarning, priorities, first, getVisualViewportOffset, getAncestors } from '@ckeditor/ckeditor5-utils/dist/index.js';
6
6
  import { cloneDeepWith, isObject, isElement, throttle, debounce, cloneDeep, extend, escapeRegExp, escape } from 'es-toolkit/compat';
7
7
  import { Plugin, ContextPlugin } from '@ckeditor/ckeditor5-core/dist/index.js';
8
8
  import { IconCancel, IconCheck, IconAccessibility, IconProjectLogo, IconDropdownArrow, IconColorTileCheck, IconDragIndicator, IconPilcrow, IconThreeVerticalDots, IconText, IconPlus, IconParagraph, IconImportExport, IconBold, IconAlignLeft, IconColorPalette, IconEraser, IconPreviousArrow, IconNextArrow, IconLoupe } from '@ckeditor/ckeditor5-icons/dist/index.js';
@@ -4002,29 +4002,13 @@ const toPx$6 = /* #__PURE__ */ toUnit('px');
4002
4002
  }
4003
4003
  /**
4004
4004
  * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.
4005
- *
4006
- * TODO: This is a duplicate from position.ts module. It should either be exported there or land somewhere in utils.
4007
4005
  */ _getViewportRect() {
4008
4006
  const viewportRect = new Rect(global.window);
4009
4007
  // Modals should not be restricted by the viewport offsets as they are always displayed on top of the page.
4010
4008
  if (this.isModal) {
4011
4009
  return viewportRect;
4012
4010
  }
4013
- const viewportOffset = {
4014
- top: 0,
4015
- bottom: 0,
4016
- left: 0,
4017
- right: 0,
4018
- ...this._getViewportOffset()
4019
- };
4020
- viewportRect.top += viewportOffset.top;
4021
- viewportRect.height -= viewportOffset.top;
4022
- viewportRect.bottom -= viewportOffset.bottom;
4023
- viewportRect.height -= viewportOffset.bottom;
4024
- viewportRect.left += viewportOffset.left;
4025
- viewportRect.right -= viewportOffset.right;
4026
- viewportRect.width -= viewportOffset.left + viewportOffset.right;
4027
- return viewportRect;
4011
+ return getConstrainedViewportRect(this._getViewportOffset());
4028
4012
  }
4029
4013
  /**
4030
4014
  * Collects all focusable elements inside the dialog parts
@@ -13052,6 +13036,7 @@ const NESTED_PANEL_HORIZONTAL_OFFSET = 5;
13052
13036
  * groupId: 'insertInline',
13053
13037
  * items: [
13054
13038
  * 'menuBar:link',
13039
+ * 'menuBar:insertFootnote',
13055
13040
  * 'menuBar:bookmark',
13056
13041
  * 'menuBar:comment',
13057
13042
  * 'menuBar:insertMergeField',
@@ -13326,6 +13311,7 @@ const DefaultMenuBarItems = [
13326
13311
  groupId: 'insertInline',
13327
13312
  items: [
13328
13313
  'menuBar:link',
13314
+ 'menuBar:insertFootnote',
13329
13315
  'menuBar:bookmark',
13330
13316
  'menuBar:comment',
13331
13317
  'menuBar:insertMergeField',
@@ -13354,7 +13340,8 @@ const DefaultMenuBarItems = [
13354
13340
  {
13355
13341
  groupId: 'restrictedEditingException',
13356
13342
  items: [
13357
- 'menuBar:restrictedEditingException'
13343
+ 'menuBar:restrictedEditingException:inline',
13344
+ 'menuBar:restrictedEditingException:block'
13358
13345
  ]
13359
13346
  }
13360
13347
  ]