Skip to content

Repository files navigation

typeset.us

Paragraph compositor for the browser. Beam-search line breaking with syntactic protection, contour-shaped rag, hanging punctuation, and post-render self-verification — the engine behind typeset.us, running live on every page of the site it ships from.

The browser types. It doesn't read. The case, set by its own subject: typeset.us/essay.

Install

One line, any site:

<script src="https://typeset.us/go.js" defer></script>

Version-pinned with subresource integrity — the canonical snippet with the current hash lives in public/sri.json, and published pins are permanent: bytes never change, files are never removed.

Or from npm — ESM, CJS, and global builds with types:

npm install typeset.us

Verification, not vibes

The engine grades its own output. Typeset.audit() returns [] when a page has no overflows, no orphaned last words, and no weak line ends — a machine-checkable definition of done. Paragraphs report what happened via data-ts-outcome (composed, fallback:*, skipped:*) and flag data-typeset-done when decided. Full integration contract for humans and agents: typeset.us/for-agents.

This repository

Develop

npm run dev         # site at localhost:3000
npm run build:dist  # regenerate go.js, typeset.min.js, esm + npm artifacts
npm test            # playwright: composition gates on the shipped bundles
npm run bench       # engine benchmarks

MIT © Dustin York — typeset.us/support

About

Browser paragraph compositor: beam-search line breaking that verifies its own output. audit() returns [] — or it restores the browser's layout.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages