@ckeditor/ckeditor5-widget 0.0.0-nightly-20250605.0 → 0.0.0-nightly-20250606.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.

Potentially problematic release.


This version of @ckeditor/ckeditor5-widget might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-widget",
3
- "version": "0.0.0-nightly-20250605.0",
3
+ "version": "0.0.0-nightly-20250606.0",
4
4
  "description": "Widget API for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,13 +12,13 @@
12
12
  "type": "module",
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250605.0",
16
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250605.0",
17
- "@ckeditor/ckeditor5-enter": "0.0.0-nightly-20250605.0",
18
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250605.0",
19
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250605.0",
20
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250605.0",
21
- "@ckeditor/ckeditor5-typing": "0.0.0-nightly-20250605.0",
15
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250606.0",
16
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250606.0",
17
+ "@ckeditor/ckeditor5-enter": "0.0.0-nightly-20250606.0",
18
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250606.0",
19
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250606.0",
20
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250606.0",
21
+ "@ckeditor/ckeditor5-typing": "0.0.0-nightly-20250606.0",
22
22
  "es-toolkit": "1.38.0"
23
23
  },
24
24
  "author": "CKSource (http://cksource.com/)",
@@ -18,7 +18,7 @@ declare const HighlightStack_base: {
18
18
  *
19
19
  * This way, highlight will be applied with the same rules it is applied on texts.
20
20
  */
21
- export default class HighlightStack extends /* #__PURE__ */ HighlightStack_base {
21
+ export declare class HighlightStack extends /* #__PURE__ */ HighlightStack_base {
22
22
  private readonly _stack;
23
23
  /**
24
24
  * Adds highlight descriptor to the stack.
@@ -17,7 +17,7 @@ import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
17
17
  *
18
18
  * This way, highlight will be applied with the same rules it is applied on texts.
19
19
  */
20
- export default class HighlightStack extends /* #__PURE__ */ EmitterMixin() {
20
+ export class HighlightStack extends /* #__PURE__ */ EmitterMixin() {
21
21
  _stack = [];
22
22
  /**
23
23
  * Adds highlight descriptor to the stack.
package/src/index.d.ts CHANGED
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module widget
7
7
  */
8
- export { default as Widget } from './widget.js';
9
- export { default as WidgetToolbarRepository } from './widgettoolbarrepository.js';
10
- export { default as WidgetResize } from './widgetresize.js';
11
- export { default as WidgetTypeAround } from './widgettypearound/widgettypearound.js';
12
- export * from './utils.js';
8
+ export { Widget } from './widget.js';
9
+ export { WidgetToolbarRepository } from './widgettoolbarrepository.js';
10
+ export { WidgetResize } from './widgetresize.js';
11
+ export { WidgetTypeAround } from './widgettypearound/widgettypearound.js';
12
+ export { WIDGET_CLASS_NAME, WIDGET_SELECTED_CLASS_NAME, isWidget, toWidget, setHighlightHandling, setLabel, getLabel, toWidgetEditable, findOptimalInsertionRange, viewToModelPositionOutsideModelElement, calculateResizeHostAncestorWidth, calculateResizeHostPercentageWidth } from './utils.js';
13
13
  import './augmentation.js';
package/src/index.js CHANGED
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module widget
7
7
  */
8
- export { default as Widget } from './widget.js';
9
- export { default as WidgetToolbarRepository } from './widgettoolbarrepository.js';
10
- export { default as WidgetResize } from './widgetresize.js';
11
- export { default as WidgetTypeAround } from './widgettypearound/widgettypearound.js';
12
- export * from './utils.js';
8
+ export { Widget } from './widget.js';
9
+ export { WidgetToolbarRepository } from './widgettoolbarrepository.js';
10
+ export { WidgetResize } from './widgetresize.js';
11
+ export { WidgetTypeAround } from './widgettypearound/widgettypearound.js';
12
+ export { WIDGET_CLASS_NAME, WIDGET_SELECTED_CLASS_NAME, isWidget, toWidget, setHighlightHandling, setLabel, getLabel, toWidgetEditable, findOptimalInsertionRange, viewToModelPositionOutsideModelElement, calculateResizeHostAncestorWidth, calculateResizeHostPercentageWidth } from './utils.js';
13
13
  import './augmentation.js';
package/src/utils.js CHANGED
@@ -8,7 +8,7 @@
8
8
  import { IconDragHandle } from '@ckeditor/ckeditor5-icons';
9
9
  import { Rect, CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
10
10
  import { IconView } from '@ckeditor/ckeditor5-ui';
11
- import HighlightStack from './highlightstack.js';
11
+ import { HighlightStack } from './highlightstack.js';
12
12
  import { getTypeAroundFakeCaretPosition } from './widgettypearound/utils.js';
13
13
  /**
14
14
  * CSS class added to each widget element.
@@ -12,4 +12,4 @@ import type { EditingController, ViewDocumentArrowKeyEvent } from '@ckeditor/cke
12
12
  *
13
13
  * @param editing The editing controller.
14
14
  */
15
- export default function verticalNavigationHandler(editing: EditingController): GetCallback<ViewDocumentArrowKeyEvent>;
15
+ export declare function verticalNavigationHandler(editing: EditingController): GetCallback<ViewDocumentArrowKeyEvent>;
@@ -11,7 +11,7 @@ import { keyCodes, Rect } from '@ckeditor/ckeditor5-utils';
11
11
  *
12
12
  * @param editing The editing controller.
13
13
  */
14
- export default function verticalNavigationHandler(editing) {
14
+ export function verticalNavigationHandler(editing) {
15
15
  const model = editing.model;
16
16
  return (evt, data) => {
17
17
  const arrowUpPressed = data.keyCode == keyCodes.arrowup;
package/src/widget.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  import { Plugin } from '@ckeditor/ckeditor5-core';
9
9
  import { type Element, type Node } from '@ckeditor/ckeditor5-engine';
10
10
  import { Delete } from '@ckeditor/ckeditor5-typing';
11
- import WidgetTypeAround from './widgettypearound/widgettypearound.js';
11
+ import { WidgetTypeAround } from './widgettypearound/widgettypearound.js';
12
12
  import '../theme/widget.css';
13
13
  /**
14
14
  * The widget plugin. It enables base support for widgets.
@@ -23,7 +23,7 @@ import '../theme/widget.css';
23
23
  * is added to indicate that widget has been selected.
24
24
  * * The mouse and keyboard events handling on and around widget elements.
25
25
  */
26
- export default class Widget extends Plugin {
26
+ export declare class Widget extends Plugin {
27
27
  /**
28
28
  * Holds previously selected widgets.
29
29
  */
package/src/widget.js CHANGED
@@ -9,8 +9,8 @@ import { Plugin } from '@ckeditor/ckeditor5-core';
9
9
  import { MouseObserver, TreeWalker } from '@ckeditor/ckeditor5-engine';
10
10
  import { Delete } from '@ckeditor/ckeditor5-typing';
11
11
  import { env, keyCodes, getLocalizedArrowKeyCodeDirection, getRangeFromMouseEvent } from '@ckeditor/ckeditor5-utils';
12
- import WidgetTypeAround from './widgettypearound/widgettypearound.js';
13
- import verticalNavigationHandler from './verticalnavigation.js';
12
+ import { WidgetTypeAround } from './widgettypearound/widgettypearound.js';
13
+ import { verticalNavigationHandler } from './verticalnavigation.js';
14
14
  import { getLabel, isWidget, WIDGET_SELECTED_CLASS_NAME } from './utils.js';
15
15
  import '../theme/widget.css';
16
16
  /**
@@ -26,7 +26,7 @@ import '../theme/widget.css';
26
26
  * is added to indicate that widget has been selected.
27
27
  * * The mouse and keyboard events handling on and around widget elements.
28
28
  */
29
- export default class Widget extends Plugin {
29
+ export class Widget extends Plugin {
30
30
  /**
31
31
  * Holds previously selected widgets.
32
32
  */
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import { Rect, type DecoratedMethodEvent } from '@ckeditor/ckeditor5-utils';
6
- import ResizeState from './resizerstate.js';
6
+ import { ResizeState } from './resizerstate.js';
7
7
  import type { ResizerOptions } from '../widgetresize.js';
8
8
  declare const Resizer_base: {
9
9
  new (): import("@ckeditor/ckeditor5-utils").Observable;
@@ -12,7 +12,7 @@ declare const Resizer_base: {
12
12
  /**
13
13
  * Represents a resizer for a single resizable object.
14
14
  */
15
- export default class Resizer extends /* #__PURE__ */ Resizer_base {
15
+ export declare class Resizer extends /* #__PURE__ */ Resizer_base {
16
16
  /**
17
17
  * Flag that indicates whether resizer can be used.
18
18
  *
@@ -7,12 +7,12 @@
7
7
  */
8
8
  import { Template } from '@ckeditor/ckeditor5-ui';
9
9
  import { Rect, ObservableMixin, compareArrays } from '@ckeditor/ckeditor5-utils';
10
- import ResizeState from './resizerstate.js';
11
- import SizeView from './sizeview.js';
10
+ import { ResizeState } from './resizerstate.js';
11
+ import { SizeView } from './sizeview.js';
12
12
  /**
13
13
  * Represents a resizer for a single resizable object.
14
14
  */
15
- export default class Resizer extends /* #__PURE__ */ ObservableMixin() {
15
+ export class Resizer extends /* #__PURE__ */ ObservableMixin() {
16
16
  /**
17
17
  * Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.
18
18
  *
@@ -10,7 +10,7 @@ declare const ResizeState_base: {
10
10
  /**
11
11
  * Stores the internal state of a single resizable object.
12
12
  */
13
- export default class ResizeState extends /* #__PURE__ */ ResizeState_base {
13
+ export declare class ResizeState extends /* #__PURE__ */ ResizeState_base {
14
14
  /**
15
15
  * The position of the handle that initiated the resizing. E.g. `"top-left"`, `"bottom-right"` etc. or `null`
16
16
  * if unknown.
@@ -10,7 +10,7 @@ import { calculateResizeHostPercentageWidth } from '../utils.js';
10
10
  /**
11
11
  * Stores the internal state of a single resizable object.
12
12
  */
13
- export default class ResizeState extends /* #__PURE__ */ ObservableMixin() {
13
+ export class ResizeState extends /* #__PURE__ */ ObservableMixin() {
14
14
  /**
15
15
  * The reference point of the resizer where the dragging started. It is used to measure the distance the user cursor
16
16
  * traveled, so how much the image should be enlarged.
@@ -7,11 +7,11 @@
7
7
  */
8
8
  import { View } from '@ckeditor/ckeditor5-ui';
9
9
  import type { ResizerOptions } from '../widgetresize.js';
10
- import type ResizeState from './resizerstate.js';
10
+ import { type ResizeState } from './resizerstate.js';
11
11
  /**
12
12
  * A view displaying the proposed new element size during the resizing.
13
13
  */
14
- export default class SizeView extends View {
14
+ export declare class SizeView extends View {
15
15
  /**
16
16
  * The visibility of the view defined based on the existence of the host proposed dimensions.
17
17
  *
@@ -9,7 +9,7 @@ import { View } from '@ckeditor/ckeditor5-ui';
9
9
  /**
10
10
  * A view displaying the proposed new element size during the resizing.
11
11
  */
12
- export default class SizeView extends View {
12
+ export class SizeView extends View {
13
13
  constructor() {
14
14
  super();
15
15
  const bind = this.bindTemplate;
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module widget/widgetresize
7
7
  */
8
- import Resizer from './widgetresize/resizer.js';
8
+ import { Resizer } from './widgetresize/resizer.js';
9
9
  import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
10
10
  import { type Element, type ViewContainerElement } from '@ckeditor/ckeditor5-engine';
11
11
  import '../theme/widgetresize.css';
@@ -14,7 +14,7 @@ import '../theme/widgetresize.css';
14
14
  *
15
15
  * Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.
16
16
  */
17
- export default class WidgetResize extends Plugin {
17
+ export declare class WidgetResize extends Plugin {
18
18
  /**
19
19
  * The currently selected resizer.
20
20
  *
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module widget/widgetresize
7
7
  */
8
- import Resizer from './widgetresize/resizer.js';
8
+ import { Resizer } from './widgetresize/resizer.js';
9
9
  import { Plugin } from '@ckeditor/ckeditor5-core';
10
10
  import { MouseObserver } from '@ckeditor/ckeditor5-engine';
11
11
  import { DomEmitterMixin, global } from '@ckeditor/ckeditor5-utils';
@@ -16,7 +16,7 @@ import '../theme/widgetresize.css';
16
16
  *
17
17
  * Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.
18
18
  */
19
- export default class WidgetResize extends Plugin {
19
+ export class WidgetResize extends Plugin {
20
20
  /**
21
21
  * A map of resizers created using this plugin instance.
22
22
  */
@@ -35,7 +35,7 @@ import { type PositioningFunction } from '@ckeditor/ckeditor5-utils';
35
35
  * }
36
36
  * ```
37
37
  */
38
- export default class WidgetToolbarRepository extends Plugin {
38
+ export declare class WidgetToolbarRepository extends Plugin {
39
39
  /**
40
40
  * A map of toolbar definitions.
41
41
  */
@@ -35,7 +35,7 @@ import { isWidget } from './utils.js';
35
35
  * }
36
36
  * ```
37
37
  */
38
- export default class WidgetToolbarRepository extends Plugin {
38
+ export class WidgetToolbarRepository extends Plugin {
39
39
  /**
40
40
  * A map of toolbar definitions.
41
41
  */
@@ -19,7 +19,7 @@ import '../../theme/widgettypearound.css';
19
19
  * user if the widget is next to the "tight spot". Once clicked, a paragraph is created with the selection anchored
20
20
  * in it so that users can type (or insert content, paste, etc.) straight away.
21
21
  */
22
- export default class WidgetTypeAround extends Plugin {
22
+ export declare class WidgetTypeAround extends Plugin {
23
23
  /**
24
24
  * A reference to the model widget element that has the fake caret active
25
25
  * on either side of it. It is later used to remove CSS classes associated with the fake caret
@@ -29,7 +29,7 @@ const PLUGIN_DISABLED_EDITING_ROOT_CLASS = 'ck-widget__type-around_disabled';
29
29
  * user if the widget is next to the "tight spot". Once clicked, a paragraph is created with the selection anchored
30
30
  * in it so that users can type (or insert content, paste, etc.) straight away.
31
31
  */
32
- export default class WidgetTypeAround extends Plugin {
32
+ export class WidgetTypeAround extends Plugin {
33
33
  /**
34
34
  * A reference to the model widget element that has the fake caret active
35
35
  * on either side of it. It is later used to remove CSS classes associated with the fake caret