Skip to content

Commit e883695

Browse files
build: bump shiroa packages to v0.3.0 (Myriad-Dreamin#221)
1 parent 9dd9a84 commit e883695

File tree

28 files changed

+38
-38
lines changed

28 files changed

+38
-38
lines changed

cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async fn init(args: InitArgs) -> Result<()> {
118118
dir.join("book.typ"),
119119
format!(
120120
r##"
121-
#import "@preview/shiroa:0.2.3": *
121+
#import "@preview/shiroa:0.3.0": *
122122
123123
#show: book
124124
@@ -153,7 +153,7 @@ Sample page
153153
write_file(
154154
dir.join("ebook.typ"),
155155
format!(
156-
r##"#import "@preview/shiroa:0.2.3": *
156+
r##"#import "@preview/shiroa:0.3.0": *
157157
158158
#import "{ebook_template}"
159159

cli/src/project.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ impl Project {
194194
}
195195

196196
let InternalPackageMeta::Package { version } = self.query_meta("<shiroa-internal-package-meta>", query)?
197-
.context("No package meta. are you using old book package?, please import @preview/shiroa:0.2.3; or do you forget the show rule `#show: book`?")?;
197+
.context("No package meta. are you using old book package?, please import @preview/shiroa:0.3.0; or do you forget the show rule `#show: book`?")?;
198198

199-
if version != "0.2.3" {
199+
if version != "0.3.0" {
200200
return Err(error_once!(
201-
"outdated book package, please import @preview/shiroa:0.2.3", importing_version: version,
201+
"outdated book package, please import @preview/shiroa:0.3.0", importing_version: version,
202202
));
203203
}
204204
}

contrib/typst/gh-ebook.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/shiroa:0.2.3": *
1+
#import "@preview/shiroa:0.3.0": *
22
#import "/contrib/typst/gh-pages.typ": part-style, project
33

44
#let _page-project = project

contrib/typst/gh-pages.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is important for shiroa to produce a responsive layout
22
// and multiple targets.
3-
#import "@preview/shiroa:0.2.3": (
3+
#import "@preview/shiroa:0.3.0": (
44
get-page-width, is-html-target, is-pdf-target, is-web-target, plain-text, shiroa-sys-target, templates,
55
)
66
#import templates: *

github-pages/docs/book.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#import "@preview/shiroa:0.2.3": *
2+
#import "@preview/shiroa:0.3.0": *
33

44
#show: book
55

github-pages/docs/cli/init.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ your `book.typ` should at least provide a `book-meta`.
4444

4545
#sample-file("/tests/minimal/book.typ")
4646

47-
Your `template.typ` must import and respect the `get-page-width` and `target` variable from `@preview/shiroa:0.2.3` The two variables will be used by the tool for rendering responsive layout and multiple targets.
47+
Your `template.typ` must import and respect the `get-page-width` and `target` variable from `@preview/shiroa:0.3.0` The two variables will be used by the tool for rendering responsive layout and multiple targets.
4848

4949
#sample-file("/tests/minimal/template.typ")
5050

github-pages/docs/format/theme.typ

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ A target can be suffixed with a theme name to support specialized rendering for
3333

3434
== Respecting `x-target` in your template
3535

36-
To apply set rules for different targets, your `template.typ` can import and respect the `x-target` variable from `@preview/shiroa:0.2.3`. For example, to remove margins for web target, you can do:
36+
To apply set rules for different targets, your `template.typ` can import and respect the `x-target` variable from `@preview/shiroa:0.3.0`. For example, to remove margins for web target, you can do:
3737

3838
```typ
39-
#import "@preview/shiroa:0.2.3": x-target
39+
#import "@preview/shiroa:0.3.0": x-target
4040
4141
#let project(body) = {
4242
@@ -66,7 +66,7 @@ There are samples to create components that utilize metadata from `book.typ`:
6666
Shiroa will pre-render multiple layouts by setting `sys.page-width` and `sys.x-target` to different values. A template must use `page-width` to adjust the page width to avoid the content being cut off.
6767

6868
```typ
69-
#import "@preview/shiroa:0.2.3": page-width, x-target
69+
#import "@preview/shiroa:0.3.0": page-width, x-target
7070
7171
#let project(body) = {
7272
// set web/pdf page properties
@@ -80,7 +80,7 @@ Shiroa will pre-render multiple layouts by setting `sys.page-width` and `sys.x-t
8080
We know shiroa will render a page with `sys.x-target` set to `html-wrapper` and `web` targets, so template must be aware of that. The html file (rendered with `html-wrapper` target) must contain a trampoline to load the svg file (rendered with `web` target). You can either create you owned trampoline or use the `paged-load-trampoline` function provided by shiroa:
8181

8282
```typ
83-
#import "@preview/shiroa:0.2.3": paged-load-trampoline, x-target
83+
#import "@preview/shiroa:0.3.0": paged-load-trampoline, x-target
8484
#let html-template(trampoline) = html.html(
8585
html.head(html.title("Page Title")),
8686
html.body(trampoline),

github-pages/docs/guide/get-started.typ

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "/github-pages/docs/book.typ": book-page
2-
#import "@preview/shiroa:0.2.3": shiroa-sys-target
2+
#import "@preview/shiroa:0.3.0": shiroa-sys-target
33

44
#show: book-page.with(title: "Get Started")
55

@@ -46,7 +46,7 @@ Before a chapter can be viewed, it must be added to this list.
4646
Here's a basic summary file with a few chapters:
4747

4848
```typ
49-
#import "@preview/shiroa:0.2.3": *
49+
#import "@preview/shiroa:0.3.0": *
5050
#show: book
5151
5252
#book-meta( // put metadata of your book like book.toml of mdbook

github-pages/docs/pdf.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/shiroa:0.2.3": *
1+
#import "@preview/shiroa:0.3.0": *
22

33
#import "/contrib/typst/gh-ebook.typ"
44
#let ebook = gh-ebook

packages/shiroa-tests/test-plain-text.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/shiroa:0.2.3": *
1+
#import "@preview/shiroa:0.3.0": *
22

33

44
#let test-none() = plain-text(none).trim()

0 commit comments

Comments
 (0)