Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent/skills/basalt-html/parts/diagram.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .agent/skills/basalt-html/parts/diagram.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .agent/skills/basalt-html/parts/manifest.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/foundations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,8 @@ card keeps its owner's colours ([Service marks](#service-marks)). One node may b
A line that leaves or passes a spine card runs in an end gutter outside the cards (lanes `space-3-5` apart, four at most; the gutter is
its lanes and `space-3`), down into a card's top or up into its bottom. A data flow is its steps in order with bypasses in that gutter. A sequence is a strip of participants and a numbered list that names each message's sender,
receiver and kind. A schema is its cards in an auto-fit grid with no lines, because every foreign-key row writes its target. A stacked
group whose first card is entered by a turn has `space-12` above; its label stays in the first `space-8`.
group whose first card is entered by a turn has `space-12` above; its label stays in the first `space-8`. Stacked, a group's label gives
way to the lines at its top edge: it slides along the edge, on the start side, and is never set over a line that has room to pass.
- **Several end lines into one card nest:** the line from the outermost lane turns lowest and enters nearest the end edge; each
line from a lane further in turns `space-5` higher and enters `space-3` further in. Their labels are seated `space-2-5` clear of
the innermost entry, each on its own turn's height, taken before the half-pixel snap.
Expand Down Expand Up @@ -2002,9 +2003,9 @@ over its lifeline; a stacked chip draws the mark before the name.
- Forced colours: cardinality marks follow their line; an activation's edge is `CanvasText`; a frame's edges are `GrayText`; a
linked name is `LinkText`, underlined.
- Print: a figure prints untraced, in its resting ink, and in the light theme whatever the screen shows.
- Right to left: drawn, the figure mirrors and its words do not; stacked, not yet (the rail, the trunk and the end gutter stay on their
left-to-right sides: a named gap, on the backlog). Identifiers are isolated left to right as runs; named sides swap; the arrow keys
stay physical; the text art stays left to right.
- Right to left: the figure mirrors and its words do not, drawn and stacked (stacked, the rail and the trunk run down the right, a
branch is indented from the right, and the end lines and the end gutter are on the left). Identifiers are isolated left to right as
runs; named sides swap; the arrow keys stay physical; the text art stays left to right.
- Export: a linked card's arrow is not drawn in a file.

### Diagram tokens
Expand Down
168 changes: 132 additions & 36 deletions packages/react/src/diagram-core.ts

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion packages/react/src/styles/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -4997,10 +4997,13 @@
/* Right to left (DECISIONS 306, 1.7): the engine lays out a mirrored model on a left-to-right grid, so the drawing is set left to right and what is in it
is set right to left again; identifiers are isolated left to right as runs, never as blocks, so they keep the card's start edge. */
.basalt-diagram[data-rtl] > .basalt-diagram-drawing { direction: ltr; }
/* Stacked, the figure mirrors too (1.7): the end gutter is on the left, and a branch is indented from the right, its end lane on the left. */
.basalt-diagram[data-rtl] > .basalt-diagram-drawing { padding: var(--_d-pad, 0 0 0 var(--_gutter, 0)); }
.basalt-diagram[data-rtl] .basalt-diagram-node[data-branch] { margin-inline: var(--_d-mi, var(--basalt-space-6) var(--basalt-space-12)); }
.basalt-diagram[data-rtl] > .basalt-diagram-drawing :is(.basalt-diagram-node > :not(.basalt-diagram-mark), .basalt-diagram-lane-name, .basalt-diagram-said, .basalt-diagram-note, .basalt-diagram-band, .basalt-diagram-fhead, .basalt-diagram-felse) { direction: rtl; }
.basalt-diagram[data-rtl] .basalt-diagram-gbox > .basalt-diagram-glabel { inset-inline: auto var(--basalt-space-3); }
/* Stacked, a group's label is on its start side too (the sweep's 66-3), its masking margin mirrored. */
.basalt-diagram[data-rtl] .basalt-diagram-group > .basalt-diagram-glabel { inset-inline: auto var(--basalt-space-3); margin-inline: 0 calc(-1 * var(--basalt-space-1-5)); }
.basalt-diagram[data-rtl] .basalt-diagram-group > .basalt-diagram-glabel { inset-inline: auto calc(var(--basalt-space-3) + var(--_gx, var(--basalt-space-0))); margin-inline: 0 calc(-1 * var(--basalt-space-1-5)); }
/* A Mono detail is one left-to-right run in a right-to-left card (B5 of the pixel review), so its words keep their order and the card's start edge. */
.basalt-diagram[data-rtl] .basalt-diagram-runs { direction: ltr; unicode-bidi: isolate; }
/* A frame's header, its else row and its rule are set right to left, so their place across the mirrored grid is measured from the frame's end edge in
Expand Down Expand Up @@ -5177,6 +5180,9 @@
.basalt-diagram-group > .basalt-diagram-glabel { --_d-gl: var(--_drawn) none; display: var(--_d-gl, block); }
/* Stacked, a group's label sits on a ground plate over the lines, so a line that crosses it stops either side (DECISIONS 306, 1.3). */
.basalt-diagram-group > .basalt-diagram-glabel { z-index: 1; margin-inline-start: calc(-1 * var(--basalt-space-1-5)); padding-inline: var(--basalt-space-1-5); background: var(--_ground); }
/* A line through the label's band moves it along the top edge, toward the end, to the first place clear of every line (the diagrams-rtl ruling): the engine
writes how far as --_gx. Its plate stays for the last resort, where no place is clear. */
.basalt-diagram-group > .basalt-diagram-glabel { inset-inline-start: calc(var(--basalt-space-3) + var(--_gx, var(--basalt-space-0))); }
.basalt-diagram-gbox {
--_d-gb: var(--_drawn) block;
position: relative;
Expand Down
Loading
Loading