Repository navigation
v0.2.0
·
28 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
- First public release. The project is open source under the Apache License 2.0 and is published to npm. Snapshots of
mainare published with thenexttag. The standalonesvg-viewer.jscan be loaded from jsDelivr. - Renamed the repository to
techdocs-mkdocs-svg-viewerand the package to@mwz/techdocs-mkdocs-svg-viewer, because it supports standalone MkDocs sites as well as Backstage TechDocs. Update the dependency and imports in your Backstage app. The Backstage plugin IDtechdocs-addon-svg-vieweris unchanged. - The package metadata now declares a TechDocs module (
frontend-plugin-module,pluginId: techdocs), like other TechDocs addons. New frontend apps that use feature discovery load the./alphamodule automatically. - All peer dependencies are optional, so the
/viewerentry point can be used without React or Backstage packages. - Links with only
xlink:hrefget a resolvedhref, so TechDocs routes them in-app instead of reloading the page (resolveXlinkHref, on in the addon). - The viewer closes when TechDocs routes a link clicked in it, including same-page
#fragmentlinks, which fire nohashchange. - Mermaid diagrams are skipped.
- Hover and other interactive styles in the TechDocs shadow root, for example from a custom styles addon, now apply in the viewer. The viewer no longer sets every presentation property inline as
!important. It sets inline only the values that changed when the SVG moved into the viewer. Hover styles that are active when you click to open the viewer do not stay on in the viewer. dist/svg-viewer.js: a self-contained drop-in script for MkDocs sites outside Backstage, loaded withextra_javascript.pnpm example:servepreviewsexamples/mkdocswith the drop-in script via Poetry andtechdocs-cli serve:mkdocs.@techdocs/cliis a development dependency, and the example uses Poetry instead ofrequirements.txt.- The demo's
?techdocsmode simulates TechDocs link handling for browser tests.