Repository navigation
Floe v0.2.0 — Universal 5-Layer Design System, Equal-Height Engine & Multi-Science Suite
❄️ Floe v0.2.0 — The Clean 5-Layer Architecture Release
Floe v0.2.0 is a major architectural and visual overhaul transforming Floe into a universal, zero-alias, 5-layer Typst design system across mathematics, physics, chemistry, electrical engineering, computer science, and technical documentation.
✨ Highlights & New Features
1. Strict 5-Layer Directed Acyclic Graph (L0 → L4)
- Layer 0 (
core/): Universal design tokens (core/tokens.typ), zero-dependency chemical formula & stoichiometry parser#ce("...")(core/chemistry.typ), and re-exported Typst Universe scientific backends (@preview/physica:0.9.8,@preview/unify:0.7.0,@preview/cetz:0.5.2,@preview/fletcher:0.5.8,@preview/merman:0.1.0,@preview/zap:0.5.0,@preview/codly:1.3.0,@preview/hydra:0.6.2). - Layer 1 (
primitives/): Parent-driven equal-height row layout engine (#equal-grid,#stretch-cell), boxed containers (#card,#alert), academic plaques (#plaque), framed media containers (#figure-card,#figure-grid), item breakdown cards (#item-card,#item-grid), steppers (#stepper), timelines (#timeline), micro-badges (#badge,#kbd,#status-dot), and 8 horizontal divider styles (primitives/divider.typ). - Layer 2 (
mixins/): Pure composable#show:rules (with-running-chrome,with-heading-theme,with-math-theme,with-code-themewith nativemermaidinterception,with-table-theme,with-gfm-theme,with-compact-theme). - Layer 3 (
components/):components/academic.typ:#theorem,#definition,#lemma,#corollary,#algorithm, and#proof(sketch: bool).components/alerts.typ:#pitfall,#exam-alert,#note,#tip,#warning.components/pedagogical.typ:#formula-breakdown(with colorized pedestal equations and auto-colored 3-tuplesymbols),#derivation-stepper,#physical-anchor,#worked-example.components/science.typ: Native CeTZ 2D function + scatter plotter (#plot-2d) and chemical reaction + thermodynamic plaque (#reaction).components/layouts.typ:#split-view,#pro-con,#bento-grid(#bento-cell),#feature-grid,#key-value-grid,#duality-grid.components/tables.typ: Rounded sans-serif#data-table,#spec-table, and#comparison-table(#badge-yes,#badge-no,#badge-opt).components/hero.typ: Complete 12-component hero and section header suite (#cover-hero,#chapter-header,#editorial-header,#banner-header,#split-hero,#stat-hero,#section-header,#subchapter-card,#minimal-header,#document-header,#appendix-header,#keynote-header).components/math.typ: Universal term highlighters (#t1..#t6,#math-hl), overbrace/underbrace annotations (#math-annot,#math-annot-top), and auto-colored#eq-legend.
- Layer 4 (
presets/):#textbook,#report,#slides,#memo,#cheatsheet, and dual-mode#adr(mode: "document" | "slides")(#adr-document,#adr-slides).
2. Parent-Driven Equal-Height Row Layout Engine (#equal-grid)
- All multi-column grids (
#equal-grid,#bento-grid,#figure-grid,#item-grid,#feature-grid,#split-view,#pro-con,#split-hero,#stat-hero) measure every sibling in each row insidecontext + layout(size => ...)at exact fractional column widths and stretch shorter siblings automatically. - Footers marked with
#metadata("floe-footer")stay pinned flush to the bottom border while canvases marked with#metadata("floe-stretch-center")stay vertically centered.
3. Unified Corner-Anchored Bean Row + Stacked Title Geometry (inline-header: false by Default)
- Across all cards, plaques (
title-below: true), figure cards, item cards, bento cells, split views, and pedagogical blocks, top pills/beans are corner-anchored at9ptfrom top and9ptfrom left/right withtop-edge: "cap-height", bottom-edge: "bounds"andbaseline: 0pt. - Titles stack cleanly on their own full-width row
5.5ptbelow the bean row, with subtitles3.5ptbelow the title—eliminating mid-line badge floating andpar.spacinginflation. Passinline-header: truewhen single-line inline headers are explicitly desired.
4. Universal Equation Dissection & Colorized #formula-breakdown
- Replaced domain-specific control tokens with the 6-color universal palette
c-term-1..c-term-6(term-palette) and short splittable highlighters#t1(expr)..#t6(expr)+#math-hl(color, expr). #formula-breakdowncolors the display equation on the pedestal to match its breakdown cards and accepts 3-tuplesymbols: (($sym$, "Term Name", [Description]), ...)that auto-assignterm-palettecolors in order.
⚠️ Breaking Changes (Migrating from v0.1.0 to v0.2.0)
- Package Version:
- Update imports from
#import "@local/floe:0.1.0": *(or@preview/floe:0.1.0) to#import "@local/floe:0.2.0": *.
- Update imports from
- Zero Legacy Aliases:
- Removed all duplicate and backwards-compatibility component aliases so every component has one canonical name:
#callout-box→#alert#warning-box,#danger-box,#info-box,#tip-box→#warning,#pitfall,#note,#tip#algorithm-box→#algorithm#proof-sketch[...]→#proof(sketch: true)[...]#numbered-steps→#stepper#side-by-side/#equal-row→#equal-grid#symbol-card→#item-card(inside#item-grid)#labeled-divider→#text-divider(pure text) or#chip-divider(pill chip)#document-hero/#keynote-hero→#document-header/#keynote-header
- Removed all duplicate and backwards-compatibility component aliases so every component has one canonical name:
- Domain-Agnostic Equation Color Tokens & Macros:
- Replaced
c-state,c-noise,c-cost,c-sensor,c-input,c-estwithc-term-1,c-term-2,c-term-3,c-term-4,c-term-5,c-term-6(term-palette). - Replaced
#math-state,#math-noise,#math-cost,#math-sensor,#math-input,#math-estwith#t1..#t6and#math-hl(color, expr).
- Replaced