@ckeditor/ckeditor5-engine 40.1.0 → 41.0.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/CHANGELOG.md +72 -72
- package/LICENSE.md +1 -1
- package/package.json +3 -2
- package/src/controller/datacontroller.d.ts +16 -16
- package/src/controller/datacontroller.js +12 -12
- package/src/controller/editingcontroller.d.ts +8 -8
- package/src/controller/editingcontroller.js +8 -8
- package/src/conversion/conversion.d.ts +7 -7
- package/src/conversion/conversion.js +3 -3
- package/src/conversion/conversionhelpers.d.ts +1 -1
- package/src/conversion/conversionhelpers.js +1 -1
- package/src/conversion/downcastdispatcher.d.ts +14 -14
- package/src/conversion/downcastdispatcher.js +6 -5
- package/src/conversion/downcasthelpers.d.ts +18 -54
- package/src/conversion/downcasthelpers.js +8 -44
- package/src/conversion/mapper.d.ts +10 -10
- package/src/conversion/mapper.js +6 -6
- package/src/conversion/modelconsumable.d.ts +6 -6
- package/src/conversion/modelconsumable.js +2 -2
- package/src/conversion/upcastdispatcher.d.ts +14 -14
- package/src/conversion/upcastdispatcher.js +6 -6
- package/src/conversion/upcasthelpers.d.ts +10 -10
- package/src/conversion/upcasthelpers.js +4 -4
- package/src/conversion/viewconsumable.d.ts +6 -6
- package/src/conversion/viewconsumable.js +1 -1
- package/src/dataprocessor/basichtmlwriter.d.ts +2 -2
- package/src/dataprocessor/basichtmlwriter.js +1 -1
- package/src/dataprocessor/dataprocessor.d.ts +3 -3
- package/src/dataprocessor/dataprocessor.js +1 -1
- package/src/dataprocessor/htmldataprocessor.d.ts +8 -8
- package/src/dataprocessor/htmldataprocessor.js +4 -4
- package/src/dataprocessor/htmlwriter.d.ts +1 -1
- package/src/dataprocessor/htmlwriter.js +1 -1
- package/src/dataprocessor/xmldataprocessor.d.ts +8 -8
- package/src/dataprocessor/xmldataprocessor.js +4 -4
- package/src/dev-utils/model.d.ts +11 -11
- package/src/dev-utils/model.js +17 -17
- package/src/dev-utils/operationreplayer.d.ts +3 -3
- package/src/dev-utils/operationreplayer.js +2 -2
- package/src/dev-utils/utils.d.ts +1 -1
- package/src/dev-utils/utils.js +1 -1
- package/src/dev-utils/view.d.ts +9 -9
- package/src/dev-utils/view.js +15 -15
- package/src/index.d.ts +107 -108
- package/src/index.js +65 -66
- package/src/model/batch.d.ts +2 -2
- package/src/model/batch.js +1 -1
- package/src/model/differ.d.ts +35 -7
- package/src/model/differ.js +9 -6
- package/src/model/document.d.ts +12 -10
- package/src/model/document.js +5 -5
- package/src/model/documentfragment.d.ts +5 -5
- package/src/model/documentfragment.js +6 -6
- package/src/model/documentselection.d.ts +9 -9
- package/src/model/documentselection.js +6 -6
- package/src/model/element.d.ts +3 -3
- package/src/model/element.js +5 -5
- package/src/model/history.d.ts +2 -2
- package/src/model/history.js +1 -1
- package/src/model/item.d.ts +3 -3
- package/src/model/item.js +1 -1
- package/src/model/liveposition.d.ts +5 -5
- package/src/model/liveposition.js +2 -2
- package/src/model/liverange.d.ts +6 -6
- package/src/model/liverange.js +2 -2
- package/src/model/markercollection.d.ts +5 -5
- package/src/model/markercollection.js +3 -3
- package/src/model/model.d.ts +16 -16
- package/src/model/model.js +20 -20
- package/src/model/node.d.ts +6 -6
- package/src/model/node.js +3 -3
- package/src/model/nodelist.d.ts +2 -2
- package/src/model/nodelist.js +2 -2
- package/src/model/operation/attributeoperation.d.ts +5 -5
- package/src/model/operation/attributeoperation.js +4 -4
- package/src/model/operation/detachoperation.d.ts +4 -4
- package/src/model/operation/detachoperation.js +4 -4
- package/src/model/operation/insertoperation.d.ts +7 -7
- package/src/model/operation/insertoperation.js +8 -8
- package/src/model/operation/markeroperation.d.ts +6 -6
- package/src/model/operation/markeroperation.js +3 -3
- package/src/model/operation/mergeoperation.d.ts +6 -6
- package/src/model/operation/mergeoperation.js +6 -6
- package/src/model/operation/moveoperation.d.ts +5 -5
- package/src/model/operation/moveoperation.js +5 -5
- package/src/model/operation/nooperation.d.ts +3 -3
- package/src/model/operation/nooperation.js +2 -2
- package/src/model/operation/operation.d.ts +4 -4
- package/src/model/operation/operation.js +1 -1
- package/src/model/operation/operationfactory.d.ts +3 -3
- package/src/model/operation/operationfactory.js +12 -12
- package/src/model/operation/renameoperation.d.ts +5 -5
- package/src/model/operation/renameoperation.js +4 -4
- package/src/model/operation/rootattributeoperation.d.ts +5 -5
- package/src/model/operation/rootattributeoperation.js +2 -2
- package/src/model/operation/rootoperation.d.ts +4 -4
- package/src/model/operation/rootoperation.js +2 -2
- package/src/model/operation/splitoperation.d.ts +6 -6
- package/src/model/operation/splitoperation.js +6 -6
- package/src/model/operation/transform.d.ts +3 -3
- package/src/model/operation/transform.js +13 -13
- package/src/model/operation/utils.d.ts +7 -7
- package/src/model/operation/utils.js +5 -5
- package/src/model/position.d.ts +15 -15
- package/src/model/position.js +4 -4
- package/src/model/range.d.ts +13 -13
- package/src/model/range.js +4 -4
- package/src/model/rootelement.d.ts +3 -3
- package/src/model/rootelement.js +2 -2
- package/src/model/schema.d.ts +35 -15
- package/src/model/schema.js +55 -10
- package/src/model/selection.d.ts +8 -8
- package/src/model/selection.js +5 -5
- package/src/model/text.d.ts +2 -2
- package/src/model/text.js +2 -2
- package/src/model/textproxy.d.ts +6 -6
- package/src/model/textproxy.js +2 -2
- package/src/model/treewalker.d.ts +4 -4
- package/src/model/treewalker.js +5 -5
- package/src/model/typecheckable.d.ts +14 -14
- package/src/model/typecheckable.js +1 -1
- package/src/model/utils/autoparagraphing.d.ts +5 -5
- package/src/model/utils/autoparagraphing.js +1 -1
- package/src/model/utils/deletecontent.d.ts +4 -4
- package/src/model/utils/deletecontent.js +4 -4
- package/src/model/utils/getselectedcontent.d.ts +5 -5
- package/src/model/utils/getselectedcontent.js +1 -1
- package/src/model/utils/insertcontent.d.ts +7 -7
- package/src/model/utils/insertcontent.js +7 -7
- package/src/model/utils/insertobject.d.ts +9 -6
- package/src/model/utils/insertobject.js +2 -6
- package/src/model/utils/modifyselection.d.ts +4 -4
- package/src/model/utils/modifyselection.js +5 -5
- package/src/model/utils/selection-post-fixer.d.ts +4 -4
- package/src/model/utils/selection-post-fixer.js +3 -3
- package/src/model/writer.d.ts +13 -13
- package/src/model/writer.js +18 -18
- package/src/view/attributeelement.d.ts +4 -4
- package/src/view/attributeelement.js +4 -3
- package/src/view/containerelement.d.ts +4 -4
- package/src/view/containerelement.js +2 -2
- package/src/view/datatransfer.d.ts +1 -1
- package/src/view/datatransfer.js +1 -1
- package/src/view/document.d.ts +5 -5
- package/src/view/document.js +3 -3
- package/src/view/documentfragment.d.ts +5 -5
- package/src/view/documentfragment.js +4 -4
- package/src/view/documentselection.d.ts +9 -9
- package/src/view/documentselection.js +3 -3
- package/src/view/domconverter.d.ts +14 -14
- package/src/view/domconverter.js +11 -11
- package/src/view/downcastwriter.d.ts +18 -18
- package/src/view/downcastwriter.js +12 -12
- package/src/view/editableelement.d.ts +5 -5
- package/src/view/editableelement.js +2 -2
- package/src/view/element.d.ts +6 -6
- package/src/view/element.js +6 -6
- package/src/view/elementdefinition.d.ts +1 -1
- package/src/view/elementdefinition.js +1 -1
- package/src/view/emptyelement.d.ts +5 -5
- package/src/view/emptyelement.js +3 -3
- package/src/view/filler.d.ts +2 -2
- package/src/view/filler.js +1 -1
- package/src/view/item.d.ts +3 -3
- package/src/view/item.js +1 -1
- package/src/view/matcher.d.ts +2 -2
- package/src/view/matcher.js +1 -1
- package/src/view/node.d.ts +6 -6
- package/src/view/node.js +3 -3
- package/src/view/observer/arrowkeysobserver.d.ts +5 -5
- package/src/view/observer/arrowkeysobserver.js +3 -3
- package/src/view/observer/bubblingemittermixin.d.ts +3 -3
- package/src/view/observer/bubblingemittermixin.js +2 -2
- package/src/view/observer/bubblingeventinfo.d.ts +4 -4
- package/src/view/observer/bubblingeventinfo.js +1 -1
- package/src/view/observer/clickobserver.d.ts +4 -4
- package/src/view/observer/clickobserver.js +2 -2
- package/src/view/observer/compositionobserver.d.ts +4 -4
- package/src/view/observer/compositionobserver.js +2 -2
- package/src/view/observer/domeventdata.d.ts +4 -4
- package/src/view/observer/domeventdata.js +1 -1
- package/src/view/observer/domeventobserver.d.ts +2 -2
- package/src/view/observer/domeventobserver.js +3 -3
- package/src/view/observer/fakeselectionobserver.d.ts +3 -3
- package/src/view/observer/fakeselectionobserver.js +3 -3
- package/src/view/observer/focusobserver.d.ts +4 -4
- package/src/view/observer/focusobserver.js +2 -2
- package/src/view/observer/inputobserver.d.ts +5 -5
- package/src/view/observer/inputobserver.js +3 -3
- package/src/view/observer/keyobserver.d.ts +3 -3
- package/src/view/observer/keyobserver.js +2 -2
- package/src/view/observer/mouseobserver.d.ts +3 -3
- package/src/view/observer/mouseobserver.js +2 -2
- package/src/view/observer/mutationobserver.d.ts +5 -5
- package/src/view/observer/mutationobserver.js +3 -3
- package/src/view/observer/observer.d.ts +3 -3
- package/src/view/observer/observer.js +1 -1
- package/src/view/observer/selectionobserver.d.ts +8 -8
- package/src/view/observer/selectionobserver.js +4 -4
- package/src/view/observer/tabobserver.d.ts +5 -5
- package/src/view/observer/tabobserver.js +3 -3
- package/src/view/placeholder.d.ts +5 -5
- package/src/view/placeholder.js +1 -1
- package/src/view/position.d.ts +8 -8
- package/src/view/position.js +5 -5
- package/src/view/range.d.ts +8 -8
- package/src/view/range.js +4 -4
- package/src/view/rawelement.d.ts +6 -6
- package/src/view/rawelement.js +3 -3
- package/src/view/renderer.d.ts +6 -6
- package/src/view/renderer.js +4 -4
- package/src/view/rooteditableelement.d.ts +3 -3
- package/src/view/rooteditableelement.js +2 -2
- package/src/view/selection.d.ts +9 -9
- package/src/view/selection.js +6 -6
- package/src/view/styles/background.d.ts +2 -2
- package/src/view/styles/background.js +2 -2
- package/src/view/styles/border.d.ts +2 -2
- package/src/view/styles/border.js +2 -2
- package/src/view/styles/margin.d.ts +2 -2
- package/src/view/styles/margin.js +2 -2
- package/src/view/styles/padding.d.ts +2 -2
- package/src/view/styles/padding.js +2 -2
- package/src/view/styles/utils.d.ts +2 -2
- package/src/view/styles/utils.js +1 -1
- package/src/view/stylesmap.d.ts +1 -1
- package/src/view/stylesmap.js +1 -1
- package/src/view/text.d.ts +3 -3
- package/src/view/text.js +2 -2
- package/src/view/textproxy.d.ts +7 -7
- package/src/view/textproxy.js +2 -2
- package/src/view/treewalker.d.ts +4 -4
- package/src/view/treewalker.js +5 -5
- package/src/view/typecheckable.d.ts +17 -17
- package/src/view/typecheckable.js +1 -1
- package/src/view/uielement.d.ts +7 -7
- package/src/view/uielement.js +3 -3
- package/src/view/upcastwriter.d.ts +10 -10
- package/src/view/upcastwriter.js +7 -7
- package/src/view/view.d.ts +22 -22
- package/src/view/view.js +19 -19
- package/theme/placeholder.css +1 -1
- package/theme/renderer.css +1 -1
- package/src/model/utils/findoptimalinsertionrange.d.ts +0 -32
- package/src/model/utils/findoptimalinsertionrange.js +0 -57
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import Mapper from '../conversion/mapper';
|
|
6
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
7
|
-
import UpcastDispatcher from '../conversion/upcastdispatcher';
|
|
8
|
-
import ViewDocumentFragment from '../view/documentfragment';
|
|
9
|
-
import ViewDocument from '../view/document';
|
|
10
|
-
import type ViewElement from '../view/element';
|
|
11
|
-
import type { StylesProcessor } from '../view/stylesmap';
|
|
12
|
-
import type { MatcherPattern } from '../view/matcher';
|
|
13
|
-
import type Model from '../model/model';
|
|
14
|
-
import type ModelElement from '../model/element';
|
|
15
|
-
import type ModelDocumentFragment from '../model/documentfragment';
|
|
16
|
-
import type { SchemaContextDefinition } from '../model/schema';
|
|
17
|
-
import type { BatchType } from '../model/batch';
|
|
18
|
-
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor';
|
|
19
|
-
import type DataProcessor from '../dataprocessor/dataprocessor';
|
|
5
|
+
import Mapper from '../conversion/mapper.js';
|
|
6
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher.js';
|
|
7
|
+
import UpcastDispatcher from '../conversion/upcastdispatcher.js';
|
|
8
|
+
import ViewDocumentFragment from '../view/documentfragment.js';
|
|
9
|
+
import ViewDocument from '../view/document.js';
|
|
10
|
+
import type ViewElement from '../view/element.js';
|
|
11
|
+
import type { StylesProcessor } from '../view/stylesmap.js';
|
|
12
|
+
import type { MatcherPattern } from '../view/matcher.js';
|
|
13
|
+
import type Model from '../model/model.js';
|
|
14
|
+
import type ModelElement from '../model/element.js';
|
|
15
|
+
import type ModelDocumentFragment from '../model/documentfragment.js';
|
|
16
|
+
import type { SchemaContextDefinition } from '../model/schema.js';
|
|
17
|
+
import type { BatchType } from '../model/batch.js';
|
|
18
|
+
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor.js';
|
|
19
|
+
import type DataProcessor from '../dataprocessor/dataprocessor.js';
|
|
20
20
|
declare const DataController_base: {
|
|
21
21
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
22
22
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/controller/datacontroller
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, EmitterMixin, ObservableMixin, logWarning } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import Mapper from '../conversion/mapper';
|
|
10
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
11
|
-
import { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers';
|
|
12
|
-
import UpcastDispatcher from '../conversion/upcastdispatcher';
|
|
13
|
-
import { convertText, convertToModelFragment } from '../conversion/upcasthelpers';
|
|
14
|
-
import ViewDocumentFragment from '../view/documentfragment';
|
|
15
|
-
import ViewDocument from '../view/document';
|
|
16
|
-
import ViewDowncastWriter from '../view/downcastwriter';
|
|
17
|
-
import ModelRange from '../model/range';
|
|
18
|
-
import { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing';
|
|
19
|
-
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor';
|
|
9
|
+
import Mapper from '../conversion/mapper.js';
|
|
10
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher.js';
|
|
11
|
+
import { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers.js';
|
|
12
|
+
import UpcastDispatcher from '../conversion/upcastdispatcher.js';
|
|
13
|
+
import { convertText, convertToModelFragment } from '../conversion/upcasthelpers.js';
|
|
14
|
+
import ViewDocumentFragment from '../view/documentfragment.js';
|
|
15
|
+
import ViewDocument from '../view/document.js';
|
|
16
|
+
import ViewDowncastWriter from '../view/downcastwriter.js';
|
|
17
|
+
import ModelRange from '../model/range.js';
|
|
18
|
+
import { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing.js';
|
|
19
|
+
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor.js';
|
|
20
20
|
/**
|
|
21
21
|
* Controller for the data pipeline. The data pipeline controls how data is retrieved from the document
|
|
22
22
|
* and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import View from '../view/view';
|
|
6
|
-
import Mapper from '../conversion/mapper';
|
|
7
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
8
|
-
import type { default as Model } from '../model/model';
|
|
9
|
-
import type ModelItem from '../model/item';
|
|
10
|
-
import type { Marker } from '../model/markercollection';
|
|
11
|
-
import type { StylesProcessor } from '../view/stylesmap';
|
|
5
|
+
import View from '../view/view.js';
|
|
6
|
+
import Mapper from '../conversion/mapper.js';
|
|
7
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher.js';
|
|
8
|
+
import type { default as Model } from '../model/model.js';
|
|
9
|
+
import type ModelItem from '../model/item.js';
|
|
10
|
+
import type { Marker } from '../model/markercollection.js';
|
|
11
|
+
import type { StylesProcessor } from '../view/stylesmap.js';
|
|
12
12
|
declare const EditingController_base: {
|
|
13
13
|
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
14
14
|
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/controller/editingcontroller
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, ObservableMixin, env } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import RootEditableElement from '../view/rooteditableelement';
|
|
10
|
-
import View from '../view/view';
|
|
11
|
-
import Mapper from '../conversion/mapper';
|
|
12
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
13
|
-
import { cleanSelection, convertCollapsedSelection, convertRangeSelection, insertAttributesAndChildren, insertText, remove } from '../conversion/downcasthelpers';
|
|
14
|
-
import { convertSelectionChange } from '../conversion/upcasthelpers';
|
|
15
|
-
import { tryFixingRange } from '../model/utils/selection-post-fixer';
|
|
9
|
+
import RootEditableElement from '../view/rooteditableelement.js';
|
|
10
|
+
import View from '../view/view.js';
|
|
11
|
+
import Mapper from '../conversion/mapper.js';
|
|
12
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher.js';
|
|
13
|
+
import { cleanSelection, convertCollapsedSelection, convertRangeSelection, insertAttributesAndChildren, insertText, remove } from '../conversion/downcasthelpers.js';
|
|
14
|
+
import { convertSelectionChange } from '../conversion/upcasthelpers.js';
|
|
15
|
+
import { tryFixingRange } from '../model/utils/selection-post-fixer.js';
|
|
16
16
|
// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );
|
|
17
17
|
/**
|
|
18
18
|
* A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/conversion
|
|
7
7
|
*/
|
|
8
8
|
import { type ArrayOrItem, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import UpcastHelpers from './upcasthelpers';
|
|
10
|
-
import DowncastHelpers, { type AttributeCreatorFunction, type AttributeDescriptor } from './downcasthelpers';
|
|
11
|
-
import type DowncastDispatcher from './downcastdispatcher';
|
|
12
|
-
import type UpcastDispatcher from './upcastdispatcher';
|
|
13
|
-
import type ElementDefinition from '../view/elementdefinition';
|
|
14
|
-
import type { MatcherPattern } from '../view/matcher';
|
|
9
|
+
import UpcastHelpers from './upcasthelpers.js';
|
|
10
|
+
import DowncastHelpers, { type AttributeCreatorFunction, type AttributeDescriptor } from './downcasthelpers.js';
|
|
11
|
+
import type DowncastDispatcher from './downcastdispatcher.js';
|
|
12
|
+
import type UpcastDispatcher from './upcastdispatcher.js';
|
|
13
|
+
import type ElementDefinition from '../view/elementdefinition.js';
|
|
14
|
+
import type { MatcherPattern } from '../view/matcher.js';
|
|
15
15
|
/**
|
|
16
16
|
* A utility class that helps add converters to upcast and downcast dispatchers.
|
|
17
17
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/conversion
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import UpcastHelpers from './upcasthelpers';
|
|
10
|
-
import DowncastHelpers from './downcasthelpers';
|
|
9
|
+
import UpcastHelpers from './upcasthelpers.js';
|
|
10
|
+
import DowncastHelpers from './downcasthelpers.js';
|
|
11
11
|
/**
|
|
12
12
|
* A utility class that helps add converters to upcast and downcast dispatchers.
|
|
13
13
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/downcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import Consumable from './modelconsumable';
|
|
9
|
-
import Range from '../model/range';
|
|
10
|
-
import type { default as Differ, DiffItem } from '../model/differ';
|
|
11
|
-
import type { default as MarkerCollection } from '../model/markercollection';
|
|
12
|
-
import type DocumentSelection from '../model/documentselection';
|
|
13
|
-
import type DowncastWriter from '../view/downcastwriter';
|
|
14
|
-
import type Element from '../model/element';
|
|
15
|
-
import type Item from '../model/item';
|
|
16
|
-
import type Mapper from './mapper';
|
|
17
|
-
import type Position from '../model/position';
|
|
18
|
-
import type Schema from '../model/schema';
|
|
19
|
-
import type Selection from '../model/selection';
|
|
20
|
-
import type ViewElement from '../view/element';
|
|
8
|
+
import Consumable from './modelconsumable.js';
|
|
9
|
+
import Range from '../model/range.js';
|
|
10
|
+
import type { default as Differ, DiffItem } from '../model/differ.js';
|
|
11
|
+
import type { default as MarkerCollection } from '../model/markercollection.js';
|
|
12
|
+
import type DocumentSelection from '../model/documentselection.js';
|
|
13
|
+
import type DowncastWriter from '../view/downcastwriter.js';
|
|
14
|
+
import type Element from '../model/element.js';
|
|
15
|
+
import type Item from '../model/item.js';
|
|
16
|
+
import type Mapper from './mapper.js';
|
|
17
|
+
import type Position from '../model/position.js';
|
|
18
|
+
import type Schema from '../model/schema.js';
|
|
19
|
+
import type Selection from '../model/selection.js';
|
|
20
|
+
import type ViewElement from '../view/element.js';
|
|
21
21
|
declare const DowncastDispatcher_base: {
|
|
22
22
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
23
23
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/downcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import Consumable from './modelconsumable';
|
|
9
|
-
import Range from '../model/range';
|
|
8
|
+
import Consumable from './modelconsumable.js';
|
|
9
|
+
import Range from '../model/range.js';
|
|
10
10
|
import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
11
11
|
/**
|
|
12
12
|
* The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting
|
|
@@ -151,6 +151,9 @@ export default class DowncastDispatcher extends EmitterMixin() {
|
|
|
151
151
|
this._convertAttribute(entry.range, entry.attributeKey, entry.attributeOldValue, entry.attributeNewValue, conversionApi);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
+
// Remove mappings for all removed view elements.
|
|
155
|
+
// Remove these mappings as soon as they are not needed (https://github.com/ckeditor/ckeditor5/issues/15411).
|
|
156
|
+
conversionApi.mapper.flushDeferredBindings();
|
|
154
157
|
for (const markerName of conversionApi.mapper.flushUnboundMarkerNames()) {
|
|
155
158
|
const markerRange = markers.get(markerName).getRange();
|
|
156
159
|
this._convertMarkerRemove(markerName, markerRange, conversionApi);
|
|
@@ -160,8 +163,6 @@ export default class DowncastDispatcher extends EmitterMixin() {
|
|
|
160
163
|
for (const change of differ.getMarkersToAdd()) {
|
|
161
164
|
this._convertMarkerAdd(change.name, change.range, conversionApi);
|
|
162
165
|
}
|
|
163
|
-
// Remove mappings for all removed view elements.
|
|
164
|
-
conversionApi.mapper.flushDeferredBindings();
|
|
165
166
|
// Verify if all insert consumables were consumed.
|
|
166
167
|
conversionApi.consumable.verifyAllConsumed('insert');
|
|
167
168
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module engine/conversion/downcasthelpers
|
|
9
9
|
*/
|
|
10
|
-
import ModelRange from '../model/range';
|
|
11
|
-
import ModelSelection from '../model/selection';
|
|
12
|
-
import ModelDocumentSelection from '../model/documentselection';
|
|
13
|
-
import ModelElement from '../model/element';
|
|
14
|
-
import ModelPosition from '../model/position';
|
|
15
|
-
import ViewAttributeElement from '../view/attributeelement';
|
|
16
|
-
import ConversionHelpers from './conversionhelpers';
|
|
17
|
-
import type { default as DowncastDispatcher, DowncastConversionApi } from './downcastdispatcher';
|
|
18
|
-
import type ModelConsumable from './modelconsumable';
|
|
19
|
-
import type ModelNode from '../model/node';
|
|
20
|
-
import type ModelItem from '../model/item';
|
|
21
|
-
import type ModelTextProxy from '../model/textproxy';
|
|
22
|
-
import type ModelText from '../model/text';
|
|
23
|
-
import type DowncastWriter from '../view/downcastwriter';
|
|
24
|
-
import type ElementDefinition from '../view/elementdefinition';
|
|
25
|
-
import type UIElement from '../view/uielement';
|
|
26
|
-
import type ViewElement from '../view/element';
|
|
10
|
+
import ModelRange from '../model/range.js';
|
|
11
|
+
import ModelSelection from '../model/selection.js';
|
|
12
|
+
import ModelDocumentSelection from '../model/documentselection.js';
|
|
13
|
+
import ModelElement from '../model/element.js';
|
|
14
|
+
import ModelPosition from '../model/position.js';
|
|
15
|
+
import ViewAttributeElement from '../view/attributeelement.js';
|
|
16
|
+
import ConversionHelpers from './conversionhelpers.js';
|
|
17
|
+
import type { default as DowncastDispatcher, DowncastConversionApi } from './downcastdispatcher.js';
|
|
18
|
+
import type ModelConsumable from './modelconsumable.js';
|
|
19
|
+
import type ModelNode from '../model/node.js';
|
|
20
|
+
import type ModelItem from '../model/item.js';
|
|
21
|
+
import type ModelTextProxy from '../model/textproxy.js';
|
|
22
|
+
import type ModelText from '../model/text.js';
|
|
23
|
+
import type DowncastWriter from '../view/downcastwriter.js';
|
|
24
|
+
import type ElementDefinition from '../view/elementdefinition.js';
|
|
25
|
+
import type UIElement from '../view/uielement.js';
|
|
26
|
+
import type ViewElement from '../view/element.js';
|
|
27
27
|
import { type EventInfo, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
28
28
|
/**
|
|
29
29
|
* Downcast conversion helper functions.
|
|
@@ -203,42 +203,6 @@ export default class DowncastHelpers extends ConversionHelpers<DowncastDispatche
|
|
|
203
203
|
* The children of the model's `<table>` element will be inserted into the `<tbody>` element.
|
|
204
204
|
* If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.
|
|
205
205
|
*
|
|
206
|
-
* An example converter that converts the following model structure:
|
|
207
|
-
*
|
|
208
|
-
* ```xml
|
|
209
|
-
* <wrappedParagraph>Some text.</wrappedParagraph>
|
|
210
|
-
* ```
|
|
211
|
-
*
|
|
212
|
-
* into this structure in the view:
|
|
213
|
-
*
|
|
214
|
-
* ```html
|
|
215
|
-
* <div class="wrapper">
|
|
216
|
-
* <p>Some text.</p>
|
|
217
|
-
* </div>
|
|
218
|
-
* ```
|
|
219
|
-
*
|
|
220
|
-
* would look like this:
|
|
221
|
-
*
|
|
222
|
-
* ```ts
|
|
223
|
-
* editor.conversion.for( 'downcast' ).elementToStructure( {
|
|
224
|
-
* model: 'wrappedParagraph',
|
|
225
|
-
* view: ( modelElement, conversionApi ) => {
|
|
226
|
-
* const { writer } = conversionApi;
|
|
227
|
-
*
|
|
228
|
-
* const wrapperViewElement = writer.createContainerElement( 'div', { class: 'wrapper' } );
|
|
229
|
-
* const paragraphViewElement = writer.createContainerElement( 'p' );
|
|
230
|
-
*
|
|
231
|
-
* writer.insert( writer.createPositionAt( wrapperViewElement, 0 ), paragraphViewElement );
|
|
232
|
-
* writer.insert( writer.createPositionAt( paragraphViewElement, 0 ), writer.createSlot() );
|
|
233
|
-
*
|
|
234
|
-
* return wrapperViewElement;
|
|
235
|
-
* }
|
|
236
|
-
* } );
|
|
237
|
-
* ```
|
|
238
|
-
*
|
|
239
|
-
* The `createSlot()` function can also take a callback that allows filtering which children of the model element
|
|
240
|
-
* should be converted into this slot.
|
|
241
|
-
*
|
|
242
206
|
* Imagine a table feature where for this model structure:
|
|
243
207
|
*
|
|
244
208
|
* ```xml
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module engine/conversion/downcasthelpers
|
|
9
9
|
*/
|
|
10
|
-
import ModelRange from '../model/range';
|
|
11
|
-
import ModelSelection from '../model/selection';
|
|
12
|
-
import ModelDocumentSelection from '../model/documentselection';
|
|
13
|
-
import ModelElement from '../model/element';
|
|
14
|
-
import ModelPosition from '../model/position';
|
|
15
|
-
import ViewAttributeElement from '../view/attributeelement';
|
|
16
|
-
import ConversionHelpers from './conversionhelpers';
|
|
10
|
+
import ModelRange from '../model/range.js';
|
|
11
|
+
import ModelSelection from '../model/selection.js';
|
|
12
|
+
import ModelDocumentSelection from '../model/documentselection.js';
|
|
13
|
+
import ModelElement from '../model/element.js';
|
|
14
|
+
import ModelPosition from '../model/position.js';
|
|
15
|
+
import ViewAttributeElement from '../view/attributeelement.js';
|
|
16
|
+
import ConversionHelpers from './conversionhelpers.js';
|
|
17
17
|
import { CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
|
|
18
18
|
import { cloneDeep } from 'lodash-es';
|
|
19
19
|
/**
|
|
@@ -188,42 +188,6 @@ export default class DowncastHelpers extends ConversionHelpers {
|
|
|
188
188
|
* The children of the model's `<table>` element will be inserted into the `<tbody>` element.
|
|
189
189
|
* If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.
|
|
190
190
|
*
|
|
191
|
-
* An example converter that converts the following model structure:
|
|
192
|
-
*
|
|
193
|
-
* ```xml
|
|
194
|
-
* <wrappedParagraph>Some text.</wrappedParagraph>
|
|
195
|
-
* ```
|
|
196
|
-
*
|
|
197
|
-
* into this structure in the view:
|
|
198
|
-
*
|
|
199
|
-
* ```html
|
|
200
|
-
* <div class="wrapper">
|
|
201
|
-
* <p>Some text.</p>
|
|
202
|
-
* </div>
|
|
203
|
-
* ```
|
|
204
|
-
*
|
|
205
|
-
* would look like this:
|
|
206
|
-
*
|
|
207
|
-
* ```ts
|
|
208
|
-
* editor.conversion.for( 'downcast' ).elementToStructure( {
|
|
209
|
-
* model: 'wrappedParagraph',
|
|
210
|
-
* view: ( modelElement, conversionApi ) => {
|
|
211
|
-
* const { writer } = conversionApi;
|
|
212
|
-
*
|
|
213
|
-
* const wrapperViewElement = writer.createContainerElement( 'div', { class: 'wrapper' } );
|
|
214
|
-
* const paragraphViewElement = writer.createContainerElement( 'p' );
|
|
215
|
-
*
|
|
216
|
-
* writer.insert( writer.createPositionAt( wrapperViewElement, 0 ), paragraphViewElement );
|
|
217
|
-
* writer.insert( writer.createPositionAt( paragraphViewElement, 0 ), writer.createSlot() );
|
|
218
|
-
*
|
|
219
|
-
* return wrapperViewElement;
|
|
220
|
-
* }
|
|
221
|
-
* } );
|
|
222
|
-
* ```
|
|
223
|
-
*
|
|
224
|
-
* The `createSlot()` function can also take a callback that allows filtering which children of the model element
|
|
225
|
-
* should be converted into this slot.
|
|
226
|
-
*
|
|
227
191
|
* Imagine a table feature where for this model structure:
|
|
228
192
|
*
|
|
229
193
|
* ```xml
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/mapper
|
|
7
7
|
*/
|
|
8
|
-
import ModelPosition from '../model/position';
|
|
9
|
-
import ModelRange from '../model/range';
|
|
10
|
-
import ViewPosition from '../view/position';
|
|
11
|
-
import ViewRange from '../view/range';
|
|
12
|
-
import type ViewDocumentFragment from '../view/documentfragment';
|
|
13
|
-
import type ViewElement from '../view/element';
|
|
14
|
-
import type ModelElement from '../model/element';
|
|
15
|
-
import type ModelDocumentFragment from '../model/documentfragment';
|
|
16
|
-
import type ViewNode from '../view/node';
|
|
8
|
+
import ModelPosition from '../model/position.js';
|
|
9
|
+
import ModelRange from '../model/range.js';
|
|
10
|
+
import ViewPosition from '../view/position.js';
|
|
11
|
+
import ViewRange from '../view/range.js';
|
|
12
|
+
import type ViewDocumentFragment from '../view/documentfragment.js';
|
|
13
|
+
import type ViewElement from '../view/element.js';
|
|
14
|
+
import type ModelElement from '../model/element.js';
|
|
15
|
+
import type ModelDocumentFragment from '../model/documentfragment.js';
|
|
16
|
+
import type ViewNode from '../view/node.js';
|
|
17
17
|
declare const Mapper_base: {
|
|
18
18
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
19
19
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
package/src/conversion/mapper.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/mapper
|
|
7
7
|
*/
|
|
8
|
-
import ModelPosition from '../model/position';
|
|
9
|
-
import ModelRange from '../model/range';
|
|
10
|
-
import ViewPosition from '../view/position';
|
|
11
|
-
import ViewRange from '../view/range';
|
|
12
|
-
import ViewText from '../view/text';
|
|
8
|
+
import ModelPosition from '../model/position.js';
|
|
9
|
+
import ModelRange from '../model/range.js';
|
|
10
|
+
import ViewPosition from '../view/position.js';
|
|
11
|
+
import ViewRange from '../view/range.js';
|
|
12
|
+
import ViewText from '../view/text.js';
|
|
13
13
|
import { CKEditorError, EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
14
14
|
/**
|
|
15
15
|
* Maps elements, positions and markers between the {@link module:engine/view/document~Document view} and
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/modelconsumable
|
|
7
7
|
*/
|
|
8
|
-
import TextProxy from '../model/textproxy';
|
|
9
|
-
import type Item from '../model/item';
|
|
10
|
-
import type Selection from '../model/selection';
|
|
11
|
-
import type DocumentSelection from '../model/documentselection';
|
|
12
|
-
import type Range from '../model/range';
|
|
8
|
+
import TextProxy from '../model/textproxy.js';
|
|
9
|
+
import type Item from '../model/item.js';
|
|
10
|
+
import type Selection from '../model/selection.js';
|
|
11
|
+
import type DocumentSelection from '../model/documentselection.js';
|
|
12
|
+
import type Range from '../model/range.js';
|
|
13
13
|
/**
|
|
14
14
|
* Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.
|
|
15
15
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/modelconsumable
|
|
7
7
|
*/
|
|
8
|
-
import TextProxy from '../model/textproxy';
|
|
8
|
+
import TextProxy from '../model/textproxy.js';
|
|
9
9
|
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
/**
|
|
11
11
|
* Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/upcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import ViewConsumable from './viewconsumable';
|
|
9
|
-
import ModelRange from '../model/range';
|
|
10
|
-
import ModelPosition from '../model/position';
|
|
11
|
-
import type ModelElement from '../model/element';
|
|
12
|
-
import type ModelNode from '../model/node';
|
|
13
|
-
import type ViewElement from '../view/element';
|
|
14
|
-
import type ViewText from '../view/text';
|
|
15
|
-
import type ViewDocumentFragment from '../view/documentfragment';
|
|
16
|
-
import type ModelDocumentFragment from '../model/documentfragment';
|
|
17
|
-
import type { default as Schema, SchemaContextDefinition } from '../model/schema';
|
|
18
|
-
import type ModelWriter from '../model/writer';
|
|
19
|
-
import type ViewItem from '../view/item';
|
|
8
|
+
import ViewConsumable from './viewconsumable.js';
|
|
9
|
+
import ModelRange from '../model/range.js';
|
|
10
|
+
import ModelPosition from '../model/position.js';
|
|
11
|
+
import type ModelElement from '../model/element.js';
|
|
12
|
+
import type ModelNode from '../model/node.js';
|
|
13
|
+
import type ViewElement from '../view/element.js';
|
|
14
|
+
import type ViewText from '../view/text.js';
|
|
15
|
+
import type ViewDocumentFragment from '../view/documentfragment.js';
|
|
16
|
+
import type ModelDocumentFragment from '../model/documentfragment.js';
|
|
17
|
+
import type { default as Schema, SchemaContextDefinition } from '../model/schema.js';
|
|
18
|
+
import type ModelWriter from '../model/writer.js';
|
|
19
|
+
import type ViewItem from '../view/item.js';
|
|
20
20
|
declare const UpcastDispatcher_base: {
|
|
21
21
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
22
22
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -220,7 +220,7 @@ export type UpcastViewCleanupEvent = {
|
|
|
220
220
|
name: 'viewCleanup';
|
|
221
221
|
args: [ViewElement | ViewDocumentFragment];
|
|
222
222
|
};
|
|
223
|
-
type UpcastEvent<TName extends string, TItem extends ViewItem | ViewDocumentFragment> = {
|
|
223
|
+
export type UpcastEvent<TName extends string, TItem extends ViewItem | ViewDocumentFragment> = {
|
|
224
224
|
name: TName | `${TName}:${string}`;
|
|
225
225
|
args: [data: UpcastConversionData<TItem>, conversionApi: UpcastConversionApi];
|
|
226
226
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/upcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import ViewConsumable from './viewconsumable';
|
|
9
|
-
import ModelRange from '../model/range';
|
|
10
|
-
import ModelPosition from '../model/position';
|
|
11
|
-
import { SchemaContext } from '../model/schema'; // eslint-disable-line no-duplicate-imports
|
|
12
|
-
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';
|
|
8
|
+
import ViewConsumable from './viewconsumable.js';
|
|
9
|
+
import ModelRange from '../model/range.js';
|
|
10
|
+
import ModelPosition from '../model/position.js';
|
|
11
|
+
import { SchemaContext } from '../model/schema.js'; // eslint-disable-line no-duplicate-imports
|
|
12
|
+
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing.js';
|
|
13
13
|
import { CKEditorError, EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
14
14
|
/**
|
|
15
15
|
* Upcast dispatcher is a central point of the view-to-model conversion, which is a process of
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { type ClassPatterns, type MatcherPattern, type PropertyPatterns } from '../view/matcher';
|
|
6
|
-
import ConversionHelpers from './conversionhelpers';
|
|
7
|
-
import type { default as UpcastDispatcher, UpcastConversionApi, UpcastConversionData } from './upcastdispatcher';
|
|
8
|
-
import type ModelElement from '../model/element';
|
|
9
|
-
import type { ViewDocumentFragment, ViewElement, ViewText } from '../index';
|
|
10
|
-
import type Mapper from './mapper';
|
|
11
|
-
import type Model from '../model/model';
|
|
12
|
-
import type ViewSelection from '../view/selection';
|
|
13
|
-
import type ViewDocumentSelection from '../view/documentselection';
|
|
5
|
+
import { type ClassPatterns, type MatcherPattern, type PropertyPatterns } from '../view/matcher.js';
|
|
6
|
+
import ConversionHelpers from './conversionhelpers.js';
|
|
7
|
+
import type { default as UpcastDispatcher, UpcastConversionApi, UpcastConversionData } from './upcastdispatcher.js';
|
|
8
|
+
import type ModelElement from '../model/element.js';
|
|
9
|
+
import type { ViewDocumentFragment, ViewElement, ViewText } from '../index.js';
|
|
10
|
+
import type Mapper from './mapper.js';
|
|
11
|
+
import type Model from '../model/model.js';
|
|
12
|
+
import type ViewSelection from '../view/selection.js';
|
|
13
|
+
import type ViewDocumentSelection from '../view/documentselection.js';
|
|
14
14
|
import { type EventInfo, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
15
15
|
/**
|
|
16
16
|
* Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import Matcher from '../view/matcher';
|
|
6
|
-
import ConversionHelpers from './conversionhelpers';
|
|
7
|
-
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';
|
|
5
|
+
import Matcher from '../view/matcher.js';
|
|
6
|
+
import ConversionHelpers from './conversionhelpers.js';
|
|
7
|
+
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing.js';
|
|
8
8
|
import { priorities } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import { cloneDeep } from 'lodash-es';
|
|
10
10
|
/**
|