From 395e9b2228cac4b72dce0ffc9f3d4c8a8f2dc243 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 12 Jul 2025 19:29:51 +0300 Subject: [PATCH] chore(ckeditor5-admonition): fix references: DocumentFragment -> ViewDocumentFragment --- packages/ckeditor5-admonition/src/admonitioncommand.ts | 6 +++--- packages/ckeditor5-math/src/utils.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ckeditor5-admonition/src/admonitioncommand.ts b/packages/ckeditor5-admonition/src/admonitioncommand.ts index 27381cd52..000224519 100644 --- a/packages/ckeditor5-admonition/src/admonitioncommand.ts +++ b/packages/ckeditor5-admonition/src/admonitioncommand.ts @@ -8,7 +8,7 @@ */ import { Command, first } from 'ckeditor5'; -import type { DocumentFragment, Element, Position, Range, Schema, Writer } from 'ckeditor5'; +import type { ViewDocumentFragment, Element, Position, Range, Schema, Writer } from 'ckeditor5'; /** * The block quote command plugin. @@ -191,7 +191,7 @@ export default class AdmonitionCommand extends Command { */ private _applyQuote( writer: Writer, blocks: Array, type?: AdmonitionType): void { this._lastType = type; - const quotesToMerge: Array = []; + const quotesToMerge: Array = []; // Quote all groups of block. Iterate in the reverse order to not break following ranges. getRangesOfBlockGroups( writer, blocks ).reverse().forEach( groupRange => { @@ -228,7 +228,7 @@ export default class AdmonitionCommand extends Command { } } -function findQuote( elementOrPosition: Element | Position ): Element | DocumentFragment | null { +function findQuote( elementOrPosition: Element | Position ): Element | ViewDocumentFragment | null { return elementOrPosition.parent!.name == 'aside' ? elementOrPosition.parent : null; } diff --git a/packages/ckeditor5-math/src/utils.ts b/packages/ckeditor5-math/src/utils.ts index 893bb58de..05df08fce 100644 --- a/packages/ckeditor5-math/src/utils.ts +++ b/packages/ckeditor5-math/src/utils.ts @@ -1,9 +1,9 @@ -import type { Editor, ModelElement, DocumentSelection, PositioningFunction } from 'ckeditor5'; +import type { Editor, ModelElement, ModelDocumentSelection, PositioningFunction } from 'ckeditor5'; import { BalloonPanelView, CKEditorError } from 'ckeditor5'; import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js'; export function getSelectedMathModelWidget( - selection: DocumentSelection + selection: ModelDocumentSelection ): null | ModelElement { const selectedElement = selection.getSelectedElement();