Format v0.4.0
- Engine
- React
- Vue
- Studio
- CLI
- API
Page sizes in physical units. Set an A4 Layout to width="210mm" and height="297mm", or use width="8.5in" and height="11in" for US Letter. Layouts, format new, and Studio's New Document dialog all accept mm, cm, in, pt, pc, and px. The React and Vue SDKs also export a PageLength type. See Page sizes.
Media queries use the page size. One stylesheet can give landscape pages two columns and portrait pages one, even in the same document. Each Layout evaluates width, height, aspect-ratio, and orientation using its own dimensions. Resizing the Studio window leaves those columns in place. Studio and PDF export also use the same values for settings such as color scheme and hover. Studio lists unsupported media features in its diagnostics panel. See Media queries.
Instructions for coding agents. The CLI now includes a guide to Format's document model, CLI commands, and Studio workflow. New projects link to the guide from AGENTS.md. When you update Format, the guide updates with it, so your agent has instructions for the version you're using. To add the link to an existing project, copy the snippet in the installation guide.
Connect Studio to your organization. The first time you open Studio on your computer, choose your organization in the Dashboard and click Approve connection. Your browser takes you back to Studio. On a remote machine, run format auth start and open the link it prints. Approve the connection in the Dashboard, then run the command shown in the terminal and enter the one-time code. See Studio authentication and format auth.
Faster rendering for long documents. Long documents rendered faster in our tests, with the largest improvement on a table-heavy document of more than 400 pages. With that document open in Studio, resizing the window took under 50 milliseconds, down from 4–5 seconds.
Other improvements
- SVGs. SVGs keep their size when you use percentages,
em, or physical units. Icons can use symbols from a zero-size sprite sheet. Inline SVGs now preserve embedded images and colors set by your page's CSS. - Engine. Fixed an issue that could prevent PDF export when outlined text wrapped across lines or when an emoji was followed by small outlined text. Text spilling below a footer pinned to the bottom of the page no longer forces each item onto a separate page. Stylesheet references such as
url(#gradient)now resolve inside the document. - Studio. Documents now open centered horizontally when you're zoomed in. Studio rounds text sizes and thin borders the same way as PDF export. You can change your browser zoom or move the window to a display with a different device pixel ratio without shifting page breaks or triggering another render. Studio now shows the engine's message and error code for document faults.
- CLI. Fixed an issue on Windows where spaces or special characters in arguments could prevent Studio commands from running as intended.
- Document limits. When a document exceeds the page limit for its Layout, Format returns
DOCUMENT_TOO_LONG. The error message tells you the limit. See the error reference. - SDK documentation. The React and Vue packages now include READMEs on npm.
Upgrading
If you use Format v0.3.0 or earlier, update your project to v0.4.0 before connecting Studio to your organization in the Dashboard.
format update 0.4.0Check existing documents for these changes.
- Document stylesheets. A
<style>or<link rel="stylesheet">inside a Flow or Stream now returnsINVALID_LAYOUT. Move the stylesheet directly under the Document or into the Layout outside all Flows and Streams. Styles inside inline SVGs can stay where they are. - Viewport units. Format doesn't support
vw,vh, or other viewport units. Use%to size content relative to its container, or a fixed unit such asmmorpx. - Media queries. Review rules that depended on the browser window or system theme. Size conditions now use the Layout's dimensions,
prefers-color-schemeislight, andhoverisnone. - TIFF and HEIC images. Convert these assets before rendering. Use JPEG for photos and PNG for diagrams or images that need transparency. See Images.