Move global CSS beside its code and make Documents reactive

Phase 4e.

- app.css holds only imports. Its rules moved into files beside their
  code, in the original cascade order. Dead rules of the deleted TipTap
  Writer are gone.
- workbenchKeys.ts is one table of the workbench shortcuts. Workbench
  runs the commands.
- session.linkTargets is the one link resolution for the link menu and
  for link opening.
- Documents is a rune module (documents.svelte.ts). Workbench reads the
  tabs and the active path from it, without a copy of all buffers on
  each change. The editor mount effect now copies the buffer inside
  untrack, so an edit does not remount the editor.
- Unit tests can import .svelte.ts modules through a Node module hook
  that compiles them with the Svelte compiler.

pnpm check, pnpm test (350 of 350), and the full smoke suite pass,
except tables/linkCaret, which failed one time under load and passed
on retry and 3 of 3 times alone.
This commit is contained in:
Knotty Wyvern
2026-10-28 11:50:33 -07:00
parent f32f60b540
commit 3e6bc5f088
23 changed files with 549 additions and 512 deletions
+4
View File
@@ -0,0 +1,4 @@
/* Icons and labels of action rows, from actionIcons.ts. */
.action-icon { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.action-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-chevron { width: 13px; height: 13px; flex-basis: 13px; color: var(--rs-text-dim); }
+16
View File
@@ -0,0 +1,16 @@
/* Tooltips from tooltip.ts. */
.rs-tooltip {
position: fixed;
inset: auto;
margin: 0;
max-width: min(280px, calc(100vw - 16px));
padding: var(--rs-tooltip-padding);
border: 1px solid var(--rs-border);
border-radius: var(--rs-control-radius);
background: var(--rs-tooltip-bg);
color: var(--rs-tooltip-text);
box-shadow: var(--rs-tooltip-shadow);
font: var(--rs-tooltip-font-size)/1.5 var(--rs-font-ui);
white-space: pre-line;
pointer-events: none;
}