diff --git a/frontend/text-editor/editor/TextEditor.js b/frontend/text-editor/editor/TextEditor.js index 363cabcb5..8ea072a29 100644 --- a/frontend/text-editor/editor/TextEditor.js +++ b/frontend/text-editor/editor/TextEditor.js @@ -11,7 +11,7 @@ import commands from "./commands/index.js"; import ChangeController from './controllers/ChangeController.js'; import SelectionController from './controllers/SelectionController.js'; import { createSelectionImposterFromClientRects } from './selection/Imposter.js'; -import { addEventListeners, removeEventListeners } from "./Event"; +import { addEventListeners, removeEventListeners } from "./Event.js"; import { createRoot, createEmptyRoot } from './content/dom/Root.js'; import { createParagraph, fixParagraph, getParagraph } from './content/dom/Paragraph.js'; import { createEmptyInline, createInline } from './content/dom/Inline.js'; diff --git a/frontend/text-editor/editor/clipboard/paste.js b/frontend/text-editor/editor/clipboard/paste.js index cff9b4eee..94a6cc161 100644 --- a/frontend/text-editor/editor/clipboard/paste.js +++ b/frontend/text-editor/editor/clipboard/paste.js @@ -6,7 +6,7 @@ * Copyright (c) KALEIDOS INC */ -import { mapContentFragmentFromHTML, mapContentFragmentFromString } from '~/editor/content/dom/Content'; +import { mapContentFragmentFromHTML, mapContentFragmentFromString } from '../content/dom/Content.js'; /** * When the user pastes some HTML, what we do is generate diff --git a/frontend/text-editor/editor/content/dom/Content.js b/frontend/text-editor/editor/content/dom/Content.js index 62ff67310..0a2ba7ff0 100644 --- a/frontend/text-editor/editor/content/dom/Content.js +++ b/frontend/text-editor/editor/content/dom/Content.js @@ -6,13 +6,13 @@ * Copyright (c) KALEIDOS INC */ -import { createInline } from "./Inline"; +import { createInline } from "./Inline.js"; import { createEmptyParagraph, createParagraph, isLikeParagraph, -} from "./Paragraph"; -import { isDisplayBlock, normalizeStyles } from "./Style"; +} from "./Paragraph.js"; +import { isDisplayBlock, normalizeStyles } from "./Style.js"; /** * Maps any HTML into a valid content DOM element. diff --git a/frontend/text-editor/editor/content/dom/Content.test.js b/frontend/text-editor/editor/content/dom/Content.test.js index 4a5701e50..e27d0968e 100644 --- a/frontend/text-editor/editor/content/dom/Content.test.js +++ b/frontend/text-editor/editor/content/dom/Content.test.js @@ -1,5 +1,5 @@ import { describe, test, expect } from 'vitest'; -import { mapContentFragmentFromHTML, mapContentFragmentFromString } from './Content'; +import { mapContentFragmentFromHTML, mapContentFragmentFromString } from './Content.js'; /* @vitest-environment jsdom */ describe('Content', () => { diff --git a/frontend/text-editor/editor/content/dom/Element.js b/frontend/text-editor/editor/content/dom/Element.js index bdd73af01..d11880146 100644 --- a/frontend/text-editor/editor/content/dom/Element.js +++ b/frontend/text-editor/editor/content/dom/Element.js @@ -6,7 +6,7 @@ * Copyright (c) KALEIDOS INC */ -import { setStyles } from "./Style"; +import { setStyles } from "./Style.js"; /** * @typedef {Object} CreateElementOptions diff --git a/frontend/text-editor/editor/content/dom/Element.test.js b/frontend/text-editor/editor/content/dom/Element.test.js index ac8f49dae..4e91dc428 100644 --- a/frontend/text-editor/editor/content/dom/Element.test.js +++ b/frontend/text-editor/editor/content/dom/Element.test.js @@ -1,5 +1,5 @@ import { describe, test, expect } from "vitest"; -import { createElement, isElement, createRandomId, isOffsetAtStart, isOffsetAtEnd } from "./Element"; +import { createElement, isElement, createRandomId, isOffsetAtStart, isOffsetAtEnd } from "./Element.js"; /* @vitest-environment jsdom */ describe("Element", () => { diff --git a/frontend/text-editor/editor/content/dom/Inline.js b/frontend/text-editor/editor/content/dom/Inline.js index 9a510ed58..fbef9d2d0 100644 --- a/frontend/text-editor/editor/content/dom/Inline.js +++ b/frontend/text-editor/editor/content/dom/Inline.js @@ -11,10 +11,10 @@ import { isElement, isOffsetAtStart, isOffsetAtEnd, -} from "./Element"; -import { createLineBreak, isLineBreak } from "./LineBreak"; -import { setStyles, mergeStyles } from "./Style"; -import { createRandomId } from "./Element"; +} from "./Element.js"; +import { createLineBreak, isLineBreak } from "./LineBreak.js"; +import { setStyles, mergeStyles } from "./Style.js"; +import { createRandomId } from "./Element.js"; export const TAG = "SPAN"; export const TYPE = "inline"; diff --git a/frontend/text-editor/editor/content/dom/Inline.test.js b/frontend/text-editor/editor/content/dom/Inline.test.js index f008c0752..98272345a 100644 --- a/frontend/text-editor/editor/content/dom/Inline.test.js +++ b/frontend/text-editor/editor/content/dom/Inline.test.js @@ -1,6 +1,6 @@ import { describe, test, expect } from "vitest"; -import { createEmptyInline, createInline, getInline, getInlineLength, isInline, isInlineEnd, isInlineStart, isLikeInline, splitInline, TAG, TYPE } from "./Inline"; -import { createLineBreak } from "./LineBreak"; +import { createEmptyInline, createInline, getInline, getInlineLength, isInline, isInlineEnd, isInlineStart, isLikeInline, splitInline, TAG, TYPE } from "./Inline.js"; +import { createLineBreak } from "./LineBreak.js"; /* @vitest-environment jsdom */ describe("Inline", () => { diff --git a/frontend/text-editor/editor/content/dom/LineBreak.test.js b/frontend/text-editor/editor/content/dom/LineBreak.test.js index f599e41e3..f9faeeeb5 100644 --- a/frontend/text-editor/editor/content/dom/LineBreak.test.js +++ b/frontend/text-editor/editor/content/dom/LineBreak.test.js @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { createLineBreak } from './LineBreak'; +import { createLineBreak } from './LineBreak.js'; /* @vitest-environment jsdom */ describe('LineBreak', () => { diff --git a/frontend/text-editor/editor/content/dom/Paragraph.js b/frontend/text-editor/editor/content/dom/Paragraph.js index 79ef05fbc..09ce69ead 100644 --- a/frontend/text-editor/editor/content/dom/Paragraph.js +++ b/frontend/text-editor/editor/content/dom/Paragraph.js @@ -11,7 +11,7 @@ import { isElement, isOffsetAtStart, isOffsetAtEnd, -} from "./Element"; +} from "./Element.js"; import { isInline, isLikeInline, @@ -21,11 +21,11 @@ import { createEmptyInline, isInlineEnd, splitInline, -} from "./Inline"; -import { createLineBreak, isLineBreak } from "./LineBreak"; -import { setStyles } from "./Style"; -import { createRandomId } from "./Element"; -import { isEmptyTextNode, isTextNode } from './TextNode'; +} from "./Inline.js"; +import { createLineBreak, isLineBreak } from "./LineBreak.js"; +import { setStyles } from "./Style.js"; +import { createRandomId } from "./Element.js"; +import { isEmptyTextNode, isTextNode } from './TextNode.js'; export const TAG = "DIV"; export const TYPE = "paragraph"; diff --git a/frontend/text-editor/editor/content/dom/Paragraph.test.js b/frontend/text-editor/editor/content/dom/Paragraph.test.js index 1df800dd0..5caadc0b0 100644 --- a/frontend/text-editor/editor/content/dom/Paragraph.test.js +++ b/frontend/text-editor/editor/content/dom/Paragraph.test.js @@ -12,8 +12,8 @@ import { splitParagraph, splitParagraphAtNode, isEmptyParagraph, -} from "./Paragraph"; -import { createInline, isInline } from "./Inline"; +} from "./Paragraph.js"; +import { createInline, isInline } from "./Inline.js"; /* @vitest-environment jsdom */ describe("Paragraph", () => { diff --git a/frontend/text-editor/editor/content/dom/Root.js b/frontend/text-editor/editor/content/dom/Root.js index a01a11bf4..4eeec2070 100644 --- a/frontend/text-editor/editor/content/dom/Root.js +++ b/frontend/text-editor/editor/content/dom/Root.js @@ -6,10 +6,10 @@ * Copyright (c) KALEIDOS INC */ -import { createElement, isElement } from "./Element"; -import { createEmptyParagraph, isParagraph } from "./Paragraph"; -import { setStyles } from "./Style"; -import { createRandomId } from "./Element"; +import { createElement, isElement } from "./Element.js"; +import { createEmptyParagraph, isParagraph } from "./Paragraph.js"; +import { setStyles } from "./Style.js"; +import { createRandomId } from "./Element.js"; export const TAG = "DIV"; export const TYPE = "root"; diff --git a/frontend/text-editor/editor/content/dom/Root.test.js b/frontend/text-editor/editor/content/dom/Root.test.js index fa9d919b8..a2d048bef 100644 --- a/frontend/text-editor/editor/content/dom/Root.test.js +++ b/frontend/text-editor/editor/content/dom/Root.test.js @@ -1,5 +1,5 @@ import { describe, test, expect } from "vitest"; -import { createEmptyRoot, createRoot, setRootStyles, TAG, TYPE } from './Root' +import { createEmptyRoot, createRoot, setRootStyles, TAG, TYPE } from './Root.js' /* @vitest-environment jsdom */ describe("Root", () => { diff --git a/frontend/text-editor/editor/content/dom/Style.js b/frontend/text-editor/editor/content/dom/Style.js index 1f61c10a3..6b563584a 100644 --- a/frontend/text-editor/editor/content/dom/Style.js +++ b/frontend/text-editor/editor/content/dom/Style.js @@ -6,7 +6,7 @@ * Copyright (c) KALEIDOS INC */ -import { getFills } from "./Color"; +import { getFills } from "./Color.js"; const DEFAULT_FONT_SIZE = "16px"; const DEFAULT_LINE_HEIGHT = "1.2"; diff --git a/frontend/text-editor/editor/content/dom/Style.test.js b/frontend/text-editor/editor/content/dom/Style.test.js index fc33a5e49..0c1e14735 100644 --- a/frontend/text-editor/editor/content/dom/Style.test.js +++ b/frontend/text-editor/editor/content/dom/Style.test.js @@ -1,5 +1,5 @@ import { describe, test, expect, vi } from "vitest"; -import { getStyles, isDisplayBlock, isDisplayInline, setStyle, setStyles } from "./Style"; +import { getStyles, isDisplayBlock, isDisplayInline, setStyle, setStyles } from "./Style.js"; /* @vitest-environment jsdom */ describe("Style", () => { diff --git a/frontend/text-editor/editor/content/dom/TextNode.js b/frontend/text-editor/editor/content/dom/TextNode.js index d7a21f858..fff86dbdf 100644 --- a/frontend/text-editor/editor/content/dom/TextNode.js +++ b/frontend/text-editor/editor/content/dom/TextNode.js @@ -6,10 +6,10 @@ * Copyright (c) KALEIDOS INC */ -import { isInline } from "./Inline"; -import { isLineBreak } from "./LineBreak"; -import { isParagraph } from "./Paragraph"; -import { isRoot } from "./Root"; +import { isInline } from "./Inline.js"; +import { isLineBreak } from "./LineBreak.js"; +import { isParagraph } from "./Paragraph.js"; +import { isRoot } from "./Root.js"; /** * Returns true if the node is "like" diff --git a/frontend/text-editor/editor/content/dom/TextNode.test.js b/frontend/text-editor/editor/content/dom/TextNode.test.js index fe23e347a..d97e1395f 100644 --- a/frontend/text-editor/editor/content/dom/TextNode.test.js +++ b/frontend/text-editor/editor/content/dom/TextNode.test.js @@ -1,6 +1,6 @@ import { describe, test, expect } from 'vitest'; -import { isTextNode, getTextNodeLength } from './TextNode'; -import { createLineBreak } from './LineBreak'; +import { isTextNode, getTextNodeLength } from './TextNode.js'; +import { createLineBreak } from './LineBreak.js'; /* @vitest-environment jsdom */ describe("TextNode", () => { diff --git a/frontend/text-editor/editor/content/dom/TextNodeIterator.test.js b/frontend/text-editor/editor/content/dom/TextNodeIterator.test.js index 77759e0af..811ffc3dc 100644 --- a/frontend/text-editor/editor/content/dom/TextNodeIterator.test.js +++ b/frontend/text-editor/editor/content/dom/TextNodeIterator.test.js @@ -1,9 +1,9 @@ import { describe, test, expect } from "vitest"; -import TextNodeIterator from "./TextNodeIterator"; -import { createInline } from "./Inline"; -import { createParagraph } from "./Paragraph"; -import { createRoot } from "./Root"; -import { createLineBreak } from "./LineBreak"; +import TextNodeIterator from "./TextNodeIterator.js"; +import { createInline } from "./Inline.js"; +import { createParagraph } from "./Paragraph.js"; +import { createRoot } from "./Root.js"; +import { createLineBreak } from "./LineBreak.js"; /* @vitest-environment jsdom */ describe("TextNodeIterator", () => { diff --git a/frontend/text-editor/editor/controllers/SelectionController.js b/frontend/text-editor/editor/controllers/SelectionController.js index db1548f72..1c9681d81 100644 --- a/frontend/text-editor/editor/controllers/SelectionController.js +++ b/frontend/text-editor/editor/controllers/SelectionController.js @@ -6,7 +6,7 @@ * Copyright (c) KALEIDOS INC */ -import { createLineBreak, isLineBreak } from "~/editor/content/dom/LineBreak"; +import { createLineBreak, isLineBreak } from "../content/dom/LineBreak.js"; import { createInline, createInlineFrom, @@ -19,7 +19,7 @@ import { mergeInlines, splitInline, createEmptyInline, -} from "~/editor/content/dom/Inline"; +} from "../content/dom/Inline.js"; import { createEmptyParagraph, isEmptyParagraph, @@ -32,21 +32,21 @@ import { splitParagraphAtNode, mergeParagraphs, fixParagraph, -} from "~/editor/content/dom/Paragraph"; +} from "../content/dom/Paragraph.js"; import { removeBackward, removeForward, replaceWith, insertInto, removeSlice, -} from "~/editor/content/Text"; -import { getTextNodeLength, getClosestTextNode, isTextNode } from "~/editor/content/dom/TextNode"; -import TextNodeIterator from "~/editor/content/dom/TextNodeIterator"; -import TextEditor from "~/editor/TextEditor"; -import CommandMutations from "~/editor/commands/CommandMutations"; -import { setRootStyles } from "~/editor/content/dom/Root"; -import { SelectionDirection } from "./SelectionDirection"; -import SafeGuard from './SafeGuard'; +} from "../content/Text.js"; +import { getTextNodeLength, getClosestTextNode, isTextNode } from "../content/dom/TextNode.js"; +import TextNodeIterator from "../content/dom/TextNodeIterator.js"; +import TextEditor from "../TextEditor.js"; +import CommandMutations from "../commands/CommandMutations.js"; +import { setRootStyles } from "../content/dom/Root.js"; +import { SelectionDirection } from "./SelectionDirection.js"; +import SafeGuard from "./SafeGuard.js"; const SAFE_GUARD = true; const SAFE_GUARD_TIME = true;