Replace Monaco with one CodeMirror editor and nest list items with Tab
Phase 4b. DocumentEditor.svelte replaces LiveWriter.svelte and the Monaco EditorHost.svelte. Each open document has one CodeMirror state. Write and Source are two compartment configurations of it, so they share the undo history. editorStates.ts keeps the state while the tab stays open. The Monaco model, the diff bridge, its timers, and sessions.ts are gone. - Source: syntax colors from the theme tokens, lazy language packages, line numbers, folding, and the current line in IDE, wrapped lines in Writing, several carets, and bracket matching and closing. - Lists (card 088e778b): Tab nests a list item and Shift+Tab moves it up, in Write and Source. Both renumber the list. The source keeps "1.". Write and Read show numbers, letters, then Roman numerals. - Indent (card 696c30ce): a fixed 4 spaces in Write and Source. - The code menu uses CodeMirror commands. The command palette item and the Monaco styles, search, theme, and workers are removed. - @codemirror/legacy-modes is pinned to 6.5.4. Version 6.5.5 uses parser types that do not match @codemirror/language 6.12. - 26 smoke tests use CodeMirror instead of Monaco. New tests: editor/listNesting and the markdownLists unit tests. - Docs: development, UI design, plugin host, user guide, and UI-040. pnpm check, pnpm test (341 of 341), and pnpm build pass. The full smoke suite passes, except one template test that passed on retry.
This commit is contained in:
+3
-3
@@ -54,6 +54,6 @@
|
||||
.rs-find-options label { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; cursor: pointer; }
|
||||
.rs-find-options input { margin: 0; accent-color: var(--rs-accent); }
|
||||
.rs-find-error { color: var(--rs-error); }
|
||||
.live-writer .cm-panels.cm-panels-top { border-bottom: 1px solid var(--rs-border); }
|
||||
.live-writer .cm-searchMatch { background: var(--rs-item-selection-bg); }
|
||||
.live-writer .cm-searchMatch-selected { background: var(--rs-selection); outline: 1px solid var(--rs-accent); }
|
||||
:is(.live-writer, .source-editor) .cm-panels.cm-panels-top { border-bottom: 1px solid var(--rs-border); }
|
||||
:is(.live-writer, .source-editor) .cm-searchMatch { background: var(--rs-item-selection-bg); }
|
||||
:is(.live-writer, .source-editor) .cm-searchMatch-selected { background: var(--rs-selection); outline: 1px solid var(--rs-accent); }
|
||||
|
||||
Reference in New Issue
Block a user