v0.16.1
Released May 31, 2026 · All releases
Changes
file-refrune + sharedpreview="drawer"attribute on reference runes (SPEC-078, WORK-298..303).- New rune —
file-ref. Path-based inline reference to a project file — third member of the Registry family besidexref(one entity) andexpand(one entity inlined). Renders as an inline<a>to the file's canonical GitHub URL; optionalpreview="drawer"hoists a drawer containing the file's snippet plus a "View source on GitHub →" footer link. Sandbox shared withsnippet(rejects absolute paths / traversal escapes / out-of-root symlinks). xref preview="drawer"extension. The existingxrefrune gains an optionalpreview="drawer"attribute that hoists a drawer containing the entity'sexpand-equivalent body. Same hoist mechanism asfile-ref— one preview vocabulary across both reference runes. The drawer's chrome footer links to the entity'ssourceUrl(or hides silently for URL-less entities). Inline link still resolves via the registry; clicking opens the drawer rather than navigating away.- Drawer footer slot + always-visible chrome. The drawer body splits on a top-level
---into two zones — body and footer — same shape{% card %}uses. In dialog mode, the drawer becomes a flex column: header and footer pin viaflex: 0 0 auto, body scrolls viaflex: 1 1 auto; overflow-y: auto, so a long entity body or file snippet scrolls inside the drawer with the footer staying one tap away. - Site config —
repoUrl+repoBranch. Two new optional fields onSiteConfigfor the canonical repo URL + git ref.file-refuses them to build{repoUrl}/blob/{repoBranch}/{path}#L{N}-L{M}URLs; falls back to a no-href link with a build warning whenrepoUrlis absent. - Internal mechanism — drawer hoist pipeline. New
hoistPreviewDrawerspostProcess step collectshoist-drawersentinels (emitted byfile-ref preview="drawer"andxref preview="drawer") and materializes drawers at the page root. Source-specificHoistBuilderregistrations keep the drawer pipeline ignorant of file paths / entity ids — reference runes register their own builders. Per-page dedup: multiple references to the same target collapse to one hoisted drawer. - SvelteKit plugin —
configurelifecycle hook now runs on all plugins in the CSS-analysis pipeline pass (it was only running for the page-rendering virtual modules), so the plan plugin's unconditional scan registers entities for the CSS analyzer too. Also threadsrepoUrl/repoBranchfromSiteConfigthrough the content loader chain. - Fence-level annotations:
source,lines,linenumbers,highlight,label(SPEC-062, WORK-304). - The Markdoc fence node schema gains five optional attributes that work uniformly on hand-authored fences and snippet-derived ones:
source/lines— provenance metadata. Snippet's preprocess now writes these unprefixed names instead of the internaldata-snippet-source/data-snippet-lines. The fence transform renders them asdata-source/data-lineson the output<pre>and<code>.linenumbers(boolean) — opt into a numbered gutter rendered in pure CSS viacounter(). The start number is seeded fromdata-linesso the gutter reflects the file's real offsets.highlight(range string) — emphasize specific lines without cropping. Shiki-style format ("74-78","74-78,82,90-92"); file coordinates so it composes naturally withlines=. The highlight transform stampsdata-line-status="highlight"on matchingspan.linerows post-Shiki.label— per-fence tab label hint consumed bycodegroup.- codegroup: tab labels now fall back through a precedence chain —
labels=→ per-fencelabelannotation → derived fromsource(basename +:lines) → prettified language name. The composition story propagates through fence attributes so codegroup doesn't care whether a panel came from{% snippet %}or a hand-authored fence. - diff: the header derives from each panel's
source(matching paths collapse to one label; differing paths render asbefore → after). Each panel's gutter honors its ownlines=start, so a diff between two slices of the same file shows real file line numbers per side. Thehighlightannotation is silently ignored inside diff — the add/remove channel is the primary line-level signal. - CSS: diff's
[data-line-status]row template grows a thirdhighlightvalue with a neutral tint (--rf-color-line-highlight) and primary-accent left rail. Snippet and codegroup share the same row primitive for the new highlight state. New tokens:--rf-color-line-highlight,--rf-color-line-highlight-rail,--rf-color-line-number. - Internal protocol changes (no user-facing API broken; only CSS targeting the previous internal
data-*names needs updating): - The internal
data-snippet-source/data-snippet-linesattributes emitted by the snippet rune are renamed todata-source/data-lines. These were documented as internal protocol when snippet shipped in v0.16 (SPEC-062). - Diff's per-line
data-typeattribute is renamed todata-line-statusto share one CSS row primitive across snippet / codegroup / diff with the three statesadd | remove | highlight. - Diff's
<pre>output now wraps its line spans in an inner<div data-name="rows">(.rf-diff__rows) — mirrors the codeblock's<pre><code>shape so the row tint extends across horizontal scroll. Themes targeting.rf-diff__code > .rf-diff__linedirectly need to update the selector.