The shared geometry/text core: measures label and title widths, wraps
descriptions to a width, and accumulates bounding boxes. Every engine builds
on it, so text sizing and bounds math live in exactly one place.
A structural sequence diagram: the participants (lifelines) and the ordered
items — messages and nested fragments — traced down them. The sequence
engine's input.
EntitiesEntity diagramscroll to zoom · drag to pan
`crates/pseudoscript-layout`. The geometry/text `Core` and the sequence
engine, each built on the `Projection` contract — turn a structural input
into a positioned output under tunable metrics. The sequence engine is the
only one implemented here: C4 placement is delegated to `dot` (the layered
engine), which `emit` drives directly; a flowchart engine is a planned
extension point on the same core, not yet built.
A message between two lifelines: its source and target ids (equal for a
self-message), kind, primary label (method name or return marker), and the
dimmed detail after it (a call signature or return type). `source` is the
wire field `from`, renamed because `from` is a PseudoScript keyword.
EntitiesEntity diagramscroll to zoom · drag to pan
Tunable spacing and font metrics for the sequence engine — head-card sizing,
row advance per message kind, fragment padding. Field detail is the engine's
concern; the defaults are the one source of truth consumers start from.
One lifeline: its id (FQN), display label, C4 kind for the head card, optional
summary, and the ancestry path shown under the name for container/component
lifelines.
EntitiesEntity diagramscroll to zoom · drag to pan
A placed message: its kind, source/target ids, endpoint x-positions, row y,
direction (+1 left-to-right, -1 right-to-left), reading-order step, label, and
detail.
EntitiesEntity diagramscroll to zoom · drag to pan
A placed lifeline: its id, label, kind, ancestry path, wrapped summary lines,
head-card rectangle, the lifeline's centre x, and the y span of its dashed
line.
EntitiesEntity diagramscroll to zoom · drag to pan
The sequence engine: lays a structural `Diagram` out into a `SequenceLayout` —
lifeline x-positions in first-appearance order, message rows stacked by
evaluation order, and fragment frames sized to their bodies. The only engine
implemented in this crate; C4 placement is `dot`'s job (`emit` drives it), and
a flowchart engine would follow the same `Projection` contract.
A laid-out sequence diagram: the canvas size plus every participant, message,
activation bar, and fragment placed at absolute coordinates the renderer draws
verbatim. The sequence engine's output.