Skip to content

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 10:27
· 7 commits to main since this release
2c5ad49
  • @tooee/cli@0.17.0
  • @tooee/ask@0.17.0
  • @tooee/choose@0.17.0
  • @tooee/clipboard@0.17.0
  • @tooee/config@0.17.0
  • @tooee/commands@0.17.0
  • @tooee/diff@0.17.0
  • @tooee/fuzzy@0.17.0
  • @tooee/layout@0.17.0
  • @tooee/mermaid-pele@0.17.0
  • @tooee/overlays@0.17.0
  • @tooee/marks@0.17.0
  • @tooee/router@0.17.0
  • @tooee/renderers@0.17.0
  • @tooee/search@0.17.0
  • @tooee/panels@0.17.0
  • @tooee/shell@0.17.0
  • @tooee/svg@0.17.0
  • @tooee/themes@0.17.0
  • @tooee/toasts@0.17.0
  • @tooee/view@0.17.0

Draw SVG files and SVG images in Markdown (c77902b)

tooee view diagram.svg now draws the SVG as a terminal image, and so does a directory view. Markdown images such as ![Diagram](diagram.svg), ![[diagram.svg]], and data:image/svg+xml URIs draw as images too. --renderer text still shows the SVG source.

The new @tooee/svg package rasterizes SVG with resvg. Its createSvgImageLoader() returns an ImageLoader, a new hook in @tooee/renderers for image formats that OpenTUI cannot decode. Pass loaders as imageLoaders to launch, launchDirectory, View, DirectoryView, MarkdownView, or createFileProvider. An image from a loader draws at its intrinsic CSS size, not at the size of its raster. Libraries do not register the SVG loader by default, so apps without it still open .svg files as text and do not install resvg.

@tooee/mermaid-pele now rasterizes through @tooee/svg. It still exports rasterizeSvg and findRasterFonts.