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
+67
View File
@@ -0,0 +1,67 @@
/* Element defaults for the whole app. */
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
background: var(--rs-bg);
color: var(--rs-text-strong);
font-family: var(--rs-font-ui);
font-size: 13px;
font-weight: var(--rs-font-weight);
line-height: 1.4;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--rs-font-heading); }
button,
input,
textarea,
select {
font-family: inherit;
font-size: inherit;
color: inherit;
}
button {
cursor: pointer;
}
button:disabled {
cursor: default;
opacity: 0.5;
}
:focus-visible {
outline: 1px solid var(--rs-accent);
outline-offset: -1px;
}
::selection {
background: var(--rs-selection);
color: var(--rs-selection-text);
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--rs-bg);
}
::-webkit-scrollbar-thumb {
background: var(--rs-border);
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--rs-accent-deep);
}