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
+18
View File
@@ -0,0 +1,18 @@
/* Table formula results and help below a table. */
.md-table-formula { color: var(--rs-accent); font-variant-numeric: tabular-nums; }
.md-table-formula.is-error { color: var(--rs-danger, #ed8796); text-decoration: underline dotted; }
.table-footer { display: grid; gap: 8px; margin: 0 26px 1.4em; min-width: 0; font: 12px/1.5 var(--rs-font-ui); color: var(--rs-text-dim); white-space: normal; overflow-wrap: anywhere; }
.table-formula-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
.table-formula-help { min-width: 0; }
.table-formula-help summary { display: flex; align-items: center; gap: 5px; cursor: pointer; min-height: 28px; border-radius: 4px; }
.table-formula-help summary:hover, .table-formula-help summary:focus-visible { color: var(--rs-accent); }
.table-formula-help summary:focus-visible { outline: 1px solid var(--rs-accent); outline-offset: 2px; }
.table-formula-help[open] { flex-basis: 100%; }
.table-formula-instructions { display: grid; gap: 12px; max-width: 680px; padding: 12px; border: 1px solid var(--rs-border); border-radius: 6px; line-height: 1.7; color: var(--rs-text); background: var(--rs-bg-elevated); }
.table-formula-instructions p, .table-formula-instructions dl, .table-formula-instructions dd { margin: 0; }
.table-formula-instructions dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px 16px; }
.table-formula-instructions dt { min-width: 0; }
.table-formula-instructions code { white-space: normal; overflow-wrap: anywhere; }
.table-formula-status { overflow-wrap: anywhere; }
.table-formula-hint { padding: 8px 10px; border-left: 2px solid var(--rs-accent); background: var(--rs-bg-elevated); color: var(--rs-text); }
.table-formula-hint[hidden] { display: none; }