v0.4.0
版本发布时间: 2023-11-01 18:06:14
Myriad-Dreamin/typst.ts最新发布版本:v0.5.0-rc6(2024-07-16 06:39:48)
See the CHANGELOG for more details.
v0.4.0
This is a major upgrade of typst.ts, so we decide to increment the minor version number. The most important change is that we have stabilized the API for TypstRenderer. We have also added guidance to typst.ts in https://github.com/Myriad-Dreamin/typst.ts/pull/391.
One of the best features since v0.4.0 is that we provide a more user-friendly way to start exploring typst.ts, the all-in-one library apis:
<script type="module" src="/@myriaddreamin/typst.ts/dist/esm/contrib/all-in-one.bundle.js"></script>
<script>
document.ready(() => {
const svg = await $typst.svg({ mainContent: 'Hello, typst!' });
});
</script>
See All-in-one Library sample for sample that previewing document in less than 200 LoCs and a single HTML.
We have reworked vector format (IR) in https://github.com/Myriad-Dreamin/typst.ts/pull/317, https://github.com/Myriad-Dreamin/typst.ts/pull/324, and https://github.com/Myriad-Dreamin/typst.ts/pull/342. As a result, there are several notable changes:
-
Removed legacy artifact exporting in https://github.com/Myriad-Dreamin/typst.ts/pull/319. You can no longer get JSON output from typst.ts. Instead, use
typst.ts query
ortypst-ts-cli query
(v0.4.0+, https://github.com/Myriad-Dreamin/typst.ts/pull/286). -
Refactored Renderer API in https://github.com/Myriad-Dreamin/typst.ts/pull/336 and https://github.com/Myriad-Dreamin/typst.ts/pull/338. Existing APIs still work but will be removed in v0.5.0.
-
Reworked canvas renderer with vector IR in https://github.com/Myriad-Dreamin/typst.ts/pull/318 and https://github.com/Myriad-Dreamin/typst.ts/pull/325. The new canvas renderer no longer needs to preload fonts (https://github.com/Myriad-Dreamin/typst.ts/pull/330).
Changelog since v0.4.0
What's Changed
Full Changelog: https://github.com/Myriad-Dreamin/typst.ts/compare/v0.3.1...v0.4.0
Security Notes
No new security note.
Bug fix
-
exporter::svg: missing quote in stroke dasharray by @Enter-tainer in https://github.com/Myriad-Dreamin/typst.ts/pull/332
-
core: correctly align image items in https://github.com/Myriad-Dreamin/typst.ts/pull/282
-
core: stable sort link items when lowering in https://github.com/Myriad-Dreamin/typst.ts/pull/306
-
pkg::renderer: use approx float cmp by @seven-mile in https://github.com/Myriad-Dreamin/typst.ts/pull/297
-
cli: calculate abspath before linking package in https://github.com/Myriad-Dreamin/typst.ts/pull/296
-
compiler: formalize font search order in https://github.com/Myriad-Dreamin/typst.ts/pull/293
-
compiler: reparse prefix editing in https://github.com/Myriad-Dreamin/typst.ts/pull/316
Since v0.4.0-rc3
-
core: gc order in https://github.com/Myriad-Dreamin/typst.ts/pull/352
-
core: hold span to/from u64 safety for users in https://github.com/Myriad-Dreamin/typst.ts/pull/361
-
core: error is not send in https://github.com/Myriad-Dreamin/typst.ts/commit/05060cfe5a3bf9f0ba7404f069320cfcb3bb2aaa
-
compiler: eagle check syntax of the main file in https://github.com/Myriad-Dreamin/typst.ts/pull/374
-
compiler: vfs panic when file not found by @Enter-tainer in https://github.com/Myriad-Dreamin/typst.ts/pull/380
-
exporter::svg: broken clip on adjacent paths in https://github.com/Myriad-Dreamin/typst.ts/pull/386
-
exporter::svg: partially disable incr rendering in https://github.com/Myriad-Dreamin/typst.ts/pull/387Dreamin/typst.ts/commit/ad69d915d14f587d8e9a40300bc85f6dac4364a1
-
pkg::compiler: set default dummy access model in https://github.com/Myriad-Dreamin/typst.ts/pull/364
Changes
-
build: setup typescript monorepo with turbo in https://github.com/Myriad-Dreamin/typst.ts/pull/312
- You don't have to face the error-prone
yarn link
anymore.
- You don't have to face the error-prone
-
core: remove legacy artifact exporting in https://github.com/Myriad-Dreamin/typst.ts/pull/319
-
compiler: remove deprecated resolve_with in https://github.com/Myriad-Dreamin/typst.ts/pull/328
-
pkg::core: refactor render api in https://github.com/Myriad-Dreamin/typst.ts/pull/336 and https://github.com/Myriad-Dreamin/typst.ts/pull/338
Since v0.4.0-rc3
-
CSS change since typst v0.9.0 in https://github.com/Myriad-Dreamin/typst.ts/pull/384
- .outline_glyph path { + .outline_glyph path, path.outline_glyph { fill: var(--glyph_fill); } - .outline_glyph path { + .outline_glyph path, path.outline_glyph { transition: 0.2s fill; }
External Feature
-
typst: sync to 0.8.0 in https://github.com/Myriad-Dreamin/typst.ts/pull/xxx
-
pkg::core: adapt and export render session
-
pkg::react: expose setWasmModuleInitOptions in https://github.com/Myriad-Dreamin/typst.ts/pull/311
-
pkg::compiler: allow set dummy access model
-
cli: add query command in https://github.com/Myriad-Dreamin/typst.ts/pull/286
-
cli: add interactive query command by Me and @seven-mile in https://github.com/Myriad-Dreamin/typst.ts/pull/289
-
cli: specify fonts via an environment variable
TYPST_FONT_PATHS
in https://github.com/Myriad-Dreamin/typst.ts/pull/305 -
compiler: add
set_{layout_widths,extension,target}
in https://github.com/Myriad-Dreamin/typst.ts/pull/299, https://github.com/Myriad-Dreamin/typst.ts/pull/304, and in https://github.com/Myriad-Dreamin/typst.ts/pull/308 -
compiler: embed emoji fonts for browser compiler, which will increase much bundle size
-
docs: init typst.ts documentation in https://github.com/Myriad-Dreamin/typst.ts/pull/340
Since v0.4.0-rc3
-
more convenient way to integrate projects in https://github.com/Myriad-Dreamin/typst.ts/pull/388
-
exporter::svg: embed transparent html elements in https://github.com/Myriad-Dreamin/typst.ts/pull/379
-
pkg::core: all-in-one library support in https://github.com/Myriad-Dreamin/typst.ts/commit/17d86f8a9325c62eddf59d5b52a117f1da2d3167
-
pkg::core: let typst.ts work with node.js (nodenext) in https://github.com/Myriad-Dreamin/typst.ts/pull/366
-
pkg::core: add option of assetUrlPrefix in https://github.com/Myriad-
-
pkg::compiler: load font asset from remote in https://github.com/Myriad-Dreamin/typst.ts/pull/368
-
pkg::compiler: export to pdf api in https://github.com/Myriad-Dreamin/typst.ts/pull/372
-
pkg::compiler: fetch package support in https://github.com/Myriad-Dreamin/typst.ts/pull/373
-
compiler: new font distribute strategy in https://github.com/Myriad-Dreamin/typst.ts/pull/362
You can install
typst-ts-cli
by cargo since this PR:cargo install --locked --git https://github.com/Myriad-Dreamin/typst.ts typst-ts-cli
-
compiler: add actor for watch compiler in https://github.com/Myriad-Dreamin/typst.ts/pull/371
Internal Feature
-
core: rework vector format (IR) in https://github.com/Myriad-Dreamin/typst.ts/pull/317, https://github.com/Myriad-Dreamin/typst.ts/pull/324, and https://github.com/Myriad-Dreamin/typst.ts/pull/342
-
compiler: pollyfill time support in browser
-
exporter::canvas: rework with vector ir in https://github.com/Myriad-Dreamin/typst.ts/pull/318 and https://github.com/Myriad-Dreamin/typst.ts/pull/325
-
corpora: auto add std test cases in https://github.com/Myriad-Dreamin/typst.ts/pull/331
Since v0.4.0-rc3
- test: add incremental compilation fuzzer in https://github.com/Myriad-Dreamin/typst.ts/pull/370
1、 all-in-one.bundle.js 23.9MB
2、 font-assets.tar.gz 21.89MB
3、 typst-ts-aarch64-apple-darwin-relwithdebuginfo.tar.gz 35.74MB
4、 typst-ts-aarch64-apple-darwin.tar.gz 31.78MB
5、 typst-ts-aarch64-pc-windows-msvc-relwithdebuginfo.tar.gz 31.99MB
6、 typst-ts-aarch64-pc-windows-msvc.tar.gz 31.64MB
7、 typst-ts-aarch64-unknown-linux-gnu-relwithdebuginfo.tar.gz 120.02MB
8、 typst-ts-aarch64-unknown-linux-gnu.tar.gz 31.89MB
9、 typst-ts-alpine-x64-relwithdebuginfo.tar.gz 126.76MB
10、 typst-ts-alpine-x64.tar.gz 32.35MB
11、 typst-ts-arm-unknown-linux-gnueabihf-relwithdebuginfo.tar.gz 119.35MB
12、 typst-ts-arm-unknown-linux-gnueabihf.tar.gz 32.27MB
13、 typst-ts-i686-pc-windows-msvc-relwithdebuginfo.tar.gz 32.08MB
14、 typst-ts-i686-pc-windows-msvc.tar.gz 31.88MB
15、 typst-ts-riscv64gc-unknown-linux-gnu-relwithdebuginfo.tar.gz 143.22MB
16、 typst-ts-riscv64gc-unknown-linux-gnu.tar.gz 32.93MB
17、 typst-ts-x86_64-apple-darwin-relwithdebuginfo.tar.gz 35.89MB
18、 typst-ts-x86_64-apple-darwin.tar.gz 32.1MB
19、 typst-ts-x86_64-pc-windows-msvc-relwithdebuginfo.tar.gz 32.99MB
20、 typst-ts-x86_64-pc-windows-msvc.tar.gz 32.65MB
21、 typst-ts-x86_64-unknown-linux-gnu-relwithdebuginfo.tar.gz 121.61MB
22、 typst-ts-x86_64-unknown-linux-gnu.tar.gz 32.4MB
23、 typst-ts-x86_64-unknown-linux-musl-relwithdebuginfo.tar.gz 126.77MB
24、 typst-ts-x86_64-unknown-linux-musl.tar.gz 32.35MB
25、 typst.ts.cookbook.pdf 345.43KB