@ckeditor/ckeditor5-engine 48.0.1 → 48.1.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/conversion/comparemarkers.d.ts +49 -0
- package/dist/conversion/upcasthelpers.d.ts +6 -6
- package/dist/index.d.ts +7 -7
- package/dist/index.js +229 -115
- package/dist/index.js.map +1 -1
- package/dist/model/history.d.ts +1 -1
- package/dist/model/item.d.ts +2 -2
- package/dist/model/schema.d.ts +21 -0
- package/dist/model/utils/autoparagraphing.d.ts +3 -3
- package/dist/model/utils/getselectedcontent.d.ts +3 -3
- package/dist/view/document.d.ts +4 -0
- package/dist/view/filler.d.ts +0 -28
- package/dist/view/item.d.ts +2 -2
- package/dist/view/typecheckable.d.ts +3 -3
- package/package.json +2 -2
package/dist/model/history.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
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
|
-
import { type Operation } from './operation/operation.js';
|
|
6
5
|
/**
|
|
7
6
|
* @module engine/model/history
|
|
8
7
|
*/
|
|
8
|
+
import { type Operation } from './operation/operation.js';
|
|
9
9
|
/**
|
|
10
10
|
* `History` keeps the track of all the operations applied to the {@link module:engine/model/document~ModelDocument document}.
|
|
11
11
|
*/
|
package/dist/model/item.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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
|
-
import { type ModelNode } from './node.js';
|
|
6
|
-
import { type ModelTextProxy } from './textproxy.js';
|
|
7
5
|
/**
|
|
8
6
|
* @module engine/model/item
|
|
9
7
|
*/
|
|
8
|
+
import { type ModelNode } from './node.js';
|
|
9
|
+
import { type ModelTextProxy } from './textproxy.js';
|
|
10
10
|
/**
|
|
11
11
|
* Item is a {@link module:engine/model/node~ModelNode} or {@link module:engine/model/textproxy~ModelTextProxy}.
|
|
12
12
|
*/
|
package/dist/model/schema.d.ts
CHANGED
|
@@ -1332,8 +1332,29 @@ export interface ModelAttributeProperties {
|
|
|
1332
1332
|
* @default true
|
|
1333
1333
|
*/
|
|
1334
1334
|
copyFromObject?: boolean;
|
|
1335
|
+
/**
|
|
1336
|
+
* Defines the mapping of all possible block alignments for a specific model element.
|
|
1337
|
+
* It is used by features that need to determine whether an element can be aligned,
|
|
1338
|
+
* and apply the alignment if possible.
|
|
1339
|
+
*/
|
|
1340
|
+
blockAlignment?: ModelBlockAlignmentAttributesMapping | ((element: ModelElement) => ModelBlockAlignmentAttributesMapping);
|
|
1335
1341
|
[name: string]: unknown;
|
|
1336
1342
|
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Defines the mapping of block alignment options for a model element attribute.
|
|
1345
|
+
*
|
|
1346
|
+
* Each key represents a logical alignment name (e.g. `'left'`, `'center'`, `'right'`, `'justify'`),
|
|
1347
|
+
* and the corresponding value describes how that alignment is represented in the model — including
|
|
1348
|
+
* the actual attribute value and whether it should be treated as the default alignment for the element.
|
|
1349
|
+
*
|
|
1350
|
+
* Used by features that need to determine whether a model element supports block alignment
|
|
1351
|
+
* and how to apply it. Can be provided as a static object or as a function receiving the element
|
|
1352
|
+
* and returning the mapping dynamically, via {@link ~ModelAttributeProperties#blockAlignment}.
|
|
1353
|
+
*/
|
|
1354
|
+
export type ModelBlockAlignmentAttributesMapping = Record<string, {
|
|
1355
|
+
isDefault?: boolean;
|
|
1356
|
+
value: string;
|
|
1357
|
+
}>;
|
|
1337
1358
|
export type ModelSchemaAttributeCheckCallback = (context: ModelSchemaContext, attributeName: string) => boolean | undefined;
|
|
1338
1359
|
export type ModelSchemaChildCheckCallback = (context: ModelSchemaContext, definition: ModelSchemaCompiledItemDefinition) => boolean | undefined;
|
|
1339
1360
|
export {};
|
|
@@ -2,13 +2,13 @@
|
|
|
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/model/utils/autoparagraphing
|
|
7
|
+
*/
|
|
5
8
|
import { type ModelNode } from '../node.js';
|
|
6
9
|
import { type ModelPosition } from '../position.js';
|
|
7
10
|
import { type ModelSchema } from '../schema.js';
|
|
8
11
|
import { type ModelWriter } from '../writer.js';
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/utils/autoparagraphing
|
|
11
|
-
*/
|
|
12
12
|
/**
|
|
13
13
|
* Fixes all empty roots.
|
|
14
14
|
*
|
|
@@ -2,13 +2,13 @@
|
|
|
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/model/utils/getselectedcontent
|
|
7
|
+
*/
|
|
5
8
|
import { type ModelDocumentFragment } from '../documentfragment.js';
|
|
6
9
|
import { type ModelDocumentSelection } from '../documentselection.js';
|
|
7
10
|
import { type Model } from '../model.js';
|
|
8
11
|
import { type ModelSelection } from '../selection.js';
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/utils/getselectedcontent
|
|
11
|
-
*/
|
|
12
12
|
/**
|
|
13
13
|
* Gets a clone of the selected content.
|
|
14
14
|
*
|
package/dist/view/document.d.ts
CHANGED
|
@@ -92,6 +92,10 @@ export declare class ViewDocument extends /* #__PURE__ */ ViewDocument_base {
|
|
|
92
92
|
* @returns The view root element with the specified name or null when there is no root of given name.
|
|
93
93
|
*/
|
|
94
94
|
getRoot(name?: string): ViewRootEditableElement | null;
|
|
95
|
+
/**
|
|
96
|
+
* Returns an array with all roots added to the document.
|
|
97
|
+
*/
|
|
98
|
+
getRoots(): Array<ViewRootEditableElement>;
|
|
95
99
|
/**
|
|
96
100
|
* Allows registering post-fixer callbacks. A post-fixers mechanism allows to update the view tree just before it is rendered
|
|
97
101
|
* to the DOM.
|
package/dist/view/filler.d.ts
CHANGED
|
@@ -3,34 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { type EditingView } from './view.js';
|
|
6
|
-
/**
|
|
7
|
-
* Set of utilities related to handling block and inline fillers.
|
|
8
|
-
*
|
|
9
|
-
* Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all
|
|
10
|
-
* empty elements which should be selectable with elements or characters called "fillers". Unfortunately there is no one
|
|
11
|
-
* universal filler, this is why two types are uses:
|
|
12
|
-
*
|
|
13
|
-
* * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,
|
|
14
|
-
* as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that
|
|
15
|
-
* it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be
|
|
16
|
-
* moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it cannot be used
|
|
17
|
-
* in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other
|
|
18
|
-
* character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or
|
|
19
|
-
* {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.
|
|
20
|
-
*
|
|
21
|
-
* * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty
|
|
22
|
-
* `<b>` surrendered by text: `foo<b></b>bar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width
|
|
23
|
-
* spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined
|
|
24
|
-
* {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to
|
|
25
|
-
* avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not
|
|
26
|
-
* transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional
|
|
27
|
-
* code is needed to handle the caret.
|
|
28
|
-
*
|
|
29
|
-
* Both inline and block fillers are handled by the {@link module:engine/view/renderer~ViewRenderer renderer} and are not present in the
|
|
30
|
-
* view.
|
|
31
|
-
*
|
|
32
|
-
* @module engine/view/filler
|
|
33
|
-
*/
|
|
34
6
|
/**
|
|
35
7
|
* Non-breaking space filler creator. This function creates the ` ` text node.
|
|
36
8
|
* It defines how the filler is created.
|
package/dist/view/item.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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
|
-
import { type ViewNode } from './node.js';
|
|
6
|
-
import { type ViewTextProxy } from './textproxy.js';
|
|
7
5
|
/**
|
|
8
6
|
* @module engine/view/item
|
|
9
7
|
*/
|
|
8
|
+
import { type ViewNode } from './node.js';
|
|
9
|
+
import { type ViewTextProxy } from './textproxy.js';
|
|
10
10
|
/**
|
|
11
11
|
* Item is a {@link module:engine/view/node~ViewNode Node} or {@link module:engine/view/textproxy~ViewTextProxy ViewTextProxy}.
|
|
12
12
|
*/
|
|
@@ -2,6 +2,9 @@
|
|
|
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/typecheckable
|
|
7
|
+
*/
|
|
5
8
|
import { type ViewAttributeElement } from './attributeelement.js';
|
|
6
9
|
import { type ViewContainerElement } from './containerelement.js';
|
|
7
10
|
import { type ViewDocumentFragment } from './documentfragment.js';
|
|
@@ -18,9 +21,6 @@ import { type ViewSelection } from './selection.js';
|
|
|
18
21
|
import { type ViewText } from './text.js';
|
|
19
22
|
import { type ViewTextProxy } from './textproxy.js';
|
|
20
23
|
import { type ViewUIElement } from './uielement.js';
|
|
21
|
-
/**
|
|
22
|
-
* @module engine/view/typecheckable
|
|
23
|
-
*/
|
|
24
24
|
export declare abstract class ViewTypeCheckable {
|
|
25
25
|
/**
|
|
26
26
|
* Checks whether this object is of type {@link module:engine/view/node~ViewNode} or its subclass.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-engine",
|
|
3
|
-
"version": "48.0.
|
|
3
|
+
"version": "48.1.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.0.
|
|
40
|
+
"@ckeditor/ckeditor5-utils": "48.1.0-alpha.0",
|
|
41
41
|
"es-toolkit": "1.45.1"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|