Commit Graph
25 Commits
Author SHA1 Message Date
David Stadelmann d9abaf4a53 feat: add pentagon-shaped ports
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.
2026-10-22 00:30:10 +02:00
David Stadelmann c14e2ceab9 feat: add port-name-padding parameter
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.
2026-10-22 00:29:52 +02:00
David Stadelmann 13e3fee913 feat: add ports on group elements
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.
2026-10-22 00:28:18 +02:00
David Stadelmann 77eb4fa946 deps: update CeTZ 0.3.4 to 0.5.2 with coordinate fixes
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.
2026-10-21 23:39:59 +02:00
HEL b71e822bb8 chore: use preview import paths in examples 2026-06-30 21:40:09 +02:00
HEL 2633b35f39 chore: remove gallery PDFs 2026-06-30 19:16:17 +02:00
HEL 415029e0c3 chore: update gallery examples 2026-06-30 19:15:26 +02:00
HEL 459892bb13 refactor: centralize cetz import 2026-06-30 18:48:34 +02:00
bono 94d5d6b854 add examples and add iec gates to manual 2025-06-28 13:56:22 -03:00
bono ea8277ee5b rename iec gates to have consistent naming 2025-06-28 12:28:28 -03:00
bono 9966656e8b add examples 2025-06-22 14:49:11 -03:00
HEL ff0b91e683 updated compiler version + dependencies 2025-03-01 21:22:08 +01:00
HEL d8094384ad added examples to README.md 2024-05-18 23:50:29 +02:00
HEL 86ca91920f added gallery/platypus 2024-05-18 23:46:29 +02:00
HEL 64d6635d5f added gallery/test6 2024-05-18 22:36:38 +02:00
HEL 6a6ae96a96 changed AND design (circle arc instead of bezier) 2024-05-18 22:36:27 +02:00
HEL 011802ffbe fixed minor issues + changed some default styles 2024-05-18 21:45:12 +02:00
HEL d6248865b3 added gallery rendering script 2024-05-18 18:08:36 +02:00
HEL ba7630c03c added test5 in gallery 2024-05-18 17:03:03 +02:00
HEL 86d9122740 added groups 2024-05-18 13:06:57 +02:00
HEL 66ac91af7b added stub name offset parameter 2024-05-17 23:52:43 +02:00
HEL 64a6146f32 added doc for gates + minor changes 2024-05-17 22:24:38 +02:00
HEL 8ec245f36e added logic gates 2024-05-17 21:19:40 +02:00
HEL ef4461bd18 added relative x coordinates 2024-05-17 00:11:04 +02:00
HEL 6174baf650 added test diagram 2024-05-16 23:35:54 +02:00