Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor: use traditional imports
Elian Doran22ad52c11d02
diff --git a/src/footnote-editing/auto-formatting.ts b/src/footnote-editing/auto-formatting.tsindex 705875498f..43050c2df7 100644--- a/src/footnote-editing/auto-formatting.ts+++ b/src/footnote-editing/auto-formatting.ts@@ -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';diff --git a/src/footnote-editing/converters.ts b/src/footnote-editing/converters.tsindex 8ba3e0560e..67dc0b13c9 100644--- a/src/footnote-editing/converters.ts+++ b/src/footnote-editing/converters.ts@@ -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';diff --git a/src/footnote-editing/footnote-editing.ts b/src/footnote-editing/footnote-editing.tsindex 402f634590..e13a86a564 100644--- a/src/footnote-editing/footnote-editing.ts+++ b/src/footnote-editing/footnote-editing.ts@@ -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';diff --git a/src/footnote-editing/schema.ts b/src/footnote-editing/schema.tsindex 5ce246dfd4..0d8dc754a2 100644--- a/src/footnote-editing/schema.ts+++ b/src/footnote-editing/schema.ts@@ -1,4 +1,4 @@-import type { Schema } from 'ckeditor5';+import type { Schema } from 'ckeditor5/src/engine.js';// eslint-disable-next-line no-restricted-importsimport { ATTRIBUTES, ELEMENTS } from '../constants.js';diff --git a/src/footnote-ui.ts b/src/footnote-ui.tsindex 3cbb689de7..514a07081d 100644--- a/src/footnote-ui.ts+++ b/src/footnote-ui.ts@@ -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,diff --git a/src/footnotes.ts b/src/footnotes.tsindex 9db4c7975d..9ca9d075eb 100644--- a/src/footnotes.ts+++ b/src/footnotes.ts@@ -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';diff --git a/src/insert-footnote-command.ts b/src/insert-footnote-command.tsindex 802ccda047..bb025815f8 100644--- a/src/insert-footnote-command.ts+++ b/src/insert-footnote-command.ts@@ -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';diff --git a/src/utils.ts b/src/utils.tsindex 5121b8b5cd..ede2b24d94 100644--- a/src/utils.ts+++ b/src/utils.ts@@ -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.