From a31de902889c2df0983982d17e49b2b5be50036b Mon Sep 17 00:00:00 2001 From: Karl Heitmann Date: Mon, 27 Oct 2025 18:13:14 -0300 Subject: [PATCH 1/2] Fractal refactor editor/core/text-editor Converts text-editor.tsx into a folder with an index file to orchestrate all TextEditor related components living under the new folder named text-editor/ --- .../editor/core/{ => text-editor}/editor-layers.tsx | 0 .../editor/core/{text-editor.tsx => text-editor/index.tsx} | 6 +++--- .../editor/core/{ => text-editor}/keyboard-shortcuts.ts | 0 .../editor/core/{ => text-editor}/line-based-editor.tsx | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/components/editor/core/{ => text-editor}/editor-layers.tsx (100%) rename src/components/editor/core/{text-editor.tsx => text-editor/index.tsx} (99%) rename src/components/editor/core/{ => text-editor}/keyboard-shortcuts.ts (100%) rename src/components/editor/core/{ => text-editor}/line-based-editor.tsx (94%) diff --git a/src/components/editor/core/editor-layers.tsx b/src/components/editor/core/text-editor/editor-layers.tsx similarity index 100% rename from src/components/editor/core/editor-layers.tsx rename to src/components/editor/core/text-editor/editor-layers.tsx diff --git a/src/components/editor/core/text-editor.tsx b/src/components/editor/core/text-editor/index.tsx similarity index 99% rename from src/components/editor/core/text-editor.tsx rename to src/components/editor/core/text-editor/index.tsx index 421fc526..803f614c 100644 --- a/src/components/editor/core/text-editor.tsx +++ b/src/components/editor/core/text-editor/index.tsx @@ -35,9 +35,9 @@ import { useLspStore } from "@/stores/lsp-store"; import { useSearchResultsStore } from "@/stores/search-results-store"; import type { Position } from "@/types/editor-types"; import { calculateCursorPosition, calculateOffsetFromPosition } from "@/utils/editor-position"; -import { CompletionDropdown } from "../overlays/completion-dropdown"; -import EditorContextMenu from "../overlays/editor-context-menu"; -import { InlineEditToolbar } from "../overlays/inline-edit-toolbar"; +import { CompletionDropdown } from "../../overlays/completion-dropdown"; +import EditorContextMenu from "../../overlays/editor-context-menu"; +import { InlineEditToolbar } from "../../overlays/inline-edit-toolbar"; import { handleKeyboardShortcuts } from "./keyboard-shortcuts"; import { LineBasedEditor } from "./line-based-editor"; diff --git a/src/components/editor/core/keyboard-shortcuts.ts b/src/components/editor/core/text-editor/keyboard-shortcuts.ts similarity index 100% rename from src/components/editor/core/keyboard-shortcuts.ts rename to src/components/editor/core/text-editor/keyboard-shortcuts.ts diff --git a/src/components/editor/core/line-based-editor.tsx b/src/components/editor/core/text-editor/line-based-editor.tsx similarity index 94% rename from src/components/editor/core/line-based-editor.tsx rename to src/components/editor/core/text-editor/line-based-editor.tsx index 0292cd6a..306d4f38 100644 --- a/src/components/editor/core/line-based-editor.tsx +++ b/src/components/editor/core/text-editor/line-based-editor.tsx @@ -5,9 +5,9 @@ import { useEditorLayout } from "@/hooks/use-editor-layout"; import { useEditorLayoutStore } from "@/stores/editor-layout-store"; import { useEditorSettingsStore } from "@/stores/editor-settings-store"; import type { Position } from "@/types/editor-types"; -import { Cursor } from "../overlays/cursor"; -import { DecorationLayer } from "../overlays/decoration-layer"; -import { EditorViewport } from "../rendering/editor-viewport"; +import { Cursor } from "../../overlays/cursor"; +import { DecorationLayer } from "../../overlays/decoration-layer"; +import { EditorViewport } from "../../rendering/editor-viewport"; import { EditorLayer, EditorLayers } from "./editor-layers"; import "@/styles/editor-line-based.css"; import "@/styles/token-theme.css"; From 5cc0140f2473d7dfdf7086bdd5c08fa333eac4cc Mon Sep 17 00:00:00 2001 From: Karl Heitmann Date: Mon, 27 Oct 2025 18:21:40 -0300 Subject: [PATCH 2/2] Fractal refactor editor/core/text-editor/line-based-editor.tsx --- .../text-editor/{ => line-based-editor}/editor-layers.tsx | 0 .../{line-based-editor.tsx => line-based-editor/index.tsx} | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/components/editor/core/text-editor/{ => line-based-editor}/editor-layers.tsx (100%) rename src/components/editor/core/text-editor/{line-based-editor.tsx => line-based-editor/index.tsx} (94%) diff --git a/src/components/editor/core/text-editor/editor-layers.tsx b/src/components/editor/core/text-editor/line-based-editor/editor-layers.tsx similarity index 100% rename from src/components/editor/core/text-editor/editor-layers.tsx rename to src/components/editor/core/text-editor/line-based-editor/editor-layers.tsx diff --git a/src/components/editor/core/text-editor/line-based-editor.tsx b/src/components/editor/core/text-editor/line-based-editor/index.tsx similarity index 94% rename from src/components/editor/core/text-editor/line-based-editor.tsx rename to src/components/editor/core/text-editor/line-based-editor/index.tsx index 306d4f38..28a1dc92 100644 --- a/src/components/editor/core/text-editor/line-based-editor.tsx +++ b/src/components/editor/core/text-editor/line-based-editor/index.tsx @@ -5,9 +5,9 @@ import { useEditorLayout } from "@/hooks/use-editor-layout"; import { useEditorLayoutStore } from "@/stores/editor-layout-store"; import { useEditorSettingsStore } from "@/stores/editor-settings-store"; import type { Position } from "@/types/editor-types"; -import { Cursor } from "../../overlays/cursor"; -import { DecorationLayer } from "../../overlays/decoration-layer"; -import { EditorViewport } from "../../rendering/editor-viewport"; +import { Cursor } from "../../../overlays/cursor"; +import { DecorationLayer } from "../../../overlays/decoration-layer"; +import { EditorViewport } from "../../../rendering/editor-viewport"; import { EditorLayer, EditorLayers } from "./editor-layers"; import "@/styles/editor-line-based.css"; import "@/styles/token-theme.css";