references · imported 2026.04.20

Reference library for our system & design system

Three repos from somnai-dreams forks of chenglou, imported as docs. Spec checking (freerange), UI code patterns (vibescript), and text layout primitives (pretext) — the foundations we'll build on.

3 repos imported 34 reference docs vibescript · chenglou_main
01 / 03 freerange

Static @fit checks for ordinary TypeScript

Reads function source & a @fit comment, proves the comment from the code or says where it can't. No browsers, screenshots, or sampled cases. Checkable specs for UI layout math — and eventually anything else agents keep getting subtly wrong.

02 / 03 vibescript · chenglou_main

Code patterns for a new era of UI apps written with AI

Hand‑written, battle‑tested docs plus live demos. The render loop, state model, animation, scrolling, routing and input conventions we'll follow. Also the tone & writing standard for any doc we add later.

03 / 03 pretext

Multiline text measurement & layout, without DOM reflow

Pure JS/TS engine. Measures paragraphs & lays out lines using the browser's own font metrics as ground truth, no getBoundingClientRect. Unlocks virtualization, userland layouts and ahead‑of‑time overflow checks.