Skip to content

feat: v0.2 — inline model, extended block vocabulary, react reference renderer - #18

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/v0.2-content-engine
Sep 5, 2026
Merged

feat: v0.2 — inline model, extended block vocabulary, react reference renderer#18
github-actions[bot] merged 1 commit into
mainfrom
feat/v0.2-content-engine

Conversation

@catomean

@catomean catomean commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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, additive spans next to text), 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 + readingTime helpers.

Renderer (bip-kit/react + bip-kit/styles.css): RSC-first async ArticleBody emitting 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 on bip-kit/react/mermaid so 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_dispatch on 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

… 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
@github-actions
github-actions Bot merged commit a711d18 into main Sep 5, 2026
1 check passed
@github-actions
github-actions Bot deleted the feat/v0.2-content-engine branch September 5, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant