feat: v0.2 — inline model, extended block vocabulary, react reference renderer - #18
Merged
Merged
Conversation
… renderer One vocabulary + one reference renderer so every fleet site reads long-form at the same standard, while typography tokens stay per-site. Parser (root export, still zero-dep; the v0.1 ten block types unchanged): - Inline model: parseInline → text/strong/em/code/link/footnoteRef spans; every text-bearing block keeps `text` and gains additive `spans`. - New blocks: h4, hr, figure (caption title), gallery (adjacent images merge), callout (GitHub > [!NOTE] syntax, nestable), pullquote (>> with — cite), mermaid, chart (tiny declarative spec; malformed specs THROW), math ($$), footnote defs, stats fence. - Headings gain slugified, de-duplicated, umlaut-aware ids (kivvi's scheme). - parseFrontmatter learns YAML arrays (inline + block lists), still dep-free. - Helpers: extractToc, readingTime, slugify/createSlugger, parseChartSpec. Renderer (new bip-kit/react subpath + bip-kit/styles.css): - ArticleBody: async RSC that pre-awaits shiki/katex, then emits a fully synchronous tree (renderToString-safe). Server components for every block; client islands: Toc (scroll-spy, hidden under 3 headings), ReadingProgress, Lightbox, CopyButton. MermaidBlock on its own bip-kit/react/mermaid subpath so the mermaid peer never enters uninterested bundles (components override). - shiki/katex are optional peers loaded via bundler-invisible dynamic import; honest degradation without them (mono <pre>, TeX source with data-math). - styles.css: complete neutral theme — 70ch measure, real vertical rhythm, dark mode via vars only (data-theme wins over prefers-color-scheme), mobile-first, print-safe; every color/radius/font is a --bp-* custom property (theming contract documented in the README). CI: ci.yml gains workflow_dispatch (re-arm strand — a GITHUB_TOKEN merge cannot trigger workflows on its own; threadkit#28 pattern). 96 tests: v0.1 compat goldens (original shapes byte-identical after stripping additive fields), goldens for every new syntax form and edge case, renderToString smoke tests for every block type with and without the optional peers (BIPKIT_DISABLE_PEERS seam), consumer-install pack test now probing ./react, ./react/mermaid and ./styles.css. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bip-kit v0.2 — the fleet's long-form content engine. The v0.1 parser stopped at 10 block types with no renderer, which is exactly why long-form capabilities diverge across the 11 sites; this adds the missing vocabulary and one reference renderer so every site reads at the same standard while typography tokens stay per-site.
Parser (root export, still zero-dep, v0.1 shapes unchanged — fleetcrown/aoz keep working): inline span model (
parseInline, additivespansnext totext), h4/hr/figure/gallery/callout (GitHub> [!NOTE], nestable)/pullquote/mermaid/chart (tiny declarative spec, malformed specs throw)/math/footnotes/stats; umlaut-aware de-duplicated heading ids; frontmatter YAML arrays;extractToc+readingTimehelpers.Renderer (
bip-kit/react+bip-kit/styles.css): RSC-first asyncArticleBodyemitting a synchronous tree (renderToString-safe); server components per block incl. shiki dual-theme highlighting and inline-SVG charts; client islands Toc (scroll-spy), ReadingProgress, Lightbox, CopyButton; MermaidBlock isolated onbip-kit/react/mermaidso the peer never enters uninterested bundles. shiki/katex/mermaid are optional peers with asserted degradation paths. styles.css is a complete neutral theme: ~70ch measure, real vertical rhythm, dark mode via vars only, mobile-first, print-safe.Also:
workflow_dispatchon ci.yml (re-arm strand), version 0.2.0, exports map gains./react,./react/mermaid,./styles.css; react as peer (>=18), shiki/mermaid/katex optional peers. 96 tests green locally (compat goldens + new-syntax goldens + renderer smoke with/without peers + consumer-install pack probes). Publishing happens after merge (coordinator).🤖 Generated with Claude Code
https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn