mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 13:08:27 +01:00
Replace the hand-written block switch + ri() inline re-parser in /thoughts/[slug] with ArticleBody from bip-kit/react, and adopt bip-kit/styles.css with FleetCrown's design tokens mapped onto the --bp-* theming contract (route-scoped CSS, not globals). New capabilities live on every essay: - sticky <Toc /> with scroll-spy (xl right rail, hides under 3 headings) - heading anchor ids (slugified, umlaut-aware) - Shiki syntax highlighting, server-side, dual-theme via --shiki-* vars - <ReadingProgress /> hairline (warm accent) - <Lightbox /> zoom on figures - the full v0.2 vocabulary (callouts, pullquotes, footnotes, charts, stats, math, galleries) for future essays Kept, deliberately local: - MermaidDiagram island (now the components.mermaid override): bip-kit's MermaidBlock keys on data-theme only and passes computed oklch straight to mermaid's color parser, which rejects it — the exact initialize() throw that once blanked every diagram here. Canvas normalization stays. - Inline local-SVG figures (ThoughtArticleBody splits the block stream around them) so repo-authored diagrams keep reading design tokens and flipping with the theme; alt-as-caption is preserved by promoting captioned image blocks to figure blocks. Also: - ThemeProvider now mirrors the theme to data-theme alongside class — the fleet convention bip-kit's dark scopes (shiki token colors) key on. - next.config traces shiki into the standalone build: bip-kit loads it through a bundler-hidden dynamic import the tracer cannot see, so prod would otherwise silently fall back to unhighlighted code. - bip-seam test updated to pin the v0.2 vocabulary. - ThoughtVideoEmbed deleted (bip-kit's allowlisted VideoEmbed renders embed blocks). 68-essay compat diff (v0.1 vs v0.2 parse, histograms): identical except (a) mermaid fences code->mermaid (wanted), (b) 34 bare `---` lines across 10 essays that rendered as literal "---" paragraphs now render as <hr>, (c) one bare `>` separator line in the levelsio essay that rendered as a stray ">" paragraph now merges its two quote paragraphs into one blockquote. All three match authored intent. Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn Co-authored-by: Claude Fable 5 <noreply@anthropic.com>