CeTZ 0.5.2 requires 3D coordinate vectors (x, y, z) for raw
coordinate tuples passed to coordinate.resolve(). Update internal
wire computations (dodge, guided) to use 3-element tuples, fix
.last() to .at(1) for y-component access on resolved coordinates,
and add a normalize-coord utility that automatically pads user-
provided 2D points (x, y) to (x, y, 0) so users do not need to
specify the z dimension.
Groups now accept ports/ports-margins like blocks. Port name labels
default to outside the group border (outside-port-names: true) so they
don't overlap child elements; set to false for block-style inside
labels.
Replaces the hard-coded 2pt padding used when placing port name labels.
Configurable per element via port-name-padding on elmt (forwarded by
block and group), defaulting to 2pt to preserve existing layout.
Add an optional pentagon shape for block and group ports, configured via
the element-level `port-shape`, `port-kind` and `port-size` parameters.
Individual ports can override them with `shape`, `kind`, `size`,
`stroke` and `fill`. Clock ports with a pentagon shape drop the clock
triangle and default to a gray fill.
Wires attach to the outer end of the pentagon by default. With the new
`shell` parameter on `element.elmt` they attach to the inner tip
instead.
Each port is exposed as a CeTZ group with a `default` anchor plus the
cardinal sub-anchors `.east`, `.west`, `.north` and `.south` on the
pentagon's bounding box, so wires can attach to any face. For
non-pentagon ports the sub-anchors collapse to the default attach point,
and the bare `<elmt-id>-port-<port-id>` anchor resolves as before.
Add the `port-shape` and `port-shape-attach` examples and the
`gallery/test_port_shape` gallery entry.
Add `port-names-outside` to draw port name labels outside the block
border. It defaults to `auto`, which follows the new `shell` setting.
Add `shell` to `block` so it can act as a container, as an alternative
to `group`. Placing elements into such a block lets them be aligned to
the ports of the outer block. A shell block draws its port names outside
and, through the existing `wire-inside` behaviour, attaches wires to the
inner tip of pentagon ports. Child elements can be passed as a
positional body argument.
Add the `port-names-outside` and `shell` examples.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
As an alternative to the group define a block as a shell. This allows to draw blocks containing blocks without changing context
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.