Repository navigation
Releases: alechemy/outlay
Releases · alechemy/outlay
Release list
outlay 1.4.1
- Docs: the README now leads with the low-level layout engine (Flexbox and CSS Grid boxes in pure synchronous JavaScript); headless rendering is presented as one use case rather than the headline.
- Docs: Takumi added to the competitor comparison, with the differentiator stated honestly — pure synchronous JS with no WASM or native binaries, since Takumi also has Grid (via Taffy).
- Docs: new
COMPATIBILITY.md— verified, supported-but-unverified, intentional divergences, and non-goals — linked from the README and now shipped in the package. Accuracy claims are scoped to the tested CSS subset rather than to browser CSS as a whole. - Metadata:
package.jsondescription aligned and discovery keywords added (css-layout-engine,headless-layout,svg-layout,canvas-layout,pdf-layout,browser-free); homepage fixture count (4,450) and dependency wording corrected. - No code or type changes;
dist/is identical to 1.4.0.
outlay 1.4.0
outlay/render:htmlToSvg— HTML with inline styles to a finished SVG string in one call, the Satori shape with CSS Grid. Text properties (font-family,font-size,font-weight,line-height,color,text-align) inherit down the tree like CSS; the paint vocabulary is solid backgrounds,border-radius, andborder-color(a uniform border paints an inset stroke).htmlToLayoutreturns the{ tree, styles }intermediate for solving or inspecting before painting.outlay/svg:renderToSvg, a styled painter over solved layouts — fills, strokes, rounded corners, and line-broken text with per-linetextLengthand CSS half-leading baselines — andrenderDebugSvg, a depth-colored box visualizer with grid-track outlines from a debug trace.outlay/font: zero-dependency TTF/OTF metrics —parseFont,wordAdvance,spaceAdvance, andmeasureTextto ameasureContentcallback. Advances are unshaped (kerning off), verified against Chromium to 0.015px with committed Inter ground truth.outlay/textgainsbreakLines: word-range line breaking that sharesmeasureFromAdvances' LayoutUnit-quantized fit test, so painted lines always match measured layout.parseHTMLgains an opt-in render mode (second parameter) used byoutlay/render: text nodes become blockmeasureContentleaves and inherited text + solid-color paint CSS is collected per node. Without it, behavior is byte-for-byte unchanged — text and paint properties still throw.- New OG-image demo: a 1200×630 CSS Grid card — non-uniform
frcolumns, spans, text wrapped at thefr-resolved width — measured from a font file and painted to SVG in ~3ms with no browser. - Rendering-track v1 limitations are tracked in TODO.md.
outlay 1.3.0
parseHTMLaccepts percentagewidth/height/flex-basis(including theflexshorthand), matching the solver vocabulary; percentages remain rejected where unsupported (min/max, padding, tracks).- New HTML Playground demo: paste HTML with inline styles, laid out off-DOM and compared live against the browser, with the strict parse-error UX on display.
- Layout Explorer gains controls for
aspectRatio, percentage andfit-contentsizes, keyword min/max,fit-content()tracks, andalignContent(includingspace-evenly) — 61 headlessly verified steps.
outlay 1.2.0
- Percentage sizes:
"N%"onwidth/height/flexBasisof flex children, resolved against the containing block's content box per box-sizing — including parents sized by the solver itself (flex-grown, stretched, and auto-main containers, where percentages re-resolve once the main size is determined, matching Chromium's cyclic behavior). - Keyword min/max sizes:
minWidth/maxWidth/minHeight/maxHeightaccept"min-content"and"max-content". outlay/testing:sweep,assertNoOverlaps,overflowsX/overflowsY— the README's layout-assertion helpers, now importable.relativeToandhitTestresult utilities on the root entry.- Grid fixes: non-stretched grid items with content shrink-to-fit into their track instead of taking max-content; used inline sizes are clamped by the child's own min/max on every path.
- New
validateTreewarnings for coverage boundaries:orderon grid children, fit-content tracks insiderepeat(), fit-content cross sizes in wrap containers, aspect-ratio items in implicit tracks, and percentage sizes on grid children or the root. GridDebugInfois exported;main/typesfields and a"./package.json"export for legacy resolution.- Now verified against Chromium across 4,450 fixtures (35 tiers).
outlay 1.1.0
aspectRatioon flex and grid items: transfer through the box-sizing box, transferred automatic minimums, and grid's normal-vs-explicit-stretch precedence, verified against Chromium (tier 32).fit-contentas awidth/heightkeyword and{ fitContent: px }grid tracks (tier 33).alignContent: "space-evenly"for flex and grid (tier 31).- Node
idis now optional — missing ids are auto-assigned, andsolveLayoutresults are also keyed by input node reference viaresult.nodes. result.contentSize(union border-box extent),ResolvedBox.parentId, andResolvedBox.baseline.outlay/html:parseHTML, a strict HTML-with-inline-styles →LayoutNodeconverter that throwsHTMLParseErroron anything outside the supported vocabulary.outlay/text: Node-safe LayoutUnit-quantized greedy line breaker (measureFromAdvances,measureFromWordWidths,textNode).outlay/pretext: browser/worker text measurement via Pretext (text,measureText);@chenglou/pretextis an optional peer dependency.- Debug traces now include per-container grid track sizes, offsets, and placements.
- All public types are exported; the build ships source maps and declaration maps;
sideEffects: falseand anenginesfield. validateTree: warns onflexBasis: "content"with a definite main size (direction-aware).- Now verified against Chromium across 4,150 fixtures (33 tiers).
outlay 1.0.0
Initial release.
- Flexbox: direction, wrap, grow/shrink/basis, min/max clamping,
gap, baseline alignment, auto margins, keyword sizing (min-content/max-content),order, block-in-flex subtrees. - CSS Grid: explicit tracks (px,
fr,auto,minmax(), keywords),repeat()includingauto-fill/auto-fit, explicit placement and spans, sparse and dense auto-placement, implicit tracks, alignment and distribution, mixed flex+grid trees. - Positioning:
relative,absolute,fixedwith inset resolution. - Text via the
measureContentcontract: width-dependent content measured at resolved widths,min-width: autofloors from content, LayoutUnit-quantized line-fit parity with Chromium. validateTree: development-time input validation with errors for unsupported vocabulary and warnings for documented CSS divergences.- Verified against Chromium at 0.5px tolerance across 3,700 generated fixtures (30 tiers).