@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/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/highlightstack.d.ts +1 -1
- package/src/highlightstack.js +1 -1
- package/src/index.d.ts +5 -5
- package/src/index.js +5 -5
- package/src/utils.js +1 -1
- package/src/verticalnavigation.d.ts +1 -1
- package/src/verticalnavigation.js +1 -1
- package/src/widget.d.ts +2 -2
- package/src/widget.js +3 -3
- package/src/widgetresize/resizer.d.ts +2 -2
- package/src/widgetresize/resizer.js +3 -3
- package/src/widgetresize/resizerstate.d.ts +1 -1
- package/src/widgetresize/resizerstate.js +1 -1
- package/src/widgetresize/sizeview.d.ts +2 -2
- package/src/widgetresize/sizeview.js +1 -1
- package/src/widgetresize.d.ts +2 -2
- package/src/widgetresize.js +2 -2
- package/src/widgettoolbarrepository.d.ts +1 -1
- package/src/widgettoolbarrepository.js +1 -1
- package/src/widgettypearound/widgettypearound.d.ts +1 -1
- package/src/widgettypearound/widgettypearound.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-widget",
|
3
|
-
"version": "0.0.0-nightly-
|
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-
|
16
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
17
|
-
"@ckeditor/ckeditor5-enter": "0.0.0-nightly-
|
18
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
19
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
20
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
21
|
-
"@ckeditor/ckeditor5-typing": "0.0.0-nightly-
|
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/)",
|
package/src/highlightstack.d.ts
CHANGED
@@ -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
|
21
|
+
export declare class HighlightStack extends /* #__PURE__ */ HighlightStack_base {
|
22
22
|
private readonly _stack;
|
23
23
|
/**
|
24
24
|
* Adds highlight descriptor to the stack.
|
package/src/highlightstack.js
CHANGED
@@ -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
|
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 {
|
9
|
-
export {
|
10
|
-
export {
|
11
|
-
export {
|
12
|
-
export
|
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 {
|
9
|
-
export {
|
10
|
-
export {
|
11
|
-
export {
|
12
|
-
export
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
12
|
+
export class SizeView extends View {
|
13
13
|
constructor() {
|
14
14
|
super();
|
15
15
|
const bind = this.bindTemplate;
|
package/src/widgetresize.d.ts
CHANGED
@@ -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
|
17
|
+
export declare class WidgetResize extends Plugin {
|
18
18
|
/**
|
19
19
|
* The currently selected resizer.
|
20
20
|
*
|
package/src/widgetresize.js
CHANGED
@@ -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
|
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
|
38
|
+
export declare 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
|
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
|
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
|