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.
* develop:
chore(deps): update all non-major dependencies
fix(deps): update all non-major dependencies
fix: `sourceLinkTemplate` in typedoc
only call getClasses if the diagram renderer supports it
fix typo
merge fix: get classDefs only if diagram is in CLASSDEF_DIAGRAMS
use lodash isEmpty instead of method defined in utils
chore: Fix cspell
fix: Type of DiagramStyleClassDef, general cleanup
change spec descriptions to active voice (= shorter b/c 'should' isn't needed)
functions and specs: removeExistingElements
functions and specs: createUserstyles; minor changes
functions and specs: createCssStyles, appendDivSvgG,cleanUpSvgCode, putIntoIFrame [for render]
add MockedD3.ts
const isSandboxed, isLooseSecurityLevel, fontFamily; a few more CONSTs
more meaningful var names; move related lines together; const idSelector
comment the main steps (prepare to break into functions that can be tested)
render: define const iFrameId, enclosingDivID and _selector to use in function
specs: encodeEntities, decodeEntities
render: constants