refactor: use traditional imports

This commit is contained in:
Elian Doran 2025-01-06 18:59:52 +02:00
parent 929ec25a0d
commit 22ad52c11d
No known key found for this signature in database
8 changed files with 23 additions and 25 deletions

View File

@ -1,4 +1,6 @@
import { inlineAutoformatEditing, Text, TextProxy, type Autoformat, type Editor, type Element, type Range } from 'ckeditor5';
import { type Editor } from 'ckeditor5/src/core.js';
import { Text, TextProxy, type Element, type Range } from 'ckeditor5/src/engine.js';
import { type Autoformat, inlineAutoformatEditing } from "@ckeditor/ckeditor5-autoformat";
import { COMMANDS, ELEMENTS } from '../constants.js';
import { modelQueryElement, modelQueryElementsAll } from '../utils.js';

View File

@ -1,10 +1,6 @@
import {
type DowncastConversionApi,
type Editor,
type ViewContainerElement,
Element,
toWidget,
toWidgetEditable } from 'ckeditor5';
import { type Editor, } from 'ckeditor5/src/core.js';
import { type DowncastConversionApi, type ViewContainerElement, Element } from "ckeditor5/src/engine.js";
import { toWidget, toWidgetEditable } from 'ckeditor5/src/widget.js';
import { ATTRIBUTES, CLASSES, ELEMENTS } from '../constants.js';
import { viewQueryElement } from '../utils.js';

View File

@ -5,15 +5,18 @@
*/
import {
Autoformat,
Element,
Plugin,
viewToModelPositionOutsideModelElement,
Widget,
type Batch,
type RootElement,
type Writer
} from 'ckeditor5';
} from 'ckeditor5/src/engine.js';
import { Autoformat } from "@ckeditor/ckeditor5-autoformat";
import { Plugin } from "ckeditor5/src/core.js";
import { Widget } from 'ckeditor5/src/widget.js';
import { viewToModelPositionOutsideModelElement } from '@ckeditor/ckeditor5-widget';
import { type ViewElement } from "ckeditor5/src/engine.js";
import '../footnote.css';

View File

@ -1,4 +1,4 @@
import type { Schema } from 'ckeditor5';
import type { Schema } from 'ckeditor5/src/engine.js';
// eslint-disable-next-line no-restricted-imports
import { ATTRIBUTES, ELEMENTS } from '../constants.js';

View File

@ -1,11 +1,6 @@
import {
addListToDropdown,
Collection,
createDropdown,
Plugin,
ViewModel,
type ListDropdownItemDefinition
} from 'ckeditor5';
import { Plugin } from 'ckeditor5/src/core.js';
import { addListToDropdown, createDropdown, ViewModel, type ListDropdownItemDefinition } from '@ckeditor/ckeditor5-ui';
import { Collection } from 'ckeditor5/src/utils.js';
import {
ATTRIBUTES,

View File

@ -1,4 +1,4 @@
import { Plugin } from 'ckeditor5';
import { Plugin } from 'ckeditor5/src/core.js';
import FootnoteEditing from './footnote-editing/footnote-editing.js';
import FootnoteUI from './footnote-ui.js';

View File

@ -1,4 +1,5 @@
import { Command, type Element, type RootElement, type Writer } from 'ckeditor5';
import { Command } from 'ckeditor5/src/core.js';
import { type Element, type RootElement, type Writer } from "ckeditor5/src/engine.js";
import { ATTRIBUTES, ELEMENTS } from './constants.js';
import { modelQueryElement } from './utils.js';

View File

@ -1,4 +1,5 @@
import { type Editor, Element, Text, TextProxy, ViewElement } from 'ckeditor5';
import { type Editor } from 'ckeditor5/src/core.js';
import { Element, Text, TextProxy, ViewElement } from 'ckeditor5/src/engine.js';
// There's ample DRY violation in this file; type checking
// polymorphism without full typescript is just incredibly finicky.