6 Commits

Author SHA1 Message Date
2228f22352 chore: update changelog 2026-06-14 13:33:04 +02:00
a909398fbd chore: bump version to 0.3.1 2026-06-14 13:24:08 +02:00
05de90890f Merge pull request 'fix end line on non-consecutive ranges ending at the highest bit not being drawn' (#18) from ALVAROPING1/rivet-typst:dev into dev
Reviewed-on: #18
Reviewed-by: Louis Heredero <louis@herdac.ch>
2026-06-05 14:43:48 +00:00
ALVAROPING1
9b83b4c4a8 fix end line on non-consecutive ranges ending at the highest bit not being drawn 2026-06-05 14:45:34 +02:00
df7899ee4b Merge pull request 'prevent drawing separators on starting lines of fields' (#17) from rajayonin/rivet-typst:fix-consecutive-ranges into dev
Reviewed-on: #17
Reviewed-by: Louis Heredero <louis@herdac.ch>
2025-11-28 11:37:43 +00:00
b6f2fd99b8 prevent drawing separators on starting lines of fields
On non-consecutive ranges, we were drawing the starting line _on top_ of
the separator, which lead to some visual glitches in some viewers.
2025-11-25 09:02:49 +01:00
6 changed files with 9926 additions and 8916 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## [v0.3.1] - 2026-06-14
- Support for non-consecutive ranges ([#13](https://git.kb28.ch/HEL/rivet-typst/pulls/13))
- Prevent drawing separators on starting lines of fields ([#17](https://git.kb28.ch/HEL/rivet-typst/pulls/17))
- Fix end line on non-consecutive ranges ending at the highest bit not being draw ([#18](https://git.kb28.ch/HEL/rivet-typst/pulls/18))
- Add documentation for `start` property of structures ([61f13df815f](https://git.kb28.ch/HEL/rivet-typst/commit/6f13df815f99fd6be8b6b3a02b4d53bcc8fe0aff))
## [v0.3.0] - 2025-05-03
- updated CeTZ to 0.3.4
- updated to Typst 0.13.1

View File

@@ -35,7 +35,7 @@ For more information, see the [manual](manual.pdf)
To use this package, simply import `schema` from [rivet](https://typst.app/universe/package/rivet) and call `schema.load` to parse a schema description. Then use `schema.render` to render it, et voilà !
```typ
#import "@preview/rivet:0.3.0": schema
#import "@preview/rivet:0.3.1": schema
#let doc = schema.load(yaml("path/to/schema.yaml"))
#schema.render(doc)
```

18820
manual.pdf

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
#let version = version(0,3,0)
#let version = version(0,3,1)
#import "config.typ"
#import "schema.typ"

View File

@@ -387,8 +387,10 @@
}
let range-boundaries = ()
for r in struct.ranges.values() {
let i = to-real-i(if config.ltr-bits {r.start} else {r.end})
range-boundaries.push(i)
let start-i = to-real-i(if config.ltr-bits {r.start} else {r.end})
let end-i = to-real-i(if config.ltr-bits {r.end} else {r.start}) + 1
range-boundaries.push(start-i)
range-boundaries.push(end-i)
}
// Draw colors
@@ -472,9 +474,9 @@
shapes += draw-text(range_.name, txt-col, name-x, name-y, fill: bg-col)
// paint end line only if needed
let is-not-limit = if config.ltr-bits { start-i != 0 } else { end-i != struct.bits - 1 }
if (
start-i != 0
and end-i != struct.bits - 1
is-not-limit
and ranges
.at(
i

View File

@@ -1,6 +1,6 @@
[package]
name = "rivet"
version = "0.3.0"
version = "0.3.1"
compiler = "0.13.1"
repository = "https://git.kb28.ch/HEL/rivet-typst"
entrypoint = "src/lib.typ"