* develop: (233 commits)
style(docs): use `github-dark` hightlight theme
refactor(docs): use default vitepress highlighter
fix: Move redirection to router
ci(renovate): disable pinning dependencies
Revert "chore(deps): pin dependencies"
change shiki getHighlighter import
create separate spec for stateRenderer-v2
diagramStates should not be global; pass it into functions; minor comment fixes
diagramClasses no longer needs to be cached; mermaidAPI no longer calls it repeatedly
(minor) import expectTypeOf in spec
(minor) fix JSdoc tag
+ spec stateRenderer-v2.js getClasses() to verify it returns a {}
(minor) fix JSdoc types in comments
(minor) add comments, remove duplicated line
chore: Add master to link checker
chore: Add docs to redirect.ts
stateDB classes must be a {} not []
feat: Redirect old documentation links.
add stateDiagram-v2 to list of graphs with classDefs
fix(docs): ClassDiagram table
...
Use the `github-dark` highlight theme for fence blocks in vitepress,
instead of the default `material-palenight` theme.
This increases the contrast ratio of `#comments` from 2.75:1 to 4.43:1,
which is a lot more visible.
It still doesn't reach WCAG 2.0 level AA contrast standards,
which requires 4.5:1 as a minimum constrast ratio, but 4.43:1 is
pretty close, and we don't need to manually modify the theme's colours.
Use the default vitepress highlighter instead of making our own
highlighter using shiki.
The benefits are:
- We don't need to directly depend on shiki
- `mermaid-example` code-blocks will use the same highlighting
as other languages (e.g. `html`/`js`).
- We can control the theme from the global `vitepress` config.
- Darkmode/lightmode themes are supported
- Escaping is already handled by the default highlight function
We shouldn't pin dependencies unless we have to.
This is for two reasons:
- If a dependency has a security issue, users should be able to
easily update the dependency, before `mermaid` makes a new release
- If using `mermaid.core.js` in an app, using a dependency range
means that users can bundle less dependencies.
E.g. they won't need to bundle `lodash@4.17.y` just becasue mermaid
needs `lodash@4.17.x`.
For development/CI, our dependencies are pinned by pnpm-lock.yaml
file anyway.