@ckeditor/ckeditor5-engine 48.3.1-alpha.1 → 48.4.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/dist/index-content.css +3 -0
- package/dist/index-content.css.map +1 -0
- package/dist/index-editor.css +36 -34
- package/dist/index-editor.css.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +121 -39
- package/dist/index.js.map +1 -1
- package/dist/model/documentselection.d.ts +6 -0
- package/dist/model/liveposition.d.ts +12 -1
- package/dist/model/liverange.d.ts +26 -1
- package/dist/model/position.d.ts +7 -0
- package/dist/model/range.d.ts +9 -0
- package/dist/view/placeholder.d.ts +0 -4
- package/dist/view/renderer.d.ts +0 -1
- package/package.json +2 -2
|
@@ -355,6 +355,12 @@ export declare class ModelDocumentSelection extends ModelDocumentSelectionBase {
|
|
|
355
355
|
* @internal
|
|
356
356
|
*/
|
|
357
357
|
static _isStoreAttributeKey(key: string): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Drop selection attribute key prefix.
|
|
360
|
+
*
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
static _dropStoreAttributeKeyPrefix(key: string): string;
|
|
358
364
|
}
|
|
359
365
|
/**
|
|
360
366
|
* Fired when selection range(s) changed.
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @module engine/model/liveposition
|
|
7
7
|
*/
|
|
8
8
|
import { ModelPosition, type ModelPositionOffset, type ModelPositionStickiness } from "./position.js";
|
|
9
|
+
import type { Model } from "./model.js";
|
|
9
10
|
import { type ModelDocumentFragment } from "./documentfragment.js";
|
|
10
11
|
import { type ModelItem } from "./item.js";
|
|
11
12
|
import { type ModelRootElement } from "./rootelement.js";
|
|
@@ -34,7 +35,7 @@ export declare class ModelLivePosition extends ModelLivePositionBase {
|
|
|
34
35
|
*
|
|
35
36
|
* @see module:engine/model/position~ModelPosition
|
|
36
37
|
*/
|
|
37
|
-
constructor(root: ModelRootElement, path: Array<number>, stickiness?: ModelPositionStickiness);
|
|
38
|
+
constructor(root: ModelRootElement, path: Array<number>, stickiness?: ModelPositionStickiness, model?: Model);
|
|
38
39
|
/**
|
|
39
40
|
* Unbinds all events previously bound by `ModelLivePosition`. Use it whenever you don't need `ModelLivePosition` instance
|
|
40
41
|
* anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was
|
|
@@ -50,6 +51,16 @@ export declare class ModelLivePosition extends ModelLivePositionBase {
|
|
|
50
51
|
*/
|
|
51
52
|
static fromPosition(position: ModelPosition, stickiness?: ModelPositionStickiness): ModelLivePosition;
|
|
52
53
|
/**
|
|
54
|
+
* Creates a `ModelLivePosition` for a position rooted in
|
|
55
|
+
* a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.
|
|
56
|
+
*
|
|
57
|
+
* Document fragment does not belong to a document, so the live position is bound to the provided `model` and keeps
|
|
58
|
+
* itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
static _fromPositionInDocumentFragment(position: ModelPosition, model: Model, stickiness?: ModelPositionStickiness): ModelLivePosition;
|
|
63
|
+
/**
|
|
53
64
|
* @internal
|
|
54
65
|
* @see module:engine/model/position~ModelPosition._createAfter
|
|
55
66
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @module engine/model/liverange
|
|
7
7
|
*/
|
|
8
8
|
import { ModelRange } from "./range.js";
|
|
9
|
+
import type { Model } from "./model.js";
|
|
9
10
|
import { type ModelDocumentFragment } from "./documentfragment.js";
|
|
10
11
|
import { type ModelElement } from "./element.js";
|
|
11
12
|
import { type ModelItem } from "./item.js";
|
|
@@ -27,7 +28,7 @@ export declare class ModelLiveRange extends ModelLiveRangeBase {
|
|
|
27
28
|
*
|
|
28
29
|
* @see module:engine/model/range~ModelRange
|
|
29
30
|
*/
|
|
30
|
-
constructor(start: ModelPosition, end?: ModelPosition | null);
|
|
31
|
+
constructor(start: ModelPosition, end?: ModelPosition | null, model?: Model);
|
|
31
32
|
/**
|
|
32
33
|
* Unbinds all events previously bound by `ModelLiveRange`. Use it whenever you don't need `ModelLiveRange` instance
|
|
33
34
|
* anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was
|
|
@@ -43,6 +44,16 @@ export declare class ModelLiveRange extends ModelLiveRangeBase {
|
|
|
43
44
|
*/
|
|
44
45
|
static fromRange(range: ModelRange): ModelLiveRange;
|
|
45
46
|
/**
|
|
47
|
+
* Creates a `ModelLiveRange` for a range rooted in
|
|
48
|
+
* a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.
|
|
49
|
+
*
|
|
50
|
+
* Document fragment does not belong to a document, so the live range is bound to the provided `model` and keeps
|
|
51
|
+
* itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
static _fromRangeInDocumentFragment(range: ModelRange, model: Model): ModelLiveRange;
|
|
56
|
+
/**
|
|
46
57
|
* @see module:engine/model/range~ModelRange._createIn
|
|
47
58
|
* @internal
|
|
48
59
|
*/
|
|
@@ -76,6 +87,20 @@ export type ModelLiveRangeChangeRangeEvent = {
|
|
|
76
87
|
}];
|
|
77
88
|
};
|
|
78
89
|
/**
|
|
90
|
+
* Fired when `ModelLiveRange` instance was entirely removed from the document fragment.
|
|
91
|
+
*
|
|
92
|
+
* @eventName ~ModelLiveRange#change:drop
|
|
93
|
+
* @param range Collapsed range with start and end position equal to the source position of the detach operation.
|
|
94
|
+
* @param data Object with additional information about the change.
|
|
95
|
+
* @param data.deletionPosition Source position for detach changes.
|
|
96
|
+
*/
|
|
97
|
+
export type ModelLiveRangeChangeDropEvent = {
|
|
98
|
+
name: "change" | "change:drop";
|
|
99
|
+
args: [range: ModelRange, data: {
|
|
100
|
+
deletionPosition: ModelPosition;
|
|
101
|
+
}];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
79
104
|
* Fired when `ModelLiveRange` instance boundaries have not changed after
|
|
80
105
|
* a change in {@link module:engine/model/document~ModelDocument document}
|
|
81
106
|
* but the change took place inside the range, effectively changing its content.
|
package/dist/model/position.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { type ModelTreeWalkerOptions, type ModelTreeWalkerValue } from "./treewa
|
|
|
10
10
|
import { type ModelDocument } from "./document.js";
|
|
11
11
|
import { type ModelDocumentFragment } from "./documentfragment.js";
|
|
12
12
|
import { type ModelElement } from "./element.js";
|
|
13
|
+
import { type DetachOperation } from "./operation/detachoperation.js";
|
|
13
14
|
import { type InsertOperation } from "./operation/insertoperation.js";
|
|
14
15
|
import { type ModelItem } from "./item.js";
|
|
15
16
|
import { type MergeOperation } from "./operation/mergeoperation.js";
|
|
@@ -313,6 +314,12 @@ export declare class ModelPosition extends ModelTypeCheckable {
|
|
|
313
314
|
*/
|
|
314
315
|
getTransformedByOperation(operation: Operation): ModelPosition;
|
|
315
316
|
/**
|
|
317
|
+
* Returns a copy of this position transformed by a detach operation.
|
|
318
|
+
*
|
|
319
|
+
* @internal
|
|
320
|
+
*/
|
|
321
|
+
_getTransformedByDetachOperation(operation: DetachOperation): ModelPosition;
|
|
322
|
+
/**
|
|
316
323
|
* Returns a copy of this position transformed by an insert operation.
|
|
317
324
|
*
|
|
318
325
|
* @internal
|
package/dist/model/range.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { type MergeOperation } from "./operation/mergeoperation.js";
|
|
|
17
17
|
import { type MoveOperation } from "./operation/moveoperation.js";
|
|
18
18
|
import { type Operation } from "./operation/operation.js";
|
|
19
19
|
import { type SplitOperation } from "./operation/splitoperation.js";
|
|
20
|
+
import { type DetachOperation } from "./operation/detachoperation.js";
|
|
20
21
|
/**
|
|
21
22
|
* Represents a range in the model tree.
|
|
22
23
|
*
|
|
@@ -352,6 +353,14 @@ export declare class ModelRange extends ModelTypeCheckable implements Iterable<M
|
|
|
352
353
|
*/
|
|
353
354
|
_getTransformedByMergeOperation(operation: MergeOperation): ModelRange;
|
|
354
355
|
/**
|
|
356
|
+
* Returns a result of transforming a copy of this range by detach operation.
|
|
357
|
+
*
|
|
358
|
+
* If the range is completely removed, an empty array is returned.
|
|
359
|
+
*
|
|
360
|
+
* @internal
|
|
361
|
+
*/
|
|
362
|
+
_getTransformedByDetachOperation(operation: DetachOperation): Array<ModelRange>;
|
|
363
|
+
/**
|
|
355
364
|
* Returns an array containing one or two {@link module:engine/model/range~ModelRange ranges} that are a result of transforming this
|
|
356
365
|
* {@link module:engine/model/range~ModelRange range} by inserting `howMany` nodes at `insertPosition`. Two
|
|
357
366
|
* {@link module:engine/model/range~ModelRange ranges} are returned if the insertion was inside this
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
/**
|
|
6
|
-
* @module engine/view/placeholder
|
|
7
|
-
*/
|
|
8
|
-
import "../../theme/placeholder.css";
|
|
9
5
|
import { type ViewDowncastWriter } from "./downcastwriter.js";
|
|
10
6
|
import { type ViewEditableElement } from "./editableelement.js";
|
|
11
7
|
import { type ViewElement } from "./element.js";
|
package/dist/view/renderer.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { type ViewDocumentSelection } from "./documentselection.js";
|
|
|
8
8
|
import { type ViewDomConverter } from "./domconverter.js";
|
|
9
9
|
import { type ViewElement } from "./element.js";
|
|
10
10
|
import { type ViewNode } from "./node.js";
|
|
11
|
-
import "../../theme/renderer.css";
|
|
12
11
|
type DomDocument = globalThis.Document;
|
|
13
12
|
declare const ViewRendererBase: ObservableMixinConstructor;
|
|
14
13
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-engine",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.4.0-alpha.0",
|
|
4
4
|
"description": "The editing engine of CKEditor 5 – the best browser-based rich text editor.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
40
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.0",
|
|
41
41
|
"es-toolkit": "1.45.1"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|